@cntrl-site/sdk 1.23.2 → 1.24.0
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/index.d.ts +1 -1
- package/dist/index.js +68 -23
- package/dist/index.mjs +68 -23
- package/dist/schemas/article/Article.schema.d.ts +4 -4
- package/dist/schemas/article/FillLayer.schema.d.ts +186 -0
- package/dist/schemas/article/FillLayer.schema.js +53 -0
- package/dist/schemas/article/Item.schema.d.ts +6 -6
- package/dist/schemas/article/Item.schema.js +5 -4
- package/dist/schemas/article/ItemArea.schema.d.ts +2 -2
- package/dist/schemas/article/ItemBase.schema.d.ts +4 -4
- package/dist/schemas/article/ItemState.schema.d.ts +2433 -231
- package/dist/schemas/article/ItemState.schema.js +4 -3
- package/dist/schemas/article/RichTextItem.schema.d.ts +16 -16
- package/dist/schemas/article/Section.schema.d.ts +2 -2
- package/dist/schemas/keyframe/Keyframes.schema.d.ts +1222 -186
- package/dist/schemas/keyframe/Keyframes.schema.js +11 -14
- package/dist/schemas/shared/FillLayer.schema.d.ts +186 -0
- package/dist/types/article/Item.d.ts +51 -3
- package/dist/types/article/ItemState.d.ts +4 -3
- package/dist/types/keyframe/Keyframe.d.ts +8 -11
- package/dist/types/keyframe/Keyframe.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { AreaAnchor, AnchorSide, DimensionMode, PositionType } from './types/art
|
|
|
9
9
|
export { KeyframeType } from './types/keyframe/Keyframe';
|
|
10
10
|
export type { Article } from './types/article/Article';
|
|
11
11
|
export type { Section, SectionHeight } from './types/article/Section';
|
|
12
|
-
export type { Item, ImageItem, ItemAny, CustomItem, ItemCommonParamsMap, ItemLayoutParamsMap, RectangleItem, StickyParams, VideoItem, RichTextItem, Link, VimeoEmbedItem, YoutubeEmbedItem, GroupItem, CodeEmbedItem, CompoundItem, ComponentItem } from './types/article/Item';
|
|
12
|
+
export type { Item, ImageItem, ItemAny, CustomItem, ItemCommonParamsMap, ItemLayoutParamsMap, RectangleItem, StickyParams, VideoItem, RichTextItem, Link, VimeoEmbedItem, YoutubeEmbedItem, GroupItem, CodeEmbedItem, CompoundItem, ComponentItem, FillLayer } from './types/article/Item';
|
|
13
13
|
export type { RichTextBlock, RichTextEntity, RichTextStyle } from './types/article/RichText';
|
|
14
14
|
export type { ItemArea } from './types/article/ItemArea';
|
|
15
15
|
export type { ItemState, ItemStateParams, StateParams, ItemStatesMap } from './types/article/ItemState';
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,55 @@ var SectionHeightMode = /* @__PURE__ */ ((SectionHeightMode2) => {
|
|
|
31
31
|
SectionHeightMode2["ViewportHeightUnits"] = "viewport-height-units";
|
|
32
32
|
return SectionHeightMode2;
|
|
33
33
|
})(SectionHeightMode || {});
|
|
34
|
+
const ColorPointSchema = zod.z.object({
|
|
35
|
+
id: zod.z.string(),
|
|
36
|
+
value: zod.z.string(),
|
|
37
|
+
position: zod.z.number()
|
|
38
|
+
});
|
|
39
|
+
const FillLayerSchema = zod.z.discriminatedUnion("type", [
|
|
40
|
+
zod.z.object({
|
|
41
|
+
id: zod.z.string(),
|
|
42
|
+
type: zod.z.literal("solid"),
|
|
43
|
+
value: zod.z.string(),
|
|
44
|
+
blendMode: zod.z.string()
|
|
45
|
+
}),
|
|
46
|
+
zod.z.object({
|
|
47
|
+
id: zod.z.string(),
|
|
48
|
+
type: zod.z.literal("linear-gradient"),
|
|
49
|
+
colors: zod.z.array(ColorPointSchema),
|
|
50
|
+
start: zod.z.tuple([zod.z.number(), zod.z.number()]),
|
|
51
|
+
end: zod.z.tuple([zod.z.number(), zod.z.number()]),
|
|
52
|
+
angle: zod.z.number(),
|
|
53
|
+
blendMode: zod.z.string()
|
|
54
|
+
}),
|
|
55
|
+
zod.z.object({
|
|
56
|
+
id: zod.z.string(),
|
|
57
|
+
type: zod.z.literal("radial-gradient"),
|
|
58
|
+
colors: zod.z.array(ColorPointSchema),
|
|
59
|
+
center: zod.z.tuple([zod.z.number(), zod.z.number()]),
|
|
60
|
+
diameter: zod.z.number(),
|
|
61
|
+
angle: zod.z.number(),
|
|
62
|
+
blendMode: zod.z.string()
|
|
63
|
+
}),
|
|
64
|
+
zod.z.object({
|
|
65
|
+
id: zod.z.string(),
|
|
66
|
+
type: zod.z.literal("conic-gradient"),
|
|
67
|
+
colors: zod.z.array(ColorPointSchema),
|
|
68
|
+
center: zod.z.tuple([zod.z.number(), zod.z.number()]),
|
|
69
|
+
angle: zod.z.number(),
|
|
70
|
+
blendMode: zod.z.string()
|
|
71
|
+
}),
|
|
72
|
+
zod.z.object({
|
|
73
|
+
id: zod.z.string(),
|
|
74
|
+
type: zod.z.literal("image"),
|
|
75
|
+
src: zod.z.string(),
|
|
76
|
+
behavior: zod.z.string(),
|
|
77
|
+
backgroundSize: zod.z.number(),
|
|
78
|
+
opacity: zod.z.number(),
|
|
79
|
+
blendMode: zod.z.string(),
|
|
80
|
+
rotation: zod.z.number().optional()
|
|
81
|
+
})
|
|
82
|
+
]);
|
|
34
83
|
const TransitionSchema = zod.z.object({
|
|
35
84
|
timing: zod.z.string(),
|
|
36
85
|
duration: zod.z.number(),
|
|
@@ -56,13 +105,13 @@ const MediaStateParamsSchema = zod.z.object({
|
|
|
56
105
|
opacity: getStateParamsSchema(zod.z.number()),
|
|
57
106
|
radius: getStateParamsSchema(zod.z.number()),
|
|
58
107
|
strokeWidth: getStateParamsSchema(zod.z.number()),
|
|
59
|
-
|
|
108
|
+
strokeFill: getStateParamsSchema(zod.z.array(FillLayerSchema))
|
|
60
109
|
}).merge(ItemStateBaseSchema);
|
|
61
110
|
const RectangleStateParamsSchema = zod.z.object({
|
|
62
111
|
strokeWidth: getStateParamsSchema(zod.z.number()),
|
|
63
112
|
radius: getStateParamsSchema(zod.z.number()),
|
|
64
|
-
|
|
65
|
-
|
|
113
|
+
fill: getStateParamsSchema(zod.z.array(FillLayerSchema)),
|
|
114
|
+
strokeFill: getStateParamsSchema(zod.z.array(FillLayerSchema)),
|
|
66
115
|
backdropBlur: getStateParamsSchema(zod.z.number())
|
|
67
116
|
}).merge(ItemStateBaseSchema);
|
|
68
117
|
const CustomItemStateParamsSchema = ItemStateBaseSchema;
|
|
@@ -290,7 +339,7 @@ const ImageItemSchema = ItemBaseSchema.extend({
|
|
|
290
339
|
opacity: zod.z.number().nonnegative(),
|
|
291
340
|
radius: zod.z.number(),
|
|
292
341
|
strokeWidth: zod.z.number(),
|
|
293
|
-
|
|
342
|
+
strokeFill: zod.z.array(FillLayerSchema),
|
|
294
343
|
blur: zod.z.number(),
|
|
295
344
|
isDraggable: zod.z.boolean().optional()
|
|
296
345
|
})
|
|
@@ -318,7 +367,7 @@ const VideoItemSchema = ItemBaseSchema.extend({
|
|
|
318
367
|
opacity: zod.z.number().nonnegative(),
|
|
319
368
|
radius: zod.z.number(),
|
|
320
369
|
strokeWidth: zod.z.number(),
|
|
321
|
-
|
|
370
|
+
strokeFill: zod.z.array(FillLayerSchema),
|
|
322
371
|
blur: zod.z.number(),
|
|
323
372
|
isDraggable: zod.z.boolean().optional(),
|
|
324
373
|
play: zod.z.enum(["on-hover", "on-click", "auto"]),
|
|
@@ -344,8 +393,8 @@ const RectangleItemSchema = ItemBaseSchema.extend({
|
|
|
344
393
|
zod.z.object({
|
|
345
394
|
radius: zod.z.number(),
|
|
346
395
|
strokeWidth: zod.z.number(),
|
|
347
|
-
|
|
348
|
-
|
|
396
|
+
fill: zod.z.array(FillLayerSchema),
|
|
397
|
+
strokeFill: zod.z.array(FillLayerSchema),
|
|
349
398
|
blur: zod.z.number(),
|
|
350
399
|
backdropBlur: zod.z.number(),
|
|
351
400
|
blurMode: zod.z.enum(["default", "backdrop"]),
|
|
@@ -645,8 +694,6 @@ var KeyframeType = /* @__PURE__ */ ((KeyframeType2) => {
|
|
|
645
694
|
KeyframeType2["Rotation"] = "rotation";
|
|
646
695
|
KeyframeType2["BorderRadius"] = "border-radius";
|
|
647
696
|
KeyframeType2["BorderWidth"] = "border-width";
|
|
648
|
-
KeyframeType2["Color"] = "color";
|
|
649
|
-
KeyframeType2["BorderColor"] = "border-color";
|
|
650
697
|
KeyframeType2["Opacity"] = "opacity";
|
|
651
698
|
KeyframeType2["Scale"] = "scale";
|
|
652
699
|
KeyframeType2["TextColor"] = "text-color";
|
|
@@ -655,6 +702,8 @@ var KeyframeType = /* @__PURE__ */ ((KeyframeType2) => {
|
|
|
655
702
|
KeyframeType2["Blur"] = "blur";
|
|
656
703
|
KeyframeType2["BackdropBlur"] = "backdrop-blur";
|
|
657
704
|
KeyframeType2["FXParams"] = "fx-params";
|
|
705
|
+
KeyframeType2["BorderFill"] = "border-fill";
|
|
706
|
+
KeyframeType2["Fill"] = "fill";
|
|
658
707
|
return KeyframeType2;
|
|
659
708
|
})(KeyframeType || {});
|
|
660
709
|
const KeyframesBaseSchema = zod.z.object({
|
|
@@ -695,17 +744,9 @@ const BorderWidthKeyframeSchema = KeyframesBaseSchema.extend({
|
|
|
695
744
|
borderWidth: zod.z.number().nonnegative()
|
|
696
745
|
})
|
|
697
746
|
});
|
|
698
|
-
const
|
|
699
|
-
type: zod.z.literal(KeyframeType.
|
|
700
|
-
value: zod.z.
|
|
701
|
-
color: zod.z.string()
|
|
702
|
-
})
|
|
703
|
-
});
|
|
704
|
-
const BorderColorKeyframeSchema = KeyframesBaseSchema.extend({
|
|
705
|
-
type: zod.z.literal(KeyframeType.BorderColor),
|
|
706
|
-
value: zod.z.object({
|
|
707
|
-
color: zod.z.string()
|
|
708
|
-
})
|
|
747
|
+
const BorderFillKeyframeSchema = KeyframesBaseSchema.extend({
|
|
748
|
+
type: zod.z.literal(KeyframeType.BorderFill),
|
|
749
|
+
value: zod.z.array(FillLayerSchema)
|
|
709
750
|
});
|
|
710
751
|
const OpacityKeyframeSchema = KeyframesBaseSchema.extend({
|
|
711
752
|
type: zod.z.literal(KeyframeType.Opacity),
|
|
@@ -753,14 +794,17 @@ const FXParamsKeyframeSchema = KeyframesBaseSchema.extend({
|
|
|
753
794
|
type: zod.z.literal(KeyframeType.FXParams),
|
|
754
795
|
value: zod.z.record(zod.z.string(), zod.z.number())
|
|
755
796
|
});
|
|
797
|
+
const FillKeyframeSchema = KeyframesBaseSchema.extend({
|
|
798
|
+
type: zod.z.literal(KeyframeType.Fill),
|
|
799
|
+
value: zod.z.array(FillLayerSchema)
|
|
800
|
+
});
|
|
756
801
|
const KeyframeSchema = zod.z.discriminatedUnion("type", [
|
|
757
802
|
DimensionsKeyframeSchema,
|
|
758
803
|
PositionKeyframeSchema,
|
|
759
804
|
RotationKeyframeSchema,
|
|
760
805
|
BorderRadiusKeyframeSchema,
|
|
761
806
|
BorderWidthKeyframeSchema,
|
|
762
|
-
|
|
763
|
-
BorderColorKeyframeSchema,
|
|
807
|
+
BorderFillKeyframeSchema,
|
|
764
808
|
OpacityKeyframeSchema,
|
|
765
809
|
ScaleKeyframeSchema,
|
|
766
810
|
BlurKeyframeSchema,
|
|
@@ -768,7 +812,8 @@ const KeyframeSchema = zod.z.discriminatedUnion("type", [
|
|
|
768
812
|
TextColorKeyframeSchema,
|
|
769
813
|
LetterSpacingKeyframeSchema,
|
|
770
814
|
WordSpacingKeyframeSchema,
|
|
771
|
-
FXParamsKeyframeSchema
|
|
815
|
+
FXParamsKeyframeSchema,
|
|
816
|
+
FillKeyframeSchema
|
|
772
817
|
]);
|
|
773
818
|
const KeyframesSchema = zod.z.array(KeyframeSchema);
|
|
774
819
|
class Client {
|
package/dist/index.mjs
CHANGED
|
@@ -12,6 +12,55 @@ var SectionHeightMode = /* @__PURE__ */ ((SectionHeightMode2) => {
|
|
|
12
12
|
SectionHeightMode2["ViewportHeightUnits"] = "viewport-height-units";
|
|
13
13
|
return SectionHeightMode2;
|
|
14
14
|
})(SectionHeightMode || {});
|
|
15
|
+
const ColorPointSchema = z.object({
|
|
16
|
+
id: z.string(),
|
|
17
|
+
value: z.string(),
|
|
18
|
+
position: z.number()
|
|
19
|
+
});
|
|
20
|
+
const FillLayerSchema = z.discriminatedUnion("type", [
|
|
21
|
+
z.object({
|
|
22
|
+
id: z.string(),
|
|
23
|
+
type: z.literal("solid"),
|
|
24
|
+
value: z.string(),
|
|
25
|
+
blendMode: z.string()
|
|
26
|
+
}),
|
|
27
|
+
z.object({
|
|
28
|
+
id: z.string(),
|
|
29
|
+
type: z.literal("linear-gradient"),
|
|
30
|
+
colors: z.array(ColorPointSchema),
|
|
31
|
+
start: z.tuple([z.number(), z.number()]),
|
|
32
|
+
end: z.tuple([z.number(), z.number()]),
|
|
33
|
+
angle: z.number(),
|
|
34
|
+
blendMode: z.string()
|
|
35
|
+
}),
|
|
36
|
+
z.object({
|
|
37
|
+
id: z.string(),
|
|
38
|
+
type: z.literal("radial-gradient"),
|
|
39
|
+
colors: z.array(ColorPointSchema),
|
|
40
|
+
center: z.tuple([z.number(), z.number()]),
|
|
41
|
+
diameter: z.number(),
|
|
42
|
+
angle: z.number(),
|
|
43
|
+
blendMode: z.string()
|
|
44
|
+
}),
|
|
45
|
+
z.object({
|
|
46
|
+
id: z.string(),
|
|
47
|
+
type: z.literal("conic-gradient"),
|
|
48
|
+
colors: z.array(ColorPointSchema),
|
|
49
|
+
center: z.tuple([z.number(), z.number()]),
|
|
50
|
+
angle: z.number(),
|
|
51
|
+
blendMode: z.string()
|
|
52
|
+
}),
|
|
53
|
+
z.object({
|
|
54
|
+
id: z.string(),
|
|
55
|
+
type: z.literal("image"),
|
|
56
|
+
src: z.string(),
|
|
57
|
+
behavior: z.string(),
|
|
58
|
+
backgroundSize: z.number(),
|
|
59
|
+
opacity: z.number(),
|
|
60
|
+
blendMode: z.string(),
|
|
61
|
+
rotation: z.number().optional()
|
|
62
|
+
})
|
|
63
|
+
]);
|
|
15
64
|
const TransitionSchema = z.object({
|
|
16
65
|
timing: z.string(),
|
|
17
66
|
duration: z.number(),
|
|
@@ -37,13 +86,13 @@ const MediaStateParamsSchema = z.object({
|
|
|
37
86
|
opacity: getStateParamsSchema(z.number()),
|
|
38
87
|
radius: getStateParamsSchema(z.number()),
|
|
39
88
|
strokeWidth: getStateParamsSchema(z.number()),
|
|
40
|
-
|
|
89
|
+
strokeFill: getStateParamsSchema(z.array(FillLayerSchema))
|
|
41
90
|
}).merge(ItemStateBaseSchema);
|
|
42
91
|
const RectangleStateParamsSchema = z.object({
|
|
43
92
|
strokeWidth: getStateParamsSchema(z.number()),
|
|
44
93
|
radius: getStateParamsSchema(z.number()),
|
|
45
|
-
|
|
46
|
-
|
|
94
|
+
fill: getStateParamsSchema(z.array(FillLayerSchema)),
|
|
95
|
+
strokeFill: getStateParamsSchema(z.array(FillLayerSchema)),
|
|
47
96
|
backdropBlur: getStateParamsSchema(z.number())
|
|
48
97
|
}).merge(ItemStateBaseSchema);
|
|
49
98
|
const CustomItemStateParamsSchema = ItemStateBaseSchema;
|
|
@@ -271,7 +320,7 @@ const ImageItemSchema = ItemBaseSchema.extend({
|
|
|
271
320
|
opacity: z.number().nonnegative(),
|
|
272
321
|
radius: z.number(),
|
|
273
322
|
strokeWidth: z.number(),
|
|
274
|
-
|
|
323
|
+
strokeFill: z.array(FillLayerSchema),
|
|
275
324
|
blur: z.number(),
|
|
276
325
|
isDraggable: z.boolean().optional()
|
|
277
326
|
})
|
|
@@ -299,7 +348,7 @@ const VideoItemSchema = ItemBaseSchema.extend({
|
|
|
299
348
|
opacity: z.number().nonnegative(),
|
|
300
349
|
radius: z.number(),
|
|
301
350
|
strokeWidth: z.number(),
|
|
302
|
-
|
|
351
|
+
strokeFill: z.array(FillLayerSchema),
|
|
303
352
|
blur: z.number(),
|
|
304
353
|
isDraggable: z.boolean().optional(),
|
|
305
354
|
play: z.enum(["on-hover", "on-click", "auto"]),
|
|
@@ -325,8 +374,8 @@ const RectangleItemSchema = ItemBaseSchema.extend({
|
|
|
325
374
|
z.object({
|
|
326
375
|
radius: z.number(),
|
|
327
376
|
strokeWidth: z.number(),
|
|
328
|
-
|
|
329
|
-
|
|
377
|
+
fill: z.array(FillLayerSchema),
|
|
378
|
+
strokeFill: z.array(FillLayerSchema),
|
|
330
379
|
blur: z.number(),
|
|
331
380
|
backdropBlur: z.number(),
|
|
332
381
|
blurMode: z.enum(["default", "backdrop"]),
|
|
@@ -626,8 +675,6 @@ var KeyframeType = /* @__PURE__ */ ((KeyframeType2) => {
|
|
|
626
675
|
KeyframeType2["Rotation"] = "rotation";
|
|
627
676
|
KeyframeType2["BorderRadius"] = "border-radius";
|
|
628
677
|
KeyframeType2["BorderWidth"] = "border-width";
|
|
629
|
-
KeyframeType2["Color"] = "color";
|
|
630
|
-
KeyframeType2["BorderColor"] = "border-color";
|
|
631
678
|
KeyframeType2["Opacity"] = "opacity";
|
|
632
679
|
KeyframeType2["Scale"] = "scale";
|
|
633
680
|
KeyframeType2["TextColor"] = "text-color";
|
|
@@ -636,6 +683,8 @@ var KeyframeType = /* @__PURE__ */ ((KeyframeType2) => {
|
|
|
636
683
|
KeyframeType2["Blur"] = "blur";
|
|
637
684
|
KeyframeType2["BackdropBlur"] = "backdrop-blur";
|
|
638
685
|
KeyframeType2["FXParams"] = "fx-params";
|
|
686
|
+
KeyframeType2["BorderFill"] = "border-fill";
|
|
687
|
+
KeyframeType2["Fill"] = "fill";
|
|
639
688
|
return KeyframeType2;
|
|
640
689
|
})(KeyframeType || {});
|
|
641
690
|
const KeyframesBaseSchema = z.object({
|
|
@@ -676,17 +725,9 @@ const BorderWidthKeyframeSchema = KeyframesBaseSchema.extend({
|
|
|
676
725
|
borderWidth: z.number().nonnegative()
|
|
677
726
|
})
|
|
678
727
|
});
|
|
679
|
-
const
|
|
680
|
-
type: z.literal(KeyframeType.
|
|
681
|
-
value: z.
|
|
682
|
-
color: z.string()
|
|
683
|
-
})
|
|
684
|
-
});
|
|
685
|
-
const BorderColorKeyframeSchema = KeyframesBaseSchema.extend({
|
|
686
|
-
type: z.literal(KeyframeType.BorderColor),
|
|
687
|
-
value: z.object({
|
|
688
|
-
color: z.string()
|
|
689
|
-
})
|
|
728
|
+
const BorderFillKeyframeSchema = KeyframesBaseSchema.extend({
|
|
729
|
+
type: z.literal(KeyframeType.BorderFill),
|
|
730
|
+
value: z.array(FillLayerSchema)
|
|
690
731
|
});
|
|
691
732
|
const OpacityKeyframeSchema = KeyframesBaseSchema.extend({
|
|
692
733
|
type: z.literal(KeyframeType.Opacity),
|
|
@@ -734,14 +775,17 @@ const FXParamsKeyframeSchema = KeyframesBaseSchema.extend({
|
|
|
734
775
|
type: z.literal(KeyframeType.FXParams),
|
|
735
776
|
value: z.record(z.string(), z.number())
|
|
736
777
|
});
|
|
778
|
+
const FillKeyframeSchema = KeyframesBaseSchema.extend({
|
|
779
|
+
type: z.literal(KeyframeType.Fill),
|
|
780
|
+
value: z.array(FillLayerSchema)
|
|
781
|
+
});
|
|
737
782
|
const KeyframeSchema = z.discriminatedUnion("type", [
|
|
738
783
|
DimensionsKeyframeSchema,
|
|
739
784
|
PositionKeyframeSchema,
|
|
740
785
|
RotationKeyframeSchema,
|
|
741
786
|
BorderRadiusKeyframeSchema,
|
|
742
787
|
BorderWidthKeyframeSchema,
|
|
743
|
-
|
|
744
|
-
BorderColorKeyframeSchema,
|
|
788
|
+
BorderFillKeyframeSchema,
|
|
745
789
|
OpacityKeyframeSchema,
|
|
746
790
|
ScaleKeyframeSchema,
|
|
747
791
|
BlurKeyframeSchema,
|
|
@@ -749,7 +793,8 @@ const KeyframeSchema = z.discriminatedUnion("type", [
|
|
|
749
793
|
TextColorKeyframeSchema,
|
|
750
794
|
LetterSpacingKeyframeSchema,
|
|
751
795
|
WordSpacingKeyframeSchema,
|
|
752
|
-
FXParamsKeyframeSchema
|
|
796
|
+
FXParamsKeyframeSchema,
|
|
797
|
+
FillKeyframeSchema
|
|
753
798
|
]);
|
|
754
799
|
const KeyframesSchema = z.array(KeyframeSchema);
|
|
755
800
|
class Client {
|
|
@@ -68,12 +68,12 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
68
68
|
color: Record<string, string | null>;
|
|
69
69
|
hidden: Record<string, boolean>;
|
|
70
70
|
position: Record<string, number>;
|
|
71
|
+
id: string;
|
|
71
72
|
height: Record<string, {
|
|
72
73
|
mode: import('../..').SectionHeightMode;
|
|
73
74
|
units: number;
|
|
74
75
|
vhUnits?: number | undefined;
|
|
75
76
|
}>;
|
|
76
|
-
id: string;
|
|
77
77
|
items: import('../..').ItemAny[];
|
|
78
78
|
name?: string | undefined;
|
|
79
79
|
media?: Record<string, {
|
|
@@ -95,12 +95,12 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
95
95
|
color: Record<string, string | null>;
|
|
96
96
|
hidden: Record<string, boolean>;
|
|
97
97
|
position: Record<string, number>;
|
|
98
|
+
id: string;
|
|
98
99
|
height: Record<string, {
|
|
99
100
|
mode: import('../..').SectionHeightMode;
|
|
100
101
|
units: number;
|
|
101
102
|
vhUnits?: number | undefined;
|
|
102
103
|
}>;
|
|
103
|
-
id: string;
|
|
104
104
|
items: import('../..').ItemAny[];
|
|
105
105
|
name?: string | undefined;
|
|
106
106
|
media?: Record<string, {
|
|
@@ -227,12 +227,12 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
227
227
|
color: Record<string, string | null>;
|
|
228
228
|
hidden: Record<string, boolean>;
|
|
229
229
|
position: Record<string, number>;
|
|
230
|
+
id: string;
|
|
230
231
|
height: Record<string, {
|
|
231
232
|
mode: import('../..').SectionHeightMode;
|
|
232
233
|
units: number;
|
|
233
234
|
vhUnits?: number | undefined;
|
|
234
235
|
}>;
|
|
235
|
-
id: string;
|
|
236
236
|
items: import('../..').ItemAny[];
|
|
237
237
|
name?: string | undefined;
|
|
238
238
|
media?: Record<string, {
|
|
@@ -279,12 +279,12 @@ export declare const ArticleSchema: z.ZodObject<{
|
|
|
279
279
|
color: Record<string, string | null>;
|
|
280
280
|
hidden: Record<string, boolean>;
|
|
281
281
|
position: Record<string, number>;
|
|
282
|
+
id: string;
|
|
282
283
|
height: Record<string, {
|
|
283
284
|
mode: import('../..').SectionHeightMode;
|
|
284
285
|
units: number;
|
|
285
286
|
vhUnits?: number | undefined;
|
|
286
287
|
}>;
|
|
287
|
-
id: string;
|
|
288
288
|
items: import('../..').ItemAny[];
|
|
289
289
|
name?: string | undefined;
|
|
290
290
|
media?: Record<string, {
|
|
@@ -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
|
+
]);
|
|
@@ -5,36 +5,36 @@ export declare const FXControlSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
5
5
|
shaderParam: z.ZodString;
|
|
6
6
|
value: z.ZodNumber;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
type: "float";
|
|
9
8
|
value: number;
|
|
9
|
+
type: "float";
|
|
10
10
|
shaderParam: string;
|
|
11
11
|
}, {
|
|
12
|
-
type: "float";
|
|
13
12
|
value: number;
|
|
13
|
+
type: "float";
|
|
14
14
|
shaderParam: string;
|
|
15
15
|
}>, z.ZodObject<{
|
|
16
16
|
type: z.ZodLiteral<"int">;
|
|
17
17
|
shaderParam: z.ZodString;
|
|
18
18
|
value: z.ZodNumber;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
type: "int";
|
|
21
20
|
value: number;
|
|
21
|
+
type: "int";
|
|
22
22
|
shaderParam: string;
|
|
23
23
|
}, {
|
|
24
|
-
type: "int";
|
|
25
24
|
value: number;
|
|
25
|
+
type: "int";
|
|
26
26
|
shaderParam: string;
|
|
27
27
|
}>, z.ZodObject<{
|
|
28
28
|
type: z.ZodLiteral<"vec2">;
|
|
29
29
|
shaderParam: z.ZodString;
|
|
30
30
|
value: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
type: "vec2";
|
|
33
32
|
value: [number, number];
|
|
33
|
+
type: "vec2";
|
|
34
34
|
shaderParam: string;
|
|
35
35
|
}, {
|
|
36
|
-
type: "vec2";
|
|
37
36
|
value: [number, number];
|
|
37
|
+
type: "vec2";
|
|
38
38
|
shaderParam: string;
|
|
39
39
|
}>]>;
|
|
40
40
|
export declare const ItemSchema: ZodType<ItemAny>;
|