@gxpl/sdk 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist → lib}/index.d.ts +3 -4
- package/lib/index.js +45 -0
- package/lib/sdk/FontFaceGenerator/FontFaceGenerator.js +28 -0
- package/lib/sdk/ScrollPlaybackVideoManager/ScrollPlaybackVideoManager.js +221 -0
- package/lib/sdk/VideoDecoder/VideoDecoder.js +184 -0
- package/{dist → lib}/sdk/schemas/article/Article.schema.d.ts +12 -12
- package/{dist → lib}/sdk/schemas/article/ItemBase.schema.d.ts +10 -10
- package/{dist → lib}/sdk/schemas/article/RichTextItem.schema.d.ts +30 -30
- package/{dist → lib}/sdk/schemas/article/Section.schema.d.ts +3 -3
- package/{dist → lib}/sdk/types/component/Component.d.ts +1 -1
- package/{dist → lib}/sdk/types/keyframe/Keyframe.d.ts +1 -1
- package/lib/sdk/types/project/Meta.js +2 -0
- package/lib/sdk/types/project/Page.js +2 -0
- package/lib/sdk/types/project/Project.js +2 -0
- package/lib/sdk-nextjs/common/useCurrentLayout.js +42 -0
- package/lib/sdk-nextjs/common/useExemplary.js +13 -0
- package/lib/sdk-nextjs/common/useItemFXData.js +36 -0
- package/lib/sdk-nextjs/common/useKeyframeValue.js +75 -0
- package/lib/sdk-nextjs/common/useRegisterResize.js +22 -0
- package/lib/sdk-nextjs/components/Article.js +41 -0
- package/lib/sdk-nextjs/components/ArticleWrapper.js +12 -0
- package/lib/sdk-nextjs/components/Head.js +32 -0
- package/lib/sdk-nextjs/components/Page.js +20 -0
- package/{dist → lib}/sdk-nextjs/components/ScrollPlaybackVideo.d.ts +1 -1
- package/lib/sdk-nextjs/components/ScrollPlaybackVideo.js +46 -0
- package/lib/sdk-nextjs/components/Section/Section.js +85 -0
- package/lib/sdk-nextjs/components/Section/SectionImage.js +24 -0
- package/lib/sdk-nextjs/components/Section/SectionVideo.js +91 -0
- package/lib/sdk-nextjs/components/Section/useSectionHeightMap.js +20 -0
- package/lib/sdk-nextjs/components/items/CodeEmbedItem/CodeEmbedItem.js +120 -0
- package/lib/sdk-nextjs/components/items/CodeEmbedItem/useCodeEmbedItem.js +24 -0
- package/lib/sdk-nextjs/components/items/ComponentItem/ComponentItem.js +51 -0
- package/lib/sdk-nextjs/components/items/ComponentItem/useComponentItem.js +25 -0
- package/lib/sdk-nextjs/components/items/CompoundItem/CompoundChild.js +102 -0
- package/lib/sdk-nextjs/components/items/CompoundItem/CompoundItem.js +53 -0
- package/lib/sdk-nextjs/components/items/CompoundItem/useCompoundItem.js +16 -0
- package/lib/sdk-nextjs/components/items/CustomItem/CustomItem.js +40 -0
- package/{dist → lib}/sdk-nextjs/components/items/EmbedVideoItem/VimeoEmbed.d.ts +2 -2
- package/lib/sdk-nextjs/components/items/EmbedVideoItem/VimeoEmbed.js +170 -0
- package/lib/sdk-nextjs/components/items/EmbedVideoItem/YoutubeEmbed.js +166 -0
- package/lib/sdk-nextjs/components/items/EmbedVideoItem/useEmbedVideoItem.js +29 -0
- package/lib/sdk-nextjs/components/items/FileItem/ImageItem.js +140 -0
- package/lib/sdk-nextjs/components/items/FileItem/VideoItem.js +227 -0
- package/{dist → lib}/sdk-nextjs/components/items/FileItem/useFileItem.d.ts +1 -1
- package/lib/sdk-nextjs/components/items/FileItem/useFileItem.js +48 -0
- package/lib/sdk-nextjs/components/items/GroupItem/GroupItem.js +55 -0
- package/lib/sdk-nextjs/components/items/GroupItem/useGroupItem.js +22 -0
- package/lib/sdk-nextjs/components/items/Item.js +175 -0
- package/{dist → lib}/sdk-nextjs/components/items/LinkWrapper.d.ts +1 -1
- package/lib/sdk-nextjs/components/items/LinkWrapper.js +27 -0
- package/lib/sdk-nextjs/components/items/RectangleItem/RectangleItem.js +130 -0
- package/lib/sdk-nextjs/components/items/RectangleItem/useRectangleItem.js +54 -0
- package/lib/sdk-nextjs/components/items/RichTextItem/RichTextItem.js +83 -0
- package/lib/sdk-nextjs/components/items/RichTextItem/useRichTextItem.js +12 -0
- package/lib/sdk-nextjs/components/items/RichTextWrapper.js +10 -0
- package/lib/sdk-nextjs/components/items/itemsMap.js +28 -0
- package/lib/sdk-nextjs/components/items/useDraggable.js +177 -0
- package/lib/sdk-nextjs/components/items/useItemAngle.js +10 -0
- package/lib/sdk-nextjs/components/items/useItemArea.js +21 -0
- package/lib/sdk-nextjs/components/items/useItemPointerEvents.js +23 -0
- package/lib/sdk-nextjs/components/items/useItemScale.js +12 -0
- package/lib/sdk-nextjs/components/items/useItemTriggers.js +16 -0
- package/lib/sdk-nextjs/components/items/useRichTextItemValues.js +38 -0
- package/lib/sdk-nextjs/components/items/useSizing.js +22 -0
- package/lib/sdk-nextjs/components/items/useStickyItemTop.js +17 -0
- package/lib/sdk-nextjs/components/useLayoutContext.js +9 -0
- package/{dist → lib}/sdk-nextjs/interactions/CSSPropertyNameMap.d.ts +2 -2
- package/lib/sdk-nextjs/interactions/CSSPropertyNameMap.js +38 -0
- package/lib/sdk-nextjs/interactions/InteractionsRegistry.js +355 -0
- package/lib/sdk-nextjs/interactions/ItemInteractionCtrl.js +72 -0
- package/lib/sdk-nextjs/interactions/getTransition.js +20 -0
- package/{dist → lib}/sdk-nextjs/interactions/types.d.ts +3 -3
- package/lib/sdk-nextjs/interactions/useItemInteractionCtrl.js +16 -0
- package/{dist → lib}/sdk-nextjs/provider/ArticleRectContext.d.ts +1 -1
- package/lib/sdk-nextjs/provider/ArticleRectContext.js +5 -0
- package/{dist → lib}/sdk-nextjs/provider/CntrlContext.d.ts +1 -1
- package/lib/sdk-nextjs/provider/CntrlContext.js +6 -0
- package/lib/sdk-nextjs/provider/CntrlProvider.js +10 -0
- package/lib/sdk-nextjs/provider/CntrlSdkContext.js +76 -0
- package/lib/sdk-nextjs/provider/CustomItemRegistry.js +16 -0
- package/{dist → lib}/sdk-nextjs/provider/CustomSectionRegistry.d.ts +1 -1
- package/lib/sdk-nextjs/provider/CustomSectionRegistry.js +21 -0
- package/{dist → lib}/sdk-nextjs/provider/InteractionsContext.d.ts +1 -1
- package/lib/sdk-nextjs/provider/InteractionsContext.js +52 -0
- package/{dist → lib}/sdk-nextjs/provider/Keyframes.d.ts +1 -1
- package/lib/sdk-nextjs/provider/Keyframes.js +12 -0
- package/lib/sdk-nextjs/provider/KeyframesContext.d.ts +2 -0
- package/lib/sdk-nextjs/provider/KeyframesContext.js +6 -0
- package/lib/sdk-nextjs/provider/LayoutContext.d.ts +1 -0
- package/lib/sdk-nextjs/provider/LayoutContext.js +5 -0
- package/{dist → lib}/sdk-nextjs/provider/WebGLContextManagerContext.d.ts +1 -1
- package/lib/sdk-nextjs/provider/WebGLContextManagerContext.js +6 -0
- package/lib/sdk-nextjs/provider/defaultContext.js +9 -0
- package/lib/sdk-nextjs/provider/useCntrlContext.js +9 -0
- package/lib/sdk-nextjs/utils/Animator/Animator.js +443 -0
- package/lib/sdk-nextjs/utils/ArticleRectManager/ArticleRectObserver.js +88 -0
- package/lib/sdk-nextjs/utils/ArticleRectManager/useArticleRectObserver.js +18 -0
- package/lib/sdk-nextjs/utils/ArticleRectManager/useSectionRegistry.js +14 -0
- package/lib/sdk-nextjs/utils/EventEmitter.js +37 -0
- package/lib/sdk-nextjs/utils/RichTextConverter/RichTextConverter.js +288 -0
- package/lib/sdk-nextjs/utils/ScaleAnchorMap.js +15 -0
- package/lib/sdk-nextjs/utils/Youtube/YouTubeIframeApiLoader.js +64 -0
- package/lib/sdk-nextjs/utils/Youtube/YoutubeIframeApi.js +12 -0
- package/lib/sdk-nextjs/utils/Youtube/useYouTubeIframeApi.js +13 -0
- package/lib/sdk-nextjs/utils/areFillsVisible/areFillsVisible.js +22 -0
- package/lib/sdk-nextjs/utils/binSearchInsertAt.js +35 -0
- package/lib/sdk-nextjs/utils/checkOverflowClipSupport.js +18 -0
- package/lib/sdk-nextjs/utils/effects/useImageFx.js +114 -0
- package/lib/sdk-nextjs/utils/effects/useVideoFx.js +117 -0
- package/lib/sdk-nextjs/utils/getAnchoredItemTop.js +14 -0
- package/lib/sdk-nextjs/utils/getCompoundBoundaryStyles.js +60 -0
- package/lib/sdk-nextjs/utils/getFill.js +42 -0
- package/lib/sdk-nextjs/utils/getFontFamilyValue.js +6 -0
- package/lib/sdk-nextjs/utils/getItemTopStyle.js +17 -0
- package/lib/sdk-nextjs/utils/getStyleFromItemStateAndParams.js +8 -0
- package/lib/sdk-nextjs/utils/getValidYoutubeUrl.js +33 -0
- package/lib/sdk-nextjs/utils/isItemType.js +6 -0
- package/lib/sdk-nextjs/utils/rangeMap.js +11 -0
- package/lib/sdk-nextjs/utils/useElementRect.js +24 -0
- package/lib/utils.js +30 -0
- package/package.json +15 -27
- package/dist/index.js +0 -7765
- package/dist/index.mjs +0 -7748
- package/dist/sdk/Client/Client.test.d.ts +0 -1
- package/dist/sdk/Client/__mock__/articleMock.d.ts +0 -2
- package/dist/sdk/Client/__mock__/keyframesMock.d.ts +0 -2
- package/dist/sdk/Client/__mock__/projectMock.d.ts +0 -2
- package/dist/sdk/Components/ControlSlider/ControlSlider.d.ts +0 -90
- package/dist/sdk/Components/ControlSlider/ControlSliderComponent.d.ts +0 -519
- package/dist/sdk/Components/ImageRevealSlider/ControlImageRevealSliderComponent.d.ts +0 -209
- package/dist/sdk/Components/ImageRevealSlider/ImageRevealSlider.d.ts +0 -38
- package/dist/sdk/Components/components.d.ts +0 -2
- package/dist/sdk/Components/helpers/RichTextRenderer/RichTextRenderer.d.ts +0 -6
- package/dist/sdk/Components/helpers/SvgImage/SvgImage.d.ts +0 -9
- package/dist/sdk/Components/utils/scalingValue.d.ts +0 -1
- package/dist/sdk/FontFaceGenerator/FontFaceGenerator.test.d.ts +0 -1
- package/dist/sdk/schemas/shared/FillLayer.schema.d.ts +0 -186
- package/dist/sdk-nextjs/components/LayoutStyle.d.ts +0 -9
- package/dist/sdk-nextjs/components/Section/useSectionColor.d.ts +0 -4
- package/dist/sdk-nextjs/provider/KeyframesContext.d.ts +0 -2
- package/dist/sdk-nextjs/provider/LayoutContext.d.ts +0 -1
- package/dist/sdk-nextjs/utils/StickyManager/StickyManager.d.ts +0 -10
- package/dist/sdk-nextjs/utils/areFillsVisible/areFillsVisible.test.d.ts +0 -1
- package/dist/sdk-nextjs/utils/castObject.d.ts +0 -5
- package/dist/sdk-nextjs/utils/getInvertedRanges.d.ts +0 -10
- package/dist/sdk.css +0 -1
- /package/{dist → lib}/cli.d.ts +0 -0
- /package/{dist → lib}/cli.js +0 -0
- /package/{dist → lib}/sdk/Client/Client.d.ts +0 -0
- /package/{dist → lib}/sdk/Client/Client.js +0 -0
- /package/{dist → lib}/sdk/FontFaceGenerator/FontFaceGenerator.d.ts +0 -0
- /package/{dist → lib}/sdk/ScrollPlaybackVideoManager/ScrollPlaybackVideoManager.d.ts +0 -0
- /package/{dist → lib}/sdk/VideoDecoder/VideoDecoder.d.ts +0 -0
- /package/{dist → lib}/sdk/schemas/article/Article.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/article/FillLayer.schema.d.ts +0 -0
- /package/{dist → lib}/sdk/schemas/article/FillLayer.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/article/Interaction.schema.d.ts +0 -0
- /package/{dist → lib}/sdk/schemas/article/Interaction.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/article/Item.schema.d.ts +0 -0
- /package/{dist → lib}/sdk/schemas/article/Item.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/article/ItemArea.schema.d.ts +0 -0
- /package/{dist → lib}/sdk/schemas/article/ItemArea.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/article/ItemBase.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/article/ItemState.schema.d.ts +0 -0
- /package/{dist → lib}/sdk/schemas/article/ItemState.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/article/RichTextItem.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/article/Section.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/keyframe/Keyframes.schema.d.ts +0 -0
- /package/{dist → lib}/sdk/schemas/keyframe/Keyframes.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/project/Layout.schema.d.ts +0 -0
- /package/{dist → lib}/sdk/schemas/project/Layout.schema.js +0 -0
- /package/{dist → lib}/sdk/schemas/project/Project.schema.d.ts +0 -0
- /package/{dist → lib}/sdk/schemas/project/Project.schema.js +0 -0
- /package/{dist → lib}/sdk/types/article/Article.d.ts +0 -0
- /package/{dist/sdk/types/article/FX.js → lib/sdk/types/article/Article.js} +0 -0
- /package/{dist → lib}/sdk/types/article/ArticleItemType.d.ts +0 -0
- /package/{dist → lib}/sdk/types/article/ArticleItemType.js +0 -0
- /package/{dist → lib}/sdk/types/article/CompoundSettings.d.ts +0 -0
- /package/{dist/sdk/types/article/Interaction.js → lib/sdk/types/article/CompoundSettings.js} +0 -0
- /package/{dist → lib}/sdk/types/article/FX.d.ts +0 -0
- /package/{dist/sdk/types/project/Layout.js → lib/sdk/types/article/FX.js} +0 -0
- /package/{dist → lib}/sdk/types/article/Interaction.d.ts +0 -0
- /package/{dist/sdk/types/project/Meta.js → lib/sdk/types/article/Interaction.js} +0 -0
- /package/{dist → lib}/sdk/types/article/Item.d.ts +0 -0
- /package/{dist → lib}/sdk/types/article/Item.js +0 -0
- /package/{dist → lib}/sdk/types/article/ItemArea.d.ts +0 -0
- /package/{dist → lib}/sdk/types/article/ItemArea.js +0 -0
- /package/{dist → lib}/sdk/types/article/ItemState.d.ts +0 -0
- /package/{dist → lib}/sdk/types/article/ItemState.js +0 -0
- /package/{dist → lib}/sdk/types/article/RichText.d.ts +0 -0
- /package/{dist → lib}/sdk/types/article/RichText.js +0 -0
- /package/{dist → lib}/sdk/types/article/Section.d.ts +0 -0
- /package/{dist → lib}/sdk/types/article/Section.js +0 -0
- /package/{dist/sdk/types/project/Page.js → lib/sdk/types/component/Component.js} +0 -0
- /package/{dist → lib}/sdk/types/keyframe/Keyframe.js +0 -0
- /package/{dist → lib}/sdk/types/project/Fonts.d.ts +0 -0
- /package/{dist → lib}/sdk/types/project/Fonts.js +0 -0
- /package/{dist → lib}/sdk/types/project/Layout.d.ts +0 -0
- /package/{dist/sdk/types/project/Project.js → lib/sdk/types/project/Layout.js} +0 -0
- /package/{dist → lib}/sdk/types/project/Meta.d.ts +0 -0
- /package/{dist → lib}/sdk/types/project/Page.d.ts +0 -0
- /package/{dist → lib}/sdk/types/project/Project.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/common/useCurrentLayout.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/common/useExemplary.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/common/useItemFXData.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/common/useKeyframeValue.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/common/useRegisterResize.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/Article.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/ArticleWrapper.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/Head.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/Page.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/Section/Section.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/Section/SectionImage.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/Section/SectionVideo.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/Section/useSectionHeightMap.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/CodeEmbedItem/CodeEmbedItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/CodeEmbedItem/useCodeEmbedItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/ComponentItem/ComponentItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/ComponentItem/useComponentItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/CompoundItem/CompoundChild.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/CompoundItem/CompoundItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/CompoundItem/useCompoundItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/CustomItem/CustomItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/EmbedVideoItem/YoutubeEmbed.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/EmbedVideoItem/useEmbedVideoItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/FileItem/ImageItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/FileItem/VideoItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/GroupItem/GroupItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/GroupItem/useGroupItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/Item.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/RectangleItem/RectangleItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/RectangleItem/useRectangleItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/RichTextItem/RichTextItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/RichTextItem/useRichTextItem.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/RichTextWrapper.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/itemsMap.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/useDraggable.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/useItemAngle.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/useItemArea.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/useItemPointerEvents.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/useItemScale.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/useItemTriggers.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/useRichTextItemValues.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/useSizing.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/items/useStickyItemTop.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/components/useLayoutContext.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/interactions/InteractionsRegistry.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/interactions/ItemInteractionCtrl.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/interactions/getTransition.d.ts +0 -0
- /package/{dist/sdk/types/article/Article.js → lib/sdk-nextjs/interactions/types.js} +0 -0
- /package/{dist → lib}/sdk-nextjs/interactions/useItemInteractionCtrl.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/provider/CntrlProvider.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/provider/CntrlSdkContext.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/provider/CustomItemRegistry.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/provider/CustomItemTypes.d.ts +0 -0
- /package/{dist/sdk/types/article/CompoundSettings.js → lib/sdk-nextjs/provider/CustomItemTypes.js} +0 -0
- /package/{dist → lib}/sdk-nextjs/provider/defaultContext.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/provider/useCntrlContext.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/Animator/Animator.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/ArticleRectManager/ArticleRectObserver.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/ArticleRectManager/useArticleRectObserver.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/ArticleRectManager/useSectionRegistry.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/EventEmitter.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/RichTextConverter/RichTextConverter.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/ScaleAnchorMap.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/Youtube/YouTubeIframeApiLoader.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/Youtube/YoutubeIframeApi.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/Youtube/useYouTubeIframeApi.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/areFillsVisible/areFillsVisible.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/binSearchInsertAt.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/checkOverflowClipSupport.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/effects/useImageFx.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/effects/useVideoFx.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/getAnchoredItemTop.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/getCompoundBoundaryStyles.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/getFill.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/getFontFamilyValue.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/getItemTopStyle.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/getStyleFromItemStateAndParams.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/getValidYoutubeUrl.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/isItemType.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/rangeMap.d.ts +0 -0
- /package/{dist → lib}/sdk-nextjs/utils/useElementRect.d.ts +0 -0
- /package/{dist → lib}/utils.d.ts +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useVideoFx = useVideoFx;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const effects_1 = require("@cntrl-site/effects");
|
|
6
|
+
const rangeMap_1 = require("../rangeMap");
|
|
7
|
+
const WebGLContextManagerContext_1 = require("../../provider/WebGLContextManagerContext");
|
|
8
|
+
const PATTERN_URL = 'https://cdn.cntrl.site/client-app-files/texture2.png';
|
|
9
|
+
const PATTERN_2_URL = 'https://cdn.cntrl.site/client-app-files/bayer16.png';
|
|
10
|
+
function useVideoFx(canvas, enabled, { videoUrl, fragmentShader, controls }, width, height) {
|
|
11
|
+
const [isFXAllowed, setIsFXAllowed] = (0, react_1.useState)(true);
|
|
12
|
+
const [isReady, setIsReady] = (0, react_1.useState)(false);
|
|
13
|
+
const active = enabled && isReady;
|
|
14
|
+
const webGLContextManager = (0, react_1.useContext)(WebGLContextManagerContext_1.WebglContextManagerContext);
|
|
15
|
+
const glRef = (0, react_1.useRef)(null);
|
|
16
|
+
const isRenderingRef = (0, react_1.useRef)(false);
|
|
17
|
+
const frameRef = (0, react_1.useRef)();
|
|
18
|
+
const videoTextureManager = (0, react_1.useMemo)(() => {
|
|
19
|
+
if (!videoUrl || !enabled)
|
|
20
|
+
return;
|
|
21
|
+
const handlePlayError = () => {
|
|
22
|
+
setIsFXAllowed(false);
|
|
23
|
+
};
|
|
24
|
+
return new effects_1.VideoTextureManager(videoUrl, handlePlayError);
|
|
25
|
+
}, [videoUrl, enabled]);
|
|
26
|
+
const videoFx = (0, react_1.useMemo)(() => {
|
|
27
|
+
if (!videoTextureManager)
|
|
28
|
+
return;
|
|
29
|
+
return new effects_1.MediaEffect(videoTextureManager, PATTERN_URL, PATTERN_2_URL, fragmentShader, Object.assign({ time: 0, cursor: [0, 0] }, controls), width, height);
|
|
30
|
+
}, [videoTextureManager, fragmentShader, width, height]);
|
|
31
|
+
(0, react_1.useEffect)(() => {
|
|
32
|
+
if (!videoTextureManager)
|
|
33
|
+
return;
|
|
34
|
+
videoTextureManager.onReadyStatusChange(setIsReady);
|
|
35
|
+
}, [videoTextureManager]);
|
|
36
|
+
(0, react_1.useEffect)(() => {
|
|
37
|
+
if (!canvas || !videoFx)
|
|
38
|
+
return;
|
|
39
|
+
const handleMouseMove = (evt) => {
|
|
40
|
+
const rect = canvas.getBoundingClientRect();
|
|
41
|
+
const x = (0, rangeMap_1.rangeMap)(evt.clientX, rect.left, rect.left + rect.width, 0, 1, true);
|
|
42
|
+
const y = (0, rangeMap_1.rangeMap)(evt.clientY, rect.top, rect.top + rect.height, 0, 1, true);
|
|
43
|
+
videoFx.setParam('cursor', [x, y]);
|
|
44
|
+
};
|
|
45
|
+
window.addEventListener('mousemove', handleMouseMove, { capture: true, passive: true });
|
|
46
|
+
return () => {
|
|
47
|
+
window.removeEventListener('mousemove', handleMouseMove);
|
|
48
|
+
};
|
|
49
|
+
}, [canvas, videoFx]);
|
|
50
|
+
(0, react_1.useEffect)(() => {
|
|
51
|
+
if (!active || !canvas || !videoFx)
|
|
52
|
+
return;
|
|
53
|
+
let time = 0;
|
|
54
|
+
const startRendering = () => {
|
|
55
|
+
if (isRenderingRef.current)
|
|
56
|
+
return;
|
|
57
|
+
const gl = webGLContextManager.getContext(canvas);
|
|
58
|
+
if (!gl) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
glRef.current = gl;
|
|
62
|
+
isRenderingRef.current = true;
|
|
63
|
+
videoFx.prepare(gl);
|
|
64
|
+
const renderFrame = () => {
|
|
65
|
+
if (!isRenderingRef.current || !glRef.current)
|
|
66
|
+
return;
|
|
67
|
+
time += 0.1;
|
|
68
|
+
webGLContextManager.updateContextSize(glRef.current, canvas.width, canvas.height);
|
|
69
|
+
videoFx.setViewport(Math.floor(canvas.width), Math.floor(canvas.height));
|
|
70
|
+
videoFx.setParam('time', time);
|
|
71
|
+
try {
|
|
72
|
+
videoFx.render(glRef.current);
|
|
73
|
+
}
|
|
74
|
+
catch (_a) {
|
|
75
|
+
setIsFXAllowed(false);
|
|
76
|
+
}
|
|
77
|
+
webGLContextManager.renderToCanvas(glRef.current, canvas);
|
|
78
|
+
frameRef.current = requestAnimationFrame(renderFrame);
|
|
79
|
+
};
|
|
80
|
+
frameRef.current = requestAnimationFrame(renderFrame);
|
|
81
|
+
};
|
|
82
|
+
const stopRendering = () => {
|
|
83
|
+
if (!isRenderingRef.current)
|
|
84
|
+
return;
|
|
85
|
+
if (frameRef.current) {
|
|
86
|
+
cancelAnimationFrame(frameRef.current);
|
|
87
|
+
frameRef.current = undefined;
|
|
88
|
+
}
|
|
89
|
+
if (glRef.current) {
|
|
90
|
+
webGLContextManager.releaseContext(canvas);
|
|
91
|
+
glRef.current = null;
|
|
92
|
+
}
|
|
93
|
+
const ctx = canvas.getContext('2d');
|
|
94
|
+
if (ctx) {
|
|
95
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
96
|
+
}
|
|
97
|
+
isRenderingRef.current = false;
|
|
98
|
+
};
|
|
99
|
+
const observer = new IntersectionObserver(([entry]) => {
|
|
100
|
+
if (entry.isIntersecting) {
|
|
101
|
+
startRendering();
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
stopRendering();
|
|
105
|
+
}
|
|
106
|
+
}, {
|
|
107
|
+
threshold: 0,
|
|
108
|
+
rootMargin: '75px'
|
|
109
|
+
});
|
|
110
|
+
observer.observe(canvas);
|
|
111
|
+
return () => {
|
|
112
|
+
stopRendering();
|
|
113
|
+
observer.disconnect();
|
|
114
|
+
};
|
|
115
|
+
}, [canvas, videoFx, active]);
|
|
116
|
+
return isFXAllowed;
|
|
117
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAnchoredItemTop = getAnchoredItemTop;
|
|
4
|
+
const ItemArea_1 = require("../../sdk/types/article/ItemArea");
|
|
5
|
+
function getAnchoredItemTop(top, sectionHeight, anchorSide) {
|
|
6
|
+
const styleTop = `${top * 100}vw`;
|
|
7
|
+
switch (anchorSide) {
|
|
8
|
+
case ItemArea_1.AnchorSide.Center: return `calc(${styleTop} + ${sectionHeight} / 2)`;
|
|
9
|
+
case ItemArea_1.AnchorSide.Bottom: return `calc(${styleTop} + ${sectionHeight})`;
|
|
10
|
+
case ItemArea_1.AnchorSide.Top:
|
|
11
|
+
default:
|
|
12
|
+
return styleTop;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCompoundHeight = getCompoundHeight;
|
|
4
|
+
exports.getCompoundWidth = getCompoundWidth;
|
|
5
|
+
exports.getCompoundTop = getCompoundTop;
|
|
6
|
+
exports.getCompoundLeft = getCompoundLeft;
|
|
7
|
+
exports.getCompoundTransform = getCompoundTransform;
|
|
8
|
+
const ItemArea_1 = require("../../sdk/types/article/ItemArea");
|
|
9
|
+
const positionMatrix = {
|
|
10
|
+
[ItemArea_1.AreaAnchor.TopLeft]: [0, 0],
|
|
11
|
+
[ItemArea_1.AreaAnchor.TopCenter]: [0, 0.5],
|
|
12
|
+
[ItemArea_1.AreaAnchor.TopRight]: [0, 1],
|
|
13
|
+
[ItemArea_1.AreaAnchor.MiddleLeft]: [0.5, 0],
|
|
14
|
+
[ItemArea_1.AreaAnchor.MiddleCenter]: [0.5, 0.5],
|
|
15
|
+
[ItemArea_1.AreaAnchor.MiddleRight]: [0.5, 1],
|
|
16
|
+
[ItemArea_1.AreaAnchor.BottomLeft]: [1, 0],
|
|
17
|
+
[ItemArea_1.AreaAnchor.BottomCenter]: [1, 0.5],
|
|
18
|
+
[ItemArea_1.AreaAnchor.BottomRight]: [1, 1]
|
|
19
|
+
};
|
|
20
|
+
function getCompoundHeight(compoundSettings, height) {
|
|
21
|
+
if (height === undefined || !compoundSettings)
|
|
22
|
+
return;
|
|
23
|
+
if (compoundSettings.heightMode === 'relative') {
|
|
24
|
+
return `${height * 100}%`;
|
|
25
|
+
}
|
|
26
|
+
return `${height * 100}vw`;
|
|
27
|
+
}
|
|
28
|
+
function getCompoundWidth(compoundSettings, width, isRichText, exemplary) {
|
|
29
|
+
if (width === undefined || !compoundSettings)
|
|
30
|
+
return;
|
|
31
|
+
if (compoundSettings.widthMode === 'relative') {
|
|
32
|
+
return `${width * 100}%`;
|
|
33
|
+
}
|
|
34
|
+
return isRichText && exemplary ? `${width * exemplary}px` : `${width * 100}vw`;
|
|
35
|
+
}
|
|
36
|
+
function getCompoundTop(compoundSettings, top) {
|
|
37
|
+
if (top === undefined || !compoundSettings)
|
|
38
|
+
return;
|
|
39
|
+
if (compoundSettings.heightMode === 'relative') {
|
|
40
|
+
return `${top * 100}%`;
|
|
41
|
+
}
|
|
42
|
+
const [ky] = positionMatrix[compoundSettings.positionAnchor];
|
|
43
|
+
return `calc(${ky * 100}% + ${top * 100}vw)`;
|
|
44
|
+
}
|
|
45
|
+
function getCompoundLeft(compoundSettings, left) {
|
|
46
|
+
if (left === undefined || !compoundSettings)
|
|
47
|
+
return;
|
|
48
|
+
if (compoundSettings.widthMode === 'relative') {
|
|
49
|
+
return `${left * 100}%`;
|
|
50
|
+
}
|
|
51
|
+
const [_, kx] = positionMatrix[compoundSettings.positionAnchor];
|
|
52
|
+
return `calc(${kx * 100}% + ${left * 100}vw)`;
|
|
53
|
+
}
|
|
54
|
+
function getCompoundTransform(compoundSettings) {
|
|
55
|
+
if (!compoundSettings)
|
|
56
|
+
return 'unset';
|
|
57
|
+
const areaAnchor = compoundSettings.positionAnchor;
|
|
58
|
+
const [ky, kx] = positionMatrix[areaAnchor];
|
|
59
|
+
return `translate(${kx * (-100)}%, ${ky * (-100)}%)`;
|
|
60
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFill = getFill;
|
|
4
|
+
function getFill(fill) {
|
|
5
|
+
var _a;
|
|
6
|
+
if (fill.type === 'linear-gradient' && Array.isArray(fill.colors)) {
|
|
7
|
+
return `linear-gradient(${fill.angle}deg, ${fill.colors
|
|
8
|
+
.map(c => `${c.value} ${c.position}%`)
|
|
9
|
+
.join(', ')})`;
|
|
10
|
+
}
|
|
11
|
+
if (fill.type === 'radial-gradient' && Array.isArray(fill.colors)) {
|
|
12
|
+
const center = fill.center
|
|
13
|
+
? `${fill.center[0] * 100}% ${fill.center[1] * 100}%`
|
|
14
|
+
: '50% 50%';
|
|
15
|
+
const diameter = fill.diameter;
|
|
16
|
+
return `radial-gradient(circle ${diameter * 100} at ${center}, ${fill.colors
|
|
17
|
+
.map(c => `${c.value} ${c.position}%`)
|
|
18
|
+
.join(', ')})`;
|
|
19
|
+
}
|
|
20
|
+
if (fill.type === 'conic-gradient' && Array.isArray(fill.colors)) {
|
|
21
|
+
const center = fill.center
|
|
22
|
+
? `${fill.center[0] * 100}% ${fill.center[1] * 100}%`
|
|
23
|
+
: '50% 50%';
|
|
24
|
+
const angle = ((_a = fill.angle) !== null && _a !== void 0 ? _a : 0);
|
|
25
|
+
const hasMultipleStops = fill.colors.length > 1;
|
|
26
|
+
const lastStop = fill.colors[fill.colors.length - 1];
|
|
27
|
+
const shouldAppendWrapStop = hasMultipleStops && typeof lastStop.position === 'number' && lastStop.position < 100;
|
|
28
|
+
const colorsWithWrap = shouldAppendWrapStop
|
|
29
|
+
? [...fill.colors, { value: fill.colors[0].value, position: 100 }]
|
|
30
|
+
: fill.colors;
|
|
31
|
+
return `conic-gradient(from ${angle + 90}deg at ${center}, ${colorsWithWrap
|
|
32
|
+
.map(c => `${c.value} ${c.position}%`)
|
|
33
|
+
.join(', ')})`;
|
|
34
|
+
}
|
|
35
|
+
if (fill.type === 'image' && fill.src) {
|
|
36
|
+
return `url(${fill.src})`;
|
|
37
|
+
}
|
|
38
|
+
if (fill.type === 'solid') {
|
|
39
|
+
return fill.value;
|
|
40
|
+
}
|
|
41
|
+
return 'transparent';
|
|
42
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getItemTopStyle = getItemTopStyle;
|
|
4
|
+
const ItemArea_1 = require("../../sdk/types/article/ItemArea");
|
|
5
|
+
function getItemTopStyle(top, anchorSide) {
|
|
6
|
+
const defaultValue = `${top * 100}vw`;
|
|
7
|
+
if (!anchorSide)
|
|
8
|
+
return defaultValue;
|
|
9
|
+
switch (anchorSide) {
|
|
10
|
+
case ItemArea_1.AnchorSide.Top:
|
|
11
|
+
return defaultValue;
|
|
12
|
+
case ItemArea_1.AnchorSide.Center:
|
|
13
|
+
return `calc(50% + ${top * 100}vw)`;
|
|
14
|
+
case ItemArea_1.AnchorSide.Bottom:
|
|
15
|
+
return `calc(100% + ${top * 100}vw)`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStyleFromItemStateAndParams = getStyleFromItemStateAndParams;
|
|
4
|
+
function getStyleFromItemStateAndParams(stateValue, paramsValue) {
|
|
5
|
+
return stateValue !== undefined
|
|
6
|
+
? stateValue
|
|
7
|
+
: paramsValue;
|
|
8
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getYoutubeId = getYoutubeId;
|
|
4
|
+
var Allowed;
|
|
5
|
+
(function (Allowed) {
|
|
6
|
+
Allowed["Tiny"] = "youtu.be";
|
|
7
|
+
Allowed["Full"] = "www.youtube.com";
|
|
8
|
+
})(Allowed || (Allowed = {}));
|
|
9
|
+
function getYoutubeId({ hostname, pathname, search }) {
|
|
10
|
+
if (hostname !== Allowed.Full && hostname !== Allowed.Tiny) {
|
|
11
|
+
throw new Error(`Cannot get valid YouTube ID from "${hostname}" - address is not whitelisted`);
|
|
12
|
+
}
|
|
13
|
+
switch (hostname) {
|
|
14
|
+
case Allowed.Tiny:
|
|
15
|
+
return pathname.replace('/', '');
|
|
16
|
+
case Allowed.Full:
|
|
17
|
+
if (pathname.startsWith('/shorts/')) {
|
|
18
|
+
const shortsId = pathname.split('/shorts/')[1];
|
|
19
|
+
if (!shortsId) {
|
|
20
|
+
throw new Error('Cannot get valid YouTube Shorts ID from the pathname.');
|
|
21
|
+
}
|
|
22
|
+
return shortsId;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
const searchParams = new URLSearchParams(search);
|
|
26
|
+
const id = searchParams.get('v');
|
|
27
|
+
if (!id) {
|
|
28
|
+
throw new Error('Cannot get valid YouTube ID from search params.');
|
|
29
|
+
}
|
|
30
|
+
return id;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rangeMap = rangeMap;
|
|
4
|
+
function rangeMap(n, start1, stop1, start2, stop2, withinBounds = false) {
|
|
5
|
+
const mapped = (n - start1) / (stop1 - start1) * (stop2 - start2) + start2;
|
|
6
|
+
if (withinBounds && n < start1)
|
|
7
|
+
return start2;
|
|
8
|
+
if (withinBounds && n > stop1)
|
|
9
|
+
return stop2;
|
|
10
|
+
return mapped;
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useElementRect = useElementRect;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
function useElementRect(element) {
|
|
6
|
+
const [rect, setRect] = (0, react_1.useState)(() => element === null || element === void 0 ? void 0 : element.getBoundingClientRect());
|
|
7
|
+
(0, react_1.useEffect)(() => {
|
|
8
|
+
if (!element)
|
|
9
|
+
return;
|
|
10
|
+
const observer = new ResizeObserver(entries => {
|
|
11
|
+
const el = entries.find(entry => entry.target === element);
|
|
12
|
+
if (!el) {
|
|
13
|
+
throw new Error('Element is not found in observed entries');
|
|
14
|
+
}
|
|
15
|
+
setRect(el.target.getBoundingClientRect());
|
|
16
|
+
});
|
|
17
|
+
observer.observe(element);
|
|
18
|
+
return () => {
|
|
19
|
+
observer.unobserve(element);
|
|
20
|
+
observer.disconnect();
|
|
21
|
+
};
|
|
22
|
+
}, [element]);
|
|
23
|
+
return rect;
|
|
24
|
+
}
|
package/lib/utils.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLayoutStyles = getLayoutStyles;
|
|
4
|
+
exports.getLayoutMediaQuery = getLayoutMediaQuery;
|
|
5
|
+
function getLayoutStyles(layouts, layoutValues, mapToStyles) {
|
|
6
|
+
const mediaQueries = layouts
|
|
7
|
+
.sort((a, b) => a.startsWith - b.startsWith)
|
|
8
|
+
.reduce((acc, layout) => {
|
|
9
|
+
const values = layoutValues.map(lv => lv[layout.id]);
|
|
10
|
+
return `
|
|
11
|
+
${acc}
|
|
12
|
+
${layout.startsWith !== 0
|
|
13
|
+
? `@media (min-width: ${layout.startsWith}px) {${mapToStyles(values, layout.exemplary)}}`
|
|
14
|
+
: `${mapToStyles(values, layout.exemplary)}`}`;
|
|
15
|
+
}, '');
|
|
16
|
+
return mediaQueries;
|
|
17
|
+
}
|
|
18
|
+
function getLayoutMediaQuery(layoutId, layouts) {
|
|
19
|
+
const sorted = layouts.slice().sort((a, b) => a.startsWith - b.startsWith);
|
|
20
|
+
const layoutIndex = sorted.findIndex(l => l.id === layoutId);
|
|
21
|
+
if (layoutIndex === -1) {
|
|
22
|
+
throw new Error(`No layout was found by the given id #${layoutId}`);
|
|
23
|
+
}
|
|
24
|
+
const current = sorted[layoutIndex];
|
|
25
|
+
const next = sorted[layoutIndex + 1];
|
|
26
|
+
if (!next) {
|
|
27
|
+
return `@media (min-width: ${current.startsWith}px)`;
|
|
28
|
+
}
|
|
29
|
+
return `@media (min-width: ${current.startsWith}px) and (max-width: ${next.startsWith - 1}px)`;
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,36 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gxpl/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Generic SDK for use in public websites.",
|
|
5
|
-
"main": "
|
|
6
|
-
"
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"style": "dist/sdk.css",
|
|
9
|
-
"sideEffects": [
|
|
10
|
-
"**/*.css"
|
|
11
|
-
],
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"import": "./dist/index.mjs",
|
|
16
|
-
"require": "./dist/index.js"
|
|
17
|
-
},
|
|
18
|
-
"./style/sdk.css": {
|
|
19
|
-
"default": "./dist/sdk.css"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
22
7
|
"scripts": {
|
|
23
8
|
"test": "jest",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"build": "vite build && tsc --project tsconfig.build.json",
|
|
9
|
+
"prebuild": "rimraf ./lib",
|
|
10
|
+
"build": "tsc --project tsconfig.build.json",
|
|
27
11
|
"prepublishOnly": "cross-env NODE_ENV=production npm run build"
|
|
28
12
|
},
|
|
29
13
|
"bin": {
|
|
30
|
-
"gxpl-sdk": "
|
|
14
|
+
"gxpl-sdk": "lib/cli.js"
|
|
31
15
|
},
|
|
32
16
|
"files": [
|
|
33
|
-
"
|
|
17
|
+
"lib",
|
|
34
18
|
"resources"
|
|
35
19
|
],
|
|
36
20
|
"repository": {
|
|
@@ -44,17 +28,21 @@
|
|
|
44
28
|
},
|
|
45
29
|
"homepage": "https://github.com/genesisxplatform/sdk#readme",
|
|
46
30
|
"directories": {
|
|
47
|
-
"lib": "
|
|
31
|
+
"lib": "lib"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"next": "^14.2.33"
|
|
48
35
|
},
|
|
49
36
|
"dependencies": {
|
|
50
37
|
"@antfu/eslint-config": "^3.16.0",
|
|
51
38
|
"@cntrl-site/color": "^1.0.0",
|
|
39
|
+
"@cntrl-site/components": "^0.0.2",
|
|
52
40
|
"@cntrl-site/effects": "^1.4.0",
|
|
53
|
-
"@splidejs/react-splide": "^0.7.12",
|
|
54
41
|
"@testing-library/jest-dom": "^6.4.8",
|
|
55
42
|
"@testing-library/react": "^16.0.0",
|
|
56
43
|
"@types/ejs": "^3.1.2",
|
|
57
44
|
"@types/isomorphic-fetch": "^0.0.36",
|
|
45
|
+
"@types/lodash.isequal": "^4.5.8",
|
|
58
46
|
"@types/ua-parser-js": "^0.7.39",
|
|
59
47
|
"@types/vimeo__player": "^2.18.3",
|
|
60
48
|
"@vimeo/player": "^2.25.0",
|
|
@@ -64,7 +52,9 @@
|
|
|
64
52
|
"ejs": "^3.1.9",
|
|
65
53
|
"html-react-parser": "^3.0.1",
|
|
66
54
|
"isomorphic-fetch": "^3.0.0",
|
|
55
|
+
"lodash.isequal": "^4.5.0",
|
|
67
56
|
"mp4box": "^0.5.2",
|
|
57
|
+
"next": "^14.2.33",
|
|
68
58
|
"resize-observer-polyfill": "^1.5.1",
|
|
69
59
|
"styled-jsx": "^5.0.2",
|
|
70
60
|
"ts-node": "^10.9.1",
|
|
@@ -83,8 +73,6 @@
|
|
|
83
73
|
"cross-env": "^10.1.0",
|
|
84
74
|
"jest": "^29.7.0",
|
|
85
75
|
"jest-environment-jsdom": "^29.7.0",
|
|
86
|
-
"react": "^18.2.0",
|
|
87
|
-
"react-dom": "^18.2.0",
|
|
88
76
|
"rimraf": "^6.0.1",
|
|
89
77
|
"sass": "^1.86.3",
|
|
90
78
|
"ts-jest": "^29.0.3",
|