@pyreon/core 0.7.12 → 0.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/analysis/index.js.html +1 -1
- package/lib/index.js +31 -22
- package/lib/index.js.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/props.ts +57 -35
- package/src/tests/cx.test.ts +29 -0
- package/src/tests/props.test.ts +94 -0
|
@@ -5386,7 +5386,7 @@ var drawChart = (function (exports) {
|
|
|
5386
5386
|
</script>
|
|
5387
5387
|
<script>
|
|
5388
5388
|
/*<!--*/
|
|
5389
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"uid":"
|
|
5389
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"src","children":[{"uid":"afbe8570-1","name":"lifecycle.ts"},{"uid":"afbe8570-3","name":"component.ts"},{"uid":"afbe8570-5","name":"context.ts"},{"uid":"afbe8570-7","name":"h.ts"},{"uid":"afbe8570-9","name":"dynamic.ts"},{"uid":"afbe8570-11","name":"telemetry.ts"},{"uid":"afbe8570-13","name":"error-boundary.ts"},{"uid":"afbe8570-15","name":"for.ts"},{"uid":"afbe8570-17","name":"lazy.ts"},{"uid":"afbe8570-19","name":"map-array.ts"},{"uid":"afbe8570-21","name":"portal.ts"},{"uid":"afbe8570-23","name":"props.ts"},{"uid":"afbe8570-25","name":"ref.ts"},{"uid":"afbe8570-27","name":"show.ts"},{"uid":"afbe8570-29","name":"style.ts"},{"uid":"afbe8570-31","name":"suspense.ts"},{"uid":"afbe8570-33","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"afbe8570-1":{"renderedLength":1459,"gzipLength":658,"brotliLength":0,"metaUid":"afbe8570-0"},"afbe8570-3":{"renderedLength":1430,"gzipLength":679,"brotliLength":0,"metaUid":"afbe8570-2"},"afbe8570-5":{"renderedLength":2213,"gzipLength":1033,"brotliLength":0,"metaUid":"afbe8570-4"},"afbe8570-7":{"renderedLength":1082,"gzipLength":597,"brotliLength":0,"metaUid":"afbe8570-6"},"afbe8570-9":{"renderedLength":381,"gzipLength":268,"brotliLength":0,"metaUid":"afbe8570-8"},"afbe8570-11":{"renderedLength":570,"gzipLength":346,"brotliLength":0,"metaUid":"afbe8570-10"},"afbe8570-13":{"renderedLength":1664,"gzipLength":843,"brotliLength":0,"metaUid":"afbe8570-12"},"afbe8570-15":{"renderedLength":700,"gzipLength":478,"brotliLength":0,"metaUid":"afbe8570-14"},"afbe8570-17":{"renderedLength":461,"gzipLength":273,"brotliLength":0,"metaUid":"afbe8570-16"},"afbe8570-19":{"renderedLength":1018,"gzipLength":571,"brotliLength":0,"metaUid":"afbe8570-18"},"afbe8570-21":{"renderedLength":818,"gzipLength":491,"brotliLength":0,"metaUid":"afbe8570-20"},"afbe8570-23":{"renderedLength":2875,"gzipLength":1120,"brotliLength":0,"metaUid":"afbe8570-22"},"afbe8570-25":{"renderedLength":86,"gzipLength":98,"brotliLength":0,"metaUid":"afbe8570-24"},"afbe8570-27":{"renderedLength":1892,"gzipLength":810,"brotliLength":0,"metaUid":"afbe8570-26"},"afbe8570-29":{"renderedLength":1858,"gzipLength":825,"brotliLength":0,"metaUid":"afbe8570-28"},"afbe8570-31":{"renderedLength":1138,"gzipLength":627,"brotliLength":0,"metaUid":"afbe8570-30"},"afbe8570-33":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"afbe8570-32"}},"nodeMetas":{"afbe8570-0":{"id":"/src/lifecycle.ts","moduleParts":{"index.js":"afbe8570-1"},"imported":[],"importedBy":[{"uid":"afbe8570-32"},{"uid":"afbe8570-2"},{"uid":"afbe8570-4"},{"uid":"afbe8570-12"}]},"afbe8570-2":{"id":"/src/component.ts","moduleParts":{"index.js":"afbe8570-3"},"imported":[{"uid":"afbe8570-0"}],"importedBy":[{"uid":"afbe8570-32"},{"uid":"afbe8570-12"}]},"afbe8570-4":{"id":"/src/context.ts","moduleParts":{"index.js":"afbe8570-5"},"imported":[{"uid":"afbe8570-0"}],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-6":{"id":"/src/h.ts","moduleParts":{"index.js":"afbe8570-7"},"imported":[],"importedBy":[{"uid":"afbe8570-32"},{"uid":"afbe8570-8"},{"uid":"afbe8570-16"},{"uid":"afbe8570-30"}]},"afbe8570-8":{"id":"/src/dynamic.ts","moduleParts":{"index.js":"afbe8570-9"},"imported":[{"uid":"afbe8570-6"}],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-10":{"id":"/src/telemetry.ts","moduleParts":{"index.js":"afbe8570-11"},"imported":[],"importedBy":[{"uid":"afbe8570-32"},{"uid":"afbe8570-12"}]},"afbe8570-12":{"id":"/src/error-boundary.ts","moduleParts":{"index.js":"afbe8570-13"},"imported":[{"uid":"afbe8570-34"},{"uid":"afbe8570-2"},{"uid":"afbe8570-0"},{"uid":"afbe8570-10"}],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-14":{"id":"/src/for.ts","moduleParts":{"index.js":"afbe8570-15"},"imported":[],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-16":{"id":"/src/lazy.ts","moduleParts":{"index.js":"afbe8570-17"},"imported":[{"uid":"afbe8570-34"},{"uid":"afbe8570-6"}],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-18":{"id":"/src/map-array.ts","moduleParts":{"index.js":"afbe8570-19"},"imported":[],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-20":{"id":"/src/portal.ts","moduleParts":{"index.js":"afbe8570-21"},"imported":[],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-22":{"id":"/src/props.ts","moduleParts":{"index.js":"afbe8570-23"},"imported":[],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-24":{"id":"/src/ref.ts","moduleParts":{"index.js":"afbe8570-25"},"imported":[],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-26":{"id":"/src/show.ts","moduleParts":{"index.js":"afbe8570-27"},"imported":[],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-28":{"id":"/src/style.ts","moduleParts":{"index.js":"afbe8570-29"},"imported":[],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-30":{"id":"/src/suspense.ts","moduleParts":{"index.js":"afbe8570-31"},"imported":[{"uid":"afbe8570-6"}],"importedBy":[{"uid":"afbe8570-32"}]},"afbe8570-32":{"id":"/src/index.ts","moduleParts":{"index.js":"afbe8570-33"},"imported":[{"uid":"afbe8570-2"},{"uid":"afbe8570-4"},{"uid":"afbe8570-8"},{"uid":"afbe8570-12"},{"uid":"afbe8570-14"},{"uid":"afbe8570-6"},{"uid":"afbe8570-16"},{"uid":"afbe8570-0"},{"uid":"afbe8570-18"},{"uid":"afbe8570-20"},{"uid":"afbe8570-22"},{"uid":"afbe8570-24"},{"uid":"afbe8570-26"},{"uid":"afbe8570-28"},{"uid":"afbe8570-30"},{"uid":"afbe8570-10"}],"importedBy":[],"isEntry":true},"afbe8570-34":{"id":"@pyreon/reactivity","moduleParts":{},"imported":[],"importedBy":[{"uid":"afbe8570-12"},{"uid":"afbe8570-16"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
5390
5390
|
|
|
5391
5391
|
const run = () => {
|
|
5392
5392
|
const width = window.innerWidth;
|
package/lib/index.js
CHANGED
|
@@ -432,6 +432,36 @@ function splitProps(props, keys) {
|
|
|
432
432
|
}
|
|
433
433
|
return [picked, rest];
|
|
434
434
|
}
|
|
435
|
+
/** Merge a getter-backed source property with an existing getter or value. */
|
|
436
|
+
function mergeGetterWithExisting(result, key, desc, existing) {
|
|
437
|
+
const prevGet = existing.get ?? (() => existing.value);
|
|
438
|
+
const nextGet = desc.get;
|
|
439
|
+
Object.defineProperty(result, key, {
|
|
440
|
+
get: () => {
|
|
441
|
+
const v = nextGet();
|
|
442
|
+
return v !== void 0 ? v : prevGet();
|
|
443
|
+
},
|
|
444
|
+
enumerable: true,
|
|
445
|
+
configurable: true
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
/** Merge a static source property when the existing property has a getter. */
|
|
449
|
+
function mergeStaticWithGetter(result, key, desc, existingGet) {
|
|
450
|
+
if (desc.value !== void 0) Object.defineProperty(result, key, desc);
|
|
451
|
+
else Object.defineProperty(result, key, {
|
|
452
|
+
get: existingGet,
|
|
453
|
+
enumerable: true,
|
|
454
|
+
configurable: true
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
/** Apply a single source property onto the result object, handling getter/static combos. */
|
|
458
|
+
function mergeProperty(result, key, desc) {
|
|
459
|
+
const existing = Object.getOwnPropertyDescriptor(result, key);
|
|
460
|
+
if (desc.get && existing) mergeGetterWithExisting(result, key, desc, existing);
|
|
461
|
+
else if (desc.get) Object.defineProperty(result, key, desc);
|
|
462
|
+
else if (existing?.get) mergeStaticWithGetter(result, key, desc, existing.get);
|
|
463
|
+
else if (desc.value !== void 0 || !existing) Object.defineProperty(result, key, desc);
|
|
464
|
+
}
|
|
435
465
|
/**
|
|
436
466
|
* Merge default values with component props. Defaults are used when
|
|
437
467
|
* the prop is `undefined`. Preserves getter reactivity.
|
|
@@ -445,28 +475,7 @@ function mergeProps(...sources) {
|
|
|
445
475
|
for (const source of sources) for (const key of Object.keys(source)) {
|
|
446
476
|
const desc = Object.getOwnPropertyDescriptor(source, key);
|
|
447
477
|
if (!desc) continue;
|
|
448
|
-
|
|
449
|
-
if (desc.get && existing) {
|
|
450
|
-
const prevGet = existing.get ?? (() => existing.value);
|
|
451
|
-
const nextGet = desc.get;
|
|
452
|
-
Object.defineProperty(result, key, {
|
|
453
|
-
get: () => {
|
|
454
|
-
const v = nextGet();
|
|
455
|
-
return v !== void 0 ? v : prevGet();
|
|
456
|
-
},
|
|
457
|
-
enumerable: true,
|
|
458
|
-
configurable: true
|
|
459
|
-
});
|
|
460
|
-
} else if (desc.get) Object.defineProperty(result, key, desc);
|
|
461
|
-
else if (existing?.get) {
|
|
462
|
-
const prevGet = existing.get;
|
|
463
|
-
if (desc.value !== void 0) Object.defineProperty(result, key, desc);
|
|
464
|
-
else Object.defineProperty(result, key, {
|
|
465
|
-
get: prevGet,
|
|
466
|
-
enumerable: true,
|
|
467
|
-
configurable: true
|
|
468
|
-
});
|
|
469
|
-
} else if (desc.value !== void 0 || !existing) Object.defineProperty(result, key, desc);
|
|
478
|
+
mergeProperty(result, key, desc);
|
|
470
479
|
}
|
|
471
480
|
return result;
|
|
472
481
|
}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["__DEV__","__DEV__","__DEV__","__DEV__"],"sources":["../src/lifecycle.ts","../src/component.ts","../src/context.ts","../src/h.ts","../src/dynamic.ts","../src/telemetry.ts","../src/error-boundary.ts","../src/for.ts","../src/lazy.ts","../src/map-array.ts","../src/portal.ts","../src/props.ts","../src/ref.ts","../src/show.ts","../src/style.ts","../src/suspense.ts"],"sourcesContent":["import type { CleanupFn, LifecycleHooks } from \"./types\"\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\n// The currently-executing component's hook storage, set by the renderer\n// before calling the component function, cleared immediately after.\nlet _current: LifecycleHooks | null = null\n\nexport function setCurrentHooks(hooks: LifecycleHooks | null) {\n _current = hooks\n}\n\nexport function getCurrentHooks(): LifecycleHooks | null {\n return _current\n}\n\nfunction warnOutsideSetup(hookName: string): void {\n if (__DEV__ && !_current) {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\n `[Pyreon] ${hookName}() called outside component setup. ` +\n \"Lifecycle hooks must be called synchronously during a component's setup function.\",\n )\n }\n}\n\n/**\n * Register a callback to run after the component is mounted to the DOM.\n * Optionally return a cleanup function — it will run on unmount.\n */\n// biome-ignore lint/suspicious/noConfusingVoidType: void allows callbacks that return nothing\nexport function onMount(fn: () => CleanupFn | void | undefined) {\n warnOutsideSetup(\"onMount\")\n _current?.mount.push(fn)\n}\n\n/**\n * Register a callback to run when the component is removed from the DOM.\n */\nexport function onUnmount(fn: () => void) {\n warnOutsideSetup(\"onUnmount\")\n _current?.unmount.push(fn)\n}\n\n/**\n * Register a callback to run after each reactive update.\n */\nexport function onUpdate(fn: () => void) {\n warnOutsideSetup(\"onUpdate\")\n _current?.update.push(fn)\n}\n\n/**\n * Register an error handler for this component subtree.\n *\n * When an error is thrown during rendering or in a child component,\n * the nearest `onErrorCaptured` handler is called with the error.\n * Return `true` to mark the error as handled and stop propagation.\n *\n * @example\n * onErrorCaptured((err) => {\n * setError(String(err))\n * return true // handled — don't propagate\n * })\n */\nexport function onErrorCaptured(fn: (err: unknown) => boolean | undefined) {\n warnOutsideSetup(\"onErrorCaptured\")\n _current?.error.push(fn)\n}\n","import { setCurrentHooks } from \"./lifecycle\"\nimport type { ComponentFn, LifecycleHooks, Props, VNodeChild } from \"./types\"\n\n/**\n * Identity wrapper — marks a function as a Pyreon component and preserves its type.\n * Useful for IDE tooling and future compiler optimisations.\n */\nexport function defineComponent<P extends Props>(fn: ComponentFn<P>): ComponentFn<P> {\n return fn\n}\n\n/**\n * Run a component function in a tracked context so that lifecycle hooks\n * registered inside it (onMount, onUnmount, onErrorCaptured, etc.) are captured.\n *\n * Called by the renderer — not intended for user code.\n */\nexport function runWithHooks<P extends Props>(\n fn: ComponentFn<P>,\n props: P,\n): { vnode: VNodeChild; hooks: LifecycleHooks } {\n const hooks: LifecycleHooks = { mount: [], unmount: [], update: [], error: [] }\n setCurrentHooks(hooks)\n let vnode: VNodeChild = null\n try {\n vnode = fn(props)\n } finally {\n setCurrentHooks(null)\n }\n return { vnode, hooks }\n}\n\n/**\n * Walk up error handlers collected during component rendering.\n * Returns true if any handler marked the error as handled.\n */\nexport function propagateError(err: unknown, hooks: LifecycleHooks): boolean {\n for (const handler of hooks.error) {\n if (handler(err) === true) return true\n }\n return false\n}\n\n// ─── Error boundary stack ────────────────────────────────────────────────────\n// Module-level stack of active ErrorBoundary handlers (innermost last).\n// ErrorBoundary pushes during its own setup (before children mount) so that\n// any child mountComponent error can dispatch up to the nearest boundary.\n\nconst _errorBoundaryStack: ((err: unknown) => boolean)[] = []\n\nexport function pushErrorBoundary(handler: (err: unknown) => boolean): void {\n _errorBoundaryStack.push(handler)\n}\n\nexport function popErrorBoundary(): void {\n _errorBoundaryStack.pop()\n}\n\n/**\n * Dispatch an error to the nearest active ErrorBoundary.\n * Returns true if the boundary handled it, false if none was registered.\n */\nexport function dispatchToErrorBoundary(err: unknown): boolean {\n const handler = _errorBoundaryStack[_errorBoundaryStack.length - 1]\n return handler ? handler(err) : false\n}\n","/**\n * Provide / inject — like React context or Vue provide/inject.\n *\n * Values flow down the component tree without prop-drilling.\n * The renderer maintains the context stack as it walks the VNode tree.\n */\n\nimport { onUnmount } from \"./lifecycle\"\n\nexport interface Context<T> {\n readonly id: symbol\n readonly defaultValue: T\n}\n\nexport function createContext<T>(defaultValue: T): Context<T> {\n return { id: Symbol(\"PyreonContext\"), defaultValue }\n}\n\n// ─── Runtime context stack (managed by the renderer) ─────────────────────────\n\n// Default stack — used for CSR and single-threaded SSR.\n// On Node.js with concurrent requests, @pyreon/runtime-server replaces this with\n// an AsyncLocalStorage-backed provider via setContextStackProvider().\nconst _defaultStack: Map<symbol, unknown>[] = []\nlet _stackProvider: () => Map<symbol, unknown>[] = () => _defaultStack\n\n/**\n * Override the context stack provider. Called by @pyreon/runtime-server to\n * inject an AsyncLocalStorage-backed stack that isolates concurrent SSR requests.\n * Has no effect in the browser (CSR always uses the default module-level stack).\n */\nexport function setContextStackProvider(fn: () => Map<symbol, unknown>[]): void {\n _stackProvider = fn\n}\n\nfunction getStack(): Map<symbol, unknown>[] {\n return _stackProvider()\n}\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\nexport function pushContext(values: Map<symbol, unknown>) {\n getStack().push(values)\n}\n\nexport function popContext() {\n const stack = getStack()\n if (__DEV__ && stack.length === 0) {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\n \"[Pyreon] popContext() called on an empty context stack. This likely indicates a missing Provider.\",\n )\n return\n }\n stack.pop()\n}\n\n/**\n * Read the nearest provided value for a context.\n * Falls back to `context.defaultValue` if none found.\n */\nexport function useContext<T>(context: Context<T>): T {\n const stack = getStack()\n for (let i = stack.length - 1; i >= 0; i--) {\n const frame = stack[i]\n if (frame?.has(context.id)) {\n return frame.get(context.id) as T\n }\n }\n return context.defaultValue\n}\n\n/**\n * Provide a context value for the current component's subtree.\n * Must be called during component setup (like onMount/onUnmount).\n * Automatically cleaned up when the component unmounts.\n *\n * @example\n * const ThemeProvider = ({ children }: { children: VNodeChild }) => {\n * provide(ThemeContext, { color: \"blue\" })\n * return children\n * }\n */\nexport function provide<T>(context: Context<T>, value: T): void {\n pushContext(new Map<symbol, unknown>([[context.id, value]]))\n onUnmount(() => popContext())\n}\n\n/**\n * Provide a value for `context` during `fn()`.\n * Used by the renderer when it encounters a `<Provider>` component.\n */\nexport function withContext<T>(context: Context<T>, value: T, fn: () => void) {\n const frame = new Map<symbol, unknown>([[context.id, value]])\n pushContext(frame)\n try {\n fn()\n } finally {\n popContext()\n }\n}\n","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\nexport function h(\n type: string | ((p: any) => VNodeChild) | 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","import { h } from \"./h\"\nimport type { ComponentFn, Props, VNode } from \"./types\"\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\nexport interface DynamicProps extends Props {\n component: ComponentFn | string\n}\n\nexport function Dynamic(props: DynamicProps): VNode | null {\n const { component, ...rest } = props\n if (__DEV__ && !component) {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\"[Pyreon] <Dynamic> received a falsy `component` prop. Nothing will be rendered.\")\n }\n if (!component) return null\n return h(component as string | ComponentFn, rest as Props)\n}\n","/**\n * Error telemetry — hook into Pyreon's error reporting for Sentry, Datadog, etc.\n *\n * @example\n * import { registerErrorHandler } from \"@pyreon/core\"\n * import * as Sentry from \"@sentry/browser\"\n *\n * registerErrorHandler(ctx => {\n * Sentry.captureException(ctx.error, {\n * extra: { component: ctx.component, phase: ctx.phase },\n * })\n * })\n */\n\nexport interface ErrorContext {\n /** Component function name, or \"Anonymous\" */\n component: string\n /** Lifecycle phase where the error occurred */\n phase: \"setup\" | \"render\" | \"mount\" | \"unmount\" | \"effect\"\n /** The thrown value */\n error: unknown\n /** Unix timestamp (ms) */\n timestamp: number\n /** Component props at the time of the error */\n props?: Record<string, unknown>\n}\n\nexport type ErrorHandler = (ctx: ErrorContext) => void\n\nlet _handlers: ErrorHandler[] = []\n\n/**\n * Register a global error handler. Called whenever a component throws in any\n * lifecycle phase. Returns an unregister function.\n */\nexport function registerErrorHandler(handler: ErrorHandler): () => void {\n _handlers.push(handler)\n return () => {\n _handlers = _handlers.filter((h) => h !== handler)\n }\n}\n\n/**\n * Internal — called by the runtime whenever a component error is caught.\n * Existing console.error calls are preserved; this is additive.\n */\nexport function reportError(ctx: ErrorContext): void {\n for (const h of _handlers) {\n try {\n h(ctx)\n } catch {\n // handler errors must never propagate back into the framework\n }\n }\n}\n","import { signal } from \"@pyreon/reactivity\"\nimport { popErrorBoundary, pushErrorBoundary } from \"./component\"\nimport { onUnmount } from \"./lifecycle\"\nimport { reportError } from \"./telemetry\"\nimport type { VNodeChild, VNodeChildAtom } from \"./types\"\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\n/**\n * ErrorBoundary — catches errors thrown by child components and renders a\n * fallback UI instead of crashing the whole tree.\n *\n * Also reports caught errors to any registered telemetry handlers.\n *\n * How error propagation works:\n * ErrorBoundary pushes a handler onto the module-level boundary stack\n * synchronously during its own setup (before children are mounted).\n * When mountComponent catches a child error, it calls dispatchToErrorBoundary()\n * which invokes the innermost boundary's handler.\n *\n * Usage:\n * h(ErrorBoundary, {\n * fallback: (err) => h(\"p\", null, `Error: ${err}`),\n * children: h(MyComponent, null),\n * })\n *\n * // or with JSX:\n * <ErrorBoundary fallback={(err) => <p>Error: {String(err)}</p>}>\n * <MyComponent />\n * </ErrorBoundary>\n */\nexport function ErrorBoundary(props: {\n /**\n * Rendered when a child throws. Receives the caught error and a `reset`\n * function — calling `reset()` clears the error and re-renders children.\n */\n fallback: (err: unknown, reset: () => void) => VNodeChild\n children?: VNodeChild\n}): VNodeChild {\n if (__DEV__ && typeof props.fallback !== \"function\") {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\n \"[Pyreon] <ErrorBoundary> expects `fallback` to be a function: (err, reset) => VNode. \" +\n `Received ${typeof props.fallback}.`,\n )\n }\n\n const error = signal<unknown>(null)\n const reset = () => error.set(null)\n\n const handler = (err: unknown): boolean => {\n if (error.peek() !== null) return false // already in error state — let outer boundary catch it\n error.set(err)\n reportError({ component: \"ErrorBoundary\", phase: \"render\", error: err, timestamp: Date.now() })\n return true\n }\n\n // Push synchronously — before children are mounted — so child errors see this boundary\n pushErrorBoundary(handler)\n onUnmount(() => popErrorBoundary())\n\n return (): VNodeChildAtom => {\n const err = error()\n if (err != null) return props.fallback(err, reset) as VNodeChildAtom\n const ch = props.children\n return (typeof ch === \"function\" ? ch() : ch) as VNodeChildAtom\n }\n}\n","import type { NativeItem, Props, VNode } from \"./types\"\n\n/**\n * Symbol used as the VNode type for a For list — runtime-dom handles it\n * via mountFor, bypassing the generic VNode reconciler.\n */\nexport const ForSymbol: unique symbol = Symbol(\"pyreon.For\")\n\nexport interface ForProps<T> {\n each: () => T[]\n by: (item: T) => string | number\n children: (item: T) => VNode | NativeItem\n}\n\n/**\n * Efficient reactive list rendering.\n *\n * Unlike a plain `() => items().map(item => h(...))`, For never re-creates\n * VNodes for existing keys — only new keys invoke `children()`. Structural\n * mutations (swap, sort, filter) are O(n) key scan + O(k) DOM moves where k\n * is the number of actually displaced entries.\n *\n * Usage:\n * <For each={items} by={r => r.id}>{r => <li>...</li>}</For>\n */\nexport function For<T>(props: ForProps<T>): VNode {\n return {\n type: ForSymbol as unknown as string,\n props: props as unknown as Props,\n children: [],\n key: null,\n }\n}\n","import { signal } from \"@pyreon/reactivity\"\nimport { h } from \"./h\"\nimport type { LazyComponent } from \"./suspense\"\nimport type { ComponentFn, Props } from \"./types\"\n\nexport function lazy<P extends Props>(\n load: () => Promise<{ default: ComponentFn<P> }>,\n): LazyComponent<P> {\n const loaded = signal<ComponentFn<P> | null>(null)\n const error = signal<Error | null>(null)\n\n load()\n .then((m) => loaded.set(m.default))\n .catch((e) => error.set(e instanceof Error ? e : new Error(String(e))))\n\n const wrapper = ((props: P) => {\n const err = error()\n if (err) throw err\n const comp = loaded()\n return comp ? h(comp as ComponentFn, props as Props) : null\n }) as LazyComponent<P>\n\n wrapper.__loading = () => loaded() === null && error() === null\n return wrapper\n}\n","/**\n * mapArray — keyed reactive list mapping.\n *\n * Creates each mapped item exactly once per key, then reuses it across\n * updates. When the source array is reordered or partially changed, only\n * new keys invoke `map()`; existing entries return the cached result.\n *\n * This makes structural list operations (swap, sort, filter) O(k) in\n * allocations where k is the number of new/removed keys, not O(n).\n *\n * The returned accessor reads `source()` reactively, so it can be passed\n * directly to the keyed-list reconciler.\n */\nexport function mapArray<T, U>(\n source: () => T[],\n getKey: (item: T) => string | number,\n map: (item: T) => U,\n): () => U[] {\n const cache = new Map<string | number, U>()\n\n return () => {\n const items = source()\n const result: U[] = []\n const newKeys = new Set<string | number>()\n\n for (const item of items) {\n const key = getKey(item)\n newKeys.add(key)\n if (!cache.has(key)) {\n cache.set(key, map(item))\n }\n result.push(cache.get(key) as U)\n }\n\n // Evict entries whose keys are no longer present\n for (const key of cache.keys()) {\n if (!newKeys.has(key)) cache.delete(key)\n }\n\n return result\n }\n}\n","import type { Props, VNode, VNodeChild } from \"./types\"\n\n/**\n * Symbol used as the VNode type for a Portal — runtime-dom mounts the\n * children into `target` instead of the normal parent.\n */\nexport const PortalSymbol: unique symbol = Symbol(\"pyreon.Portal\")\n\nexport interface PortalProps {\n /** DOM element to render children into (e.g. document.body). */\n target: Element\n children: VNodeChild\n}\n\n/**\n * Portal — renders `children` into a different DOM node than the\n * current parent tree.\n *\n * Useful for modals, tooltips, dropdowns, and any overlay that needs to\n * escape CSS overflow/stacking context restrictions.\n *\n * @example\n * // Render a modal at document.body level regardless of where in the\n * // component tree <Modal> is used:\n * Portal({ target: document.body, children: h(Modal, { onClose }) })\n *\n * // JSX:\n * <Portal target={document.body}>\n * <Modal onClose={close} />\n * </Portal>\n */\nexport function Portal(props: PortalProps): VNode {\n return {\n type: PortalSymbol as unknown as string,\n props: props as unknown as Props,\n children: [],\n key: null,\n }\n}\n","// Prop utilities for component authoring.\n\n/**\n * Split props into two groups: keys you want and the rest.\n * Unlike destructuring, this preserves reactivity (getters on the original object).\n *\n * @example\n * const [own, html] = splitProps(props, [\"label\", \"icon\"])\n * return <button {...html}><Icon name={own.icon} /> {own.label}</button>\n */\nexport function splitProps<T extends Record<string, unknown>, K extends (keyof T)[]>(\n props: T,\n keys: K,\n): [Pick<T, K[number]>, Omit<T, K[number]>] {\n const picked = {} as Pick<T, K[number]>\n const rest = {} as Omit<T, K[number]>\n const keySet = new Set<string | symbol>(keys as (string | symbol)[])\n\n for (const key of Object.keys(props)) {\n const desc = Object.getOwnPropertyDescriptor(props, key)\n if (!desc) continue\n if (keySet.has(key)) {\n Object.defineProperty(picked, key, desc)\n } else {\n Object.defineProperty(rest, key, desc)\n }\n }\n\n return [picked, rest]\n}\n\n/**\n * Merge default values with component props. Defaults are used when\n * the prop is `undefined`. Preserves getter reactivity.\n *\n * @example\n * const merged = mergeProps({ size: \"md\", variant: \"primary\" }, props)\n * // merged.size is reactive — falls back to \"md\" when props.size is undefined\n */\nexport function mergeProps<T extends Record<string, unknown>>(...sources: T[]): T {\n const result = {} as T\n for (const source of sources) {\n for (const key of Object.keys(source)) {\n const desc = Object.getOwnPropertyDescriptor(source, key)\n if (!desc) continue\n // If the source has a getter, wrap it to check if the value is undefined\n // and fall back to the previously defined value\n const existing = Object.getOwnPropertyDescriptor(result, key)\n if (desc.get && existing) {\n const prevGet = existing.get ?? (() => existing.value)\n const nextGet = desc.get\n Object.defineProperty(result, key, {\n get: () => {\n const v = nextGet()\n return v !== undefined ? v : prevGet()\n },\n enumerable: true,\n configurable: true,\n })\n } else if (desc.get) {\n Object.defineProperty(result, key, desc)\n } else if (existing?.get) {\n // New source has a static value, previous had a getter\n const prevGet = existing.get\n const staticVal = desc.value\n if (staticVal !== undefined) {\n Object.defineProperty(result, key, desc)\n } else {\n Object.defineProperty(result, key, {\n get: prevGet,\n enumerable: true,\n configurable: true,\n })\n }\n } else {\n // Both static — later value wins if defined\n if (desc.value !== undefined || !existing) {\n Object.defineProperty(result, key, desc)\n }\n }\n }\n }\n return result\n}\n\n// ─── Unique ID ───────────────────────────────────────────────────────────────\n\nlet _idCounter = 0\n\n/**\n * Generate a unique ID string for accessibility attributes (htmlFor, aria-describedby, etc.).\n * SSR-safe: uses a deterministic counter that resets per request context.\n *\n * @example\n * const id = createUniqueId()\n * return <>\n * <label for={id}>Name</label>\n * <input id={id} />\n * </>\n */\nexport function createUniqueId(): string {\n return `pyreon-${++_idCounter}`\n}\n\n/** Reset the ID counter (called by SSR per-request). */\nexport function _resetIdCounter(): void {\n _idCounter = 0\n}\n","/**\n * createRef — mutable container for a DOM element or component value.\n *\n * Usage:\n * const inputRef = createRef<HTMLInputElement>()\n * onMount(() => { inputRef.current?.focus() })\n * return <input ref={inputRef} />\n *\n * The runtime sets `ref.current` after the element is inserted into the DOM\n * and clears it to `null` when the element is removed.\n */\n\nexport interface Ref<T = unknown> {\n current: T | null\n}\n\n/** Callback ref — receives the element on mount and null on unmount. */\nexport type RefCallback<T = unknown> = (el: T | null) => void\n\n/** Union of object ref and callback ref — accepted by the JSX ref prop. */\nexport type RefProp<T = unknown> = Ref<T> | RefCallback<T>\n\nexport function createRef<T = unknown>(): Ref<T> {\n return { current: null }\n}\n","import type { Props, VNode, VNodeChild, VNodeChildAtom } from \"./types\"\n\n// ─── Show ─────────────────────────────────────────────────────────────────────\n\nexport interface ShowProps extends Props {\n /** Accessor — children render when truthy, fallback when falsy. */\n when: () => unknown\n fallback?: VNodeChild\n children?: VNodeChild\n}\n\n/**\n * Conditionally render children based on a reactive condition.\n *\n * @example\n * h(Show, { when: () => isLoggedIn() },\n * h(Dashboard, null)\n * )\n *\n * // With fallback:\n * h(Show, { when: () => user(), fallback: h(Login, null) },\n * h(Dashboard, null)\n * )\n */\nexport function Show(props: ShowProps): VNode | null {\n // Returns a reactive accessor; the renderer unwraps it at mount time.\n return ((): VNodeChildAtom =>\n (props.when()\n ? (props.children ?? null)\n : (props.fallback ?? null)) as VNodeChildAtom) as unknown as VNode\n}\n\n// ─── Switch / Match ───────────────────────────────────────────────────────────\n\nexport interface MatchProps extends Props {\n /** Accessor — this branch renders when truthy. */\n when: () => unknown\n children?: VNodeChild\n}\n\n/**\n * A branch inside `<Switch>`. Renders when `when()` is truthy.\n * Must be used as a direct child of `Switch`.\n *\n * `Match` acts as a pure type/identity marker — Switch identifies it by checking\n * `vnode.type === Match` rather than by the runtime return value.\n */\nexport function Match(_props: MatchProps): VNode | null {\n // Match is never mounted directly — Switch inspects Match VNodes by type identity.\n return null\n}\n\nexport interface SwitchProps extends Props {\n /** Rendered when no Match branch is truthy. */\n fallback?: VNodeChild\n children?: VNodeChild | VNodeChild[]\n}\n\n/**\n * Multi-branch conditional rendering. Evaluates each `Match` child in order,\n * renders the first whose `when()` is truthy, or `fallback` if none match.\n *\n * @example\n * h(Switch, { fallback: h(\"p\", null, \"404\") },\n * h(Match, { when: () => route() === \"/\" }, h(Home, null)),\n * h(Match, { when: () => route() === \"/about\" }, h(About, null)),\n * )\n */\nfunction isMatchVNode(branch: VNodeChild): branch is VNode {\n return (\n branch !== null &&\n typeof branch === \"object\" &&\n !Array.isArray(branch) &&\n (branch as VNode).type === Match\n )\n}\n\nfunction resolveMatchChildren(matchVNode: VNode): VNodeChildAtom {\n if (matchVNode.children.length === 0) {\n return ((matchVNode.props as unknown as MatchProps).children ?? null) as VNodeChildAtom\n }\n if (matchVNode.children.length === 1) return matchVNode.children[0] as VNodeChildAtom\n return matchVNode.children as unknown as VNodeChildAtom\n}\n\nfunction normalizeBranches(children: SwitchProps[\"children\"]): VNodeChild[] {\n if (Array.isArray(children)) return children\n if (children != null) return [children]\n return []\n}\n\nexport function Switch(props: SwitchProps): VNode | null {\n // Returns a reactive accessor; the renderer unwraps it at mount time.\n return ((): VNodeChildAtom => {\n const branches = normalizeBranches(props.children)\n\n for (const branch of branches) {\n if (!isMatchVNode(branch)) continue\n const matchProps = branch.props as unknown as MatchProps\n if (matchProps.when()) return resolveMatchChildren(branch)\n }\n\n return (props.fallback ?? null) as VNodeChildAtom\n }) as unknown as VNode\n}\n\n// Keep MatchSymbol export for any code that was using it\nexport const MatchSymbol: unique symbol = Symbol(\"pyreon.Match\")\n","// Shared style utilities used by both runtime-dom and runtime-server.\n\n// CSS properties where numeric values are unitless (e.g. `opacity: 0.5`, `zIndex: 10`).\n// All other numeric values get \"px\" appended automatically (e.g. `height: 100` → `\"100px\"`).\nexport const CSS_UNITLESS = new Set([\n \"animationIterationCount\",\n \"aspectRatio\",\n \"borderImageOutset\",\n \"borderImageSlice\",\n \"borderImageWidth\",\n \"boxFlex\",\n \"boxFlexGroup\",\n \"boxOrdinalGroup\",\n \"columnCount\",\n \"columns\",\n \"flex\",\n \"flexGrow\",\n \"flexPositive\",\n \"flexShrink\",\n \"flexNegative\",\n \"flexOrder\",\n \"gridArea\",\n \"gridRow\",\n \"gridRowEnd\",\n \"gridRowSpan\",\n \"gridRowStart\",\n \"gridColumn\",\n \"gridColumnEnd\",\n \"gridColumnSpan\",\n \"gridColumnStart\",\n \"fontWeight\",\n \"lineClamp\",\n \"lineHeight\",\n \"opacity\",\n \"order\",\n \"orphans\",\n \"scale\",\n \"tabSize\",\n \"widows\",\n \"zIndex\",\n \"zoom\",\n \"fillOpacity\",\n \"floodOpacity\",\n \"stopOpacity\",\n \"strokeDasharray\",\n \"strokeDashoffset\",\n \"strokeMiterlimit\",\n \"strokeOpacity\",\n \"strokeWidth\",\n])\n\n// ─── Class utilities ─────────────────────────────────────────────────────────\n\n/** Value accepted by the `class` prop — string, array, object, or nested mix. */\nexport type ClassValue =\n | string\n | number\n | boolean\n | null\n | undefined\n | ClassValue[]\n | Record<string, boolean | null | undefined | (() => boolean)>\n\nfunction cxObject(obj: Record<string, boolean | null | undefined | (() => boolean)>): string {\n let result = \"\"\n for (const key in obj) {\n const v = obj[key]\n const truthy = typeof v === \"function\" ? v() : v\n if (truthy) result = result ? `${result} ${key}` : key\n }\n return result\n}\n\nfunction cxArray(arr: ClassValue[]): string {\n let result = \"\"\n for (const item of arr) {\n const resolved = cx(item)\n if (resolved) result = result ? `${result} ${resolved}` : resolved\n }\n return result\n}\n\n/** Resolve a ClassValue into a flat class string (like clsx/cx). */\nexport function cx(value: ClassValue): string {\n if (value == null || value === false || value === true) return \"\"\n if (typeof value === \"string\") return value\n if (typeof value === \"number\") return String(value)\n if (Array.isArray(value)) return cxArray(value)\n return cxObject(value)\n}\n\n// ─── Style utilities ─────────────────────────────────────────────────────────\n\n/** Convert a camelCase CSS property name to kebab-case. */\nexport function toKebabCase(str: string): string {\n return str.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)\n}\n\n/** Normalize a style value — appends \"px\" to numbers for non-unitless properties. */\nexport function normalizeStyleValue(key: string, value: unknown): string {\n return typeof value === \"number\" && !CSS_UNITLESS.has(key) ? `${value}px` : String(value)\n}\n","import { Fragment, h } from \"./h\"\nimport type { Props, VNode, VNodeChild } from \"./types\"\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\n/** Internal marker attached to lazy()-wrapped components */\nexport type LazyComponent<P extends Props = Props> = ((props: P) => VNodeChild) & {\n __loading: () => boolean\n}\n\n/**\n * Suspense — shows `fallback` while a lazy child component is still loading.\n *\n * Works in tandem with `lazy()` from `@pyreon/react-compat` (or `@pyreon/core/lazy`).\n * The child VNode's `.type.__loading()` signal drives the switch.\n *\n * Usage:\n * const Page = lazy(() => import(\"./Page\"))\n *\n * h(Suspense, { fallback: h(Spinner, null) }, h(Page, null))\n * // or with JSX:\n * <Suspense fallback={<Spinner />}><Page /></Suspense>\n */\nexport function Suspense(props: { fallback: VNodeChild; children?: VNodeChild }): VNode {\n if (__DEV__ && props.fallback === undefined) {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\n \"[Pyreon] <Suspense> is missing a `fallback` prop. Provide fallback UI to show while loading.\",\n )\n }\n\n return h(Fragment, null, () => {\n const ch = props.children\n const childNode = typeof ch === \"function\" ? ch() : ch\n\n // Check if the child is a VNode whose type is a lazy component still loading\n const isLoading =\n childNode != null &&\n typeof childNode === \"object\" &&\n !Array.isArray(childNode) &&\n typeof (childNode as VNode).type === \"function\" &&\n ((childNode as VNode).type as unknown as LazyComponent).__loading?.()\n\n if (isLoading) {\n const fb = props.fallback\n return typeof fb === \"function\" ? fb() : fb\n }\n return childNode\n })\n}\n"],"mappings":";;;AAEA,MAAMA,YAAU,OAAO,YAAY,eAAe,QAAQ,IAAI,aAAa;AAI3E,IAAI,WAAkC;AAEtC,SAAgB,gBAAgB,OAA8B;AAC5D,YAAW;;AAOb,SAAS,iBAAiB,UAAwB;AAChD,KAAIA,aAAW,CAAC,SAEd,SAAQ,KACN,YAAY,SAAS,sHAEtB;;;;;;AASL,SAAgB,QAAQ,IAAwC;AAC9D,kBAAiB,UAAU;AAC3B,WAAU,MAAM,KAAK,GAAG;;;;;AAM1B,SAAgB,UAAU,IAAgB;AACxC,kBAAiB,YAAY;AAC7B,WAAU,QAAQ,KAAK,GAAG;;;;;AAM5B,SAAgB,SAAS,IAAgB;AACvC,kBAAiB,WAAW;AAC5B,WAAU,OAAO,KAAK,GAAG;;;;;;;;;;;;;;;AAgB3B,SAAgB,gBAAgB,IAA2C;AACzE,kBAAiB,kBAAkB;AACnC,WAAU,MAAM,KAAK,GAAG;;;;;;;;;AC5D1B,SAAgB,gBAAiC,IAAoC;AACnF,QAAO;;;;;;;;AAST,SAAgB,aACd,IACA,OAC8C;CAC9C,MAAM,QAAwB;EAAE,OAAO,EAAE;EAAE,SAAS,EAAE;E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AIT,SAAgB,GAAG,OAA2B;AAC5C,KAAI,SAAS,QAAQ,UAAU,SAAS,UAAU,KAAM,QAAO;AAC/D,KAAI,OAAO,UAAU,SAAU,QAAO;AACtC,KAAI,OAAO,UAAU,SAAU,QAAO,OAAO,MAAM;AACnD,KAAI,MAAM,QAAQ,MAAM,CAAE,QAAO,QAAQ,MAAM;AAC/C,QAAO,SAAS,MAAM;;;AAMxB,SAAgB,YAAY,KAAqB;AAC/C,QAAO,IAAI,QAAQ,WAAW,MAAM,IAAI,EAAE,aAAa,GAAG;;;AAI5D,SAAgB,oBAAoB,KAAa,OAAwB;AACvE,QAAO,OAAO,UAAU,YAAY,CAAC,aAAa,IAAI,IAAI,GAAG,GAAG,MAAM,MAAM,OAAO,MAAM;;;;;ACjG3F,MAAM,UAAU,OAAO,YAAY,eAAe,QAAQ,IAAI,aAAa;;;;;;;;;;;;;;AAoB3E,SAAgB,SAAS,OAA+D;AACtF,KAAI,WAAW,MAAM,aAAa,OAEhC,SAAQ,KACN,+FACD;AAGH,QAAO,EAAE,UAAU,YAAY;EAC7B,MAAM,KAAK,MAAM;EACjB,MAAM,YAAY,OAAO,OAAO,aAAa,IAAI,GAAG;AAUpD,MANE,aAAa,QACb,OAAO,cAAc,YACrB,CAAC,MAAM,QAAQ,UAAU,IACzB,OAAQ,UAAoB,SAAS,cACnC,UAAoB,KAAkC,aAAa,EAExD;GACb,MAAM,KAAK,MAAM;AACjB,UAAO,OAAO,OAAO,aAAa,IAAI,GAAG;;AAE3C,SAAO;GACP"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["__DEV__","__DEV__","__DEV__","__DEV__"],"sources":["../src/lifecycle.ts","../src/component.ts","../src/context.ts","../src/h.ts","../src/dynamic.ts","../src/telemetry.ts","../src/error-boundary.ts","../src/for.ts","../src/lazy.ts","../src/map-array.ts","../src/portal.ts","../src/props.ts","../src/ref.ts","../src/show.ts","../src/style.ts","../src/suspense.ts"],"sourcesContent":["import type { CleanupFn, LifecycleHooks } from \"./types\"\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\n// The currently-executing component's hook storage, set by the renderer\n// before calling the component function, cleared immediately after.\nlet _current: LifecycleHooks | null = null\n\nexport function setCurrentHooks(hooks: LifecycleHooks | null) {\n _current = hooks\n}\n\nexport function getCurrentHooks(): LifecycleHooks | null {\n return _current\n}\n\nfunction warnOutsideSetup(hookName: string): void {\n if (__DEV__ && !_current) {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\n `[Pyreon] ${hookName}() called outside component setup. ` +\n \"Lifecycle hooks must be called synchronously during a component's setup function.\",\n )\n }\n}\n\n/**\n * Register a callback to run after the component is mounted to the DOM.\n * Optionally return a cleanup function — it will run on unmount.\n */\n// biome-ignore lint/suspicious/noConfusingVoidType: void allows callbacks that return nothing\nexport function onMount(fn: () => CleanupFn | void | undefined) {\n warnOutsideSetup(\"onMount\")\n _current?.mount.push(fn)\n}\n\n/**\n * Register a callback to run when the component is removed from the DOM.\n */\nexport function onUnmount(fn: () => void) {\n warnOutsideSetup(\"onUnmount\")\n _current?.unmount.push(fn)\n}\n\n/**\n * Register a callback to run after each reactive update.\n */\nexport function onUpdate(fn: () => void) {\n warnOutsideSetup(\"onUpdate\")\n _current?.update.push(fn)\n}\n\n/**\n * Register an error handler for this component subtree.\n *\n * When an error is thrown during rendering or in a child component,\n * the nearest `onErrorCaptured` handler is called with the error.\n * Return `true` to mark the error as handled and stop propagation.\n *\n * @example\n * onErrorCaptured((err) => {\n * setError(String(err))\n * return true // handled — don't propagate\n * })\n */\nexport function onErrorCaptured(fn: (err: unknown) => boolean | undefined) {\n warnOutsideSetup(\"onErrorCaptured\")\n _current?.error.push(fn)\n}\n","import { setCurrentHooks } from \"./lifecycle\"\nimport type { ComponentFn, LifecycleHooks, Props, VNodeChild } from \"./types\"\n\n/**\n * Identity wrapper — marks a function as a Pyreon component and preserves its type.\n * Useful for IDE tooling and future compiler optimisations.\n */\nexport function defineComponent<P extends Props>(fn: ComponentFn<P>): ComponentFn<P> {\n return fn\n}\n\n/**\n * Run a component function in a tracked context so that lifecycle hooks\n * registered inside it (onMount, onUnmount, onErrorCaptured, etc.) are captured.\n *\n * Called by the renderer — not intended for user code.\n */\nexport function runWithHooks<P extends Props>(\n fn: ComponentFn<P>,\n props: P,\n): { vnode: VNodeChild; hooks: LifecycleHooks } {\n const hooks: LifecycleHooks = { mount: [], unmount: [], update: [], error: [] }\n setCurrentHooks(hooks)\n let vnode: VNodeChild = null\n try {\n vnode = fn(props)\n } finally {\n setCurrentHooks(null)\n }\n return { vnode, hooks }\n}\n\n/**\n * Walk up error handlers collected during component rendering.\n * Returns true if any handler marked the error as handled.\n */\nexport function propagateError(err: unknown, hooks: LifecycleHooks): boolean {\n for (const handler of hooks.error) {\n if (handler(err) === true) return true\n }\n return false\n}\n\n// ─── Error boundary stack ────────────────────────────────────────────────────\n// Module-level stack of active ErrorBoundary handlers (innermost last).\n// ErrorBoundary pushes during its own setup (before children mount) so that\n// any child mountComponent error can dispatch up to the nearest boundary.\n\nconst _errorBoundaryStack: ((err: unknown) => boolean)[] = []\n\nexport function pushErrorBoundary(handler: (err: unknown) => boolean): void {\n _errorBoundaryStack.push(handler)\n}\n\nexport function popErrorBoundary(): void {\n _errorBoundaryStack.pop()\n}\n\n/**\n * Dispatch an error to the nearest active ErrorBoundary.\n * Returns true if the boundary handled it, false if none was registered.\n */\nexport function dispatchToErrorBoundary(err: unknown): boolean {\n const handler = _errorBoundaryStack[_errorBoundaryStack.length - 1]\n return handler ? handler(err) : false\n}\n","/**\n * Provide / inject — like React context or Vue provide/inject.\n *\n * Values flow down the component tree without prop-drilling.\n * The renderer maintains the context stack as it walks the VNode tree.\n */\n\nimport { onUnmount } from \"./lifecycle\"\n\nexport interface Context<T> {\n readonly id: symbol\n readonly defaultValue: T\n}\n\nexport function createContext<T>(defaultValue: T): Context<T> {\n return { id: Symbol(\"PyreonContext\"), defaultValue }\n}\n\n// ─── Runtime context stack (managed by the renderer) ─────────────────────────\n\n// Default stack — used for CSR and single-threaded SSR.\n// On Node.js with concurrent requests, @pyreon/runtime-server replaces this with\n// an AsyncLocalStorage-backed provider via setContextStackProvider().\nconst _defaultStack: Map<symbol, unknown>[] = []\nlet _stackProvider: () => Map<symbol, unknown>[] = () => _defaultStack\n\n/**\n * Override the context stack provider. Called by @pyreon/runtime-server to\n * inject an AsyncLocalStorage-backed stack that isolates concurrent SSR requests.\n * Has no effect in the browser (CSR always uses the default module-level stack).\n */\nexport function setContextStackProvider(fn: () => Map<symbol, unknown>[]): void {\n _stackProvider = fn\n}\n\nfunction getStack(): Map<symbol, unknown>[] {\n return _stackProvider()\n}\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\nexport function pushContext(values: Map<symbol, unknown>) {\n getStack().push(values)\n}\n\nexport function popContext() {\n const stack = getStack()\n if (__DEV__ && stack.length === 0) {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\n \"[Pyreon] popContext() called on an empty context stack. This likely indicates a missing Provider.\",\n )\n return\n }\n stack.pop()\n}\n\n/**\n * Read the nearest provided value for a context.\n * Falls back to `context.defaultValue` if none found.\n */\nexport function useContext<T>(context: Context<T>): T {\n const stack = getStack()\n for (let i = stack.length - 1; i >= 0; i--) {\n const frame = stack[i]\n if (frame?.has(context.id)) {\n return frame.get(context.id) as T\n }\n }\n return context.defaultValue\n}\n\n/**\n * Provide a context value for the current component's subtree.\n * Must be called during component setup (like onMount/onUnmount).\n * Automatically cleaned up when the component unmounts.\n *\n * @example\n * const ThemeProvider = ({ children }: { children: VNodeChild }) => {\n * provide(ThemeContext, { color: \"blue\" })\n * return children\n * }\n */\nexport function provide<T>(context: Context<T>, value: T): void {\n pushContext(new Map<symbol, unknown>([[context.id, value]]))\n onUnmount(() => popContext())\n}\n\n/**\n * Provide a value for `context` during `fn()`.\n * Used by the renderer when it encounters a `<Provider>` component.\n */\nexport function withContext<T>(context: Context<T>, value: T, fn: () => void) {\n const frame = new Map<symbol, unknown>([[context.id, value]])\n pushContext(frame)\n try {\n fn()\n } finally {\n popContext()\n }\n}\n","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\nexport function h(\n type: string | ((p: any) => VNodeChild) | 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","import { h } from \"./h\"\nimport type { ComponentFn, Props, VNode } from \"./types\"\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\nexport interface DynamicProps extends Props {\n component: ComponentFn | string\n}\n\nexport function Dynamic(props: DynamicProps): VNode | null {\n const { component, ...rest } = props\n if (__DEV__ && !component) {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\"[Pyreon] <Dynamic> received a falsy `component` prop. Nothing will be rendered.\")\n }\n if (!component) return null\n return h(component as string | ComponentFn, rest as Props)\n}\n","/**\n * Error telemetry — hook into Pyreon's error reporting for Sentry, Datadog, etc.\n *\n * @example\n * import { registerErrorHandler } from \"@pyreon/core\"\n * import * as Sentry from \"@sentry/browser\"\n *\n * registerErrorHandler(ctx => {\n * Sentry.captureException(ctx.error, {\n * extra: { component: ctx.component, phase: ctx.phase },\n * })\n * })\n */\n\nexport interface ErrorContext {\n /** Component function name, or \"Anonymous\" */\n component: string\n /** Lifecycle phase where the error occurred */\n phase: \"setup\" | \"render\" | \"mount\" | \"unmount\" | \"effect\"\n /** The thrown value */\n error: unknown\n /** Unix timestamp (ms) */\n timestamp: number\n /** Component props at the time of the error */\n props?: Record<string, unknown>\n}\n\nexport type ErrorHandler = (ctx: ErrorContext) => void\n\nlet _handlers: ErrorHandler[] = []\n\n/**\n * Register a global error handler. Called whenever a component throws in any\n * lifecycle phase. Returns an unregister function.\n */\nexport function registerErrorHandler(handler: ErrorHandler): () => void {\n _handlers.push(handler)\n return () => {\n _handlers = _handlers.filter((h) => h !== handler)\n }\n}\n\n/**\n * Internal — called by the runtime whenever a component error is caught.\n * Existing console.error calls are preserved; this is additive.\n */\nexport function reportError(ctx: ErrorContext): void {\n for (const h of _handlers) {\n try {\n h(ctx)\n } catch {\n // handler errors must never propagate back into the framework\n }\n }\n}\n","import { signal } from \"@pyreon/reactivity\"\nimport { popErrorBoundary, pushErrorBoundary } from \"./component\"\nimport { onUnmount } from \"./lifecycle\"\nimport { reportError } from \"./telemetry\"\nimport type { VNodeChild, VNodeChildAtom } from \"./types\"\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\n/**\n * ErrorBoundary — catches errors thrown by child components and renders a\n * fallback UI instead of crashing the whole tree.\n *\n * Also reports caught errors to any registered telemetry handlers.\n *\n * How error propagation works:\n * ErrorBoundary pushes a handler onto the module-level boundary stack\n * synchronously during its own setup (before children are mounted).\n * When mountComponent catches a child error, it calls dispatchToErrorBoundary()\n * which invokes the innermost boundary's handler.\n *\n * Usage:\n * h(ErrorBoundary, {\n * fallback: (err) => h(\"p\", null, `Error: ${err}`),\n * children: h(MyComponent, null),\n * })\n *\n * // or with JSX:\n * <ErrorBoundary fallback={(err) => <p>Error: {String(err)}</p>}>\n * <MyComponent />\n * </ErrorBoundary>\n */\nexport function ErrorBoundary(props: {\n /**\n * Rendered when a child throws. Receives the caught error and a `reset`\n * function — calling `reset()` clears the error and re-renders children.\n */\n fallback: (err: unknown, reset: () => void) => VNodeChild\n children?: VNodeChild\n}): VNodeChild {\n if (__DEV__ && typeof props.fallback !== \"function\") {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\n \"[Pyreon] <ErrorBoundary> expects `fallback` to be a function: (err, reset) => VNode. \" +\n `Received ${typeof props.fallback}.`,\n )\n }\n\n const error = signal<unknown>(null)\n const reset = () => error.set(null)\n\n const handler = (err: unknown): boolean => {\n if (error.peek() !== null) return false // already in error state — let outer boundary catch it\n error.set(err)\n reportError({ component: \"ErrorBoundary\", phase: \"render\", error: err, timestamp: Date.now() })\n return true\n }\n\n // Push synchronously — before children are mounted — so child errors see this boundary\n pushErrorBoundary(handler)\n onUnmount(() => popErrorBoundary())\n\n return (): VNodeChildAtom => {\n const err = error()\n if (err != null) return props.fallback(err, reset) as VNodeChildAtom\n const ch = props.children\n return (typeof ch === \"function\" ? ch() : ch) as VNodeChildAtom\n }\n}\n","import type { NativeItem, Props, VNode } from \"./types\"\n\n/**\n * Symbol used as the VNode type for a For list — runtime-dom handles it\n * via mountFor, bypassing the generic VNode reconciler.\n */\nexport const ForSymbol: unique symbol = Symbol(\"pyreon.For\")\n\nexport interface ForProps<T> {\n each: () => T[]\n by: (item: T) => string | number\n children: (item: T) => VNode | NativeItem\n}\n\n/**\n * Efficient reactive list rendering.\n *\n * Unlike a plain `() => items().map(item => h(...))`, For never re-creates\n * VNodes for existing keys — only new keys invoke `children()`. Structural\n * mutations (swap, sort, filter) are O(n) key scan + O(k) DOM moves where k\n * is the number of actually displaced entries.\n *\n * Usage:\n * <For each={items} by={r => r.id}>{r => <li>...</li>}</For>\n */\nexport function For<T>(props: ForProps<T>): VNode {\n return {\n type: ForSymbol as unknown as string,\n props: props as unknown as Props,\n children: [],\n key: null,\n }\n}\n","import { signal } from \"@pyreon/reactivity\"\nimport { h } from \"./h\"\nimport type { LazyComponent } from \"./suspense\"\nimport type { ComponentFn, Props } from \"./types\"\n\nexport function lazy<P extends Props>(\n load: () => Promise<{ default: ComponentFn<P> }>,\n): LazyComponent<P> {\n const loaded = signal<ComponentFn<P> | null>(null)\n const error = signal<Error | null>(null)\n\n load()\n .then((m) => loaded.set(m.default))\n .catch((e) => error.set(e instanceof Error ? e : new Error(String(e))))\n\n const wrapper = ((props: P) => {\n const err = error()\n if (err) throw err\n const comp = loaded()\n return comp ? h(comp as ComponentFn, props as Props) : null\n }) as LazyComponent<P>\n\n wrapper.__loading = () => loaded() === null && error() === null\n return wrapper\n}\n","/**\n * mapArray — keyed reactive list mapping.\n *\n * Creates each mapped item exactly once per key, then reuses it across\n * updates. When the source array is reordered or partially changed, only\n * new keys invoke `map()`; existing entries return the cached result.\n *\n * This makes structural list operations (swap, sort, filter) O(k) in\n * allocations where k is the number of new/removed keys, not O(n).\n *\n * The returned accessor reads `source()` reactively, so it can be passed\n * directly to the keyed-list reconciler.\n */\nexport function mapArray<T, U>(\n source: () => T[],\n getKey: (item: T) => string | number,\n map: (item: T) => U,\n): () => U[] {\n const cache = new Map<string | number, U>()\n\n return () => {\n const items = source()\n const result: U[] = []\n const newKeys = new Set<string | number>()\n\n for (const item of items) {\n const key = getKey(item)\n newKeys.add(key)\n if (!cache.has(key)) {\n cache.set(key, map(item))\n }\n result.push(cache.get(key) as U)\n }\n\n // Evict entries whose keys are no longer present\n for (const key of cache.keys()) {\n if (!newKeys.has(key)) cache.delete(key)\n }\n\n return result\n }\n}\n","import type { Props, VNode, VNodeChild } from \"./types\"\n\n/**\n * Symbol used as the VNode type for a Portal — runtime-dom mounts the\n * children into `target` instead of the normal parent.\n */\nexport const PortalSymbol: unique symbol = Symbol(\"pyreon.Portal\")\n\nexport interface PortalProps {\n /** DOM element to render children into (e.g. document.body). */\n target: Element\n children: VNodeChild\n}\n\n/**\n * Portal — renders `children` into a different DOM node than the\n * current parent tree.\n *\n * Useful for modals, tooltips, dropdowns, and any overlay that needs to\n * escape CSS overflow/stacking context restrictions.\n *\n * @example\n * // Render a modal at document.body level regardless of where in the\n * // component tree <Modal> is used:\n * Portal({ target: document.body, children: h(Modal, { onClose }) })\n *\n * // JSX:\n * <Portal target={document.body}>\n * <Modal onClose={close} />\n * </Portal>\n */\nexport function Portal(props: PortalProps): VNode {\n return {\n type: PortalSymbol as unknown as string,\n props: props as unknown as Props,\n children: [],\n key: null,\n }\n}\n","// Prop utilities for component authoring.\n\n/**\n * Split props into two groups: keys you want and the rest.\n * Unlike destructuring, this preserves reactivity (getters on the original object).\n *\n * @example\n * const [own, html] = splitProps(props, [\"label\", \"icon\"])\n * return <button {...html}><Icon name={own.icon} /> {own.label}</button>\n */\nexport function splitProps<T extends Record<string, unknown>, K extends (keyof T)[]>(\n props: T,\n keys: K,\n): [Pick<T, K[number]>, Omit<T, K[number]>] {\n const picked = {} as Pick<T, K[number]>\n const rest = {} as Omit<T, K[number]>\n const keySet = new Set<string | symbol>(keys as (string | symbol)[])\n\n for (const key of Object.keys(props)) {\n const desc = Object.getOwnPropertyDescriptor(props, key)\n if (!desc) continue\n if (keySet.has(key)) {\n Object.defineProperty(picked, key, desc)\n } else {\n Object.defineProperty(rest, key, desc)\n }\n }\n\n return [picked, rest]\n}\n\n/** Merge a getter-backed source property with an existing getter or value. */\nfunction mergeGetterWithExisting(\n result: Record<string, unknown>,\n key: string,\n desc: PropertyDescriptor,\n existing: PropertyDescriptor,\n): void {\n const prevGet = existing.get ?? (() => existing.value)\n const nextGet = desc.get as () => unknown\n Object.defineProperty(result, key, {\n get: () => {\n const v = nextGet()\n return v !== undefined ? v : prevGet()\n },\n enumerable: true,\n configurable: true,\n })\n}\n\n/** Merge a static source property when the existing property has a getter. */\nfunction mergeStaticWithGetter(\n result: Record<string, unknown>,\n key: string,\n desc: PropertyDescriptor,\n existingGet: () => unknown,\n): void {\n if (desc.value !== undefined) {\n Object.defineProperty(result, key, desc)\n } else {\n Object.defineProperty(result, key, {\n get: existingGet,\n enumerable: true,\n configurable: true,\n })\n }\n}\n\n/** Apply a single source property onto the result object, handling getter/static combos. */\nfunction mergeProperty(\n result: Record<string, unknown>,\n key: string,\n desc: PropertyDescriptor,\n): void {\n const existing = Object.getOwnPropertyDescriptor(result, key)\n if (desc.get && existing) {\n mergeGetterWithExisting(result, key, desc, existing)\n } else if (desc.get) {\n Object.defineProperty(result, key, desc)\n } else if (existing?.get) {\n mergeStaticWithGetter(result, key, desc, existing.get)\n } else if (desc.value !== undefined || !existing) {\n // Both static — later value wins if defined\n Object.defineProperty(result, key, desc)\n }\n}\n\n/**\n * Merge default values with component props. Defaults are used when\n * the prop is `undefined`. Preserves getter reactivity.\n *\n * @example\n * const merged = mergeProps({ size: \"md\", variant: \"primary\" }, props)\n * // merged.size is reactive — falls back to \"md\" when props.size is undefined\n */\nexport function mergeProps<T extends Record<string, unknown>>(...sources: T[]): T {\n const result = {} as T\n for (const source of sources) {\n for (const key of Object.keys(source)) {\n const desc = Object.getOwnPropertyDescriptor(source, key)\n if (!desc) continue\n mergeProperty(result, key, desc)\n }\n }\n return result\n}\n\n// ─── Unique ID ───────────────────────────────────────────────────────────────\n\nlet _idCounter = 0\n\n/**\n * Generate a unique ID string for accessibility attributes (htmlFor, aria-describedby, etc.).\n * SSR-safe: uses a deterministic counter that resets per request context.\n *\n * @example\n * const id = createUniqueId()\n * return <>\n * <label for={id}>Name</label>\n * <input id={id} />\n * </>\n */\nexport function createUniqueId(): string {\n return `pyreon-${++_idCounter}`\n}\n\n/** Reset the ID counter (called by SSR per-request). */\nexport function _resetIdCounter(): void {\n _idCounter = 0\n}\n","/**\n * createRef — mutable container for a DOM element or component value.\n *\n * Usage:\n * const inputRef = createRef<HTMLInputElement>()\n * onMount(() => { inputRef.current?.focus() })\n * return <input ref={inputRef} />\n *\n * The runtime sets `ref.current` after the element is inserted into the DOM\n * and clears it to `null` when the element is removed.\n */\n\nexport interface Ref<T = unknown> {\n current: T | null\n}\n\n/** Callback ref — receives the element on mount and null on unmount. */\nexport type RefCallback<T = unknown> = (el: T | null) => void\n\n/** Union of object ref and callback ref — accepted by the JSX ref prop. */\nexport type RefProp<T = unknown> = Ref<T> | RefCallback<T>\n\nexport function createRef<T = unknown>(): Ref<T> {\n return { current: null }\n}\n","import type { Props, VNode, VNodeChild, VNodeChildAtom } from \"./types\"\n\n// ─── Show ─────────────────────────────────────────────────────────────────────\n\nexport interface ShowProps extends Props {\n /** Accessor — children render when truthy, fallback when falsy. */\n when: () => unknown\n fallback?: VNodeChild\n children?: VNodeChild\n}\n\n/**\n * Conditionally render children based on a reactive condition.\n *\n * @example\n * h(Show, { when: () => isLoggedIn() },\n * h(Dashboard, null)\n * )\n *\n * // With fallback:\n * h(Show, { when: () => user(), fallback: h(Login, null) },\n * h(Dashboard, null)\n * )\n */\nexport function Show(props: ShowProps): VNode | null {\n // Returns a reactive accessor; the renderer unwraps it at mount time.\n return ((): VNodeChildAtom =>\n (props.when()\n ? (props.children ?? null)\n : (props.fallback ?? null)) as VNodeChildAtom) as unknown as VNode\n}\n\n// ─── Switch / Match ───────────────────────────────────────────────────────────\n\nexport interface MatchProps extends Props {\n /** Accessor — this branch renders when truthy. */\n when: () => unknown\n children?: VNodeChild\n}\n\n/**\n * A branch inside `<Switch>`. Renders when `when()` is truthy.\n * Must be used as a direct child of `Switch`.\n *\n * `Match` acts as a pure type/identity marker — Switch identifies it by checking\n * `vnode.type === Match` rather than by the runtime return value.\n */\nexport function Match(_props: MatchProps): VNode | null {\n // Match is never mounted directly — Switch inspects Match VNodes by type identity.\n return null\n}\n\nexport interface SwitchProps extends Props {\n /** Rendered when no Match branch is truthy. */\n fallback?: VNodeChild\n children?: VNodeChild | VNodeChild[]\n}\n\n/**\n * Multi-branch conditional rendering. Evaluates each `Match` child in order,\n * renders the first whose `when()` is truthy, or `fallback` if none match.\n *\n * @example\n * h(Switch, { fallback: h(\"p\", null, \"404\") },\n * h(Match, { when: () => route() === \"/\" }, h(Home, null)),\n * h(Match, { when: () => route() === \"/about\" }, h(About, null)),\n * )\n */\nfunction isMatchVNode(branch: VNodeChild): branch is VNode {\n return (\n branch !== null &&\n typeof branch === \"object\" &&\n !Array.isArray(branch) &&\n (branch as VNode).type === Match\n )\n}\n\nfunction resolveMatchChildren(matchVNode: VNode): VNodeChildAtom {\n if (matchVNode.children.length === 0) {\n return ((matchVNode.props as unknown as MatchProps).children ?? null) as VNodeChildAtom\n }\n if (matchVNode.children.length === 1) return matchVNode.children[0] as VNodeChildAtom\n return matchVNode.children as unknown as VNodeChildAtom\n}\n\nfunction normalizeBranches(children: SwitchProps[\"children\"]): VNodeChild[] {\n if (Array.isArray(children)) return children\n if (children != null) return [children]\n return []\n}\n\nexport function Switch(props: SwitchProps): VNode | null {\n // Returns a reactive accessor; the renderer unwraps it at mount time.\n return ((): VNodeChildAtom => {\n const branches = normalizeBranches(props.children)\n\n for (const branch of branches) {\n if (!isMatchVNode(branch)) continue\n const matchProps = branch.props as unknown as MatchProps\n if (matchProps.when()) return resolveMatchChildren(branch)\n }\n\n return (props.fallback ?? null) as VNodeChildAtom\n }) as unknown as VNode\n}\n\n// Keep MatchSymbol export for any code that was using it\nexport const MatchSymbol: unique symbol = Symbol(\"pyreon.Match\")\n","// Shared style utilities used by both runtime-dom and runtime-server.\n\n// CSS properties where numeric values are unitless (e.g. `opacity: 0.5`, `zIndex: 10`).\n// All other numeric values get \"px\" appended automatically (e.g. `height: 100` → `\"100px\"`).\nexport const CSS_UNITLESS = new Set([\n \"animationIterationCount\",\n \"aspectRatio\",\n \"borderImageOutset\",\n \"borderImageSlice\",\n \"borderImageWidth\",\n \"boxFlex\",\n \"boxFlexGroup\",\n \"boxOrdinalGroup\",\n \"columnCount\",\n \"columns\",\n \"flex\",\n \"flexGrow\",\n \"flexPositive\",\n \"flexShrink\",\n \"flexNegative\",\n \"flexOrder\",\n \"gridArea\",\n \"gridRow\",\n \"gridRowEnd\",\n \"gridRowSpan\",\n \"gridRowStart\",\n \"gridColumn\",\n \"gridColumnEnd\",\n \"gridColumnSpan\",\n \"gridColumnStart\",\n \"fontWeight\",\n \"lineClamp\",\n \"lineHeight\",\n \"opacity\",\n \"order\",\n \"orphans\",\n \"scale\",\n \"tabSize\",\n \"widows\",\n \"zIndex\",\n \"zoom\",\n \"fillOpacity\",\n \"floodOpacity\",\n \"stopOpacity\",\n \"strokeDasharray\",\n \"strokeDashoffset\",\n \"strokeMiterlimit\",\n \"strokeOpacity\",\n \"strokeWidth\",\n])\n\n// ─── Class utilities ─────────────────────────────────────────────────────────\n\n/** Value accepted by the `class` prop — string, array, object, or nested mix. */\nexport type ClassValue =\n | string\n | number\n | boolean\n | null\n | undefined\n | ClassValue[]\n | Record<string, boolean | null | undefined | (() => boolean)>\n\nfunction cxObject(obj: Record<string, boolean | null | undefined | (() => boolean)>): string {\n let result = \"\"\n for (const key in obj) {\n const v = obj[key]\n const truthy = typeof v === \"function\" ? v() : v\n if (truthy) result = result ? `${result} ${key}` : key\n }\n return result\n}\n\nfunction cxArray(arr: ClassValue[]): string {\n let result = \"\"\n for (const item of arr) {\n const resolved = cx(item)\n if (resolved) result = result ? `${result} ${resolved}` : resolved\n }\n return result\n}\n\n/** Resolve a ClassValue into a flat class string (like clsx/cx). */\nexport function cx(value: ClassValue): string {\n if (value == null || value === false || value === true) return \"\"\n if (typeof value === \"string\") return value\n if (typeof value === \"number\") return String(value)\n if (Array.isArray(value)) return cxArray(value)\n return cxObject(value)\n}\n\n// ─── Style utilities ─────────────────────────────────────────────────────────\n\n/** Convert a camelCase CSS property name to kebab-case. */\nexport function toKebabCase(str: string): string {\n return str.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)\n}\n\n/** Normalize a style value — appends \"px\" to numbers for non-unitless properties. */\nexport function normalizeStyleValue(key: string, value: unknown): string {\n return typeof value === \"number\" && !CSS_UNITLESS.has(key) ? `${value}px` : String(value)\n}\n","import { Fragment, h } from \"./h\"\nimport type { Props, VNode, VNodeChild } from \"./types\"\n\nconst __DEV__ = typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\"\n\n/** Internal marker attached to lazy()-wrapped components */\nexport type LazyComponent<P extends Props = Props> = ((props: P) => VNodeChild) & {\n __loading: () => boolean\n}\n\n/**\n * Suspense — shows `fallback` while a lazy child component is still loading.\n *\n * Works in tandem with `lazy()` from `@pyreon/react-compat` (or `@pyreon/core/lazy`).\n * The child VNode's `.type.__loading()` signal drives the switch.\n *\n * Usage:\n * const Page = lazy(() => import(\"./Page\"))\n *\n * h(Suspense, { fallback: h(Spinner, null) }, h(Page, null))\n * // or with JSX:\n * <Suspense fallback={<Spinner />}><Page /></Suspense>\n */\nexport function Suspense(props: { fallback: VNodeChild; children?: VNodeChild }): VNode {\n if (__DEV__ && props.fallback === undefined) {\n // biome-ignore lint/suspicious/noConsole: dev-only warning\n console.warn(\n \"[Pyreon] <Suspense> is missing a `fallback` prop. Provide fallback UI to show while loading.\",\n )\n }\n\n return h(Fragment, null, () => {\n const ch = props.children\n const childNode = typeof ch === \"function\" ? ch() : ch\n\n // Check if the child is a VNode whose type is a lazy component still loading\n const isLoading =\n childNode != null &&\n typeof childNode === \"object\" &&\n !Array.isArray(childNode) &&\n typeof (childNode as VNode).type === \"function\" &&\n ((childNode as VNode).type as unknown as LazyComponent).__loading?.()\n\n if (isLoading) {\n const fb = props.fallback\n return typeof fb === \"function\" ? fb() : fb\n }\n return childNode\n })\n}\n"],"mappings":";;;AAEA,MAAMA,YAAU,OAAO,YAAY,eAAe,QAAQ,IAAI,aAAa;AAI3E,IAAI,WAAkC;AAEtC,SAAgB,gBAAgB,OAA8B;AAC5D,YAAW;;AAOb,SAAS,iBAAiB,UAAwB;AAChD,KAAIA,aAAW,CAAC,SAEd,SAAQ,KACN,YAAY,SAAS,sHAEtB;;;;;;AASL,SAAgB,QAAQ,IAAwC;AAC9D,kBAAiB,UAAU;AAC3B,WAAU,MAAM,KAAK,GAAG;;;;;AAM1B,SAAgB,UAAU,IAAgB;AACxC,kBAAiB,YAAY;AAC7B,WAAU,QAAQ,KAAK,GAAG;;;;;AAM5B,SAAgB,SAAS,IAAgB;AACvC,kBAAiB,WAAW;AAC5B,WAAU,OAAO,KAAK,GAAG;;;;;;;;;;;;;;;AAgB3B,SAAgB,gBAAgB,IAA2C;AACzE,kBAAiB,kBAAkB;AACnC,WAAU,MAAM,KAAK,GAAG;;;;;;;;;AC5D1B,SAAgB,gBAAiC,IAAoC;AACnF,QAAO;;;;;;;;AAST,SAAgB,aACd,IACA,OAC8C;CAC9C,MAAM,QAAwB;EAAE,OAAO,EAAE;EAAE,SAAS,EAAE;EAAE,QAAQ,EAAE;EAAE,OAAO,EAAE;EAAE;AAC/E,iBAAgB,MAAM;CACtB,IAAI,QAAoB;AACxB,KAAI;AACF,UAAQ,GAAG,MAAM;WACT;AACR,kBAAgB,KAAK;;AAEvB,QAAO;EAAE;EAAO;EAAO;;;;;;AAOzB,SAAgB,eAAe,KAAc,OAAgC;AAC3E,MAAK,MAAM,WAAW,MAAM,MAC1B,KAAI,QAAQ,IAAI,KAAK,KAAM,QAAO;AAEpC,Q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U,SAAU,QAAO;AACtC,KAAI,OAAO,UAAU,SAAU,QAAO,OAAO,MAAM;AACnD,KAAI,MAAM,QAAQ,MAAM,CAAE,QAAO,QAAQ,MAAM;AAC/C,QAAO,SAAS,MAAM;;;AAMxB,SAAgB,YAAY,KAAqB;AAC/C,QAAO,IAAI,QAAQ,WAAW,MAAM,IAAI,EAAE,aAAa,GAAG;;;AAI5D,SAAgB,oBAAoB,KAAa,OAAwB;AACvE,QAAO,OAAO,UAAU,YAAY,CAAC,aAAa,IAAI,IAAI,GAAG,GAAG,MAAM,MAAM,OAAO,MAAM;;;;;ACjG3F,MAAM,UAAU,OAAO,YAAY,eAAe,QAAQ,IAAI,aAAa;;;;;;;;;;;;;;AAoB3E,SAAgB,SAAS,OAA+D;AACtF,KAAI,WAAW,MAAM,aAAa,OAEhC,SAAQ,KACN,+FACD;AAGH,QAAO,EAAE,UAAU,YAAY;EAC7B,MAAM,KAAK,MAAM;EACjB,MAAM,YAAY,OAAO,OAAO,aAAa,IAAI,GAAG;AAUpD,MANE,aAAa,QACb,OAAO,cAAc,YACrB,CAAC,MAAM,QAAQ,UAAU,IACzB,OAAQ,UAAoB,SAAS,cACnC,UAAoB,KAAkC,aAAa,EAExD;GACb,MAAM,KAAK,MAAM;AACjB,UAAO,OAAO,OAAO,aAAa,IAAI,GAAG;;AAE3C,SAAO;GACP"}
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.d.ts","names":[],"sources":["../../../src/types.ts","../../../src/component.ts","../../../src/context.ts","../../../src/dynamic.ts","../../../src/error-boundary.ts","../../../src/for.ts","../../../src/h.ts","../../../src/ref.ts","../../../src/style.ts","../../../src/jsx-runtime.ts","../../../src/suspense.ts","../../../src/lazy.ts","../../../src/lifecycle.ts","../../../src/map-array.ts","../../../src/portal.ts","../../../src/props.ts","../../../src/show.ts","../../../src/telemetry.ts"],"mappings":";KAGY,cAAA,GAAiB,KAAA,GAAQ,KAAA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;;iBiBmBgB,oBAAA,CAAqB,OAAA,EAAS,YAAA;;;AjBX9C;;iBiBsBgB,WAAA,CAAY,GAAA,EAAK,YAAA"}
|
|
1
|
+
{"version":3,"file":"index2.d.ts","names":[],"sources":["../../../src/types.ts","../../../src/component.ts","../../../src/context.ts","../../../src/dynamic.ts","../../../src/error-boundary.ts","../../../src/for.ts","../../../src/h.ts","../../../src/ref.ts","../../../src/style.ts","../../../src/jsx-runtime.ts","../../../src/suspense.ts","../../../src/lazy.ts","../../../src/lifecycle.ts","../../../src/map-array.ts","../../../src/portal.ts","../../../src/props.ts","../../../src/show.ts","../../../src/telemetry.ts"],"mappings":";KAGY,cAAA,GAAiB,KAAA,GAAQ,KAAA;AAAA,KACzB,UAAA,GAAa,cAAA,UAAwB,cAAA;AAAA,UAEhC,KAAA;;EAEf,IAAA,WAAe,WAAA;EACf,KAAA,EAAO,KAAA;EACP,QAAA,EAAU,UAAA;EACV,GAAA;AAAA;AAAA,KAKU,KAAA,GAAQ,MAAA;;AAVpB;;;KAkBY,WAAA,WAAsB,KAAA,GAAQ,KAAA,KAAU,KAAA,EAAO,CAAA,KAAM,UAAA;;KAKrD,YAAA,MAAkB,CAAA,SAAU,WAAA,YAAuB,CAAA,GAAI,CAAA;;KAGvD,oBAAA,aAAiC,KAAA,YAAiB,KAAA,6BAC5D,SAAA,EAAW,WAAA,CAAY,GAAA,MACpB,WAAA,CAAY,CAAA,qBAAsB,GAAA,GAAM,CAAA;;;;UAK5B,iBAAA;EACf,KAAA,EAAO,KAAA;EA9BG;EAgCV,MAAA;EACA,OAAA;AAAA;AAAA,KAMU,SAAA;;;;;AAzBZ;UAkCiB,UAAA;EAAA,SACN,UAAA;EACT,EAAA,EAAI,WAAA;EACJ,OAAA;AAAA;AAAA,UAGe,cAAA;EAEf,KAAA,SAAc,SAAA;EACd,OAAA;EACA,MAAA;EA5CgC;EA8ChC,KAAA,IAAS,GAAA;AAAA;;;AAnEX;;;;AAAA,iBCIgB,eAAA,WAA0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AAA,EAAQ,UAAA,GAAa,KAAA;AAAA,UAK1B,WAAA,SAAoB,KAAA;EhB5Bd;EgB8BrB,QAAA,GAAW,UAAA;EACX,QAAA,GAAW,UAAA,GAAa,UAAA;AAAA;AAAA,iBAoCV,MAAA,CAAO,KAAA,EAAO,WAAA,GAAc,KAAA;AAAA,cAgB/B,WAAA;;;;AhBxGb;;;;;AACA;;;;;AAEA;;UiBQiB,YAAA;EjBNA;EiBQf,SAAA;EjBNU;EiBQV,KAAA;EjBRoB;EiBUpB,KAAA;EjBZe;EiBcf,SAAA;EjBbO;EiBeP,KAAA,GAAQ,MAAA;AAAA;AAAA,KAGE,YAAA,IAAgB,GAAA,EAAK,YAAA;;;AjBXjC;;iBiBmBgB,oBAAA,CAAqB,OAAA,EAAS,YAAA;;;AjBX9C;;iBiBsBgB,WAAA,CAAY,GAAA,EAAK,YAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.14",
|
|
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.7.
|
|
52
|
+
"@pyreon/reactivity": "^0.7.14"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
package/src/props.ts
CHANGED
|
@@ -29,6 +29,62 @@ export function splitProps<T extends Record<string, unknown>, K extends (keyof T
|
|
|
29
29
|
return [picked, rest]
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/** Merge a getter-backed source property with an existing getter or value. */
|
|
33
|
+
function mergeGetterWithExisting(
|
|
34
|
+
result: Record<string, unknown>,
|
|
35
|
+
key: string,
|
|
36
|
+
desc: PropertyDescriptor,
|
|
37
|
+
existing: PropertyDescriptor,
|
|
38
|
+
): void {
|
|
39
|
+
const prevGet = existing.get ?? (() => existing.value)
|
|
40
|
+
const nextGet = desc.get as () => unknown
|
|
41
|
+
Object.defineProperty(result, key, {
|
|
42
|
+
get: () => {
|
|
43
|
+
const v = nextGet()
|
|
44
|
+
return v !== undefined ? v : prevGet()
|
|
45
|
+
},
|
|
46
|
+
enumerable: true,
|
|
47
|
+
configurable: true,
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Merge a static source property when the existing property has a getter. */
|
|
52
|
+
function mergeStaticWithGetter(
|
|
53
|
+
result: Record<string, unknown>,
|
|
54
|
+
key: string,
|
|
55
|
+
desc: PropertyDescriptor,
|
|
56
|
+
existingGet: () => unknown,
|
|
57
|
+
): void {
|
|
58
|
+
if (desc.value !== undefined) {
|
|
59
|
+
Object.defineProperty(result, key, desc)
|
|
60
|
+
} else {
|
|
61
|
+
Object.defineProperty(result, key, {
|
|
62
|
+
get: existingGet,
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Apply a single source property onto the result object, handling getter/static combos. */
|
|
70
|
+
function mergeProperty(
|
|
71
|
+
result: Record<string, unknown>,
|
|
72
|
+
key: string,
|
|
73
|
+
desc: PropertyDescriptor,
|
|
74
|
+
): void {
|
|
75
|
+
const existing = Object.getOwnPropertyDescriptor(result, key)
|
|
76
|
+
if (desc.get && existing) {
|
|
77
|
+
mergeGetterWithExisting(result, key, desc, existing)
|
|
78
|
+
} else if (desc.get) {
|
|
79
|
+
Object.defineProperty(result, key, desc)
|
|
80
|
+
} else if (existing?.get) {
|
|
81
|
+
mergeStaticWithGetter(result, key, desc, existing.get)
|
|
82
|
+
} else if (desc.value !== undefined || !existing) {
|
|
83
|
+
// Both static — later value wins if defined
|
|
84
|
+
Object.defineProperty(result, key, desc)
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
32
88
|
/**
|
|
33
89
|
* Merge default values with component props. Defaults are used when
|
|
34
90
|
* the prop is `undefined`. Preserves getter reactivity.
|
|
@@ -43,41 +99,7 @@ export function mergeProps<T extends Record<string, unknown>>(...sources: T[]):
|
|
|
43
99
|
for (const key of Object.keys(source)) {
|
|
44
100
|
const desc = Object.getOwnPropertyDescriptor(source, key)
|
|
45
101
|
if (!desc) continue
|
|
46
|
-
|
|
47
|
-
// and fall back to the previously defined value
|
|
48
|
-
const existing = Object.getOwnPropertyDescriptor(result, key)
|
|
49
|
-
if (desc.get && existing) {
|
|
50
|
-
const prevGet = existing.get ?? (() => existing.value)
|
|
51
|
-
const nextGet = desc.get
|
|
52
|
-
Object.defineProperty(result, key, {
|
|
53
|
-
get: () => {
|
|
54
|
-
const v = nextGet()
|
|
55
|
-
return v !== undefined ? v : prevGet()
|
|
56
|
-
},
|
|
57
|
-
enumerable: true,
|
|
58
|
-
configurable: true,
|
|
59
|
-
})
|
|
60
|
-
} else if (desc.get) {
|
|
61
|
-
Object.defineProperty(result, key, desc)
|
|
62
|
-
} else if (existing?.get) {
|
|
63
|
-
// New source has a static value, previous had a getter
|
|
64
|
-
const prevGet = existing.get
|
|
65
|
-
const staticVal = desc.value
|
|
66
|
-
if (staticVal !== undefined) {
|
|
67
|
-
Object.defineProperty(result, key, desc)
|
|
68
|
-
} else {
|
|
69
|
-
Object.defineProperty(result, key, {
|
|
70
|
-
get: prevGet,
|
|
71
|
-
enumerable: true,
|
|
72
|
-
configurable: true,
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
// Both static — later value wins if defined
|
|
77
|
-
if (desc.value !== undefined || !existing) {
|
|
78
|
-
Object.defineProperty(result, key, desc)
|
|
79
|
-
}
|
|
80
|
-
}
|
|
102
|
+
mergeProperty(result, key, desc)
|
|
81
103
|
}
|
|
82
104
|
}
|
|
83
105
|
return result
|
package/src/tests/cx.test.ts
CHANGED
|
@@ -38,4 +38,33 @@ describe("cx", () => {
|
|
|
38
38
|
expect(cx([])).toBe("")
|
|
39
39
|
expect(cx({})).toBe("")
|
|
40
40
|
})
|
|
41
|
+
|
|
42
|
+
test("object where ALL values are functions returning booleans", () => {
|
|
43
|
+
expect(
|
|
44
|
+
cx({
|
|
45
|
+
active: () => true,
|
|
46
|
+
hidden: () => false,
|
|
47
|
+
bold: () => true,
|
|
48
|
+
italic: () => false,
|
|
49
|
+
}),
|
|
50
|
+
).toBe("active bold")
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
test("deeply nested arrays (3+ levels)", () => {
|
|
54
|
+
expect(cx([[["level3", [["level5"]]]]])).toBe("level3 level5")
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
test("mixed: string, object with function, deeply nested array", () => {
|
|
58
|
+
expect(cx(["base", { active: () => true }, [["deeply-nested"]]])).toBe(
|
|
59
|
+
"base active deeply-nested",
|
|
60
|
+
)
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
test("empty string values are filtered", () => {
|
|
64
|
+
expect(cx(["foo", "", "bar", ""])).toBe("foo bar")
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
test("number 0 is a valid class name as string", () => {
|
|
68
|
+
expect(cx(0)).toBe("0")
|
|
69
|
+
})
|
|
41
70
|
})
|
package/src/tests/props.test.ts
CHANGED
|
@@ -66,6 +66,100 @@ describe("mergeProps", () => {
|
|
|
66
66
|
})
|
|
67
67
|
})
|
|
68
68
|
|
|
69
|
+
describe("mergeProps — edge cases", () => {
|
|
70
|
+
test("mixed getter/static value merging across 3+ sources", () => {
|
|
71
|
+
let dynamicSize = "sm"
|
|
72
|
+
const source1 = { size: "md", variant: "primary" }
|
|
73
|
+
const source2 = Object.defineProperty({} as Record<string, unknown>, "size", {
|
|
74
|
+
get: () => dynamicSize,
|
|
75
|
+
enumerable: true,
|
|
76
|
+
configurable: true,
|
|
77
|
+
})
|
|
78
|
+
const source3 = { color: "red" }
|
|
79
|
+
const result = mergeProps(source1, source2, source3)
|
|
80
|
+
expect(result.size).toBe("sm")
|
|
81
|
+
dynamicSize = "xl"
|
|
82
|
+
expect(result.size).toBe("xl")
|
|
83
|
+
expect((result as Record<string, unknown>).variant).toBe("primary")
|
|
84
|
+
expect((result as Record<string, unknown>).color).toBe("red")
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
test("getter returning undefined falling through multiple levels of defaults", () => {
|
|
88
|
+
let level2: string | undefined
|
|
89
|
+
let level1: string | undefined
|
|
90
|
+
const defaults = { theme: "light" }
|
|
91
|
+
const mid = Object.defineProperty({} as Record<string, unknown>, "theme", {
|
|
92
|
+
get: () => level1,
|
|
93
|
+
enumerable: true,
|
|
94
|
+
configurable: true,
|
|
95
|
+
})
|
|
96
|
+
const top = Object.defineProperty({} as Record<string, unknown>, "theme", {
|
|
97
|
+
get: () => level2,
|
|
98
|
+
enumerable: true,
|
|
99
|
+
configurable: true,
|
|
100
|
+
})
|
|
101
|
+
const result = mergeProps(defaults, mid, top)
|
|
102
|
+
// Both getters return undefined — falls back to "light"
|
|
103
|
+
expect(result.theme).toBe("light")
|
|
104
|
+
// Mid-level getter returns value — top still undefined, falls to mid
|
|
105
|
+
level1 = "dark"
|
|
106
|
+
expect(result.theme).toBe("dark")
|
|
107
|
+
// Top-level getter returns value — wins
|
|
108
|
+
level2 = "system"
|
|
109
|
+
expect(result.theme).toBe("system")
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
test("mergeProps with no sources (empty call)", () => {
|
|
113
|
+
const result = mergeProps()
|
|
114
|
+
expect(result).toEqual({})
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
test("later source static value overriding earlier getter", () => {
|
|
118
|
+
const dynamic = "from-getter"
|
|
119
|
+
const getterSource = Object.defineProperty({} as Record<string, unknown>, "val", {
|
|
120
|
+
get: () => dynamic,
|
|
121
|
+
enumerable: true,
|
|
122
|
+
configurable: true,
|
|
123
|
+
})
|
|
124
|
+
const staticSource = { val: "static-wins" }
|
|
125
|
+
const result = mergeProps(getterSource, staticSource)
|
|
126
|
+
// Static value should override getter
|
|
127
|
+
expect(result.val).toBe("static-wins")
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
test("later source static undefined does not override earlier getter", () => {
|
|
131
|
+
let dynamic = "from-getter"
|
|
132
|
+
const getterSource = Object.defineProperty({} as Record<string, unknown>, "val", {
|
|
133
|
+
get: () => dynamic,
|
|
134
|
+
enumerable: true,
|
|
135
|
+
configurable: true,
|
|
136
|
+
})
|
|
137
|
+
const staticSource = { val: undefined }
|
|
138
|
+
const result = mergeProps(getterSource, staticSource)
|
|
139
|
+
// Static undefined — getter should still be used
|
|
140
|
+
expect(result.val).toBe("from-getter")
|
|
141
|
+
dynamic = "updated"
|
|
142
|
+
expect(result.val).toBe("updated")
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
describe("splitProps — getter reactivity", () => {
|
|
147
|
+
test("preserves getter reactivity through multiple reads", () => {
|
|
148
|
+
let count = 0
|
|
149
|
+
const props = Object.defineProperty({ other: "x" } as Record<string, unknown>, "value", {
|
|
150
|
+
get: () => ++count,
|
|
151
|
+
enumerable: true,
|
|
152
|
+
configurable: true,
|
|
153
|
+
})
|
|
154
|
+
const [own, rest] = splitProps(props, ["value"])
|
|
155
|
+
expect(own.value).toBe(1)
|
|
156
|
+
expect(own.value).toBe(2)
|
|
157
|
+
expect(own.value).toBe(3)
|
|
158
|
+
// rest should not include the getter key
|
|
159
|
+
expect(rest).toEqual({ other: "x" })
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
|
|
69
163
|
describe("createUniqueId", () => {
|
|
70
164
|
test("returns incrementing IDs", () => {
|
|
71
165
|
const id1 = createUniqueId()
|