@gxpl/sdk 0.0.51 → 0.0.52

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.
@@ -404,12 +404,15 @@ export declare const ProjectSchema: z.ZodObject<{
404
404
  scenesAssets: z.ZodArray<z.ZodObject<{
405
405
  url: z.ZodString;
406
406
  id: z.ZodString;
407
+ articleId: z.ZodString;
407
408
  }, "strip", z.ZodTypeAny, {
408
409
  url: string;
409
410
  id: string;
411
+ articleId: string;
410
412
  }, {
411
413
  url: string;
412
414
  id: string;
415
+ articleId: string;
413
416
  }>, "many">;
414
417
  relations: z.ZodArray<z.ZodObject<{
415
418
  from: z.ZodString;
@@ -1051,6 +1054,7 @@ export declare const ProjectSchema: z.ZodObject<{
1051
1054
  scenesAssets: {
1052
1055
  url: string;
1053
1056
  id: string;
1057
+ articleId: string;
1054
1058
  }[];
1055
1059
  relations: {
1056
1060
  type: "slide" | "fade";
@@ -1202,6 +1206,7 @@ export declare const ProjectSchema: z.ZodObject<{
1202
1206
  scenesAssets: {
1203
1207
  url: string;
1204
1208
  id: string;
1209
+ articleId: string;
1205
1210
  }[];
1206
1211
  relations: {
1207
1212
  type: "slide" | "fade";
@@ -61,7 +61,8 @@ exports.ProjectSchema = zod_1.z.object({
61
61
  }),
62
62
  scenesAssets: zod_1.z.array(zod_1.z.object({
63
63
  url: zod_1.z.string(),
64
- id: zod_1.z.string()
64
+ id: zod_1.z.string(),
65
+ articleId: zod_1.z.string()
65
66
  })),
66
67
  relations: zod_1.z.array(zod_1.z.object({
67
68
  from: zod_1.z.string().min(1),
@@ -19,6 +19,7 @@ export interface Project {
19
19
  scenesAssets: {
20
20
  url: string;
21
21
  id: string;
22
+ articleId: string;
22
23
  }[];
23
24
  foreground: TFixedLayer;
24
25
  background: TFixedLayer;
@@ -7,6 +7,7 @@ interface Props {
7
7
  assets: {
8
8
  url: string;
9
9
  id: string;
10
+ articleId: string;
10
11
  }[];
11
12
  }
12
13
  export declare const AssetsCacheProvider: FC<PropsWithChildren<Props>>;
@@ -9,15 +9,15 @@ const AssetsCacheProvider = ({ children, assets }) => {
9
9
  const [videoCache, setVideoCache] = (0, react_1.useState)(new Map());
10
10
  const [imageCache, setImageCache] = (0, react_1.useState)(new Map());
11
11
  (0, react_1.useEffect)(() => {
12
- assets.forEach(({ url, id }) => {
12
+ assets.forEach(({ url, id, articleId }) => {
13
13
  if (isVideoAsset(url)) {
14
14
  const video = getVideo(url);
15
- setVideoCache(prev => prev.set((0, getCacheAssetKey_1.getCacheAssetKey)(url, id), video));
15
+ setVideoCache(prev => prev.set((0, getCacheAssetKey_1.getCacheAssetKey)(url, id, articleId), video));
16
16
  }
17
17
  if (isImageAsset(url)) {
18
18
  const img = new Image();
19
19
  img.src = url;
20
- setImageCache(prev => prev.set((0, getCacheAssetKey_1.getCacheAssetKey)(url, id), img));
20
+ setImageCache(prev => prev.set((0, getCacheAssetKey_1.getCacheAssetKey)(url, id, articleId), img));
21
21
  }
22
22
  });
23
23
  }, [assets]);
@@ -1 +1 @@
1
- export declare function getCacheAssetKey(url: string, id: string): string;
1
+ export declare function getCacheAssetKey(url: string, id: string, articleId: string): string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCacheAssetKey = getCacheAssetKey;
4
- function getCacheAssetKey(url, id) {
5
- return `${url}-${id}`;
4
+ function getCacheAssetKey(url, id, articleId) {
5
+ return `${url}-${id}-${articleId}`;
6
6
  }
@@ -5,6 +5,7 @@ interface Props {
5
5
  section: TSection;
6
6
  children: SectionChild[];
7
7
  data?: any;
8
+ articleId: string;
8
9
  }
9
10
  export declare const Section: FC<Props>;
10
11
  export declare function getSectionHeight(heightData: SectionHeight): string;
@@ -16,7 +16,7 @@ const SectionImage_1 = require("./SectionImage");
16
16
  const checkOverflowClipSupport_1 = require("../../utils/checkOverflowClipSupport");
17
17
  const Section_1 = require("../../../sdk/types/article/Section");
18
18
  const DEFAULT_COLOR = 'rgba(0, 0, 0, 0)';
19
- const Section = ({ section, data, children }) => {
19
+ const Section = ({ section, data, children, articleId }) => {
20
20
  const id = (0, react_1.useId)();
21
21
  const sectionRef = (0, react_1.useRef)(null);
22
22
  const { customSections } = (0, useCntrlContext_1.useCntrlContext)();
@@ -34,7 +34,7 @@ const Section = ({ section, data, children }) => {
34
34
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: `section-${section.id}`, id: section.name, ref: sectionRef, children: [media && media.size !== 'none' && sectionRef.current && ((0, jsx_runtime_1.jsx)("div", { className: `section-background-overlay-${section.id}`, children: (0, jsx_runtime_1.jsxs)("div", { className: `section-background-wrapper-${section.id}`, style: {
35
35
  transform: media.position === 'fixed' ? 'translateY(-100vh)' : 'unset',
36
36
  height: media.position === 'fixed' ? `calc(${getSectionHeight(height)} + 200vh)` : getSectionHeight(height)
37
- }, children: [media.type === 'video' && ((0, jsx_runtime_1.jsx)(SectionVideo_1.SectionVideo, { container: sectionRef.current, sectionId: section.id, media: media })), media.type === 'image' && ((0, jsx_runtime_1.jsx)(SectionImage_1.SectionImage, { media: media, sectionId: section.id }))] }, `section-background-wrapper-${section.id}`) })), children] }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
37
+ }, children: [media.type === 'video' && ((0, jsx_runtime_1.jsx)(SectionVideo_1.SectionVideo, { container: sectionRef.current, sectionId: section.id, media: media, articleId: articleId })), media.type === 'image' && ((0, jsx_runtime_1.jsx)(SectionImage_1.SectionImage, { media: media, sectionId: section.id, articleId: articleId }))] }, `section-background-wrapper-${section.id}`) })), children] }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
38
38
  .section-${section.id} {
39
39
  height: ${getSectionHeight(height)};
40
40
  position: relative;
@@ -9,6 +9,7 @@ export type TSectionImage = {
9
9
  interface Props {
10
10
  media: TSectionImage;
11
11
  sectionId: string;
12
+ articleId: string;
12
13
  }
13
14
  export declare const SectionImage: FC<Props>;
14
15
  export {};
@@ -5,9 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const useCacheImage_1 = require("../../assets/useCacheImage");
7
7
  const getCacheAssetKey_1 = require("../../assets/getCacheAssetKey");
8
- const SectionImage = ({ media, sectionId }) => {
8
+ const SectionImage = ({ media, sectionId, articleId }) => {
9
9
  const { url, size, position, offsetX } = media;
10
- const key = (0, getCacheAssetKey_1.getCacheAssetKey)(url, sectionId);
10
+ const key = (0, getCacheAssetKey_1.getCacheAssetKey)(url, sectionId, articleId);
11
11
  const [container, setContainer] = (0, react_1.useState)(null);
12
12
  const isContainHeight = size === 'contain-height';
13
13
  const hasOffsetX = offsetX !== null;
@@ -12,6 +12,7 @@ interface Props {
12
12
  container: HTMLDivElement;
13
13
  sectionId: string;
14
14
  media: TSectionVideo;
15
+ articleId: string;
15
16
  }
16
17
  export declare const SectionVideo: FC<Props>;
17
18
  export {};
@@ -6,14 +6,14 @@ const react_1 = require("react");
6
6
  const useCacheVideo_1 = require("../../assets/useCacheVideo");
7
7
  const useCacheImage_1 = require("../../assets/useCacheImage");
8
8
  const getCacheAssetKey_1 = require("../../assets/getCacheAssetKey");
9
- const SectionVideo = ({ container, sectionId, media }) => {
9
+ const SectionVideo = ({ container, sectionId, media, articleId }) => {
10
10
  const [video, setVideo] = (0, react_1.useState)(null);
11
11
  const [videoWrapper, setVideoWrapper] = (0, react_1.useState)(null);
12
12
  const [coverImageWrapper, setCoverImageWrapper] = (0, react_1.useState)(null);
13
13
  const [isVideoWidthOverflow, setIsVideoWidthOverflow] = (0, react_1.useState)(false);
14
14
  const { url, size, position, offsetX, coverUrl, play } = media;
15
- const key = (0, getCacheAssetKey_1.getCacheAssetKey)(url, sectionId);
16
- const coverKey = coverUrl ? (0, getCacheAssetKey_1.getCacheAssetKey)(coverUrl, sectionId) : null;
15
+ const key = (0, getCacheAssetKey_1.getCacheAssetKey)(url, sectionId, articleId);
16
+ const coverKey = coverUrl ? (0, getCacheAssetKey_1.getCacheAssetKey)(coverUrl, sectionId, articleId) : null;
17
17
  const [isPlaying, setIsPlaying] = (0, react_1.useState)(false);
18
18
  const [userPaused, setUserPaused] = (0, react_1.useState)(false);
19
19
  const [isClickedOnCover, setIsClickedOnCover] = (0, react_1.useState)(false);
@@ -25,7 +25,7 @@ const Sections = ({ article, container }) => {
25
25
  }, [articleRectObserver, container]);
26
26
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: article.sections.map((section, i) => {
27
27
  const data = {};
28
- return ((0, jsx_runtime_1.jsx)(Section_1.Section, { section: section, data: data, children: article.sections[i].items.map(item => ((0, jsx_runtime_1.jsx)(Item_1.Item, { item: item, sectionId: section.id, articleHeight: articleHeight }, item.id))) }, section.id));
28
+ return ((0, jsx_runtime_1.jsx)(Section_1.Section, { articleId: article.id, section: section, data: data, children: article.sections[i].items.map(item => ((0, jsx_runtime_1.jsx)(Item_1.Item, { item: item, articleId: article.id, sectionId: section.id, articleHeight: articleHeight }, item.id))) }, section.id));
29
29
  }) }));
30
30
  };
31
31
  exports.Sections = Sections;
@@ -5,6 +5,7 @@ interface ChildItemProps {
5
5
  sectionId: string;
6
6
  isParentVisible?: boolean;
7
7
  isInFixedLayer?: boolean;
8
+ articleId?: string;
8
9
  }
9
10
  export declare const CompoundChild: FC<ChildItemProps>;
10
11
  export {};
@@ -21,7 +21,7 @@ const useItemPointerEvents_1 = require("../useItemPointerEvents");
21
21
  const useItemArea_1 = require("../useItemArea");
22
22
  const ArticleItemType_1 = require("../../../../sdk/types/article/ArticleItemType");
23
23
  const noop = () => null;
24
- const CompoundChild = ({ item, sectionId, isParentVisible = true, isInFixedLayer = false }) => {
24
+ const CompoundChild = ({ item, sectionId, isParentVisible = true, isInFixedLayer = false, articleId }) => {
25
25
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
26
26
  const id = (0, react_1.useId)();
27
27
  const exemplary = (0, useExemplary_1.useExemplary)();
@@ -71,7 +71,7 @@ const CompoundChild = ({ item, sectionId, isParentVisible = true, isInFixedLayer
71
71
  } }, triggers, { children: [(0, jsx_runtime_1.jsx)("div", { className: `item-${item.id}-inner`, style: {
72
72
  transition: (_l = innerStateProps === null || innerStateProps === void 0 ? void 0 : innerStateProps.transition) !== null && _l !== void 0 ? _l : 'none',
73
73
  transform: `scale(${scale})`,
74
- }, children: (0, jsx_runtime_1.jsx)(RichTextWrapper_1.RichTextWrapper, { isRichText: isRichText, transformOrigin: transformOrigin, children: (0, jsx_runtime_1.jsx)(ItemComponent, { isInFixedLayer: isInFixedLayer, item: item, sectionId: sectionId, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange, isInCompound: true }) }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
74
+ }, children: (0, jsx_runtime_1.jsx)(RichTextWrapper_1.RichTextWrapper, { isRichText: isRichText, transformOrigin: transformOrigin, children: (0, jsx_runtime_1.jsx)(ItemComponent, { articleId: articleId, isInFixedLayer: isInFixedLayer, item: item, sectionId: sectionId, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange, isInCompound: true }) }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
75
75
  .item-${item.id}-inner {
76
76
  width: 100%;
77
77
  height: 100%;
@@ -13,7 +13,7 @@ const LinkWrapper_1 = require("../LinkWrapper");
13
13
  const style_1 = __importDefault(require("styled-jsx/style"));
14
14
  const CompoundChild_1 = require("./CompoundChild");
15
15
  const useCompoundItem_1 = require("./useCompoundItem");
16
- const CompoundItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityChange }) => {
16
+ const CompoundItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityChange, articleId }) => {
17
17
  var _a, _b, _c;
18
18
  const id = (0, react_1.useId)();
19
19
  const { items } = item;
@@ -32,7 +32,7 @@ const CompoundItem = ({ item, sectionId, onResize, interactionCtrl, onVisibility
32
32
  opacity,
33
33
  transform: `rotate(${angle}deg)`,
34
34
  transition: (_c = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _c !== void 0 ? _c : 'none'
35
- }, children: items && items.map(item => ((0, jsx_runtime_1.jsx)(CompoundChild_1.CompoundChild, { item: item, sectionId: sectionId, isParentVisible: isInteractive }, item.id))) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
35
+ }, children: items && items.map(item => ((0, jsx_runtime_1.jsx)(CompoundChild_1.CompoundChild, { item: item, articleId: articleId, sectionId: sectionId, isParentVisible: isInteractive }, item.id))) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
36
36
  .compound-${item.id} {
37
37
  overflow: ${item.params.overflow};
38
38
  position: absolute;
@@ -20,7 +20,7 @@ const useExemplary_1 = require("../../../common/useExemplary");
20
20
  const AssetsCacheProvider_1 = require("../../../assets/AssetsCacheProvider");
21
21
  const useCacheImage_1 = require("../../../assets/useCacheImage");
22
22
  const getCacheAssetKey_1 = require("../../../assets/getCacheAssetKey");
23
- const ImageItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityChange }) => {
23
+ const ImageItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityChange, articleId }) => {
24
24
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
25
25
  const id = (0, react_1.useId)();
26
26
  const { radius: itemRadius, strokeWidth: itemStrokeWidth, opacity: itemOpacity, strokeFill: itemStrokeFill, blur: itemBlur } = (0, useFileItem_1.useFileItem)(item, sectionId);
@@ -29,7 +29,7 @@ const ImageItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
29
29
  const [wrapperRef, setWrapperRef] = (0, react_1.useState)(null);
30
30
  (0, useRegisterResize_1.useRegisterResize)(wrapperRef, onResize);
31
31
  const { url, hasGLEffect } = item.params;
32
- const cacheKey = (0, getCacheAssetKey_1.getCacheAssetKey)(url, item.id);
32
+ const cacheKey = (0, getCacheAssetKey_1.getCacheAssetKey)(url, item.id, articleId !== null && articleId !== void 0 ? articleId : '');
33
33
  const fxCanvas = (0, react_1.useRef)(null);
34
34
  const isInitialRef = (0, react_1.useRef)(true);
35
35
  const { controlsValues, fragmentShader } = (0, useItemFXData_1.useItemFXData)(item, sectionId);
@@ -22,14 +22,14 @@ const AssetsCacheProvider_1 = require("../../../assets/AssetsCacheProvider");
22
22
  const useCacheVideo_1 = require("../../../assets/useCacheVideo");
23
23
  const useCacheImage_1 = require("../../../assets/useCacheImage");
24
24
  const getCacheAssetKey_1 = require("../../../assets/getCacheAssetKey");
25
- const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityChange }) => {
25
+ const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityChange, articleId }) => {
26
26
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
27
27
  const id = (0, react_1.useId)();
28
28
  const { radius: itemRadius, strokeWidth: itemStrokeWidth, strokeFill: itemStrokeFill, opacity: itemOpacity, blur: itemBlur } = (0, useFileItem_1.useFileItem)(item, sectionId);
29
29
  const { videoCache, imageCache } = (0, react_1.useContext)(AssetsCacheProvider_1.AssetsCacheContext);
30
30
  const [isVideoPlaying, setIsVideoPlaying] = (0, react_1.useState)(false);
31
- const videoCacheKey = (0, getCacheAssetKey_1.getCacheAssetKey)(item.params.url, item.id);
32
- const coverCacheKey = item.params.coverUrl ? (0, getCacheAssetKey_1.getCacheAssetKey)(item.params.coverUrl, item.id) : null;
31
+ const videoCacheKey = (0, getCacheAssetKey_1.getCacheAssetKey)(item.params.url, item.id, articleId !== null && articleId !== void 0 ? articleId : '');
32
+ const coverCacheKey = item.params.coverUrl ? (0, getCacheAssetKey_1.getCacheAssetKey)(item.params.coverUrl, item.id, articleId !== null && articleId !== void 0 ? articleId : '') : null;
33
33
  const isScrollPausedRef = (0, react_1.useRef)(false);
34
34
  const [userPaused, setUserPaused] = (0, react_1.useState)(false);
35
35
  const [isVideoInteracted, setIsVideoInteracted] = (0, react_1.useState)(false);
@@ -14,7 +14,7 @@ const useItemAngle_1 = require("../useItemAngle");
14
14
  const useGroupItem_1 = require("./useGroupItem");
15
15
  const getStyleFromItemStateAndParams_1 = require("../../../utils/getStyleFromItemStateAndParams");
16
16
  const CompoundChild_1 = require("../CompoundItem/CompoundChild");
17
- const GroupItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityChange, isInCompound, isInFixedLayer }) => {
17
+ const GroupItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityChange, isInCompound, isInFixedLayer, articleId }) => {
18
18
  var _a, _b, _c, _d;
19
19
  const id = (0, react_1.useId)();
20
20
  const { items } = item;
@@ -30,7 +30,7 @@ const GroupItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
30
30
  (0, react_1.useEffect)(() => {
31
31
  onVisibilityChange === null || onVisibilityChange === void 0 ? void 0 : onVisibilityChange(isInteractive);
32
32
  }, [isInteractive, onVisibilityChange]);
33
- return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { link: item.link, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `group-${item.id}`, ref: setRef, style: Object.assign(Object.assign(Object.assign(Object.assign({}, (opacity !== undefined ? { opacity } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg)` } : {})), (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), { transition: (_d = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _d !== void 0 ? _d : 'none', willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset' }), children: items && items.map(item => isInCompound ? ((0, jsx_runtime_1.jsx)(CompoundChild_1.CompoundChild, { isInFixedLayer: isInFixedLayer, item: item, sectionId: sectionId, isParentVisible: isInteractive }, item.id)) : ((0, jsx_runtime_1.jsx)(Item_1.Item, { item: item, isInFixedLayer: isInFixedLayer, sectionId: sectionId, isParentVisible: isInteractive, isInGroup: true }, item.id))) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
33
+ return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { link: item.link, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `group-${item.id}`, ref: setRef, style: Object.assign(Object.assign(Object.assign(Object.assign({}, (opacity !== undefined ? { opacity } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg)` } : {})), (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), { transition: (_d = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _d !== void 0 ? _d : 'none', willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset' }), children: items && items.map(item => isInCompound ? ((0, jsx_runtime_1.jsx)(CompoundChild_1.CompoundChild, { isInFixedLayer: isInFixedLayer, item: item, articleId: articleId, sectionId: sectionId, isParentVisible: isInteractive }, item.id)) : ((0, jsx_runtime_1.jsx)(Item_1.Item, { articleId: articleId, item: item, isInFixedLayer: isInFixedLayer, sectionId: sectionId, isParentVisible: isInteractive, isInGroup: true }, item.id))) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
34
34
  .group-${item.id} {
35
35
  position: absolute;
36
36
  width: 100%;
@@ -5,6 +5,7 @@ export interface ItemProps<I extends ItemAny> {
5
5
  item: I;
6
6
  sectionId: string;
7
7
  articleHeight?: number;
8
+ articleId?: string;
8
9
  onResize?: (height: number) => void;
9
10
  interactionCtrl?: ReturnType<typeof useItemInteractionCtrl>;
10
11
  onVisibilityChange: (isVisible: boolean) => void;
@@ -14,6 +15,7 @@ export interface ItemProps<I extends ItemAny> {
14
15
  export interface ItemWrapperProps {
15
16
  item: ItemAny;
16
17
  sectionId: string;
18
+ articleId?: string;
17
19
  articleHeight?: number;
18
20
  isInGroup?: boolean;
19
21
  isInFixedLayer?: boolean;
@@ -32,7 +32,7 @@ const stickyFix = `
32
32
  transform: translate3d(0, 0, 0);
33
33
  `;
34
34
  const noop = () => null;
35
- const Item = ({ item, sectionId, articleHeight, isParentVisible = true, isInGroup = false, isInFixedLayer = false }) => {
35
+ const Item = ({ item, sectionId, articleHeight, isParentVisible = true, isInGroup = false, isInFixedLayer = false, articleId }) => {
36
36
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
37
37
  const itemWrapperRef = (0, react_1.useRef)(null);
38
38
  const itemInnerRef = (0, react_1.useRef)(null);
@@ -124,7 +124,7 @@ const Item = ({ item, sectionId, articleHeight, isParentVisible = true, isInGrou
124
124
  ? 'grab'
125
125
  : hasClickTriggers
126
126
  ? 'pointer'
127
- : 'unset', pointerEvents: allowPointerEvents ? 'auto' : 'none', userSelect: isDraggable ? 'none' : 'unset', WebkitUserSelect: isDraggable ? 'none' : 'unset', MozUserSelect: isDraggable ? 'none' : 'unset', msUserSelect: isDraggable ? 'none' : 'unset' }) }, triggers, { children: (0, jsx_runtime_1.jsx)(ItemComponent, { item: item, sectionId: sectionId, onResize: handleItemResize, articleHeight: articleHeight, isInFixedLayer: isInFixedLayer, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange }) })) }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
127
+ : 'unset', pointerEvents: allowPointerEvents ? 'auto' : 'none', userSelect: isDraggable ? 'none' : 'unset', WebkitUserSelect: isDraggable ? 'none' : 'unset', MozUserSelect: isDraggable ? 'none' : 'unset', msUserSelect: isDraggable ? 'none' : 'unset' }) }, triggers, { children: (0, jsx_runtime_1.jsx)(ItemComponent, { articleId: articleId, item: item, sectionId: sectionId, onResize: handleItemResize, articleHeight: articleHeight, isInFixedLayer: isInFixedLayer, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange }) })) }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
128
128
  .item-${item.id} {
129
129
  position: ${item.sticky ? 'sticky' : 'absolute'};
130
130
  top: ${item.sticky ? `${(0, getAnchoredItemTop_1.getAnchoredItemTop)(item.area.top - item.sticky.from, sectionHeight, item.area.anchorSide)}` : 0};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gxpl/sdk",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",