@pyreon/core 0.5.3 → 0.5.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-dev-runtime.js","names":[],"sources":["../src/h.ts","../src/jsx-runtime.ts"],"sourcesContent":["import type { ComponentFn, Props, VNode, VNodeChild } from \"./types\"\n\n/** Marker for fragment nodes — renders children without a wrapper element */\nexport const Fragment: unique symbol = Symbol(\"Pyreon.Fragment\")\n\n/**\n * Hyperscript function — the compiled output of JSX.\n * `<div class=\"x\">hello</div>` → `h(\"div\", { class: \"x\" }, \"hello\")`\n *\n * Generic on P so TypeScript validates props match the component's signature\n * at the call site, then stores the result in the loosely-typed VNode.\n */\n/** Shared empty props sentinel — identity-checked in mountElement to skip applyProps. */\nexport const EMPTY_PROPS: Props = {} as Props\n\n/** Makes `children` optional in P (if present) so it can be passed as rest args to h(). */\ntype PropsWithOptionalChildren<P extends Props> = Omit<P, \"children\"> &\n (\"children\" extends keyof P ? { children?: P[\"children\"] } : unknown)\n\n// Overload: component with typed props — children is optional in the props object\n// because it can be passed as rest args. Extra keys are allowed via `& Props`.\nexport function h<P extends Props>(\n type: ComponentFn<P>,\n props: (PropsWithOptionalChildren<P> & Props) | null,\n ...children: VNodeChild[]\n): VNode\n// Overload: intrinsic element, symbol, generic/dynamic component, or mixed union\n// biome-ignore lint/suspicious/noExplicitAny: accepts any component function for generic components like For<T>\nexport function h(\n type: string | ((props: any) => VNode | null) | symbol,\n props: Props | null,\n ...children: VNodeChild[]\n): VNode\nexport function h<P extends Props>(\n type: string | ComponentFn<P> | symbol,\n props: P | null,\n ...children: VNodeChild[]\n): VNode {\n return {\n type: type as string | ComponentFn | symbol,\n props: (props ?? EMPTY_PROPS) as Props,\n children: normalizeChildren(children),\n key: (props?.key as string | number | null) ?? null,\n }\n}\n\nfunction normalizeChildren(children: VNodeChild[]): VNodeChild[] {\n // Fast path: no nested arrays — return as-is without allocating\n for (let i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return flattenChildren(children)\n }\n }\n return children\n}\n\nfunction flattenChildren(children: VNodeChild[]): VNodeChild[] {\n const result: VNodeChild[] = []\n for (const child of children) {\n if (Array.isArray(child)) {\n result.push(...flattenChildren(child as VNodeChild[]))\n } else {\n result.push(child)\n }\n }\n return result\n}\n","/**\n * JSX automatic runtime.\n *\n * When tsconfig has `\"jsxImportSource\": \"@pyreon/core\"`, the TS/bundler compiler\n * rewrites JSX to imports from this file automatically:\n * <div class=\"x\" /> → jsx(\"div\", { class: \"x\" })\n */\nimport { Fragment, h } from \"./h\"\nimport type { ComponentFn, Props, VNode, VNodeChild } from \"./types\"\n\nexport { Fragment }\n\nexport function jsx(\n type: string | ComponentFn | symbol,\n props: Props & { children?: VNodeChild | VNodeChild[] },\n key?: string | number | null,\n): VNode {\n const { children, ...rest } = props\n const propsWithKey = (key != null ? { ...rest, key } : rest) as Props\n\n if (typeof type === \"function\") {\n // Component: keep children in props.children so the component function can access them.\n // Children must NOT be spread as h() rest args because mountComponent only passes vnode.props.\n const componentProps = children !== undefined ? { ...propsWithKey, children } : propsWithKey\n return h(type, componentProps)\n }\n\n // DOM element or symbol (Fragment, ForSymbol): children go in vnode.children\n const childArray = children === undefined ? [] : Array.isArray(children) ? children : [children]\n return h(type, propsWithKey, ...(childArray as VNodeChild[]))\n}\n\n// jsxs is called when there are multiple static children — same signature\nexport const jsxs = jsx\n\n// ─── JSX types ────────────────────────────────────────────────────────────────\n\ntype Booleanish = boolean | \"true\" | \"false\"\ntype StyleValue = string | Partial<CSSStyleDeclaration>\n\n/** Common HTML attributes accepted by all Pyreon elements */\ninterface PyreonHTMLAttributes {\n // Identity\n id?: string\n class?: string | (() => string)\n className?: string | (() => string)\n style?: StyleValue | (() => StyleValue)\n // pyreon-specific directives\n \"n-show\"?: boolean | (() => boolean)\n // Accessible\n role?: string\n tabIndex?: number | (() => number)\n title?: string\n lang?: string\n dir?: \"ltr\" | \"rtl\" | \"auto\"\n hidden?: boolean | (() => boolean)\n draggable?: Booleanish\n // ARIA\n \"aria-label\"?: string | (() => string)\n \"aria-hidden\"?: Booleanish | (() => Booleanish)\n \"aria-disabled\"?: Booleanish | (() => Booleanish)\n \"aria-expanded\"?: Booleanish | (() => Booleanish)\n \"aria-selected\"?: Booleanish | (() => Booleanish)\n \"aria-checked\"?: Booleanish | \"mixed\" | (() => Booleanish | \"mixed\")\n \"aria-current\"?: Booleanish | \"page\" | \"step\" | \"location\" | \"date\" | \"time\"\n \"aria-live\"?: \"off\" | \"assertive\" | \"polite\"\n \"aria-atomic\"?: Booleanish\n \"aria-busy\"?: Booleanish\n \"aria-controls\"?: string\n \"aria-describedby\"?: string\n \"aria-labelledby\"?: string\n \"aria-placeholder\"?: string\n \"aria-required\"?: Booleanish | (() => Booleanish)\n \"aria-invalid\"?: Booleanish | \"grammar\" | \"spelling\"\n \"aria-valuemin\"?: number\n \"aria-valuemax\"?: number\n \"aria-valuenow\"?: number\n \"aria-valuetext\"?: string\n \"aria-haspopup\"?: Booleanish | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\"\n \"aria-posinset\"?: number\n \"aria-setsize\"?: number\n \"aria-level\"?: number\n \"aria-multiline\"?: Booleanish\n \"aria-multiselectable\"?: Booleanish\n \"aria-orientation\"?: \"horizontal\" | \"vertical\"\n \"aria-readonly\"?: Booleanish | (() => Booleanish)\n \"aria-sort\"?: \"none\" | \"ascending\" | \"descending\" | \"other\"\n \"aria-autocomplete\"?: \"none\" | \"inline\" | \"list\" | \"both\"\n \"aria-colcount\"?: number\n \"aria-colindex\"?: number\n \"aria-colspan\"?: number\n \"aria-rowcount\"?: number\n \"aria-rowindex\"?: number\n \"aria-rowspan\"?: number\n // DOM lifecycle ref — object ref or callback ref\n ref?: { current: unknown } | ((el: Element) => void)\n // Key for list reconciliation\n key?: string | number\n // Children — allows null, undefined, boolean in JSX children positions\n children?: VNodeChild | VNodeChild[]\n // innerHTML\n innerHTML?: string\n dangerouslySetInnerHTML?: { __html: string }\n // Events\n onClick?: (e: MouseEvent) => void\n onDblClick?: (e: MouseEvent) => void\n onMouseDown?: (e: MouseEvent) => void\n onMouseUp?: (e: MouseEvent) => void\n onMouseEnter?: (e: MouseEvent) => void\n onMouseLeave?: (e: MouseEvent) => void\n onMouseMove?: (e: MouseEvent) => void\n onMouseOver?: (e: MouseEvent) => void\n onMouseOut?: (e: MouseEvent) => void\n onContextMenu?: (e: MouseEvent) => void\n onKeyDown?: (e: KeyboardEvent) => void\n onKeyUp?: (e: KeyboardEvent) => void\n onKeyPress?: (e: KeyboardEvent) => void\n onFocus?: (e: FocusEvent) => void\n onBlur?: (e: FocusEvent) => void\n onChange?: (e: Event) => void\n onInput?: (e: InputEvent) => void\n onSubmit?: (e: SubmitEvent) => void\n onReset?: (e: Event) => void\n onScroll?: (e: Event) => void\n onWheel?: (e: WheelEvent) => void\n onDragStart?: (e: DragEvent) => void\n onDragEnd?: (e: DragEvent) => void\n onDragOver?: (e: DragEvent) => void\n onDragEnter?: (e: DragEvent) => void\n onDragLeave?: (e: DragEvent) => void\n onDrop?: (e: DragEvent) => void\n onTouchStart?: (e: TouchEvent) => void\n onTouchEnd?: (e: TouchEvent) => void\n onTouchMove?: (e: TouchEvent) => void\n onPointerDown?: (e: PointerEvent) => void\n onPointerUp?: (e: PointerEvent) => void\n onPointerMove?: (e: PointerEvent) => void\n onPointerEnter?: (e: PointerEvent) => void\n onPointerLeave?: (e: PointerEvent) => void\n onPointerCancel?: (e: PointerEvent) => void\n onPointerOver?: (e: PointerEvent) => void\n onPointerOut?: (e: PointerEvent) => void\n onTransitionEnd?: (e: TransitionEvent) => void\n onAnimationStart?: (e: AnimationEvent) => void\n onAnimationEnd?: (e: AnimationEvent) => void\n onAnimationIteration?: (e: AnimationEvent) => void\n onLoad?: (e: Event) => void\n onError?: (e: Event | string) => void\n onAbort?: (e: Event) => void\n onSelect?: (e: Event) => void\n onCopy?: (e: ClipboardEvent) => void\n onCut?: (e: ClipboardEvent) => void\n onPaste?: (e: ClipboardEvent) => void\n // Catch-all for data-* and other arbitrary attributes\n [key: string]: unknown\n}\n\n/** Attributes specific to form inputs */\ninterface InputAttributes extends PyreonHTMLAttributes {\n type?: string | (() => string)\n value?: string | number | (() => string | number)\n defaultValue?: string | number\n checked?: boolean | (() => boolean)\n defaultChecked?: boolean\n placeholder?: string | (() => string)\n disabled?: boolean | (() => boolean)\n readOnly?: boolean\n required?: boolean | (() => boolean)\n min?: string | number\n max?: string | number\n step?: string | number\n minLength?: number\n maxLength?: number\n pattern?: string\n multiple?: boolean\n name?: string\n accept?: string\n autoComplete?: string\n autoFocus?: boolean\n form?: string\n list?: string\n size?: number\n src?: string | (() => string)\n alt?: string\n width?: number | string\n height?: number | string\n}\n\ninterface AnchorAttributes extends PyreonHTMLAttributes {\n href?: string | (() => string)\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | string\n rel?: string\n download?: string | boolean\n}\n\ninterface ButtonAttributes extends PyreonHTMLAttributes {\n type?: \"button\" | \"submit\" | \"reset\"\n disabled?: boolean | (() => boolean)\n name?: string\n value?: string\n form?: string\n formAction?: string\n formMethod?: string\n formEncType?: string\n formNoValidate?: boolean\n formTarget?: string\n}\n\ninterface TextareaAttributes extends PyreonHTMLAttributes {\n value?: string | (() => string)\n defaultValue?: string\n placeholder?: string | (() => string)\n disabled?: boolean | (() => boolean)\n readOnly?: boolean\n required?: boolean | (() => boolean)\n rows?: number\n cols?: number\n minLength?: number\n maxLength?: number\n name?: string\n autoFocus?: boolean\n form?: string\n wrap?: \"hard\" | \"soft\"\n}\n\ninterface SelectAttributes extends PyreonHTMLAttributes {\n value?: string | string[] | (() => string | string[])\n defaultValue?: string | string[]\n disabled?: boolean | (() => boolean)\n required?: boolean | (() => boolean)\n multiple?: boolean\n name?: string\n size?: number\n form?: string\n autoFocus?: boolean\n}\n\ninterface OptionAttributes extends PyreonHTMLAttributes {\n value?: string | number | (() => string | number)\n disabled?: boolean | (() => boolean)\n selected?: boolean | (() => boolean)\n label?: string\n}\n\ninterface FormAttributes extends PyreonHTMLAttributes {\n action?: string\n method?: \"get\" | \"post\"\n encType?: string\n noValidate?: boolean\n target?: string\n name?: string\n autoComplete?: string\n}\n\ninterface ImgAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n alt?: string | (() => string)\n width?: number | string | (() => number | string)\n height?: number | string | (() => number | string)\n loading?: \"lazy\" | \"eager\"\n decoding?: \"auto\" | \"async\" | \"sync\"\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n referrerPolicy?: string\n srcSet?: string\n sizes?: string\n}\n\ninterface VideoAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n width?: number | string\n height?: number | string\n controls?: boolean\n autoPlay?: boolean\n muted?: boolean\n loop?: boolean\n poster?: string\n preload?: \"none\" | \"metadata\" | \"auto\"\n playsInline?: boolean\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n}\n\ninterface AudioAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n controls?: boolean\n autoPlay?: boolean\n muted?: boolean\n loop?: boolean\n preload?: \"none\" | \"metadata\" | \"auto\"\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n}\n\ninterface LabelAttributes extends PyreonHTMLAttributes {\n htmlFor?: string\n for?: string\n form?: string\n}\n\ninterface ThAttributes extends PyreonHTMLAttributes {\n colSpan?: number\n rowSpan?: number\n scope?: \"col\" | \"row\" | \"colgroup\" | \"rowgroup\"\n abbr?: string\n headers?: string\n}\n\ninterface TdAttributes extends PyreonHTMLAttributes {\n colSpan?: number\n rowSpan?: number\n headers?: string\n}\n\ninterface ColAttributes extends PyreonHTMLAttributes {\n span?: number\n}\n\ninterface IframeAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n width?: number | string\n height?: number | string\n allow?: string\n allowFullScreen?: boolean\n loading?: \"lazy\" | \"eager\"\n name?: string\n sandbox?: string\n referrerPolicy?: string\n title?: string\n}\n\ninterface LinkAttributes extends PyreonHTMLAttributes {\n href?: string | (() => string)\n rel?: string\n type?: string\n as?: string\n media?: string\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n integrity?: string\n referrerPolicy?: string\n}\n\ninterface MetaAttributes extends PyreonHTMLAttributes {\n name?: string\n content?: string | (() => string)\n httpEquiv?: string\n charset?: string\n property?: string\n}\n\ninterface ScriptAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n type?: string\n async?: boolean\n defer?: boolean\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n integrity?: string\n noModule?: boolean\n referrerPolicy?: string\n}\n\ninterface SourceAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n type?: string\n srcSet?: string\n sizes?: string\n media?: string\n}\n\ninterface ProgressAttributes extends PyreonHTMLAttributes {\n value?: number | (() => number)\n max?: number\n}\n\ninterface MeterAttributes extends PyreonHTMLAttributes {\n value?: number | (() => number)\n min?: number\n max?: number\n low?: number\n high?: number\n optimum?: number\n}\n\ninterface DetailsAttributes extends PyreonHTMLAttributes {\n open?: boolean | (() => boolean)\n}\n\ninterface DialogAttributes extends PyreonHTMLAttributes {\n open?: boolean | (() => boolean)\n}\n\ninterface OlAttributes extends PyreonHTMLAttributes {\n start?: number\n reversed?: boolean\n type?: \"1\" | \"a\" | \"A\" | \"i\" | \"I\"\n}\n\ninterface SvgAttributes extends PyreonHTMLAttributes {\n viewBox?: string\n xmlns?: string\n fill?: string | (() => string)\n stroke?: string | (() => string)\n \"stroke-width\"?: string | number\n \"stroke-linecap\"?: \"butt\" | \"round\" | \"square\"\n \"stroke-linejoin\"?: \"miter\" | \"round\" | \"bevel\"\n \"fill-rule\"?: \"nonzero\" | \"evenodd\"\n \"clip-rule\"?: \"nonzero\" | \"evenodd\"\n \"clip-path\"?: string\n d?: string\n cx?: string | number\n cy?: string | number\n r?: string | number\n rx?: string | number\n ry?: string | number\n x?: string | number\n y?: string | number\n x1?: string | number\n y1?: string | number\n x2?: string | number\n y2?: string | number\n width?: string | number\n height?: string | number\n transform?: string | (() => string)\n opacity?: string | number | (() => string | number)\n points?: string\n \"font-size\"?: string | number\n \"text-anchor\"?: \"start\" | \"middle\" | \"end\"\n \"dominant-baseline\"?: string\n}\n\ndeclare global {\n namespace JSX {\n /** The type that JSX expressions evaluate to */\n type Element = import(\"./types\").VNode\n\n /**\n * Valid JSX tag types — intrinsic strings + component functions.\n * Components may return VNode, null, strings, functions (reactive getters), etc.\n * (TS 5.1+ feature)\n */\n type ElementType = keyof IntrinsicElements | ((props: any) => import(\"./types\").VNodeChild)\n\n /** Tells TS which prop name carries children in component calls */\n interface ElementChildrenAttribute {\n children: {}\n }\n\n interface IntrinsicElements {\n // Document structure\n html: PyreonHTMLAttributes\n head: PyreonHTMLAttributes\n body: PyreonHTMLAttributes\n title: PyreonHTMLAttributes\n base: PyreonHTMLAttributes\n meta: MetaAttributes\n link: LinkAttributes\n script: ScriptAttributes\n style: PyreonHTMLAttributes\n noscript: PyreonHTMLAttributes\n // Sections\n main: PyreonHTMLAttributes\n header: PyreonHTMLAttributes\n footer: PyreonHTMLAttributes\n nav: PyreonHTMLAttributes\n aside: PyreonHTMLAttributes\n section: PyreonHTMLAttributes\n article: PyreonHTMLAttributes\n address: PyreonHTMLAttributes\n h1: PyreonHTMLAttributes\n h2: PyreonHTMLAttributes\n h3: PyreonHTMLAttributes\n h4: PyreonHTMLAttributes\n h5: PyreonHTMLAttributes\n h6: PyreonHTMLAttributes\n hgroup: PyreonHTMLAttributes\n // Block text\n p: PyreonHTMLAttributes\n pre: PyreonHTMLAttributes\n blockquote: PyreonHTMLAttributes\n figure: PyreonHTMLAttributes\n figcaption: PyreonHTMLAttributes\n div: PyreonHTMLAttributes\n hr: PyreonHTMLAttributes\n // Inline text\n span: PyreonHTMLAttributes\n a: AnchorAttributes\n em: PyreonHTMLAttributes\n strong: PyreonHTMLAttributes\n small: PyreonHTMLAttributes\n s: PyreonHTMLAttributes\n cite: PyreonHTMLAttributes\n q: PyreonHTMLAttributes\n abbr: PyreonHTMLAttributes\n time: PyreonHTMLAttributes\n code: PyreonHTMLAttributes\n var: PyreonHTMLAttributes\n samp: PyreonHTMLAttributes\n kbd: PyreonHTMLAttributes\n mark: PyreonHTMLAttributes\n sub: PyreonHTMLAttributes\n sup: PyreonHTMLAttributes\n i: PyreonHTMLAttributes\n b: PyreonHTMLAttributes\n u: PyreonHTMLAttributes\n bdi: PyreonHTMLAttributes\n bdo: PyreonHTMLAttributes\n br: PyreonHTMLAttributes\n wbr: PyreonHTMLAttributes\n ruby: PyreonHTMLAttributes\n rt: PyreonHTMLAttributes\n rp: PyreonHTMLAttributes\n // Lists\n ul: PyreonHTMLAttributes\n ol: OlAttributes\n li: PyreonHTMLAttributes\n dl: PyreonHTMLAttributes\n dt: PyreonHTMLAttributes\n dd: PyreonHTMLAttributes\n // Forms\n form: FormAttributes\n label: LabelAttributes\n input: InputAttributes\n button: ButtonAttributes\n select: SelectAttributes\n datalist: PyreonHTMLAttributes\n optgroup: PyreonHTMLAttributes\n option: OptionAttributes\n textarea: TextareaAttributes\n output: PyreonHTMLAttributes\n progress: ProgressAttributes\n meter: MeterAttributes\n fieldset: PyreonHTMLAttributes\n legend: PyreonHTMLAttributes\n // Tables\n table: PyreonHTMLAttributes\n caption: PyreonHTMLAttributes\n colgroup: PyreonHTMLAttributes\n col: ColAttributes\n thead: PyreonHTMLAttributes\n tbody: PyreonHTMLAttributes\n tfoot: PyreonHTMLAttributes\n tr: PyreonHTMLAttributes\n th: ThAttributes\n td: TdAttributes\n // Media\n img: ImgAttributes\n video: VideoAttributes\n audio: AudioAttributes\n source: SourceAttributes\n track: PyreonHTMLAttributes\n picture: PyreonHTMLAttributes\n canvas: PyreonHTMLAttributes\n svg: SvgAttributes\n path: SvgAttributes\n circle: SvgAttributes\n ellipse: SvgAttributes\n line: SvgAttributes\n polyline: SvgAttributes\n polygon: SvgAttributes\n rect: SvgAttributes\n text: SvgAttributes\n tspan: SvgAttributes\n g: SvgAttributes\n defs: SvgAttributes\n use: SvgAttributes & { href?: string }\n symbol: SvgAttributes\n clipPath: SvgAttributes\n mask: SvgAttributes\n marker: SvgAttributes\n pattern: SvgAttributes\n linearGradient: SvgAttributes\n radialGradient: SvgAttributes\n stop: SvgAttributes & {\n offset?: string | number\n \"stop-color\"?: string\n \"stop-opacity\"?: string | number\n }\n // Interactive / embedding\n details: DetailsAttributes\n summary: PyreonHTMLAttributes\n dialog: DialogAttributes\n iframe: IframeAttributes\n embed: PyreonHTMLAttributes\n object: PyreonHTMLAttributes\n param: PyreonHTMLAttributes\n // Semantic / misc\n menu: PyreonHTMLAttributes\n menuitem: PyreonHTMLAttributes\n template: PyreonHTMLAttributes\n slot: PyreonHTMLAttributes\n portal: PyreonHTMLAttributes\n // Catch-all for custom elements and data-* attrs\n [tagName: string]: PyreonHTMLAttributes\n }\n }\n}\n"],"mappings":";;AAGA,MAAa,WAA0B,OAAO,kBAAkB;;;;;;;;;AAUhE,MAAa,cAAqB,EAAE;AAoBpC,SAAgB,EACd,MACA,OACA,GAAG,UACI;AACP,QAAO;EACC;EACN,OAAQ,SAAS;EACjB,UAAU,kBAAkB,SAAS;EACrC,KAAM,OAAO,OAAkC;EAChD;;AAGH,SAAS,kBAAkB,UAAsC;AAE/D,MAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,IACnC,KAAI,MAAM,QAAQ,SAAS,GAAG,CAC5B,QAAO,gBAAgB,SAAS;AAGpC,QAAO;;AAGT,SAAS,gBAAgB,UAAsC;CAC7D,MAAM,SAAuB,EAAE;AAC/B,MAAK,MAAM,SAAS,SAClB,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,KAAK,GAAG,gBAAgB,MAAsB,CAAC;KAEtD,QAAO,KAAK,MAAM;AAGtB,QAAO;;;;;;;;;;;;ACrDT,SAAgB,IACd,MACA,OACA,KACO;CACP,MAAM,EAAE,UAAU,GAAG,SAAS;CAC9B,MAAM,eAAgB,OAAO,OAAO;EAAE,GAAG;EAAM;EAAK,GAAG;AAEvD,KAAI,OAAO,SAAS,WAIlB,QAAO,EAAE,MADc,aAAa,SAAY;EAAE,GAAG;EAAc;EAAU,GAAG,aAClD;AAKhC,QAAO,EAAE,MAAM,cAAc,GADV,aAAa,SAAY,EAAE,GAAG,MAAM,QAAQ,SAAS,GAAG,WAAW,CAAC,SAAS,CACnC;;AAI/D,MAAa,OAAO"}
1
+ {"version":3,"file":"jsx-dev-runtime.js","names":[],"sources":["../src/h.ts","../src/jsx-runtime.ts"],"sourcesContent":["import type { ComponentFn, Props, VNode, VNodeChild } from \"./types\"\n\n/** Marker for fragment nodes — renders children without a wrapper element */\nexport const Fragment: unique symbol = Symbol(\"Pyreon.Fragment\")\n\n/**\n * Hyperscript function — the compiled output of JSX.\n * `<div class=\"x\">hello</div>` → `h(\"div\", { class: \"x\" }, \"hello\")`\n *\n * Generic on P so TypeScript validates props match the component's signature\n * at the call site, then stores the result in the loosely-typed VNode.\n */\n/** Shared empty props sentinel — identity-checked in mountElement to skip applyProps. */\nexport const EMPTY_PROPS: Props = {} as Props\n\n/** Makes `children` optional in P (if present) so it can be passed as rest args to h(). */\ntype PropsWithOptionalChildren<P extends Props> = Omit<P, \"children\"> &\n (\"children\" extends keyof P ? { children?: P[\"children\"] } : unknown)\n\n// Overload: component with typed props — children is optional in the props object\n// because it can be passed as rest args. Extra keys are allowed via `& Props`.\nexport function h<P extends Props>(\n type: ComponentFn<P>,\n props: (PropsWithOptionalChildren<P> & Props) | null,\n ...children: VNodeChild[]\n): VNode\n// Overload: intrinsic element, symbol, generic/dynamic component, or mixed union\n// biome-ignore lint/suspicious/noExplicitAny: accepts any component function for generic components like For<T>\nexport function h(\n type: string | ((props: any) => VNode | null) | symbol,\n props: Props | null,\n ...children: VNodeChild[]\n): VNode\nexport function h<P extends Props>(\n type: string | ComponentFn<P> | symbol,\n props: P | null,\n ...children: VNodeChild[]\n): VNode {\n return {\n type: type as string | ComponentFn | symbol,\n props: (props ?? EMPTY_PROPS) as Props,\n children: normalizeChildren(children),\n key: (props?.key as string | number | null) ?? null,\n }\n}\n\nfunction normalizeChildren(children: VNodeChild[]): VNodeChild[] {\n // Fast path: no nested arrays — return as-is without allocating\n for (let i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return flattenChildren(children)\n }\n }\n return children\n}\n\nfunction flattenChildren(children: VNodeChild[]): VNodeChild[] {\n const result: VNodeChild[] = []\n for (const child of children) {\n if (Array.isArray(child)) {\n result.push(...flattenChildren(child as VNodeChild[]))\n } else {\n result.push(child)\n }\n }\n return result\n}\n","/**\n * JSX automatic runtime.\n *\n * When tsconfig has `\"jsxImportSource\": \"@pyreon/core\"`, the TS/bundler compiler\n * rewrites JSX to imports from this file automatically:\n * <div class=\"x\" /> → jsx(\"div\", { class: \"x\" })\n */\nimport { Fragment, h } from \"./h\"\nimport type { ComponentFn, Props, VNode, VNodeChild } from \"./types\"\n\nexport { Fragment }\n\nexport function jsx(\n type: string | ComponentFn | symbol,\n props: Props & { children?: VNodeChild | VNodeChild[] },\n key?: string | number | null,\n): VNode {\n const { children, ...rest } = props\n const propsWithKey = (key != null ? { ...rest, key } : rest) as Props\n\n if (typeof type === \"function\") {\n // Component: keep children in props.children so the component function can access them.\n // Children must NOT be spread as h() rest args because mountComponent only passes vnode.props.\n const componentProps = children !== undefined ? { ...propsWithKey, children } : propsWithKey\n return h(type, componentProps)\n }\n\n // DOM element or symbol (Fragment, ForSymbol): children go in vnode.children\n const childArray = children === undefined ? [] : Array.isArray(children) ? children : [children]\n return h(type, propsWithKey, ...(childArray as VNodeChild[]))\n}\n\n// jsxs is called when there are multiple static children — same signature\nexport const jsxs = jsx\n\n// ─── JSX types ────────────────────────────────────────────────────────────────\n\ntype Booleanish = boolean | \"true\" | \"false\"\ntype StyleValue = string | Partial<CSSStyleDeclaration>\n\n/** Common HTML attributes accepted by all Pyreon elements */\ninterface PyreonHTMLAttributes {\n // Identity\n id?: string\n class?: string | (() => string)\n className?: string | (() => string)\n style?: StyleValue | (() => StyleValue)\n // pyreon-specific directives\n \"n-show\"?: boolean | (() => boolean)\n // Accessible\n role?: string\n tabIndex?: number | (() => number)\n title?: string\n lang?: string\n dir?: \"ltr\" | \"rtl\" | \"auto\"\n hidden?: boolean | (() => boolean)\n draggable?: Booleanish\n // ARIA\n \"aria-label\"?: string | (() => string)\n \"aria-hidden\"?: Booleanish | (() => Booleanish)\n \"aria-disabled\"?: Booleanish | (() => Booleanish)\n \"aria-expanded\"?: Booleanish | (() => Booleanish)\n \"aria-selected\"?: Booleanish | (() => Booleanish)\n \"aria-checked\"?: Booleanish | \"mixed\" | (() => Booleanish | \"mixed\")\n \"aria-current\"?: Booleanish | \"page\" | \"step\" | \"location\" | \"date\" | \"time\"\n \"aria-live\"?: \"off\" | \"assertive\" | \"polite\"\n \"aria-atomic\"?: Booleanish\n \"aria-busy\"?: Booleanish\n \"aria-controls\"?: string\n \"aria-describedby\"?: string\n \"aria-labelledby\"?: string\n \"aria-placeholder\"?: string\n \"aria-required\"?: Booleanish | (() => Booleanish)\n \"aria-invalid\"?: Booleanish | \"grammar\" | \"spelling\"\n \"aria-valuemin\"?: number\n \"aria-valuemax\"?: number\n \"aria-valuenow\"?: number\n \"aria-valuetext\"?: string\n \"aria-haspopup\"?: Booleanish | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\"\n \"aria-posinset\"?: number\n \"aria-setsize\"?: number\n \"aria-level\"?: number\n \"aria-multiline\"?: Booleanish\n \"aria-multiselectable\"?: Booleanish\n \"aria-orientation\"?: \"horizontal\" | \"vertical\"\n \"aria-readonly\"?: Booleanish | (() => Booleanish)\n \"aria-sort\"?: \"none\" | \"ascending\" | \"descending\" | \"other\"\n \"aria-autocomplete\"?: \"none\" | \"inline\" | \"list\" | \"both\"\n \"aria-colcount\"?: number\n \"aria-colindex\"?: number\n \"aria-colspan\"?: number\n \"aria-rowcount\"?: number\n \"aria-rowindex\"?: number\n \"aria-rowspan\"?: number\n // DOM lifecycle ref — object ref or callback ref\n ref?: { current: unknown } | ((el: Element | null) => void)\n // Key for list reconciliation\n key?: string | number\n // Children — allows null, undefined, boolean in JSX children positions\n children?: VNodeChild | VNodeChild[]\n // innerHTML\n innerHTML?: string\n dangerouslySetInnerHTML?: { __html: string }\n // Events\n onClick?: (e: MouseEvent) => void\n onDblClick?: (e: MouseEvent) => void\n onMouseDown?: (e: MouseEvent) => void\n onMouseUp?: (e: MouseEvent) => void\n onMouseEnter?: (e: MouseEvent) => void\n onMouseLeave?: (e: MouseEvent) => void\n onMouseMove?: (e: MouseEvent) => void\n onMouseOver?: (e: MouseEvent) => void\n onMouseOut?: (e: MouseEvent) => void\n onContextMenu?: (e: MouseEvent) => void\n onKeyDown?: (e: KeyboardEvent) => void\n onKeyUp?: (e: KeyboardEvent) => void\n onKeyPress?: (e: KeyboardEvent) => void\n onFocus?: (e: FocusEvent) => void\n onBlur?: (e: FocusEvent) => void\n onChange?: (e: Event) => void\n onInput?: (e: InputEvent) => void\n onSubmit?: (e: SubmitEvent) => void\n onReset?: (e: Event) => void\n onScroll?: (e: Event) => void\n onWheel?: (e: WheelEvent) => void\n onDragStart?: (e: DragEvent) => void\n onDragEnd?: (e: DragEvent) => void\n onDragOver?: (e: DragEvent) => void\n onDragEnter?: (e: DragEvent) => void\n onDragLeave?: (e: DragEvent) => void\n onDrop?: (e: DragEvent) => void\n onTouchStart?: (e: TouchEvent) => void\n onTouchEnd?: (e: TouchEvent) => void\n onTouchMove?: (e: TouchEvent) => void\n onPointerDown?: (e: PointerEvent) => void\n onPointerUp?: (e: PointerEvent) => void\n onPointerMove?: (e: PointerEvent) => void\n onPointerEnter?: (e: PointerEvent) => void\n onPointerLeave?: (e: PointerEvent) => void\n onPointerCancel?: (e: PointerEvent) => void\n onPointerOver?: (e: PointerEvent) => void\n onPointerOut?: (e: PointerEvent) => void\n onTransitionEnd?: (e: TransitionEvent) => void\n onAnimationStart?: (e: AnimationEvent) => void\n onAnimationEnd?: (e: AnimationEvent) => void\n onAnimationIteration?: (e: AnimationEvent) => void\n onLoad?: (e: Event) => void\n onError?: (e: Event | string) => void\n onAbort?: (e: Event) => void\n onSelect?: (e: Event) => void\n onCopy?: (e: ClipboardEvent) => void\n onCut?: (e: ClipboardEvent) => void\n onPaste?: (e: ClipboardEvent) => void\n // Catch-all for data-* and other arbitrary attributes\n [key: string]: unknown\n}\n\n/** Attributes specific to form inputs */\ninterface InputAttributes extends PyreonHTMLAttributes {\n type?: string | (() => string)\n value?: string | number | (() => string | number)\n defaultValue?: string | number\n checked?: boolean | (() => boolean)\n defaultChecked?: boolean\n placeholder?: string | (() => string)\n disabled?: boolean | (() => boolean)\n readOnly?: boolean\n required?: boolean | (() => boolean)\n min?: string | number\n max?: string | number\n step?: string | number\n minLength?: number\n maxLength?: number\n pattern?: string\n multiple?: boolean\n name?: string\n accept?: string\n autoComplete?: string\n autoFocus?: boolean\n form?: string\n list?: string\n size?: number\n src?: string | (() => string)\n alt?: string\n width?: number | string\n height?: number | string\n}\n\ninterface AnchorAttributes extends PyreonHTMLAttributes {\n href?: string | (() => string)\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | string\n rel?: string\n download?: string | boolean\n}\n\ninterface ButtonAttributes extends PyreonHTMLAttributes {\n type?: \"button\" | \"submit\" | \"reset\"\n disabled?: boolean | (() => boolean)\n name?: string\n value?: string\n form?: string\n formAction?: string\n formMethod?: string\n formEncType?: string\n formNoValidate?: boolean\n formTarget?: string\n}\n\ninterface TextareaAttributes extends PyreonHTMLAttributes {\n value?: string | (() => string)\n defaultValue?: string\n placeholder?: string | (() => string)\n disabled?: boolean | (() => boolean)\n readOnly?: boolean\n required?: boolean | (() => boolean)\n rows?: number\n cols?: number\n minLength?: number\n maxLength?: number\n name?: string\n autoFocus?: boolean\n form?: string\n wrap?: \"hard\" | \"soft\"\n}\n\ninterface SelectAttributes extends PyreonHTMLAttributes {\n value?: string | string[] | (() => string | string[])\n defaultValue?: string | string[]\n disabled?: boolean | (() => boolean)\n required?: boolean | (() => boolean)\n multiple?: boolean\n name?: string\n size?: number\n form?: string\n autoFocus?: boolean\n}\n\ninterface OptionAttributes extends PyreonHTMLAttributes {\n value?: string | number | (() => string | number)\n disabled?: boolean | (() => boolean)\n selected?: boolean | (() => boolean)\n label?: string\n}\n\ninterface FormAttributes extends PyreonHTMLAttributes {\n action?: string\n method?: \"get\" | \"post\"\n encType?: string\n noValidate?: boolean\n target?: string\n name?: string\n autoComplete?: string\n}\n\ninterface ImgAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n alt?: string | (() => string)\n width?: number | string | (() => number | string)\n height?: number | string | (() => number | string)\n loading?: \"lazy\" | \"eager\"\n decoding?: \"auto\" | \"async\" | \"sync\"\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n referrerPolicy?: string\n srcSet?: string\n sizes?: string\n}\n\ninterface VideoAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n width?: number | string\n height?: number | string\n controls?: boolean\n autoPlay?: boolean\n muted?: boolean\n loop?: boolean\n poster?: string\n preload?: \"none\" | \"metadata\" | \"auto\"\n playsInline?: boolean\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n}\n\ninterface AudioAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n controls?: boolean\n autoPlay?: boolean\n muted?: boolean\n loop?: boolean\n preload?: \"none\" | \"metadata\" | \"auto\"\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n}\n\ninterface LabelAttributes extends PyreonHTMLAttributes {\n htmlFor?: string\n for?: string\n form?: string\n}\n\ninterface ThAttributes extends PyreonHTMLAttributes {\n colSpan?: number\n rowSpan?: number\n scope?: \"col\" | \"row\" | \"colgroup\" | \"rowgroup\"\n abbr?: string\n headers?: string\n}\n\ninterface TdAttributes extends PyreonHTMLAttributes {\n colSpan?: number\n rowSpan?: number\n headers?: string\n}\n\ninterface ColAttributes extends PyreonHTMLAttributes {\n span?: number\n}\n\ninterface IframeAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n width?: number | string\n height?: number | string\n allow?: string\n allowFullScreen?: boolean\n loading?: \"lazy\" | \"eager\"\n name?: string\n sandbox?: string\n referrerPolicy?: string\n title?: string\n}\n\ninterface LinkAttributes extends PyreonHTMLAttributes {\n href?: string | (() => string)\n rel?: string\n type?: string\n as?: string\n media?: string\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n integrity?: string\n referrerPolicy?: string\n}\n\ninterface MetaAttributes extends PyreonHTMLAttributes {\n name?: string\n content?: string | (() => string)\n httpEquiv?: string\n charset?: string\n property?: string\n}\n\ninterface ScriptAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n type?: string\n async?: boolean\n defer?: boolean\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n integrity?: string\n noModule?: boolean\n referrerPolicy?: string\n}\n\ninterface SourceAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n type?: string\n srcSet?: string\n sizes?: string\n media?: string\n}\n\ninterface ProgressAttributes extends PyreonHTMLAttributes {\n value?: number | (() => number)\n max?: number\n}\n\ninterface MeterAttributes extends PyreonHTMLAttributes {\n value?: number | (() => number)\n min?: number\n max?: number\n low?: number\n high?: number\n optimum?: number\n}\n\ninterface DetailsAttributes extends PyreonHTMLAttributes {\n open?: boolean | (() => boolean)\n}\n\ninterface DialogAttributes extends PyreonHTMLAttributes {\n open?: boolean | (() => boolean)\n}\n\ninterface OlAttributes extends PyreonHTMLAttributes {\n start?: number\n reversed?: boolean\n type?: \"1\" | \"a\" | \"A\" | \"i\" | \"I\"\n}\n\ninterface SvgAttributes extends PyreonHTMLAttributes {\n viewBox?: string\n xmlns?: string\n fill?: string | (() => string)\n stroke?: string | (() => string)\n \"stroke-width\"?: string | number\n \"stroke-linecap\"?: \"butt\" | \"round\" | \"square\"\n \"stroke-linejoin\"?: \"miter\" | \"round\" | \"bevel\"\n \"fill-rule\"?: \"nonzero\" | \"evenodd\"\n \"clip-rule\"?: \"nonzero\" | \"evenodd\"\n \"clip-path\"?: string\n d?: string\n cx?: string | number\n cy?: string | number\n r?: string | number\n rx?: string | number\n ry?: string | number\n x?: string | number\n y?: string | number\n x1?: string | number\n y1?: string | number\n x2?: string | number\n y2?: string | number\n width?: string | number\n height?: string | number\n transform?: string | (() => string)\n opacity?: string | number | (() => string | number)\n points?: string\n \"font-size\"?: string | number\n \"text-anchor\"?: \"start\" | \"middle\" | \"end\"\n \"dominant-baseline\"?: string\n}\n\ndeclare global {\n namespace JSX {\n /** The type that JSX expressions evaluate to */\n type Element = import(\"./types\").VNode\n\n /**\n * Valid JSX tag types — intrinsic strings + component functions.\n * Components may return VNode, null, strings, functions (reactive getters), etc.\n * (TS 5.1+ feature)\n */\n type ElementType = keyof IntrinsicElements | ((props: any) => import(\"./types\").VNodeChild)\n\n /** Tells TS which prop name carries children in component calls */\n interface ElementChildrenAttribute {\n children: {}\n }\n\n interface IntrinsicElements {\n // Document structure\n html: PyreonHTMLAttributes\n head: PyreonHTMLAttributes\n body: PyreonHTMLAttributes\n title: PyreonHTMLAttributes\n base: PyreonHTMLAttributes\n meta: MetaAttributes\n link: LinkAttributes\n script: ScriptAttributes\n style: PyreonHTMLAttributes\n noscript: PyreonHTMLAttributes\n // Sections\n main: PyreonHTMLAttributes\n header: PyreonHTMLAttributes\n footer: PyreonHTMLAttributes\n nav: PyreonHTMLAttributes\n aside: PyreonHTMLAttributes\n section: PyreonHTMLAttributes\n article: PyreonHTMLAttributes\n address: PyreonHTMLAttributes\n h1: PyreonHTMLAttributes\n h2: PyreonHTMLAttributes\n h3: PyreonHTMLAttributes\n h4: PyreonHTMLAttributes\n h5: PyreonHTMLAttributes\n h6: PyreonHTMLAttributes\n hgroup: PyreonHTMLAttributes\n // Block text\n p: PyreonHTMLAttributes\n pre: PyreonHTMLAttributes\n blockquote: PyreonHTMLAttributes\n figure: PyreonHTMLAttributes\n figcaption: PyreonHTMLAttributes\n div: PyreonHTMLAttributes\n hr: PyreonHTMLAttributes\n // Inline text\n span: PyreonHTMLAttributes\n a: AnchorAttributes\n em: PyreonHTMLAttributes\n strong: PyreonHTMLAttributes\n small: PyreonHTMLAttributes\n s: PyreonHTMLAttributes\n cite: PyreonHTMLAttributes\n q: PyreonHTMLAttributes\n abbr: PyreonHTMLAttributes\n time: PyreonHTMLAttributes\n code: PyreonHTMLAttributes\n var: PyreonHTMLAttributes\n samp: PyreonHTMLAttributes\n kbd: PyreonHTMLAttributes\n mark: PyreonHTMLAttributes\n sub: PyreonHTMLAttributes\n sup: PyreonHTMLAttributes\n i: PyreonHTMLAttributes\n b: PyreonHTMLAttributes\n u: PyreonHTMLAttributes\n bdi: PyreonHTMLAttributes\n bdo: PyreonHTMLAttributes\n br: PyreonHTMLAttributes\n wbr: PyreonHTMLAttributes\n ruby: PyreonHTMLAttributes\n rt: PyreonHTMLAttributes\n rp: PyreonHTMLAttributes\n // Lists\n ul: PyreonHTMLAttributes\n ol: OlAttributes\n li: PyreonHTMLAttributes\n dl: PyreonHTMLAttributes\n dt: PyreonHTMLAttributes\n dd: PyreonHTMLAttributes\n // Forms\n form: FormAttributes\n label: LabelAttributes\n input: InputAttributes\n button: ButtonAttributes\n select: SelectAttributes\n datalist: PyreonHTMLAttributes\n optgroup: PyreonHTMLAttributes\n option: OptionAttributes\n textarea: TextareaAttributes\n output: PyreonHTMLAttributes\n progress: ProgressAttributes\n meter: MeterAttributes\n fieldset: PyreonHTMLAttributes\n legend: PyreonHTMLAttributes\n // Tables\n table: PyreonHTMLAttributes\n caption: PyreonHTMLAttributes\n colgroup: PyreonHTMLAttributes\n col: ColAttributes\n thead: PyreonHTMLAttributes\n tbody: PyreonHTMLAttributes\n tfoot: PyreonHTMLAttributes\n tr: PyreonHTMLAttributes\n th: ThAttributes\n td: TdAttributes\n // Media\n img: ImgAttributes\n video: VideoAttributes\n audio: AudioAttributes\n source: SourceAttributes\n track: PyreonHTMLAttributes\n picture: PyreonHTMLAttributes\n canvas: PyreonHTMLAttributes\n svg: SvgAttributes\n path: SvgAttributes\n circle: SvgAttributes\n ellipse: SvgAttributes\n line: SvgAttributes\n polyline: SvgAttributes\n polygon: SvgAttributes\n rect: SvgAttributes\n text: SvgAttributes\n tspan: SvgAttributes\n g: SvgAttributes\n defs: SvgAttributes\n use: SvgAttributes & { href?: string }\n symbol: SvgAttributes\n clipPath: SvgAttributes\n mask: SvgAttributes\n marker: SvgAttributes\n pattern: SvgAttributes\n linearGradient: SvgAttributes\n radialGradient: SvgAttributes\n stop: SvgAttributes & {\n offset?: string | number\n \"stop-color\"?: string\n \"stop-opacity\"?: string | number\n }\n // Interactive / embedding\n details: DetailsAttributes\n summary: PyreonHTMLAttributes\n dialog: DialogAttributes\n iframe: IframeAttributes\n embed: PyreonHTMLAttributes\n object: PyreonHTMLAttributes\n param: PyreonHTMLAttributes\n // Semantic / misc\n menu: PyreonHTMLAttributes\n menuitem: PyreonHTMLAttributes\n template: PyreonHTMLAttributes\n slot: PyreonHTMLAttributes\n portal: PyreonHTMLAttributes\n // Catch-all for custom elements and data-* attrs\n [tagName: string]: PyreonHTMLAttributes\n }\n }\n}\n"],"mappings":";;AAGA,MAAa,WAA0B,OAAO,kBAAkB;;;;;;;;;AAUhE,MAAa,cAAqB,EAAE;AAoBpC,SAAgB,EACd,MACA,OACA,GAAG,UACI;AACP,QAAO;EACC;EACN,OAAQ,SAAS;EACjB,UAAU,kBAAkB,SAAS;EACrC,KAAM,OAAO,OAAkC;EAChD;;AAGH,SAAS,kBAAkB,UAAsC;AAE/D,MAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,IACnC,KAAI,MAAM,QAAQ,SAAS,GAAG,CAC5B,QAAO,gBAAgB,SAAS;AAGpC,QAAO;;AAGT,SAAS,gBAAgB,UAAsC;CAC7D,MAAM,SAAuB,EAAE;AAC/B,MAAK,MAAM,SAAS,SAClB,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,KAAK,GAAG,gBAAgB,MAAsB,CAAC;KAEtD,QAAO,KAAK,MAAM;AAGtB,QAAO;;;;;;;;;;;;ACrDT,SAAgB,IACd,MACA,OACA,KACO;CACP,MAAM,EAAE,UAAU,GAAG,SAAS;CAC9B,MAAM,eAAgB,OAAO,OAAO;EAAE,GAAG;EAAM;EAAK,GAAG;AAEvD,KAAI,OAAO,SAAS,WAIlB,QAAO,EAAE,MADc,aAAa,SAAY;EAAE,GAAG;EAAc;EAAU,GAAG,aAClD;AAKhC,QAAO,EAAE,MAAM,cAAc,GADV,aAAa,SAAY,EAAE,GAAG,MAAM,QAAQ,SAAS,GAAG,WAAW,CAAC,SAAS,CACnC;;AAI/D,MAAa,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.js","names":[],"sources":["../src/h.ts","../src/jsx-runtime.ts"],"sourcesContent":["import type { ComponentFn, Props, VNode, VNodeChild } from \"./types\"\n\n/** Marker for fragment nodes — renders children without a wrapper element */\nexport const Fragment: unique symbol = Symbol(\"Pyreon.Fragment\")\n\n/**\n * Hyperscript function — the compiled output of JSX.\n * `<div class=\"x\">hello</div>` → `h(\"div\", { class: \"x\" }, \"hello\")`\n *\n * Generic on P so TypeScript validates props match the component's signature\n * at the call site, then stores the result in the loosely-typed VNode.\n */\n/** Shared empty props sentinel — identity-checked in mountElement to skip applyProps. */\nexport const EMPTY_PROPS: Props = {} as Props\n\n/** Makes `children` optional in P (if present) so it can be passed as rest args to h(). */\ntype PropsWithOptionalChildren<P extends Props> = Omit<P, \"children\"> &\n (\"children\" extends keyof P ? { children?: P[\"children\"] } : unknown)\n\n// Overload: component with typed props — children is optional in the props object\n// because it can be passed as rest args. Extra keys are allowed via `& Props`.\nexport function h<P extends Props>(\n type: ComponentFn<P>,\n props: (PropsWithOptionalChildren<P> & Props) | null,\n ...children: VNodeChild[]\n): VNode\n// Overload: intrinsic element, symbol, generic/dynamic component, or mixed union\n// biome-ignore lint/suspicious/noExplicitAny: accepts any component function for generic components like For<T>\nexport function h(\n type: string | ((props: any) => VNode | null) | symbol,\n props: Props | null,\n ...children: VNodeChild[]\n): VNode\nexport function h<P extends Props>(\n type: string | ComponentFn<P> | symbol,\n props: P | null,\n ...children: VNodeChild[]\n): VNode {\n return {\n type: type as string | ComponentFn | symbol,\n props: (props ?? EMPTY_PROPS) as Props,\n children: normalizeChildren(children),\n key: (props?.key as string | number | null) ?? null,\n }\n}\n\nfunction normalizeChildren(children: VNodeChild[]): VNodeChild[] {\n // Fast path: no nested arrays — return as-is without allocating\n for (let i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return flattenChildren(children)\n }\n }\n return children\n}\n\nfunction flattenChildren(children: VNodeChild[]): VNodeChild[] {\n const result: VNodeChild[] = []\n for (const child of children) {\n if (Array.isArray(child)) {\n result.push(...flattenChildren(child as VNodeChild[]))\n } else {\n result.push(child)\n }\n }\n return result\n}\n","/**\n * JSX automatic runtime.\n *\n * When tsconfig has `\"jsxImportSource\": \"@pyreon/core\"`, the TS/bundler compiler\n * rewrites JSX to imports from this file automatically:\n * <div class=\"x\" /> → jsx(\"div\", { class: \"x\" })\n */\nimport { Fragment, h } from \"./h\"\nimport type { ComponentFn, Props, VNode, VNodeChild } from \"./types\"\n\nexport { Fragment }\n\nexport function jsx(\n type: string | ComponentFn | symbol,\n props: Props & { children?: VNodeChild | VNodeChild[] },\n key?: string | number | null,\n): VNode {\n const { children, ...rest } = props\n const propsWithKey = (key != null ? { ...rest, key } : rest) as Props\n\n if (typeof type === \"function\") {\n // Component: keep children in props.children so the component function can access them.\n // Children must NOT be spread as h() rest args because mountComponent only passes vnode.props.\n const componentProps = children !== undefined ? { ...propsWithKey, children } : propsWithKey\n return h(type, componentProps)\n }\n\n // DOM element or symbol (Fragment, ForSymbol): children go in vnode.children\n const childArray = children === undefined ? [] : Array.isArray(children) ? children : [children]\n return h(type, propsWithKey, ...(childArray as VNodeChild[]))\n}\n\n// jsxs is called when there are multiple static children — same signature\nexport const jsxs = jsx\n\n// ─── JSX types ────────────────────────────────────────────────────────────────\n\ntype Booleanish = boolean | \"true\" | \"false\"\ntype StyleValue = string | Partial<CSSStyleDeclaration>\n\n/** Common HTML attributes accepted by all Pyreon elements */\ninterface PyreonHTMLAttributes {\n // Identity\n id?: string\n class?: string | (() => string)\n className?: string | (() => string)\n style?: StyleValue | (() => StyleValue)\n // pyreon-specific directives\n \"n-show\"?: boolean | (() => boolean)\n // Accessible\n role?: string\n tabIndex?: number | (() => number)\n title?: string\n lang?: string\n dir?: \"ltr\" | \"rtl\" | \"auto\"\n hidden?: boolean | (() => boolean)\n draggable?: Booleanish\n // ARIA\n \"aria-label\"?: string | (() => string)\n \"aria-hidden\"?: Booleanish | (() => Booleanish)\n \"aria-disabled\"?: Booleanish | (() => Booleanish)\n \"aria-expanded\"?: Booleanish | (() => Booleanish)\n \"aria-selected\"?: Booleanish | (() => Booleanish)\n \"aria-checked\"?: Booleanish | \"mixed\" | (() => Booleanish | \"mixed\")\n \"aria-current\"?: Booleanish | \"page\" | \"step\" | \"location\" | \"date\" | \"time\"\n \"aria-live\"?: \"off\" | \"assertive\" | \"polite\"\n \"aria-atomic\"?: Booleanish\n \"aria-busy\"?: Booleanish\n \"aria-controls\"?: string\n \"aria-describedby\"?: string\n \"aria-labelledby\"?: string\n \"aria-placeholder\"?: string\n \"aria-required\"?: Booleanish | (() => Booleanish)\n \"aria-invalid\"?: Booleanish | \"grammar\" | \"spelling\"\n \"aria-valuemin\"?: number\n \"aria-valuemax\"?: number\n \"aria-valuenow\"?: number\n \"aria-valuetext\"?: string\n \"aria-haspopup\"?: Booleanish | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\"\n \"aria-posinset\"?: number\n \"aria-setsize\"?: number\n \"aria-level\"?: number\n \"aria-multiline\"?: Booleanish\n \"aria-multiselectable\"?: Booleanish\n \"aria-orientation\"?: \"horizontal\" | \"vertical\"\n \"aria-readonly\"?: Booleanish | (() => Booleanish)\n \"aria-sort\"?: \"none\" | \"ascending\" | \"descending\" | \"other\"\n \"aria-autocomplete\"?: \"none\" | \"inline\" | \"list\" | \"both\"\n \"aria-colcount\"?: number\n \"aria-colindex\"?: number\n \"aria-colspan\"?: number\n \"aria-rowcount\"?: number\n \"aria-rowindex\"?: number\n \"aria-rowspan\"?: number\n // DOM lifecycle ref — object ref or callback ref\n ref?: { current: unknown } | ((el: Element) => void)\n // Key for list reconciliation\n key?: string | number\n // Children — allows null, undefined, boolean in JSX children positions\n children?: VNodeChild | VNodeChild[]\n // innerHTML\n innerHTML?: string\n dangerouslySetInnerHTML?: { __html: string }\n // Events\n onClick?: (e: MouseEvent) => void\n onDblClick?: (e: MouseEvent) => void\n onMouseDown?: (e: MouseEvent) => void\n onMouseUp?: (e: MouseEvent) => void\n onMouseEnter?: (e: MouseEvent) => void\n onMouseLeave?: (e: MouseEvent) => void\n onMouseMove?: (e: MouseEvent) => void\n onMouseOver?: (e: MouseEvent) => void\n onMouseOut?: (e: MouseEvent) => void\n onContextMenu?: (e: MouseEvent) => void\n onKeyDown?: (e: KeyboardEvent) => void\n onKeyUp?: (e: KeyboardEvent) => void\n onKeyPress?: (e: KeyboardEvent) => void\n onFocus?: (e: FocusEvent) => void\n onBlur?: (e: FocusEvent) => void\n onChange?: (e: Event) => void\n onInput?: (e: InputEvent) => void\n onSubmit?: (e: SubmitEvent) => void\n onReset?: (e: Event) => void\n onScroll?: (e: Event) => void\n onWheel?: (e: WheelEvent) => void\n onDragStart?: (e: DragEvent) => void\n onDragEnd?: (e: DragEvent) => void\n onDragOver?: (e: DragEvent) => void\n onDragEnter?: (e: DragEvent) => void\n onDragLeave?: (e: DragEvent) => void\n onDrop?: (e: DragEvent) => void\n onTouchStart?: (e: TouchEvent) => void\n onTouchEnd?: (e: TouchEvent) => void\n onTouchMove?: (e: TouchEvent) => void\n onPointerDown?: (e: PointerEvent) => void\n onPointerUp?: (e: PointerEvent) => void\n onPointerMove?: (e: PointerEvent) => void\n onPointerEnter?: (e: PointerEvent) => void\n onPointerLeave?: (e: PointerEvent) => void\n onPointerCancel?: (e: PointerEvent) => void\n onPointerOver?: (e: PointerEvent) => void\n onPointerOut?: (e: PointerEvent) => void\n onTransitionEnd?: (e: TransitionEvent) => void\n onAnimationStart?: (e: AnimationEvent) => void\n onAnimationEnd?: (e: AnimationEvent) => void\n onAnimationIteration?: (e: AnimationEvent) => void\n onLoad?: (e: Event) => void\n onError?: (e: Event | string) => void\n onAbort?: (e: Event) => void\n onSelect?: (e: Event) => void\n onCopy?: (e: ClipboardEvent) => void\n onCut?: (e: ClipboardEvent) => void\n onPaste?: (e: ClipboardEvent) => void\n // Catch-all for data-* and other arbitrary attributes\n [key: string]: unknown\n}\n\n/** Attributes specific to form inputs */\ninterface InputAttributes extends PyreonHTMLAttributes {\n type?: string | (() => string)\n value?: string | number | (() => string | number)\n defaultValue?: string | number\n checked?: boolean | (() => boolean)\n defaultChecked?: boolean\n placeholder?: string | (() => string)\n disabled?: boolean | (() => boolean)\n readOnly?: boolean\n required?: boolean | (() => boolean)\n min?: string | number\n max?: string | number\n step?: string | number\n minLength?: number\n maxLength?: number\n pattern?: string\n multiple?: boolean\n name?: string\n accept?: string\n autoComplete?: string\n autoFocus?: boolean\n form?: string\n list?: string\n size?: number\n src?: string | (() => string)\n alt?: string\n width?: number | string\n height?: number | string\n}\n\ninterface AnchorAttributes extends PyreonHTMLAttributes {\n href?: string | (() => string)\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | string\n rel?: string\n download?: string | boolean\n}\n\ninterface ButtonAttributes extends PyreonHTMLAttributes {\n type?: \"button\" | \"submit\" | \"reset\"\n disabled?: boolean | (() => boolean)\n name?: string\n value?: string\n form?: string\n formAction?: string\n formMethod?: string\n formEncType?: string\n formNoValidate?: boolean\n formTarget?: string\n}\n\ninterface TextareaAttributes extends PyreonHTMLAttributes {\n value?: string | (() => string)\n defaultValue?: string\n placeholder?: string | (() => string)\n disabled?: boolean | (() => boolean)\n readOnly?: boolean\n required?: boolean | (() => boolean)\n rows?: number\n cols?: number\n minLength?: number\n maxLength?: number\n name?: string\n autoFocus?: boolean\n form?: string\n wrap?: \"hard\" | \"soft\"\n}\n\ninterface SelectAttributes extends PyreonHTMLAttributes {\n value?: string | string[] | (() => string | string[])\n defaultValue?: string | string[]\n disabled?: boolean | (() => boolean)\n required?: boolean | (() => boolean)\n multiple?: boolean\n name?: string\n size?: number\n form?: string\n autoFocus?: boolean\n}\n\ninterface OptionAttributes extends PyreonHTMLAttributes {\n value?: string | number | (() => string | number)\n disabled?: boolean | (() => boolean)\n selected?: boolean | (() => boolean)\n label?: string\n}\n\ninterface FormAttributes extends PyreonHTMLAttributes {\n action?: string\n method?: \"get\" | \"post\"\n encType?: string\n noValidate?: boolean\n target?: string\n name?: string\n autoComplete?: string\n}\n\ninterface ImgAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n alt?: string | (() => string)\n width?: number | string | (() => number | string)\n height?: number | string | (() => number | string)\n loading?: \"lazy\" | \"eager\"\n decoding?: \"auto\" | \"async\" | \"sync\"\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n referrerPolicy?: string\n srcSet?: string\n sizes?: string\n}\n\ninterface VideoAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n width?: number | string\n height?: number | string\n controls?: boolean\n autoPlay?: boolean\n muted?: boolean\n loop?: boolean\n poster?: string\n preload?: \"none\" | \"metadata\" | \"auto\"\n playsInline?: boolean\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n}\n\ninterface AudioAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n controls?: boolean\n autoPlay?: boolean\n muted?: boolean\n loop?: boolean\n preload?: \"none\" | \"metadata\" | \"auto\"\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n}\n\ninterface LabelAttributes extends PyreonHTMLAttributes {\n htmlFor?: string\n for?: string\n form?: string\n}\n\ninterface ThAttributes extends PyreonHTMLAttributes {\n colSpan?: number\n rowSpan?: number\n scope?: \"col\" | \"row\" | \"colgroup\" | \"rowgroup\"\n abbr?: string\n headers?: string\n}\n\ninterface TdAttributes extends PyreonHTMLAttributes {\n colSpan?: number\n rowSpan?: number\n headers?: string\n}\n\ninterface ColAttributes extends PyreonHTMLAttributes {\n span?: number\n}\n\ninterface IframeAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n width?: number | string\n height?: number | string\n allow?: string\n allowFullScreen?: boolean\n loading?: \"lazy\" | \"eager\"\n name?: string\n sandbox?: string\n referrerPolicy?: string\n title?: string\n}\n\ninterface LinkAttributes extends PyreonHTMLAttributes {\n href?: string | (() => string)\n rel?: string\n type?: string\n as?: string\n media?: string\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n integrity?: string\n referrerPolicy?: string\n}\n\ninterface MetaAttributes extends PyreonHTMLAttributes {\n name?: string\n content?: string | (() => string)\n httpEquiv?: string\n charset?: string\n property?: string\n}\n\ninterface ScriptAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n type?: string\n async?: boolean\n defer?: boolean\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n integrity?: string\n noModule?: boolean\n referrerPolicy?: string\n}\n\ninterface SourceAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n type?: string\n srcSet?: string\n sizes?: string\n media?: string\n}\n\ninterface ProgressAttributes extends PyreonHTMLAttributes {\n value?: number | (() => number)\n max?: number\n}\n\ninterface MeterAttributes extends PyreonHTMLAttributes {\n value?: number | (() => number)\n min?: number\n max?: number\n low?: number\n high?: number\n optimum?: number\n}\n\ninterface DetailsAttributes extends PyreonHTMLAttributes {\n open?: boolean | (() => boolean)\n}\n\ninterface DialogAttributes extends PyreonHTMLAttributes {\n open?: boolean | (() => boolean)\n}\n\ninterface OlAttributes extends PyreonHTMLAttributes {\n start?: number\n reversed?: boolean\n type?: \"1\" | \"a\" | \"A\" | \"i\" | \"I\"\n}\n\ninterface SvgAttributes extends PyreonHTMLAttributes {\n viewBox?: string\n xmlns?: string\n fill?: string | (() => string)\n stroke?: string | (() => string)\n \"stroke-width\"?: string | number\n \"stroke-linecap\"?: \"butt\" | \"round\" | \"square\"\n \"stroke-linejoin\"?: \"miter\" | \"round\" | \"bevel\"\n \"fill-rule\"?: \"nonzero\" | \"evenodd\"\n \"clip-rule\"?: \"nonzero\" | \"evenodd\"\n \"clip-path\"?: string\n d?: string\n cx?: string | number\n cy?: string | number\n r?: string | number\n rx?: string | number\n ry?: string | number\n x?: string | number\n y?: string | number\n x1?: string | number\n y1?: string | number\n x2?: string | number\n y2?: string | number\n width?: string | number\n height?: string | number\n transform?: string | (() => string)\n opacity?: string | number | (() => string | number)\n points?: string\n \"font-size\"?: string | number\n \"text-anchor\"?: \"start\" | \"middle\" | \"end\"\n \"dominant-baseline\"?: string\n}\n\ndeclare global {\n namespace JSX {\n /** The type that JSX expressions evaluate to */\n type Element = import(\"./types\").VNode\n\n /**\n * Valid JSX tag types — intrinsic strings + component functions.\n * Components may return VNode, null, strings, functions (reactive getters), etc.\n * (TS 5.1+ feature)\n */\n type ElementType = keyof IntrinsicElements | ((props: any) => import(\"./types\").VNodeChild)\n\n /** Tells TS which prop name carries children in component calls */\n interface ElementChildrenAttribute {\n children: {}\n }\n\n interface IntrinsicElements {\n // Document structure\n html: PyreonHTMLAttributes\n head: PyreonHTMLAttributes\n body: PyreonHTMLAttributes\n title: PyreonHTMLAttributes\n base: PyreonHTMLAttributes\n meta: MetaAttributes\n link: LinkAttributes\n script: ScriptAttributes\n style: PyreonHTMLAttributes\n noscript: PyreonHTMLAttributes\n // Sections\n main: PyreonHTMLAttributes\n header: PyreonHTMLAttributes\n footer: PyreonHTMLAttributes\n nav: PyreonHTMLAttributes\n aside: PyreonHTMLAttributes\n section: PyreonHTMLAttributes\n article: PyreonHTMLAttributes\n address: PyreonHTMLAttributes\n h1: PyreonHTMLAttributes\n h2: PyreonHTMLAttributes\n h3: PyreonHTMLAttributes\n h4: PyreonHTMLAttributes\n h5: PyreonHTMLAttributes\n h6: PyreonHTMLAttributes\n hgroup: PyreonHTMLAttributes\n // Block text\n p: PyreonHTMLAttributes\n pre: PyreonHTMLAttributes\n blockquote: PyreonHTMLAttributes\n figure: PyreonHTMLAttributes\n figcaption: PyreonHTMLAttributes\n div: PyreonHTMLAttributes\n hr: PyreonHTMLAttributes\n // Inline text\n span: PyreonHTMLAttributes\n a: AnchorAttributes\n em: PyreonHTMLAttributes\n strong: PyreonHTMLAttributes\n small: PyreonHTMLAttributes\n s: PyreonHTMLAttributes\n cite: PyreonHTMLAttributes\n q: PyreonHTMLAttributes\n abbr: PyreonHTMLAttributes\n time: PyreonHTMLAttributes\n code: PyreonHTMLAttributes\n var: PyreonHTMLAttributes\n samp: PyreonHTMLAttributes\n kbd: PyreonHTMLAttributes\n mark: PyreonHTMLAttributes\n sub: PyreonHTMLAttributes\n sup: PyreonHTMLAttributes\n i: PyreonHTMLAttributes\n b: PyreonHTMLAttributes\n u: PyreonHTMLAttributes\n bdi: PyreonHTMLAttributes\n bdo: PyreonHTMLAttributes\n br: PyreonHTMLAttributes\n wbr: PyreonHTMLAttributes\n ruby: PyreonHTMLAttributes\n rt: PyreonHTMLAttributes\n rp: PyreonHTMLAttributes\n // Lists\n ul: PyreonHTMLAttributes\n ol: OlAttributes\n li: PyreonHTMLAttributes\n dl: PyreonHTMLAttributes\n dt: PyreonHTMLAttributes\n dd: PyreonHTMLAttributes\n // Forms\n form: FormAttributes\n label: LabelAttributes\n input: InputAttributes\n button: ButtonAttributes\n select: SelectAttributes\n datalist: PyreonHTMLAttributes\n optgroup: PyreonHTMLAttributes\n option: OptionAttributes\n textarea: TextareaAttributes\n output: PyreonHTMLAttributes\n progress: ProgressAttributes\n meter: MeterAttributes\n fieldset: PyreonHTMLAttributes\n legend: PyreonHTMLAttributes\n // Tables\n table: PyreonHTMLAttributes\n caption: PyreonHTMLAttributes\n colgroup: PyreonHTMLAttributes\n col: ColAttributes\n thead: PyreonHTMLAttributes\n tbody: PyreonHTMLAttributes\n tfoot: PyreonHTMLAttributes\n tr: PyreonHTMLAttributes\n th: ThAttributes\n td: TdAttributes\n // Media\n img: ImgAttributes\n video: VideoAttributes\n audio: AudioAttributes\n source: SourceAttributes\n track: PyreonHTMLAttributes\n picture: PyreonHTMLAttributes\n canvas: PyreonHTMLAttributes\n svg: SvgAttributes\n path: SvgAttributes\n circle: SvgAttributes\n ellipse: SvgAttributes\n line: SvgAttributes\n polyline: SvgAttributes\n polygon: SvgAttributes\n rect: SvgAttributes\n text: SvgAttributes\n tspan: SvgAttributes\n g: SvgAttributes\n defs: SvgAttributes\n use: SvgAttributes & { href?: string }\n symbol: SvgAttributes\n clipPath: SvgAttributes\n mask: SvgAttributes\n marker: SvgAttributes\n pattern: SvgAttributes\n linearGradient: SvgAttributes\n radialGradient: SvgAttributes\n stop: SvgAttributes & {\n offset?: string | number\n \"stop-color\"?: string\n \"stop-opacity\"?: string | number\n }\n // Interactive / embedding\n details: DetailsAttributes\n summary: PyreonHTMLAttributes\n dialog: DialogAttributes\n iframe: IframeAttributes\n embed: PyreonHTMLAttributes\n object: PyreonHTMLAttributes\n param: PyreonHTMLAttributes\n // Semantic / misc\n menu: PyreonHTMLAttributes\n menuitem: PyreonHTMLAttributes\n template: PyreonHTMLAttributes\n slot: PyreonHTMLAttributes\n portal: PyreonHTMLAttributes\n // Catch-all for custom elements and data-* attrs\n [tagName: string]: PyreonHTMLAttributes\n }\n }\n}\n"],"mappings":";;AAGA,MAAa,WAA0B,OAAO,kBAAkB;;;;;;;;;AAUhE,MAAa,cAAqB,EAAE;AAoBpC,SAAgB,EACd,MACA,OACA,GAAG,UACI;AACP,QAAO;EACC;EACN,OAAQ,SAAS;EACjB,UAAU,kBAAkB,SAAS;EACrC,KAAM,OAAO,OAAkC;EAChD;;AAGH,SAAS,kBAAkB,UAAsC;AAE/D,MAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,IACnC,KAAI,MAAM,QAAQ,SAAS,GAAG,CAC5B,QAAO,gBAAgB,SAAS;AAGpC,QAAO;;AAGT,SAAS,gBAAgB,UAAsC;CAC7D,MAAM,SAAuB,EAAE;AAC/B,MAAK,MAAM,SAAS,SAClB,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,KAAK,GAAG,gBAAgB,MAAsB,CAAC;KAEtD,QAAO,KAAK,MAAM;AAGtB,QAAO;;;;;;;;;;;;ACrDT,SAAgB,IACd,MACA,OACA,KACO;CACP,MAAM,EAAE,UAAU,GAAG,SAAS;CAC9B,MAAM,eAAgB,OAAO,OAAO;EAAE,GAAG;EAAM;EAAK,GAAG;AAEvD,KAAI,OAAO,SAAS,WAIlB,QAAO,EAAE,MADc,aAAa,SAAY;EAAE,GAAG;EAAc;EAAU,GAAG,aAClD;AAKhC,QAAO,EAAE,MAAM,cAAc,GADV,aAAa,SAAY,EAAE,GAAG,MAAM,QAAQ,SAAS,GAAG,WAAW,CAAC,SAAS,CACnC;;AAI/D,MAAa,OAAO"}
1
+ {"version":3,"file":"jsx-runtime.js","names":[],"sources":["../src/h.ts","../src/jsx-runtime.ts"],"sourcesContent":["import type { ComponentFn, Props, VNode, VNodeChild } from \"./types\"\n\n/** Marker for fragment nodes — renders children without a wrapper element */\nexport const Fragment: unique symbol = Symbol(\"Pyreon.Fragment\")\n\n/**\n * Hyperscript function — the compiled output of JSX.\n * `<div class=\"x\">hello</div>` → `h(\"div\", { class: \"x\" }, \"hello\")`\n *\n * Generic on P so TypeScript validates props match the component's signature\n * at the call site, then stores the result in the loosely-typed VNode.\n */\n/** Shared empty props sentinel — identity-checked in mountElement to skip applyProps. */\nexport const EMPTY_PROPS: Props = {} as Props\n\n/** Makes `children` optional in P (if present) so it can be passed as rest args to h(). */\ntype PropsWithOptionalChildren<P extends Props> = Omit<P, \"children\"> &\n (\"children\" extends keyof P ? { children?: P[\"children\"] } : unknown)\n\n// Overload: component with typed props — children is optional in the props object\n// because it can be passed as rest args. Extra keys are allowed via `& Props`.\nexport function h<P extends Props>(\n type: ComponentFn<P>,\n props: (PropsWithOptionalChildren<P> & Props) | null,\n ...children: VNodeChild[]\n): VNode\n// Overload: intrinsic element, symbol, generic/dynamic component, or mixed union\n// biome-ignore lint/suspicious/noExplicitAny: accepts any component function for generic components like For<T>\nexport function h(\n type: string | ((props: any) => VNode | null) | symbol,\n props: Props | null,\n ...children: VNodeChild[]\n): VNode\nexport function h<P extends Props>(\n type: string | ComponentFn<P> | symbol,\n props: P | null,\n ...children: VNodeChild[]\n): VNode {\n return {\n type: type as string | ComponentFn | symbol,\n props: (props ?? EMPTY_PROPS) as Props,\n children: normalizeChildren(children),\n key: (props?.key as string | number | null) ?? null,\n }\n}\n\nfunction normalizeChildren(children: VNodeChild[]): VNodeChild[] {\n // Fast path: no nested arrays — return as-is without allocating\n for (let i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return flattenChildren(children)\n }\n }\n return children\n}\n\nfunction flattenChildren(children: VNodeChild[]): VNodeChild[] {\n const result: VNodeChild[] = []\n for (const child of children) {\n if (Array.isArray(child)) {\n result.push(...flattenChildren(child as VNodeChild[]))\n } else {\n result.push(child)\n }\n }\n return result\n}\n","/**\n * JSX automatic runtime.\n *\n * When tsconfig has `\"jsxImportSource\": \"@pyreon/core\"`, the TS/bundler compiler\n * rewrites JSX to imports from this file automatically:\n * <div class=\"x\" /> → jsx(\"div\", { class: \"x\" })\n */\nimport { Fragment, h } from \"./h\"\nimport type { ComponentFn, Props, VNode, VNodeChild } from \"./types\"\n\nexport { Fragment }\n\nexport function jsx(\n type: string | ComponentFn | symbol,\n props: Props & { children?: VNodeChild | VNodeChild[] },\n key?: string | number | null,\n): VNode {\n const { children, ...rest } = props\n const propsWithKey = (key != null ? { ...rest, key } : rest) as Props\n\n if (typeof type === \"function\") {\n // Component: keep children in props.children so the component function can access them.\n // Children must NOT be spread as h() rest args because mountComponent only passes vnode.props.\n const componentProps = children !== undefined ? { ...propsWithKey, children } : propsWithKey\n return h(type, componentProps)\n }\n\n // DOM element or symbol (Fragment, ForSymbol): children go in vnode.children\n const childArray = children === undefined ? [] : Array.isArray(children) ? children : [children]\n return h(type, propsWithKey, ...(childArray as VNodeChild[]))\n}\n\n// jsxs is called when there are multiple static children — same signature\nexport const jsxs = jsx\n\n// ─── JSX types ────────────────────────────────────────────────────────────────\n\ntype Booleanish = boolean | \"true\" | \"false\"\ntype StyleValue = string | Partial<CSSStyleDeclaration>\n\n/** Common HTML attributes accepted by all Pyreon elements */\ninterface PyreonHTMLAttributes {\n // Identity\n id?: string\n class?: string | (() => string)\n className?: string | (() => string)\n style?: StyleValue | (() => StyleValue)\n // pyreon-specific directives\n \"n-show\"?: boolean | (() => boolean)\n // Accessible\n role?: string\n tabIndex?: number | (() => number)\n title?: string\n lang?: string\n dir?: \"ltr\" | \"rtl\" | \"auto\"\n hidden?: boolean | (() => boolean)\n draggable?: Booleanish\n // ARIA\n \"aria-label\"?: string | (() => string)\n \"aria-hidden\"?: Booleanish | (() => Booleanish)\n \"aria-disabled\"?: Booleanish | (() => Booleanish)\n \"aria-expanded\"?: Booleanish | (() => Booleanish)\n \"aria-selected\"?: Booleanish | (() => Booleanish)\n \"aria-checked\"?: Booleanish | \"mixed\" | (() => Booleanish | \"mixed\")\n \"aria-current\"?: Booleanish | \"page\" | \"step\" | \"location\" | \"date\" | \"time\"\n \"aria-live\"?: \"off\" | \"assertive\" | \"polite\"\n \"aria-atomic\"?: Booleanish\n \"aria-busy\"?: Booleanish\n \"aria-controls\"?: string\n \"aria-describedby\"?: string\n \"aria-labelledby\"?: string\n \"aria-placeholder\"?: string\n \"aria-required\"?: Booleanish | (() => Booleanish)\n \"aria-invalid\"?: Booleanish | \"grammar\" | \"spelling\"\n \"aria-valuemin\"?: number\n \"aria-valuemax\"?: number\n \"aria-valuenow\"?: number\n \"aria-valuetext\"?: string\n \"aria-haspopup\"?: Booleanish | \"menu\" | \"listbox\" | \"tree\" | \"grid\" | \"dialog\"\n \"aria-posinset\"?: number\n \"aria-setsize\"?: number\n \"aria-level\"?: number\n \"aria-multiline\"?: Booleanish\n \"aria-multiselectable\"?: Booleanish\n \"aria-orientation\"?: \"horizontal\" | \"vertical\"\n \"aria-readonly\"?: Booleanish | (() => Booleanish)\n \"aria-sort\"?: \"none\" | \"ascending\" | \"descending\" | \"other\"\n \"aria-autocomplete\"?: \"none\" | \"inline\" | \"list\" | \"both\"\n \"aria-colcount\"?: number\n \"aria-colindex\"?: number\n \"aria-colspan\"?: number\n \"aria-rowcount\"?: number\n \"aria-rowindex\"?: number\n \"aria-rowspan\"?: number\n // DOM lifecycle ref — object ref or callback ref\n ref?: { current: unknown } | ((el: Element | null) => void)\n // Key for list reconciliation\n key?: string | number\n // Children — allows null, undefined, boolean in JSX children positions\n children?: VNodeChild | VNodeChild[]\n // innerHTML\n innerHTML?: string\n dangerouslySetInnerHTML?: { __html: string }\n // Events\n onClick?: (e: MouseEvent) => void\n onDblClick?: (e: MouseEvent) => void\n onMouseDown?: (e: MouseEvent) => void\n onMouseUp?: (e: MouseEvent) => void\n onMouseEnter?: (e: MouseEvent) => void\n onMouseLeave?: (e: MouseEvent) => void\n onMouseMove?: (e: MouseEvent) => void\n onMouseOver?: (e: MouseEvent) => void\n onMouseOut?: (e: MouseEvent) => void\n onContextMenu?: (e: MouseEvent) => void\n onKeyDown?: (e: KeyboardEvent) => void\n onKeyUp?: (e: KeyboardEvent) => void\n onKeyPress?: (e: KeyboardEvent) => void\n onFocus?: (e: FocusEvent) => void\n onBlur?: (e: FocusEvent) => void\n onChange?: (e: Event) => void\n onInput?: (e: InputEvent) => void\n onSubmit?: (e: SubmitEvent) => void\n onReset?: (e: Event) => void\n onScroll?: (e: Event) => void\n onWheel?: (e: WheelEvent) => void\n onDragStart?: (e: DragEvent) => void\n onDragEnd?: (e: DragEvent) => void\n onDragOver?: (e: DragEvent) => void\n onDragEnter?: (e: DragEvent) => void\n onDragLeave?: (e: DragEvent) => void\n onDrop?: (e: DragEvent) => void\n onTouchStart?: (e: TouchEvent) => void\n onTouchEnd?: (e: TouchEvent) => void\n onTouchMove?: (e: TouchEvent) => void\n onPointerDown?: (e: PointerEvent) => void\n onPointerUp?: (e: PointerEvent) => void\n onPointerMove?: (e: PointerEvent) => void\n onPointerEnter?: (e: PointerEvent) => void\n onPointerLeave?: (e: PointerEvent) => void\n onPointerCancel?: (e: PointerEvent) => void\n onPointerOver?: (e: PointerEvent) => void\n onPointerOut?: (e: PointerEvent) => void\n onTransitionEnd?: (e: TransitionEvent) => void\n onAnimationStart?: (e: AnimationEvent) => void\n onAnimationEnd?: (e: AnimationEvent) => void\n onAnimationIteration?: (e: AnimationEvent) => void\n onLoad?: (e: Event) => void\n onError?: (e: Event | string) => void\n onAbort?: (e: Event) => void\n onSelect?: (e: Event) => void\n onCopy?: (e: ClipboardEvent) => void\n onCut?: (e: ClipboardEvent) => void\n onPaste?: (e: ClipboardEvent) => void\n // Catch-all for data-* and other arbitrary attributes\n [key: string]: unknown\n}\n\n/** Attributes specific to form inputs */\ninterface InputAttributes extends PyreonHTMLAttributes {\n type?: string | (() => string)\n value?: string | number | (() => string | number)\n defaultValue?: string | number\n checked?: boolean | (() => boolean)\n defaultChecked?: boolean\n placeholder?: string | (() => string)\n disabled?: boolean | (() => boolean)\n readOnly?: boolean\n required?: boolean | (() => boolean)\n min?: string | number\n max?: string | number\n step?: string | number\n minLength?: number\n maxLength?: number\n pattern?: string\n multiple?: boolean\n name?: string\n accept?: string\n autoComplete?: string\n autoFocus?: boolean\n form?: string\n list?: string\n size?: number\n src?: string | (() => string)\n alt?: string\n width?: number | string\n height?: number | string\n}\n\ninterface AnchorAttributes extends PyreonHTMLAttributes {\n href?: string | (() => string)\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\" | string\n rel?: string\n download?: string | boolean\n}\n\ninterface ButtonAttributes extends PyreonHTMLAttributes {\n type?: \"button\" | \"submit\" | \"reset\"\n disabled?: boolean | (() => boolean)\n name?: string\n value?: string\n form?: string\n formAction?: string\n formMethod?: string\n formEncType?: string\n formNoValidate?: boolean\n formTarget?: string\n}\n\ninterface TextareaAttributes extends PyreonHTMLAttributes {\n value?: string | (() => string)\n defaultValue?: string\n placeholder?: string | (() => string)\n disabled?: boolean | (() => boolean)\n readOnly?: boolean\n required?: boolean | (() => boolean)\n rows?: number\n cols?: number\n minLength?: number\n maxLength?: number\n name?: string\n autoFocus?: boolean\n form?: string\n wrap?: \"hard\" | \"soft\"\n}\n\ninterface SelectAttributes extends PyreonHTMLAttributes {\n value?: string | string[] | (() => string | string[])\n defaultValue?: string | string[]\n disabled?: boolean | (() => boolean)\n required?: boolean | (() => boolean)\n multiple?: boolean\n name?: string\n size?: number\n form?: string\n autoFocus?: boolean\n}\n\ninterface OptionAttributes extends PyreonHTMLAttributes {\n value?: string | number | (() => string | number)\n disabled?: boolean | (() => boolean)\n selected?: boolean | (() => boolean)\n label?: string\n}\n\ninterface FormAttributes extends PyreonHTMLAttributes {\n action?: string\n method?: \"get\" | \"post\"\n encType?: string\n noValidate?: boolean\n target?: string\n name?: string\n autoComplete?: string\n}\n\ninterface ImgAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n alt?: string | (() => string)\n width?: number | string | (() => number | string)\n height?: number | string | (() => number | string)\n loading?: \"lazy\" | \"eager\"\n decoding?: \"auto\" | \"async\" | \"sync\"\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n referrerPolicy?: string\n srcSet?: string\n sizes?: string\n}\n\ninterface VideoAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n width?: number | string\n height?: number | string\n controls?: boolean\n autoPlay?: boolean\n muted?: boolean\n loop?: boolean\n poster?: string\n preload?: \"none\" | \"metadata\" | \"auto\"\n playsInline?: boolean\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n}\n\ninterface AudioAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n controls?: boolean\n autoPlay?: boolean\n muted?: boolean\n loop?: boolean\n preload?: \"none\" | \"metadata\" | \"auto\"\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n}\n\ninterface LabelAttributes extends PyreonHTMLAttributes {\n htmlFor?: string\n for?: string\n form?: string\n}\n\ninterface ThAttributes extends PyreonHTMLAttributes {\n colSpan?: number\n rowSpan?: number\n scope?: \"col\" | \"row\" | \"colgroup\" | \"rowgroup\"\n abbr?: string\n headers?: string\n}\n\ninterface TdAttributes extends PyreonHTMLAttributes {\n colSpan?: number\n rowSpan?: number\n headers?: string\n}\n\ninterface ColAttributes extends PyreonHTMLAttributes {\n span?: number\n}\n\ninterface IframeAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n width?: number | string\n height?: number | string\n allow?: string\n allowFullScreen?: boolean\n loading?: \"lazy\" | \"eager\"\n name?: string\n sandbox?: string\n referrerPolicy?: string\n title?: string\n}\n\ninterface LinkAttributes extends PyreonHTMLAttributes {\n href?: string | (() => string)\n rel?: string\n type?: string\n as?: string\n media?: string\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n integrity?: string\n referrerPolicy?: string\n}\n\ninterface MetaAttributes extends PyreonHTMLAttributes {\n name?: string\n content?: string | (() => string)\n httpEquiv?: string\n charset?: string\n property?: string\n}\n\ninterface ScriptAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n type?: string\n async?: boolean\n defer?: boolean\n crossOrigin?: \"anonymous\" | \"use-credentials\"\n integrity?: string\n noModule?: boolean\n referrerPolicy?: string\n}\n\ninterface SourceAttributes extends PyreonHTMLAttributes {\n src?: string | (() => string)\n type?: string\n srcSet?: string\n sizes?: string\n media?: string\n}\n\ninterface ProgressAttributes extends PyreonHTMLAttributes {\n value?: number | (() => number)\n max?: number\n}\n\ninterface MeterAttributes extends PyreonHTMLAttributes {\n value?: number | (() => number)\n min?: number\n max?: number\n low?: number\n high?: number\n optimum?: number\n}\n\ninterface DetailsAttributes extends PyreonHTMLAttributes {\n open?: boolean | (() => boolean)\n}\n\ninterface DialogAttributes extends PyreonHTMLAttributes {\n open?: boolean | (() => boolean)\n}\n\ninterface OlAttributes extends PyreonHTMLAttributes {\n start?: number\n reversed?: boolean\n type?: \"1\" | \"a\" | \"A\" | \"i\" | \"I\"\n}\n\ninterface SvgAttributes extends PyreonHTMLAttributes {\n viewBox?: string\n xmlns?: string\n fill?: string | (() => string)\n stroke?: string | (() => string)\n \"stroke-width\"?: string | number\n \"stroke-linecap\"?: \"butt\" | \"round\" | \"square\"\n \"stroke-linejoin\"?: \"miter\" | \"round\" | \"bevel\"\n \"fill-rule\"?: \"nonzero\" | \"evenodd\"\n \"clip-rule\"?: \"nonzero\" | \"evenodd\"\n \"clip-path\"?: string\n d?: string\n cx?: string | number\n cy?: string | number\n r?: string | number\n rx?: string | number\n ry?: string | number\n x?: string | number\n y?: string | number\n x1?: string | number\n y1?: string | number\n x2?: string | number\n y2?: string | number\n width?: string | number\n height?: string | number\n transform?: string | (() => string)\n opacity?: string | number | (() => string | number)\n points?: string\n \"font-size\"?: string | number\n \"text-anchor\"?: \"start\" | \"middle\" | \"end\"\n \"dominant-baseline\"?: string\n}\n\ndeclare global {\n namespace JSX {\n /** The type that JSX expressions evaluate to */\n type Element = import(\"./types\").VNode\n\n /**\n * Valid JSX tag types — intrinsic strings + component functions.\n * Components may return VNode, null, strings, functions (reactive getters), etc.\n * (TS 5.1+ feature)\n */\n type ElementType = keyof IntrinsicElements | ((props: any) => import(\"./types\").VNodeChild)\n\n /** Tells TS which prop name carries children in component calls */\n interface ElementChildrenAttribute {\n children: {}\n }\n\n interface IntrinsicElements {\n // Document structure\n html: PyreonHTMLAttributes\n head: PyreonHTMLAttributes\n body: PyreonHTMLAttributes\n title: PyreonHTMLAttributes\n base: PyreonHTMLAttributes\n meta: MetaAttributes\n link: LinkAttributes\n script: ScriptAttributes\n style: PyreonHTMLAttributes\n noscript: PyreonHTMLAttributes\n // Sections\n main: PyreonHTMLAttributes\n header: PyreonHTMLAttributes\n footer: PyreonHTMLAttributes\n nav: PyreonHTMLAttributes\n aside: PyreonHTMLAttributes\n section: PyreonHTMLAttributes\n article: PyreonHTMLAttributes\n address: PyreonHTMLAttributes\n h1: PyreonHTMLAttributes\n h2: PyreonHTMLAttributes\n h3: PyreonHTMLAttributes\n h4: PyreonHTMLAttributes\n h5: PyreonHTMLAttributes\n h6: PyreonHTMLAttributes\n hgroup: PyreonHTMLAttributes\n // Block text\n p: PyreonHTMLAttributes\n pre: PyreonHTMLAttributes\n blockquote: PyreonHTMLAttributes\n figure: PyreonHTMLAttributes\n figcaption: PyreonHTMLAttributes\n div: PyreonHTMLAttributes\n hr: PyreonHTMLAttributes\n // Inline text\n span: PyreonHTMLAttributes\n a: AnchorAttributes\n em: PyreonHTMLAttributes\n strong: PyreonHTMLAttributes\n small: PyreonHTMLAttributes\n s: PyreonHTMLAttributes\n cite: PyreonHTMLAttributes\n q: PyreonHTMLAttributes\n abbr: PyreonHTMLAttributes\n time: PyreonHTMLAttributes\n code: PyreonHTMLAttributes\n var: PyreonHTMLAttributes\n samp: PyreonHTMLAttributes\n kbd: PyreonHTMLAttributes\n mark: PyreonHTMLAttributes\n sub: PyreonHTMLAttributes\n sup: PyreonHTMLAttributes\n i: PyreonHTMLAttributes\n b: PyreonHTMLAttributes\n u: PyreonHTMLAttributes\n bdi: PyreonHTMLAttributes\n bdo: PyreonHTMLAttributes\n br: PyreonHTMLAttributes\n wbr: PyreonHTMLAttributes\n ruby: PyreonHTMLAttributes\n rt: PyreonHTMLAttributes\n rp: PyreonHTMLAttributes\n // Lists\n ul: PyreonHTMLAttributes\n ol: OlAttributes\n li: PyreonHTMLAttributes\n dl: PyreonHTMLAttributes\n dt: PyreonHTMLAttributes\n dd: PyreonHTMLAttributes\n // Forms\n form: FormAttributes\n label: LabelAttributes\n input: InputAttributes\n button: ButtonAttributes\n select: SelectAttributes\n datalist: PyreonHTMLAttributes\n optgroup: PyreonHTMLAttributes\n option: OptionAttributes\n textarea: TextareaAttributes\n output: PyreonHTMLAttributes\n progress: ProgressAttributes\n meter: MeterAttributes\n fieldset: PyreonHTMLAttributes\n legend: PyreonHTMLAttributes\n // Tables\n table: PyreonHTMLAttributes\n caption: PyreonHTMLAttributes\n colgroup: PyreonHTMLAttributes\n col: ColAttributes\n thead: PyreonHTMLAttributes\n tbody: PyreonHTMLAttributes\n tfoot: PyreonHTMLAttributes\n tr: PyreonHTMLAttributes\n th: ThAttributes\n td: TdAttributes\n // Media\n img: ImgAttributes\n video: VideoAttributes\n audio: AudioAttributes\n source: SourceAttributes\n track: PyreonHTMLAttributes\n picture: PyreonHTMLAttributes\n canvas: PyreonHTMLAttributes\n svg: SvgAttributes\n path: SvgAttributes\n circle: SvgAttributes\n ellipse: SvgAttributes\n line: SvgAttributes\n polyline: SvgAttributes\n polygon: SvgAttributes\n rect: SvgAttributes\n text: SvgAttributes\n tspan: SvgAttributes\n g: SvgAttributes\n defs: SvgAttributes\n use: SvgAttributes & { href?: string }\n symbol: SvgAttributes\n clipPath: SvgAttributes\n mask: SvgAttributes\n marker: SvgAttributes\n pattern: SvgAttributes\n linearGradient: SvgAttributes\n radialGradient: SvgAttributes\n stop: SvgAttributes & {\n offset?: string | number\n \"stop-color\"?: string\n \"stop-opacity\"?: string | number\n }\n // Interactive / embedding\n details: DetailsAttributes\n summary: PyreonHTMLAttributes\n dialog: DialogAttributes\n iframe: IframeAttributes\n embed: PyreonHTMLAttributes\n object: PyreonHTMLAttributes\n param: PyreonHTMLAttributes\n // Semantic / misc\n menu: PyreonHTMLAttributes\n menuitem: PyreonHTMLAttributes\n template: PyreonHTMLAttributes\n slot: PyreonHTMLAttributes\n portal: PyreonHTMLAttributes\n // Catch-all for custom elements and data-* attrs\n [tagName: string]: PyreonHTMLAttributes\n }\n }\n}\n"],"mappings":";;AAGA,MAAa,WAA0B,OAAO,kBAAkB;;;;;;;;;AAUhE,MAAa,cAAqB,EAAE;AAoBpC,SAAgB,EACd,MACA,OACA,GAAG,UACI;AACP,QAAO;EACC;EACN,OAAQ,SAAS;EACjB,UAAU,kBAAkB,SAAS;EACrC,KAAM,OAAO,OAAkC;EAChD;;AAGH,SAAS,kBAAkB,UAAsC;AAE/D,MAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,IACnC,KAAI,MAAM,QAAQ,SAAS,GAAG,CAC5B,QAAO,gBAAgB,SAAS;AAGpC,QAAO;;AAGT,SAAS,gBAAgB,UAAsC;CAC7D,MAAM,SAAuB,EAAE;AAC/B,MAAK,MAAM,SAAS,SAClB,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,KAAK,GAAG,gBAAgB,MAAsB,CAAC;KAEtD,QAAO,KAAK,MAAM;AAGtB,QAAO;;;;;;;;;;;;ACrDT,SAAgB,IACd,MACA,OACA,KACO;CACP,MAAM,EAAE,UAAU,GAAG,SAAS;CAC9B,MAAM,eAAgB,OAAO,OAAO;EAAE,GAAG;EAAM;EAAK,GAAG;AAEvD,KAAI,OAAO,SAAS,WAIlB,QAAO,EAAE,MADc,aAAa,SAAY;EAAE,GAAG;EAAc;EAAU,GAAG,aAClD;AAKhC,QAAO,EAAE,MAAM,cAAc,GADV,aAAa,SAAY,EAAE,GAAG,MAAM,QAAQ,SAAS,GAAG,WAAW,CAAC,SAAS,CACnC;;AAI/D,MAAa,OAAO"}
@@ -78,7 +78,7 @@ interface PyreonHTMLAttributes {
78
78
  "aria-rowspan"?: number;
79
79
  ref?: {
80
80
  current: unknown;
81
- } | ((el: Element) => void);
81
+ } | ((el: Element | null) => void);
82
82
  key?: string | number;
83
83
  children?: VNodeChild | VNodeChild[];
84
84
  innerHTML?: string;
@@ -78,7 +78,7 @@ interface PyreonHTMLAttributes {
78
78
  "aria-rowspan"?: number;
79
79
  ref?: {
80
80
  current: unknown;
81
- } | ((el: Element) => void);
81
+ } | ((el: Element | null) => void);
82
82
  key?: string | number;
83
83
  children?: VNodeChild | VNodeChild[];
84
84
  innerHTML?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/core",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "Core component model and lifecycle for Pyreon",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -49,7 +49,7 @@
49
49
  "prepublishOnly": "bun run build"
50
50
  },
51
51
  "dependencies": {
52
- "@pyreon/reactivity": "^0.5.3"
52
+ "@pyreon/reactivity": "^0.5.5"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"
@@ -93,7 +93,7 @@ interface PyreonHTMLAttributes {
93
93
  "aria-rowindex"?: number
94
94
  "aria-rowspan"?: number
95
95
  // DOM lifecycle ref — object ref or callback ref
96
- ref?: { current: unknown } | ((el: Element) => void)
96
+ ref?: { current: unknown } | ((el: Element | null) => void)
97
97
  // Key for list reconciliation
98
98
  key?: string | number
99
99
  // Children — allows null, undefined, boolean in JSX children positions