@webstudio-is/sdk 0.0.0-5844e28 → 0.0.0-7cb4145

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,19 @@
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 { CheckboxCheckedIcon, RadioCheckedIcon } from "@webstudio-is/icons/svg";
9
17
 
10
18
  // src/core-metas.ts
11
19
  import {
@@ -17,66 +25,762 @@ import {
17
25
  } from "@webstudio-is/icons/svg";
18
26
 
19
27
  // src/__generated__/normalize.css.ts
28
+ var normalize_css_exports = {};
29
+ __export(normalize_css_exports, {
30
+ a: () => a,
31
+ address: () => address,
32
+ article: () => article,
33
+ aside: () => aside,
34
+ b: () => b,
35
+ body: () => body,
36
+ button: () => button,
37
+ checkbox: () => checkbox,
38
+ code: () => code,
39
+ div: () => div,
40
+ figure: () => figure,
41
+ footer: () => footer,
42
+ form: () => form,
43
+ h1: () => h1,
44
+ h2: () => h2,
45
+ h3: () => h3,
46
+ h4: () => h4,
47
+ h5: () => h5,
48
+ h6: () => h6,
49
+ header: () => header,
50
+ hr: () => hr,
51
+ html: () => html,
52
+ i: () => i,
53
+ img: () => img,
54
+ input: () => input,
55
+ kbd: () => kbd,
56
+ label: () => label,
57
+ legend: () => legend,
58
+ li: () => li,
59
+ main: () => main,
60
+ nav: () => nav,
61
+ ol: () => ol,
62
+ optgroup: () => optgroup,
63
+ p: () => p,
64
+ pre: () => pre,
65
+ progress: () => progress,
66
+ radio: () => radio,
67
+ samp: () => samp,
68
+ section: () => section,
69
+ select: () => select,
70
+ small: () => small,
71
+ span: () => span,
72
+ strong: () => strong,
73
+ sub: () => sub,
74
+ summary: () => summary,
75
+ sup: () => sup,
76
+ table: () => table,
77
+ textarea: () => textarea,
78
+ time: () => time,
79
+ ul: () => ul
80
+ });
81
+ var div = [
82
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
83
+ {
84
+ property: "border-top-width",
85
+ value: { type: "unit", unit: "px", value: 1 }
86
+ },
87
+ {
88
+ property: "border-right-width",
89
+ value: { type: "unit", unit: "px", value: 1 }
90
+ },
91
+ {
92
+ property: "border-bottom-width",
93
+ value: { type: "unit", unit: "px", value: 1 }
94
+ },
95
+ {
96
+ property: "border-left-width",
97
+ value: { type: "unit", unit: "px", value: 1 }
98
+ },
99
+ { property: "outline-width", value: { type: "unit", unit: "px", value: 1 } }
100
+ ];
101
+ var address = div;
102
+ var article = div;
103
+ var aside = div;
104
+ var figure = div;
105
+ var footer = div;
106
+ var header = div;
107
+ var main = div;
108
+ var nav = div;
109
+ var section = div;
110
+ var form = div;
111
+ var label = div;
112
+ var time = div;
113
+ var h1 = div;
114
+ var h2 = div;
115
+ var h3 = div;
116
+ var h4 = div;
117
+ var h5 = div;
118
+ var h6 = div;
119
+ var i = div;
120
+ var img = div;
121
+ var a = div;
122
+ var li = div;
123
+ var ul = div;
124
+ var ol = div;
125
+ var p = div;
126
+ var span = div;
20
127
  var html = [
21
128
  { property: "display", value: { type: "keyword", value: "grid" } },
22
- { property: "minHeight", value: { type: "unit", unit: "%", value: 100 } },
129
+ { property: "min-height", value: { type: "unit", unit: "%", value: 100 } },
23
130
  {
24
- property: "fontFamily",
131
+ property: "font-family",
25
132
  value: { type: "fontFamily", value: ["Arial", "Roboto", "sans-serif"] }
26
133
  },
27
- { property: "fontSize", value: { type: "unit", unit: "px", value: 16 } },
134
+ { property: "font-size", value: { type: "unit", unit: "px", value: 16 } },
28
135
  {
29
- property: "lineHeight",
136
+ property: "line-height",
30
137
  value: { type: "unit", unit: "number", value: 1.2 }
31
138
  },
32
139
  {
33
- property: "whiteSpaceCollapse",
140
+ property: "white-space-collapse",
34
141
  value: { type: "keyword", value: "preserve" }
35
142
  }
36
143
  ];
144
+ var body = [
145
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
146
+ {
147
+ property: "margin-right",
148
+ value: { type: "unit", unit: "number", value: 0 }
149
+ },
150
+ {
151
+ property: "margin-bottom",
152
+ value: { type: "unit", unit: "number", value: 0 }
153
+ },
154
+ {
155
+ property: "margin-left",
156
+ value: { type: "unit", unit: "number", value: 0 }
157
+ },
158
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
159
+ {
160
+ property: "border-top-width",
161
+ value: { type: "unit", unit: "px", value: 1 }
162
+ },
163
+ {
164
+ property: "border-right-width",
165
+ value: { type: "unit", unit: "px", value: 1 }
166
+ },
167
+ {
168
+ property: "border-bottom-width",
169
+ value: { type: "unit", unit: "px", value: 1 }
170
+ },
171
+ {
172
+ property: "border-left-width",
173
+ value: { type: "unit", unit: "px", value: 1 }
174
+ },
175
+ {
176
+ property: "-webkit-font-smoothing",
177
+ value: { type: "keyword", value: "antialiased" }
178
+ },
179
+ {
180
+ property: "-moz-osx-font-smoothing",
181
+ value: { type: "keyword", value: "grayscale" }
182
+ }
183
+ ];
184
+ var hr = [
185
+ { property: "height", value: { type: "unit", unit: "number", value: 0 } },
186
+ { property: "color", value: { type: "keyword", value: "inherit" } }
187
+ ];
188
+ var b = [
189
+ {
190
+ property: "font-weight",
191
+ value: { type: "unit", unit: "number", value: 700 }
192
+ },
193
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
194
+ {
195
+ property: "border-top-width",
196
+ value: { type: "unit", unit: "px", value: 1 }
197
+ },
198
+ {
199
+ property: "border-right-width",
200
+ value: { type: "unit", unit: "px", value: 1 }
201
+ },
202
+ {
203
+ property: "border-bottom-width",
204
+ value: { type: "unit", unit: "px", value: 1 }
205
+ },
206
+ {
207
+ property: "border-left-width",
208
+ value: { type: "unit", unit: "px", value: 1 }
209
+ }
210
+ ];
211
+ var strong = b;
212
+ var code = [
213
+ {
214
+ property: "font-family",
215
+ value: {
216
+ type: "fontFamily",
217
+ value: [
218
+ "ui-monospace",
219
+ "SFMono-Regular",
220
+ "Consolas",
221
+ "Liberation Mono",
222
+ "Menlo",
223
+ "monospace"
224
+ ]
225
+ }
226
+ },
227
+ { property: "font-size", value: { type: "unit", unit: "em", value: 1 } },
228
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
229
+ {
230
+ property: "border-top-width",
231
+ value: { type: "unit", unit: "px", value: 1 }
232
+ },
233
+ {
234
+ property: "border-right-width",
235
+ value: { type: "unit", unit: "px", value: 1 }
236
+ },
237
+ {
238
+ property: "border-bottom-width",
239
+ value: { type: "unit", unit: "px", value: 1 }
240
+ },
241
+ {
242
+ property: "border-left-width",
243
+ value: { type: "unit", unit: "px", value: 1 }
244
+ }
245
+ ];
246
+ var kbd = code;
247
+ var samp = code;
248
+ var pre = code;
249
+ var small = [
250
+ { property: "font-size", value: { type: "unit", unit: "%", value: 80 } },
251
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
252
+ {
253
+ property: "border-top-width",
254
+ value: { type: "unit", unit: "px", value: 1 }
255
+ },
256
+ {
257
+ property: "border-right-width",
258
+ value: { type: "unit", unit: "px", value: 1 }
259
+ },
260
+ {
261
+ property: "border-bottom-width",
262
+ value: { type: "unit", unit: "px", value: 1 }
263
+ },
264
+ {
265
+ property: "border-left-width",
266
+ value: { type: "unit", unit: "px", value: 1 }
267
+ }
268
+ ];
269
+ var sub = [
270
+ { property: "font-size", value: { type: "unit", unit: "%", value: 75 } },
271
+ {
272
+ property: "line-height",
273
+ value: { type: "unit", unit: "number", value: 0 }
274
+ },
275
+ { property: "position", value: { type: "keyword", value: "relative" } },
276
+ { property: "vertical-align", value: { type: "keyword", value: "baseline" } },
277
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
278
+ {
279
+ property: "border-top-width",
280
+ value: { type: "unit", unit: "px", value: 1 }
281
+ },
282
+ {
283
+ property: "border-right-width",
284
+ value: { type: "unit", unit: "px", value: 1 }
285
+ },
286
+ {
287
+ property: "border-bottom-width",
288
+ value: { type: "unit", unit: "px", value: 1 }
289
+ },
290
+ {
291
+ property: "border-left-width",
292
+ value: { type: "unit", unit: "px", value: 1 }
293
+ },
294
+ { property: "bottom", value: { type: "unit", unit: "em", value: -0.25 } }
295
+ ];
296
+ var sup = [
297
+ { property: "font-size", value: { type: "unit", unit: "%", value: 75 } },
298
+ {
299
+ property: "line-height",
300
+ value: { type: "unit", unit: "number", value: 0 }
301
+ },
302
+ { property: "position", value: { type: "keyword", value: "relative" } },
303
+ { property: "vertical-align", value: { type: "keyword", value: "baseline" } },
304
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
305
+ {
306
+ property: "border-top-width",
307
+ value: { type: "unit", unit: "px", value: 1 }
308
+ },
309
+ {
310
+ property: "border-right-width",
311
+ value: { type: "unit", unit: "px", value: 1 }
312
+ },
313
+ {
314
+ property: "border-bottom-width",
315
+ value: { type: "unit", unit: "px", value: 1 }
316
+ },
317
+ {
318
+ property: "border-left-width",
319
+ value: { type: "unit", unit: "px", value: 1 }
320
+ },
321
+ { property: "top", value: { type: "unit", unit: "em", value: -0.5 } }
322
+ ];
323
+ var table = [
324
+ {
325
+ property: "text-indent",
326
+ value: { type: "unit", unit: "number", value: 0 }
327
+ },
328
+ {
329
+ property: "border-top-width",
330
+ value: { type: "unit", unit: "px", value: 1 }
331
+ },
332
+ {
333
+ property: "border-right-width",
334
+ value: { type: "unit", unit: "px", value: 1 }
335
+ },
336
+ {
337
+ property: "border-bottom-width",
338
+ value: { type: "unit", unit: "px", value: 1 }
339
+ },
340
+ {
341
+ property: "border-left-width",
342
+ value: { type: "unit", unit: "px", value: 1 }
343
+ },
344
+ {
345
+ property: "border-top-color",
346
+ value: { type: "keyword", value: "inherit" }
347
+ },
348
+ {
349
+ property: "border-right-color",
350
+ value: { type: "keyword", value: "inherit" }
351
+ },
352
+ {
353
+ property: "border-bottom-color",
354
+ value: { type: "keyword", value: "inherit" }
355
+ },
356
+ {
357
+ property: "border-left-color",
358
+ value: { type: "keyword", value: "inherit" }
359
+ },
360
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } }
361
+ ];
362
+ var input = [
363
+ { property: "font-family", value: { type: "keyword", value: "inherit" } },
364
+ { property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
365
+ {
366
+ property: "line-height",
367
+ value: { type: "unit", unit: "number", value: 1.15 }
368
+ },
369
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
370
+ {
371
+ property: "margin-right",
372
+ value: { type: "unit", unit: "number", value: 0 }
373
+ },
374
+ {
375
+ property: "margin-bottom",
376
+ value: { type: "unit", unit: "number", value: 0 }
377
+ },
378
+ {
379
+ property: "margin-left",
380
+ value: { type: "unit", unit: "number", value: 0 }
381
+ },
382
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
383
+ {
384
+ property: "border-top-width",
385
+ value: { type: "unit", unit: "px", value: 1 }
386
+ },
387
+ {
388
+ property: "border-right-width",
389
+ value: { type: "unit", unit: "px", value: 1 }
390
+ },
391
+ {
392
+ property: "border-bottom-width",
393
+ value: { type: "unit", unit: "px", value: 1 }
394
+ },
395
+ {
396
+ property: "border-left-width",
397
+ value: { type: "unit", unit: "px", value: 1 }
398
+ },
399
+ { property: "border-top-style", value: { type: "keyword", value: "solid" } },
400
+ {
401
+ property: "border-right-style",
402
+ value: { type: "keyword", value: "solid" }
403
+ },
404
+ {
405
+ property: "border-bottom-style",
406
+ value: { type: "keyword", value: "solid" }
407
+ },
408
+ { property: "border-left-style", value: { type: "keyword", value: "solid" } }
409
+ ];
410
+ var textarea = input;
411
+ var optgroup = [
412
+ { property: "font-family", value: { type: "keyword", value: "inherit" } },
413
+ { property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
414
+ {
415
+ property: "line-height",
416
+ value: { type: "unit", unit: "number", value: 1.15 }
417
+ },
418
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
419
+ {
420
+ property: "margin-right",
421
+ value: { type: "unit", unit: "number", value: 0 }
422
+ },
423
+ {
424
+ property: "margin-bottom",
425
+ value: { type: "unit", unit: "number", value: 0 }
426
+ },
427
+ {
428
+ property: "margin-left",
429
+ value: { type: "unit", unit: "number", value: 0 }
430
+ },
431
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
432
+ {
433
+ property: "border-top-width",
434
+ value: { type: "unit", unit: "px", value: 1 }
435
+ },
436
+ {
437
+ property: "border-right-width",
438
+ value: { type: "unit", unit: "px", value: 1 }
439
+ },
440
+ {
441
+ property: "border-bottom-width",
442
+ value: { type: "unit", unit: "px", value: 1 }
443
+ },
444
+ {
445
+ property: "border-left-width",
446
+ value: { type: "unit", unit: "px", value: 1 }
447
+ }
448
+ ];
449
+ var radio = [
450
+ { property: "font-family", value: { type: "keyword", value: "inherit" } },
451
+ { property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
452
+ {
453
+ property: "line-height",
454
+ value: { type: "unit", unit: "number", value: 1.15 }
455
+ },
456
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
457
+ {
458
+ property: "margin-right",
459
+ value: { type: "unit", unit: "number", value: 0 }
460
+ },
461
+ {
462
+ property: "margin-bottom",
463
+ value: { type: "unit", unit: "number", value: 0 }
464
+ },
465
+ {
466
+ property: "margin-left",
467
+ value: { type: "unit", unit: "number", value: 0 }
468
+ },
469
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
470
+ {
471
+ property: "border-top-width",
472
+ value: { type: "unit", unit: "px", value: 1 }
473
+ },
474
+ {
475
+ property: "border-right-width",
476
+ value: { type: "unit", unit: "px", value: 1 }
477
+ },
478
+ {
479
+ property: "border-bottom-width",
480
+ value: { type: "unit", unit: "px", value: 1 }
481
+ },
482
+ {
483
+ property: "border-left-width",
484
+ value: { type: "unit", unit: "px", value: 1 }
485
+ },
486
+ { property: "border-top-style", value: { type: "keyword", value: "none" } },
487
+ { property: "border-right-style", value: { type: "keyword", value: "none" } },
488
+ {
489
+ property: "border-bottom-style",
490
+ value: { type: "keyword", value: "none" }
491
+ },
492
+ { property: "border-left-style", value: { type: "keyword", value: "none" } }
493
+ ];
494
+ var checkbox = radio;
495
+ var button = [
496
+ { property: "font-family", value: { type: "keyword", value: "inherit" } },
497
+ { property: "font-size", value: { type: "unit", unit: "%", value: 100 } },
498
+ {
499
+ property: "line-height",
500
+ value: { type: "unit", unit: "number", value: 1.15 }
501
+ },
502
+ { property: "margin-top", value: { type: "unit", unit: "number", value: 0 } },
503
+ {
504
+ property: "margin-right",
505
+ value: { type: "unit", unit: "number", value: 0 }
506
+ },
507
+ {
508
+ property: "margin-bottom",
509
+ value: { type: "unit", unit: "number", value: 0 }
510
+ },
511
+ {
512
+ property: "margin-left",
513
+ value: { type: "unit", unit: "number", value: 0 }
514
+ },
515
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
516
+ {
517
+ property: "border-top-width",
518
+ value: { type: "unit", unit: "px", value: 1 }
519
+ },
520
+ {
521
+ property: "border-right-width",
522
+ value: { type: "unit", unit: "px", value: 1 }
523
+ },
524
+ {
525
+ property: "border-bottom-width",
526
+ value: { type: "unit", unit: "px", value: 1 }
527
+ },
528
+ {
529
+ property: "border-left-width",
530
+ value: { type: "unit", unit: "px", value: 1 }
531
+ },
532
+ { property: "border-top-style", value: { type: "keyword", value: "solid" } },
533
+ {
534
+ property: "border-right-style",
535
+ value: { type: "keyword", value: "solid" }
536
+ },
537
+ {
538
+ property: "border-bottom-style",
539
+ value: { type: "keyword", value: "solid" }
540
+ },
541
+ { property: "border-left-style", value: { type: "keyword", value: "solid" } },
542
+ { property: "text-transform", value: { type: "keyword", value: "none" } }
543
+ ];
544
+ var select = button;
545
+ var legend = [
546
+ {
547
+ property: "padding-top",
548
+ value: { type: "unit", unit: "number", value: 0 }
549
+ },
550
+ {
551
+ property: "padding-right",
552
+ value: { type: "unit", unit: "number", value: 0 }
553
+ },
554
+ {
555
+ property: "padding-bottom",
556
+ value: { type: "unit", unit: "number", value: 0 }
557
+ },
558
+ {
559
+ property: "padding-left",
560
+ value: { type: "unit", unit: "number", value: 0 }
561
+ },
562
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
563
+ {
564
+ property: "border-top-width",
565
+ value: { type: "unit", unit: "px", value: 1 }
566
+ },
567
+ {
568
+ property: "border-right-width",
569
+ value: { type: "unit", unit: "px", value: 1 }
570
+ },
571
+ {
572
+ property: "border-bottom-width",
573
+ value: { type: "unit", unit: "px", value: 1 }
574
+ },
575
+ {
576
+ property: "border-left-width",
577
+ value: { type: "unit", unit: "px", value: 1 }
578
+ }
579
+ ];
580
+ var progress = [
581
+ { property: "vertical-align", value: { type: "keyword", value: "baseline" } },
582
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
583
+ {
584
+ property: "border-top-width",
585
+ value: { type: "unit", unit: "px", value: 1 }
586
+ },
587
+ {
588
+ property: "border-right-width",
589
+ value: { type: "unit", unit: "px", value: 1 }
590
+ },
591
+ {
592
+ property: "border-bottom-width",
593
+ value: { type: "unit", unit: "px", value: 1 }
594
+ },
595
+ {
596
+ property: "border-left-width",
597
+ value: { type: "unit", unit: "px", value: 1 }
598
+ }
599
+ ];
600
+ var summary = [
601
+ { property: "display", value: { type: "keyword", value: "list-item" } },
602
+ { property: "box-sizing", value: { type: "keyword", value: "border-box" } },
603
+ {
604
+ property: "border-top-width",
605
+ value: { type: "unit", unit: "px", value: 1 }
606
+ },
607
+ {
608
+ property: "border-right-width",
609
+ value: { type: "unit", unit: "px", value: 1 }
610
+ },
611
+ {
612
+ property: "border-bottom-width",
613
+ value: { type: "unit", unit: "px", value: 1 }
614
+ },
615
+ {
616
+ property: "border-left-width",
617
+ value: { type: "unit", unit: "px", value: 1 }
618
+ }
619
+ ];
620
+
621
+ // src/runtime.ts
622
+ var tagProperty = "data-ws-tag";
623
+
624
+ // src/__generated__/tags.ts
625
+ var tags = [
626
+ "div",
627
+ "span",
628
+ "a",
629
+ "abbr",
630
+ "address",
631
+ "area",
632
+ "article",
633
+ "aside",
634
+ "audio",
635
+ "b",
636
+ "bdi",
637
+ "bdo",
638
+ "blockquote",
639
+ "body",
640
+ "br",
641
+ "button",
642
+ "canvas",
643
+ "caption",
644
+ "cite",
645
+ "code",
646
+ "col",
647
+ "colgroup",
648
+ "data",
649
+ "datalist",
650
+ "dd",
651
+ "del",
652
+ "details",
653
+ "dfn",
654
+ "dialog",
655
+ "dl",
656
+ "dt",
657
+ "em",
658
+ "embed",
659
+ "fieldset",
660
+ "figcaption",
661
+ "figure",
662
+ "footer",
663
+ "form",
664
+ "h1",
665
+ "h2",
666
+ "h3",
667
+ "h4",
668
+ "h5",
669
+ "h6",
670
+ "head",
671
+ "header",
672
+ "hgroup",
673
+ "hr",
674
+ "html",
675
+ "i",
676
+ "iframe",
677
+ "img",
678
+ "input",
679
+ "ins",
680
+ "kbd",
681
+ "label",
682
+ "legend",
683
+ "li",
684
+ "main",
685
+ "map",
686
+ "mark",
687
+ "menu",
688
+ "meter",
689
+ "nav",
690
+ "object",
691
+ "ol",
692
+ "optgroup",
693
+ "option",
694
+ "output",
695
+ "p",
696
+ "picture",
697
+ "pre",
698
+ "progress",
699
+ "q",
700
+ "rp",
701
+ "rt",
702
+ "ruby",
703
+ "s",
704
+ "samp",
705
+ "search",
706
+ "section",
707
+ "select",
708
+ "slot",
709
+ "small",
710
+ "source",
711
+ "strong",
712
+ "sub",
713
+ "summary",
714
+ "sup",
715
+ "table",
716
+ "tbody",
717
+ "td",
718
+ "textarea",
719
+ "tfoot",
720
+ "th",
721
+ "thead",
722
+ "time",
723
+ "tr",
724
+ "track",
725
+ "u",
726
+ "ul",
727
+ "var",
728
+ "video",
729
+ "wbr"
730
+ ];
37
731
 
38
732
  // src/core-metas.ts
39
733
  var rootComponent = "ws:root";
40
734
  var rootMeta = {
41
- type: "container",
42
735
  label: "Global Root",
43
736
  icon: SettingsIcon,
44
737
  presetStyle: {
45
738
  html
46
739
  }
47
740
  };
48
- var rootPropsMeta = {
49
- props: {}
741
+ var elementComponent = "ws:element";
742
+ var elementMeta = {
743
+ label: "Element",
744
+ // convert [object Module] to [object Object] to enable structured cloning
745
+ presetStyle: { ...normalize_css_exports },
746
+ initialProps: [tagProperty, "id", "class"],
747
+ props: {
748
+ [tagProperty]: {
749
+ type: "string",
750
+ control: "tag",
751
+ required: true,
752
+ options: tags
753
+ }
754
+ }
50
755
  };
51
756
  var collectionComponent = "ws:collection";
52
757
  var collectionMeta = {
53
- type: "container",
54
758
  label: "Collection",
55
- icon: ListViewIcon
56
- };
57
- var collectionPropsMeta = {
759
+ icon: ListViewIcon,
760
+ contentModel: {
761
+ category: "instance",
762
+ children: ["instance"]
763
+ },
764
+ initialProps: ["data"],
58
765
  props: {
59
766
  data: {
60
767
  required: true,
61
768
  control: "json",
62
769
  type: "json"
63
770
  }
64
- },
65
- initialProps: ["data"]
771
+ }
66
772
  };
67
773
  var descendantComponent = "ws:descendant";
68
774
  var descendantMeta = {
69
- type: "control",
70
775
  label: "Descendant",
71
776
  icon: PaintBrushIcon,
777
+ contentModel: {
778
+ category: "none",
779
+ children: []
780
+ },
72
781
  // @todo infer possible presets
73
782
  presetStyle: {},
74
- constraints: {
75
- relation: "parent",
76
- component: { $in: ["HtmlEmbed", "MarkdownEmbed"] }
77
- }
78
- };
79
- var descendantPropsMeta = {
783
+ initialProps: ["selector"],
80
784
  props: {
81
785
  selector: {
82
786
  required: true,
@@ -101,57 +805,56 @@ var descendantPropsMeta = {
101
805
  " hr"
102
806
  ]
103
807
  }
104
- },
105
- initialProps: ["selector"]
808
+ }
106
809
  };
107
810
  var blockComponent = "ws:block";
108
811
  var blockTemplateComponent = "ws:block-template";
109
812
  var blockTemplateMeta = {
110
- type: "container",
111
813
  icon: AddTemplateInstanceIcon,
112
- constraints: {
113
- relation: "parent",
114
- component: { $eq: blockComponent }
814
+ contentModel: {
815
+ category: "none",
816
+ children: ["instance"]
115
817
  }
116
818
  };
117
- var blockTemplatePropsMeta = {
118
- props: {}
119
- };
120
819
  var blockMeta = {
121
- type: "container",
122
820
  label: "Content Block",
123
821
  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: {}
822
+ contentModel: {
823
+ category: "instance",
824
+ children: [blockTemplateComponent, "instance"]
825
+ }
137
826
  };
138
827
  var coreMetas = {
139
828
  [rootComponent]: rootMeta,
829
+ [elementComponent]: elementMeta,
140
830
  [collectionComponent]: collectionMeta,
141
831
  [descendantComponent]: descendantMeta,
142
832
  [blockComponent]: blockMeta,
143
833
  [blockTemplateComponent]: blockTemplateMeta
144
834
  };
145
- var corePropsMetas = {
146
- [rootComponent]: rootPropsMeta,
147
- [collectionComponent]: collectionPropsMeta,
148
- [descendantComponent]: descendantPropsMeta,
149
- [blockComponent]: blockPropsMeta,
150
- [blockTemplateComponent]: blockTemplatePropsMeta
151
- };
152
835
 
153
836
  // src/core-templates.tsx
154
837
  import { jsx, jsxs } from "react/jsx-runtime";
838
+ var elementMeta2 = {
839
+ category: "general",
840
+ order: 1,
841
+ description: "An HTML element is a core building block for web pages, structuring and displaying content like text, images, and links.",
842
+ template: /* @__PURE__ */ jsx(ws.element, {})
843
+ };
844
+ var linkMeta = {
845
+ category: "general",
846
+ description: "Use a link to send your users to another page, section, or resource. Configure links in the Settings panel.",
847
+ order: 2,
848
+ template: /* @__PURE__ */ jsx(
849
+ ws.element,
850
+ {
851
+ "ws:tag": "a",
852
+ "ws:style": css`
853
+ display: inline-block;
854
+ `
855
+ }
856
+ )
857
+ };
155
858
  var collectionItem = new Parameter("collectionItem");
156
859
  var collectionMeta2 = {
157
860
  category: "data",
@@ -161,7 +864,7 @@ var collectionMeta2 = {
161
864
  {
162
865
  data: ["Collection Item 1", "Collection Item 2", "Collection Item 3"],
163
866
  item: collectionItem,
164
- children: /* @__PURE__ */ jsx($.Box, { children: /* @__PURE__ */ jsx($.Text, { children: expression`${collectionItem}` }) })
867
+ children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "div", children: expression`${collectionItem}` }) })
165
868
  }
166
869
  )
167
870
  };
@@ -171,19 +874,19 @@ var descendantMeta2 = {
171
874
  };
172
875
  var BlockTemplate = ws["block-template"];
173
876
  var blockMeta2 = {
174
- category: "typography",
877
+ category: "general",
175
878
  template: /* @__PURE__ */ jsxs(ws.block, { children: [
176
879
  /* @__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, {}),
880
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "p" }),
881
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 1", "ws:tag": "h1" }),
882
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 2", "ws:tag": "h2" }),
883
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 3", "ws:tag": "h3" }),
884
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 4", "ws:tag": "h4" }),
885
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 5", "ws:tag": "h5" }),
886
+ /* @__PURE__ */ jsx(ws.element, { "ws:label": "Heading 6", "ws:tag": "h6" }),
887
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "ul", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }) }),
888
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "ol", children: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }) }),
889
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "a" }),
187
890
  /* @__PURE__ */ jsx(
188
891
  $.Image,
189
892
  {
@@ -195,28 +898,244 @@ var blockMeta2 = {
195
898
  `
196
899
  }
197
900
  ),
198
- /* @__PURE__ */ jsx($.Separator, {}),
199
- /* @__PURE__ */ jsx($.Blockquote, {}),
901
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "hr" }),
902
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "blockquote" }),
200
903
  /* @__PURE__ */ jsx($.HtmlEmbed, {}),
201
- /* @__PURE__ */ jsx($.CodeText, {})
904
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "code" })
202
905
  ] }),
203
- /* @__PURE__ */ jsxs($.Paragraph, { children: [
906
+ /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "p", children: [
204
907
  "The Content Block component designates regions on the page where pre-styled instances can be inserted in",
205
908
  " ",
206
- /* @__PURE__ */ jsx($.RichTextLink, { href: "https://wstd.us/content-block", children: "Content mode" }),
909
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "a", href: "https://wstd.us/content-block", children: "Content mode" }),
207
910
  "."
208
911
  ] }),
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." })
912
+ /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "ul", children: [
913
+ /* @__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." }),
914
+ /* @__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." }),
915
+ /* @__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
916
  ] })
214
917
  ] })
215
918
  };
919
+ var typography = {
920
+ heading: {
921
+ category: "typography",
922
+ description: "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
923
+ template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "h1" })
924
+ },
925
+ paragraph: {
926
+ category: "typography",
927
+ description: "A container for multi-line text.",
928
+ template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "p" })
929
+ },
930
+ blockquote: {
931
+ category: "typography",
932
+ description: "Use to style a quote from an external source like an article or book.",
933
+ template: /* @__PURE__ */ jsx(
934
+ ws.element,
935
+ {
936
+ "ws:tag": "blockquote",
937
+ "ws:style": css`
938
+ margin-left: 0;
939
+ margin-right: 0;
940
+ padding: 10px 20px;
941
+ border-left: 5px solid rgb(226 226 226 / 1);
942
+ `
943
+ }
944
+ )
945
+ },
946
+ list: {
947
+ category: "typography",
948
+ description: "Groups content, like links in a menu or steps in a recipe.",
949
+ template: /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "ul", children: [
950
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }),
951
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" }),
952
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" })
953
+ ] })
954
+ },
955
+ list_item: {
956
+ category: "typography",
957
+ description: "Adds a new item to an existing list.",
958
+ template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "li" })
959
+ },
960
+ code_text: {
961
+ category: "typography",
962
+ template: /* @__PURE__ */ jsx(
963
+ ws.element,
964
+ {
965
+ "ws:tag": "code",
966
+ "ws:style": css`
967
+ display: block;
968
+ white-space-collapse: preserve;
969
+ text-wrap-mode: wrap;
970
+ padding-left: 0.2em;
971
+ padding-right: 0.2em;
972
+ background-color: rgb(238 238 238);
973
+ `
974
+ }
975
+ )
976
+ },
977
+ thematic_break: {
978
+ category: "typography",
979
+ description: "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
980
+ template: /* @__PURE__ */ jsx(
981
+ ws.element,
982
+ {
983
+ "ws:tag": "hr",
984
+ "ws:style": css`
985
+ color: gray;
986
+ border-style: none none solid;
987
+ `
988
+ }
989
+ )
990
+ }
991
+ };
992
+ var forms = {
993
+ form: {
994
+ category: "forms",
995
+ description: "Create filters, surveys, searches and more.",
996
+ template: /* @__PURE__ */ jsxs(ws.element, { "ws:tag": "form", children: [
997
+ /* @__PURE__ */ jsx(
998
+ ws.element,
999
+ {
1000
+ "ws:tag": "input",
1001
+ "ws:style": css`
1002
+ display: block;
1003
+ `
1004
+ }
1005
+ ),
1006
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "button", children: new PlaceholderValue("Submit") })
1007
+ ] })
1008
+ },
1009
+ button: {
1010
+ category: "forms",
1011
+ 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.",
1012
+ template: /* @__PURE__ */ jsx(ws.element, { "ws:tag": "button", children: new PlaceholderValue("Button") })
1013
+ },
1014
+ input_label: {
1015
+ category: "forms",
1016
+ template: /* @__PURE__ */ jsx(
1017
+ ws.element,
1018
+ {
1019
+ "ws:tag": "label",
1020
+ "ws:style": css`
1021
+ display: block;
1022
+ `,
1023
+ children: new PlaceholderValue("Label")
1024
+ }
1025
+ )
1026
+ },
1027
+ text_input: {
1028
+ category: "forms",
1029
+ description: "A single-line text input for collecting string data from your users.",
1030
+ template: /* @__PURE__ */ jsx(
1031
+ ws.element,
1032
+ {
1033
+ "ws:tag": "input",
1034
+ "ws:style": css`
1035
+ display: block;
1036
+ `
1037
+ }
1038
+ )
1039
+ },
1040
+ text_area: {
1041
+ category: "forms",
1042
+ description: "A multi-line text input for collecting longer string data from your users.",
1043
+ template: /* @__PURE__ */ jsx(
1044
+ ws.element,
1045
+ {
1046
+ "ws:tag": "textarea",
1047
+ "ws:style": css`
1048
+ display: block;
1049
+ `
1050
+ }
1051
+ )
1052
+ },
1053
+ select: {
1054
+ category: "forms",
1055
+ description: "A drop-down menu for users to select a single option from a predefined list.",
1056
+ template: /* @__PURE__ */ jsxs(
1057
+ ws.element,
1058
+ {
1059
+ "ws:tag": "select",
1060
+ "ws:style": css`
1061
+ display: block;
1062
+ `,
1063
+ children: [
1064
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Please choose an option", value: "" }),
1065
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option A", value: "a" }),
1066
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option B", value: "b" }),
1067
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "option", label: "Option C", value: "c" })
1068
+ ]
1069
+ }
1070
+ )
1071
+ },
1072
+ radio: {
1073
+ category: "forms",
1074
+ 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.",
1075
+ icon: RadioCheckedIcon,
1076
+ template: /* @__PURE__ */ jsxs(
1077
+ ws.element,
1078
+ {
1079
+ "ws:tag": "label",
1080
+ "ws:label": "Radio Field",
1081
+ "ws:style": css`
1082
+ display: block;
1083
+ `,
1084
+ children: [
1085
+ /* @__PURE__ */ jsx(
1086
+ ws.element,
1087
+ {
1088
+ "ws:tag": "input",
1089
+ "ws:style": css`
1090
+ border-style: none;
1091
+ margin-right: 0.5em;
1092
+ `,
1093
+ type: "radio"
1094
+ }
1095
+ ),
1096
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "span", "ws:label": "Radio Label", children: new PlaceholderValue("Radio") })
1097
+ ]
1098
+ }
1099
+ )
1100
+ },
1101
+ checkbox: {
1102
+ category: "forms",
1103
+ 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.",
1104
+ icon: CheckboxCheckedIcon,
1105
+ template: /* @__PURE__ */ jsxs(
1106
+ ws.element,
1107
+ {
1108
+ "ws:tag": "label",
1109
+ "ws:label": "Checkbox Field",
1110
+ "ws:style": css`
1111
+ display: block;
1112
+ `,
1113
+ children: [
1114
+ /* @__PURE__ */ jsx(
1115
+ ws.element,
1116
+ {
1117
+ "ws:tag": "input",
1118
+ "ws:style": css`
1119
+ border-style: none;
1120
+ margin-right: 0.5em;
1121
+ `,
1122
+ type: "checkbox"
1123
+ }
1124
+ ),
1125
+ /* @__PURE__ */ jsx(ws.element, { "ws:tag": "span", "ws:label": "Checkbox Label", children: new PlaceholderValue("Checkbox") })
1126
+ ]
1127
+ }
1128
+ )
1129
+ }
1130
+ };
216
1131
  var coreTemplates = {
1132
+ [elementComponent]: elementMeta2,
1133
+ link: linkMeta,
217
1134
  [collectionComponent]: collectionMeta2,
218
1135
  [descendantComponent]: descendantMeta2,
219
- [blockComponent]: blockMeta2
1136
+ [blockComponent]: blockMeta2,
1137
+ ...typography,
1138
+ ...forms
220
1139
  };
221
1140
  export {
222
1141
  coreTemplates