@gxpl/sdk 0.0.1 → 0.0.3

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 (182) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/index.d.ts +32 -22
  3. package/dist/index.js +5086 -52
  4. package/dist/index.mjs +5088 -54
  5. package/dist/{Components → sdk/Components}/ControlSlider/ControlSlider.d.ts +1 -2
  6. package/dist/{Components → sdk/Components}/ImageRevealSlider/ImageRevealSlider.d.ts +1 -2
  7. package/dist/sdk/FontFaceGenerator/FontFaceGenerator.test.d.ts +1 -0
  8. package/dist/{schemas → sdk/schemas}/article/Article.schema.d.ts +12 -12
  9. package/dist/{schemas → sdk/schemas}/article/RichTextItem.schema.d.ts +30 -30
  10. package/dist/{schemas → sdk/schemas}/article/Section.schema.d.ts +3 -3
  11. package/dist/sdk-nextjs/common/useCurrentLayout.d.ts +6 -0
  12. package/dist/sdk-nextjs/common/useExemplary.d.ts +1 -0
  13. package/dist/sdk-nextjs/common/useItemFXData.d.ts +8 -0
  14. package/dist/sdk-nextjs/common/useKeyframeValue.d.ts +8 -0
  15. package/dist/sdk-nextjs/common/useRegisterResize.d.ts +1 -0
  16. package/dist/sdk-nextjs/components/Article.d.ts +9 -0
  17. package/dist/sdk-nextjs/components/ArticleWrapper.d.ts +2 -0
  18. package/dist/sdk-nextjs/components/Head.d.ts +9 -0
  19. package/dist/sdk-nextjs/components/LayoutStyle.d.ts +9 -0
  20. package/dist/sdk-nextjs/components/Page.d.ts +15 -0
  21. package/dist/sdk-nextjs/components/ScrollPlaybackVideo.d.ts +14 -0
  22. package/dist/sdk-nextjs/components/Section/Section.d.ts +11 -0
  23. package/dist/sdk-nextjs/components/Section/SectionImage.d.ts +14 -0
  24. package/dist/sdk-nextjs/components/Section/SectionVideo.d.ts +17 -0
  25. package/dist/sdk-nextjs/components/Section/useSectionColor.d.ts +4 -0
  26. package/dist/sdk-nextjs/components/Section/useSectionHeightMap.d.ts +3 -0
  27. package/dist/sdk-nextjs/components/items/CodeEmbedItem/CodeEmbedItem.d.ts +5 -0
  28. package/dist/sdk-nextjs/components/items/CodeEmbedItem/useCodeEmbedItem.d.ts +7 -0
  29. package/dist/sdk-nextjs/components/items/ComponentItem/ComponentItem.d.ts +4 -0
  30. package/dist/sdk-nextjs/components/items/ComponentItem/useComponentItem.d.ts +5 -0
  31. package/dist/sdk-nextjs/components/items/CompoundItem/CompoundChild.d.ts +9 -0
  32. package/dist/sdk-nextjs/components/items/CompoundItem/CompoundItem.d.ts +4 -0
  33. package/dist/sdk-nextjs/components/items/CompoundItem/useCompoundItem.d.ts +4 -0
  34. package/dist/sdk-nextjs/components/items/CustomItem/CustomItem.d.ts +4 -0
  35. package/dist/sdk-nextjs/components/items/EmbedVideoItem/VimeoEmbed.d.ts +4 -0
  36. package/dist/sdk-nextjs/components/items/EmbedVideoItem/YoutubeEmbed.d.ts +4 -0
  37. package/dist/sdk-nextjs/components/items/EmbedVideoItem/useEmbedVideoItem.d.ts +6 -0
  38. package/dist/sdk-nextjs/components/items/FileItem/ImageItem.d.ts +4 -0
  39. package/dist/sdk-nextjs/components/items/FileItem/VideoItem.d.ts +4 -0
  40. package/dist/sdk-nextjs/components/items/FileItem/useFileItem.d.ts +8 -0
  41. package/dist/sdk-nextjs/components/items/GroupItem/GroupItem.d.ts +4 -0
  42. package/dist/sdk-nextjs/components/items/GroupItem/useGroupItem.d.ts +5 -0
  43. package/dist/sdk-nextjs/components/items/Item.d.ts +20 -0
  44. package/dist/sdk-nextjs/components/items/LinkWrapper.d.ts +8 -0
  45. package/dist/sdk-nextjs/components/items/RectangleItem/RectangleItem.d.ts +4 -0
  46. package/dist/sdk-nextjs/components/items/RectangleItem/useRectangleItem.d.ts +9 -0
  47. package/dist/sdk-nextjs/components/items/RichTextItem/RichTextItem.d.ts +4 -0
  48. package/dist/sdk-nextjs/components/items/RichTextItem/useRichTextItem.d.ts +3 -0
  49. package/dist/sdk-nextjs/components/items/RichTextWrapper.d.ts +7 -0
  50. package/dist/sdk-nextjs/components/items/itemsMap.d.ts +4 -0
  51. package/dist/sdk-nextjs/components/items/useDraggable.d.ts +17 -0
  52. package/dist/sdk-nextjs/components/items/useItemAngle.d.ts +2 -0
  53. package/dist/sdk-nextjs/components/items/useItemArea.d.ts +12 -0
  54. package/dist/sdk-nextjs/components/items/useItemPointerEvents.d.ts +4 -0
  55. package/dist/sdk-nextjs/components/items/useItemScale.d.ts +2 -0
  56. package/dist/sdk-nextjs/components/items/useItemTriggers.d.ts +6 -0
  57. package/dist/sdk-nextjs/components/items/useRichTextItemValues.d.ts +9 -0
  58. package/dist/sdk-nextjs/components/items/useSizing.d.ts +8 -0
  59. package/dist/sdk-nextjs/components/items/useStickyItemTop.d.ts +2 -0
  60. package/dist/sdk-nextjs/components/useLayoutContext.d.ts +1 -0
  61. package/dist/sdk-nextjs/interactions/CSSPropertyNameMap.d.ts +4 -0
  62. package/dist/sdk-nextjs/interactions/InteractionsRegistry.d.ts +39 -0
  63. package/dist/sdk-nextjs/interactions/ItemInteractionCtrl.d.ts +21 -0
  64. package/dist/sdk-nextjs/interactions/getTransition.d.ts +9 -0
  65. package/dist/sdk-nextjs/interactions/types.d.ts +34 -0
  66. package/dist/sdk-nextjs/interactions/useItemInteractionCtrl.d.ts +2 -0
  67. package/dist/sdk-nextjs/provider/ArticleRectContext.d.ts +2 -0
  68. package/dist/sdk-nextjs/provider/CntrlContext.d.ts +2 -0
  69. package/dist/sdk-nextjs/provider/CntrlProvider.d.ts +2 -0
  70. package/dist/sdk-nextjs/provider/CntrlSdkContext.d.ts +31 -0
  71. package/dist/sdk-nextjs/provider/CustomItemRegistry.d.ts +6 -0
  72. package/dist/sdk-nextjs/provider/CustomItemTypes.d.ts +2 -0
  73. package/dist/sdk-nextjs/provider/CustomSectionRegistry.d.ts +15 -0
  74. package/dist/sdk-nextjs/provider/InteractionsContext.d.ts +10 -0
  75. package/dist/sdk-nextjs/provider/Keyframes.d.ts +6 -0
  76. package/dist/sdk-nextjs/provider/KeyframesContext.d.ts +2 -0
  77. package/dist/sdk-nextjs/provider/LayoutContext.d.ts +1 -0
  78. package/dist/sdk-nextjs/provider/WebGLContextManagerContext.d.ts +2 -0
  79. package/dist/sdk-nextjs/provider/defaultContext.d.ts +2 -0
  80. package/dist/sdk-nextjs/provider/useCntrlContext.d.ts +2 -0
  81. package/dist/sdk-nextjs/utils/Animator/Animator.d.ts +43 -0
  82. package/dist/sdk-nextjs/utils/ArticleRectManager/ArticleRectObserver.d.ts +25 -0
  83. package/dist/sdk-nextjs/utils/ArticleRectManager/useArticleRectObserver.d.ts +2 -0
  84. package/dist/sdk-nextjs/utils/ArticleRectManager/useSectionRegistry.d.ts +1 -0
  85. package/dist/sdk-nextjs/utils/EventEmitter.d.ts +11 -0
  86. package/dist/sdk-nextjs/utils/RichTextConverter/RichTextConverter.d.ts +11 -0
  87. package/dist/sdk-nextjs/utils/ScaleAnchorMap.d.ts +11 -0
  88. package/dist/sdk-nextjs/utils/StickyManager/StickyManager.d.ts +10 -0
  89. package/dist/sdk-nextjs/utils/Youtube/YouTubeIframeApiLoader.d.ts +10 -0
  90. package/dist/sdk-nextjs/utils/Youtube/YoutubeIframeApi.d.ts +89 -0
  91. package/dist/sdk-nextjs/utils/Youtube/useYouTubeIframeApi.d.ts +2 -0
  92. package/dist/sdk-nextjs/utils/areFillsVisible/areFillsVisible.d.ts +23 -0
  93. package/dist/sdk-nextjs/utils/binSearchInsertAt.d.ts +5 -0
  94. package/dist/sdk-nextjs/utils/castObject.d.ts +5 -0
  95. package/dist/sdk-nextjs/utils/checkOverflowClipSupport.d.ts +1 -0
  96. package/dist/sdk-nextjs/utils/effects/useImageFx.d.ts +7 -0
  97. package/dist/sdk-nextjs/utils/effects/useVideoFx.d.ts +7 -0
  98. package/dist/sdk-nextjs/utils/getAnchoredItemTop.d.ts +2 -0
  99. package/dist/sdk-nextjs/utils/getCompoundBoundaryStyles.d.ts +12 -0
  100. package/dist/sdk-nextjs/utils/getFill.d.ts +2 -0
  101. package/dist/sdk-nextjs/utils/getFontFamilyValue.d.ts +1 -0
  102. package/dist/sdk-nextjs/utils/getInvertedRanges.d.ts +10 -0
  103. package/dist/sdk-nextjs/utils/getItemTopStyle.d.ts +2 -0
  104. package/dist/sdk-nextjs/utils/getStyleFromItemStateAndParams.d.ts +1 -0
  105. package/dist/sdk-nextjs/utils/getValidYoutubeUrl.d.ts +1 -0
  106. package/dist/sdk-nextjs/utils/isItemType.d.ts +3 -0
  107. package/dist/sdk-nextjs/utils/rangeMap.d.ts +1 -0
  108. package/dist/sdk-nextjs/utils/useElementRect.d.ts +1 -0
  109. package/dist/sdk.css +1 -1
  110. package/dist/utils.d.ts +1 -1
  111. package/package.json +27 -9
  112. /package/dist/{Client → sdk/Client}/Client.d.ts +0 -0
  113. /package/dist/{Client → sdk/Client}/Client.js +0 -0
  114. /package/dist/{FontFaceGenerator/FontFaceGenerator.test.d.ts → sdk/Client/Client.test.d.ts} +0 -0
  115. /package/dist/{Client → sdk/Client}/__mock__/articleMock.d.ts +0 -0
  116. /package/dist/{Client → sdk/Client}/__mock__/keyframesMock.d.ts +0 -0
  117. /package/dist/{Client → sdk/Client}/__mock__/projectMock.d.ts +0 -0
  118. /package/dist/{Components → sdk/Components}/ControlSlider/ControlSliderComponent.d.ts +0 -0
  119. /package/dist/{Components → sdk/Components}/ImageRevealSlider/ControlImageRevealSliderComponent.d.ts +0 -0
  120. /package/dist/{Components → sdk/Components}/components.d.ts +0 -0
  121. /package/dist/{Components → sdk/Components}/helpers/RichTextRenderer/RichTextRenderer.d.ts +0 -0
  122. /package/dist/{Components → sdk/Components}/helpers/SvgImage/SvgImage.d.ts +0 -0
  123. /package/dist/{Components → sdk/Components}/utils/scalingValue.d.ts +0 -0
  124. /package/dist/{FontFaceGenerator → sdk/FontFaceGenerator}/FontFaceGenerator.d.ts +0 -0
  125. /package/dist/{ScrollPlaybackVideoManager → sdk/ScrollPlaybackVideoManager}/ScrollPlaybackVideoManager.d.ts +0 -0
  126. /package/dist/{VideoDecoder → sdk/VideoDecoder}/VideoDecoder.d.ts +0 -0
  127. /package/dist/{schemas → sdk/schemas}/article/Article.schema.js +0 -0
  128. /package/dist/{schemas → sdk/schemas}/article/FillLayer.schema.d.ts +0 -0
  129. /package/dist/{schemas → sdk/schemas}/article/FillLayer.schema.js +0 -0
  130. /package/dist/{schemas → sdk/schemas}/article/Interaction.schema.d.ts +0 -0
  131. /package/dist/{schemas → sdk/schemas}/article/Interaction.schema.js +0 -0
  132. /package/dist/{schemas → sdk/schemas}/article/Item.schema.d.ts +0 -0
  133. /package/dist/{schemas → sdk/schemas}/article/Item.schema.js +0 -0
  134. /package/dist/{schemas → sdk/schemas}/article/ItemArea.schema.d.ts +0 -0
  135. /package/dist/{schemas → sdk/schemas}/article/ItemArea.schema.js +0 -0
  136. /package/dist/{schemas → sdk/schemas}/article/ItemBase.schema.d.ts +0 -0
  137. /package/dist/{schemas → sdk/schemas}/article/ItemBase.schema.js +0 -0
  138. /package/dist/{schemas → sdk/schemas}/article/ItemState.schema.d.ts +0 -0
  139. /package/dist/{schemas → sdk/schemas}/article/ItemState.schema.js +0 -0
  140. /package/dist/{schemas → sdk/schemas}/article/RichTextItem.schema.js +0 -0
  141. /package/dist/{schemas → sdk/schemas}/article/Section.schema.js +0 -0
  142. /package/dist/{schemas → sdk/schemas}/keyframe/Keyframes.schema.d.ts +0 -0
  143. /package/dist/{schemas → sdk/schemas}/keyframe/Keyframes.schema.js +0 -0
  144. /package/dist/{schemas → sdk/schemas}/project/Layout.schema.d.ts +0 -0
  145. /package/dist/{schemas → sdk/schemas}/project/Layout.schema.js +0 -0
  146. /package/dist/{schemas → sdk/schemas}/project/Project.schema.d.ts +0 -0
  147. /package/dist/{schemas → sdk/schemas}/project/Project.schema.js +0 -0
  148. /package/dist/{schemas → sdk/schemas}/shared/FillLayer.schema.d.ts +0 -0
  149. /package/dist/{types → sdk/types}/article/Article.d.ts +0 -0
  150. /package/dist/{types → sdk/types}/article/Article.js +0 -0
  151. /package/dist/{types → sdk/types}/article/ArticleItemType.d.ts +0 -0
  152. /package/dist/{types → sdk/types}/article/ArticleItemType.js +0 -0
  153. /package/dist/{types → sdk/types}/article/CompoundSettings.d.ts +0 -0
  154. /package/dist/{types → sdk/types}/article/CompoundSettings.js +0 -0
  155. /package/dist/{types → sdk/types}/article/FX.d.ts +0 -0
  156. /package/dist/{types → sdk/types}/article/FX.js +0 -0
  157. /package/dist/{types → sdk/types}/article/Interaction.d.ts +0 -0
  158. /package/dist/{types → sdk/types}/article/Interaction.js +0 -0
  159. /package/dist/{types → sdk/types}/article/Item.d.ts +0 -0
  160. /package/dist/{types → sdk/types}/article/Item.js +0 -0
  161. /package/dist/{types → sdk/types}/article/ItemArea.d.ts +0 -0
  162. /package/dist/{types → sdk/types}/article/ItemArea.js +0 -0
  163. /package/dist/{types → sdk/types}/article/ItemState.d.ts +0 -0
  164. /package/dist/{types → sdk/types}/article/ItemState.js +0 -0
  165. /package/dist/{types → sdk/types}/article/RichText.d.ts +0 -0
  166. /package/dist/{types → sdk/types}/article/RichText.js +0 -0
  167. /package/dist/{types → sdk/types}/article/Section.d.ts +0 -0
  168. /package/dist/{types → sdk/types}/article/Section.js +0 -0
  169. /package/dist/{types → sdk/types}/component/Component.d.ts +0 -0
  170. /package/dist/{types → sdk/types}/keyframe/Keyframe.d.ts +0 -0
  171. /package/dist/{types → sdk/types}/keyframe/Keyframe.js +0 -0
  172. /package/dist/{types → sdk/types}/project/Fonts.d.ts +0 -0
  173. /package/dist/{types → sdk/types}/project/Fonts.js +0 -0
  174. /package/dist/{types → sdk/types}/project/Layout.d.ts +0 -0
  175. /package/dist/{types → sdk/types}/project/Layout.js +0 -0
  176. /package/dist/{types → sdk/types}/project/Meta.d.ts +0 -0
  177. /package/dist/{types → sdk/types}/project/Meta.js +0 -0
  178. /package/dist/{types → sdk/types}/project/Page.d.ts +0 -0
  179. /package/dist/{types → sdk/types}/project/Page.js +0 -0
  180. /package/dist/{types → sdk/types}/project/Project.d.ts +0 -0
  181. /package/dist/{types → sdk/types}/project/Project.js +0 -0
  182. /package/dist/{Client/Client.test.d.ts → sdk-nextjs/utils/areFillsVisible/areFillsVisible.test.d.ts} +0 -0
@@ -1,11 +1,10 @@
1
- import { default as React } from 'react';
2
1
  interface SliderProps {
3
2
  settings: SliderSettings;
4
3
  content: SliderItem[];
5
4
  styles: SliderStyles;
6
5
  isEditor?: boolean;
7
6
  }
8
- export declare function ControlSlider({ settings, content, styles: sliderStyles, isEditor }: SliderProps): React.JSX.Element;
7
+ export declare function ControlSlider({ settings, content, styles: sliderStyles, isEditor }: SliderProps): import("react/jsx-runtime").JSX.Element;
9
8
  type SliderItem = {
10
9
  image: {
11
10
  url: string;
@@ -1,4 +1,3 @@
1
- import { default as React } from 'react';
2
1
  interface ImageRevealSliderProps {
3
2
  settings: ImageRevealSliderSettings;
4
3
  content: ImageRevealSliderItem[];
@@ -35,5 +34,5 @@ type ImageRevealSliderItem = {
35
34
  };
36
35
  link: string;
37
36
  };
38
- export declare function ImageRevealSlider({ settings, content, isEditor }: ImageRevealSliderProps): React.JSX.Element;
37
+ export declare function ImageRevealSlider({ settings, content, isEditor }: ImageRevealSliderProps): import("react/jsx-runtime").JSX.Element;
39
38
  export {};
@@ -3,18 +3,18 @@ export declare const ArticleSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  sections: z.ZodArray<z.ZodObject<{
5
5
  id: z.ZodString;
6
- items: z.ZodArray<z.ZodType<import('../..').ItemAny, z.ZodTypeDef, import('../..').ItemAny>, "many">;
6
+ items: z.ZodArray<z.ZodType<import('../../..').ItemAny, z.ZodTypeDef, import('../../..').ItemAny>, "many">;
7
7
  name: z.ZodOptional<z.ZodString>;
8
8
  height: z.ZodRecord<z.ZodString, z.ZodObject<{
9
- mode: z.ZodNativeEnum<typeof import('../..').SectionHeightMode>;
9
+ mode: z.ZodNativeEnum<typeof import('../../..').SectionHeightMode>;
10
10
  units: z.ZodNumber;
11
11
  vhUnits: z.ZodOptional<z.ZodNumber>;
12
12
  }, "strip", z.ZodTypeAny, {
13
- mode: import('../..').SectionHeightMode;
13
+ mode: import('../../..').SectionHeightMode;
14
14
  units: number;
15
15
  vhUnits?: number | undefined;
16
16
  }, {
17
- mode: import('../..').SectionHeightMode;
17
+ mode: import('../../..').SectionHeightMode;
18
18
  units: number;
19
19
  vhUnits?: number | undefined;
20
20
  }>>;
@@ -70,11 +70,11 @@ export declare const ArticleSchema: z.ZodObject<{
70
70
  position: Record<string, number>;
71
71
  id: string;
72
72
  height: Record<string, {
73
- mode: import('../..').SectionHeightMode;
73
+ mode: import('../../..').SectionHeightMode;
74
74
  units: number;
75
75
  vhUnits?: number | undefined;
76
76
  }>;
77
- items: import('../..').ItemAny[];
77
+ items: import('../../..').ItemAny[];
78
78
  name?: string | undefined;
79
79
  media?: Record<string, {
80
80
  url: string;
@@ -97,11 +97,11 @@ export declare const ArticleSchema: z.ZodObject<{
97
97
  position: Record<string, number>;
98
98
  id: string;
99
99
  height: Record<string, {
100
- mode: import('../..').SectionHeightMode;
100
+ mode: import('../../..').SectionHeightMode;
101
101
  units: number;
102
102
  vhUnits?: number | undefined;
103
103
  }>;
104
- items: import('../..').ItemAny[];
104
+ items: import('../../..').ItemAny[];
105
105
  name?: string | undefined;
106
106
  media?: Record<string, {
107
107
  url: string;
@@ -229,11 +229,11 @@ export declare const ArticleSchema: z.ZodObject<{
229
229
  position: Record<string, number>;
230
230
  id: string;
231
231
  height: Record<string, {
232
- mode: import('../..').SectionHeightMode;
232
+ mode: import('../../..').SectionHeightMode;
233
233
  units: number;
234
234
  vhUnits?: number | undefined;
235
235
  }>;
236
- items: import('../..').ItemAny[];
236
+ items: import('../../..').ItemAny[];
237
237
  name?: string | undefined;
238
238
  media?: Record<string, {
239
239
  url: string;
@@ -281,11 +281,11 @@ export declare const ArticleSchema: z.ZodObject<{
281
281
  position: Record<string, number>;
282
282
  id: string;
283
283
  height: Record<string, {
284
- mode: import('../..').SectionHeightMode;
284
+ mode: import('../../..').SectionHeightMode;
285
285
  units: number;
286
286
  vhUnits?: number | undefined;
287
287
  }>;
288
- items: import('../..').ItemAny[];
288
+ items: import('../../..').ItemAny[];
289
289
  name?: string | undefined;
290
290
  media?: Record<string, {
291
291
  url: string;
@@ -43,10 +43,10 @@ export declare const RichTextItemSchema: z.ZodObject<{
43
43
  height: z.ZodNumber;
44
44
  zIndex: z.ZodNumber;
45
45
  angle: z.ZodNumber;
46
- anchorSide: z.ZodOptional<z.ZodNativeEnum<typeof import('../..').AnchorSide>>;
46
+ anchorSide: z.ZodOptional<z.ZodNativeEnum<typeof import('../../..').AnchorSide>>;
47
47
  scale: z.ZodNumber;
48
- positionType: z.ZodNativeEnum<typeof import('../..').PositionType>;
49
- scaleAnchor: z.ZodNativeEnum<typeof import('../..').AreaAnchor>;
48
+ positionType: z.ZodNativeEnum<typeof import('../../..').PositionType>;
49
+ scaleAnchor: z.ZodNativeEnum<typeof import('../../..').AreaAnchor>;
50
50
  }, "strip", z.ZodTypeAny, {
51
51
  left: number;
52
52
  top: number;
@@ -55,9 +55,9 @@ export declare const RichTextItemSchema: z.ZodObject<{
55
55
  width: number;
56
56
  height: number;
57
57
  zIndex: number;
58
- positionType: import('../..').PositionType;
59
- scaleAnchor: import('../..').AreaAnchor;
60
- anchorSide?: import('../..').AnchorSide | undefined;
58
+ positionType: import('../../..').PositionType;
59
+ scaleAnchor: import('../../..').AreaAnchor;
60
+ anchorSide?: import('../../..').AnchorSide | undefined;
61
61
  }, {
62
62
  left: number;
63
63
  top: number;
@@ -66,9 +66,9 @@ export declare const RichTextItemSchema: z.ZodObject<{
66
66
  width: number;
67
67
  height: number;
68
68
  zIndex: number;
69
- positionType: import('../..').PositionType;
70
- scaleAnchor: import('../..').AreaAnchor;
71
- anchorSide?: import('../..').AnchorSide | undefined;
69
+ positionType: import('../../..').PositionType;
70
+ scaleAnchor: import('../../..').AreaAnchor;
71
+ anchorSide?: import('../../..').AnchorSide | undefined;
72
72
  }>>;
73
73
  hidden: z.ZodRecord<z.ZodString, z.ZodBoolean>;
74
74
  link: z.ZodOptional<z.ZodObject<{
@@ -82,17 +82,17 @@ export declare const RichTextItemSchema: z.ZodObject<{
82
82
  target: string;
83
83
  }>>;
84
84
  compoundSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
85
- positionAnchor: z.ZodNativeEnum<typeof import('../..').AreaAnchor>;
86
- widthMode: z.ZodNativeEnum<typeof import('../..').DimensionMode>;
87
- heightMode: z.ZodNativeEnum<typeof import('../..').DimensionMode>;
85
+ positionAnchor: z.ZodNativeEnum<typeof import('../../..').AreaAnchor>;
86
+ widthMode: z.ZodNativeEnum<typeof import('../../..').DimensionMode>;
87
+ heightMode: z.ZodNativeEnum<typeof import('../../..').DimensionMode>;
88
88
  }, "strip", z.ZodTypeAny, {
89
- positionAnchor: import('../..').AreaAnchor;
90
- widthMode: import('../..').DimensionMode;
91
- heightMode: import('../..').DimensionMode;
89
+ positionAnchor: import('../../..').AreaAnchor;
90
+ widthMode: import('../../..').DimensionMode;
91
+ heightMode: import('../../..').DimensionMode;
92
92
  }, {
93
- positionAnchor: import('../..').AreaAnchor;
94
- widthMode: import('../..').DimensionMode;
95
- heightMode: import('../..').DimensionMode;
93
+ positionAnchor: import('../../..').AreaAnchor;
94
+ widthMode: import('../../..').DimensionMode;
95
+ heightMode: import('../../..').DimensionMode;
96
96
  }>>>;
97
97
  } & {
98
98
  type: z.ZodLiteral<ArticleItemType.RichText>;
@@ -1003,9 +1003,9 @@ export declare const RichTextItemSchema: z.ZodObject<{
1003
1003
  width: number;
1004
1004
  height: number;
1005
1005
  zIndex: number;
1006
- positionType: import('../..').PositionType;
1007
- scaleAnchor: import('../..').AreaAnchor;
1008
- anchorSide?: import('../..').AnchorSide | undefined;
1006
+ positionType: import('../../..').PositionType;
1007
+ scaleAnchor: import('../../..').AreaAnchor;
1008
+ anchorSide?: import('../../..').AnchorSide | undefined;
1009
1009
  }>;
1010
1010
  layoutParams: Record<string, {
1011
1011
  color: string;
@@ -1176,9 +1176,9 @@ export declare const RichTextItemSchema: z.ZodObject<{
1176
1176
  target: string;
1177
1177
  } | undefined;
1178
1178
  compoundSettings?: Record<string, {
1179
- positionAnchor: import('../..').AreaAnchor;
1180
- widthMode: import('../..').DimensionMode;
1181
- heightMode: import('../..').DimensionMode;
1179
+ positionAnchor: import('../../..').AreaAnchor;
1180
+ widthMode: import('../../..').DimensionMode;
1181
+ heightMode: import('../../..').DimensionMode;
1182
1182
  }> | undefined;
1183
1183
  }, {
1184
1184
  hidden: Record<string, boolean>;
@@ -1192,9 +1192,9 @@ export declare const RichTextItemSchema: z.ZodObject<{
1192
1192
  width: number;
1193
1193
  height: number;
1194
1194
  zIndex: number;
1195
- positionType: import('../..').PositionType;
1196
- scaleAnchor: import('../..').AreaAnchor;
1197
- anchorSide?: import('../..').AnchorSide | undefined;
1195
+ positionType: import('../../..').PositionType;
1196
+ scaleAnchor: import('../../..').AreaAnchor;
1197
+ anchorSide?: import('../../..').AnchorSide | undefined;
1198
1198
  }>;
1199
1199
  layoutParams: Record<string, {
1200
1200
  color: string;
@@ -1365,8 +1365,8 @@ export declare const RichTextItemSchema: z.ZodObject<{
1365
1365
  target: string;
1366
1366
  } | undefined;
1367
1367
  compoundSettings?: Record<string, {
1368
- positionAnchor: import('../..').AreaAnchor;
1369
- widthMode: import('../..').DimensionMode;
1370
- heightMode: import('../..').DimensionMode;
1368
+ positionAnchor: import('../../..').AreaAnchor;
1369
+ widthMode: import('../../..').DimensionMode;
1370
+ heightMode: import('../../..').DimensionMode;
1371
1371
  }> | undefined;
1372
1372
  }>;
@@ -58,7 +58,7 @@ export declare const SectionMediaSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
58
58
  }>]>;
59
59
  export declare const SectionSchema: z.ZodObject<{
60
60
  id: z.ZodString;
61
- items: z.ZodArray<z.ZodType<import('../..').ItemAny, z.ZodTypeDef, import('../..').ItemAny>, "many">;
61
+ items: z.ZodArray<z.ZodType<import('../../..').ItemAny, z.ZodTypeDef, import('../../..').ItemAny>, "many">;
62
62
  name: z.ZodOptional<z.ZodString>;
63
63
  height: z.ZodRecord<z.ZodString, z.ZodObject<{
64
64
  mode: z.ZodNativeEnum<typeof SectionHeightMode>;
@@ -129,7 +129,7 @@ export declare const SectionSchema: z.ZodObject<{
129
129
  units: number;
130
130
  vhUnits?: number | undefined;
131
131
  }>;
132
- items: import('../..').ItemAny[];
132
+ items: import('../../..').ItemAny[];
133
133
  name?: string | undefined;
134
134
  media?: Record<string, {
135
135
  url: string;
@@ -156,7 +156,7 @@ export declare const SectionSchema: z.ZodObject<{
156
156
  units: number;
157
157
  vhUnits?: number | undefined;
158
158
  }>;
159
- items: import('../..').ItemAny[];
159
+ items: import('../../..').ItemAny[];
160
160
  name?: string | undefined;
161
161
  media?: Record<string, {
162
162
  url: string;
@@ -0,0 +1,6 @@
1
+ type UseCurrentLayoutReturn = {
2
+ layoutId: string | undefined;
3
+ layoutDeviation: number;
4
+ };
5
+ export declare function useCurrentLayout(): UseCurrentLayoutReturn;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare const useExemplary: () => number;
@@ -0,0 +1,8 @@
1
+ import { ImageItem, VideoItem } from '../../sdk/types/article/Item';
2
+ export declare function useItemFXData(item: ImageItem | VideoItem, sectionId: string): FXData;
3
+ type FXData = {
4
+ fragmentShader: string;
5
+ controlsValues: Record<string, ControlValue>;
6
+ };
7
+ type ControlValue = number;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { DependencyList } from 'react';
2
+ import { Animator } from '../utils/Animator/Animator';
3
+ import { ItemAny } from '../../sdk/types/article/Item';
4
+ import { KeyframeType } from '../../sdk/types/keyframe/Keyframe';
5
+ export type AnimatorGetter<T> = (animator: Animator, scroll: number, value: T) => T;
6
+ type ItemParamGetter<T> = (item: ItemAny, layoutId: string | undefined) => T;
7
+ export declare function useKeyframeValue<T>(item: ItemAny, type: KeyframeType, itemParamsGetter: ItemParamGetter<T>, animatorGetter: AnimatorGetter<T>, sectionId: string, deps?: DependencyList): T;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare function useRegisterResize(ref: HTMLElement | null, onResize?: (height: number) => void): void;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { Article as TArticle } from '../../sdk/types/article/Article';
3
+ interface Props {
4
+ article: TArticle;
5
+ sectionData: Record<SectionName, any>;
6
+ }
7
+ export declare const Article: FC<Props>;
8
+ type SectionName = string;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ export declare const ArticleWrapper: FC<PropsWithChildren<{}>>;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { Meta } from '../../sdk/types/project/Meta';
3
+ import { Project } from '../../sdk/types/project/Project';
4
+ interface Props {
5
+ project: Project;
6
+ meta: Meta;
7
+ }
8
+ export declare const CNTRLHead: FC<Props>;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { Layout } from '../../sdk/types/project/Layout';
3
+ export interface LayoutStyleProps {
4
+ id: string;
5
+ layouts: Layout[];
6
+ layoutId: string;
7
+ children?: (layout: Layout) => string;
8
+ }
9
+ export declare const LayoutStyle: FC<LayoutStyleProps>;
@@ -0,0 +1,15 @@
1
+ import { FC } from 'react';
2
+ import { Project } from '../../sdk/types/project/Project';
3
+ import { Article as TArticle } from '../../sdk/types/article/Article';
4
+ import { Meta } from '../../sdk/types/project/Meta';
5
+ import { KeyframeAny } from '../../sdk/types/keyframe/Keyframe';
6
+ export interface PageProps {
7
+ article: TArticle;
8
+ project: Project;
9
+ meta: Meta;
10
+ keyframes: KeyframeAny[];
11
+ sectionData: Record<SectionName, any>;
12
+ }
13
+ export declare const Page: FC<PageProps>;
14
+ type SectionName = string;
15
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as React, FC } from 'react';
2
+ type PlaybackParams = {
3
+ from: number;
4
+ to: number;
5
+ };
6
+ interface Props {
7
+ sectionId: string;
8
+ src: string;
9
+ playbackParams: PlaybackParams | null;
10
+ style?: React.CSSProperties;
11
+ className: string;
12
+ }
13
+ export declare const ScrollPlaybackVideo: FC<Props>;
14
+ export {};
@@ -0,0 +1,11 @@
1
+ import { FC, ReactElement } from 'react';
2
+ import { SectionHeight, Section as TSection } from '../../../sdk/types/article/Section';
3
+ type SectionChild = ReactElement<any, any>;
4
+ interface Props {
5
+ section: TSection;
6
+ children: SectionChild[];
7
+ data?: any;
8
+ }
9
+ export declare const Section: FC<Props>;
10
+ export declare function getSectionHeight(heightData: SectionHeight): string;
11
+ export {};
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ export type TSectionImage = {
3
+ url: string;
4
+ type: 'image';
5
+ size: string;
6
+ position: string;
7
+ offsetX: number | null;
8
+ };
9
+ interface Props {
10
+ media: TSectionImage;
11
+ sectionId: string;
12
+ }
13
+ export declare const SectionImage: FC<Props>;
14
+ export {};
@@ -0,0 +1,17 @@
1
+ import { FC } from 'react';
2
+ export type TSectionVideo = {
3
+ url: string;
4
+ size: string;
5
+ type: 'video';
6
+ play: 'on-click' | 'auto';
7
+ position: string;
8
+ coverUrl: string | null;
9
+ offsetX: number | null;
10
+ };
11
+ interface Props {
12
+ container: HTMLDivElement;
13
+ sectionId: string;
14
+ media: TSectionVideo;
15
+ }
16
+ export declare const SectionVideo: FC<Props>;
17
+ export {};
@@ -0,0 +1,4 @@
1
+ import { CntrlColor } from '@cntrl-site/color';
2
+ type LayoutIdentifier = string;
3
+ export declare const useSectionColor: (colorData: Record<LayoutIdentifier, string | null>) => CntrlColor;
4
+ export {};
@@ -0,0 +1,3 @@
1
+ import { SectionHeight } from '../../../sdk/types/article/Section';
2
+ export declare const useSectionHeightData: (sectionId: string) => Record<string, string>;
3
+ export declare function getSectionHeightMap(sectionHeight: Record<string, SectionHeight>): Record<string, string>;
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { ItemProps } from '../Item';
3
+ import { CodeEmbedItem as TCodeEmbedItem } from '../../../../sdk/types/article/Item';
4
+ export declare const CodeEmbedItem: FC<ItemProps<TCodeEmbedItem>>;
5
+ export declare function decodeBase64(str: string): string;
@@ -0,0 +1,7 @@
1
+ import { CodeEmbedItem } from '../../../../sdk/types/article/Item';
2
+ import { AreaAnchor } from '../../../../sdk/types/article/ItemArea';
3
+ export declare function useCodeEmbedItem(item: CodeEmbedItem, sectionId: string): {
4
+ anchor: AreaAnchor;
5
+ blur: number | undefined;
6
+ opacity: number | undefined;
7
+ };
@@ -0,0 +1,4 @@
1
+ import { ItemProps } from '../Item';
2
+ import { FC } from 'react';
3
+ import { ComponentItem as TComponentItem } from '../../../../sdk/types/article/Item';
4
+ export declare const ComponentItem: FC<ItemProps<TComponentItem>>;
@@ -0,0 +1,5 @@
1
+ import { ComponentItem } from '../../../../sdk/types/article/Item';
2
+ export declare function useComponentItem(item: ComponentItem, sectionId: string): {
3
+ opacity: number | undefined;
4
+ blur: number | undefined;
5
+ };
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { ItemAny } from '../../../../sdk/types/article/Item';
3
+ interface ChildItemProps {
4
+ item: ItemAny;
5
+ sectionId: string;
6
+ isParentVisible?: boolean;
7
+ }
8
+ export declare const CompoundChild: FC<ChildItemProps>;
9
+ export {};
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ItemProps } from '../Item';
3
+ import { CompoundItem as TCompoundItem } from '../../../../sdk/types/article/Item';
4
+ export declare const CompoundItem: FC<ItemProps<TCompoundItem>>;
@@ -0,0 +1,4 @@
1
+ import { CompoundItem } from '../../../../sdk/types/article/Item';
2
+ export declare function useCompoundItem(item: CompoundItem, sectionId: string): {
3
+ opacity: number | undefined;
4
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ItemProps } from '../Item';
3
+ import { CustomItem as TCustomItem } from '../../../../sdk/types/article/Item';
4
+ export declare const CustomItem: FC<ItemProps<TCustomItem>>;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ItemProps } from '../Item';
3
+ import { VimeoEmbedItem as TVimeoEmbedItem } from '../../../../sdk/types/article/Item';
4
+ export declare const VimeoEmbedItem: FC<ItemProps<TVimeoEmbedItem>>;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ItemProps } from '../Item';
3
+ import { YoutubeEmbedItem as TYoutubeEmbedItem } from '../../../../sdk/types/article/Item';
4
+ export declare const YoutubeEmbedItem: FC<ItemProps<TYoutubeEmbedItem>>;
@@ -0,0 +1,6 @@
1
+ import { VimeoEmbedItem, YoutubeEmbedItem } from '../../../../sdk/types/article/Item';
2
+ export declare const useEmbedVideoItem: (item: VimeoEmbedItem | YoutubeEmbedItem, sectionId: string) => {
3
+ radius: number | undefined;
4
+ blur: number | undefined;
5
+ opacity: number | undefined;
6
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ItemProps } from '../Item';
3
+ import { ImageItem as TImageItem } from '../../../../sdk/types/article/Item';
4
+ export declare const ImageItem: FC<ItemProps<TImageItem>>;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ItemProps } from '../Item';
3
+ import { VideoItem as TVideoItem } from '../../../../sdk/types/article/Item';
4
+ export declare const VideoItem: FC<ItemProps<TVideoItem>>;
@@ -0,0 +1,8 @@
1
+ import { ImageItem, VideoItem } from '../../../../sdk/types/article/Item';
2
+ export declare function useFileItem(item: ImageItem | VideoItem, sectionId: string): {
3
+ radius: number | undefined;
4
+ strokeWidth: number | undefined;
5
+ opacity: number | undefined;
6
+ strokeFill: import('../../../../sdk/types/article/Item').FillLayer[] | undefined;
7
+ blur: number | undefined;
8
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ItemProps } from '../Item';
3
+ import { GroupItem as TGroupItem } from '../../../../sdk/types/article/Item';
4
+ export declare const GroupItem: FC<ItemProps<TGroupItem>>;
@@ -0,0 +1,5 @@
1
+ import { GroupItem } from '../../../../sdk/types/article/Item';
2
+ export declare function useGroupItem(item: GroupItem, sectionId: string): {
3
+ opacity: number | undefined;
4
+ blur: number | undefined;
5
+ };
@@ -0,0 +1,20 @@
1
+ import { FC } from 'react';
2
+ import { useItemInteractionCtrl } from '../../interactions/useItemInteractionCtrl';
3
+ import { ItemAny } from '../../../sdk/types/article/Item';
4
+ export interface ItemProps<I extends ItemAny> {
5
+ item: I;
6
+ sectionId: string;
7
+ articleHeight?: number;
8
+ onResize?: (height: number) => void;
9
+ interactionCtrl?: ReturnType<typeof useItemInteractionCtrl>;
10
+ onVisibilityChange: (isVisible: boolean) => void;
11
+ isInCompound?: boolean;
12
+ }
13
+ export interface ItemWrapperProps {
14
+ item: ItemAny;
15
+ sectionId: string;
16
+ articleHeight?: number;
17
+ isInGroup?: boolean;
18
+ isParentVisible?: boolean;
19
+ }
20
+ export declare const Item: FC<ItemWrapperProps>;
@@ -0,0 +1,8 @@
1
+ import { default as React, ReactElement, ReactNode } from 'react';
2
+ interface Props {
3
+ url?: string;
4
+ children: ReactElement | ReactNode[];
5
+ target?: string;
6
+ }
7
+ export declare const LinkWrapper: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ItemProps } from '../Item';
3
+ import { RectangleItem as TRectangleItem } from '../../../../sdk/types/article/Item';
4
+ export declare const RectangleItem: FC<ItemProps<TRectangleItem>>;
@@ -0,0 +1,9 @@
1
+ import { FillLayer, RectangleItem } from '../../../../sdk/types/article/Item';
2
+ export declare function useRectangleItem(item: RectangleItem, sectionId: string): {
3
+ fill: FillLayer[] | undefined;
4
+ strokeWidth: number | undefined;
5
+ radius: number | undefined;
6
+ strokeFill: FillLayer[] | undefined;
7
+ blur: number | undefined;
8
+ backdropBlur: number | undefined;
9
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { RichTextItem as TRichTextItem } from '../../../../sdk/types/article/Item';
3
+ import { ItemProps } from '../Item';
4
+ export declare const RichTextItem: FC<ItemProps<TRichTextItem>>;
@@ -0,0 +1,3 @@
1
+ import { ReactNode } from 'react';
2
+ import { RichTextItem } from '../../../../sdk/types/article/Item';
3
+ export declare const useRichTextItem: (item: RichTextItem) => [ReactNode[], string];
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ interface RTWrapperProps {
3
+ isRichText: boolean;
4
+ transformOrigin?: string;
5
+ }
6
+ export declare const RichTextWrapper: FC<PropsWithChildren<RTWrapperProps>>;
7
+ export {};
@@ -0,0 +1,4 @@
1
+ import { ComponentType } from 'react';
2
+ import { ItemProps } from './Item';
3
+ import { ArticleItemType } from '../../../sdk/types/article/ArticleItemType';
4
+ export declare const itemsMap: Record<ArticleItemType, ComponentType<ItemProps<any>>>;
@@ -0,0 +1,17 @@
1
+ export declare function useDraggable(data: {
2
+ draggableRef: HTMLElement | null | undefined;
3
+ isEnabled: boolean;
4
+ }, dragHandler?: DragHandler, preventDragOnChildren?: boolean): void;
5
+ interface DragState {
6
+ drag: boolean;
7
+ startX: number;
8
+ startY: number;
9
+ currentX: number;
10
+ currentY: number;
11
+ pivotX: number;
12
+ pivotY: number;
13
+ lastX: number;
14
+ lastY: number;
15
+ }
16
+ type DragHandler = (state: DragState, prevState?: DragState) => void;
17
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ItemAny } from '../../../sdk/types/article/Item';
2
+ export declare const useItemAngle: (item: ItemAny, sectionId: string) => number | undefined;