@webstudio-is/sdk 0.0.0-588fe22 → 0.0.0-73cd6ea

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.
@@ -1,11 +1,23 @@
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
+
1
7
  // src/core-templates.tsx
2
8
  import {
3
9
  $,
4
10
  css,
5
11
  expression,
6
12
  Parameter,
13
+ PlaceholderValue,
7
14
  ws
8
15
  } from "@webstudio-is/template";
16
+ import {
17
+ CheckboxCheckedIcon,
18
+ RadioCheckedIcon,
19
+ Webstudio1cIcon
20
+ } from "@webstudio-is/icons/svg";
9
21
 
10
22
  // src/core-metas.ts
11
23
  import {
@@ -17,66 +29,821 @@ import {
17
29
  } from "@webstudio-is/icons/svg";
18
30
 
19
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;
20
131
  var html = [
21
132
  { property: "display", value: { type: "keyword", value: "grid" } },
22
- { property: "minHeight", value: { type: "unit", unit: "%", value: 100 } },
133
+ { property: "min-height", value: { type: "unit", unit: "%", value: 100 } },
23
134
  {
24
- property: "fontFamily",
135
+ property: "font-family",
25
136
  value: { type: "fontFamily", value: ["Arial", "Roboto", "sans-serif"] }
26
137
  },
27
- { property: "fontSize", value: { type: "unit", unit: "px", value: 16 } },
138
+ { property: "font-size", value: { type: "unit", unit: "px", value: 16 } },
28
139
  {
29
- property: "lineHeight",
140
+ property: "line-height",
30
141
  value: { type: "unit", unit: "number", value: 1.2 }
31
142
  },
32
143
  {
33
- property: "whiteSpaceCollapse",
144
+ property: "white-space-collapse",
34
145
  value: { type: "keyword", value: "preserve" }
35
146
  }
36
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
+ ];
37
794
 
38
795
  // src/core-metas.ts
39
796
  var rootComponent = "ws:root";
40
797
  var rootMeta = {
41
- type: "container",
42
798
  label: "Global Root",
43
799
  icon: SettingsIcon,
44
800
  presetStyle: {
45
801
  html
46
802
  }
47
803
  };
48
- var rootPropsMeta = {
49
- props: {}
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
+ }
50
818
  };
51
819
  var collectionComponent = "ws:collection";
52
820
  var collectionMeta = {
53
- type: "container",
54
821
  label: "Collection",
55
- icon: ListViewIcon
56
- };
57
- var collectionPropsMeta = {
822
+ icon: ListViewIcon,
823
+ contentModel: {
824
+ category: "instance",
825
+ children: ["instance"]
826
+ },
827
+ initialProps: ["data"],
58
828
  props: {
59
829
  data: {
60
830
  required: true,
61
831
  control: "json",
62
832
  type: "json"
63
833
  }
64
- },
65
- initialProps: ["data"]
834
+ }
66
835
  };
67
836
  var descendantComponent = "ws:descendant";
68
837
  var descendantMeta = {
69
- type: "control",
70
838
  label: "Descendant",
71
839
  icon: PaintBrushIcon,
840
+ contentModel: {
841
+ category: "none",
842
+ children: []
843
+ },
72
844
  // @todo infer possible presets
73
845
  presetStyle: {},
74
- constraints: {
75
- relation: "parent",
76
- component: { $in: ["HtmlEmbed", "MarkdownEmbed"] }
77
- }
78
- };
79
- var descendantPropsMeta = {
846
+ initialProps: ["selector"],
80
847
  props: {
81
848
  selector: {
82
849
  required: true,
@@ -101,57 +868,56 @@ var descendantPropsMeta = {
101
868
  " hr"
102
869
  ]
103
870
  }
104
- },
105
- initialProps: ["selector"]
871
+ }
106
872
  };
107
873
  var blockComponent = "ws:block";
108
874
  var blockTemplateComponent = "ws:block-template";
109
875
  var blockTemplateMeta = {
110
- type: "container",
111
876
  icon: AddTemplateInstanceIcon,
112
- constraints: {
113
- relation: "parent",
114
- component: { $eq: blockComponent }
877
+ contentModel: {
878
+ category: "none",
879
+ children: ["instance"]
115
880
  }
116
881
  };
117
- var blockTemplatePropsMeta = {
118
- props: {}
119
- };
120
882
  var blockMeta = {
121
- type: "container",
122
883
  label: "Content Block",
123
884
  icon: ContentBlockIcon,
124
- constraints: [
125
- {
126
- relation: "ancestor",
127
- component: { $nin: [collectionComponent, blockComponent] }
128
- },
129
- {
130
- relation: "child",
131
- component: { $eq: blockTemplateComponent }
132
- }
133
- ]
134
- };
135
- var blockPropsMeta = {
136
- props: {}
885
+ contentModel: {
886
+ category: "instance",
887
+ children: [blockTemplateComponent, "instance"]
888
+ }
137
889
  };
138
890
  var coreMetas = {
139
891
  [rootComponent]: rootMeta,
892
+ [elementComponent]: elementMeta,
140
893
  [collectionComponent]: collectionMeta,
141
894
  [descendantComponent]: descendantMeta,
142
895
  [blockComponent]: blockMeta,
143
896
  [blockTemplateComponent]: blockTemplateMeta
144
897
  };
145
- var corePropsMetas = {
146
- [rootComponent]: rootPropsMeta,
147
- [collectionComponent]: collectionPropsMeta,
148
- [descendantComponent]: descendantPropsMeta,
149
- [blockComponent]: blockPropsMeta,
150
- [blockTemplateComponent]: blockTemplatePropsMeta
151
- };
152
898
 
153
899
  // src/core-templates.tsx
154
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
+ };
155
921
  var collectionItem = new Parameter("collectionItem");
156
922
  var collectionMeta2 = {
157
923
  category: "data",
@@ -161,7 +927,7 @@ var collectionMeta2 = {
161
927
  {
162
928
  data: ["Collection Item 1", "Collection Item 2", "Collection Item 3"],
163
929
  item: collectionItem,
164
- children: /* @__PURE__ */ jsx($.Box, { children: /* @__PURE__ */ jsx($.Text, { children: expression`${collectionItem}` }) })
930
+ children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: expression`${collectionItem}` }) })
165
931
  }
166
932
  )
167
933
  };
@@ -171,19 +937,19 @@ var descendantMeta2 = {
171
937
  };
172
938
  var BlockTemplate = ws["block-template"];
173
939
  var blockMeta2 = {
174
- category: "typography",
940
+ category: "general",
175
941
  template: /* @__PURE__ */ jsxs(ws.block, { children: [
176
942
  /* @__PURE__ */ jsxs(BlockTemplate, { "ws:label": "Templates", children: [
177
- /* @__PURE__ */ jsx($.Paragraph, {}),
178
- /* @__PURE__ */ jsx($.Heading, { "ws:label": "Heading 1", tag: "h1" }),
179
- /* @__PURE__ */ jsx($.Heading, { "ws:label": "Heading 2", tag: "h2" }),
180
- /* @__PURE__ */ jsx($.Heading, { "ws:label": "Heading 3", tag: "h3" }),
181
- /* @__PURE__ */ jsx($.Heading, { "ws:label": "Heading 4", tag: "h4" }),
182
- /* @__PURE__ */ jsx($.Heading, { "ws:label": "Heading 5", tag: "h5" }),
183
- /* @__PURE__ */ jsx($.Heading, { "ws:label": "Heading 6", tag: "h6" }),
184
- /* @__PURE__ */ jsx($.List, { "ws:label": "List (Unordered)", children: /* @__PURE__ */ jsx($.ListItem, {}) }),
185
- /* @__PURE__ */ jsx($.List, { "ws:label": "List (Ordered)", ordered: true, children: /* @__PURE__ */ jsx($.ListItem, {}) }),
186
- /* @__PURE__ */ jsx($.Link, {}),
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" }),
187
953
  /* @__PURE__ */ jsx(
188
954
  $.Image,
189
955
  {
@@ -195,28 +961,306 @@ var blockMeta2 = {
195
961
  `
196
962
  }
197
963
  ),
198
- /* @__PURE__ */ jsx($.Separator, {}),
199
- /* @__PURE__ */ jsx($.Blockquote, {}),
964
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "hr" }),
965
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "blockquote" }),
200
966
  /* @__PURE__ */ jsx($.HtmlEmbed, {}),
201
- /* @__PURE__ */ jsx($.CodeText, {})
967
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "code" })
202
968
  ] }),
203
- /* @__PURE__ */ jsxs($.Paragraph, { children: [
969
+ /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "p", children: [
204
970
  "The Content Block component designates regions on the page where pre-styled instances can be inserted in",
205
971
  " ",
206
- /* @__PURE__ */ jsx($.RichTextLink, { href: "https://wstd.us/content-block", children: "Content mode" }),
972
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "a", href: "https://wstd.us/content-block", children: "Content mode" }),
207
973
  "."
208
974
  ] }),
209
- /* @__PURE__ */ jsxs($.List, { children: [
210
- /* @__PURE__ */ jsx($.ListItem, { 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." }),
211
- /* @__PURE__ */ jsx($.ListItem, { children: "To predefine instances for insertion in Content mode, switch to Design mode and add them to the Templates container." }),
212
- /* @__PURE__ */ jsx($.ListItem, { 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." })
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." })
213
979
  ] })
214
980
  ] })
215
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
+ };
216
1255
  var coreTemplates = {
1256
+ [elementComponent]: elementMeta2,
1257
+ link: linkMeta,
217
1258
  [collectionComponent]: collectionMeta2,
218
1259
  [descendantComponent]: descendantMeta2,
219
- [blockComponent]: blockMeta2
1260
+ [blockComponent]: blockMeta2,
1261
+ ...typography,
1262
+ ...forms,
1263
+ builtWithWebstudio: builtWithWebstudioMeta
220
1264
  };
221
1265
  export {
222
1266
  coreTemplates