@pyreon/core 0.1.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.
package/src/for.ts ADDED
@@ -0,0 +1,33 @@
1
+ import type { NativeItem, Props, VNode } from "./types"
2
+
3
+ /**
4
+ * Symbol used as the VNode type for a For list — runtime-dom handles it
5
+ * via mountFor, bypassing the generic VNode reconciler.
6
+ */
7
+ export const ForSymbol: unique symbol = Symbol("pyreon.For")
8
+
9
+ export interface ForProps<T> {
10
+ each: () => T[]
11
+ by: (item: T) => string | number
12
+ children: (item: T) => VNode | NativeItem
13
+ }
14
+
15
+ /**
16
+ * Efficient reactive list rendering.
17
+ *
18
+ * Unlike a plain `() => items().map(item => h(...))`, For never re-creates
19
+ * VNodes for existing keys — only new keys invoke `children()`. Structural
20
+ * mutations (swap, sort, filter) are O(n) key scan + O(k) DOM moves where k
21
+ * is the number of actually displaced entries.
22
+ *
23
+ * Usage:
24
+ * <For each={items} by={r => r.id}>{r => <li>...</li>}</For>
25
+ */
26
+ export function For<T>(props: ForProps<T>): VNode {
27
+ return {
28
+ type: ForSymbol as unknown as string,
29
+ props: props as unknown as Props,
30
+ children: [],
31
+ key: null,
32
+ }
33
+ }
package/src/h.ts ADDED
@@ -0,0 +1,49 @@
1
+ import type { ComponentFn, Props, VNode, VNodeChild } from "./types"
2
+
3
+ /** Marker for fragment nodes — renders children without a wrapper element */
4
+ export const Fragment: unique symbol = Symbol("Pyreon.Fragment")
5
+
6
+ /**
7
+ * Hyperscript function — the compiled output of JSX.
8
+ * `<div class="x">hello</div>` → `h("div", { class: "x" }, "hello")`
9
+ *
10
+ * Generic on P so TypeScript validates props match the component's signature
11
+ * at the call site, then stores the result in the loosely-typed VNode.
12
+ */
13
+ /** Shared empty props sentinel — identity-checked in mountElement to skip applyProps. */
14
+ export const EMPTY_PROPS: Props = {} as Props
15
+
16
+ export function h<P extends Props>(
17
+ type: string | ComponentFn<P> | symbol,
18
+ props: P | null,
19
+ ...children: VNodeChild[]
20
+ ): VNode {
21
+ return {
22
+ type: type as string | ComponentFn | symbol,
23
+ props: (props ?? EMPTY_PROPS) as Props,
24
+ children: normalizeChildren(children),
25
+ key: (props?.key as string | number | null) ?? null,
26
+ }
27
+ }
28
+
29
+ function normalizeChildren(children: VNodeChild[]): VNodeChild[] {
30
+ // Fast path: no nested arrays — return as-is without allocating
31
+ for (let i = 0; i < children.length; i++) {
32
+ if (Array.isArray(children[i])) {
33
+ return flattenChildren(children)
34
+ }
35
+ }
36
+ return children
37
+ }
38
+
39
+ function flattenChildren(children: VNodeChild[]): VNodeChild[] {
40
+ const result: VNodeChild[] = []
41
+ for (const child of children) {
42
+ if (Array.isArray(child)) {
43
+ result.push(...flattenChildren(child as VNodeChild[]))
44
+ } else {
45
+ result.push(child)
46
+ }
47
+ }
48
+ return result
49
+ }
package/src/index.ts ADDED
@@ -0,0 +1,42 @@
1
+ // @pyreon/core — component model, VNode types, lifecycle hooks
2
+
3
+ export { defineComponent, dispatchToErrorBoundary, propagateError, runWithHooks } from "./component"
4
+ export type { Context } from "./context"
5
+ export {
6
+ createContext,
7
+ popContext,
8
+ pushContext,
9
+ setContextStackProvider,
10
+ useContext,
11
+ withContext,
12
+ } from "./context"
13
+ export type { DynamicProps } from "./dynamic"
14
+ export { Dynamic } from "./dynamic"
15
+ export { ErrorBoundary } from "./error-boundary"
16
+ export type { ForProps } from "./for"
17
+ export { For, ForSymbol } from "./for"
18
+ export { EMPTY_PROPS, Fragment, h } from "./h"
19
+ export { lazy } from "./lazy"
20
+ export { onErrorCaptured, onMount, onUnmount, onUpdate } from "./lifecycle"
21
+ export { mapArray } from "./map-array"
22
+ export type { PortalProps } from "./portal"
23
+ export { Portal, PortalSymbol } from "./portal"
24
+ export type { Ref } from "./ref"
25
+ export { createRef } from "./ref"
26
+ export type { MatchProps, ShowProps, SwitchProps } from "./show"
27
+ export { Match, MatchSymbol, Show, Switch } from "./show"
28
+ export type { LazyComponent } from "./suspense"
29
+ export { Suspense } from "./suspense"
30
+ export type { ErrorContext, ErrorHandler } from "./telemetry"
31
+ export { registerErrorHandler, reportError } from "./telemetry"
32
+ export type {
33
+ CleanupFn,
34
+ ComponentFn,
35
+ ComponentInstance,
36
+ LifecycleHooks,
37
+ NativeItem,
38
+ Props,
39
+ VNode,
40
+ VNodeChild,
41
+ VNodeChildAtom,
42
+ } from "./types"
@@ -0,0 +1,2 @@
1
+ // Dev runtime — same as production but bundlers may inject extra debug info
2
+ export { Fragment, jsx as jsxDEV, jsxs } from "./jsx-runtime"
@@ -0,0 +1,576 @@
1
+ /**
2
+ * JSX automatic runtime.
3
+ *
4
+ * When tsconfig has `"jsxImportSource": "@pyreon/core"`, the TS/bundler compiler
5
+ * rewrites JSX to imports from this file automatically:
6
+ * <div class="x" /> → jsx("div", { class: "x" })
7
+ */
8
+ import { Fragment, h } from "./h"
9
+ import type { ComponentFn, Props, VNode, VNodeChild } from "./types"
10
+
11
+ export { Fragment }
12
+
13
+ export function jsx(
14
+ type: string | ComponentFn | symbol,
15
+ props: Props & { children?: VNodeChild | VNodeChild[] },
16
+ key?: string | number | null,
17
+ ): VNode {
18
+ const { children, ...rest } = props
19
+ const propsWithKey = (key != null ? { ...rest, key } : rest) as Props
20
+
21
+ if (typeof type === "function") {
22
+ // Component: keep children in props.children so the component function can access them.
23
+ // Children must NOT be spread as h() rest args because mountComponent only passes vnode.props.
24
+ const componentProps = children !== undefined ? { ...propsWithKey, children } : propsWithKey
25
+ return h(type, componentProps)
26
+ }
27
+
28
+ // DOM element or symbol (Fragment, ForSymbol): children go in vnode.children
29
+ const childArray = children === undefined ? [] : Array.isArray(children) ? children : [children]
30
+ return h(type, propsWithKey, ...(childArray as VNodeChild[]))
31
+ }
32
+
33
+ // jsxs is called when there are multiple static children — same signature
34
+ export const jsxs = jsx
35
+
36
+ // ─── JSX types ────────────────────────────────────────────────────────────────
37
+
38
+ type Booleanish = boolean | "true" | "false"
39
+ type StyleValue = string | Partial<CSSStyleDeclaration>
40
+
41
+ /** Common HTML attributes accepted by all Pyreon elements */
42
+ interface PyreonHTMLAttributes {
43
+ // Identity
44
+ id?: string
45
+ class?: string | (() => string)
46
+ className?: string | (() => string)
47
+ style?: StyleValue | (() => StyleValue)
48
+ // pyreon-specific directives
49
+ "n-show"?: boolean | (() => boolean)
50
+ // Accessible
51
+ role?: string
52
+ tabIndex?: number | (() => number)
53
+ title?: string
54
+ lang?: string
55
+ dir?: "ltr" | "rtl" | "auto"
56
+ hidden?: boolean | (() => boolean)
57
+ draggable?: Booleanish
58
+ // ARIA
59
+ "aria-label"?: string | (() => string)
60
+ "aria-hidden"?: Booleanish | (() => Booleanish)
61
+ "aria-disabled"?: Booleanish | (() => Booleanish)
62
+ "aria-expanded"?: Booleanish | (() => Booleanish)
63
+ "aria-selected"?: Booleanish | (() => Booleanish)
64
+ "aria-checked"?: Booleanish | "mixed" | (() => Booleanish | "mixed")
65
+ "aria-current"?: Booleanish | "page" | "step" | "location" | "date" | "time"
66
+ "aria-live"?: "off" | "assertive" | "polite"
67
+ "aria-atomic"?: Booleanish
68
+ "aria-busy"?: Booleanish
69
+ "aria-controls"?: string
70
+ "aria-describedby"?: string
71
+ "aria-labelledby"?: string
72
+ "aria-placeholder"?: string
73
+ "aria-required"?: Booleanish | (() => Booleanish)
74
+ "aria-invalid"?: Booleanish | "grammar" | "spelling"
75
+ "aria-valuemin"?: number
76
+ "aria-valuemax"?: number
77
+ "aria-valuenow"?: number
78
+ "aria-valuetext"?: string
79
+ "aria-haspopup"?: Booleanish | "menu" | "listbox" | "tree" | "grid" | "dialog"
80
+ "aria-posinset"?: number
81
+ "aria-setsize"?: number
82
+ "aria-level"?: number
83
+ "aria-multiline"?: Booleanish
84
+ "aria-multiselectable"?: Booleanish
85
+ "aria-orientation"?: "horizontal" | "vertical"
86
+ "aria-readonly"?: Booleanish | (() => Booleanish)
87
+ "aria-sort"?: "none" | "ascending" | "descending" | "other"
88
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both"
89
+ "aria-colcount"?: number
90
+ "aria-colindex"?: number
91
+ "aria-colspan"?: number
92
+ "aria-rowcount"?: number
93
+ "aria-rowindex"?: number
94
+ "aria-rowspan"?: number
95
+ // DOM lifecycle ref
96
+ ref?: { current: unknown }
97
+ // Key for list reconciliation
98
+ key?: string | number
99
+ // innerHTML
100
+ innerHTML?: string
101
+ dangerouslySetInnerHTML?: { __html: string }
102
+ // Events
103
+ onClick?: (e: MouseEvent) => void
104
+ onDblClick?: (e: MouseEvent) => void
105
+ onMouseDown?: (e: MouseEvent) => void
106
+ onMouseUp?: (e: MouseEvent) => void
107
+ onMouseEnter?: (e: MouseEvent) => void
108
+ onMouseLeave?: (e: MouseEvent) => void
109
+ onMouseMove?: (e: MouseEvent) => void
110
+ onMouseOver?: (e: MouseEvent) => void
111
+ onMouseOut?: (e: MouseEvent) => void
112
+ onContextMenu?: (e: MouseEvent) => void
113
+ onKeyDown?: (e: KeyboardEvent) => void
114
+ onKeyUp?: (e: KeyboardEvent) => void
115
+ onKeyPress?: (e: KeyboardEvent) => void
116
+ onFocus?: (e: FocusEvent) => void
117
+ onBlur?: (e: FocusEvent) => void
118
+ onChange?: (e: Event) => void
119
+ onInput?: (e: InputEvent) => void
120
+ onSubmit?: (e: SubmitEvent) => void
121
+ onReset?: (e: Event) => void
122
+ onScroll?: (e: Event) => void
123
+ onWheel?: (e: WheelEvent) => void
124
+ onDragStart?: (e: DragEvent) => void
125
+ onDragEnd?: (e: DragEvent) => void
126
+ onDragOver?: (e: DragEvent) => void
127
+ onDragEnter?: (e: DragEvent) => void
128
+ onDragLeave?: (e: DragEvent) => void
129
+ onDrop?: (e: DragEvent) => void
130
+ onTouchStart?: (e: TouchEvent) => void
131
+ onTouchEnd?: (e: TouchEvent) => void
132
+ onTouchMove?: (e: TouchEvent) => void
133
+ onPointerDown?: (e: PointerEvent) => void
134
+ onPointerUp?: (e: PointerEvent) => void
135
+ onPointerMove?: (e: PointerEvent) => void
136
+ onPointerEnter?: (e: PointerEvent) => void
137
+ onPointerLeave?: (e: PointerEvent) => void
138
+ onPointerCancel?: (e: PointerEvent) => void
139
+ onPointerOver?: (e: PointerEvent) => void
140
+ onPointerOut?: (e: PointerEvent) => void
141
+ onTransitionEnd?: (e: TransitionEvent) => void
142
+ onAnimationStart?: (e: AnimationEvent) => void
143
+ onAnimationEnd?: (e: AnimationEvent) => void
144
+ onAnimationIteration?: (e: AnimationEvent) => void
145
+ onLoad?: (e: Event) => void
146
+ onError?: (e: Event | string) => void
147
+ onAbort?: (e: Event) => void
148
+ onSelect?: (e: Event) => void
149
+ onCopy?: (e: ClipboardEvent) => void
150
+ onCut?: (e: ClipboardEvent) => void
151
+ onPaste?: (e: ClipboardEvent) => void
152
+ // Catch-all for data-* and other arbitrary attributes
153
+ [key: string]: unknown
154
+ }
155
+
156
+ /** Attributes specific to form inputs */
157
+ interface InputAttributes extends PyreonHTMLAttributes {
158
+ type?: string | (() => string)
159
+ value?: string | number | (() => string | number)
160
+ defaultValue?: string | number
161
+ checked?: boolean | (() => boolean)
162
+ defaultChecked?: boolean
163
+ placeholder?: string | (() => string)
164
+ disabled?: boolean | (() => boolean)
165
+ readOnly?: boolean
166
+ required?: boolean | (() => boolean)
167
+ min?: string | number
168
+ max?: string | number
169
+ step?: string | number
170
+ minLength?: number
171
+ maxLength?: number
172
+ pattern?: string
173
+ multiple?: boolean
174
+ name?: string
175
+ accept?: string
176
+ autoComplete?: string
177
+ autoFocus?: boolean
178
+ form?: string
179
+ list?: string
180
+ size?: number
181
+ src?: string | (() => string)
182
+ alt?: string
183
+ width?: number | string
184
+ height?: number | string
185
+ }
186
+
187
+ interface AnchorAttributes extends PyreonHTMLAttributes {
188
+ href?: string | (() => string)
189
+ target?: "_blank" | "_self" | "_parent" | "_top" | string
190
+ rel?: string
191
+ download?: string | boolean
192
+ }
193
+
194
+ interface ButtonAttributes extends PyreonHTMLAttributes {
195
+ type?: "button" | "submit" | "reset"
196
+ disabled?: boolean | (() => boolean)
197
+ name?: string
198
+ value?: string
199
+ form?: string
200
+ formAction?: string
201
+ formMethod?: string
202
+ formEncType?: string
203
+ formNoValidate?: boolean
204
+ formTarget?: string
205
+ }
206
+
207
+ interface TextareaAttributes extends PyreonHTMLAttributes {
208
+ value?: string | (() => string)
209
+ defaultValue?: string
210
+ placeholder?: string | (() => string)
211
+ disabled?: boolean | (() => boolean)
212
+ readOnly?: boolean
213
+ required?: boolean | (() => boolean)
214
+ rows?: number
215
+ cols?: number
216
+ minLength?: number
217
+ maxLength?: number
218
+ name?: string
219
+ autoFocus?: boolean
220
+ form?: string
221
+ wrap?: "hard" | "soft"
222
+ }
223
+
224
+ interface SelectAttributes extends PyreonHTMLAttributes {
225
+ value?: string | string[] | (() => string | string[])
226
+ defaultValue?: string | string[]
227
+ disabled?: boolean | (() => boolean)
228
+ required?: boolean | (() => boolean)
229
+ multiple?: boolean
230
+ name?: string
231
+ size?: number
232
+ form?: string
233
+ autoFocus?: boolean
234
+ }
235
+
236
+ interface OptionAttributes extends PyreonHTMLAttributes {
237
+ value?: string | number | (() => string | number)
238
+ disabled?: boolean | (() => boolean)
239
+ selected?: boolean | (() => boolean)
240
+ label?: string
241
+ }
242
+
243
+ interface FormAttributes extends PyreonHTMLAttributes {
244
+ action?: string
245
+ method?: "get" | "post"
246
+ encType?: string
247
+ noValidate?: boolean
248
+ target?: string
249
+ name?: string
250
+ autoComplete?: string
251
+ }
252
+
253
+ interface ImgAttributes extends PyreonHTMLAttributes {
254
+ src?: string | (() => string)
255
+ alt?: string | (() => string)
256
+ width?: number | string | (() => number | string)
257
+ height?: number | string | (() => number | string)
258
+ loading?: "lazy" | "eager"
259
+ decoding?: "auto" | "async" | "sync"
260
+ crossOrigin?: "anonymous" | "use-credentials"
261
+ referrerPolicy?: string
262
+ srcSet?: string
263
+ sizes?: string
264
+ }
265
+
266
+ interface VideoAttributes extends PyreonHTMLAttributes {
267
+ src?: string | (() => string)
268
+ width?: number | string
269
+ height?: number | string
270
+ controls?: boolean
271
+ autoPlay?: boolean
272
+ muted?: boolean
273
+ loop?: boolean
274
+ poster?: string
275
+ preload?: "none" | "metadata" | "auto"
276
+ playsInline?: boolean
277
+ crossOrigin?: "anonymous" | "use-credentials"
278
+ }
279
+
280
+ interface AudioAttributes extends PyreonHTMLAttributes {
281
+ src?: string | (() => string)
282
+ controls?: boolean
283
+ autoPlay?: boolean
284
+ muted?: boolean
285
+ loop?: boolean
286
+ preload?: "none" | "metadata" | "auto"
287
+ crossOrigin?: "anonymous" | "use-credentials"
288
+ }
289
+
290
+ interface LabelAttributes extends PyreonHTMLAttributes {
291
+ htmlFor?: string
292
+ for?: string
293
+ form?: string
294
+ }
295
+
296
+ interface ThAttributes extends PyreonHTMLAttributes {
297
+ colSpan?: number
298
+ rowSpan?: number
299
+ scope?: "col" | "row" | "colgroup" | "rowgroup"
300
+ abbr?: string
301
+ headers?: string
302
+ }
303
+
304
+ interface TdAttributes extends PyreonHTMLAttributes {
305
+ colSpan?: number
306
+ rowSpan?: number
307
+ headers?: string
308
+ }
309
+
310
+ interface ColAttributes extends PyreonHTMLAttributes {
311
+ span?: number
312
+ }
313
+
314
+ interface IframeAttributes extends PyreonHTMLAttributes {
315
+ src?: string | (() => string)
316
+ width?: number | string
317
+ height?: number | string
318
+ allow?: string
319
+ allowFullScreen?: boolean
320
+ loading?: "lazy" | "eager"
321
+ name?: string
322
+ sandbox?: string
323
+ referrerPolicy?: string
324
+ title?: string
325
+ }
326
+
327
+ interface LinkAttributes extends PyreonHTMLAttributes {
328
+ href?: string | (() => string)
329
+ rel?: string
330
+ type?: string
331
+ as?: string
332
+ media?: string
333
+ crossOrigin?: "anonymous" | "use-credentials"
334
+ integrity?: string
335
+ referrerPolicy?: string
336
+ }
337
+
338
+ interface MetaAttributes extends PyreonHTMLAttributes {
339
+ name?: string
340
+ content?: string | (() => string)
341
+ httpEquiv?: string
342
+ charset?: string
343
+ property?: string
344
+ }
345
+
346
+ interface ScriptAttributes extends PyreonHTMLAttributes {
347
+ src?: string | (() => string)
348
+ type?: string
349
+ async?: boolean
350
+ defer?: boolean
351
+ crossOrigin?: "anonymous" | "use-credentials"
352
+ integrity?: string
353
+ noModule?: boolean
354
+ referrerPolicy?: string
355
+ }
356
+
357
+ interface SourceAttributes extends PyreonHTMLAttributes {
358
+ src?: string | (() => string)
359
+ type?: string
360
+ srcSet?: string
361
+ sizes?: string
362
+ media?: string
363
+ }
364
+
365
+ interface ProgressAttributes extends PyreonHTMLAttributes {
366
+ value?: number | (() => number)
367
+ max?: number
368
+ }
369
+
370
+ interface MeterAttributes extends PyreonHTMLAttributes {
371
+ value?: number | (() => number)
372
+ min?: number
373
+ max?: number
374
+ low?: number
375
+ high?: number
376
+ optimum?: number
377
+ }
378
+
379
+ interface DetailsAttributes extends PyreonHTMLAttributes {
380
+ open?: boolean | (() => boolean)
381
+ }
382
+
383
+ interface DialogAttributes extends PyreonHTMLAttributes {
384
+ open?: boolean | (() => boolean)
385
+ }
386
+
387
+ interface OlAttributes extends PyreonHTMLAttributes {
388
+ start?: number
389
+ reversed?: boolean
390
+ type?: "1" | "a" | "A" | "i" | "I"
391
+ }
392
+
393
+ interface SvgAttributes extends PyreonHTMLAttributes {
394
+ viewBox?: string
395
+ xmlns?: string
396
+ fill?: string | (() => string)
397
+ stroke?: string | (() => string)
398
+ "stroke-width"?: string | number
399
+ "stroke-linecap"?: "butt" | "round" | "square"
400
+ "stroke-linejoin"?: "miter" | "round" | "bevel"
401
+ "fill-rule"?: "nonzero" | "evenodd"
402
+ "clip-rule"?: "nonzero" | "evenodd"
403
+ "clip-path"?: string
404
+ d?: string
405
+ cx?: string | number
406
+ cy?: string | number
407
+ r?: string | number
408
+ rx?: string | number
409
+ ry?: string | number
410
+ x?: string | number
411
+ y?: string | number
412
+ x1?: string | number
413
+ y1?: string | number
414
+ x2?: string | number
415
+ y2?: string | number
416
+ width?: string | number
417
+ height?: string | number
418
+ transform?: string | (() => string)
419
+ opacity?: string | number | (() => string | number)
420
+ points?: string
421
+ "font-size"?: string | number
422
+ "text-anchor"?: "start" | "middle" | "end"
423
+ "dominant-baseline"?: string
424
+ }
425
+
426
+ declare global {
427
+ namespace JSX {
428
+ interface IntrinsicElements {
429
+ // Document structure
430
+ html: PyreonHTMLAttributes
431
+ head: PyreonHTMLAttributes
432
+ body: PyreonHTMLAttributes
433
+ title: PyreonHTMLAttributes
434
+ base: PyreonHTMLAttributes
435
+ meta: MetaAttributes
436
+ link: LinkAttributes
437
+ script: ScriptAttributes
438
+ style: PyreonHTMLAttributes
439
+ noscript: PyreonHTMLAttributes
440
+ // Sections
441
+ main: PyreonHTMLAttributes
442
+ header: PyreonHTMLAttributes
443
+ footer: PyreonHTMLAttributes
444
+ nav: PyreonHTMLAttributes
445
+ aside: PyreonHTMLAttributes
446
+ section: PyreonHTMLAttributes
447
+ article: PyreonHTMLAttributes
448
+ address: PyreonHTMLAttributes
449
+ h1: PyreonHTMLAttributes
450
+ h2: PyreonHTMLAttributes
451
+ h3: PyreonHTMLAttributes
452
+ h4: PyreonHTMLAttributes
453
+ h5: PyreonHTMLAttributes
454
+ h6: PyreonHTMLAttributes
455
+ hgroup: PyreonHTMLAttributes
456
+ // Block text
457
+ p: PyreonHTMLAttributes
458
+ pre: PyreonHTMLAttributes
459
+ blockquote: PyreonHTMLAttributes
460
+ figure: PyreonHTMLAttributes
461
+ figcaption: PyreonHTMLAttributes
462
+ div: PyreonHTMLAttributes
463
+ hr: PyreonHTMLAttributes
464
+ // Inline text
465
+ span: PyreonHTMLAttributes
466
+ a: AnchorAttributes
467
+ em: PyreonHTMLAttributes
468
+ strong: PyreonHTMLAttributes
469
+ small: PyreonHTMLAttributes
470
+ s: PyreonHTMLAttributes
471
+ cite: PyreonHTMLAttributes
472
+ q: PyreonHTMLAttributes
473
+ abbr: PyreonHTMLAttributes
474
+ time: PyreonHTMLAttributes
475
+ code: PyreonHTMLAttributes
476
+ var: PyreonHTMLAttributes
477
+ samp: PyreonHTMLAttributes
478
+ kbd: PyreonHTMLAttributes
479
+ mark: PyreonHTMLAttributes
480
+ sub: PyreonHTMLAttributes
481
+ sup: PyreonHTMLAttributes
482
+ i: PyreonHTMLAttributes
483
+ b: PyreonHTMLAttributes
484
+ u: PyreonHTMLAttributes
485
+ bdi: PyreonHTMLAttributes
486
+ bdo: PyreonHTMLAttributes
487
+ br: PyreonHTMLAttributes
488
+ wbr: PyreonHTMLAttributes
489
+ ruby: PyreonHTMLAttributes
490
+ rt: PyreonHTMLAttributes
491
+ rp: PyreonHTMLAttributes
492
+ // Lists
493
+ ul: PyreonHTMLAttributes
494
+ ol: OlAttributes
495
+ li: PyreonHTMLAttributes
496
+ dl: PyreonHTMLAttributes
497
+ dt: PyreonHTMLAttributes
498
+ dd: PyreonHTMLAttributes
499
+ // Forms
500
+ form: FormAttributes
501
+ label: LabelAttributes
502
+ input: InputAttributes
503
+ button: ButtonAttributes
504
+ select: SelectAttributes
505
+ datalist: PyreonHTMLAttributes
506
+ optgroup: PyreonHTMLAttributes
507
+ option: OptionAttributes
508
+ textarea: TextareaAttributes
509
+ output: PyreonHTMLAttributes
510
+ progress: ProgressAttributes
511
+ meter: MeterAttributes
512
+ fieldset: PyreonHTMLAttributes
513
+ legend: PyreonHTMLAttributes
514
+ // Tables
515
+ table: PyreonHTMLAttributes
516
+ caption: PyreonHTMLAttributes
517
+ colgroup: PyreonHTMLAttributes
518
+ col: ColAttributes
519
+ thead: PyreonHTMLAttributes
520
+ tbody: PyreonHTMLAttributes
521
+ tfoot: PyreonHTMLAttributes
522
+ tr: PyreonHTMLAttributes
523
+ th: ThAttributes
524
+ td: TdAttributes
525
+ // Media
526
+ img: ImgAttributes
527
+ video: VideoAttributes
528
+ audio: AudioAttributes
529
+ source: SourceAttributes
530
+ track: PyreonHTMLAttributes
531
+ picture: PyreonHTMLAttributes
532
+ canvas: PyreonHTMLAttributes
533
+ svg: SvgAttributes
534
+ path: SvgAttributes
535
+ circle: SvgAttributes
536
+ ellipse: SvgAttributes
537
+ line: SvgAttributes
538
+ polyline: SvgAttributes
539
+ polygon: SvgAttributes
540
+ rect: SvgAttributes
541
+ text: SvgAttributes
542
+ tspan: SvgAttributes
543
+ g: SvgAttributes
544
+ defs: SvgAttributes
545
+ use: SvgAttributes & { href?: string }
546
+ symbol: SvgAttributes
547
+ clipPath: SvgAttributes
548
+ mask: SvgAttributes
549
+ marker: SvgAttributes
550
+ pattern: SvgAttributes
551
+ linearGradient: SvgAttributes
552
+ radialGradient: SvgAttributes
553
+ stop: SvgAttributes & {
554
+ offset?: string | number
555
+ "stop-color"?: string
556
+ "stop-opacity"?: string | number
557
+ }
558
+ // Interactive / embedding
559
+ details: DetailsAttributes
560
+ summary: PyreonHTMLAttributes
561
+ dialog: DialogAttributes
562
+ iframe: IframeAttributes
563
+ embed: PyreonHTMLAttributes
564
+ object: PyreonHTMLAttributes
565
+ param: PyreonHTMLAttributes
566
+ // Semantic / misc
567
+ menu: PyreonHTMLAttributes
568
+ menuitem: PyreonHTMLAttributes
569
+ template: PyreonHTMLAttributes
570
+ slot: PyreonHTMLAttributes
571
+ portal: PyreonHTMLAttributes
572
+ // Catch-all for custom elements and data-* attrs
573
+ [tagName: string]: PyreonHTMLAttributes
574
+ }
575
+ }
576
+ }