@pfern/elements 0.1.11 → 0.2.1

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.
package/elements.js CHANGED
@@ -1,1942 +1,4 @@
1
- /** expressive/elements.js
2
- *
3
- * Minimalist declarative UI framework based on pure functional composition.
4
- *
5
- * Purpose:
6
- * - All UI defined as pure functions that return declarative arrays.
7
- * - Directly composable into a symbolic tree compatible with Lisp-like dialects.
8
- * - No internal mutable state required: DOM itself is the substrate for state.
9
- * - No JSX, no keys, no reconciler heuristics — just pure structure + replacement.
10
- *
11
- */
12
-
13
- export const DEBUG =
14
- typeof process !== 'undefined'
15
- && process.env
16
- && (process.env.ELEMENTSJS_DEBUG?.toLowerCase() === 'true'
17
- || process.env.NODE_ENV === 'development')
18
-
19
- const svgNS = 'http://www.w3.org/2000/svg'
20
-
21
- /**
22
- * Maps vnode instances to their current root DOM element,
23
- * allowing accurate replacement when the same vnode is re-invoked.
24
- */
25
- const rootMap = new WeakMap()
26
-
27
- const isNodeEnv = () => typeof document === 'undefined'
28
-
29
- let componentUpdateDepth = 0
30
- let currentEventRoot = null
31
-
32
- /**
33
- * Determines whether two nodes have changed enough to require replacement.
34
- * Compares type, string value, or element tag.
35
- *
36
- * @param {*} a - Previous vnode
37
- * @param {*} b - New vnode
38
- * @returns {boolean} - True if nodes are meaningfully different
39
- */
40
- const changed = (a, b) =>
41
- typeof a !== typeof b
42
- || typeof a === 'string' && a !== b
43
- || Array.isArray(a) && Array.isArray(b) && a[0] !== b[0]
44
-
45
- /**
46
- * Computes a patch object describing how to transform tree `a` into tree `b`.
47
- * Used by `render` to apply minimal updates to the DOM.
48
- *
49
- * @param {*} a - Previous vnode
50
- * @param {*} b - New vnode
51
- * @returns {Object} - Patch object with type and content
52
- */
53
- const diffTree = (a, b) => {
54
- if (!a) return { type: 'CREATE', newNode: b }
55
- if (!b) return { type: 'REMOVE' }
56
- if (changed(a, b)) return { type: 'REPLACE', newNode: b }
57
- if (Array.isArray(a) && Array.isArray(b)) {
58
- return {
59
- type: 'UPDATE',
60
- children: diffChildren(a.slice(2), b.slice(2))
61
- }
62
- }
63
- }
64
-
65
- /**
66
- * Compares the children of two vnodes and returns patch list.
67
- *
68
- * @param {Array} aChildren - Previous vnode children
69
- * @param {Array} bChildren - New vnode children
70
- * @returns {Array} patches - One per child node
71
- */
72
- const diffChildren = (aChildren, bChildren) => {
73
- const patches = []
74
- const len = Math.max(aChildren.length, bChildren.length)
75
- for (let i = 0; i < len; i++) {
76
- patches[i] = diffTree(aChildren[i], bChildren[i])
77
- }
78
- return patches
79
- }
80
-
81
- /**
82
- * Assigns attributes, styles, and event handlers to a DOM element.
83
- *
84
- * - Event listeners may return a vnode array to trigger a subtree replacement.
85
- * - For `onsubmit`, `oninput`, and `onchange`, `preventDefault()` is called automatically
86
- * *if* the listener returns a vnode (to support declarative form updates).
87
- * - Handlers for these event types receive `(elements, event)` as arguments,
88
- * where `elements` is `event.target.elements` if available.
89
- * - Async handlers are supported: if the listener returns a Promise,
90
- * it will be awaited and the resulting vnode (if any) will be rendered.
91
- *
92
- * @param {HTMLElement} el - The DOM element to receive props
93
- * @param {Object} props - Attributes and event listeners to assign
94
- */
95
- const assignProperties = (el, props) =>
96
- Object.entries(props).forEach(([key, value]) => {
97
- if (key.startsWith('on') && typeof value === 'function') {
98
- el[key] = async (...args) => {
99
- let target = el
100
- while (target && !target.__root) target = target.parentNode
101
- if (!target) return
102
-
103
- const prevEventRoot = currentEventRoot
104
- currentEventRoot = target
105
- try {
106
- const event = args[0]
107
- const isFormEvent = /^(oninput|onsubmit|onchange)$/.test(key)
108
- const elements = isFormEvent && event?.target?.elements || null
109
-
110
- const result = await (isFormEvent
111
- ? value.call(el, elements, event)
112
- : value.call(el, event))
113
-
114
- if (isFormEvent && result !== undefined) {
115
- event.preventDefault()
116
- }
117
-
118
- if (DEBUG && result === undefined) {
119
- console.warn(
120
- `Listener '${key}' on <${el.tagName.toLowerCase()}> returned nothing.\n`
121
- + 'If you intended a UI update, return a vnode array like: div({}, ...)'
122
- )
123
- }
124
-
125
- if (DEBUG && result !== undefined && !Array.isArray(result)) {
126
- isFormEvent && event.preventDefault()
127
- DEBUG
128
- && console.warn(
129
- `Listener '${key}' on <${el.tagName.toLowerCase()}> returned "${result}".\n`
130
- + 'If you intended a UI update, return a vnode array like: div({}, ...).\n'
131
- + 'Otherwise, return undefined (or nothing) for native event listener behavior.'
132
- )
133
- }
134
-
135
- if (Array.isArray(result)) {
136
- const parent = target.parentNode
137
- if (!parent) return
138
-
139
- const replacement = renderTree(result, true)
140
- parent.replaceChild(replacement, target)
141
-
142
- replacement.__vnode = result
143
- replacement.__root = true
144
- rootMap.set(result, replacement)
145
- }
146
- } catch (error) {
147
- console.error(error)
148
- } finally {
149
- currentEventRoot = prevEventRoot
150
- }
151
- }
152
- } else if (key === 'style' && typeof value === 'object') {
153
- Object.assign(el.style, value)
154
- } else if (key === 'innerHTML') {
155
- el.innerHTML = value
156
- } else {
157
- try {
158
- if (el.namespaceURI === svgNS) {
159
- el.setAttributeNS(null, key, value)
160
- } else {
161
- el.setAttribute(key, value)
162
- }
163
- } catch {
164
- DEBUG
165
- && console.warn(
166
- `Illegal DOM property assignment for ${el.tagName}: ${key}: ${value}`
167
- )
168
- }
169
- }
170
- })
171
-
172
- /**
173
- * Recursively builds a real DOM tree from a declarative vnode.
174
- * Marks root nodes and tracks state/element associations.
175
- *
176
- * @param {*} node - Vnode to render
177
- * @param {boolean} isRoot - Whether this is a root component
178
- * @returns {Node} - Real DOM node
179
- */
180
- const renderTree = (node, isRoot = true) => {
181
- if (typeof node === 'string' || typeof node === 'number') {
182
- return isNodeEnv() ? node : document.createTextNode(node)
183
- }
184
-
185
- if (!node || node.length === 0) {
186
- return document.createComment('Empty vnode')
187
- }
188
-
189
- if (!Array.isArray(node)) {
190
- console.error('Malformed vnode (not an array):', node)
191
- return document.createComment('Invalid vnode')
192
- }
193
-
194
- if (Array.isArray(node) && node[0] === 'wrap') {
195
- const [_tag, props = {}, child] = node
196
- const el = renderTree(child, true)
197
- if (props && typeof props === 'object' && props.__instance) {
198
- rootMap.set(props.__instance, el)
199
- }
200
- return el
201
- }
202
-
203
- const [tag, props = {}, ...children] = node
204
-
205
- if (typeof tag !== 'string') {
206
- console.error('Malformed vnode (non-string tag):', node)
207
- return document.createComment('Invalid vnode')
208
- }
209
-
210
- let el =
211
- tag === 'html'
212
- ? document.documentElement
213
- : tag === 'head'
214
- ? document.head
215
- : tag === 'body'
216
- ? document.body
217
- : svgTagNames.includes(tag)
218
- ? document.createElementNS(svgNS, tag)
219
- : document.createElement(tag)
220
-
221
- if (!el && (tag === 'head' || tag === 'body')) {
222
- el = document.createElement(tag)
223
- document.documentElement.appendChild(el)
224
- }
225
-
226
- el.__vnode = node
227
-
228
- if (isRoot && tag !== 'html' && tag !== 'head' && tag !== 'body') {
229
- el.__root = true
230
- rootMap.set(node, el)
231
- }
232
-
233
- assignProperties(el, props)
234
-
235
- children.forEach(child => {
236
- const childEl = renderTree(child, false)
237
- el.appendChild(childEl)
238
- })
239
-
240
- return el
241
- }
242
-
243
- /**
244
- * Applies a patch object to a DOM subtree.
245
- * Handles creation, removal, replacement, and child updates.
246
- *
247
- * @param {HTMLElement} parent - DOM node to mutate
248
- * @param {Object} patch - Patch object from diffTree
249
- * @param {number} [index=0] - Child index to apply update to
250
- */
251
- const applyPatch = (parent, patch, index = 0) => {
252
- if (!patch) return
253
- const child = parent.childNodes[index]
254
-
255
- switch (patch.type) {
256
- case 'CREATE': {
257
- const newEl = renderTree(patch.newNode)
258
- parent.appendChild(newEl)
259
- break
260
- }
261
- case 'REMOVE':
262
- if (child) parent.removeChild(child)
263
- break
264
- case 'REPLACE': {
265
- const newEl = renderTree(patch.newNode)
266
- parent.replaceChild(newEl, child)
267
- break
268
- }
269
- case 'UPDATE':
270
- patch.children.forEach((p, i) => applyPatch(child, p, i))
271
- break
272
- }
273
- }
274
-
275
- /**
276
- * Renders a new vnode into the DOM. If this vnode was rendered before,
277
- * reuses the previous root and applies a patch. Otherwise, performs initial mount.
278
- *
279
- * @param {any[]} vtree - The declarative vnode array to render
280
- * @param {HTMLElement} container - The container to render into
281
- */
282
- export const render = (vtree, container = null) => {
283
- const target =
284
- !container && Array.isArray(vtree) && vtree[0] === 'html'
285
- ? document.documentElement
286
- : container
287
-
288
- if (!target) {
289
- throw new Error('render() requires a container for non-html() root')
290
- }
291
-
292
- const prevVNode = target.__vnode
293
-
294
- if (!prevVNode) {
295
- const dom = renderTree(vtree)
296
- if (target === document.documentElement) {
297
- if (dom !== document.documentElement) {
298
- document.replaceChild(dom, document.documentElement)
299
- }
300
- } else {
301
- target.appendChild(dom)
302
- }
303
- } else {
304
- const patch = diffTree(prevVNode, vtree)
305
- applyPatch(target, patch)
306
- }
307
-
308
- target.__vnode = vtree
309
- rootMap.set(vtree, target)
310
- }
311
-
312
- /**
313
- * Wraps a function component so that it participates in reconciliation.
314
- *
315
- * @param {(...args: any[]) => any} fn - A pure function that returns a declarative tree (array format).
316
- * @returns {(...args: any[]) => any} - A callable component that can manage its own subtree.
317
- */
318
- export const component = fn => {
319
- const instance = {}
320
- return (...args) => {
321
- try {
322
- const prevEl = rootMap.get(instance)
323
- const canUpdateInPlace =
324
- !!prevEl?.parentNode
325
- && componentUpdateDepth === 0
326
- && !currentEventRoot
327
-
328
- componentUpdateDepth++
329
- let vnode
330
- try {
331
- vnode = fn(...args)
332
- } finally {
333
- componentUpdateDepth--
334
- }
335
-
336
- if (canUpdateInPlace) {
337
- const replacement = renderTree(['wrap', { __instance: instance }, vnode], true)
338
- prevEl.parentNode.replaceChild(replacement, prevEl)
339
- return replacement.__vnode
340
- }
341
-
342
- return ['wrap', { __instance: instance }, vnode]
343
- } catch (err) {
344
- console.error('Component error:', err)
345
- return ['div', {}, `Error: ${err.message}`]
346
- }
347
- }
348
- }
349
-
350
- const htmlTagNames = [
351
- // Document metadata
352
- 'html',
353
- 'head',
354
- 'base',
355
- 'link',
356
- 'meta',
357
- 'title',
358
-
359
- // Sections
360
- 'body',
361
- 'header',
362
- 'hgroup',
363
- 'nav',
364
- 'main',
365
- 'section',
366
- 'article',
367
- 'aside',
368
- 'footer',
369
- 'address',
370
-
371
- // Text content
372
- 'h1',
373
- 'h2',
374
- 'h3',
375
- 'h4',
376
- 'h5',
377
- 'h6',
378
- 'p',
379
- 'hr',
380
- 'menu',
381
- 'pre',
382
- 'blockquote',
383
- 'ol',
384
- 'ul',
385
- 'li',
386
- 'dl',
387
- 'dt',
388
- 'dd',
389
- 'figure',
390
- 'figcaption',
391
- 'div',
392
-
393
- // Inline text semantics
394
- 'a',
395
- 'abbr',
396
- 'b',
397
- 'bdi',
398
- 'bdo',
399
- 'br',
400
- 'cite',
401
- 'code',
402
- 'data',
403
- 'dfn',
404
- 'em',
405
- 'i',
406
- 'kbd',
407
- 'mark',
408
- 'q',
409
- 'rb',
410
- 'rp',
411
- 'rt',
412
- 'rtc',
413
- 'ruby',
414
- 's',
415
- 'samp',
416
- 'small',
417
- 'span',
418
- 'strong',
419
- 'sub',
420
- 'sup',
421
- 'time',
422
- 'u',
423
- 'var',
424
- 'wbr',
425
-
426
- // Edits
427
- 'ins',
428
- 'del',
429
-
430
- // Embedded content
431
- 'img',
432
- 'iframe',
433
- 'embed',
434
- 'object',
435
- 'param',
436
- 'video',
437
- 'audio',
438
- 'source',
439
- 'track',
440
- 'picture',
441
-
442
- // Table content
443
- 'table',
444
- 'caption',
445
- 'thead',
446
- 'tbody',
447
- 'tfoot',
448
- 'tr',
449
- 'th',
450
- 'td',
451
- 'colgroup',
452
- 'col',
453
-
454
- // Forms
455
- 'form',
456
- 'fieldset',
457
- 'legend',
458
- 'label',
459
- 'input',
460
- 'button',
461
- 'select',
462
- 'datalist',
463
- 'optgroup',
464
- 'option',
465
- 'textarea',
466
- 'output',
467
- 'progress',
468
- 'meter',
469
-
470
- // Interactive elements
471
- 'details',
472
- 'search',
473
- 'summary',
474
- 'dialog',
475
- 'slot',
476
- 'template',
477
-
478
- // Scripting and style
479
- 'script',
480
- 'noscript',
481
- 'style',
482
-
483
- // Web components and others
484
- 'canvas',
485
- 'picture',
486
- 'map',
487
- 'area',
488
- 'slot'
489
- ]
490
-
491
- const svgTagNames = [
492
- // Animation elements
493
- 'animate',
494
- 'animateMotion',
495
- 'animateTransform',
496
- 'mpath',
497
- 'set',
498
-
499
- // Basic shapes
500
- 'circle',
501
- 'ellipse',
502
- 'line',
503
- 'path',
504
- 'polygon',
505
- 'polyline',
506
- 'rect',
507
-
508
- // Container / structural
509
- 'defs',
510
- 'g',
511
- 'marker',
512
- 'mask',
513
- 'pattern',
514
- 'svg',
515
- 'switch',
516
- 'symbol',
517
- 'use',
518
-
519
- // Descriptive
520
- 'desc',
521
- 'metadata',
522
- 'title',
523
-
524
- // Filter primitives
525
- 'filter',
526
- 'feBlend',
527
- 'feColorMatrix',
528
- 'feComponentTransfer',
529
- 'feComposite',
530
- 'feConvolveMatrix',
531
- 'feDiffuseLighting',
532
- 'feDisplacementMap',
533
- 'feDistantLight',
534
- 'feDropShadow',
535
- 'feFlood',
536
- 'feFuncA',
537
- 'feFuncB',
538
- 'feFuncG',
539
- 'feFuncR',
540
- 'feGaussianBlur',
541
- 'feImage',
542
- 'feMerge',
543
- 'feMergeNode',
544
- 'feMorphology',
545
- 'feOffset',
546
- 'fePointLight',
547
- 'feSpecularLighting',
548
- 'feSpotLight',
549
- 'feTile',
550
- 'feTurbulence',
551
-
552
- // Gradient / paint servers
553
- 'linearGradient',
554
- 'radialGradient',
555
- 'stop',
556
-
557
- // Graphics elements
558
- 'image',
559
- 'foreignObject', // included in graphics section as non‑standard children
560
-
561
- // Text and text-path
562
- 'text',
563
- 'textPath',
564
- 'tspan',
565
-
566
- // Scripting/style
567
- 'script',
568
- 'style',
569
-
570
- // View
571
- 'view'
572
- ]
573
-
574
- const tagNames = [...htmlTagNames, ...svgTagNames]
575
- const isPropsObject = x =>
576
- typeof x === 'object'
577
- && x !== null
578
- && !Array.isArray(x)
579
- && !(typeof Node !== 'undefined' && x instanceof Node)
580
-
581
- /**
582
- * A map of supported HTML and SVG element helpers.
583
- *
584
- * Each helper is a function that accepts optional props as first argument
585
- * and children as subsequent arguments.
586
- *
587
- * Example:
588
- *
589
- * ```js
590
- * div({ id: 'foo' }, 'Hello World')
591
- * ```
592
- *
593
- * Produces:
594
- *
595
- * ```js
596
- * ['div', { id: 'foo' }, 'Hello World']
597
- * ```
598
- *
599
- * The following helpers are included:
600
- * `div`, `span`, `button`, `svg`, `circle`, etc.
601
- */
602
- export const elements = tagNames.reduce(
603
- (acc, tag) => ({
604
- ...acc,
605
- [tag]: (...args) => {
606
- const hasFirstArg = args.length > 0
607
- const [propsOrChild, ...children] = args
608
- const props = hasFirstArg && isPropsObject(propsOrChild) ? propsOrChild : {}
609
- const actualChildren = !hasFirstArg
610
- ? []
611
- : props === propsOrChild
612
- ? children
613
- : [propsOrChild, ...children]
614
- return [tag, props, ...actualChildren]
615
- }
616
- }),
617
- {
618
- fragment: (...children) => ['fragment', {}, ...children]
619
- }
620
- )
621
-
622
- /**
623
- * <html>
624
- * Represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.
625
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/html
626
- *
627
- */
628
- export const html = elements.html
629
-
630
- /**
631
- * <base>
632
- * Specifies the base URL to use for all relative URLs in a document. There can be only one such element in a document.
633
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/base
634
- *
635
- */
636
- export const base = elements.base
637
-
638
- /**
639
- * <head>
640
- * Contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.
641
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/head
642
- *
643
- */
644
- export const head = elements.head
645
-
646
- /**
647
- * <link>
648
- * Specifies relationships between the current document and an external resource. This element is most commonly used to link to CSS but is also used to establish site icons (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.
649
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/link
650
- *
651
- */
652
- export const link = elements.link
653
-
654
- /**
655
- * <meta>
656
- * Represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> and <title>.
657
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meta
658
- *
659
- */
660
- export const meta = elements.meta
661
-
662
- /**
663
- * <style>
664
- * Contains style information for a document or part of a document. It contains CSS, which is applied to the contents of the document containing this element.
665
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/style
666
- *
667
- */
668
- export const style = elements.style
669
-
670
- /**
671
- * <title>
672
- * Defines the document's title that is shown in a browser's title bar or a page's tab. It only contains text; HTML tags within the element, if any, are also treated as plain text.
673
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/title
674
- *
675
- */
676
- export const title = elements.title
677
-
678
- /**
679
- * <body>
680
- * Represents the content of an HTML document. There can be only one such element in a document.
681
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/body
682
- *
683
- */
684
- export const body = elements.body
685
-
686
- /**
687
- * <address>
688
- * Indicates that the enclosed HTML provides contact information for a person or people, or for an organization.
689
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/address
690
- *
691
- */
692
- export const address = elements.address
693
-
694
- /**
695
- * <article>
696
- * Represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication). Examples include a forum post, a magazine or newspaper article, a blog entry, a product card, a user-submitted comment, an interactive widget or gadget, or any other independent item of content.
697
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/article
698
- *
699
- */
700
- export const article = elements.article
701
-
702
- /**
703
- * <aside>
704
- * Represents a portion of a document whose content is only indirectly related to the document's main content. Asides are frequently presented as sidebars or call-out boxes.
705
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/aside
706
- *
707
- */
708
- export const aside = elements.aside
709
-
710
- /**
711
- * <footer>
712
- * Represents a footer for its nearest ancestor sectioning content or sectioning root element. A <footer> typically contains information about the author of the section, copyright data, or links to related documents.
713
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/footer
714
- *
715
- */
716
- export const footer = elements.footer
717
-
718
- /**
719
- * <header>
720
- * Represents introductory content, typically a group of introductory or navigational aids. It may contain some heading elements but also a logo, a search form, an author name, and other elements.
721
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/header
722
- *
723
- */
724
- export const header = elements.header
725
-
726
- /**
727
- * <h1>
728
- * There are six levels of section headings. <h1> is the highest section level and <h6> is the lowest.
729
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h1
730
- *
731
- */
732
- export const h1 = elements.h1
733
-
734
- /**
735
- * <h2>
736
- * There are six levels of section headings. <h1> is the highest section level and <h6> is the lowest.
737
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h2
738
- *
739
- */
740
- export const h2 = elements.h2
741
-
742
- /**
743
- * <h3>
744
- * There are six levels of section headings. <h1> is the highest section level and <h6> is the lowest.
745
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h3
746
- *
747
- */
748
- export const h3 = elements.h3
749
-
750
- /**
751
- * <h4>
752
- * There are six levels of section headings. <h1> is the highest section level and <h6> is the lowest.
753
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h4
754
- *
755
- */
756
- export const h4 = elements.h4
757
-
758
- /**
759
- * <h5>
760
- * There are six levels of section headings. <h1> is the highest section level and <h6> is the lowest.
761
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h5
762
- *
763
- */
764
- export const h5 = elements.h5
765
-
766
- /**
767
- * <h6>
768
- * There are six levels of section headings. <h1> is the highest section level and <h6> is the lowest.
769
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/h6
770
- *
771
- */
772
- export const h6 = elements.h6
773
-
774
- /**
775
- * <hgroup>
776
- * Represents a heading grouped with any secondary content, such as subheadings, an alternative title, or a tagline.
777
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/hgroup
778
- *
779
- */
780
- export const hgroup = elements.hgroup
781
-
782
- /**
783
- * <main>
784
- * Represents the dominant content of the body of a document. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.
785
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/main
786
- *
787
- */
788
- export const main = elements.main
789
-
790
- /**
791
- * <nav>
792
- * Represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents. Common examples of navigation sections are menus, tables of contents, and indexes.
793
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/nav
794
- *
795
- */
796
- export const nav = elements.nav
797
-
798
- /**
799
- * <section>
800
- * Represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it. Sections should always have a heading, with very few exceptions.
801
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/section
802
- *
803
- */
804
- export const section = elements.section
805
-
806
- /**
807
- * <search>
808
- * Represents a part that contains a set of form controls or other content related to performing a search or filtering operation.
809
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/search
810
- *
811
- */
812
- export const search = elements.search
813
-
814
- /**
815
- * <blockquote>
816
- * Indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation. A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the <cite> element.
817
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/blockquote
818
- *
819
- */
820
- export const blockquote = elements.blockquote
821
-
822
- /**
823
- * <dd>
824
- * Provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).
825
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dd
826
- *
827
- */
828
- export const dd = elements.dd
829
-
830
- /**
831
- * <div>
832
- * The generic container for flow content. It has no effect on the content or layout until styled in some way using CSS (e.g., styling is directly applied to it, or some kind of layout model like flexbox is applied to its parent element).
833
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/div
834
- *
835
- */
836
- export const div = elements.div
837
-
838
- /**
839
- * <dl>
840
- * Represents a description list. The element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <dd> elements). Common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs).
841
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dl
842
- *
843
- */
844
- export const dl = elements.dl
845
-
846
- /**
847
- * <dt>
848
- * Specifies a term in a description or definition list, and as such must be used inside a <dl> element. It is usually followed by a <dd> element; however, multiple <dt> elements in a row indicate several terms that are all defined by the immediate next <dd> element.
849
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dt
850
- *
851
- */
852
- export const dt = elements.dt
853
-
854
- /**
855
- * <figcaption>
856
- * Represents a caption or legend describing the rest of the contents of its parent <figure> element.
857
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/figcaption
858
- *
859
- */
860
- export const figcaption = elements.figcaption
861
-
862
- /**
863
- * <figure>
864
- * Represents self-contained content, potentially with an optional caption, which is specified using the <figcaption> element. The figure, its caption, and its contents are referenced as a single unit.
865
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/figure
866
- *
867
- */
868
- export const figure = elements.figure
869
-
870
- /**
871
- * <hr>
872
- * Represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.
873
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/hr
874
- *
875
- */
876
- export const hr = elements.hr
877
-
878
- /**
879
- * <li>
880
- * Represents an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.
881
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/li
882
- *
883
- */
884
- export const li = elements.li
885
-
886
- /**
887
- * <menu>
888
- * A semantic alternative to <ul>, but treated by browsers (and exposed through the accessibility tree) as no different than <ul>. It represents an unordered list of items (which are represented by <li> elements).
889
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/menu
890
- *
891
- */
892
- export const menu = elements.menu
893
-
894
- /**
895
- * <ol>
896
- * Represents an ordered list of items — typically rendered as a numbered list.
897
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ol
898
- *
899
- */
900
- export const ol = elements.ol
901
-
902
- /**
903
- * <p>
904
- * Represents a paragraph. Paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but HTML paragraphs can be any structural grouping of related content, such as images or form fields.
905
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/p
906
- *
907
- */
908
- export const p = elements.p
909
-
910
- /** ')
911
- * <pre>
912
- * Represents preformatted text which is to be presented exactly as written in the HTML file. The text is typically rendered using a non-proportional, or monospaced, font. Whitespace inside this element is displayed as written.
913
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/pre
914
- *
915
- */
916
- export const pre = elements.pre
917
-
918
- /**
919
- * <ul>
920
- * Represents an unordered list of items, typically rendered as a bulleted list.
921
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ul
922
- *
923
- */
924
- export const ul = elements.ul
925
-
926
- /**
927
- * <a>
928
- * Together with its href attribute, creates a hyperlink to web pages, files, email addresses, locations within the current page, or anything else a URL can address.
929
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a
930
- *
931
- */
932
- export const a = elements.a
933
-
934
- /**
935
- * <abbr>
936
- * Represents an abbreviation or acronym.
937
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/abbr
938
- *
939
- */
940
- export const abbr = elements.abbr
941
-
942
- /**
943
- * <b>
944
- * Used to draw the reader's attention to the element's contents, which are not otherwise granted special importance. This was formerly known as the Boldface element, and most browsers still draw the text in boldface. However, you should not use <b> for styling text or granting importance. If you wish to create boldface text, you should use the CSS font-weight property. If you wish to indicate an element is of special importance, you should use the <strong> element.
945
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/b
946
- *
947
- */
948
- export const b = elements.b
949
-
950
- /**
951
- * <bdi>
952
- * Tells the browser's bidirectional algorithm to treat the text it contains in isolation from its surrounding text. It's particularly useful when a website dynamically inserts some text and doesn't know the directionality of the text being inserted.
953
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/bdi
954
- *
955
- */
956
- export const bdi = elements.bdi
957
-
958
- /**
959
- * <bdo>
960
- * Overrides the current directionality of text, so that the text within is rendered in a different direction.
961
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/bdo
962
- *
963
- */
964
- export const bdo = elements.bdo
965
-
966
- /**
967
- * <br>
968
- * Produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.
969
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/br
970
- *
971
- */
972
- export const br = elements.br
973
-
974
- /**
975
- * <cite>
976
- * Used to mark up the title of a creative work. The reference may be in an abbreviated form according to context-appropriate conventions related to citation metadata.
977
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/cite
978
- *
979
- */
980
- export const cite = elements.cite
981
-
982
- /**
983
- * <code>
984
- * Displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code. By default, the content text is displayed using the user agent's default monospace font.
985
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/code
986
- *
987
- */
988
- export const code = elements.code
989
-
990
- /**
991
- * <data>
992
- * Links a given piece of content with a machine-readable translation. If the content is time- or date-related, the <time> element must be used.
993
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/data
994
- *
995
- */
996
- export const data = elements.data
997
-
998
- /**
999
- * <dfn>
1000
- * Used to indicate the term being defined within the context of a definition phrase or sentence. The ancestor <p> element, the <dt>/<dd> pairing, or the nearest section ancestor of the <dfn> element, is considered to be the definition of the term.
1001
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dfn
1002
- *
1003
- */
1004
- export const dfn = elements.dfn
1005
-
1006
- /**
1007
- * <em>
1008
- * Marks text that has stress emphasis. The <em> element can be nested, with each nesting level indicating a greater degree of emphasis.
1009
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/em
1010
- *
1011
- */
1012
- export const em = elements.em
1013
-
1014
- /**
1015
- * <i>
1016
- * Represents a range of text that is set off from the normal text for some reason, such as idiomatic text, technical terms, and taxonomical designations, among others. Historically, these have been presented using italicized type, which is the original source of the <i> naming of this element.
1017
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/i
1018
- *
1019
- */
1020
- export const i = elements.i
1021
-
1022
- /**
1023
- * <kbd>
1024
- * Represents a span of inline text denoting textual user input from a keyboard, voice input, or any other text entry device. By convention, the user agent defaults to rendering the contents of a <kbd> element using its default monospace font, although this is not mandated by the HTML standard.
1025
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/kbd
1026
- *
1027
- */
1028
- export const kbd = elements.kbd
1029
-
1030
- /**
1031
- * <mark>
1032
- * Represents text which is marked or highlighted for reference or notation purposes due to the marked passage's relevance in the enclosing context.
1033
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/mark
1034
- *
1035
- */
1036
- export const mark = elements.mark
1037
-
1038
- /**
1039
- * <q>
1040
- * Indicates that the enclosed text is a short inline quotation. Most modern browsers implement this by surrounding the text in quotation marks. This element is intended for short quotations that don't require paragraph breaks; for long quotations use the <blockquote> element.
1041
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/q>
1042
- *
1043
- */
1044
- export const q = elements.q
1045
-
1046
- /**
1047
- * <rp>
1048
- * Used to provide fall-back parentheses for browsers that do not support the display of ruby annotations using the <ruby> element. One <rp> element should enclose each of the opening and closing parentheses that wrap the <rt> element that contains the annotation's text.
1049
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/rp
1050
- *
1051
- */
1052
- export const rp = elements.rp
1053
-
1054
- /**
1055
- * <rt>
1056
- * Specifies the ruby text component of a ruby annotation, which is used to provide pronunciation, translation, or transliteration information for East Asian typography. The <rt> element must always be contained within a <ruby> element.
1057
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/rt
1058
- *
1059
- */
1060
- export const rt = elements.rt
1061
-
1062
- /**
1063
- * <ruby>
1064
- * Represents small annotations that are rendered above, below, or next to base text, usually used for showing the pronunciation of East Asian characters. It can also be used for annotating other kinds of text, but this usage is less common.
1065
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ruby
1066
- *
1067
- */
1068
- export const ruby = elements.ruby
1069
-
1070
- /**
1071
- * <s>
1072
- * Renders text with a strikethrough, or a line through it. Use the <s> element to represent things that are no longer relevant or no longer accurate. However, <s> is not appropriate when indicating document edits; for that, use the <del> and <ins> elements, as appropriate.
1073
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/s
1074
- *
1075
- */
1076
- export const s = elements.s
1077
-
1078
- /**
1079
- * <samp>
1080
- * Used to enclose inline text which represents sample (or quoted) output from a computer program. Its contents are typically rendered using the browser's default monospaced font (such as Courier or Lucida Console).
1081
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/samp
1082
- *
1083
- */
1084
- export const samp = elements.samp
1085
-
1086
- /**
1087
- * <small>
1088
- * Represents side-comments and small print, like copyright and legal text, independent of its styled presentation. By default, it renders text within it one font size smaller, such as from small to x-small.
1089
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/small
1090
- *
1091
- */
1092
- export const small = elements.small
1093
-
1094
- /**
1095
- * <span>
1096
- * A generic inline container for phrasing content, which does not inherently represent anything. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. It should be used only when no other semantic element is appropriate. <span> is very much like a div element, but div is a block-level element whereas a <span> is an inline-level element.
1097
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/span
1098
- *
1099
- */
1100
- export const span = elements.span
1101
-
1102
- /**
1103
- * <strong>
1104
- * Indicates that its contents have strong importance, seriousness, or urgency. Browsers typically render the contents in bold type.
1105
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/strong
1106
- *
1107
- */
1108
- export const strong = elements.strong
1109
-
1110
- /**
1111
- * <sub>
1112
- * Specifies inline text which should be displayed as subscript for solely typographical reasons. Subscripts are typically rendered with a lowered baseline using smaller text.
1113
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/sub
1114
- *
1115
- */
1116
- export const sub = elements.sub
1117
-
1118
- /**
1119
- * <sup>
1120
- * Specifies inline text which is to be displayed as superscript for solely typographical reasons. Superscripts are usually rendered with a raised baseline using smaller text.
1121
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/sup
1122
- *
1123
- */
1124
- export const sup = elements.sup
1125
-
1126
- /**
1127
- * <time>
1128
- * Represents a specific period in time. It may include the datetime attribute to translate dates into machine-readable format, allowing for better search engine results or custom features such as reminders.
1129
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/time
1130
- *
1131
- */
1132
- export const time = elements.time
1133
-
1134
- /**
1135
- * <u>
1136
- * Represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation. This is rendered by default as a single solid underline but may be altered using CSS.
1137
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/u
1138
- *
1139
- */
1140
- export const u = elements.u
1141
-
1142
- /**
1143
- * <var>
1144
- * Represents the name of a variable in a mathematical expression or a programming context. It's typically presented using an italicized version of the current typeface, although that behavior is browser-dependent.
1145
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/var
1146
- *
1147
- */
1148
- export const htmlvar = elements.var
1149
-
1150
- /**
1151
- * <wbr>
1152
- * Represents a word break opportunity—a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location.
1153
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/wbr
1154
- *
1155
- */
1156
- export const wbr = elements.wbr
1157
-
1158
- /**
1159
- * <area>
1160
- * Defines an area inside an image map that has predefined clickable areas. An image map allows geometric areas on an image to be associated with hyperlink.
1161
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/area
1162
- *
1163
- */
1164
- export const area = elements.area
1165
-
1166
- /**
1167
- * <audio>
1168
- * Used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the source element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.
1169
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/audio
1170
- *
1171
- */
1172
- export const audio = elements.audio
1173
-
1174
- /**
1175
- * <img>
1176
- * Embeds an image into the document.
1177
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img
1178
- *
1179
- */
1180
- export const img = elements.img
1181
-
1182
- /**
1183
- * <map>
1184
- * Used with <area> elements to define an image map (a clickable link area).
1185
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/map
1186
- *
1187
- */
1188
- export const map = elements.map
1189
-
1190
- /**
1191
- * <track>
1192
- * Used as a child of the media elements, audio and video. It lets you specify timed text tracks (or time-based data), for example to automatically handle subtitles. The tracks are formatted in WebVTT format (.vtt files)—Web Video Text Tracks.
1193
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/track
1194
- *
1195
- */
1196
- export const track = elements.track
1197
-
1198
- /**
1199
- * <video>
1200
- * Embeds a media player which supports video playback into the document. You can also use <video> for audio content, but the audio element may provide a more appropriate user experience.
1201
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/video
1202
- *
1203
- */
1204
- export const video = elements.video
1205
-
1206
- /**
1207
- * <embed>
1208
- * Embeds external content at the specified point in the document. This content is provided by an external application or other source of interactive content such as a browser plug-in.
1209
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/embed
1210
- *
1211
- */
1212
- export const embed = elements.embed
1213
-
1214
- /**
1215
- * <iframe>
1216
- * Represents a nested browsing context, embedding another HTML page into the current one.
1217
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/iframe
1218
- *
1219
- */
1220
- export const iframe = elements.iframe
1221
-
1222
- /**
1223
- * <object>
1224
- * Represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.
1225
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/object
1226
- *
1227
- */
1228
- export const object = elements.object
1229
-
1230
- /**
1231
- * <picture>
1232
- * Contains zero or more <source> elements and one <img> element to offer alternative versions of an image for different display/device scenarios.
1233
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture
1234
- *
1235
- */
1236
- export const picture = elements.picture
1237
-
1238
- /**
1239
- * <source>
1240
- * Specifies multiple media resources for the picture, the audio element, or the video element. It is a void element, meaning that it has no content and does not have a closing tag. It is commonly used to offer the same media content in multiple file formats in order to provide compatibility with a broad range of browsers given their differing support for image file formats and media file formats.
1241
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/source
1242
- *
1243
- */
1244
- export const source = elements.source
1245
-
1246
- /**
1247
- * <canvas>
1248
- * Container element to use with either the canvas scripting API or the WebGL API to draw graphics and animations.
1249
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/canvas
1250
- *
1251
- */
1252
- export const canvas = elements.canvas
1253
-
1254
- /**
1255
- * <noscript>
1256
- * Defines a section of HTML to be inserted if a script type on the page is unsupported or if scripting is currently turned off in the browser.
1257
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/noscript
1258
- *
1259
- */
1260
- export const noscript = elements.noscript
1261
-
1262
- /**
1263
- * <script>
1264
- * Used to embed executable code or data; this is typically used to embed or refer to JavaScript code. The <script> element can also be used with other languages, such as WebGL's GLSL shader programming language and JSON.
1265
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script
1266
- *
1267
- */
1268
- export const script = elements.script
1269
-
1270
- /**
1271
- * <del>
1272
- * Represents a range of text that has been deleted from a document. This can be used when rendering "track changes" or source code diff information, for example. The <ins> element can be used for the opposite purpose: to indicate text that has been added to the document.
1273
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/del
1274
- *
1275
- */
1276
- export const del = elements.del
1277
-
1278
- /**
1279
- * <ins>
1280
- * Represents a range of text that has been added to a document. You can use the <del> element to similarly represent a range of text that has been deleted from the document.
1281
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ins
1282
- *
1283
- */
1284
- export const ins = elements.ins
1285
-
1286
- /**
1287
- * <caption>
1288
- * Specifies the caption (or title) of a table.
1289
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/caption
1290
- *
1291
- */
1292
- export const caption = elements.caption
1293
-
1294
- /**
1295
- * <col>
1296
- * Defines one or more columns in a column group represented by its implicit or explicit parent <colgroup> element. The <col> element is only valid as a child of a <colgroup> element that has no span attribute defined.
1297
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/col
1298
- *
1299
- */
1300
- export const col = elements.col
1301
-
1302
- /**
1303
- * <colgroup>
1304
- * Defines a group of columns within a table.
1305
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/colgroup
1306
- *
1307
- */
1308
- export const colgroup = elements.colgroup
1309
-
1310
- /**
1311
- * <table>
1312
- * Represents tabular data—that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.
1313
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/table
1314
- *
1315
- */
1316
- export const table = elements.table
1317
-
1318
- /**
1319
- * <tbody>
1320
- * Encapsulates a set of table rows (<tr> elements), indicating that they comprise the body of a table's (main) data.
1321
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tbody
1322
- *
1323
- */
1324
- export const tbody = elements.tbody
1325
-
1326
- /**
1327
- * <td>
1328
- * A child of the <tr> element, it defines a cell of a table that contains data.
1329
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/td
1330
- *
1331
- */
1332
- export const td = elements.td
1333
-
1334
- /**
1335
- * <tfoot>
1336
- * Encapsulates a set of table rows (<tr> elements), indicating that they comprise the foot of a table with information about the table's columns. This is usually a summary of the columns, e.g., a sum of the given numbers in a column.
1337
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tfoot
1338
- *
1339
- */
1340
- export const tfoot = elements.tfoot
1341
-
1342
- /**
1343
- * <th>
1344
- * A child of the <tr> element, it defines a cell as the header of a group of table cells. The nature of this group can be explicitly defined by the scope and headers attributes.
1345
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/th
1346
- *
1347
- */
1348
- export const th = elements.th
1349
-
1350
- /**
1351
- * <thead>
1352
- * Encapsulates a set of table rows (<tr> elements), indicating that they comprise the head of a table with information about the table's columns. This is usually in the form of column headers (<th> elements).
1353
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/thead
1354
- *
1355
- */
1356
- export const thead = elements.thead
1357
-
1358
- /**
1359
- * <tr>
1360
- * Defines a row of cells in a table. The row's cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements.
1361
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/tr
1362
- *
1363
- */
1364
- export const tr = elements.tr
1365
-
1366
- /**
1367
- * <button>
1368
- * An interactive element activated by a user with a mouse, keyboard, finger, voice command, or other assistive technology. Once activated, it performs an action, such as submitting a form or opening a dialog.
1369
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button
1370
- *
1371
- */
1372
- export const button = elements.button
1373
-
1374
- /**
1375
- * <datalist>
1376
- * Contains a set of <option> elements that represent the permissible or recommended options available to choose from within other controls.
1377
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/datalist
1378
- *
1379
- */
1380
- export const datalist = elements.datalist
1381
-
1382
- /**
1383
- * <fieldset>
1384
- * Used to group several controls as well as labels (<label>) within a web form.
1385
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/fieldset
1386
- *
1387
- */
1388
- export const fieldset = elements.fieldset
1389
-
1390
- /**
1391
- * <form>
1392
- * Represents a document section containing interactive controls for submitting information.
1393
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/form
1394
- *
1395
- */
1396
- export const form = elements.form
1397
-
1398
- /**
1399
- * <input>
1400
- * Used to create interactive controls for web-based forms to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent. The <input> element is one of the most powerful and complex in all of HTML due to the sheer number of combinations of input types and attributes.
1401
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input
1402
- *
1403
- */
1404
- export const input = elements.input
1405
-
1406
- /**
1407
- * <label>
1408
- * Represents a caption for an item in a user interface.
1409
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/label
1410
- *
1411
- */
1412
- export const label = elements.label
1413
-
1414
- /**
1415
- * <legend>
1416
- * Represents a caption for the content of its parent <fieldset>.
1417
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/legend
1418
- *
1419
- */
1420
- export const legend = elements.legend
1421
-
1422
- /**
1423
- * <meter>
1424
- * Represents either a scalar value within a known range or a fractional value.
1425
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meter
1426
- *
1427
- */
1428
- export const meter = elements.meter
1429
-
1430
- /**
1431
- * <optgroup>
1432
- * Creates a grouping of options within a <select> element.
1433
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/optgroup
1434
- *
1435
- */
1436
- export const optgroup = elements.optgroup
1437
-
1438
- /**
1439
- * <option>
1440
- * Used to define an item contained in a select, an <optgroup>, or a <datalist> element. As such, <option> can represent menu items in popups and other lists of items in an HTML document.
1441
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/option
1442
- *
1443
- */
1444
- export const option = elements.option
1445
-
1446
- /**
1447
- * <output>
1448
- * Container element into which a site or app can inject the results of a calculation or the outcome of a user action.
1449
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/output
1450
- *
1451
- */
1452
- export const output = elements.output
1453
-
1454
- /**
1455
- * <progress>
1456
- * Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
1457
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/progress
1458
- *
1459
- */
1460
- export const progress = elements.progress
1461
-
1462
- /**
1463
- * <select>
1464
- * Represents a control that provides a menu of options.
1465
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select
1466
- *
1467
- */
1468
- export const select = elements.select
1469
-
1470
- /**
1471
- * <textarea>
1472
- * Represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example, a comment on a review or feedback form.
1473
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/textarea
1474
- *
1475
- */
1476
- export const textarea = elements.textarea
1477
-
1478
- /**
1479
- * <details>
1480
- * Creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state. A summary or label must be provided using the <summary> element.
1481
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/details
1482
- *
1483
- */
1484
- export const details = elements.details
1485
-
1486
- /**
1487
- * <dialog>
1488
- * Represents a dialog box or other interactive component, such as a dismissible alert, inspector, or subwindow.
1489
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dialog
1490
- *
1491
- */
1492
- export const dialog = elements.dialog
1493
-
1494
- /**
1495
- * <summary>
1496
- * Specifies a summary, caption, or legend for a details element's disclosure box. Clicking the <summary> element toggles the state of the parent <details> element open and closed.
1497
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/summary
1498
- *
1499
- */
1500
- export const summary = elements.summary
1501
-
1502
- /**
1503
- * <slot>
1504
- * Part of the Web Components technology suite, this element is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.
1505
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/slot
1506
- *
1507
- */
1508
- export const slot = elements.slot
1509
-
1510
- /**
1511
- * <template>
1512
- * A mechanism for holding HTML that is not to be rendered immediately when a page is loaded but may be instantiated subsequently during runtime using JavaScript.
1513
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/template
1514
- *
1515
- */
1516
- export const template = elements.template
1517
-
1518
- /**
1519
- * <image>
1520
- * An ancient and poorly supported precursor to the <img> element. It should not be used.
1521
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/image
1522
- *
1523
- */
1524
- export const image = elements.image
1525
-
1526
- /**
1527
- * <rb>
1528
- * Used to delimit the base text component of a ruby annotation, i.e., the text that is being annotated. One <rb> element should wrap each separate atomic segment of the base text.
1529
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/rb
1530
- *
1531
- */
1532
- export const rb = elements.rb
1533
-
1534
- /**
1535
- * <rtc>
1536
- * Embraces semantic annotations of characters presented in a ruby of <rb> elements used inside of <ruby> element. <rb> elements can have both pronunciation (<rt>) and semantic (<rtc>) annotations.
1537
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/rtc
1538
- *
1539
- */
1540
- export const rtc = elements.rtc
1541
-
1542
- /**
1543
- * The <animate> SVG element provides a way to animate an attribute of an element over time.
1544
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/animate
1545
- *
1546
- */
1547
- export const animate = elements.animate
1548
-
1549
- /**
1550
- * The <animateMotion> SVG element provides a way to define how an element moves along a motion path.
1551
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/animateMotion
1552
- *
1553
- */
1554
- export const animateMotion = elements.animateMotion
1555
-
1556
- /**
1557
- * The <animateTransform> SVG element animates a transformation attribute on its target element, thereby allowing animations to control translation, scaling, rotation, and/or skewing.
1558
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/animateTransform
1559
- *
1560
- */
1561
- export const animateTransform = elements.animateTransform
1562
-
1563
- /**
1564
- * The <mpath> SVG sub-element for the <animateMotion> element provides the ability to reference an external <path> element as the definition of a motion path.
1565
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/mpath
1566
- *
1567
- */
1568
- export const mpath = elements.mpath
1569
-
1570
- /**
1571
- * The <set> SVG element provides a method of setting the value of an attribute for a specified duration.
1572
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/set
1573
- *
1574
- */
1575
- export const set = elements.set
1576
-
1577
- /**
1578
- * The <circle> SVG element is an SVG basic shape, used to draw circles based on a center point and a radius.
1579
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/circle
1580
- *
1581
- */
1582
- export const circle = elements.circle
1583
-
1584
- /**
1585
- * The <ellipse> SVG element is an SVG basic shape, used to create ellipses based on a center coordinate, and both their x and y radius.
1586
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/ellipse
1587
- *
1588
- */
1589
- export const ellipse = elements.ellipse
1590
-
1591
- /**
1592
- * The <line> SVG element is an SVG basic shape used to create a line connecting two points.
1593
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/line
1594
- *
1595
- */
1596
- export const line = elements.line
1597
-
1598
- /**
1599
- * The <path> SVG element is the generic element to define a shape. All the basic shapes can be created with a path element.
1600
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/path
1601
- *
1602
- */
1603
- export const path = elements.path
1604
-
1605
- /**
1606
- * The <polygon> SVG element defines a closed shape consisting of a set of connected straight line segments. The last point is connected to the first point.
1607
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/polygon
1608
- *
1609
- */
1610
- export const polygon = elements.polygon
1611
-
1612
- /**
1613
- * The <polyline> SVG element is an SVG basic shape that creates straight lines connecting several points. Typically a polyline is used to create open shapes as the last point doesn't have to be connected to the first point. For closed shapes see the <polygon> element.
1614
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/polyline
1615
- *
1616
- */
1617
- export const polyline = elements.polyline
1618
-
1619
- /**
1620
- * The <rect> SVG element is a basic SVG shape that draws rectangles, defined by their position, width, and height. The rectangles may have their corners rounded.
1621
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/rect
1622
- *
1623
- */
1624
- export const rect = elements.rect
1625
-
1626
- /**
1627
- * The <defs> SVG element is used to store graphical objects that will be used at a later time. Objects created inside a <defs> element are not rendered directly. To display them you have to reference them (with a <use> element for example).
1628
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/defs
1629
- *
1630
- */
1631
- export const defs = elements.defs
1632
-
1633
- /**
1634
- * The <g> SVG element is a container used to group other SVG elements.
1635
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/g
1636
- *
1637
- */
1638
- export const g = elements.g
1639
-
1640
- /**
1641
- * The <marker> SVG element defines a graphic used for drawing arrowheads or polymarkers on a given <path>, <line>, <polyline> or <polygon> element.
1642
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/marker
1643
- *
1644
- */
1645
- export const marker = elements.marker
1646
-
1647
- /**
1648
- * The <mask> SVG element defines a mask for compositing the current object into the background. A mask is used/referenced using the mask property and CSS mask-image property.
1649
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/mask
1650
- *
1651
- */
1652
- export const mask = elements.mask
1653
-
1654
- /**
1655
- * The <pattern> SVG element defines a graphics object which can be redrawn at repeated x- and y-coordinate intervals ("tiled") to cover an area.
1656
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/pattern
1657
- *
1658
- */
1659
- export const pattern = elements.pattern
1660
-
1661
- /**
1662
- * The <svg> SVG element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents, but it can also be used to embed an SVG fragment inside an SVG or HTML document.
1663
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/svg
1664
- *
1665
- */
1666
- export const svg = elements.svg
1667
-
1668
- /**
1669
- * The <switch> SVG element evaluates any requiredFeatures, requiredExtensions and systemLanguage attributes on its direct child elements in order, and then renders the first child where these attributes evaluate to true.
1670
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/switch
1671
- *
1672
- */
1673
- export const svgswitch = elements.switch
1674
-
1675
- /**
1676
- * The <symbol> SVG element is used to define graphical template objects which can be instantiated by a <use> element.
1677
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/symbol
1678
- *
1679
- */
1680
- export const symbol = elements.symbol
1681
-
1682
- /**
1683
- * The <use> element takes nodes from within an SVG document, and duplicates them somewhere else. The effect is the same as if the nodes were deeply cloned into a non-exposed DOM, then pasted where the <use> element is, much like cloned <template> elements.
1684
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/use
1685
- *
1686
- */
1687
- export const use = elements.use
1688
-
1689
- /**
1690
- * The <desc> SVG element provides an accessible, long-text description of any SVG container element or graphics element.
1691
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/desc
1692
- *
1693
- */
1694
- export const desc = elements.desc
1695
-
1696
- /**
1697
- * The <metadata> SVG element adds metadata to SVG content. Metadata is structured information about data. The contents of <metadata> should be elements from other XML namespaces such as RDF, FOAF, etc.
1698
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/metadata
1699
- *
1700
- */
1701
- export const metadata = elements.metadata
1702
-
1703
- /**
1704
- * The <filter> SVG element defines a custom filter effect by grouping atomic filter primitives. It is never rendered itself, but must be used by the filter attribute on SVG elements, or the filter CSS property for SVG/HTML elements.
1705
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/filter
1706
- *
1707
- */
1708
- export const filter = elements.filter
1709
-
1710
- /**
1711
- * The <feBlend> SVG filter primitive composes two objects together ruled by a certain blending mode. This is similar to what is known from image editing software when blending two layers. The mode is defined by the mode attribute.
1712
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feBlend
1713
- *
1714
- */
1715
- export const feBlend = elements.feBlend
1716
-
1717
- /**
1718
- * The <feColorMatrix> SVG filter element changes colors based on a transformation matrix. Every pixel's color value [R,G,B,A] is matrix multiplied by a 5 by 5 color matrix to create new color [R',G',B',A'].
1719
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feColorMatrix
1720
- *
1721
- */
1722
- export const feColorMatrix = elements.feColorMatrix
1723
-
1724
- /**
1725
- * The <feComponentTransfer> SVG filter primitive performs color-component-wise remapping of data for each pixel. It allows operations like brightness adjustment, contrast adjustment, color balance or thresholding.
1726
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feComponentTransfer
1727
- *
1728
- */
1729
- export const feComponentTransfer = elements.feComponentTransfer
1730
-
1731
- /**
1732
- * The <feComposite> SVG filter primitive performs the combination of two input images pixel-wise in image space using one of the Porter-Duff compositing operations: over, in, atop, out, xor, lighter, or arithmetic.
1733
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feComposite
1734
- *
1735
- */
1736
- export const feComposite = elements.feComposite
1737
-
1738
- /**
1739
- * The <feConvolveMatrix> SVG filter primitive applies a matrix convolution filter effect. A convolution combines pixels in the input image with neighboring pixels to produce a resulting image. A wide variety of imaging operations can be achieved through convolutions, including blurring, edge detection, sharpening, embossing and beveling.
1740
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feConvolveMatrix
1741
- *
1742
- */
1743
- export const feConvolveMatrix = elements.feConvolveMatrix
1744
-
1745
- /**
1746
- * The <feDiffuseLighting> SVG filter primitive lights an image using the alpha channel as a bump map. The resulting image, which is an RGBA opaque image, depends on the light color, light position and surface geometry of the input bump map.
1747
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feDiffuseLighting
1748
- *
1749
- */
1750
- export const feDiffuseLighting = elements.feDiffuseLighting
1751
-
1752
- /**
1753
- * The <feDisplacementMap> SVG filter primitive uses the pixel values from the image from in2 to spatially displace the image from in.
1754
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feDisplacementMap
1755
- *
1756
- */
1757
- export const feDisplacementMap = elements.feDisplacementMap
1758
-
1759
- /**
1760
- * The <feDistantLight> SVG filter primitive defines a distant light source that can be used within a lighting filter primitive: <feDiffuseLighting> or <feSpecularLighting>.
1761
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feDistantLight
1762
- *
1763
- */
1764
- export const feDistantLight = elements.feDistantLight
1765
-
1766
- /**
1767
- * The <feDropShadow> SVG filter primitive creates a drop shadow of the input image. It can only be used inside a <filter> element.
1768
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feDropShadow
1769
- *
1770
- */
1771
- export const feDropShadow = elements.feDropShadow
1772
-
1773
- /**
1774
- * The <feFlood> SVG filter primitive fills the filter subregion with the color and opacity defined by flood-color and flood-opacity.
1775
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feFlood
1776
- *
1777
- */
1778
- export const feFlood = elements.feFlood
1779
-
1780
- /**
1781
- * The <feFuncA> SVG filter primitive defines the transfer function for the alpha component of the input graphic of its parent <feComponentTransfer> element.
1782
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feFuncA
1783
- *
1784
- */
1785
- export const feFuncA = elements.feFuncA
1786
-
1787
- /**
1788
- * The <feFuncB> SVG filter primitive defines the transfer function for the blue component of the input graphic of its parent <feComponentTransfer> element.
1789
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feFuncB
1790
- *
1791
- */
1792
- export const feFuncB = elements.feFuncB
1793
-
1794
- /**
1795
- * The <feFuncG> SVG filter primitive defines the transfer function for the green component of the input graphic of its parent <feComponentTransfer> element.
1796
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feFuncG
1797
- *
1798
- */
1799
- export const feFuncG = elements.feFuncG
1800
-
1801
- /**
1802
- * The <feFuncR> SVG filter primitive defines the transfer function for the red component of the input graphic of its parent <feComponentTransfer> element.
1803
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feFuncR
1804
- *
1805
- */
1806
- export const feFuncR = elements.feFuncR
1807
-
1808
- /**
1809
- * The <feGaussianBlur> SVG filter primitive blurs the input image by the amount specified in stdDeviation, which defines the bell-curve.
1810
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feGaussianBlur
1811
- *
1812
- */
1813
- export const feGaussianBlur = elements.feGaussianBlur
1814
-
1815
- /**
1816
- * The <feImage> SVG filter primitive fetches image data from an external source and provides the pixel data as output (meaning if the external source is an SVG image, it is rasterized.)
1817
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feImage
1818
- *
1819
- */
1820
- export const feImage = elements.feImage
1821
-
1822
- /**
1823
- * The <feMerge> SVG element allows filter effects to be applied concurrently instead of sequentially. This is achieved by other filters storing their output via the result attribute and then accessing it in a <feMergeNode> child.
1824
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feMerge
1825
- *
1826
- */
1827
- export const feMerge = elements.feMerge
1828
-
1829
- /**
1830
- * The <feMergeNode> SVG takes the result of another filter to be processed by its parent <feMerge>.
1831
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feMergeNode
1832
- *
1833
- */
1834
- export const feMergeNode = elements.feMergeNode
1835
-
1836
- /**
1837
- * The <feMorphology> SVG filter primitive is used to erode or dilate the input image. Its usefulness lies especially in fattening or thinning effects.
1838
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feMorphology
1839
- *
1840
- */
1841
- export const feMorphology = elements.feMorphology
1842
-
1843
- /**
1844
- * The <feOffset> SVG filter primitive enables offsetting an input image relative to its current position. The input image as a whole is offset by the values specified in the dx and dy attributes.
1845
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feOffset
1846
- *
1847
- */
1848
- export const feOffset = elements.feOffset
1849
-
1850
- /**
1851
- * The <fePointLight> SVG filter primitive defines a light source which allows to create a point light effect. It that can be used within a lighting filter primitive: <feDiffuseLighting> or <feSpecularLighting>.
1852
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/fePointLight
1853
- *
1854
- */
1855
- export const fePointLight = elements.fePointLight
1856
-
1857
- /**
1858
- * The <feSpecularLighting> SVG filter primitive lights a source graphic using the alpha channel as a bump map. The resulting image is an RGBA image based on the light color. The lighting calculation follows the standard specular component of the Phong lighting model. The resulting image depends on the light color, light position and surface geometry of the input bump map. The result of the lighting calculation is added. The filter primitive assumes that the viewer is at infinity in the z direction.
1859
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feSpecularLighting
1860
- *
1861
- */
1862
- export const feSpecularLighting = elements.feSpecularLighting
1863
-
1864
- /**
1865
- * The <feSpotLight> SVG filter primitive defines a light source that can be used to create a spotlight effect. It is used within a lighting filter primitive: <feDiffuseLighting> or <feSpecularLighting>.
1866
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feSpotLight
1867
- *
1868
- */
1869
- export const feSpotLight = elements.feSpotLight
1870
-
1871
- /**
1872
- * The <feTile> SVG filter primitive allows to fill a target rectangle with a repeated, tiled pattern of an input image. The effect is similar to the one of a <pattern>.
1873
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feTile
1874
- *
1875
- */
1876
- export const feTile = elements.feTile
1877
-
1878
- /**
1879
- * The <feTurbulence> SVG filter primitive creates an image using the Perlin turbulence function. It allows the synthesis of artificial textures like clouds or marble. The resulting image will fill the entire filter primitive subregion.
1880
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feTurbulence
1881
- *
1882
- */
1883
- export const feTurbulence = elements.feTurbulence
1884
-
1885
- /**
1886
- * The <linearGradient> SVG element lets authors define linear gradients to apply to other SVG elements.
1887
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/linearGradient
1888
- *
1889
- */
1890
- export const linearGradient = elements.linearGradient
1891
-
1892
- /**
1893
- * The <radialGradient> SVG element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
1894
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/radialGradient
1895
- *
1896
- */
1897
- export const radialGradient = elements.radialGradient
1898
-
1899
- /**
1900
- * The <stop> SVG element defines a color and its position to use on a gradient. This element is always a child of a <linearGradient> or <radialGradient> element.
1901
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/stop
1902
- *
1903
- */
1904
- export const stop = elements.stop
1905
-
1906
- /**
1907
- * The <foreignObject> SVG element includes elements from a different XML namespace. In the context of a browser, it is most likely (X)HTML.
1908
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/foreignObject
1909
- *
1910
- */
1911
- export const foreignObject = elements.foreignObject
1912
-
1913
- /**
1914
- * The <text> SVG element draws a graphics element consisting of text. It's possible to apply a gradient, pattern, clipping path, mask, or filter to <text>, like any other SVG graphics element.
1915
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/text
1916
- *
1917
- */
1918
- export const text = elements.text
1919
-
1920
- /**
1921
- * The <textPath> SVG element is used to render text along the shape of a <path> element. The text must be enclosed in the <textPath> element and its href attribute is used to reference the desired <path>.
1922
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/textPath
1923
- *
1924
- */
1925
- export const textPath = elements.textPath
1926
-
1927
- /**
1928
- * The <tspan> SVG element defines a subtext within a <text> element or another <tspan> element. It allows for adjustment of the style and/or position of that subtext as needed.
1929
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/tspan
1930
- *
1931
- */
1932
- export const tspan = elements.tspan
1933
-
1934
- /**
1935
- * The <view> SVG element defines a particular view of an SVG document. A specific view can be displayed by referencing the <view> element's id as the target fragment of a URL.
1936
- * https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/view
1937
- *
1938
- */
1939
- export const view = elements.view
1940
-
1941
- // TODO: MathML
1942
- // https://developer.mozilla.org/en-US/docs/Web/MathML/Reference/Element
1
+ export * from './src/helpers.js'
2
+ export * from './src/html.js'
3
+ export * from './src/svg.js'
4
+ export * from './src/router.js'