@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.
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +32 -22
- package/dist/index.js +5086 -52
- package/dist/index.mjs +5088 -54
- package/dist/{Components → sdk/Components}/ControlSlider/ControlSlider.d.ts +1 -2
- package/dist/{Components → sdk/Components}/ImageRevealSlider/ImageRevealSlider.d.ts +1 -2
- package/dist/sdk/FontFaceGenerator/FontFaceGenerator.test.d.ts +1 -0
- package/dist/{schemas → sdk/schemas}/article/Article.schema.d.ts +12 -12
- package/dist/{schemas → sdk/schemas}/article/RichTextItem.schema.d.ts +30 -30
- package/dist/{schemas → sdk/schemas}/article/Section.schema.d.ts +3 -3
- package/dist/sdk-nextjs/common/useCurrentLayout.d.ts +6 -0
- package/dist/sdk-nextjs/common/useExemplary.d.ts +1 -0
- package/dist/sdk-nextjs/common/useItemFXData.d.ts +8 -0
- package/dist/sdk-nextjs/common/useKeyframeValue.d.ts +8 -0
- package/dist/sdk-nextjs/common/useRegisterResize.d.ts +1 -0
- package/dist/sdk-nextjs/components/Article.d.ts +9 -0
- package/dist/sdk-nextjs/components/ArticleWrapper.d.ts +2 -0
- package/dist/sdk-nextjs/components/Head.d.ts +9 -0
- package/dist/sdk-nextjs/components/LayoutStyle.d.ts +9 -0
- package/dist/sdk-nextjs/components/Page.d.ts +15 -0
- package/dist/sdk-nextjs/components/ScrollPlaybackVideo.d.ts +14 -0
- package/dist/sdk-nextjs/components/Section/Section.d.ts +11 -0
- package/dist/sdk-nextjs/components/Section/SectionImage.d.ts +14 -0
- package/dist/sdk-nextjs/components/Section/SectionVideo.d.ts +17 -0
- package/dist/sdk-nextjs/components/Section/useSectionColor.d.ts +4 -0
- package/dist/sdk-nextjs/components/Section/useSectionHeightMap.d.ts +3 -0
- package/dist/sdk-nextjs/components/items/CodeEmbedItem/CodeEmbedItem.d.ts +5 -0
- package/dist/sdk-nextjs/components/items/CodeEmbedItem/useCodeEmbedItem.d.ts +7 -0
- package/dist/sdk-nextjs/components/items/ComponentItem/ComponentItem.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/ComponentItem/useComponentItem.d.ts +5 -0
- package/dist/sdk-nextjs/components/items/CompoundItem/CompoundChild.d.ts +9 -0
- package/dist/sdk-nextjs/components/items/CompoundItem/CompoundItem.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/CompoundItem/useCompoundItem.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/CustomItem/CustomItem.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/EmbedVideoItem/VimeoEmbed.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/EmbedVideoItem/YoutubeEmbed.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/EmbedVideoItem/useEmbedVideoItem.d.ts +6 -0
- package/dist/sdk-nextjs/components/items/FileItem/ImageItem.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/FileItem/VideoItem.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/FileItem/useFileItem.d.ts +8 -0
- package/dist/sdk-nextjs/components/items/GroupItem/GroupItem.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/GroupItem/useGroupItem.d.ts +5 -0
- package/dist/sdk-nextjs/components/items/Item.d.ts +20 -0
- package/dist/sdk-nextjs/components/items/LinkWrapper.d.ts +8 -0
- package/dist/sdk-nextjs/components/items/RectangleItem/RectangleItem.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/RectangleItem/useRectangleItem.d.ts +9 -0
- package/dist/sdk-nextjs/components/items/RichTextItem/RichTextItem.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/RichTextItem/useRichTextItem.d.ts +3 -0
- package/dist/sdk-nextjs/components/items/RichTextWrapper.d.ts +7 -0
- package/dist/sdk-nextjs/components/items/itemsMap.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/useDraggable.d.ts +17 -0
- package/dist/sdk-nextjs/components/items/useItemAngle.d.ts +2 -0
- package/dist/sdk-nextjs/components/items/useItemArea.d.ts +12 -0
- package/dist/sdk-nextjs/components/items/useItemPointerEvents.d.ts +4 -0
- package/dist/sdk-nextjs/components/items/useItemScale.d.ts +2 -0
- package/dist/sdk-nextjs/components/items/useItemTriggers.d.ts +6 -0
- package/dist/sdk-nextjs/components/items/useRichTextItemValues.d.ts +9 -0
- package/dist/sdk-nextjs/components/items/useSizing.d.ts +8 -0
- package/dist/sdk-nextjs/components/items/useStickyItemTop.d.ts +2 -0
- package/dist/sdk-nextjs/components/useLayoutContext.d.ts +1 -0
- package/dist/sdk-nextjs/interactions/CSSPropertyNameMap.d.ts +4 -0
- package/dist/sdk-nextjs/interactions/InteractionsRegistry.d.ts +39 -0
- package/dist/sdk-nextjs/interactions/ItemInteractionCtrl.d.ts +21 -0
- package/dist/sdk-nextjs/interactions/getTransition.d.ts +9 -0
- package/dist/sdk-nextjs/interactions/types.d.ts +34 -0
- package/dist/sdk-nextjs/interactions/useItemInteractionCtrl.d.ts +2 -0
- package/dist/sdk-nextjs/provider/ArticleRectContext.d.ts +2 -0
- package/dist/sdk-nextjs/provider/CntrlContext.d.ts +2 -0
- package/dist/sdk-nextjs/provider/CntrlProvider.d.ts +2 -0
- package/dist/sdk-nextjs/provider/CntrlSdkContext.d.ts +31 -0
- package/dist/sdk-nextjs/provider/CustomItemRegistry.d.ts +6 -0
- package/dist/sdk-nextjs/provider/CustomItemTypes.d.ts +2 -0
- package/dist/sdk-nextjs/provider/CustomSectionRegistry.d.ts +15 -0
- package/dist/sdk-nextjs/provider/InteractionsContext.d.ts +10 -0
- package/dist/sdk-nextjs/provider/Keyframes.d.ts +6 -0
- package/dist/sdk-nextjs/provider/KeyframesContext.d.ts +2 -0
- package/dist/sdk-nextjs/provider/LayoutContext.d.ts +1 -0
- package/dist/sdk-nextjs/provider/WebGLContextManagerContext.d.ts +2 -0
- package/dist/sdk-nextjs/provider/defaultContext.d.ts +2 -0
- package/dist/sdk-nextjs/provider/useCntrlContext.d.ts +2 -0
- package/dist/sdk-nextjs/utils/Animator/Animator.d.ts +43 -0
- package/dist/sdk-nextjs/utils/ArticleRectManager/ArticleRectObserver.d.ts +25 -0
- package/dist/sdk-nextjs/utils/ArticleRectManager/useArticleRectObserver.d.ts +2 -0
- package/dist/sdk-nextjs/utils/ArticleRectManager/useSectionRegistry.d.ts +1 -0
- package/dist/sdk-nextjs/utils/EventEmitter.d.ts +11 -0
- package/dist/sdk-nextjs/utils/RichTextConverter/RichTextConverter.d.ts +11 -0
- package/dist/sdk-nextjs/utils/ScaleAnchorMap.d.ts +11 -0
- package/dist/sdk-nextjs/utils/StickyManager/StickyManager.d.ts +10 -0
- package/dist/sdk-nextjs/utils/Youtube/YouTubeIframeApiLoader.d.ts +10 -0
- package/dist/sdk-nextjs/utils/Youtube/YoutubeIframeApi.d.ts +89 -0
- package/dist/sdk-nextjs/utils/Youtube/useYouTubeIframeApi.d.ts +2 -0
- package/dist/sdk-nextjs/utils/areFillsVisible/areFillsVisible.d.ts +23 -0
- package/dist/sdk-nextjs/utils/binSearchInsertAt.d.ts +5 -0
- package/dist/sdk-nextjs/utils/castObject.d.ts +5 -0
- package/dist/sdk-nextjs/utils/checkOverflowClipSupport.d.ts +1 -0
- package/dist/sdk-nextjs/utils/effects/useImageFx.d.ts +7 -0
- package/dist/sdk-nextjs/utils/effects/useVideoFx.d.ts +7 -0
- package/dist/sdk-nextjs/utils/getAnchoredItemTop.d.ts +2 -0
- package/dist/sdk-nextjs/utils/getCompoundBoundaryStyles.d.ts +12 -0
- package/dist/sdk-nextjs/utils/getFill.d.ts +2 -0
- package/dist/sdk-nextjs/utils/getFontFamilyValue.d.ts +1 -0
- package/dist/sdk-nextjs/utils/getInvertedRanges.d.ts +10 -0
- package/dist/sdk-nextjs/utils/getItemTopStyle.d.ts +2 -0
- package/dist/sdk-nextjs/utils/getStyleFromItemStateAndParams.d.ts +1 -0
- package/dist/sdk-nextjs/utils/getValidYoutubeUrl.d.ts +1 -0
- package/dist/sdk-nextjs/utils/isItemType.d.ts +3 -0
- package/dist/sdk-nextjs/utils/rangeMap.d.ts +1 -0
- package/dist/sdk-nextjs/utils/useElementRect.d.ts +1 -0
- package/dist/sdk.css +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +27 -9
- /package/dist/{Client → sdk/Client}/Client.d.ts +0 -0
- /package/dist/{Client → sdk/Client}/Client.js +0 -0
- /package/dist/{FontFaceGenerator/FontFaceGenerator.test.d.ts → sdk/Client/Client.test.d.ts} +0 -0
- /package/dist/{Client → sdk/Client}/__mock__/articleMock.d.ts +0 -0
- /package/dist/{Client → sdk/Client}/__mock__/keyframesMock.d.ts +0 -0
- /package/dist/{Client → sdk/Client}/__mock__/projectMock.d.ts +0 -0
- /package/dist/{Components → sdk/Components}/ControlSlider/ControlSliderComponent.d.ts +0 -0
- /package/dist/{Components → sdk/Components}/ImageRevealSlider/ControlImageRevealSliderComponent.d.ts +0 -0
- /package/dist/{Components → sdk/Components}/components.d.ts +0 -0
- /package/dist/{Components → sdk/Components}/helpers/RichTextRenderer/RichTextRenderer.d.ts +0 -0
- /package/dist/{Components → sdk/Components}/helpers/SvgImage/SvgImage.d.ts +0 -0
- /package/dist/{Components → sdk/Components}/utils/scalingValue.d.ts +0 -0
- /package/dist/{FontFaceGenerator → sdk/FontFaceGenerator}/FontFaceGenerator.d.ts +0 -0
- /package/dist/{ScrollPlaybackVideoManager → sdk/ScrollPlaybackVideoManager}/ScrollPlaybackVideoManager.d.ts +0 -0
- /package/dist/{VideoDecoder → sdk/VideoDecoder}/VideoDecoder.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/article/Article.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/article/FillLayer.schema.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/article/FillLayer.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/article/Interaction.schema.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/article/Interaction.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/article/Item.schema.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/article/Item.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/article/ItemArea.schema.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/article/ItemArea.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/article/ItemBase.schema.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/article/ItemBase.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/article/ItemState.schema.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/article/ItemState.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/article/RichTextItem.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/article/Section.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/keyframe/Keyframes.schema.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/keyframe/Keyframes.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/project/Layout.schema.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/project/Layout.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/project/Project.schema.d.ts +0 -0
- /package/dist/{schemas → sdk/schemas}/project/Project.schema.js +0 -0
- /package/dist/{schemas → sdk/schemas}/shared/FillLayer.schema.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/Article.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/Article.js +0 -0
- /package/dist/{types → sdk/types}/article/ArticleItemType.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/ArticleItemType.js +0 -0
- /package/dist/{types → sdk/types}/article/CompoundSettings.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/CompoundSettings.js +0 -0
- /package/dist/{types → sdk/types}/article/FX.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/FX.js +0 -0
- /package/dist/{types → sdk/types}/article/Interaction.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/Interaction.js +0 -0
- /package/dist/{types → sdk/types}/article/Item.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/Item.js +0 -0
- /package/dist/{types → sdk/types}/article/ItemArea.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/ItemArea.js +0 -0
- /package/dist/{types → sdk/types}/article/ItemState.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/ItemState.js +0 -0
- /package/dist/{types → sdk/types}/article/RichText.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/RichText.js +0 -0
- /package/dist/{types → sdk/types}/article/Section.d.ts +0 -0
- /package/dist/{types → sdk/types}/article/Section.js +0 -0
- /package/dist/{types → sdk/types}/component/Component.d.ts +0 -0
- /package/dist/{types → sdk/types}/keyframe/Keyframe.d.ts +0 -0
- /package/dist/{types → sdk/types}/keyframe/Keyframe.js +0 -0
- /package/dist/{types → sdk/types}/project/Fonts.d.ts +0 -0
- /package/dist/{types → sdk/types}/project/Fonts.js +0 -0
- /package/dist/{types → sdk/types}/project/Layout.d.ts +0 -0
- /package/dist/{types → sdk/types}/project/Layout.js +0 -0
- /package/dist/{types → sdk/types}/project/Meta.d.ts +0 -0
- /package/dist/{types → sdk/types}/project/Meta.js +0 -0
- /package/dist/{types → sdk/types}/project/Page.d.ts +0 -0
- /package/dist/{types → sdk/types}/project/Page.js +0 -0
- /package/dist/{types → sdk/types}/project/Project.d.ts +0 -0
- /package/dist/{types → sdk/types}/project/Project.js +0 -0
- /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):
|
|
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):
|
|
37
|
+
export declare function ImageRevealSlider({ settings, content, isEditor }: ImageRevealSliderProps): import("react/jsx-runtime").JSX.Element;
|
|
39
38
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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('
|
|
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('
|
|
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('
|
|
13
|
+
mode: import('../../..').SectionHeightMode;
|
|
14
14
|
units: number;
|
|
15
15
|
vhUnits?: number | undefined;
|
|
16
16
|
}, {
|
|
17
|
-
mode: import('
|
|
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('
|
|
73
|
+
mode: import('../../..').SectionHeightMode;
|
|
74
74
|
units: number;
|
|
75
75
|
vhUnits?: number | undefined;
|
|
76
76
|
}>;
|
|
77
|
-
items: import('
|
|
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('
|
|
100
|
+
mode: import('../../..').SectionHeightMode;
|
|
101
101
|
units: number;
|
|
102
102
|
vhUnits?: number | undefined;
|
|
103
103
|
}>;
|
|
104
|
-
items: import('
|
|
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('
|
|
232
|
+
mode: import('../../..').SectionHeightMode;
|
|
233
233
|
units: number;
|
|
234
234
|
vhUnits?: number | undefined;
|
|
235
235
|
}>;
|
|
236
|
-
items: import('
|
|
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('
|
|
284
|
+
mode: import('../../..').SectionHeightMode;
|
|
285
285
|
units: number;
|
|
286
286
|
vhUnits?: number | undefined;
|
|
287
287
|
}>;
|
|
288
|
-
items: import('
|
|
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('
|
|
46
|
+
anchorSide: z.ZodOptional<z.ZodNativeEnum<typeof import('../../..').AnchorSide>>;
|
|
47
47
|
scale: z.ZodNumber;
|
|
48
|
-
positionType: z.ZodNativeEnum<typeof import('
|
|
49
|
-
scaleAnchor: z.ZodNativeEnum<typeof import('
|
|
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('
|
|
59
|
-
scaleAnchor: import('
|
|
60
|
-
anchorSide?: import('
|
|
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('
|
|
70
|
-
scaleAnchor: import('
|
|
71
|
-
anchorSide?: import('
|
|
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('
|
|
86
|
-
widthMode: z.ZodNativeEnum<typeof import('
|
|
87
|
-
heightMode: z.ZodNativeEnum<typeof import('
|
|
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('
|
|
90
|
-
widthMode: import('
|
|
91
|
-
heightMode: import('
|
|
89
|
+
positionAnchor: import('../../..').AreaAnchor;
|
|
90
|
+
widthMode: import('../../..').DimensionMode;
|
|
91
|
+
heightMode: import('../../..').DimensionMode;
|
|
92
92
|
}, {
|
|
93
|
-
positionAnchor: import('
|
|
94
|
-
widthMode: import('
|
|
95
|
-
heightMode: import('
|
|
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('
|
|
1007
|
-
scaleAnchor: import('
|
|
1008
|
-
anchorSide?: import('
|
|
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('
|
|
1180
|
-
widthMode: import('
|
|
1181
|
-
heightMode: import('
|
|
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('
|
|
1196
|
-
scaleAnchor: import('
|
|
1197
|
-
anchorSide?: import('
|
|
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('
|
|
1369
|
-
widthMode: import('
|
|
1370
|
-
heightMode: import('
|
|
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('
|
|
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('
|
|
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('
|
|
159
|
+
items: import('../../..').ItemAny[];
|
|
160
160
|
name?: string | undefined;
|
|
161
161
|
media?: Record<string, {
|
|
162
162
|
url: string;
|
|
@@ -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,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,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,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,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,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,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,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 {};
|