@gxpl/sdk 0.0.1 → 0.0.2

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 +23 -5
  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
package/dist/cli.js CHANGED
@@ -18,7 +18,7 @@ const path_1 = __importDefault(require("path"));
18
18
  const ejs_1 = __importDefault(require("ejs"));
19
19
  const dotenv_1 = require("dotenv");
20
20
  const commander_1 = require("commander");
21
- const Client_1 = require("./Client/Client");
21
+ const Client_1 = require("./sdk/Client/Client");
22
22
  commander_1.program
23
23
  .command('generate-layouts')
24
24
  .option('-o, --output <outputFilePath>', 'Output file path', 'cntrl.scss')
package/dist/index.d.ts CHANGED
@@ -1,23 +1,33 @@
1
- export { Client as CntrlClient } from './Client/Client';
2
- export { FontFaceGenerator } from './FontFaceGenerator/FontFaceGenerator';
1
+ export { Client as CntrlClient } from './sdk/Client/Client';
2
+ export { FontFaceGenerator } from './sdk/FontFaceGenerator/FontFaceGenerator';
3
3
  export { getLayoutStyles, getLayoutMediaQuery } from './utils';
4
- export { ScrollPlaybackVideoManager } from './ScrollPlaybackVideoManager/ScrollPlaybackVideoManager';
5
- export { SectionHeightMode } from './types/article/Section';
6
- export { TextAlign, TextDecoration, TextTransform, VerticalAlign } from './types/article/RichText';
7
- export { ArticleItemType } from './types/article/ArticleItemType';
8
- export { AreaAnchor, AnchorSide, DimensionMode, PositionType } from './types/article/ItemArea';
9
- export { KeyframeType } from './types/keyframe/Keyframe';
10
- export type { Article } from './types/article/Article';
11
- export type { Section, SectionHeight } from './types/article/Section';
12
- export type { Item, ImageItem, ItemAny, CustomItem, ItemCommonParamsMap, ItemLayoutParamsMap, RectangleItem, StickyParams, VideoItem, RichTextItem, Link, VimeoEmbedItem, YoutubeEmbedItem, GroupItem, CodeEmbedItem, CompoundItem, ComponentItem, FillLayer } from './types/article/Item';
13
- export type { RichTextBlock, RichTextEntity, RichTextStyle } from './types/article/RichText';
14
- export type { ItemArea } from './types/article/ItemArea';
15
- export type { ItemState, ItemStateParams, StateParams, ItemStatesMap } from './types/article/ItemState';
16
- export type { Interaction, InteractionItemTrigger, InteractionScrollTrigger, InteractionState } from './types/article/Interaction';
17
- export type { Layout } from './types/project/Layout';
18
- export type { Project } from './types/project/Project';
19
- export type { Meta } from './types/project/Meta';
20
- export type { KeyframeValueMap, KeyframeAny } from './types/keyframe/Keyframe';
21
- export type { CompoundSettings } from './types/article/CompoundSettings';
22
- export type { Component } from './types/component/Component';
23
- export { components } from './Components/components';
4
+ export { ScrollPlaybackVideoManager } from './sdk/ScrollPlaybackVideoManager/ScrollPlaybackVideoManager';
5
+ export { SectionHeightMode } from './sdk/types/article/Section';
6
+ export { TextAlign, TextDecoration, TextTransform, VerticalAlign } from './sdk/types/article/RichText';
7
+ export { ArticleItemType } from './sdk/types/article/ArticleItemType';
8
+ export { AreaAnchor, AnchorSide, DimensionMode, PositionType } from './sdk/types/article/ItemArea';
9
+ export { KeyframeType } from './sdk/types/keyframe/Keyframe';
10
+ export type { Article } from './sdk/types/article/Article';
11
+ export type { Section, SectionHeight } from './sdk/types/article/Section';
12
+ export type { Item, ImageItem, ItemAny, CustomItem, ItemCommonParamsMap, ItemLayoutParamsMap, RectangleItem, StickyParams, VideoItem, RichTextItem, Link, VimeoEmbedItem, YoutubeEmbedItem, GroupItem, CodeEmbedItem, CompoundItem, ComponentItem, FillLayer } from './sdk/types/article/Item';
13
+ export type { RichTextBlock, RichTextEntity, RichTextStyle } from './sdk/types/article/RichText';
14
+ export type { ItemArea } from './sdk/types/article/ItemArea';
15
+ export type { ItemState, ItemStateParams, StateParams, ItemStatesMap } from './sdk/types/article/ItemState';
16
+ export type { Interaction, InteractionItemTrigger, InteractionScrollTrigger, InteractionState } from './sdk/types/article/Interaction';
17
+ export type { Layout } from './sdk/types/project/Layout';
18
+ export type { Project } from './sdk/types/project/Project';
19
+ export type { Meta } from './sdk/types/project/Meta';
20
+ export type { KeyframeValueMap, KeyframeAny } from './sdk/types/keyframe/Keyframe';
21
+ export type { CompoundSettings } from './sdk/types/article/CompoundSettings';
22
+ export type { Component } from './sdk/types/component/Component';
23
+ export { components } from './sdk/Components/components';
24
+ export { RichTextConverter } from './sdk-nextjs/utils/RichTextConverter/RichTextConverter';
25
+ export { Page } from './sdk-nextjs/components/Page';
26
+ export type { PageProps } from './sdk-nextjs/components/Page';
27
+ export { CNTRLHead as Head } from './sdk-nextjs/components/Head';
28
+ export { CntrlProvider } from './sdk-nextjs/provider/CntrlProvider';
29
+ export type { CustomItemComponent } from './sdk-nextjs/provider/CustomItemTypes';
30
+ export { useCntrlContext } from './sdk-nextjs/provider/useCntrlContext';
31
+ export declare const customItems: import('./sdk-nextjs/provider/CustomItemRegistry').CustomItemRegistry;
32
+ export declare const customSections: import('./sdk-nextjs/provider/CustomSectionRegistry').CustomSectionRegistry;
33
+ export declare const cntrlSdkContext: import('./sdk-nextjs/provider/CntrlSdkContext').CntrlSdkContext;