@geowiki/design-system 0.16.10-dev.5 → 0.16.10-dev.6

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.js CHANGED
@@ -7589,6 +7589,7 @@ var GalleryCarouselOpen = ({
7589
7589
  }) => {
7590
7590
  const [defaultPhoto, setDefaultPhoto] = (0, import_react25.useState)(currentPhoto);
7591
7591
  const [text, setDefaultText] = (0, import_react25.useState)("");
7592
+ const [id, setDefaultId] = (0, import_react25.useState)("");
7592
7593
  const [rotation, setRotation] = (0, import_react25.useState)(0);
7593
7594
  (0, import_react25.useEffect)(() => {
7594
7595
  setDefaultPhoto(currentPhoto);
@@ -7612,7 +7613,7 @@ var GalleryCarouselOpen = ({
7612
7613
  }
7613
7614
  };
7614
7615
  const generateBase64ofImage = () => {
7615
- const img = document.getElementById(defaultPhoto.id);
7616
+ const img = document.getElementById(id);
7616
7617
  let base64;
7617
7618
  const canvas = document.createElement("canvas");
7618
7619
  const ctx = canvas.getContext("2d");
@@ -7632,6 +7633,7 @@ var GalleryCarouselOpen = ({
7632
7633
  const foundPhoto = list.find((list2) => list2.url === defaultPhoto.imageUrl);
7633
7634
  if (foundPhoto) {
7634
7635
  setDefaultText(foundPhoto.text);
7636
+ setDefaultId(foundPhoto.id);
7635
7637
  }
7636
7638
  }, [defaultPhoto, list]);
7637
7639
  return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react24.Transition.Root, { show: open, as: import_react23.Fragment, "data-component": "ResourceView", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_react24.Dialog, { as: "div", className: "relative z-10", onClose: setOpen, children: [
@@ -7682,7 +7684,7 @@ var GalleryCarouselOpen = ({
7682
7684
  !defaultPhoto.imageUrl.includes(".mp4") && !defaultPhoto.imageUrl.includes(".mov") && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7683
7685
  "img",
7684
7686
  {
7685
- id: defaultPhoto.id,
7687
+ id,
7686
7688
  src: defaultPhoto.imageUrl,
7687
7689
  crossOrigin: "anonymous",
7688
7690
  alt: "Description",
@@ -7693,7 +7695,7 @@ var GalleryCarouselOpen = ({
7693
7695
  (defaultPhoto.imageUrl.includes(".mp4") || defaultPhoto.imageUrl.includes(".mov")) && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
7694
7696
  "video",
7695
7697
  {
7696
- id: defaultPhoto.id,
7698
+ id,
7697
7699
  src: defaultPhoto.imageUrl,
7698
7700
  controls: true,
7699
7701
  preload: "metadata",
@@ -7726,7 +7728,7 @@ var GalleryCarouselOpen = ({
7726
7728
  "div",
7727
7729
  {
7728
7730
  className: "z-40 text-white hover:cursor-pointer",
7729
- onClick: () => saveRotationChanges(generateBase64ofImage(), defaultPhoto.id),
7731
+ onClick: () => saveRotationChanges(generateBase64ofImage(), id),
7730
7732
  children: "Save rotation changes"
7731
7733
  }
7732
7734
  )
package/dist/index.mjs CHANGED
@@ -7222,6 +7222,7 @@ var GalleryCarouselOpen = ({
7222
7222
  }) => {
7223
7223
  const [defaultPhoto, setDefaultPhoto] = useState14(currentPhoto);
7224
7224
  const [text, setDefaultText] = useState14("");
7225
+ const [id, setDefaultId] = useState14("");
7225
7226
  const [rotation, setRotation] = useState14(0);
7226
7227
  useEffect8(() => {
7227
7228
  setDefaultPhoto(currentPhoto);
@@ -7245,7 +7246,7 @@ var GalleryCarouselOpen = ({
7245
7246
  }
7246
7247
  };
7247
7248
  const generateBase64ofImage = () => {
7248
- const img = document.getElementById(defaultPhoto.id);
7249
+ const img = document.getElementById(id);
7249
7250
  let base64;
7250
7251
  const canvas = document.createElement("canvas");
7251
7252
  const ctx = canvas.getContext("2d");
@@ -7265,6 +7266,7 @@ var GalleryCarouselOpen = ({
7265
7266
  const foundPhoto = list.find((list2) => list2.url === defaultPhoto.imageUrl);
7266
7267
  if (foundPhoto) {
7267
7268
  setDefaultText(foundPhoto.text);
7269
+ setDefaultId(foundPhoto.id);
7268
7270
  }
7269
7271
  }, [defaultPhoto, list]);
7270
7272
  return /* @__PURE__ */ jsx133(Transition3.Root, { show: open, as: Fragment10, "data-component": "ResourceView", children: /* @__PURE__ */ jsxs58(Dialog5, { as: "div", className: "relative z-10", onClose: setOpen, children: [
@@ -7315,7 +7317,7 @@ var GalleryCarouselOpen = ({
7315
7317
  !defaultPhoto.imageUrl.includes(".mp4") && !defaultPhoto.imageUrl.includes(".mov") && /* @__PURE__ */ jsx133(
7316
7318
  "img",
7317
7319
  {
7318
- id: defaultPhoto.id,
7320
+ id,
7319
7321
  src: defaultPhoto.imageUrl,
7320
7322
  crossOrigin: "anonymous",
7321
7323
  alt: "Description",
@@ -7326,7 +7328,7 @@ var GalleryCarouselOpen = ({
7326
7328
  (defaultPhoto.imageUrl.includes(".mp4") || defaultPhoto.imageUrl.includes(".mov")) && /* @__PURE__ */ jsx133(
7327
7329
  "video",
7328
7330
  {
7329
- id: defaultPhoto.id,
7331
+ id,
7330
7332
  src: defaultPhoto.imageUrl,
7331
7333
  controls: true,
7332
7334
  preload: "metadata",
@@ -7359,7 +7361,7 @@ var GalleryCarouselOpen = ({
7359
7361
  "div",
7360
7362
  {
7361
7363
  className: "z-40 text-white hover:cursor-pointer",
7362
- onClick: () => saveRotationChanges(generateBase64ofImage(), defaultPhoto.id),
7364
+ onClick: () => saveRotationChanges(generateBase64ofImage(), id),
7363
7365
  children: "Save rotation changes"
7364
7366
  }
7365
7367
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geowiki/design-system",
3
- "version": "0.16.10-dev.5",
3
+ "version": "0.16.10-dev.6",
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.10-dev.5"
18
+ "@geowiki/core": "0.16.10-dev.6"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/react": "^19.2.14",