elit 1.1.0 → 2.0.0

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 (50) hide show
  1. package/README.md +267 -101
  2. package/dist/build.d.mts +11 -0
  3. package/dist/build.d.ts +11 -0
  4. package/dist/build.js +1 -0
  5. package/dist/build.mjs +1 -0
  6. package/dist/cli.js +2307 -0
  7. package/dist/client.d.mts +9 -0
  8. package/dist/client.d.ts +9 -0
  9. package/dist/client.js +1 -0
  10. package/dist/client.mjs +1 -0
  11. package/dist/dom.d.mts +80 -0
  12. package/dist/dom.d.ts +80 -0
  13. package/dist/dom.js +1 -0
  14. package/dist/dom.mjs +1 -0
  15. package/dist/el.d.mts +227 -0
  16. package/dist/el.d.ts +227 -0
  17. package/dist/el.js +1 -0
  18. package/dist/el.mjs +1 -0
  19. package/dist/hmr.d.mts +38 -0
  20. package/dist/hmr.d.ts +38 -0
  21. package/dist/hmr.js +1 -0
  22. package/dist/hmr.mjs +1 -0
  23. package/dist/index.d.mts +38 -619
  24. package/dist/index.d.ts +38 -619
  25. package/dist/index.js +1 -35
  26. package/dist/index.mjs +1 -35
  27. package/dist/router.d.mts +45 -0
  28. package/dist/router.d.ts +45 -0
  29. package/dist/router.js +1 -0
  30. package/dist/router.mjs +1 -0
  31. package/dist/server.d.mts +3 -0
  32. package/dist/server.d.ts +3 -0
  33. package/dist/server.js +1 -0
  34. package/dist/server.mjs +1 -0
  35. package/dist/state.d.mts +109 -0
  36. package/dist/state.d.ts +109 -0
  37. package/dist/state.js +1 -0
  38. package/dist/state.mjs +1 -0
  39. package/dist/style.d.mts +113 -0
  40. package/dist/style.d.ts +113 -0
  41. package/dist/style.js +1 -0
  42. package/dist/style.mjs +1 -0
  43. package/dist/types-DOAdFFJB.d.mts +330 -0
  44. package/dist/types-DOAdFFJB.d.ts +330 -0
  45. package/dist/types.d.mts +3 -0
  46. package/dist/types.d.ts +3 -0
  47. package/dist/types.js +1 -0
  48. package/dist/types.mjs +0 -0
  49. package/package.json +65 -2
  50. package/dist/index.global.js +0 -35
package/dist/el.d.mts ADDED
@@ -0,0 +1,227 @@
1
+ import { E as ElementFactory } from './types-DOAdFFJB.mjs';
2
+ import 'http';
3
+ import 'ws';
4
+
5
+ /**
6
+ * Elit - Element Factories
7
+ */
8
+
9
+ declare const createElementFactory: (tag: string) => ElementFactory;
10
+ declare const tags: readonly ["html", "head", "body", "title", "base", "link", "meta", "style", "address", "article", "aside", "footer", "header", "h1", "h2", "h3", "h4", "h5", "h6", "main", "nav", "section", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "param", "picture", "portal", "source", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "menu", "summary", "slot", "template"];
11
+ declare const svgTags: readonly ["svg", "circle", "rect", "path", "line", "polyline", "polygon", "ellipse", "g", "text", "tspan", "defs", "linearGradient", "radialGradient", "stop", "pattern", "mask", "clipPath", "use", "symbol", "marker", "image", "foreignObject", "animate", "animateTransform", "animateMotion", "set", "filter", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feFlood", "feGaussianBlur", "feMorphology", "feOffset", "feSpecularLighting", "feTile", "feTurbulence"];
12
+ declare const mathTags: readonly ["math", "mi", "mn", "mo", "ms", "mtext", "mrow", "mfrac", "msqrt", "mroot", "msub", "msup"];
13
+ type Elements = {
14
+ [K in typeof tags[number]]: ElementFactory;
15
+ } & {
16
+ [K in typeof svgTags[number] as `svg${Capitalize<K>}`]: ElementFactory;
17
+ } & {
18
+ [K in typeof mathTags[number] as `math${Capitalize<K>}`]: ElementFactory;
19
+ } & {
20
+ varElement: ElementFactory;
21
+ };
22
+ declare const elements: Partial<Elements>;
23
+ declare const html: ElementFactory;
24
+ declare const head: ElementFactory;
25
+ declare const body: ElementFactory;
26
+ declare const title: ElementFactory;
27
+ declare const base: ElementFactory;
28
+ declare const link: ElementFactory;
29
+ declare const meta: ElementFactory;
30
+ declare const style: ElementFactory;
31
+ declare const address: ElementFactory;
32
+ declare const article: ElementFactory;
33
+ declare const aside: ElementFactory;
34
+ declare const footer: ElementFactory;
35
+ declare const header: ElementFactory;
36
+ declare const h1: ElementFactory;
37
+ declare const h2: ElementFactory;
38
+ declare const h3: ElementFactory;
39
+ declare const h4: ElementFactory;
40
+ declare const h5: ElementFactory;
41
+ declare const h6: ElementFactory;
42
+ declare const main: ElementFactory;
43
+ declare const nav: ElementFactory;
44
+ declare const section: ElementFactory;
45
+ declare const blockquote: ElementFactory;
46
+ declare const dd: ElementFactory;
47
+ declare const div: ElementFactory;
48
+ declare const dl: ElementFactory;
49
+ declare const dt: ElementFactory;
50
+ declare const figcaption: ElementFactory;
51
+ declare const figure: ElementFactory;
52
+ declare const hr: ElementFactory;
53
+ declare const li: ElementFactory;
54
+ declare const ol: ElementFactory;
55
+ declare const p: ElementFactory;
56
+ declare const pre: ElementFactory;
57
+ declare const ul: ElementFactory;
58
+ declare const a: ElementFactory;
59
+ declare const abbr: ElementFactory;
60
+ declare const b: ElementFactory;
61
+ declare const bdi: ElementFactory;
62
+ declare const bdo: ElementFactory;
63
+ declare const br: ElementFactory;
64
+ declare const cite: ElementFactory;
65
+ declare const code: ElementFactory;
66
+ declare const data: ElementFactory;
67
+ declare const dfn: ElementFactory;
68
+ declare const em: ElementFactory;
69
+ declare const i: ElementFactory;
70
+ declare const kbd: ElementFactory;
71
+ declare const mark: ElementFactory;
72
+ declare const q: ElementFactory;
73
+ declare const rp: ElementFactory;
74
+ declare const rt: ElementFactory;
75
+ declare const ruby: ElementFactory;
76
+ declare const s: ElementFactory;
77
+ declare const samp: ElementFactory;
78
+ declare const small: ElementFactory;
79
+ declare const span: ElementFactory;
80
+ declare const strong: ElementFactory;
81
+ declare const sub: ElementFactory;
82
+ declare const sup: ElementFactory;
83
+ declare const time: ElementFactory;
84
+ declare const u: ElementFactory;
85
+ declare const wbr: ElementFactory;
86
+ declare const area: ElementFactory;
87
+ declare const audio: ElementFactory;
88
+ declare const img: ElementFactory;
89
+ declare const map: ElementFactory;
90
+ declare const track: ElementFactory;
91
+ declare const video: ElementFactory;
92
+ declare const embed: ElementFactory;
93
+ declare const iframe: ElementFactory;
94
+ declare const object: ElementFactory;
95
+ declare const param: ElementFactory;
96
+ declare const picture: ElementFactory;
97
+ declare const portal: ElementFactory;
98
+ declare const source: ElementFactory;
99
+ declare const canvas: ElementFactory;
100
+ declare const noscript: ElementFactory;
101
+ declare const script: ElementFactory;
102
+ declare const del: ElementFactory;
103
+ declare const ins: ElementFactory;
104
+ declare const caption: ElementFactory;
105
+ declare const col: ElementFactory;
106
+ declare const colgroup: ElementFactory;
107
+ declare const table: ElementFactory;
108
+ declare const tbody: ElementFactory;
109
+ declare const td: ElementFactory;
110
+ declare const tfoot: ElementFactory;
111
+ declare const th: ElementFactory;
112
+ declare const thead: ElementFactory;
113
+ declare const tr: ElementFactory;
114
+ declare const button: ElementFactory;
115
+ declare const datalist: ElementFactory;
116
+ declare const fieldset: ElementFactory;
117
+ declare const form: ElementFactory;
118
+ declare const input: ElementFactory;
119
+ declare const label: ElementFactory;
120
+ declare const legend: ElementFactory;
121
+ declare const meter: ElementFactory;
122
+ declare const optgroup: ElementFactory;
123
+ declare const option: ElementFactory;
124
+ declare const output: ElementFactory;
125
+ declare const progress: ElementFactory;
126
+ declare const select: ElementFactory;
127
+ declare const textarea: ElementFactory;
128
+ declare const details: ElementFactory;
129
+ declare const dialog: ElementFactory;
130
+ declare const menu: ElementFactory;
131
+ declare const summary: ElementFactory;
132
+ declare const slot: ElementFactory;
133
+ declare const template: ElementFactory;
134
+ declare const svgSvg: ElementFactory;
135
+ declare const svgCircle: ElementFactory;
136
+ declare const svgRect: ElementFactory;
137
+ declare const svgPath: ElementFactory;
138
+ declare const svgLine: ElementFactory;
139
+ declare const svgPolyline: ElementFactory;
140
+ declare const svgPolygon: ElementFactory;
141
+ declare const svgEllipse: ElementFactory;
142
+ declare const svgG: ElementFactory;
143
+ declare const svgText: ElementFactory;
144
+ declare const svgTspan: ElementFactory;
145
+ declare const svgDefs: ElementFactory;
146
+ declare const svgLinearGradient: ElementFactory;
147
+ declare const svgRadialGradient: ElementFactory;
148
+ declare const svgStop: ElementFactory;
149
+ declare const svgPattern: ElementFactory;
150
+ declare const svgMask: ElementFactory;
151
+ declare const svgClipPath: ElementFactory;
152
+ declare const svgUse: ElementFactory;
153
+ declare const svgSymbol: ElementFactory;
154
+ declare const svgMarker: ElementFactory;
155
+ declare const svgImage: ElementFactory;
156
+ declare const svgForeignObject: ElementFactory;
157
+ declare const svgAnimate: ElementFactory;
158
+ declare const svgAnimateTransform: ElementFactory;
159
+ declare const svgAnimateMotion: ElementFactory;
160
+ declare const svgSet: ElementFactory;
161
+ declare const svgFilter: ElementFactory;
162
+ declare const svgFeBlend: ElementFactory;
163
+ declare const svgFeColorMatrix: ElementFactory;
164
+ declare const svgFeComponentTransfer: ElementFactory;
165
+ declare const svgFeComposite: ElementFactory;
166
+ declare const svgFeConvolveMatrix: ElementFactory;
167
+ declare const svgFeDiffuseLighting: ElementFactory;
168
+ declare const svgFeDisplacementMap: ElementFactory;
169
+ declare const svgFeFlood: ElementFactory;
170
+ declare const svgFeGaussianBlur: ElementFactory;
171
+ declare const svgFeMorphology: ElementFactory;
172
+ declare const svgFeOffset: ElementFactory;
173
+ declare const svgFeSpecularLighting: ElementFactory;
174
+ declare const svgFeTile: ElementFactory;
175
+ declare const svgFeTurbulence: ElementFactory;
176
+ declare const mathMath: ElementFactory;
177
+ declare const mathMi: ElementFactory;
178
+ declare const mathMn: ElementFactory;
179
+ declare const mathMo: ElementFactory;
180
+ declare const mathMs: ElementFactory;
181
+ declare const mathMtext: ElementFactory;
182
+ declare const mathMrow: ElementFactory;
183
+ declare const mathMfrac: ElementFactory;
184
+ declare const mathMsqrt: ElementFactory;
185
+ declare const mathMroot: ElementFactory;
186
+ declare const mathMsub: ElementFactory;
187
+ declare const mathMsup: ElementFactory;
188
+ declare const varElement: ElementFactory;
189
+ declare const el: Partial<Elements>;
190
+
191
+ declare const doc: Document;
192
+ declare const getEl: {
193
+ <K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
194
+ <K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
195
+ <K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
196
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
197
+ <E extends Element = Element>(selectors: string): E | null;
198
+ };
199
+ declare const getEls: {
200
+ <K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
201
+ <K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
202
+ <K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
203
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
204
+ <E extends Element = Element>(selectors: string): NodeListOf<E>;
205
+ };
206
+ declare const createEl: {
207
+ <K extends keyof HTMLElementTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K];
208
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K];
209
+ (tagName: string, options?: ElementCreationOptions): HTMLElement;
210
+ };
211
+ declare const createSvgEl: (qualifiedName: string, options?: string | ElementCreationOptions | undefined) => Element;
212
+ declare const createMathEl: (qualifiedName: string, options?: string | ElementCreationOptions | undefined) => Element;
213
+ declare const fragment: () => DocumentFragment;
214
+ declare const textNode: (data: string) => Text;
215
+ declare const commentNode: (data: string) => Comment;
216
+ declare const getElId: (elementId: string) => HTMLElement | null;
217
+ declare const getElClass: (classNames: string) => HTMLCollectionOf<Element>;
218
+ declare const getElTag: {
219
+ <K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
220
+ <K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
221
+ <K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
222
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
223
+ (qualifiedName: string): HTMLCollectionOf<Element>;
224
+ };
225
+ declare const getElName: (elementName: string) => NodeListOf<HTMLElement>;
226
+
227
+ export { a, abbr, address, area, article, aside, audio, b, base, bdi, bdo, blockquote, body, br, button, canvas, caption, cite, code, col, colgroup, commentNode, createEl, createElementFactory, createMathEl, createSvgEl, data, datalist, dd, del, details, dfn, dialog, div, dl, doc, dt, el, elements, em, embed, fieldset, figcaption, figure, footer, form, fragment, getEl, getElClass, getElId, getElName, getElTag, getEls, h1, h2, h3, h4, h5, h6, head, header, hr, html, i, iframe, img, input, ins, kbd, label, legend, li, link, main, map, mark, mathMath, mathMfrac, mathMi, mathMn, mathMo, mathMroot, mathMrow, mathMs, mathMsqrt, mathMsub, mathMsup, mathMtext, menu, meta, meter, nav, noscript, object, ol, optgroup, option, output, p, param, picture, portal, pre, progress, q, rp, rt, ruby, s, samp, script, section, select, slot, small, source, span, strong, style, sub, summary, sup, svgAnimate, svgAnimateMotion, svgAnimateTransform, svgCircle, svgClipPath, svgDefs, svgEllipse, svgFeBlend, svgFeColorMatrix, svgFeComponentTransfer, svgFeComposite, svgFeConvolveMatrix, svgFeDiffuseLighting, svgFeDisplacementMap, svgFeFlood, svgFeGaussianBlur, svgFeMorphology, svgFeOffset, svgFeSpecularLighting, svgFeTile, svgFeTurbulence, svgFilter, svgForeignObject, svgG, svgImage, svgLine, svgLinearGradient, svgMarker, svgMask, svgPath, svgPattern, svgPolygon, svgPolyline, svgRadialGradient, svgRect, svgSet, svgStop, svgSvg, svgSymbol, svgText, svgTspan, svgUse, table, tbody, td, template, textNode, textarea, tfoot, th, thead, time, title, tr, track, u, ul, varElement, video, wbr };
package/dist/el.d.ts ADDED
@@ -0,0 +1,227 @@
1
+ import { E as ElementFactory } from './types-DOAdFFJB.js';
2
+ import 'http';
3
+ import 'ws';
4
+
5
+ /**
6
+ * Elit - Element Factories
7
+ */
8
+
9
+ declare const createElementFactory: (tag: string) => ElementFactory;
10
+ declare const tags: readonly ["html", "head", "body", "title", "base", "link", "meta", "style", "address", "article", "aside", "footer", "header", "h1", "h2", "h3", "h4", "h5", "h6", "main", "nav", "section", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "param", "picture", "portal", "source", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "menu", "summary", "slot", "template"];
11
+ declare const svgTags: readonly ["svg", "circle", "rect", "path", "line", "polyline", "polygon", "ellipse", "g", "text", "tspan", "defs", "linearGradient", "radialGradient", "stop", "pattern", "mask", "clipPath", "use", "symbol", "marker", "image", "foreignObject", "animate", "animateTransform", "animateMotion", "set", "filter", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feFlood", "feGaussianBlur", "feMorphology", "feOffset", "feSpecularLighting", "feTile", "feTurbulence"];
12
+ declare const mathTags: readonly ["math", "mi", "mn", "mo", "ms", "mtext", "mrow", "mfrac", "msqrt", "mroot", "msub", "msup"];
13
+ type Elements = {
14
+ [K in typeof tags[number]]: ElementFactory;
15
+ } & {
16
+ [K in typeof svgTags[number] as `svg${Capitalize<K>}`]: ElementFactory;
17
+ } & {
18
+ [K in typeof mathTags[number] as `math${Capitalize<K>}`]: ElementFactory;
19
+ } & {
20
+ varElement: ElementFactory;
21
+ };
22
+ declare const elements: Partial<Elements>;
23
+ declare const html: ElementFactory;
24
+ declare const head: ElementFactory;
25
+ declare const body: ElementFactory;
26
+ declare const title: ElementFactory;
27
+ declare const base: ElementFactory;
28
+ declare const link: ElementFactory;
29
+ declare const meta: ElementFactory;
30
+ declare const style: ElementFactory;
31
+ declare const address: ElementFactory;
32
+ declare const article: ElementFactory;
33
+ declare const aside: ElementFactory;
34
+ declare const footer: ElementFactory;
35
+ declare const header: ElementFactory;
36
+ declare const h1: ElementFactory;
37
+ declare const h2: ElementFactory;
38
+ declare const h3: ElementFactory;
39
+ declare const h4: ElementFactory;
40
+ declare const h5: ElementFactory;
41
+ declare const h6: ElementFactory;
42
+ declare const main: ElementFactory;
43
+ declare const nav: ElementFactory;
44
+ declare const section: ElementFactory;
45
+ declare const blockquote: ElementFactory;
46
+ declare const dd: ElementFactory;
47
+ declare const div: ElementFactory;
48
+ declare const dl: ElementFactory;
49
+ declare const dt: ElementFactory;
50
+ declare const figcaption: ElementFactory;
51
+ declare const figure: ElementFactory;
52
+ declare const hr: ElementFactory;
53
+ declare const li: ElementFactory;
54
+ declare const ol: ElementFactory;
55
+ declare const p: ElementFactory;
56
+ declare const pre: ElementFactory;
57
+ declare const ul: ElementFactory;
58
+ declare const a: ElementFactory;
59
+ declare const abbr: ElementFactory;
60
+ declare const b: ElementFactory;
61
+ declare const bdi: ElementFactory;
62
+ declare const bdo: ElementFactory;
63
+ declare const br: ElementFactory;
64
+ declare const cite: ElementFactory;
65
+ declare const code: ElementFactory;
66
+ declare const data: ElementFactory;
67
+ declare const dfn: ElementFactory;
68
+ declare const em: ElementFactory;
69
+ declare const i: ElementFactory;
70
+ declare const kbd: ElementFactory;
71
+ declare const mark: ElementFactory;
72
+ declare const q: ElementFactory;
73
+ declare const rp: ElementFactory;
74
+ declare const rt: ElementFactory;
75
+ declare const ruby: ElementFactory;
76
+ declare const s: ElementFactory;
77
+ declare const samp: ElementFactory;
78
+ declare const small: ElementFactory;
79
+ declare const span: ElementFactory;
80
+ declare const strong: ElementFactory;
81
+ declare const sub: ElementFactory;
82
+ declare const sup: ElementFactory;
83
+ declare const time: ElementFactory;
84
+ declare const u: ElementFactory;
85
+ declare const wbr: ElementFactory;
86
+ declare const area: ElementFactory;
87
+ declare const audio: ElementFactory;
88
+ declare const img: ElementFactory;
89
+ declare const map: ElementFactory;
90
+ declare const track: ElementFactory;
91
+ declare const video: ElementFactory;
92
+ declare const embed: ElementFactory;
93
+ declare const iframe: ElementFactory;
94
+ declare const object: ElementFactory;
95
+ declare const param: ElementFactory;
96
+ declare const picture: ElementFactory;
97
+ declare const portal: ElementFactory;
98
+ declare const source: ElementFactory;
99
+ declare const canvas: ElementFactory;
100
+ declare const noscript: ElementFactory;
101
+ declare const script: ElementFactory;
102
+ declare const del: ElementFactory;
103
+ declare const ins: ElementFactory;
104
+ declare const caption: ElementFactory;
105
+ declare const col: ElementFactory;
106
+ declare const colgroup: ElementFactory;
107
+ declare const table: ElementFactory;
108
+ declare const tbody: ElementFactory;
109
+ declare const td: ElementFactory;
110
+ declare const tfoot: ElementFactory;
111
+ declare const th: ElementFactory;
112
+ declare const thead: ElementFactory;
113
+ declare const tr: ElementFactory;
114
+ declare const button: ElementFactory;
115
+ declare const datalist: ElementFactory;
116
+ declare const fieldset: ElementFactory;
117
+ declare const form: ElementFactory;
118
+ declare const input: ElementFactory;
119
+ declare const label: ElementFactory;
120
+ declare const legend: ElementFactory;
121
+ declare const meter: ElementFactory;
122
+ declare const optgroup: ElementFactory;
123
+ declare const option: ElementFactory;
124
+ declare const output: ElementFactory;
125
+ declare const progress: ElementFactory;
126
+ declare const select: ElementFactory;
127
+ declare const textarea: ElementFactory;
128
+ declare const details: ElementFactory;
129
+ declare const dialog: ElementFactory;
130
+ declare const menu: ElementFactory;
131
+ declare const summary: ElementFactory;
132
+ declare const slot: ElementFactory;
133
+ declare const template: ElementFactory;
134
+ declare const svgSvg: ElementFactory;
135
+ declare const svgCircle: ElementFactory;
136
+ declare const svgRect: ElementFactory;
137
+ declare const svgPath: ElementFactory;
138
+ declare const svgLine: ElementFactory;
139
+ declare const svgPolyline: ElementFactory;
140
+ declare const svgPolygon: ElementFactory;
141
+ declare const svgEllipse: ElementFactory;
142
+ declare const svgG: ElementFactory;
143
+ declare const svgText: ElementFactory;
144
+ declare const svgTspan: ElementFactory;
145
+ declare const svgDefs: ElementFactory;
146
+ declare const svgLinearGradient: ElementFactory;
147
+ declare const svgRadialGradient: ElementFactory;
148
+ declare const svgStop: ElementFactory;
149
+ declare const svgPattern: ElementFactory;
150
+ declare const svgMask: ElementFactory;
151
+ declare const svgClipPath: ElementFactory;
152
+ declare const svgUse: ElementFactory;
153
+ declare const svgSymbol: ElementFactory;
154
+ declare const svgMarker: ElementFactory;
155
+ declare const svgImage: ElementFactory;
156
+ declare const svgForeignObject: ElementFactory;
157
+ declare const svgAnimate: ElementFactory;
158
+ declare const svgAnimateTransform: ElementFactory;
159
+ declare const svgAnimateMotion: ElementFactory;
160
+ declare const svgSet: ElementFactory;
161
+ declare const svgFilter: ElementFactory;
162
+ declare const svgFeBlend: ElementFactory;
163
+ declare const svgFeColorMatrix: ElementFactory;
164
+ declare const svgFeComponentTransfer: ElementFactory;
165
+ declare const svgFeComposite: ElementFactory;
166
+ declare const svgFeConvolveMatrix: ElementFactory;
167
+ declare const svgFeDiffuseLighting: ElementFactory;
168
+ declare const svgFeDisplacementMap: ElementFactory;
169
+ declare const svgFeFlood: ElementFactory;
170
+ declare const svgFeGaussianBlur: ElementFactory;
171
+ declare const svgFeMorphology: ElementFactory;
172
+ declare const svgFeOffset: ElementFactory;
173
+ declare const svgFeSpecularLighting: ElementFactory;
174
+ declare const svgFeTile: ElementFactory;
175
+ declare const svgFeTurbulence: ElementFactory;
176
+ declare const mathMath: ElementFactory;
177
+ declare const mathMi: ElementFactory;
178
+ declare const mathMn: ElementFactory;
179
+ declare const mathMo: ElementFactory;
180
+ declare const mathMs: ElementFactory;
181
+ declare const mathMtext: ElementFactory;
182
+ declare const mathMrow: ElementFactory;
183
+ declare const mathMfrac: ElementFactory;
184
+ declare const mathMsqrt: ElementFactory;
185
+ declare const mathMroot: ElementFactory;
186
+ declare const mathMsub: ElementFactory;
187
+ declare const mathMsup: ElementFactory;
188
+ declare const varElement: ElementFactory;
189
+ declare const el: Partial<Elements>;
190
+
191
+ declare const doc: Document;
192
+ declare const getEl: {
193
+ <K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
194
+ <K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
195
+ <K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
196
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
197
+ <E extends Element = Element>(selectors: string): E | null;
198
+ };
199
+ declare const getEls: {
200
+ <K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
201
+ <K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
202
+ <K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
203
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
204
+ <E extends Element = Element>(selectors: string): NodeListOf<E>;
205
+ };
206
+ declare const createEl: {
207
+ <K extends keyof HTMLElementTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K];
208
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K];
209
+ (tagName: string, options?: ElementCreationOptions): HTMLElement;
210
+ };
211
+ declare const createSvgEl: (qualifiedName: string, options?: string | ElementCreationOptions | undefined) => Element;
212
+ declare const createMathEl: (qualifiedName: string, options?: string | ElementCreationOptions | undefined) => Element;
213
+ declare const fragment: () => DocumentFragment;
214
+ declare const textNode: (data: string) => Text;
215
+ declare const commentNode: (data: string) => Comment;
216
+ declare const getElId: (elementId: string) => HTMLElement | null;
217
+ declare const getElClass: (classNames: string) => HTMLCollectionOf<Element>;
218
+ declare const getElTag: {
219
+ <K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
220
+ <K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
221
+ <K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
222
+ <K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
223
+ (qualifiedName: string): HTMLCollectionOf<Element>;
224
+ };
225
+ declare const getElName: (elementName: string) => NodeListOf<HTMLElement>;
226
+
227
+ export { a, abbr, address, area, article, aside, audio, b, base, bdi, bdo, blockquote, body, br, button, canvas, caption, cite, code, col, colgroup, commentNode, createEl, createElementFactory, createMathEl, createSvgEl, data, datalist, dd, del, details, dfn, dialog, div, dl, doc, dt, el, elements, em, embed, fieldset, figcaption, figure, footer, form, fragment, getEl, getElClass, getElId, getElName, getElTag, getEls, h1, h2, h3, h4, h5, h6, head, header, hr, html, i, iframe, img, input, ins, kbd, label, legend, li, link, main, map, mark, mathMath, mathMfrac, mathMi, mathMn, mathMo, mathMroot, mathMrow, mathMs, mathMsqrt, mathMsub, mathMsup, mathMtext, menu, meta, meter, nav, noscript, object, ol, optgroup, option, output, p, param, picture, portal, pre, progress, q, rp, rt, ruby, s, samp, script, section, select, slot, small, source, span, strong, style, sub, summary, sup, svgAnimate, svgAnimateMotion, svgAnimateTransform, svgCircle, svgClipPath, svgDefs, svgEllipse, svgFeBlend, svgFeColorMatrix, svgFeComponentTransfer, svgFeComposite, svgFeConvolveMatrix, svgFeDiffuseLighting, svgFeDisplacementMap, svgFeFlood, svgFeGaussianBlur, svgFeMorphology, svgFeOffset, svgFeSpecularLighting, svgFeTile, svgFeTurbulence, svgFilter, svgForeignObject, svgG, svgImage, svgLine, svgLinearGradient, svgMarker, svgMask, svgPath, svgPattern, svgPolygon, svgPolyline, svgRadialGradient, svgRect, svgSet, svgStop, svgSvg, svgSymbol, svgText, svgTspan, svgUse, table, tbody, td, template, textNode, textarea, tfoot, th, thead, time, title, tr, track, u, ul, varElement, video, wbr };
package/dist/el.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var e=e=>function(t,...s){if(!arguments.length)return{tagName:e,props:{},children:[]};let r=t&&"object"==typeof t&&"value"in t&&"subscribe"in t,o=t&&"object"==typeof t&&"tagName"in t,p="object"!=typeof t||Array.isArray(t)||null===t||r||o,a=p?{}:t,i=p?[t,...s]:s;if(!i.length)return{tagName:e,props:a,children:[]};let x=[];for(let e=0,t=i.length;e<t;e++){let t=i[e];if(null!=t&&!1!==t)if(Array.isArray(t))for(let e=0,s=t.length;e<s;e++){let s=t[e];null!=s&&!1!==s&&x.push(s)}else x.push(t)}return{tagName:e,props:a,children:x}},t={};["html","head","body","title","base","link","meta","style","address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rp","rt","ruby","s","samp","small","span","strong","sub","sup","time","u","wbr","area","audio","img","map","track","video","embed","iframe","object","param","picture","portal","source","canvas","noscript","script","del","ins","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","details","dialog","menu","summary","slot","template"].forEach(s=>{t[s]=e(s)}),["svg","circle","rect","path","line","polyline","polygon","ellipse","g","text","tspan","defs","linearGradient","radialGradient","stop","pattern","mask","clipPath","use","symbol","marker","image","foreignObject","animate","animateTransform","animateMotion","set","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence"].forEach(s=>{let r="svg"+s.charAt(0).toUpperCase()+s.slice(1);t[r]=e(s)}),["math","mi","mn","mo","ms","mtext","mrow","mfrac","msqrt","mroot","msub","msup"].forEach(s=>{let r="math"+s.charAt(0).toUpperCase()+s.slice(1);t[r]=e(s)}),t.varElement=e("var");var{html:s,head:r,body:o,title:p,base:a,link:i,meta:x,style:l,address:n,article:g,aside:m,footer:d,header:v,h1:c,h2:h,h3:u,h4:b,h5:f,h6:M,main:y,nav:F,section:E,blockquote:k,dd:C,div:T,dl:S,dt:w,figcaption:A,figure:N,hr:q,li:G,ol:L,p:P,pre:B,ul:j,a:D,abbr:O,b:I,bdi:R,bdo:U,br:z,cite:H,code:J,data:K,dfn:Q,em:V,i:W,kbd:X,mark:Y,q:Z,rp:$,rt:_,ruby:ee,s:te,samp:se,small:re,span:oe,strong:pe,sub:ae,sup:ie,time:xe,u:le,wbr:ne,area:ge,audio:me,img:de,map:ve,track:ce,video:he,embed:ue,iframe:be,object:fe,param:Me,picture:ye,portal:Fe,source:Ee,canvas:ke,noscript:Ce,script:Te,del:Se,ins:we,caption:Ae,col:Ne,colgroup:qe,table:Ge,tbody:Le,td:Pe,tfoot:Be,th:je,thead:De,tr:Oe,button:Ie,datalist:Re,fieldset:Ue,form:ze,input:He,label:Je,legend:Ke,meter:Qe,optgroup:Ve,option:We,output:Xe,progress:Ye,select:Ze,textarea:$e,details:_e,dialog:et,menu:tt,summary:st,slot:rt,template:ot,svgSvg:pt,svgCircle:at,svgRect:it,svgPath:xt,svgLine:lt,svgPolyline:nt,svgPolygon:gt,svgEllipse:mt,svgG:dt,svgText:vt,svgTspan:ct,svgDefs:ht,svgLinearGradient:ut,svgRadialGradient:bt,svgStop:ft,svgPattern:Mt,svgMask:yt,svgClipPath:Ft,svgUse:Et,svgSymbol:kt,svgMarker:Ct,svgImage:Tt,svgForeignObject:St,svgAnimate:wt,svgAnimateTransform:At,svgAnimateMotion:Nt,svgSet:qt,svgFilter:Gt,svgFeBlend:Lt,svgFeColorMatrix:Pt,svgFeComponentTransfer:Bt,svgFeComposite:jt,svgFeConvolveMatrix:Dt,svgFeDiffuseLighting:Ot,svgFeDisplacementMap:It,svgFeFlood:Rt,svgFeGaussianBlur:Ut,svgFeMorphology:zt,svgFeOffset:Ht,svgFeSpecularLighting:Jt,svgFeTile:Kt,svgFeTurbulence:Qt,mathMath:Vt,mathMi:Wt,mathMn:Xt,mathMo:Yt,mathMs:Zt,mathMtext:$t,mathMrow:_t,mathMfrac:es,mathMsqrt:ts,mathMroot:ss,mathMsub:rs,mathMsup:os,varElement:ps}=t,as=t,is=document,xs=is.querySelector.bind(is),ls=is.querySelectorAll.bind(is),ns=is.createElement.bind(is),gs=is.createElementNS.bind(is,"http://www.w3.org/2000/svg"),ms=is.createElementNS.bind(is,"http://www.w3.org/1998/Math/MathML"),ds=is.createDocumentFragment.bind(is),vs=is.createTextNode.bind(is),cs=is.createComment.bind(is),hs=is.getElementById.bind(is),us=is.getElementsByClassName.bind(is),bs=is.getElementsByTagName.bind(is),fs=is.getElementsByName.bind(is);exports.a=D,exports.abbr=O,exports.address=n,exports.area=ge,exports.article=g,exports.aside=m,exports.audio=me,exports.b=I,exports.base=a,exports.bdi=R,exports.bdo=U,exports.blockquote=k,exports.body=o,exports.br=z,exports.button=Ie,exports.canvas=ke,exports.caption=Ae,exports.cite=H,exports.code=J,exports.col=Ne,exports.colgroup=qe,exports.commentNode=cs,exports.createEl=ns,exports.createElementFactory=e,exports.createMathEl=ms,exports.createSvgEl=gs,exports.data=K,exports.datalist=Re,exports.dd=C,exports.del=Se,exports.details=_e,exports.dfn=Q,exports.dialog=et,exports.div=T,exports.dl=S,exports.doc=is,exports.dt=w,exports.el=as,exports.elements=t,exports.em=V,exports.embed=ue,exports.fieldset=Ue,exports.figcaption=A,exports.figure=N,exports.footer=d,exports.form=ze,exports.fragment=ds,exports.getEl=xs,exports.getElClass=us,exports.getElId=hs,exports.getElName=fs,exports.getElTag=bs,exports.getEls=ls,exports.h1=c,exports.h2=h,exports.h3=u,exports.h4=b,exports.h5=f,exports.h6=M,exports.head=r,exports.header=v,exports.hr=q,exports.html=s,exports.i=W,exports.iframe=be,exports.img=de,exports.input=He,exports.ins=we,exports.kbd=X,exports.label=Je,exports.legend=Ke,exports.li=G,exports.link=i,exports.main=y,exports.map=ve,exports.mark=Y,exports.mathMath=Vt,exports.mathMfrac=es,exports.mathMi=Wt,exports.mathMn=Xt,exports.mathMo=Yt,exports.mathMroot=ss,exports.mathMrow=_t,exports.mathMs=Zt,exports.mathMsqrt=ts,exports.mathMsub=rs,exports.mathMsup=os,exports.mathMtext=$t,exports.menu=tt,exports.meta=x,exports.meter=Qe,exports.nav=F,exports.noscript=Ce,exports.object=fe,exports.ol=L,exports.optgroup=Ve,exports.option=We,exports.output=Xe,exports.p=P,exports.param=Me,exports.picture=ye,exports.portal=Fe,exports.pre=B,exports.progress=Ye,exports.q=Z,exports.rp=$,exports.rt=_,exports.ruby=ee,exports.s=te,exports.samp=se,exports.script=Te,exports.section=E,exports.select=Ze,exports.slot=rt,exports.small=re,exports.source=Ee,exports.span=oe,exports.strong=pe,exports.style=l,exports.sub=ae,exports.summary=st,exports.sup=ie,exports.svgAnimate=wt,exports.svgAnimateMotion=Nt,exports.svgAnimateTransform=At,exports.svgCircle=at,exports.svgClipPath=Ft,exports.svgDefs=ht,exports.svgEllipse=mt,exports.svgFeBlend=Lt,exports.svgFeColorMatrix=Pt,exports.svgFeComponentTransfer=Bt,exports.svgFeComposite=jt,exports.svgFeConvolveMatrix=Dt,exports.svgFeDiffuseLighting=Ot,exports.svgFeDisplacementMap=It,exports.svgFeFlood=Rt,exports.svgFeGaussianBlur=Ut,exports.svgFeMorphology=zt,exports.svgFeOffset=Ht,exports.svgFeSpecularLighting=Jt,exports.svgFeTile=Kt,exports.svgFeTurbulence=Qt,exports.svgFilter=Gt,exports.svgForeignObject=St,exports.svgG=dt,exports.svgImage=Tt,exports.svgLine=lt,exports.svgLinearGradient=ut,exports.svgMarker=Ct,exports.svgMask=yt,exports.svgPath=xt,exports.svgPattern=Mt,exports.svgPolygon=gt,exports.svgPolyline=nt,exports.svgRadialGradient=bt,exports.svgRect=it,exports.svgSet=qt,exports.svgStop=ft,exports.svgSvg=pt,exports.svgSymbol=kt,exports.svgText=vt,exports.svgTspan=ct,exports.svgUse=Et,exports.table=Ge,exports.tbody=Le,exports.td=Pe,exports.template=ot,exports.textNode=vs,exports.textarea=$e,exports.tfoot=Be,exports.th=je,exports.thead=De,exports.time=xe,exports.title=p,exports.tr=Oe,exports.track=ce,exports.u=le,exports.ul=j,exports.varElement=ps,exports.video=he,exports.wbr=ne;
package/dist/el.mjs ADDED
@@ -0,0 +1 @@
1
+ var a=a=>function(s,...e){if(!arguments.length)return{tagName:a,props:{},children:[]};let t=s&&"object"==typeof s&&"value"in s&&"subscribe"in s,r=s&&"object"==typeof s&&"tagName"in s,o="object"!=typeof s||Array.isArray(s)||null===s||t||r,i=o?{}:s,l=o?[s,...e]:e;if(!l.length)return{tagName:a,props:i,children:[]};let n=[];for(let a=0,s=l.length;a<s;a++){let s=l[a];if(null!=s&&!1!==s)if(Array.isArray(s))for(let a=0,e=s.length;a<e;a++){let e=s[a];null!=e&&!1!==e&&n.push(e)}else n.push(s)}return{tagName:a,props:i,children:n}},s={};["html","head","body","title","base","link","meta","style","address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rp","rt","ruby","s","samp","small","span","strong","sub","sup","time","u","wbr","area","audio","img","map","track","video","embed","iframe","object","param","picture","portal","source","canvas","noscript","script","del","ins","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","details","dialog","menu","summary","slot","template"].forEach(e=>{s[e]=a(e)}),["svg","circle","rect","path","line","polyline","polygon","ellipse","g","text","tspan","defs","linearGradient","radialGradient","stop","pattern","mask","clipPath","use","symbol","marker","image","foreignObject","animate","animateTransform","animateMotion","set","filter","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence"].forEach(e=>{let t="svg"+e.charAt(0).toUpperCase()+e.slice(1);s[t]=a(e)}),["math","mi","mn","mo","ms","mtext","mrow","mfrac","msqrt","mroot","msub","msup"].forEach(e=>{let t="math"+e.charAt(0).toUpperCase()+e.slice(1);s[t]=a(e)}),s.varElement=a("var");var{html:e,head:t,body:r,title:o,base:i,link:l,meta:n,style:g,address:m,article:d,aside:p,footer:v,header:c,h1:h,h2:u,h3:b,h4:f,h5:M,h6:y,main:F,nav:E,section:k,blockquote:C,dd:T,div:x,dl:S,dt:w,figcaption:A,figure:N,hr:q,li:G,ol:L,p:P,pre:B,ul:j,a:D,abbr:O,b:I,bdi:R,bdo:U,br:z,cite:H,code:J,data:K,dfn:Q,em:V,i:W,kbd:X,mark:Y,q:Z,rp:$,rt:_,ruby:aa,s:sa,samp:ea,small:ta,span:ra,strong:oa,sub:ia,sup:la,time:na,u:ga,wbr:ma,area:da,audio:pa,img:va,map:ca,track:ha,video:ua,embed:ba,iframe:fa,object:Ma,param:ya,picture:Fa,portal:Ea,source:ka,canvas:Ca,noscript:Ta,script:xa,del:Sa,ins:wa,caption:Aa,col:Na,colgroup:qa,table:Ga,tbody:La,td:Pa,tfoot:Ba,th:ja,thead:Da,tr:Oa,button:Ia,datalist:Ra,fieldset:Ua,form:za,input:Ha,label:Ja,legend:Ka,meter:Qa,optgroup:Va,option:Wa,output:Xa,progress:Ya,select:Za,textarea:$a,details:_a,dialog:as,menu:ss,summary:es,slot:ts,template:rs,svgSvg:os,svgCircle:is,svgRect:ls,svgPath:ns,svgLine:gs,svgPolyline:ms,svgPolygon:ds,svgEllipse:ps,svgG:vs,svgText:cs,svgTspan:hs,svgDefs:us,svgLinearGradient:bs,svgRadialGradient:fs,svgStop:Ms,svgPattern:ys,svgMask:Fs,svgClipPath:Es,svgUse:ks,svgSymbol:Cs,svgMarker:Ts,svgImage:xs,svgForeignObject:Ss,svgAnimate:ws,svgAnimateTransform:As,svgAnimateMotion:Ns,svgSet:qs,svgFilter:Gs,svgFeBlend:Ls,svgFeColorMatrix:Ps,svgFeComponentTransfer:Bs,svgFeComposite:js,svgFeConvolveMatrix:Ds,svgFeDiffuseLighting:Os,svgFeDisplacementMap:Is,svgFeFlood:Rs,svgFeGaussianBlur:Us,svgFeMorphology:zs,svgFeOffset:Hs,svgFeSpecularLighting:Js,svgFeTile:Ks,svgFeTurbulence:Qs,mathMath:Vs,mathMi:Ws,mathMn:Xs,mathMo:Ys,mathMs:Zs,mathMtext:$s,mathMrow:_s,mathMfrac:ae,mathMsqrt:se,mathMroot:ee,mathMsub:te,mathMsup:re,varElement:oe}=s,ie=s,le=document,ne=le.querySelector.bind(le),ge=le.querySelectorAll.bind(le),me=le.createElement.bind(le),de=le.createElementNS.bind(le,"http://www.w3.org/2000/svg"),pe=le.createElementNS.bind(le,"http://www.w3.org/1998/Math/MathML"),ve=le.createDocumentFragment.bind(le),ce=le.createTextNode.bind(le),he=le.createComment.bind(le),ue=le.getElementById.bind(le),be=le.getElementsByClassName.bind(le),fe=le.getElementsByTagName.bind(le),Me=le.getElementsByName.bind(le);export{D as a,O as abbr,m as address,da as area,d as article,p as aside,pa as audio,I as b,i as base,R as bdi,U as bdo,C as blockquote,r as body,z as br,Ia as button,Ca as canvas,Aa as caption,H as cite,J as code,Na as col,qa as colgroup,he as commentNode,me as createEl,a as createElementFactory,pe as createMathEl,de as createSvgEl,K as data,Ra as datalist,T as dd,Sa as del,_a as details,Q as dfn,as as dialog,x as div,S as dl,le as doc,w as dt,ie as el,s as elements,V as em,ba as embed,Ua as fieldset,A as figcaption,N as figure,v as footer,za as form,ve as fragment,ne as getEl,be as getElClass,ue as getElId,Me as getElName,fe as getElTag,ge as getEls,h as h1,u as h2,b as h3,f as h4,M as h5,y as h6,t as head,c as header,q as hr,e as html,W as i,fa as iframe,va as img,Ha as input,wa as ins,X as kbd,Ja as label,Ka as legend,G as li,l as link,F as main,ca as map,Y as mark,Vs as mathMath,ae as mathMfrac,Ws as mathMi,Xs as mathMn,Ys as mathMo,ee as mathMroot,_s as mathMrow,Zs as mathMs,se as mathMsqrt,te as mathMsub,re as mathMsup,$s as mathMtext,ss as menu,n as meta,Qa as meter,E as nav,Ta as noscript,Ma as object,L as ol,Va as optgroup,Wa as option,Xa as output,P as p,ya as param,Fa as picture,Ea as portal,B as pre,Ya as progress,Z as q,$ as rp,_ as rt,aa as ruby,sa as s,ea as samp,xa as script,k as section,Za as select,ts as slot,ta as small,ka as source,ra as span,oa as strong,g as style,ia as sub,es as summary,la as sup,ws as svgAnimate,Ns as svgAnimateMotion,As as svgAnimateTransform,is as svgCircle,Es as svgClipPath,us as svgDefs,ps as svgEllipse,Ls as svgFeBlend,Ps as svgFeColorMatrix,Bs as svgFeComponentTransfer,js as svgFeComposite,Ds as svgFeConvolveMatrix,Os as svgFeDiffuseLighting,Is as svgFeDisplacementMap,Rs as svgFeFlood,Us as svgFeGaussianBlur,zs as svgFeMorphology,Hs as svgFeOffset,Js as svgFeSpecularLighting,Ks as svgFeTile,Qs as svgFeTurbulence,Gs as svgFilter,Ss as svgForeignObject,vs as svgG,xs as svgImage,gs as svgLine,bs as svgLinearGradient,Ts as svgMarker,Fs as svgMask,ns as svgPath,ys as svgPattern,ds as svgPolygon,ms as svgPolyline,fs as svgRadialGradient,ls as svgRect,qs as svgSet,Ms as svgStop,os as svgSvg,Cs as svgSymbol,cs as svgText,hs as svgTspan,ks as svgUse,Ga as table,La as tbody,Pa as td,rs as template,ce as textNode,$a as textarea,Ba as tfoot,ja as th,Da as thead,na as time,o as title,Oa as tr,ha as track,ga as u,j as ul,oe as varElement,ua as video,ma as wbr};
package/dist/hmr.d.mts ADDED
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Client-side HMR runtime for Elit
3
+ * Import this in your app to enable hot module replacement
4
+ */
5
+ interface HMRClient {
6
+ /** Check if HMR is enabled */
7
+ enabled: boolean;
8
+ /** Manually reload the page */
9
+ reload: () => void;
10
+ /** Accept HMR updates for current module */
11
+ accept: (callback?: () => void) => void;
12
+ /** Decline HMR updates (forces full reload) */
13
+ decline: () => void;
14
+ /** Dispose callback before module is replaced */
15
+ dispose: (callback: () => void) => void;
16
+ }
17
+ declare global {
18
+ interface Window {
19
+ __ELIT_HMR__: HMRClient;
20
+ }
21
+ }
22
+ declare class ElitHMR implements HMRClient {
23
+ enabled: boolean;
24
+ private ws;
25
+ private acceptCallbacks;
26
+ private disposeCallbacks;
27
+ private declined;
28
+ constructor();
29
+ private connect;
30
+ private handleMessage;
31
+ reload(): void;
32
+ accept(callback?: () => void): void;
33
+ decline(): void;
34
+ dispose(callback: () => void): void;
35
+ }
36
+ declare const hmr: ElitHMR;
37
+
38
+ export { type HMRClient, hmr as default };
package/dist/hmr.d.ts ADDED
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Client-side HMR runtime for Elit
3
+ * Import this in your app to enable hot module replacement
4
+ */
5
+ interface HMRClient {
6
+ /** Check if HMR is enabled */
7
+ enabled: boolean;
8
+ /** Manually reload the page */
9
+ reload: () => void;
10
+ /** Accept HMR updates for current module */
11
+ accept: (callback?: () => void) => void;
12
+ /** Decline HMR updates (forces full reload) */
13
+ decline: () => void;
14
+ /** Dispose callback before module is replaced */
15
+ dispose: (callback: () => void) => void;
16
+ }
17
+ declare global {
18
+ interface Window {
19
+ __ELIT_HMR__: HMRClient;
20
+ }
21
+ }
22
+ declare class ElitHMR implements HMRClient {
23
+ enabled: boolean;
24
+ private ws;
25
+ private acceptCallbacks;
26
+ private disposeCallbacks;
27
+ private declined;
28
+ constructor();
29
+ private connect;
30
+ private handleMessage;
31
+ reload(): void;
32
+ accept(callback?: () => void): void;
33
+ decline(): void;
34
+ dispose(callback: () => void): void;
35
+ }
36
+ declare const hmr: ElitHMR;
37
+
38
+ export { type HMRClient, hmr as default };
package/dist/hmr.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var e=new class{constructor(){this.enabled=!1,this.ws=null,this.acceptCallbacks=[],this.disposeCallbacks=[],this.declined=!1,typeof window>"u"||this.connect()}connect(){let e="https:"===window.location.protocol?"wss:":"ws:",s=window.location.hostname,o=window.location.port||"3000";this.ws=new WebSocket(`${e}//${s}:${o}`),this.ws.onopen=()=>{this.enabled=!0,console.log("[Elit HMR] Connected ✓")},this.ws.onmessage=e=>{try{let s=JSON.parse(e.data);this.handleMessage(s)}catch(e){console.error("[Elit HMR] Error parsing message:",e)}},this.ws.onclose=()=>{this.enabled=!1,console.log("[Elit HMR] Disconnected - Attempting reconnect..."),setTimeout(()=>this.reload(),1e3)},this.ws.onerror=e=>{console.error("[Elit HMR] WebSocket error:",e)}}handleMessage(e){switch(e.type){case"connected":console.log("[Elit HMR] Ready");break;case"update":if(console.log(`[Elit HMR] Update detected: ${e.path}`),this.declined)return void this.reload();this.disposeCallbacks.forEach(e=>e()),this.disposeCallbacks=[],this.acceptCallbacks.length>0?this.acceptCallbacks.forEach(e=>e()):this.reload();break;case"reload":console.log("[Elit HMR] Full reload requested"),this.reload();break;case"error":console.error("[Elit HMR] Server error:",e.error)}}reload(){window.location.reload()}accept(e){e&&this.acceptCallbacks.push(e),this.declined=!1}decline(){this.declined=!0}dispose(e){this.disposeCallbacks.push(e)}};typeof window<"u"&&(window.__ELIT_HMR__=e);var s=e;module.exports=s;
package/dist/hmr.mjs ADDED
@@ -0,0 +1 @@
1
+ var e=new class{constructor(){this.enabled=!1,this.ws=null,this.acceptCallbacks=[],this.disposeCallbacks=[],this.declined=!1,typeof window>"u"||this.connect()}connect(){let e="https:"===window.location.protocol?"wss:":"ws:",s=window.location.hostname,o=window.location.port||"3000";this.ws=new WebSocket(`${e}//${s}:${o}`),this.ws.onopen=()=>{this.enabled=!0,console.log("[Elit HMR] Connected ✓")},this.ws.onmessage=e=>{try{let s=JSON.parse(e.data);this.handleMessage(s)}catch(e){console.error("[Elit HMR] Error parsing message:",e)}},this.ws.onclose=()=>{this.enabled=!1,console.log("[Elit HMR] Disconnected - Attempting reconnect..."),setTimeout(()=>this.reload(),1e3)},this.ws.onerror=e=>{console.error("[Elit HMR] WebSocket error:",e)}}handleMessage(e){switch(e.type){case"connected":console.log("[Elit HMR] Ready");break;case"update":if(console.log(`[Elit HMR] Update detected: ${e.path}`),this.declined)return void this.reload();this.disposeCallbacks.forEach(e=>e()),this.disposeCallbacks=[],this.acceptCallbacks.length>0?this.acceptCallbacks.forEach(e=>e()):this.reload();break;case"reload":console.log("[Elit HMR] Full reload requested"),this.reload();break;case"error":console.error("[Elit HMR] Server error:",e.error)}}reload(){window.location.reload()}accept(e){e&&this.acceptCallbacks.push(e),this.declined=!1}decline(){this.declined=!0}dispose(e){this.disposeCallbacks.push(e)}};typeof window<"u"&&(window.__ELIT_HMR__=e);var s=e;export{s as default};