@gxpl/sdk 0.0.54 → 0.0.57
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/sdk/schemas/article/ItemBase.schema.d.ts +180 -10
- package/lib/sdk/schemas/article/ItemBase.schema.js +26 -8
- package/lib/sdk/schemas/article/RichTextItem.schema.d.ts +76 -6
- package/lib/sdk/schemas/project/Project.schema.d.ts +46 -11
- package/lib/sdk/schemas/project/Project.schema.js +14 -3
- package/lib/sdk/transitions/transitionMachine.d.ts +104 -0
- package/lib/sdk/transitions/transitionMachine.js +19 -17
- package/lib/sdk/transitions/utils/getInstantTransitionParams.d.ts +36 -0
- package/lib/sdk/transitions/utils/getInstantTransitionParams.js +29 -0
- package/lib/sdk/transitions/utils/getScenesOnEnd.d.ts +13 -0
- package/lib/sdk/transitions/utils/getScenesOnEnd.js +22 -0
- package/lib/sdk/transitions/utils/getScenesOnInstantTransition.js +26 -3
- package/lib/sdk/transitions/utils/getScenesOnProgressUpdate.d.ts +13 -0
- package/lib/sdk/transitions/utils/getScenesOnProgressUpdate.js +7 -0
- package/lib/sdk/transitions/utils/getScenesOnStart.d.ts +1 -0
- package/lib/sdk/transitions/utils/getScenesOnStart.js +24 -4
- package/lib/sdk/transitions/utils/getTransitionFromLink.d.ts +23 -0
- package/lib/sdk/transitions/utils/getTransitionFromLink.js +31 -0
- package/lib/sdk/transitions/utils/getTransitionFromRelation.d.ts +17 -0
- package/lib/sdk/transitions/utils/getTransitionFromRelation.js +26 -0
- package/lib/sdk/transitions/utils/getTransitionParams.d.ts +20 -0
- package/lib/sdk/transitions/utils/getTransitionParams.js +29 -0
- package/lib/sdk/transitions/utils/types.d.ts +56 -14
- package/lib/sdk/types/article/Item.d.ts +16 -3
- package/lib/sdk/types/project/Relation.d.ts +19 -4
- package/lib/sdk-nextjs/components/Preview/Preview.js +4 -7
- package/lib/sdk-nextjs/components/Preview/PreviewListener.js +2 -8
- package/lib/sdk-nextjs/components/Scene.d.ts +1 -0
- package/lib/sdk-nextjs/components/Scene.js +8 -5
- package/lib/sdk-nextjs/components/items/LinkWrapper.js +3 -7
- package/lib/sdk-nextjs/provider/TransitionMachineContext.d.ts +384 -0
- package/lib/sdk-nextjs/utils/RichTextConverter/RichTextConverter.d.ts +1 -0
- package/lib/sdk-nextjs/utils/RichTextConverter/RichTextConverter.js +31 -8
- package/package.json +1 -1
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AreaAnchor, DimensionMode } from '../../types/article/ItemArea';
|
|
3
|
+
export declare const SceneLinkSchema: z.ZodDiscriminatedUnion<"animation", [z.ZodObject<{
|
|
4
|
+
animation: z.ZodLiteral<"fade">;
|
|
5
|
+
type: z.ZodLiteral<"scene">;
|
|
6
|
+
duration: z.ZodNumber;
|
|
7
|
+
value: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
value: string;
|
|
10
|
+
type: "scene";
|
|
11
|
+
duration: number;
|
|
12
|
+
animation: "fade";
|
|
13
|
+
}, {
|
|
14
|
+
value: string;
|
|
15
|
+
type: "scene";
|
|
16
|
+
duration: number;
|
|
17
|
+
animation: "fade";
|
|
18
|
+
}>, z.ZodObject<{
|
|
19
|
+
animation: z.ZodLiteral<"slide">;
|
|
20
|
+
type: z.ZodLiteral<"scene">;
|
|
21
|
+
duration: z.ZodNumber;
|
|
22
|
+
value: z.ZodString;
|
|
23
|
+
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
value: string;
|
|
26
|
+
type: "scene";
|
|
27
|
+
duration: number;
|
|
28
|
+
animation: "slide";
|
|
29
|
+
direction: "north" | "east" | "south" | "west";
|
|
30
|
+
}, {
|
|
31
|
+
value: string;
|
|
32
|
+
type: "scene";
|
|
33
|
+
duration: number;
|
|
34
|
+
animation: "slide";
|
|
35
|
+
direction: "north" | "east" | "south" | "west";
|
|
36
|
+
}>, z.ZodObject<{
|
|
37
|
+
animation: z.ZodLiteral<"reveal">;
|
|
38
|
+
type: z.ZodLiteral<"scene">;
|
|
39
|
+
duration: z.ZodNumber;
|
|
40
|
+
value: z.ZodString;
|
|
41
|
+
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
42
|
+
offset: z.ZodNumber;
|
|
43
|
+
mode: z.ZodEnum<["normal", "reverse"]>;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
value: string;
|
|
46
|
+
type: "scene";
|
|
47
|
+
duration: number;
|
|
48
|
+
animation: "reveal";
|
|
49
|
+
direction: "north" | "east" | "south" | "west";
|
|
50
|
+
offset: number;
|
|
51
|
+
mode: "normal" | "reverse";
|
|
52
|
+
}, {
|
|
53
|
+
value: string;
|
|
54
|
+
type: "scene";
|
|
55
|
+
duration: number;
|
|
56
|
+
animation: "reveal";
|
|
57
|
+
direction: "north" | "east" | "south" | "west";
|
|
58
|
+
offset: number;
|
|
59
|
+
mode: "normal" | "reverse";
|
|
60
|
+
}>]>;
|
|
3
61
|
export declare const Link: z.ZodUnion<[z.ZodObject<{
|
|
4
62
|
url: z.ZodString;
|
|
5
63
|
target: z.ZodString;
|
|
@@ -9,22 +67,64 @@ export declare const Link: z.ZodUnion<[z.ZodObject<{
|
|
|
9
67
|
}, {
|
|
10
68
|
url: string;
|
|
11
69
|
target: string;
|
|
70
|
+
}>, z.ZodDiscriminatedUnion<"animation", [z.ZodObject<{
|
|
71
|
+
animation: z.ZodLiteral<"fade">;
|
|
72
|
+
type: z.ZodLiteral<"scene">;
|
|
73
|
+
duration: z.ZodNumber;
|
|
74
|
+
value: z.ZodString;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
value: string;
|
|
77
|
+
type: "scene";
|
|
78
|
+
duration: number;
|
|
79
|
+
animation: "fade";
|
|
80
|
+
}, {
|
|
81
|
+
value: string;
|
|
82
|
+
type: "scene";
|
|
83
|
+
duration: number;
|
|
84
|
+
animation: "fade";
|
|
12
85
|
}>, z.ZodObject<{
|
|
86
|
+
animation: z.ZodLiteral<"slide">;
|
|
87
|
+
type: z.ZodLiteral<"scene">;
|
|
88
|
+
duration: z.ZodNumber;
|
|
13
89
|
value: z.ZodString;
|
|
14
|
-
|
|
90
|
+
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
value: string;
|
|
93
|
+
type: "scene";
|
|
94
|
+
duration: number;
|
|
95
|
+
animation: "slide";
|
|
96
|
+
direction: "north" | "east" | "south" | "west";
|
|
97
|
+
}, {
|
|
98
|
+
value: string;
|
|
99
|
+
type: "scene";
|
|
100
|
+
duration: number;
|
|
101
|
+
animation: "slide";
|
|
102
|
+
direction: "north" | "east" | "south" | "west";
|
|
103
|
+
}>, z.ZodObject<{
|
|
104
|
+
animation: z.ZodLiteral<"reveal">;
|
|
105
|
+
type: z.ZodLiteral<"scene">;
|
|
15
106
|
duration: z.ZodNumber;
|
|
107
|
+
value: z.ZodString;
|
|
16
108
|
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
109
|
+
offset: z.ZodNumber;
|
|
110
|
+
mode: z.ZodEnum<["normal", "reverse"]>;
|
|
17
111
|
}, "strip", z.ZodTypeAny, {
|
|
18
112
|
value: string;
|
|
113
|
+
type: "scene";
|
|
19
114
|
duration: number;
|
|
20
|
-
animation: "
|
|
115
|
+
animation: "reveal";
|
|
21
116
|
direction: "north" | "east" | "south" | "west";
|
|
117
|
+
offset: number;
|
|
118
|
+
mode: "normal" | "reverse";
|
|
22
119
|
}, {
|
|
23
120
|
value: string;
|
|
121
|
+
type: "scene";
|
|
24
122
|
duration: number;
|
|
25
|
-
animation: "
|
|
123
|
+
animation: "reveal";
|
|
26
124
|
direction: "north" | "east" | "south" | "west";
|
|
27
|
-
|
|
125
|
+
offset: number;
|
|
126
|
+
mode: "normal" | "reverse";
|
|
127
|
+
}>]>]>;
|
|
28
128
|
export declare const CompoundSettingsSchema: z.ZodObject<{
|
|
29
129
|
positionAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
|
|
30
130
|
widthMode: z.ZodNativeEnum<typeof DimensionMode>;
|
|
@@ -84,22 +184,64 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
84
184
|
}, {
|
|
85
185
|
url: string;
|
|
86
186
|
target: string;
|
|
187
|
+
}>, z.ZodDiscriminatedUnion<"animation", [z.ZodObject<{
|
|
188
|
+
animation: z.ZodLiteral<"fade">;
|
|
189
|
+
type: z.ZodLiteral<"scene">;
|
|
190
|
+
duration: z.ZodNumber;
|
|
191
|
+
value: z.ZodString;
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
value: string;
|
|
194
|
+
type: "scene";
|
|
195
|
+
duration: number;
|
|
196
|
+
animation: "fade";
|
|
197
|
+
}, {
|
|
198
|
+
value: string;
|
|
199
|
+
type: "scene";
|
|
200
|
+
duration: number;
|
|
201
|
+
animation: "fade";
|
|
87
202
|
}>, z.ZodObject<{
|
|
203
|
+
animation: z.ZodLiteral<"slide">;
|
|
204
|
+
type: z.ZodLiteral<"scene">;
|
|
205
|
+
duration: z.ZodNumber;
|
|
88
206
|
value: z.ZodString;
|
|
89
|
-
|
|
207
|
+
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
value: string;
|
|
210
|
+
type: "scene";
|
|
211
|
+
duration: number;
|
|
212
|
+
animation: "slide";
|
|
213
|
+
direction: "north" | "east" | "south" | "west";
|
|
214
|
+
}, {
|
|
215
|
+
value: string;
|
|
216
|
+
type: "scene";
|
|
217
|
+
duration: number;
|
|
218
|
+
animation: "slide";
|
|
219
|
+
direction: "north" | "east" | "south" | "west";
|
|
220
|
+
}>, z.ZodObject<{
|
|
221
|
+
animation: z.ZodLiteral<"reveal">;
|
|
222
|
+
type: z.ZodLiteral<"scene">;
|
|
90
223
|
duration: z.ZodNumber;
|
|
224
|
+
value: z.ZodString;
|
|
91
225
|
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
226
|
+
offset: z.ZodNumber;
|
|
227
|
+
mode: z.ZodEnum<["normal", "reverse"]>;
|
|
92
228
|
}, "strip", z.ZodTypeAny, {
|
|
93
229
|
value: string;
|
|
230
|
+
type: "scene";
|
|
94
231
|
duration: number;
|
|
95
|
-
animation: "
|
|
232
|
+
animation: "reveal";
|
|
96
233
|
direction: "north" | "east" | "south" | "west";
|
|
234
|
+
offset: number;
|
|
235
|
+
mode: "normal" | "reverse";
|
|
97
236
|
}, {
|
|
98
237
|
value: string;
|
|
238
|
+
type: "scene";
|
|
99
239
|
duration: number;
|
|
100
|
-
animation: "
|
|
240
|
+
animation: "reveal";
|
|
101
241
|
direction: "north" | "east" | "south" | "west";
|
|
102
|
-
|
|
242
|
+
offset: number;
|
|
243
|
+
mode: "normal" | "reverse";
|
|
244
|
+
}>]>]>>;
|
|
103
245
|
compoundSettings: z.ZodOptional<z.ZodObject<{
|
|
104
246
|
positionAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
|
|
105
247
|
widthMode: z.ZodNativeEnum<typeof DimensionMode>;
|
|
@@ -133,9 +275,23 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
133
275
|
target: string;
|
|
134
276
|
} | {
|
|
135
277
|
value: string;
|
|
278
|
+
type: "scene";
|
|
279
|
+
duration: number;
|
|
280
|
+
animation: "fade";
|
|
281
|
+
} | {
|
|
282
|
+
value: string;
|
|
283
|
+
type: "scene";
|
|
136
284
|
duration: number;
|
|
137
|
-
animation: "slide"
|
|
285
|
+
animation: "slide";
|
|
138
286
|
direction: "north" | "east" | "south" | "west";
|
|
287
|
+
} | {
|
|
288
|
+
value: string;
|
|
289
|
+
type: "scene";
|
|
290
|
+
duration: number;
|
|
291
|
+
animation: "reveal";
|
|
292
|
+
direction: "north" | "east" | "south" | "west";
|
|
293
|
+
offset: number;
|
|
294
|
+
mode: "normal" | "reverse";
|
|
139
295
|
} | undefined;
|
|
140
296
|
compoundSettings?: {
|
|
141
297
|
positionAnchor: AreaAnchor;
|
|
@@ -162,9 +318,23 @@ export declare const ItemBaseSchema: z.ZodObject<{
|
|
|
162
318
|
target: string;
|
|
163
319
|
} | {
|
|
164
320
|
value: string;
|
|
321
|
+
type: "scene";
|
|
322
|
+
duration: number;
|
|
323
|
+
animation: "fade";
|
|
324
|
+
} | {
|
|
325
|
+
value: string;
|
|
326
|
+
type: "scene";
|
|
327
|
+
duration: number;
|
|
328
|
+
animation: "slide";
|
|
329
|
+
direction: "north" | "east" | "south" | "west";
|
|
330
|
+
} | {
|
|
331
|
+
value: string;
|
|
332
|
+
type: "scene";
|
|
165
333
|
duration: number;
|
|
166
|
-
animation: "
|
|
334
|
+
animation: "reveal";
|
|
167
335
|
direction: "north" | "east" | "south" | "west";
|
|
336
|
+
offset: number;
|
|
337
|
+
mode: "normal" | "reverse";
|
|
168
338
|
} | undefined;
|
|
169
339
|
compoundSettings?: {
|
|
170
340
|
positionAnchor: AreaAnchor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ItemBaseSchema = exports.CompoundSettingsSchema = exports.Link = void 0;
|
|
3
|
+
exports.ItemBaseSchema = exports.CompoundSettingsSchema = exports.Link = exports.SceneLinkSchema = 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");
|
|
@@ -8,13 +8,31 @@ const UrlLinkSchema = 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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
exports.SceneLinkSchema = zod_1.z.discriminatedUnion('animation', [
|
|
12
|
+
zod_1.z.object({
|
|
13
|
+
animation: zod_1.z.literal('fade'),
|
|
14
|
+
type: zod_1.z.literal('scene'),
|
|
15
|
+
duration: zod_1.z.number(),
|
|
16
|
+
value: zod_1.z.string()
|
|
17
|
+
}),
|
|
18
|
+
zod_1.z.object({
|
|
19
|
+
animation: zod_1.z.literal('slide'),
|
|
20
|
+
type: zod_1.z.literal('scene'),
|
|
21
|
+
duration: zod_1.z.number(),
|
|
22
|
+
value: zod_1.z.string(),
|
|
23
|
+
direction: zod_1.z.enum(['north', 'west', 'south', 'east'])
|
|
24
|
+
}),
|
|
25
|
+
zod_1.z.object({
|
|
26
|
+
animation: zod_1.z.literal('reveal'),
|
|
27
|
+
type: zod_1.z.literal('scene'),
|
|
28
|
+
duration: zod_1.z.number(),
|
|
29
|
+
value: zod_1.z.string(),
|
|
30
|
+
direction: zod_1.z.enum(['north', 'west', 'south', 'east']),
|
|
31
|
+
offset: zod_1.z.number(),
|
|
32
|
+
mode: zod_1.z.enum(['normal', 'reverse'])
|
|
33
|
+
})
|
|
34
|
+
]);
|
|
35
|
+
exports.Link = zod_1.z.union([UrlLinkSchema, exports.SceneLinkSchema]);
|
|
18
36
|
exports.CompoundSettingsSchema = zod_1.z.object({
|
|
19
37
|
positionAnchor: zod_1.z.nativeEnum(ItemArea_1.AreaAnchor),
|
|
20
38
|
widthMode: zod_1.z.nativeEnum(ItemArea_1.DimensionMode),
|
|
@@ -80,22 +80,64 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
80
80
|
}, {
|
|
81
81
|
url: string;
|
|
82
82
|
target: string;
|
|
83
|
+
}>, z.ZodDiscriminatedUnion<"animation", [z.ZodObject<{
|
|
84
|
+
animation: z.ZodLiteral<"fade">;
|
|
85
|
+
type: z.ZodLiteral<"scene">;
|
|
86
|
+
duration: z.ZodNumber;
|
|
87
|
+
value: z.ZodString;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
value: string;
|
|
90
|
+
type: "scene";
|
|
91
|
+
duration: number;
|
|
92
|
+
animation: "fade";
|
|
93
|
+
}, {
|
|
94
|
+
value: string;
|
|
95
|
+
type: "scene";
|
|
96
|
+
duration: number;
|
|
97
|
+
animation: "fade";
|
|
83
98
|
}>, z.ZodObject<{
|
|
99
|
+
animation: z.ZodLiteral<"slide">;
|
|
100
|
+
type: z.ZodLiteral<"scene">;
|
|
101
|
+
duration: z.ZodNumber;
|
|
84
102
|
value: z.ZodString;
|
|
85
|
-
|
|
103
|
+
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
value: string;
|
|
106
|
+
type: "scene";
|
|
107
|
+
duration: number;
|
|
108
|
+
animation: "slide";
|
|
109
|
+
direction: "north" | "east" | "south" | "west";
|
|
110
|
+
}, {
|
|
111
|
+
value: string;
|
|
112
|
+
type: "scene";
|
|
113
|
+
duration: number;
|
|
114
|
+
animation: "slide";
|
|
115
|
+
direction: "north" | "east" | "south" | "west";
|
|
116
|
+
}>, z.ZodObject<{
|
|
117
|
+
animation: z.ZodLiteral<"reveal">;
|
|
118
|
+
type: z.ZodLiteral<"scene">;
|
|
86
119
|
duration: z.ZodNumber;
|
|
120
|
+
value: z.ZodString;
|
|
87
121
|
direction: z.ZodEnum<["north", "west", "south", "east"]>;
|
|
122
|
+
offset: z.ZodNumber;
|
|
123
|
+
mode: z.ZodEnum<["normal", "reverse"]>;
|
|
88
124
|
}, "strip", z.ZodTypeAny, {
|
|
89
125
|
value: string;
|
|
126
|
+
type: "scene";
|
|
90
127
|
duration: number;
|
|
91
|
-
animation: "
|
|
128
|
+
animation: "reveal";
|
|
92
129
|
direction: "north" | "east" | "south" | "west";
|
|
130
|
+
offset: number;
|
|
131
|
+
mode: "normal" | "reverse";
|
|
93
132
|
}, {
|
|
94
133
|
value: string;
|
|
134
|
+
type: "scene";
|
|
95
135
|
duration: number;
|
|
96
|
-
animation: "
|
|
136
|
+
animation: "reveal";
|
|
97
137
|
direction: "north" | "east" | "south" | "west";
|
|
98
|
-
|
|
138
|
+
offset: number;
|
|
139
|
+
mode: "normal" | "reverse";
|
|
140
|
+
}>]>]>>;
|
|
99
141
|
compoundSettings: z.ZodOptional<z.ZodObject<{
|
|
100
142
|
positionAnchor: z.ZodNativeEnum<typeof import("../../..").AreaAnchor>;
|
|
101
143
|
widthMode: z.ZodNativeEnum<typeof import("../../..").DimensionMode>;
|
|
@@ -1185,9 +1227,23 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
1185
1227
|
target: string;
|
|
1186
1228
|
} | {
|
|
1187
1229
|
value: string;
|
|
1230
|
+
type: "scene";
|
|
1188
1231
|
duration: number;
|
|
1189
|
-
animation: "
|
|
1232
|
+
animation: "fade";
|
|
1233
|
+
} | {
|
|
1234
|
+
value: string;
|
|
1235
|
+
type: "scene";
|
|
1236
|
+
duration: number;
|
|
1237
|
+
animation: "slide";
|
|
1190
1238
|
direction: "north" | "east" | "south" | "west";
|
|
1239
|
+
} | {
|
|
1240
|
+
value: string;
|
|
1241
|
+
type: "scene";
|
|
1242
|
+
duration: number;
|
|
1243
|
+
animation: "reveal";
|
|
1244
|
+
direction: "north" | "east" | "south" | "west";
|
|
1245
|
+
offset: number;
|
|
1246
|
+
mode: "normal" | "reverse";
|
|
1191
1247
|
} | undefined;
|
|
1192
1248
|
compoundSettings?: {
|
|
1193
1249
|
positionAnchor: import("../../..").AreaAnchor;
|
|
@@ -1377,9 +1433,23 @@ export declare const RichTextItemSchema: z.ZodObject<{
|
|
|
1377
1433
|
target: string;
|
|
1378
1434
|
} | {
|
|
1379
1435
|
value: string;
|
|
1436
|
+
type: "scene";
|
|
1437
|
+
duration: number;
|
|
1438
|
+
animation: "fade";
|
|
1439
|
+
} | {
|
|
1440
|
+
value: string;
|
|
1441
|
+
type: "scene";
|
|
1442
|
+
duration: number;
|
|
1443
|
+
animation: "slide";
|
|
1444
|
+
direction: "north" | "east" | "south" | "west";
|
|
1445
|
+
} | {
|
|
1446
|
+
value: string;
|
|
1447
|
+
type: "scene";
|
|
1380
1448
|
duration: number;
|
|
1381
|
-
animation: "
|
|
1449
|
+
animation: "reveal";
|
|
1382
1450
|
direction: "north" | "east" | "south" | "west";
|
|
1451
|
+
offset: number;
|
|
1452
|
+
mode: "normal" | "reverse";
|
|
1383
1453
|
} | undefined;
|
|
1384
1454
|
compoundSettings?: {
|
|
1385
1455
|
positionAnchor: import("../../..").AreaAnchor;
|
|
@@ -414,22 +414,43 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
414
414
|
id: string;
|
|
415
415
|
articleId: string;
|
|
416
416
|
}>, "many">;
|
|
417
|
-
relations: z.ZodArray<z.ZodObject<{
|
|
417
|
+
relations: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
418
418
|
from: z.ZodString;
|
|
419
419
|
to: z.ZodString;
|
|
420
|
-
type: z.ZodEnum<["slide", "fade"]>;
|
|
421
420
|
direction: z.ZodEnum<["north", "east", "south", "west"]>;
|
|
422
421
|
}, "strip", z.ZodTypeAny, {
|
|
423
|
-
type: "slide" | "fade";
|
|
424
422
|
direction: "north" | "east" | "south" | "west";
|
|
425
423
|
from: string;
|
|
426
424
|
to: string;
|
|
427
425
|
}, {
|
|
428
|
-
type: "slide" | "fade";
|
|
429
426
|
direction: "north" | "east" | "south" | "west";
|
|
430
427
|
from: string;
|
|
431
428
|
to: string;
|
|
432
|
-
}>, "
|
|
429
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
430
|
+
type: z.ZodLiteral<"slide">;
|
|
431
|
+
}, "strip", z.ZodTypeAny, {
|
|
432
|
+
type: "slide";
|
|
433
|
+
}, {
|
|
434
|
+
type: "slide";
|
|
435
|
+
}>, z.ZodObject<{
|
|
436
|
+
type: z.ZodLiteral<"fade">;
|
|
437
|
+
}, "strip", z.ZodTypeAny, {
|
|
438
|
+
type: "fade";
|
|
439
|
+
}, {
|
|
440
|
+
type: "fade";
|
|
441
|
+
}>, z.ZodObject<{
|
|
442
|
+
type: z.ZodLiteral<"reveal">;
|
|
443
|
+
offset: z.ZodNumber;
|
|
444
|
+
mode: z.ZodEnum<["normal", "reverse"]>;
|
|
445
|
+
}, "strip", z.ZodTypeAny, {
|
|
446
|
+
type: "reveal";
|
|
447
|
+
offset: number;
|
|
448
|
+
mode: "normal" | "reverse";
|
|
449
|
+
}, {
|
|
450
|
+
type: "reveal";
|
|
451
|
+
offset: number;
|
|
452
|
+
mode: "normal" | "reverse";
|
|
453
|
+
}>]>>, "many">;
|
|
433
454
|
foreground: z.ZodObject<{
|
|
434
455
|
id: z.ZodString;
|
|
435
456
|
items: z.ZodArray<z.ZodType<import("../../..").ItemAny, z.ZodTypeDef, import("../../..").ItemAny>, "many">;
|
|
@@ -1056,12 +1077,19 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
1056
1077
|
id: string;
|
|
1057
1078
|
articleId: string;
|
|
1058
1079
|
}[];
|
|
1059
|
-
relations: {
|
|
1060
|
-
type: "slide" | "fade";
|
|
1080
|
+
relations: ({
|
|
1061
1081
|
direction: "north" | "east" | "south" | "west";
|
|
1062
1082
|
from: string;
|
|
1063
1083
|
to: string;
|
|
1064
|
-
}
|
|
1084
|
+
} & ({
|
|
1085
|
+
type: "slide";
|
|
1086
|
+
} | {
|
|
1087
|
+
type: "fade";
|
|
1088
|
+
} | {
|
|
1089
|
+
type: "reveal";
|
|
1090
|
+
offset: number;
|
|
1091
|
+
mode: "normal" | "reverse";
|
|
1092
|
+
}))[];
|
|
1065
1093
|
foreground: {
|
|
1066
1094
|
color: string | null;
|
|
1067
1095
|
hidden: boolean;
|
|
@@ -1208,12 +1236,19 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
1208
1236
|
id: string;
|
|
1209
1237
|
articleId: string;
|
|
1210
1238
|
}[];
|
|
1211
|
-
relations: {
|
|
1212
|
-
type: "slide" | "fade";
|
|
1239
|
+
relations: ({
|
|
1213
1240
|
direction: "north" | "east" | "south" | "west";
|
|
1214
1241
|
from: string;
|
|
1215
1242
|
to: string;
|
|
1216
|
-
}
|
|
1243
|
+
} & ({
|
|
1244
|
+
type: "slide";
|
|
1245
|
+
} | {
|
|
1246
|
+
type: "fade";
|
|
1247
|
+
} | {
|
|
1248
|
+
type: "reveal";
|
|
1249
|
+
offset: number;
|
|
1250
|
+
mode: "normal" | "reverse";
|
|
1251
|
+
}))[];
|
|
1217
1252
|
foreground: {
|
|
1218
1253
|
color: string | null;
|
|
1219
1254
|
hidden: boolean;
|
|
@@ -67,9 +67,20 @@ exports.ProjectSchema = zod_1.z.object({
|
|
|
67
67
|
relations: zod_1.z.array(zod_1.z.object({
|
|
68
68
|
from: zod_1.z.string().min(1),
|
|
69
69
|
to: zod_1.z.string().min(1),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
direction: zod_1.z.enum(['north', 'east', 'south', 'west']),
|
|
71
|
+
}).and(zod_1.z.discriminatedUnion('type', [
|
|
72
|
+
zod_1.z.object({
|
|
73
|
+
type: zod_1.z.literal('slide'),
|
|
74
|
+
}),
|
|
75
|
+
zod_1.z.object({
|
|
76
|
+
type: zod_1.z.literal('fade'),
|
|
77
|
+
}),
|
|
78
|
+
zod_1.z.object({
|
|
79
|
+
type: zod_1.z.literal('reveal'),
|
|
80
|
+
offset: zod_1.z.number(),
|
|
81
|
+
mode: zod_1.z.enum(['normal', 'reverse'])
|
|
82
|
+
})
|
|
83
|
+
]))),
|
|
73
84
|
foreground: exports.FixedLayerSchema,
|
|
74
85
|
background: exports.FixedLayerSchema
|
|
75
86
|
});
|