diff --git a/lerna.json b/lerna.json index d1d4291fc..739866510 100644 --- a/lerna.json +++ b/lerna.json @@ -2,5 +2,5 @@ "packages": [ "packages/*" ], - "version": "5.0.94" -} + "version": "5.0.98" +} \ No newline at end of file diff --git a/packages/blueprints/package.json b/packages/blueprints/package.json index a579124d1..97e8d78d0 100644 --- a/packages/blueprints/package.json +++ b/packages/blueprints/package.json @@ -1,6 +1,6 @@ { "name": "pro-gallery-blueprints", - "version": "5.0.94", + "version": "5.0.98", "private": false, "author": { "name": "Nir Naor", @@ -41,8 +41,8 @@ "typescript": "^4.9.5" }, "dependencies": { - "pro-gallery-lib": "5.0.94", - "pro-layouts": "5.0.94" + "pro-gallery-lib": "5.0.98", + "pro-layouts": "5.0.98" }, "publishConfig": { "registry": "https://registry.npmjs.org/" diff --git a/packages/gallery/package.json b/packages/gallery/package.json index fa277a783..29feb0f64 100644 --- a/packages/gallery/package.json +++ b/packages/gallery/package.json @@ -1,7 +1,7 @@ { "private": false, "name": "pro-gallery", - "version": "5.0.94", + "version": "5.0.98", "sideEffects": [ "./src/components/styles/gallery.scss" ], @@ -38,9 +38,9 @@ "dependencies": { "@vimeo/player": "2.8.2", "hls.js": "1.4.12", - "pro-gallery-blueprints": "5.0.94", - "pro-gallery-lib": "5.0.94", - "pro-layouts": "5.0.94", + "pro-gallery-blueprints": "5.0.98", + "pro-gallery-lib": "5.0.98", + "pro-layouts": "5.0.98", "react": "^18.2.0", "react-dom": "^18.2.0", "react-player": "2.11.0", diff --git a/packages/gallery/src/components/helpers/3dManager.ts b/packages/gallery/src/components/helpers/3dManager.ts index 9c7a5b0bc..95b61e749 100644 --- a/packages/gallery/src/components/helpers/3dManager.ts +++ b/packages/gallery/src/components/helpers/3dManager.ts @@ -1,8 +1,8 @@ import { useCallback, useState } from 'react'; import * as THREE from 'three'; -import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader'; -import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader'; -import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'; +import { GLTFLoader, GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js'; +import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js'; +import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js'; import { LoadingManager } from 'three'; @@ -219,7 +219,7 @@ export function createSceneManager(container: HTMLElement, canvas: HTMLCanvasEle }, async loadHDR(url) { const { RGBELoader } = await import( - /* webpackChunkName: "three-rbdl-loader" */ 'three/examples/jsm/loaders/RGBELoader' + /* webpackChunkName: "three-rbdl-loader" */ 'three/examples/jsm/loaders/RGBELoader.js' ); const hdrLoader = new RGBELoader(); const hdr = await new Promise((resolve) => { diff --git a/packages/gallery/src/components/item/media/mediaItem.tsx b/packages/gallery/src/components/item/media/mediaItem.tsx index 8ee3fc5d0..d08ce8792 100644 --- a/packages/gallery/src/components/item/media/mediaItem.tsx +++ b/packages/gallery/src/components/item/media/mediaItem.tsx @@ -113,7 +113,7 @@ export default function MediaItem>(props: MediaPro {props.hover} ); - if (!isMediaPlayable) { + if (!isMediaPlayable || props.isPrerenderMode) { return placeholder; } diff --git a/packages/gallery/src/components/item/videos/videoItemWrapper.tsx b/packages/gallery/src/components/item/videos/videoItemWrapper.tsx index 0d93f27df..258472c23 100644 --- a/packages/gallery/src/components/item/videos/videoItemWrapper.tsx +++ b/packages/gallery/src/components/item/videos/videoItemWrapper.tsx @@ -6,7 +6,8 @@ import MediaImage, { MediaImplementationProps, MediaBaseProps } from '../media/m const isIos = utils.isiOS(); const useTransparentPlayButtonAndForceLoadVideo = (props) => - (props.videoUrl || props.url).includes('youtube.com') && isIos; + ((props.videoUrl || props.url).includes('youtube.com') || (props.videoUrl || props.url).includes('youtu.be')) && + isIos; const VideoItem = React.lazy(() => { return import(/* webpackChunkName: "proGallery_videoItem" */ './videoItem'); diff --git a/packages/layouts/package.json b/packages/layouts/package.json index 990e15302..ba287cef1 100644 --- a/packages/layouts/package.json +++ b/packages/layouts/package.json @@ -2,7 +2,7 @@ "private": false, "name": "pro-layouts", "sideEffects": false, - "version": "5.0.94", + "version": "5.0.98", "author": { "name": "Guy Sopher", "email": "guysopher@gmail.com" @@ -43,6 +43,6 @@ "registry": "https://registry.npmjs.org/" }, "dependencies": { - "pro-gallery-lib": "5.0.94" + "pro-gallery-lib": "5.0.98" } } diff --git a/packages/lib/package.json b/packages/lib/package.json index e312e61f6..6ab1aca0d 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -1,6 +1,6 @@ { "name": "pro-gallery-lib", - "version": "5.0.94", + "version": "5.0.98", "private": false, "author": { "name": "Rita Bazak", diff --git a/packages/lib/src/core/presets/collageGallery.js b/packages/lib/src/core/presets/collageGallery.js index 31f009a50..625f940ee 100644 --- a/packages/lib/src/core/presets/collageGallery.js +++ b/packages/lib/src/core/presets/collageGallery.js @@ -23,7 +23,6 @@ const fixToCollage = (options) => { presetOptions[optionsMap.layoutParams.structure.responsiveMode] = GALLERY_CONSTS[optionsMap.layoutParams.structure.responsiveMode].FIT_TO_SCREEN; presetOptions[optionsMap.layoutParams.structure.numberOfColumns] = 0; - presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false; presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false; presetOptions[optionsMap.behaviourParams.gallery.horizontal.slideAnimation] = GALLERY_CONSTS[optionsMap.behaviourParams.gallery.horizontal.slideAnimation].SCROLL; diff --git a/packages/lib/src/core/presets/columnGallery.js b/packages/lib/src/core/presets/columnGallery.js index 31489eef0..357675e52 100644 --- a/packages/lib/src/core/presets/columnGallery.js +++ b/packages/lib/src/core/presets/columnGallery.js @@ -21,7 +21,6 @@ const fixToColumn = (options) => { presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false; presetOptions[optionsMap.layoutParams.structure.numberOfColumns] = 0; - presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false; presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false; presetOptions[optionsMap.behaviourParams.gallery.horizontal.slideAnimation] = diff --git a/packages/lib/src/core/presets/fullsizeGallery.js b/packages/lib/src/core/presets/fullsizeGallery.js index 7854e259d..3569a43e5 100644 --- a/packages/lib/src/core/presets/fullsizeGallery.js +++ b/packages/lib/src/core/presets/fullsizeGallery.js @@ -22,7 +22,6 @@ const fixToFullsize = (options) => { ]; presetOptions[optionsMap.layoutParams.structure.numberOfGridRows] = 1; presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false; - presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false; presetOptions[optionsMap.behaviourParams.gallery.horizontal.enableScrollSnap] = true; presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = true; presetOptions[optionsMap.layoutParams.structure.scatter.randomScatter] = 0; diff --git a/packages/lib/src/core/presets/gridGallery.js b/packages/lib/src/core/presets/gridGallery.js index 966b55828..31bd16668 100644 --- a/packages/lib/src/core/presets/gridGallery.js +++ b/packages/lib/src/core/presets/gridGallery.js @@ -21,7 +21,6 @@ const fixToGrid = (options) => { presetOptions[optionsMap.behaviourParams.gallery.horizontal.loop] = false; presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false; // presetOptions.galleryType = 'Columns'; - presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false; presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false; presetOptions[optionsMap.layoutParams.targetItemSize.minimum] = 50; presetOptions[optionsMap.behaviourParams.gallery.horizontal.slideAnimation] = diff --git a/packages/lib/src/core/presets/masonryGallery.js b/packages/lib/src/core/presets/masonryGallery.js index de2adb573..9ef0672b7 100644 --- a/packages/lib/src/core/presets/masonryGallery.js +++ b/packages/lib/src/core/presets/masonryGallery.js @@ -14,7 +14,6 @@ const fixToMasonry = (options) => { GALLERY_CONSTS[optionsMap.layoutParams.groups.allowedGroupTypes]['1'], ]; presetOptions[optionsMap.behaviourParams.gallery.horizontal.loop] = false; - presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false; presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false; return presetOptions; }; diff --git a/packages/lib/src/core/presets/panoramaGallery.js b/packages/lib/src/core/presets/panoramaGallery.js index f2ffedb56..60d2e9e86 100644 --- a/packages/lib/src/core/presets/panoramaGallery.js +++ b/packages/lib/src/core/presets/panoramaGallery.js @@ -18,7 +18,6 @@ const fixToPanorama = (options) => { presetOptions[optionsMap.layoutParams.structure.responsiveMode] = GALLERY_CONSTS[optionsMap.layoutParams.structure.responsiveMode].SET_ITEMS_PER_ROW; presetOptions[optionsMap.layoutParams.structure.numberOfColumns] = 1; - presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false; presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false; presetOptions[optionsMap.behaviourParams.gallery.horizontal.loop] = false; diff --git a/packages/lib/src/core/presets/sliderGallery.js b/packages/lib/src/core/presets/sliderGallery.js index bcf0c44aa..8405ee378 100644 --- a/packages/lib/src/core/presets/sliderGallery.js +++ b/packages/lib/src/core/presets/sliderGallery.js @@ -18,7 +18,6 @@ const fixToSlider = (options) => { presetOptions[optionsMap.layoutParams.structure.numberOfGridRows] = 1; presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false; - presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false; presetOptions[optionsMap.behaviourParams.gallery.horizontal.enableScrollSnap] = true; presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = true; presetOptions[optionsMap.behaviourParams.gallery.horizontal.slideAnimation] = diff --git a/packages/lib/src/core/presets/slideshowGallery.js b/packages/lib/src/core/presets/slideshowGallery.js index b3b4d9d56..1c1f2ee4d 100644 --- a/packages/lib/src/core/presets/slideshowGallery.js +++ b/packages/lib/src/core/presets/slideshowGallery.js @@ -30,7 +30,6 @@ const fixToSlideshow = (options) => { presetOptions[optionsMap.layoutParams.targetItemSize.value] = 550; presetOptions[optionsMap.layoutParams.structure.numberOfColumns] = 1; - presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false; presetOptions[optionsMap.behaviourParams.gallery.horizontal.enableScrollSnap] = true; presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false; diff --git a/packages/lib/src/core/presets/thumbnailsGallery.js b/packages/lib/src/core/presets/thumbnailsGallery.js index 55fb8b22f..45d2b32f9 100644 --- a/packages/lib/src/core/presets/thumbnailsGallery.js +++ b/packages/lib/src/core/presets/thumbnailsGallery.js @@ -24,7 +24,6 @@ const fixToThumbnail = (options) => { presetOptions[optionsMap.layoutParams.structure.numberOfGridRows] = 1; presetOptions[optionsMap.layoutParams.crop.enableSmartCrop] = false; presetOptions[optionsMap.layoutParams.thumbnails.enable] = true; - presetOptions[optionsMap.behaviourParams.gallery.horizontal.blockScroll] = false; presetOptions[optionsMap.behaviourParams.gallery.horizontal.enableScrollSnap] = true; presetOptions[optionsMap.layoutParams.crop.cropOnlyFill] = false; presetOptions[optionsMap.layoutParams.structure.scatter.randomScatter] = 0; diff --git a/packages/lib/src/settings/options/behaviourParams_gallery_horizontal_slideAnimation.js b/packages/lib/src/settings/options/behaviourParams_gallery_horizontal_slideAnimation.js index 0ce01970e..172432c31 100644 --- a/packages/lib/src/settings/options/behaviourParams_gallery_horizontal_slideAnimation.js +++ b/packages/lib/src/settings/options/behaviourParams_gallery_horizontal_slideAnimation.js @@ -10,7 +10,7 @@ export default { GALLERY_CONSTS[optionsMap.layoutParams.structure.scrollDirection].HORIZONTAL && options[optionsMap.layoutParams.groups.groupSize] === 1 && options[optionsMap.layoutParams.crop.enable] && - options[optionsMap.layoutParams.crop.ratios] === ['100%/100%'], //v5 TODO check that this works + JSON.stringify(options[optionsMap.layoutParams.crop.ratios]) === JSON.stringify(['100%/100%']), //v5 TODO check that this works isRelevantDescription: 'Set a Horizontal gallery ("Scroll Direction" as "Horizontal"), set "Max Group Size" to "1" and set "Crop Images" to true.', type: INPUT_TYPES.OPTIONS, diff --git a/packages/playground/package.json b/packages/playground/package.json index 10251b2af..98adf50b5 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -1,6 +1,6 @@ { "name": "pro-playground", - "version": "5.0.94", + "version": "5.0.98", "private": true, "scripts": { "watch": "sleep 10 && node scripts/start.js", @@ -22,10 +22,10 @@ "image-client-api": "^1.3130.0", "lodash.clonedeep": "^4.5.0", "moment": "2.29.2", - "pro-gallery": "5.0.94", - "pro-gallery-blueprints": "5.0.94", - "pro-gallery-lib": "5.0.94", - "pro-layouts": "5.0.94", + "pro-gallery": "5.0.98", + "pro-gallery-blueprints": "5.0.98", + "pro-gallery-lib": "5.0.98", + "pro-layouts": "5.0.98", "re-resizable": "^6.8.0", "react": "^18.2.0", "react-color": "^2.17.3", diff --git a/packages/playground/src/constants/settings.js b/packages/playground/src/constants/settings.js index eb3916b82..3791a8eb8 100644 --- a/packages/playground/src/constants/settings.js +++ b/packages/playground/src/constants/settings.js @@ -82,6 +82,7 @@ export const optionsBySection = { optionsMap.layoutParams.thumbnails.spacing, optionsMap.layoutParams.thumbnails.marginToGallery, optionsMap.layoutParams.structure.enableStreching, + optionsMap.behaviourParams.gallery.horizontal.blockScroll, ], [SECTIONS.INFO]: [ optionsMap.layoutParams.info.placement,