html-standard 0.0.2 → 0.0.3

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