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