semajsx 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/{client-CButR91p.mjs → client-BrupjhG0.mjs} +4 -4
  2. package/dist/{client-CButR91p.mjs.map → client-BrupjhG0.mjs.map} +1 -1
  3. package/dist/{computed-BidG06Lt.mjs → computed-BpjqvQu1.mjs} +2 -2
  4. package/dist/{computed-BidG06Lt.mjs.map → computed-BpjqvQu1.mjs.map} +1 -1
  5. package/dist/document-DsiJO2jG.mjs +5 -0
  6. package/dist/{document-BOJDaiBc.mjs → document-XKyAs62C.mjs} +2 -2
  7. package/dist/{document-BOJDaiBc.mjs.map → document-XKyAs62C.mjs.map} +1 -1
  8. package/dist/dom/index.mjs +3 -3
  9. package/dist/dom/jsx-dev-runtime.d.mts +1 -1
  10. package/dist/dom/jsx-dev-runtime.mjs +2 -2
  11. package/dist/dom/jsx-runtime.d.mts +1 -1
  12. package/dist/dom/jsx-runtime.mjs +2 -2
  13. package/dist/{index-D_FIlSk3.d.mts → index-CmxkYOtR.d.mts} +2 -2
  14. package/dist/{index-D_FIlSk3.d.mts.map → index-CmxkYOtR.d.mts.map} +1 -1
  15. package/dist/index.mjs +4 -4
  16. package/dist/{jsx-runtime-D9ZNjMJ2.mjs → jsx-runtime-BFs1c0xz.mjs} +1 -1
  17. package/dist/jsx-runtime-BFs1c0xz.mjs.map +1 -0
  18. package/dist/{jsx-runtime-tIuFmhTh.d.mts → jsx-runtime-C-TtSL51.d.mts} +9 -4
  19. package/dist/jsx-runtime-C-TtSL51.d.mts.map +1 -0
  20. package/dist/{jsx-runtime-BjCGsceN.mjs → jsx-runtime-kv_6vBiR.mjs} +1 -1
  21. package/dist/{jsx-runtime-BjCGsceN.mjs.map → jsx-runtime-kv_6vBiR.mjs.map} +1 -1
  22. package/dist/{lucide-C5BghhSl.mjs → lucide-Ddt_N9dJ.mjs} +3 -3
  23. package/dist/{lucide-C5BghhSl.mjs.map → lucide-Ddt_N9dJ.mjs.map} +1 -1
  24. package/dist/{resource-CNwiNxJX.d.mts → resource-CX-sVeS_.d.mts} +5 -2
  25. package/dist/resource-CX-sVeS_.d.mts.map +1 -0
  26. package/dist/{resource-DSlXDZZi.mjs → resource-pm7qP-jV.mjs} +2 -2
  27. package/dist/{resource-DSlXDZZi.mjs.map → resource-pm7qP-jV.mjs.map} +1 -1
  28. package/dist/signal/index.mjs +3 -3
  29. package/dist/{signal-BN8vHXDb.mjs → signal-4PgGfydw.mjs} +1 -1
  30. package/dist/{signal-BN8vHXDb.mjs.map → signal-4PgGfydw.mjs.map} +1 -1
  31. package/dist/{src-B4VBiHa8.mjs → src-CAyv9Uf9.mjs} +24 -17
  32. package/dist/src-CAyv9Uf9.mjs.map +1 -0
  33. package/dist/{src-DUpFNNM_.mjs → src-CXY-7FC3.mjs} +4 -4
  34. package/dist/{src-DUpFNNM_.mjs.map → src-CXY-7FC3.mjs.map} +1 -1
  35. package/dist/{src-BqX3sryB.mjs → src-C_aFsFJ3.mjs} +4 -4
  36. package/dist/{src-BqX3sryB.mjs.map → src-C_aFsFJ3.mjs.map} +1 -1
  37. package/dist/{src-DW3tIczg.mjs → src-Cv4rRVzv.mjs} +4 -4
  38. package/dist/{src-DW3tIczg.mjs.map → src-Cv4rRVzv.mjs.map} +1 -1
  39. package/dist/{src-Ds9vl42d.mjs → src-DV9uwtE5.mjs} +2 -2
  40. package/dist/{src-Ds9vl42d.mjs.map → src-DV9uwtE5.mjs.map} +1 -1
  41. package/dist/{src-75qcxwT_.mjs → src-SqJ6k7Xv.mjs} +13 -29
  42. package/dist/src-SqJ6k7Xv.mjs.map +1 -0
  43. package/dist/ssg/index.d.mts +1 -1
  44. package/dist/ssg/index.d.mts.map +1 -1
  45. package/dist/ssg/index.mjs +14 -9
  46. package/dist/ssg/index.mjs.map +1 -1
  47. package/dist/ssg/plugins/docs-theme.d.mts +68 -29
  48. package/dist/ssg/plugins/docs-theme.d.mts.map +1 -1
  49. package/dist/ssg/plugins/docs-theme.mjs +2747 -380
  50. package/dist/ssg/plugins/docs-theme.mjs.map +1 -1
  51. package/dist/ssg/plugins/fonts/MAPLE_MONO_LICENSE.txt +93 -0
  52. package/dist/ssg/plugins/fonts/MapleMono-NF-CN-Regular.woff2 +0 -0
  53. package/dist/ssg/plugins/lucide.d.mts +2 -2
  54. package/dist/ssg/plugins/lucide.mjs +5 -5
  55. package/dist/ssr/client.d.mts +1 -1
  56. package/dist/ssr/client.mjs +5 -5
  57. package/dist/ssr/index.d.mts +1 -1
  58. package/dist/ssr/index.d.mts.map +1 -1
  59. package/dist/ssr/index.mjs +8 -8
  60. package/dist/style/index.mjs +1 -1
  61. package/dist/style/react.mjs +2 -2
  62. package/dist/style/vue.mjs +2 -2
  63. package/dist/terminal/index.mjs +3 -3
  64. package/dist/terminal/jsx-dev-runtime.mjs +2 -2
  65. package/dist/terminal/jsx-runtime.mjs +2 -2
  66. package/dist/{types-BmDIxXiP.d.mts → types-BaS-zTDX.d.mts} +3 -1
  67. package/dist/{types-BmDIxXiP.d.mts.map → types-BaS-zTDX.d.mts.map} +1 -1
  68. package/dist/{utils-DbTAs943.mjs → utils-BrGmTgfG.mjs} +1 -1
  69. package/dist/{utils-DbTAs943.mjs.map → utils-BrGmTgfG.mjs.map} +1 -1
  70. package/package.json +2 -2
  71. package/dist/document-CwHVG_PJ.mjs +0 -5
  72. package/dist/jsx-runtime-D9ZNjMJ2.mjs.map +0 -1
  73. package/dist/jsx-runtime-tIuFmhTh.d.mts.map +0 -1
  74. package/dist/resource-CNwiNxJX.d.mts.map +0 -1
  75. package/dist/src-75qcxwT_.mjs.map +0 -1
  76. package/dist/src-B4VBiHa8.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
- import { t as isSignal } from "./utils-DbTAs943.mjs";
2
- import { h, v as Fragment } from "./src-DW3tIczg.mjs";
3
- import { d as setProperty, u as render } from "./src-BqX3sryB.mjs";
1
+ import { t as isSignal } from "./utils-BrGmTgfG.mjs";
2
+ import { h, v as Fragment } from "./src-Cv4rRVzv.mjs";
3
+ import { d as setProperty, u as render } from "./src-C_aFsFJ3.mjs";
4
4
 
5
5
  //#region ../ssr/src/client/hydrate.ts
6
6
  /**
@@ -737,4 +737,4 @@ function clientResource() {
737
737
 
738
738
  //#endregion
739
739
  export { resolveCSS as a, getIslandInfo as c, hydrateAllIslands as d, hydrateIsland as f, markIslandHydrated as h, resolveAsset as i, hasIslands as l, hydrateIslands as m, getManifest as n, setManifest as o, hydrateIslandById as p, loadStylesheet as r, getIslandIds as s, clientResource as t, hydrate as u };
740
- //# sourceMappingURL=client-CButR91p.mjs.map
740
+ //# sourceMappingURL=client-BrupjhG0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-CButR91p.mjs","names":[],"sources":["../../ssr/src/client/hydrate.ts","../../ssr/src/client/client-resource.ts"],"sourcesContent":["/**\n * Client-side hydration for SSR\n * This module runs in the browser and hydrates server-rendered content\n */\n\nimport type { VNode } from \"@semajsx/core\";\nimport { Fragment, h } from \"@semajsx/core\";\nimport { setProperty, render } from \"@semajsx/dom\";\nimport { isSignal } from \"@semajsx/signal\";\n\n/**\n * Island info collected from the DOM\n */\ninterface IslandInfo {\n id: string;\n props: Record<string, any>;\n /** Element with data-island-id (single element islands) */\n element?: HTMLElement;\n /** Start comment node (fragment islands) */\n startComment?: Comment;\n /** End comment node (fragment islands) */\n endComment?: Comment;\n}\n\n/**\n * Type guard for async iterators\n */\nfunction isAsyncIterator(value: unknown): value is AsyncIterableIterator<unknown> {\n if (!value || typeof value !== \"object\") return false;\n const obj = value as Record<string | symbol, unknown>;\n return (\n typeof obj[Symbol.asyncIterator] === \"function\" ||\n (typeof obj.next === \"function\" && typeof obj.return === \"function\")\n );\n}\n\n/**\n * Hydrate a server-rendered DOM tree with client-side interactivity\n * Unlike render(), this preserves existing DOM and only attaches event listeners\n *\n * @param vnode - The VNode to hydrate\n * @param container - The DOM container with server-rendered content\n * @returns The hydrated root node\n *\n * @example\n * ```tsx\n * const vnode = <Counter initial={5} />\n * const container = document.querySelector('[data-island-id=\"island-0\"]')\n * hydrate(vnode, container)\n * ```\n */\nexport function hydrate(vnode: VNode, container: Element): Node | null {\n // Standard hydration: hydrate container's first child\n const nodeToHydrate = container.firstChild;\n\n if (!nodeToHydrate) {\n console.warn(\"[Hydrate] Container is empty, falling back to render\");\n const rendered = renderNode(vnode, container);\n if (rendered) {\n container.appendChild(rendered);\n }\n return rendered;\n }\n\n // Hydrate the VNode tree onto the existing DOM\n try {\n hydrateNode(vnode, nodeToHydrate, container);\n return nodeToHydrate;\n } catch (error) {\n console.error(\"[Hydrate] Error during hydration:\", error);\n // Fall back to client-side rendering if hydration fails\n console.warn(\"[Hydrate] Falling back to client-side rendering\");\n container.innerHTML = \"\";\n return renderNode(vnode, container);\n }\n}\n\n/**\n * Hydrate a VNode onto an existing DOM node\n */\nfunction hydrateNode(vnode: VNode | any, domNode: Node, parentElement: Element): void {\n // Handle null/undefined\n if (vnode == null) {\n return;\n }\n\n // Handle signals - unwrap and subscribe\n if (isSignal(vnode)) {\n // For signal VNodes, we need to hydrate the current value\n // and set up reactivity to update when signal changes\n hydrateSignalNode(vnode, domNode, parentElement);\n return;\n }\n\n // Handle primitives (text nodes)\n if (typeof vnode === \"string\" || typeof vnode === \"number\") {\n if (domNode.nodeType === Node.TEXT_NODE) {\n // Text node already exists, verify content matches\n const expectedText = String(vnode);\n if (domNode.textContent !== expectedText) {\n console.warn(\"[Hydrate] Text mismatch, updating:\", domNode.textContent, \"->\", expectedText);\n domNode.textContent = expectedText;\n }\n }\n return;\n }\n\n // Handle arrays\n if (Array.isArray(vnode)) {\n let currentDomNode: Node | null = domNode;\n for (const child of vnode) {\n if (currentDomNode) {\n hydrateNode(child, currentDomNode, parentElement);\n currentDomNode = currentDomNode.nextSibling;\n }\n }\n return;\n }\n\n // Must be a VNode object\n if (typeof vnode !== \"object\" || !(\"type\" in vnode)) {\n return;\n }\n\n const vnodeTyped = vnode as VNode;\n\n // Handle signal nodes - special reactive nodes\n if (vnodeTyped.type === \"#signal\") {\n const signal = vnodeTyped.props?.signal;\n if (signal && isSignal(signal)) {\n hydrateSignalNode(signal, domNode, parentElement);\n }\n return;\n }\n\n // Handle fragments\n if (vnodeTyped.type === Fragment) {\n let currentDomNode: Node | null = domNode;\n for (const child of vnodeTyped.children) {\n if (currentDomNode) {\n hydrateNode(child, currentDomNode, parentElement);\n currentDomNode = currentDomNode.nextSibling;\n }\n }\n return;\n }\n\n // Handle function components - render and hydrate result\n if (typeof vnodeTyped.type === \"function\") {\n // Merge vnode.children into props.children (mirrors renderVNodeToHTML)\n const props =\n vnodeTyped.children && vnodeTyped.children.length > 0\n ? { ...vnodeTyped.props, children: vnodeTyped.children }\n : vnodeTyped.props || {};\n let result = vnodeTyped.type(props);\n\n // Handle async component\n if (result instanceof Promise) {\n result.then((resolved) => hydrateNode(resolved, domNode, parentElement));\n return;\n }\n\n // Handle async iterator (streaming component)\n if (isAsyncIterator(result)) {\n result.next().then(({ value }) => {\n hydrateNode(value, domNode, parentElement);\n });\n return;\n }\n\n hydrateNode(result, domNode, parentElement);\n return;\n }\n\n // Handle DOM elements\n if (typeof vnodeTyped.type === \"string\") {\n // Skip validation for text nodes - they can legitimately be text in the DOM\n // This happens when signal values or other dynamic content renders as text\n if (domNode.nodeType === Node.TEXT_NODE) {\n // Text node in place of element - possible mismatch, but might be intentional\n // Skip hydration for this node\n return;\n }\n\n if (domNode.nodeType !== Node.ELEMENT_NODE) {\n console.warn(\"[Hydrate] Expected element, got:\", domNode.nodeType);\n return;\n }\n\n const element = domNode as Element;\n\n // Verify tag matches\n if (element.tagName.toLowerCase() !== vnodeTyped.type.toLowerCase()) {\n console.warn(\"[Hydrate] Tag mismatch:\", element.tagName, \"vs\", vnodeTyped.type);\n return;\n }\n\n // Hydrate properties (especially event listeners and reactive props)\n hydrateProperties(element, vnodeTyped.props || {});\n\n // Hydrate children\n hydrateChildren(element, vnodeTyped.children);\n return;\n }\n}\n\n/**\n * Hydrate properties onto an element\n * This is where we attach event listeners and set up reactive properties\n */\nfunction hydrateProperties(element: Element, props: Record<string, any>): void {\n for (const [key, value] of Object.entries(props)) {\n // Skip special props\n if (key === \"children\" || key === \"key\" || key === \"ref\") {\n continue;\n }\n\n // Handle event listeners - these need to be attached\n if (key.startsWith(\"on\")) {\n const eventName = key.slice(2).toLowerCase();\n if (typeof value === \"function\") {\n element.addEventListener(eventName, value as EventListener);\n }\n continue;\n }\n\n // Handle reactive properties (signals)\n if (isSignal(value)) {\n // Set initial value\n setProperty(element, key, value.value);\n\n // Set up reactivity using subscribe\n value.subscribe((newValue: any) => {\n setProperty(element, key, newValue);\n });\n continue;\n }\n\n // For static properties, they should already be set by SSR\n // We can optionally verify them, but usually we trust SSR output\n // to avoid unnecessary DOM operations\n }\n\n // Handle refs\n if (props.ref) {\n if (typeof props.ref === \"function\") {\n props.ref(element);\n } else if (typeof props.ref === \"object\" && props.ref !== null) {\n props.ref.current = element;\n }\n }\n}\n\n/**\n * Hydrate children elements\n */\nfunction hydrateChildren(element: Element, children: any[]): void {\n let currentDomNode = element.firstChild;\n\n for (const child of children) {\n if (!currentDomNode) {\n // Mismatch: VNode has more children than DOM\n // Fall back to appending new nodes\n console.warn(\"[Hydrate] Missing DOM node for child, appending\");\n const newNode = renderNode(child, element);\n if (newNode) {\n element.appendChild(newNode);\n }\n continue;\n }\n\n hydrateNode(child, currentDomNode, element);\n currentDomNode = currentDomNode.nextSibling;\n }\n\n // If DOM has extra nodes, we could warn or remove them\n // For now, we leave them (progressive enhancement)\n}\n\n/**\n * Hydrate a signal VNode\n * Set up reactivity to replace content when signal changes\n */\nfunction hydrateSignalNode(signal: any, domNode: Node, parentElement: Element): void {\n // Get current signal value\n const currentValue = signal.value;\n\n // Handle empty/null signal values - server renders as <!--signal-empty--> comment\n if (\n currentValue == null ||\n currentValue === false ||\n (Array.isArray(currentValue) && currentValue.length === 0)\n ) {\n // Expect a comment node marker\n if (domNode.nodeType === Node.COMMENT_NODE) {\n // Comment marker is correct, nothing to validate\n } else {\n console.warn(\"[Hydrate] Expected comment marker for empty signal, got:\", domNode.nodeType);\n }\n } // For simple values (string, number), the server renders them as text nodes\n else if (typeof currentValue === \"string\" || typeof currentValue === \"number\") {\n if (domNode.nodeType === Node.TEXT_NODE) {\n const expectedText = String(currentValue);\n if (domNode.textContent !== expectedText) {\n console.warn(\"[Hydrate] Signal text mismatch:\", domNode.textContent, \"->\", expectedText);\n domNode.textContent = expectedText;\n }\n }\n } else {\n // For complex values (VNodes, etc.), do full hydration\n hydrateNode(currentValue, domNode, parentElement);\n }\n\n // Set up reactivity to handle signal changes\n // Use an anchor comment node to track position in DOM\n // This is necessary because arrays render as DocumentFragments which can't be tracked\n let anchor: Comment;\n let currentNodes: Node[] = [];\n\n if (domNode.nodeType === Node.COMMENT_NODE) {\n // Already a comment (empty signal), use as anchor\n anchor = domNode as Comment;\n } else {\n // Create anchor and insert it before current node\n anchor = document.createComment(\"signal-anchor\");\n if (domNode.parentNode) {\n domNode.parentNode.insertBefore(anchor, domNode);\n }\n currentNodes = [domNode];\n }\n\n signal.subscribe((newValue: any) => {\n const parent = anchor.parentNode;\n if (!parent) {\n return;\n }\n\n // Remove old nodes\n for (const node of currentNodes) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n currentNodes = [];\n\n // Render and insert new content after anchor\n const newNode = renderNode(newValue, parentElement);\n if (newNode) {\n if (newNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n // Fragment: insert all children after anchor in correct order\n const fragment = newNode as DocumentFragment;\n const children = Array.from(fragment.childNodes);\n\n // Insert in order by tracking the last inserted node\n let insertAfter: Node | null = anchor;\n for (const child of children) {\n parent.insertBefore(child, insertAfter.nextSibling);\n insertAfter = child;\n currentNodes.push(child);\n }\n } else {\n // Single node: insert after anchor\n parent.insertBefore(newNode, anchor.nextSibling);\n currentNodes = [newNode];\n }\n }\n });\n}\n\n/**\n * Render a VNode to a DOM node (fallback when hydration fails)\n * This is a simplified version of render() just for hydration fallback\n */\n// oxlint-disable-next-line only-used-in-recursion\nfunction renderNode(vnode: any, parentElement: Element): Node | null {\n if (vnode == null || vnode === false || vnode === true) {\n return document.createComment(\"empty\");\n }\n\n if (isSignal(vnode)) {\n return renderNode(vnode.value, parentElement);\n }\n\n if (typeof vnode === \"string\" || typeof vnode === \"number\") {\n return document.createTextNode(String(vnode));\n }\n\n if (Array.isArray(vnode)) {\n // Empty array should render as a comment marker\n if (vnode.length === 0) {\n return document.createComment(\"empty\");\n }\n\n const fragment = document.createDocumentFragment();\n for (const child of vnode) {\n const node = renderNode(child, parentElement);\n if (node) {\n fragment.appendChild(node);\n }\n }\n return fragment;\n }\n\n if (typeof vnode === \"object\" && \"type\" in vnode) {\n const vnodeTyped = vnode as VNode;\n\n // Handle special VNode types\n if (vnodeTyped.type === \"#text\") {\n return document.createTextNode(String(vnodeTyped.props?.nodeValue || \"\"));\n }\n\n if (vnodeTyped.type === \"#signal\") {\n const signal = vnodeTyped.props?.signal;\n if (signal && isSignal(signal)) {\n return renderNode(signal.value, parentElement);\n }\n return document.createTextNode(\"\");\n }\n\n if (vnodeTyped.type === Fragment) {\n const fragment = document.createDocumentFragment();\n for (const child of vnodeTyped.children) {\n const node = renderNode(child, parentElement);\n if (node) {\n fragment.appendChild(node);\n }\n }\n return fragment;\n }\n\n if (typeof vnodeTyped.type === \"function\") {\n const result = vnodeTyped.type(vnodeTyped.props || {});\n return renderNode(result, parentElement);\n }\n\n if (typeof vnodeTyped.type === \"string\") {\n const element = document.createElement(vnodeTyped.type);\n\n // Set properties\n const props = vnodeTyped.props || {};\n for (const [key, value] of Object.entries(props)) {\n if (key === \"children\" || key === \"key\") continue;\n setProperty(element, key, value);\n }\n\n // Render children\n for (const child of vnodeTyped.children) {\n const childNode = renderNode(child, element);\n if (childNode) {\n element.appendChild(childNode);\n }\n }\n\n return element;\n }\n }\n\n return null;\n}\n\n/**\n * Hydrate an island by ID\n * Handles both single-element islands (with data-island-id) and fragment islands (with comment markers)\n *\n * @param islandId - The island ID to hydrate\n * @param Component - The component function to render\n * @param markHydrated - Callback to mark the island as hydrated\n *\n * @example\n * ```tsx\n * import { hydrateIsland, markIslandHydrated } from '@semajsx/ssr/client';\n * import Counter from './Counter';\n *\n * hydrateIsland('counter-0', Counter, markIslandHydrated);\n * ```\n */\nexport function hydrateIsland(\n islandId: string,\n Component: Function,\n markHydrated: (id: string) => void,\n): void {\n // Try single-element island first (has data-island-id on root element)\n const element = document.querySelector(`[data-island-id=\"${islandId}\"]`);\n\n if (element) {\n // Single-element island: replace the element with rendered content\n const props = JSON.parse(element.getAttribute(\"data-island-props\") || \"{}\");\n const parent = element.parentNode;\n if (!parent) return;\n\n // Create VNode for the component\n const vnode: VNode = {\n type: Component as VNode[\"type\"],\n props,\n children: [],\n };\n\n // Render into temp container\n const temp = document.createElement(\"div\");\n render(vnode, temp);\n\n // Replace original element with rendered content\n const children = Array.from(temp.childNodes);\n for (const child of children) {\n parent.insertBefore(child, element);\n }\n parent.removeChild(element);\n\n markHydrated(islandId);\n return;\n }\n\n // Fragment island: find by comment marker\n const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_COMMENT);\n let startComment: Comment | null = null;\n let comment: Comment | null;\n while ((comment = walker.nextNode() as Comment | null)) {\n if (comment.textContent === `island:${islandId}`) {\n startComment = comment;\n break;\n }\n }\n\n if (startComment) {\n // Get props from script tag\n const script = document.querySelector(`script[data-island=\"${islandId}\"]`);\n const props = script ? JSON.parse(script.textContent || \"{}\") : {};\n\n // Find end comment and collect nodes between markers\n const nodesToRemove: Node[] = [];\n let sibling = startComment.nextSibling;\n let endComment: Comment | null = null;\n while (sibling) {\n if (sibling.nodeType === Node.COMMENT_NODE && sibling.textContent === `/island:${islandId}`) {\n endComment = sibling as Comment;\n break;\n }\n nodesToRemove.push(sibling);\n sibling = sibling.nextSibling;\n }\n\n // Remove old nodes\n for (const node of nodesToRemove) {\n node.parentNode?.removeChild(node);\n }\n\n // Render new content with full reactivity\n const vnode: VNode = {\n type: Component as VNode[\"type\"],\n props,\n children: [],\n };\n const parent = startComment.parentNode;\n if (parent) {\n // Create temp container and use full render for reactivity\n const temp = document.createElement(\"div\");\n render(vnode, temp);\n\n // Move rendered nodes after start comment\n const children = Array.from(temp.childNodes);\n for (const child of children) {\n parent.insertBefore(child, endComment);\n }\n }\n\n // Remove markers and script\n startComment.parentNode?.removeChild(startComment);\n if (endComment) endComment.parentNode?.removeChild(endComment);\n if (script) script.parentNode?.removeChild(script);\n\n markHydrated(islandId);\n }\n}\n\n/**\n * Find all islands on the page (both element and fragment types)\n */\nfunction findAllIslands(): IslandInfo[] {\n const islands: IslandInfo[] = [];\n\n // Find element-based islands (single root element)\n const elements = document.querySelectorAll(\"[data-island-id]\");\n for (const el of elements) {\n const id = el.getAttribute(\"data-island-id\");\n const propsStr = el.getAttribute(\"data-island-props\");\n if (id) {\n islands.push({\n id,\n props: propsStr ? JSON.parse(propsStr) : {},\n element: el as HTMLElement,\n });\n }\n }\n\n // Find fragment-based islands (comment markers + script)\n const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_COMMENT);\n\n let comment: Comment | null;\n while ((comment = walker.nextNode() as Comment | null)) {\n const match = comment.textContent?.match(/^island:(.+)$/);\n if (match && match[1]) {\n const id = match[1];\n // Find end comment (matches /island:${id})\n let endComment: Comment | null = null;\n let sibling = comment.nextSibling;\n while (sibling) {\n if (sibling.nodeType === Node.COMMENT_NODE && sibling.textContent === `/island:${id}`) {\n endComment = sibling as Comment;\n break;\n }\n sibling = sibling.nextSibling;\n }\n\n // Find props from script tag\n const script = document.querySelector(`script[type=\"application/json\"][data-island=\"${id}\"]`);\n const props = script ? JSON.parse(script.textContent || \"{}\") : {};\n\n islands.push({\n id,\n props,\n startComment: comment,\n endComment: endComment || undefined,\n });\n }\n }\n\n return islands;\n}\n\n/**\n * Hydrate all islands on the page\n * This function is typically called once after the page loads\n *\n * @example\n * ```tsx\n * // In your client entry point\n * import { hydrateIslands } from '@semajsx/ssr/client'\n *\n * // Wait for DOM to be ready\n * if (document.readyState === 'loading') {\n * document.addEventListener('DOMContentLoaded', hydrateIslands)\n * } else {\n * hydrateIslands()\n * }\n * ```\n */\nexport async function hydrateIslands(): Promise<void> {\n const islands = findAllIslands();\n\n if (islands.length === 0) {\n return;\n }\n\n console.log(`[SemaJSX] Found ${islands.length} islands to hydrate`);\n\n // Hydrate islands in parallel for better performance\n const hydrations = islands.map((island) => waitForIslandScript(island));\n\n await Promise.all(hydrations);\n\n console.log(`[SemaJSX] All islands hydrated`);\n}\n\n/**\n * Wait for an island's script to load and hydrate it\n * The actual hydration is performed by the island's entry point script\n * This function just waits for it to complete\n */\nasync function waitForIslandScript(island: IslandInfo): Promise<void> {\n const { id: islandId, element, startComment } = island;\n\n // Check if island is already hydrated\n if (element?.hasAttribute(\"data-hydrated\")) {\n return;\n }\n if (startComment?.parentElement?.querySelector(`[data-island-hydrated=\"${islandId}\"]`)) {\n return;\n }\n\n // Wait for hydration to complete (set by island entry point)\n return new Promise((resolve) => {\n // Check every 50ms for up to 10 seconds\n const maxAttempts = 200;\n let attempts = 0;\n\n const checkInterval = setInterval(() => {\n const isHydrated = element\n ? element.hasAttribute(\"data-hydrated\")\n : document.querySelector(`[data-island-hydrated=\"${islandId}\"]`) !== null;\n\n if (isHydrated) {\n clearInterval(checkInterval);\n resolve();\n } else if (++attempts >= maxAttempts) {\n clearInterval(checkInterval);\n console.warn(`[SemaJSX] Island ${islandId} hydration timeout`);\n resolve();\n }\n }, 50);\n });\n}\n\n/**\n * Get island info by ID\n */\nexport function getIslandInfo(islandId: string): IslandInfo | null {\n // Try element-based first\n const element = document.querySelector(`[data-island-id=\"${islandId}\"]`) as HTMLElement | null;\n\n if (element) {\n const propsStr = element.getAttribute(\"data-island-props\");\n return {\n id: islandId,\n props: propsStr ? JSON.parse(propsStr) : {},\n element,\n };\n }\n\n // Try fragment-based\n const script = document.querySelector(\n `script[type=\"application/json\"][data-island=\"${islandId}\"]`,\n );\n\n if (script) {\n const props = JSON.parse(script.textContent || \"{}\");\n // Find start comment\n const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_COMMENT);\n let comment: Comment | null;\n while ((comment = walker.nextNode() as Comment | null)) {\n if (comment.textContent === `island:${islandId}`) {\n return {\n id: islandId,\n props,\n startComment: comment,\n };\n }\n }\n }\n\n return null;\n}\n\n/**\n * Manual hydration for a specific island\n * Useful for lazy-loading islands on interaction\n *\n * @param islandId - The island ID to hydrate\n *\n * @example\n * ```tsx\n * // Lazy load an island on click\n * button.addEventListener('click', () => {\n * hydrateIslandById('island-0')\n * })\n * ```\n */\nexport async function hydrateIslandById(islandId: string): Promise<void> {\n const island = getIslandInfo(islandId);\n\n if (!island) {\n console.error(`[SemaJSX] Island not found: ${islandId}`);\n return;\n }\n\n await waitForIslandScript(island);\n}\n\n/**\n * Check if islands are present on the page\n */\nexport function hasIslands(): boolean {\n // Check for element-based islands\n if (document.querySelectorAll(\"[data-island-id]\").length > 0) {\n return true;\n }\n // Check for fragment-based islands\n return document.querySelectorAll('script[type=\"application/json\"][data-island]').length > 0;\n}\n\n/**\n * Get all island IDs on the page\n */\nexport function getIslandIds(): string[] {\n const ids: string[] = [];\n\n // Element-based islands\n const elements = document.querySelectorAll(\"[data-island-id]\");\n for (const el of elements) {\n const id = el.getAttribute(\"data-island-id\");\n if (id) ids.push(id);\n }\n\n // Fragment-based islands\n const scripts = document.querySelectorAll('script[type=\"application/json\"][data-island]');\n for (const script of scripts) {\n const id = script.getAttribute(\"data-island\");\n if (id) ids.push(id);\n }\n\n return ids;\n}\n\n/**\n * Mark an island as hydrated\n * This should be called by the island entry point after hydration completes\n */\nexport function markIslandHydrated(islandId: string): void {\n // Try element-based first\n const element = document.querySelector(`[data-island-id=\"${islandId}\"]`);\n if (element) {\n element.setAttribute(\"data-hydrated\", \"true\");\n return;\n }\n\n // For fragment-based, remove the script tag (no longer needed)\n const script = document.querySelector(\n `script[type=\"application/json\"][data-island=\"${islandId}\"]`,\n );\n if (script) {\n // Mark as hydrated before removal (for any watchers)\n script.setAttribute(\"data-island-hydrated\", islandId);\n // Remove script - props already parsed, no longer needed\n script.remove();\n }\n}\n\n/**\n * Reconstruct VNode children from serialized JSON data.\n *\n * Uses the island module's exports as a registry to resolve component names\n * (prefixed with \"$\") back to their actual functions.\n *\n * @param serialized - Serialized children array from SSR\n * @param registry - Module exports mapping component names to functions\n */\nfunction reconstructChildren(serialized: any[], registry: Record<string, any>): any[] {\n const result: any[] = [];\n for (const node of serialized) {\n if (node === null) continue;\n if (typeof node === \"string\") {\n result.push(node);\n continue;\n }\n if (Array.isArray(node) && node.length === 3 && typeof node[0] === \"string\") {\n const [type, props, children] = node;\n\n // Nested island placeholder — these hydrate independently,\n // push null to preserve children index positions.\n if (type === \"$island\") {\n result.push(null);\n continue;\n }\n\n const resolvedChildren = children ? reconstructChildren(children, registry) : [];\n\n if (type.startsWith(\"$\")) {\n // Component reference — look up in registry\n const name = type.slice(1);\n const component = registry[name];\n if (!component || typeof component !== \"function\") {\n console.warn(`[Hydrate] Unknown component \"${name}\" in island children`);\n continue;\n }\n result.push(h(component, props || {}, ...resolvedChildren));\n } else {\n // HTML element\n result.push(h(type, props || {}, ...resolvedChildren));\n }\n }\n }\n return result;\n}\n\n/**\n * Hydrate all islands with a given component source\n * Finds all elements with data-island-src and hydrates them\n *\n * @param componentSrc - The component source key (e.g., \"components/Counter\")\n * @param Component - The component function to render\n * @param registry - Optional module exports for reconstructing island children\n *\n * @example\n * ```tsx\n * import { hydrateAllIslands } from '@semajsx/ssr/client';\n * import * as CounterModule from './Counter';\n *\n * hydrateAllIslands('components/Counter', CounterModule.Counter, CounterModule);\n * ```\n */\nexport function hydrateAllIslands(\n componentSrc: string,\n Component: Function,\n registry?: Record<string, any>,\n): void {\n // Find all elements with this component source\n const elements = document.querySelectorAll(`[data-island-src=\"${componentSrc}\"]`);\n\n // Also find fragment-based islands (script tags with data-island-src)\n const scripts = document.querySelectorAll(\n `script[type=\"application/json\"][data-island-src=\"${componentSrc}\"]`,\n );\n\n // Hydrate each element-based island\n elements.forEach((element) => {\n const islandId = element.getAttribute(\"data-island-id\");\n if (!islandId) return;\n\n // Skip if already hydrated\n if (element.hasAttribute(\"data-hydrated\")) return;\n\n try {\n const props = JSON.parse(element.getAttribute(\"data-island-props\") || \"{}\");\n\n // Reconstruct children from serialized VNode data if available\n if (registry) {\n const childrenScript = document.querySelector(\n `script[type=\"application/json\"][data-island-children=\"${islandId}\"]`,\n );\n if (childrenScript) {\n try {\n const serialized = JSON.parse(childrenScript.textContent || \"[]\");\n props.children = reconstructChildren(serialized, registry);\n } catch (e) {\n console.warn(\"[Hydrate] Failed to reconstruct island children:\", e);\n }\n childrenScript.remove();\n }\n }\n\n // Create VNode for the component\n const vnode: VNode = {\n type: Component as VNode[\"type\"],\n props,\n children: [],\n };\n\n // Hydrate in-place: attach event listeners, signal subscriptions,\n // and refs while preserving existing DOM and SSR-rendered children.\n hydrateNode(vnode, element, element.parentNode as Element);\n element.setAttribute(\"data-hydrated\", \"true\");\n } catch (error) {\n // SSR content is preserved — the island stays as static HTML\n console.error(`[Hydrate] Island \"${islandId}\" hydration failed:`, error);\n element.setAttribute(\"data-hydration-error\", \"true\");\n }\n });\n\n // Hydrate each fragment-based island\n scripts.forEach((script) => {\n const islandId = script.getAttribute(\"data-island\");\n if (!islandId) return;\n\n // Skip if already hydrated\n if (script.hasAttribute(\"data-island-hydrated\")) return;\n\n try {\n const props = JSON.parse(script.textContent || \"{}\");\n\n // Reconstruct children from serialized VNode data if available\n if (registry) {\n const childrenScript = document.querySelector(\n `script[type=\"application/json\"][data-island-children=\"${islandId}\"]`,\n );\n if (childrenScript) {\n try {\n const serialized = JSON.parse(childrenScript.textContent || \"[]\");\n props.children = reconstructChildren(serialized, registry);\n } catch (e) {\n console.warn(\"[Hydrate] Failed to reconstruct island children:\", e);\n }\n childrenScript.remove();\n }\n }\n\n // Find the comment markers\n const startMarker = `island:${islandId}`;\n const endMarker = `/island:${islandId}`;\n\n // Find and process the fragment\n const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_COMMENT, null);\n\n let startNode: Comment | null = null;\n let endNode: Comment | null = null;\n let node: Node | null;\n\n while ((node = walker.nextNode())) {\n if (node.nodeValue === startMarker) {\n startNode = node as Comment;\n } else if (node.nodeValue === endMarker) {\n endNode = node as Comment;\n break;\n }\n }\n\n if (startNode && endNode && startNode.parentNode) {\n const parent = startNode.parentNode;\n\n // Non-destructive hydration: move existing nodes into a temp\n // container, hydrate against the existing DOM, then move back.\n // This preserves SSR content and only attaches event listeners\n // and signal subscriptions — matching element-based island behavior.\n const container = document.createElement(\"div\");\n let current: Node | null = startNode.nextSibling;\n while (current && current !== endNode) {\n const next = current.nextSibling;\n container.appendChild(current); // moves node, doesn't clone\n current = next;\n }\n\n // Create VNode and hydrate against existing DOM\n const vnode: VNode = {\n type: Component as VNode[\"type\"],\n props,\n children: [],\n };\n hydrateNode(vnode, container, container);\n\n // Move hydrated nodes back between markers\n while (container.firstChild) {\n parent.insertBefore(container.firstChild, endNode);\n }\n\n // Mark as hydrated\n script.setAttribute(\"data-island-hydrated\", islandId);\n script.remove();\n }\n } catch (error) {\n // SSR content is preserved — the fragment stays as static HTML\n console.error(`[Hydrate] Fragment island \"${islandId}\" hydration failed:`, error);\n }\n });\n}\n\n// Export types\nexport type { IslandInfo };\n","/**\n * Client-side resource utilities for dynamic CSS and asset loading\n */\n\n/**\n * Client manifest structure\n */\nexport interface ClientManifest {\n css: Record<string, string>;\n assets: Record<string, string>;\n}\n\n// Global manifest storage\nlet _manifest: ClientManifest | null = null;\n\n// Track loaded stylesheets to avoid duplicates\nconst loadedStyles = new Set<string>();\n\n/**\n * Set the client manifest (called during initialization)\n */\nexport function setManifest(manifest: ClientManifest): void {\n _manifest = manifest;\n}\n\n/**\n * Get the current manifest\n */\nexport function getManifest(): ClientManifest | null {\n return _manifest;\n}\n\n/**\n * Resolve a CSS path using the manifest\n */\nexport function resolveCSS(href: string): string {\n if (!_manifest) {\n return href;\n }\n\n // Try to find in manifest (remove leading slash for lookup)\n const lookupPath = href.startsWith(\"/\") ? href.slice(1) : href;\n return _manifest.css[lookupPath] || href;\n}\n\n/**\n * Resolve an asset path using the manifest\n */\nexport function resolveAsset(src: string): string {\n if (!_manifest) {\n return src;\n }\n\n // Try to find in manifest (remove leading slash for lookup)\n const lookupPath = src.startsWith(\"/\") ? src.slice(1) : src;\n return _manifest.assets[lookupPath] || src;\n}\n\n/**\n * Dynamically load a stylesheet\n */\nexport function loadStylesheet(href: string): Promise<void> {\n const resolvedHref = resolveCSS(href);\n\n // Skip if already loaded\n if (loadedStyles.has(resolvedHref)) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n // Check if already in document\n const existing = document.querySelector(`link[href=\"${resolvedHref}\"]`);\n if (existing) {\n loadedStyles.add(resolvedHref);\n resolve();\n return;\n }\n\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = resolvedHref;\n\n link.onload = () => {\n loadedStyles.add(resolvedHref);\n resolve();\n };\n\n link.onerror = () => {\n reject(new Error(`Failed to load stylesheet: ${resolvedHref}`));\n };\n\n document.head.appendChild(link);\n });\n}\n\n/**\n * Style component props\n */\nexport interface StyleProps {\n href: string;\n}\n\n/**\n * Asset component props\n */\nexport interface AssetProps {\n src: string;\n}\n\n/**\n * Client-side resource tools\n */\nexport interface ClientResourceTools {\n /** Load and inject a CSS stylesheet */\n Style: (props: StyleProps) => null;\n /** Resolve asset URL from manifest */\n url: (path: string) => string;\n}\n\n/**\n * Create client-side resource tools\n *\n * @example\n * ```tsx\n * import { clientResource } from '@semajsx/ssr/client';\n *\n * const { Style, url } = clientResource();\n *\n * export default function Counter() {\n * return (\n * <>\n * <Style href=\"./counter.css\" />\n * <img src={url('./icon.png')} />\n * </>\n * );\n * }\n * ```\n */\nexport function clientResource(): ClientResourceTools {\n return {\n Style({ href }: StyleProps): null {\n // Load stylesheet on mount\n if (typeof document !== \"undefined\") {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cAAqC;AACnD,QAAO;;;;;AAMT,SAAgB,WAAW,MAAsB;AAC/C,KAAI,CAAC,UACH,QAAO;CAIT,MAAM,aAAa,KAAK,WAAW,IAAI,GAAG,KAAK,MAAM,EAAE,GAAG;AAC1D,QAAO,UAAU,IAAI,eAAe;;;;;AAMtC,SAAgB,aAAa,KAAqB;AAChD,KAAI,CAAC,UACH,QAAO;CAIT,MAAM,aAAa,IAAI,WAAW,IAAI,GAAG,IAAI,MAAM,EAAE,GAAG;AACxD,QAAO,UAAU,OAAO,eAAe;;;;;AAMzC,SAAgB,eAAe,MAA6B;CAC1D,MAAM,eAAe,WAAW,KAAK;AAGrC,KAAI,aAAa,IAAI,aAAa,CAChC,QAAO,QAAQ,SAAS;AAG1B,QAAO,IAAI,SAAS,SAAS,WAAW;AAGtC,MADiB,SAAS,cAAc,cAAc,aAAa,IAAI,EACzD;AACZ,gBAAa,IAAI,aAAa;AAC9B,YAAS;AACT;;EAGF,MAAM,OAAO,SAAS,cAAc,OAAO;AAC3C,OAAK,MAAM;AACX,OAAK,OAAO;AAEZ,OAAK,eAAe;AAClB,gBAAa,IAAI,aAAa;AAC9B,YAAS;;AAGX,OAAK,gBAAgB;AACnB,0BAAO,IAAI,MAAM,8BAA8B,eAAe,CAAC;;AAGjE,WAAS,KAAK,YAAY,KAAK;GAC/B;;;;;;;;;;;;;;;;;;;;;AA8CJ,SAAgB,iBAAsC;AACpD,QAAO;EACL,MAAM,EAAE,QAA0B;AAEhC,OAAI,OAAO,aAAa,YACtB,gBAAe,KAAK;AAEtB,UAAO;;EAGT,IAAI,MAAsB;AACxB,UAAO,aAAa,KAAK;;EAE5B"}
1
+ {"version":3,"file":"client-BrupjhG0.mjs","names":[],"sources":["../../ssr/src/client/hydrate.ts","../../ssr/src/client/client-resource.ts"],"sourcesContent":["/**\n * Client-side hydration for SSR\n * This module runs in the browser and hydrates server-rendered content\n */\n\nimport type { VNode } from \"@semajsx/core\";\nimport { Fragment, h } from \"@semajsx/core\";\nimport { setProperty, render } from \"@semajsx/dom\";\nimport { isSignal } from \"@semajsx/signal\";\n\n/**\n * Island info collected from the DOM\n */\ninterface IslandInfo {\n id: string;\n props: Record<string, any>;\n /** Element with data-island-id (single element islands) */\n element?: HTMLElement;\n /** Start comment node (fragment islands) */\n startComment?: Comment;\n /** End comment node (fragment islands) */\n endComment?: Comment;\n}\n\n/**\n * Type guard for async iterators\n */\nfunction isAsyncIterator(value: unknown): value is AsyncIterableIterator<unknown> {\n if (!value || typeof value !== \"object\") return false;\n const obj = value as Record<string | symbol, unknown>;\n return (\n typeof obj[Symbol.asyncIterator] === \"function\" ||\n (typeof obj.next === \"function\" && typeof obj.return === \"function\")\n );\n}\n\n/**\n * Hydrate a server-rendered DOM tree with client-side interactivity\n * Unlike render(), this preserves existing DOM and only attaches event listeners\n *\n * @param vnode - The VNode to hydrate\n * @param container - The DOM container with server-rendered content\n * @returns The hydrated root node\n *\n * @example\n * ```tsx\n * const vnode = <Counter initial={5} />\n * const container = document.querySelector('[data-island-id=\"island-0\"]')\n * hydrate(vnode, container)\n * ```\n */\nexport function hydrate(vnode: VNode, container: Element): Node | null {\n // Standard hydration: hydrate container's first child\n const nodeToHydrate = container.firstChild;\n\n if (!nodeToHydrate) {\n console.warn(\"[Hydrate] Container is empty, falling back to render\");\n const rendered = renderNode(vnode, container);\n if (rendered) {\n container.appendChild(rendered);\n }\n return rendered;\n }\n\n // Hydrate the VNode tree onto the existing DOM\n try {\n hydrateNode(vnode, nodeToHydrate, container);\n return nodeToHydrate;\n } catch (error) {\n console.error(\"[Hydrate] Error during hydration:\", error);\n // Fall back to client-side rendering if hydration fails\n console.warn(\"[Hydrate] Falling back to client-side rendering\");\n container.innerHTML = \"\";\n return renderNode(vnode, container);\n }\n}\n\n/**\n * Hydrate a VNode onto an existing DOM node\n */\nfunction hydrateNode(vnode: VNode | any, domNode: Node, parentElement: Element): void {\n // Handle null/undefined\n if (vnode == null) {\n return;\n }\n\n // Handle signals - unwrap and subscribe\n if (isSignal(vnode)) {\n // For signal VNodes, we need to hydrate the current value\n // and set up reactivity to update when signal changes\n hydrateSignalNode(vnode, domNode, parentElement);\n return;\n }\n\n // Handle primitives (text nodes)\n if (typeof vnode === \"string\" || typeof vnode === \"number\") {\n if (domNode.nodeType === Node.TEXT_NODE) {\n // Text node already exists, verify content matches\n const expectedText = String(vnode);\n if (domNode.textContent !== expectedText) {\n console.warn(\"[Hydrate] Text mismatch, updating:\", domNode.textContent, \"->\", expectedText);\n domNode.textContent = expectedText;\n }\n }\n return;\n }\n\n // Handle arrays\n if (Array.isArray(vnode)) {\n let currentDomNode: Node | null = domNode;\n for (const child of vnode) {\n if (currentDomNode) {\n hydrateNode(child, currentDomNode, parentElement);\n currentDomNode = currentDomNode.nextSibling;\n }\n }\n return;\n }\n\n // Must be a VNode object\n if (typeof vnode !== \"object\" || !(\"type\" in vnode)) {\n return;\n }\n\n const vnodeTyped = vnode as VNode;\n\n // Handle signal nodes - special reactive nodes\n if (vnodeTyped.type === \"#signal\") {\n const signal = vnodeTyped.props?.signal;\n if (signal && isSignal(signal)) {\n hydrateSignalNode(signal, domNode, parentElement);\n }\n return;\n }\n\n // Handle fragments\n if (vnodeTyped.type === Fragment) {\n let currentDomNode: Node | null = domNode;\n for (const child of vnodeTyped.children) {\n if (currentDomNode) {\n hydrateNode(child, currentDomNode, parentElement);\n currentDomNode = currentDomNode.nextSibling;\n }\n }\n return;\n }\n\n // Handle function components - render and hydrate result\n if (typeof vnodeTyped.type === \"function\") {\n // Merge vnode.children into props.children (mirrors renderVNodeToHTML)\n const props =\n vnodeTyped.children && vnodeTyped.children.length > 0\n ? { ...vnodeTyped.props, children: vnodeTyped.children }\n : vnodeTyped.props || {};\n let result = vnodeTyped.type(props);\n\n // Handle async component\n if (result instanceof Promise) {\n result.then((resolved) => hydrateNode(resolved, domNode, parentElement));\n return;\n }\n\n // Handle async iterator (streaming component)\n if (isAsyncIterator(result)) {\n result.next().then(({ value }) => {\n hydrateNode(value, domNode, parentElement);\n });\n return;\n }\n\n hydrateNode(result, domNode, parentElement);\n return;\n }\n\n // Handle DOM elements\n if (typeof vnodeTyped.type === \"string\") {\n // Skip validation for text nodes - they can legitimately be text in the DOM\n // This happens when signal values or other dynamic content renders as text\n if (domNode.nodeType === Node.TEXT_NODE) {\n // Text node in place of element - possible mismatch, but might be intentional\n // Skip hydration for this node\n return;\n }\n\n if (domNode.nodeType !== Node.ELEMENT_NODE) {\n console.warn(\"[Hydrate] Expected element, got:\", domNode.nodeType);\n return;\n }\n\n const element = domNode as Element;\n\n // Verify tag matches\n if (element.tagName.toLowerCase() !== vnodeTyped.type.toLowerCase()) {\n console.warn(\"[Hydrate] Tag mismatch:\", element.tagName, \"vs\", vnodeTyped.type);\n return;\n }\n\n // Hydrate properties (especially event listeners and reactive props)\n hydrateProperties(element, vnodeTyped.props || {});\n\n // Hydrate children\n hydrateChildren(element, vnodeTyped.children);\n return;\n }\n}\n\n/**\n * Hydrate properties onto an element\n * This is where we attach event listeners and set up reactive properties\n */\nfunction hydrateProperties(element: Element, props: Record<string, any>): void {\n for (const [key, value] of Object.entries(props)) {\n // Skip special props\n if (key === \"children\" || key === \"key\" || key === \"ref\") {\n continue;\n }\n\n // Handle event listeners - these need to be attached\n if (key.startsWith(\"on\")) {\n const eventName = key.slice(2).toLowerCase();\n if (typeof value === \"function\") {\n element.addEventListener(eventName, value as EventListener);\n }\n continue;\n }\n\n // Handle reactive properties (signals)\n if (isSignal(value)) {\n // Set initial value\n setProperty(element, key, value.value);\n\n // Set up reactivity using subscribe\n value.subscribe((newValue: any) => {\n setProperty(element, key, newValue);\n });\n continue;\n }\n\n // For static properties, they should already be set by SSR\n // We can optionally verify them, but usually we trust SSR output\n // to avoid unnecessary DOM operations\n }\n\n // Handle refs\n if (props.ref) {\n if (typeof props.ref === \"function\") {\n props.ref(element);\n } else if (typeof props.ref === \"object\" && props.ref !== null) {\n props.ref.current = element;\n }\n }\n}\n\n/**\n * Hydrate children elements\n */\nfunction hydrateChildren(element: Element, children: any[]): void {\n let currentDomNode = element.firstChild;\n\n for (const child of children) {\n if (!currentDomNode) {\n // Mismatch: VNode has more children than DOM\n // Fall back to appending new nodes\n console.warn(\"[Hydrate] Missing DOM node for child, appending\");\n const newNode = renderNode(child, element);\n if (newNode) {\n element.appendChild(newNode);\n }\n continue;\n }\n\n hydrateNode(child, currentDomNode, element);\n currentDomNode = currentDomNode.nextSibling;\n }\n\n // If DOM has extra nodes, we could warn or remove them\n // For now, we leave them (progressive enhancement)\n}\n\n/**\n * Hydrate a signal VNode\n * Set up reactivity to replace content when signal changes\n */\nfunction hydrateSignalNode(signal: any, domNode: Node, parentElement: Element): void {\n // Get current signal value\n const currentValue = signal.value;\n\n // Handle empty/null signal values - server renders as <!--signal-empty--> comment\n if (\n currentValue == null ||\n currentValue === false ||\n (Array.isArray(currentValue) && currentValue.length === 0)\n ) {\n // Expect a comment node marker\n if (domNode.nodeType === Node.COMMENT_NODE) {\n // Comment marker is correct, nothing to validate\n } else {\n console.warn(\"[Hydrate] Expected comment marker for empty signal, got:\", domNode.nodeType);\n }\n } // For simple values (string, number), the server renders them as text nodes\n else if (typeof currentValue === \"string\" || typeof currentValue === \"number\") {\n if (domNode.nodeType === Node.TEXT_NODE) {\n const expectedText = String(currentValue);\n if (domNode.textContent !== expectedText) {\n console.warn(\"[Hydrate] Signal text mismatch:\", domNode.textContent, \"->\", expectedText);\n domNode.textContent = expectedText;\n }\n }\n } else {\n // For complex values (VNodes, etc.), do full hydration\n hydrateNode(currentValue, domNode, parentElement);\n }\n\n // Set up reactivity to handle signal changes\n // Use an anchor comment node to track position in DOM\n // This is necessary because arrays render as DocumentFragments which can't be tracked\n let anchor: Comment;\n let currentNodes: Node[] = [];\n\n if (domNode.nodeType === Node.COMMENT_NODE) {\n // Already a comment (empty signal), use as anchor\n anchor = domNode as Comment;\n } else {\n // Create anchor and insert it before current node\n anchor = document.createComment(\"signal-anchor\");\n if (domNode.parentNode) {\n domNode.parentNode.insertBefore(anchor, domNode);\n }\n currentNodes = [domNode];\n }\n\n signal.subscribe((newValue: any) => {\n const parent = anchor.parentNode;\n if (!parent) {\n return;\n }\n\n // Remove old nodes\n for (const node of currentNodes) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n }\n currentNodes = [];\n\n // Render and insert new content after anchor\n const newNode = renderNode(newValue, parentElement);\n if (newNode) {\n if (newNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n // Fragment: insert all children after anchor in correct order\n const fragment = newNode as DocumentFragment;\n const children = Array.from(fragment.childNodes);\n\n // Insert in order by tracking the last inserted node\n let insertAfter: Node | null = anchor;\n for (const child of children) {\n parent.insertBefore(child, insertAfter.nextSibling);\n insertAfter = child;\n currentNodes.push(child);\n }\n } else {\n // Single node: insert after anchor\n parent.insertBefore(newNode, anchor.nextSibling);\n currentNodes = [newNode];\n }\n }\n });\n}\n\n/**\n * Render a VNode to a DOM node (fallback when hydration fails)\n * This is a simplified version of render() just for hydration fallback\n */\n// oxlint-disable-next-line only-used-in-recursion\nfunction renderNode(vnode: any, parentElement: Element): Node | null {\n if (vnode == null || vnode === false || vnode === true) {\n return document.createComment(\"empty\");\n }\n\n if (isSignal(vnode)) {\n return renderNode(vnode.value, parentElement);\n }\n\n if (typeof vnode === \"string\" || typeof vnode === \"number\") {\n return document.createTextNode(String(vnode));\n }\n\n if (Array.isArray(vnode)) {\n // Empty array should render as a comment marker\n if (vnode.length === 0) {\n return document.createComment(\"empty\");\n }\n\n const fragment = document.createDocumentFragment();\n for (const child of vnode) {\n const node = renderNode(child, parentElement);\n if (node) {\n fragment.appendChild(node);\n }\n }\n return fragment;\n }\n\n if (typeof vnode === \"object\" && \"type\" in vnode) {\n const vnodeTyped = vnode as VNode;\n\n // Handle special VNode types\n if (vnodeTyped.type === \"#text\") {\n return document.createTextNode(String(vnodeTyped.props?.nodeValue || \"\"));\n }\n\n if (vnodeTyped.type === \"#signal\") {\n const signal = vnodeTyped.props?.signal;\n if (signal && isSignal(signal)) {\n return renderNode(signal.value, parentElement);\n }\n return document.createTextNode(\"\");\n }\n\n if (vnodeTyped.type === Fragment) {\n const fragment = document.createDocumentFragment();\n for (const child of vnodeTyped.children) {\n const node = renderNode(child, parentElement);\n if (node) {\n fragment.appendChild(node);\n }\n }\n return fragment;\n }\n\n if (typeof vnodeTyped.type === \"function\") {\n const result = vnodeTyped.type(vnodeTyped.props || {});\n return renderNode(result, parentElement);\n }\n\n if (typeof vnodeTyped.type === \"string\") {\n const element = document.createElement(vnodeTyped.type);\n\n // Set properties\n const props = vnodeTyped.props || {};\n for (const [key, value] of Object.entries(props)) {\n if (key === \"children\" || key === \"key\") continue;\n setProperty(element, key, value);\n }\n\n // Render children\n for (const child of vnodeTyped.children) {\n const childNode = renderNode(child, element);\n if (childNode) {\n element.appendChild(childNode);\n }\n }\n\n return element;\n }\n }\n\n return null;\n}\n\n/**\n * Hydrate an island by ID\n * Handles both single-element islands (with data-island-id) and fragment islands (with comment markers)\n *\n * @param islandId - The island ID to hydrate\n * @param Component - The component function to render\n * @param markHydrated - Callback to mark the island as hydrated\n *\n * @example\n * ```tsx\n * import { hydrateIsland, markIslandHydrated } from '@semajsx/ssr/client';\n * import Counter from './Counter';\n *\n * hydrateIsland('counter-0', Counter, markIslandHydrated);\n * ```\n */\nexport function hydrateIsland(\n islandId: string,\n Component: Function,\n markHydrated: (id: string) => void,\n): void {\n // Try single-element island first (has data-island-id on root element)\n const element = document.querySelector(`[data-island-id=\"${islandId}\"]`);\n\n if (element) {\n // Single-element island: replace the element with rendered content\n const props = JSON.parse(element.getAttribute(\"data-island-props\") || \"{}\");\n const parent = element.parentNode;\n if (!parent) return;\n\n // Create VNode for the component\n const vnode: VNode = {\n type: Component as VNode[\"type\"],\n props,\n children: [],\n };\n\n // Render into temp container\n const temp = document.createElement(\"div\");\n render(vnode, temp);\n\n // Replace original element with rendered content\n const children = Array.from(temp.childNodes);\n for (const child of children) {\n parent.insertBefore(child, element);\n }\n parent.removeChild(element);\n\n markHydrated(islandId);\n return;\n }\n\n // Fragment island: find by comment marker\n const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_COMMENT);\n let startComment: Comment | null = null;\n let comment: Comment | null;\n while ((comment = walker.nextNode() as Comment | null)) {\n if (comment.textContent === `island:${islandId}`) {\n startComment = comment;\n break;\n }\n }\n\n if (startComment) {\n // Get props from script tag\n const script = document.querySelector(`script[data-island=\"${islandId}\"]`);\n const props = script ? JSON.parse(script.textContent || \"{}\") : {};\n\n // Find end comment and collect nodes between markers\n const nodesToRemove: Node[] = [];\n let sibling = startComment.nextSibling;\n let endComment: Comment | null = null;\n while (sibling) {\n if (sibling.nodeType === Node.COMMENT_NODE && sibling.textContent === `/island:${islandId}`) {\n endComment = sibling as Comment;\n break;\n }\n nodesToRemove.push(sibling);\n sibling = sibling.nextSibling;\n }\n\n // Remove old nodes\n for (const node of nodesToRemove) {\n node.parentNode?.removeChild(node);\n }\n\n // Render new content with full reactivity\n const vnode: VNode = {\n type: Component as VNode[\"type\"],\n props,\n children: [],\n };\n const parent = startComment.parentNode;\n if (parent) {\n // Create temp container and use full render for reactivity\n const temp = document.createElement(\"div\");\n render(vnode, temp);\n\n // Move rendered nodes after start comment\n const children = Array.from(temp.childNodes);\n for (const child of children) {\n parent.insertBefore(child, endComment);\n }\n }\n\n // Remove markers and script\n startComment.parentNode?.removeChild(startComment);\n if (endComment) endComment.parentNode?.removeChild(endComment);\n if (script) script.parentNode?.removeChild(script);\n\n markHydrated(islandId);\n }\n}\n\n/**\n * Find all islands on the page (both element and fragment types)\n */\nfunction findAllIslands(): IslandInfo[] {\n const islands: IslandInfo[] = [];\n\n // Find element-based islands (single root element)\n const elements = document.querySelectorAll(\"[data-island-id]\");\n for (const el of elements) {\n const id = el.getAttribute(\"data-island-id\");\n const propsStr = el.getAttribute(\"data-island-props\");\n if (id) {\n islands.push({\n id,\n props: propsStr ? JSON.parse(propsStr) : {},\n element: el as HTMLElement,\n });\n }\n }\n\n // Find fragment-based islands (comment markers + script)\n const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_COMMENT);\n\n let comment: Comment | null;\n while ((comment = walker.nextNode() as Comment | null)) {\n const match = comment.textContent?.match(/^island:(.+)$/);\n if (match && match[1]) {\n const id = match[1];\n // Find end comment (matches /island:${id})\n let endComment: Comment | null = null;\n let sibling = comment.nextSibling;\n while (sibling) {\n if (sibling.nodeType === Node.COMMENT_NODE && sibling.textContent === `/island:${id}`) {\n endComment = sibling as Comment;\n break;\n }\n sibling = sibling.nextSibling;\n }\n\n // Find props from script tag\n const script = document.querySelector(`script[type=\"application/json\"][data-island=\"${id}\"]`);\n const props = script ? JSON.parse(script.textContent || \"{}\") : {};\n\n islands.push({\n id,\n props,\n startComment: comment,\n endComment: endComment || undefined,\n });\n }\n }\n\n return islands;\n}\n\n/**\n * Hydrate all islands on the page\n * This function is typically called once after the page loads\n *\n * @example\n * ```tsx\n * // In your client entry point\n * import { hydrateIslands } from '@semajsx/ssr/client'\n *\n * // Wait for DOM to be ready\n * if (document.readyState === 'loading') {\n * document.addEventListener('DOMContentLoaded', hydrateIslands)\n * } else {\n * hydrateIslands()\n * }\n * ```\n */\nexport async function hydrateIslands(): Promise<void> {\n const islands = findAllIslands();\n\n if (islands.length === 0) {\n return;\n }\n\n console.log(`[SemaJSX] Found ${islands.length} islands to hydrate`);\n\n // Hydrate islands in parallel for better performance\n const hydrations = islands.map((island) => waitForIslandScript(island));\n\n await Promise.all(hydrations);\n\n console.log(`[SemaJSX] All islands hydrated`);\n}\n\n/**\n * Wait for an island's script to load and hydrate it\n * The actual hydration is performed by the island's entry point script\n * This function just waits for it to complete\n */\nasync function waitForIslandScript(island: IslandInfo): Promise<void> {\n const { id: islandId, element, startComment } = island;\n\n // Check if island is already hydrated\n if (element?.hasAttribute(\"data-hydrated\")) {\n return;\n }\n if (startComment?.parentElement?.querySelector(`[data-island-hydrated=\"${islandId}\"]`)) {\n return;\n }\n\n // Wait for hydration to complete (set by island entry point)\n return new Promise((resolve) => {\n // Check every 50ms for up to 10 seconds\n const maxAttempts = 200;\n let attempts = 0;\n\n const checkInterval = setInterval(() => {\n const isHydrated = element\n ? element.hasAttribute(\"data-hydrated\")\n : document.querySelector(`[data-island-hydrated=\"${islandId}\"]`) !== null;\n\n if (isHydrated) {\n clearInterval(checkInterval);\n resolve();\n } else if (++attempts >= maxAttempts) {\n clearInterval(checkInterval);\n console.warn(`[SemaJSX] Island ${islandId} hydration timeout`);\n resolve();\n }\n }, 50);\n });\n}\n\n/**\n * Get island info by ID\n */\nexport function getIslandInfo(islandId: string): IslandInfo | null {\n // Try element-based first\n const element = document.querySelector(`[data-island-id=\"${islandId}\"]`) as HTMLElement | null;\n\n if (element) {\n const propsStr = element.getAttribute(\"data-island-props\");\n return {\n id: islandId,\n props: propsStr ? JSON.parse(propsStr) : {},\n element,\n };\n }\n\n // Try fragment-based\n const script = document.querySelector(\n `script[type=\"application/json\"][data-island=\"${islandId}\"]`,\n );\n\n if (script) {\n const props = JSON.parse(script.textContent || \"{}\");\n // Find start comment\n const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_COMMENT);\n let comment: Comment | null;\n while ((comment = walker.nextNode() as Comment | null)) {\n if (comment.textContent === `island:${islandId}`) {\n return {\n id: islandId,\n props,\n startComment: comment,\n };\n }\n }\n }\n\n return null;\n}\n\n/**\n * Manual hydration for a specific island\n * Useful for lazy-loading islands on interaction\n *\n * @param islandId - The island ID to hydrate\n *\n * @example\n * ```tsx\n * // Lazy load an island on click\n * button.addEventListener('click', () => {\n * hydrateIslandById('island-0')\n * })\n * ```\n */\nexport async function hydrateIslandById(islandId: string): Promise<void> {\n const island = getIslandInfo(islandId);\n\n if (!island) {\n console.error(`[SemaJSX] Island not found: ${islandId}`);\n return;\n }\n\n await waitForIslandScript(island);\n}\n\n/**\n * Check if islands are present on the page\n */\nexport function hasIslands(): boolean {\n // Check for element-based islands\n if (document.querySelectorAll(\"[data-island-id]\").length > 0) {\n return true;\n }\n // Check for fragment-based islands\n return document.querySelectorAll('script[type=\"application/json\"][data-island]').length > 0;\n}\n\n/**\n * Get all island IDs on the page\n */\nexport function getIslandIds(): string[] {\n const ids: string[] = [];\n\n // Element-based islands\n const elements = document.querySelectorAll(\"[data-island-id]\");\n for (const el of elements) {\n const id = el.getAttribute(\"data-island-id\");\n if (id) ids.push(id);\n }\n\n // Fragment-based islands\n const scripts = document.querySelectorAll('script[type=\"application/json\"][data-island]');\n for (const script of scripts) {\n const id = script.getAttribute(\"data-island\");\n if (id) ids.push(id);\n }\n\n return ids;\n}\n\n/**\n * Mark an island as hydrated\n * This should be called by the island entry point after hydration completes\n */\nexport function markIslandHydrated(islandId: string): void {\n // Try element-based first\n const element = document.querySelector(`[data-island-id=\"${islandId}\"]`);\n if (element) {\n element.setAttribute(\"data-hydrated\", \"true\");\n return;\n }\n\n // For fragment-based, remove the script tag (no longer needed)\n const script = document.querySelector(\n `script[type=\"application/json\"][data-island=\"${islandId}\"]`,\n );\n if (script) {\n // Mark as hydrated before removal (for any watchers)\n script.setAttribute(\"data-island-hydrated\", islandId);\n // Remove script - props already parsed, no longer needed\n script.remove();\n }\n}\n\n/**\n * Reconstruct VNode children from serialized JSON data.\n *\n * Uses the island module's exports as a registry to resolve component names\n * (prefixed with \"$\") back to their actual functions.\n *\n * @param serialized - Serialized children array from SSR\n * @param registry - Module exports mapping component names to functions\n */\nfunction reconstructChildren(serialized: any[], registry: Record<string, any>): any[] {\n const result: any[] = [];\n for (const node of serialized) {\n if (node === null) continue;\n if (typeof node === \"string\") {\n result.push(node);\n continue;\n }\n if (Array.isArray(node) && node.length === 3 && typeof node[0] === \"string\") {\n const [type, props, children] = node;\n\n // Nested island placeholder — these hydrate independently,\n // push null to preserve children index positions.\n if (type === \"$island\") {\n result.push(null);\n continue;\n }\n\n const resolvedChildren = children ? reconstructChildren(children, registry) : [];\n\n if (type.startsWith(\"$\")) {\n // Component reference — look up in registry\n const name = type.slice(1);\n const component = registry[name];\n if (!component || typeof component !== \"function\") {\n console.warn(`[Hydrate] Unknown component \"${name}\" in island children`);\n continue;\n }\n result.push(h(component, props || {}, ...resolvedChildren));\n } else {\n // HTML element\n result.push(h(type, props || {}, ...resolvedChildren));\n }\n }\n }\n return result;\n}\n\n/**\n * Hydrate all islands with a given component source\n * Finds all elements with data-island-src and hydrates them\n *\n * @param componentSrc - The component source key (e.g., \"components/Counter\")\n * @param Component - The component function to render\n * @param registry - Optional module exports for reconstructing island children\n *\n * @example\n * ```tsx\n * import { hydrateAllIslands } from '@semajsx/ssr/client';\n * import * as CounterModule from './Counter';\n *\n * hydrateAllIslands('components/Counter', CounterModule.Counter, CounterModule);\n * ```\n */\nexport function hydrateAllIslands(\n componentSrc: string,\n Component: Function,\n registry?: Record<string, any>,\n): void {\n // Find all elements with this component source\n const elements = document.querySelectorAll(`[data-island-src=\"${componentSrc}\"]`);\n\n // Also find fragment-based islands (script tags with data-island-src)\n const scripts = document.querySelectorAll(\n `script[type=\"application/json\"][data-island-src=\"${componentSrc}\"]`,\n );\n\n // Hydrate each element-based island\n elements.forEach((element) => {\n const islandId = element.getAttribute(\"data-island-id\");\n if (!islandId) return;\n\n // Skip if already hydrated\n if (element.hasAttribute(\"data-hydrated\")) return;\n\n try {\n const props = JSON.parse(element.getAttribute(\"data-island-props\") || \"{}\");\n\n // Reconstruct children from serialized VNode data if available\n if (registry) {\n const childrenScript = document.querySelector(\n `script[type=\"application/json\"][data-island-children=\"${islandId}\"]`,\n );\n if (childrenScript) {\n try {\n const serialized = JSON.parse(childrenScript.textContent || \"[]\");\n props.children = reconstructChildren(serialized, registry);\n } catch (e) {\n console.warn(\"[Hydrate] Failed to reconstruct island children:\", e);\n }\n childrenScript.remove();\n }\n }\n\n // Create VNode for the component\n const vnode: VNode = {\n type: Component as VNode[\"type\"],\n props,\n children: [],\n };\n\n // Hydrate in-place: attach event listeners, signal subscriptions,\n // and refs while preserving existing DOM and SSR-rendered children.\n hydrateNode(vnode, element, element.parentNode as Element);\n element.setAttribute(\"data-hydrated\", \"true\");\n } catch (error) {\n // SSR content is preserved — the island stays as static HTML\n console.error(`[Hydrate] Island \"${islandId}\" hydration failed:`, error);\n element.setAttribute(\"data-hydration-error\", \"true\");\n }\n });\n\n // Hydrate each fragment-based island\n scripts.forEach((script) => {\n const islandId = script.getAttribute(\"data-island\");\n if (!islandId) return;\n\n // Skip if already hydrated\n if (script.hasAttribute(\"data-island-hydrated\")) return;\n\n try {\n const props = JSON.parse(script.textContent || \"{}\");\n\n // Reconstruct children from serialized VNode data if available\n if (registry) {\n const childrenScript = document.querySelector(\n `script[type=\"application/json\"][data-island-children=\"${islandId}\"]`,\n );\n if (childrenScript) {\n try {\n const serialized = JSON.parse(childrenScript.textContent || \"[]\");\n props.children = reconstructChildren(serialized, registry);\n } catch (e) {\n console.warn(\"[Hydrate] Failed to reconstruct island children:\", e);\n }\n childrenScript.remove();\n }\n }\n\n // Find the comment markers\n const startMarker = `island:${islandId}`;\n const endMarker = `/island:${islandId}`;\n\n // Find and process the fragment\n const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_COMMENT, null);\n\n let startNode: Comment | null = null;\n let endNode: Comment | null = null;\n let node: Node | null;\n\n while ((node = walker.nextNode())) {\n if (node.nodeValue === startMarker) {\n startNode = node as Comment;\n } else if (node.nodeValue === endMarker) {\n endNode = node as Comment;\n break;\n }\n }\n\n if (startNode && endNode && startNode.parentNode) {\n const parent = startNode.parentNode;\n\n // Non-destructive hydration: move existing nodes into a temp\n // container, hydrate against the existing DOM, then move back.\n // This preserves SSR content and only attaches event listeners\n // and signal subscriptions — matching element-based island behavior.\n const container = document.createElement(\"div\");\n let current: Node | null = startNode.nextSibling;\n while (current && current !== endNode) {\n const next = current.nextSibling;\n container.appendChild(current); // moves node, doesn't clone\n current = next;\n }\n\n // Create VNode and hydrate against existing DOM\n const vnode: VNode = {\n type: Component as VNode[\"type\"],\n props,\n children: [],\n };\n hydrateNode(vnode, container, container);\n\n // Move hydrated nodes back between markers\n while (container.firstChild) {\n parent.insertBefore(container.firstChild, endNode);\n }\n\n // Mark as hydrated\n script.setAttribute(\"data-island-hydrated\", islandId);\n script.remove();\n }\n } catch (error) {\n // SSR content is preserved — the fragment stays as static HTML\n console.error(`[Hydrate] Fragment island \"${islandId}\" hydration failed:`, error);\n }\n });\n}\n\n// Export types\nexport type { IslandInfo };\n","/**\n * Client-side resource utilities for dynamic CSS and asset loading\n */\n\n/**\n * Client manifest structure\n */\nexport interface ClientManifest {\n css: Record<string, string>;\n assets: Record<string, string>;\n}\n\n// Global manifest storage\nlet _manifest: ClientManifest | null = null;\n\n// Track loaded stylesheets to avoid duplicates\nconst loadedStyles = new Set<string>();\n\n/**\n * Set the client manifest (called during initialization)\n */\nexport function setManifest(manifest: ClientManifest): void {\n _manifest = manifest;\n}\n\n/**\n * Get the current manifest\n */\nexport function getManifest(): ClientManifest | null {\n return _manifest;\n}\n\n/**\n * Resolve a CSS path using the manifest\n */\nexport function resolveCSS(href: string): string {\n if (!_manifest) {\n return href;\n }\n\n // Try to find in manifest (remove leading slash for lookup)\n const lookupPath = href.startsWith(\"/\") ? href.slice(1) : href;\n return _manifest.css[lookupPath] || href;\n}\n\n/**\n * Resolve an asset path using the manifest\n */\nexport function resolveAsset(src: string): string {\n if (!_manifest) {\n return src;\n }\n\n // Try to find in manifest (remove leading slash for lookup)\n const lookupPath = src.startsWith(\"/\") ? src.slice(1) : src;\n return _manifest.assets[lookupPath] || src;\n}\n\n/**\n * Dynamically load a stylesheet\n */\nexport function loadStylesheet(href: string): Promise<void> {\n const resolvedHref = resolveCSS(href);\n\n // Skip if already loaded\n if (loadedStyles.has(resolvedHref)) {\n return Promise.resolve();\n }\n\n return new Promise((resolve, reject) => {\n // Check if already in document\n const existing = document.querySelector(`link[href=\"${resolvedHref}\"]`);\n if (existing) {\n loadedStyles.add(resolvedHref);\n resolve();\n return;\n }\n\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = resolvedHref;\n\n link.onload = () => {\n loadedStyles.add(resolvedHref);\n resolve();\n };\n\n link.onerror = () => {\n reject(new Error(`Failed to load stylesheet: ${resolvedHref}`));\n };\n\n document.head.appendChild(link);\n });\n}\n\n/**\n * Style component props\n */\nexport interface StyleProps {\n href: string;\n}\n\n/**\n * Asset component props\n */\nexport interface AssetProps {\n src: string;\n}\n\n/**\n * Client-side resource tools\n */\nexport interface ClientResourceTools {\n /** Load and inject a CSS stylesheet */\n Style: (props: StyleProps) => null;\n /** Resolve asset URL from manifest */\n url: (path: string) => string;\n}\n\n/**\n * Create client-side resource tools\n *\n * @example\n * ```tsx\n * import { clientResource } from '@semajsx/ssr/client';\n *\n * const { Style, url } = clientResource();\n *\n * export default function Counter() {\n * return (\n * <>\n * <Style href=\"./counter.css\" />\n * <img src={url('./icon.png')} />\n * </>\n * );\n * }\n * ```\n */\nexport function clientResource(): ClientResourceTools {\n return {\n Style({ href }: StyleProps): null {\n // Load stylesheet on mount\n if (typeof document !== \"undefined\") {\n loadStylesheet(href);\n }\n return null;\n },\n\n url(path: string): string {\n return resolveAsset(path);\n },\n };\n}\n"],"mappings":";;;;;;;;AA2BA,SAAS,gBAAgB,OAAyD;AAChF,KAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO;CAChD,MAAM,MAAM;AACZ,QACE,OAAO,IAAI,OAAO,mBAAmB,cACpC,OAAO,IAAI,SAAS,cAAc,OAAO,IAAI,WAAW;;;;;;;;;;;;;;;;;AAmB7D,SAAgB,QAAQ,OAAc,WAAiC;CAErE,MAAM,gBAAgB,UAAU;AAEhC,KAAI,CAAC,eAAe;AAClB,UAAQ,KAAK,uDAAuD;EACpE,MAAM,WAAW,WAAW,OAAO,UAAU;AAC7C,MAAI,SACF,WAAU,YAAY,SAAS;AAEjC,SAAO;;AAIT,KAAI;AACF,cAAY,OAAO,eAAe,UAAU;AAC5C,SAAO;UACA,OAAO;AACd,UAAQ,MAAM,qCAAqC,MAAM;AAEzD,UAAQ,KAAK,kDAAkD;AAC/D,YAAU,YAAY;AACtB,SAAO,WAAW,OAAO,UAAU;;;;;;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,eAAe;AAClB,gBAAa,IAAI,aAAa;AAC9B,YAAS;;AAGX,OAAK,gBAAgB;AACnB,0BAAO,IAAI,MAAM,8BAA8B,eAAe,CAAC;;AAGjE,WAAS,KAAK,YAAY,KAAK;GAC/B;;;;;;;;;;;;;;;;;;;;;AA8CJ,SAAgB,iBAAsC;AACpD,QAAO;EACL,MAAM,EAAE,QAA0B;AAEhC,OAAI,OAAO,aAAa,YACtB,gBAAe,KAAK;AAEtB,UAAO;;EAGT,IAAI,MAAsB;AACxB,UAAO,aAAa,KAAK;;EAE5B"}
@@ -1,4 +1,4 @@
1
- import { r as scheduleUpdate } from "./signal-BN8vHXDb.mjs";
1
+ import { r as scheduleUpdate } from "./signal-4PgGfydw.mjs";
2
2
 
3
3
  //#region ../signal/src/computed.ts
4
4
  function computed(deps, compute) {
@@ -38,4 +38,4 @@ const memo = computed;
38
38
 
39
39
  //#endregion
40
40
  export { memo as n, computed as t };
41
- //# sourceMappingURL=computed-BidG06Lt.mjs.map
41
+ //# sourceMappingURL=computed-BpjqvQu1.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"computed-BidG06Lt.mjs","names":[],"sources":["../../signal/src/computed.ts"],"sourcesContent":["import type { ReadableSignal } from \"./types\";\nimport { scheduleUpdate } from \"./batch\";\n\n/**\n * Create a computed signal with declarative dependencies\n *\n * @example\n * const count = signal(0);\n * const doubled = computed([count], c => c * 2);\n *\n * @example\n * const firstName = signal('John');\n * const lastName = signal('Doe');\n * const fullName = computed([firstName, lastName], (f, l) => `${f} ${l}`);\n */\n\n// Single dependency overload\nexport function computed<T, R>(dep: ReadableSignal<T>, compute: (value: T) => R): ReadableSignal<R>;\n\n// Multiple dependencies overload\nexport function computed<T extends readonly ReadableSignal<any>[], R>(\n deps: [...T],\n compute: (...values: { [K in keyof T]: T[K] extends ReadableSignal<infer V> ? V : never }) => R,\n): ReadableSignal<R>;\n\n// Implementation\nexport function computed(deps: any, compute: any): ReadableSignal<any> {\n const depsArray: ReadableSignal<any>[] = Array.isArray(deps) ? deps : [deps];\n\n let value: any;\n const subscribers = new Set<(value: any) => void>();\n\n // Get current values from all dependencies\n const getValues = () => depsArray.map((dep) => dep.value);\n\n // Recompute when dependencies change\n const recompute = () => {\n const values = getValues();\n const newValue = Array.isArray(deps) ? compute(...values) : compute(values[0]);\n\n if (!Object.is(value, newValue)) {\n value = newValue;\n notify();\n }\n };\n\n // Notify subscribers\n const notify = () => {\n // Schedule the notification instead of running it immediately\n // This allows batching multiple updates into a single microtask\n scheduleUpdate(() => {\n // Directly iterate over the Set - no need to copy to array\n for (const listener of subscribers) {\n listener(value);\n }\n });\n };\n\n // Initial computation\n const initialValues = getValues();\n value = Array.isArray(deps) ? compute(...initialValues) : compute(initialValues[0]);\n\n // Subscribe to all dependencies\n // Note: unsubscribers are not currently used as we don't have a dispose mechanism\n // Keeping for future dispose mechanism\n // @ts-ignore - TS6133: variable is declared but never used\n const _unsubscribers = depsArray.map((dep) => dep.subscribe(recompute));\n\n return {\n get value() {\n return value;\n },\n\n subscribe(listener: (value: any) => void) {\n subscribers.add(listener);\n return () => {\n subscribers.delete(listener);\n };\n },\n };\n}\n\nexport const memo: typeof computed = computed;\n"],"mappings":";;;AA0BA,SAAgB,SAAS,MAAW,SAAmC;CACrE,MAAM,YAAmC,MAAM,QAAQ,KAAK,GAAG,OAAO,CAAC,KAAK;CAE5E,IAAI;CACJ,MAAM,8BAAc,IAAI,KAA2B;CAGnD,MAAM,kBAAkB,UAAU,KAAK,QAAQ,IAAI,MAAM;CAGzD,MAAM,kBAAkB;EACtB,MAAM,SAAS,WAAW;EAC1B,MAAM,WAAW,MAAM,QAAQ,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,OAAO,GAAG;AAE9E,MAAI,CAAC,OAAO,GAAG,OAAO,SAAS,EAAE;AAC/B,WAAQ;AACR,WAAQ;;;CAKZ,MAAM,eAAe;AAGnB,uBAAqB;AAEnB,QAAK,MAAM,YAAY,YACrB,UAAS,MAAM;IAEjB;;CAIJ,MAAM,gBAAgB,WAAW;AACjC,SAAQ,MAAM,QAAQ,KAAK,GAAG,QAAQ,GAAG,cAAc,GAAG,QAAQ,cAAc,GAAG;AAM5D,WAAU,KAAK,QAAQ,IAAI,UAAU,UAAU,CAAC;AAEvE,QAAO;EACL,IAAI,QAAQ;AACV,UAAO;;EAGT,UAAU,UAAgC;AACxC,eAAY,IAAI,SAAS;AACzB,gBAAa;AACX,gBAAY,OAAO,SAAS;;;EAGjC;;AAGH,MAAa,OAAwB"}
1
+ {"version":3,"file":"computed-BpjqvQu1.mjs","names":[],"sources":["../../signal/src/computed.ts"],"sourcesContent":["import type { ReadableSignal } from \"./types\";\nimport { scheduleUpdate } from \"./batch\";\n\n/**\n * Create a computed signal with declarative dependencies\n *\n * @example\n * const count = signal(0);\n * const doubled = computed([count], c => c * 2);\n *\n * @example\n * const firstName = signal('John');\n * const lastName = signal('Doe');\n * const fullName = computed([firstName, lastName], (f, l) => `${f} ${l}`);\n */\n\n// Single dependency overload\nexport function computed<T, R>(dep: ReadableSignal<T>, compute: (value: T) => R): ReadableSignal<R>;\n\n// Multiple dependencies overload\nexport function computed<T extends readonly ReadableSignal<any>[], R>(\n deps: [...T],\n compute: (...values: { [K in keyof T]: T[K] extends ReadableSignal<infer V> ? V : never }) => R,\n): ReadableSignal<R>;\n\n// Implementation\nexport function computed(deps: any, compute: any): ReadableSignal<any> {\n const depsArray: ReadableSignal<any>[] = Array.isArray(deps) ? deps : [deps];\n\n let value: any;\n const subscribers = new Set<(value: any) => void>();\n\n // Get current values from all dependencies\n const getValues = () => depsArray.map((dep) => dep.value);\n\n // Recompute when dependencies change\n const recompute = () => {\n const values = getValues();\n const newValue = Array.isArray(deps) ? compute(...values) : compute(values[0]);\n\n if (!Object.is(value, newValue)) {\n value = newValue;\n notify();\n }\n };\n\n // Notify subscribers\n const notify = () => {\n // Schedule the notification instead of running it immediately\n // This allows batching multiple updates into a single microtask\n scheduleUpdate(() => {\n // Directly iterate over the Set - no need to copy to array\n for (const listener of subscribers) {\n listener(value);\n }\n });\n };\n\n // Initial computation\n const initialValues = getValues();\n value = Array.isArray(deps) ? compute(...initialValues) : compute(initialValues[0]);\n\n // Subscribe to all dependencies\n // Note: unsubscribers are not currently used as we don't have a dispose mechanism\n // Keeping for future dispose mechanism\n // @ts-ignore - TS6133: variable is declared but never used\n const _unsubscribers = depsArray.map((dep) => dep.subscribe(recompute));\n\n return {\n get value() {\n return value;\n },\n\n subscribe(listener: (value: any) => void) {\n subscribers.add(listener);\n return () => {\n subscribers.delete(listener);\n };\n },\n };\n}\n\nexport const memo: typeof computed = computed;\n"],"mappings":";;;AA0BA,SAAgB,SAAS,MAAW,SAAmC;CACrE,MAAM,YAAmC,MAAM,QAAQ,KAAK,GAAG,OAAO,CAAC,KAAK;CAE5E,IAAI;CACJ,MAAM,8BAAc,IAAI,KAA2B;CAGnD,MAAM,kBAAkB,UAAU,KAAK,QAAQ,IAAI,MAAM;CAGzD,MAAM,kBAAkB;EACtB,MAAM,SAAS,WAAW;EAC1B,MAAM,WAAW,MAAM,QAAQ,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,OAAO,GAAG;AAE9E,MAAI,CAAC,OAAO,GAAG,OAAO,SAAS,EAAE;AAC/B,WAAQ;AACR,WAAQ;;;CAKZ,MAAM,eAAe;AAGnB,uBAAqB;AAEnB,QAAK,MAAM,YAAY,YACrB,UAAS,MAAM;IAEjB;;CAIJ,MAAM,gBAAgB,WAAW;AACjC,SAAQ,MAAM,QAAQ,KAAK,GAAG,QAAQ,GAAG,cAAc,GAAG,QAAQ,cAAc,GAAG;AAM5D,WAAU,KAAK,QAAQ,IAAI,UAAU,UAAU,CAAC;AAEvE,QAAO;EACL,IAAI,QAAQ;AACV,UAAO;;EAGT,UAAU,UAAgC;AACxC,eAAY,IAAI,SAAS;AACzB,gBAAa;AACX,gBAAY,OAAO,SAAS;;;EAGjC;;AAGH,MAAa,OAAwB"}
@@ -0,0 +1,5 @@
1
+ import "./src-Cv4rRVzv.mjs";
2
+ import "./jsx-runtime-BFs1c0xz.mjs";
3
+ import { n as renderDocument, t as DefaultDocument } from "./document-XKyAs62C.mjs";
4
+
5
+ export { renderDocument };
@@ -1,4 +1,4 @@
1
- import { a as jsxs, i as jsx, v as Fragment } from "./src-DW3tIczg.mjs";
1
+ import { a as jsxs, i as jsx, v as Fragment } from "./src-Cv4rRVzv.mjs";
2
2
 
3
3
  //#region ../ssr/src/document.tsx
4
4
  /** @jsxImportSource @semajsx/dom */
@@ -128,4 +128,4 @@ function escapeHTML(str) {
128
128
 
129
129
  //#endregion
130
130
  export { renderDocument as n, DefaultDocument as t };
131
- //# sourceMappingURL=document-BOJDaiBc.mjs.map
131
+ //# sourceMappingURL=document-XKyAs62C.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-BOJDaiBc.mjs","names":[],"sources":["../../ssr/src/document.tsx"],"sourcesContent":["/** @jsxImportSource @semajsx/dom */\n\nimport { Fragment } from \"@semajsx/core\";\nimport type { DocumentTemplate } from \"./shared/types\";\n\n/**\n * Default HTML document template\n *\n * This is a simple, production-ready HTML5 document template.\n * You can customize it by providing your own document template to the router.\n *\n * @example\n * ```tsx\n * const router = createViteRouter(routes, {\n * document: DefaultDocument,\n * title: \"My App\" // Required if using DefaultDocument\n * });\n * ```\n */\nexport const DefaultDocument: DocumentTemplate = ({ children, scripts, css, title }) => (\n <html lang=\"en\">\n <head>\n <meta charSet=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n {title && <title>{title}</title>}\n {css.map((href) => (\n <link key={href} rel=\"stylesheet\" href={href} />\n ))}\n </head>\n <body>\n {children}\n {scripts}\n </body>\n </html>\n);\n\n/**\n * Render a document VNode to a complete HTML string\n * Prepends <!DOCTYPE html> to the rendered output\n *\n * @param documentVNode - The document VNode (should be <html> element)\n * @returns Complete HTML string with doctype\n */\nexport function renderDocument(documentVNode: any): string {\n // Import renderToString from render.ts\n // We can't import it directly to avoid circular dependencies\n // So we use a simple HTML renderer for the document shell\n\n const html = renderDocumentVNode(documentVNode);\n return `<!DOCTYPE html>\\n${html}`;\n}\n\n/**\n * Simple HTML renderer for document structure\n * This handles the outer HTML/head/body structure without islands\n */\nfunction renderDocumentVNode(vnode: any): string {\n if (vnode == null) {\n return \"\";\n }\n\n if (typeof vnode === \"string\" || typeof vnode === \"number\") {\n const str = String(vnode);\n // Check if it's already rendered HTML (starts with < or contains HTML tags)\n if (str.startsWith(\"<\") || str.includes(\"</\")) {\n return str;\n }\n return escapeHTML(str);\n }\n\n if (typeof vnode === \"boolean\") {\n return \"\";\n }\n\n if (Array.isArray(vnode)) {\n return vnode.map((child) => renderDocumentVNode(child)).join(\"\");\n }\n\n if (typeof vnode !== \"object\" || !(\"type\" in vnode)) {\n return \"\";\n }\n\n const { type, props, children } = vnode;\n\n // Handle dangerouslySetInnerHTML (for raw HTML injection)\n if (props?.dangerouslySetInnerHTML?.__html) {\n return props.dangerouslySetInnerHTML.__html;\n }\n\n // Handle Fragment (Symbol type)\n if (type === Fragment) {\n return (children || []).map((child: any) => renderDocumentVNode(child)).join(\"\");\n }\n\n // Handle special VNode types\n if (typeof type === \"string\") {\n // Handle internal node types like #text, #signal\n if (type.startsWith(\"#\")) {\n if (type === \"#text\") {\n const value = props?.nodeValue ?? \"\";\n // Check if it's already rendered HTML\n if (typeof value === \"string\" && (value.startsWith(\"<\") || value.includes(\"</\"))) {\n return value;\n }\n return escapeHTML(String(value));\n }\n // For #signal and other special types, render children\n return (children || []).map((child: any) => renderDocumentVNode(child)).join(\"\");\n }\n return renderElement(type, props, children);\n }\n\n if (typeof type === \"function\") {\n const result = type(props || {});\n return renderDocumentVNode(result);\n }\n\n return \"\";\n}\n\n/**\n * Render an HTML element\n */\nfunction renderElement(tag: string, props: any, children: any[]): string {\n const attrs = renderAttributes(props || {});\n\n // Self-closing tags\n const selfClosing = [\"meta\", \"link\", \"br\", \"hr\", \"img\", \"input\"];\n if (selfClosing.includes(tag)) {\n return `<${tag}${attrs} />`;\n }\n\n // Raw text elements: content must NOT be HTML-escaped\n const isRawText = tag === \"style\" || tag === \"script\";\n const childrenHTML = isRawText\n ? (children || []).map((child) => extractRawText(child)).join(\"\")\n : (children || []).map((child) => renderDocumentVNode(child)).join(\"\");\n\n return `<${tag}${attrs}>${childrenHTML}</${tag}>`;\n}\n\n/**\n * Extract raw text from a VNode without HTML escaping.\n * Used for <style> and <script> content.\n */\nfunction extractRawText(vnode: any): string {\n if (vnode == null || typeof vnode === \"boolean\") return \"\";\n if (typeof vnode === \"string\" || typeof vnode === \"number\") return String(vnode);\n if (Array.isArray(vnode)) return vnode.map(extractRawText).join(\"\");\n if (typeof vnode === \"object\" && \"type\" in vnode) {\n if (vnode.type === \"#text\") return String(vnode.props?.nodeValue ?? \"\");\n if (vnode.type === \"#signal\") return (vnode.children || []).map(extractRawText).join(\"\");\n // Nested elements inside style/script (rare) - render normally\n return renderDocumentVNode(vnode);\n }\n return \"\";\n}\n\n/**\n * Render attributes\n */\nfunction renderAttributes(props: Record<string, any>): string {\n const attrs: string[] = [];\n\n for (const [key, value] of Object.entries(props)) {\n if (key === \"children\" || key === \"key\" || key === \"ref\" || key === \"dangerouslySetInnerHTML\") {\n continue;\n }\n\n if (value == null || value === false) {\n continue;\n }\n\n // Boolean attributes\n if (value === true) {\n attrs.push(key);\n continue;\n }\n\n // Map React/JSX attribute names to HTML\n const attrName =\n key === \"className\"\n ? \"class\"\n : key === \"htmlFor\"\n ? \"for\"\n : key === \"charSet\"\n ? \"charset\"\n : key === \"crossOrigin\"\n ? \"crossorigin\"\n : key === \"httpEquiv\"\n ? \"http-equiv\"\n : key;\n\n attrs.push(`${attrName}=\"${escapeHTML(String(value))}\"`);\n }\n\n return attrs.length > 0 ? \" \" + attrs.join(\" \") : \"\";\n}\n\n/**\n * Escape HTML special characters\n */\nfunction escapeHTML(str: string): string {\n return str\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g,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D,MAAM,QAAkB,EAAE;AAE1B,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,EAAE;AAChD,MAAI,QAAQ,cAAc,QAAQ,SAAS,QAAQ,SAAS,QAAQ,0BAClE;AAGF,MAAI,SAAS,QAAQ,UAAU,MAC7B;AAIF,MAAI,UAAU,MAAM;AAClB,SAAM,KAAK,IAAI;AACf;;EAIF,MAAM,WACJ,QAAQ,cACJ,UACA,QAAQ,YACN,QACA,QAAQ,YACN,YACA,QAAQ,gBACN,gBACA,QAAQ,cACN,eACA;AAEd,QAAM,KAAK,GAAG,SAAS,IAAI,WAAW,OAAO,MAAM,CAAC,CAAC,GAAG;;AAG1D,QAAO,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,IAAI,GAAG;;;;;AAMpD,SAAS,WAAW,KAAqB;AACvC,QAAO,IACJ,QAAQ,MAAM,QAAQ,CACtB,QAAQ,MAAM,OAAO,CACrB,QAAQ,MAAM,OAAO,CACrB,QAAQ,MAAM,SAAS,CACvB,QAAQ,MAAM,QAAQ"}
1
+ {"version":3,"file":"document-XKyAs62C.mjs","names":[],"sources":["../../ssr/src/document.tsx"],"sourcesContent":["/** @jsxImportSource @semajsx/dom */\n\nimport { Fragment } from \"@semajsx/core\";\nimport type { DocumentTemplate } from \"./shared/types\";\n\n/**\n * Default HTML document template\n *\n * This is a simple, production-ready HTML5 document template.\n * You can customize it by providing your own document template to the router.\n *\n * @example\n * ```tsx\n * const router = createViteRouter(routes, {\n * document: DefaultDocument,\n * title: \"My App\" // Required if using DefaultDocument\n * });\n * ```\n */\nexport const DefaultDocument: DocumentTemplate = ({ children, scripts, css, title }) => (\n <html lang=\"en\">\n <head>\n <meta charSet=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n {title && <title>{title}</title>}\n {css.map((href) => (\n <link key={href} rel=\"stylesheet\" href={href} />\n ))}\n </head>\n <body>\n {children}\n {scripts}\n </body>\n </html>\n);\n\n/**\n * Render a document VNode to a complete HTML string\n * Prepends <!DOCTYPE html> to the rendered output\n *\n * @param documentVNode - The document VNode (should be <html> element)\n * @returns Complete HTML string with doctype\n */\nexport function renderDocument(documentVNode: any): string {\n // Import renderToString from render.ts\n // We can't import it directly to avoid circular dependencies\n // So we use a simple HTML renderer for the document shell\n\n const html = renderDocumentVNode(documentVNode);\n return `<!DOCTYPE html>\\n${html}`;\n}\n\n/**\n * Simple HTML renderer for document structure\n * This handles the outer HTML/head/body structure without islands\n */\nfunction renderDocumentVNode(vnode: any): string {\n if (vnode == null) {\n return \"\";\n }\n\n if (typeof vnode === \"string\" || typeof vnode === \"number\") {\n const str = String(vnode);\n // Check if it's already rendered HTML (starts with < or contains HTML tags)\n if (str.startsWith(\"<\") || str.includes(\"</\")) {\n return str;\n }\n return escapeHTML(str);\n }\n\n if (typeof vnode === \"boolean\") {\n return \"\";\n }\n\n if (Array.isArray(vnode)) {\n return vnode.map((child) => renderDocumentVNode(child)).join(\"\");\n }\n\n if (typeof vnode !== \"object\" || !(\"type\" in vnode)) {\n return \"\";\n }\n\n const { type, props, children } = vnode;\n\n // Handle dangerouslySetInnerHTML (for raw HTML injection)\n if (props?.dangerouslySetInnerHTML?.__html) {\n return props.dangerouslySetInnerHTML.__html;\n }\n\n // Handle Fragment (Symbol type)\n if (type === Fragment) {\n return (children || []).map((child: any) => renderDocumentVNode(child)).join(\"\");\n }\n\n // Handle special VNode types\n if (typeof type === \"string\") {\n // Handle internal node types like #text, #signal\n if (type.startsWith(\"#\")) {\n if (type === \"#text\") {\n const value = props?.nodeValue ?? \"\";\n // Check if it's already rendered HTML\n if (typeof value === \"string\" && (value.startsWith(\"<\") || value.includes(\"</\"))) {\n return value;\n }\n return escapeHTML(String(value));\n }\n // For #signal and other special types, render children\n return (children || []).map((child: any) => renderDocumentVNode(child)).join(\"\");\n }\n return renderElement(type, props, children);\n }\n\n if (typeof type === \"function\") {\n const result = type(props || {});\n return renderDocumentVNode(result);\n }\n\n return \"\";\n}\n\n/**\n * Render an HTML element\n */\nfunction renderElement(tag: string, props: any, children: any[]): string {\n const attrs = renderAttributes(props || {});\n\n // Self-closing tags\n const selfClosing = [\"meta\", \"link\", \"br\", \"hr\", \"img\", \"input\"];\n if (selfClosing.includes(tag)) {\n return `<${tag}${attrs} />`;\n }\n\n // Raw text elements: content must NOT be HTML-escaped\n const isRawText = tag === \"style\" || tag === \"script\";\n const childrenHTML = isRawText\n ? (children || []).map((child) => extractRawText(child)).join(\"\")\n : (children || []).map((child) => renderDocumentVNode(child)).join(\"\");\n\n return `<${tag}${attrs}>${childrenHTML}</${tag}>`;\n}\n\n/**\n * Extract raw text from a VNode without HTML escaping.\n * Used for <style> and <script> content.\n */\nfunction extractRawText(vnode: any): string {\n if (vnode == null || typeof vnode === \"boolean\") return \"\";\n if (typeof vnode === \"string\" || typeof vnode === \"number\") return String(vnode);\n if (Array.isArray(vnode)) return vnode.map(extractRawText).join(\"\");\n if (typeof vnode === \"object\" && \"type\" in vnode) {\n if (vnode.type === \"#text\") return String(vnode.props?.nodeValue ?? \"\");\n if (vnode.type === \"#signal\") return (vnode.children || []).map(extractRawText).join(\"\");\n // Nested elements inside style/script (rare) - render normally\n return renderDocumentVNode(vnode);\n }\n return \"\";\n}\n\n/**\n * Render attributes\n */\nfunction renderAttributes(props: Record<string, any>): string {\n const attrs: string[] = [];\n\n for (const [key, value] of Object.entries(props)) {\n if (key === \"children\" || key === \"key\" || key === \"ref\" || key === \"dangerouslySetInnerHTML\") {\n continue;\n }\n\n if (value == null || value === false) {\n continue;\n }\n\n // Boolean attributes\n if (value === true) {\n attrs.push(key);\n continue;\n }\n\n // Map React/JSX attribute names to HTML\n const attrName =\n key === \"className\"\n ? \"class\"\n : key === \"htmlFor\"\n ? \"for\"\n : key === \"charSet\"\n ? \"charset\"\n : key === \"crossOrigin\"\n ? \"crossorigin\"\n : key === \"httpEquiv\"\n ? \"http-equiv\"\n : key;\n\n attrs.push(`${attrName}=\"${escapeHTML(String(value))}\"`);\n }\n\n return attrs.length > 0 ? \" \" + attrs.join(\" \") : \"\";\n}\n\n/**\n * Escape HTML special characters\n */\nfunction escapeHTML(str: string): string {\n return str\n .replace(/&/g, \"&amp;\")\n .replace(/</g, \"&lt;\")\n .replace(/>/g, \"&gt;\")\n .replace(/\"/g, \"&quot;\")\n .replace(/'/g, \"&#39;\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,MAAa,mBAAqC,EAAE,UAAU,SAAS,KAAK,YAC1E,qBAAC;CAAK,MAAK;YACT,qBAAC;EACC,oBAAC,UAAK,SAAQ,UAAU;EACxB,oBAAC;GAAK,MAAK;GAAW,SAAQ;IAA0C;EACvE,SAAS,oBAAC,qBAAO,QAAc;EAC/B,IAAI,KAAK,SACR,oBAAC;GAAgB,KAAI;GAAmB;KAA7B,KAAqC,CAChD;KACG,EACP,qBAAC,qBACE,UACA,WACI;EACF;;;;;;;;AAUT,SAAgB,eAAe,eAA4B;AAMzD,QAAO,oBADM,oBAAoB,cAAc;;;;;;AAQjD,SAAS,oBAAoB,OAAoB;AAC/C,KAAI,SAAS,KACX,QAAO;AAGT,KAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU;EAC1D,MAAM,MAAM,OAAO,MAAM;AAEzB,MAAI,IAAI,WAAW,IAAI,IAAI,IAAI,SAAS,KAAK,CAC3C,QAAO;AAET,SAAO,WAAW,IAAI;;AAGxB,KAAI,OAAO,UAAU,UACnB,QAAO;AAGT,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,MAAM,KAAK,UAAU,oBAAoB,MAAM,CAAC,CAAC,KAAK,GAAG;AAGlE,KAAI,OAAO,UAAU,YAAY,EAAE,UAAU,OAC3C,QAAO;CAGT,MAAM,EAAE,MAAM,OAAO,aAAa;AAGlC,KAAI,OAAO,yBAAyB,OAClC,QAAO,MAAM,wBAAwB;AAIvC,KAAI,SAAS,SACX,SAAQ,YAAY,EAAE,EAAE,KAAK,UAAe,oBAAoB,MAAM,CAAC,CAA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AI,MAAM,SAAS,UAAW,SAAQ,MAAM,YAAY,EAAE,EAAE,IAAI,eAAe,CAAC,KAAK,GAAG;AAExF,SAAO,oBAAoB,MAAM;;AAEnC,QAAO;;;;;AAMT,SAAS,iBAAiB,OAAoC;CAC5D,MAAM,QAAkB,EAAE;AAE1B,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,EAAE;AAChD,MAAI,QAAQ,cAAc,QAAQ,SAAS,QAAQ,SAAS,QAAQ,0BAClE;AAGF,MAAI,SAAS,QAAQ,UAAU,MAC7B;AAIF,MAAI,UAAU,MAAM;AAClB,SAAM,KAAK,IAAI;AACf;;EAIF,MAAM,WACJ,QAAQ,cACJ,UACA,QAAQ,YACN,QACA,QAAQ,YACN,YACA,QAAQ,gBACN,gBACA,QAAQ,cACN,eACA;AAEd,QAAM,KAAK,GAAG,SAAS,IAAI,WAAW,OAAO,MAAM,CAAC,CAAC,GAAG;;AAG1D,QAAO,MAAM,SAAS,IAAI,MAAM,MAAM,KAAK,IAAI,GAAG;;;;;AAMpD,SAAS,WAAW,KAAqB;AACvC,QAAO,IACJ,QAAQ,MAAM,QAAQ,CACtB,QAAQ,MAAM,OAAO,CACrB,QAAQ,MAAM,OAAO,CACrB,QAAQ,MAAM,SAAS,CACvB,QAAQ,MAAM,QAAQ"}
@@ -1,5 +1,5 @@
1
- import "../src-DW3tIczg.mjs";
2
- import { _ as createTextNode, a as setAppStyleTarget, b as replaceNode, c as PortalComponent, d as setProperty, f as setRef, g as createElement, h as createComment, i as getStyleTarget, l as createPortal, m as appendChild, n as AppStyleAnchor, o as setComponentStyleTarget, p as setSignalProperty, r as ComponentStyleAnchor, s as ForwardComponent, t as Native, u as render, v as insertBefore, x as setText, y as removeChild } from "../src-BqX3sryB.mjs";
3
- import "../src-Ds9vl42d.mjs";
1
+ import "../src-Cv4rRVzv.mjs";
2
+ import { _ as createTextNode, a as setAppStyleTarget, b as replaceNode, c as PortalComponent, d as setProperty, f as setRef, g as createElement, h as createComment, i as getStyleTarget, l as createPortal, m as appendChild, n as AppStyleAnchor, o as setComponentStyleTarget, p as setSignalProperty, r as ComponentStyleAnchor, s as ForwardComponent, t as Native, u as render, v as insertBefore, x as setText, y as removeChild } from "../src-C_aFsFJ3.mjs";
3
+ import "../src-DV9uwtE5.mjs";
4
4
 
5
5
  export { AppStyleAnchor, ComponentStyleAnchor, ForwardComponent, Native, PortalComponent, appendChild, createComment, createElement, createPortal, createTextNode, getStyleTarget, insertBefore, removeChild, render, replaceNode, setAppStyleTarget, setComponentStyleTarget, setProperty, setRef, setSignalProperty, setText };
@@ -1,6 +1,6 @@
1
1
  import { o as Forward, s as Fragment } from "../types-C83YtOen.mjs";
2
2
  import { n as jsxs, t as jsx } from "../jsx-CFnuxPMI.mjs";
3
- import { C as ThHTMLAttributes, S as TextareaHTMLAttributes, _ as ScriptHTMLAttributes, a as ClassValue, b as TableHTMLAttributes, c as IframeHTMLAttributes, d as JSX, f as LabelHTMLAttributes, g as SVGAttributes, h as OptionHTMLAttributes, i as CanvasHTMLAttributes, l as ImgHTMLAttributes, m as MetaHTMLAttributes, n as AudioHTMLAttributes, o as FormHTMLAttributes, p as LinkHTMLAttributes, r as ButtonHTMLAttributes, s as HTMLAttributes, t as AnchorHTMLAttributes, u as InputHTMLAttributes, v as SelectHTMLAttributes, w as VideoHTMLAttributes, x as TdHTMLAttributes, y as StyleHTMLAttributes } from "../jsx-runtime-tIuFmhTh.mjs";
3
+ import { C as ThHTMLAttributes, S as TextareaHTMLAttributes, _ as ScriptHTMLAttributes, a as ClassValue, b as TableHTMLAttributes, c as IframeHTMLAttributes, d as JSX, f as LabelHTMLAttributes, g as SVGAttributes, h as OptionHTMLAttributes, i as CanvasHTMLAttributes, l as ImgHTMLAttributes, m as MetaHTMLAttributes, n as AudioHTMLAttributes, o as FormHTMLAttributes, p as LinkHTMLAttributes, r as ButtonHTMLAttributes, s as HTMLAttributes, t as AnchorHTMLAttributes, u as InputHTMLAttributes, v as SelectHTMLAttributes, w as VideoHTMLAttributes, x as TdHTMLAttributes, y as StyleHTMLAttributes } from "../jsx-runtime-C-TtSL51.mjs";
4
4
 
5
5
  //#region ../dom/src/jsx-dev-runtime.d.ts
6
6
  declare function jsxDEV(type: any, props: any, key?: any, _isStaticChildren?: boolean, _source?: any, _self?: any): any;
@@ -1,5 +1,5 @@
1
- import { f as ISLAND_MARKER, h, v as Fragment } from "../src-DW3tIczg.mjs";
2
- import "../jsx-runtime-D9ZNjMJ2.mjs";
1
+ import { f as ISLAND_MARKER, h, v as Fragment } from "../src-Cv4rRVzv.mjs";
2
+ import "../jsx-runtime-BFs1c0xz.mjs";
3
3
 
4
4
  //#region ../dom/src/jsx-dev-runtime.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
1
  import { o as Forward, s as Fragment } from "../types-C83YtOen.mjs";
2
2
  import { n as jsxs, t as jsx } from "../jsx-CFnuxPMI.mjs";
3
- import { C as ThHTMLAttributes, S as TextareaHTMLAttributes, _ as ScriptHTMLAttributes, a as ClassValue, b as TableHTMLAttributes, c as IframeHTMLAttributes, d as JSX, f as LabelHTMLAttributes, g as SVGAttributes, h as OptionHTMLAttributes, i as CanvasHTMLAttributes, l as ImgHTMLAttributes, m as MetaHTMLAttributes, n as AudioHTMLAttributes, o as FormHTMLAttributes, p as LinkHTMLAttributes, r as ButtonHTMLAttributes, s as HTMLAttributes, t as AnchorHTMLAttributes, u as InputHTMLAttributes, v as SelectHTMLAttributes, w as VideoHTMLAttributes, x as TdHTMLAttributes, y as StyleHTMLAttributes } from "../jsx-runtime-tIuFmhTh.mjs";
3
+ import { C as ThHTMLAttributes, S as TextareaHTMLAttributes, _ as ScriptHTMLAttributes, a as ClassValue, b as TableHTMLAttributes, c as IframeHTMLAttributes, d as JSX, f as LabelHTMLAttributes, g as SVGAttributes, h as OptionHTMLAttributes, i as CanvasHTMLAttributes, l as ImgHTMLAttributes, m as MetaHTMLAttributes, n as AudioHTMLAttributes, o as FormHTMLAttributes, p as LinkHTMLAttributes, r as ButtonHTMLAttributes, s as HTMLAttributes, t as AnchorHTMLAttributes, u as InputHTMLAttributes, v as SelectHTMLAttributes, w as VideoHTMLAttributes, x as TdHTMLAttributes, y as StyleHTMLAttributes } from "../jsx-runtime-C-TtSL51.mjs";
4
4
  export { AnchorHTMLAttributes, AudioHTMLAttributes, ButtonHTMLAttributes, CanvasHTMLAttributes, ClassValue, FormHTMLAttributes, Forward, Fragment, HTMLAttributes, IframeHTMLAttributes, ImgHTMLAttributes, InputHTMLAttributes, JSX, LabelHTMLAttributes, LinkHTMLAttributes, MetaHTMLAttributes, OptionHTMLAttributes, SVGAttributes, ScriptHTMLAttributes, SelectHTMLAttributes, StyleHTMLAttributes, TableHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes, VideoHTMLAttributes, jsx, jsxs };
@@ -1,4 +1,4 @@
1
- import { _ as Forward, a as jsxs, i as jsx, v as Fragment } from "../src-DW3tIczg.mjs";
2
- import "../jsx-runtime-D9ZNjMJ2.mjs";
1
+ import { _ as Forward, a as jsxs, i as jsx, v as Fragment } from "../src-Cv4rRVzv.mjs";
2
+ import "../jsx-runtime-BFs1c0xz.mjs";
3
3
 
4
4
  export { Forward, Fragment, jsx, jsxs };
@@ -1,5 +1,5 @@
1
1
  import { d as VNode } from "./types-C83YtOen.mjs";
2
- import { _ as SSGPlugin } from "./types-BmDIxXiP.mjs";
2
+ import { _ as SSGPlugin } from "./types-BaS-zTDX.mjs";
3
3
 
4
4
  //#region ../ssg/src/plugins/lucide/component.d.ts
5
5
  interface IconProps {
@@ -78,4 +78,4 @@ interface LucidePluginOptions {
78
78
  declare function lucide(options?: LucidePluginOptions): SSGPlugin;
79
79
  //#endregion
80
80
  export { IconProps as i, lucide as n, Icon as r, LucidePluginOptions as t };
81
- //# sourceMappingURL=index-D_FIlSk3.d.mts.map
81
+ //# sourceMappingURL=index-CmxkYOtR.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-D_FIlSk3.d.mts","names":[],"sources":["../../ssg/src/plugins/lucide/component.tsx","../../ssg/src/plugins/lucide/index.ts"],"mappings":";;;;UAuCiB,SAAA;;EAEf,IAAA;EAFF;EAIE,IAAA;;EAEA,KAAA;;EAEA,WAAA;;EAEA,KAAA;AAAA;;;AA8BF;;;;;;;;;;;;iBAAgB,IAAA,CAAA;EACd,IAAA;EACA,IAAA;EACA,KAAA;EACA,WAAA;EACA,KAAA,EAAO;AAAA,GACN,SAAA,GAAY,KAAA;;;UC/EE,mBAAA;EDiCA;EC/Bf,IAAA;ED+Be;EC7Bf,KAAA;;EAEA,WAAA;AAAA;;;;ADmEF;;;;;;;;;;;;;;;;;;;;;;;;;;;iBClCgB,MAAA,CAAO,OAAA,GAAS,mBAAA,GAA2B,SAAA"}
1
+ {"version":3,"file":"index-CmxkYOtR.d.mts","names":[],"sources":["../../ssg/src/plugins/lucide/component.tsx","../../ssg/src/plugins/lucide/index.ts"],"mappings":";;;;UAuCiB,SAAA;;EAEf,IAAA;EAFF;EAIE,IAAA;;EAEA,KAAA;;EAEA,WAAA;;EAEA,KAAA;AAAA;;;AA8BF;;;;;;;;;;;;iBAAgB,IAAA,CAAA;EACd,IAAA;EACA,IAAA;EACA,KAAA;EACA,WAAA;EACA,KAAA,EAAO;AAAA,GACN,SAAA,GAAY,KAAA;;;UC/EE,mBAAA;EDiCA;EC/Bf,IAAA;ED+Be;EC7Bf,KAAA;;EAEA,WAAA;AAAA;;;;ADmEF;;;;;;;;;;;;;;;;;;;;;;;;;;;iBClCgB,MAAA,CAAO,OAAA,GAAS,mBAAA,GAA2B,SAAA"}
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { n as batch, t as signal } from "./signal-BN8vHXDb.mjs";
2
- import { n as memo, t as computed } from "./computed-BidG06Lt.mjs";
3
- import { n as unwrap, t as isSignal } from "./utils-DbTAs943.mjs";
1
+ import { n as batch, t as signal } from "./signal-4PgGfydw.mjs";
2
+ import { n as memo, t as computed } from "./computed-BpjqvQu1.mjs";
3
+ import { n as unwrap, t as isSignal } from "./utils-BrGmTgfG.mjs";
4
4
  import "./signal/index.mjs";
5
- import { _ as Forward, a as jsxs, c as when, d as createComponentAPI, f as ISLAND_MARKER, g as isVNode, h, i as jsx, l as Context, m as createTextVNode, n as isAsyncIterator, o as resource, p as createFragment, r as isPromise, s as stream, t as createRenderer, u as context, v as Fragment, y as Portal } from "./src-DW3tIczg.mjs";
5
+ import { _ as Forward, a as jsxs, c as when, d as createComponentAPI, f as ISLAND_MARKER, g as isVNode, h, i as jsx, l as Context, m as createTextVNode, n as isAsyncIterator, o as resource, p as createFragment, r as isPromise, s as stream, t as createRenderer, u as context, v as Fragment, y as Portal } from "./src-Cv4rRVzv.mjs";
6
6
 
7
7
  export { Context, Forward, Fragment, ISLAND_MARKER, Portal, batch, computed, context, createComponentAPI, createFragment, createRenderer, createTextVNode, h, isAsyncIterator, isPromise, isSignal, isVNode, jsx, jsxs, memo, resource, signal, stream, unwrap, when };
@@ -6,4 +6,4 @@
6
6
 
7
7
  //#endregion
8
8
  export { };
9
- //# sourceMappingURL=jsx-runtime-D9ZNjMJ2.mjs.map
9
+ //# sourceMappingURL=jsx-runtime-BFs1c0xz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-runtime-BFs1c0xz.mjs","names":[],"sources":["../../dom/src/jsx-runtime.ts"],"sourcesContent":["/**\n * JSX automatic runtime for DOM (production)\n * Use with: @jsxImportSource @semajsx/dom\n */\n\nimport { Forward, Fragment, jsx, jsxs } from \"@semajsx/core\";\nimport type { ComponentAPI, JSXNode, Ref, VNode, WithKey, WithSignals } from \"@semajsx/core\";\nimport type { Signal } from \"@semajsx/signal\";\nimport type { StyleToken, ClassRef } from \"@semajsx/style\";\n\nexport { jsx, jsxs, Forward, Fragment };\n\n/**\n * Class value type - supports strings, StyleTokens, ClassRefs, arrays, and conditionals\n */\nexport type ClassValue = string | StyleToken | ClassRef | ClassValue[] | false | null | undefined;\n\n/**\n * HTML attribute types (base definitions without Signal support)\n */\ninterface BaseHTMLAttributes<T = Element> {\n // Ref - special prop for element references\n ref?: Ref<T>;\n\n // Standard attributes\n id?: string;\n className?: ClassValue;\n class?: ClassValue;\n style?: string | Record<string, string | number>;\n title?: string;\n lang?: string;\n dir?: \"ltr\" | \"rtl\" | \"auto\";\n hidden?: boolean;\n tabIndex?: number;\n accessKey?: string;\n contentEditable?: boolean | \"true\" | \"false\";\n draggable?: boolean;\n spellcheck?: boolean;\n\n // Special React-style props\n dangerouslySetInnerHTML?: { __html: string };\n\n // ARIA attributes\n role?: string;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n \"aria-describedby\"?: string;\n \"aria-hidden\"?: boolean | \"true\" | \"false\";\n \"aria-expanded\"?: boolean | \"true\" | \"false\";\n \"aria-selected\"?: boolean | \"true\" | \"false\";\n \"aria-checked\"?: boolean | \"true\" | \"false\" | \"mixed\";\n \"aria-disabled\"?: boolean | \"true\" | \"false\";\n \"aria-readonly\"?: boolean | \"true\" | \"false\";\n \"aria-required\"?: boolean | \"true\" | \"false\";\n \"aria-invalid\"?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\";\n \"aria-pressed\"?: boolean | \"true\" | \"false\" | \"mixed\";\n \"aria-current\"?: boolean | \"true\" | \"false\" | \"page\" | \"step\" | \"location\" | \"date\" | \"time\";\n\n // Event handlers (React-style camelCase)\n onClick?: (event: MouseEvent) => void;\n onDblClick?: (event: MouseEvent) => void;\n onMouseDown?: (event: MouseEvent) => void;\n onMouseUp?: (event: MouseEvent) => void;\n onMouseEnter?: (event: MouseEvent) => void;\n onMouseLeave?: (event: MouseEvent) => void;\n onMouseMove?: (event: MouseEvent) => void;\n onMouseOver?: (event: MouseEvent) => void;\n onMouseOut?: (event: MouseEvent) => void;\n onContextMenu?: (event: MouseEvent) => void;\n\n onKeyDown?: (event: KeyboardEvent) => void;\n onKeyUp?: (event: KeyboardEvent) => void;\n onKeyPress?: (event: KeyboardEvent) => void;\n\n onFocus?: (event: FocusEvent) => void;\n onBlur?: (event: FocusEvent) => void;\n\n onChange?: (event: Event) => void;\n onInput?: (event: Event) => void;\n onSubmit?: (event: Event) => void;\n\n onScroll?: (event: Event) => void;\n onWheel?: (event: WheelEvent) => void;\n\n onTouchStart?: (event: TouchEvent) => void;\n onTouchMove?: (event: TouchEvent) => void;\n onTouchEnd?: (event: TouchEvent) => void;\n onTouchCancel?: (event: TouchEvent) => void;\n\n onDragStart?: (event: DragEvent) => void;\n onDrag?: (event: DragEvent) => void;\n onDragEnd?: (event: DragEvent) => void;\n onDragEnter?: (event: DragEvent) => void;\n onDragLeave?: (event: DragEvent) => void;\n onDragOver?: (event: DragEvent) => void;\n onDrop?: (event: DragEvent) => void;\n\n // Event handlers (native DOM lowercase)\n onclick?: (event: MouseEvent) => void;\n ondblclick?: (event: MouseEvent) => void;\n onmousedown?: (event: MouseEvent) => void;\n onmouseup?: (event: MouseEvent) => void;\n onmouseenter?: (event: MouseEvent) => void;\n onmouseleave?: (event: MouseEvent) => void;\n onmousemove?: (event: MouseEvent) => void;\n onmouseover?: (event: MouseEvent) => void;\n onmouseout?: (event: MouseEvent) => void;\n oncontextmenu?: (event: MouseEvent) => void;\n\n onkeydown?: (event: KeyboardEvent) => void;\n onkeyup?: (event: KeyboardEvent) => void;\n onkeypress?: (event: KeyboardEvent) => void;\n\n onfocus?: (event: FocusEvent) => void;\n onblur?: (event: FocusEvent) => void;\n\n onchange?: (event: Event) => void;\n oninput?: (event: Event) => void;\n onsubmit?: (event: Event) => void;\n\n onscroll?: (event: Event) => void;\n onwheel?: (event: WheelEvent) => void;\n\n ontouchstart?: (event: TouchEvent) => void;\n ontouchmove?: (event: TouchEvent) => void;\n ontouchend?: (event: TouchEvent) => void;\n ontouchcancel?: (event: TouchEvent) => void;\n\n ondragstart?: (event: DragEvent) => void;\n ondrag?: (event: DragEvent) => void;\n ondragend?: (event: DragEvent) => void;\n ondragenter?: (event: DragEvent) => void;\n ondragleave?: (event: DragEvent) => void;\n ondragover?: (event: DragEvent) => void;\n ondrop?: (event: DragEvent) => void;\n\n // Children\n children?: JSXNode;\n}\n\n/**\n * HTML attributes with Signal support\n * All non-function properties can accept Signal values\n */\nexport type HTMLAttributes<T = Element> = WithKey<WithSignals<BaseHTMLAttributes<T>>> & {\n // Data attributes support both plain values and Signals\n [dataAttribute: `data-${string}`]:\n | string\n | number\n | boolean\n | Signal<string | number | boolean>\n | undefined;\n};\n\ninterface BaseAnchorHTMLAttributes extends BaseHTMLAttributes<HTMLAnchorElement> {\n href?: string;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\";\n rel?: string;\n download?: string;\n ping?: string;\n referrerPolicy?:\n | \"no-referrer\"\n | \"no-referrer-when-downgrade\"\n | \"origin\"\n | \"origin-when-cross-origin\"\n | \"same-origin\"\n | \"strict-origin\"\n | \"strict-origin-when-cross-origin\"\n | \"unsafe-url\";\n}\n\nexport type AnchorHTMLAttributes = WithKey<WithSignals<BaseAnchorHTMLAttributes>>;\n\ninterface BaseButtonHTMLAttributes extends BaseHTMLAttributes<HTMLButtonElement> {\n disabled?: boolean;\n type?: \"button\" | \"submit\" | \"reset\";\n value?: string;\n name?: string;\n form?: string;\n formAction?: string;\n formEnctype?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n}\n\nexport type ButtonHTMLAttributes = WithKey<WithSignals<BaseButtonHTMLAttributes>>;\n\ninterface BaseInputHTMLAttributes extends BaseHTMLAttributes<HTMLInputElement> {\n accept?: string;\n alt?: string;\n autoComplete?: string;\n autoFocus?: boolean;\n capture?: boolean | \"user\" | \"environment\";\n checked?: boolean;\n defaultChecked?: boolean;\n defaultValue?: string | number;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEnctype?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n max?: number | string;\n maxLength?: number;\n min?: number | string;\n minLength?: number;\n multiple?: boolean;\n name?: string;\n pattern?: string;\n placeholder?: string;\n readOnly?: boolean;\n required?: boolean;\n size?: number;\n src?: string;\n step?: number | string;\n type?: string;\n value?: string | number;\n}\n\nexport type InputHTMLAttributes = WithKey<WithSignals<BaseInputHTMLAttributes>>;\n\ninterface BaseTextareaHTMLAttributes extends BaseHTMLAttributes<HTMLTextAreaElement> {\n autoComplete?: string;\n autoFocus?: boolean;\n cols?: number;\n disabled?: boolean;\n form?: string;\n maxLength?: number;\n minLength?: number;\n name?: string;\n placeholder?: string;\n readOnly?: boolean;\n required?: boolean;\n rows?: number;\n value?: string;\n wrap?: \"hard\" | \"soft\" | \"off\";\n}\n\nexport type TextareaHTMLAttributes = WithKey<WithSignals<BaseTextareaHTMLAttributes>>;\n\ninterface BaseSelectHTMLAttributes extends BaseHTMLAttributes<HTMLSelectElement> {\n autoComplete?: string;\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n multiple?: boolean;\n name?: string;\n required?: boolean;\n size?: number;\n value?: string | string[];\n}\n\nexport type SelectHTMLAttributes = WithKey<WithSignals<BaseSelectHTMLAttributes>>;\n\ninterface BaseOptionHTMLAttributes extends BaseHTMLAttributes<HTMLOptionElement> {\n disabled?: boolean;\n label?: string;\n selected?: boolean;\n value?: string | number;\n}\n\nexport type OptionHTMLAttributes = WithKey<WithSignals<BaseOptionHTMLAttributes>>;\n\ninterface BaseLabelHTMLAttributes extends BaseHTMLAttributes<HTMLLabelElement> {\n for?: string;\n htmlFor?: string;\n form?: string;\n}\n\nexport type LabelHTMLAttributes = WithKey<WithSignals<BaseLabelHTMLAttributes>>;\n\ninterface BaseFormHTMLAttributes extends BaseHTMLAttributes<HTMLFormElement> {\n acceptCharset?: string;\n action?: string;\n autoComplete?: string;\n enctype?: string;\n method?: \"get\" | \"post\" | \"dialog\";\n name?: string;\n noValidate?: boolean;\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\";\n}\n\nexport type FormHTMLAttributes = WithKey<WithSignals<BaseFormHTMLAttributes>>;\n\ninterface BaseImgHTMLAttributes extends BaseHTMLAttributes<HTMLImageElement> {\n alt?: string;\n crossOrigin?: \"anonymous\" | \"use-credentials\" | \"\";\n decoding?: \"async\" | \"auto\" | \"sync\";\n height?: number | string;\n loading?: \"eager\" | \"lazy\";\n referrerPolicy?: string;\n sizes?: string;\n src?: string;\n srcSet?: string;\n useMap?: string;\n width?: number | string;\n}\n\nexport type ImgHTMLAttributes = WithKey<WithSignals<BaseImgHTMLAttributes>>;\n\ninterface BaseVideoHTMLAttributes extends BaseHTMLAttributes<HTMLVideoElement> {\n autoPlay?: boolean;\n controls?: boolean;\n crossOrigin?: \"anonymous\" | \"use-credentials\" | \"\";\n height?: number | string;\n loop?: boolean;\n muted?: boolean;\n playsInline?: boolean;\n poster?: string;\n preload?: \"none\" | \"metadata\" | \"auto\" | \"\";\n src?: string;\n width?: number | string;\n}\n\nexport type VideoHTMLAttributes = WithKey<WithSignals<BaseVideoHTMLAttributes>>;\n\ninterface BaseAudioHTMLAttributes extends BaseHTMLAttributes<HTMLAudioElement> {\n autoPlay?: boolean;\n controls?: boolean;\n crossOrigin?: \"anonymous\" | \"use-credentials\" | \"\";\n loop?: boolean;\n muted?: boolean;\n preload?: \"none\" | \"metadata\" | \"auto\" | \"\";\n src?: string;\n}\n\nexport type AudioHTMLAttributes = WithKey<WithSignals<BaseAudioHTMLAttributes>>;\n\ninterface BaseCanvasHTMLAttributes extends BaseHTMLAttributes<HTMLCanvasElement> {\n height?: number | string;\n width?: number | string;\n}\n\nexport type CanvasHTMLAttributes = WithKey<WithSignals<BaseCanvasHTMLAttributes>>;\n\ninterface BaseIframeHTMLAttributes extends BaseHTMLAttributes<HTMLIFrameElement> {\n allow?: string;\n allowFullScreen?: boolean;\n height?: number | string;\n loading?: \"eager\" | \"lazy\";\n name?: string;\n referrerPolicy?: string;\n sandbox?: string;\n src?: string;\n srcDoc?: string;\n width?: number | string;\n}\n\nexport type IframeHTMLAttributes = WithKey<WithSignals<BaseIframeHTMLAttributes>>;\n\ninterface BaseTableHTMLAttributes extends BaseHTMLAttributes<HTMLTableElement> {\n cellPadding?: number | string;\n cellSpacing?: number | string;\n}\n\nexport type TableHTMLAttributes = WithKey<WithSignals<BaseTableHTMLAttributes>>;\n\ninterface BaseTdHTMLAttributes extends BaseHTMLAttributes<HTMLTableCellElement> {\n colSpan?: number;\n headers?: string;\n rowSpan?: number;\n}\n\nexport type TdHTMLAttributes = WithKey<WithSignals<BaseTdHTMLAttributes>>;\n\ninterface BaseThHTMLAttributes extends BaseHTMLAttributes<HTMLTableCellElement> {\n abbr?: string;\n colSpan?: number;\n headers?: string;\n rowSpan?: number;\n scope?: \"col\" | \"row\" | \"colgroup\" | \"rowgroup\";\n}\n\nexport type ThHTMLAttributes = WithKey<WithSignals<BaseThHTMLAttributes>>;\n\ninterface BaseStyleHTMLAttributes extends BaseHTMLAttributes<HTMLStyleElement> {\n media?: string;\n scoped?: boolean;\n type?: string;\n}\n\nexport type StyleHTMLAttributes = WithKey<WithSignals<BaseStyleHTMLAttributes>>;\n\ninterface BaseScriptHTMLAttributes extends BaseHTMLAttributes<HTMLScriptElement> {\n async?: boolean;\n crossOrigin?: \"anonymous\" | \"use-credentials\" | \"\";\n defer?: boolean;\n integrity?: string;\n noModule?: boolean;\n referrerPolicy?: string;\n src?: string;\n type?: string;\n}\n\nexport type ScriptHTMLAttributes = WithKey<WithSignals<BaseScriptHTMLAttributes>>;\n\ninterface BaseLinkHTMLAttributes extends BaseHTMLAttributes<HTMLLinkElement> {\n as?: string;\n crossOrigin?: \"anonymous\" | \"use-credentials\" | \"\";\n href?: string;\n hrefLang?: string;\n integrity?: string;\n media?: string;\n referrerPolicy?: string;\n rel?: string;\n sizes?: string;\n type?: string;\n}\n\nexport type LinkHTMLAttributes = WithKey<WithSignals<BaseLinkHTMLAttributes>>;\n\ninterface BaseMetaHTMLAttributes extends BaseHTMLAttributes<HTMLMetaElement> {\n charSet?: string;\n content?: string;\n httpEquiv?: string;\n name?: string;\n}\n\nexport type MetaHTMLAttributes = WithKey<WithSignals<BaseMetaHTMLAttributes>>;\n\n/**\n * SVG element attributes — permissive to cover SVG's large attribute set\n */\nexport type SVGAttributes = HTMLAttributes<SVGElement> & {\n [key: string]: unknown;\n};\n\n/**\n * JSX namespace for DOM elements\n */\nexport namespace JSX {\n // JSX factory returns sync VNodes\n export type Element = VNode;\n\n export type ElementType =\n | keyof IntrinsicElements\n | ((props: any) => JSXNode)\n | ((props: any, ctx: ComponentAPI) => JSXNode);\n\n export interface ElementChildrenAttribute {\n children: {};\n }\n\n export interface IntrinsicAttributes {\n key?: string | number;\n }\n\n export interface IntrinsicElements {\n // Document structure\n html: HTMLAttributes<HTMLHtmlElement>;\n head: HTMLAttributes<HTMLHeadElement>;\n body: HTMLAttributes<HTMLBodyElement>;\n title: HTMLAttributes<HTMLTitleElement>;\n meta: MetaHTMLAttributes;\n link: LinkHTMLAttributes;\n style: StyleHTMLAttributes;\n script: ScriptHTMLAttributes;\n\n // Content sectioning\n header: HTMLAttributes<HTMLElement>;\n footer: HTMLAttributes<HTMLElement>;\n main: HTMLAttributes<HTMLElement>;\n nav: HTMLAttributes<HTMLElement>;\n section: HTMLAttributes<HTMLElement>;\n article: HTMLAttributes<HTMLElement>;\n aside: HTMLAttributes<HTMLElement>;\n h1: HTMLAttributes<HTMLHeadingElement>;\n h2: HTMLAttributes<HTMLHeadingElement>;\n h3: HTMLAttributes<HTMLHeadingElement>;\n h4: HTMLAttributes<HTMLHeadingElement>;\n h5: HTMLAttributes<HTMLHeadingElement>;\n h6: HTMLAttributes<HTMLHeadingElement>;\n\n // Text content\n div: HTMLAttributes<HTMLDivElement>;\n p: HTMLAttributes<HTMLParagraphElement>;\n span: HTMLAttributes<HTMLSpanElement>;\n pre: HTMLAttributes<HTMLPreElement>;\n code: HTMLAttributes<HTMLElement>;\n blockquote: HTMLAttributes<HTMLQuoteElement>;\n hr: HTMLAttributes<HTMLHRElement>;\n br: HTMLAttributes<HTMLBRElement>;\n\n // Lists\n ul: HTMLAttributes<HTMLUListElement>;\n ol: HTMLAttributes<HTMLOListElement>;\n li: HTMLAttributes<HTMLLIElement>;\n dl: HTMLAttributes<HTMLDListElement>;\n dt: HTMLAttributes<HTMLElement>;\n dd: HTMLAttributes<HTMLElement>;\n\n // Inline text semantics\n a: AnchorHTMLAttributes;\n strong: HTMLAttributes<HTMLElement>;\n em: HTMLAttributes<HTMLElement>;\n b: HTMLAttributes<HTMLElement>;\n i: HTMLAttributes<HTMLElement>;\n u: HTMLAttributes<HTMLElement>;\n s: HTMLAttributes<HTMLElement>;\n small: HTMLAttributes<HTMLElement>;\n mark: HTMLAttributes<HTMLElement>;\n abbr: HTMLAttributes<HTMLElement>;\n cite: HTMLAttributes<HTMLElement>;\n q: HTMLAttributes<HTMLQuoteElement>;\n kbd: HTMLAttributes<HTMLElement>;\n sub: HTMLAttributes<HTMLElement>;\n sup: HTMLAttributes<HTMLElement>;\n time: HTMLAttributes<HTMLTimeElement>;\n\n // Forms\n form: FormHTMLAttributes;\n input: InputHTMLAttributes;\n textarea: TextareaHTMLAttributes;\n button: ButtonHTMLAttributes;\n select: SelectHTMLAttributes;\n option: OptionHTMLAttributes;\n optgroup: HTMLAttributes<HTMLOptGroupElement>;\n label: LabelHTMLAttributes;\n fieldset: HTMLAttributes<HTMLFieldSetElement>;\n legend: HTMLAttributes<HTMLLegendElement>;\n\n // Tables\n table: TableHTMLAttributes;\n thead: HTMLAttributes<HTMLTableSectionElement>;\n tbody: HTMLAttributes<HTMLTableSectionElement>;\n tfoot: HTMLAttributes<HTMLTableSectionElement>;\n tr: HTMLAttributes<HTMLTableRowElement>;\n th: ThHTMLAttributes;\n td: TdHTMLAttributes;\n caption: HTMLAttributes<HTMLTableCaptionElement>;\n colgroup: HTMLAttributes<HTMLTableColElement>;\n col: HTMLAttributes<HTMLTableColElement>;\n\n // Media\n img: ImgHTMLAttributes;\n video: VideoHTMLAttributes;\n audio: AudioHTMLAttributes;\n source: HTMLAttributes<HTMLSourceElement>;\n track: HTMLAttributes<HTMLTrackElement>;\n canvas: CanvasHTMLAttributes;\n svg: SVGAttributes;\n\n // SVG child elements\n circle: SVGAttributes;\n clipPath: SVGAttributes;\n defs: SVGAttributes;\n ellipse: SVGAttributes;\n g: SVGAttributes;\n line: SVGAttributes;\n linearGradient: SVGAttributes;\n mask: SVGAttributes;\n path: SVGAttributes;\n pattern: SVGAttributes;\n foreignObject: SVGAttributes;\n marker: SVGAttributes;\n polygon: SVGAttributes;\n polyline: SVGAttributes;\n radialGradient: SVGAttributes;\n rect: SVGAttributes;\n stop: SVGAttributes;\n symbol: SVGAttributes;\n text: SVGAttributes;\n tspan: SVGAttributes;\n use: SVGAttributes;\n\n // Embedded content\n iframe: IframeHTMLAttributes;\n embed: HTMLAttributes<HTMLEmbedElement>;\n object: HTMLAttributes<HTMLObjectElement>;\n param: HTMLAttributes<HTMLParamElement>;\n picture: HTMLAttributes<HTMLPictureElement>;\n\n // Interactive elements\n details: HTMLAttributes<HTMLDetailsElement>;\n summary: HTMLAttributes<HTMLElement>;\n dialog: HTMLAttributes<HTMLDialogElement>;\n menu: HTMLAttributes<HTMLMenuElement>;\n\n // Web Components\n slot: HTMLAttributes<HTMLSlotElement>;\n template: HTMLAttributes<HTMLTemplateElement>;\n }\n}\n"],"mappings":""}
@@ -1,12 +1,12 @@
1
1
  import { c as JSXNode, d as VNode, m as WithSignals, n as ComponentAPI, p as WithKey, u as Ref } from "./types-C83YtOen.mjs";
2
2
  import { r as Signal } from "./types-CVPg8ByY.mjs";
3
- import { o as StyleToken } from "./types-ii0bAipe.mjs";
3
+ import { o as StyleToken, t as ClassRef } from "./types-ii0bAipe.mjs";
4
4
 
5
5
  //#region ../dom/src/jsx-runtime.d.ts
6
6
  /**
7
- * Class value type - supports strings, StyleTokens, arrays, and conditionals
7
+ * Class value type - supports strings, StyleTokens, ClassRefs, arrays, and conditionals
8
8
  */
9
- type ClassValue = string | StyleToken | ClassValue[] | false | null | undefined;
9
+ type ClassValue = string | StyleToken | ClassRef | ClassValue[] | false | null | undefined;
10
10
  /**
11
11
  * HTML attribute types (base definitions without Signal support)
12
12
  */
@@ -439,12 +439,17 @@ declare namespace JSX {
439
439
  linearGradient: SVGAttributes;
440
440
  mask: SVGAttributes;
441
441
  path: SVGAttributes;
442
+ pattern: SVGAttributes;
443
+ foreignObject: SVGAttributes;
444
+ marker: SVGAttributes;
442
445
  polygon: SVGAttributes;
443
446
  polyline: SVGAttributes;
444
447
  radialGradient: SVGAttributes;
445
448
  rect: SVGAttributes;
446
449
  stop: SVGAttributes;
450
+ symbol: SVGAttributes;
447
451
  text: SVGAttributes;
452
+ tspan: SVGAttributes;
448
453
  use: SVGAttributes;
449
454
  iframe: IframeHTMLAttributes;
450
455
  embed: HTMLAttributes<HTMLEmbedElement>;
@@ -461,4 +466,4 @@ declare namespace JSX {
461
466
  }
462
467
  //#endregion
463
468
  export { ThHTMLAttributes as C, TextareaHTMLAttributes as S, ScriptHTMLAttributes as _, ClassValue as a, TableHTMLAttributes as b, IframeHTMLAttributes as c, JSX as d, LabelHTMLAttributes as f, SVGAttributes as g, OptionHTMLAttributes as h, CanvasHTMLAttributes as i, ImgHTMLAttributes as l, MetaHTMLAttributes as m, AudioHTMLAttributes as n, FormHTMLAttributes as o, LinkHTMLAttributes as p, ButtonHTMLAttributes as r, HTMLAttributes as s, AnchorHTMLAttributes as t, InputHTMLAttributes as u, SelectHTMLAttributes as v, VideoHTMLAttributes as w, TdHTMLAttributes as x, StyleHTMLAttributes as y };
464
- //# sourceMappingURL=jsx-runtime-tIuFmhTh.d.mts.map
469
+ //# sourceMappingURL=jsx-runtime-C-TtSL51.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-runtime-C-TtSL51.d.mts","names":[],"sources":["../../dom/src/jsx-runtime.ts"],"mappings":";;;;;;;;KAeY,UAAA,YAAsB,UAAA,GAAa,QAAA,GAAW,UAAA;;;;UAKhD,kBAAA,KAAuB,OAAA;EAE/B,GAAA,GAAM,GAAA,CAAI,CAAA;EAGV,EAAA;EACA,SAAA,GAAY,UAAA;EAC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