@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,40 @@
1
+ import { z, ZodType } from 'zod';
2
+ import { ItemAny } from '../../types/article/Item';
3
+ export declare const FXControlSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4
+ type: z.ZodLiteral<"float">;
5
+ shaderParam: z.ZodString;
6
+ value: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ value: number;
9
+ type: "float";
10
+ shaderParam: string;
11
+ }, {
12
+ value: number;
13
+ type: "float";
14
+ shaderParam: string;
15
+ }>, z.ZodObject<{
16
+ type: z.ZodLiteral<"int">;
17
+ shaderParam: z.ZodString;
18
+ value: z.ZodNumber;
19
+ }, "strip", z.ZodTypeAny, {
20
+ value: number;
21
+ type: "int";
22
+ shaderParam: string;
23
+ }, {
24
+ value: number;
25
+ type: "int";
26
+ shaderParam: string;
27
+ }>, z.ZodObject<{
28
+ type: z.ZodLiteral<"vec2">;
29
+ shaderParam: z.ZodString;
30
+ value: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ value: [number, number];
33
+ type: "vec2";
34
+ shaderParam: string;
35
+ }, {
36
+ value: [number, number];
37
+ type: "vec2";
38
+ shaderParam: string;
39
+ }>]>;
40
+ export declare const ItemSchema: ZodType<ItemAny>;
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ItemSchema = exports.FXControlSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const ItemState_schema_1 = require("./ItemState.schema");
6
+ const RichTextItem_schema_1 = require("./RichTextItem.schema");
7
+ const ItemBase_schema_1 = require("./ItemBase.schema");
8
+ const ArticleItemType_1 = require("../../types/article/ArticleItemType");
9
+ const ItemArea_1 = require("../../types/article/ItemArea");
10
+ const FillLayer_schema_1 = require("./FillLayer.schema");
11
+ const pointerEvents = zod_1.z.enum(['never', 'when_visible', 'always']).optional();
12
+ exports.FXControlSchema = zod_1.z.discriminatedUnion('type', [
13
+ zod_1.z.object({
14
+ type: zod_1.z.literal('float'),
15
+ shaderParam: zod_1.z.string(),
16
+ value: zod_1.z.number()
17
+ }),
18
+ zod_1.z.object({
19
+ type: zod_1.z.literal('int'),
20
+ shaderParam: zod_1.z.string(),
21
+ value: zod_1.z.number()
22
+ }),
23
+ zod_1.z.object({
24
+ type: zod_1.z.literal('vec2'),
25
+ shaderParam: zod_1.z.string(),
26
+ value: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()])
27
+ })
28
+ ]);
29
+ const FXParams = zod_1.z.object({
30
+ url: zod_1.z.string().min(1),
31
+ hasGLEffect: zod_1.z.boolean().optional(),
32
+ fragmentShader: zod_1.z.string().nullable(),
33
+ FXControls: zod_1.z.array(exports.FXControlSchema).optional()
34
+ });
35
+ const ImageItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
36
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.Image),
37
+ commonParams: zod_1.z.object({
38
+ pointerEvents
39
+ }).merge(FXParams),
40
+ sticky: zod_1.z.record(zod_1.z.object({
41
+ from: zod_1.z.number(),
42
+ to: zod_1.z.number().optional()
43
+ }).nullable()),
44
+ layoutParams: zod_1.z.record(zod_1.z.object({
45
+ opacity: zod_1.z.number().nonnegative(),
46
+ radius: zod_1.z.number(),
47
+ strokeWidth: zod_1.z.number(),
48
+ strokeFill: zod_1.z.array(FillLayer_schema_1.FillLayerSchema),
49
+ blur: zod_1.z.number(),
50
+ isDraggable: zod_1.z.boolean().optional()
51
+ })),
52
+ state: zod_1.z.record(ItemState_schema_1.MediaStateParamsSchema)
53
+ });
54
+ const VideoItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
55
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.Video),
56
+ commonParams: zod_1.z.object({
57
+ coverUrl: zod_1.z.string().nullable(),
58
+ pointerEvents
59
+ }).merge(FXParams),
60
+ sticky: zod_1.z.record(zod_1.z.object({
61
+ from: zod_1.z.number(),
62
+ to: zod_1.z.number().optional()
63
+ }).nullable()),
64
+ layoutParams: zod_1.z.record(zod_1.z.object({
65
+ scrollPlayback: zod_1.z.object({
66
+ from: zod_1.z.number(),
67
+ to: zod_1.z.number()
68
+ }).nullable(),
69
+ opacity: zod_1.z.number().nonnegative(),
70
+ radius: zod_1.z.number(),
71
+ strokeWidth: zod_1.z.number(),
72
+ strokeFill: zod_1.z.array(FillLayer_schema_1.FillLayerSchema),
73
+ blur: zod_1.z.number(),
74
+ isDraggable: zod_1.z.boolean().optional(),
75
+ play: zod_1.z.enum(['on-hover', 'on-click', 'auto']),
76
+ muted: zod_1.z.boolean(),
77
+ controls: zod_1.z.boolean(),
78
+ })),
79
+ state: zod_1.z.record(ItemState_schema_1.MediaStateParamsSchema)
80
+ });
81
+ const RectangleItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
82
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.Rectangle),
83
+ commonParams: zod_1.z.object({
84
+ ratioLock: zod_1.z.boolean(),
85
+ pointerEvents
86
+ }),
87
+ sticky: zod_1.z.record(zod_1.z.object({
88
+ from: zod_1.z.number(),
89
+ to: zod_1.z.number().optional()
90
+ }).nullable()),
91
+ layoutParams: zod_1.z.record(zod_1.z.object({
92
+ radius: zod_1.z.number(),
93
+ strokeWidth: zod_1.z.number(),
94
+ fill: zod_1.z.array(FillLayer_schema_1.FillLayerSchema),
95
+ strokeFill: zod_1.z.array(FillLayer_schema_1.FillLayerSchema),
96
+ blur: zod_1.z.number(),
97
+ backdropBlur: zod_1.z.number(),
98
+ blurMode: zod_1.z.enum(['default', 'backdrop']),
99
+ isDraggable: zod_1.z.boolean().optional()
100
+ })),
101
+ state: zod_1.z.record(ItemState_schema_1.RectangleStateParamsSchema)
102
+ });
103
+ const CustomItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
104
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.Custom),
105
+ commonParams: zod_1.z.object({
106
+ name: zod_1.z.string(),
107
+ pointerEvents
108
+ }),
109
+ sticky: zod_1.z.record(zod_1.z.object({
110
+ from: zod_1.z.number(),
111
+ to: zod_1.z.number().optional()
112
+ }).nullable()),
113
+ layoutParams: zod_1.z.record(zod_1.z.object({
114
+ isDraggable: zod_1.z.boolean().optional()
115
+ })),
116
+ state: zod_1.z.record(ItemState_schema_1.CustomItemStateParamsSchema)
117
+ });
118
+ const VimeoEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
119
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.VimeoEmbed),
120
+ commonParams: zod_1.z.object({
121
+ url: zod_1.z.string().min(1),
122
+ coverUrl: zod_1.z.string().nullable(),
123
+ ratioLock: zod_1.z.boolean(),
124
+ pointerEvents
125
+ }),
126
+ sticky: zod_1.z.record(zod_1.z.object({
127
+ from: zod_1.z.number(),
128
+ to: zod_1.z.number().optional()
129
+ }).nullable()),
130
+ layoutParams: zod_1.z.record(zod_1.z.object({
131
+ radius: zod_1.z.number(),
132
+ blur: zod_1.z.number(),
133
+ opacity: zod_1.z.number().nonnegative(),
134
+ play: zod_1.z.union([zod_1.z.literal('on-hover'), zod_1.z.literal('on-click'), zod_1.z.literal('auto')]),
135
+ controls: zod_1.z.boolean(),
136
+ loop: zod_1.z.boolean(),
137
+ muted: zod_1.z.boolean(),
138
+ pictureInPicture: zod_1.z.boolean()
139
+ })),
140
+ state: zod_1.z.record(ItemState_schema_1.EmbedStateParamsSchema)
141
+ });
142
+ const YoutubeEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
143
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.YoutubeEmbed),
144
+ commonParams: zod_1.z.object({
145
+ url: zod_1.z.string().min(1),
146
+ coverUrl: zod_1.z.string().nullable(),
147
+ pointerEvents
148
+ }),
149
+ sticky: zod_1.z.record(zod_1.z.object({
150
+ from: zod_1.z.number(),
151
+ to: zod_1.z.number().optional()
152
+ }).nullable()),
153
+ layoutParams: zod_1.z.record(zod_1.z.object({
154
+ radius: zod_1.z.number(),
155
+ blur: zod_1.z.number(),
156
+ opacity: zod_1.z.number().nonnegative(),
157
+ play: zod_1.z.enum(['on-hover', 'on-click', 'auto']),
158
+ controls: zod_1.z.boolean(),
159
+ loop: zod_1.z.boolean(),
160
+ })),
161
+ state: zod_1.z.record(ItemState_schema_1.EmbedStateParamsSchema)
162
+ });
163
+ const CodeEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
164
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.CodeEmbed),
165
+ commonParams: zod_1.z.object({
166
+ html: zod_1.z.string(),
167
+ scale: zod_1.z.boolean(),
168
+ iframe: zod_1.z.boolean(),
169
+ pointerEvents
170
+ }),
171
+ sticky: zod_1.z.record(zod_1.z.object({
172
+ from: zod_1.z.number(),
173
+ to: zod_1.z.number().optional()
174
+ }).nullable()),
175
+ layoutParams: zod_1.z.record(zod_1.z.object({
176
+ areaAnchor: zod_1.z.nativeEnum(ItemArea_1.AreaAnchor),
177
+ opacity: zod_1.z.number().nonnegative(),
178
+ blur: zod_1.z.number(),
179
+ isDraggable: zod_1.z.boolean().optional()
180
+ })),
181
+ state: zod_1.z.record(ItemState_schema_1.CodeEmbedStateParamsSchema)
182
+ });
183
+ const ComponentItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
184
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.Component),
185
+ commonParams: zod_1.z.object({
186
+ componentId: zod_1.z.string(),
187
+ content: zod_1.z.any().optional()
188
+ }),
189
+ sticky: zod_1.z.record(zod_1.z.object({
190
+ from: zod_1.z.number(),
191
+ to: zod_1.z.number().optional()
192
+ }).nullable()),
193
+ layoutParams: zod_1.z.record(zod_1.z.object({
194
+ parameters: zod_1.z.any().optional(),
195
+ opacity: zod_1.z.number().nonnegative(),
196
+ blur: zod_1.z.number()
197
+ })),
198
+ state: zod_1.z.record(ItemState_schema_1.ComponentStateParamsSchema)
199
+ });
200
+ exports.ItemSchema = zod_1.z.lazy(() => zod_1.z.discriminatedUnion('type', [
201
+ ImageItemSchema,
202
+ VideoItemSchema,
203
+ RectangleItemSchema,
204
+ CustomItemSchema,
205
+ RichTextItem_schema_1.RichTextItemSchema,
206
+ VimeoEmbedItemSchema,
207
+ YoutubeEmbedItemSchema,
208
+ CodeEmbedItemSchema,
209
+ ComponentItemSchema,
210
+ ItemBase_schema_1.ItemBaseSchema.extend({
211
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.Group),
212
+ commonParams: zod_1.z.object({
213
+ pointerEvents
214
+ }),
215
+ items: zod_1.z.array(exports.ItemSchema),
216
+ sticky: zod_1.z.record(zod_1.z.object({
217
+ from: zod_1.z.number(),
218
+ to: zod_1.z.number().optional()
219
+ }).nullable()),
220
+ layoutParams: zod_1.z.record(zod_1.z.object({
221
+ opacity: zod_1.z.number().nonnegative(),
222
+ blur: zod_1.z.number()
223
+ })),
224
+ state: zod_1.z.record(ItemState_schema_1.GroupStateParamsSchema)
225
+ }),
226
+ ItemBase_schema_1.ItemBaseSchema.extend({
227
+ type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.Compound),
228
+ commonParams: zod_1.z.object({
229
+ overflow: zod_1.z.enum(['hidden', 'visible']),
230
+ pointerEvents,
231
+ }),
232
+ items: zod_1.z.array(exports.ItemSchema),
233
+ sticky: zod_1.z.record(zod_1.z.object({
234
+ from: zod_1.z.number(),
235
+ to: zod_1.z.number().optional()
236
+ }).nullable()),
237
+ layoutParams: zod_1.z.record(zod_1.z.object({
238
+ opacity: zod_1.z.number().nonnegative()
239
+ })),
240
+ state: zod_1.z.record(ItemState_schema_1.CompoundStateParamsSchema)
241
+ })
242
+ ]));
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ import { AnchorSide, PositionType, AreaAnchor } from '../../types/article/ItemArea';
3
+ export declare const ItemAreaSchema: z.ZodObject<{
4
+ top: z.ZodNumber;
5
+ left: z.ZodNumber;
6
+ width: z.ZodNumber;
7
+ height: z.ZodNumber;
8
+ zIndex: z.ZodNumber;
9
+ angle: z.ZodNumber;
10
+ anchorSide: z.ZodOptional<z.ZodNativeEnum<typeof AnchorSide>>;
11
+ scale: z.ZodNumber;
12
+ positionType: z.ZodNativeEnum<typeof PositionType>;
13
+ scaleAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ left: number;
16
+ top: number;
17
+ scale: number;
18
+ angle: number;
19
+ width: number;
20
+ height: number;
21
+ zIndex: number;
22
+ positionType: PositionType;
23
+ scaleAnchor: AreaAnchor;
24
+ anchorSide?: AnchorSide | undefined;
25
+ }, {
26
+ left: number;
27
+ top: number;
28
+ scale: number;
29
+ angle: number;
30
+ width: number;
31
+ height: number;
32
+ zIndex: number;
33
+ positionType: PositionType;
34
+ scaleAnchor: AreaAnchor;
35
+ anchorSide?: AnchorSide | undefined;
36
+ }>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ItemAreaSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const ItemArea_1 = require("../../types/article/ItemArea");
6
+ exports.ItemAreaSchema = zod_1.z.object({
7
+ top: zod_1.z.number(),
8
+ left: zod_1.z.number(),
9
+ width: zod_1.z.number(),
10
+ height: zod_1.z.number(),
11
+ zIndex: zod_1.z.number(),
12
+ angle: zod_1.z.number(),
13
+ anchorSide: zod_1.z.nativeEnum(ItemArea_1.AnchorSide).optional(),
14
+ scale: zod_1.z.number().nonnegative(),
15
+ positionType: zod_1.z.nativeEnum(ItemArea_1.PositionType),
16
+ scaleAnchor: zod_1.z.nativeEnum(ItemArea_1.AreaAnchor)
17
+ });
@@ -0,0 +1,137 @@
1
+ import { z } from 'zod';
2
+ import { AreaAnchor, DimensionMode } from '../../types/article/ItemArea';
3
+ export declare const Link: z.ZodObject<{
4
+ url: z.ZodString;
5
+ target: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ url: string;
8
+ target: string;
9
+ }, {
10
+ url: string;
11
+ target: string;
12
+ }>;
13
+ export declare const CompoundSettingsSchema: z.ZodObject<{
14
+ positionAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
15
+ widthMode: z.ZodNativeEnum<typeof DimensionMode>;
16
+ heightMode: z.ZodNativeEnum<typeof DimensionMode>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ positionAnchor: AreaAnchor;
19
+ widthMode: DimensionMode;
20
+ heightMode: DimensionMode;
21
+ }, {
22
+ positionAnchor: AreaAnchor;
23
+ widthMode: DimensionMode;
24
+ heightMode: DimensionMode;
25
+ }>;
26
+ export declare const ItemBaseSchema: z.ZodObject<{
27
+ id: z.ZodString;
28
+ area: z.ZodRecord<z.ZodString, z.ZodObject<{
29
+ top: z.ZodNumber;
30
+ left: z.ZodNumber;
31
+ width: z.ZodNumber;
32
+ height: z.ZodNumber;
33
+ zIndex: z.ZodNumber;
34
+ angle: z.ZodNumber;
35
+ anchorSide: z.ZodOptional<z.ZodNativeEnum<typeof import('../../types/article/ItemArea').AnchorSide>>;
36
+ scale: z.ZodNumber;
37
+ positionType: z.ZodNativeEnum<typeof import('../../types/article/ItemArea').PositionType>;
38
+ scaleAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ left: number;
41
+ top: number;
42
+ scale: number;
43
+ angle: number;
44
+ width: number;
45
+ height: number;
46
+ zIndex: number;
47
+ positionType: import('../../types/article/ItemArea').PositionType;
48
+ scaleAnchor: AreaAnchor;
49
+ anchorSide?: import('../../types/article/ItemArea').AnchorSide | undefined;
50
+ }, {
51
+ left: number;
52
+ top: number;
53
+ scale: number;
54
+ angle: number;
55
+ width: number;
56
+ height: number;
57
+ zIndex: number;
58
+ positionType: import('../../types/article/ItemArea').PositionType;
59
+ scaleAnchor: AreaAnchor;
60
+ anchorSide?: import('../../types/article/ItemArea').AnchorSide | undefined;
61
+ }>>;
62
+ hidden: z.ZodRecord<z.ZodString, z.ZodBoolean>;
63
+ link: z.ZodOptional<z.ZodObject<{
64
+ url: z.ZodString;
65
+ target: z.ZodString;
66
+ }, "strip", z.ZodTypeAny, {
67
+ url: string;
68
+ target: string;
69
+ }, {
70
+ url: string;
71
+ target: string;
72
+ }>>;
73
+ compoundSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
74
+ positionAnchor: z.ZodNativeEnum<typeof AreaAnchor>;
75
+ widthMode: z.ZodNativeEnum<typeof DimensionMode>;
76
+ heightMode: z.ZodNativeEnum<typeof DimensionMode>;
77
+ }, "strip", z.ZodTypeAny, {
78
+ positionAnchor: AreaAnchor;
79
+ widthMode: DimensionMode;
80
+ heightMode: DimensionMode;
81
+ }, {
82
+ positionAnchor: AreaAnchor;
83
+ widthMode: DimensionMode;
84
+ heightMode: DimensionMode;
85
+ }>>>;
86
+ layoutParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ hidden: Record<string, boolean>;
89
+ id: string;
90
+ area: Record<string, {
91
+ left: number;
92
+ top: number;
93
+ scale: number;
94
+ angle: number;
95
+ width: number;
96
+ height: number;
97
+ zIndex: number;
98
+ positionType: import('../../types/article/ItemArea').PositionType;
99
+ scaleAnchor: AreaAnchor;
100
+ anchorSide?: import('../../types/article/ItemArea').AnchorSide | undefined;
101
+ }>;
102
+ link?: {
103
+ url: string;
104
+ target: string;
105
+ } | undefined;
106
+ compoundSettings?: Record<string, {
107
+ positionAnchor: AreaAnchor;
108
+ widthMode: DimensionMode;
109
+ heightMode: DimensionMode;
110
+ }> | undefined;
111
+ layoutParams?: Record<string, any> | undefined;
112
+ }, {
113
+ hidden: Record<string, boolean>;
114
+ id: string;
115
+ area: Record<string, {
116
+ left: number;
117
+ top: number;
118
+ scale: number;
119
+ angle: number;
120
+ width: number;
121
+ height: number;
122
+ zIndex: number;
123
+ positionType: import('../../types/article/ItemArea').PositionType;
124
+ scaleAnchor: AreaAnchor;
125
+ anchorSide?: import('../../types/article/ItemArea').AnchorSide | undefined;
126
+ }>;
127
+ link?: {
128
+ url: string;
129
+ target: string;
130
+ } | undefined;
131
+ compoundSettings?: Record<string, {
132
+ positionAnchor: AreaAnchor;
133
+ widthMode: DimensionMode;
134
+ heightMode: DimensionMode;
135
+ }> | undefined;
136
+ layoutParams?: Record<string, any> | undefined;
137
+ }>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ItemBaseSchema = exports.CompoundSettingsSchema = exports.Link = void 0;
4
+ const zod_1 = require("zod");
5
+ const ItemArea_schema_1 = require("./ItemArea.schema");
6
+ const ItemArea_1 = require("../../types/article/ItemArea");
7
+ exports.Link = zod_1.z.object({
8
+ url: zod_1.z.string().min(1),
9
+ target: zod_1.z.string().min(1)
10
+ });
11
+ exports.CompoundSettingsSchema = zod_1.z.object({
12
+ positionAnchor: zod_1.z.nativeEnum(ItemArea_1.AreaAnchor),
13
+ widthMode: zod_1.z.nativeEnum(ItemArea_1.DimensionMode),
14
+ heightMode: zod_1.z.nativeEnum(ItemArea_1.DimensionMode),
15
+ });
16
+ exports.ItemBaseSchema = zod_1.z.object({
17
+ id: zod_1.z.string().min(1),
18
+ area: zod_1.z.record(ItemArea_schema_1.ItemAreaSchema),
19
+ hidden: zod_1.z.record(zod_1.z.boolean()),
20
+ link: exports.Link.optional(),
21
+ compoundSettings: zod_1.z.record(exports.CompoundSettingsSchema).optional(),
22
+ layoutParams: zod_1.z.record(zod_1.z.any()).optional()
23
+ });