@geowiki/design-system 0.16.10-dev.4 → 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
@@ -7547,7 +7547,7 @@ var VideoPlayer = (props) => {
7547
7547
  var import_jsx_runtime133 = require("react/jsx-runtime");
7548
7548
  var CarouselGalleryItem = ({ text, url, id }) => {
7549
7549
  return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
7550
- !url.includes(".mp4") && !url.includes(".mov") && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "aspect-square sm:w-auto bg-center relative flex group ", id, children: [
7550
+ !url.includes(".mp4") && !url.includes(".mov") && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "aspect-square sm:w-auto bg-center relative flex group ", id: "img_" + id, children: [
7551
7551
  /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7552
7552
  ImageElement,
7553
7553
  {
@@ -7560,7 +7560,7 @@ var CarouselGalleryItem = ({ text, url, id }) => {
7560
7560
  /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: " absolute bottom-6 opacity-0 group-hover:opacity-100", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: " mx-6 text-white text-base leading-[120%] line-clamp-4", children: text }) })
7561
7561
  ] }),
7562
7562
  (url.includes(".mp4") || url.includes(".mov")) && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: " max-w-sm aspect-square relative group cursor-pointer overflow-hidden rounded-xl", children: [
7563
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "transition-all duration-300 group-hover:brightness-50", id, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7563
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "transition-all duration-300 group-hover:brightness-50", id: "vid_" + id, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
7564
7564
  VideoPlayer,
7565
7565
  {
7566
7566
  url,
@@ -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
@@ -7180,7 +7180,7 @@ var VideoPlayer = (props) => {
7180
7180
  import { Fragment as Fragment9, jsx as jsx132, jsxs as jsxs57 } from "react/jsx-runtime";
7181
7181
  var CarouselGalleryItem = ({ text, url, id }) => {
7182
7182
  return /* @__PURE__ */ jsxs57(Fragment9, { children: [
7183
- !url.includes(".mp4") && !url.includes(".mov") && /* @__PURE__ */ jsxs57("div", { className: "aspect-square sm:w-auto bg-center relative flex group ", id, children: [
7183
+ !url.includes(".mp4") && !url.includes(".mov") && /* @__PURE__ */ jsxs57("div", { className: "aspect-square sm:w-auto bg-center relative flex group ", id: "img_" + id, children: [
7184
7184
  /* @__PURE__ */ jsx132(
7185
7185
  ImageElement,
7186
7186
  {
@@ -7193,7 +7193,7 @@ var CarouselGalleryItem = ({ text, url, id }) => {
7193
7193
  /* @__PURE__ */ jsx132("div", { className: " absolute bottom-6 opacity-0 group-hover:opacity-100", children: /* @__PURE__ */ jsx132("div", { className: " mx-6 text-white text-base leading-[120%] line-clamp-4", children: text }) })
7194
7194
  ] }),
7195
7195
  (url.includes(".mp4") || url.includes(".mov")) && /* @__PURE__ */ jsxs57("div", { className: " max-w-sm aspect-square relative group cursor-pointer overflow-hidden rounded-xl", children: [
7196
- /* @__PURE__ */ jsx132("div", { className: "transition-all duration-300 group-hover:brightness-50", id, children: /* @__PURE__ */ jsx132(
7196
+ /* @__PURE__ */ jsx132("div", { className: "transition-all duration-300 group-hover:brightness-50", id: "vid_" + id, children: /* @__PURE__ */ jsx132(
7197
7197
  VideoPlayer,
7198
7198
  {
7199
7199
  url,
@@ -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.4",
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.4"
18
+ "@geowiki/core": "0.16.10-dev.6"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/react": "^19.2.14",