@webstudio-is/sdk 0.210.0 → 0.213.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.
@@ -5064,6 +5064,30 @@ export type PresetStyleDecl = Simplify<Omit<z.infer<typeof PresetStyleDecl>, "pr
5064
5064
  export type PresetStyle<Tag extends HtmlTags = HtmlTags> = Partial<Record<Tag, PresetStyleDecl[]>>;
5065
5065
  declare const WsComponentPropsMeta: z.ZodObject<{
5066
5066
  props: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
5067
+ control: z.ZodLiteral<"tag">;
5068
+ type: z.ZodLiteral<"string">;
5069
+ defaultValue: z.ZodOptional<z.ZodUndefined>;
5070
+ options: z.ZodArray<z.ZodString, "many">;
5071
+ label: z.ZodOptional<z.ZodString>;
5072
+ description: z.ZodOptional<z.ZodString>;
5073
+ required: z.ZodBoolean;
5074
+ }, "strip", z.ZodTypeAny, {
5075
+ options: string[];
5076
+ type: "string";
5077
+ required: boolean;
5078
+ control: "tag";
5079
+ label?: string | undefined;
5080
+ defaultValue?: undefined;
5081
+ description?: string | undefined;
5082
+ }, {
5083
+ options: string[];
5084
+ type: "string";
5085
+ required: boolean;
5086
+ control: "tag";
5087
+ label?: string | undefined;
5088
+ defaultValue?: undefined;
5089
+ description?: string | undefined;
5090
+ }>, z.ZodObject<{
5067
5091
  control: z.ZodLiteral<"number">;
5068
5092
  type: z.ZodLiteral<"number">;
5069
5093
  defaultValue: z.ZodOptional<z.ZodNumber>;
@@ -5535,6 +5559,14 @@ declare const WsComponentPropsMeta: z.ZodObject<{
5535
5559
  initialProps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
5536
5560
  }, "strip", z.ZodTypeAny, {
5537
5561
  props: Record<string, {
5562
+ options: string[];
5563
+ type: "string";
5564
+ required: boolean;
5565
+ control: "tag";
5566
+ label?: string | undefined;
5567
+ defaultValue?: undefined;
5568
+ description?: string | undefined;
5569
+ } | {
5538
5570
  type: "number";
5539
5571
  required: boolean;
5540
5572
  control: "number";
@@ -5694,6 +5726,14 @@ declare const WsComponentPropsMeta: z.ZodObject<{
5694
5726
  initialProps?: string[] | undefined;
5695
5727
  }, {
5696
5728
  props: Record<string, {
5729
+ options: string[];
5730
+ type: "string";
5731
+ required: boolean;
5732
+ control: "tag";
5733
+ label?: string | undefined;
5734
+ defaultValue?: undefined;
5735
+ description?: string | undefined;
5736
+ } | {
5697
5737
  type: "number";
5698
5738
  required: boolean;
5699
5739
  control: "number";
@@ -5870,6 +5910,24 @@ export declare const ComponentState: z.ZodObject<{
5870
5910
  }>;
5871
5911
  export type ComponentState = z.infer<typeof ComponentState>;
5872
5912
  export declare const defaultStates: ComponentState[];
5913
+ export declare const ContentModel: z.ZodObject<{
5914
+ category: z.ZodUnion<[z.ZodLiteral<"instance">, z.ZodLiteral<"none">]>;
5915
+ /**
5916
+ * transparent - pass through possible children from parent
5917
+ * rich-text - can be edited as rich text
5918
+ * instance - other instances accepted
5919
+ * empty - no children accepted
5920
+ * ComponentName - accept specific components with none category
5921
+ */
5922
+ children: z.ZodArray<z.ZodType<"instance" | (string & {}) | "transparent" | "rich-text" | "empty", z.ZodTypeDef, "instance" | (string & {}) | "transparent" | "rich-text" | "empty">, "many">;
5923
+ }, "strip", z.ZodTypeAny, {
5924
+ children: ("instance" | (string & {}) | "transparent" | "rich-text" | "empty")[];
5925
+ category: "none" | "instance";
5926
+ }, {
5927
+ children: ("instance" | (string & {}) | "transparent" | "rich-text" | "empty")[];
5928
+ category: "none" | "instance";
5929
+ }>;
5930
+ export type ContentModel = z.infer<typeof ContentModel>;
5873
5931
  export declare const WsComponentMeta: z.ZodObject<{
5874
5932
  category: z.ZodOptional<z.ZodEnum<["general", "typography", "media", "animations", "data", "forms", "localization", "radix", "xml", "hidden", "internal"]>>;
5875
5933
  type: z.ZodEnum<["container", "control", "embed", "rich-text-child"]>;
@@ -5915,14 +5973,14 @@ export declare const WsComponentMeta: z.ZodObject<{
5915
5973
  text: z.ZodOptional<z.ZodLiteral<false>>;
5916
5974
  }, "strip", z.ZodTypeAny, {
5917
5975
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
5918
- text?: false | undefined;
5919
- component?: {
5976
+ tag?: {
5920
5977
  $eq?: string | undefined;
5921
5978
  $neq?: string | undefined;
5922
5979
  $in?: string[] | undefined;
5923
5980
  $nin?: string[] | undefined;
5924
5981
  } | undefined;
5925
- tag?: {
5982
+ text?: false | undefined;
5983
+ component?: {
5926
5984
  $eq?: string | undefined;
5927
5985
  $neq?: string | undefined;
5928
5986
  $in?: string[] | undefined;
@@ -5930,14 +5988,14 @@ export declare const WsComponentMeta: z.ZodObject<{
5930
5988
  } | undefined;
5931
5989
  }, {
5932
5990
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
5933
- text?: false | undefined;
5934
- component?: {
5991
+ tag?: {
5935
5992
  $eq?: string | undefined;
5936
5993
  $neq?: string | undefined;
5937
5994
  $in?: string[] | undefined;
5938
5995
  $nin?: string[] | undefined;
5939
5996
  } | undefined;
5940
- tag?: {
5997
+ text?: false | undefined;
5998
+ component?: {
5941
5999
  $eq?: string | undefined;
5942
6000
  $neq?: string | undefined;
5943
6001
  $in?: string[] | undefined;
@@ -5980,14 +6038,14 @@ export declare const WsComponentMeta: z.ZodObject<{
5980
6038
  text: z.ZodOptional<z.ZodLiteral<false>>;
5981
6039
  }, "strip", z.ZodTypeAny, {
5982
6040
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
5983
- text?: false | undefined;
5984
- component?: {
6041
+ tag?: {
5985
6042
  $eq?: string | undefined;
5986
6043
  $neq?: string | undefined;
5987
6044
  $in?: string[] | undefined;
5988
6045
  $nin?: string[] | undefined;
5989
6046
  } | undefined;
5990
- tag?: {
6047
+ text?: false | undefined;
6048
+ component?: {
5991
6049
  $eq?: string | undefined;
5992
6050
  $neq?: string | undefined;
5993
6051
  $in?: string[] | undefined;
@@ -5995,20 +6053,37 @@ export declare const WsComponentMeta: z.ZodObject<{
5995
6053
  } | undefined;
5996
6054
  }, {
5997
6055
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
5998
- text?: false | undefined;
5999
- component?: {
6056
+ tag?: {
6000
6057
  $eq?: string | undefined;
6001
6058
  $neq?: string | undefined;
6002
6059
  $in?: string[] | undefined;
6003
6060
  $nin?: string[] | undefined;
6004
6061
  } | undefined;
6005
- tag?: {
6062
+ text?: false | undefined;
6063
+ component?: {
6006
6064
  $eq?: string | undefined;
6007
6065
  $neq?: string | undefined;
6008
6066
  $in?: string[] | undefined;
6009
6067
  $nin?: string[] | undefined;
6010
6068
  } | undefined;
6011
6069
  }>, "many">]>>;
6070
+ contentModel: z.ZodOptional<z.ZodObject<{
6071
+ category: z.ZodUnion<[z.ZodLiteral<"instance">, z.ZodLiteral<"none">]>;
6072
+ /**
6073
+ * transparent - pass through possible children from parent
6074
+ * rich-text - can be edited as rich text
6075
+ * instance - other instances accepted
6076
+ * empty - no children accepted
6077
+ * ComponentName - accept specific components with none category
6078
+ */
6079
+ children: z.ZodArray<z.ZodType<"instance" | (string & {}) | "transparent" | "rich-text" | "empty", z.ZodTypeDef, "instance" | (string & {}) | "transparent" | "rich-text" | "empty">, "many">;
6080
+ }, "strip", z.ZodTypeAny, {
6081
+ children: ("instance" | (string & {}) | "transparent" | "rich-text" | "empty")[];
6082
+ category: "none" | "instance";
6083
+ }, {
6084
+ children: ("instance" | (string & {}) | "transparent" | "rich-text" | "empty")[];
6085
+ category: "none" | "instance";
6086
+ }>>;
6012
6087
  indexWithinAncestor: z.ZodOptional<z.ZodString>;
6013
6088
  label: z.ZodOptional<z.ZodString>;
6014
6089
  description: z.ZodOptional<z.ZodString>;
@@ -11098,14 +11173,14 @@ export declare const WsComponentMeta: z.ZodObject<{
11098
11173
  category?: "hidden" | "data" | "media" | "general" | "typography" | "animations" | "forms" | "localization" | "radix" | "xml" | "internal" | undefined;
11099
11174
  constraints?: {
11100
11175
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
11101
- text?: false | undefined;
11102
- component?: {
11176
+ tag?: {
11103
11177
  $eq?: string | undefined;
11104
11178
  $neq?: string | undefined;
11105
11179
  $in?: string[] | undefined;
11106
11180
  $nin?: string[] | undefined;
11107
11181
  } | undefined;
11108
- tag?: {
11182
+ text?: false | undefined;
11183
+ component?: {
11109
11184
  $eq?: string | undefined;
11110
11185
  $neq?: string | undefined;
11111
11186
  $in?: string[] | undefined;
@@ -11113,20 +11188,24 @@ export declare const WsComponentMeta: z.ZodObject<{
11113
11188
  } | undefined;
11114
11189
  } | {
11115
11190
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
11116
- text?: false | undefined;
11117
- component?: {
11191
+ tag?: {
11118
11192
  $eq?: string | undefined;
11119
11193
  $neq?: string | undefined;
11120
11194
  $in?: string[] | undefined;
11121
11195
  $nin?: string[] | undefined;
11122
11196
  } | undefined;
11123
- tag?: {
11197
+ text?: false | undefined;
11198
+ component?: {
11124
11199
  $eq?: string | undefined;
11125
11200
  $neq?: string | undefined;
11126
11201
  $in?: string[] | undefined;
11127
11202
  $nin?: string[] | undefined;
11128
11203
  } | undefined;
11129
11204
  }[] | undefined;
11205
+ contentModel?: {
11206
+ children: ("instance" | (string & {}) | "transparent" | "rich-text" | "empty")[];
11207
+ category: "none" | "instance";
11208
+ } | undefined;
11130
11209
  indexWithinAncestor?: string | undefined;
11131
11210
  presetStyle?: Record<string, {
11132
11211
  value: {
@@ -11749,14 +11828,14 @@ export declare const WsComponentMeta: z.ZodObject<{
11749
11828
  category?: "hidden" | "data" | "media" | "general" | "typography" | "animations" | "forms" | "localization" | "radix" | "xml" | "internal" | undefined;
11750
11829
  constraints?: {
11751
11830
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
11752
- text?: false | undefined;
11753
- component?: {
11831
+ tag?: {
11754
11832
  $eq?: string | undefined;
11755
11833
  $neq?: string | undefined;
11756
11834
  $in?: string[] | undefined;
11757
11835
  $nin?: string[] | undefined;
11758
11836
  } | undefined;
11759
- tag?: {
11837
+ text?: false | undefined;
11838
+ component?: {
11760
11839
  $eq?: string | undefined;
11761
11840
  $neq?: string | undefined;
11762
11841
  $in?: string[] | undefined;
@@ -11764,20 +11843,24 @@ export declare const WsComponentMeta: z.ZodObject<{
11764
11843
  } | undefined;
11765
11844
  } | {
11766
11845
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
11767
- text?: false | undefined;
11768
- component?: {
11846
+ tag?: {
11769
11847
  $eq?: string | undefined;
11770
11848
  $neq?: string | undefined;
11771
11849
  $in?: string[] | undefined;
11772
11850
  $nin?: string[] | undefined;
11773
11851
  } | undefined;
11774
- tag?: {
11852
+ text?: false | undefined;
11853
+ component?: {
11775
11854
  $eq?: string | undefined;
11776
11855
  $neq?: string | undefined;
11777
11856
  $in?: string[] | undefined;
11778
11857
  $nin?: string[] | undefined;
11779
11858
  } | undefined;
11780
11859
  }[] | undefined;
11860
+ contentModel?: {
11861
+ children: ("instance" | (string & {}) | "transparent" | "rich-text" | "empty")[];
11862
+ category: "none" | "instance";
11863
+ } | undefined;
11781
11864
  indexWithinAncestor?: string | undefined;
11782
11865
  presetStyle?: Record<string, {
11783
11866
  value: {
@@ -70,6 +70,7 @@ export declare const Instance: z.ZodObject<{
70
70
  type: z.ZodLiteral<"instance">;
71
71
  id: z.ZodString;
72
72
  component: z.ZodString;
73
+ tag: z.ZodOptional<z.ZodString>;
73
74
  label: z.ZodOptional<z.ZodString>;
74
75
  children: z.ZodArray<z.ZodUnion<[z.ZodObject<{
75
76
  type: z.ZodLiteral<"id">;
@@ -118,6 +119,7 @@ export declare const Instance: z.ZodObject<{
118
119
  type: "expression";
119
120
  })[];
120
121
  label?: string | undefined;
122
+ tag?: string | undefined;
121
123
  }, {
122
124
  type: "instance";
123
125
  id: string;
@@ -134,12 +136,14 @@ export declare const Instance: z.ZodObject<{
134
136
  type: "expression";
135
137
  })[];
136
138
  label?: string | undefined;
139
+ tag?: string | undefined;
137
140
  }>;
138
141
  export type Instance = z.infer<typeof Instance>;
139
142
  export declare const Instances: z.ZodMap<z.ZodString, z.ZodObject<{
140
143
  type: z.ZodLiteral<"instance">;
141
144
  id: z.ZodString;
142
145
  component: z.ZodString;
146
+ tag: z.ZodOptional<z.ZodString>;
143
147
  label: z.ZodOptional<z.ZodString>;
144
148
  children: z.ZodArray<z.ZodUnion<[z.ZodObject<{
145
149
  type: z.ZodLiteral<"id">;
@@ -188,6 +192,7 @@ export declare const Instances: z.ZodMap<z.ZodString, z.ZodObject<{
188
192
  type: "expression";
189
193
  })[];
190
194
  label?: string | undefined;
195
+ tag?: string | undefined;
191
196
  }, {
192
197
  type: "instance";
193
198
  id: string;
@@ -204,6 +209,7 @@ export declare const Instances: z.ZodMap<z.ZodString, z.ZodObject<{
204
209
  type: "expression";
205
210
  })[];
206
211
  label?: string | undefined;
212
+ tag?: string | undefined;
207
213
  }>>;
208
214
  export type Instances = z.infer<typeof Instances>;
209
215
  export declare const MatcherRelation: z.ZodUnion<[z.ZodLiteral<"ancestor">, z.ZodLiteral<"parent">, z.ZodLiteral<"self">, z.ZodLiteral<"child">, z.ZodLiteral<"descendant">]>;
@@ -262,14 +268,14 @@ export declare const Matcher: z.ZodObject<{
262
268
  text: z.ZodOptional<z.ZodLiteral<false>>;
263
269
  }, "strip", z.ZodTypeAny, {
264
270
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
265
- text?: false | undefined;
266
- component?: {
271
+ tag?: {
267
272
  $eq?: string | undefined;
268
273
  $neq?: string | undefined;
269
274
  $in?: string[] | undefined;
270
275
  $nin?: string[] | undefined;
271
276
  } | undefined;
272
- tag?: {
277
+ text?: false | undefined;
278
+ component?: {
273
279
  $eq?: string | undefined;
274
280
  $neq?: string | undefined;
275
281
  $in?: string[] | undefined;
@@ -277,14 +283,14 @@ export declare const Matcher: z.ZodObject<{
277
283
  } | undefined;
278
284
  }, {
279
285
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
280
- text?: false | undefined;
281
- component?: {
286
+ tag?: {
282
287
  $eq?: string | undefined;
283
288
  $neq?: string | undefined;
284
289
  $in?: string[] | undefined;
285
290
  $nin?: string[] | undefined;
286
291
  } | undefined;
287
- tag?: {
292
+ text?: false | undefined;
293
+ component?: {
288
294
  $eq?: string | undefined;
289
295
  $neq?: string | undefined;
290
296
  $in?: string[] | undefined;
@@ -329,14 +335,14 @@ export declare const Matchers: z.ZodUnion<[z.ZodObject<{
329
335
  text: z.ZodOptional<z.ZodLiteral<false>>;
330
336
  }, "strip", z.ZodTypeAny, {
331
337
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
332
- text?: false | undefined;
333
- component?: {
338
+ tag?: {
334
339
  $eq?: string | undefined;
335
340
  $neq?: string | undefined;
336
341
  $in?: string[] | undefined;
337
342
  $nin?: string[] | undefined;
338
343
  } | undefined;
339
- tag?: {
344
+ text?: false | undefined;
345
+ component?: {
340
346
  $eq?: string | undefined;
341
347
  $neq?: string | undefined;
342
348
  $in?: string[] | undefined;
@@ -344,14 +350,14 @@ export declare const Matchers: z.ZodUnion<[z.ZodObject<{
344
350
  } | undefined;
345
351
  }, {
346
352
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
347
- text?: false | undefined;
348
- component?: {
353
+ tag?: {
349
354
  $eq?: string | undefined;
350
355
  $neq?: string | undefined;
351
356
  $in?: string[] | undefined;
352
357
  $nin?: string[] | undefined;
353
358
  } | undefined;
354
- tag?: {
359
+ text?: false | undefined;
360
+ component?: {
355
361
  $eq?: string | undefined;
356
362
  $neq?: string | undefined;
357
363
  $in?: string[] | undefined;
@@ -394,14 +400,14 @@ export declare const Matchers: z.ZodUnion<[z.ZodObject<{
394
400
  text: z.ZodOptional<z.ZodLiteral<false>>;
395
401
  }, "strip", z.ZodTypeAny, {
396
402
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
397
- text?: false | undefined;
398
- component?: {
403
+ tag?: {
399
404
  $eq?: string | undefined;
400
405
  $neq?: string | undefined;
401
406
  $in?: string[] | undefined;
402
407
  $nin?: string[] | undefined;
403
408
  } | undefined;
404
- tag?: {
409
+ text?: false | undefined;
410
+ component?: {
405
411
  $eq?: string | undefined;
406
412
  $neq?: string | undefined;
407
413
  $in?: string[] | undefined;
@@ -409,14 +415,14 @@ export declare const Matchers: z.ZodUnion<[z.ZodObject<{
409
415
  } | undefined;
410
416
  }, {
411
417
  relation: "ancestor" | "parent" | "self" | "child" | "descendant";
412
- text?: false | undefined;
413
- component?: {
418
+ tag?: {
414
419
  $eq?: string | undefined;
415
420
  $neq?: string | undefined;
416
421
  $in?: string[] | undefined;
417
422
  $nin?: string[] | undefined;
418
423
  } | undefined;
419
- tag?: {
424
+ text?: false | undefined;
425
+ component?: {
420
426
  $eq?: string | undefined;
421
427
  $neq?: string | undefined;
422
428
  $in?: string[] | undefined;
@@ -27,6 +27,7 @@ export declare const PageTitle: z.ZodEffects<z.ZodString, string, string>;
27
27
  export declare const documentTypes: readonly ["html", "xml"];
28
28
  export declare const HomePagePath: z.ZodEffects<z.ZodString, "", string>;
29
29
  export declare const PagePath: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
30
+ export declare const OldPagePath: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
30
31
  declare const Page: z.ZodObject<{
31
32
  path: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>, string, string>;
32
33
  id: z.ZodString;
@@ -1,5 +1,29 @@
1
1
  import { z } from "zod";
2
2
  export declare const PropMeta: z.ZodUnion<[z.ZodObject<{
3
+ control: z.ZodLiteral<"tag">;
4
+ type: z.ZodLiteral<"string">;
5
+ defaultValue: z.ZodOptional<z.ZodUndefined>;
6
+ options: z.ZodArray<z.ZodString, "many">;
7
+ label: z.ZodOptional<z.ZodString>;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ required: z.ZodBoolean;
10
+ }, "strip", z.ZodTypeAny, {
11
+ options: string[];
12
+ type: "string";
13
+ required: boolean;
14
+ control: "tag";
15
+ label?: string | undefined;
16
+ defaultValue?: undefined;
17
+ description?: string | undefined;
18
+ }, {
19
+ options: string[];
20
+ type: "string";
21
+ required: boolean;
22
+ control: "tag";
23
+ label?: string | undefined;
24
+ defaultValue?: undefined;
25
+ description?: string | undefined;
26
+ }>, z.ZodObject<{
3
27
  control: z.ZodLiteral<"number">;
4
28
  type: z.ZodLiteral<"number">;
5
29
  defaultValue: z.ZodOptional<z.ZodNumber>;