@webstudio-is/sdk 0.275.0 → 0.276.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.
@@ -44,32 +44,39 @@ export declare const webstudioFragment: z.ZodObject<{
44
44
  }, z.core.$strip>]>>;
45
45
  }, z.core.$strip>>;
46
46
  assets: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
47
+ id: z.ZodString;
48
+ projectId: z.ZodString;
49
+ size: z.ZodNumber;
50
+ name: z.ZodString;
51
+ filename: z.ZodOptional<z.ZodString>;
52
+ description: z.ZodUnion<readonly [z.ZodOptional<z.ZodString>, z.ZodNull]>;
53
+ createdAt: z.ZodString;
47
54
  format: z.ZodUnion<readonly [z.ZodLiteral<"ttf">, z.ZodLiteral<"woff">, z.ZodLiteral<"woff2">]>;
48
55
  meta: z.ZodUnion<readonly [z.ZodObject<{
49
56
  family: z.ZodString;
50
57
  style: z.ZodEnum<{
51
- normal: "normal";
52
58
  italic: "italic";
59
+ normal: "normal";
53
60
  oblique: "oblique";
54
61
  }>;
55
62
  weight: z.ZodNumber;
56
63
  }, z.core.$strip>, z.ZodObject<{
57
64
  family: z.ZodString;
58
65
  variationAxes: z.ZodRecord<z.ZodEnum<{
59
- wght: "wght";
60
- wdth: "wdth";
61
- slnt: "slnt";
62
- opsz: "opsz";
63
- ital: "ital";
64
66
  GRAD: "GRAD";
65
- XTRA: "XTRA";
66
67
  XOPQ: "XOPQ";
68
+ XTRA: "XTRA";
67
69
  YOPQ: "YOPQ";
68
- YTLC: "YTLC";
69
- YTUC: "YTUC";
70
70
  YTAS: "YTAS";
71
71
  YTDE: "YTDE";
72
72
  YTFI: "YTFI";
73
+ YTLC: "YTLC";
74
+ YTUC: "YTUC";
75
+ ital: "ital";
76
+ opsz: "opsz";
77
+ slnt: "slnt";
78
+ wdth: "wdth";
79
+ wght: "wght";
73
80
  }> & z.core.$partial, z.ZodObject<{
74
81
  name: z.ZodString;
75
82
  min: z.ZodNumber;
@@ -78,6 +85,7 @@ export declare const webstudioFragment: z.ZodObject<{
78
85
  }, z.core.$strip>>;
79
86
  }, z.core.$strip>]>;
80
87
  type: z.ZodLiteral<"font">;
88
+ }, z.core.$strip>, z.ZodObject<{
81
89
  id: z.ZodString;
82
90
  projectId: z.ZodString;
83
91
  size: z.ZodNumber;
@@ -85,13 +93,13 @@ export declare const webstudioFragment: z.ZodObject<{
85
93
  filename: z.ZodOptional<z.ZodString>;
86
94
  description: z.ZodUnion<readonly [z.ZodOptional<z.ZodString>, z.ZodNull]>;
87
95
  createdAt: z.ZodString;
88
- }, z.core.$strip>, z.ZodObject<{
89
96
  format: z.ZodString;
90
97
  meta: z.ZodObject<{
91
98
  width: z.ZodNumber;
92
99
  height: z.ZodNumber;
93
100
  }, z.core.$strip>;
94
101
  type: z.ZodLiteral<"image">;
102
+ }, z.core.$strip>, z.ZodObject<{
95
103
  id: z.ZodString;
96
104
  projectId: z.ZodString;
97
105
  size: z.ZodNumber;
@@ -99,17 +107,9 @@ export declare const webstudioFragment: z.ZodObject<{
99
107
  filename: z.ZodOptional<z.ZodString>;
100
108
  description: z.ZodUnion<readonly [z.ZodOptional<z.ZodString>, z.ZodNull]>;
101
109
  createdAt: z.ZodString;
102
- }, z.core.$strip>, z.ZodObject<{
103
110
  format: z.ZodString;
104
111
  meta: z.ZodObject<{}, z.core.$strip>;
105
112
  type: z.ZodLiteral<"file">;
106
- id: z.ZodString;
107
- projectId: z.ZodString;
108
- size: z.ZodNumber;
109
- name: z.ZodString;
110
- filename: z.ZodOptional<z.ZodString>;
111
- description: z.ZodUnion<readonly [z.ZodOptional<z.ZodString>, z.ZodNull]>;
112
- createdAt: z.ZodString;
113
113
  }, z.core.$strip>]>>;
114
114
  dataSources: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
115
115
  type: z.ZodLiteral<"variable">;
@@ -132,8 +132,8 @@ export declare const webstudioFragment: z.ZodObject<{
132
132
  type: z.ZodLiteral<"json">;
133
133
  value: z.ZodOptional<z.ZodUnknown>;
134
134
  }, z.core.$strip>, z.ZodTransform<{
135
- value: {} | null;
136
135
  type: "json";
136
+ value: {} | null;
137
137
  }, {
138
138
  type: "json";
139
139
  value?: unknown;
@@ -167,90 +167,94 @@ export declare const webstudioFragment: z.ZodObject<{
167
167
  body: z.ZodOptional<z.ZodString>;
168
168
  }, z.core.$strip>>;
169
169
  props: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
170
+ id: z.ZodString;
171
+ instanceId: z.ZodString;
172
+ name: z.ZodString;
173
+ required: z.ZodOptional<z.ZodBoolean>;
170
174
  type: z.ZodLiteral<"number">;
171
175
  value: z.ZodNumber;
176
+ }, z.core.$strip>, z.ZodObject<{
172
177
  id: z.ZodString;
173
178
  instanceId: z.ZodString;
174
179
  name: z.ZodString;
175
180
  required: z.ZodOptional<z.ZodBoolean>;
176
- }, z.core.$strip>, z.ZodObject<{
177
181
  type: z.ZodLiteral<"string">;
178
182
  value: z.ZodString;
183
+ }, z.core.$strip>, z.ZodObject<{
179
184
  id: z.ZodString;
180
185
  instanceId: z.ZodString;
181
186
  name: z.ZodString;
182
187
  required: z.ZodOptional<z.ZodBoolean>;
183
- }, z.core.$strip>, z.ZodObject<{
184
188
  type: z.ZodLiteral<"boolean">;
185
189
  value: z.ZodBoolean;
190
+ }, z.core.$strip>, z.ZodObject<{
186
191
  id: z.ZodString;
187
192
  instanceId: z.ZodString;
188
193
  name: z.ZodString;
189
194
  required: z.ZodOptional<z.ZodBoolean>;
190
- }, z.core.$strip>, z.ZodObject<{
191
195
  type: z.ZodLiteral<"json">;
192
196
  value: z.ZodUnknown;
197
+ }, z.core.$strip>, z.ZodObject<{
193
198
  id: z.ZodString;
194
199
  instanceId: z.ZodString;
195
200
  name: z.ZodString;
196
201
  required: z.ZodOptional<z.ZodBoolean>;
197
- }, z.core.$strip>, z.ZodObject<{
198
202
  type: z.ZodLiteral<"asset">;
199
203
  value: z.ZodString;
204
+ }, z.core.$strip>, z.ZodObject<{
200
205
  id: z.ZodString;
201
206
  instanceId: z.ZodString;
202
207
  name: z.ZodString;
203
208
  required: z.ZodOptional<z.ZodBoolean>;
204
- }, z.core.$strip>, z.ZodObject<{
205
209
  type: z.ZodLiteral<"page">;
206
210
  value: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
207
211
  pageId: z.ZodString;
208
212
  instanceId: z.ZodString;
209
213
  }, z.core.$strip>]>;
214
+ }, z.core.$strip>, z.ZodObject<{
210
215
  id: z.ZodString;
211
216
  instanceId: z.ZodString;
212
217
  name: z.ZodString;
213
218
  required: z.ZodOptional<z.ZodBoolean>;
214
- }, z.core.$strip>, z.ZodObject<{
215
219
  type: z.ZodLiteral<"string[]">;
216
220
  value: z.ZodArray<z.ZodString>;
221
+ }, z.core.$strip>, z.ZodObject<{
217
222
  id: z.ZodString;
218
223
  instanceId: z.ZodString;
219
224
  name: z.ZodString;
220
225
  required: z.ZodOptional<z.ZodBoolean>;
221
- }, z.core.$strip>, z.ZodObject<{
222
226
  type: z.ZodLiteral<"parameter">;
223
227
  value: z.ZodString;
228
+ }, z.core.$strip>, z.ZodObject<{
224
229
  id: z.ZodString;
225
230
  instanceId: z.ZodString;
226
231
  name: z.ZodString;
227
232
  required: z.ZodOptional<z.ZodBoolean>;
228
- }, z.core.$strip>, z.ZodObject<{
229
233
  type: z.ZodLiteral<"resource">;
230
234
  value: z.ZodString;
235
+ }, z.core.$strip>, z.ZodObject<{
231
236
  id: z.ZodString;
232
237
  instanceId: z.ZodString;
233
238
  name: z.ZodString;
234
239
  required: z.ZodOptional<z.ZodBoolean>;
235
- }, z.core.$strip>, z.ZodObject<{
236
240
  type: z.ZodLiteral<"expression">;
237
241
  value: z.ZodString;
242
+ }, z.core.$strip>, z.ZodObject<{
238
243
  id: z.ZodString;
239
244
  instanceId: z.ZodString;
240
245
  name: z.ZodString;
241
246
  required: z.ZodOptional<z.ZodBoolean>;
242
- }, z.core.$strip>, z.ZodObject<{
243
247
  type: z.ZodLiteral<"action">;
244
248
  value: z.ZodArray<z.ZodObject<{
245
249
  type: z.ZodLiteral<"execute">;
246
250
  args: z.ZodArray<z.ZodString>;
247
251
  code: z.ZodString;
248
252
  }, z.core.$strip>>;
253
+ }, z.core.$strip>, z.ZodObject<{
249
254
  id: z.ZodString;
250
255
  instanceId: z.ZodString;
251
256
  name: z.ZodString;
252
257
  required: z.ZodOptional<z.ZodBoolean>;
253
- }, z.core.$strip>, z.ZodObject<{
254
258
  type: z.ZodLiteral<"animationAction">;
255
259
  value: z.ZodDiscriminatedUnion<[z.ZodObject<{
256
260
  type: z.ZodLiteral<"scroll">;
@@ -891,7 +895,7 @@ export declare const webstudioFragment: z.ZodObject<{
891
895
  duration: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
892
896
  type: z.ZodLiteral<"unit">;
893
897
  value: z.ZodNumber;
894
- unit: z.ZodUnion<[z.ZodLiteral<"ms">, z.ZodLiteral<"s">, ...z.ZodLiteral<"s" | "ms">[]]>;
898
+ unit: z.ZodUnion<[z.ZodLiteral<"ms">, z.ZodLiteral<"s">, ...z.ZodLiteral<"ms" | "s">[]]>;
895
899
  }, z.core.$strip>, z.ZodObject<{
896
900
  type: z.ZodLiteral<"var">;
897
901
  value: z.ZodString;
@@ -899,7 +903,7 @@ export declare const webstudioFragment: z.ZodObject<{
899
903
  delay: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
900
904
  type: z.ZodLiteral<"unit">;
901
905
  value: z.ZodNumber;
902
- unit: z.ZodUnion<[z.ZodLiteral<"ms">, z.ZodLiteral<"s">, ...z.ZodLiteral<"s" | "ms">[]]>;
906
+ unit: z.ZodUnion<[z.ZodLiteral<"ms">, z.ZodLiteral<"s">, ...z.ZodLiteral<"ms" | "s">[]]>;
903
907
  }, z.core.$strip>, z.ZodObject<{
904
908
  type: z.ZodLiteral<"var">;
905
909
  value: z.ZodString;
@@ -908,7 +912,7 @@ export declare const webstudioFragment: z.ZodObject<{
908
912
  rangeStart: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"start">, z.ZodLiteral<"end">]>, z.ZodUnion<readonly [z.ZodObject<{
909
913
  type: z.ZodLiteral<"unit">;
910
914
  value: z.ZodNumber;
911
- unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"in" | "%" | "cm" | "mm" | "q" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax">[]]>;
915
+ unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"%" | "cap" | "ch" | "cm" | "dvb" | "dvh" | "dvi" | "dvmax" | "dvmin" | "dvw" | "em" | "ex" | "in" | "lh" | "lvb" | "lvh" | "lvi" | "lvmax" | "lvmin" | "lvw" | "mm" | "pc" | "pt" | "px" | "q" | "rcap" | "rch" | "rem" | "rex" | "rlh" | "svb" | "svh" | "svi" | "svmax" | "svmin" | "svw" | "vb" | "vh" | "vi" | "vmax" | "vmin" | "vw">[]]>;
912
916
  }, z.core.$strip>, z.ZodObject<{
913
917
  type: z.ZodLiteral<"unparsed">;
914
918
  value: z.ZodString;
@@ -919,7 +923,7 @@ export declare const webstudioFragment: z.ZodObject<{
919
923
  rangeEnd: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"start">, z.ZodLiteral<"end">]>, z.ZodUnion<readonly [z.ZodObject<{
920
924
  type: z.ZodLiteral<"unit">;
921
925
  value: z.ZodNumber;
922
- unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"in" | "%" | "cm" | "mm" | "q" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax">[]]>;
926
+ unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"%" | "cap" | "ch" | "cm" | "dvb" | "dvh" | "dvi" | "dvmax" | "dvmin" | "dvw" | "em" | "ex" | "in" | "lh" | "lvb" | "lvh" | "lvi" | "lvmax" | "lvmin" | "lvw" | "mm" | "pc" | "pt" | "px" | "q" | "rcap" | "rch" | "rem" | "rex" | "rlh" | "svb" | "svh" | "svi" | "svmax" | "svmin" | "svw" | "vb" | "vh" | "vi" | "vmax" | "vmin" | "vw">[]]>;
923
927
  }, z.core.$strip>, z.ZodObject<{
924
928
  type: z.ZodLiteral<"unparsed">;
925
929
  value: z.ZodString;
@@ -1570,7 +1574,7 @@ export declare const webstudioFragment: z.ZodObject<{
1570
1574
  duration: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1571
1575
  type: z.ZodLiteral<"unit">;
1572
1576
  value: z.ZodNumber;
1573
- unit: z.ZodUnion<[z.ZodLiteral<"ms">, z.ZodLiteral<"s">, ...z.ZodLiteral<"s" | "ms">[]]>;
1577
+ unit: z.ZodUnion<[z.ZodLiteral<"ms">, z.ZodLiteral<"s">, ...z.ZodLiteral<"ms" | "s">[]]>;
1574
1578
  }, z.core.$strip>, z.ZodObject<{
1575
1579
  type: z.ZodLiteral<"var">;
1576
1580
  value: z.ZodString;
@@ -1578,7 +1582,7 @@ export declare const webstudioFragment: z.ZodObject<{
1578
1582
  delay: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1579
1583
  type: z.ZodLiteral<"unit">;
1580
1584
  value: z.ZodNumber;
1581
- unit: z.ZodUnion<[z.ZodLiteral<"ms">, z.ZodLiteral<"s">, ...z.ZodLiteral<"s" | "ms">[]]>;
1585
+ unit: z.ZodUnion<[z.ZodLiteral<"ms">, z.ZodLiteral<"s">, ...z.ZodLiteral<"ms" | "s">[]]>;
1582
1586
  }, z.core.$strip>, z.ZodObject<{
1583
1587
  type: z.ZodLiteral<"var">;
1584
1588
  value: z.ZodString;
@@ -1587,7 +1591,7 @@ export declare const webstudioFragment: z.ZodObject<{
1587
1591
  rangeStart: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"contain">, z.ZodLiteral<"cover">, z.ZodLiteral<"entry">, z.ZodLiteral<"exit">, z.ZodLiteral<"entry-crossing">, z.ZodLiteral<"exit-crossing">]>, z.ZodUnion<readonly [z.ZodObject<{
1588
1592
  type: z.ZodLiteral<"unit">;
1589
1593
  value: z.ZodNumber;
1590
- unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"in" | "%" | "cm" | "mm" | "q" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax">[]]>;
1594
+ unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"%" | "cap" | "ch" | "cm" | "dvb" | "dvh" | "dvi" | "dvmax" | "dvmin" | "dvw" | "em" | "ex" | "in" | "lh" | "lvb" | "lvh" | "lvi" | "lvmax" | "lvmin" | "lvw" | "mm" | "pc" | "pt" | "px" | "q" | "rcap" | "rch" | "rem" | "rex" | "rlh" | "svb" | "svh" | "svi" | "svmax" | "svmin" | "svw" | "vb" | "vh" | "vi" | "vmax" | "vmin" | "vw">[]]>;
1591
1595
  }, z.core.$strip>, z.ZodObject<{
1592
1596
  type: z.ZodLiteral<"unparsed">;
1593
1597
  value: z.ZodString;
@@ -1598,7 +1602,7 @@ export declare const webstudioFragment: z.ZodObject<{
1598
1602
  rangeEnd: z.ZodOptional<z.ZodTuple<[z.ZodUnion<readonly [z.ZodLiteral<"contain">, z.ZodLiteral<"cover">, z.ZodLiteral<"entry">, z.ZodLiteral<"exit">, z.ZodLiteral<"entry-crossing">, z.ZodLiteral<"exit-crossing">]>, z.ZodUnion<readonly [z.ZodObject<{
1599
1603
  type: z.ZodLiteral<"unit">;
1600
1604
  value: z.ZodNumber;
1601
- unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"in" | "%" | "cm" | "mm" | "q" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax">[]]>;
1605
+ unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"%" | "cap" | "ch" | "cm" | "dvb" | "dvh" | "dvi" | "dvmax" | "dvmin" | "dvw" | "em" | "ex" | "in" | "lh" | "lvb" | "lvh" | "lvi" | "lvmax" | "lvmin" | "lvw" | "mm" | "pc" | "pt" | "px" | "q" | "rcap" | "rch" | "rem" | "rex" | "rlh" | "svb" | "svh" | "svi" | "svmax" | "svmin" | "svw" | "vb" | "vh" | "vi" | "vmax" | "vmin" | "vw">[]]>;
1602
1606
  }, z.core.$strip>, z.ZodObject<{
1603
1607
  type: z.ZodLiteral<"unparsed">;
1604
1608
  value: z.ZodString;
@@ -1611,7 +1615,7 @@ export declare const webstudioFragment: z.ZodObject<{
1611
1615
  insetStart: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
1612
1616
  type: z.ZodLiteral<"unit">;
1613
1617
  value: z.ZodNumber;
1614
- unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"in" | "%" | "cm" | "mm" | "q" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax">[]]>;
1618
+ unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"%" | "cap" | "ch" | "cm" | "dvb" | "dvh" | "dvi" | "dvmax" | "dvmin" | "dvw" | "em" | "ex" | "in" | "lh" | "lvb" | "lvh" | "lvi" | "lvmax" | "lvmin" | "lvw" | "mm" | "pc" | "pt" | "px" | "q" | "rcap" | "rch" | "rem" | "rex" | "rlh" | "svb" | "svh" | "svi" | "svmax" | "svmin" | "svw" | "vb" | "vh" | "vi" | "vmax" | "vmin" | "vw">[]]>;
1615
1619
  }, z.core.$strip>, z.ZodObject<{
1616
1620
  type: z.ZodLiteral<"unparsed">;
1617
1621
  value: z.ZodString;
@@ -1625,7 +1629,7 @@ export declare const webstudioFragment: z.ZodObject<{
1625
1629
  insetEnd: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
1626
1630
  type: z.ZodLiteral<"unit">;
1627
1631
  value: z.ZodNumber;
1628
- unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"in" | "%" | "cm" | "mm" | "q" | "pt" | "pc" | "px" | "em" | "rem" | "ex" | "rex" | "cap" | "rcap" | "ch" | "rch" | "lh" | "rlh" | "vw" | "svw" | "lvw" | "dvw" | "vh" | "svh" | "lvh" | "dvh" | "vi" | "svi" | "lvi" | "dvi" | "vb" | "svb" | "lvb" | "dvb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "vmax" | "svmax" | "lvmax" | "dvmax">[]]>;
1632
+ unit: z.ZodUnion<[z.ZodLiteral<"%">, z.ZodLiteral<"px">, ...z.ZodLiteral<"%" | "cap" | "ch" | "cm" | "dvb" | "dvh" | "dvi" | "dvmax" | "dvmin" | "dvw" | "em" | "ex" | "in" | "lh" | "lvb" | "lvh" | "lvi" | "lvmax" | "lvmin" | "lvw" | "mm" | "pc" | "pt" | "px" | "q" | "rcap" | "rch" | "rem" | "rex" | "rlh" | "svb" | "svh" | "svi" | "svmax" | "svmin" | "svw" | "vb" | "vh" | "vi" | "vmax" | "vmin" | "vw">[]]>;
1629
1633
  }, z.core.$strip>, z.ZodObject<{
1630
1634
  type: z.ZodLiteral<"unparsed">;
1631
1635
  value: z.ZodString;
@@ -1639,10 +1643,6 @@ export declare const webstudioFragment: z.ZodObject<{
1639
1643
  isPinned: z.ZodOptional<z.ZodBoolean>;
1640
1644
  debug: z.ZodOptional<z.ZodBoolean>;
1641
1645
  }, z.core.$strip>], "type">;
1642
- id: z.ZodString;
1643
- instanceId: z.ZodString;
1644
- name: z.ZodString;
1645
- required: z.ZodOptional<z.ZodBoolean>;
1646
1646
  }, z.core.$strip>]>>;
1647
1647
  breakpoints: z.ZodArray<z.ZodPipe<z.ZodObject<{
1648
1648
  id: z.ZodString;
@@ -1677,12 +1677,10 @@ export declare const webstudioFragment: z.ZodObject<{
1677
1677
  id: z.ZodString;
1678
1678
  }, z.core.$strip>]>>;
1679
1679
  styles: z.ZodArray<z.ZodType<{
1680
+ styleSourceId: string;
1681
+ breakpointId: string;
1682
+ state?: string | undefined;
1680
1683
  value: import("@webstudio-is/css-engine").ColorValue | {
1681
- type: "function";
1682
- name: string;
1683
- args: import("@webstudio-is/css-engine").StyleValue;
1684
- hidden?: boolean;
1685
- } | {
1686
1684
  type: "image";
1687
1685
  value: {
1688
1686
  type: "asset";
@@ -1740,11 +1738,6 @@ export declare const webstudioFragment: z.ZodObject<{
1740
1738
  } | {
1741
1739
  type: "tuple";
1742
1740
  value: (import("@webstudio-is/css-engine").ColorValue | {
1743
- type: "function";
1744
- name: string;
1745
- args: import("@webstudio-is/css-engine").StyleValue;
1746
- hidden?: boolean;
1747
- } | {
1748
1741
  type: "image";
1749
1742
  value: {
1750
1743
  type: "asset";
@@ -1799,10 +1792,16 @@ export declare const webstudioFragment: z.ZodObject<{
1799
1792
  hidden?: boolean | undefined;
1800
1793
  } | undefined;
1801
1794
  hidden?: boolean | undefined;
1795
+ } | {
1796
+ type: "function";
1797
+ name: string;
1798
+ args: import("@webstudio-is/css-engine").StyleValue;
1799
+ hidden?: boolean;
1802
1800
  })[];
1803
1801
  hidden?: boolean | undefined;
1804
1802
  } | {
1805
1803
  type: "shadow";
1804
+ hidden?: boolean | undefined;
1806
1805
  position: "inset" | "outset";
1807
1806
  offsetX: {
1808
1807
  type: "unit";
@@ -1866,7 +1865,6 @@ export declare const webstudioFragment: z.ZodObject<{
1866
1865
  } | undefined;
1867
1866
  hidden?: boolean | undefined;
1868
1867
  };
1869
- hidden?: boolean | undefined;
1870
1868
  blur?: {
1871
1869
  type: "unit";
1872
1870
  unit: "number" | import("@webstudio-is/css-engine").__Unit;
@@ -1973,11 +1971,6 @@ export declare const webstudioFragment: z.ZodObject<{
1973
1971
  } | {
1974
1972
  type: "layers";
1975
1973
  value: (import("@webstudio-is/css-engine").ColorValue | {
1976
- type: "function";
1977
- name: string;
1978
- args: import("@webstudio-is/css-engine").StyleValue;
1979
- hidden?: boolean;
1980
- } | {
1981
1974
  type: "image";
1982
1975
  value: {
1983
1976
  type: "asset";
@@ -2035,11 +2028,6 @@ export declare const webstudioFragment: z.ZodObject<{
2035
2028
  } | {
2036
2029
  type: "tuple";
2037
2030
  value: (import("@webstudio-is/css-engine").ColorValue | {
2038
- type: "function";
2039
- name: string;
2040
- args: import("@webstudio-is/css-engine").StyleValue;
2041
- hidden?: boolean;
2042
- } | {
2043
2031
  type: "image";
2044
2032
  value: {
2045
2033
  type: "asset";
@@ -2094,10 +2082,16 @@ export declare const webstudioFragment: z.ZodObject<{
2094
2082
  hidden?: boolean | undefined;
2095
2083
  } | undefined;
2096
2084
  hidden?: boolean | undefined;
2085
+ } | {
2086
+ type: "function";
2087
+ name: string;
2088
+ args: import("@webstudio-is/css-engine").StyleValue;
2089
+ hidden?: boolean;
2097
2090
  })[];
2098
2091
  hidden?: boolean | undefined;
2099
2092
  } | {
2100
2093
  type: "shadow";
2094
+ hidden?: boolean | undefined;
2101
2095
  position: "inset" | "outset";
2102
2096
  offsetX: {
2103
2097
  type: "unit";
@@ -2161,7 +2155,6 @@ export declare const webstudioFragment: z.ZodObject<{
2161
2155
  } | undefined;
2162
2156
  hidden?: boolean | undefined;
2163
2157
  };
2164
- hidden?: boolean | undefined;
2165
2158
  blur?: {
2166
2159
  type: "unit";
2167
2160
  unit: "number" | import("@webstudio-is/css-engine").__Unit;
@@ -2265,6 +2258,11 @@ export declare const webstudioFragment: z.ZodObject<{
2265
2258
  type: "invalid";
2266
2259
  value: string;
2267
2260
  hidden?: boolean | undefined;
2261
+ } | {
2262
+ type: "function";
2263
+ name: string;
2264
+ args: import("@webstudio-is/css-engine").StyleValue;
2265
+ hidden?: boolean;
2268
2266
  })[];
2269
2267
  hidden?: boolean | undefined;
2270
2268
  } | {
@@ -2278,19 +2276,19 @@ export declare const webstudioFragment: z.ZodObject<{
2278
2276
  type: "unset";
2279
2277
  value: "";
2280
2278
  hidden?: boolean | undefined;
2279
+ } | {
2280
+ type: "function";
2281
+ name: string;
2282
+ args: import("@webstudio-is/css-engine").StyleValue;
2283
+ hidden?: boolean;
2281
2284
  };
2282
- breakpointId: string;
2283
- styleSourceId: string;
2284
- state?: string | undefined;
2285
2285
  listed?: boolean | undefined;
2286
2286
  property: import("@webstudio-is/css-engine").StyleProperty;
2287
2287
  }, unknown, z.core.$ZodTypeInternals<{
2288
+ styleSourceId: string;
2289
+ breakpointId: string;
2290
+ state?: string | undefined;
2288
2291
  value: import("@webstudio-is/css-engine").ColorValue | {
2289
- type: "function";
2290
- name: string;
2291
- args: import("@webstudio-is/css-engine").StyleValue;
2292
- hidden?: boolean;
2293
- } | {
2294
2292
  type: "image";
2295
2293
  value: {
2296
2294
  type: "asset";
@@ -2348,11 +2346,6 @@ export declare const webstudioFragment: z.ZodObject<{
2348
2346
  } | {
2349
2347
  type: "tuple";
2350
2348
  value: (import("@webstudio-is/css-engine").ColorValue | {
2351
- type: "function";
2352
- name: string;
2353
- args: import("@webstudio-is/css-engine").StyleValue;
2354
- hidden?: boolean;
2355
- } | {
2356
2349
  type: "image";
2357
2350
  value: {
2358
2351
  type: "asset";
@@ -2407,10 +2400,16 @@ export declare const webstudioFragment: z.ZodObject<{
2407
2400
  hidden?: boolean | undefined;
2408
2401
  } | undefined;
2409
2402
  hidden?: boolean | undefined;
2403
+ } | {
2404
+ type: "function";
2405
+ name: string;
2406
+ args: import("@webstudio-is/css-engine").StyleValue;
2407
+ hidden?: boolean;
2410
2408
  })[];
2411
2409
  hidden?: boolean | undefined;
2412
2410
  } | {
2413
2411
  type: "shadow";
2412
+ hidden?: boolean | undefined;
2414
2413
  position: "inset" | "outset";
2415
2414
  offsetX: {
2416
2415
  type: "unit";
@@ -2474,7 +2473,6 @@ export declare const webstudioFragment: z.ZodObject<{
2474
2473
  } | undefined;
2475
2474
  hidden?: boolean | undefined;
2476
2475
  };
2477
- hidden?: boolean | undefined;
2478
2476
  blur?: {
2479
2477
  type: "unit";
2480
2478
  unit: "number" | import("@webstudio-is/css-engine").__Unit;
@@ -2581,11 +2579,6 @@ export declare const webstudioFragment: z.ZodObject<{
2581
2579
  } | {
2582
2580
  type: "layers";
2583
2581
  value: (import("@webstudio-is/css-engine").ColorValue | {
2584
- type: "function";
2585
- name: string;
2586
- args: import("@webstudio-is/css-engine").StyleValue;
2587
- hidden?: boolean;
2588
- } | {
2589
2582
  type: "image";
2590
2583
  value: {
2591
2584
  type: "asset";
@@ -2643,11 +2636,6 @@ export declare const webstudioFragment: z.ZodObject<{
2643
2636
  } | {
2644
2637
  type: "tuple";
2645
2638
  value: (import("@webstudio-is/css-engine").ColorValue | {
2646
- type: "function";
2647
- name: string;
2648
- args: import("@webstudio-is/css-engine").StyleValue;
2649
- hidden?: boolean;
2650
- } | {
2651
2639
  type: "image";
2652
2640
  value: {
2653
2641
  type: "asset";
@@ -2702,10 +2690,16 @@ export declare const webstudioFragment: z.ZodObject<{
2702
2690
  hidden?: boolean | undefined;
2703
2691
  } | undefined;
2704
2692
  hidden?: boolean | undefined;
2693
+ } | {
2694
+ type: "function";
2695
+ name: string;
2696
+ args: import("@webstudio-is/css-engine").StyleValue;
2697
+ hidden?: boolean;
2705
2698
  })[];
2706
2699
  hidden?: boolean | undefined;
2707
2700
  } | {
2708
2701
  type: "shadow";
2702
+ hidden?: boolean | undefined;
2709
2703
  position: "inset" | "outset";
2710
2704
  offsetX: {
2711
2705
  type: "unit";
@@ -2769,7 +2763,6 @@ export declare const webstudioFragment: z.ZodObject<{
2769
2763
  } | undefined;
2770
2764
  hidden?: boolean | undefined;
2771
2765
  };
2772
- hidden?: boolean | undefined;
2773
2766
  blur?: {
2774
2767
  type: "unit";
2775
2768
  unit: "number" | import("@webstudio-is/css-engine").__Unit;
@@ -2873,6 +2866,11 @@ export declare const webstudioFragment: z.ZodObject<{
2873
2866
  type: "invalid";
2874
2867
  value: string;
2875
2868
  hidden?: boolean | undefined;
2869
+ } | {
2870
+ type: "function";
2871
+ name: string;
2872
+ args: import("@webstudio-is/css-engine").StyleValue;
2873
+ hidden?: boolean;
2876
2874
  })[];
2877
2875
  hidden?: boolean | undefined;
2878
2876
  } | {
@@ -2886,10 +2884,12 @@ export declare const webstudioFragment: z.ZodObject<{
2886
2884
  type: "unset";
2887
2885
  value: "";
2888
2886
  hidden?: boolean | undefined;
2887
+ } | {
2888
+ type: "function";
2889
+ name: string;
2890
+ args: import("@webstudio-is/css-engine").StyleValue;
2891
+ hidden?: boolean;
2889
2892
  };
2890
- breakpointId: string;
2891
- styleSourceId: string;
2892
- state?: string | undefined;
2893
2893
  listed?: boolean | undefined;
2894
2894
  property: import("@webstudio-is/css-engine").StyleProperty;
2895
2895
  }, unknown>>>;
@@ -6,6 +6,7 @@ export type Scope = {
6
6
  */
7
7
  getName(id: string, preferredName: string): string;
8
8
  };
9
+ declare const normalizeJsName: (name: string) => string;
9
10
  /**
10
11
  * Utility to maintain unique variable when generate code.
11
12
  * Single scope is shared for generated module for simplicity.
@@ -13,4 +14,5 @@ export type Scope = {
13
14
  * occupiedIdentifiers parameter prevents collision with hardcoded
14
15
  * identifiers.
15
16
  */
16
- export declare const createScope: (occupiedIdentifiers?: string[], normalizeName?: (name: string) => string, separator?: string) => Scope;
17
+ export declare const createScope: (occupiedIdentifiers?: string[], normalizeName?: typeof normalizeJsName, separator?: string) => Scope;
18
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk",
3
- "version": "0.275.0",
3
+ "version": "0.276.0",
4
4
  "description": "Webstudio project data schema",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -18,6 +18,11 @@
18
18
  "types": "./lib/types/runtime.d.ts",
19
19
  "import": "./lib/runtime.js"
20
20
  },
21
+ "./schema-org": {
22
+ "webstudio": "./src/schema-org.ts",
23
+ "types": "./lib/types/schema-org.d.ts",
24
+ "import": "./lib/schema-org.js"
25
+ },
21
26
  "./link-utils": {
22
27
  "webstudio": "./src/link-utils.ts",
23
28
  "types": "./lib/types/link-utils.d.ts",
@@ -57,23 +62,26 @@
57
62
  "type-fest": "^4.37.0",
58
63
  "warn-once": "^0.1.1",
59
64
  "zod": "^4.4.3",
60
- "@webstudio-is/css-engine": "0.275.0",
61
- "@webstudio-is/icons": "0.275.0",
62
- "@webstudio-is/fonts": "0.275.0",
63
- "@webstudio-is/wsauth": "0.275.0"
65
+ "@webstudio-is/fonts": "0.276.0",
66
+ "@webstudio-is/icons": "0.276.0",
67
+ "@webstudio-is/css-engine": "0.276.0",
68
+ "@webstudio-is/wsauth": "0.276.0"
64
69
  },
65
70
  "devDependencies": {
66
71
  "html-tags": "^4.0.0",
72
+ "papaparse": "^5.5.3",
73
+ "@types/papaparse": "^5.5.2",
67
74
  "vitest": "^3.1.2",
68
- "@webstudio-is/template": "0.275.0",
69
- "@webstudio-is/css-data": "0.275.0",
75
+ "@webstudio-is/template": "0.276.0",
76
+ "@webstudio-is/css-data": "0.276.0",
70
77
  "@webstudio-is/tsconfig": "1.0.7"
71
78
  },
72
79
  "scripts": {
73
- "typecheck": "tsgo --noEmit -p tsconfig.typecheck.json",
80
+ "typecheck": "tsc --noEmit -p tsconfig.typecheck.json",
74
81
  "test": "vitest run",
75
- "build:normalize.css": "tsx --conditions=webstudio ./scripts/normalize.css.ts && prettier --write src/__generated__/normalize.css.ts",
76
- "build": "rm -rf lib && esbuild src/index.ts src/runtime.ts src/link-utils.ts src/schema.ts src/__generated__/normalize.css.ts src/core-templates.tsx --outdir=lib --bundle --format=esm --packages=external",
82
+ "build:schema-org-data": "tsx scripts/schema-org-data.ts && oxfmt src/__generated__/schema-org-data.ts",
83
+ "build:normalize.css": "tsx --conditions=webstudio ./scripts/normalize.css.ts && oxfmt src/__generated__/normalize.css.ts",
84
+ "build": "rm -rf lib && esbuild src/index.ts src/runtime.ts src/schema-org.ts src/link-utils.ts src/schema.ts src/__generated__/normalize.css.ts src/core-templates.tsx --outdir=lib --bundle --format=esm --packages=external",
77
85
  "dts": "tsc --project tsconfig.dts.json"
78
86
  }
79
87
  }