@geowiki/design-system 0.16.17 → 0.16.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1127,8 +1127,10 @@ interface Props$6 {
1127
1127
  galleryItems: CarouselGalleryItemProps[];
1128
1128
  orientation?: "horizontal" | "vertical";
1129
1129
  allowZoom?: boolean;
1130
+ selectImageText?: string;
1130
1131
  onHover?: (id: string) => void;
1131
1132
  saveRotationChanges?: (base64: string | null, id?: any) => void;
1133
+ selectImage?: (id: string) => void;
1132
1134
  }
1133
1135
  declare const CarouselItemList: (props: Props$6) => React$1.JSX.Element;
1134
1136
 
package/dist/index.d.ts CHANGED
@@ -1127,8 +1127,10 @@ interface Props$6 {
1127
1127
  galleryItems: CarouselGalleryItemProps[];
1128
1128
  orientation?: "horizontal" | "vertical";
1129
1129
  allowZoom?: boolean;
1130
+ selectImageText?: string;
1130
1131
  onHover?: (id: string) => void;
1131
1132
  saveRotationChanges?: (base64: string | null, id?: any) => void;
1133
+ selectImage?: (id: string) => void;
1132
1134
  }
1133
1135
  declare const CarouselItemList: (props: Props$6) => React$1.JSX.Element;
1134
1136
 
package/dist/index.js CHANGED
@@ -7608,12 +7608,15 @@ var GalleryCarouselOpen = ({
7608
7608
  open,
7609
7609
  allowZoom,
7610
7610
  setOpen,
7611
- saveRotationChanges
7611
+ saveRotationChanges,
7612
+ selectImage,
7613
+ selectImageText,
7614
+ imageRotation
7612
7615
  }) => {
7613
7616
  const [defaultPhoto, setDefaultPhoto] = (0, import_react25.useState)(currentPhoto);
7614
7617
  const [text, setDefaultText] = (0, import_react25.useState)("");
7615
7618
  const [id, setDefaultId] = (0, import_react25.useState)("");
7616
- const [rotation, setRotation] = (0, import_react25.useState)(0);
7619
+ const [rotation, setRotation] = (0, import_react25.useState)(imageRotation);
7617
7620
  (0, import_react25.useEffect)(() => {
7618
7621
  setDefaultPhoto(currentPhoto);
7619
7622
  }, [currentPhoto]);
@@ -7624,6 +7627,7 @@ var GalleryCarouselOpen = ({
7624
7627
  if (currentIndex > 0) {
7625
7628
  const previousIndex = currentIndex - 1;
7626
7629
  setDefaultPhoto({ imageUrl: list[previousIndex].url });
7630
+ setDefaultId(list[previousIndex].id);
7627
7631
  }
7628
7632
  };
7629
7633
  const handleNext = () => {
@@ -7633,6 +7637,7 @@ var GalleryCarouselOpen = ({
7633
7637
  if (currentIndex < list.length - 1) {
7634
7638
  const nextIndex = currentIndex + 1;
7635
7639
  setDefaultPhoto({ imageUrl: list[nextIndex].url });
7640
+ setDefaultId(list[nextIndex].id);
7636
7641
  }
7637
7642
  };
7638
7643
  const generateBase64ofImage = () => {
@@ -7798,9 +7803,20 @@ var GalleryCarouselOpen = ({
7798
7803
  "div",
7799
7804
  {
7800
7805
  className: "z-40 text-white hover:cursor-pointer",
7801
- onClick: () => saveRotationChanges(generateBase64ofImage(), id),
7806
+ onClick: () => {
7807
+ saveRotationChanges(generateBase64ofImage(), id);
7808
+ setRotation(0);
7809
+ },
7802
7810
  children: "Save rotation changes"
7803
7811
  }
7812
+ ),
7813
+ selectImageText && selectImage && !defaultPhoto.imageUrl.includes(".mp4") && !defaultPhoto.imageUrl.includes(".mov") && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7814
+ "div",
7815
+ {
7816
+ className: "z-40 text-white hover:cursor-pointer",
7817
+ onClick: () => selectImage(id),
7818
+ children: selectImageText
7819
+ }
7804
7820
  )
7805
7821
  ] })
7806
7822
  ] }) })
@@ -7848,9 +7864,12 @@ var CarouselItemList = (props) => {
7848
7864
  id: galleryItem.id
7849
7865
  })),
7850
7866
  open,
7867
+ imageRotation: 0,
7851
7868
  allowZoom: props.allowZoom,
7869
+ selectImageText: props.selectImageText,
7852
7870
  setOpen,
7853
- saveRotationChanges: props.saveRotationChanges
7871
+ saveRotationChanges: props.saveRotationChanges,
7872
+ selectImage: props.selectImage
7854
7873
  }
7855
7874
  )
7856
7875
  ] });
package/dist/index.mjs CHANGED
@@ -7240,12 +7240,15 @@ var GalleryCarouselOpen = ({
7240
7240
  open,
7241
7241
  allowZoom,
7242
7242
  setOpen,
7243
- saveRotationChanges
7243
+ saveRotationChanges,
7244
+ selectImage,
7245
+ selectImageText,
7246
+ imageRotation
7244
7247
  }) => {
7245
7248
  const [defaultPhoto, setDefaultPhoto] = useState14(currentPhoto);
7246
7249
  const [text, setDefaultText] = useState14("");
7247
7250
  const [id, setDefaultId] = useState14("");
7248
- const [rotation, setRotation] = useState14(0);
7251
+ const [rotation, setRotation] = useState14(imageRotation);
7249
7252
  useEffect8(() => {
7250
7253
  setDefaultPhoto(currentPhoto);
7251
7254
  }, [currentPhoto]);
@@ -7256,6 +7259,7 @@ var GalleryCarouselOpen = ({
7256
7259
  if (currentIndex > 0) {
7257
7260
  const previousIndex = currentIndex - 1;
7258
7261
  setDefaultPhoto({ imageUrl: list[previousIndex].url });
7262
+ setDefaultId(list[previousIndex].id);
7259
7263
  }
7260
7264
  };
7261
7265
  const handleNext = () => {
@@ -7265,6 +7269,7 @@ var GalleryCarouselOpen = ({
7265
7269
  if (currentIndex < list.length - 1) {
7266
7270
  const nextIndex = currentIndex + 1;
7267
7271
  setDefaultPhoto({ imageUrl: list[nextIndex].url });
7272
+ setDefaultId(list[nextIndex].id);
7268
7273
  }
7269
7274
  };
7270
7275
  const generateBase64ofImage = () => {
@@ -7430,9 +7435,20 @@ var GalleryCarouselOpen = ({
7430
7435
  "div",
7431
7436
  {
7432
7437
  className: "z-40 text-white hover:cursor-pointer",
7433
- onClick: () => saveRotationChanges(generateBase64ofImage(), id),
7438
+ onClick: () => {
7439
+ saveRotationChanges(generateBase64ofImage(), id);
7440
+ setRotation(0);
7441
+ },
7434
7442
  children: "Save rotation changes"
7435
7443
  }
7444
+ ),
7445
+ selectImageText && selectImage && !defaultPhoto.imageUrl.includes(".mp4") && !defaultPhoto.imageUrl.includes(".mov") && /* @__PURE__ */ jsx133(
7446
+ "div",
7447
+ {
7448
+ className: "z-40 text-white hover:cursor-pointer",
7449
+ onClick: () => selectImage(id),
7450
+ children: selectImageText
7451
+ }
7436
7452
  )
7437
7453
  ] })
7438
7454
  ] }) })
@@ -7480,9 +7496,12 @@ var CarouselItemList = (props) => {
7480
7496
  id: galleryItem.id
7481
7497
  })),
7482
7498
  open,
7499
+ imageRotation: 0,
7483
7500
  allowZoom: props.allowZoom,
7501
+ selectImageText: props.selectImageText,
7484
7502
  setOpen,
7485
- saveRotationChanges: props.saveRotationChanges
7503
+ saveRotationChanges: props.saveRotationChanges,
7504
+ selectImage: props.selectImage
7486
7505
  }
7487
7506
  )
7488
7507
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geowiki/design-system",
3
- "version": "0.16.17",
3
+ "version": "0.16.19",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -15,7 +15,7 @@
15
15
  "peerDependencies": {
16
16
  "react": "^19.2.0",
17
17
  "react-dom": "^19.2.0",
18
- "@geowiki/core": "0.16.17"
18
+ "@geowiki/core": "0.16.19"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/react": "^19.2.14",