@gxpl/sdk 0.0.19 → 0.0.20
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/lib/index.d.ts +1 -0
- package/lib/sdk/schemas/article/Article.schema.d.ts +6 -6
- package/lib/sdk/schemas/article/ItemBase.schema.d.ts +4 -44
- package/lib/sdk/schemas/article/ItemBase.schema.js +1 -8
- package/lib/sdk/schemas/article/RichTextItem.schema.d.ts +2 -27
- package/lib/sdk/schemas/article/Section.schema.d.ts +6 -6
- package/lib/sdk/schemas/project/Project.schema.d.ts +1102 -4
- package/lib/sdk/schemas/project/Project.schema.js +27 -2
- package/lib/sdk/types/article/Item.d.ts +4 -0
- package/lib/sdk/types/project/FixedLayer.d.ts +27 -0
- package/lib/sdk/types/project/FixedLayer.js +2 -0
- package/lib/sdk/types/project/Project.d.ts +3 -0
- package/lib/sdk-nextjs/components/Page.js +3 -2
- package/lib/sdk-nextjs/components/fixedLayers/FixedLayer.d.ts +8 -0
- package/lib/sdk-nextjs/components/fixedLayers/FixedLayer.js +34 -0
- package/lib/sdk-nextjs/components/items/CompoundItem/CompoundChild.d.ts +1 -0
- package/lib/sdk-nextjs/components/items/CompoundItem/CompoundChild.js +2 -2
- package/lib/sdk-nextjs/components/items/GroupItem/GroupItem.js +2 -2
- package/lib/sdk-nextjs/components/items/Item.d.ts +2 -0
- package/lib/sdk-nextjs/components/items/Item.js +3 -3
- package/lib/sdk-nextjs/fixedLayers/FixedLayerTransitionsProvider.d.ts +10 -0
- package/lib/sdk-nextjs/fixedLayers/FixedLayerTransitionsProvider.js +41 -0
- package/lib/sdk-nextjs/fixedLayers/FixedLayerTransitionsRegistry.d.ts +38 -0
- package/lib/sdk-nextjs/fixedLayers/FixedLayerTransitionsRegistry.js +164 -0
- package/lib/sdk-nextjs/interactions/useItemInteractionCtrl.d.ts +1 -1
- package/lib/sdk-nextjs/interactions/useItemInteractionCtrl.js +5 -2
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export type { ItemArea } from './sdk/types/article/ItemArea';
|
|
|
14
14
|
export type { ItemState, ItemStateParams, StateParams, ItemStatesMap } from './sdk/types/article/ItemState';
|
|
15
15
|
export type { Interaction, InteractionItemTrigger, InteractionScrollTrigger, InteractionState } from './sdk/types/article/Interaction';
|
|
16
16
|
export type { Project } from './sdk/types/project/Project';
|
|
17
|
+
export type { TFixedLayer, FixedLayerTransition, TransitionTiming } from './sdk/types/project/FixedLayer';
|
|
17
18
|
export type { Meta } from './sdk/types/project/Meta';
|
|
18
19
|
export type { KeyframeValueMap, KeyframeAny } from './sdk/types/keyframe/Keyframe';
|
|
19
20
|
export type { CompoundSettings } from './sdk/types/article/CompoundSettings';
|
|
@@ -29,17 +29,17 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
29
29
|
position: z.ZodString;
|
|
30
30
|
offsetX: z.ZodNullable<z.ZodNumber>;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
play: "on-click" | "auto";
|
|
32
33
|
url: string;
|
|
33
34
|
coverUrl: string | null;
|
|
34
|
-
play: "on-click" | "auto";
|
|
35
35
|
position: string;
|
|
36
36
|
type: "video";
|
|
37
37
|
size: string;
|
|
38
38
|
offsetX: number | null;
|
|
39
39
|
}, {
|
|
40
|
+
play: "on-click" | "auto";
|
|
40
41
|
url: string;
|
|
41
42
|
coverUrl: string | null;
|
|
42
|
-
play: "on-click" | "auto";
|
|
43
43
|
position: string;
|
|
44
44
|
type: "video";
|
|
45
45
|
size: string;
|
|
@@ -75,9 +75,9 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
75
75
|
items: import("../../..").ItemAny[];
|
|
76
76
|
name?: string | undefined;
|
|
77
77
|
media?: {
|
|
78
|
+
play: "on-click" | "auto";
|
|
78
79
|
url: string;
|
|
79
80
|
coverUrl: string | null;
|
|
80
|
-
play: "on-click" | "auto";
|
|
81
81
|
position: string;
|
|
82
82
|
type: "video";
|
|
83
83
|
size: string;
|
|
@@ -101,9 +101,9 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
101
101
|
items: import("../../..").ItemAny[];
|
|
102
102
|
name?: string | undefined;
|
|
103
103
|
media?: {
|
|
104
|
+
play: "on-click" | "auto";
|
|
104
105
|
url: string;
|
|
105
106
|
coverUrl: string | null;
|
|
106
|
-
play: "on-click" | "auto";
|
|
107
107
|
position: string;
|
|
108
108
|
type: "video";
|
|
109
109
|
size: string;
|
|
@@ -232,9 +232,9 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
232
232
|
items: import("../../..").ItemAny[];
|
|
233
233
|
name?: string | undefined;
|
|
234
234
|
media?: {
|
|
235
|
+
play: "on-click" | "auto";
|
|
235
236
|
url: string;
|
|
236
237
|
coverUrl: string | null;
|
|
237
|
-
play: "on-click" | "auto";
|
|
238
238
|
position: string;
|
|
239
239
|
type: "video";
|
|
240
240
|
size: string;
|
|
@@ -283,9 +283,9 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
283
283
|
items: import("../../..").ItemAny[];
|
|
284
284
|
name?: string | undefined;
|
|
285
285
|
media?: {
|
|
286
|
+
play: "on-click" | "auto";
|
|
286
287
|
url: string;
|
|
287
288
|
coverUrl: string | null;
|
|
288
|
-
play: "on-click" | "auto";
|
|
289
289
|
position: string;
|
|
290
290
|
type: "video";
|
|
291
291
|
size: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AreaAnchor, DimensionMode } from '../../types/article/ItemArea';
|
|
3
|
-
export declare const Link: z.
|
|
3
|
+
export declare const Link: z.ZodObject<{
|
|
4
4
|
url: z.ZodString;
|
|
5
5
|
target: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -9,22 +9,7 @@ export declare const Link: z.ZodUnion<[z.ZodObject<{
|
|
|
9
9
|
}, {
|
|
10
10
|
url: string;
|
|
11
11
|
target: string;
|
|
12
|
-
}
|
|
13
|
-
value: z.ZodString;
|
|
14
|
-
animation: z.ZodEnum<["fade", "slide", "reveal"]>;
|
|
15
|
-
duration: z.ZodNumber;
|
|
16
|
-
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
value: string;
|
|
19
|
-
duration: number;
|
|
20
|
-
animation: "slide" | "fade" | "reveal";
|
|
21
|
-
direction: "north" | "east" | "south" | "west";
|
|
22
|
-
}, {
|
|
23
|
-
value: string;
|
|
24
|
-
duration: number;
|
|
25
|
-
animation: "slide" | "fade" | "reveal";
|
|
26
|
-
direction: "north" | "east" | "south" | "west";
|
|
27
|
-
}>]>;
|
|
12
|
+
}>;
|
|
28
13
|
export declare const CompoundSettingsSchema: z.ZodObject<{
|
|
29
14
|
positionAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
|
|
30
15
|
widthMode: z.ZodNativeEnum<typeof DimensionMode>;
|
|
@@ -75,7 +60,7 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
75
60
|
anchorSide?: import("../../types/article/ItemArea").AnchorSide | undefined;
|
|
76
61
|
}>;
|
|
77
62
|
hidden: z.ZodBoolean;
|
|
78
|
-
link: z.ZodOptional<z.
|
|
63
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
79
64
|
url: z.ZodString;
|
|
80
65
|
target: z.ZodString;
|
|
81
66
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -84,22 +69,7 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
84
69
|
}, {
|
|
85
70
|
url: string;
|
|
86
71
|
target: string;
|
|
87
|
-
}
|
|
88
|
-
value: z.ZodString;
|
|
89
|
-
animation: z.ZodEnum<["fade", "slide", "reveal"]>;
|
|
90
|
-
duration: z.ZodNumber;
|
|
91
|
-
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
92
|
-
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
value: string;
|
|
94
|
-
duration: number;
|
|
95
|
-
animation: "slide" | "fade" | "reveal";
|
|
96
|
-
direction: "north" | "east" | "south" | "west";
|
|
97
|
-
}, {
|
|
98
|
-
value: string;
|
|
99
|
-
duration: number;
|
|
100
|
-
animation: "slide" | "fade" | "reveal";
|
|
101
|
-
direction: "north" | "east" | "south" | "west";
|
|
102
|
-
}>]>>;
|
|
72
|
+
}>>;
|
|
103
73
|
compoundSettings: z.ZodOptional<z.ZodObject<{
|
|
104
74
|
positionAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
|
|
105
75
|
widthMode: z.ZodNativeEnum<typeof DimensionMode>;
|
|
@@ -131,11 +101,6 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
131
101
|
link?: {
|
|
132
102
|
url: string;
|
|
133
103
|
target: string;
|
|
134
|
-
} | {
|
|
135
|
-
value: string;
|
|
136
|
-
duration: number;
|
|
137
|
-
animation: "slide" | "fade" | "reveal";
|
|
138
|
-
direction: "north" | "east" | "south" | "west";
|
|
139
104
|
} | undefined;
|
|
140
105
|
compoundSettings?: {
|
|
141
106
|
positionAnchor: AreaAnchor;
|
|
@@ -160,11 +125,6 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
160
125
|
link?: {
|
|
161
126
|
url: string;
|
|
162
127
|
target: string;
|
|
163
|
-
} | {
|
|
164
|
-
value: string;
|
|
165
|
-
duration: number;
|
|
166
|
-
animation: "slide" | "fade" | "reveal";
|
|
167
|
-
direction: "north" | "east" | "south" | "west";
|
|
168
128
|
} | undefined;
|
|
169
129
|
compoundSettings?: {
|
|
170
130
|
positionAnchor: AreaAnchor;
|
|
@@ -4,17 +4,10 @@ exports.ItemBaseSchema = exports.CompoundSettingsSchema = exports.Link = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const ItemArea_schema_1 = require("./ItemArea.schema");
|
|
6
6
|
const ItemArea_1 = require("../../types/article/ItemArea");
|
|
7
|
-
|
|
7
|
+
exports.Link = zod_1.z.object({
|
|
8
8
|
url: zod_1.z.string().min(1),
|
|
9
9
|
target: zod_1.z.string().min(1)
|
|
10
10
|
});
|
|
11
|
-
const ClickLinkSchema = zod_1.z.object({
|
|
12
|
-
value: zod_1.z.string().min(1),
|
|
13
|
-
animation: zod_1.z.enum(['fade', 'slide', 'reveal']),
|
|
14
|
-
duration: zod_1.z.number(),
|
|
15
|
-
direction: zod_1.z.enum(['north', 'west', 'south', 'east'])
|
|
16
|
-
});
|
|
17
|
-
exports.Link = zod_1.z.union([UrlLinkSchema, ClickLinkSchema]);
|
|
18
11
|
exports.CompoundSettingsSchema = zod_1.z.object({
|
|
19
12
|
positionAnchor: zod_1.z.nativeEnum(ItemArea_1.AreaAnchor),
|
|
20
13
|
widthMode: zod_1.z.nativeEnum(ItemArea_1.DimensionMode),
|
|
@@ -71,7 +71,7 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
71
71
|
anchorSide?: import("../../..").AnchorSide | undefined;
|
|
72
72
|
}>;
|
|
73
73
|
hidden: z.ZodBoolean;
|
|
74
|
-
link: z.ZodOptional<z.
|
|
74
|
+
link: z.ZodOptional<z.ZodObject<{
|
|
75
75
|
url: z.ZodString;
|
|
76
76
|
target: z.ZodString;
|
|
77
77
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -80,22 +80,7 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
80
80
|
}, {
|
|
81
81
|
url: string;
|
|
82
82
|
target: string;
|
|
83
|
-
}
|
|
84
|
-
value: z.ZodString;
|
|
85
|
-
animation: z.ZodEnum<["fade", "slide", "reveal"]>;
|
|
86
|
-
duration: z.ZodNumber;
|
|
87
|
-
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
88
|
-
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
value: string;
|
|
90
|
-
duration: number;
|
|
91
|
-
animation: "slide" | "fade" | "reveal";
|
|
92
|
-
direction: "north" | "east" | "south" | "west";
|
|
93
|
-
}, {
|
|
94
|
-
value: string;
|
|
95
|
-
duration: number;
|
|
96
|
-
animation: "slide" | "fade" | "reveal";
|
|
97
|
-
direction: "north" | "east" | "south" | "west";
|
|
98
|
-
}>]>>;
|
|
83
|
+
}>>;
|
|
99
84
|
compoundSettings: z.ZodOptional<z.ZodObject<{
|
|
100
85
|
positionAnchor: z.ZodNativeEnum<typeof import("../../..").AreaAnchor>;
|
|
101
86
|
widthMode: z.ZodNativeEnum<typeof import("../../..").DimensionMode>;
|
|
@@ -1183,11 +1168,6 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
1183
1168
|
link?: {
|
|
1184
1169
|
url: string;
|
|
1185
1170
|
target: string;
|
|
1186
|
-
} | {
|
|
1187
|
-
value: string;
|
|
1188
|
-
duration: number;
|
|
1189
|
-
animation: "slide" | "fade" | "reveal";
|
|
1190
|
-
direction: "north" | "east" | "south" | "west";
|
|
1191
1171
|
} | undefined;
|
|
1192
1172
|
compoundSettings?: {
|
|
1193
1173
|
positionAnchor: import("../../..").AreaAnchor;
|
|
@@ -1375,11 +1355,6 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
1375
1355
|
link?: {
|
|
1376
1356
|
url: string;
|
|
1377
1357
|
target: string;
|
|
1378
|
-
} | {
|
|
1379
|
-
value: string;
|
|
1380
|
-
duration: number;
|
|
1381
|
-
animation: "slide" | "fade" | "reveal";
|
|
1382
|
-
direction: "north" | "east" | "south" | "west";
|
|
1383
1358
|
} | undefined;
|
|
1384
1359
|
compoundSettings?: {
|
|
1385
1360
|
positionAnchor: import("../../..").AreaAnchor;
|
|
@@ -22,17 +22,17 @@ export declare const SectionMediaSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
|
|
|
22
22
|
position: z.ZodString;
|
|
23
23
|
offsetX: z.ZodNullable<z.ZodNumber>;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
play: "on-click" | "auto";
|
|
25
26
|
url: string;
|
|
26
27
|
coverUrl: string | null;
|
|
27
|
-
play: "on-click" | "auto";
|
|
28
28
|
position: string;
|
|
29
29
|
type: "video";
|
|
30
30
|
size: string;
|
|
31
31
|
offsetX: number | null;
|
|
32
32
|
}, {
|
|
33
|
+
play: "on-click" | "auto";
|
|
33
34
|
url: string;
|
|
34
35
|
coverUrl: string | null;
|
|
35
|
-
play: "on-click" | "auto";
|
|
36
36
|
position: string;
|
|
37
37
|
type: "video";
|
|
38
38
|
size: string;
|
|
@@ -84,17 +84,17 @@ export declare const SectionSchema: z.ZodObject<{
|
|
|
84
84
|
position: z.ZodString;
|
|
85
85
|
offsetX: z.ZodNullable<z.ZodNumber>;
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
play: "on-click" | "auto";
|
|
87
88
|
url: string;
|
|
88
89
|
coverUrl: string | null;
|
|
89
|
-
play: "on-click" | "auto";
|
|
90
90
|
position: string;
|
|
91
91
|
type: "video";
|
|
92
92
|
size: string;
|
|
93
93
|
offsetX: number | null;
|
|
94
94
|
}, {
|
|
95
|
+
play: "on-click" | "auto";
|
|
95
96
|
url: string;
|
|
96
97
|
coverUrl: string | null;
|
|
97
|
-
play: "on-click" | "auto";
|
|
98
98
|
position: string;
|
|
99
99
|
type: "video";
|
|
100
100
|
size: string;
|
|
@@ -130,9 +130,9 @@ export declare const SectionSchema: z.ZodObject<{
|
|
|
130
130
|
items: import("../../..").ItemAny[];
|
|
131
131
|
name?: string | undefined;
|
|
132
132
|
media?: {
|
|
133
|
+
play: "on-click" | "auto";
|
|
133
134
|
url: string;
|
|
134
135
|
coverUrl: string | null;
|
|
135
|
-
play: "on-click" | "auto";
|
|
136
136
|
position: string;
|
|
137
137
|
type: "video";
|
|
138
138
|
size: string;
|
|
@@ -156,9 +156,9 @@ export declare const SectionSchema: z.ZodObject<{
|
|
|
156
156
|
items: import("../../..").ItemAny[];
|
|
157
157
|
name?: string | undefined;
|
|
158
158
|
media?: {
|
|
159
|
+
play: "on-click" | "auto";
|
|
159
160
|
url: string;
|
|
160
161
|
coverUrl: string | null;
|
|
161
|
-
play: "on-click" | "auto";
|
|
162
162
|
position: string;
|
|
163
163
|
type: "video";
|
|
164
164
|
size: string;
|