@gxpl/sdk 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/Client/Client.d.ts +32 -0
  4. package/dist/Client/Client.js +128 -0
  5. package/dist/Client/Client.test.d.ts +1 -0
  6. package/dist/Client/__mock__/articleMock.d.ts +2 -0
  7. package/dist/Client/__mock__/keyframesMock.d.ts +2 -0
  8. package/dist/Client/__mock__/projectMock.d.ts +2 -0
  9. package/dist/Components/ControlSlider/ControlSlider.d.ts +91 -0
  10. package/dist/Components/ControlSlider/ControlSliderComponent.d.ts +519 -0
  11. package/dist/Components/ImageRevealSlider/ControlImageRevealSliderComponent.d.ts +209 -0
  12. package/dist/Components/ImageRevealSlider/ImageRevealSlider.d.ts +39 -0
  13. package/dist/Components/components.d.ts +2 -0
  14. package/dist/Components/helpers/RichTextRenderer/RichTextRenderer.d.ts +6 -0
  15. package/dist/Components/helpers/SvgImage/SvgImage.d.ts +9 -0
  16. package/dist/Components/utils/scalingValue.d.ts +1 -0
  17. package/dist/FontFaceGenerator/FontFaceGenerator.d.ts +6 -0
  18. package/dist/FontFaceGenerator/FontFaceGenerator.test.d.ts +1 -0
  19. package/dist/ScrollPlaybackVideoManager/ScrollPlaybackVideoManager.d.ts +31 -0
  20. package/dist/VideoDecoder/VideoDecoder.d.ts +12 -0
  21. package/dist/cli.d.ts +10 -0
  22. package/dist/cli.js +64 -0
  23. package/dist/index.d.ts +23 -0
  24. package/dist/index.js +2730 -0
  25. package/dist/index.mjs +2713 -0
  26. package/dist/schemas/article/Article.schema.d.ts +328 -0
  27. package/dist/schemas/article/Article.schema.js +11 -0
  28. package/dist/schemas/article/FillLayer.schema.d.ts +186 -0
  29. package/dist/schemas/article/FillLayer.schema.js +53 -0
  30. package/dist/schemas/article/Interaction.schema.d.ts +103 -0
  31. package/dist/schemas/article/Interaction.schema.js +30 -0
  32. package/dist/schemas/article/Item.schema.d.ts +40 -0
  33. package/dist/schemas/article/Item.schema.js +242 -0
  34. package/dist/schemas/article/ItemArea.schema.d.ts +36 -0
  35. package/dist/schemas/article/ItemArea.schema.js +17 -0
  36. package/dist/schemas/article/ItemBase.schema.d.ts +137 -0
  37. package/dist/schemas/article/ItemBase.schema.js +23 -0
  38. package/dist/schemas/article/ItemState.schema.d.ts +15723 -0
  39. package/dist/schemas/article/ItemState.schema.js +75 -0
  40. package/dist/schemas/article/RichTextItem.schema.d.ts +1372 -0
  41. package/dist/schemas/article/RichTextItem.schema.js +60 -0
  42. package/dist/schemas/article/Section.schema.d.ts +176 -0
  43. package/dist/schemas/article/Section.schema.js +38 -0
  44. package/dist/schemas/keyframe/Keyframes.schema.d.ts +2000 -0
  45. package/dist/schemas/keyframe/Keyframes.schema.js +116 -0
  46. package/dist/schemas/project/Layout.schema.d.ts +17 -0
  47. package/dist/schemas/project/Layout.schema.js +10 -0
  48. package/dist/schemas/project/Project.schema.d.ts +253 -0
  49. package/dist/schemas/project/Project.schema.js +48 -0
  50. package/dist/schemas/shared/FillLayer.schema.d.ts +186 -0
  51. package/dist/sdk.css +1 -0
  52. package/dist/types/article/Article.d.ts +7 -0
  53. package/dist/types/article/Article.js +2 -0
  54. package/dist/types/article/ArticleItemType.d.ts +13 -0
  55. package/dist/types/article/ArticleItemType.js +17 -0
  56. package/dist/types/article/CompoundSettings.d.ts +6 -0
  57. package/dist/types/article/CompoundSettings.js +2 -0
  58. package/dist/types/article/FX.d.ts +23 -0
  59. package/dist/types/article/FX.js +2 -0
  60. package/dist/types/article/Interaction.d.ts +28 -0
  61. package/dist/types/article/Interaction.js +2 -0
  62. package/dist/types/article/Item.d.ts +250 -0
  63. package/dist/types/article/Item.js +3 -0
  64. package/dist/types/article/ItemArea.d.ts +36 -0
  65. package/dist/types/article/ItemArea.js +31 -0
  66. package/dist/types/article/ItemState.d.ts +78 -0
  67. package/dist/types/article/ItemState.js +3 -0
  68. package/dist/types/article/RichText.d.ts +40 -0
  69. package/dist/types/article/RichText.js +27 -0
  70. package/dist/types/article/Section.d.ts +37 -0
  71. package/dist/types/article/Section.js +8 -0
  72. package/dist/types/component/Component.d.ts +15 -0
  73. package/dist/types/keyframe/Keyframe.d.ts +86 -0
  74. package/dist/types/keyframe/Keyframe.js +21 -0
  75. package/dist/types/project/Fonts.d.ts +22 -0
  76. package/dist/types/project/Fonts.js +11 -0
  77. package/dist/types/project/Layout.d.ts +6 -0
  78. package/dist/types/project/Layout.js +2 -0
  79. package/dist/types/project/Meta.d.ts +9 -0
  80. package/dist/types/project/Meta.js +2 -0
  81. package/dist/types/project/Page.d.ts +11 -0
  82. package/dist/types/project/Page.js +2 -0
  83. package/dist/types/project/Project.d.ts +17 -0
  84. package/dist/types/project/Project.js +2 -0
  85. package/dist/utils.d.ts +3 -0
  86. package/package.json +84 -0
  87. package/resources/template.scss.ejs +50 -0
@@ -0,0 +1,328 @@
1
+ import { z } from 'zod';
2
+ export declare const ArticleSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ sections: z.ZodArray<z.ZodObject<{
5
+ id: z.ZodString;
6
+ items: z.ZodArray<z.ZodType<import('../..').ItemAny, z.ZodTypeDef, import('../..').ItemAny>, "many">;
7
+ name: z.ZodOptional<z.ZodString>;
8
+ height: z.ZodRecord<z.ZodString, z.ZodObject<{
9
+ mode: z.ZodNativeEnum<typeof import('../..').SectionHeightMode>;
10
+ units: z.ZodNumber;
11
+ vhUnits: z.ZodOptional<z.ZodNumber>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ mode: import('../..').SectionHeightMode;
14
+ units: number;
15
+ vhUnits?: number | undefined;
16
+ }, {
17
+ mode: import('../..').SectionHeightMode;
18
+ units: number;
19
+ vhUnits?: number | undefined;
20
+ }>>;
21
+ position: z.ZodRecord<z.ZodString, z.ZodNumber>;
22
+ hidden: z.ZodRecord<z.ZodString, z.ZodBoolean>;
23
+ color: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
24
+ media: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
25
+ url: z.ZodString;
26
+ size: z.ZodString;
27
+ type: z.ZodLiteral<"video">;
28
+ play: z.ZodEnum<["on-click", "auto"]>;
29
+ coverUrl: z.ZodNullable<z.ZodString>;
30
+ position: z.ZodString;
31
+ offsetX: z.ZodNullable<z.ZodNumber>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ url: string;
34
+ coverUrl: string | null;
35
+ play: "on-click" | "auto";
36
+ position: string;
37
+ type: "video";
38
+ size: string;
39
+ offsetX: number | null;
40
+ }, {
41
+ url: string;
42
+ coverUrl: string | null;
43
+ play: "on-click" | "auto";
44
+ position: string;
45
+ type: "video";
46
+ size: string;
47
+ offsetX: number | null;
48
+ }>, z.ZodObject<{
49
+ url: z.ZodString;
50
+ type: z.ZodLiteral<"image">;
51
+ size: z.ZodString;
52
+ position: z.ZodString;
53
+ offsetX: z.ZodNullable<z.ZodNumber>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ url: string;
56
+ position: string;
57
+ type: "image";
58
+ size: string;
59
+ offsetX: number | null;
60
+ }, {
61
+ url: string;
62
+ position: string;
63
+ type: "image";
64
+ size: string;
65
+ offsetX: number | null;
66
+ }>]>>>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ color: Record<string, string | null>;
69
+ hidden: Record<string, boolean>;
70
+ position: Record<string, number>;
71
+ id: string;
72
+ height: Record<string, {
73
+ mode: import('../..').SectionHeightMode;
74
+ units: number;
75
+ vhUnits?: number | undefined;
76
+ }>;
77
+ items: import('../..').ItemAny[];
78
+ name?: string | undefined;
79
+ media?: Record<string, {
80
+ url: string;
81
+ coverUrl: string | null;
82
+ play: "on-click" | "auto";
83
+ position: string;
84
+ type: "video";
85
+ size: string;
86
+ offsetX: number | null;
87
+ } | {
88
+ url: string;
89
+ position: string;
90
+ type: "image";
91
+ size: string;
92
+ offsetX: number | null;
93
+ }> | undefined;
94
+ }, {
95
+ color: Record<string, string | null>;
96
+ hidden: Record<string, boolean>;
97
+ position: Record<string, number>;
98
+ id: string;
99
+ height: Record<string, {
100
+ mode: import('../..').SectionHeightMode;
101
+ units: number;
102
+ vhUnits?: number | undefined;
103
+ }>;
104
+ items: import('../..').ItemAny[];
105
+ name?: string | undefined;
106
+ media?: Record<string, {
107
+ url: string;
108
+ coverUrl: string | null;
109
+ play: "on-click" | "auto";
110
+ position: string;
111
+ type: "video";
112
+ size: string;
113
+ offsetX: number | null;
114
+ } | {
115
+ url: string;
116
+ position: string;
117
+ type: "image";
118
+ size: string;
119
+ offsetX: number | null;
120
+ }> | undefined;
121
+ }>, "many">;
122
+ interactions: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
123
+ id: z.ZodString;
124
+ triggers: z.ZodArray<z.ZodUnion<[z.ZodObject<{
125
+ itemId: z.ZodString;
126
+ type: z.ZodEnum<["hover-in", "hover-out", "click"]>;
127
+ from: z.ZodString;
128
+ to: z.ZodString;
129
+ }, "strip", z.ZodTypeAny, {
130
+ type: "hover-in" | "hover-out" | "click";
131
+ from: string;
132
+ to: string;
133
+ itemId: string;
134
+ }, {
135
+ type: "hover-in" | "hover-out" | "click";
136
+ from: string;
137
+ to: string;
138
+ itemId: string;
139
+ }>, z.ZodObject<{
140
+ position: z.ZodNumber;
141
+ from: z.ZodString;
142
+ to: z.ZodString;
143
+ isReverse: z.ZodBoolean;
144
+ }, "strip", z.ZodTypeAny, {
145
+ position: number;
146
+ from: string;
147
+ to: string;
148
+ isReverse: boolean;
149
+ }, {
150
+ position: number;
151
+ from: string;
152
+ to: string;
153
+ isReverse: boolean;
154
+ }>]>, "many">;
155
+ states: z.ZodArray<z.ZodObject<{
156
+ id: z.ZodString;
157
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
158
+ type: z.ZodEnum<["play", "pause"]>;
159
+ itemId: z.ZodString;
160
+ }, "strip", z.ZodTypeAny, {
161
+ type: "play" | "pause";
162
+ itemId: string;
163
+ }, {
164
+ type: "play" | "pause";
165
+ itemId: string;
166
+ }>, "many">>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ id: string;
169
+ actions?: {
170
+ type: "play" | "pause";
171
+ itemId: string;
172
+ }[] | undefined;
173
+ }, {
174
+ id: string;
175
+ actions?: {
176
+ type: "play" | "pause";
177
+ itemId: string;
178
+ }[] | undefined;
179
+ }>, "many">;
180
+ startStateId: z.ZodString;
181
+ }, "strip", z.ZodTypeAny, {
182
+ id: string;
183
+ triggers: ({
184
+ type: "hover-in" | "hover-out" | "click";
185
+ from: string;
186
+ to: string;
187
+ itemId: string;
188
+ } | {
189
+ position: number;
190
+ from: string;
191
+ to: string;
192
+ isReverse: boolean;
193
+ })[];
194
+ states: {
195
+ id: string;
196
+ actions?: {
197
+ type: "play" | "pause";
198
+ itemId: string;
199
+ }[] | undefined;
200
+ }[];
201
+ startStateId: string;
202
+ }, {
203
+ id: string;
204
+ triggers: ({
205
+ type: "hover-in" | "hover-out" | "click";
206
+ from: string;
207
+ to: string;
208
+ itemId: string;
209
+ } | {
210
+ position: number;
211
+ from: string;
212
+ to: string;
213
+ isReverse: boolean;
214
+ })[];
215
+ states: {
216
+ id: string;
217
+ actions?: {
218
+ type: "play" | "pause";
219
+ itemId: string;
220
+ }[] | undefined;
221
+ }[];
222
+ startStateId: string;
223
+ }>, "many">>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ id: string;
226
+ sections: {
227
+ color: Record<string, string | null>;
228
+ hidden: Record<string, boolean>;
229
+ position: Record<string, number>;
230
+ id: string;
231
+ height: Record<string, {
232
+ mode: import('../..').SectionHeightMode;
233
+ units: number;
234
+ vhUnits?: number | undefined;
235
+ }>;
236
+ items: import('../..').ItemAny[];
237
+ name?: string | undefined;
238
+ media?: Record<string, {
239
+ url: string;
240
+ coverUrl: string | null;
241
+ play: "on-click" | "auto";
242
+ position: string;
243
+ type: "video";
244
+ size: string;
245
+ offsetX: number | null;
246
+ } | {
247
+ url: string;
248
+ position: string;
249
+ type: "image";
250
+ size: string;
251
+ offsetX: number | null;
252
+ }> | undefined;
253
+ }[];
254
+ interactions: Record<string, {
255
+ id: string;
256
+ triggers: ({
257
+ type: "hover-in" | "hover-out" | "click";
258
+ from: string;
259
+ to: string;
260
+ itemId: string;
261
+ } | {
262
+ position: number;
263
+ from: string;
264
+ to: string;
265
+ isReverse: boolean;
266
+ })[];
267
+ states: {
268
+ id: string;
269
+ actions?: {
270
+ type: "play" | "pause";
271
+ itemId: string;
272
+ }[] | undefined;
273
+ }[];
274
+ startStateId: string;
275
+ }[]>;
276
+ }, {
277
+ id: string;
278
+ sections: {
279
+ color: Record<string, string | null>;
280
+ hidden: Record<string, boolean>;
281
+ position: Record<string, number>;
282
+ id: string;
283
+ height: Record<string, {
284
+ mode: import('../..').SectionHeightMode;
285
+ units: number;
286
+ vhUnits?: number | undefined;
287
+ }>;
288
+ items: import('../..').ItemAny[];
289
+ name?: string | undefined;
290
+ media?: Record<string, {
291
+ url: string;
292
+ coverUrl: string | null;
293
+ play: "on-click" | "auto";
294
+ position: string;
295
+ type: "video";
296
+ size: string;
297
+ offsetX: number | null;
298
+ } | {
299
+ url: string;
300
+ position: string;
301
+ type: "image";
302
+ size: string;
303
+ offsetX: number | null;
304
+ }> | undefined;
305
+ }[];
306
+ interactions: Record<string, {
307
+ id: string;
308
+ triggers: ({
309
+ type: "hover-in" | "hover-out" | "click";
310
+ from: string;
311
+ to: string;
312
+ itemId: string;
313
+ } | {
314
+ position: number;
315
+ from: string;
316
+ to: string;
317
+ isReverse: boolean;
318
+ })[];
319
+ states: {
320
+ id: string;
321
+ actions?: {
322
+ type: "play" | "pause";
323
+ itemId: string;
324
+ }[] | undefined;
325
+ }[];
326
+ startStateId: string;
327
+ }[]>;
328
+ }>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArticleSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const Section_schema_1 = require("./Section.schema");
6
+ const Interaction_schema_1 = require("./Interaction.schema");
7
+ exports.ArticleSchema = zod_1.z.object({
8
+ id: zod_1.z.string().min(1),
9
+ sections: zod_1.z.array(Section_schema_1.SectionSchema),
10
+ interactions: zod_1.z.record(zod_1.z.array(Interaction_schema_1.InteractionSchema))
11
+ });
@@ -0,0 +1,186 @@
1
+ import { z } from 'zod';
2
+ export declare const ColorPointSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ value: z.ZodString;
5
+ position: z.ZodNumber;
6
+ }, "strip", z.ZodTypeAny, {
7
+ position: number;
8
+ id: string;
9
+ value: string;
10
+ }, {
11
+ position: number;
12
+ id: string;
13
+ value: string;
14
+ }>;
15
+ export declare const FillLayerSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
16
+ id: z.ZodString;
17
+ type: z.ZodLiteral<"solid">;
18
+ value: z.ZodString;
19
+ blendMode: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ id: string;
22
+ value: string;
23
+ type: "solid";
24
+ blendMode: string;
25
+ }, {
26
+ id: string;
27
+ value: string;
28
+ type: "solid";
29
+ blendMode: string;
30
+ }>, z.ZodObject<{
31
+ id: z.ZodString;
32
+ type: z.ZodLiteral<"linear-gradient">;
33
+ colors: z.ZodArray<z.ZodObject<{
34
+ id: z.ZodString;
35
+ value: z.ZodString;
36
+ position: z.ZodNumber;
37
+ }, "strip", z.ZodTypeAny, {
38
+ position: number;
39
+ id: string;
40
+ value: string;
41
+ }, {
42
+ position: number;
43
+ id: string;
44
+ value: string;
45
+ }>, "many">;
46
+ start: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
47
+ end: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
48
+ angle: z.ZodNumber;
49
+ blendMode: z.ZodString;
50
+ }, "strip", z.ZodTypeAny, {
51
+ id: string;
52
+ type: "linear-gradient";
53
+ blendMode: string;
54
+ colors: {
55
+ position: number;
56
+ id: string;
57
+ value: string;
58
+ }[];
59
+ start: [number, number];
60
+ end: [number, number];
61
+ angle: number;
62
+ }, {
63
+ id: string;
64
+ type: "linear-gradient";
65
+ blendMode: string;
66
+ colors: {
67
+ position: number;
68
+ id: string;
69
+ value: string;
70
+ }[];
71
+ start: [number, number];
72
+ end: [number, number];
73
+ angle: number;
74
+ }>, z.ZodObject<{
75
+ id: z.ZodString;
76
+ type: z.ZodLiteral<"radial-gradient">;
77
+ colors: z.ZodArray<z.ZodObject<{
78
+ id: z.ZodString;
79
+ value: z.ZodString;
80
+ position: z.ZodNumber;
81
+ }, "strip", z.ZodTypeAny, {
82
+ position: number;
83
+ id: string;
84
+ value: string;
85
+ }, {
86
+ position: number;
87
+ id: string;
88
+ value: string;
89
+ }>, "many">;
90
+ center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
91
+ diameter: z.ZodNumber;
92
+ angle: z.ZodNumber;
93
+ blendMode: z.ZodString;
94
+ }, "strip", z.ZodTypeAny, {
95
+ center: [number, number];
96
+ id: string;
97
+ type: "radial-gradient";
98
+ blendMode: string;
99
+ colors: {
100
+ position: number;
101
+ id: string;
102
+ value: string;
103
+ }[];
104
+ angle: number;
105
+ diameter: number;
106
+ }, {
107
+ center: [number, number];
108
+ id: string;
109
+ type: "radial-gradient";
110
+ blendMode: string;
111
+ colors: {
112
+ position: number;
113
+ id: string;
114
+ value: string;
115
+ }[];
116
+ angle: number;
117
+ diameter: number;
118
+ }>, z.ZodObject<{
119
+ id: z.ZodString;
120
+ type: z.ZodLiteral<"conic-gradient">;
121
+ colors: z.ZodArray<z.ZodObject<{
122
+ id: z.ZodString;
123
+ value: z.ZodString;
124
+ position: z.ZodNumber;
125
+ }, "strip", z.ZodTypeAny, {
126
+ position: number;
127
+ id: string;
128
+ value: string;
129
+ }, {
130
+ position: number;
131
+ id: string;
132
+ value: string;
133
+ }>, "many">;
134
+ center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
135
+ angle: z.ZodNumber;
136
+ blendMode: z.ZodString;
137
+ }, "strip", z.ZodTypeAny, {
138
+ center: [number, number];
139
+ id: string;
140
+ type: "conic-gradient";
141
+ blendMode: string;
142
+ colors: {
143
+ position: number;
144
+ id: string;
145
+ value: string;
146
+ }[];
147
+ angle: number;
148
+ }, {
149
+ center: [number, number];
150
+ id: string;
151
+ type: "conic-gradient";
152
+ blendMode: string;
153
+ colors: {
154
+ position: number;
155
+ id: string;
156
+ value: string;
157
+ }[];
158
+ angle: number;
159
+ }>, z.ZodObject<{
160
+ id: z.ZodString;
161
+ type: z.ZodLiteral<"image">;
162
+ src: z.ZodString;
163
+ behavior: z.ZodString;
164
+ backgroundSize: z.ZodNumber;
165
+ opacity: z.ZodNumber;
166
+ blendMode: z.ZodString;
167
+ rotation: z.ZodOptional<z.ZodNumber>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ opacity: number;
170
+ id: string;
171
+ type: "image";
172
+ blendMode: string;
173
+ src: string;
174
+ behavior: string;
175
+ backgroundSize: number;
176
+ rotation?: number | undefined;
177
+ }, {
178
+ opacity: number;
179
+ id: string;
180
+ type: "image";
181
+ blendMode: string;
182
+ src: string;
183
+ behavior: string;
184
+ backgroundSize: number;
185
+ rotation?: number | undefined;
186
+ }>]>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FillLayerSchema = exports.ColorPointSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ColorPointSchema = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ value: zod_1.z.string(),
8
+ position: zod_1.z.number()
9
+ });
10
+ exports.FillLayerSchema = zod_1.z.discriminatedUnion('type', [
11
+ zod_1.z.object({
12
+ id: zod_1.z.string(),
13
+ type: zod_1.z.literal('solid'),
14
+ value: zod_1.z.string(),
15
+ blendMode: zod_1.z.string()
16
+ }),
17
+ zod_1.z.object({
18
+ id: zod_1.z.string(),
19
+ type: zod_1.z.literal('linear-gradient'),
20
+ colors: zod_1.z.array(exports.ColorPointSchema),
21
+ start: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]),
22
+ end: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]),
23
+ angle: zod_1.z.number(),
24
+ blendMode: zod_1.z.string()
25
+ }),
26
+ zod_1.z.object({
27
+ id: zod_1.z.string(),
28
+ type: zod_1.z.literal('radial-gradient'),
29
+ colors: zod_1.z.array(exports.ColorPointSchema),
30
+ center: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]),
31
+ diameter: zod_1.z.number(),
32
+ angle: zod_1.z.number(),
33
+ blendMode: zod_1.z.string()
34
+ }),
35
+ zod_1.z.object({
36
+ id: zod_1.z.string(),
37
+ type: zod_1.z.literal('conic-gradient'),
38
+ colors: zod_1.z.array(exports.ColorPointSchema),
39
+ center: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]),
40
+ angle: zod_1.z.number(),
41
+ blendMode: zod_1.z.string()
42
+ }),
43
+ zod_1.z.object({
44
+ id: zod_1.z.string(),
45
+ type: zod_1.z.literal('image'),
46
+ src: zod_1.z.string(),
47
+ behavior: zod_1.z.string(),
48
+ backgroundSize: zod_1.z.number(),
49
+ opacity: zod_1.z.number(),
50
+ blendMode: zod_1.z.string(),
51
+ rotation: zod_1.z.number().optional()
52
+ })
53
+ ]);
@@ -0,0 +1,103 @@
1
+ import { z } from 'zod';
2
+ export declare const InteractionSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ triggers: z.ZodArray<z.ZodUnion<[z.ZodObject<{
5
+ itemId: z.ZodString;
6
+ type: z.ZodEnum<["hover-in", "hover-out", "click"]>;
7
+ from: z.ZodString;
8
+ to: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ type: "hover-in" | "hover-out" | "click";
11
+ from: string;
12
+ to: string;
13
+ itemId: string;
14
+ }, {
15
+ type: "hover-in" | "hover-out" | "click";
16
+ from: string;
17
+ to: string;
18
+ itemId: string;
19
+ }>, z.ZodObject<{
20
+ position: z.ZodNumber;
21
+ from: z.ZodString;
22
+ to: z.ZodString;
23
+ isReverse: z.ZodBoolean;
24
+ }, "strip", z.ZodTypeAny, {
25
+ position: number;
26
+ from: string;
27
+ to: string;
28
+ isReverse: boolean;
29
+ }, {
30
+ position: number;
31
+ from: string;
32
+ to: string;
33
+ isReverse: boolean;
34
+ }>]>, "many">;
35
+ states: z.ZodArray<z.ZodObject<{
36
+ id: z.ZodString;
37
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
38
+ type: z.ZodEnum<["play", "pause"]>;
39
+ itemId: z.ZodString;
40
+ }, "strip", z.ZodTypeAny, {
41
+ type: "play" | "pause";
42
+ itemId: string;
43
+ }, {
44
+ type: "play" | "pause";
45
+ itemId: string;
46
+ }>, "many">>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ id: string;
49
+ actions?: {
50
+ type: "play" | "pause";
51
+ itemId: string;
52
+ }[] | undefined;
53
+ }, {
54
+ id: string;
55
+ actions?: {
56
+ type: "play" | "pause";
57
+ itemId: string;
58
+ }[] | undefined;
59
+ }>, "many">;
60
+ startStateId: z.ZodString;
61
+ }, "strip", z.ZodTypeAny, {
62
+ id: string;
63
+ triggers: ({
64
+ type: "hover-in" | "hover-out" | "click";
65
+ from: string;
66
+ to: string;
67
+ itemId: string;
68
+ } | {
69
+ position: number;
70
+ from: string;
71
+ to: string;
72
+ isReverse: boolean;
73
+ })[];
74
+ states: {
75
+ id: string;
76
+ actions?: {
77
+ type: "play" | "pause";
78
+ itemId: string;
79
+ }[] | undefined;
80
+ }[];
81
+ startStateId: string;
82
+ }, {
83
+ id: string;
84
+ triggers: ({
85
+ type: "hover-in" | "hover-out" | "click";
86
+ from: string;
87
+ to: string;
88
+ itemId: string;
89
+ } | {
90
+ position: number;
91
+ from: string;
92
+ to: string;
93
+ isReverse: boolean;
94
+ })[];
95
+ states: {
96
+ id: string;
97
+ actions?: {
98
+ type: "play" | "pause";
99
+ itemId: string;
100
+ }[] | undefined;
101
+ }[];
102
+ startStateId: string;
103
+ }>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InteractionSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const ItemTriggerSchema = zod_1.z.object({
6
+ itemId: zod_1.z.string(),
7
+ type: zod_1.z.enum(['hover-in', 'hover-out', 'click']),
8
+ from: zod_1.z.string(),
9
+ to: zod_1.z.string()
10
+ });
11
+ const ScrollTriggerSchema = zod_1.z.object({
12
+ position: zod_1.z.number(),
13
+ from: zod_1.z.string(),
14
+ to: zod_1.z.string(),
15
+ isReverse: zod_1.z.boolean()
16
+ });
17
+ const VideoInteractionActionSchema = zod_1.z.object({
18
+ type: zod_1.z.enum(['play', 'pause']),
19
+ itemId: zod_1.z.string()
20
+ });
21
+ const StateSchema = zod_1.z.object({
22
+ id: zod_1.z.string(),
23
+ actions: zod_1.z.array(VideoInteractionActionSchema).optional()
24
+ });
25
+ exports.InteractionSchema = zod_1.z.object({
26
+ id: zod_1.z.string(),
27
+ triggers: zod_1.z.array(zod_1.z.union([ItemTriggerSchema, ScrollTriggerSchema])),
28
+ states: zod_1.z.array(StateSchema),
29
+ startStateId: zod_1.z.string(),
30
+ });