@cntrl-site/sdk-nextjs 1.9.52 → 1.9.53

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.
Files changed (134) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +4 -4
  3. package/TODO.md +1 -1
  4. package/eslint.config.mjs +35 -35
  5. package/jest.config.js +6 -6
  6. package/lib/common/useItemFXData.js +7 -7
  7. package/lib/components/Article.js +5 -5
  8. package/lib/components/LayoutStyle.js +4 -4
  9. package/lib/components/ScrollPlaybackVideo.js +5 -3
  10. package/lib/components/Section/Section.js +27 -27
  11. package/lib/components/items/CodeEmbedItem/CodeEmbedItem.js +36 -36
  12. package/lib/components/items/ComponentItem/ComponentItem.js +13 -13
  13. package/lib/components/items/CompoundItem/CompoundChild.js +20 -20
  14. package/lib/components/items/CompoundItem/CompoundItem.js +14 -14
  15. package/lib/components/items/CustomItem/CustomItem.js +9 -9
  16. package/lib/components/items/EmbedVideoItem/VimeoEmbed.js +24 -24
  17. package/lib/components/items/EmbedVideoItem/YoutubeEmbed.js +27 -27
  18. package/lib/components/items/FileItem/ImageItem.js +40 -40
  19. package/lib/components/items/FileItem/VideoItem.js +77 -76
  20. package/lib/components/items/GroupItem/GroupItem.js +14 -14
  21. package/lib/components/items/Item.js +30 -30
  22. package/lib/components/items/RectangleItem/RectangleItem.js +27 -27
  23. package/lib/components/items/RichTextItem/RichTextItem.js +22 -22
  24. package/lib/utils/RichTextConverter/RichTextConverter.js +21 -21
  25. package/package.json +61 -60
  26. package/src/ItemGeometry/CSSPropertyNameMap.ts +37 -37
  27. package/src/ItemGeometry/GenericGeometryController.ts +59 -59
  28. package/src/ItemGeometry/ItemGeometryContext.ts +4 -4
  29. package/src/ItemGeometry/ItemGeometryController.ts +22 -22
  30. package/src/ItemGeometry/ItemGeometryService.ts +34 -34
  31. package/src/ItemGeometry/RichTextGeometryController.ts +166 -166
  32. package/src/ItemGeometry/useItemGeometry.ts +25 -25
  33. package/src/common/useCurrentLayout.ts +52 -52
  34. package/src/common/useExemplary.ts +9 -9
  35. package/src/common/useItemFXData.ts +47 -47
  36. package/src/common/useKeyframeValue.ts +85 -85
  37. package/src/common/useRegisterResize.ts +16 -16
  38. package/src/components/Article.tsx +75 -75
  39. package/src/components/ArticleWrapper.tsx +21 -21
  40. package/src/components/Head.tsx +57 -57
  41. package/src/components/LayoutStyle.tsx +21 -21
  42. package/src/components/Page.tsx +38 -38
  43. package/src/components/ScrollPlaybackVideo.tsx +58 -56
  44. package/src/components/Section/Section.tsx +129 -129
  45. package/src/components/Section/SectionImage.tsx +48 -48
  46. package/src/components/Section/SectionVideo.tsx +144 -144
  47. package/src/components/Section/useSectionColor.ts +19 -19
  48. package/src/components/Section/useSectionHeightMap.ts +19 -19
  49. package/src/components/items/CodeEmbedItem/CodeEmbedItem.tsx +147 -147
  50. package/src/components/items/CodeEmbedItem/useCodeEmbedItem.ts +36 -36
  51. package/src/components/items/ComponentItem/ComponentItem.tsx +72 -72
  52. package/src/components/items/ComponentItem/useComponentItem.ts +35 -35
  53. package/src/components/items/CompoundItem/CompoundChild.tsx +150 -150
  54. package/src/components/items/CompoundItem/CompoundItem.tsx +87 -87
  55. package/src/components/items/CompoundItem/useCompoundItem.ts +21 -21
  56. package/src/components/items/CustomItem/CustomItem.tsx +50 -50
  57. package/src/components/items/EmbedVideoItem/VimeoEmbed.tsx +216 -216
  58. package/src/components/items/EmbedVideoItem/YoutubeEmbed.tsx +200 -200
  59. package/src/components/items/EmbedVideoItem/useEmbedVideoItem.ts +46 -46
  60. package/src/components/items/FileItem/ImageItem.tsx +165 -165
  61. package/src/components/items/FileItem/VideoItem.tsx +283 -282
  62. package/src/components/items/FileItem/useFileItem.ts +81 -81
  63. package/src/components/items/GroupItem/GroupItem.tsx +98 -98
  64. package/src/components/items/GroupItem/useGroupItem.ts +34 -34
  65. package/src/components/items/Item.tsx +267 -267
  66. package/src/components/items/LinkWrapper.tsx +39 -39
  67. package/src/components/items/RectangleItem/RectangleItem.tsx +176 -176
  68. package/src/components/items/RectangleItem/useRectangleItem.ts +89 -89
  69. package/src/components/items/RichTextItem/RichTextItem.tsx +112 -112
  70. package/src/components/items/RichTextItem/useRichTextItem.ts +12 -12
  71. package/src/components/items/RichTextWrapper.tsx +15 -15
  72. package/src/components/items/itemsMap.ts +28 -28
  73. package/src/components/items/useDraggable.ts +252 -252
  74. package/src/components/items/useItemAngle.ts +13 -13
  75. package/src/components/items/useItemArea.ts +35 -35
  76. package/src/components/items/useItemPointerEvents.ts +23 -23
  77. package/src/components/items/useItemScale.ts +17 -17
  78. package/src/components/items/useItemTriggers.ts +15 -15
  79. package/src/components/items/useRichTextItemValues.ts +66 -66
  80. package/src/components/items/useSizing.ts +25 -25
  81. package/src/components/items/useStickyItemTop.ts +21 -21
  82. package/src/components/useLayoutContext.ts +7 -7
  83. package/src/index.ts +24 -24
  84. package/src/interactions/InteractionsRegistry.ts +512 -512
  85. package/src/interactions/ItemInteractionCtrl.ts +78 -78
  86. package/src/interactions/getTransition.ts +27 -27
  87. package/src/interactions/types.ts +36 -36
  88. package/src/interactions/useItemInteractionCtrl.ts +18 -18
  89. package/src/provider/ArticleRectContext.ts +4 -4
  90. package/src/provider/CntrlContext.ts +5 -5
  91. package/src/provider/CntrlProvider.tsx +11 -11
  92. package/src/provider/CntrlSdkContext.ts +84 -84
  93. package/src/provider/CustomItemRegistry.ts +14 -14
  94. package/src/provider/CustomItemTypes.ts +3 -3
  95. package/src/provider/CustomSectionRegistry.ts +25 -25
  96. package/src/provider/InteractionsContext.tsx +73 -73
  97. package/src/provider/Keyframes.ts +11 -11
  98. package/src/provider/KeyframesContext.ts +5 -5
  99. package/src/provider/LayoutContext.ts +3 -3
  100. package/src/provider/WebGLContextManagerContext.tsx +4 -4
  101. package/src/provider/defaultContext.ts +8 -8
  102. package/src/provider/useCntrlContext.ts +8 -8
  103. package/src/styled-jsx.d.ts +1 -1
  104. package/src/utils/Animator/Animator.ts +570 -570
  105. package/src/utils/ArticleRectManager/ArticleRectObserver.ts +93 -93
  106. package/src/utils/ArticleRectManager/useArticleRectObserver.ts +17 -17
  107. package/src/utils/ArticleRectManager/useSectionRegistry.ts +11 -11
  108. package/src/utils/CSSNumeric.ts +19 -19
  109. package/src/utils/EventEmitter.ts +41 -41
  110. package/src/utils/RichTextConverter/RichTextConverter.tsx +342 -342
  111. package/src/utils/ScaleAnchorMap.ts +13 -13
  112. package/src/utils/StickyManager/StickyManager.ts +23 -23
  113. package/src/utils/Youtube/YouTubeIframeApiLoader.ts +58 -58
  114. package/src/utils/Youtube/YoutubeIframeApi.ts +101 -101
  115. package/src/utils/Youtube/useYouTubeIframeApi.ts +12 -12
  116. package/src/utils/areFillsVisible/areFillsVisible.test.ts +63 -63
  117. package/src/utils/areFillsVisible/areFillsVisible.ts +37 -37
  118. package/src/utils/binSearchInsertAt.ts +33 -33
  119. package/src/utils/castObject.ts +10 -10
  120. package/src/utils/checkOverflowClipSupport.ts +13 -13
  121. package/src/utils/domDfs.ts +11 -11
  122. package/src/utils/effects/useImageFx.ts +156 -156
  123. package/src/utils/effects/useVideoFx.ts +158 -158
  124. package/src/utils/getAnchoredItemTop.ts +12 -12
  125. package/src/utils/getCompoundBoundaryStyles.ts +60 -60
  126. package/src/utils/getFill.ts +46 -46
  127. package/src/utils/getFontFamilyValue.ts +3 -3
  128. package/src/utils/getInvertedRanges.ts +43 -43
  129. package/src/utils/getItemTopStyle.ts +39 -39
  130. package/src/utils/getStyleFromItemStateAndParams.ts +8 -8
  131. package/src/utils/getValidYoutubeUrl.ts +29 -29
  132. package/src/utils/isItemType.ts +5 -5
  133. package/src/utils/rangeMap.ts +13 -13
  134. package/src/utils/useElementRect.ts +23 -23
@@ -139,35 +139,35 @@ const YoutubeEmbedItem = ({ item, sectionId, onResize, interactionCtrl, onVisibi
139
139
  top: '0',
140
140
  left: '0',
141
141
  zIndex: 1
142
- }, alt: "Cover img" }))), (0, jsx_runtime_1.jsx)("div", { className: `embed-${item.id}`, ref: setDiv, style: Object.assign(Object.assign({}, (radius !== undefined ? { borderRadius: `${radius * 100}vw` } : {})), { transition: (_j = frameStateParams === null || frameStateParams === void 0 ? void 0 : frameStateParams.transition) !== null && _j !== void 0 ? _j : 'none' }) })] }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
143
- .embed-youtube-video-wrapper-${item.id},
144
- .embed-${item.id} {
145
- position: absolute;
146
- width: 100%;
147
- height: 100%;
148
- }
149
- .embed-${item.id} {
150
- overflow: hidden;
151
- }
152
- .embed-youtube-video-wrapper-${item.id} iframe {
153
- width: 100%;
154
- height: 100%;
155
- z-index: 1;
156
- border: none;
157
- }
142
+ }, alt: "Cover img" }))), (0, jsx_runtime_1.jsx)("div", { className: `embed-${item.id}`, ref: setDiv, style: Object.assign(Object.assign({}, (radius !== undefined ? { borderRadius: `${radius * 100}vw` } : {})), { transition: (_j = frameStateParams === null || frameStateParams === void 0 ? void 0 : frameStateParams.transition) !== null && _j !== void 0 ? _j : 'none' }) })] }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
143
+ .embed-youtube-video-wrapper-${item.id},
144
+ .embed-${item.id} {
145
+ position: absolute;
146
+ width: 100%;
147
+ height: 100%;
148
+ }
149
+ .embed-${item.id} {
150
+ overflow: hidden;
151
+ }
152
+ .embed-youtube-video-wrapper-${item.id} iframe {
153
+ width: 100%;
154
+ height: 100%;
155
+ z-index: 1;
156
+ border: none;
157
+ }
158
158
  ${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
159
- return (`
160
- .embed-youtube-video-wrapper-${item.id} {
161
- opacity: ${layoutParams.opacity};
162
- transform: rotate(${area.angle}deg);
163
- filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
164
- ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''}
165
- }
166
- .embed-youtube-video-wrapper-${item.id} .embed-${item.id} {
167
- border-radius: ${layoutParams.radius * 100}vw;
168
- }
159
+ return (`
160
+ .embed-youtube-video-wrapper-${item.id} {
161
+ opacity: ${layoutParams.opacity};
162
+ transform: rotate(${area.angle}deg);
163
+ filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
164
+ ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''}
165
+ }
166
+ .embed-youtube-video-wrapper-${item.id} .embed-${item.id} {
167
+ border-radius: ${layoutParams.radius * 100}vw;
168
+ }
169
169
  `);
170
- })}
170
+ })}
171
171
  ` })] }));
172
172
  };
173
173
  exports.YoutubeEmbedItem = YoutubeEmbedItem;
@@ -73,48 +73,48 @@ const ImageItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
73
73
  }, [isInteractive, onVisibilityChange]);
74
74
  return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: (_p = item.link) === null || _p === void 0 ? void 0 : _p.url, target: (_q = item.link) === null || _q === void 0 ? void 0 : _q.target, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `image-wrapper-${item.id}`, ref: setWrapperRef, 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)` } : {})), { willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset', transition: (_r = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.transition) !== null && _r !== void 0 ? _r : 'none' }), children: hasGLEffect && isFXAllowed
75
75
  ? ((0, jsx_runtime_1.jsx)("canvas", { style: inlineStyles, ref: fxCanvas, className: `img-canvas image-${item.id}`, width: rectWidth, height: rectHeight }))
76
- : ((0, jsx_runtime_1.jsx)("img", { alt: "", className: `image image-${item.id}`, style: inlineStyles, src: item.commonParams.url })) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
77
- .image-wrapper-${item.id} {
78
- position: absolute;
79
- width: 100%;
80
- height: 100%;
81
- box-sizing: border-box;
82
- display: flex;
83
- }
84
- .image {
85
- width: 100%;
86
- height: 100%;
87
- opacity: 1;
88
- object-fit: cover;
89
- pointer-events: none;
90
- border-style: solid;
91
- overflow: hidden;
92
- box-sizing: border-box;
93
- }
94
- .img-canvas {
95
- border: solid;
96
- width: 100%;
97
- height: 100%;
98
- pointer-events: none;
99
- border-width: 0;
100
- box-sizing: border-box;
101
- }
76
+ : ((0, jsx_runtime_1.jsx)("img", { alt: "", className: `image image-${item.id}`, style: inlineStyles, src: item.commonParams.url })) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
77
+ .image-wrapper-${item.id} {
78
+ position: absolute;
79
+ width: 100%;
80
+ height: 100%;
81
+ box-sizing: border-box;
82
+ display: flex;
83
+ }
84
+ .image {
85
+ width: 100%;
86
+ height: 100%;
87
+ opacity: 1;
88
+ object-fit: cover;
89
+ pointer-events: none;
90
+ border-style: solid;
91
+ overflow: hidden;
92
+ box-sizing: border-box;
93
+ }
94
+ .img-canvas {
95
+ border: solid;
96
+ width: 100%;
97
+ height: 100%;
98
+ pointer-events: none;
99
+ border-width: 0;
100
+ box-sizing: border-box;
101
+ }
102
102
  ${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
103
- return (`
104
- .image-wrapper-${item.id} {
105
- opacity: ${layoutParams.opacity};
106
- transform: rotate(${area.angle}deg);
107
- filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
108
- ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''}
109
- }
110
- .image-${item.id} {
111
- border: solid;
112
- border-color: ${stroke};
113
- border-radius: ${layoutParams.radius * 100}vw;
114
- border-width: ${layoutParams.strokeWidth * 100}vw;
115
- }
103
+ return (`
104
+ .image-wrapper-${item.id} {
105
+ opacity: ${layoutParams.opacity};
106
+ transform: rotate(${area.angle}deg);
107
+ filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
108
+ ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''}
109
+ }
110
+ .image-${item.id} {
111
+ border: solid;
112
+ border-color: ${stroke};
113
+ border-radius: ${layoutParams.radius * 100}vw;
114
+ border-width: ${layoutParams.strokeWidth * 100}vw;
115
+ }
116
116
  `);
117
- })}
117
+ })}
118
118
  ` })] }) }));
119
119
  };
120
120
  exports.ImageItem = ImageItem;
@@ -22,7 +22,7 @@ const useItemFXData_1 = require("../../../common/useItemFXData");
22
22
  const getFill_1 = require("../../../utils/getFill");
23
23
  const useItemGeometry_1 = require("../../../ItemGeometry/useItemGeometry");
24
24
  const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityChange }) => {
25
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
26
26
  const id = (0, react_1.useId)();
27
27
  const { layouts } = (0, useCntrlContext_1.useCntrlContext)();
28
28
  const layoutId = (0, useLayoutContext_1.useLayoutContext)();
@@ -48,17 +48,18 @@ const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
48
48
  const rectHeight = Math.floor((_c = rect === null || rect === void 0 ? void 0 : rect.height) !== null && _c !== void 0 ? _c : 0);
49
49
  const scrollPlayback = layoutParams ? layoutParams.scrollPlayback : null;
50
50
  const layoutValues = [item.area, item.layoutParams];
51
- const hasScrollPlayback = scrollPlayback !== null;
51
+ const isHiddenOnLayout = layoutId ? ((_d = item.hidden[layoutId]) !== null && _d !== void 0 ? _d : false) : false;
52
+ const hasScrollPlayback = scrollPlayback !== null && !isHiddenOnLayout;
52
53
  const wrapperStateParams = interactionCtrl === null || interactionCtrl === void 0 ? void 0 : interactionCtrl.getState(['angle', 'opacity', 'blur']);
53
54
  const videoStateParams = interactionCtrl === null || interactionCtrl === void 0 ? void 0 : interactionCtrl.getState(['strokeWidth', 'radius', 'strokeFill']);
54
- const angle = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_d = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _d === void 0 ? void 0 : _d.angle, itemAngle);
55
- const opacity = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_e = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _e === void 0 ? void 0 : _e.opacity, itemOpacity);
56
- const blur = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_f = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _f === void 0 ? void 0 : _f.blur, itemBlur);
57
- const strokeWidth = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_g = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _g === void 0 ? void 0 : _g.strokeWidth, itemStrokeWidth);
58
- const radius = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_h = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _h === void 0 ? void 0 : _h.radius, itemRadius);
59
- const strokeFill = (_l = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_k = (_j = videoStateParams === null || videoStateParams === void 0 ? void 0 : videoStateParams.styles) === null || _j === void 0 ? void 0 : _j.strokeFill) === null || _k === void 0 ? void 0 : _k[0], itemStrokeFill === null || itemStrokeFill === void 0 ? void 0 : itemStrokeFill[0])) !== null && _l !== void 0 ? _l : itemStrokeFill === null || itemStrokeFill === void 0 ? void 0 : itemStrokeFill[0];
55
+ const angle = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_e = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _e === void 0 ? void 0 : _e.angle, itemAngle);
56
+ const opacity = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_f = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _f === void 0 ? void 0 : _f.opacity, itemOpacity);
57
+ const blur = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_g = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _g === void 0 ? void 0 : _g.blur, itemBlur);
58
+ const strokeWidth = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_h = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _h === void 0 ? void 0 : _h.strokeWidth, itemStrokeWidth);
59
+ const radius = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_j = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.styles) === null || _j === void 0 ? void 0 : _j.radius, itemRadius);
60
+ const strokeFill = (_m = (0, getStyleFromItemStateAndParams_1.getStyleFromItemStateAndParams)((_l = (_k = videoStateParams === null || videoStateParams === void 0 ? void 0 : videoStateParams.styles) === null || _k === void 0 ? void 0 : _k.strokeFill) === null || _l === void 0 ? void 0 : _l[0], itemStrokeFill === null || itemStrokeFill === void 0 ? void 0 : itemStrokeFill[0])) !== null && _m !== void 0 ? _m : itemStrokeFill === null || itemStrokeFill === void 0 ? void 0 : itemStrokeFill[0];
60
61
  const stroke = strokeFill
61
- ? (_m = (0, getFill_1.getFill)(strokeFill)) !== null && _m !== void 0 ? _m : 'transparent'
62
+ ? (_o = (0, getFill_1.getFill)(strokeFill)) !== null && _o !== void 0 ? _o : 'transparent'
62
63
  : 'transparent';
63
64
  (0, react_1.useEffect)(() => {
64
65
  isInitialRef.current = false;
@@ -75,7 +76,7 @@ const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
75
76
  borderColor: stroke,
76
77
  borderRadius: radius !== undefined ? `${radius * 100}vw` : 'inherit',
77
78
  borderStyle: 'solid'
78
- } : {})), { transition: (_o = videoStateParams === null || videoStateParams === void 0 ? void 0 : videoStateParams.transition) !== null && _o !== void 0 ? _o : 'none' });
79
+ } : {})), { transition: (_p = videoStateParams === null || videoStateParams === void 0 ? void 0 : videoStateParams.transition) !== null && _p !== void 0 ? _p : 'none' });
79
80
  const isInteractive = opacity !== 0;
80
81
  (0, react_1.useEffect)(() => {
81
82
  onVisibilityChange === null || onVisibilityChange === void 0 ? void 0 : onVisibilityChange(isInteractive);
@@ -98,7 +99,7 @@ const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
98
99
  observer.observe(ref);
99
100
  return () => observer.disconnect();
100
101
  }, [layoutParams, videoRef, ref, userPaused, isVideoInteracted]);
101
- return ((0, jsx_runtime_1.jsxs)(LinkWrapper_1.LinkWrapper, { url: (_p = item.link) === null || _p === void 0 ? void 0 : _p.url, target: (_q = item.link) === null || _q === void 0 ? void 0 : _q.target, children: [(0, jsx_runtime_1.jsxs)("div", { className: `video-wrapper-${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)` } : {})), { willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset', transition: (_r = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.transition) !== null && _r !== void 0 ? _r : 'none' }), children: [hasScrollPlayback && ((0, jsx_runtime_1.jsx)(ScrollPlaybackVideo_1.ScrollPlaybackVideo, { sectionId: sectionId, src: item.commonParams.url, playbackParams: scrollPlayback, style: inlineStyles, className: `video video-playback-wrapper video-${item.id}` })), hasGLEffect && isFXAllowed && ((0, jsx_runtime_1.jsx)("canvas", { style: inlineStyles, ref: fxCanvas, className: `video-canvas video-${item.id}`, width: rectWidth, height: rectHeight })), !hasScrollPlayback && !hasGLEffect && layoutParams && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("video", { poster: (_s = item.commonParams.coverUrl) !== null && _s !== void 0 ? _s : '', ref: setVideoRef, autoPlay: layoutParams.play === 'auto', preload: "auto", onClick: () => {
102
+ return ((0, jsx_runtime_1.jsxs)(LinkWrapper_1.LinkWrapper, { url: (_q = item.link) === null || _q === void 0 ? void 0 : _q.url, target: (_r = item.link) === null || _r === void 0 ? void 0 : _r.target, children: [(0, jsx_runtime_1.jsxs)("div", { className: `video-wrapper-${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)` } : {})), { willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset', transition: (_s = wrapperStateParams === null || wrapperStateParams === void 0 ? void 0 : wrapperStateParams.transition) !== null && _s !== void 0 ? _s : 'none' }), children: [hasScrollPlayback && ((0, jsx_runtime_1.jsx)(ScrollPlaybackVideo_1.ScrollPlaybackVideo, { sectionId: sectionId, src: item.commonParams.url, playbackParams: scrollPlayback, style: inlineStyles, className: `video video-playback-wrapper video-${item.id}` })), hasGLEffect && isFXAllowed && ((0, jsx_runtime_1.jsx)("canvas", { style: inlineStyles, ref: fxCanvas, className: `video-canvas video-${item.id}`, width: rectWidth, height: rectHeight })), !hasScrollPlayback && !hasGLEffect && layoutParams && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("video", { poster: (_t = item.commonParams.coverUrl) !== null && _t !== void 0 ? _t : '', ref: setVideoRef, autoPlay: layoutParams.play === 'auto', preload: "auto", onClick: () => {
102
103
  setIsVideoInteracted(true);
103
104
  }, muted: layoutParams.muted, onPlay: () => {
104
105
  setIsVideoPlaying(true);
@@ -121,7 +122,7 @@ const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
121
122
  return;
122
123
  setIsVideoInteracted(true);
123
124
  videoRef.play();
124
- }, src: (_t = item.commonParams.coverUrl) !== null && _t !== void 0 ? _t : '', className: `video-cover-${item.id}`, onClick: () => {
125
+ }, src: (_u = item.commonParams.coverUrl) !== null && _u !== void 0 ? _u : '', className: `video-cover-${item.id}`, onClick: () => {
125
126
  if (!videoRef)
126
127
  return;
127
128
  setIsVideoInteracted(true);
@@ -136,72 +137,72 @@ const VideoItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
136
137
  else {
137
138
  videoRef.play();
138
139
  }
139
- } })))] }))] }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
140
- .video-wrapper-${item.id} {
141
- position: absolute;
142
- overflow: hidden;
143
- width: 100%;
144
- height: 100%;
145
- box-sizing: border-box;
146
- opacity: ${opacity};
147
- }
148
- .video-overlay-${item.id} {
149
- position: absolute;
150
- top: 0;
151
- left: 0;
152
- cursor: pointer;
153
- width: 100%;
154
- height: 100%;
155
- }
156
- .video-cover-${item.id} {
157
- position: absolute;
158
- top: 0;
159
- left: 0;
160
- cursor: pointer;
161
- width: 100%;
162
- height: 100%;
163
- object-fit: cover;
164
- }
165
- .video {
166
- width: 100%;
167
- height: 100%;
168
- box-sizing: border-box;
169
- opacity: 1;
170
- object-fit: cover;
171
- overflow: hidden;
172
- border-style: solid;
173
- }
174
- .video-${item.id} {
175
- border-radius: ${radius !== undefined ? `${radius * 100}vw` : '0'};
176
- }
177
- .video-playback-wrapper {
178
- display: flex;
179
- justify-content: center;
180
- }
181
- .video-canvas {
182
- border: solid;
183
- width: 100%;
184
- height: 100%;
185
- pointer-events: none;
186
- border-width: 0;
187
- box-sizing: border-box;
188
- }
140
+ } })))] }))] }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
141
+ .video-wrapper-${item.id} {
142
+ position: absolute;
143
+ overflow: hidden;
144
+ width: 100%;
145
+ height: 100%;
146
+ box-sizing: border-box;
147
+ opacity: ${opacity};
148
+ }
149
+ .video-overlay-${item.id} {
150
+ position: absolute;
151
+ top: 0;
152
+ left: 0;
153
+ cursor: pointer;
154
+ width: 100%;
155
+ height: 100%;
156
+ }
157
+ .video-cover-${item.id} {
158
+ position: absolute;
159
+ top: 0;
160
+ left: 0;
161
+ cursor: pointer;
162
+ width: 100%;
163
+ height: 100%;
164
+ object-fit: cover;
165
+ }
166
+ .video {
167
+ width: 100%;
168
+ height: 100%;
169
+ box-sizing: border-box;
170
+ opacity: 1;
171
+ object-fit: cover;
172
+ overflow: hidden;
173
+ border-style: solid;
174
+ }
175
+ .video-${item.id} {
176
+ border-radius: ${radius !== undefined ? `${radius * 100}vw` : '0'};
177
+ }
178
+ .video-playback-wrapper {
179
+ display: flex;
180
+ justify-content: center;
181
+ }
182
+ .video-canvas {
183
+ border: solid;
184
+ width: 100%;
185
+ height: 100%;
186
+ pointer-events: none;
187
+ border-width: 0;
188
+ box-sizing: border-box;
189
+ }
189
190
  ${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
190
- return (`
191
- .video-wrapper-${item.id} {
192
- opacity: ${layoutParams.opacity};
193
- transform: rotate(${area.angle}deg);
194
- filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
195
- ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''}
196
- }
197
- .video-${item.id} {
198
- border: solid;
199
- border-color: ${stroke};
200
- border-radius: ${layoutParams.radius * 100}vw;
201
- border-width: ${layoutParams.strokeWidth * 100}vw;
202
- }
191
+ return (`
192
+ .video-wrapper-${item.id} {
193
+ opacity: ${layoutParams.opacity};
194
+ transform: rotate(${area.angle}deg);
195
+ filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
196
+ ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''}
197
+ }
198
+ .video-${item.id} {
199
+ border: solid;
200
+ border-color: ${stroke};
201
+ border-radius: ${layoutParams.radius * 100}vw;
202
+ border-width: ${layoutParams.strokeWidth * 100}vw;
203
+ }
203
204
  `);
204
- })}
205
+ })}
205
206
  ` })] }));
206
207
  };
207
208
  exports.VideoItem = VideoItem;
@@ -51,22 +51,22 @@ const GroupItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilityCha
51
51
  }
52
52
  }, 0);
53
53
  }, [itemIds, item.id]);
54
- return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: (_d = item.link) === null || _d === void 0 ? void 0 : _d.url, target: (_e = item.link) === null || _e === void 0 ? void 0 : _e.target, 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: (_f = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _f !== void 0 ? _f : 'none', willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset' }), children: items && items.map(item => isInCompound ? ((0, jsx_runtime_1.jsx)(CompoundChild_1.CompoundChild, { item: item, sectionId: sectionId, isParentVisible: isInteractive }, item.id)) : ((0, jsx_runtime_1.jsx)(Item_1.Item, { item: item, sectionId: sectionId, isParentVisible: isInteractive, isInGroup: true }, item.id))) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
55
- .group-${item.id} {
56
- position: absolute;
57
- width: 100%;
58
- height: 100%;
59
- box-sizing: border-box;
60
- }
54
+ return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: (_d = item.link) === null || _d === void 0 ? void 0 : _d.url, target: (_e = item.link) === null || _e === void 0 ? void 0 : _e.target, 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: (_f = stateParams === null || stateParams === void 0 ? void 0 : stateParams.transition) !== null && _f !== void 0 ? _f : 'none', willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset' }), children: items && items.map(item => isInCompound ? ((0, jsx_runtime_1.jsx)(CompoundChild_1.CompoundChild, { item: item, sectionId: sectionId, isParentVisible: isInteractive }, item.id)) : ((0, jsx_runtime_1.jsx)(Item_1.Item, { item: item, sectionId: sectionId, isParentVisible: isInteractive, isInGroup: true }, item.id))) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
55
+ .group-${item.id} {
56
+ position: absolute;
57
+ width: 100%;
58
+ height: 100%;
59
+ box-sizing: border-box;
60
+ }
61
61
  ${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
62
- return (`
63
- .group-${item.id} {
64
- opacity: ${layoutParams.opacity};
65
- filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
66
- transform: rotate(${area.angle}deg);
67
- }
62
+ return (`
63
+ .group-${item.id} {
64
+ opacity: ${layoutParams.opacity};
65
+ filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
66
+ transform: rotate(${area.angle}deg);
67
+ }
68
68
  `);
69
- })}
69
+ })}
70
70
  ` })] }) }));
71
71
  };
72
72
  exports.GroupItem = GroupItem;
@@ -29,9 +29,9 @@ const useItemPointerEvents_1 = require("./useItemPointerEvents");
29
29
  const useItemArea_1 = require("./useItemArea");
30
30
  const useDraggable_1 = require("./useDraggable");
31
31
  const ItemGeometryContext_1 = require("../../ItemGeometry/ItemGeometryContext");
32
- const stickyFix = `
33
- -webkit-transform: translate3d(0, 0, 0);
34
- transform: translate3d(0, 0, 0);
32
+ const stickyFix = `
33
+ -webkit-transform: translate3d(0, 0, 0);
34
+ transform: translate3d(0, 0, 0);
35
35
  `;
36
36
  const noop = () => null;
37
37
  const Item = ({ item, sectionId, articleHeight, isParentVisible = true, isInGroup = false }) => {
@@ -147,41 +147,41 @@ const Item = ({ item, sectionId, articleHeight, isParentVisible = true, isInGrou
147
147
  ? 'grab'
148
148
  : hasClickTriggers
149
149
  ? 'pointer'
150
- : '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, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange }) })) }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
150
+ : '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, interactionCtrl: interactionCtrl, onVisibilityChange: handleVisibilityChange }) })) }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
151
151
  ${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, hidden, sticky, sectionHeight, layoutParams]) => {
152
152
  const sizingAxis = (0, useSizing_1.parseSizing)(layoutParams.sizing);
153
153
  const isScreenBasedBottom = area.positionType === sdk_1.PositionType.ScreenBased && area.anchorSide === sdk_1.AnchorSide.Bottom;
154
154
  const scaleAnchor = area.scaleAnchor;
155
155
  const innerHeight = (area === null || area === void 0 ? void 0 : area.dimensionsType) && (area === null || area === void 0 ? void 0 : area.dimensionsType) === sdk_1.DimensionsType.PercentageBased ? `${area.height}vh` : `${area.height * 100}vw`;
156
- return (`
157
- .item-${item.id} {
158
- position: ${sticky ? 'sticky' : 'absolute'};
159
- top: ${sticky ? `${(0, getAnchoredItemTop_1.getAnchoredItemTop)(area.top - sticky.from, sectionHeight, area.anchorSide)}` : 0};
160
- transition: opacity 0.2s linear 0.1s;
161
- pointer-events: none;
162
- display: ${hidden ? 'none' : 'block'};
163
- height: fit-content;
164
- }
165
- .item-${item.id}-inner {
156
+ return (`
157
+ .item-${item.id} {
158
+ position: ${sticky ? 'sticky' : 'absolute'};
159
+ top: ${sticky ? `${(0, getAnchoredItemTop_1.getAnchoredItemTop)(area.top - sticky.from, sectionHeight, area.anchorSide)}` : 0};
160
+ transition: opacity 0.2s linear 0.1s;
161
+ pointer-events: none;
162
+ display: ${hidden ? 'none' : 'block'};
163
+ height: fit-content;
164
+ }
165
+ .item-${item.id}-inner {
166
166
  width: ${sizingAxis.x === 'manual'
167
167
  ? `${area.width * 100}vw`
168
- : 'max-content'};
169
- height: ${sizingAxis.y === 'manual' ? innerHeight : 'unset'};
170
- transform-origin: ${ScaleAnchorMap_1.ScaleAnchorMap[scaleAnchor]};
171
- transform: scale(${area.scale});
172
- position: relative;
173
- }
174
- .item-wrapper-${item.id} {
175
- position: ${area.positionType === sdk_1.PositionType.ScreenBased ? 'fixed' : 'absolute'};
176
- z-index: ${area.zIndex};
177
- ${!isInGroup && stickyFix}
178
- pointer-events: none;
179
- bottom: ${isScreenBasedBottom ? `${-area.top * 100}vw` : 'unset'};
180
- top: ${isScreenBasedBottom ? 'unset' : isContainItem ? (0, getItemTopStyle_1.getPercentageBasedTopStyle)(area.top, area.height, area.anchorSide) : (0, getItemTopStyle_1.getItemTopStyle)(area.top, area.anchorSide)};
181
- left: ${area.left * 100}vw;
182
- }
168
+ : 'max-content'};
169
+ height: ${sizingAxis.y === 'manual' ? innerHeight : 'unset'};
170
+ transform-origin: ${ScaleAnchorMap_1.ScaleAnchorMap[scaleAnchor]};
171
+ transform: scale(${area.scale});
172
+ position: relative;
173
+ }
174
+ .item-wrapper-${item.id} {
175
+ position: ${area.positionType === sdk_1.PositionType.ScreenBased ? 'fixed' : 'absolute'};
176
+ z-index: ${area.zIndex};
177
+ ${!isInGroup && stickyFix}
178
+ pointer-events: none;
179
+ bottom: ${isScreenBasedBottom ? `${-area.top * 100}vw` : 'unset'};
180
+ top: ${isScreenBasedBottom ? 'unset' : isContainItem ? (0, getItemTopStyle_1.getPercentageBasedTopStyle)(area.top, area.height, area.anchorSide) : (0, getItemTopStyle_1.getItemTopStyle)(area.top, area.anchorSide)};
181
+ left: ${area.left * 100}vw;
182
+ }
183
183
  `);
184
- })}
184
+ })}
185
185
  ` })] }));
186
186
  };
187
187
  exports.Item = Item;
@@ -60,35 +60,35 @@ const RectangleItem = ({ item, sectionId, onResize, interactionCtrl, onVisibilit
60
60
  ? (_b = (0, getFill_1.getFill)(value)) !== null && _b !== void 0 ? _b : 'transparent'
61
61
  : 'transparent';
62
62
  return ((0, jsx_runtime_1.jsx)(Fill, { fill: value, itemId: item.id, background: background, fillTransition: fillTransition, radius: radius, strokeWidth: strokeWidth, isHighest: index === itemFill.length - 1, borderColor: stroke }, fill.id));
63
- }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
64
- .rectangle-${item.id} {
65
- position: absolute;
66
- width: 100%;
67
- height: 100%;
68
- box-sizing: border-box;
69
- },
70
- .image-fill-${item.id} {
71
- position: absolute;
72
- top: 0;
73
- left: 0;
74
- width: 100%;
75
- height: 100%;
76
- transform-origin: center center;
77
- z-index: 1;
78
- background-position: center;
79
- },
63
+ }) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
64
+ .rectangle-${item.id} {
65
+ position: absolute;
66
+ width: 100%;
67
+ height: 100%;
68
+ box-sizing: border-box;
69
+ },
70
+ .image-fill-${item.id} {
71
+ position: absolute;
72
+ top: 0;
73
+ left: 0;
74
+ width: 100%;
75
+ height: 100%;
76
+ transform-origin: center center;
77
+ z-index: 1;
78
+ background-position: center;
79
+ },
80
80
  ${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
81
- return (`
82
- .rectangle-${item.id} {
83
- border-radius: ${layoutParams.radius * 100}vw;
84
- transform: rotate(${area.angle}deg);
85
- filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
86
- ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''};
87
- backdrop-filter: ${layoutParams.backdropBlur !== 0 ? `blur(${layoutParams.backdropBlur * 100}vw)` : 'unset'};
88
- -webkit-backdrop-filter: ${layoutParams.backdropBlur !== 0 ? `blur(${layoutParams.backdropBlur * 100}vw)` : 'unset'};
89
- }
81
+ return (`
82
+ .rectangle-${item.id} {
83
+ border-radius: ${layoutParams.radius * 100}vw;
84
+ transform: rotate(${area.angle}deg);
85
+ filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
86
+ ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''};
87
+ backdrop-filter: ${layoutParams.backdropBlur !== 0 ? `blur(${layoutParams.backdropBlur * 100}vw)` : 'unset'};
88
+ -webkit-backdrop-filter: ${layoutParams.backdropBlur !== 0 ? `blur(${layoutParams.backdropBlur * 100}vw)` : 'unset'};
89
+ }
90
90
  `);
91
- })}
91
+ })}
92
92
  ` })] }) }));
93
93
  };
94
94
  exports.RectangleItem = RectangleItem;
@@ -59,28 +59,28 @@ const RichTextItem = ({ item, sectionId, onResize, interactionCtrl, onVisibility
59
59
  }, [isInteractive, onVisibilityChange]);
60
60
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { ref: setRef, className: `rich-text-wrapper-${item.id}`, style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (blur !== undefined ? { filter: `blur(${blur * 100}vw)` } : {})), (textColor ? { color: `${textColor.fmt('rgba')}` } : {})), (angle !== undefined ? { transform: `rotate(${angle}deg)` } : {})), (letterSpacing !== undefined ? { letterSpacing: `${letterSpacing * exemplary}px` } : {})), (wordSpacing !== undefined ? { wordSpacing: `${wordSpacing * exemplary}px` } : {})), (fontSize !== undefined ? { fontSize: `${Math.round(fontSize * exemplary)}px` } : {})), (lineHeight !== undefined ? { lineHeight: `${lineHeight * exemplary}px` } : {})), { willChange: blur !== 0 && blur !== undefined ? 'transform' : 'unset', transition }), children: content }), (0, jsx_runtime_1.jsxs)(style_1.default, { id: id, children: [styles, `${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
61
61
  const color = color_1.CntrlColor.parse(layoutParams.color);
62
- return (`
63
- .rich-text-wrapper-${item.id} {
64
- font-size: ${layoutParams.fontSize * 100}vw;
65
- line-height: ${layoutParams.lineHeight * 100}vw;
66
- letter-spacing: ${layoutParams.letterSpacing * 100}vw;
67
- word-spacing: ${layoutParams.wordSpacing * 100}vw;
68
- font-family: ${(0, getFontFamilyValue_1.getFontFamilyValue)(layoutParams.typeFace)};
69
- font-weight: ${layoutParams.fontWeight};
70
- font-style: ${layoutParams.fontStyle ? layoutParams.fontStyle : 'normal'};
71
- vertical-align: ${layoutParams.verticalAlign};
72
- font-variant: ${layoutParams.fontVariant};
73
- color: ${color.fmt('rgba')};
74
- transform: rotate(${area.angle}deg);
75
- filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
76
- text-transform: ${layoutParams.textTransform};
77
- ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''}
78
- }
79
- @supports not (color: oklch(42% 0.3 90 / 1)) {
80
- .rich-text-wrapper-${item.id} {
81
- color: ${color.fmt('rgba')};
82
- }
83
- }
62
+ return (`
63
+ .rich-text-wrapper-${item.id} {
64
+ font-size: ${layoutParams.fontSize * 100}vw;
65
+ line-height: ${layoutParams.lineHeight * 100}vw;
66
+ letter-spacing: ${layoutParams.letterSpacing * 100}vw;
67
+ word-spacing: ${layoutParams.wordSpacing * 100}vw;
68
+ font-family: ${(0, getFontFamilyValue_1.getFontFamilyValue)(layoutParams.typeFace)};
69
+ font-weight: ${layoutParams.fontWeight};
70
+ font-style: ${layoutParams.fontStyle ? layoutParams.fontStyle : 'normal'};
71
+ vertical-align: ${layoutParams.verticalAlign};
72
+ font-variant: ${layoutParams.fontVariant};
73
+ color: ${color.fmt('rgba')};
74
+ transform: rotate(${area.angle}deg);
75
+ filter: ${layoutParams.blur !== 0 ? `blur(${layoutParams.blur * 100}vw)` : 'unset'};
76
+ text-transform: ${layoutParams.textTransform};
77
+ ${layoutParams.blur !== 0 ? 'will-change: transform;' : ''}
78
+ }
79
+ @supports not (color: oklch(42% 0.3 90 / 1)) {
80
+ .rich-text-wrapper-${item.id} {
81
+ color: ${color.fmt('rgba')};
82
+ }
83
+ }
84
84
  `);
85
85
  })}`] })] }));
86
86
  };