html-standard 0.0.2 → 0.0.4

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 (133) hide show
  1. package/dist/index.cjs +2357 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +66 -0
  4. package/dist/index.d.ts +66 -0
  5. package/dist/index.js +2336 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +7 -4
  8. package/.prettierignore +0 -1
  9. package/.prettierrc +0 -1
  10. package/jest.config.js +0 -7
  11. package/src/elements/common/attributes.ts +0 -34
  12. package/src/elements/common/contents.ts +0 -191
  13. package/src/elements/document/html.ts +0 -18
  14. package/src/elements/document-metadata/base.ts +0 -9
  15. package/src/elements/document-metadata/head.ts +0 -21
  16. package/src/elements/document-metadata/link.ts +0 -27
  17. package/src/elements/document-metadata/meta.ts +0 -15
  18. package/src/elements/document-metadata/style.ts +0 -14
  19. package/src/elements/document-metadata/title.ts +0 -14
  20. package/src/elements/edits/del.ts +0 -15
  21. package/src/elements/edits/ins.ts +0 -15
  22. package/src/elements/embedded-content/area.ts +0 -19
  23. package/src/elements/embedded-content/audio.ts +0 -57
  24. package/src/elements/embedded-content/embed.ts +0 -9
  25. package/src/elements/embedded-content/iframe.ts +0 -20
  26. package/src/elements/embedded-content/img.ts +0 -23
  27. package/src/elements/embedded-content/map.ts +0 -15
  28. package/src/elements/embedded-content/object.ts +0 -22
  29. package/src/elements/embedded-content/picture.ts +0 -31
  30. package/src/elements/embedded-content/source.ts +0 -17
  31. package/src/elements/embedded-content/track.ts +0 -16
  32. package/src/elements/embedded-content/video.ts +0 -63
  33. package/src/elements/forms/button.ts +0 -39
  34. package/src/elements/forms/datalist.ts +0 -29
  35. package/src/elements/forms/fieldset.ts +0 -19
  36. package/src/elements/forms/form.ts +0 -36
  37. package/src/elements/forms/input.ts +0 -45
  38. package/src/elements/forms/label.ts +0 -18
  39. package/src/elements/forms/legend.ts +0 -16
  40. package/src/elements/forms/meter.ts +0 -32
  41. package/src/elements/forms/optgroup.ts +0 -16
  42. package/src/elements/forms/option.ts +0 -45
  43. package/src/elements/forms/output.ts +0 -15
  44. package/src/elements/forms/progress.ts +0 -18
  45. package/src/elements/forms/select.ts +0 -29
  46. package/src/elements/forms/textarea.ts +0 -29
  47. package/src/elements/grouping-content/blockquote.ts +0 -15
  48. package/src/elements/grouping-content/dd.ts +0 -15
  49. package/src/elements/grouping-content/div.ts +0 -43
  50. package/src/elements/grouping-content/dl.ts +0 -52
  51. package/src/elements/grouping-content/dt.ts +0 -26
  52. package/src/elements/grouping-content/figcaption.ts +0 -15
  53. package/src/elements/grouping-content/figure.ts +0 -42
  54. package/src/elements/grouping-content/hr.ts +0 -9
  55. package/src/elements/grouping-content/li.ts +0 -31
  56. package/src/elements/grouping-content/main.ts +0 -15
  57. package/src/elements/grouping-content/menu.ts +0 -16
  58. package/src/elements/grouping-content/ol.ts +0 -16
  59. package/src/elements/grouping-content/p.ts +0 -15
  60. package/src/elements/grouping-content/pre.ts +0 -15
  61. package/src/elements/grouping-content/search.ts +0 -15
  62. package/src/elements/grouping-content/ul.ts +0 -16
  63. package/src/elements/index.ts +0 -137
  64. package/src/elements/interactive-elements/details.ts +0 -19
  65. package/src/elements/interactive-elements/dialog.ts +0 -15
  66. package/src/elements/interactive-elements/summary.ts +0 -16
  67. package/src/elements/scripting/canvas.ts +0 -19
  68. package/src/elements/scripting/noscript.ts +0 -15
  69. package/src/elements/scripting/script.ts +0 -26
  70. package/src/elements/scripting/slot.ts +0 -15
  71. package/src/elements/scripting/template.ts +0 -14
  72. package/src/elements/sections/address.ts +0 -26
  73. package/src/elements/sections/article.ts +0 -15
  74. package/src/elements/sections/aside.ts +0 -15
  75. package/src/elements/sections/body.ts +0 -34
  76. package/src/elements/sections/footer.ts +0 -21
  77. package/src/elements/sections/h1.ts +0 -15
  78. package/src/elements/sections/h2.ts +0 -2
  79. package/src/elements/sections/h3.ts +0 -2
  80. package/src/elements/sections/h4.ts +0 -2
  81. package/src/elements/sections/h5.ts +0 -2
  82. package/src/elements/sections/h6.ts +0 -2
  83. package/src/elements/sections/header.ts +0 -21
  84. package/src/elements/sections/hrgroup.ts +0 -39
  85. package/src/elements/sections/nav.ts +0 -15
  86. package/src/elements/sections/section.ts +0 -15
  87. package/src/elements/tabular-data/caption.ts +0 -18
  88. package/src/elements/tabular-data/col.ts +0 -9
  89. package/src/elements/tabular-data/colgroup.ts +0 -26
  90. package/src/elements/tabular-data/table.ts +0 -68
  91. package/src/elements/tabular-data/tbody.ts +0 -16
  92. package/src/elements/tabular-data/td.ts +0 -15
  93. package/src/elements/tabular-data/tfoot.ts +0 -16
  94. package/src/elements/tabular-data/th.ts +0 -32
  95. package/src/elements/tabular-data/thead.ts +0 -16
  96. package/src/elements/tabular-data/tr.ts +0 -16
  97. package/src/elements/text-level-semantics/a.ts +0 -49
  98. package/src/elements/text-level-semantics/abbr.ts +0 -15
  99. package/src/elements/text-level-semantics/b.ts +0 -15
  100. package/src/elements/text-level-semantics/bdi.ts +0 -15
  101. package/src/elements/text-level-semantics/bdo.ts +0 -15
  102. package/src/elements/text-level-semantics/br.ts +0 -9
  103. package/src/elements/text-level-semantics/cite.ts +0 -15
  104. package/src/elements/text-level-semantics/code.ts +0 -15
  105. package/src/elements/text-level-semantics/data.ts +0 -15
  106. package/src/elements/text-level-semantics/dfn.ts +0 -18
  107. package/src/elements/text-level-semantics/em.ts +0 -15
  108. package/src/elements/text-level-semantics/i.ts +0 -15
  109. package/src/elements/text-level-semantics/kbd.ts +0 -15
  110. package/src/elements/text-level-semantics/mark.ts +0 -15
  111. package/src/elements/text-level-semantics/q.ts +0 -15
  112. package/src/elements/text-level-semantics/rp.ts +0 -15
  113. package/src/elements/text-level-semantics/rt.ts +0 -15
  114. package/src/elements/text-level-semantics/ruby.ts +0 -16
  115. package/src/elements/text-level-semantics/s.ts +0 -15
  116. package/src/elements/text-level-semantics/samp.ts +0 -15
  117. package/src/elements/text-level-semantics/small.ts +0 -15
  118. package/src/elements/text-level-semantics/span.ts +0 -15
  119. package/src/elements/text-level-semantics/strong.ts +0 -15
  120. package/src/elements/text-level-semantics/sub.ts +0 -15
  121. package/src/elements/text-level-semantics/sup.ts +0 -3
  122. package/src/elements/text-level-semantics/time.ts +0 -30
  123. package/src/elements/text-level-semantics/u.ts +0 -15
  124. package/src/elements/text-level-semantics/var.ts +0 -15
  125. package/src/elements/text-level-semantics/wbr.ts +0 -9
  126. package/src/elements/types.ts +0 -71
  127. package/src/elements/utils/contentAttributes.ts +0 -23
  128. package/src/elements/utils/contents.ts +0 -0
  129. package/src/getElementSpec.ts +0 -20
  130. package/src/index.ts +0 -1
  131. package/src/utils/set.ts +0 -20
  132. package/tsconfig.json +0 -10
  133. package/tsup.config.ts +0 -11
package/dist/index.js ADDED
@@ -0,0 +1,2336 @@
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/elements/index.ts
8
+ var elements_exports = {};
9
+ __export(elements_exports, {
10
+ _var: () => _var,
11
+ a: () => a,
12
+ abbr: () => abbr,
13
+ address: () => address,
14
+ area: () => area,
15
+ article: () => article,
16
+ aside: () => aside,
17
+ audio: () => audio,
18
+ b: () => b,
19
+ base: () => base,
20
+ bdi: () => bdi,
21
+ bdo: () => bdo,
22
+ blockquote: () => blockquote,
23
+ body: () => body,
24
+ br: () => br,
25
+ button: () => button,
26
+ canvas: () => canvas,
27
+ caption: () => caption,
28
+ cite: () => cite,
29
+ code: () => code,
30
+ col: () => col,
31
+ colgroup: () => colgroup,
32
+ data: () => data,
33
+ datalist: () => datalist,
34
+ dd: () => dd,
35
+ del: () => del,
36
+ details: () => details,
37
+ dfn: () => dfn,
38
+ dialog: () => dialog,
39
+ div: () => div,
40
+ dl: () => dl,
41
+ dt: () => dt,
42
+ em: () => em,
43
+ embed: () => embed,
44
+ fieldset: () => fieldset,
45
+ figcaption: () => figcaption,
46
+ figure: () => figure,
47
+ footer: () => footer,
48
+ form: () => form,
49
+ h1: () => h1,
50
+ h2: () => h2,
51
+ h3: () => h3,
52
+ h4: () => h4,
53
+ h5: () => h5,
54
+ h6: () => h6,
55
+ head: () => head,
56
+ header: () => header,
57
+ hr: () => hr,
58
+ hrgroup: () => hrgroup,
59
+ html: () => html,
60
+ i: () => i,
61
+ iframe: () => iframe,
62
+ img: () => img,
63
+ input: () => input,
64
+ ins: () => ins,
65
+ kbd: () => kbd,
66
+ label: () => label,
67
+ legend: () => legend,
68
+ li: () => li,
69
+ link: () => link,
70
+ main: () => main,
71
+ map: () => map,
72
+ mark: () => mark,
73
+ menu: () => menu,
74
+ meta: () => meta,
75
+ meter: () => meter,
76
+ nav: () => nav,
77
+ noscript: () => noscript,
78
+ object: () => object,
79
+ ol: () => ol,
80
+ optgroup: () => optgroup,
81
+ option: () => option,
82
+ output: () => output,
83
+ p: () => p,
84
+ picture: () => picture,
85
+ pre: () => pre,
86
+ progress: () => progress,
87
+ q: () => q,
88
+ rp: () => rp,
89
+ rt: () => rt,
90
+ ruby: () => ruby,
91
+ s: () => s,
92
+ samp: () => samp,
93
+ script: () => script,
94
+ search: () => search,
95
+ section: () => section,
96
+ select: () => select,
97
+ slot: () => slot,
98
+ small: () => small,
99
+ source: () => source,
100
+ span: () => span,
101
+ strong: () => strong,
102
+ style: () => style,
103
+ sub: () => sub,
104
+ summary: () => summary,
105
+ sup: () => sup,
106
+ table: () => table,
107
+ tbody: () => tbody,
108
+ td: () => td,
109
+ template: () => template,
110
+ textarea: () => textarea,
111
+ tfoot: () => tfoot,
112
+ th: () => th,
113
+ thead: () => thead,
114
+ time: () => time,
115
+ title: () => title,
116
+ tr: () => tr,
117
+ track: () => track,
118
+ u: () => u,
119
+ ul: () => ul,
120
+ video: () => video,
121
+ wbr: () => wbr
122
+ });
123
+
124
+ // src/helpers/contents.ts
125
+ var contents = {
126
+ fromKeys(...keys) {
127
+ return new Set(keys);
128
+ },
129
+ fromSet(set, ...keys) {
130
+ const result = new Set(set);
131
+ keys.forEach((key) => set.add(key));
132
+ return result;
133
+ },
134
+ fromUnionSets(setA, setB) {
135
+ const set = new Set(...setA, ...setB);
136
+ return set;
137
+ }
138
+ };
139
+
140
+ // src/helpers/content-constraint.ts
141
+ var contentConstraint = {
142
+ fromEntries(entries) {
143
+ return new Map(entries);
144
+ },
145
+ fromSets(value, ...sets) {
146
+ return new Map(
147
+ sets.reduce((acc, set) => [...acc, ...set], []).map((key) => [key, value])
148
+ );
149
+ }
150
+ };
151
+ var required = {
152
+ required: true
153
+ };
154
+ var onlyOne = {
155
+ max: 1
156
+ };
157
+ var disallow = {
158
+ disallow: true
159
+ };
160
+
161
+ // src/helpers/attributes.ts
162
+ var emptyAttributes = /* @__PURE__ */ new Set([]);
163
+ var globalAttributes = /* @__PURE__ */ new Set([
164
+ "accesskey",
165
+ "autocapitalize",
166
+ "autocorrect",
167
+ "autofocus",
168
+ "contenteditable",
169
+ "dir",
170
+ "draggable",
171
+ "enterkeyhint",
172
+ "hidden",
173
+ "inert",
174
+ "inputmode",
175
+ "is",
176
+ "itemid",
177
+ "itemprop",
178
+ "itemref",
179
+ "itemscope",
180
+ "itemtype",
181
+ "lang",
182
+ "nonce",
183
+ "popover",
184
+ "spellcheck",
185
+ "style",
186
+ "tabindex",
187
+ "title",
188
+ "translate",
189
+ "writingsuggestions",
190
+ "class",
191
+ "id",
192
+ "slot",
193
+ "xmlns",
194
+ "xml:lang",
195
+ "xml:space"
196
+ ]);
197
+
198
+ // src/helpers/content-attributes.ts
199
+ var contentAttributes = (global, specific) => {
200
+ if (!specific || specific.length === 0) {
201
+ if (global) {
202
+ return globalAttributes;
203
+ }
204
+ return emptyAttributes;
205
+ }
206
+ const specificAttributes = new Set(specific);
207
+ return {
208
+ has(name) {
209
+ return globalAttributes.has(name) || specificAttributes.has(name);
210
+ }
211
+ };
212
+ };
213
+
214
+ // src/helpers/contents-preset.ts
215
+ var contentsPreset = {
216
+ metadataContent: /* @__PURE__ */ new Set([
217
+ "base",
218
+ "link",
219
+ "meta",
220
+ "noscript",
221
+ "script",
222
+ "style",
223
+ "template",
224
+ "title"
225
+ ]),
226
+ flowContent: /* @__PURE__ */ new Set([
227
+ "a",
228
+ "abbr",
229
+ "address",
230
+ "area",
231
+ "article",
232
+ "aside",
233
+ "audio",
234
+ "b",
235
+ "bdi",
236
+ "bdo",
237
+ "blockquote",
238
+ "br",
239
+ "button",
240
+ "canvas",
241
+ "cite",
242
+ "code",
243
+ "data",
244
+ "datalist",
245
+ "del",
246
+ "details",
247
+ "dfn",
248
+ "dialog",
249
+ "div",
250
+ "dl",
251
+ "em",
252
+ "embed",
253
+ "fieldset",
254
+ "figure",
255
+ "footer",
256
+ "form",
257
+ "h1",
258
+ "h2",
259
+ "h3",
260
+ "h4",
261
+ "h5",
262
+ "h6",
263
+ "header",
264
+ "hgroup",
265
+ "hr",
266
+ "i",
267
+ "iframe",
268
+ "img",
269
+ "input",
270
+ "ins",
271
+ "kbd",
272
+ "label",
273
+ "link",
274
+ "main",
275
+ "map",
276
+ "mark",
277
+ "math",
278
+ "menu",
279
+ "meta",
280
+ "meter",
281
+ "nav",
282
+ "noscript",
283
+ "object",
284
+ "ol",
285
+ "output",
286
+ "p",
287
+ "picture",
288
+ "pre",
289
+ "progress",
290
+ "q",
291
+ "ruby",
292
+ "s",
293
+ "samp",
294
+ "script",
295
+ "search",
296
+ "section",
297
+ "select",
298
+ "slot",
299
+ "small",
300
+ "span",
301
+ "strong",
302
+ "sub",
303
+ "sup",
304
+ "svg",
305
+ "table",
306
+ "template",
307
+ "textarea",
308
+ "time",
309
+ "u",
310
+ "ul",
311
+ "var",
312
+ "video",
313
+ "wbr",
314
+ "#text"
315
+ ]),
316
+ phrasingContent: /* @__PURE__ */ new Set([
317
+ "a",
318
+ "abbr",
319
+ "area",
320
+ "audio",
321
+ "b",
322
+ "bdi",
323
+ "bdo",
324
+ "br",
325
+ "button",
326
+ "canvas",
327
+ "cite",
328
+ "code",
329
+ "data",
330
+ "datalist",
331
+ "del",
332
+ "dfn",
333
+ "em",
334
+ "embed",
335
+ "i",
336
+ "iframe",
337
+ "img",
338
+ "input",
339
+ "ins",
340
+ "kbd",
341
+ "label",
342
+ "link",
343
+ "map",
344
+ "mark",
345
+ "math",
346
+ "meta",
347
+ "meter",
348
+ "noscript",
349
+ "object",
350
+ "output",
351
+ "picture",
352
+ "progress",
353
+ "q",
354
+ "ruby",
355
+ "s",
356
+ "samp",
357
+ "script",
358
+ "select",
359
+ "slot",
360
+ "small",
361
+ "span",
362
+ "strong",
363
+ "sub",
364
+ "sup",
365
+ "svg",
366
+ "template",
367
+ "textarea",
368
+ "time",
369
+ "u",
370
+ "var",
371
+ "video",
372
+ "wbr",
373
+ "#text"
374
+ ]),
375
+ scriptSupportingElements: /* @__PURE__ */ new Set(["script", "template"]),
376
+ headingContent: /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6", "hgroup"]),
377
+ sectioningContent: /* @__PURE__ */ new Set(["article", "aside", "nav", "section"]),
378
+ transparentContent: /* @__PURE__ */ new Set(["#transparent"]),
379
+ interactiveContent: /* @__PURE__ */ new Set([
380
+ "a",
381
+ "audio",
382
+ "button",
383
+ "details",
384
+ "embed",
385
+ "iframe",
386
+ "img",
387
+ "input",
388
+ "label",
389
+ "select",
390
+ "text",
391
+ "area",
392
+ "video"
393
+ ]),
394
+ text: new Set("#text"),
395
+ mediaElements: /* @__PURE__ */ new Set(["audio", "video"]),
396
+ labelableElements: /* @__PURE__ */ new Set([
397
+ "button",
398
+ "input",
399
+ "meter",
400
+ "output",
401
+ "progress",
402
+ "select",
403
+ "textarea"
404
+ ])
405
+ };
406
+
407
+ // src/elements/html.ts
408
+ var htmlSpec = {
409
+ contents: [
410
+ {
411
+ type: "required",
412
+ contents: contents.fromKeys("head")
413
+ },
414
+ {
415
+ type: "required",
416
+ contents: contents.fromKeys("body")
417
+ }
418
+ ],
419
+ attributes: contentAttributes(true)
420
+ };
421
+ var html = () => htmlSpec;
422
+
423
+ // src/elements/head.ts
424
+ var headSpec = {
425
+ contents: [
426
+ {
427
+ type: "oneOrMore",
428
+ contents: contentsPreset.metadataContent,
429
+ constraints: {
430
+ children: contentConstraint.fromEntries([
431
+ ["title", required],
432
+ ["base", onlyOne]
433
+ ])
434
+ }
435
+ }
436
+ ],
437
+ attributes: contentAttributes(true)
438
+ };
439
+ var head = () => headSpec;
440
+
441
+ // src/elements/title.ts
442
+ var titleSpec = {
443
+ contents: [
444
+ {
445
+ type: "required",
446
+ contents: contentsPreset.text
447
+ }
448
+ ],
449
+ attributes: contentAttributes(true)
450
+ };
451
+ var title = () => titleSpec;
452
+
453
+ // src/elements/base.ts
454
+ var baseSpec = {
455
+ contents: null,
456
+ attributes: contentAttributes(true, ["href", "target"])
457
+ };
458
+ var base = () => baseSpec;
459
+
460
+ // src/elements/link.ts
461
+ var linkSpec = {
462
+ contents: null,
463
+ attributes: contentAttributes(true, [
464
+ "href",
465
+ "crossorigin",
466
+ "rel",
467
+ "media",
468
+ "integrity",
469
+ "hreflang",
470
+ "type",
471
+ "referrerpolicy",
472
+ "sizes",
473
+ "imagesrcset",
474
+ "imagesizes",
475
+ "as",
476
+ "blocking",
477
+ "color",
478
+ "disabled",
479
+ "fetchpriority",
480
+ "title"
481
+ ])
482
+ };
483
+ var link = () => linkSpec;
484
+
485
+ // src/elements/meta.ts
486
+ var metaSpec = {
487
+ contents: null,
488
+ attributes: contentAttributes(true, [
489
+ "name",
490
+ "http-equiv",
491
+ "content",
492
+ "charset",
493
+ "media"
494
+ ])
495
+ };
496
+ var meta = () => metaSpec;
497
+
498
+ // src/elements/style.ts
499
+ var styleSpec = {
500
+ contents: [
501
+ {
502
+ type: "required",
503
+ contents: contentsPreset.text
504
+ }
505
+ ],
506
+ attributes: contentAttributes(true, ["media", "blocking", "title"])
507
+ };
508
+ var style = () => styleSpec;
509
+
510
+ // src/elements/body.ts
511
+ var bodySpec = {
512
+ contents: [
513
+ {
514
+ type: "oneOrMore",
515
+ contents: contentsPreset.flowContent
516
+ }
517
+ ],
518
+ attributes: contentAttributes(true, [
519
+ "onafterprint",
520
+ "onbeforeprint",
521
+ "onbeforeunload",
522
+ "onhashchange",
523
+ "onlanguagechange",
524
+ "onmessage",
525
+ "onmessageerror",
526
+ "onoffline",
527
+ "ononline",
528
+ "onpageswap",
529
+ "onpagehide",
530
+ "onpagereveal",
531
+ "onpageshow",
532
+ "onpopstate",
533
+ "onrejectionhandled",
534
+ "onstorage",
535
+ "onunhandledrejection",
536
+ "onunload"
537
+ ])
538
+ };
539
+ var body = () => bodySpec;
540
+
541
+ // src/elements/article.ts
542
+ var articleSpec = {
543
+ contents: [
544
+ {
545
+ type: "oneOrMore",
546
+ contents: contentsPreset.flowContent
547
+ }
548
+ ],
549
+ attributes: contentAttributes(true)
550
+ };
551
+ var article = () => articleSpec;
552
+
553
+ // src/elements/section.ts
554
+ var sectionSpec = {
555
+ contents: [
556
+ {
557
+ type: "oneOrMore",
558
+ contents: contentsPreset.flowContent
559
+ }
560
+ ],
561
+ attributes: contentAttributes(true)
562
+ };
563
+ var section = () => sectionSpec;
564
+
565
+ // src/elements/nav.ts
566
+ var navSpec = {
567
+ contents: [
568
+ {
569
+ type: "oneOrMore",
570
+ contents: contentsPreset.flowContent
571
+ }
572
+ ],
573
+ attributes: contentAttributes(true)
574
+ };
575
+ var nav = () => navSpec;
576
+
577
+ // src/elements/aside.ts
578
+ var asideSpec = {
579
+ contents: [
580
+ {
581
+ type: "oneOrMore",
582
+ contents: contentsPreset.flowContent
583
+ }
584
+ ],
585
+ attributes: contentAttributes(true)
586
+ };
587
+ var aside = () => asideSpec;
588
+
589
+ // src/elements/h1.ts
590
+ var h1Spec = {
591
+ contents: [
592
+ {
593
+ type: "oneOrMore",
594
+ contents: contentsPreset.phrasingContent
595
+ }
596
+ ],
597
+ attributes: contentAttributes(true)
598
+ };
599
+ var h1 = () => h1Spec;
600
+
601
+ // src/elements/h2.ts
602
+ var h2 = h1;
603
+
604
+ // src/elements/h3.ts
605
+ var h3 = h1;
606
+
607
+ // src/elements/h4.ts
608
+ var h4 = h1;
609
+
610
+ // src/elements/h5.ts
611
+ var h5 = h1;
612
+
613
+ // src/elements/h6.ts
614
+ var h6 = h1;
615
+
616
+ // src/elements/hrgroup.ts
617
+ var hrgroupSpec = {
618
+ contents: [
619
+ {
620
+ type: "zeroOrMore",
621
+ contents: contentsPreset.scriptSupportingElements
622
+ },
623
+ {
624
+ type: "zeroOrMore",
625
+ contents: contents.fromKeys("p")
626
+ },
627
+ {
628
+ type: "zeroOrMore",
629
+ contents: contentsPreset.scriptSupportingElements
630
+ },
631
+ {
632
+ type: "required",
633
+ contents: contents.fromKeys("h1", "h2", "h3", "h4", "h5", "h6")
634
+ },
635
+ {
636
+ type: "zeroOrMore",
637
+ contents: contentsPreset.scriptSupportingElements
638
+ },
639
+ {
640
+ type: "zeroOrMore",
641
+ contents: contents.fromKeys("p")
642
+ },
643
+ {
644
+ type: "zeroOrMore",
645
+ contents: contentsPreset.scriptSupportingElements
646
+ }
647
+ ],
648
+ attributes: contentAttributes(true)
649
+ };
650
+ var hrgroup = () => hrgroupSpec;
651
+
652
+ // src/elements/header.ts
653
+ var headerSpec = {
654
+ contents: [
655
+ {
656
+ type: "oneOrMore",
657
+ contents: contentsPreset.flowContent,
658
+ constraints: {
659
+ descendants: contentConstraint.fromSets(
660
+ disallow,
661
+ /* @__PURE__ */ new Set(["header", "footer"])
662
+ )
663
+ }
664
+ }
665
+ ],
666
+ attributes: contentAttributes(true)
667
+ };
668
+ var header = () => headerSpec;
669
+
670
+ // src/elements/footer.ts
671
+ var footerSpec = {
672
+ contents: [
673
+ {
674
+ type: "oneOrMore",
675
+ contents: contentsPreset.flowContent,
676
+ constraints: {
677
+ descendants: contentConstraint.fromSets(
678
+ disallow,
679
+ /* @__PURE__ */ new Set(["header", "footer"])
680
+ )
681
+ }
682
+ }
683
+ ],
684
+ attributes: contentAttributes(true)
685
+ };
686
+ var footer = () => footerSpec;
687
+
688
+ // src/elements/address.ts
689
+ var addressSpec = {
690
+ contents: [
691
+ {
692
+ type: "oneOrMore",
693
+ contents: contentsPreset.flowContent,
694
+ constraints: {
695
+ descendants: contentConstraint.fromSets(
696
+ disallow,
697
+ contentsPreset.headingContent,
698
+ contentsPreset.sectioningContent,
699
+ /* @__PURE__ */ new Set(["header", "footer", "address"])
700
+ )
701
+ }
702
+ }
703
+ ],
704
+ attributes: contentAttributes(true)
705
+ };
706
+ var address = () => addressSpec;
707
+
708
+ // src/elements/p.ts
709
+ var pSpec = {
710
+ contents: [
711
+ {
712
+ type: "oneOrMore",
713
+ contents: contentsPreset.phrasingContent
714
+ }
715
+ ],
716
+ attributes: contentAttributes(true)
717
+ };
718
+ var p = () => pSpec;
719
+
720
+ // src/elements/hr.ts
721
+ var hrSpec = {
722
+ contents: null,
723
+ attributes: contentAttributes(true)
724
+ };
725
+ var hr = () => hrSpec;
726
+
727
+ // src/elements/pre.ts
728
+ var preSpec = {
729
+ contents: [
730
+ {
731
+ type: "oneOrMore",
732
+ contents: contentsPreset.phrasingContent
733
+ }
734
+ ],
735
+ attributes: contentAttributes(true)
736
+ };
737
+ var pre = () => preSpec;
738
+
739
+ // src/elements/blockquote.ts
740
+ var blockquoteSpec = {
741
+ contents: [
742
+ {
743
+ type: "oneOrMore",
744
+ contents: contentsPreset.flowContent
745
+ }
746
+ ],
747
+ attributes: contentAttributes(true, ["cite"])
748
+ };
749
+ var blockquote = () => blockquoteSpec;
750
+
751
+ // src/elements/ol.ts
752
+ var olSpec = {
753
+ contents: [
754
+ {
755
+ type: "zeroOrMore",
756
+ contents: contents.fromSet(contentsPreset.scriptSupportingElements, "li")
757
+ }
758
+ ],
759
+ attributes: contentAttributes(true, ["reversed", "start", "type"])
760
+ };
761
+ var ol = () => olSpec;
762
+
763
+ // src/elements/ul.ts
764
+ var ulSpec = {
765
+ contents: [
766
+ {
767
+ type: "zeroOrMore",
768
+ contents: contents.fromSet(contentsPreset.scriptSupportingElements, "li")
769
+ }
770
+ ],
771
+ attributes: contentAttributes(true)
772
+ };
773
+ var ul = () => ulSpec;
774
+
775
+ // src/elements/menu.ts
776
+ var menuSpec = {
777
+ contents: [
778
+ {
779
+ type: "zeroOrMore",
780
+ contents: contents.fromSet(contentsPreset.scriptSupportingElements, "li")
781
+ }
782
+ ],
783
+ attributes: contentAttributes(true)
784
+ };
785
+ var menu = () => menuSpec;
786
+
787
+ // src/elements/li.ts
788
+ var liInMenuOrUl = {
789
+ contents: [
790
+ {
791
+ type: "oneOrMore",
792
+ contents: contentsPreset.flowContent
793
+ }
794
+ ],
795
+ attributes: contentAttributes(true)
796
+ };
797
+ var liNotInMenuOrUl = {
798
+ contents: [
799
+ {
800
+ type: "oneOrMore",
801
+ contents: contentsPreset.flowContent
802
+ }
803
+ ],
804
+ attributes: contentAttributes(true, ["value"])
805
+ };
806
+ var li = (state) => {
807
+ const parent = state == null ? void 0 : state.parent;
808
+ if (parent === "menu" || parent === "ul") {
809
+ return liInMenuOrUl;
810
+ }
811
+ return liNotInMenuOrUl;
812
+ };
813
+
814
+ // src/elements/dl.ts
815
+ var dlSpec = {
816
+ contents: [
817
+ {
818
+ type: "either",
819
+ options: [
820
+ [
821
+ {
822
+ type: "zeroOrMore",
823
+ contents: contentsPreset.scriptSupportingElements
824
+ },
825
+ {
826
+ type: "oneOrMore",
827
+ contents: /* @__PURE__ */ new Set(["dt"])
828
+ },
829
+ {
830
+ type: "zeroOrMore",
831
+ contents: contentsPreset.scriptSupportingElements
832
+ },
833
+ {
834
+ type: "oneOrMore",
835
+ contents: /* @__PURE__ */ new Set(["dd"])
836
+ },
837
+ {
838
+ type: "zeroOrMore",
839
+ contents: contentsPreset.scriptSupportingElements
840
+ }
841
+ ],
842
+ [
843
+ {
844
+ type: "zeroOrMore",
845
+ contents: contentsPreset.scriptSupportingElements
846
+ },
847
+ {
848
+ type: "oneOrMore",
849
+ contents: /* @__PURE__ */ new Set(["div"])
850
+ },
851
+ {
852
+ type: "zeroOrMore",
853
+ contents: contentsPreset.scriptSupportingElements
854
+ }
855
+ ]
856
+ ]
857
+ }
858
+ ],
859
+ attributes: contentAttributes(true)
860
+ };
861
+ var dl = () => dlSpec;
862
+
863
+ // src/elements/dt.ts
864
+ var dtSpec = {
865
+ contents: [
866
+ {
867
+ type: "oneOrMore",
868
+ contents: contentsPreset.flowContent,
869
+ constraints: {
870
+ descendants: contentConstraint.fromSets(
871
+ disallow,
872
+ /* @__PURE__ */ new Set(["header", "footer"]),
873
+ contentsPreset.sectioningContent,
874
+ contentsPreset.headingContent
875
+ )
876
+ }
877
+ }
878
+ ],
879
+ attributes: contentAttributes(true)
880
+ };
881
+ var dt = () => dtSpec;
882
+
883
+ // src/elements/dd.ts
884
+ var ddSpec = {
885
+ contents: [
886
+ {
887
+ type: "oneOrMore",
888
+ contents: contentsPreset.flowContent
889
+ }
890
+ ],
891
+ attributes: contentAttributes(true)
892
+ };
893
+ var dd = () => ddSpec;
894
+
895
+ // src/elements/figure.ts
896
+ var figureSpec = {
897
+ contents: [
898
+ {
899
+ type: "either",
900
+ options: [
901
+ [
902
+ {
903
+ type: "required",
904
+ contents: new Set("figcaption")
905
+ },
906
+ {
907
+ type: "oneOrMore",
908
+ contents: contentsPreset.flowContent
909
+ }
910
+ ],
911
+ [
912
+ {
913
+ type: "oneOrMore",
914
+ contents: contentsPreset.flowContent
915
+ },
916
+ {
917
+ type: "required",
918
+ contents: contents.fromKeys("figcaption")
919
+ }
920
+ ],
921
+ [
922
+ {
923
+ type: "oneOrMore",
924
+ contents: contentsPreset.flowContent
925
+ }
926
+ ]
927
+ ]
928
+ }
929
+ ],
930
+ attributes: contentAttributes(true)
931
+ };
932
+ var figure = () => figureSpec;
933
+
934
+ // src/elements/figcaption.ts
935
+ var figcaptionSpec = {
936
+ contents: [
937
+ {
938
+ type: "oneOrMore",
939
+ contents: contentsPreset.flowContent
940
+ }
941
+ ],
942
+ attributes: contentAttributes(true)
943
+ };
944
+ var figcaption = () => figcaptionSpec;
945
+
946
+ // src/elements/main.ts
947
+ var mainSpec = {
948
+ contents: [
949
+ {
950
+ type: "oneOrMore",
951
+ contents: contentsPreset.flowContent
952
+ }
953
+ ],
954
+ attributes: contentAttributes(true)
955
+ };
956
+ var main = () => mainSpec;
957
+
958
+ // src/elements/search.ts
959
+ var searchSpec = {
960
+ contents: [
961
+ {
962
+ type: "oneOrMore",
963
+ contents: contentsPreset.flowContent
964
+ }
965
+ ],
966
+ attributes: contentAttributes(true)
967
+ };
968
+ var search = () => searchSpec;
969
+
970
+ // src/elements/div.ts
971
+ var divChildOfDlSpec = {
972
+ contents: [
973
+ {
974
+ type: "zeroOrMore",
975
+ contents: contentsPreset.scriptSupportingElements
976
+ },
977
+ {
978
+ type: "oneOrMore",
979
+ contents: contents.fromKeys("dt")
980
+ },
981
+ {
982
+ type: "zeroOrMore",
983
+ contents: contentsPreset.scriptSupportingElements
984
+ },
985
+ {
986
+ type: "oneOrMore",
987
+ contents: contents.fromKeys("dd")
988
+ }
989
+ ],
990
+ attributes: contentAttributes(true)
991
+ };
992
+ var divSpec = {
993
+ contents: [
994
+ {
995
+ type: "oneOrMore",
996
+ contents: contentsPreset.flowContent
997
+ }
998
+ ],
999
+ attributes: contentAttributes(true)
1000
+ };
1001
+ var div = (state) => {
1002
+ const parent = state == null ? void 0 : state.parent;
1003
+ if (parent === "dl") {
1004
+ return divChildOfDlSpec;
1005
+ }
1006
+ return divSpec;
1007
+ };
1008
+
1009
+ // src/elements/a.ts
1010
+ var descendantsConstraints = new Map(
1011
+ [contentsPreset.interactiveContent, /* @__PURE__ */ new Set(["a"])].reduce((acc, set) => [...acc, ...set], []).map((key) => [key, disallow])
1012
+ );
1013
+ descendantsConstraints.set("*", {
1014
+ disallow: true,
1015
+ ifAttributes(attributes5) {
1016
+ return !!attributes5["tabindex"];
1017
+ }
1018
+ });
1019
+ var aSpec = {
1020
+ contents: [
1021
+ {
1022
+ type: "oneOrMore",
1023
+ contents: contentsPreset.transparentContent,
1024
+ constraints: {
1025
+ descendants: contentConstraint.fromSets(
1026
+ disallow,
1027
+ contentsPreset.interactiveContent,
1028
+ /* @__PURE__ */ new Set(["a"])
1029
+ )
1030
+ }
1031
+ }
1032
+ ],
1033
+ attributes: contentAttributes(true, [
1034
+ "href",
1035
+ "target",
1036
+ "download",
1037
+ "ping",
1038
+ "rel",
1039
+ "hreflang",
1040
+ "type",
1041
+ "referrerpolicy"
1042
+ ])
1043
+ };
1044
+ var a = () => aSpec;
1045
+
1046
+ // src/elements/em.ts
1047
+ var emSpec = {
1048
+ contents: [
1049
+ {
1050
+ type: "oneOrMore",
1051
+ contents: contentsPreset.phrasingContent
1052
+ }
1053
+ ],
1054
+ attributes: contentAttributes(true)
1055
+ };
1056
+ var em = () => emSpec;
1057
+
1058
+ // src/elements/strong.ts
1059
+ var strongSpec = {
1060
+ contents: [
1061
+ {
1062
+ type: "oneOrMore",
1063
+ contents: contentsPreset.phrasingContent
1064
+ }
1065
+ ],
1066
+ attributes: contentAttributes(true)
1067
+ };
1068
+ var strong = () => strongSpec;
1069
+
1070
+ // src/elements/small.ts
1071
+ var smallSpec = {
1072
+ contents: [
1073
+ {
1074
+ type: "oneOrMore",
1075
+ contents: contentsPreset.phrasingContent
1076
+ }
1077
+ ],
1078
+ attributes: contentAttributes(true)
1079
+ };
1080
+ var small = () => smallSpec;
1081
+
1082
+ // src/elements/s.ts
1083
+ var sSpec = {
1084
+ contents: [
1085
+ {
1086
+ type: "oneOrMore",
1087
+ contents: contentsPreset.phrasingContent
1088
+ }
1089
+ ],
1090
+ attributes: contentAttributes(true)
1091
+ };
1092
+ var s = () => sSpec;
1093
+
1094
+ // src/elements/cite.ts
1095
+ var citeSpec = {
1096
+ contents: [
1097
+ {
1098
+ type: "oneOrMore",
1099
+ contents: contentsPreset.phrasingContent
1100
+ }
1101
+ ],
1102
+ attributes: contentAttributes(true)
1103
+ };
1104
+ var cite = () => citeSpec;
1105
+
1106
+ // src/elements/q.ts
1107
+ var qSpec = {
1108
+ contents: [
1109
+ {
1110
+ type: "oneOrMore",
1111
+ contents: contentsPreset.phrasingContent
1112
+ }
1113
+ ],
1114
+ attributes: contentAttributes(true, ["cite"])
1115
+ };
1116
+ var q = () => qSpec;
1117
+
1118
+ // src/elements/dfn.ts
1119
+ var dfnSpec = {
1120
+ contents: [
1121
+ {
1122
+ type: "oneOrMore",
1123
+ contents: contentsPreset.phrasingContent,
1124
+ constraints: {
1125
+ descendants: contentConstraint.fromEntries([["dfn", disallow]])
1126
+ }
1127
+ }
1128
+ ],
1129
+ attributes: contentAttributes(true)
1130
+ };
1131
+ var dfn = () => dfnSpec;
1132
+
1133
+ // src/elements/abbr.ts
1134
+ var abbrSpec = {
1135
+ contents: [
1136
+ {
1137
+ type: "oneOrMore",
1138
+ contents: contentsPreset.phrasingContent
1139
+ }
1140
+ ],
1141
+ attributes: contentAttributes(true)
1142
+ };
1143
+ var abbr = () => abbrSpec;
1144
+
1145
+ // src/elements/ruby.ts
1146
+ var rubySpec = {
1147
+ contents: [
1148
+ {
1149
+ type: "zeroOrMore",
1150
+ contents: contents.fromSet(contentsPreset.phrasingContent, "rt", "rp")
1151
+ }
1152
+ ],
1153
+ attributes: contentAttributes(true)
1154
+ };
1155
+ var ruby = () => rubySpec;
1156
+
1157
+ // src/elements/rt.ts
1158
+ var rtSpec = {
1159
+ contents: [
1160
+ {
1161
+ type: "oneOrMore",
1162
+ contents: contentsPreset.phrasingContent
1163
+ }
1164
+ ],
1165
+ attributes: contentAttributes(true)
1166
+ };
1167
+ var rt = () => rtSpec;
1168
+
1169
+ // src/elements/rp.ts
1170
+ var rpSpec = {
1171
+ contents: [
1172
+ {
1173
+ type: "oneOrMore",
1174
+ contents: contentsPreset.text
1175
+ }
1176
+ ],
1177
+ attributes: contentAttributes(true)
1178
+ };
1179
+ var rp = () => rpSpec;
1180
+
1181
+ // src/elements/data.ts
1182
+ var dataSpec = {
1183
+ contents: [
1184
+ {
1185
+ type: "oneOrMore",
1186
+ contents: contentsPreset.phrasingContent
1187
+ }
1188
+ ],
1189
+ attributes: contentAttributes(true, ["value"])
1190
+ };
1191
+ var data = () => dataSpec;
1192
+
1193
+ // src/elements/time.ts
1194
+ var timeWihthoutDatetimeSpec = {
1195
+ contents: [
1196
+ {
1197
+ type: "oneOrMore",
1198
+ contents: contentsPreset.phrasingContent
1199
+ }
1200
+ ],
1201
+ attributes: contentAttributes(true, ["datetime"])
1202
+ };
1203
+ var timeWithDatetimeSpec = {
1204
+ contents: [
1205
+ {
1206
+ type: "oneOrMore",
1207
+ contents: contentsPreset.text
1208
+ }
1209
+ ],
1210
+ attributes: contentAttributes(true, ["datetime"])
1211
+ };
1212
+ var time = (state) => {
1213
+ const attributes5 = (state == null ? void 0 : state.attributes) || {};
1214
+ if (!!attributes5["datetime"]) {
1215
+ return timeWihthoutDatetimeSpec;
1216
+ }
1217
+ return timeWithDatetimeSpec;
1218
+ };
1219
+
1220
+ // src/elements/code.ts
1221
+ var codeSpec = {
1222
+ contents: [
1223
+ {
1224
+ type: "oneOrMore",
1225
+ contents: contentsPreset.phrasingContent
1226
+ }
1227
+ ],
1228
+ attributes: contentAttributes(true)
1229
+ };
1230
+ var code = () => codeSpec;
1231
+
1232
+ // src/elements/var.ts
1233
+ var varSpec = {
1234
+ contents: [
1235
+ {
1236
+ type: "oneOrMore",
1237
+ contents: contentsPreset.phrasingContent
1238
+ }
1239
+ ],
1240
+ attributes: contentAttributes(true)
1241
+ };
1242
+ var _var = () => varSpec;
1243
+
1244
+ // src/elements/samp.ts
1245
+ var sampSpec = {
1246
+ contents: [
1247
+ {
1248
+ type: "oneOrMore",
1249
+ contents: contentsPreset.phrasingContent
1250
+ }
1251
+ ],
1252
+ attributes: contentAttributes(true)
1253
+ };
1254
+ var samp = () => sampSpec;
1255
+
1256
+ // src/elements/kbd.ts
1257
+ var kbdSpec = {
1258
+ contents: [
1259
+ {
1260
+ type: "oneOrMore",
1261
+ contents: contentsPreset.phrasingContent
1262
+ }
1263
+ ],
1264
+ attributes: contentAttributes(true)
1265
+ };
1266
+ var kbd = () => kbdSpec;
1267
+
1268
+ // src/elements/sub.ts
1269
+ var subSpec = {
1270
+ contents: [
1271
+ {
1272
+ type: "oneOrMore",
1273
+ contents: contentsPreset.phrasingContent
1274
+ }
1275
+ ],
1276
+ attributes: contentAttributes(true)
1277
+ };
1278
+ var sub = () => subSpec;
1279
+
1280
+ // src/elements/sup.ts
1281
+ var sup = sub;
1282
+
1283
+ // src/elements/i.ts
1284
+ var iSpec = {
1285
+ contents: [
1286
+ {
1287
+ type: "oneOrMore",
1288
+ contents: contentsPreset.phrasingContent
1289
+ }
1290
+ ],
1291
+ attributes: contentAttributes(true)
1292
+ };
1293
+ var i = () => iSpec;
1294
+
1295
+ // src/elements/b.ts
1296
+ var bSpec = {
1297
+ contents: [
1298
+ {
1299
+ type: "oneOrMore",
1300
+ contents: contentsPreset.phrasingContent
1301
+ }
1302
+ ],
1303
+ attributes: contentAttributes(true)
1304
+ };
1305
+ var b = () => bSpec;
1306
+
1307
+ // src/elements/u.ts
1308
+ var uSpec = {
1309
+ contents: [
1310
+ {
1311
+ type: "oneOrMore",
1312
+ contents: contentsPreset.phrasingContent
1313
+ }
1314
+ ],
1315
+ attributes: contentAttributes(true)
1316
+ };
1317
+ var u = () => uSpec;
1318
+
1319
+ // src/elements/mark.ts
1320
+ var markSpec = {
1321
+ contents: [
1322
+ {
1323
+ type: "oneOrMore",
1324
+ contents: contentsPreset.phrasingContent
1325
+ }
1326
+ ],
1327
+ attributes: contentAttributes(true)
1328
+ };
1329
+ var mark = () => markSpec;
1330
+
1331
+ // src/elements/bdi.ts
1332
+ var bdiSpec = {
1333
+ contents: [
1334
+ {
1335
+ type: "oneOrMore",
1336
+ contents: contentsPreset.phrasingContent
1337
+ }
1338
+ ],
1339
+ attributes: contentAttributes(true)
1340
+ };
1341
+ var bdi = () => bdiSpec;
1342
+
1343
+ // src/elements/bdo.ts
1344
+ var bdoSpec = {
1345
+ contents: [
1346
+ {
1347
+ type: "oneOrMore",
1348
+ contents: contentsPreset.phrasingContent
1349
+ }
1350
+ ],
1351
+ attributes: contentAttributes(true)
1352
+ };
1353
+ var bdo = () => bdoSpec;
1354
+
1355
+ // src/elements/span.ts
1356
+ var spanSpec = {
1357
+ contents: [
1358
+ {
1359
+ type: "oneOrMore",
1360
+ contents: contentsPreset.phrasingContent
1361
+ }
1362
+ ],
1363
+ attributes: contentAttributes(true)
1364
+ };
1365
+ var span = () => spanSpec;
1366
+
1367
+ // src/elements/br.ts
1368
+ var brSpec = {
1369
+ contents: null,
1370
+ attributes: contentAttributes(true)
1371
+ };
1372
+ var br = () => brSpec;
1373
+
1374
+ // src/elements/wbr.ts
1375
+ var wbrSpec = {
1376
+ contents: null,
1377
+ attributes: contentAttributes(true)
1378
+ };
1379
+ var wbr = () => wbrSpec;
1380
+
1381
+ // src/elements/ins.ts
1382
+ var insSpec = {
1383
+ contents: [
1384
+ {
1385
+ type: "oneOrMore",
1386
+ contents: contentsPreset.transparentContent
1387
+ }
1388
+ ],
1389
+ attributes: contentAttributes(true, ["cite", "datetime"])
1390
+ };
1391
+ var ins = () => insSpec;
1392
+
1393
+ // src/elements/del.ts
1394
+ var delSpec = {
1395
+ contents: [
1396
+ {
1397
+ type: "oneOrMore",
1398
+ contents: contentsPreset.transparentContent
1399
+ }
1400
+ ],
1401
+ attributes: contentAttributes(true, ["cite", "datetime"])
1402
+ };
1403
+ var del = () => delSpec;
1404
+
1405
+ // src/elements/picture.ts
1406
+ var pictureSpec = {
1407
+ contents: [
1408
+ {
1409
+ type: "zeroOrMore",
1410
+ contents: contentsPreset.scriptSupportingElements
1411
+ },
1412
+ {
1413
+ type: "zeroOrMore",
1414
+ contents: contents.fromKeys("source")
1415
+ },
1416
+ {
1417
+ type: "zeroOrMore",
1418
+ contents: contentsPreset.scriptSupportingElements
1419
+ },
1420
+ {
1421
+ type: "required",
1422
+ contents: contents.fromKeys("img")
1423
+ },
1424
+ {
1425
+ type: "zeroOrMore",
1426
+ contents: contentsPreset.scriptSupportingElements
1427
+ }
1428
+ ],
1429
+ attributes: contentAttributes(true)
1430
+ };
1431
+ var picture = () => pictureSpec;
1432
+
1433
+ // src/elements/source.ts
1434
+ var sourceSpec = {
1435
+ contents: null,
1436
+ attributes: contentAttributes(true, [
1437
+ "type",
1438
+ "media",
1439
+ "src",
1440
+ "srcset",
1441
+ "sizes",
1442
+ "width",
1443
+ "height"
1444
+ ])
1445
+ };
1446
+ var source = () => sourceSpec;
1447
+
1448
+ // src/elements/img.ts
1449
+ var imgSpec = {
1450
+ contents: null,
1451
+ attributes: contentAttributes(true, [
1452
+ "alt",
1453
+ "src",
1454
+ "srcset",
1455
+ "sizes",
1456
+ "crossorigin",
1457
+ "usemap",
1458
+ "ismap",
1459
+ "width",
1460
+ "height",
1461
+ "referrerpolicy",
1462
+ "decoding",
1463
+ "loading",
1464
+ "fetchpriority"
1465
+ ])
1466
+ };
1467
+ var img = () => imgSpec;
1468
+
1469
+ // src/elements/iframe.ts
1470
+ var iframeSpec = {
1471
+ contents: null,
1472
+ attributes: contentAttributes(true, [
1473
+ "src",
1474
+ "srcdoc",
1475
+ "name",
1476
+ "sandbox",
1477
+ "allow",
1478
+ "allowfullscreen",
1479
+ "width",
1480
+ "height",
1481
+ "referrerpolicy",
1482
+ "loading"
1483
+ ])
1484
+ };
1485
+ var iframe = () => iframeSpec;
1486
+
1487
+ // src/elements/embed.ts
1488
+ var embedSpec = {
1489
+ contents: null,
1490
+ attributes: contentAttributes(true, ["src", "type", "width", "height"])
1491
+ };
1492
+ var embed = () => embedSpec;
1493
+
1494
+ // src/elements/object.ts
1495
+ var objectSpec = {
1496
+ contents: [
1497
+ {
1498
+ type: "oneOrMore",
1499
+ contents: contentsPreset.transparentContent
1500
+ }
1501
+ ],
1502
+ attributes: contentAttributes(true, [
1503
+ "data",
1504
+ "type",
1505
+ "name",
1506
+ "form",
1507
+ "width",
1508
+ "height"
1509
+ ])
1510
+ };
1511
+ var object = () => objectSpec;
1512
+
1513
+ // src/elements/video.ts
1514
+ var attributes = contentAttributes(true, [
1515
+ "src",
1516
+ "crossorigin",
1517
+ "poster",
1518
+ "preload",
1519
+ "autoplay",
1520
+ "playsinline",
1521
+ "loop",
1522
+ "muted",
1523
+ "controls",
1524
+ "width",
1525
+ "height"
1526
+ ]);
1527
+ var videoWithSrcSpec = {
1528
+ contents: [
1529
+ {
1530
+ type: "zeroOrMore",
1531
+ contents: contents.fromKeys("track")
1532
+ },
1533
+ {
1534
+ type: "zeroOrMore",
1535
+ contents: contentsPreset.transparentContent,
1536
+ constraints: {
1537
+ descendants: contentConstraint.fromSets(
1538
+ disallow,
1539
+ contentsPreset.mediaElements
1540
+ )
1541
+ }
1542
+ }
1543
+ ],
1544
+ attributes
1545
+ };
1546
+ var videoWitoutSrcSpec = {
1547
+ contents: [
1548
+ {
1549
+ type: "zeroOrMore",
1550
+ contents: contents.fromKeys("source")
1551
+ },
1552
+ {
1553
+ type: "zeroOrMore",
1554
+ contents: contents.fromKeys("track")
1555
+ },
1556
+ {
1557
+ type: "zeroOrMore",
1558
+ contents: contentsPreset.transparentContent,
1559
+ constraints: {
1560
+ descendants: contentConstraint.fromSets(
1561
+ disallow,
1562
+ contentsPreset.mediaElements
1563
+ )
1564
+ }
1565
+ }
1566
+ ],
1567
+ attributes
1568
+ };
1569
+ var video = (state) => {
1570
+ const attributes5 = (state == null ? void 0 : state.attributes) || {};
1571
+ if (!!attributes5["src"]) {
1572
+ return videoWithSrcSpec;
1573
+ }
1574
+ return videoWitoutSrcSpec;
1575
+ };
1576
+
1577
+ // src/elements/audio.ts
1578
+ var attributes2 = contentAttributes(true, [
1579
+ "src",
1580
+ "crossorigin",
1581
+ "preload",
1582
+ "autoplay",
1583
+ "loop",
1584
+ "muted",
1585
+ "controls"
1586
+ ]);
1587
+ var audioWithSrcSpec = {
1588
+ contents: [
1589
+ {
1590
+ type: "zeroOrMore",
1591
+ contents: contents.fromKeys("track")
1592
+ },
1593
+ {
1594
+ type: "oneOrMore",
1595
+ contents: contentsPreset.transparentContent
1596
+ }
1597
+ ],
1598
+ attributes: attributes2
1599
+ };
1600
+ var audioWithoutSrcSpec = {
1601
+ contents: [
1602
+ {
1603
+ type: "zeroOrMore",
1604
+ contents: contents.fromKeys("source")
1605
+ },
1606
+ {
1607
+ type: "zeroOrMore",
1608
+ contents: contents.fromKeys("track")
1609
+ },
1610
+ {
1611
+ type: "oneOrMore",
1612
+ contents: contentsPreset.transparentContent,
1613
+ constraints: {
1614
+ descendants: contentConstraint.fromSets(
1615
+ disallow,
1616
+ contentsPreset.mediaElements
1617
+ )
1618
+ }
1619
+ }
1620
+ ],
1621
+ attributes: attributes2
1622
+ };
1623
+ var audio = (state) => {
1624
+ const attributes5 = (state == null ? void 0 : state.attributes) || {};
1625
+ if (!!attributes5["src"]) {
1626
+ return audioWithSrcSpec;
1627
+ }
1628
+ return audioWithoutSrcSpec;
1629
+ };
1630
+
1631
+ // src/elements/track.ts
1632
+ var trackSpec = {
1633
+ contents: null,
1634
+ attributes: contentAttributes(true, [
1635
+ "kind",
1636
+ "src",
1637
+ "srclang",
1638
+ "label",
1639
+ "label",
1640
+ "default"
1641
+ ])
1642
+ };
1643
+ var track = () => trackSpec;
1644
+
1645
+ // src/elements/map.ts
1646
+ var mapSpec = {
1647
+ contents: [
1648
+ {
1649
+ type: "oneOrMore",
1650
+ contents: contentsPreset.transparentContent
1651
+ }
1652
+ ],
1653
+ attributes: contentAttributes(true, ["name"])
1654
+ };
1655
+ var map = () => mapSpec;
1656
+
1657
+ // src/elements/area.ts
1658
+ var areaSpec = {
1659
+ contents: null,
1660
+ attributes: contentAttributes(true, [
1661
+ "alt",
1662
+ "coords",
1663
+ "shape",
1664
+ "href",
1665
+ "target",
1666
+ "download",
1667
+ "ping",
1668
+ "rel",
1669
+ "referrerpolicy"
1670
+ ])
1671
+ };
1672
+ var area = () => areaSpec;
1673
+
1674
+ // src/elements/table.ts
1675
+ var tableSpec = {
1676
+ contents: [
1677
+ {
1678
+ type: "zeroOrMore",
1679
+ contents: contentsPreset.scriptSupportingElements
1680
+ },
1681
+ {
1682
+ type: "optional",
1683
+ contents: contents.fromKeys("caption")
1684
+ },
1685
+ {
1686
+ type: "zeroOrMore",
1687
+ contents: contentsPreset.scriptSupportingElements
1688
+ },
1689
+ {
1690
+ type: "zeroOrMore",
1691
+ contents: contents.fromKeys("colgroup")
1692
+ },
1693
+ {
1694
+ type: "zeroOrMore",
1695
+ contents: contentsPreset.scriptSupportingElements
1696
+ },
1697
+ {
1698
+ type: "optional",
1699
+ contents: contents.fromKeys("thead")
1700
+ },
1701
+ {
1702
+ type: "zeroOrMore",
1703
+ contents: contentsPreset.scriptSupportingElements
1704
+ },
1705
+ {
1706
+ type: "either",
1707
+ options: [
1708
+ [
1709
+ {
1710
+ type: "zeroOrMore",
1711
+ contents: contents.fromKeys("tbody")
1712
+ }
1713
+ ],
1714
+ [
1715
+ {
1716
+ type: "oneOrMore",
1717
+ contents: contents.fromKeys("tr")
1718
+ }
1719
+ ]
1720
+ ]
1721
+ },
1722
+ {
1723
+ type: "zeroOrMore",
1724
+ contents: contentsPreset.scriptSupportingElements
1725
+ },
1726
+ {
1727
+ type: "optional",
1728
+ contents: contents.fromKeys("tfoot")
1729
+ },
1730
+ {
1731
+ type: "zeroOrMore",
1732
+ contents: contentsPreset.scriptSupportingElements
1733
+ }
1734
+ ],
1735
+ attributes: contentAttributes(true)
1736
+ };
1737
+ var table = () => tableSpec;
1738
+
1739
+ // src/elements/caption.ts
1740
+ var captionSpec = {
1741
+ contents: [
1742
+ {
1743
+ type: "oneOrMore",
1744
+ contents: contentsPreset.flowContent,
1745
+ constraints: {
1746
+ descendants: contentConstraint.fromEntries([["table", disallow]])
1747
+ }
1748
+ }
1749
+ ],
1750
+ attributes: contentAttributes(true)
1751
+ };
1752
+ var caption = () => captionSpec;
1753
+
1754
+ // src/elements/colgroup.ts
1755
+ var attributes3 = contentAttributes(true, ["span"]);
1756
+ var colgroupWithSpanSpec = {
1757
+ contents: null,
1758
+ attributes: attributes3
1759
+ };
1760
+ var colgroupWithoutSpanSpec = {
1761
+ contents: [
1762
+ {
1763
+ type: "zeroOrMore",
1764
+ contents: contents.fromKeys("col", "template")
1765
+ }
1766
+ ],
1767
+ attributes: attributes3
1768
+ };
1769
+ var colgroup = (state) => {
1770
+ const attributes5 = (state == null ? void 0 : state.attributes) || {};
1771
+ if (attributes5["span"]) {
1772
+ return colgroupWithSpanSpec;
1773
+ }
1774
+ return colgroupWithoutSpanSpec;
1775
+ };
1776
+
1777
+ // src/elements/col.ts
1778
+ var colSpec = {
1779
+ contents: null,
1780
+ attributes: contentAttributes(true, ["span"])
1781
+ };
1782
+ var col = () => colSpec;
1783
+
1784
+ // src/elements/tbody.ts
1785
+ var tbodySpec = {
1786
+ contents: [
1787
+ {
1788
+ type: "zeroOrMore",
1789
+ contents: contents.fromSet(contentsPreset.scriptSupportingElements, "tr")
1790
+ }
1791
+ ],
1792
+ attributes: contentAttributes(true)
1793
+ };
1794
+ var tbody = () => tbodySpec;
1795
+
1796
+ // src/elements/thead.ts
1797
+ var theadSpec = {
1798
+ contents: [
1799
+ {
1800
+ type: "zeroOrMore",
1801
+ contents: contents.fromSet(contentsPreset.scriptSupportingElements, "tr")
1802
+ }
1803
+ ],
1804
+ attributes: contentAttributes(true)
1805
+ };
1806
+ var thead = () => theadSpec;
1807
+
1808
+ // src/elements/tfoot.ts
1809
+ var tfootSpec = {
1810
+ contents: [
1811
+ {
1812
+ type: "zeroOrMore",
1813
+ contents: contents.fromSet(contentsPreset.scriptSupportingElements, "tr")
1814
+ }
1815
+ ],
1816
+ attributes: contentAttributes(true)
1817
+ };
1818
+ var tfoot = () => tfootSpec;
1819
+
1820
+ // src/elements/tr.ts
1821
+ var trSpec = {
1822
+ contents: [
1823
+ {
1824
+ type: "zeroOrMore",
1825
+ contents: contents.fromSet(
1826
+ contentsPreset.scriptSupportingElements,
1827
+ "td",
1828
+ "th"
1829
+ )
1830
+ }
1831
+ ],
1832
+ attributes: contentAttributes(true)
1833
+ };
1834
+ var tr = () => trSpec;
1835
+
1836
+ // src/elements/td.ts
1837
+ var tdSpec = {
1838
+ contents: [
1839
+ {
1840
+ type: "oneOrMore",
1841
+ contents: contentsPreset.flowContent
1842
+ }
1843
+ ],
1844
+ attributes: contentAttributes(true, ["colspan", "rowspan", "headers"])
1845
+ };
1846
+ var td = () => tdSpec;
1847
+
1848
+ // src/elements/th.ts
1849
+ var thSpec = {
1850
+ contents: [
1851
+ {
1852
+ type: "oneOrMore",
1853
+ contents: contentsPreset.flowContent,
1854
+ constraints: {
1855
+ descendants: contentConstraint.fromSets(
1856
+ disallow,
1857
+ /* @__PURE__ */ new Set(["header", "footer"]),
1858
+ contentsPreset.sectioningContent,
1859
+ contentsPreset.headingContent
1860
+ )
1861
+ }
1862
+ }
1863
+ ],
1864
+ attributes: contentAttributes(true, [
1865
+ "colspan",
1866
+ "rowspan",
1867
+ "headers",
1868
+ "scope",
1869
+ "abbr"
1870
+ ])
1871
+ };
1872
+ var th = () => thSpec;
1873
+
1874
+ // src/elements/form.ts
1875
+ var formSpec = {
1876
+ contents: [
1877
+ {
1878
+ type: "oneOrMore",
1879
+ contents: contentsPreset.flowContent,
1880
+ constraints: {
1881
+ descendants: contentConstraint.fromEntries([["from", disallow]])
1882
+ }
1883
+ }
1884
+ ],
1885
+ attributes: contentAttributes(true, [
1886
+ "accept-charset",
1887
+ "action",
1888
+ "autocomplete",
1889
+ "enctype",
1890
+ "method",
1891
+ "name",
1892
+ "novalidate",
1893
+ "target",
1894
+ "rel"
1895
+ ])
1896
+ };
1897
+ var form = () => formSpec;
1898
+
1899
+ // src/elements/label.ts
1900
+ var labelSpec = {
1901
+ contents: [
1902
+ {
1903
+ type: "oneOrMore",
1904
+ contents: contentsPreset.phrasingContent,
1905
+ constraints: {
1906
+ descendants: contentConstraint.fromEntries([["label", disallow]])
1907
+ }
1908
+ }
1909
+ ],
1910
+ attributes: contentAttributes(true, ["for"])
1911
+ };
1912
+ var label = () => labelSpec;
1913
+
1914
+ // src/elements/input.ts
1915
+ var inputSpec = {
1916
+ contents: null,
1917
+ attributes: contentAttributes(true, [
1918
+ "accept",
1919
+ "alpha",
1920
+ "alt",
1921
+ "autocomplete",
1922
+ "checked",
1923
+ "colorspace",
1924
+ "dirname",
1925
+ "disabled",
1926
+ "form",
1927
+ "formaction",
1928
+ "formenctype",
1929
+ "formmethod",
1930
+ "formnovalidate",
1931
+ "formtarget",
1932
+ "height",
1933
+ "list",
1934
+ "max",
1935
+ "maxlength",
1936
+ "min",
1937
+ "minlength",
1938
+ "multiple",
1939
+ "name",
1940
+ "pattern",
1941
+ "placeholder",
1942
+ "popovertarget",
1943
+ "popovertargetaction",
1944
+ "readonly",
1945
+ "required",
1946
+ "size",
1947
+ "src",
1948
+ "step",
1949
+ "type",
1950
+ "value",
1951
+ "width",
1952
+ "title"
1953
+ ])
1954
+ };
1955
+ var input = () => inputSpec;
1956
+
1957
+ // src/elements/button.ts
1958
+ var buttonSpec = {
1959
+ contents: [
1960
+ {
1961
+ type: "oneOrMore",
1962
+ contents: contentsPreset.phrasingContent,
1963
+ constraints: {
1964
+ descendants: contentConstraint.fromSets(
1965
+ disallow,
1966
+ contentsPreset.interactiveContent
1967
+ )
1968
+ }
1969
+ }
1970
+ ],
1971
+ attributes: contentAttributes(true, [
1972
+ "command",
1973
+ "commandfor",
1974
+ "disabled",
1975
+ "form",
1976
+ "formaction",
1977
+ "formenctype",
1978
+ "formmethod",
1979
+ "formnovalidate",
1980
+ "formtarget",
1981
+ "name",
1982
+ "popovertarget",
1983
+ "popovertargetaction",
1984
+ "type",
1985
+ "value"
1986
+ ])
1987
+ };
1988
+ var button = () => buttonSpec;
1989
+
1990
+ // src/elements/select.ts
1991
+ var selectSpec = {
1992
+ contents: [
1993
+ {
1994
+ type: "zeroOrMore",
1995
+ contents: contents.fromSet(
1996
+ contentsPreset.scriptSupportingElements,
1997
+ "option",
1998
+ "optgroup",
1999
+ "hr"
2000
+ )
2001
+ }
2002
+ ],
2003
+ attributes: contentAttributes(true, [
2004
+ "autocomplete",
2005
+ "disabled",
2006
+ "form",
2007
+ "multiple",
2008
+ "name",
2009
+ "required",
2010
+ "size"
2011
+ ])
2012
+ };
2013
+ var select = () => selectSpec;
2014
+
2015
+ // src/elements/datalist.ts
2016
+ var datalistSpec = {
2017
+ contents: [
2018
+ {
2019
+ type: "either",
2020
+ options: [
2021
+ [
2022
+ {
2023
+ type: "oneOrMore",
2024
+ contents: contentsPreset.phrasingContent
2025
+ }
2026
+ ],
2027
+ [
2028
+ {
2029
+ type: "zeroOrMore",
2030
+ contents: contents.fromSet(
2031
+ contentsPreset.scriptSupportingElements,
2032
+ "option"
2033
+ )
2034
+ }
2035
+ ]
2036
+ ]
2037
+ }
2038
+ ],
2039
+ attributes: contentAttributes(true)
2040
+ };
2041
+ var datalist = () => datalistSpec;
2042
+
2043
+ // src/elements/optgroup.ts
2044
+ var optgroupSpec = {
2045
+ contents: [
2046
+ {
2047
+ type: "zeroOrMore",
2048
+ contents: contents.fromSet(
2049
+ contentsPreset.scriptSupportingElements,
2050
+ "option"
2051
+ )
2052
+ }
2053
+ ],
2054
+ attributes: contentAttributes(true, ["disabled", "label"])
2055
+ };
2056
+ var optgroup = () => optgroupSpec;
2057
+
2058
+ // src/elements/option.ts
2059
+ var attributes4 = contentAttributes(true, [
2060
+ "disabled",
2061
+ "label",
2062
+ "selected",
2063
+ "value"
2064
+ ]);
2065
+ var optionWithLabelAndValueSpec = {
2066
+ contents: null,
2067
+ attributes: attributes4
2068
+ };
2069
+ var optionWithLabelSpec = {
2070
+ contents: [
2071
+ {
2072
+ type: "required",
2073
+ contents: contentsPreset.text
2074
+ }
2075
+ ],
2076
+ attributes: attributes4
2077
+ };
2078
+ var optionWithoutLabelAndValueSpec = {
2079
+ contents: [
2080
+ {
2081
+ type: "oneOrMore",
2082
+ contents: contentsPreset.text
2083
+ }
2084
+ ],
2085
+ attributes: attributes4
2086
+ };
2087
+ var option = (state) => {
2088
+ const attributes5 = (state == null ? void 0 : state.attributes) || {};
2089
+ if (attributes5["label"] && attributes5["value"]) {
2090
+ return optionWithLabelAndValueSpec;
2091
+ }
2092
+ if (attributes5["label"]) {
2093
+ return optionWithLabelSpec;
2094
+ }
2095
+ return optionWithoutLabelAndValueSpec;
2096
+ };
2097
+
2098
+ // src/elements/textarea.ts
2099
+ var textareaSpec = {
2100
+ contents: [
2101
+ {
2102
+ type: "zeroOrMore",
2103
+ contents: contentsPreset.text
2104
+ }
2105
+ ],
2106
+ attributes: contentAttributes(true, [
2107
+ "autocomplete",
2108
+ "cols",
2109
+ "dirname",
2110
+ "disabled",
2111
+ "form",
2112
+ "maxlength",
2113
+ "minlength",
2114
+ "name",
2115
+ "placeholder",
2116
+ "readonly",
2117
+ "required",
2118
+ "rows",
2119
+ "wrap"
2120
+ ])
2121
+ };
2122
+ var textarea = () => textareaSpec;
2123
+
2124
+ // src/elements/output.ts
2125
+ var outputSpec = {
2126
+ contents: [
2127
+ {
2128
+ type: "oneOrMore",
2129
+ contents: contentsPreset.phrasingContent
2130
+ }
2131
+ ],
2132
+ attributes: contentAttributes(true, ["for", "form", "name"])
2133
+ };
2134
+ var output = () => outputSpec;
2135
+
2136
+ // src/elements/progress.ts
2137
+ var progressSpec = {
2138
+ contents: [
2139
+ {
2140
+ type: "oneOrMore",
2141
+ contents: contentsPreset.phrasingContent,
2142
+ constraints: {
2143
+ descendants: contentConstraint.fromEntries([["progress", disallow]])
2144
+ }
2145
+ }
2146
+ ],
2147
+ attributes: contentAttributes(true, ["value", "max"])
2148
+ };
2149
+ var progress = () => progressSpec;
2150
+
2151
+ // src/elements/meter.ts
2152
+ var meterSpec = {
2153
+ contents: [
2154
+ {
2155
+ type: "oneOrMore",
2156
+ contents: contentsPreset.phrasingContent,
2157
+ constraints: {
2158
+ descendants: contentConstraint.fromEntries([["meter", disallow]])
2159
+ }
2160
+ }
2161
+ ],
2162
+ attributes: contentAttributes(true, [
2163
+ "value",
2164
+ "min",
2165
+ "max",
2166
+ "low",
2167
+ "high",
2168
+ "optimum"
2169
+ ])
2170
+ };
2171
+ var meter = () => meterSpec;
2172
+
2173
+ // src/elements/fieldset.ts
2174
+ var fieldsetSpec = {
2175
+ contents: [
2176
+ {
2177
+ type: "optional",
2178
+ contents: contents.fromKeys("legend")
2179
+ },
2180
+ {
2181
+ type: "oneOrMore",
2182
+ contents: contentsPreset.flowContent
2183
+ }
2184
+ ],
2185
+ attributes: contentAttributes(true, ["disabled", "form", "name"])
2186
+ };
2187
+ var fieldset = () => fieldsetSpec;
2188
+
2189
+ // src/elements/legend.ts
2190
+ var legendSpec = {
2191
+ contents: [
2192
+ {
2193
+ type: "zeroOrMore",
2194
+ contents: contents.fromUnionSets(
2195
+ contentsPreset.phrasingContent,
2196
+ contentsPreset.headingContent
2197
+ )
2198
+ }
2199
+ ],
2200
+ attributes: contentAttributes(true)
2201
+ };
2202
+ var legend = () => legendSpec;
2203
+
2204
+ // src/elements/details.ts
2205
+ var detailsSpec = {
2206
+ contents: [
2207
+ {
2208
+ type: "required",
2209
+ contents: contents.fromKeys("summary")
2210
+ },
2211
+ {
2212
+ type: "oneOrMore",
2213
+ contents: contentsPreset.flowContent
2214
+ }
2215
+ ],
2216
+ attributes: contentAttributes(true, ["name", "open"])
2217
+ };
2218
+ var details = () => detailsSpec;
2219
+
2220
+ // src/elements/summary.ts
2221
+ var summarySpec = {
2222
+ contents: [
2223
+ {
2224
+ type: "oneOrMore",
2225
+ contents: contents.fromUnionSets(
2226
+ contentsPreset.phrasingContent,
2227
+ contentsPreset.headingContent
2228
+ )
2229
+ }
2230
+ ],
2231
+ attributes: contentAttributes(true)
2232
+ };
2233
+ var summary = () => summarySpec;
2234
+
2235
+ // src/elements/dialog.ts
2236
+ var dialogSpec = {
2237
+ contents: [
2238
+ {
2239
+ type: "oneOrMore",
2240
+ contents: contentsPreset.flowContent
2241
+ }
2242
+ ],
2243
+ attributes: contentAttributes(true, ["closedby", "open"])
2244
+ };
2245
+ var dialog = () => dialogSpec;
2246
+
2247
+ // src/elements/script.ts
2248
+ var scriptSpec = {
2249
+ contents: [
2250
+ {
2251
+ type: "zeroOrMore",
2252
+ contents: contentsPreset.text
2253
+ }
2254
+ ],
2255
+ attributes: contentAttributes(true, [
2256
+ "src",
2257
+ "type",
2258
+ "nomodule",
2259
+ "async",
2260
+ "defer",
2261
+ "crossorigin",
2262
+ "integrity",
2263
+ "referrerpolicy",
2264
+ "blocking",
2265
+ "fetchpriority"
2266
+ ])
2267
+ };
2268
+ var script = () => scriptSpec;
2269
+
2270
+ // src/elements/noscript.ts
2271
+ var noscriptSpec = {
2272
+ contents: [
2273
+ {
2274
+ type: "zeroOrMore",
2275
+ contents: contentsPreset.text
2276
+ }
2277
+ ],
2278
+ attributes: contentAttributes(true)
2279
+ };
2280
+ var noscript = () => noscriptSpec;
2281
+
2282
+ // src/elements/template.ts
2283
+ var templateSpec = {
2284
+ contents: null,
2285
+ attributes: contentAttributes(true, [
2286
+ "shadowrootmode",
2287
+ "shadowrootdelegatesfocus",
2288
+ "shadowrootclonable",
2289
+ "shadowrootserializable"
2290
+ ])
2291
+ };
2292
+ var template = () => templateSpec;
2293
+
2294
+ // src/elements/slot.ts
2295
+ var slotSpec = {
2296
+ contents: [
2297
+ {
2298
+ type: "oneOrMore",
2299
+ contents: contentsPreset.transparentContent
2300
+ }
2301
+ ],
2302
+ attributes: contentAttributes(true, ["name"])
2303
+ };
2304
+ var slot = () => slotSpec;
2305
+
2306
+ // src/elements/canvas.ts
2307
+ var canvasSpec = {
2308
+ contents: [
2309
+ {
2310
+ type: "oneOrMore",
2311
+ contents: contentsPreset.transparentContent,
2312
+ constraints: {
2313
+ descendants: contentConstraint.fromSets(
2314
+ disallow,
2315
+ contentsPreset.interactiveContent
2316
+ )
2317
+ }
2318
+ }
2319
+ ],
2320
+ attributes: contentAttributes(true, ["width", "height"])
2321
+ };
2322
+ var canvas = () => canvasSpec;
2323
+
2324
+ // src/getElementSpec.ts
2325
+ var specsRecord = elements_exports;
2326
+ function getElementSpec(name, options) {
2327
+ const getSpec = specsRecord[name.toLowerCase()] || null;
2328
+ if (!getSpec) {
2329
+ return null;
2330
+ }
2331
+ return getSpec(options);
2332
+ }
2333
+ export {
2334
+ getElementSpec
2335
+ };
2336
+ //# sourceMappingURL=index.js.map