sigx 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Hydration utilities for SSR
3
+ *
4
+ * This module provides utilities for server-side rendering and client-side hydration.
5
+ * Can be imported as `sigx/hydration` for tree-shaking when only hydration utilities are needed.
6
+ *
7
+ * @module sigx/hydration
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { getHydrationDirective, filterClientDirectives } from 'sigx/hydration';
12
+ * ```
13
+ */
14
+ export { CLIENT_DIRECTIVE_PREFIX, CLIENT_DIRECTIVES, type ClientDirective, type HydrationStrategy, type HydrationDirective, filterClientDirectives, getHydrationDirective, hasClientDirective, serializeProps, createEmit } from '@sigx/runtime-core';
15
+ //# sourceMappingURL=hydration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hydration.d.ts","sourceRoot":"","sources":["../src/hydration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACH,uBAAuB,EACvB,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACb,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { a as filterClientDirectives, c as serializeProps, i as createEmit, n as CLIENT_DIRECTIVES, o as getHydrationDirective, r as CLIENT_DIRECTIVE_PREFIX, s as hasClientDirective } from "./src-CfoY1XNS.js";
2
+ export { CLIENT_DIRECTIVES, CLIENT_DIRECTIVE_PREFIX, createEmit, filterClientDirectives, getHydrationDirective, hasClientDirective, serializeProps };
@@ -1,3 +1,4 @@
1
+ import '@sigx/runtime-dom';
1
2
  export * from '@sigx/runtime-core';
2
3
  export { jsx, jsxs, jsxDEV, Fragment } from '@sigx/runtime-core';
3
4
  //# sourceMappingURL=jsx-runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../src/jsx-runtime.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../src/jsx-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
package/dist/sigx.js CHANGED
@@ -1,7 +1,183 @@
1
- import "@sigx/runtime-dom";
1
+ import { $ as notifyComponentCreated, A as createModel, B as toRaw, C as registerPendingPromise, Ct as setPlatformModelProcessor, D as jsxDEV, E as jsx, F as isComputed, G as track, H as cleanup, I as watch, J as ComputedSymbol, K as trigger, L as detectAccess, M as getModelSymbol, N as isModel, O as jsxs, P as computed, Q as handleComponentError, R as signal, S as lazy, St as getPlatformModelProcessor, T as Text, U as effect, V as batch, W as effectScope, X as defineApp, Y as compound, Z as getDefaultMount, _ as createSlots, _t as setCurrentInstance, a as filterClientDirectives, at as defineProvide, b as Suspense, bt as registerComponentPlugin, c as serializeProps, ct as useAppContext, d as createTopic, dt as getComponentMeta, et as notifyComponentMounted, f as toSubscriber, ft as getCurrentInstance, g as normalizeSubTree, gt as onUpdated, h as valueOf, ht as onUnmounted, i as createEmit, it as defineInjectable, j as createModelFromBinding, k as isComponent, l as SubscriptionHandler, lt as component, m as guid, mt as onMounted, n as CLIENT_DIRECTIVES, nt as notifyComponentUpdated, o as getHydrationDirective, ot as getAppContextToken, p as InstanceLifetimes, pt as onCreated, q as untrack, r as CLIENT_DIRECTIVE_PREFIX, rt as setDefaultMount, s as hasClientDirective, st as provideAppContext, t as createRenderer, tt as notifyComponentUnmounted, u as defineFactory, ut as createPropsProxy, v as createPropsAccessor, vt as applyContextExtensions, w as Fragment, x as isLazyComponent, xt as registerContextExtension, y as Utils, yt as getComponentPlugins, z as isReactive } from "./src-CfoY1XNS.js";
2
+ function supportsMoveBefore() {
3
+ return typeof Node < "u" && "moveBefore" in Node.prototype;
4
+ }
5
+ function moveNode(e, t, n = null) {
6
+ supportsMoveBefore() ? e.moveBefore(t, n) : e.insertBefore(t, n);
7
+ }
8
+ function resolveTarget(e) {
9
+ return e === void 0 ? document.body : typeof e == "string" ? document.querySelector(e) || (console.warn(`Portal: Target "${e}" not found, falling back to document.body`), document.body) : e;
10
+ }
11
+ const Portal = component(({ props: e, slots: t, onMounted: n, onUnmounted: r }) => {
12
+ let i = null, a = null, s = null;
13
+ return n(() => {
14
+ if (e.disabled) return;
15
+ let n = resolveTarget(e.to);
16
+ i = document.createElement("div"), i.setAttribute("data-sigx-portal", ""), moveNode(n, i), s = effect(() => {
17
+ let e = t.default();
18
+ if (!i) return;
19
+ let n = normalizeSubTree(e);
20
+ a ? patch(a, n, i) : mount(n, i), a = n;
21
+ });
22
+ }), r(() => {
23
+ s &&= (s(), null), a && i && (unmount(a, i), a = null), i && i.parentNode && i.parentNode.removeChild(i), i = null;
24
+ }), () => e.disabled ? jsx(Fragment, { children: t.default() }) : null;
25
+ }, { name: "Portal" });
26
+ var svgNS = "http://www.w3.org/2000/svg";
27
+ setPlatformModelProcessor((e, t, [n, r], i) => {
28
+ let a = (e) => {
29
+ let t = n[`onUpdate:${r}`];
30
+ typeof t == "function" ? t(e) : n[r] = e;
31
+ };
32
+ if (e === "input" && i.type === "checkbox") {
33
+ let e = n[r];
34
+ if (Array.isArray(e)) {
35
+ t.checked = e.includes(i.value);
36
+ let o = t["onUpdate:modelValue"];
37
+ t["onUpdate:modelValue"] = (e) => {
38
+ let t = i.value, s = n[r];
39
+ e ? s.includes(t) || a([...s, t]) : a(s.filter((e) => e !== t)), o && o(e);
40
+ };
41
+ } else {
42
+ t.checked = e;
43
+ let n = t["onUpdate:modelValue"];
44
+ t["onUpdate:modelValue"] = (e) => {
45
+ a(e), n && n(e);
46
+ };
47
+ }
48
+ return !0;
49
+ }
50
+ if (e === "input" && i.type === "radio") {
51
+ t.checked = n[r] === i.value;
52
+ let e = t["onUpdate:modelValue"];
53
+ return t["onUpdate:modelValue"] = (t) => {
54
+ t && a(i.value), e && e(t);
55
+ }, !0;
56
+ }
57
+ if (e === "input") {
58
+ t.value = n[r] ?? "";
59
+ let e = t["onUpdate:modelValue"];
60
+ return t["onUpdate:modelValue"] = (t) => {
61
+ a(t), e && e(t);
62
+ }, !0;
63
+ }
64
+ if (e === "textarea") {
65
+ t.value = n[r] ?? "";
66
+ let e = t["onUpdate:modelValue"];
67
+ return t["onUpdate:modelValue"] = (t) => {
68
+ a(t), e && e(t);
69
+ }, !0;
70
+ }
71
+ if (e === "select") {
72
+ t.value = n[r] ?? "";
73
+ let e = t["onUpdate:modelValue"];
74
+ return t["onUpdate:modelValue"] = (t) => {
75
+ a(t), e && e(t);
76
+ }, !0;
77
+ }
78
+ return !1;
79
+ });
80
+ function patchProp(e, t, n, r, i) {
81
+ if (!e) return;
82
+ let a = e.tagName.toLowerCase(), o = i ?? e instanceof SVGElement, s = n, c = r;
83
+ if (!(t === "children" || t === "key" || t === "ref")) if (t === "style") {
84
+ let t = e;
85
+ if (typeof c == "object" && c) {
86
+ let e = c;
87
+ for (let n in e) n.startsWith("--") ? t.style.setProperty(n, String(e[n])) : t.style[n] = e[n];
88
+ } else t.style.cssText = String(c);
89
+ } else if (t.startsWith("on")) {
90
+ if (t === "onUpdate:modelValue" && (a === "input" || a === "textarea" || a === "select")) {
91
+ let t = e;
92
+ if (s) {
93
+ let e = s.__sigx_model_handler;
94
+ e && (t.removeEventListener("input", e), t.removeEventListener("change", e));
95
+ }
96
+ if (c) {
97
+ let n = (t) => {
98
+ let n = t.target, r;
99
+ r = n.type === "checkbox" || n.type === "radio" ? n.checked : n.type === "number" ? n.valueAsNumber : a === "select" && e.multiple ? Array.from(e.selectedOptions).map((e) => e.value) : n.value, c(r);
100
+ };
101
+ c.__sigx_model_handler = n;
102
+ let r = e.type;
103
+ a === "select" || a === "input" && (r === "checkbox" || r === "radio") ? t.addEventListener("change", n) : t.addEventListener("input", n);
104
+ }
105
+ return;
106
+ }
107
+ let n = t.slice(2).toLowerCase(), r = "__sigx_event_handlers", i = e[r];
108
+ i || (i = /* @__PURE__ */ new Map(), e[r] = i);
109
+ let o = i.get(n);
110
+ if (o && (e.removeEventListener(n, o), i.delete(n)), c) {
111
+ let t = (e) => {
112
+ e instanceof CustomEvent ? c(e.detail) : c(e);
113
+ };
114
+ i.set(n, t), e.addEventListener(n, t);
115
+ }
116
+ } else if (t === "className") e.setAttribute("class", String(c));
117
+ else if (t.startsWith(".")) {
118
+ let n = t.slice(1);
119
+ e[n] = c;
120
+ } else if (o) if (t === "innerHTML" || t === "textContent") e[t] = c ?? "";
121
+ else if (t.startsWith("xlink:")) {
122
+ let n = "http://www.w3.org/1999/xlink";
123
+ c == null ? e.removeAttributeNS(n, t.slice(6)) : e.setAttributeNS(n, t, String(c));
124
+ } else c === !0 ? e.setAttribute(t, "") : c === !1 || c == null ? e.removeAttribute(t) : e.setAttribute(t, String(c));
125
+ else if ((a === "input" || a === "textarea" || a === "select") && (t === "value" || t === "checked")) {
126
+ if (a === "select" && t === "value") {
127
+ queueMicrotask(() => {
128
+ e.value = String(c ?? "");
129
+ });
130
+ return;
131
+ }
132
+ t === "checked" && a === "input" ? e.checked = !!c : t === "value" && (e.value = String(c ?? ""));
133
+ } else if (t in e) if (c == null) e.hasAttribute?.(t) && e.removeAttribute(t);
134
+ else try {
135
+ e[t] = c;
136
+ } catch {
137
+ e.setAttribute(t, String(c));
138
+ }
139
+ else a.includes("-") && !t.includes("-") ? e[t] = c : c === !0 ? e.setAttribute(t, "") : c === !1 || c == null ? e.removeAttribute(t) : e.setAttribute(t, String(c));
140
+ }
141
+ var nodeOps = {
142
+ insert: (e, t, n) => {
143
+ t.insertBefore(e, n || null);
144
+ },
145
+ remove: (e) => {
146
+ let t = e.parentNode;
147
+ t && t.removeChild(e);
148
+ },
149
+ createElement: (e, t, n) => {
150
+ if (t) return document.createElementNS(svgNS, e);
151
+ let r = n ? { is: n } : void 0;
152
+ return document.createElement(e, r);
153
+ },
154
+ createText: (e) => document.createTextNode(e),
155
+ createComment: (e) => document.createComment(e),
156
+ setText: (e, t) => {
157
+ e.nodeValue = t;
158
+ },
159
+ setElementText: (e, t) => {
160
+ e.textContent = t;
161
+ },
162
+ parentNode: (e) => e.parentNode,
163
+ nextSibling: (e) => e.nextSibling,
164
+ querySelector: (e) => document.querySelector(e),
165
+ setScopeId: (e, t) => e.setAttribute(t, ""),
166
+ cloneNode: (e) => e.cloneNode(!0),
167
+ patchProp
168
+ }, renderer = createRenderer(nodeOps);
169
+ const render = (e, t, n) => {
170
+ let r = typeof t == "string" ? document.querySelector(t) : t;
171
+ if (!r) throw Error(`Render target "${t}" not found.`);
172
+ return renderer.render(e, r, n);
173
+ }, { patch, mount, unmount, mountComponent } = renderer, domMount = (e, t, n) => {
174
+ let r = typeof t == "string" ? document.querySelector(t) : t;
175
+ if (!r) throw Error(`Mount target "${t}" not found.`);
176
+ return render(e, r, n), () => {
177
+ render(null, r);
178
+ };
179
+ };
180
+ setDefaultMount(domMount);
181
+ export { CLIENT_DIRECTIVES, CLIENT_DIRECTIVE_PREFIX, ComputedSymbol, Fragment, InstanceLifetimes, Portal, SubscriptionHandler, Suspense, Text, Utils, applyContextExtensions, batch, cleanup, component, compound, computed, createEmit, createModel, createModelFromBinding, createPropsAccessor, createPropsProxy, createRenderer, createSlots, createTopic, defineApp, defineFactory, defineInjectable, defineProvide, detectAccess, domMount, effect, effectScope, filterClientDirectives, getAppContextToken, getComponentMeta, getComponentPlugins, getCurrentInstance, getDefaultMount, getHydrationDirective, getModelSymbol, getPlatformModelProcessor, guid, handleComponentError, hasClientDirective, isComponent, isComputed, isLazyComponent, isModel, isReactive, jsx, jsxDEV, jsxs, lazy, mount, mountComponent, moveNode, nodeOps, normalizeSubTree, notifyComponentCreated, notifyComponentMounted, notifyComponentUnmounted, notifyComponentUpdated, onCreated, onMounted, onUnmounted, onUpdated, patch, patchProp, provideAppContext, registerComponentPlugin, registerContextExtension, registerPendingPromise, render, serializeProps, setCurrentInstance, setDefaultMount, setPlatformModelProcessor, signal, supportsMoveBefore, toRaw, toSubscriber, track, trigger, unmount, untrack, useAppContext, valueOf, watch };
2
182
 
3
- export * from "@sigx/runtime-dom"
4
-
5
- export * from "@sigx/reactivity"
6
-
7
- export * from "@sigx/runtime-core"
183
+ //# sourceMappingURL=sigx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sigx.js","names":[],"sources":["../../runtime-dom/src/Portal.tsx","../../runtime-dom/src/index.ts"],"sourcesContent":["/**\r\n * Portal component for rendering children to a different DOM location.\r\n * \r\n * Uses the `moveBefore` API (Chrome 133+) when available for state-preserving\r\n * DOM moves. Falls back to `insertBefore` for older browsers.\r\n * \r\n * @example\r\n * ```tsx\r\n * import { Portal } from '@sigx/runtime-dom';\r\n * \r\n * // Render to document.body (default)\r\n * <Portal>\r\n * <div class=\"modal\">Modal content</div>\r\n * </Portal>\r\n * \r\n * // Render to a specific container\r\n * <Portal to={document.getElementById('modal-root')}>\r\n * <div class=\"modal\">Modal content</div>\r\n * </Portal>\r\n * \r\n * // Render to a container by selector\r\n * <Portal to=\"#modal-root\">\r\n * <div class=\"modal\">Modal content</div>\r\n * </Portal>\r\n * ```\r\n */\r\n\r\nimport { component, DefineProp, Fragment, VNode, jsx, normalizeSubTree } from '@sigx/runtime-core';\r\nimport { effect } from '@sigx/reactivity';\r\nimport { mount, unmount, patch } from './index.js';\r\n\r\n/**\r\n * Check if the browser supports the moveBefore API.\r\n * moveBefore allows moving DOM nodes without losing state (iframes, videos, focus, etc.)\r\n */\r\nexport function supportsMoveBefore(): boolean {\r\n return typeof Node !== 'undefined' && 'moveBefore' in Node.prototype;\r\n}\r\n\r\n/**\r\n * Move or insert a node into a parent, using moveBefore when available\r\n * for state-preserving moves.\r\n * \r\n * @param parent - The target parent element\r\n * @param node - The node to move/insert\r\n * @param anchor - Optional reference node to insert before\r\n */\r\nexport function moveNode(\r\n parent: Element,\r\n node: Node,\r\n anchor: Node | null = null\r\n): void {\r\n if (supportsMoveBefore()) {\r\n // Use moveBefore for state-preserving move (Chrome 133+)\r\n (parent as any).moveBefore(node, anchor);\r\n } else {\r\n // Fallback to insertBefore (causes state reset for iframes, etc.)\r\n parent.insertBefore(node, anchor);\r\n }\r\n}\r\n\r\n/**\r\n * Resolve a portal target from a string selector or Element.\r\n * Returns document.body as fallback.\r\n */\r\nfunction resolveTarget(target: string | Element | undefined): Element {\r\n if (target === undefined) {\r\n return document.body;\r\n }\r\n \r\n if (typeof target === 'string') {\r\n const resolved = document.querySelector(target);\r\n if (!resolved) {\r\n console.warn(`Portal: Target \"${target}\" not found, falling back to document.body`);\r\n return document.body;\r\n }\r\n return resolved;\r\n }\r\n \r\n return target;\r\n}\r\n\r\ntype PortalProps = DefineProp<'to', string | Element> & DefineProp<'disabled', boolean>;\r\n\r\n/**\r\n * Portal component - renders children to a different DOM location.\r\n * \r\n * Props:\r\n * - `to` - Target container (Element or CSS selector string). Defaults to document.body.\r\n * - `disabled` - When true, renders children in place instead of portaling\r\n * - `children` - Content to render in the portal\r\n * \r\n * Features:\r\n * - Uses `moveBefore` API (Chrome 133+) for state-preserving DOM moves\r\n * - Preserves iframe content, video playback, focus, and CSS animations\r\n * - Falls back to `insertBefore` for older browsers\r\n */\r\nexport const Portal = component<PortalProps>(({ props, slots, onMounted, onUnmounted }) => {\r\n // Container element for portal content\r\n let portalContainer: HTMLDivElement | null = null;\r\n let mountedVNode: VNode | null = null;\r\n let cleanupEffect: (() => void) | null = null;\r\n\r\n onMounted(() => {\r\n if (props.disabled) {\r\n return;\r\n }\r\n\r\n // Resolve target container\r\n const targetContainer = resolveTarget(props.to);\r\n\r\n // Create a container div for the portal content\r\n portalContainer = document.createElement('div');\r\n portalContainer.setAttribute('data-sigx-portal', '');\r\n\r\n // Use moveBefore when available for state-preserving move\r\n moveNode(targetContainer, portalContainer);\r\n\r\n // Set up reactive effect to render children into portal container\r\n const stopEffect = effect(() => {\r\n const children = slots.default();\r\n \r\n if (!portalContainer) return;\r\n \r\n // Normalize children to a proper VNode using the shared utility\r\n const vnode = normalizeSubTree(children);\r\n\r\n if (mountedVNode) {\r\n // Patch existing content\r\n patch(mountedVNode, vnode, portalContainer);\r\n } else {\r\n // Initial mount\r\n mount(vnode, portalContainer);\r\n }\r\n \r\n mountedVNode = vnode;\r\n });\r\n\r\n cleanupEffect = stopEffect;\r\n });\r\n\r\n onUnmounted(() => {\r\n // Stop the reactive effect\r\n if (cleanupEffect) {\r\n cleanupEffect();\r\n cleanupEffect = null;\r\n }\r\n\r\n // Unmount the portal content\r\n if (mountedVNode && portalContainer) {\r\n unmount(mountedVNode, portalContainer);\r\n mountedVNode = null;\r\n }\r\n\r\n // Remove the portal container from the DOM\r\n if (portalContainer && portalContainer.parentNode) {\r\n portalContainer.parentNode.removeChild(portalContainer);\r\n }\r\n portalContainer = null;\r\n });\r\n\r\n return () => {\r\n // When disabled, render children in place using jsx function\r\n if (props.disabled) {\r\n const children = slots.default();\r\n return jsx(Fragment, { children });\r\n }\r\n\r\n // When portal is active, render nothing in place\r\n // Children are rendered into the portal container via the effect\r\n return null;\r\n };\r\n}, { name: 'Portal' });\r\n","// Import JSX types (global augmentation)\r\nimport './jsx';\r\n// Import type augmentation for @sigx/runtime-core\r\nimport './types.js';\r\nimport { VNode, Fragment, JSXElement, setPlatformModelProcessor, createRenderer, RendererOptions, Text, setDefaultMount } from '@sigx/runtime-core';\r\n\r\n// SVG namespace for createElementNS\r\nconst svgNS = 'http://www.w3.org/2000/svg';\r\n\r\n// SVG elements that should be created with createElementNS\r\n// Based on https://developer.mozilla.org/en-US/docs/Web/SVG/Element\r\nconst svgElements = new Set([\r\n 'svg', 'animate', 'animateMotion', 'animateTransform', 'circle', 'clipPath',\r\n 'defs', 'desc', 'ellipse', 'feBlend', 'feColorMatrix', 'feComponentTransfer',\r\n 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap',\r\n 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG',\r\n 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology',\r\n 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile',\r\n 'feTurbulence', 'filter', 'foreignObject', 'g', 'image', 'line', 'linearGradient',\r\n 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline',\r\n 'radialGradient', 'rect', 'set', 'stop', 'switch', 'symbol', 'text', 'textPath',\r\n 'title', 'tspan', 'use', 'view'\r\n]);\r\n\r\n/**\r\n * Check if a tag is an SVG element\r\n */\r\nfunction isSvgTag(tag: string): boolean {\r\n return svgElements.has(tag);\r\n}\r\n\r\n// Register DOM-specific model processor for intrinsic elements (checkbox, radio, etc.)\r\nsetPlatformModelProcessor((type, props, [stateObj, key], originalProps) => {\r\n // Helper to set value - uses onUpdate handler if available (for props model forwarding)\r\n const setValue = (v: any) => {\r\n const updateHandler = stateObj[`onUpdate:${key}`];\r\n if (typeof updateHandler === 'function') {\r\n updateHandler(v);\r\n } else {\r\n stateObj[key] = v;\r\n }\r\n };\r\n\r\n // Smart mapping for checkbox\r\n if (type === 'input' && originalProps.type === 'checkbox') {\r\n const val = stateObj[key];\r\n\r\n if (Array.isArray(val)) {\r\n // Array Checkbox (Multi-select)\r\n props.checked = val.includes(originalProps.value);\r\n\r\n const existingHandler = props['onUpdate:modelValue'];\r\n props['onUpdate:modelValue'] = (checked: boolean) => {\r\n const currentVal = originalProps.value;\r\n const currentArr = stateObj[key] as any[];\r\n if (checked) {\r\n if (!currentArr.includes(currentVal)) {\r\n setValue([...currentArr, currentVal]);\r\n }\r\n } else {\r\n setValue(currentArr.filter((i: any) => i !== currentVal));\r\n }\r\n if (existingHandler) existingHandler(checked);\r\n };\r\n } else {\r\n // Boolean Checkbox\r\n props.checked = val;\r\n const existingHandler = props['onUpdate:modelValue'];\r\n props['onUpdate:modelValue'] = (v: any) => {\r\n setValue(v);\r\n if (existingHandler) existingHandler(v);\r\n };\r\n }\r\n return true; // Handled\r\n }\r\n\r\n // Radio Button\r\n if (type === 'input' && originalProps.type === 'radio') {\r\n props.checked = stateObj[key] === originalProps.value;\r\n const existingHandler = props['onUpdate:modelValue'];\r\n props['onUpdate:modelValue'] = (checked: boolean) => {\r\n if (checked) setValue(originalProps.value);\r\n if (existingHandler) existingHandler(checked);\r\n };\r\n return true; // Handled\r\n }\r\n\r\n // Text input (default input type)\r\n if (type === 'input') {\r\n props.value = stateObj[key] ?? '';\r\n const existingHandler = props['onUpdate:modelValue'];\r\n props['onUpdate:modelValue'] = (v: any) => {\r\n setValue(v);\r\n if (existingHandler) existingHandler(v);\r\n };\r\n return true; // Handled\r\n }\r\n\r\n // Textarea\r\n if (type === 'textarea') {\r\n props.value = stateObj[key] ?? '';\r\n const existingHandler = props['onUpdate:modelValue'];\r\n props['onUpdate:modelValue'] = (v: any) => {\r\n setValue(v);\r\n if (existingHandler) existingHandler(v);\r\n };\r\n return true; // Handled\r\n }\r\n\r\n // Select\r\n if (type === 'select') {\r\n props.value = stateObj[key] ?? '';\r\n const existingHandler = props['onUpdate:modelValue'];\r\n props['onUpdate:modelValue'] = (v: any) => {\r\n setValue(v);\r\n if (existingHandler) existingHandler(v);\r\n };\r\n return true; // Handled\r\n }\r\n\r\n // Not handled - use generic fallback\r\n return false;\r\n});\r\n\r\nfunction patchProp(dom: Element, key: string, prevValue: any, nextValue: any, isSVG?: boolean) {\r\n // Guard: skip if dom is null (shouldn't happen but protects against edge cases)\r\n if (!dom) return;\r\n const tagName = dom.tagName.toLowerCase();\r\n \r\n // Detect SVG context: either passed explicitly or detect from element type\r\n // This ensures SVG attributes are handled correctly even if renderer doesn't pass isSVG\r\n const isSvgElement = isSVG ?? (dom instanceof SVGElement);\r\n \r\n const oldProps = prevValue ? { [key]: prevValue } : {};\r\n const newProps = nextValue ? { [key]: nextValue } : {};\r\n\r\n // This is a simplified version of updateProps that handles a single prop\r\n // But the original updateProps handled all props at once.\r\n // The renderer calls patchProp for each key.\r\n\r\n // Logic adapted from original updateProps\r\n const oldValue = prevValue;\r\n const newValue = nextValue;\r\n\r\n if (key === 'children' || key === 'key' || key === 'ref') return;\r\n\r\n if (key === 'style') {\r\n const el = dom as HTMLElement;\r\n if (typeof newValue === 'object' && newValue !== null) {\r\n const styleObj = newValue as Record<string, string | number>;\r\n // We might need to unset old styles if they are not in new styles\r\n // But here we only get the new value for the key.\r\n // Ideally patchProp should handle diffing inside style object if it's an object.\r\n // For now, let's assume full replacement or simple update.\r\n for (const styleKey in styleObj) {\r\n if (styleKey.startsWith('--')) {\r\n el.style.setProperty(styleKey, String(styleObj[styleKey]));\r\n } else {\r\n (el.style as any)[styleKey] = styleObj[styleKey];\r\n }\r\n }\r\n } else {\r\n el.style.cssText = String(newValue);\r\n }\r\n } else if (key.startsWith('on')) {\r\n if (key === 'onUpdate:modelValue' && (tagName === 'input' || tagName === 'textarea' || tagName === 'select')) {\r\n const el = dom as HTMLElement;\r\n if (oldValue) {\r\n const wrapper = (oldValue as any).__sigx_model_handler;\r\n if (wrapper) {\r\n el.removeEventListener('input', wrapper);\r\n el.removeEventListener('change', wrapper);\r\n }\r\n }\r\n\r\n if (newValue) {\r\n const handler = (e: Event) => {\r\n const target = e.target as HTMLInputElement;\r\n let val: any;\r\n\r\n if (target.type === 'checkbox' || target.type === 'radio') {\r\n val = target.checked;\r\n } else if (target.type === 'number') {\r\n val = target.valueAsNumber;\r\n } else if (tagName === 'select' && (dom as HTMLSelectElement).multiple) {\r\n val = Array.from((dom as HTMLSelectElement).selectedOptions).map(o => o.value);\r\n } else {\r\n val = target.value;\r\n }\r\n\r\n (newValue as Function)(val);\r\n };\r\n (newValue as any).__sigx_model_handler = handler;\r\n\r\n const inputType = (dom as HTMLInputElement).type;\r\n if (tagName === 'select' || (tagName === 'input' && (inputType === 'checkbox' || inputType === 'radio'))) {\r\n el.addEventListener('change', handler);\r\n } else {\r\n el.addEventListener('input', handler);\r\n }\r\n }\r\n return;\r\n }\r\n\r\n const eventName = key.slice(2).toLowerCase();\r\n // Store handlers on the DOM element to properly track them across re-renders\r\n // Using a Map keyed by event name to ensure we remove the correct wrapper\r\n const handlersKey = '__sigx_event_handlers';\r\n let handlers = (dom as any)[handlersKey] as Map<string, EventListener> | undefined;\r\n if (!handlers) {\r\n handlers = new Map();\r\n (dom as any)[handlersKey] = handlers;\r\n }\r\n\r\n // Remove old handler if exists\r\n const oldHandler = handlers.get(eventName);\r\n if (oldHandler) {\r\n dom.removeEventListener(eventName, oldHandler);\r\n handlers.delete(eventName);\r\n }\r\n\r\n // Add new handler\r\n if (newValue) {\r\n const handler = (e: Event) => {\r\n if (e instanceof CustomEvent) {\r\n (newValue as Function)(e.detail);\r\n } else {\r\n (newValue as Function)(e);\r\n }\r\n };\r\n handlers.set(eventName, handler);\r\n dom.addEventListener(eventName, handler as EventListener);\r\n }\r\n } else if (key === 'className') {\r\n // For SVG, use setAttribute to preserve case (class works on both)\r\n dom.setAttribute('class', String(newValue));\r\n } else if (key.startsWith('.')) {\r\n const propName = key.slice(1);\r\n (dom as any)[propName] = newValue;\r\n } else if (isSvgElement) {\r\n // SVG elements: use setAttribute to preserve case-sensitive attribute names\r\n // SVG attributes like viewBox, preserveAspectRatio, etc. are case-sensitive\r\n if (key === 'innerHTML' || key === 'textContent') {\r\n // These can be set as properties even on SVG\r\n (dom as any)[key] = newValue ?? '';\r\n } else if (key.startsWith('xlink:')) {\r\n // xlink: attributes need special namespace handling\r\n const xlinkNS = 'http://www.w3.org/1999/xlink';\r\n if (newValue == null) {\r\n dom.removeAttributeNS(xlinkNS, key.slice(6));\r\n } else {\r\n dom.setAttributeNS(xlinkNS, key, String(newValue));\r\n }\r\n } else {\r\n // Standard SVG attribute - use setAttribute to preserve case\r\n if (newValue === true) dom.setAttribute(key, '');\r\n else if (newValue === false || newValue == null) dom.removeAttribute(key);\r\n else dom.setAttribute(key, String(newValue));\r\n }\r\n } else {\r\n if ((tagName === 'input' || tagName === 'textarea' || tagName === 'select') &&\r\n (key === 'value' || key === 'checked')) {\r\n if (tagName === 'select' && key === 'value') {\r\n // Defer setting select value until options are mounted\r\n queueMicrotask(() => {\r\n (dom as HTMLSelectElement).value = String(newValue ?? '');\r\n });\r\n return;\r\n }\r\n\r\n if (key === 'checked' && tagName === 'input') {\r\n (dom as HTMLInputElement).checked = Boolean(newValue);\r\n } else if (key === 'value') {\r\n (dom as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement).value = String(newValue ?? '');\r\n }\r\n } else if (key in dom) {\r\n // Skip undefined/null to avoid DOM coercing to 0 for numeric props like maxLength\r\n if (newValue == null) {\r\n // Remove attribute if it exists\r\n if (dom.hasAttribute?.(key)) {\r\n dom.removeAttribute(key);\r\n }\r\n } else {\r\n try {\r\n (dom as Record<string, any>)[key] = newValue;\r\n } catch (e) {\r\n dom.setAttribute(key, String(newValue));\r\n }\r\n }\r\n } else if (tagName.includes('-') && !key.includes('-')) {\r\n (dom as Record<string, any>)[key] = newValue;\r\n } else {\r\n if (newValue === true) dom.setAttribute(key, '');\r\n else if (newValue === false || newValue == null) dom.removeAttribute(key);\r\n else dom.setAttribute(key, String(newValue));\r\n }\r\n }\r\n}\r\n\r\nconst nodeOps: RendererOptions<Node, Element> = {\r\n insert: (child, parent, anchor) => {\r\n parent.insertBefore(child, anchor || null);\r\n },\r\n remove: (child) => {\r\n const parent = child.parentNode;\r\n if (parent) {\r\n parent.removeChild(child);\r\n }\r\n },\r\n createElement: (tag, isSVG, isCustomizedBuiltIn) => {\r\n if (isSVG) {\r\n return document.createElementNS(svgNS, tag);\r\n }\r\n const is = isCustomizedBuiltIn ? { is: isCustomizedBuiltIn } : undefined;\r\n return document.createElement(tag, is);\r\n },\r\n createText: (text) => document.createTextNode(text),\r\n createComment: (text) => document.createComment(text),\r\n setText: (node, text) => {\r\n node.nodeValue = text;\r\n },\r\n setElementText: (el, text) => {\r\n el.textContent = text;\r\n },\r\n parentNode: (node) => node.parentNode as Element,\r\n nextSibling: (node) => node.nextSibling,\r\n querySelector: (selector) => document.querySelector(selector),\r\n setScopeId: (el, id) => el.setAttribute(id, ''),\r\n cloneNode: (node) => node.cloneNode(true),\r\n patchProp\r\n};\r\n\r\nconst renderer = createRenderer(nodeOps);\r\n\r\n/**\r\n * Render a SignalX element to a DOM container.\r\n * Supports both Element references and CSS selectors.\r\n * \r\n * @example\r\n * ```tsx\r\n * import { render } from 'sigx';\r\n * \r\n * // Using CSS selector\r\n * render(<App />, \"#app\");\r\n * \r\n * // Using element reference\r\n * render(<App />, document.getElementById('app')!);\r\n * ```\r\n */\r\nexport const render = (element: any, container: Element | string, appContext?: any): void => {\r\n const target = typeof container === 'string'\r\n ? document.querySelector(container)\r\n : container;\r\n\r\n if (!target) {\r\n throw new Error(`Render target \"${container}\" not found.`);\r\n }\r\n\r\n return renderer.render(element, target as Element, appContext);\r\n};\r\n\r\n// Export primitives for SSR plugins and hydration\r\nexport const { patch, mount, unmount, mountComponent } = renderer;\r\nexport { patchProp, nodeOps };\r\n\r\n/**\r\n * Mount function for DOM environments.\r\n * Use this with defineApp().mount() to render to the DOM.\r\n * \r\n * @example\r\n * ```tsx\r\n * import { defineApp } from '@sigx/runtime-core';\r\n * import { domMount } from '@sigx/runtime-dom';\r\n * \r\n * const app = defineApp(<App />);\r\n * app.use(routerPlugin)\r\n * .mount(document.getElementById('app')!, domMount);\r\n * ```\r\n */\r\nexport const domMount = (component: any, container: HTMLElement | Element | ShadowRoot | string, appContext?: any): (() => void) => {\r\n // Resolve string selector to element\r\n const target = typeof container === 'string'\r\n ? document.querySelector(container)\r\n : container;\r\n\r\n if (!target) {\r\n throw new Error(`Mount target \"${container}\" not found.`);\r\n }\r\n\r\n render(component, target as Element, appContext);\r\n\r\n // Return an unmount function\r\n return () => {\r\n // Render null to unmount\r\n render(null as any, target as Element);\r\n };\r\n};\r\n\r\n// Set domMount as the default mount function for this platform\r\nsetDefaultMount(domMount);\r\n\r\n// Export Portal component and moveBefore utilities\r\nexport { Portal, supportsMoveBefore, moveNode } from './Portal.js';\r\n"],"mappings":";AAmCA,SAAgB,qBAA8B;AAC1C,QAAO,OAAO,OAAS,OAAe,gBAAgB,KAAK;;AAW/D,SAAgB,SACZ,GACA,GACA,IAAsB,MAClB;AACJ,CAAI,oBAAoB,GAEnB,EAAe,WAAW,GAAM,EAAO,GAGxC,EAAO,aAAa,GAAM,EAAO;;AAQzC,SAAS,cAAc,GAA+C;AAclE,QAbI,MAAW,KAAA,IACJ,SAAS,OAGhB,OAAO,KAAW,WACD,SAAS,cAAc,EAAO,KAE3C,QAAQ,KAAK,mBAAmB,EAAO,4CAA4C,EAC5E,SAAS,QAKjB;;AAkBX,MAAa,SAAS,WAAwB,EAAE,UAAO,UAAO,cAAW,qBAAkB;CAEvF,IAAI,IAAyC,MACzC,IAA6B,MAC7B,IAAqC;AA4DzC,QA1DA,QAAgB;AACZ,MAAI,EAAM,SACN;EAIJ,IAAM,IAAkB,cAAc,EAAM,GAAG;AA6B/C,EA1BA,IAAkB,SAAS,cAAc,MAAM,EAC/C,EAAgB,aAAa,oBAAoB,GAAG,EAGpD,SAAS,GAAiB,EAAgB,EAsB1C,IAnBmB,aAAa;GAC5B,IAAM,IAAW,EAAM,SAAS;AAEhC,OAAI,CAAC,EAAiB;GAGtB,IAAM,IAAQ,iBAAiB,EAAS;AAUxC,GARI,IAEA,MAAM,GAAc,GAAO,EAAgB,GAG3C,MAAM,GAAO,EAAgB,EAGjC,IAAe;IACjB;GAGJ,EAEF,QAAkB;AAiBd,EAfA,AAEI,OADA,GAAe,EACC,OAIhB,KAAgB,MAChB,QAAQ,GAAc,EAAgB,EACtC,IAAe,OAIf,KAAmB,EAAgB,cACnC,EAAg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