@webstudio-is/sdk 0.0.0-017f1bd

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 (47) hide show
  1. package/LICENSE +661 -0
  2. package/lib/__generated__/normalize.css.js +593 -0
  3. package/lib/core-templates.js +1267 -0
  4. package/lib/index.js +2918 -0
  5. package/lib/runtime.js +117 -0
  6. package/lib/types/__generated__/normalize.css.d.ts +57 -0
  7. package/lib/types/__generated__/tags.d.ts +1 -0
  8. package/lib/types/core-metas.d.ts +20 -0
  9. package/lib/types/core-templates.d.ts +9 -0
  10. package/lib/types/css.d.ts +31 -0
  11. package/lib/types/css.test.d.ts +1 -0
  12. package/lib/types/expression.d.ts +60 -0
  13. package/lib/types/expression.test.d.ts +1 -0
  14. package/lib/types/form-fields.d.ts +8 -0
  15. package/lib/types/index.d.ts +26 -0
  16. package/lib/types/instances-utils.d.ts +8 -0
  17. package/lib/types/instances-utils.test.d.ts +1 -0
  18. package/lib/types/page-meta-generator.d.ts +24 -0
  19. package/lib/types/page-meta-generator.test.d.ts +1 -0
  20. package/lib/types/page-utils.d.ts +24 -0
  21. package/lib/types/page-utils.test.d.ts +1 -0
  22. package/lib/types/resource-loader.d.ts +30 -0
  23. package/lib/types/resource-loader.test.d.ts +1 -0
  24. package/lib/types/resources-generator.d.ts +22 -0
  25. package/lib/types/resources-generator.test.d.ts +1 -0
  26. package/lib/types/runtime.d.ts +8 -0
  27. package/lib/types/schema/animation-schema.d.ts +53844 -0
  28. package/lib/types/schema/assets.d.ts +455 -0
  29. package/lib/types/schema/breakpoints.d.ts +56 -0
  30. package/lib/types/schema/component-meta.d.ts +12262 -0
  31. package/lib/types/schema/data-sources.d.ts +303 -0
  32. package/lib/types/schema/deployment.d.ts +41 -0
  33. package/lib/types/schema/instances.d.ts +214 -0
  34. package/lib/types/schema/pages.d.ts +676 -0
  35. package/lib/types/schema/prop-meta.d.ts +500 -0
  36. package/lib/types/schema/props.d.ts +37387 -0
  37. package/lib/types/schema/resources.d.ts +121 -0
  38. package/lib/types/schema/style-source-selections.d.ts +23 -0
  39. package/lib/types/schema/style-sources.d.ts +62 -0
  40. package/lib/types/schema/styles.d.ts +6293 -0
  41. package/lib/types/schema/webstudio.d.ts +24734 -0
  42. package/lib/types/scope.d.ts +16 -0
  43. package/lib/types/scope.test.d.ts +1 -0
  44. package/lib/types/to-string.d.ts +2 -0
  45. package/lib/types/url-pattern.d.ts +2 -0
  46. package/lib/types/url-pattern.test.d.ts +1 -0
  47. package/package.json +61 -0
@@ -0,0 +1,1267 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // src/core-templates.tsx
8
+ import {
9
+ $,
10
+ css,
11
+ expression,
12
+ Parameter,
13
+ PlaceholderValue,
14
+ ws
15
+ } from "@webstudio-is/template";
16
+ import {
17
+ CheckboxCheckedIcon,
18
+ RadioCheckedIcon,
19
+ Webstudio1cIcon
20
+ } from "@webstudio-is/icons/svg";
21
+
22
+ // src/core-metas.ts
23
+ import {
24
+ ContentBlockIcon,
25
+ ListViewIcon,
26
+ PaintBrushIcon,
27
+ SettingsIcon,
28
+ AddTemplateInstanceIcon
29
+ } from "@webstudio-is/icons/svg";
30
+
31
+ // src/__generated__/normalize.css.ts
32
+ var normalize_css_exports = {};
33
+ __export(normalize_css_exports, {
34
+ a: () => a,
35
+ address: () => address,
36
+ article: () => article,
37
+ aside: () => aside,
38
+ b: () => b,
39
+ body: () => body,
40
+ button: () => button,
41
+ checkbox: () => checkbox,
42
+ code: () => code,
43
+ div: () => div,
44
+ figure: () => figure,
45
+ footer: () => footer,
46
+ form: () => form,
47
+ h1: () => h1,
48
+ h2: () => h2,
49
+ h3: () => h3,
50
+ h4: () => h4,
51
+ h5: () => h5,
52
+ h6: () => h6,
53
+ header: () => header,
54
+ hr: () => hr,
55
+ html: () => html,
56
+ i: () => i,
57
+ img: () => img,
58
+ input: () => input,
59
+ kbd: () => kbd,
60
+ label: () => label,
61
+ legend: () => legend,
62
+ li: () => li,
63
+ main: () => main,
64
+ nav: () => nav,
65
+ ol: () => ol,
66
+ optgroup: () => optgroup,
67
+ p: () => p,
68
+ pre: () => pre,
69
+ progress: () => progress,
70
+ radio: () => radio,
71
+ samp: () => samp,
72
+ section: () => section,
73
+ select: () => select,
74
+ small: () => small,
75
+ span: () => span,
76
+ strong: () => strong,
77
+ sub: () => sub,
78
+ summary: () => summary,
79
+ sup: () => sup,
80
+ table: () => table,
81
+ textarea: () => textarea,
82
+ time: () => time,
83
+ ul: () => ul
84
+ });
85
+ var div = [
86
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
87
+ {
88
+ property: "border-top-width",
89
+ value: { type: "unit", unit: "px", value: 1 }
90
+ },
91
+ {
92
+ property: "border-right-width",
93
+ value: { type: "unit", unit: "px", value: 1 }
94
+ },
95
+ {
96
+ property: "border-bottom-width",
97
+ value: { type: "unit", unit: "px", value: 1 }
98
+ },
99
+ {
100
+ property: "border-left-width",
101
+ value: { type: "unit", unit: "px", value: 1 }
102
+ },
103
+ { property: "outline-width", value: { type: "unit", unit: "px", value: 1 } }
104
+ ];
105
+ var address = div;
106
+ var article = div;
107
+ var aside = div;
108
+ var figure = div;
109
+ var footer = div;
110
+ var header = div;
111
+ var main = div;
112
+ var nav = div;
113
+ var section = div;
114
+ var form = div;
115
+ var label = div;
116
+ var time = div;
117
+ var h1 = div;
118
+ var h2 = div;
119
+ var h3 = div;
120
+ var h4 = div;
121
+ var h5 = div;
122
+ var h6 = div;
123
+ var i = div;
124
+ var img = div;
125
+ var a = div;
126
+ var li = div;
127
+ var ul = div;
128
+ var ol = div;
129
+ var p = div;
130
+ var span = div;
131
+ var html = [
132
+ { property: "display", value: { type: "keyword", value: "grid" } },
133
+ { property: "min-height", value: { type: "unit", unit: "%", value: 100 } },
134
+ {
135
+ property: "font-family",
136
+ value: { type: "fontFamily", value: ["Arial", "Roboto", "sans-serif"] }
137
+ },
138
+ { property: "font-size", value: { type: "unit", unit: "px", value: 16 } },
139
+ {
140
+ property: "line-height",
141
+ value: { type: "unit", unit: "number", value: 1.2 }
142
+ },
143
+ {
144
+ property: "white-space-collapse",
145
+ value: { type: "keyword", value: "preserve" }
146
+ }
147
+ ];
148
+ var body = [
149
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
150
+ {
151
+ property: "margin-right",
152
+ value: { type: "unit", unit: "number", value: 0 }
153
+ },
154
+ {
155
+ property: "margin-bottom",
156
+ value: { type: "unit", unit: "number", value: 0 }
157
+ },
158
+ {
159
+ property: "margin-left",
160
+ value: { type: "unit", unit: "number", value: 0 }
161
+ },
162
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
163
+ {
164
+ property: "border-top-width",
165
+ value: { type: "unit", unit: "px", value: 1 }
166
+ },
167
+ {
168
+ property: "border-right-width",
169
+ value: { type: "unit", unit: "px", value: 1 }
170
+ },
171
+ {
172
+ property: "border-bottom-width",
173
+ value: { type: "unit", unit: "px", value: 1 }
174
+ },
175
+ {
176
+ property: "border-left-width",
177
+ value: { type: "unit", unit: "px", value: 1 }
178
+ },
179
+ {
180
+ property: "-webkit-font-smoothing",
181
+ value: { type: "keyword", value: "antialiased" }
182
+ },
183
+ {
184
+ property: "-moz-osx-font-smoothing",
185
+ value: { type: "keyword", value: "grayscale" }
186
+ }
187
+ ];
188
+ var hr = [
189
+ { property: "height", value: { type: "unit", unit: "number", value: 0 } },
190
+ { property: "color", value: { type: "keyword", value: "inherit" } },
191
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } }
192
+ ];
193
+ var b = [
194
+ {
195
+ property: "font-weight",
196
+ value: { type: "unit", unit: "number", value: 700 }
197
+ },
198
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
199
+ {
200
+ property: "border-top-width",
201
+ value: { type: "unit", unit: "px", value: 1 }
202
+ },
203
+ {
204
+ property: "border-right-width",
205
+ value: { type: "unit", unit: "px", value: 1 }
206
+ },
207
+ {
208
+ property: "border-bottom-width",
209
+ value: { type: "unit", unit: "px", value: 1 }
210
+ },
211
+ {
212
+ property: "border-left-width",
213
+ value: { type: "unit", unit: "px", value: 1 }
214
+ }
215
+ ];
216
+ var strong = b;
217
+ var code = [
218
+ {
219
+ property: "font-family",
220
+ value: {
221
+ type: "fontFamily",
222
+ value: [
223
+ "ui-monospace",
224
+ "SFMono-Regular",
225
+ "Consolas",
226
+ "Liberation Mono",
227
+ "Menlo",
228
+ "monospace"
229
+ ]
230
+ }
231
+ },
232
+ { property: "font-size", value: { type: "unit", unit: "em", value: 1 } },
233
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
234
+ {
235
+ property: "border-top-width",
236
+ value: { type: "unit", unit: "px", value: 1 }
237
+ },
238
+ {
239
+ property: "border-right-width",
240
+ value: { type: "unit", unit: "px", value: 1 }
241
+ },
242
+ {
243
+ property: "border-bottom-width",
244
+ value: { type: "unit", unit: "px", value: 1 }
245
+ },
246
+ {
247
+ property: "border-left-width",
248
+ value: { type: "unit", unit: "px", value: 1 }
249
+ }
250
+ ];
251
+ var kbd = code;
252
+ var samp = code;
253
+ var pre = code;
254
+ var small = [
255
+ { property: "font-size", value: { type: "unit", unit: "%", value: 80 } },
256
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
257
+ {
258
+ property: "border-top-width",
259
+ value: { type: "unit", unit: "px", value: 1 }
260
+ },
261
+ {
262
+ property: "border-right-width",
263
+ value: { type: "unit", unit: "px", value: 1 }
264
+ },
265
+ {
266
+ property: "border-bottom-width",
267
+ value: { type: "unit", unit: "px", value: 1 }
268
+ },
269
+ {
270
+ property: "border-left-width",
271
+ value: { type: "unit", unit: "px", value: 1 }
272
+ }
273
+ ];
274
+ var sub = [
275
+ { property: "font-size", value: { type: "unit", unit: "%", value: 75 } },
276
+ {
277
+ property: "line-height",
278
+ value: { type: "unit", unit: "number", value: 0 }
279
+ },
280
+ { property: "position", value: { type: "keyword", value: "relative" } },
281
+ { property: "vertical-align", value: { type: "keyword", value: "baseline" } },
282
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
283
+ {
284
+ property: "border-top-width",
285
+ value: { type: "unit", unit: "px", value: 1 }
286
+ },
287
+ {
288
+ property: "border-right-width",
289
+ value: { type: "unit", unit: "px", value: 1 }
290
+ },
291
+ {
292
+ property: "border-bottom-width",
293
+ value: { type: "unit", unit: "px", value: 1 }
294
+ },
295
+ {
296
+ property: "border-left-width",
297
+ value: { type: "unit", unit: "px", value: 1 }
298
+ },
299
+ { property: "bottom", value: { type: "unit", unit: "em", value: -0.25 } }
300
+ ];
301
+ var sup = [
302
+ { property: "font-size", value: { type: "unit", unit: "%", value: 75 } },
303
+ {
304
+ property: "line-height",
305
+ value: { type: "unit", unit: "number", value: 0 }
306
+ },
307
+ { property: "position", value: { type: "keyword", value: "relative" } },
308
+ { property: "vertical-align", value: { type: "keyword", value: "baseline" } },
309
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
310
+ {
311
+ property: "border-top-width",
312
+ value: { type: "unit", unit: "px", value: 1 }
313
+ },
314
+ {
315
+ property: "border-right-width",
316
+ value: { type: "unit", unit: "px", value: 1 }
317
+ },
318
+ {
319
+ property: "border-bottom-width",
320
+ value: { type: "unit", unit: "px", value: 1 }
321
+ },
322
+ {
323
+ property: "border-left-width",
324
+ value: { type: "unit", unit: "px", value: 1 }
325
+ },
326
+ { property: "top", value: { type: "unit", unit: "em", value: -0.5 } }
327
+ ];
328
+ var table = [
329
+ {
330
+ property: "text-indent",
331
+ value: { type: "unit", unit: "number", value: 0 }
332
+ },
333
+ {
334
+ property: "border-top-width",
335
+ value: { type: "unit", unit: "px", value: 1 }
336
+ },
337
+ {
338
+ property: "border-right-width",
339
+ value: { type: "unit", unit: "px", value: 1 }
340
+ },
341
+ {
342
+ property: "border-bottom-width",
343
+ value: { type: "unit", unit: "px", value: 1 }
344
+ },
345
+ {
346
+ property: "border-left-width",
347
+ value: { type: "unit", unit: "px", value: 1 }
348
+ },
349
+ {
350
+ property: "border-top-color",
351
+ value: { type: "keyword", value: "inherit" }
352
+ },
353
+ {
354
+ property: "border-right-color",
355
+ value: { type: "keyword", value: "inherit" }
356
+ },
357
+ {
358
+ property: "border-bottom-color",
359
+ value: { type: "keyword", value: "inherit" }
360
+ },
361
+ {
362
+ property: "border-left-color",
363
+ value: { type: "keyword", value: "inherit" }
364
+ },
365
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } }
366
+ ];
367
+ var input = [
368
+ { property: "font-family", value: { type: "keyword", value: "inherit" } },
369
+ { property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
370
+ {
371
+ property: "line-height",
372
+ value: { type: "unit", unit: "number", value: 1.15 }
373
+ },
374
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
375
+ {
376
+ property: "margin-right",
377
+ value: { type: "unit", unit: "number", value: 0 }
378
+ },
379
+ {
380
+ property: "margin-bottom",
381
+ value: { type: "unit", unit: "number", value: 0 }
382
+ },
383
+ {
384
+ property: "margin-left",
385
+ value: { type: "unit", unit: "number", value: 0 }
386
+ },
387
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
388
+ {
389
+ property: "border-top-width",
390
+ value: { type: "unit", unit: "px", value: 1 }
391
+ },
392
+ {
393
+ property: "border-right-width",
394
+ value: { type: "unit", unit: "px", value: 1 }
395
+ },
396
+ {
397
+ property: "border-bottom-width",
398
+ value: { type: "unit", unit: "px", value: 1 }
399
+ },
400
+ {
401
+ property: "border-left-width",
402
+ value: { type: "unit", unit: "px", value: 1 }
403
+ },
404
+ { property: "border-top-style", value: { type: "keyword", value: "solid" } },
405
+ {
406
+ property: "border-right-style",
407
+ value: { type: "keyword", value: "solid" }
408
+ },
409
+ {
410
+ property: "border-bottom-style",
411
+ value: { type: "keyword", value: "solid" }
412
+ },
413
+ { property: "border-left-style", value: { type: "keyword", value: "solid" } }
414
+ ];
415
+ var textarea = input;
416
+ var optgroup = [
417
+ { property: "font-family", value: { type: "keyword", value: "inherit" } },
418
+ { property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
419
+ {
420
+ property: "line-height",
421
+ value: { type: "unit", unit: "number", value: 1.15 }
422
+ },
423
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
424
+ {
425
+ property: "margin-right",
426
+ value: { type: "unit", unit: "number", value: 0 }
427
+ },
428
+ {
429
+ property: "margin-bottom",
430
+ value: { type: "unit", unit: "number", value: 0 }
431
+ },
432
+ {
433
+ property: "margin-left",
434
+ value: { type: "unit", unit: "number", value: 0 }
435
+ },
436
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
437
+ {
438
+ property: "border-top-width",
439
+ value: { type: "unit", unit: "px", value: 1 }
440
+ },
441
+ {
442
+ property: "border-right-width",
443
+ value: { type: "unit", unit: "px", value: 1 }
444
+ },
445
+ {
446
+ property: "border-bottom-width",
447
+ value: { type: "unit", unit: "px", value: 1 }
448
+ },
449
+ {
450
+ property: "border-left-width",
451
+ value: { type: "unit", unit: "px", value: 1 }
452
+ }
453
+ ];
454
+ var radio = [
455
+ { property: "font-family", value: { type: "keyword", value: "inherit" } },
456
+ { property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
457
+ {
458
+ property: "line-height",
459
+ value: { type: "unit", unit: "number", value: 1.15 }
460
+ },
461
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
462
+ {
463
+ property: "margin-right",
464
+ value: { type: "unit", unit: "number", value: 0 }
465
+ },
466
+ {
467
+ property: "margin-bottom",
468
+ value: { type: "unit", unit: "number", value: 0 }
469
+ },
470
+ {
471
+ property: "margin-left",
472
+ value: { type: "unit", unit: "number", value: 0 }
473
+ },
474
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
475
+ {
476
+ property: "border-top-width",
477
+ value: { type: "unit", unit: "px", value: 1 }
478
+ },
479
+ {
480
+ property: "border-right-width",
481
+ value: { type: "unit", unit: "px", value: 1 }
482
+ },
483
+ {
484
+ property: "border-bottom-width",
485
+ value: { type: "unit", unit: "px", value: 1 }
486
+ },
487
+ {
488
+ property: "border-left-width",
489
+ value: { type: "unit", unit: "px", value: 1 }
490
+ },
491
+ { property: "border-top-style", value: { type: "keyword", value: "none" } },
492
+ { property: "border-right-style", value: { type: "keyword", value: "none" } },
493
+ {
494
+ property: "border-bottom-style",
495
+ value: { type: "keyword", value: "none" }
496
+ },
497
+ { property: "border-left-style", value: { type: "keyword", value: "none" } }
498
+ ];
499
+ var checkbox = radio;
500
+ var button = [
501
+ { property: "font-family", value: { type: "keyword", value: "inherit" } },
502
+ { property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
503
+ {
504
+ property: "line-height",
505
+ value: { type: "unit", unit: "number", value: 1.15 }
506
+ },
507
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
508
+ {
509
+ property: "margin-right",
510
+ value: { type: "unit", unit: "number", value: 0 }
511
+ },
512
+ {
513
+ property: "margin-bottom",
514
+ value: { type: "unit", unit: "number", value: 0 }
515
+ },
516
+ {
517
+ property: "margin-left",
518
+ value: { type: "unit", unit: "number", value: 0 }
519
+ },
520
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
521
+ {
522
+ property: "border-top-width",
523
+ value: { type: "unit", unit: "px", value: 1 }
524
+ },
525
+ {
526
+ property: "border-right-width",
527
+ value: { type: "unit", unit: "px", value: 1 }
528
+ },
529
+ {
530
+ property: "border-bottom-width",
531
+ value: { type: "unit", unit: "px", value: 1 }
532
+ },
533
+ {
534
+ property: "border-left-width",
535
+ value: { type: "unit", unit: "px", value: 1 }
536
+ },
537
+ { property: "border-top-style", value: { type: "keyword", value: "solid" } },
538
+ {
539
+ property: "border-right-style",
540
+ value: { type: "keyword", value: "solid" }
541
+ },
542
+ {
543
+ property: "border-bottom-style",
544
+ value: { type: "keyword", value: "solid" }
545
+ },
546
+ { property: "border-left-style", value: { type: "keyword", value: "solid" } },
547
+ { property: "text-transform", value: { type: "keyword", value: "none" } }
548
+ ];
549
+ var select = button;
550
+ var legend = [
551
+ {
552
+ property: "padding-top",
553
+ value: { type: "unit", unit: "number", value: 0 }
554
+ },
555
+ {
556
+ property: "padding-right",
557
+ value: { type: "unit", unit: "number", value: 0 }
558
+ },
559
+ {
560
+ property: "padding-bottom",
561
+ value: { type: "unit", unit: "number", value: 0 }
562
+ },
563
+ {
564
+ property: "padding-left",
565
+ value: { type: "unit", unit: "number", value: 0 }
566
+ },
567
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
568
+ {
569
+ property: "border-top-width",
570
+ value: { type: "unit", unit: "px", value: 1 }
571
+ },
572
+ {
573
+ property: "border-right-width",
574
+ value: { type: "unit", unit: "px", value: 1 }
575
+ },
576
+ {
577
+ property: "border-bottom-width",
578
+ value: { type: "unit", unit: "px", value: 1 }
579
+ },
580
+ {
581
+ property: "border-left-width",
582
+ value: { type: "unit", unit: "px", value: 1 }
583
+ }
584
+ ];
585
+ var progress = [
586
+ { property: "vertical-align", value: { type: "keyword", value: "baseline" } },
587
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
588
+ {
589
+ property: "border-top-width",
590
+ value: { type: "unit", unit: "px", value: 1 }
591
+ },
592
+ {
593
+ property: "border-right-width",
594
+ value: { type: "unit", unit: "px", value: 1 }
595
+ },
596
+ {
597
+ property: "border-bottom-width",
598
+ value: { type: "unit", unit: "px", value: 1 }
599
+ },
600
+ {
601
+ property: "border-left-width",
602
+ value: { type: "unit", unit: "px", value: 1 }
603
+ }
604
+ ];
605
+ var summary = [
606
+ { property: "display", value: { type: "keyword", value: "list-item" } },
607
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
608
+ {
609
+ property: "border-top-width",
610
+ value: { type: "unit", unit: "px", value: 1 }
611
+ },
612
+ {
613
+ property: "border-right-width",
614
+ value: { type: "unit", unit: "px", value: 1 }
615
+ },
616
+ {
617
+ property: "border-bottom-width",
618
+ value: { type: "unit", unit: "px", value: 1 }
619
+ },
620
+ {
621
+ property: "border-left-width",
622
+ value: { type: "unit", unit: "px", value: 1 }
623
+ }
624
+ ];
625
+
626
+ // src/runtime.ts
627
+ var tagProperty = "data-ws-tag";
628
+
629
+ // src/__generated__/tags.ts
630
+ var tags = [
631
+ "div",
632
+ "span",
633
+ "a",
634
+ "abbr",
635
+ "address",
636
+ "area",
637
+ "article",
638
+ "aside",
639
+ "audio",
640
+ "b",
641
+ "bdi",
642
+ "bdo",
643
+ "blockquote",
644
+ "body",
645
+ "br",
646
+ "button",
647
+ "canvas",
648
+ "caption",
649
+ "cite",
650
+ "code",
651
+ "col",
652
+ "colgroup",
653
+ "data",
654
+ "datalist",
655
+ "dd",
656
+ "del",
657
+ "details",
658
+ "dfn",
659
+ "dialog",
660
+ "dl",
661
+ "dt",
662
+ "em",
663
+ "embed",
664
+ "fieldset",
665
+ "figcaption",
666
+ "figure",
667
+ "footer",
668
+ "form",
669
+ "h1",
670
+ "h2",
671
+ "h3",
672
+ "h4",
673
+ "h5",
674
+ "h6",
675
+ "head",
676
+ "header",
677
+ "hgroup",
678
+ "hr",
679
+ "html",
680
+ "i",
681
+ "iframe",
682
+ "img",
683
+ "input",
684
+ "ins",
685
+ "kbd",
686
+ "label",
687
+ "legend",
688
+ "li",
689
+ "main",
690
+ "map",
691
+ "mark",
692
+ "menu",
693
+ "meter",
694
+ "nav",
695
+ "object",
696
+ "ol",
697
+ "optgroup",
698
+ "option",
699
+ "output",
700
+ "p",
701
+ "picture",
702
+ "pre",
703
+ "progress",
704
+ "q",
705
+ "rp",
706
+ "rt",
707
+ "ruby",
708
+ "s",
709
+ "samp",
710
+ "search",
711
+ "section",
712
+ "select",
713
+ "slot",
714
+ "small",
715
+ "source",
716
+ "strong",
717
+ "sub",
718
+ "summary",
719
+ "sup",
720
+ "table",
721
+ "tbody",
722
+ "td",
723
+ "textarea",
724
+ "tfoot",
725
+ "th",
726
+ "thead",
727
+ "time",
728
+ "tr",
729
+ "track",
730
+ "u",
731
+ "ul",
732
+ "var",
733
+ "video",
734
+ "wbr",
735
+ "svg",
736
+ "g",
737
+ "defs",
738
+ "desc",
739
+ "symbol",
740
+ "use",
741
+ "image",
742
+ "switch",
743
+ "path",
744
+ "rect",
745
+ "circle",
746
+ "ellipse",
747
+ "line",
748
+ "polyline",
749
+ "polygon",
750
+ "text",
751
+ "tspan",
752
+ "textPath",
753
+ "marker",
754
+ "linearGradient",
755
+ "radialGradient",
756
+ "stop",
757
+ "pattern",
758
+ "clipPath",
759
+ "mask",
760
+ "filter",
761
+ "feDistantLight",
762
+ "fePointLight",
763
+ "feSpotLight",
764
+ "feBlend",
765
+ "feColorMatrix",
766
+ "feComponentTransfer",
767
+ "feFuncR",
768
+ "feFuncG",
769
+ "feFuncB",
770
+ "feFuncA",
771
+ "feComposite",
772
+ "feConvolveMatrix",
773
+ "feDiffuseLighting",
774
+ "feDisplacementMap",
775
+ "feFlood",
776
+ "feGaussianBlur",
777
+ "feImage",
778
+ "feMerge",
779
+ "feMergeNode",
780
+ "feMorphology",
781
+ "feOffset",
782
+ "feSpecularLighting",
783
+ "feTile",
784
+ "feTurbulence",
785
+ "view",
786
+ "animate",
787
+ "set",
788
+ "animateMotion",
789
+ "mpath",
790
+ "animateTransform",
791
+ "metadata",
792
+ "foreignObject"
793
+ ];
794
+
795
+ // src/core-metas.ts
796
+ var rootComponent = "ws:root";
797
+ var rootMeta = {
798
+ label: "Global Root",
799
+ icon: SettingsIcon,
800
+ presetStyle: {
801
+ html
802
+ }
803
+ };
804
+ var elementComponent = "ws:element";
805
+ var elementMeta = {
806
+ label: "Element",
807
+ // convert [object Module] to [object Object] to enable structured cloning
808
+ presetStyle: { ...normalize_css_exports },
809
+ initialProps: [tagProperty, "id", "class"],
810
+ props: {
811
+ [tagProperty]: {
812
+ type: "string",
813
+ control: "tag",
814
+ required: true,
815
+ options: tags
816
+ }
817
+ }
818
+ };
819
+ var collectionComponent = "ws:collection";
820
+ var collectionMeta = {
821
+ label: "Collection",
822
+ icon: ListViewIcon,
823
+ contentModel: {
824
+ category: "instance",
825
+ children: ["instance"]
826
+ },
827
+ initialProps: ["data"],
828
+ props: {
829
+ data: {
830
+ required: true,
831
+ control: "json",
832
+ type: "json"
833
+ }
834
+ }
835
+ };
836
+ var descendantComponent = "ws:descendant";
837
+ var descendantMeta = {
838
+ label: "Descendant",
839
+ icon: PaintBrushIcon,
840
+ contentModel: {
841
+ category: "none",
842
+ children: []
843
+ },
844
+ // @todo infer possible presets
845
+ presetStyle: {},
846
+ initialProps: ["selector"],
847
+ props: {
848
+ selector: {
849
+ required: true,
850
+ type: "string",
851
+ control: "select",
852
+ options: [
853
+ " p",
854
+ " h1",
855
+ " h2",
856
+ " h3",
857
+ " h4",
858
+ " h5",
859
+ " h6",
860
+ " :where(strong, b)",
861
+ " :where(em, i)",
862
+ " a",
863
+ " img",
864
+ " blockquote",
865
+ " code",
866
+ " :where(ul, ol)",
867
+ " li",
868
+ " hr"
869
+ ]
870
+ }
871
+ }
872
+ };
873
+ var blockComponent = "ws:block";
874
+ var blockTemplateComponent = "ws:block-template";
875
+ var blockTemplateMeta = {
876
+ icon: AddTemplateInstanceIcon,
877
+ contentModel: {
878
+ category: "none",
879
+ children: ["instance"]
880
+ }
881
+ };
882
+ var blockMeta = {
883
+ label: "Content Block",
884
+ icon: ContentBlockIcon,
885
+ contentModel: {
886
+ category: "instance",
887
+ children: [blockTemplateComponent, "instance"]
888
+ }
889
+ };
890
+ var coreMetas = {
891
+ [rootComponent]: rootMeta,
892
+ [elementComponent]: elementMeta,
893
+ [collectionComponent]: collectionMeta,
894
+ [descendantComponent]: descendantMeta,
895
+ [blockComponent]: blockMeta,
896
+ [blockTemplateComponent]: blockTemplateMeta
897
+ };
898
+
899
+ // src/core-templates.tsx
900
+ import { jsx, jsxs } from "react/jsx-runtime";
901
+ var elementMeta2 = {
902
+ category: "general",
903
+ order: 1,
904
+ description: "An HTML element is a core building block for web pages, structuring and displaying content like text, images, and links.",
905
+ template: /* @__PURE__ */ jsx(ws.element, {})
906
+ };
907
+ var linkMeta = {
908
+ category: "general",
909
+ description: "Use a link to send your users to another page, section, or resource. Configure links in the Settings panel.",
910
+ order: 2,
911
+ template: /* @__PURE__ */ jsx(
912
+ ws.element,
913
+ {
914
+ "ws:tag": "a",
915
+ "ws:style": css`
916
+ display: inline-block;
917
+ `
918
+ }
919
+ )
920
+ };
921
+ var collectionItem = new Parameter("collectionItem");
922
+ var collectionMeta2 = {
923
+ category: "data",
924
+ order: 2,
925
+ template: /* @__PURE__ */ jsx(
926
+ ws.collection,
927
+ {
928
+ data: ["Collection Item 1", "Collection Item 2", "Collection Item 3"],
929
+ item: collectionItem,
930
+ children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: expression`${collectionItem}` }) })
931
+ }
932
+ )
933
+ };
934
+ var descendantMeta2 = {
935
+ category: "internal",
936
+ template: /* @__PURE__ */ jsx(ws.descendant, { selector: " p" })
937
+ };
938
+ var BlockTemplate = ws["block-template"];
939
+ var blockMeta2 = {
940
+ category: "general",
941
+ template: /* @__PURE__ */ jsxs(ws.block, { children: [
942
+ /* @__PURE__ */ jsxs(BlockTemplate, { "ws:label": "Templates", children: [
943
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "p" }),
944
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 1", "ws:tag": "h1" }),
945
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 2", "ws:tag": "h2" }),
946
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 3", "ws:tag": "h3" }),
947
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 4", "ws:tag": "h4" }),
948
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 5", "ws:tag": "h5" }),
949
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 6", "ws:tag": "h6" }),
950
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "ul", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }) }),
951
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "ol", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }) }),
952
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "a" }),
953
+ /* @__PURE__ */ jsx(
954
+ $.Image,
955
+ {
956
+ "ws:style": css`
957
+ margin-right: auto;
958
+ margin-left: auto;
959
+ width: 100%;
960
+ height: auto;
961
+ `
962
+ }
963
+ ),
964
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "hr" }),
965
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "blockquote" }),
966
+ /* @__PURE__ */ jsx($.HtmlEmbed, {}),
967
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "code" })
968
+ ] }),
969
+ /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "p", children: [
970
+ "The Content Block component designates regions on the page where pre-styled instances can be inserted in",
971
+ " ",
972
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "a", href: "https://wstd.us/content-block", children: "Content mode" }),
973
+ "."
974
+ ] }),
975
+ /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "ul", children: [
976
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li", children: "In Content mode, you can edit any direct child instances that were pre-added to the Content Block, as well as add new instances predefined in Templates." }),
977
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li", children: "To predefine instances for insertion in Content mode, switch to Design mode and add them to the Templates container." }),
978
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li", children: "To insert predefined instances in Content mode, click the + button while hovering over the Content Block on the canvas and choose an instance from the list." })
979
+ ] })
980
+ ] })
981
+ };
982
+ var typography = {
983
+ heading: {
984
+ category: "typography",
985
+ description: "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
986
+ template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "h1" })
987
+ },
988
+ paragraph: {
989
+ category: "typography",
990
+ description: "A container for multi-line text.",
991
+ template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "p" })
992
+ },
993
+ blockquote: {
994
+ category: "typography",
995
+ description: "Use to style a quote from an external source like an article or book.",
996
+ template: /* @__PURE__ */ jsx(
997
+ ws.element,
998
+ {
999
+ "ws:tag": "blockquote",
1000
+ "ws:style": css`
1001
+ margin-left: 0;
1002
+ margin-right: 0;
1003
+ padding: 10px 20px;
1004
+ border-left: 5px solid rgb(226 226 226 / 1);
1005
+ `
1006
+ }
1007
+ )
1008
+ },
1009
+ list: {
1010
+ category: "typography",
1011
+ description: "Groups content, like links in a menu or steps in a recipe.",
1012
+ template: /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "ul", children: [
1013
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }),
1014
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }),
1015
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" })
1016
+ ] })
1017
+ },
1018
+ list_item: {
1019
+ category: "typography",
1020
+ description: "Adds a new item to an existing list.",
1021
+ template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" })
1022
+ },
1023
+ code_text: {
1024
+ category: "typography",
1025
+ template: /* @__PURE__ */ jsx(
1026
+ ws.element,
1027
+ {
1028
+ "ws:tag": "code",
1029
+ "ws:style": css`
1030
+ display: block;
1031
+ white-space-collapse: preserve;
1032
+ text-wrap-mode: wrap;
1033
+ padding-left: 0.2em;
1034
+ padding-right: 0.2em;
1035
+ background-color: rgb(238 238 238);
1036
+ `
1037
+ }
1038
+ )
1039
+ },
1040
+ thematic_break: {
1041
+ category: "typography",
1042
+ description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
1043
+ template: /* @__PURE__ */ jsx(
1044
+ ws.element,
1045
+ {
1046
+ "ws:tag": "hr",
1047
+ "ws:style": css`
1048
+ color: gray;
1049
+ border-style: none none solid;
1050
+ `
1051
+ }
1052
+ )
1053
+ }
1054
+ };
1055
+ var forms = {
1056
+ form: {
1057
+ category: "forms",
1058
+ description: "Create filters, surveys, searches and more.",
1059
+ template: /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "form", children: [
1060
+ /* @__PURE__ */ jsx(
1061
+ ws.element,
1062
+ {
1063
+ "ws:tag": "input",
1064
+ "ws:style": css`
1065
+ display: block;
1066
+ `
1067
+ }
1068
+ ),
1069
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "button", children: new PlaceholderValue("Submit") })
1070
+ ] })
1071
+ },
1072
+ button: {
1073
+ category: "forms",
1074
+ description: "Use a button to submit forms or trigger actions within a page. Do not use a button to navigate users to another resource or another page - that\u2019s what a link is used for.",
1075
+ template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "button", children: new PlaceholderValue("Button") })
1076
+ },
1077
+ input_label: {
1078
+ category: "forms",
1079
+ template: /* @__PURE__ */ jsx(
1080
+ ws.element,
1081
+ {
1082
+ "ws:tag": "label",
1083
+ "ws:style": css`
1084
+ display: block;
1085
+ `,
1086
+ children: new PlaceholderValue("Label")
1087
+ }
1088
+ )
1089
+ },
1090
+ text_input: {
1091
+ category: "forms",
1092
+ description: "A single-line text input for collecting string data from your users.",
1093
+ template: /* @__PURE__ */ jsx(
1094
+ ws.element,
1095
+ {
1096
+ "ws:tag": "input",
1097
+ "ws:style": css`
1098
+ display: block;
1099
+ `
1100
+ }
1101
+ )
1102
+ },
1103
+ text_area: {
1104
+ category: "forms",
1105
+ description: "A multi-line text input for collecting longer string data from your users.",
1106
+ template: /* @__PURE__ */ jsx(
1107
+ ws.element,
1108
+ {
1109
+ "ws:tag": "textarea",
1110
+ "ws:style": css`
1111
+ display: block;
1112
+ `
1113
+ }
1114
+ )
1115
+ },
1116
+ select: {
1117
+ category: "forms",
1118
+ description: "A drop-down menu for users to select a single option from a predefined list.",
1119
+ template: /* @__PURE__ */ jsxs(
1120
+ ws.element,
1121
+ {
1122
+ "ws:tag": "select",
1123
+ "ws:style": css`
1124
+ display: block;
1125
+ `,
1126
+ children: [
1127
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Please choose an option", value: "" }),
1128
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option A", value: "a" }),
1129
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option B", value: "b" }),
1130
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option C", value: "c" })
1131
+ ]
1132
+ }
1133
+ )
1134
+ },
1135
+ radio: {
1136
+ category: "forms",
1137
+ description: "Use within a form to allow your users to select a single option from a set of mutually exclusive choices. Group multiple radios by matching their \u201CName\u201D properties.",
1138
+ icon: RadioCheckedIcon,
1139
+ template: /* @__PURE__ */ jsxs(
1140
+ ws.element,
1141
+ {
1142
+ "ws:tag": "label",
1143
+ "ws:label": "Radio Field",
1144
+ "ws:style": css`
1145
+ display: block;
1146
+ `,
1147
+ children: [
1148
+ /* @__PURE__ */ jsx(
1149
+ ws.element,
1150
+ {
1151
+ "ws:tag": "input",
1152
+ "ws:style": css`
1153
+ border-style: none;
1154
+ margin-right: 0.5em;
1155
+ `,
1156
+ type: "radio"
1157
+ }
1158
+ ),
1159
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "span", "ws:label": "Radio Label", children: new PlaceholderValue("Radio") })
1160
+ ]
1161
+ }
1162
+ )
1163
+ },
1164
+ checkbox: {
1165
+ category: "forms",
1166
+ description: "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their \u201CName\u201D properties. Unlike radios, any number of checkboxes in a group can be checked.",
1167
+ icon: CheckboxCheckedIcon,
1168
+ template: /* @__PURE__ */ jsxs(
1169
+ ws.element,
1170
+ {
1171
+ "ws:tag": "label",
1172
+ "ws:label": "Checkbox Field",
1173
+ "ws:style": css`
1174
+ display: block;
1175
+ `,
1176
+ children: [
1177
+ /* @__PURE__ */ jsx(
1178
+ ws.element,
1179
+ {
1180
+ "ws:tag": "input",
1181
+ "ws:style": css`
1182
+ border-style: none;
1183
+ margin-right: 0.5em;
1184
+ `,
1185
+ type: "checkbox"
1186
+ }
1187
+ ),
1188
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "span", "ws:label": "Checkbox Label", children: new PlaceholderValue("Checkbox") })
1189
+ ]
1190
+ }
1191
+ )
1192
+ }
1193
+ };
1194
+ var builtWithWebstudioMeta = {
1195
+ category: "other",
1196
+ description: "A \u201CBuilt with Webstudio\u201D badge should be added to every project page on the free plan. This helps Webstudio spread awareness as a platform.",
1197
+ icon: Webstudio1cIcon,
1198
+ template: /* @__PURE__ */ jsxs(
1199
+ ws.element,
1200
+ {
1201
+ "ws:tag": "a",
1202
+ "ws:label": "Built with Webstudio",
1203
+ href: "https://webstudio.is/?via=badge",
1204
+ target: "_blank",
1205
+ "ws:style": css`
1206
+ display: inline-flex;
1207
+ gap: 6px;
1208
+ align-items: center;
1209
+ justify-content: center;
1210
+ position: fixed;
1211
+ z-index: 1000;
1212
+ padding: 6px 10px;
1213
+ right: 16px;
1214
+ bottom: 16px;
1215
+ color: rgba(251, 252, 253, 1);
1216
+ font-family: system-ui, sans-serif;
1217
+ font-size: 12px;
1218
+ font-weight: 500;
1219
+ line-height: 1;
1220
+ border: 1px solid transparent;
1221
+ border-radius: 9px;
1222
+ text-decoration-line: none;
1223
+ text-wrap-mode: nowrap;
1224
+ background-clip: padding-box, border-box;
1225
+ background-origin: padding-box, border-box;
1226
+ background-image:
1227
+ linear-gradient(135deg, #4a4efa 0%, #bd2fdb 66%, #ec59ce 100%),
1228
+ linear-gradient(
1229
+ 135deg,
1230
+ #92fddc 0%,
1231
+ #7d7ffb 31.94%,
1232
+ #ed72fe 64.24%,
1233
+ #fdd791 100%
1234
+ );
1235
+ `,
1236
+ children: [
1237
+ /* @__PURE__ */ jsx(
1238
+ $.HtmlEmbed,
1239
+ {
1240
+ "ws:label": "Logo",
1241
+ code: Webstudio1cIcon,
1242
+ "ws:style": css`
1243
+ display: block;
1244
+ width: 16px;
1245
+ height: 16px;
1246
+ flex-shrink: 0;
1247
+ `
1248
+ }
1249
+ ),
1250
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", "ws:label": "Text", children: "Built with Webstudio" })
1251
+ ]
1252
+ }
1253
+ )
1254
+ };
1255
+ var coreTemplates = {
1256
+ [elementComponent]: elementMeta2,
1257
+ link: linkMeta,
1258
+ [collectionComponent]: collectionMeta2,
1259
+ [descendantComponent]: descendantMeta2,
1260
+ [blockComponent]: blockMeta2,
1261
+ ...typography,
1262
+ ...forms,
1263
+ builtWithWebstudio: builtWithWebstudioMeta
1264
+ };
1265
+ export {
1266
+ coreTemplates
1267
+ };