@pyreon/core 0.24.5 → 0.24.6

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 (56) hide show
  1. package/lib/analysis/index.js.html +1 -1
  2. package/lib/index.js +53 -31
  3. package/package.json +2 -6
  4. package/src/compat-marker.ts +0 -79
  5. package/src/compat-shared.ts +0 -80
  6. package/src/component.ts +0 -98
  7. package/src/context.ts +0 -349
  8. package/src/defer.ts +0 -279
  9. package/src/dynamic.ts +0 -32
  10. package/src/env.d.ts +0 -6
  11. package/src/error-boundary.ts +0 -90
  12. package/src/for.ts +0 -51
  13. package/src/h.ts +0 -80
  14. package/src/index.ts +0 -80
  15. package/src/jsx-dev-runtime.ts +0 -2
  16. package/src/jsx-runtime.ts +0 -747
  17. package/src/lazy.ts +0 -25
  18. package/src/lifecycle.ts +0 -152
  19. package/src/manifest.ts +0 -579
  20. package/src/map-array.ts +0 -42
  21. package/src/portal.ts +0 -39
  22. package/src/props.ts +0 -269
  23. package/src/ref.ts +0 -32
  24. package/src/show.ts +0 -121
  25. package/src/style.ts +0 -102
  26. package/src/suspense.ts +0 -52
  27. package/src/telemetry.ts +0 -120
  28. package/src/tests/compat-marker.test.ts +0 -96
  29. package/src/tests/compat-shared.test.ts +0 -99
  30. package/src/tests/component.test.ts +0 -281
  31. package/src/tests/context.test.ts +0 -629
  32. package/src/tests/core.test.ts +0 -1290
  33. package/src/tests/cx.test.ts +0 -70
  34. package/src/tests/defer.test.ts +0 -359
  35. package/src/tests/dynamic.test.ts +0 -87
  36. package/src/tests/error-boundary.test.ts +0 -181
  37. package/src/tests/extract-props-overloads.types.test.ts +0 -135
  38. package/src/tests/for.test.ts +0 -117
  39. package/src/tests/h.test.ts +0 -221
  40. package/src/tests/jsx-compat.test.tsx +0 -86
  41. package/src/tests/lazy.test.ts +0 -100
  42. package/src/tests/lifecycle.test.ts +0 -350
  43. package/src/tests/manifest-snapshot.test.ts +0 -100
  44. package/src/tests/map-array.test.ts +0 -313
  45. package/src/tests/native-marker-error-boundary.test.ts +0 -12
  46. package/src/tests/portal.test.ts +0 -48
  47. package/src/tests/props-extended.test.ts +0 -157
  48. package/src/tests/props.test.ts +0 -250
  49. package/src/tests/reactive-context.test.ts +0 -69
  50. package/src/tests/reactive-props.test.ts +0 -157
  51. package/src/tests/ref.test.ts +0 -70
  52. package/src/tests/show.test.ts +0 -314
  53. package/src/tests/style.test.ts +0 -157
  54. package/src/tests/suspense.test.ts +0 -139
  55. package/src/tests/telemetry.test.ts +0 -297
  56. package/src/types.ts +0 -116
@@ -1,747 +0,0 @@
1
- /// <reference lib="dom" />
2
- /**
3
- * JSX automatic runtime.
4
- *
5
- * When tsconfig has `"jsxImportSource": "@pyreon/core"`, the TS/bundler compiler
6
- * rewrites JSX to imports from this file automatically:
7
- * <div class="x" /> → jsx("div", { class: "x" })
8
- *
9
- * The triple-slash reference above makes this file self-declare its DOM-lib
10
- * dependency. Without it, any consumer whose tsconfig has `lib: ["ESNext"]`
11
- * (no DOM) — e.g. backend-only packages like @pyreon/cli — fails to typecheck
12
- * once `@pyreon/core` becomes resolvable from their dependency graph (e.g. via
13
- * a transitive devDep), because tsc auto-resolves jsxImportSource and pulls
14
- * jsx-runtime.ts into the consumer's compilation unit.
15
- */
16
- import { Fragment, h } from './h'
17
- import type { RefProp } from './ref'
18
- import type { ClassValue } from './style'
19
- import type { ComponentFn, Props, VNode, VNodeChild } from './types'
20
-
21
- export { Fragment }
22
-
23
- export function jsx(
24
- type: string | ComponentFn | symbol,
25
- props: Props & { children?: VNodeChild | VNodeChild[] },
26
- key?: string | number | null,
27
- ): VNode {
28
- // Build the destructured props object by copying own property
29
- // DESCRIPTORS, not values. Compiler-emitted reactive props (`_rp(() =>
30
- // signal())` wrappers converted to getter properties by
31
- // `makeReactiveProps` in mount.ts) MUST survive the destructure with
32
- // their getters intact. A plain `{ children, ...rest } = props`
33
- // destructure fires every getter on `props` and stores the resolved
34
- // value, breaking signal-driven reactivity for any downstream
35
- // consumer that reads `props.x` in a tracking scope.
36
- //
37
- // Fast path: if `props` has no own property descriptors with `get`
38
- // accessors, we can use the original value-copy shape (cheap object
39
- // literal allocation). This is the 99% case — only framework wrappers
40
- // (rocketstyle attrs HOC, Wrapper, styled) and direct signal props
41
- // produce getter-shaped descriptors.
42
- const descriptors = Object.getOwnPropertyDescriptors(props)
43
- let hasGetter = false
44
- for (const k in descriptors) {
45
- if (descriptors[k]!.get) {
46
- hasGetter = true
47
- break
48
- }
49
- }
50
- const children = props.children
51
-
52
- if (!hasGetter) {
53
- const { children: _ignored, ...rest } = props
54
- const propsWithKey = (key != null ? { ...rest, key } : rest) as Props
55
- if (typeof type === 'function') {
56
- const componentProps = children !== undefined ? { ...propsWithKey, children } : propsWithKey
57
- return h(type, componentProps)
58
- }
59
- const childArray = children === undefined ? [] : Array.isArray(children) ? children : [children]
60
- return h(type, propsWithKey, ...(childArray as VNodeChild[]))
61
- }
62
-
63
- // Slow path: at least one getter descriptor present — preserve
64
- // descriptors during the destructure.
65
- const propsWithKey: Record<string, unknown> = {}
66
- for (const k in descriptors) {
67
- if (k === 'children') continue
68
- Object.defineProperty(propsWithKey, k, descriptors[k]!)
69
- }
70
- if (key != null) propsWithKey.key = key as unknown
71
-
72
- if (typeof type === 'function') {
73
- if (children !== undefined) propsWithKey.children = children
74
- return h(type, propsWithKey as Props)
75
- }
76
-
77
- const childArray = children === undefined ? [] : Array.isArray(children) ? children : [children]
78
- return h(type, propsWithKey as Props, ...(childArray as VNodeChild[]))
79
- }
80
-
81
- // jsxs is called when there are multiple static children — same signature
82
- export const jsxs = jsx
83
-
84
- // ─── JSX types ────────────────────────────────────────────────────────────────
85
-
86
- type Booleanish = boolean | 'true' | 'false'
87
- export type CSSProperties = { [K in keyof CSSStyleDeclaration]?: string | number }
88
- export type StyleValue = string | CSSProperties
89
-
90
- /** Event with typed currentTarget — used in element-specific event handlers. */
91
- export type TargetedEvent<T extends Element, E extends Event = Event> = E & {
92
- readonly currentTarget: T
93
- }
94
-
95
- /** Common HTML attributes accepted by all Pyreon elements */
96
- export interface PyreonHTMLAttributes<E extends Element = HTMLElement> {
97
- // Identity
98
- id?: string | (() => string) | undefined
99
- class?: ClassValue | (() => ClassValue) | undefined
100
- className?: ClassValue | (() => ClassValue) | undefined
101
- style?: StyleValue | (() => StyleValue) | undefined
102
- // Accessible
103
- role?: string | (() => string) | undefined
104
- tabIndex?: number | (() => number) | undefined
105
- title?: string | (() => string) | undefined
106
- lang?: string | undefined
107
- dir?: 'ltr' | 'rtl' | 'auto' | undefined
108
- hidden?: boolean | (() => boolean) | undefined
109
- draggable?: Booleanish | undefined
110
- contentEditable?: Booleanish | 'inherit' | 'plaintext-only' | undefined
111
- spellCheck?: Booleanish | undefined
112
- autoCapitalize?: 'off' | 'on' | 'sentences' | 'words' | 'characters' | undefined
113
- translate?: 'yes' | 'no' | undefined
114
- enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined
115
- inputMode?:
116
- | 'none'
117
- | 'text'
118
- | 'decimal'
119
- | 'numeric'
120
- | 'tel'
121
- | 'search'
122
- | 'email'
123
- | 'url'
124
- | undefined
125
- is?: string | undefined
126
- slot?: string | undefined
127
- part?: string | undefined
128
- popover?: 'auto' | 'manual' | undefined
129
- popoverTarget?: string | undefined
130
- popoverTargetAction?: 'toggle' | 'show' | 'hide' | undefined
131
- inert?: boolean | undefined
132
- // ARIA
133
- 'aria-label'?: string | (() => string) | undefined
134
- 'aria-hidden'?: Booleanish | (() => Booleanish) | undefined
135
- 'aria-disabled'?: Booleanish | (() => Booleanish) | undefined
136
- 'aria-expanded'?: Booleanish | (() => Booleanish) | undefined
137
- 'aria-selected'?: Booleanish | (() => Booleanish) | undefined
138
- 'aria-checked'?: Booleanish | 'mixed' | (() => Booleanish | 'mixed') | undefined
139
- 'aria-current'?: Booleanish | 'page' | 'step' | 'location' | 'date' | 'time' | undefined
140
- 'aria-live'?: 'off' | 'assertive' | 'polite' | undefined
141
- 'aria-atomic'?: Booleanish | undefined
142
- 'aria-busy'?: Booleanish | undefined
143
- 'aria-controls'?: string | undefined
144
- 'aria-describedby'?: string | undefined
145
- 'aria-labelledby'?: string | undefined
146
- 'aria-placeholder'?: string | undefined
147
- 'aria-required'?: Booleanish | (() => Booleanish) | undefined
148
- 'aria-invalid'?: Booleanish | 'grammar' | 'spelling' | undefined
149
- 'aria-valuemin'?: number | undefined
150
- 'aria-valuemax'?: number | undefined
151
- 'aria-valuenow'?: number | undefined
152
- 'aria-valuetext'?: string | undefined
153
- 'aria-haspopup'?: Booleanish | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined
154
- 'aria-posinset'?: number | undefined
155
- 'aria-setsize'?: number | undefined
156
- 'aria-level'?: number | undefined
157
- 'aria-multiline'?: Booleanish | undefined
158
- 'aria-multiselectable'?: Booleanish | undefined
159
- 'aria-orientation'?: 'horizontal' | 'vertical' | undefined
160
- 'aria-readonly'?: Booleanish | (() => Booleanish) | undefined
161
- 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other' | undefined
162
- 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both' | undefined
163
- 'aria-colcount'?: number | undefined
164
- 'aria-colindex'?: number | undefined
165
- 'aria-colspan'?: number | undefined
166
- 'aria-rowcount'?: number | undefined
167
- 'aria-rowindex'?: number | undefined
168
- 'aria-rowspan'?: number | undefined
169
- // DOM lifecycle ref — object ref or callback ref
170
- ref?: RefProp<E> | undefined
171
- // Key for list reconciliation
172
- key?: string | number | undefined
173
- // Children — allows null, undefined, boolean in JSX children positions
174
- children?: VNodeChild | VNodeChild[]
175
- // innerHTML
176
- innerHTML?: string | undefined
177
- dangerouslySetInnerHTML?: { __html: string } | undefined
178
- // Events — typed currentTarget via generic E
179
- onClick?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
180
- onDblClick?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
181
- // React-compat alias for onDblClick — compiler maps to `dblclick` DOM event.
182
- onDoubleClick?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
183
- onMouseDown?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
184
- onMouseUp?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
185
- onMouseEnter?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
186
- onMouseLeave?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
187
- onMouseMove?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
188
- onMouseOver?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
189
- onMouseOut?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
190
- onContextMenu?: ((e: TargetedEvent<E, MouseEvent>) => void) | undefined
191
- onKeyDown?: ((e: TargetedEvent<E, KeyboardEvent>) => void) | undefined
192
- onKeyUp?: ((e: TargetedEvent<E, KeyboardEvent>) => void) | undefined
193
- onKeyPress?: ((e: TargetedEvent<E, KeyboardEvent>) => void) | undefined
194
- onFocus?: ((e: TargetedEvent<E, FocusEvent>) => void) | undefined
195
- onBlur?: ((e: TargetedEvent<E, FocusEvent>) => void) | undefined
196
- onChange?: ((e: TargetedEvent<E>) => void) | undefined
197
- onInput?: ((e: TargetedEvent<E, InputEvent>) => void) | undefined
198
- onBeforeInput?: ((e: TargetedEvent<E, InputEvent>) => void) | undefined
199
- onSubmit?: ((e: TargetedEvent<E, SubmitEvent>) => void) | undefined
200
- onReset?: ((e: TargetedEvent<E>) => void) | undefined
201
- onInvalid?: ((e: TargetedEvent<E>) => void) | undefined
202
- onScroll?: ((e: TargetedEvent<E>) => void) | undefined
203
- onWheel?: ((e: TargetedEvent<E, WheelEvent>) => void) | undefined
204
- onResize?: ((e: TargetedEvent<E>) => void) | undefined
205
- onDragStart?: ((e: TargetedEvent<E, DragEvent>) => void) | undefined
206
- onDragEnd?: ((e: TargetedEvent<E, DragEvent>) => void) | undefined
207
- onDragOver?: ((e: TargetedEvent<E, DragEvent>) => void) | undefined
208
- onDragEnter?: ((e: TargetedEvent<E, DragEvent>) => void) | undefined
209
- onDragLeave?: ((e: TargetedEvent<E, DragEvent>) => void) | undefined
210
- onDrop?: ((e: TargetedEvent<E, DragEvent>) => void) | undefined
211
- onTouchStart?: ((e: TargetedEvent<E, TouchEvent>) => void) | undefined
212
- onTouchEnd?: ((e: TargetedEvent<E, TouchEvent>) => void) | undefined
213
- onTouchMove?: ((e: TargetedEvent<E, TouchEvent>) => void) | undefined
214
- onPointerDown?: ((e: TargetedEvent<E, PointerEvent>) => void) | undefined
215
- onPointerUp?: ((e: TargetedEvent<E, PointerEvent>) => void) | undefined
216
- onPointerMove?: ((e: TargetedEvent<E, PointerEvent>) => void) | undefined
217
- onPointerEnter?: ((e: TargetedEvent<E, PointerEvent>) => void) | undefined
218
- onPointerLeave?: ((e: TargetedEvent<E, PointerEvent>) => void) | undefined
219
- onPointerCancel?: ((e: TargetedEvent<E, PointerEvent>) => void) | undefined
220
- onPointerOver?: ((e: TargetedEvent<E, PointerEvent>) => void) | undefined
221
- onPointerOut?: ((e: TargetedEvent<E, PointerEvent>) => void) | undefined
222
- onTransitionEnd?: ((e: TargetedEvent<E, TransitionEvent>) => void) | undefined
223
- onAnimationStart?: ((e: TargetedEvent<E, AnimationEvent>) => void) | undefined
224
- onAnimationEnd?: ((e: TargetedEvent<E, AnimationEvent>) => void) | undefined
225
- onAnimationIteration?: ((e: TargetedEvent<E, AnimationEvent>) => void) | undefined
226
- onToggle?: ((e: TargetedEvent<E>) => void) | undefined
227
- onLoad?: ((e: TargetedEvent<E>) => void) | undefined
228
- onError?: ((e: TargetedEvent<E> | string) => void) | undefined
229
- onAbort?: ((e: TargetedEvent<E>) => void) | undefined
230
- onSelect?: ((e: TargetedEvent<E>) => void) | undefined
231
- onCopy?: ((e: TargetedEvent<E, ClipboardEvent>) => void) | undefined
232
- onCut?: ((e: TargetedEvent<E, ClipboardEvent>) => void) | undefined
233
- onPaste?: ((e: TargetedEvent<E, ClipboardEvent>) => void) | undefined
234
- // data-* and aria-* catch-all (typed attributes above catch typos)
235
- [key: `data-${string}`]: unknown
236
- [key: `aria-${string}`]: unknown
237
- }
238
-
239
- /** Attributes specific to form inputs */
240
- export interface InputAttributes extends PyreonHTMLAttributes<HTMLInputElement> {
241
- type?: string | (() => string) | undefined
242
- value?: string | number | (() => string | number) | undefined
243
- defaultValue?: string | number | undefined
244
- checked?: boolean | (() => boolean) | undefined
245
- defaultChecked?: boolean | undefined
246
- placeholder?: string | (() => string) | undefined
247
- disabled?: boolean | (() => boolean) | undefined
248
- // `readOnly` is paired with `disabled` semantically — both accept a
249
- // reactive callable so consumers can spread `useForm.register()`'s
250
- // return value (which produces `readOnly: Accessor<boolean>`) directly
251
- // onto `<input>` / `<textarea>` without losing reactivity.
252
- readOnly?: boolean | (() => boolean) | undefined
253
- required?: boolean | (() => boolean) | undefined
254
- min?: string | number | undefined
255
- max?: string | number | undefined
256
- step?: string | number | undefined
257
- minLength?: number | undefined
258
- maxLength?: number | undefined
259
- pattern?: string | undefined
260
- multiple?: boolean | undefined
261
- name?: string | undefined
262
- accept?: string | undefined
263
- autoComplete?: string | undefined
264
- autoFocus?: boolean | undefined
265
- capture?: 'user' | 'environment' | string | undefined
266
- form?: string | undefined
267
- formNoValidate?: boolean | undefined
268
- list?: string | undefined
269
- size?: number | undefined
270
- src?: string | (() => string) | undefined
271
- alt?: string | (() => string) | undefined
272
- width?: number | string | undefined
273
- height?: number | string | undefined
274
- }
275
-
276
- export interface AnchorAttributes extends PyreonHTMLAttributes<HTMLAnchorElement> {
277
- href?: string | (() => string) | undefined
278
- hreflang?: string | undefined
279
- ping?: string | undefined
280
- referrerPolicy?: string | undefined
281
- target?: '_blank' | '_self' | '_parent' | '_top' | string | undefined
282
- rel?: string | undefined
283
- download?: string | boolean | undefined
284
- }
285
-
286
- export interface ButtonAttributes extends PyreonHTMLAttributes<HTMLButtonElement> {
287
- type?: 'button' | 'submit' | 'reset' | undefined
288
- disabled?: boolean | (() => boolean) | undefined
289
- name?: string | undefined
290
- value?: string | undefined
291
- form?: string | undefined
292
- formAction?: string | undefined
293
- formMethod?: string | undefined
294
- formEncType?: string | undefined
295
- formNoValidate?: boolean | undefined
296
- formTarget?: string | undefined
297
- }
298
-
299
- export interface TextareaAttributes extends PyreonHTMLAttributes<HTMLTextAreaElement> {
300
- value?: string | (() => string) | undefined
301
- defaultValue?: string | undefined
302
- placeholder?: string | (() => string) | undefined
303
- disabled?: boolean | (() => boolean) | undefined
304
- // `readOnly` is paired with `disabled` semantically — both accept a
305
- // reactive callable so consumers can spread `useForm.register()`'s
306
- // return value (which produces `readOnly: Accessor<boolean>`) directly
307
- // onto `<input>` / `<textarea>` without losing reactivity.
308
- readOnly?: boolean | (() => boolean) | undefined
309
- required?: boolean | (() => boolean) | undefined
310
- rows?: number | undefined
311
- cols?: number | undefined
312
- minLength?: number | undefined
313
- maxLength?: number | undefined
314
- name?: string | undefined
315
- autoFocus?: boolean | undefined
316
- form?: string | undefined
317
- wrap?: 'hard' | 'soft' | undefined
318
- }
319
-
320
- export interface SelectAttributes extends PyreonHTMLAttributes<HTMLSelectElement> {
321
- value?: string | string[] | (() => string | string[]) | undefined
322
- defaultValue?: string | string[] | undefined
323
- disabled?: boolean | (() => boolean) | undefined
324
- required?: boolean | (() => boolean) | undefined
325
- multiple?: boolean | undefined
326
- name?: string | undefined
327
- size?: number | undefined
328
- form?: string | undefined
329
- autoFocus?: boolean | undefined
330
- }
331
-
332
- interface OptionAttributes extends PyreonHTMLAttributes<HTMLOptionElement> {
333
- value?: string | number | (() => string | number) | undefined
334
- disabled?: boolean | (() => boolean) | undefined
335
- selected?: boolean | (() => boolean) | undefined
336
- label?: string | undefined
337
- }
338
-
339
- export interface FormAttributes extends PyreonHTMLAttributes<HTMLFormElement> {
340
- action?: string | undefined
341
- method?: 'get' | 'post' | undefined
342
- encType?: string | undefined
343
- noValidate?: boolean | undefined
344
- target?: string | undefined
345
- name?: string | undefined
346
- autoComplete?: string | undefined
347
- acceptCharset?: string | undefined
348
- rel?: string | undefined
349
- }
350
-
351
- export interface ImgAttributes extends PyreonHTMLAttributes<HTMLImageElement> {
352
- src?: string | (() => string) | undefined
353
- alt?: string | (() => string) | undefined
354
- width?: number | string | (() => number | string) | undefined
355
- height?: number | string | (() => number | string) | undefined
356
- loading?: 'lazy' | 'eager' | undefined
357
- decoding?: 'auto' | 'async' | 'sync' | undefined
358
- crossOrigin?: 'anonymous' | 'use-credentials' | undefined
359
- referrerPolicy?: string | undefined
360
- srcSet?: string | (() => string) | undefined
361
- sizes?: string | (() => string) | undefined
362
- fetchPriority?: 'high' | 'low' | 'auto' | undefined
363
- }
364
-
365
- interface VideoAttributes extends PyreonHTMLAttributes<HTMLVideoElement> {
366
- src?: string | (() => string) | undefined
367
- width?: number | string | undefined
368
- height?: number | string | undefined
369
- controls?: boolean | undefined
370
- autoPlay?: boolean | undefined
371
- muted?: boolean | undefined
372
- loop?: boolean | undefined
373
- poster?: string | (() => string) | undefined
374
- preload?: 'none' | 'metadata' | 'auto' | undefined
375
- playsInline?: boolean | undefined
376
- crossOrigin?: 'anonymous' | 'use-credentials' | undefined
377
- disablePictureInPicture?: boolean | undefined
378
- disableRemotePlayback?: boolean | undefined
379
- }
380
-
381
- interface AudioAttributes extends PyreonHTMLAttributes<HTMLAudioElement> {
382
- src?: string | (() => string) | undefined
383
- controls?: boolean | undefined
384
- autoPlay?: boolean | undefined
385
- muted?: boolean | undefined
386
- loop?: boolean | undefined
387
- preload?: 'none' | 'metadata' | 'auto' | undefined
388
- crossOrigin?: 'anonymous' | 'use-credentials' | undefined
389
- }
390
-
391
- interface LabelAttributes extends PyreonHTMLAttributes<HTMLLabelElement> {
392
- htmlFor?: string | undefined
393
- for?: string | undefined
394
- form?: string | undefined
395
- }
396
-
397
- interface ThAttributes extends PyreonHTMLAttributes<HTMLTableCellElement> {
398
- colSpan?: number | undefined
399
- rowSpan?: number | undefined
400
- scope?: 'col' | 'row' | 'colgroup' | 'rowgroup' | undefined
401
- abbr?: string | undefined
402
- headers?: string | undefined
403
- }
404
-
405
- interface TdAttributes extends PyreonHTMLAttributes<HTMLTableCellElement> {
406
- colSpan?: number | undefined
407
- rowSpan?: number | undefined
408
- headers?: string | undefined
409
- }
410
-
411
- interface ColAttributes extends PyreonHTMLAttributes<HTMLTableColElement> {
412
- span?: number | undefined
413
- }
414
-
415
- interface IframeAttributes extends PyreonHTMLAttributes<HTMLIFrameElement> {
416
- src?: string | (() => string) | undefined
417
- width?: number | string | undefined
418
- height?: number | string | undefined
419
- allow?: string | undefined
420
- allowFullScreen?: boolean | undefined
421
- loading?: 'lazy' | 'eager' | undefined
422
- name?: string | undefined
423
- sandbox?: string | undefined
424
- referrerPolicy?: string | undefined
425
- title?: string | undefined
426
- }
427
-
428
- interface LinkAttributes extends PyreonHTMLAttributes<HTMLLinkElement> {
429
- href?: string | (() => string) | undefined
430
- rel?: string | undefined
431
- type?: string | undefined
432
- as?: string | undefined
433
- media?: string | undefined
434
- crossOrigin?: 'anonymous' | 'use-credentials' | undefined
435
- integrity?: string | undefined
436
- referrerPolicy?: string | undefined
437
- }
438
-
439
- interface MetaAttributes extends PyreonHTMLAttributes<HTMLMetaElement> {
440
- name?: string | undefined
441
- content?: string | (() => string) | undefined
442
- httpEquiv?: string | undefined
443
- charset?: string | undefined
444
- property?: string | undefined
445
- }
446
-
447
- interface ScriptAttributes extends PyreonHTMLAttributes<HTMLScriptElement> {
448
- src?: string | (() => string) | undefined
449
- type?: string | undefined
450
- async?: boolean | undefined
451
- defer?: boolean | undefined
452
- crossOrigin?: 'anonymous' | 'use-credentials' | undefined
453
- integrity?: string | undefined
454
- noModule?: boolean | undefined
455
- referrerPolicy?: string | undefined
456
- }
457
-
458
- interface SourceAttributes extends PyreonHTMLAttributes<HTMLSourceElement> {
459
- src?: string | (() => string) | undefined
460
- type?: string | undefined
461
- srcSet?: string | (() => string) | undefined
462
- sizes?: string | (() => string) | undefined
463
- media?: string | undefined
464
- }
465
-
466
- interface ProgressAttributes extends PyreonHTMLAttributes<HTMLProgressElement> {
467
- value?: number | (() => number) | undefined
468
- max?: number | undefined
469
- }
470
-
471
- interface MeterAttributes extends PyreonHTMLAttributes<HTMLMeterElement> {
472
- value?: number | (() => number) | undefined
473
- min?: number | undefined
474
- max?: number | undefined
475
- low?: number | undefined
476
- high?: number | undefined
477
- optimum?: number | undefined
478
- }
479
-
480
- interface DetailsAttributes extends PyreonHTMLAttributes<HTMLDetailsElement> {
481
- open?: boolean | (() => boolean) | undefined
482
- }
483
-
484
- interface DialogAttributes extends PyreonHTMLAttributes<HTMLDialogElement> {
485
- open?: boolean | (() => boolean) | undefined
486
- }
487
-
488
- interface OlAttributes extends PyreonHTMLAttributes<HTMLOListElement> {
489
- start?: number | undefined
490
- reversed?: boolean | undefined
491
- type?: '1' | 'a' | 'A' | 'i' | 'I' | undefined
492
- }
493
-
494
- interface CanvasAttributes extends PyreonHTMLAttributes<HTMLCanvasElement> {
495
- width?: number | string | undefined
496
- height?: number | string | undefined
497
- }
498
-
499
- export interface SvgAttributes extends PyreonHTMLAttributes<SVGElement> {
500
- viewBox?: string | undefined
501
- xmlns?: string | undefined
502
- fill?: string | (() => string) | undefined
503
- stroke?: string | (() => string) | undefined
504
- 'stroke-width'?: string | number | (() => string | number) | undefined
505
- 'stroke-linecap'?: 'butt' | 'round' | 'square' | undefined
506
- 'stroke-linejoin'?: 'miter' | 'round' | 'bevel' | undefined
507
- 'fill-rule'?: 'nonzero' | 'evenodd' | undefined
508
- 'clip-rule'?: 'nonzero' | 'evenodd' | undefined
509
- 'clip-path'?: string | undefined
510
- d?: string | (() => string) | undefined
511
- cx?: string | number | undefined
512
- cy?: string | number | undefined
513
- r?: string | number | undefined
514
- rx?: string | number | undefined
515
- ry?: string | number | undefined
516
- x?: string | number | undefined
517
- y?: string | number | undefined
518
- x1?: string | number | undefined
519
- y1?: string | number | undefined
520
- x2?: string | number | undefined
521
- y2?: string | number | undefined
522
- width?: string | number | undefined
523
- height?: string | number | undefined
524
- transform?: string | (() => string) | undefined
525
- opacity?: string | number | (() => string | number) | undefined
526
- points?: string | undefined
527
- 'font-size'?: string | number | undefined
528
- 'text-anchor'?: 'start' | 'middle' | 'end' | undefined
529
- 'dominant-baseline'?: string | undefined
530
- // Gradient & pattern
531
- gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox' | undefined
532
- gradientTransform?: string | undefined
533
- patternUnits?: 'userSpaceOnUse' | 'objectBoundingBox' | undefined
534
- patternContentUnits?: 'userSpaceOnUse' | 'objectBoundingBox' | undefined
535
- patternTransform?: string | undefined
536
- spreadMethod?: 'pad' | 'reflect' | 'repeat' | undefined
537
- // Marker
538
- markerWidth?: string | number | undefined
539
- markerHeight?: string | number | undefined
540
- markerUnits?: 'strokeWidth' | 'userSpaceOnUse' | undefined
541
- orient?: string | number | undefined
542
- refX?: string | number | undefined
543
- refY?: string | number | undefined
544
- // Clipping & masking
545
- maskUnits?: 'userSpaceOnUse' | 'objectBoundingBox' | undefined
546
- maskContentUnits?: 'userSpaceOnUse' | 'objectBoundingBox' | undefined
547
- clipPathUnits?: 'userSpaceOnUse' | 'objectBoundingBox' | undefined
548
- // Filter
549
- filterUnits?: 'userSpaceOnUse' | 'objectBoundingBox' | undefined
550
- primitiveUnits?: 'userSpaceOnUse' | 'objectBoundingBox' | undefined
551
- // Presentation
552
- preserveAspectRatio?: string | undefined
553
- 'color-interpolation'?: string | undefined
554
- 'color-interpolation-filters'?: string | undefined
555
- 'shape-rendering'?: string | undefined
556
- 'image-rendering'?: string | undefined
557
- 'text-rendering'?: string | undefined
558
- 'pointer-events'?: string | undefined
559
- visibility?: string | undefined
560
- display?: string | undefined
561
- overflow?: string | undefined
562
- cursor?: string | undefined
563
- // Text
564
- dx?: string | number | undefined
565
- dy?: string | number | undefined
566
- textLength?: string | number | undefined
567
- lengthAdjust?: 'spacing' | 'spacingAndGlyphs' | undefined
568
- 'writing-mode'?: string | undefined
569
- 'letter-spacing'?: string | number | undefined
570
- 'word-spacing'?: string | number | undefined
571
- // Path
572
- pathLength?: number | undefined
573
- // Use/href
574
- href?: string | undefined
575
- }
576
-
577
- declare global {
578
- namespace JSX {
579
- /** The type that JSX expressions evaluate to */
580
- type Element = import('./types').VNode
581
-
582
- /**
583
- * Valid JSX tag types — intrinsic strings + component functions.
584
- * Components may return VNode, null, strings, functions (reactive getters), etc.
585
- * (TS 5.1+ feature)
586
- */
587
- type ElementType = keyof IntrinsicElements | ((props: any) => import('./types').VNodeChild)
588
-
589
- /** Props that can be passed to any JSX element (intrinsic or component) */
590
- interface IntrinsicAttributes {
591
- key?: string | number | undefined
592
- }
593
-
594
- /** Tells TS which prop name carries children in component calls */
595
- interface ElementChildrenAttribute {
596
- children: {}
597
- }
598
-
599
- interface IntrinsicElements {
600
- // Document structure
601
- html: PyreonHTMLAttributes
602
- head: PyreonHTMLAttributes
603
- body: PyreonHTMLAttributes
604
- title: PyreonHTMLAttributes
605
- base: PyreonHTMLAttributes
606
- meta: MetaAttributes
607
- link: LinkAttributes
608
- script: ScriptAttributes
609
- style: PyreonHTMLAttributes
610
- noscript: PyreonHTMLAttributes
611
- // Sections
612
- main: PyreonHTMLAttributes
613
- header: PyreonHTMLAttributes
614
- footer: PyreonHTMLAttributes
615
- nav: PyreonHTMLAttributes
616
- aside: PyreonHTMLAttributes
617
- section: PyreonHTMLAttributes
618
- article: PyreonHTMLAttributes
619
- address: PyreonHTMLAttributes
620
- h1: PyreonHTMLAttributes
621
- h2: PyreonHTMLAttributes
622
- h3: PyreonHTMLAttributes
623
- h4: PyreonHTMLAttributes
624
- h5: PyreonHTMLAttributes
625
- h6: PyreonHTMLAttributes
626
- hgroup: PyreonHTMLAttributes
627
- // Block text
628
- p: PyreonHTMLAttributes
629
- pre: PyreonHTMLAttributes
630
- blockquote: PyreonHTMLAttributes
631
- figure: PyreonHTMLAttributes
632
- figcaption: PyreonHTMLAttributes
633
- div: PyreonHTMLAttributes
634
- hr: PyreonHTMLAttributes
635
- // Inline text
636
- span: PyreonHTMLAttributes
637
- a: AnchorAttributes
638
- em: PyreonHTMLAttributes
639
- strong: PyreonHTMLAttributes
640
- small: PyreonHTMLAttributes
641
- s: PyreonHTMLAttributes
642
- cite: PyreonHTMLAttributes
643
- q: PyreonHTMLAttributes
644
- abbr: PyreonHTMLAttributes
645
- time: PyreonHTMLAttributes
646
- code: PyreonHTMLAttributes
647
- var: PyreonHTMLAttributes
648
- samp: PyreonHTMLAttributes
649
- kbd: PyreonHTMLAttributes
650
- mark: PyreonHTMLAttributes
651
- sub: PyreonHTMLAttributes
652
- sup: PyreonHTMLAttributes
653
- i: PyreonHTMLAttributes
654
- b: PyreonHTMLAttributes
655
- u: PyreonHTMLAttributes
656
- bdi: PyreonHTMLAttributes
657
- bdo: PyreonHTMLAttributes
658
- br: PyreonHTMLAttributes
659
- wbr: PyreonHTMLAttributes
660
- ruby: PyreonHTMLAttributes
661
- rt: PyreonHTMLAttributes
662
- rp: PyreonHTMLAttributes
663
- // Lists
664
- ul: PyreonHTMLAttributes
665
- ol: OlAttributes
666
- li: PyreonHTMLAttributes
667
- dl: PyreonHTMLAttributes
668
- dt: PyreonHTMLAttributes
669
- dd: PyreonHTMLAttributes
670
- // Forms
671
- form: FormAttributes
672
- label: LabelAttributes
673
- input: InputAttributes
674
- button: ButtonAttributes
675
- select: SelectAttributes
676
- datalist: PyreonHTMLAttributes
677
- optgroup: PyreonHTMLAttributes
678
- option: OptionAttributes
679
- textarea: TextareaAttributes
680
- output: PyreonHTMLAttributes
681
- progress: ProgressAttributes
682
- meter: MeterAttributes
683
- fieldset: PyreonHTMLAttributes
684
- legend: PyreonHTMLAttributes
685
- // Tables
686
- table: PyreonHTMLAttributes
687
- caption: PyreonHTMLAttributes
688
- colgroup: PyreonHTMLAttributes
689
- col: ColAttributes
690
- thead: PyreonHTMLAttributes
691
- tbody: PyreonHTMLAttributes
692
- tfoot: PyreonHTMLAttributes
693
- tr: PyreonHTMLAttributes
694
- th: ThAttributes
695
- td: TdAttributes
696
- // Media
697
- img: ImgAttributes
698
- video: VideoAttributes
699
- audio: AudioAttributes
700
- source: SourceAttributes
701
- track: PyreonHTMLAttributes
702
- picture: PyreonHTMLAttributes
703
- canvas: CanvasAttributes
704
- svg: SvgAttributes
705
- path: SvgAttributes
706
- circle: SvgAttributes
707
- ellipse: SvgAttributes
708
- line: SvgAttributes
709
- polyline: SvgAttributes
710
- polygon: SvgAttributes
711
- rect: SvgAttributes
712
- text: SvgAttributes
713
- tspan: SvgAttributes
714
- g: SvgAttributes
715
- defs: SvgAttributes
716
- use: SvgAttributes & { href?: string }
717
- symbol: SvgAttributes
718
- clipPath: SvgAttributes
719
- mask: SvgAttributes
720
- marker: SvgAttributes
721
- pattern: SvgAttributes
722
- linearGradient: SvgAttributes
723
- radialGradient: SvgAttributes
724
- stop: SvgAttributes & {
725
- offset?: string | number
726
- 'stop-color'?: string
727
- 'stop-opacity'?: string | number
728
- }
729
- // Interactive / embedding
730
- details: DetailsAttributes
731
- summary: PyreonHTMLAttributes
732
- dialog: DialogAttributes
733
- iframe: IframeAttributes
734
- embed: PyreonHTMLAttributes
735
- object: PyreonHTMLAttributes
736
- param: PyreonHTMLAttributes
737
- // Semantic / misc
738
- menu: PyreonHTMLAttributes
739
- menuitem: PyreonHTMLAttributes
740
- template: PyreonHTMLAttributes
741
- slot: PyreonHTMLAttributes
742
- portal: PyreonHTMLAttributes
743
- // Catch-all for custom elements and data-* attrs
744
- [tagName: string]: PyreonHTMLAttributes<any>
745
- }
746
- }
747
- }