Skip to content

Commit

Permalink
Merge branch 'master' into partial-window-mock
Browse files Browse the repository at this point in the history
  • Loading branch information
IzaacAyelin committed Jun 17, 2024
2 parents 3c6f3cb + df1196a commit 8d61889
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 33 deletions.
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packages": [
"packages/*"
],
"version": "5.0.94"
}
"version": "5.0.98"
}
6 changes: 3 additions & 3 deletions packages/blueprints/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pro-gallery-blueprints",
"version": "5.0.94",
"version": "5.0.98",
"private": false,
"author": {
"name": "Nir Naor",
Expand Down Expand Up @@ -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/"
Expand Down
8 changes: 4 additions & 4 deletions packages/gallery/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": false,
"name": "pro-gallery",
"version": "5.0.94",
"version": "5.0.98",
"sideEffects": [
"./src/components/styles/gallery.scss"
],
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions packages/gallery/src/components/helpers/3dManager.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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<THREE.Texture>((resolve) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/gallery/src/components/item/media/mediaItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function MediaItem<T extends Record<string, any>>(props: MediaPro
{props.hover}
</>
);
if (!isMediaPlayable) {
if (!isMediaPlayable || props.isPrerenderMode) {
return placeholder;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions packages/layouts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -43,6 +43,6 @@
"registry": "https://registry.npmjs.org/"
},
"dependencies": {
"pro-gallery-lib": "5.0.94"
"pro-gallery-lib": "5.0.98"
}
}
2 changes: 1 addition & 1 deletion packages/lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pro-gallery-lib",
"version": "5.0.94",
"version": "5.0.98",
"private": false,
"author": {
"name": "Rita Bazak",
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/collageGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/columnGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/fullsizeGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/gridGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/masonryGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/panoramaGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/sliderGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/slideshowGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion packages/lib/src/core/presets/thumbnailsGallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions packages/playground/src/constants/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8d61889

Please sign in to comment.