@atom.io/spa 0.0.10 → 0.0.11

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 (111) hide show
  1. package/README.md +5 -5
  2. package/dist/{BrandMarkScene-CBYk-RJ2.js → BrandMarkScene-BeWazldB.js} +4 -4
  3. package/dist/{BrandMarkScene-CBYk-RJ2.js.map → BrandMarkScene-BeWazldB.js.map} +1 -1
  4. package/dist/astro-application.d.ts +1 -1
  5. package/dist/astro-application.js +1 -1
  6. package/dist/astro-client.d.ts +1 -1
  7. package/dist/astro-client.js +5 -5
  8. package/dist/{astro-context-OdlexHR4.js → astro-context-B9XKrz8c.js} +1 -1
  9. package/dist/{astro-context-OdlexHR4.js.map → astro-context-B9XKrz8c.js.map} +1 -1
  10. package/dist/astro-middleware.js +2 -2
  11. package/dist/{astro-request-DRKvDjsO.js → astro-request-C0eYQlmS.js} +2 -2
  12. package/dist/{astro-request-DRKvDjsO.js.map → astro-request-C0eYQlmS.js.map} +1 -1
  13. package/dist/astro-resumability-client.d.ts +1 -1
  14. package/dist/astro-resumability-client.js +1 -1
  15. package/dist/astro-resumability-server.js +1 -1
  16. package/dist/astro-server.js +4 -4
  17. package/dist/{astro-shared-KxK9OUSj.d.ts → astro-shared-C-iO4PVU.d.ts} +2 -2
  18. package/dist/{astro-shared-KxK9OUSj.d.ts.map → astro-shared-C-iO4PVU.d.ts.map} +1 -1
  19. package/dist/{astro-shared-DBwINQav.js → astro-shared-CwBaV3Xu.js} +2 -2
  20. package/dist/{astro-shared-DBwINQav.js.map → astro-shared-CwBaV3Xu.js.map} +1 -1
  21. package/dist/astro.d.ts +2 -2
  22. package/dist/astro.js +1 -1
  23. package/dist/brand-model.js +4 -4
  24. package/dist/brand.d.ts +1 -1
  25. package/dist/brand.js +3 -3
  26. package/dist/{capabilities-ChgSs6bp.d.ts → capabilities-BNnXgvo5.d.ts} +3 -3
  27. package/dist/{capabilities-ChgSs6bp.d.ts.map → capabilities-BNnXgvo5.d.ts.map} +1 -1
  28. package/dist/{core-DD2giR6E.js → core-N07x1OaR.js} +1 -1
  29. package/dist/{core-DD2giR6E.js.map → core-N07x1OaR.js.map} +1 -1
  30. package/dist/development/{BrandMarkScene-BDdC7K5M.js → BrandMarkScene-B282kBA3.js} +4 -4
  31. package/dist/development/{BrandMarkScene-BDdC7K5M.js.map → BrandMarkScene-B282kBA3.js.map} +1 -1
  32. package/dist/development/astro-application.js +1 -1
  33. package/dist/development/astro-client.js +5 -5
  34. package/dist/development/{astro-context-OdlexHR4.js → astro-context-B9XKrz8c.js} +1 -1
  35. package/dist/development/{astro-context-OdlexHR4.js.map → astro-context-B9XKrz8c.js.map} +1 -1
  36. package/dist/development/astro-middleware.js +2 -2
  37. package/dist/development/{astro-request-DRKvDjsO.js → astro-request-C0eYQlmS.js} +2 -2
  38. package/dist/development/{astro-request-DRKvDjsO.js.map → astro-request-C0eYQlmS.js.map} +1 -1
  39. package/dist/development/astro-resumability-client.js +1 -1
  40. package/dist/development/astro-resumability-server.js +1 -1
  41. package/dist/development/astro-server.js +4 -4
  42. package/dist/development/{astro-shared-DBwINQav.js → astro-shared-CwBaV3Xu.js} +2 -2
  43. package/dist/development/{astro-shared-DBwINQav.js.map → astro-shared-CwBaV3Xu.js.map} +1 -1
  44. package/dist/development/astro.js +1 -1
  45. package/dist/development/brand-model.js +4 -4
  46. package/dist/development/brand.js +3 -3
  47. package/dist/development/{core-DrUd8x25.js → core-D1FWUMMC.js} +1 -1
  48. package/dist/development/{core-DrUd8x25.js.map → core-D1FWUMMC.js.map} +1 -1
  49. package/dist/development/{dom-CEVtlaav.js → dom-C1cVf5Vm.js} +4 -4
  50. package/dist/development/{dom-CEVtlaav.js.map → dom-C1cVf5Vm.js.map} +1 -1
  51. package/dist/development/floating.js +1 -1
  52. package/dist/development/hot.js +1 -1
  53. package/dist/{identity-ByJswZtF.js → development/identity-DWHH6jbd.js} +2 -2
  54. package/dist/development/{identity-B8wTFkyW.js.map → identity-DWHH6jbd.js.map} +1 -1
  55. package/dist/development/index.js +4 -4
  56. package/dist/development/{jsx-runtime-BGDPK50B.js → jsx-runtime-B2XxfA3E.js} +1 -1
  57. package/dist/development/{jsx-runtime-BGDPK50B.js.map → jsx-runtime-B2XxfA3E.js.map} +1 -1
  58. package/dist/development/jsx-runtime.js +1 -1
  59. package/dist/development/konva.js +4 -4
  60. package/dist/development/motion.js +1 -1
  61. package/dist/development/renderer.js +3 -3
  62. package/dist/development/{server-renderer-zAqEL1g1.js → server-renderer-B-L5tNg7.js} +4 -4
  63. package/dist/development/{server-renderer-zAqEL1g1.js.map → server-renderer-B-L5tNg7.js.map} +1 -1
  64. package/dist/development/server.js +1 -1
  65. package/dist/development/{src-CB7ruwRs.js → src-By4JY4qf.js} +2 -2
  66. package/dist/development/{src-CB7ruwRs.js.map → src-By4JY4qf.js.map} +1 -1
  67. package/dist/development/{three-CsZ6Od1C.js → three-F5D1OnE9.js} +4 -4
  68. package/dist/development/{three-CsZ6Od1C.js.map → three-F5D1OnE9.js.map} +1 -1
  69. package/dist/development/three.js +1 -1
  70. package/dist/{vite-WUiz1ju6.js → development/vite-BKxEE-ZO.js} +1 -1
  71. package/dist/development/{vite-WUiz1ju6.js.map → vite-BKxEE-ZO.js.map} +1 -1
  72. package/dist/development/vite.js +1 -1
  73. package/dist/{dom-DUpa3Sj2.js → dom-BbfEAPpR.js} +4 -4
  74. package/dist/{dom-DUpa3Sj2.js.map → dom-BbfEAPpR.js.map} +1 -1
  75. package/dist/floating.d.ts +1 -1
  76. package/dist/floating.js +1 -1
  77. package/dist/hot.d.ts +1 -1
  78. package/dist/hot.js +1 -1
  79. package/dist/{development/identity-B8wTFkyW.js → identity-wPtz6EJM.js} +2 -2
  80. package/dist/{identity-ByJswZtF.js.map → identity-wPtz6EJM.js.map} +1 -1
  81. package/dist/{index-DdA39aMv.d.ts → index-2AKIR8up.d.ts} +4 -4
  82. package/dist/{index-DdA39aMv.d.ts.map → index-2AKIR8up.d.ts.map} +1 -1
  83. package/dist/index.d.ts +3 -3
  84. package/dist/index.js +4 -4
  85. package/dist/{jsx-runtime-BGDPK50B.js → jsx-runtime-B2XxfA3E.js} +1 -1
  86. package/dist/{jsx-runtime-BGDPK50B.js.map → jsx-runtime-B2XxfA3E.js.map} +1 -1
  87. package/dist/{jsx-runtime-CCvcEosg.d.ts → jsx-runtime-CjiJSx5m.d.ts} +2 -2
  88. package/dist/{jsx-runtime-CCvcEosg.d.ts.map → jsx-runtime-CjiJSx5m.d.ts.map} +1 -1
  89. package/dist/jsx-runtime.d.ts +1 -1
  90. package/dist/jsx-runtime.js +1 -1
  91. package/dist/konva.d.ts +3 -3
  92. package/dist/konva.js +4 -4
  93. package/dist/motion.d.ts +1 -1
  94. package/dist/motion.js +1 -1
  95. package/dist/renderer.d.ts +1 -1
  96. package/dist/renderer.js +3 -3
  97. package/dist/{server-renderer-D7CdyOMo.js → server-renderer-CjTOgG1b.js} +4 -4
  98. package/dist/{server-renderer-D7CdyOMo.js.map → server-renderer-CjTOgG1b.js.map} +1 -1
  99. package/dist/server.d.ts +1 -1
  100. package/dist/server.js +1 -1
  101. package/dist/size.json +9 -9
  102. package/dist/{src-B2W_TA_X.js → src-BQlLP70K.js} +2 -2
  103. package/dist/{src-B2W_TA_X.js.map → src-BQlLP70K.js.map} +1 -1
  104. package/dist/{three-DcYxRXPW.js → three-DGOOlFXk.js} +4 -4
  105. package/dist/{three-DcYxRXPW.js.map → three-DGOOlFXk.js.map} +1 -1
  106. package/dist/three.d.ts +3 -3
  107. package/dist/three.js +1 -1
  108. package/dist/{development/vite-WUiz1ju6.js → vite-BKxEE-ZO.js} +1 -1
  109. package/dist/{vite-WUiz1ju6.js.map → vite-BKxEE-ZO.js.map} +1 -1
  110. package/dist/vite.js +1 -1
  111. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"vite-WUiz1ju6.js","names":[],"sources":["../../src/compiler.ts","../../src/compiler-hmr.ts","../../src/vite.ts"],"sourcesContent":["import { decode } from \"html-entities\"\nimport type { SourceMap } from \"magic-string\"\nimport MagicString from \"magic-string\"\nimport type {\n\tExpression,\n\tJSXElement,\n\tJSXElementName,\n\tJSXFragment,\n\tNode,\n} from \"oxc-parser\"\nimport { parseSync, visitorKeys } from \"oxc-parser\"\n\ntype Part = string | Node\ntype FunctionNode = Extract<\n\tNode,\n\t{\n\t\ttype:\n\t\t\t| `FunctionDeclaration`\n\t\t\t| `FunctionExpression`\n\t\t\t| `ArrowFunctionExpression`\n\t}\n>\ntype JSXNode = JSXElement | JSXFragment\n\nconst decodeJsx = (value: string): string =>\n\tdecode(value, { level: `html4`, scope: `strict` })\n\n/** Match JSX's multiline whitespace rules without reprinting JavaScript. */\nfunction text(value: string): string {\n\tconst lines = value.split(/\\r\\n|\\n|\\r/)\n\tlet last = 0\n\tfor (let i = 0; i < lines.length; i++) if (/[^ \\t]/.test(lines[i])) last = i\n\treturn lines\n\t\t.map((line, i) => {\n\t\t\tline = line.replace(/\\t/g, ` `)\n\t\t\tif (i > 0) line = line.replace(/^ +/, ``)\n\t\t\tif (i < lines.length - 1) line = line.replace(/ +$/, ``)\n\t\t\treturn line && i < last ? `${line} ` : line\n\t\t})\n\t\t.join(``)\n}\n\nfunction eager(node: Node, allowJsx = false): boolean {\n\tif (node.type === `ParenthesizedExpression`)\n\t\treturn eager(node.expression, allowJsx)\n\treturn (\n\t\tnode.type === `Literal` ||\n\t\tnode.type === `FunctionExpression` ||\n\t\tnode.type === `ArrowFunctionExpression` ||\n\t\t(allowJsx && (node.type === `JSXElement` || node.type === `JSXFragment`)) ||\n\t\t(node.type === `TemplateLiteral` && node.expressions.length === 0)\n\t)\n}\n\nfunction containsSuspension(node: Node): boolean {\n\tif (isFunction(node)) return false\n\tif (node.type === `AwaitExpression` || node.type === `YieldExpression`)\n\t\treturn true\n\treturn visitorKeys[node.type].some((key) => {\n\t\tconst value = (node as unknown as Record<string, unknown>)[key]\n\t\treturn Array.isArray(value)\n\t\t\t? value.some((child) => child && containsSuspension(child))\n\t\t\t: Boolean(value && containsSuspension(value as Node))\n\t})\n}\n\nfunction isFunction(node: Node): node is FunctionNode {\n\treturn (\n\t\tnode.type === `FunctionDeclaration` ||\n\t\tnode.type === `FunctionExpression` ||\n\t\tnode.type === `ArrowFunctionExpression`\n\t)\n}\n\nexport function compile(\n\tcode: string,\n\tfilename: string,\n): { code: string; map: SourceMap } {\n\tconst parsed = parseSync(filename, code, {\n\t\tlang: `tsx`,\n\t\tpreserveParens: true,\n\t})\n\tif (parsed.errors.length) {\n\t\tconst error = parsed.errors[0]\n\t\tthrow new SyntaxError(\n\t\t\t[`${filename}: ${error.message}`, error.codeframe]\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(`\\n`),\n\t\t)\n\t}\n\tconst output = new MagicString(code)\n\tconst parents = new WeakMap<Node, Node>()\n\tconst identifiers = new Set<string>()\n\tconst elements: JSXNode[] = []\n\tconst receivers: Node[] = []\n\tconst functions = new Set<Node>()\n\tfunction walk(node: Node, parent?: Node, outerFunction?: Node): void {\n\t\tif (parent) parents.set(node, parent)\n\t\toutput.addSourcemapLocation(node.start)\n\t\toutput.addSourcemapLocation(node.end)\n\t\tif (node.type === `Identifier` || node.type === `JSXIdentifier`)\n\t\t\tidentifiers.add(node.name)\n\t\tif (!outerFunction && isFunction(node)) outerFunction = node\n\t\tif (\n\t\t\tnode.type === `ThisExpression` ||\n\t\t\t(node.type === `JSXIdentifier` &&\n\t\t\t\tnode.name === `this` &&\n\t\t\t\t((parent?.type === `JSXMemberExpression` && parent.object === node) ||\n\t\t\t\t\t(parent?.type === `JSXOpeningElement` && parent.name === node)))\n\t\t)\n\t\t\treceivers.push(node)\n\t\tif (node.type === `JSXElement` || node.type === `JSXFragment`) {\n\t\t\telements.push(node)\n\t\t\tif (outerFunction) functions.add(outerFunction)\n\t\t}\n\t\tfor (const key of visitorKeys[node.type]) {\n\t\t\tconst value = (node as unknown as Record<string, unknown>)[key]\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tfor (const child of value) if (child) walk(child, node, outerFunction)\n\t\t\t} else if (value) walk(value as Node, node, outerFunction)\n\t\t}\n\t}\n\twalk(parsed.program)\n\tfunction uid(base: string): string {\n\t\tlet name = `_${base}`\n\t\tlet suffix = 1\n\t\twhile (identifiers.has(name)) name = `_${base}${++suffix}`\n\t\tidentifiers.add(name)\n\t\treturn name\n\t}\n\tconst create = uid(`spa`)\n\tconst merge = uid(`props`)\n\tconst captures = new Map<\n\t\tNode,\n\t\t{\n\t\t\tname: string\n\t\t\tscope: FunctionNode | undefined\n\t\t\troot: JSXNode\n\t\t}\n\t>()\n\tconst tagReceivers = new WeakMap<Node, string>()\n\tfor (const reference of receivers) {\n\t\tlet root: JSXNode | undefined\n\t\tlet ancestor = parents.get(reference)\n\t\t// Arrows inside a JSX tree share its receiver. A normal function starts\n\t\t// a separate receiver scope for any JSX it contains.\n\t\twhile (\n\t\t\tancestor &&\n\t\t\t(!isFunction(ancestor) || ancestor.type === `ArrowFunctionExpression`)\n\t\t) {\n\t\t\tif (ancestor.type === `JSXElement` || ancestor.type === `JSXFragment`)\n\t\t\t\troot = ancestor\n\t\t\tancestor = parents.get(ancestor)\n\t\t}\n\t\tif (!root) continue\n\t\tlet scope = parents.get(root)\n\t\twhile (scope && !isFunction(scope)) scope = parents.get(scope)\n\t\t// Default parameters run before declarations in the function body.\n\t\tif (scope && root.start < scope.body.start) scope = undefined\n\t\tconst enclosing = scope ?? root\n\t\tlet capture = captures.get(enclosing)\n\t\tif (!capture) {\n\t\t\tcapture = { name: uid(`self$`), scope, root }\n\t\t\tcaptures.set(enclosing, capture)\n\t\t}\n\t\tif (reference.type === `ThisExpression`)\n\t\t\toutput.update(reference.start, reference.end, capture.name)\n\t\telse tagReceivers.set(reference, capture.name)\n\t}\n\tconst join = (parts: Part[][], separator: string): Part[] =>\n\t\tparts.flatMap((part, i) => (i ? [separator, ...part] : part))\n\tconst expression = (node: Expression): Part[] =>\n\t\teager(node, true) ? [`(`, node, `)`] : [`() => (`, node, `)`]\n\tfunction tag(node: JSXElementName): string {\n\t\tif (node.type === `JSXNamespacedName`)\n\t\t\treturn JSON.stringify(`${node.namespace.name}:${node.name.name}`)\n\t\tif (node.type === `JSXMemberExpression`) {\n\t\t\tlet root = node.object\n\t\t\twhile (root.type === `JSXMemberExpression`) root = root.object\n\t\t\treturn (\n\t\t\t\t(tagReceivers.get(root) ?? root.name) + code.slice(root.end, node.end)\n\t\t\t)\n\t\t}\n\t\tif (tagReceivers.has(node)) return tagReceivers.get(node)!\n\t\treturn /^[a-z]/.test(node.name) || node.name.includes(`-`)\n\t\t\t? JSON.stringify(node.name)\n\t\t\t: node.name\n\t}\n\tfunction checkAttribute(node: Node, name: string): void {\n\t\tif (containsSuspension(node))\n\t\t\tthrow new SyntaxError(\n\t\t\t\t`${filename}: JSX attribute ${JSON.stringify(name)} cannot contain await or yield outside a nested function`,\n\t\t\t)\n\t}\n\t/** Rewrite syntax around untouched expression spans, including nested JSX. */\n\tfunction rewrite(node: JSXElement | JSXFragment, parts: Part[]): void {\n\t\tlet cursor = node.start\n\t\tlet replacement = ``\n\t\tfor (const part of parts) {\n\t\t\tif (typeof part === `string`) {\n\t\t\t\treplacement += part\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (cursor < part.start) output.update(cursor, part.start, replacement)\n\t\t\telse output.appendLeft(cursor, replacement)\n\t\t\tcursor = part.end\n\t\t\treplacement = ``\n\t\t}\n\t\t// Every JSX node ends with closing syntax after its last expression span.\n\t\toutput.update(cursor, node.end, replacement)\n\t}\n\tfor (const node of elements) {\n\t\tconst chunks: Part[][] = []\n\t\tlet properties: Part[][] = []\n\t\tconst flush = () => {\n\t\t\tif (properties.length) chunks.push([`{`, ...join(properties, `, `), `}`])\n\t\t\tproperties = []\n\t\t}\n\t\tif (node.type === `JSXElement`) {\n\t\t\tfor (const attribute of node.openingElement.attributes) {\n\t\t\t\tif (attribute.type === `JSXSpreadAttribute`) {\n\t\t\t\t\tcheckAttribute(attribute.argument, `spread`)\n\t\t\t\t\tflush()\n\t\t\t\t\tchunks.push([`() => (`, attribute.argument, `)`])\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst attributeName =\n\t\t\t\t\tattribute.name.type === `JSXNamespacedName`\n\t\t\t\t\t\t? `${attribute.name.namespace.name}:${attribute.name.name.name}`\n\t\t\t\t\t\t: attribute.name.name\n\t\t\t\tconst key = JSON.stringify(attributeName)\n\t\t\t\tconst value = attribute.value\n\t\t\t\tif (!value) properties.push([`${key}: true`])\n\t\t\t\telse if (value.type === `Literal`)\n\t\t\t\t\tproperties.push([`${key}: ${JSON.stringify(decodeJsx(value.value))}`])\n\t\t\t\telse {\n\t\t\t\t\tconst expr =\n\t\t\t\t\t\tvalue.type === `JSXExpressionContainer` ? value.expression : value\n\t\t\t\t\tcheckAttribute(expr, attributeName)\n\t\t\t\t\tproperties.push(\n\t\t\t\t\t\teager(expr)\n\t\t\t\t\t\t\t? [`${key}: (`, expr, `)`]\n\t\t\t\t\t\t\t: [`get ${key}(){ return (`, expr, `); }`],\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst component =\n\t\t\tnode.type === `JSXElement` &&\n\t\t\t!tag(node.openingElement.name).startsWith(`\"`)\n\t\tconst children: Part[][] = []\n\t\tlet lazyChildren = false\n\t\tfor (const child of node.children) {\n\t\t\tif (child.type === `JSXText`) {\n\t\t\t\tconst value = text(decodeJsx(child.value))\n\t\t\t\tif (value) children.push([JSON.stringify(value)])\n\t\t\t} else if (child.type === `JSXElement` || child.type === `JSXFragment`)\n\t\t\t\tchildren.push([child])\n\t\t\telse if (child.type === `JSXExpressionContainer`) {\n\t\t\t\tif (child.expression.type !== `JSXEmptyExpression`) {\n\t\t\t\t\tcheckAttribute(child.expression, `children`)\n\t\t\t\t\tif (component) {\n\t\t\t\t\t\t// Component props expose their declared values, including callbacks.\n\t\t\t\t\t\tchildren.push([`(`, child.expression, `)`])\n\t\t\t\t\t\tif (!eager(child.expression, true)) lazyChildren = true\n\t\t\t\t\t} else children.push(expression(child.expression))\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tthrow new SyntaxError(`${filename}: JSX spread children are unsupported`)\n\t\t}\n\t\tif (children.length) {\n\t\t\tconst value =\n\t\t\t\tchildren.length === 1 ? children[0] : [`[`, ...join(children, `, `), `]`]\n\t\t\tproperties.push(\n\t\t\t\tlazyChildren\n\t\t\t\t\t? [`get children(){ return (`, ...value, `); }`]\n\t\t\t\t\t: [`children: `, ...value],\n\t\t\t)\n\t\t}\n\t\tflush()\n\t\tconst spreads =\n\t\t\tnode.type === `JSXElement` &&\n\t\t\tnode.openingElement.attributes.some(\n\t\t\t\t(attr) => attr.type === `JSXSpreadAttribute`,\n\t\t\t)\n\t\tconst props = spreads\n\t\t\t? [`${merge}(`, ...join(chunks, `, `), `)`]\n\t\t\t: (chunks[0] ?? [`{}`])\n\t\tconst capture = captures.get(node)\n\t\trewrite(node, [\n\t\t\tcapture ? `(() => { const ${capture.name} = this; return ` : ``,\n\t\t\t`${create}(${node.type === `JSXElement` ? tag(node.openingElement.name) : `null`}, `,\n\t\t\t...props,\n\t\t\t`)`,\n\t\t\tcapture ? `; })()` : ``,\n\t\t])\n\t}\n\tfor (const { name, scope, root } of captures.values()) {\n\t\tif (!scope) continue\n\t\tconst body = scope.body\n\t\tif (body.type !== `BlockStatement`) {\n\t\t\toutput.prependLeft(body.start, `{ const ${name} = this; return `)\n\t\t\toutput.appendLeft(body.end, `; }`)\n\t\t\tcontinue\n\t\t}\n\t\tlet position = body.start + 1\n\t\tif (parents.get(scope)?.type === `MethodDefinition`) {\n\t\t\tlet statement: Node = root\n\t\t\twhile (parents.get(statement) !== body) statement = parents.get(statement)!\n\t\t\tposition = statement.start\n\t\t} else {\n\t\t\tfor (const statement of body.body) {\n\t\t\t\tif (statement.type !== `ExpressionStatement` || !statement.directive)\n\t\t\t\t\tbreak\n\t\t\t\tposition = statement.end\n\t\t\t}\n\t\t}\n\t\toutput.prependLeft(position, `\\nconst ${name} = this;\\n`)\n\t}\n\tconst components = new Set<string>()\n\tfor (const fn of functions) {\n\t\tlet node = fn\n\t\tlet parent = parents.get(node)\n\t\twhile (parent?.type === `ParenthesizedExpression`) {\n\t\t\tnode = parent\n\t\t\tparent = parents.get(node)\n\t\t}\n\t\tif (fn.type === `FunctionDeclaration` && fn.id) components.add(fn.id.name)\n\t\telse if (\n\t\t\tparent?.type === `VariableDeclarator` &&\n\t\t\tparent.id.type === `Identifier`\n\t\t)\n\t\t\tcomponents.add(parent.id.name)\n\t\telse if (parent?.type === `ExportDefaultDeclaration`) {\n\t\t\tconst name = uid(`Component`)\n\t\t\tif (fn.type === `FunctionDeclaration`) {\n\t\t\t\t// Keep anonymous default function declarations hoisted.\n\t\t\t\tconst token = [\n\t\t\t\t\t...code\n\t\t\t\t\t\t.slice(fn.start, fn.body!.start)\n\t\t\t\t\t\t.matchAll(/\\/\\*[\\s\\S]*?\\*\\/|\\/\\/[^\\r\\n]*|\\bfunction\\b|\\*/g),\n\t\t\t\t].find((match) => match[0] === (fn.generator ? `*` : `function`))!\n\t\t\t\toutput.appendLeft(fn.start + token.index + token[0].length, ` ${name}`)\n\t\t\t} else {\n\t\t\t\t// Replace only keywords so intervening comments and annotations survive.\n\t\t\t\tconst prefix = code.slice(parent.start, node.start)\n\t\t\t\tfor (const token of prefix.matchAll(\n\t\t\t\t\t/\\/\\*[\\s\\S]*?\\*\\/|\\/\\/[^\\r\\n]*|\\b(?:export|default)\\b/g,\n\t\t\t\t)) {\n\t\t\t\t\tif (token[0] !== `export` && token[0] !== `default`) continue\n\t\t\t\t\toutput.update(\n\t\t\t\t\t\tparent.start + token.index,\n\t\t\t\t\t\tparent.start + token.index + token[0].length,\n\t\t\t\t\t\ttoken[0] === `export` ? `const ${name} =` : ``,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\toutput.appendLeft(parent.end, `;\\nexport default ${name};`)\n\t\t\t}\n\t\t\tcomponents.add(name)\n\t\t}\n\t}\n\tif (elements.length) {\n\t\t// Keep hashbangs and directive prologues ahead of generated imports.\n\t\tlet position = parsed.program.hashbang?.end ?? 0\n\t\tfor (const statement of parsed.program.body) {\n\t\t\tif (statement.type !== `ExpressionStatement` || !statement.directive) break\n\t\t\tposition = statement.end\n\t\t}\n\t\toutput.appendLeft(\n\t\t\tposition,\n\t\t\t`\\nimport { jsx as ${create}, merge as ${merge} } from \"@atom.io/spa/jsx-runtime\";\\n`,\n\t\t)\n\t\tfor (const component of components)\n\t\t\toutput.append(`\\n;${component}.spa = true;`)\n\t}\n\treturn {\n\t\tcode: output.toString(),\n\t\tmap: output.generateMap({\n\t\t\tsource: filename,\n\t\t\tincludeContent: true,\n\t\t\thires: true,\n\t\t}),\n\t}\n}\n","import remapping from \"@jridgewell/remapping\"\nimport type { SourceMap } from \"magic-string\"\nimport MagicString from \"magic-string\"\nimport type { Node } from \"oxc-parser\"\nimport { parseSync, visitorKeys } from \"oxc-parser\"\n\nfunction walk(node: Node, visit: (node: Node) => void): void {\n\tvisit(node)\n\tfor (const key of visitorKeys[node.type]) {\n\t\tconst value = (node as unknown as Record<string, unknown>)[key]\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (const child of value) if (child) walk(child, visit)\n\t\t} else if (value) walk(value as Node, visit)\n\t}\n}\nconst factories = new Set([\n\t`atom`,\n\t`atomFamily`,\n\t`selector`,\n\t`selectorFamily`,\n\t`transaction`,\n\t`timeline`,\n\t`timelineFamily`,\n\t`Silo`,\n])\nfunction stateIn(program: Node): boolean {\n\tconst names = new Set(factories)\n\twalk(program, (node) => {\n\t\tif (\n\t\t\tnode.type === `ImportDeclaration` &&\n\t\t\tnode.source.value.startsWith(`atom.io`)\n\t\t) {\n\t\t\tfor (const specifier of node.specifiers) {\n\t\t\t\tif (\n\t\t\t\t\tspecifier.type === `ImportSpecifier` &&\n\t\t\t\t\tspecifier.imported.type === `Identifier` &&\n\t\t\t\t\tfactories.has(specifier.imported.name)\n\t\t\t\t)\n\t\t\t\t\tnames.add(specifier.local.name)\n\t\t\t}\n\t\t}\n\t})\n\tlet found = false\n\twalk(program, (node) => {\n\t\tif (node.type === `CallExpression` || node.type === `NewExpression`) {\n\t\t\tconst callee = node.callee\n\t\t\tif (\n\t\t\t\t(callee.type === `Identifier` && names.has(callee.name)) ||\n\t\t\t\t(callee.type === `MemberExpression` &&\n\t\t\t\t\t!callee.computed &&\n\t\t\t\t\tcallee.property.type === `Identifier` &&\n\t\t\t\t\tfactories.has(callee.property.name))\n\t\t\t)\n\t\t\t\tfound = true\n\t\t}\n\t})\n\treturn found\n}\n\nexport function requiresModuleReload(code: string, filename: string): boolean {\n\tconst program = parseSync(filename, code, { lang: `tsx` }).program\n\treturn (\n\t\tstateIn(program) ||\n\t\tprogram.body.some((node) => {\n\t\t\tif (node.type === `ExportDefaultDeclaration`) return true\n\t\t\tif (node.type === `ExportAllDeclaration`) return node.exportKind !== `type`\n\t\t\tif (node.type !== `ExportNamedDeclaration` || node.exportKind === `type`)\n\t\t\t\treturn false\n\t\t\tif (node.declaration)\n\t\t\t\treturn ![\n\t\t\t\t\t`TSInterfaceDeclaration`,\n\t\t\t\t\t`TSTypeAliasDeclaration`,\n\t\t\t\t\t`TSDeclareFunction`,\n\t\t\t\t].includes(node.declaration.type)\n\t\t\treturn node.specifiers.some((specifier) => specifier.exportKind !== `type`)\n\t\t})\n\t)\n}\n\n/** Instrument only local component exports, composing both edits back to authored JSX. */\nexport function hotModule(\n\tcode: string,\n\tfilename: string,\n\toriginalMap: SourceMap,\n):\n\t| {\n\t\t\tcode: string\n\t\t\tmap: string\n\t\t\texports: string[]\n\t }\n\t| undefined {\n\tconst program = parseSync(filename, code, {\n\t\tlang: `tsx`,\n\t\tpreserveParens: true,\n\t}).program\n\tif (stateIn(program)) return\n\tconst components = new Set<string>()\n\tconst declarations = new Map<string, Node>()\n\tconst exports = new Map<string, string[]>()\n\tconst defaults: Extract<Node, { type: `ExportDefaultDeclaration` }>[] = []\n\tconst identifiers = new Set<string>()\n\twalk(program, (node) => {\n\t\tif (node.type === `Identifier`) identifiers.add(node.name)\n\t})\n\tconst branded = (node: Node): boolean => {\n\t\tif (\n\t\t\tnode.type !== `ExpressionStatement` ||\n\t\t\tnode.expression.type !== `AssignmentExpression`\n\t\t)\n\t\t\treturn false\n\t\tconst { left, right } = node.expression\n\t\tif (\n\t\t\tleft.type !== `MemberExpression` ||\n\t\t\tleft.computed ||\n\t\t\tleft.object.type !== `Identifier` ||\n\t\t\tleft.property.type !== `Identifier` ||\n\t\t\tleft.property.name !== `spa` ||\n\t\t\tright.type !== `Literal` ||\n\t\t\tright.value !== true\n\t\t)\n\t\t\treturn false\n\t\tcomponents.add(left.object.name)\n\t\treturn true\n\t}\n\tconst declaration = (node: Node): boolean => {\n\t\tif (node.type === `FunctionDeclaration` && node.id) {\n\t\t\tdeclarations.set(node.id.name, node)\n\t\t\treturn true\n\t\t}\n\t\tif (node.type === `VariableDeclaration`) {\n\t\t\tfor (const entry of node.declarations) {\n\t\t\t\tif (entry.id.type === `Identifier`) declarations.set(entry.id.name, node)\n\t\t\t\tlet unsafe = false\n\t\t\t\tlet init = entry.init\n\t\t\t\twhile (init?.type === `ParenthesizedExpression`) init = init.expression\n\t\t\t\tif (\n\t\t\t\t\tinit &&\n\t\t\t\t\tinit.type !== `ArrowFunctionExpression` &&\n\t\t\t\t\tinit.type !== `FunctionExpression`\n\t\t\t\t)\n\t\t\t\t\twalk(init, (child) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t`CallExpression`,\n\t\t\t\t\t\t\t\t`NewExpression`,\n\t\t\t\t\t\t\t\t`TaggedTemplateExpression`,\n\t\t\t\t\t\t\t].includes(child.type)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\tunsafe = true\n\t\t\t\t\t})\n\t\t\t\tif (unsafe) return false\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\treturn [\n\t\t\t`TSInterfaceDeclaration`,\n\t\t\t`TSTypeAliasDeclaration`,\n\t\t\t`TSDeclareFunction`,\n\t\t].includes(node.type)\n\t}\n\tconst add = (local: string, exported: string) => {\n\t\texports.set(local, [...(exports.get(local) ?? []), exported])\n\t}\n\tfor (const statement of program.body) {\n\t\tif (\n\t\t\tstatement.type === `ExportAllDeclaration` &&\n\t\t\tstatement.exportKind === `type`\n\t\t)\n\t\t\tcontinue\n\t\tif (\n\t\t\tstatement.type === `ImportDeclaration` ||\n\t\t\tstatement.type === `EmptyStatement`\n\t\t)\n\t\t\tcontinue\n\t\tif (\n\t\t\tstatement.type === `ExpressionStatement` &&\n\t\t\t(statement.directive || branded(statement))\n\t\t)\n\t\t\tcontinue\n\t\tif (statement.type === `ExportNamedDeclaration`) {\n\t\t\tif (statement.exportKind === `type`) continue\n\t\t\tif (statement.source) return\n\t\t\tif (statement.declaration) {\n\t\t\t\tconst node = statement.declaration\n\t\t\t\tif (!declaration(node)) return\n\t\t\t\tif (node.type === `FunctionDeclaration` && node.id)\n\t\t\t\t\tadd(node.id.name, node.id.name)\n\t\t\t\tif (node.type === `VariableDeclaration`)\n\t\t\t\t\tfor (const entry of node.declarations) {\n\t\t\t\t\t\tif (entry.id.type !== `Identifier`) return\n\t\t\t\t\t\tadd(entry.id.name, entry.id.name)\n\t\t\t\t\t}\n\t\t\t} else\n\t\t\t\tfor (const specifier of statement.specifiers) {\n\t\t\t\t\tif (specifier.exportKind === `type`) continue\n\t\t\t\t\tadd(\n\t\t\t\t\t\t// Local export names are identifiers; string names require a source above.\n\t\t\t\t\t\t(specifier.local as { name: string }).name,\n\t\t\t\t\t\tspecifier.exported.type === `Identifier`\n\t\t\t\t\t\t\t? specifier.exported.name\n\t\t\t\t\t\t\t: specifier.exported.value,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t} else if (statement.type === `ExportDefaultDeclaration`) {\n\t\t\tconst node = statement.declaration\n\t\t\tif (node.type === `Identifier`) add(node.name, `default`)\n\t\t\telse if (node.type === `FunctionDeclaration` && node.id) {\n\t\t\t\tdeclaration(node)\n\t\t\t\tadd(node.id.name, `default`)\n\t\t\t} else return\n\t\t\tdefaults.push(statement)\n\t\t} else if (!declaration(statement)) return\n\t}\n\tif (\n\t\t!exports.size ||\n\t\t[...exports.keys()].some(\n\t\t\t(name) => !components.has(name) || !declarations.has(name),\n\t\t)\n\t)\n\t\treturn\n\tconst output = new MagicString(code)\n\tconst mutable = new Set<Node>()\n\tfor (const name of exports.keys()) {\n\t\tconst node = declarations.get(name)!\n\t\tif (\n\t\t\tnode.type === `VariableDeclaration` &&\n\t\t\tnode.kind === `const` &&\n\t\t\t!mutable.has(node)\n\t\t) {\n\t\t\toutput.update(node.start, node.start + 5, `let`)\n\t\t\tmutable.add(node)\n\t\t}\n\t}\n\tfor (const node of defaults) {\n\t\tconst value = node.declaration\n\t\tconst name =\n\t\t\tvalue.type === `Identifier`\n\t\t\t\t? value.name\n\t\t\t\t: (value as { id: { name: string } }).id.name\n\t\tconst prefix = code.slice(node.start, value.start)\n\t\tfor (const token of prefix.matchAll(\n\t\t\t/\\/\\*[\\s\\S]*?\\*\\/|\\/\\/[^\\r\\n]*|\\b(?:export|default)\\b/g,\n\t\t)) {\n\t\t\tif (token[0] === `export` || token[0] === `default`)\n\t\t\t\toutput.update(\n\t\t\t\t\tnode.start + token.index,\n\t\t\t\t\tnode.start + token.index + token[0].length,\n\t\t\t\t\tvalue.type === `Identifier` && token[0] === `export` ? `export {` : ``,\n\t\t\t\t)\n\t\t}\n\t\tif (value.type === `Identifier`)\n\t\t\toutput.appendLeft(value.end, ` as default }`)\n\t\telse output.appendLeft(node.end, `;\\nexport { ${name} as default };`)\n\t}\n\tconst uid = (base: string) => {\n\t\tlet name = base\n\t\twhile (identifiers.has(name)) name += `_`\n\t\tidentifiers.add(name)\n\t\treturn name\n\t}\n\tconst register = uid(`__spaHotRegister`),\n\t\trefresh = uid(`__spaHotRefresh`)\n\tlet position = program.hashbang?.end ?? 0\n\tfor (const statement of program.body) {\n\t\tif (statement.type !== `ExpressionStatement` || !statement.directive) break\n\t\tposition = statement.end\n\t}\n\toutput.appendLeft(\n\t\tposition,\n\t\t`\\nimport { registerComponent as ${register}, refresh as ${refresh} } from \"@atom.io/spa/hot\";\\n`,\n\t)\n\toutput.append(`\\nif (import.meta.hot) {\\n`)\n\tfor (const [name, aliases] of exports)\n\t\toutput.append(\n\t\t\t`${name} = ${register}(${JSON.stringify(filename)}, ${JSON.stringify(aliases.sort()[0])}, ${name});\\n`,\n\t\t)\n\toutput.append(\n\t\t`import.meta.hot.accept(() => ${refresh}(${JSON.stringify(filename)}));\\n}\\n`,\n\t)\n\treturn {\n\t\tcode: output.toString(),\n\t\tmap: remapping(\n\t\t\t[\n\t\t\t\toutput\n\t\t\t\t\t.generateMap({\n\t\t\t\t\t\tsource: filename,\n\t\t\t\t\t\tincludeContent: true,\n\t\t\t\t\t\thires: true,\n\t\t\t\t\t})\n\t\t\t\t\t.toString(),\n\t\t\t\toriginalMap.toString(),\n\t\t\t],\n\t\t\t() => null,\n\t\t).toString(),\n\t\texports: [...exports.values()].flat().sort(),\n\t}\n}\n","import type { Plugin } from \"vite\"\n\nimport { compile } from \"./compiler.ts\"\nimport { hotModule, requiresModuleReload } from \"./compiler-hmr.ts\"\n\nexport interface SpaPluginOptions {\n\tinclude?: RegExp\n}\nexport default function spa(options: SpaPluginOptions = {}): Plugin {\n\tconst include = options.include ?? /\\.[jt]sx$/\n\tlet development = false\n\tconst signatures = new Map<string, string>()\n\tconst matches = (id: string): boolean => {\n\t\tinclude.lastIndex = 0\n\t\treturn !id.includes(`/node_modules/`) && include.test(id.split(`?`)[0])\n\t}\n\treturn {\n\t\tname: `spa`,\n\t\tenforce: `pre`,\n\t\tconfigResolved(config) {\n\t\t\tdevelopment = config.command === `serve` && config.mode !== `test`\n\t\t},\n\t\tconfig() {\n\t\t\treturn {\n\t\t\t\tresolve: { dedupe: [`@atom.io/spa`, `atom.io`] },\n\t\t\t\toptimizeDeps: { exclude: [`@atom.io/spa`, `atom.io`] },\n\t\t\t}\n\t\t},\n\t\tconfigEnvironment: {\n\t\t\torder: `post`,\n\t\t\thandler(_name, config) {\n\t\t\t\t// Astro and its adapters force renderer entries into the optimizer.\n\t\t\t\t// Vite processes explicit includes even when their package is excluded.\n\t\t\t\t// Keep the renderer, hooks, and store in one unbundled module graph.\n\t\t\t\tif (config.optimizeDeps?.include) {\n\t\t\t\t\tconfig.optimizeDeps.include = config.optimizeDeps.include.filter(\n\t\t\t\t\t\t(id) => !/^(@atom\\.io\\/spa|atom\\.io)(\\/|$)/.test(id),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\ttransform(code, id, environment) {\n\t\t\tif (!matches(id)) return\n\t\t\tconst compiled = compile(code, id)\n\t\t\tif (development && !environment?.ssr) {\n\t\t\t\tconst key = id.split(`?`)[0]\n\t\t\t\tconst hot = hotModule(compiled.code, id, compiled.map)\n\t\t\t\tif (hot) {\n\t\t\t\t\tsignatures.set(key, hot.exports.join(`\\0`))\n\t\t\t\t\treturn { code: hot.code, map: hot.map }\n\t\t\t\t}\n\t\t\t\tif (id === key) signatures.delete(key)\n\t\t\t}\n\t\t\treturn compiled\n\t\t},\n\t\tasync handleHotUpdate({ server, file, read }) {\n\t\t\tif (matches(file)) {\n\t\t\t\ttry {\n\t\t\t\t\tconst compiled = compile(await read(), file)\n\t\t\t\t\tconst hot = development\n\t\t\t\t\t\t? hotModule(compiled.code, file, compiled.map)\n\t\t\t\t\t\t: undefined\n\t\t\t\t\tif (hot && signatures.get(file) === hot.exports.join(`\\0`)) return\n\t\t\t\t} catch (error) {\n\t\t\t\t\tserver.ws.send({\n\t\t\t\t\t\ttype: `error`,\n\t\t\t\t\t\terr: {\n\t\t\t\t\t\t\tmessage: String(error),\n\t\t\t\t\t\t\tstack: error instanceof Error ? (error.stack ?? ``) : ``,\n\t\t\t\t\t\t\tid: file,\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\treturn []\n\t\t\t\t}\n\t\t\t\tserver.ws.send({ type: `full-reload` })\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tif (\n\t\t\t\t!file.includes(`/node_modules/`) &&\n\t\t\t\t/\\.[cm]?[jt]sx?$/.test(file) &&\n\t\t\t\trequiresModuleReload(await read(), file)\n\t\t\t) {\n\t\t\t\tserver.ws.send({ type: `full-reload` })\n\t\t\t\treturn []\n\t\t\t}\n\t\t},\n\t}\n}\n"],"mappings":";;;;;AAwBA,MAAM,aAAa,UAClB,OAAO,OAAO;CAAE,OAAO;CAAS,OAAO;AAAS,CAAC;;AAGlD,SAAS,KAAK,OAAuB;CACpC,MAAM,QAAQ,MAAM,MAAM,YAAY;CACtC,IAAI,OAAO;CACX,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,IAAI,SAAS,KAAK,MAAM,EAAE,GAAG,OAAO;CAC3E,OAAO,MACL,KAAK,MAAM,MAAM;EACjB,OAAO,KAAK,QAAQ,OAAO,GAAG;EAC9B,IAAI,IAAI,GAAG,OAAO,KAAK,QAAQ,OAAO,EAAE;EACxC,IAAI,IAAI,MAAM,SAAS,GAAG,OAAO,KAAK,QAAQ,OAAO,EAAE;EACvD,OAAO,QAAQ,IAAI,OAAO,GAAG,KAAK,KAAK;CACxC,CAAC,CAAC,CACD,KAAK,EAAE;AACV;AAEA,SAAS,MAAM,MAAY,WAAW,OAAgB;CACrD,IAAI,KAAK,SAAS,2BACjB,OAAO,MAAM,KAAK,YAAY,QAAQ;CACvC,OACC,KAAK,SAAS,aACd,KAAK,SAAS,wBACd,KAAK,SAAS,6BACb,aAAa,KAAK,SAAS,gBAAgB,KAAK,SAAS,kBACzD,KAAK,SAAS,qBAAqB,KAAK,YAAY,WAAW;AAElE;AAEA,SAAS,mBAAmB,MAAqB;CAChD,IAAI,WAAW,IAAI,GAAG,OAAO;CAC7B,IAAI,KAAK,SAAS,qBAAqB,KAAK,SAAS,mBACpD,OAAO;CACR,OAAO,YAAY,KAAK,KAAK,CAA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BKxEE-ZO.js","names":[],"sources":["../../src/compiler.ts","../../src/compiler-hmr.ts","../../src/vite.ts"],"sourcesContent":["import { decode } from \"html-entities\"\nimport type { SourceMap } from \"magic-string\"\nimport MagicString from \"magic-string\"\nimport type {\n\tExpression,\n\tJSXElement,\n\tJSXElementName,\n\tJSXFragment,\n\tNode,\n} from \"oxc-parser\"\nimport { parseSync, visitorKeys } from \"oxc-parser\"\n\ntype Part = string | Node\ntype FunctionNode = Extract<\n\tNode,\n\t{\n\t\ttype:\n\t\t\t| `FunctionDeclaration`\n\t\t\t| `FunctionExpression`\n\t\t\t| `ArrowFunctionExpression`\n\t}\n>\ntype JSXNode = JSXElement | JSXFragment\n\nconst decodeJsx = (value: string): string =>\n\tdecode(value, { level: `html4`, scope: `strict` })\n\n/** Match JSX's multiline whitespace rules without reprinting JavaScript. */\nfunction text(value: string): string {\n\tconst lines = value.split(/\\r\\n|\\n|\\r/)\n\tlet last = 0\n\tfor (let i = 0; i < lines.length; i++) if (/[^ \\t]/.test(lines[i])) last = i\n\treturn lines\n\t\t.map((line, i) => {\n\t\t\tline = line.replace(/\\t/g, ` `)\n\t\t\tif (i > 0) line = line.replace(/^ +/, ``)\n\t\t\tif (i < lines.length - 1) line = line.replace(/ +$/, ``)\n\t\t\treturn line && i < last ? `${line} ` : line\n\t\t})\n\t\t.join(``)\n}\n\nfunction eager(node: Node, allowJsx = false): boolean {\n\tif (node.type === `ParenthesizedExpression`)\n\t\treturn eager(node.expression, allowJsx)\n\treturn (\n\t\tnode.type === `Literal` ||\n\t\tnode.type === `FunctionExpression` ||\n\t\tnode.type === `ArrowFunctionExpression` ||\n\t\t(allowJsx && (node.type === `JSXElement` || node.type === `JSXFragment`)) ||\n\t\t(node.type === `TemplateLiteral` && node.expressions.length === 0)\n\t)\n}\n\nfunction containsSuspension(node: Node): boolean {\n\tif (isFunction(node)) return false\n\tif (node.type === `AwaitExpression` || node.type === `YieldExpression`)\n\t\treturn true\n\treturn visitorKeys[node.type].some((key) => {\n\t\tconst value = (node as unknown as Record<string, unknown>)[key]\n\t\treturn Array.isArray(value)\n\t\t\t? value.some((child) => child && containsSuspension(child))\n\t\t\t: Boolean(value && containsSuspension(value as Node))\n\t})\n}\n\nfunction isFunction(node: Node): node is FunctionNode {\n\treturn (\n\t\tnode.type === `FunctionDeclaration` ||\n\t\tnode.type === `FunctionExpression` ||\n\t\tnode.type === `ArrowFunctionExpression`\n\t)\n}\n\nexport function compile(\n\tcode: string,\n\tfilename: string,\n): { code: string; map: SourceMap } {\n\tconst parsed = parseSync(filename, code, {\n\t\tlang: `tsx`,\n\t\tpreserveParens: true,\n\t})\n\tif (parsed.errors.length) {\n\t\tconst error = parsed.errors[0]\n\t\tthrow new SyntaxError(\n\t\t\t[`${filename}: ${error.message}`, error.codeframe]\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(`\\n`),\n\t\t)\n\t}\n\tconst output = new MagicString(code)\n\tconst parents = new WeakMap<Node, Node>()\n\tconst identifiers = new Set<string>()\n\tconst elements: JSXNode[] = []\n\tconst receivers: Node[] = []\n\tconst functions = new Set<Node>()\n\tfunction walk(node: Node, parent?: Node, outerFunction?: Node): void {\n\t\tif (parent) parents.set(node, parent)\n\t\toutput.addSourcemapLocation(node.start)\n\t\toutput.addSourcemapLocation(node.end)\n\t\tif (node.type === `Identifier` || node.type === `JSXIdentifier`)\n\t\t\tidentifiers.add(node.name)\n\t\tif (!outerFunction && isFunction(node)) outerFunction = node\n\t\tif (\n\t\t\tnode.type === `ThisExpression` ||\n\t\t\t(node.type === `JSXIdentifier` &&\n\t\t\t\tnode.name === `this` &&\n\t\t\t\t((parent?.type === `JSXMemberExpression` && parent.object === node) ||\n\t\t\t\t\t(parent?.type === `JSXOpeningElement` && parent.name === node)))\n\t\t)\n\t\t\treceivers.push(node)\n\t\tif (node.type === `JSXElement` || node.type === `JSXFragment`) {\n\t\t\telements.push(node)\n\t\t\tif (outerFunction) functions.add(outerFunction)\n\t\t}\n\t\tfor (const key of visitorKeys[node.type]) {\n\t\t\tconst value = (node as unknown as Record<string, unknown>)[key]\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tfor (const child of value) if (child) walk(child, node, outerFunction)\n\t\t\t} else if (value) walk(value as Node, node, outerFunction)\n\t\t}\n\t}\n\twalk(parsed.program)\n\tfunction uid(base: string): string {\n\t\tlet name = `_${base}`\n\t\tlet suffix = 1\n\t\twhile (identifiers.has(name)) name = `_${base}${++suffix}`\n\t\tidentifiers.add(name)\n\t\treturn name\n\t}\n\tconst create = uid(`spa`)\n\tconst merge = uid(`props`)\n\tconst captures = new Map<\n\t\tNode,\n\t\t{\n\t\t\tname: string\n\t\t\tscope: FunctionNode | undefined\n\t\t\troot: JSXNode\n\t\t}\n\t>()\n\tconst tagReceivers = new WeakMap<Node, string>()\n\tfor (const reference of receivers) {\n\t\tlet root: JSXNode | undefined\n\t\tlet ancestor = parents.get(reference)\n\t\t// Arrows inside a JSX tree share its receiver. A normal function starts\n\t\t// a separate receiver scope for any JSX it contains.\n\t\twhile (\n\t\t\tancestor &&\n\t\t\t(!isFunction(ancestor) || ancestor.type === `ArrowFunctionExpression`)\n\t\t) {\n\t\t\tif (ancestor.type === `JSXElement` || ancestor.type === `JSXFragment`)\n\t\t\t\troot = ancestor\n\t\t\tancestor = parents.get(ancestor)\n\t\t}\n\t\tif (!root) continue\n\t\tlet scope = parents.get(root)\n\t\twhile (scope && !isFunction(scope)) scope = parents.get(scope)\n\t\t// Default parameters run before declarations in the function body.\n\t\tif (scope && root.start < scope.body.start) scope = undefined\n\t\tconst enclosing = scope ?? root\n\t\tlet capture = captures.get(enclosing)\n\t\tif (!capture) {\n\t\t\tcapture = { name: uid(`self$`), scope, root }\n\t\t\tcaptures.set(enclosing, capture)\n\t\t}\n\t\tif (reference.type === `ThisExpression`)\n\t\t\toutput.update(reference.start, reference.end, capture.name)\n\t\telse tagReceivers.set(reference, capture.name)\n\t}\n\tconst join = (parts: Part[][], separator: string): Part[] =>\n\t\tparts.flatMap((part, i) => (i ? [separator, ...part] : part))\n\tconst expression = (node: Expression): Part[] =>\n\t\teager(node, true) ? [`(`, node, `)`] : [`() => (`, node, `)`]\n\tfunction tag(node: JSXElementName): string {\n\t\tif (node.type === `JSXNamespacedName`)\n\t\t\treturn JSON.stringify(`${node.namespace.name}:${node.name.name}`)\n\t\tif (node.type === `JSXMemberExpression`) {\n\t\t\tlet root = node.object\n\t\t\twhile (root.type === `JSXMemberExpression`) root = root.object\n\t\t\treturn (\n\t\t\t\t(tagReceivers.get(root) ?? root.name) + code.slice(root.end, node.end)\n\t\t\t)\n\t\t}\n\t\tif (tagReceivers.has(node)) return tagReceivers.get(node)!\n\t\treturn /^[a-z]/.test(node.name) || node.name.includes(`-`)\n\t\t\t? JSON.stringify(node.name)\n\t\t\t: node.name\n\t}\n\tfunction checkAttribute(node: Node, name: string): void {\n\t\tif (containsSuspension(node))\n\t\t\tthrow new SyntaxError(\n\t\t\t\t`${filename}: JSX attribute ${JSON.stringify(name)} cannot contain await or yield outside a nested function`,\n\t\t\t)\n\t}\n\t/** Rewrite syntax around untouched expression spans, including nested JSX. */\n\tfunction rewrite(node: JSXElement | JSXFragment, parts: Part[]): void {\n\t\tlet cursor = node.start\n\t\tlet replacement = ``\n\t\tfor (const part of parts) {\n\t\t\tif (typeof part === `string`) {\n\t\t\t\treplacement += part\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (cursor < part.start) output.update(cursor, part.start, replacement)\n\t\t\telse output.appendLeft(cursor, replacement)\n\t\t\tcursor = part.end\n\t\t\treplacement = ``\n\t\t}\n\t\t// Every JSX node ends with closing syntax after its last expression span.\n\t\toutput.update(cursor, node.end, replacement)\n\t}\n\tfor (const node of elements) {\n\t\tconst chunks: Part[][] = []\n\t\tlet properties: Part[][] = []\n\t\tconst flush = () => {\n\t\t\tif (properties.length) chunks.push([`{`, ...join(properties, `, `), `}`])\n\t\t\tproperties = []\n\t\t}\n\t\tif (node.type === `JSXElement`) {\n\t\t\tfor (const attribute of node.openingElement.attributes) {\n\t\t\t\tif (attribute.type === `JSXSpreadAttribute`) {\n\t\t\t\t\tcheckAttribute(attribute.argument, `spread`)\n\t\t\t\t\tflush()\n\t\t\t\t\tchunks.push([`() => (`, attribute.argument, `)`])\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst attributeName =\n\t\t\t\t\tattribute.name.type === `JSXNamespacedName`\n\t\t\t\t\t\t? `${attribute.name.namespace.name}:${attribute.name.name.name}`\n\t\t\t\t\t\t: attribute.name.name\n\t\t\t\tconst key = JSON.stringify(attributeName)\n\t\t\t\tconst value = attribute.value\n\t\t\t\tif (!value) properties.push([`${key}: true`])\n\t\t\t\telse if (value.type === `Literal`)\n\t\t\t\t\tproperties.push([`${key}: ${JSON.stringify(decodeJsx(value.value))}`])\n\t\t\t\telse {\n\t\t\t\t\tconst expr =\n\t\t\t\t\t\tvalue.type === `JSXExpressionContainer` ? value.expression : value\n\t\t\t\t\tcheckAttribute(expr, attributeName)\n\t\t\t\t\tproperties.push(\n\t\t\t\t\t\teager(expr)\n\t\t\t\t\t\t\t? [`${key}: (`, expr, `)`]\n\t\t\t\t\t\t\t: [`get ${key}(){ return (`, expr, `); }`],\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst component =\n\t\t\tnode.type === `JSXElement` &&\n\t\t\t!tag(node.openingElement.name).startsWith(`\"`)\n\t\tconst children: Part[][] = []\n\t\tlet lazyChildren = false\n\t\tfor (const child of node.children) {\n\t\t\tif (child.type === `JSXText`) {\n\t\t\t\tconst value = text(decodeJsx(child.value))\n\t\t\t\tif (value) children.push([JSON.stringify(value)])\n\t\t\t} else if (child.type === `JSXElement` || child.type === `JSXFragment`)\n\t\t\t\tchildren.push([child])\n\t\t\telse if (child.type === `JSXExpressionContainer`) {\n\t\t\t\tif (child.expression.type !== `JSXEmptyExpression`) {\n\t\t\t\t\tcheckAttribute(child.expression, `children`)\n\t\t\t\t\tif (component) {\n\t\t\t\t\t\t// Component props expose their declared values, including callbacks.\n\t\t\t\t\t\tchildren.push([`(`, child.expression, `)`])\n\t\t\t\t\t\tif (!eager(child.expression, true)) lazyChildren = true\n\t\t\t\t\t} else children.push(expression(child.expression))\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tthrow new SyntaxError(`${filename}: JSX spread children are unsupported`)\n\t\t}\n\t\tif (children.length) {\n\t\t\tconst value =\n\t\t\t\tchildren.length === 1 ? children[0] : [`[`, ...join(children, `, `), `]`]\n\t\t\tproperties.push(\n\t\t\t\tlazyChildren\n\t\t\t\t\t? [`get children(){ return (`, ...value, `); }`]\n\t\t\t\t\t: [`children: `, ...value],\n\t\t\t)\n\t\t}\n\t\tflush()\n\t\tconst spreads =\n\t\t\tnode.type === `JSXElement` &&\n\t\t\tnode.openingElement.attributes.some(\n\t\t\t\t(attr) => attr.type === `JSXSpreadAttribute`,\n\t\t\t)\n\t\tconst props = spreads\n\t\t\t? [`${merge}(`, ...join(chunks, `, `), `)`]\n\t\t\t: (chunks[0] ?? [`{}`])\n\t\tconst capture = captures.get(node)\n\t\trewrite(node, [\n\t\t\tcapture ? `(() => { const ${capture.name} = this; return ` : ``,\n\t\t\t`${create}(${node.type === `JSXElement` ? tag(node.openingElement.name) : `null`}, `,\n\t\t\t...props,\n\t\t\t`)`,\n\t\t\tcapture ? `; })()` : ``,\n\t\t])\n\t}\n\tfor (const { name, scope, root } of captures.values()) {\n\t\tif (!scope) continue\n\t\tconst body = scope.body\n\t\tif (body.type !== `BlockStatement`) {\n\t\t\toutput.prependLeft(body.start, `{ const ${name} = this; return `)\n\t\t\toutput.appendLeft(body.end, `; }`)\n\t\t\tcontinue\n\t\t}\n\t\tlet position = body.start + 1\n\t\tif (parents.get(scope)?.type === `MethodDefinition`) {\n\t\t\tlet statement: Node = root\n\t\t\twhile (parents.get(statement) !== body) statement = parents.get(statement)!\n\t\t\tposition = statement.start\n\t\t} else {\n\t\t\tfor (const statement of body.body) {\n\t\t\t\tif (statement.type !== `ExpressionStatement` || !statement.directive)\n\t\t\t\t\tbreak\n\t\t\t\tposition = statement.end\n\t\t\t}\n\t\t}\n\t\toutput.prependLeft(position, `\\nconst ${name} = this;\\n`)\n\t}\n\tconst components = new Set<string>()\n\tfor (const fn of functions) {\n\t\tlet node = fn\n\t\tlet parent = parents.get(node)\n\t\twhile (parent?.type === `ParenthesizedExpression`) {\n\t\t\tnode = parent\n\t\t\tparent = parents.get(node)\n\t\t}\n\t\tif (fn.type === `FunctionDeclaration` && fn.id) components.add(fn.id.name)\n\t\telse if (\n\t\t\tparent?.type === `VariableDeclarator` &&\n\t\t\tparent.id.type === `Identifier`\n\t\t)\n\t\t\tcomponents.add(parent.id.name)\n\t\telse if (parent?.type === `ExportDefaultDeclaration`) {\n\t\t\tconst name = uid(`Component`)\n\t\t\tif (fn.type === `FunctionDeclaration`) {\n\t\t\t\t// Keep anonymous default function declarations hoisted.\n\t\t\t\tconst token = [\n\t\t\t\t\t...code\n\t\t\t\t\t\t.slice(fn.start, fn.body!.start)\n\t\t\t\t\t\t.matchAll(/\\/\\*[\\s\\S]*?\\*\\/|\\/\\/[^\\r\\n]*|\\bfunction\\b|\\*/g),\n\t\t\t\t].find((match) => match[0] === (fn.generator ? `*` : `function`))!\n\t\t\t\toutput.appendLeft(fn.start + token.index + token[0].length, ` ${name}`)\n\t\t\t} else {\n\t\t\t\t// Replace only keywords so intervening comments and annotations survive.\n\t\t\t\tconst prefix = code.slice(parent.start, node.start)\n\t\t\t\tfor (const token of prefix.matchAll(\n\t\t\t\t\t/\\/\\*[\\s\\S]*?\\*\\/|\\/\\/[^\\r\\n]*|\\b(?:export|default)\\b/g,\n\t\t\t\t)) {\n\t\t\t\t\tif (token[0] !== `export` && token[0] !== `default`) continue\n\t\t\t\t\toutput.update(\n\t\t\t\t\t\tparent.start + token.index,\n\t\t\t\t\t\tparent.start + token.index + token[0].length,\n\t\t\t\t\t\ttoken[0] === `export` ? `const ${name} =` : ``,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\toutput.appendLeft(parent.end, `;\\nexport default ${name};`)\n\t\t\t}\n\t\t\tcomponents.add(name)\n\t\t}\n\t}\n\tif (elements.length) {\n\t\t// Keep hashbangs and directive prologues ahead of generated imports.\n\t\tlet position = parsed.program.hashbang?.end ?? 0\n\t\tfor (const statement of parsed.program.body) {\n\t\t\tif (statement.type !== `ExpressionStatement` || !statement.directive) break\n\t\t\tposition = statement.end\n\t\t}\n\t\toutput.appendLeft(\n\t\t\tposition,\n\t\t\t`\\nimport { jsx as ${create}, merge as ${merge} } from \"@atom.io/spa/jsx-runtime\";\\n`,\n\t\t)\n\t\tfor (const component of components)\n\t\t\toutput.append(`\\n;${component}.spa = true;`)\n\t}\n\treturn {\n\t\tcode: output.toString(),\n\t\tmap: output.generateMap({\n\t\t\tsource: filename,\n\t\t\tincludeContent: true,\n\t\t\thires: true,\n\t\t}),\n\t}\n}\n","import remapping from \"@jridgewell/remapping\"\nimport type { SourceMap } from \"magic-string\"\nimport MagicString from \"magic-string\"\nimport type { Node } from \"oxc-parser\"\nimport { parseSync, visitorKeys } from \"oxc-parser\"\n\nfunction walk(node: Node, visit: (node: Node) => void): void {\n\tvisit(node)\n\tfor (const key of visitorKeys[node.type]) {\n\t\tconst value = (node as unknown as Record<string, unknown>)[key]\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (const child of value) if (child) walk(child, visit)\n\t\t} else if (value) walk(value as Node, visit)\n\t}\n}\nconst factories = new Set([\n\t`atom`,\n\t`atomFamily`,\n\t`selector`,\n\t`selectorFamily`,\n\t`transaction`,\n\t`timeline`,\n\t`timelineFamily`,\n\t`Silo`,\n])\nfunction stateIn(program: Node): boolean {\n\tconst names = new Set(factories)\n\twalk(program, (node) => {\n\t\tif (\n\t\t\tnode.type === `ImportDeclaration` &&\n\t\t\tnode.source.value.startsWith(`atom.io`)\n\t\t) {\n\t\t\tfor (const specifier of node.specifiers) {\n\t\t\t\tif (\n\t\t\t\t\tspecifier.type === `ImportSpecifier` &&\n\t\t\t\t\tspecifier.imported.type === `Identifier` &&\n\t\t\t\t\tfactories.has(specifier.imported.name)\n\t\t\t\t)\n\t\t\t\t\tnames.add(specifier.local.name)\n\t\t\t}\n\t\t}\n\t})\n\tlet found = false\n\twalk(program, (node) => {\n\t\tif (node.type === `CallExpression` || node.type === `NewExpression`) {\n\t\t\tconst callee = node.callee\n\t\t\tif (\n\t\t\t\t(callee.type === `Identifier` && names.has(callee.name)) ||\n\t\t\t\t(callee.type === `MemberExpression` &&\n\t\t\t\t\t!callee.computed &&\n\t\t\t\t\tcallee.property.type === `Identifier` &&\n\t\t\t\t\tfactories.has(callee.property.name))\n\t\t\t)\n\t\t\t\tfound = true\n\t\t}\n\t})\n\treturn found\n}\n\nexport function requiresModuleReload(code: string, filename: string): boolean {\n\tconst program = parseSync(filename, code, { lang: `tsx` }).program\n\treturn (\n\t\tstateIn(program) ||\n\t\tprogram.body.some((node) => {\n\t\t\tif (node.type === `ExportDefaultDeclaration`) return true\n\t\t\tif (node.type === `ExportAllDeclaration`) return node.exportKind !== `type`\n\t\t\tif (node.type !== `ExportNamedDeclaration` || node.exportKind === `type`)\n\t\t\t\treturn false\n\t\t\tif (node.declaration)\n\t\t\t\treturn ![\n\t\t\t\t\t`TSInterfaceDeclaration`,\n\t\t\t\t\t`TSTypeAliasDeclaration`,\n\t\t\t\t\t`TSDeclareFunction`,\n\t\t\t\t].includes(node.declaration.type)\n\t\t\treturn node.specifiers.some((specifier) => specifier.exportKind !== `type`)\n\t\t})\n\t)\n}\n\n/** Instrument only local component exports, composing both edits back to authored JSX. */\nexport function hotModule(\n\tcode: string,\n\tfilename: string,\n\toriginalMap: SourceMap,\n):\n\t| {\n\t\t\tcode: string\n\t\t\tmap: string\n\t\t\texports: string[]\n\t }\n\t| undefined {\n\tconst program = parseSync(filename, code, {\n\t\tlang: `tsx`,\n\t\tpreserveParens: true,\n\t}).program\n\tif (stateIn(program)) return\n\tconst components = new Set<string>()\n\tconst declarations = new Map<string, Node>()\n\tconst exports = new Map<string, string[]>()\n\tconst defaults: Extract<Node, { type: `ExportDefaultDeclaration` }>[] = []\n\tconst identifiers = new Set<string>()\n\twalk(program, (node) => {\n\t\tif (node.type === `Identifier`) identifiers.add(node.name)\n\t})\n\tconst branded = (node: Node): boolean => {\n\t\tif (\n\t\t\tnode.type !== `ExpressionStatement` ||\n\t\t\tnode.expression.type !== `AssignmentExpression`\n\t\t)\n\t\t\treturn false\n\t\tconst { left, right } = node.expression\n\t\tif (\n\t\t\tleft.type !== `MemberExpression` ||\n\t\t\tleft.computed ||\n\t\t\tleft.object.type !== `Identifier` ||\n\t\t\tleft.property.type !== `Identifier` ||\n\t\t\tleft.property.name !== `spa` ||\n\t\t\tright.type !== `Literal` ||\n\t\t\tright.value !== true\n\t\t)\n\t\t\treturn false\n\t\tcomponents.add(left.object.name)\n\t\treturn true\n\t}\n\tconst declaration = (node: Node): boolean => {\n\t\tif (node.type === `FunctionDeclaration` && node.id) {\n\t\t\tdeclarations.set(node.id.name, node)\n\t\t\treturn true\n\t\t}\n\t\tif (node.type === `VariableDeclaration`) {\n\t\t\tfor (const entry of node.declarations) {\n\t\t\t\tif (entry.id.type === `Identifier`) declarations.set(entry.id.name, node)\n\t\t\t\tlet unsafe = false\n\t\t\t\tlet init = entry.init\n\t\t\t\twhile (init?.type === `ParenthesizedExpression`) init = init.expression\n\t\t\t\tif (\n\t\t\t\t\tinit &&\n\t\t\t\t\tinit.type !== `ArrowFunctionExpression` &&\n\t\t\t\t\tinit.type !== `FunctionExpression`\n\t\t\t\t)\n\t\t\t\t\twalk(init, (child) => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t`CallExpression`,\n\t\t\t\t\t\t\t\t`NewExpression`,\n\t\t\t\t\t\t\t\t`TaggedTemplateExpression`,\n\t\t\t\t\t\t\t].includes(child.type)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\tunsafe = true\n\t\t\t\t\t})\n\t\t\t\tif (unsafe) return false\n\t\t\t}\n\t\t\treturn true\n\t\t}\n\t\treturn [\n\t\t\t`TSInterfaceDeclaration`,\n\t\t\t`TSTypeAliasDeclaration`,\n\t\t\t`TSDeclareFunction`,\n\t\t].includes(node.type)\n\t}\n\tconst add = (local: string, exported: string) => {\n\t\texports.set(local, [...(exports.get(local) ?? []), exported])\n\t}\n\tfor (const statement of program.body) {\n\t\tif (\n\t\t\tstatement.type === `ExportAllDeclaration` &&\n\t\t\tstatement.exportKind === `type`\n\t\t)\n\t\t\tcontinue\n\t\tif (\n\t\t\tstatement.type === `ImportDeclaration` ||\n\t\t\tstatement.type === `EmptyStatement`\n\t\t)\n\t\t\tcontinue\n\t\tif (\n\t\t\tstatement.type === `ExpressionStatement` &&\n\t\t\t(statement.directive || branded(statement))\n\t\t)\n\t\t\tcontinue\n\t\tif (statement.type === `ExportNamedDeclaration`) {\n\t\t\tif (statement.exportKind === `type`) continue\n\t\t\tif (statement.source) return\n\t\t\tif (statement.declaration) {\n\t\t\t\tconst node = statement.declaration\n\t\t\t\tif (!declaration(node)) return\n\t\t\t\tif (node.type === `FunctionDeclaration` && node.id)\n\t\t\t\t\tadd(node.id.name, node.id.name)\n\t\t\t\tif (node.type === `VariableDeclaration`)\n\t\t\t\t\tfor (const entry of node.declarations) {\n\t\t\t\t\t\tif (entry.id.type !== `Identifier`) return\n\t\t\t\t\t\tadd(entry.id.name, entry.id.name)\n\t\t\t\t\t}\n\t\t\t} else\n\t\t\t\tfor (const specifier of statement.specifiers) {\n\t\t\t\t\tif (specifier.exportKind === `type`) continue\n\t\t\t\t\tadd(\n\t\t\t\t\t\t// Local export names are identifiers; string names require a source above.\n\t\t\t\t\t\t(specifier.local as { name: string }).name,\n\t\t\t\t\t\tspecifier.exported.type === `Identifier`\n\t\t\t\t\t\t\t? specifier.exported.name\n\t\t\t\t\t\t\t: specifier.exported.value,\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t} else if (statement.type === `ExportDefaultDeclaration`) {\n\t\t\tconst node = statement.declaration\n\t\t\tif (node.type === `Identifier`) add(node.name, `default`)\n\t\t\telse if (node.type === `FunctionDeclaration` && node.id) {\n\t\t\t\tdeclaration(node)\n\t\t\t\tadd(node.id.name, `default`)\n\t\t\t} else return\n\t\t\tdefaults.push(statement)\n\t\t} else if (!declaration(statement)) return\n\t}\n\tif (\n\t\t!exports.size ||\n\t\t[...exports.keys()].some(\n\t\t\t(name) => !components.has(name) || !declarations.has(name),\n\t\t)\n\t)\n\t\treturn\n\tconst output = new MagicString(code)\n\tconst mutable = new Set<Node>()\n\tfor (const name of exports.keys()) {\n\t\tconst node = declarations.get(name)!\n\t\tif (\n\t\t\tnode.type === `VariableDeclaration` &&\n\t\t\tnode.kind === `const` &&\n\t\t\t!mutable.has(node)\n\t\t) {\n\t\t\toutput.update(node.start, node.start + 5, `let`)\n\t\t\tmutable.add(node)\n\t\t}\n\t}\n\tfor (const node of defaults) {\n\t\tconst value = node.declaration\n\t\tconst name =\n\t\t\tvalue.type === `Identifier`\n\t\t\t\t? value.name\n\t\t\t\t: (value as { id: { name: string } }).id.name\n\t\tconst prefix = code.slice(node.start, value.start)\n\t\tfor (const token of prefix.matchAll(\n\t\t\t/\\/\\*[\\s\\S]*?\\*\\/|\\/\\/[^\\r\\n]*|\\b(?:export|default)\\b/g,\n\t\t)) {\n\t\t\tif (token[0] === `export` || token[0] === `default`)\n\t\t\t\toutput.update(\n\t\t\t\t\tnode.start + token.index,\n\t\t\t\t\tnode.start + token.index + token[0].length,\n\t\t\t\t\tvalue.type === `Identifier` && token[0] === `export` ? `export {` : ``,\n\t\t\t\t)\n\t\t}\n\t\tif (value.type === `Identifier`)\n\t\t\toutput.appendLeft(value.end, ` as default }`)\n\t\telse output.appendLeft(node.end, `;\\nexport { ${name} as default };`)\n\t}\n\tconst uid = (base: string) => {\n\t\tlet name = base\n\t\twhile (identifiers.has(name)) name += `_`\n\t\tidentifiers.add(name)\n\t\treturn name\n\t}\n\tconst register = uid(`__spaHotRegister`),\n\t\trefresh = uid(`__spaHotRefresh`)\n\tlet position = program.hashbang?.end ?? 0\n\tfor (const statement of program.body) {\n\t\tif (statement.type !== `ExpressionStatement` || !statement.directive) break\n\t\tposition = statement.end\n\t}\n\toutput.appendLeft(\n\t\tposition,\n\t\t`\\nimport { registerComponent as ${register}, refresh as ${refresh} } from \"@atom.io/spa/hot\";\\n`,\n\t)\n\toutput.append(`\\nif (import.meta.hot) {\\n`)\n\tfor (const [name, aliases] of exports)\n\t\toutput.append(\n\t\t\t`${name} = ${register}(${JSON.stringify(filename)}, ${JSON.stringify(aliases.sort()[0])}, ${name});\\n`,\n\t\t)\n\toutput.append(\n\t\t`import.meta.hot.accept(() => ${refresh}(${JSON.stringify(filename)}));\\n}\\n`,\n\t)\n\treturn {\n\t\tcode: output.toString(),\n\t\tmap: remapping(\n\t\t\t[\n\t\t\t\toutput\n\t\t\t\t\t.generateMap({\n\t\t\t\t\t\tsource: filename,\n\t\t\t\t\t\tincludeContent: true,\n\t\t\t\t\t\thires: true,\n\t\t\t\t\t})\n\t\t\t\t\t.toString(),\n\t\t\t\toriginalMap.toString(),\n\t\t\t],\n\t\t\t() => null,\n\t\t).toString(),\n\t\texports: [...exports.values()].flat().sort(),\n\t}\n}\n","import type { Plugin } from \"vite\"\n\nimport { compile } from \"./compiler.ts\"\nimport { hotModule, requiresModuleReload } from \"./compiler-hmr.ts\"\n\nexport interface SpaPluginOptions {\n\tinclude?: RegExp\n}\nexport default function spa(options: SpaPluginOptions = {}): Plugin {\n\tconst include = options.include ?? /\\.[jt]sx$/\n\tlet development = false\n\tconst signatures = new Map<string, string>()\n\tconst matches = (id: string): boolean => {\n\t\tinclude.lastIndex = 0\n\t\treturn !id.includes(`/node_modules/`) && include.test(id.split(`?`)[0])\n\t}\n\treturn {\n\t\tname: `spa`,\n\t\tenforce: `pre`,\n\t\tconfigResolved(config) {\n\t\t\tdevelopment = config.command === `serve` && config.mode !== `test`\n\t\t},\n\t\tconfig() {\n\t\t\treturn {\n\t\t\t\tresolve: { dedupe: [`@atom.io/spa`, `atom.io`] },\n\t\t\t\toptimizeDeps: { exclude: [`@atom.io/spa`, `atom.io`] },\n\t\t\t}\n\t\t},\n\t\tconfigEnvironment: {\n\t\t\torder: `post`,\n\t\t\thandler(_name, config) {\n\t\t\t\t// Astro and its adapters force renderer entries into the optimizer.\n\t\t\t\t// Vite processes explicit includes even when their package is excluded.\n\t\t\t\t// Keep the renderer, hooks, and store in one unbundled module graph.\n\t\t\t\tif (config.optimizeDeps?.include) {\n\t\t\t\t\tconfig.optimizeDeps.include = config.optimizeDeps.include.filter(\n\t\t\t\t\t\t(id) => !/^(@atom\\.io\\/spa|atom\\.io)(\\/|$)/.test(id),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\ttransform(code, id, environment) {\n\t\t\tif (!matches(id)) return\n\t\t\tconst compiled = compile(code, id)\n\t\t\tif (development && !environment?.ssr) {\n\t\t\t\tconst key = id.split(`?`)[0]\n\t\t\t\tconst hot = hotModule(compiled.code, id, compiled.map)\n\t\t\t\tif (hot) {\n\t\t\t\t\tsignatures.set(key, hot.exports.join(`\\0`))\n\t\t\t\t\treturn { code: hot.code, map: hot.map }\n\t\t\t\t}\n\t\t\t\tif (id === key) signatures.delete(key)\n\t\t\t}\n\t\t\treturn compiled\n\t\t},\n\t\tasync handleHotUpdate({ server, file, read }) {\n\t\t\tif (matches(file)) {\n\t\t\t\ttry {\n\t\t\t\t\tconst compiled = compile(await read(), file)\n\t\t\t\t\tconst hot = development\n\t\t\t\t\t\t? hotModule(compiled.code, file, compiled.map)\n\t\t\t\t\t\t: undefined\n\t\t\t\t\tif (hot && signatures.get(file) === hot.exports.join(`\\0`)) return\n\t\t\t\t} catch (error) {\n\t\t\t\t\tserver.ws.send({\n\t\t\t\t\t\ttype: `error`,\n\t\t\t\t\t\terr: {\n\t\t\t\t\t\t\tmessage: String(error),\n\t\t\t\t\t\t\tstack: error instanceof Error ? (error.stack ?? ``) : ``,\n\t\t\t\t\t\t\tid: file,\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t\treturn []\n\t\t\t\t}\n\t\t\t\tserver.ws.send({ type: `full-reload` })\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tif (\n\t\t\t\t!file.includes(`/node_modules/`) &&\n\t\t\t\t/\\.[cm]?[jt]sx?$/.test(file) &&\n\t\t\t\trequiresModuleReload(await read(), file)\n\t\t\t) {\n\t\t\t\tserver.ws.send({ type: `full-reload` })\n\t\t\t\treturn []\n\t\t\t}\n\t\t},\n\t}\n}\n"],"mappings":";;;;;AAwBA,MAAM,aAAa,UAClB,OAAO,OAAO;CAAE,OAAO;CAAS,OAAO;AAAS,CAAC;;AAGlD,SAAS,KAAK,OAAuB;CACpC,MAAM,QAAQ,MAAM,MAAM,YAAY;CACtC,IAAI,OAAO;CACX,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,IAAI,SAAS,KAAK,MAAM,EAAE,GAAG,OAAO;CAC3E,OAAO,MACL,KAAK,MAAM,MAAM;EACjB,OAAO,KAAK,QAAQ,OAAO,GAAG;EAC9B,IAAI,IAAI,GAAG,OAAO,KAAK,QAAQ,OAAO,EAAE;EACxC,IAAI,IAAI,MAAM,SAAS,GAAG,OAAO,KAAK,QAAQ,OAAO,EAAE;EACvD,OAAO,QAAQ,IAAI,OAAO,GAAG,KAAK,KAAK;CACxC,CAAC,CAAC,CACD,KAAK,EAAE;AACV;AAEA,SAAS,MAAM,MAAY,WAAW,OAAgB;CACrD,IAAI,KAAK,SAAS,2BACjB,OAAO,MAAM,KAAK,YAAY,QAAQ;CACvC,OACC,KAAK,SAAS,aACd,KAAK,SAAS,wBACd,KAAK,SAAS,6BACb,aAAa,KAAK,SAAS,gBAAgB,KAAK,SAAS,kBACzD,KAAK,SAAS,qBAAqB,KAAK,YAAY,WAAW;AAElE;AAEA,SAAS,mBAAmB,MAAqB;CAChD,IAAI,WAAW,IAAI,GAAG,OAAO;CAC7B,IAAI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,MAAM,cAAc,CAAC;IACtC,OAAO,CAAC;GACT;EACD;CACD;AACD"}
@@ -1 +1 @@
1
- export { t as default } from "./vite-WUiz1ju6.js";
1
+ export { t as default } from "./vite-BKxEE-ZO.js";
@@ -1,6 +1,6 @@
1
- import { i as capabilityProps, n as trackKeys, t as identifyChildren } from "./identity-ByJswZtF.js";
2
- import { D as within, a as enqueue, c as isPresent, i as dispose, l as observe, m as plain, n as createRoot, o as fail, r as createScope, s as invalidate, v as untrack } from "./core-DD2giR6E.js";
3
- import { a as instanceProps, t as Fragment } from "./jsx-runtime-BGDPK50B.js";
1
+ import { i as capabilityProps, n as trackKeys, t as identifyChildren } from "./identity-wPtz6EJM.js";
2
+ import { D as within, a as enqueue, c as isPresent, i as dispose, l as observe, m as plain, n as createRoot, o as fail, r as createScope, s as invalidate, v as untrack } from "./core-N07x1OaR.js";
3
+ import { a as instanceProps, t as Fragment } from "./jsx-runtime-B2XxfA3E.js";
4
4
  // src/dom-forms.ts
5
5
  const changes = /* @__PURE__ */ new WeakMap();
6
6
  const requests = /* @__PURE__ */ new WeakMap();
@@ -340,4 +340,4 @@ function hydrate(setup, host, options = {}) {
340
340
  }
341
341
  export { render as n, hydrate as t };
342
342
 
343
- //# sourceMappingURL=dom-DUpa3Sj2.js.map
343
+ //# sourceMappingURL=dom-BbfEAPpR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom-DUpa3Sj2.js","names":[],"sources":["../src/dom-forms.ts","../src/dom.ts"],"sourcesContent":["import type { Scope } from \"./core.ts\"\nimport { enqueue, isPresent } from \"./core.ts\"\n\ntype Control = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement\nconst changes = new WeakMap<EventListener, EventListener>()\nconst requests = new WeakMap<Element, () => void>()\nconst events = [`input`, `change`, `click`]\nconst wake = () => {}\n\n/** Keep native input events, using per-edit change semantics for text/range controls. */\nexport function changeHandler(handler: EventListener): EventListener {\n\tlet wrapped = changes.get(handler)\n\tif (!wrapped) {\n\t\twrapped = (event) => {\n\t\t\tconst target = event.target as Control | null\n\t\t\tconst editing =\n\t\t\t\ttarget?.localName === `textarea` ||\n\t\t\t\t(target?.localName === `input` &&\n\t\t\t\t\t!/^(checkbox|radio|file)$/.test(target.type))\n\t\t\tif (event.type === (editing ? `input` : `change`))\n\t\t\t\thandler.call(event.currentTarget, event)\n\t\t}\n\t\tchanges.set(handler, wrapped)\n\t}\n\treturn wrapped\n}\n\nexport function controlValue(control: Control, value: string | number): void {\n\tif (\n\t\tcontrol.localName === `input` &&\n\t\tcontrol.type === `number` &&\n\t\ttypeof value === `number` &&\n\t\tcontrol.value !== `` &&\n\t\tNumber(control.value) === value\n\t)\n\t\treturn\n\tif (control.value !== String(value)) control.value = String(value)\n\tif (control.localName === `select`) {\n\t\tconst select = control as HTMLSelectElement\n\t\tif (select.selectedIndex < 0) {\n\t\t\tconst first = [...select.options].find((option) => !option.disabled)\n\t\t\tif (first) first.selected = true\n\t\t}\n\t}\n}\n\nfunction requestRestore(control: Control): void {\n\trequests.get(control)?.()\n\tif (control.localName !== `input` || control.type !== `radio`) return\n\tconst input = control as HTMLInputElement\n\tfor (const peer of (\n\t\tinput.getRootNode() as ParentNode\n\t).querySelectorAll<HTMLInputElement>(`input`)) {\n\t\tif (\n\t\t\tpeer !== input &&\n\t\t\tpeer.type === `radio` &&\n\t\t\tpeer.name === input.name &&\n\t\t\tpeer.form === input.form\n\t\t)\n\t\t\trequests.get(peer)?.()\n\t}\n}\n\n/** Restore controlled fields after event handlers and all queued option/prop updates. */\nexport function bindForm(\n\tcontrol: Control,\n\tprops: Record<string, any>,\n\tscope: Scope,\n): void {\n\tlet active: Event | undefined\n\tlet timer: ReturnType<typeof setTimeout> | undefined\n\tconst restore = () => {\n\t\tif (!isPresent(scope)) return true\n\t\tconst value = props[`value`]\n\t\tconst checked = control.localName === `input` ? props[`checked`] : undefined\n\t\tif (active?.eventPhase) return value == null && checked == null\n\t\tif (value != null) controlValue(control, value)\n\t\tif (checked != null) {\n\t\t\tconst input = control as HTMLInputElement\n\t\t\tif (input.checked !== Boolean(checked)) input.checked = Boolean(checked)\n\t\t}\n\t\treturn true\n\t}\n\tconst finish = () => {\n\t\tactive = undefined\n\t\tclearTimeout(timer)\n\t\tenqueue(scope, wake)\n\t}\n\tconst capture = (event: Event) => {\n\t\tif (event.type === `click` && !/^(checkbox|radio)$/.test(control.type))\n\t\t\treturn\n\t\tactive = event\n\t\tclearTimeout(timer)\n\t\t// A stopped native event never reaches the root's bubble listener.\n\t\ttimer = setTimeout(() => {\n\t\t\trequestRestore(control)\n\t\t}, 0)\n\t}\n\tconst root = scope._root\n\tif (!root._forms) {\n\t\troot._forms = new Set()\n\t\tconst end = (event: Event) => {\n\t\t\tconst target = event.target as Control\n\t\t\t// Checkbox/radio change follows click and input; its handlers must see the edit.\n\t\t\tif (\n\t\t\t\tevent.type === `click` ||\n\t\t\t\t(event.type === `input` && /^(checkbox|radio)$/.test(target.type))\n\t\t\t)\n\t\t\t\treturn\n\t\t\trequestRestore(target)\n\t\t}\n\t\tfor (const event of events) root._host!.addEventListener(event, end)\n\t\troot._cleanups.add(() => {\n\t\t\tfor (const event of events) root._host!.removeEventListener(event, end)\n\t\t})\n\t}\n\tconst forms = root._forms\n\tforms.add(restore)\n\trequests.set(control, finish)\n\tfor (const event of events) control.addEventListener(event, capture, true)\n\tscope._cleanups.add(() => {\n\t\tclearTimeout(timer)\n\t\tforms.delete(restore)\n\t\trequests.delete(control)\n\t\tfor (const event of events) control.removeEventListener(event, capture, true)\n\t})\n}\n","import type { Canonical } from \"atom.io/foundations/canonical\"\n\nimport { capabilityProps } from \"./capabilities.ts\"\nimport type {\n\tAccessor,\n\tChildren,\n\tRootOptions,\n\tScope,\n\tSpaElement,\n} from \"./core.ts\"\nimport {\n\tcreateRoot,\n\tcreateScope,\n\tdispose,\n\tfail,\n\tinvalidate,\n\tobserve,\n\tplain,\n\tuntrack,\n\twithin,\n} from \"./core.ts\"\nimport { bindForm, changeHandler, controlValue } from \"./dom-forms.ts\"\nimport { hotRoot, trackRoot } from \"./hot.ts\"\nimport { identifyChildren, trackKeys } from \"./identity.ts\"\nimport { Fragment } from \"./jsx-runtime.ts\"\nimport type { PresenceCollection } from \"./presence.ts\"\nimport { instanceProps } from \"./props.ts\"\n\nconst HTML = `http://www.w3.org/1999/xhtml`\nconst SVG = `http://www.w3.org/2000/svg`\ntype Cursor = {\n\tnode: Node | null\n\treport(expected: Node | null, found: Node | null): void\n}\ntype RecordNode = {\n\t_value: Children\n\t_scope: Scope\n\t_start: Node\n\t_end: Node\n\t_index: number\n}\nfunction compatible(record: RecordNode, child: Children): boolean {\n\treturn (\n\t\ttypeof record._value === typeof child &&\n\t\t(record._value as SpaElement | null)?.type ===\n\t\t\t(child as SpaElement | null)?.type\n\t)\n}\n\nfunction finish(cursor?: Cursor): void {\n\tif (cursor?.node) {\n\t\tcursor.report(null, cursor.node)\n\t\twhile (cursor.node) {\n\t\t\tconst node: Node = cursor.node\n\t\t\tcursor.node = node.nextSibling\n\t\t\t;(node as ChildNode).remove()\n\t\t}\n\t}\n}\n\nfunction take(\n\tnode: Node,\n\tparent: Node,\n\tbefore: Node | null,\n\towner: Scope,\n\tcursor?: Cursor,\n): Node {\n\tif (\n\t\tcursor &&\n\t\t!(node.nodeType === 3 && !node.nodeValue && cursor.node?.nodeType !== 3)\n\t) {\n\t\tconst found = cursor.node\n\t\tif (\n\t\t\t!found ||\n\t\t\tfound.nodeType !== node.nodeType ||\n\t\t\tfound.nodeName !== node.nodeName ||\n\t\t\t(found as Element).namespaceURI !== (node as Element).namespaceURI ||\n\t\t\t(node.nodeType !== 1 && found.nodeValue !== node.nodeValue)\n\t\t) {\n\t\t\tcursor.report(node, found)\n\t\t\tparent.insertBefore(node, found)\n\t\t\tcursor.node = found?.nextSibling ?? null\n\t\t\t;(found as ChildNode | null)?.remove()\n\t\t} else {\n\t\t\tnode = found\n\t\t\tcursor.node = found.nextSibling\n\t\t}\n\t} else parent.insertBefore(node, cursor ? cursor.node : before)\n\towner._cleanups.add(() => {\n\t\t;(node as ChildNode).remove()\n\t})\n\treturn node\n}\nfunction comment(\n\tvalue: string,\n\tparent: Node,\n\tbefore: Node | null,\n\towner: Scope,\n\tcursor?: Cursor,\n): Node {\n\treturn take(\n\t\tparent.ownerDocument!.createComment(value),\n\t\tparent,\n\t\tbefore,\n\t\towner,\n\t\tcursor,\n\t)\n}\nfunction property(\n\telement: Element,\n\tkey: string,\n\tvalue: any,\n\tprevious: any,\n): void {\n\tif (/^(key|children|ref)$/.test(key)) return\n\tif (key === `innerHTML` && element.localName === `astro-slot`) return\n\tif (\n\t\t/^(innerHTML|outerHTML|textContent|innerText|dangerouslySetInnerHTML)$/.test(\n\t\t\tkey,\n\t\t)\n\t)\n\t\tthrow new Error(import.meta.env.DEV ? `spa: owned content` : undefined)\n\tif (key.startsWith(`on`)) {\n\t\tconst capture = /(?<!Pointer)Capture$/.test(key)\n\t\tconst event = key\n\t\t\t.slice(2, capture ? -7 : undefined)\n\t\t\t.toLowerCase()\n\t\t\t.replace(`doubleclick`, `dblclick`)\n\t\tconst events =\n\t\t\tevent === `change`\n\t\t\t\t? [`input`, `change`]\n\t\t\t\t: [event === `focus` ? `focusin` : event === `blur` ? `focusout` : event]\n\t\tif (previous)\n\t\t\tfor (const name of events)\n\t\t\t\telement.removeEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tevent === `change` ? changeHandler(previous) : previous,\n\t\t\t\t\tcapture,\n\t\t\t\t)\n\t\tif (value != null) {\n\t\t\tif (import.meta.env.DEV && typeof value !== `function`)\n\t\t\t\tthrow new Error(`spa: event handler`)\n\t\t\tfor (const name of events)\n\t\t\t\telement.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tevent === `change` ? changeHandler(value) : value,\n\t\t\t\t\tcapture,\n\t\t\t\t)\n\t\t}\n\t\treturn\n\t}\n\tif (key === `className`) key = `class`\n\tif (key === `htmlFor`) key = `for`\n\tif (\n\t\timport.meta.env.DEV &&\n\t\tkey === `style` &&\n\t\tvalue != null &&\n\t\ttypeof value !== `string`\n\t)\n\t\tthrow new Error(`spa: CSS string required`)\n\tif (\n\t\telement.namespaceURI === SVG &&\n\t\tkey === `focusable` &&\n\t\ttypeof value === `boolean`\n\t)\n\t\tvalue = String(value)\n\tif (\n\t\telement.namespaceURI === HTML &&\n\t\tkey in element &&\n\t\t!/^(style|form|list)$/.test(key)\n\t) {\n\t\tconst target = element as any\n\t\tif (\n\t\t\tkey === `value` &&\n\t\t\t/^(input|textarea|select)$/.test(element.localName) &&\n\t\t\tvalue != null\n\t\t)\n\t\t\tcontrolValue(target, value)\n\t\telse target[key] = value ?? (typeof target[key] === `boolean` ? false : ``)\n\t\tif (value == null) element.removeAttribute(key)\n\t} else if (value == null || (value === false && !/^(aria-|data-)/.test(key)))\n\t\telement.removeAttribute(key)\n\telse\n\t\telement.setAttribute(\n\t\t\tkey,\n\t\t\tvalue === true && !/^(aria-|data-)/.test(key) ? `` : String(value),\n\t\t)\n}\n\nfunction mount(\n\tvalue: Children,\n\tparent: Node,\n\tbefore: Node | null,\n\towner: Scope,\n\tnamespace: string,\n\tcursor?: Cursor,\n\tsource = () => value,\n\tinitialKey?: Canonical,\n): void {\n\tif (typeof value === `function`) {\n\t\tconst begin = comment(`{`, parent, before, owner, cursor)\n\t\tlet end: Node | null = null\n\t\tlet records = new Map<string | number, RecordNode>()\n\t\tlet presence: PresenceCollection<RecordNode, Children> | undefined\n\t\tconst retire = (\n\t\t\trecord: RecordNode,\n\t\t\tkey: unknown,\n\t\t\teligible: boolean,\n\t\t\tindex: number,\n\t\t) => {\n\t\t\tif (presence) presence.remove(record, key, eligible, index, () => {})\n\t\t\telse dispose(record._scope)\n\t\t}\n\t\tlet initial = cursor\n\t\tobserve(\n\t\t\towner,\n\t\t\t() => identifyChildren((source() as () => Children)()),\n\t\t\t(values) => {\n\t\t\t\tpresence ??= owner._root._presence?.collection(\n\t\t\t\t\t(record: RecordNode) => record._scope,\n\t\t\t\t\tcompatible,\n\t\t\t\t)\n\t\t\t\tconst kept = new Map<string | number, RecordNode>()\n\t\t\t\tlet previous: RecordNode | undefined\n\t\t\t\tconst focus = parent.ownerDocument!.activeElement as HTMLElement | null\n\t\t\t\tfor (let index = 0; index < values.length; index++) {\n\t\t\t\t\tconst { value: child, key, id } = values[index]\n\t\t\t\t\tlet record = records.get(id)\n\t\t\t\t\tif (record && !compatible(record, child)) {\n\t\t\t\t\t\tretire(\n\t\t\t\t\t\t\trecord,\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tchild == null || typeof child === `boolean`,\n\t\t\t\t\t\t\trecord._index,\n\t\t\t\t\t\t)\n\t\t\t\t\t\trecord = undefined\n\t\t\t\t\t}\n\t\t\t\t\trecord ??= presence?.take(id, child)\n\t\t\t\t\tif (!record) {\n\t\t\t\t\t\tconst at = previous ? previous._end.nextSibling : begin.nextSibling\n\t\t\t\t\t\tconst childOwner = createScope(owner)\n\t\t\t\t\t\trecord = {\n\t\t\t\t\t\t\t_index: index,\n\t\t\t\t\t\t\t_value: child,\n\t\t\t\t\t\t\t_scope: childOwner,\n\t\t\t\t\t\t\t_start: comment(`[`, parent, at, childOwner, initial),\n\t\t\t\t\t\t\t_end: null!,\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst held = record\n\t\t\t\t\t\tmount(\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\tparent,\n\t\t\t\t\t\t\tat,\n\t\t\t\t\t\t\tchildOwner,\n\t\t\t\t\t\t\tnamespace,\n\t\t\t\t\t\t\tinitial,\n\t\t\t\t\t\t\t() => held._value,\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t)\n\t\t\t\t\t\trecord._end = comment(`]`, parent, at, childOwner, initial)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Frozen descriptors opt into reuse; mutable props and accessors must refresh.\n\t\t\t\t\t\tconst reusable =\n\t\t\t\t\t\t\trecord._value === child &&\n\t\t\t\t\t\t\ttypeof child === `object` &&\n\t\t\t\t\t\t\tchild !== null &&\n\t\t\t\t\t\t\tObject.isFrozen(child) &&\n\t\t\t\t\t\t\tObject.isFrozen((child as SpaElement).props)\n\t\t\t\t\t\trecord._value = child\n\t\t\t\t\t\towner._root._presence?.resume(record._scope)\n\t\t\t\t\t\tif (!reusable) invalidate(record._scope)\n\t\t\t\t\t}\n\t\t\t\t\trecord._index = index\n\t\t\t\t\tprevious = record\n\t\t\t\t\tkept.set(id, record)\n\t\t\t\t}\n\t\t\t\tfor (const [key, record] of records)\n\t\t\t\t\tif (!kept.has(key)) retire(record, key, true, record._index)\n\t\t\t\tif (!initial) {\n\t\t\t\t\tlet at = end ?? before\n\t\t\t\t\tconst rendered = presence?.merge([...kept.values()]) ?? [\n\t\t\t\t\t\t...kept.values(),\n\t\t\t\t\t]\n\t\t\t\t\tfor (const record of rendered.reverse()) {\n\t\t\t\t\t\tif (record._end.nextSibling !== at) {\n\t\t\t\t\t\t\tconst range = parent.ownerDocument!.createRange()\n\t\t\t\t\t\t\trange.setStartBefore(record._start)\n\t\t\t\t\t\t\trange.setEndAfter(record._end)\n\t\t\t\t\t\t\tparent.insertBefore(range.extractContents(), at)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tat = record._start\n\t\t\t\t\t}\n\t\t\t\t\tif (\n\t\t\t\t\t\tfocus?.isConnected &&\n\t\t\t\t\t\t!focus.closest(`[inert]`) &&\n\t\t\t\t\t\tfocus !== parent.ownerDocument!.activeElement\n\t\t\t\t\t)\n\t\t\t\t\t\tfocus.focus({ preventScroll: true })\n\t\t\t\t}\n\t\t\t\tinitial = undefined\n\t\t\t\trecords = kept\n\t\t\t},\n\t\t)\n\t\tend = comment(`}`, parent, before, owner, cursor)\n\t\treturn\n\t}\n\tif (Array.isArray(value)) {\n\t\tfor (const child of value)\n\t\t\tmount(child, parent, before, owner, namespace, cursor)\n\t\treturn\n\t}\n\tif (value == null || typeof value === `boolean`) return\n\tif (typeof value !== `object`) {\n\t\tcomment(`t`, parent, before, owner, cursor)\n\t\tconst text = take(\n\t\t\tparent.ownerDocument!.createTextNode(String(value)),\n\t\t\tparent,\n\t\t\tbefore,\n\t\t\towner,\n\t\t\tcursor,\n\t\t)\n\t\tobserve(owner, source as Accessor<string | number | bigint>, (next) => {\n\t\t\tconst data = String(next)\n\t\t\tif (text.nodeValue !== data) text.nodeValue = data\n\t\t})\n\t\treturn\n\t}\n\tif (import.meta.env.DEV && (!(`type` in value) || !(`props` in value)))\n\t\tthrow new Error(`spa: invalid child`)\n\tconst vnode = value as SpaElement\n\tconst props = instanceProps(() => (source() as SpaElement).props, initialKey)\n\tif (!vnode.type || vnode.type === Fragment) {\n\t\tmount(() => props[`children`], parent, before, owner, namespace, cursor)\n\t\treturn\n\t}\n\tif (typeof vnode.type === `function`) {\n\t\tconst childOwner = createScope(owner)\n\t\tconst output = within(childOwner, () =>\n\t\t\tuntrack(() => (vnode.type as Function)(props)),\n\t\t)\n\t\tmount(trackKeys(output), parent, before, childOwner, namespace, cursor)\n\t\treturn\n\t}\n\tconst ns = vnode.type === `svg` ? SVG : namespace\n\tconst element = take(\n\t\tparent.ownerDocument!.createElementNS(ns, vnode.type),\n\t\tparent,\n\t\tbefore,\n\t\towner,\n\t\tcursor,\n\t) as Element\n\tif (ns === HTML && /^(input|textarea|select)$/.test(vnode.type))\n\t\tbindForm(element as HTMLInputElement, props, owner)\n\tif (ns === HTML && (props[`autoFocus`] || props[`autofocus`])) {\n\t\towner._root._mounts!.push(() => {\n\t\t\tif (!owner._dead) (element as HTMLElement).focus()\n\t\t})\n\t}\n\tif (vnode.type === `astro-slot`) {\n\t\tif (!cursor) element.innerHTML = props[`innerHTML`] ?? ``\n\t} else if (ns === HTML && /^(textarea|title|style|script)$/.test(vnode.type)) {\n\t\tobserve(\n\t\t\towner,\n\t\t\t() =>\n\t\t\t\tplain(\n\t\t\t\t\tvnode.type === `textarea`\n\t\t\t\t\t\t? (props[`value`] ?? props[`children`])\n\t\t\t\t\t\t: props[`children`],\n\t\t\t\t),\n\t\t\t(text) => {\n\t\t\t\tif (element.textContent !== text) element.textContent = text\n\t\t\t},\n\t\t)\n\t} else {\n\t\tconst children = cursor\n\t\t\t? { node: element.firstChild, report: cursor.report }\n\t\t\t: undefined\n\t\tif (\n\t\t\t!/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/.test(\n\t\t\t\tvnode.type,\n\t\t\t) ||\n\t\t\tns !== HTML\n\t\t)\n\t\t\tmount(\n\t\t\t\t() => props[`children`],\n\t\t\t\telement,\n\t\t\t\tnull,\n\t\t\t\towner,\n\t\t\t\tvnode.type === `foreignObject` ? HTML : ns,\n\t\t\t\tchildren,\n\t\t\t)\n\t\tfinish(children)\n\t}\n\tlet previous: Record<string, any> = {}\n\tconst nativeProps = capabilityProps(\n\t\towner,\n\t\t{ kind: `dom`, node: element },\n\t\t() => ({ ...props }),\n\t\t(next) => {\n\t\t\tconst previousStyle =\n\t\t\t\tprevious[`style`] !== next[`style`]\n\t\t\t\t\t? (element.getAttribute(`style`) ?? ``)\n\t\t\t\t\t: undefined\n\t\t\tfor (const key in { ...previous, ...next })\n\t\t\t\tif (\n\t\t\t\t\t!Object.is(previous[key], next[key]) ||\n\t\t\t\t\ttypeof next[key] === `object`\n\t\t\t\t) {\n\t\t\t\t\tproperty(element, key, next[key], previous[key])\n\t\t\t\t\tprevious[key] = next[key]\n\t\t\t\t}\n\t\t\tprevious = next\n\t\t\treturn previousStyle\n\t\t},\n\t)\n\towner._cleanups.add(() => {\n\t\tfor (const key in previous)\n\t\t\tif (key.startsWith(`on`)) property(element, key, null, previous[key])\n\t})\n\tobserve(owner, () => ({ ...props }), nativeProps)\n\tconst ref = untrack(() => props[`ref`])\n\tif (ref) {\n\t\towner._root._mounts!.unshift(() => {\n\t\t\tif (!owner._dead) {\n\t\t\t\towner._cleanups.add(() => ref(null))\n\t\t\t\twithin(owner, () => ref(element))\n\t\t\t}\n\t\t})\n\t}\n}\n\nexport interface SpaRoot {\n\tdispose(): void\n\tflush(): void\n}\nfunction start(\n\tsetup: () => Children,\n\thost: Element,\n\toptions: RootOptions,\n\thydrating: boolean,\n\tbefore: Node | null = null,\n): SpaRoot {\n\tlet reported = false\n\tconst cursor: Cursor | undefined = hydrating\n\t\t? {\n\t\t\t\tnode: host.firstChild,\n\t\t\t\treport(expected, found) {\n\t\t\t\t\tif (!reported) {\n\t\t\t\t\t\treported = true\n\t\t\t\t\t\t// eslint-disable-next-line no-console -- Recoverable degradation must remain human-readable in production.\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t`spa: hydration mismatch. Repairing server HTML to match the browser view; replaced nodes may lose focus or unsaved input.`,\n\t\t\t\t\t\t\t{ host, expected, found },\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t: undefined\n\tconst marker = cursor?.node\n\tconst prefix =\n\t\tmarker?.nodeType === 8 && marker.nodeValue?.startsWith(`w:`)\n\t\t\t? marker.nodeValue.slice(2)\n\t\t\t: undefined\n\tconst root = createRoot(options)\n\troot._host = host\n\tif (prefix !== undefined && options.idPrefix === undefined)\n\t\troot._prefix = prefix\n\tif (import.meta.env.DEV) trackRoot(root)\n\ttry {\n\t\tcomment(`w:${root._prefix}`, host, before, root, cursor)\n\t\twithin(root, () => {\n\t\t\tmount(\n\t\t\t\ttrackKeys(untrack(setup)),\n\t\t\t\thost,\n\t\t\t\tbefore,\n\t\t\t\troot,\n\t\t\t\thost.namespaceURI === SVG ? SVG : HTML,\n\t\t\t\tcursor,\n\t\t\t)\n\t\t})\n\t\tcomment(`/w`, host, before, root, cursor)\n\t\tfinish(cursor)\n\t\troot.flush()\n\t} catch (error) {\n\t\tfail(root, error)\n\t}\n\treturn {\n\t\tdispose: () => {\n\t\t\tdispose(root)\n\t\t},\n\t\tflush: root.flush,\n\t}\n}\nexport function render(\n\tsetup: () => Children,\n\thost: Element,\n\toptions: RootOptions = {},\n): SpaRoot {\n\tif (import.meta.env.DEV)\n\t\treturn hotRoot(\n\t\t\t(next, before) => start(setup, host, next, false, before),\n\t\t\toptions,\n\t\t\thost,\n\t\t)\n\treturn start(setup, host, options, false)\n}\nexport function hydrate(\n\tsetup: () => Children,\n\thost: Element,\n\toptions: RootOptions = {},\n): SpaRoot {\n\tif (import.meta.env.DEV) {\n\t\tlet initial = true\n\t\treturn hotRoot(\n\t\t\t(next, before) => {\n\t\t\t\tconst current = start(setup, host, next, initial, before)\n\t\t\t\tinitial = false\n\t\t\t\treturn current\n\t\t\t},\n\t\t\toptions,\n\t\t\thost,\n\t\t)\n\t}\n\treturn start(setup, host, options, true)\n}\n"],"mappings":";;;;AAIA,MAAM,0BAAU,IAAI,QAAsC;AAC1D,MAAM,2BAAW,IAAI,QAA6B;AAClD,MAAM,SAAS;CAAC;CAAS;CAAU;AAAO;AAC1C,MAAM,aAAa,CAAC;;AAGpB,SAAgB,cAAc,SAAuC;CACpE,IAAI,UAAU,QAAQ,IAAI,OAAO;CACjC,IAAI,CAAC,SAAS;EACb,WAAW,UAAU;GACpB,MAAM,SAAS,MAAM;GACrB,MAAM,UACL,QAAQ,cAAc,cACrB,QAAQ,cAAc,WACtB,CAAC,0BAA0B,KAAK,OAAO,IAAI;GAC7C,IAAI,MAAM,UAAU,UAAU,UAAU,WACvC,QAAQ,KAAK,MAAM,eAAe,KAAK;EACzC;EACA,QAAQ,IAAI,SAAS,OAAO;CAC7B;CACA,OAAO;AACR;AAEA,SAAgB,aAAa,SAAkB,OAA8B;CAC5E,IACC,QAAQ,cAAc,WACtB,QAAQ,SAAS,YACjB,OAAO,UAAU,YACjB,QAAQ,UAAU,MAClB,OAAO,QAAQ,KAAK,MAAM,OAE1B;CACD,IAAI,QAAQ,UAAU,OAAO,KAAK,GAAG,QAAQ,QAAQ,OAAO,KAAK;CACjE,IAAI,QAAQ,cAAc,UAAU;EACnC,MAAM,SAAS;EACf,IAAI,OAAO,gBAAgB,GAAG;GAC7B,MAAM,QAAQ,CAAC,GAAG,OAAO,OAAO,CAAC,CAAC,MAAM,WAAW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UAAuB,CAAC,GACd;CAOV,OAAO,MAAM,OAAO,MAAM,SAAS,KAAK;AACzC;AACA,SAAgB,QACf,OACA,MACA,UAAuB,CAAC,GACd;CAaV,OAAO,MAAM,OAAO,MAAM,SAAS,IAAI;AACxC"}
1
+ {"version":3,"file":"dom-BbfEAPpR.js","names":[],"sources":["../src/dom-forms.ts","../src/dom.ts"],"sourcesContent":["import type { Scope } from \"./core.ts\"\nimport { enqueue, isPresent } from \"./core.ts\"\n\ntype Control = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement\nconst changes = new WeakMap<EventListener, EventListener>()\nconst requests = new WeakMap<Element, () => void>()\nconst events = [`input`, `change`, `click`]\nconst wake = () => {}\n\n/** Keep native input events, using per-edit change semantics for text/range controls. */\nexport function changeHandler(handler: EventListener): EventListener {\n\tlet wrapped = changes.get(handler)\n\tif (!wrapped) {\n\t\twrapped = (event) => {\n\t\t\tconst target = event.target as Control | null\n\t\t\tconst editing =\n\t\t\t\ttarget?.localName === `textarea` ||\n\t\t\t\t(target?.localName === `input` &&\n\t\t\t\t\t!/^(checkbox|radio|file)$/.test(target.type))\n\t\t\tif (event.type === (editing ? `input` : `change`))\n\t\t\t\thandler.call(event.currentTarget, event)\n\t\t}\n\t\tchanges.set(handler, wrapped)\n\t}\n\treturn wrapped\n}\n\nexport function controlValue(control: Control, value: string | number): void {\n\tif (\n\t\tcontrol.localName === `input` &&\n\t\tcontrol.type === `number` &&\n\t\ttypeof value === `number` &&\n\t\tcontrol.value !== `` &&\n\t\tNumber(control.value) === value\n\t)\n\t\treturn\n\tif (control.value !== String(value)) control.value = String(value)\n\tif (control.localName === `select`) {\n\t\tconst select = control as HTMLSelectElement\n\t\tif (select.selectedIndex < 0) {\n\t\t\tconst first = [...select.options].find((option) => !option.disabled)\n\t\t\tif (first) first.selected = true\n\t\t}\n\t}\n}\n\nfunction requestRestore(control: Control): void {\n\trequests.get(control)?.()\n\tif (control.localName !== `input` || control.type !== `radio`) return\n\tconst input = control as HTMLInputElement\n\tfor (const peer of (\n\t\tinput.getRootNode() as ParentNode\n\t).querySelectorAll<HTMLInputElement>(`input`)) {\n\t\tif (\n\t\t\tpeer !== input &&\n\t\t\tpeer.type === `radio` &&\n\t\t\tpeer.name === input.name &&\n\t\t\tpeer.form === input.form\n\t\t)\n\t\t\trequests.get(peer)?.()\n\t}\n}\n\n/** Restore controlled fields after event handlers and all queued option/prop updates. */\nexport function bindForm(\n\tcontrol: Control,\n\tprops: Record<string, any>,\n\tscope: Scope,\n): void {\n\tlet active: Event | undefined\n\tlet timer: ReturnType<typeof setTimeout> | undefined\n\tconst restore = () => {\n\t\tif (!isPresent(scope)) return true\n\t\tconst value = props[`value`]\n\t\tconst checked = control.localName === `input` ? props[`checked`] : undefined\n\t\tif (active?.eventPhase) return value == null && checked == null\n\t\tif (value != null) controlValue(control, value)\n\t\tif (checked != null) {\n\t\t\tconst input = control as HTMLInputElement\n\t\t\tif (input.checked !== Boolean(checked)) input.checked = Boolean(checked)\n\t\t}\n\t\treturn true\n\t}\n\tconst finish = () => {\n\t\tactive = undefined\n\t\tclearTimeout(timer)\n\t\tenqueue(scope, wake)\n\t}\n\tconst capture = (event: Event) => {\n\t\tif (event.type === `click` && !/^(checkbox|radio)$/.test(control.type))\n\t\t\treturn\n\t\tactive = event\n\t\tclearTimeout(timer)\n\t\t// A stopped native event never reaches the root's bubble listener.\n\t\ttimer = setTimeout(() => {\n\t\t\trequestRestore(control)\n\t\t}, 0)\n\t}\n\tconst root = scope._root\n\tif (!root._forms) {\n\t\troot._forms = new Set()\n\t\tconst end = (event: Event) => {\n\t\t\tconst target = event.target as Control\n\t\t\t// Checkbox/radio change follows click and input; its handlers must see the edit.\n\t\t\tif (\n\t\t\t\tevent.type === `click` ||\n\t\t\t\t(event.type === `input` && /^(checkbox|radio)$/.test(target.type))\n\t\t\t)\n\t\t\t\treturn\n\t\t\trequestRestore(target)\n\t\t}\n\t\tfor (const event of events) root._host!.addEventListener(event, end)\n\t\troot._cleanups.add(() => {\n\t\t\tfor (const event of events) root._host!.removeEventListener(event, end)\n\t\t})\n\t}\n\tconst forms = root._forms\n\tforms.add(restore)\n\trequests.set(control, finish)\n\tfor (const event of events) control.addEventListener(event, capture, true)\n\tscope._cleanups.add(() => {\n\t\tclearTimeout(timer)\n\t\tforms.delete(restore)\n\t\trequests.delete(control)\n\t\tfor (const event of events) control.removeEventListener(event, capture, true)\n\t})\n}\n","import type { Canonical } from \"atom.io/foundations/canonical\"\n\nimport { capabilityProps } from \"./capabilities.ts\"\nimport type {\n\tAccessor,\n\tChildren,\n\tRootOptions,\n\tScope,\n\tSpaElement,\n} from \"./core.ts\"\nimport {\n\tcreateRoot,\n\tcreateScope,\n\tdispose,\n\tfail,\n\tinvalidate,\n\tobserve,\n\tplain,\n\tuntrack,\n\twithin,\n} from \"./core.ts\"\nimport { bindForm, changeHandler, controlValue } from \"./dom-forms.ts\"\nimport { hotRoot, trackRoot } from \"./hot.ts\"\nimport { identifyChildren, trackKeys } from \"./identity.ts\"\nimport { Fragment } from \"./jsx-runtime.ts\"\nimport type { PresenceCollection } from \"./presence.ts\"\nimport { instanceProps } from \"./props.ts\"\n\nconst HTML = `http://www.w3.org/1999/xhtml`\nconst SVG = `http://www.w3.org/2000/svg`\ntype Cursor = {\n\tnode: Node | null\n\treport(expected: Node | null, found: Node | null): void\n}\ntype RecordNode = {\n\t_value: Children\n\t_scope: Scope\n\t_start: Node\n\t_end: Node\n\t_index: number\n}\nfunction compatible(record: RecordNode, child: Children): boolean {\n\treturn (\n\t\ttypeof record._value === typeof child &&\n\t\t(record._value as SpaElement | null)?.type ===\n\t\t\t(child as SpaElement | null)?.type\n\t)\n}\n\nfunction finish(cursor?: Cursor): void {\n\tif (cursor?.node) {\n\t\tcursor.report(null, cursor.node)\n\t\twhile (cursor.node) {\n\t\t\tconst node: Node = cursor.node\n\t\t\tcursor.node = node.nextSibling\n\t\t\t;(node as ChildNode).remove()\n\t\t}\n\t}\n}\n\nfunction take(\n\tnode: Node,\n\tparent: Node,\n\tbefore: Node | null,\n\towner: Scope,\n\tcursor?: Cursor,\n): Node {\n\tif (\n\t\tcursor &&\n\t\t!(node.nodeType === 3 && !node.nodeValue && cursor.node?.nodeType !== 3)\n\t) {\n\t\tconst found = cursor.node\n\t\tif (\n\t\t\t!found ||\n\t\t\tfound.nodeType !== node.nodeType ||\n\t\t\tfound.nodeName !== node.nodeName ||\n\t\t\t(found as Element).namespaceURI !== (node as Element).namespaceURI ||\n\t\t\t(node.nodeType !== 1 && found.nodeValue !== node.nodeValue)\n\t\t) {\n\t\t\tcursor.report(node, found)\n\t\t\tparent.insertBefore(node, found)\n\t\t\tcursor.node = found?.nextSibling ?? null\n\t\t\t;(found as ChildNode | null)?.remove()\n\t\t} else {\n\t\t\tnode = found\n\t\t\tcursor.node = found.nextSibling\n\t\t}\n\t} else parent.insertBefore(node, cursor ? cursor.node : before)\n\towner._cleanups.add(() => {\n\t\t;(node as ChildNode).remove()\n\t})\n\treturn node\n}\nfunction comment(\n\tvalue: string,\n\tparent: Node,\n\tbefore: Node | null,\n\towner: Scope,\n\tcursor?: Cursor,\n): Node {\n\treturn take(\n\t\tparent.ownerDocument!.createComment(value),\n\t\tparent,\n\t\tbefore,\n\t\towner,\n\t\tcursor,\n\t)\n}\nfunction property(\n\telement: Element,\n\tkey: string,\n\tvalue: any,\n\tprevious: any,\n): void {\n\tif (/^(key|children|ref)$/.test(key)) return\n\tif (key === `innerHTML` && element.localName === `astro-slot`) return\n\tif (\n\t\t/^(innerHTML|outerHTML|textContent|innerText|dangerouslySetInnerHTML)$/.test(\n\t\t\tkey,\n\t\t)\n\t)\n\t\tthrow new Error(import.meta.env.DEV ? `spa: owned content` : undefined)\n\tif (key.startsWith(`on`)) {\n\t\tconst capture = /(?<!Pointer)Capture$/.test(key)\n\t\tconst event = key\n\t\t\t.slice(2, capture ? -7 : undefined)\n\t\t\t.toLowerCase()\n\t\t\t.replace(`doubleclick`, `dblclick`)\n\t\tconst events =\n\t\t\tevent === `change`\n\t\t\t\t? [`input`, `change`]\n\t\t\t\t: [event === `focus` ? `focusin` : event === `blur` ? `focusout` : event]\n\t\tif (previous)\n\t\t\tfor (const name of events)\n\t\t\t\telement.removeEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tevent === `change` ? changeHandler(previous) : previous,\n\t\t\t\t\tcapture,\n\t\t\t\t)\n\t\tif (value != null) {\n\t\t\tif (import.meta.env.DEV && typeof value !== `function`)\n\t\t\t\tthrow new Error(`spa: event handler`)\n\t\t\tfor (const name of events)\n\t\t\t\telement.addEventListener(\n\t\t\t\t\tname,\n\t\t\t\t\tevent === `change` ? changeHandler(value) : value,\n\t\t\t\t\tcapture,\n\t\t\t\t)\n\t\t}\n\t\treturn\n\t}\n\tif (key === `className`) key = `class`\n\tif (key === `htmlFor`) key = `for`\n\tif (\n\t\timport.meta.env.DEV &&\n\t\tkey === `style` &&\n\t\tvalue != null &&\n\t\ttypeof value !== `string`\n\t)\n\t\tthrow new Error(`spa: CSS string required`)\n\tif (\n\t\telement.namespaceURI === SVG &&\n\t\tkey === `focusable` &&\n\t\ttypeof value === `boolean`\n\t)\n\t\tvalue = String(value)\n\tif (\n\t\telement.namespaceURI === HTML &&\n\t\tkey in element &&\n\t\t!/^(style|form|list)$/.test(key)\n\t) {\n\t\tconst target = element as any\n\t\tif (\n\t\t\tkey === `value` &&\n\t\t\t/^(input|textarea|select)$/.test(element.localName) &&\n\t\t\tvalue != null\n\t\t)\n\t\t\tcontrolValue(target, value)\n\t\telse target[key] = value ?? (typeof target[key] === `boolean` ? false : ``)\n\t\tif (value == null) element.removeAttribute(key)\n\t} else if (value == null || (value === false && !/^(aria-|data-)/.test(key)))\n\t\telement.removeAttribute(key)\n\telse\n\t\telement.setAttribute(\n\t\t\tkey,\n\t\t\tvalue === true && !/^(aria-|data-)/.test(key) ? `` : String(value),\n\t\t)\n}\n\nfunction mount(\n\tvalue: Children,\n\tparent: Node,\n\tbefore: Node | null,\n\towner: Scope,\n\tnamespace: string,\n\tcursor?: Cursor,\n\tsource = () => value,\n\tinitialKey?: Canonical,\n): void {\n\tif (typeof value === `function`) {\n\t\tconst begin = comment(`{`, parent, before, owner, cursor)\n\t\tlet end: Node | null = null\n\t\tlet records = new Map<string | number, RecordNode>()\n\t\tlet presence: PresenceCollection<RecordNode, Children> | undefined\n\t\tconst retire = (\n\t\t\trecord: RecordNode,\n\t\t\tkey: unknown,\n\t\t\teligible: boolean,\n\t\t\tindex: number,\n\t\t) => {\n\t\t\tif (presence) presence.remove(record, key, eligible, index, () => {})\n\t\t\telse dispose(record._scope)\n\t\t}\n\t\tlet initial = cursor\n\t\tobserve(\n\t\t\towner,\n\t\t\t() => identifyChildren((source() as () => Children)()),\n\t\t\t(values) => {\n\t\t\t\tpresence ??= owner._root._presence?.collection(\n\t\t\t\t\t(record: RecordNode) => record._scope,\n\t\t\t\t\tcompatible,\n\t\t\t\t)\n\t\t\t\tconst kept = new Map<string | number, RecordNode>()\n\t\t\t\tlet previous: RecordNode | undefined\n\t\t\t\tconst focus = parent.ownerDocument!.activeElement as HTMLElement | null\n\t\t\t\tfor (let index = 0; index < values.length; index++) {\n\t\t\t\t\tconst { value: child, key, id } = values[index]\n\t\t\t\t\tlet record = records.get(id)\n\t\t\t\t\tif (record && !compatible(record, child)) {\n\t\t\t\t\t\tretire(\n\t\t\t\t\t\t\trecord,\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tchild == null || typeof child === `boolean`,\n\t\t\t\t\t\t\trecord._index,\n\t\t\t\t\t\t)\n\t\t\t\t\t\trecord = undefined\n\t\t\t\t\t}\n\t\t\t\t\trecord ??= presence?.take(id, child)\n\t\t\t\t\tif (!record) {\n\t\t\t\t\t\tconst at = previous ? previous._end.nextSibling : begin.nextSibling\n\t\t\t\t\t\tconst childOwner = createScope(owner)\n\t\t\t\t\t\trecord = {\n\t\t\t\t\t\t\t_index: index,\n\t\t\t\t\t\t\t_value: child,\n\t\t\t\t\t\t\t_scope: childOwner,\n\t\t\t\t\t\t\t_start: comment(`[`, parent, at, childOwner, initial),\n\t\t\t\t\t\t\t_end: null!,\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst held = record\n\t\t\t\t\t\tmount(\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\tparent,\n\t\t\t\t\t\t\tat,\n\t\t\t\t\t\t\tchildOwner,\n\t\t\t\t\t\t\tnamespace,\n\t\t\t\t\t\t\tinitial,\n\t\t\t\t\t\t\t() => held._value,\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t)\n\t\t\t\t\t\trecord._end = comment(`]`, parent, at, childOwner, initial)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Frozen descriptors opt into reuse; mutable props and accessors must refresh.\n\t\t\t\t\t\tconst reusable =\n\t\t\t\t\t\t\trecord._value === child &&\n\t\t\t\t\t\t\ttypeof child === `object` &&\n\t\t\t\t\t\t\tchild !== null &&\n\t\t\t\t\t\t\tObject.isFrozen(child) &&\n\t\t\t\t\t\t\tObject.isFrozen((child as SpaElement).props)\n\t\t\t\t\t\trecord._value = child\n\t\t\t\t\t\towner._root._presence?.resume(record._scope)\n\t\t\t\t\t\tif (!reusable) invalidate(record._scope)\n\t\t\t\t\t}\n\t\t\t\t\trecord._index = index\n\t\t\t\t\tprevious = record\n\t\t\t\t\tkept.set(id, record)\n\t\t\t\t}\n\t\t\t\tfor (const [key, record] of records)\n\t\t\t\t\tif (!kept.has(key)) retire(record, key, true, record._index)\n\t\t\t\tif (!initial) {\n\t\t\t\t\tlet at = end ?? before\n\t\t\t\t\tconst rendered = presence?.merge([...kept.values()]) ?? [\n\t\t\t\t\t\t...kept.values(),\n\t\t\t\t\t]\n\t\t\t\t\tfor (const record of rendered.reverse()) {\n\t\t\t\t\t\tif (record._end.nextSibling !== at) {\n\t\t\t\t\t\t\tconst range = parent.ownerDocument!.createRange()\n\t\t\t\t\t\t\trange.setStartBefore(record._start)\n\t\t\t\t\t\t\trange.setEndAfter(record._end)\n\t\t\t\t\t\t\tparent.insertBefore(range.extractContents(), at)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tat = record._start\n\t\t\t\t\t}\n\t\t\t\t\tif (\n\t\t\t\t\t\tfocus?.isConnected &&\n\t\t\t\t\t\t!focus.closest(`[inert]`) &&\n\t\t\t\t\t\tfocus !== parent.ownerDocument!.activeElement\n\t\t\t\t\t)\n\t\t\t\t\t\tfocus.focus({ preventScroll: true })\n\t\t\t\t}\n\t\t\t\tinitial = undefined\n\t\t\t\trecords = kept\n\t\t\t},\n\t\t)\n\t\tend = comment(`}`, parent, before, owner, cursor)\n\t\treturn\n\t}\n\tif (Array.isArray(value)) {\n\t\tfor (const child of value)\n\t\t\tmount(child, parent, before, owner, namespace, cursor)\n\t\treturn\n\t}\n\tif (value == null || typeof value === `boolean`) return\n\tif (typeof value !== `object`) {\n\t\tcomment(`t`, parent, before, owner, cursor)\n\t\tconst text = take(\n\t\t\tparent.ownerDocument!.createTextNode(String(value)),\n\t\t\tparent,\n\t\t\tbefore,\n\t\t\towner,\n\t\t\tcursor,\n\t\t)\n\t\tobserve(owner, source as Accessor<string | number | bigint>, (next) => {\n\t\t\tconst data = String(next)\n\t\t\tif (text.nodeValue !== data) text.nodeValue = data\n\t\t})\n\t\treturn\n\t}\n\tif (import.meta.env.DEV && (!(`type` in value) || !(`props` in value)))\n\t\tthrow new Error(`spa: invalid child`)\n\tconst vnode = value as SpaElement\n\tconst props = instanceProps(() => (source() as SpaElement).props, initialKey)\n\tif (!vnode.type || vnode.type === Fragment) {\n\t\tmount(() => props[`children`], parent, before, owner, namespace, cursor)\n\t\treturn\n\t}\n\tif (typeof vnode.type === `function`) {\n\t\tconst childOwner = createScope(owner)\n\t\tconst output = within(childOwner, () =>\n\t\t\tuntrack(() => (vnode.type as Function)(props)),\n\t\t)\n\t\tmount(trackKeys(output), parent, before, childOwner, namespace, cursor)\n\t\treturn\n\t}\n\tconst ns = vnode.type === `svg` ? SVG : namespace\n\tconst element = take(\n\t\tparent.ownerDocument!.createElementNS(ns, vnode.type),\n\t\tparent,\n\t\tbefore,\n\t\towner,\n\t\tcursor,\n\t) as Element\n\tif (ns === HTML && /^(input|textarea|select)$/.test(vnode.type))\n\t\tbindForm(element as HTMLInputElement, props, owner)\n\tif (ns === HTML && (props[`autoFocus`] || props[`autofocus`])) {\n\t\towner._root._mounts!.push(() => {\n\t\t\tif (!owner._dead) (element as HTMLElement).focus()\n\t\t})\n\t}\n\tif (vnode.type === `astro-slot`) {\n\t\tif (!cursor) element.innerHTML = props[`innerHTML`] ?? ``\n\t} else if (ns === HTML && /^(textarea|title|style|script)$/.test(vnode.type)) {\n\t\tobserve(\n\t\t\towner,\n\t\t\t() =>\n\t\t\t\tplain(\n\t\t\t\t\tvnode.type === `textarea`\n\t\t\t\t\t\t? (props[`value`] ?? props[`children`])\n\t\t\t\t\t\t: props[`children`],\n\t\t\t\t),\n\t\t\t(text) => {\n\t\t\t\tif (element.textContent !== text) element.textContent = text\n\t\t\t},\n\t\t)\n\t} else {\n\t\tconst children = cursor\n\t\t\t? { node: element.firstChild, report: cursor.report }\n\t\t\t: undefined\n\t\tif (\n\t\t\t!/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/.test(\n\t\t\t\tvnode.type,\n\t\t\t) ||\n\t\t\tns !== HTML\n\t\t)\n\t\t\tmount(\n\t\t\t\t() => props[`children`],\n\t\t\t\telement,\n\t\t\t\tnull,\n\t\t\t\towner,\n\t\t\t\tvnode.type === `foreignObject` ? HTML : ns,\n\t\t\t\tchildren,\n\t\t\t)\n\t\tfinish(children)\n\t}\n\tlet previous: Record<string, any> = {}\n\tconst nativeProps = capabilityProps(\n\t\towner,\n\t\t{ kind: `dom`, node: element },\n\t\t() => ({ ...props }),\n\t\t(next) => {\n\t\t\tconst previousStyle =\n\t\t\t\tprevious[`style`] !== next[`style`]\n\t\t\t\t\t? (element.getAttribute(`style`) ?? ``)\n\t\t\t\t\t: undefined\n\t\t\tfor (const key in { ...previous, ...next })\n\t\t\t\tif (\n\t\t\t\t\t!Object.is(previous[key], next[key]) ||\n\t\t\t\t\ttypeof next[key] === `object`\n\t\t\t\t) {\n\t\t\t\t\tproperty(element, key, next[key], previous[key])\n\t\t\t\t\tprevious[key] = next[key]\n\t\t\t\t}\n\t\t\tprevious = next\n\t\t\treturn previousStyle\n\t\t},\n\t)\n\towner._cleanups.add(() => {\n\t\tfor (const key in previous)\n\t\t\tif (key.startsWith(`on`)) property(element, key, null, previous[key])\n\t})\n\tobserve(owner, () => ({ ...props }), nativeProps)\n\tconst ref = untrack(() => props[`ref`])\n\tif (ref) {\n\t\towner._root._mounts!.unshift(() => {\n\t\t\tif (!owner._dead) {\n\t\t\t\towner._cleanups.add(() => ref(null))\n\t\t\t\twithin(owner, () => ref(element))\n\t\t\t}\n\t\t})\n\t}\n}\n\nexport interface SpaRoot {\n\tdispose(): void\n\tflush(): void\n}\nfunction start(\n\tsetup: () => Children,\n\thost: Element,\n\toptions: RootOptions,\n\thydrating: boolean,\n\tbefore: Node | null = null,\n): SpaRoot {\n\tlet reported = false\n\tconst cursor: Cursor | undefined = hydrating\n\t\t? {\n\t\t\t\tnode: host.firstChild,\n\t\t\t\treport(expected, found) {\n\t\t\t\t\tif (!reported) {\n\t\t\t\t\t\treported = true\n\t\t\t\t\t\t// eslint-disable-next-line no-console -- Recoverable degradation must remain human-readable in production.\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t`spa: hydration mismatch. Repairing server HTML to match the browser view; replaced nodes may lose focus or unsaved input.`,\n\t\t\t\t\t\t\t{ host, expected, found },\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t: undefined\n\tconst marker = cursor?.node\n\tconst prefix =\n\t\tmarker?.nodeType === 8 && marker.nodeValue?.startsWith(`w:`)\n\t\t\t? marker.nodeValue.slice(2)\n\t\t\t: undefined\n\tconst root = createRoot(options)\n\troot._host = host\n\tif (prefix !== undefined && options.idPrefix === undefined)\n\t\troot._prefix = prefix\n\tif (import.meta.env.DEV) trackRoot(root)\n\ttry {\n\t\tcomment(`w:${root._prefix}`, host, before, root, cursor)\n\t\twithin(root, () => {\n\t\t\tmount(\n\t\t\t\ttrackKeys(untrack(setup)),\n\t\t\t\thost,\n\t\t\t\tbefore,\n\t\t\t\troot,\n\t\t\t\thost.namespaceURI === SVG ? SVG : HTML,\n\t\t\t\tcursor,\n\t\t\t)\n\t\t})\n\t\tcomment(`/w`, host, before, root, cursor)\n\t\tfinish(cursor)\n\t\troot.flush()\n\t} catch (error) {\n\t\tfail(root, error)\n\t}\n\treturn {\n\t\tdispose: () => {\n\t\t\tdispose(root)\n\t\t},\n\t\tflush: root.flush,\n\t}\n}\nexport function render(\n\tsetup: () => Children,\n\thost: Element,\n\toptions: RootOptions = {},\n): SpaRoot {\n\tif (import.meta.env.DEV)\n\t\treturn hotRoot(\n\t\t\t(next, before) => start(setup, host, next, false, before),\n\t\t\toptions,\n\t\t\thost,\n\t\t)\n\treturn start(setup, host, options, false)\n}\nexport function hydrate(\n\tsetup: () => Children,\n\thost: Element,\n\toptions: RootOptions = {},\n): SpaRoot {\n\tif (import.meta.env.DEV) {\n\t\tlet initial = true\n\t\treturn hotRoot(\n\t\t\t(next, before) => {\n\t\t\t\tconst current = start(setup, host, next, initial, before)\n\t\t\t\tinitial = false\n\t\t\t\treturn current\n\t\t\t},\n\t\t\toptions,\n\t\t\thost,\n\t\t)\n\t}\n\treturn start(setup, host, options, true)\n}\n"],"mappings":";;;;AAIA,MAAM,0BAAU,IAAI,QAAsC;AAC1D,MAAM,2BAAW,IAAI,QAA6B;AAClD,MAAM,SAAS;CAAC;CAAS;CAAU;AAAO;AAC1C,MAAM,aAAa,CAAC;;AAGpB,SAAgB,cAAc,SAAuC;CACpE,IAAI,UAAU,QAAQ,IAAI,OAAO;CACjC,IAAI,CAAC,SAAS;EACb,WAAW,UAAU;GACpB,MAAM,SAAS,MAAM;GACrB,MAAM,UACL,QAAQ,cAAc,cACrB,QAAQ,c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AAC,IACxB,KAAA;CACJ,MAAM,OAAO,WAAW,OAAO;CAC/B,KAAK,QAAQ;CACb,IAAI,WAAW,KAAA,KAAa,QAAQ,aAAa,KAAA,GAChD,KAAK,UAAU;CAEhB,IAAI;EACH,QAAQ,KAAK,KAAK,WAAW,MAAM,QAAQ,MAAM,MAAM;EACvD,OAAO,YAAY;GAClB,MACC,UAAU,QAAQ,KAAK,CAAC,GACxB,MACA,QACA,MACA,KAAK,iBAAiB,MAAM,MAAM,MAClC,MACD;EACD,CAAC;EACD,QAAQ,MAAM,MAAM,QAAQ,MAAM,MAAM;EACxC,OAAO,MAAM;EACb,KAAK,MAAM;CACZ,SAAS,OAAO;EACf,KAAK,MAAM,KAAK;CACjB;CACA,OAAO;EACN,eAAe;GACd,QAAQ,IAAI;EACb;EACA,OAAO,KAAK;CACb;AACD;AACA,SAAgB,OACf,OACA,MACA,UAAuB,CAAC,GACd;CAOV,OAAO,MAAM,OAAO,MAAM,SAAS,KAAK;AACzC;AACA,SAAgB,QACf,OACA,MACA,UAAuB,CAAC,GACd;CAaV,OAAO,MAAM,OAAO,MAAM,SAAS,IAAI;AACxC"}
@@ -1,5 +1,5 @@
1
- import { t as Capability } from "./capabilities-ChgSs6bp.js";
2
1
  import { AutoUpdateOptions, Middleware, Placement, ReferenceElement, Strategy } from "@floating-ui/dom";
2
+ import { t as Capability } from "./capabilities-BNnXgvo5.js";
3
3
  export interface FloatingAttributes<Kind extends string = `dom`> {
4
4
  [`floating:reference`]?: Kind extends `dom` ? ReferenceElement | null : never;
5
5
  [`floating:placement`]?: Kind extends `dom` ? Placement : never;
package/dist/floating.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as within, f as onMount, h as reportScopeError } from "./core-DD2giR6E.js";
2
1
  import { autoUpdate, computePosition } from "@floating-ui/dom";
2
+ import { D as within, f as onMount, h as reportScopeError } from "./core-N07x1OaR.js";
3
3
  // src/floating.ts
4
4
  const allowed = /* @__PURE__ */ new Set([
5
5
  `reference`,
package/dist/hot.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { l as RootOptions, o as Component, s as Root } from "./capabilities-ChgSs6bp.js";
1
+ import { l as RootOptions, o as Component, s as Root } from "./capabilities-BNnXgvo5.js";
2
2
  interface Handle {
3
3
  dispose(): void;
4
4
  flush(): void;
package/dist/hot.js CHANGED
@@ -1,5 +1,5 @@
1
- import { u as onCleanup } from "./core-DD2giR6E.js";
2
1
  import "atom.io/internal";
2
+ import { u as onCleanup } from "./core-N07x1OaR.js";
3
3
  // src/hot.ts
4
4
  /** Development protocol used by the Vite transform. */
5
5
  function registerComponent(id, name, implementation) {
@@ -1,4 +1,4 @@
1
- import { _ as scopeCapabilities, c as isPresent } from "./core-DrUd8x25.js";
1
+ import { _ as scopeCapabilities, c as isPresent } from "./core-N07x1OaR.js";
2
2
  import { packCanonical } from "atom.io/foundations/canonical";
3
3
  // src/capabilities.ts
4
4
  function capabilityNamespace(key) {
@@ -118,4 +118,4 @@ function identifyChildren(output, duplicate = `spa: duplicate key`) {
118
118
  }
119
119
  export { validateCapabilities as a, capabilityProps as i, trackKeys as n, capabilityNamespace as r, identifyChildren as t };
120
120
 
121
- //# sourceMappingURL=identity-B8wTFkyW.js.map
121
+ //# sourceMappingURL=identity-wPtz6EJM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity-ByJswZtF.js","names":[],"sources":["../src/capabilities.ts","../src/identity.ts"],"sourcesContent":["import type { Cleanup, Root, Scope } from \"./core.ts\"\nimport { isPresent, scopeCapabilities } from \"./core.ts\"\nimport type { ExitHandle, PresenceCoordinator } from \"./presence.ts\"\n\n/** Native renderers expose property access without importing capability engines. */\nexport interface CapabilityTarget {\n\tkind: string\n\tnode: unknown\n\tsuspend?(): Cleanup\n\tread?(key: string): unknown\n\twrite?(key: string, value: unknown): void\n\tlisten?(event: string, listener: () => void): Cleanup\n}\nexport interface CapabilityBinding {\n\texit?(props: Record<string, unknown>): ExitHandle | undefined\n\tresume?(): void\n\t/** Inline CSS before native style replacement, for restoring capability-owned values. */\n\tupdate(props: Record<string, unknown>, previousStyle?: string): void\n\tdispose(): void\n}\nexport interface Capability {\n\tnamespace: string\n\t/** Prepare a synchronous update batch and return its commit callback. */\n\tbeforeUpdate?(root: Root): Cleanup\n\tpresence?(root: Root): PresenceCoordinator\n\tscheduleFrame?(callback: (time: number) => void): Cleanup\n\t/** SPA supplies ownership for integrations that measure after mount or report async errors. */\n\tattach(target: CapabilityTarget, scope?: Scope): CapabilityBinding\n}\ntype EventHandler = (this: unknown, ...args: unknown[]) => unknown\n\nexport function capabilityNamespace(key: string): string | undefined {\n\tconst colon = key.indexOf(`:`)\n\tif (colon < 0) return undefined\n\tconst namespace = key.slice(0, colon)\n\treturn /^(xml|xmlns|xlink)$/.test(namespace) ? undefined : namespace\n}\nfunction requireCapability(\n\tcapabilities: Map<string, Capability>,\n\tnamespace: string,\n) {\n\tconst capability = capabilities.get(namespace)\n\tif (!capability)\n\t\tthrow new Error(\n\t\t\t`spa: capability \"${namespace}\" is not registered for this root`,\n\t\t)\n\treturn capability\n}\nexport function validateCapabilities(\n\tscope: Scope,\n\tprops: Record<string, unknown>,\n): void {\n\tconst capabilities = scopeCapabilities(scope)\n\tfor (const key of Object.keys(props)) {\n\t\tconst namespace = capabilityNamespace(key)\n\t\tif (namespace) requireCapability(capabilities, namespace)\n\t}\n}\n\n/** Separate framework properties from native attributes and own their bindings. */\nexport function capabilityProps(\n\tscope: Scope,\n\ttarget: CapabilityTarget,\n\tread?: () => Record<string, any>,\n\tapplyNative?: (props: Record<string, any>) => string | undefined,\n): (props: Record<string, any>) => Record<string, any> {\n\tconst root = scope._root\n\tconst bindings = new Map<Capability, CapabilityBinding>()\n\tlet handlers: WeakMap<EventHandler, EventHandler> | undefined\n\tconst event = (handler: EventHandler) => {\n\t\tconst cache = (handlers ??= new WeakMap())\n\t\tlet wrapped = cache.get(handler)\n\t\tif (!wrapped) {\n\t\t\twrapped = function (this: unknown, ...args: unknown[]) {\n\t\t\t\t// Presence may activate after this listener mounts.\n\t\t\t\tif (!root._presence || isPresent(scope)) return handler.apply(this, args)\n\t\t\t}\n\t\t\tcache.set(handler, wrapped)\n\t\t}\n\t\treturn wrapped\n\t}\n\n\tif (root._presence) root._presence.target(scope, target)\n\telse (scope._targets ??= new Set()).add(target)\n\tconst cleanup: Cleanup = () => {\n\t\tconst errors: unknown[] = []\n\t\tfor (const binding of [...bindings.values()].reverse()) {\n\t\t\ttry {\n\t\t\t\tbinding.dispose()\n\t\t\t} catch (error) {\n\t\t\t\terrors.push(error)\n\t\t\t}\n\t\t}\n\t\tbindings.clear()\n\t\tif (errors.length) throw new AggregateError(errors)\n\t}\n\tscope._cleanups.add(cleanup)\n\treturn (props) => {\n\t\tconst capabilities = scopeCapabilities(scope)\n\t\tconst native: Record<string, any> = {}\n\t\tconst groups = new Map<Capability, Record<string, unknown>>()\n\t\tfor (const key of Object.keys(props)) {\n\t\t\tconst namespace = capabilityNamespace(key)\n\t\t\tif (!namespace) {\n\t\t\t\tconst value = props[key]\n\t\t\t\tnative[key] =\n\t\t\t\t\tkey.startsWith(`on`) && typeof value === `function`\n\t\t\t\t\t\t? event(value)\n\t\t\t\t\t\t: value\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst capability = requireCapability(capabilities, namespace)\n\t\t\tconst group = groups.get(capability) ?? {}\n\t\t\tgroup[key.slice(namespace.length + 1)] = props[key]\n\t\t\tgroups.set(capability, group)\n\t\t}\n\t\tconst previousStyle = applyNative?.(native)\n\t\tfor (const [capability, values] of groups) {\n\t\t\tlet binding = bindings.get(capability)\n\t\t\tif (!binding) {\n\t\t\t\tbinding = capability.attach(target, scope)\n\t\t\t\tbindings.set(capability, binding)\n\t\t\t\troot._presence?.bind(\n\t\t\t\t\tscope,\n\t\t\t\t\tbinding,\n\t\t\t\t\tread ?? (() => props),\n\t\t\t\t\tcapability.namespace,\n\t\t\t\t)\n\t\t\t}\n\t\t\tif (previousStyle !== undefined) binding.update(values, previousStyle)\n\t\t\telse binding.update(values)\n\t\t}\n\t\tfor (const [capability, binding] of bindings)\n\t\t\tif (!groups.has(capability)) {\n\t\t\t\tbindings.delete(capability)\n\t\t\t\troot._presence?.unbind(binding)\n\t\t\t\tbinding.dispose()\n\t\t\t}\n\t\treturn native\n\t}\n}\n","import type { Canonical } from \"atom.io/foundations/canonical\"\nimport { packCanonical } from \"atom.io/foundations/canonical\"\n\nimport type { Children, SpaElement } from \"./core.ts\"\n\ntype Props = SpaElement[`props`]\ntype Key = Canonical | undefined\ntype Identity = string | number\n\nfunction childProps(value: Children): Props | undefined {\n\treturn (value as SpaElement | null)?.props\n}\n\nfunction hasKey(value: Children): boolean {\n\tif (Array.isArray(value)) return value.some(hasKey)\n\tconst props = childProps(value)\n\treturn props !== undefined && Object.hasOwn(props, `key`)\n}\n\n/** Direct output opts into key tracking when it first mounts. */\nexport function trackKeys(value: Children): Children {\n\treturn hasKey(value) ? () => value : value\n}\n\nexport function identifyChildren(\n\toutput: Children,\n\tduplicate = `spa: duplicate key`,\n): { value: Children; key: Key; id: Identity }[] {\n\tconst values = ([output] as unknown[]).flat(Infinity) as Children[]\n\tconst seen = new Set<string>()\n\treturn values.map((value, index) => {\n\t\tconst key: Key = childProps(value)?.[`key`]\n\t\tif (key === undefined) return { value, key, id: index }\n\t\tconst id = packCanonical(key)\n\t\tif (seen.has(id)) throw new Error(duplicate)\n\t\tseen.add(id)\n\t\treturn { value, key, id }\n\t})\n}\n"],"mappings":";;;AA+BA,SAAgB,oBAAoB,KAAiC;CACpE,MAAM,QAAQ,IAAI,QAAQ,GAAG;CAC7B,IAAI,QAAQ,GAAG,OAAO,KAAA;CACtB,MAAM,YAAY,IAAI,MAAM,GAAG,KAAK;CACpC,OAAO,sBAAsB,KAAK,SAAS,IAAI,KAAA,IAAY;AAC5D;AACA,SAAS,kBACR,cACA,WACC;CACD,MAAM,aAAa,aAAa,IAAI,SAAS;CAC7C,IAAI,CAAC,YACJ,MAAM,IAAI,MACT,oBAAoB,UAAU,kCAC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KAAQ;CACpD,MAAM,uBAAO,IAAI,IAAY;CAC7B,OAAO,OAAO,KAAK,OAAO,UAAU;EACnC,MAAM,MAAW,WAAW,KAAK,CAAC,GAAG;EACrC,IAAI,QAAQ,KAAA,GAAW,OAAO;GAAE;GAAO;GAAK,IAAI;EAAM;EACtD,MAAM,KAAK,cAAc,GAAG;EAC5B,IAAI,KAAK,IAAI,EAAE,GAAG,MAAM,IAAI,MAAM,SAAS;EAC3C,KAAK,IAAI,EAAE;EACX,OAAO;GAAE;GAAO;GAAK;EAAG;CACzB,CAAC;AACF"}
1
+ {"version":3,"file":"identity-wPtz6EJM.js","names":[],"sources":["../src/capabilities.ts","../src/identity.ts"],"sourcesContent":["import type { Cleanup, Root, Scope } from \"./core.ts\"\nimport { isPresent, scopeCapabilities } from \"./core.ts\"\nimport type { ExitHandle, PresenceCoordinator } from \"./presence.ts\"\n\n/** Native renderers expose property access without importing capability engines. */\nexport interface CapabilityTarget {\n\tkind: string\n\tnode: unknown\n\tsuspend?(): Cleanup\n\tread?(key: string): unknown\n\twrite?(key: string, value: unknown): void\n\tlisten?(event: string, listener: () => void): Cleanup\n}\nexport interface CapabilityBinding {\n\texit?(props: Record<string, unknown>): ExitHandle | undefined\n\tresume?(): void\n\t/** Inline CSS before native style replacement, for restoring capability-owned values. */\n\tupdate(props: Record<string, unknown>, previousStyle?: string): void\n\tdispose(): void\n}\nexport interface Capability {\n\tnamespace: string\n\t/** Prepare a synchronous update batch and return its commit callback. */\n\tbeforeUpdate?(root: Root): Cleanup\n\tpresence?(root: Root): PresenceCoordinator\n\tscheduleFrame?(callback: (time: number) => void): Cleanup\n\t/** SPA supplies ownership for integrations that measure after mount or report async errors. */\n\tattach(target: CapabilityTarget, scope?: Scope): CapabilityBinding\n}\ntype EventHandler = (this: unknown, ...args: unknown[]) => unknown\n\nexport function capabilityNamespace(key: string): string | undefined {\n\tconst colon = key.indexOf(`:`)\n\tif (colon < 0) return undefined\n\tconst namespace = key.slice(0, colon)\n\treturn /^(xml|xmlns|xlink)$/.test(namespace) ? undefined : namespace\n}\nfunction requireCapability(\n\tcapabilities: Map<string, Capability>,\n\tnamespace: string,\n) {\n\tconst capability = capabilities.get(namespace)\n\tif (!capability)\n\t\tthrow new Error(\n\t\t\t`spa: capability \"${namespace}\" is not registered for this root`,\n\t\t)\n\treturn capability\n}\nexport function validateCapabilities(\n\tscope: Scope,\n\tprops: Record<string, unknown>,\n): void {\n\tconst capabilities = scopeCapabilities(scope)\n\tfor (const key of Object.keys(props)) {\n\t\tconst namespace = capabilityNamespace(key)\n\t\tif (namespace) requireCapability(capabilities, namespace)\n\t}\n}\n\n/** Separate framework properties from native attributes and own their bindings. */\nexport function capabilityProps(\n\tscope: Scope,\n\ttarget: CapabilityTarget,\n\tread?: () => Record<string, any>,\n\tapplyNative?: (props: Record<string, any>) => string | undefined,\n): (props: Record<string, any>) => Record<string, any> {\n\tconst root = scope._root\n\tconst bindings = new Map<Capability, CapabilityBinding>()\n\tlet handlers: WeakMap<EventHandler, EventHandler> | undefined\n\tconst event = (handler: EventHandler) => {\n\t\tconst cache = (handlers ??= new WeakMap())\n\t\tlet wrapped = cache.get(handler)\n\t\tif (!wrapped) {\n\t\t\twrapped = function (this: unknown, ...args: unknown[]) {\n\t\t\t\t// Presence may activate after this listener mounts.\n\t\t\t\tif (!root._presence || isPresent(scope)) return handler.apply(this, args)\n\t\t\t}\n\t\t\tcache.set(handler, wrapped)\n\t\t}\n\t\treturn wrapped\n\t}\n\n\tif (root._presence) root._presence.target(scope, target)\n\telse (scope._targets ??= new Set()).add(target)\n\tconst cleanup: Cleanup = () => {\n\t\tconst errors: unknown[] = []\n\t\tfor (const binding of [...bindings.values()].reverse()) {\n\t\t\ttry {\n\t\t\t\tbinding.dispose()\n\t\t\t} catch (error) {\n\t\t\t\terrors.push(error)\n\t\t\t}\n\t\t}\n\t\tbindings.clear()\n\t\tif (errors.length) throw new AggregateError(errors)\n\t}\n\tscope._cleanups.add(cleanup)\n\treturn (props) => {\n\t\tconst capabilities = scopeCapabilities(scope)\n\t\tconst native: Record<string, any> = {}\n\t\tconst groups = new Map<Capability, Record<string, unknown>>()\n\t\tfor (const key of Object.keys(props)) {\n\t\t\tconst namespace = capabilityNamespace(key)\n\t\t\tif (!namespace) {\n\t\t\t\tconst value = props[key]\n\t\t\t\tnative[key] =\n\t\t\t\t\tkey.startsWith(`on`) && typeof value === `function`\n\t\t\t\t\t\t? event(value)\n\t\t\t\t\t\t: value\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tconst capability = requireCapability(capabilities, namespace)\n\t\t\tconst group = groups.get(capability) ?? {}\n\t\t\tgroup[key.slice(namespace.length + 1)] = props[key]\n\t\t\tgroups.set(capability, group)\n\t\t}\n\t\tconst previousStyle = applyNative?.(native)\n\t\tfor (const [capability, values] of groups) {\n\t\t\tlet binding = bindings.get(capability)\n\t\t\tif (!binding) {\n\t\t\t\tbinding = capability.attach(target, scope)\n\t\t\t\tbindings.set(capability, binding)\n\t\t\t\troot._presence?.bind(\n\t\t\t\t\tscope,\n\t\t\t\t\tbinding,\n\t\t\t\t\tread ?? (() => props),\n\t\t\t\t\tcapability.namespace,\n\t\t\t\t)\n\t\t\t}\n\t\t\tif (previousStyle !== undefined) binding.update(values, previousStyle)\n\t\t\telse binding.update(values)\n\t\t}\n\t\tfor (const [capability, binding] of bindings)\n\t\t\tif (!groups.has(capability)) {\n\t\t\t\tbindings.delete(capability)\n\t\t\t\troot._presence?.unbind(binding)\n\t\t\t\tbinding.dispose()\n\t\t\t}\n\t\treturn native\n\t}\n}\n","import type { Canonical } from \"atom.io/foundations/canonical\"\nimport { packCanonical } from \"atom.io/foundations/canonical\"\n\nimport type { Children, SpaElement } from \"./core.ts\"\n\ntype Props = SpaElement[`props`]\ntype Key = Canonical | undefined\ntype Identity = string | number\n\nfunction childProps(value: Children): Props | undefined {\n\treturn (value as SpaElement | null)?.props\n}\n\nfunction hasKey(value: Children): boolean {\n\tif (Array.isArray(value)) return value.some(hasKey)\n\tconst props = childProps(value)\n\treturn props !== undefined && Object.hasOwn(props, `key`)\n}\n\n/** Direct output opts into key tracking when it first mounts. */\nexport function trackKeys(value: Children): Children {\n\treturn hasKey(value) ? () => value : value\n}\n\nexport function identifyChildren(\n\toutput: Children,\n\tduplicate = `spa: duplicate key`,\n): { value: Children; key: Key; id: Identity }[] {\n\tconst values = ([output] as unknown[]).flat(Infinity) as Children[]\n\tconst seen = new Set<string>()\n\treturn values.map((value, index) => {\n\t\tconst key: Key = childProps(value)?.[`key`]\n\t\tif (key === undefined) return { value, key, id: index }\n\t\tconst id = packCanonical(key)\n\t\tif (seen.has(id)) throw new Error(duplicate)\n\t\tseen.add(id)\n\t\treturn { value, key, id }\n\t})\n}\n"],"mappings":";;;AA+BA,SAAgB,oBAAoB,KAAiC;CACpE,MAAM,QAAQ,IAAI,QAAQ,GAAG;CAC7B,IAAI,QAAQ,GAAG,OAAO,KAAA;CACtB,MAAM,YAAY,IAAI,MAAM,GAAG,KAAK;CACpC,OAAO,sBAAsB,KAAK,SAAS,IAAI,KAAA,IAAY;AAC5D;AACA,SAAS,kBACR,cACA,WACC;CACD,MAAM,aAAa,aAAa,IAAI,SAAS;CAC7C,IAAI,CAAC,YACJ,MAAM,IAAI,MACT,oBAAoB,UAAU,kCAC/B;CACD,OAAO;AACR;AACA,SAAgB,qBACf,OACA,OACO;CACP,MAAM,eAAe,kBAAkB,KAAK;CAC5C,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,GAAG;EACrC,MAAM,YAAY,oBAAoB,GAAG;EACzC,IAAI,WAAW,kBAAkB,cAAc,SAAS;CACzD;AACD;;AAGA,SAAgB,gBACf,OACA,QACA,MACA,aACsD;CACtD,MAAM,OAAO,MAAM;CACnB,MAAM,2BAAW,IAAI,IAAmC;CACxD,IAAI;CACJ,MAAM,SAAS,YAA0B;EACxC,MAAM,QAAS,6BAAa,IAAI,QAAQ;EACxC,IAAI,UAAU,MAAM,IAAI,OAAO;EAC/B,IAAI,CAAC,SAAS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time-CCvcEosg.js";
3
- import { Canonical } from "atom.io/foundations/canonical";
1
+ import { a as Children, i as Accessor, l as RootOptions } from "./capabilities-BNnXgvo5.js";
2
+ import "./jsx-runtime-CjiJSx5m.js";
4
3
  import { Loadable, ReadableFamilyToken, ReadableToken, ViewOf } from "atom.io";
4
+ import { Canonical } from "atom.io/foundations/canonical";
5
5
  interface SpaRoot {
6
6
  dispose(): void;
7
7
  flush(): void;
@@ -21,4 +21,4 @@ declare function useLoadable<T, K extends Canonical, E>(token: ReadableFamilyTok
21
21
  error?: E;
22
22
  }>;
23
23
  export { render as a, hydrate as i, useLoadable as n, SpaRoot as r, LoadableValue as t };
24
- //# sourceMappingURL=index-DdA39aMv.d.ts.map
24
+ //# sourceMappingURL=index-2AKIR8up.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-DdA39aMv.d.ts","names":[],"sources":["../src/dom.ts","../src/use-loadable.ts"],"mappings":";;;;UA+aiB;EAChB;EACA;;iBA4De,OACf,aAAa,UACb,MAAM,SACN,UAAS,cACP;iBASa,QACf,aAAa,UACb,MAAM,SACN,UAAS,cACP;KCnfS,cAAc;EAAO;EAAkB,OAAO;;iBAE1C,YAAY,GAAG,GAC9B,OAAO,cAAc,SAAS,SAAS,KACrC,qBAAqB,cAAc,OAAO,IAAI;iBACjC,YAAY,GAAG,UAAU,WAAW,GACnD,OAAO,oBAAoB,SAAS,IAAI,GAAG,IAC3C,KAAK,QAAQ,KACX,qBAAqB,cAAc,OAAO,IAAI;iBACjC,YAAY,GAAG,GAC9B,OAAO,cAAc,SAAS,SAAS,IACvC,UAAU,QAAQ,KAChB,SAAS,cAAc,OAAO;EAAQ,QAAQ;;iBACjC,YAAY,GAAG,UAAU,WAAW,GACnD,OAAO,oBAAoB,SAAS,IAAI,GAAG,IAC3C,KAAK,QAAQ,IACb,UAAU,QAAQ,KAChB,SAAS,cAAc,OAAO;EAAQ,QAAQ"}
1
+ {"version":3,"file":"index-2AKIR8up.d.ts","names":[],"sources":["../src/dom.ts","../src/use-loadable.ts"],"mappings":";;;;UA+aiB;EAChB;EACA;;iBA4De,OACf,aAAa,UACb,MAAM,SACN,UAAS,cACP;iBASa,QACf,aAAa,UACb,MAAM,SACN,UAAS,cACP;KCnfS,cAAc;EAAO;EAAkB,OAAO;;iBAE1C,YAAY,GAAG,GAC9B,OAAO,cAAc,SAAS,SAAS,KACrC,qBAAqB,cAAc,OAAO,IAAI;iBACjC,YAAY,GAAG,UAAU,WAAW,GACnD,OAAO,oBAAoB,SAAS,IAAI,GAAG,IAC3C,KAAK,QAAQ,KACX,qBAAqB,cAAc,OAAO,IAAI;iBACjC,YAAY,GAAG,GAC9B,OAAO,cAAc,SAAS,SAAS,IACvC,UAAU,QAAQ,KAChB,SAAS,cAAc,OAAO;EAAQ,QAAQ;;iBACjC,YAAY,GAAG,UAAU,WAAW,GACnD,OAAO,oBAAoB,SAAS,IAAI,GAAG,IAC3C,KAAK,QAAQ,IACb,UAAU,QAAQ,KAChB,SAAS,cAAc,OAAO;EAAQ,QAAQ"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as useTransaction, _ as useId, a as Children, b as useStore, c as RootBoundary, d as TimelineControls, f as onCleanup, g as useGetter, h as useDisposal, i as Accessor, l as RootOptions, m as onMount, n as CapabilityBinding, o as Component, p as onCommit, r as CapabilityTarget, t as Capability, u as SpaElement, v as useRef, x as useTimeline, y as useSetter } from "./capabilities-ChgSs6bp.js";
2
- import { a as render, i as hydrate, n as useLoadable, r as SpaRoot, t as LoadableValue } from "./index-DdA39aMv.js";
3
- import { n as Fragment } from "./jsx-runtime-CCvcEosg.js";
1
+ import { S as useTransaction, _ as useId, a as Children, b as useStore, c as RootBoundary, d as TimelineControls, f as onCleanup, g as useGetter, h as useDisposal, i as Accessor, l as RootOptions, m as onMount, n as CapabilityBinding, o as Component, p as onCommit, r as CapabilityTarget, t as Capability, u as SpaElement, v as useRef, x as useTimeline, y as useSetter } from "./capabilities-BNnXgvo5.js";
2
+ import { a as render, i as hydrate, n as useLoadable, r as SpaRoot, t as LoadableValue } from "./index-2AKIR8up.js";
3
+ import { n as Fragment } from "./jsx-runtime-CjiJSx5m.js";
4
4
  export { type Accessor, type Capability, type CapabilityBinding, type CapabilityTarget, type Children, type Component, Fragment, type LoadableValue, RootBoundary as Root, type RootOptions, type SpaElement, type SpaRoot, type TimelineControls, hydrate, onCleanup, onCommit, onMount, render, useDisposal, useGetter, useId, useLoadable, useRef, useSetter, useStore, useTimeline, useTransaction };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as useSetter, E as useTransaction, S as useRef, T as useTimeline, b as useGetter, d as onCommit, f as onMount, t as RootBoundary, u as onCleanup, w as useStore, x as useId, y as useDisposal } from "./core-DD2giR6E.js";
2
- import { n as render, t as hydrate } from "./dom-DUpa3Sj2.js";
3
- import { t as Fragment } from "./jsx-runtime-BGDPK50B.js";
4
- import { t as useLoadable } from "./src-B2W_TA_X.js";
1
+ import { C as useSetter, E as useTransaction, S as useRef, T as useTimeline, b as useGetter, d as onCommit, f as onMount, t as RootBoundary, u as onCleanup, w as useStore, x as useId, y as useDisposal } from "./core-N07x1OaR.js";
2
+ import { n as render, t as hydrate } from "./dom-BbfEAPpR.js";
3
+ import { t as Fragment } from "./jsx-runtime-B2XxfA3E.js";
4
+ import { t as useLoadable } from "./src-BQlLP70K.js";
5
5
  export { Fragment, RootBoundary as Root, hydrate, onCleanup, onCommit, onMount, render, useDisposal, useGetter, useId, useLoadable, useRef, useSetter, useStore, useTimeline, useTransaction };
@@ -46,4 +46,4 @@ const jsxs = jsx;
46
46
  const jsxDEV = jsx;
47
47
  export { instanceProps as a, jsxs as i, jsx as n, merge as o, jsxDEV as r, Fragment as t };
48
48
 
49
- //# sourceMappingURL=jsx-runtime-BGDPK50B.js.map
49
+ //# sourceMappingURL=jsx-runtime-B2XxfA3E.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime-BGDPK50B.js","names":[],"sources":["../src/props.ts","../src/jsx-runtime.ts"],"sourcesContent":["import type { Canonical } from \"atom.io/foundations/canonical\"\n\nimport type { SpaElement } from \"./core.ts\"\n\ntype Props = SpaElement[`props`]\ntype FixedKey = { value: Canonical | undefined; present: boolean }\n\nfunction liveProps(values: () => Props[], fixedKey?: FixedKey): Props {\n\tconst source = (name: PropertyKey) =>\n\t\tvalues()\n\t\t\t.reverse()\n\t\t\t.find((props) => Object.hasOwn(props, name))\n\tconst has = (_: Props, name: PropertyKey): boolean =>\n\t\tfixedKey && name === `key` ? fixedKey.present : source(name) !== undefined\n\treturn new Proxy(\n\t\t{},\n\t\t{\n\t\t\thas,\n\t\t\tget(_, name) {\n\t\t\t\tif (fixedKey && name === `key`) return fixedKey.value\n\t\t\t\tconst props = source(name)\n\t\t\t\treturn props && Reflect.get(props, name)\n\t\t\t},\n\t\t\townKeys() {\n\t\t\t\tconst keys = new Set(values().flatMap(Object.keys))\n\t\t\t\tif (fixedKey?.present) keys.add(`key`)\n\t\t\t\telse if (fixedKey) keys.delete(`key`)\n\t\t\t\treturn [...keys]\n\t\t\t},\n\t\t\tgetOwnPropertyDescriptor(_, name) {\n\t\t\t\tif (has(_, name)) return { enumerable: true, configurable: true }\n\t\t\t},\n\t\t},\n\t)\n}\n\n/** Preserve lazy props and spread precedence, including keys added by later updates. */\nexport function merge(...sources: (Props | (() => Props))[]): Props {\n\treturn liveProps(() =>\n\t\tsources.map(\n\t\t\t(source) => (typeof source === `function` ? source() : source) ?? {},\n\t\t),\n\t)\n}\n\n/** Expose the first key while leaving data props live, including through spreads. */\nexport function instanceProps(\n\tread: () => Props,\n\tkey: Canonical | undefined,\n): Props {\n\treturn liveProps(() => [read()], {\n\t\tvalue: key,\n\t\tpresent: key !== undefined || Object.hasOwn(read(), `key`),\n\t})\n}\n","import type { Canonical } from \"atom.io/foundations/canonical\"\n\nimport type { Children, Component, SpaElement } from \"./core.ts\"\nimport type { HTMLAttributes, NativeElements } from \"./jsx-types.d.ts\"\nimport { merge } from \"./props.ts\"\n\nexport type {\n\tAriaAttributes,\n\tDOMAttributes,\n\tEventAttributes,\n\tEventHandler,\n\tHTMLAttributes,\n\tRef,\n\tSVGAttributes,\n\tTargetedEvent,\n} from \"./jsx-types.d.ts\"\nexport { merge } from \"./props.ts\"\n\n/** Optional integrations augment attributes without changing element identity. */\n// oxlint-disable-next-line typescript/no-empty-interface -- Optional integrations augment this declaration.\nexport interface CapabilityAttributes<Kind extends string = string> {}\n\nexport const Fragment = (props: { children?: Children }): Children =>\n\tprops.children\nexport function jsx(\n\ttype: SpaElement[`type`],\n\tprops: SpaElement[`props`] | null,\n\tkey?: Canonical,\n): SpaElement {\n\treturn {\n\t\ttype,\n\t\tprops: key === undefined ? (props ?? {}) : merge(props ?? {}, { key }),\n\t}\n}\nexport const jsxs = jsx\nexport const jsxDEV = jsx\n\nexport namespace JSX {\n\texport type Element = SpaElement\n\texport type ElementType = keyof IntrinsicElements | Component\n\texport interface ElementChildrenAttribute {\n\t\tchildren: {}\n\t}\n\texport interface IntrinsicAttributes {\n\t\tkey?: Canonical | undefined\n\t}\n\t/** Augment this interface to declare attributes for registered custom elements. */\n\texport interface IntrinsicElements extends NativeElements {\n\t\t[tag: `${string}-${string}`]: HTMLAttributes<HTMLElement>\n\t}\n}\n"],"mappings":";AAOA,SAAS,UAAU,QAAuB,UAA4B;CACrE,MAAM,UAAU,SACf,OAAO,CAAC,CACN,QAAQ,CAAC,CACT,MAAM,UAAU,OAAO,OAAO,OAAO,IAAI,CAAC;CAC7C,MAAM,OAAO,GAAU,SACtB,YAAY,SAAS,QAAQ,SAAS,UAAU,OAAO,IAAI,MAAM,KAAA;CAClE,OAAO,IAAI,MACV,CAAC,GACD;EACC;EACA,IAAI,GAAG,MAAM;GACZ,IAAI,YAAY,SAAS,OAAO,OAAO,SAAS;GAChD,MAAM,QAAQ,OAAO,IAAI;GACzB,OAAO,SAAS,QAAQ,IAAI,OAAO,IAAI;EACxC;EACA,UAAU;GACT,MAAM,OAAO,IAAI,IAAI,OAAO,CAAC,CAAC,QAAQ,OAAO,IAAI,CAAC;GAClD,IAAI,UAAU,SAAS,KAAK,IAAI,KAAK;QAChC,IAAI,UAAU,KAAK,OAAO,KAAK;GACpC,OAAO,CAAC,GAAG,IAAI;EAChB;EACA,yBAAyB,GAAG,MAAM;GACjC,IAAI,IAAI,GAAG,IAAI,GAAG,OAAO;IAAE,YAAY;IAAM,cAAc;GAAK;EACjE;CACD,CACD;AACD;;AAGA,SAAgB,MAAM,GAAG,SAA2C;CACnE,OAAO,gBACN,QAAQ,KACN,YAAY,OAAO,WAAW,aAAa,OAAO,IAAI,WAAW,CAAC,CACpE,CACD;AACD;;AAGA,SAAgB,cACf,MACA,KACQ;CACR,OAAO,gBAAgB,CAAC,KAAK,CAAC,GAAG;EAChC,OAAO;EACP,SAAS,QAAQ,KAAA,KAAa,OAAO,OAAO,KAAK,GAAG,KAAK;CAC1D,CAAC;AACF;;AChCA,MAAa,YAAY,UACxB,MAAM;AACP,SAAgB,IACf,MACA,OACA,KACa;CACb,OAAO;EACN;EACA,OAAO,QAAQ,KAAA,IAAa,SAAS,CAAC,IAAK,MAAM,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC;CACtE;AACD;AACA,MAAa,OAAO;AACpB,MAAa,SAAS"}
1
+ {"version":3,"file":"jsx-runtime-B2XxfA3E.js","names":[],"sources":["../src/props.ts","../src/jsx-runtime.ts"],"sourcesContent":["import type { Canonical } from \"atom.io/foundations/canonical\"\n\nimport type { SpaElement } from \"./core.ts\"\n\ntype Props = SpaElement[`props`]\ntype FixedKey = { value: Canonical | undefined; present: boolean }\n\nfunction liveProps(values: () => Props[], fixedKey?: FixedKey): Props {\n\tconst source = (name: PropertyKey) =>\n\t\tvalues()\n\t\t\t.reverse()\n\t\t\t.find((props) => Object.hasOwn(props, name))\n\tconst has = (_: Props, name: PropertyKey): boolean =>\n\t\tfixedKey && name === `key` ? fixedKey.present : source(name) !== undefined\n\treturn new Proxy(\n\t\t{},\n\t\t{\n\t\t\thas,\n\t\t\tget(_, name) {\n\t\t\t\tif (fixedKey && name === `key`) return fixedKey.value\n\t\t\t\tconst props = source(name)\n\t\t\t\treturn props && Reflect.get(props, name)\n\t\t\t},\n\t\t\townKeys() {\n\t\t\t\tconst keys = new Set(values().flatMap(Object.keys))\n\t\t\t\tif (fixedKey?.present) keys.add(`key`)\n\t\t\t\telse if (fixedKey) keys.delete(`key`)\n\t\t\t\treturn [...keys]\n\t\t\t},\n\t\t\tgetOwnPropertyDescriptor(_, name) {\n\t\t\t\tif (has(_, name)) return { enumerable: true, configurable: true }\n\t\t\t},\n\t\t},\n\t)\n}\n\n/** Preserve lazy props and spread precedence, including keys added by later updates. */\nexport function merge(...sources: (Props | (() => Props))[]): Props {\n\treturn liveProps(() =>\n\t\tsources.map(\n\t\t\t(source) => (typeof source === `function` ? source() : source) ?? {},\n\t\t),\n\t)\n}\n\n/** Expose the first key while leaving data props live, including through spreads. */\nexport function instanceProps(\n\tread: () => Props,\n\tkey: Canonical | undefined,\n): Props {\n\treturn liveProps(() => [read()], {\n\t\tvalue: key,\n\t\tpresent: key !== undefined || Object.hasOwn(read(), `key`),\n\t})\n}\n","import type { Canonical } from \"atom.io/foundations/canonical\"\n\nimport type { Children, Component, SpaElement } from \"./core.ts\"\nimport type { HTMLAttributes, NativeElements } from \"./jsx-types.d.ts\"\nimport { merge } from \"./props.ts\"\n\nexport type {\n\tAriaAttributes,\n\tDOMAttributes,\n\tEventAttributes,\n\tEventHandler,\n\tHTMLAttributes,\n\tRef,\n\tSVGAttributes,\n\tTargetedEvent,\n} from \"./jsx-types.d.ts\"\nexport { merge } from \"./props.ts\"\n\n/** Optional integrations augment attributes without changing element identity. */\n// oxlint-disable-next-line typescript/no-empty-interface -- Optional integrations augment this declaration.\nexport interface CapabilityAttributes<Kind extends string = string> {}\n\nexport const Fragment = (props: { children?: Children }): Children =>\n\tprops.children\nexport function jsx(\n\ttype: SpaElement[`type`],\n\tprops: SpaElement[`props`] | null,\n\tkey?: Canonical,\n): SpaElement {\n\treturn {\n\t\ttype,\n\t\tprops: key === undefined ? (props ?? {}) : merge(props ?? {}, { key }),\n\t}\n}\nexport const jsxs = jsx\nexport const jsxDEV = jsx\n\nexport namespace JSX {\n\texport type Element = SpaElement\n\texport type ElementType = keyof IntrinsicElements | Component\n\texport interface ElementChildrenAttribute {\n\t\tchildren: {}\n\t}\n\texport interface IntrinsicAttributes {\n\t\tkey?: Canonical | undefined\n\t}\n\t/** Augment this interface to declare attributes for registered custom elements. */\n\texport interface IntrinsicElements extends NativeElements {\n\t\t[tag: `${string}-${string}`]: HTMLAttributes<HTMLElement>\n\t}\n}\n"],"mappings":";AAOA,SAAS,UAAU,QAAuB,UAA4B;CACrE,MAAM,UAAU,SACf,OAAO,CAAC,CACN,QAAQ,CAAC,CACT,MAAM,UAAU,OAAO,OAAO,OAAO,IAAI,CAAC;CAC7C,MAAM,OAAO,GAAU,SACtB,YAAY,SAAS,QAAQ,SAAS,UAAU,OAAO,IAAI,MAAM,KAAA;CAClE,OAAO,IAAI,MACV,CAAC,GACD;EACC;EACA,IAAI,GAAG,MAAM;GACZ,IAAI,YAAY,SAAS,OAAO,OAAO,SAAS;GAChD,MAAM,QAAQ,OAAO,IAAI;GACzB,OAAO,SAAS,QAAQ,IAAI,OAAO,IAAI;EACxC;EACA,UAAU;GACT,MAAM,OAAO,IAAI,IAAI,OAAO,CAAC,CAAC,QAAQ,OAAO,IAAI,CAAC;GAClD,IAAI,UAAU,SAAS,KAAK,IAAI,KAAK;QAChC,IAAI,UAAU,KAAK,OAAO,KAAK;GACpC,OAAO,CAAC,GAAG,IAAI;EAChB;EACA,yBAAyB,GAAG,MAAM;GACjC,IAAI,IAAI,GAAG,IAAI,GAAG,OAAO;IAAE,YAAY;IAAM,cAAc;GAAK;EACjE;CACD,CACD;AACD;;AAGA,SAAgB,MAAM,GAAG,SAA2C;CACnE,OAAO,gBACN,QAAQ,KACN,YAAY,OAAO,WAAW,aAAa,OAAO,IAAI,WAAW,CAAC,CACpE,CACD;AACD;;AAGA,SAAgB,cACf,MACA,KACQ;CACR,OAAO,gBAAgB,CAAC,KAAK,CAAC,GAAG;EAChC,OAAO;EACP,SAAS,QAAQ,KAAA,KAAa,OAAO,OAAO,KAAK,GAAG,KAAK;CAC1D,CAAC;AACF;;AChCA,MAAa,YAAY,UACxB,MAAM;AACP,SAAgB,IACf,MACA,OACA,KACa;CACb,OAAO;EACN;EACA,OAAO,QAAQ,KAAA,IAAa,SAAS,CAAC,IAAK,MAAM,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC;CACtE;AACD;AACA,MAAa,OAAO;AACpB,MAAa,SAAS"}
@@ -1,5 +1,5 @@
1
- import { a as Children, o as Component, u as SpaElement } from "./capabilities-ChgSs6bp.js";
2
1
  import { Canonical } from "atom.io/foundations/canonical";
2
+ import { a as Children, o as Component, u as SpaElement } from "./capabilities-BNnXgvo5.js";
3
3
  /** Native targets are preserved; currentTarget identifies the attached element. */
4
4
  type TargetedEvent<E extends Element, T extends Event = Event> = Omit<T, `currentTarget`> & {
5
5
  readonly currentTarget: E;
@@ -969,4 +969,4 @@ declare namespace JSX {
969
969
  }
970
970
  }
971
971
  export { jsxDEV as a, AriaAttributes as c, EventHandler as d, HTMLAttributes as f, TargetedEvent as h, jsx as i, DOMAttributes as l, SVGAttributes as m, Fragment as n, jsxs as o, Ref as p, JSX as r, merge as s, CapabilityAttributes as t, EventAttributes as u };
972
- //# sourceMappingURL=jsx-runtime-CCvcEosg.d.ts.map
972
+ //# sourceMappingURL=jsx-runtime-CjiJSx5m.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime-CCvcEosg.d.ts","names":[],"sources":["../src/jsx-types.d.ts","../src/props.ts","../src/jsx-runtime.ts"],"mappings":";;;KAMY,cAAc,UAAU,SAAS,UAAU,QAAQ,SAAS,KACvE;WAEc,eAAe;KAAO,UAAU,aAAa;WAC7C,gBAAgB,cAAc;;KAEjC,aAAa,UAAU,SAAS,UAAU,QAAQ,UAC7D,OAAO,cAAc,GAAG;KAEb,IAAI,UAAU,YAAY,SAAS;KAE1C,WAAW,QAAQ,WAAW,KAAK,EAAE;;UAGhC;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAEI,UAAU,oBACZ,IACA,WAAW,MACV,gBAAgB,aAAa,WAAW;KACvC,cAAc,UAAU,WAAW,UAAU,mBAC/C,2BACA,UAAU,mBACT,2BACA,UAAU,kBACT,0BACA,UAAU,sBACT,8BACA,UAAU,gBACT,wBACA,UAAU,aACT,qBACA;KACI,gBAAgB,UAAU,cAEpC,WAAW,cAAc,oBAAoB,UAAU,yBACpD,aAAa,GAAG,QAAQ,cAAc,GAAG,IAAI;KAG7C;KACO,iBAAiB;GAC3B;GACA,gBAAgB;GAChB;GACA;GACA;GACA,cAAc;GACd,iBAAiB;GACjB;GACA;GACA;GACA;GACA;GACA,iBAAiB;GACjB;GACA;GACA;GACA,kBAAkB;GAClB;GACA;GACA,kBAAkB;GAClB;GACA,iBAAiB;GACjB,kBAAkB;GAClB,gBAAgB;GAChB,iBAAiB;GACjB;GACA;GACA;GACA;GACA;GACA,eAAe;GACf,mBAAmB;GACnB,yBAAyB;GACzB;GACA;GACA;GACA;GACA,iBAAiB;GACjB,kBAAkB;GAClB;GAWA,kBAAkB;GAClB;GACA;GACA;GACA;GACA;GACA,kBAAkB;GAClB;GACA;GACA;GACA;GACA;GACA;;KAGU,cAAc,UAAU,WAAW,8BAC9C,gBAAgB,KAChB,iBACA;EACC,UAAU;EACV,KAAK;EACL,KAAK,IAAI;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;QACO;;;KAIJ,YAAY,KAAK,WAAW,QAC/B,WAAW,KAAK,mBAAmB,UAAU,cAC3C,EAAE;KAIM,eAAe,UAAU,cAAc,eAClD,cAAc,KACb;EACC;EACA;EAOA;EACA;EACA;EACA;EACA;EACA;EAQA;EACA;EACA;EACA;EASA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGE;KACA;KAUA;KACA;EACJ;EACA;EACA;EACA;EACA;EACA;;KAEI;EACJ;EACA;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;;KAEI;EACJ;EACA;EACA;EACA;EACA,gBAAgB;EAChB;EACA;EACA;;KAEI;EACJ;EACA;EACA;EACA;EACA;;;UAIS;EACT,GAAG;EACH,MAAM;IACL;IACA;IACA;;EAED,OAAO;EACP;IAAQ;IAAc;;EACtB;IAAc;;EACd,QAAQ;IACP;IACA;IACA;IACA,OAAO;IACP;IACA;IACA;IACA;;EAED;IAAU,QAAQ;IAAgB,OAAO;;EACzC;IAAO;;EACP;IAAY;;EACZ;IAAQ,OAAO;;EACf;IAAO;IAAc;;EACrB;IAAW;IAAc;;EACzB;IAAU;IAAe;;EACzB;IACC,QAAQ;IACR;IACA;IACA,OAAO;;EAER;IAAY;IAAmB;IAAc;;EAC7C;IACC;KACC;IACD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAED;IAAQ;;EACR;IACC;IACA;IACA;IACA,QAAQ;IACR;IACA;IACA,gBAAgB;IAChB;IACA;IACA;IACA,OAAO;;EAER;IACC;IACA,aAAa;IACb;IACA;IACA,QAAQ;IACR;IACA;IACA,gBAAgB;IAChB;IACA;IACA;IACA;IACA,OAAO;;EAER,OAAO;IACN;IACA;IACA;IACA;IACA;IACA;IACA,cAAc;IACd;IACA;IACA,QAAQ;IACR;IACA,KAAK;IACL;IACA,KAAK;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAM;IACN;IACA,OAAO;IACP,OAAO;;EAER;IAAO;IAAc;;EACrB;IAAS;IAAa;IAAiB;;EACvC;IAAM;;EACN;IACC;IACA;IACA,aAAa;IACb;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,gBAAgB;IAChB;IACA;IACA;;EAED;IAAO;;EACP;IACC;IACA;IACA;KACC;IACD;IACA;;EAED;IACC;IACA;IACA;IACA;IACA;IACA;;EAED;IACC;IACA;IACA,QAAQ;IACR;IACA;IACA;IACA,OAAO;;EAER;IAAM;IAAmB;IAAe;;EACxC;IAAY;IAAmB;;EAC/B;IACC;IACA;IACA;IACA,OAAO;;EAER;IAAU;IAAa;IAAiB;IAAc;;EACtD;IAAY;IAAa;;EACzB;IAAK;;EACL;IACC;IACA;IACA;IACA,aAAa;IACb;IACA;IACA;IACA;IACA,gBAAgB;IAChB;IACA;;EAED;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA,OAAO;;EAER;IAAQ;;EACR;IACC,QAAQ;IACR;IACA;IACA;IACA;IACA;IACA,OAAO;;EAER;IAAS;IAAkB;IAAe;IAAe;;EACzD;IAAS,aAAa;IAAgB,aAAa;;EACnD,IAAI;EACJ;IACC;IACA;IACA;IACA;;EAED;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAED,IAAI;EACJ;IAAQ;;EACR;IACC;IACA;IACA;IACA;IACA;;EAED,OAAO;IACN;IACA,QAAQ;IACR;IACA;IACA,OAAO;;;KAIG,2BACV,aAAa,wBAAwB,eACrC,sBAAsB,SAErB,kBAAkB,oBAChB,YAAY,kBAAkB;;KAKvB,cAAc,UAAU,aAAa,cAAc,cAAc,KAC5E;EACC,WAAW;EACX;GACC;GACA;EACD;GACC;GACA;GACA,mBAAmB;EACpB;GACC;GACA;EACD;GACC;GACA;GACA;EACD;EACA;EACA;GACC;EACD;GACC,iBAAiB;GACjB;EACD;GACC;GACA,kBAAkB;GAClB;GACA,cAAc;GACd,qBAAqB;GACrB;GACA;GACA;GACA,gBAAgB;GAChB;GACA,mBAAmB;GACnB;GACA;GACA;GACA;EACD;EACA,SAAS;EACT;GACC;GACA;GACA;GACA;GACA,iBAAiB;EAClB;GACC,qBAAqB;GACrB,sBAAsB;GACtB;GACA;GACA,sBAAsB;GACtB,mBAAmB;GACnB,iBAAiB;GACjB;GACA;GACA;EACD;GACC;GACA;GACA;EACD;GACC,iBAAiB;GACjB;;KAGE;EACJ,GAAG;EACH,GAAG;EACH,OAAO;EACP,QAAQ;;KAEJ;EAAe;EAAiB;;KAChC;EAAY;GAAe;;KAC3B,qBAAqB;EAAW;;KAChC,eAAe;EACnB;EACA;EACA,OAAO;EACP,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL;EACA,aAAa;EACb,WAAW;EACX;EACA;EACA;EACA;EACA,MAAM;EACN,IAAI;EACJ,IAAI;EACJ;EACA;;KAEI;EACJ,GAAG;EACH,GAAG;EACH,IAAI;EACJ,IAAI;EACJ,QAAQ;EACR,YAAY;EACZ;;UAES;EACT,GAAG;IACF;IACA;IACA;IACA;IACA;;EAED,SAAS;EACT,eAAe;IACd;IACA;IACA,QAAQ;IACR;;EAED,kBAAkB;IACjB;;EAED;IACC,IAAI;IACJ,IAAI;IACJ,GAAG;IACH;;EAED;IAAY;;EACZ;IACC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ;;EAED,SAAS;IAAuB;IAAY;IAAa;;EACzD,eAAe;IACd;IACA;IACA;;EAED,qBAAqB;IAAuB;;EAC5C,aAAa;IACZ;IACA;IACA;IACA;IACA;IACA;IACA;;EAED,kBAAkB;IACjB;IACA,OAAO;IACP;IACA;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;EACL;IAAQ,QAAQ;;EAChB;IAAS;IAAc;IAAe;;EACtC,KAAK,SAAS;IAAe;;EAC7B,QAAQ,SAAS;IAAe,MAAM;IAAgB,MAAM;;EAC5D,MAAM;EACN,UAAU;IACT,aAAa;IACb;IACA;IACA;IACA,YAAY;IACZ;;EAED,OAAO;EACP,KAAK,SAAS;EACd,MAAM;IAAe;;;KAEV,0BACV,aAAa,uBAAuB,cAAc,qBAAqB,SACtE,kBAAkB,mBAAmB,WAAW,iBAAiB;;;KAKxD,iBAAiB,wBAC5B,KAAK,4BAA4B;KC/4B7B,QAAQ;;iBAiCG,SAAS,UAAU,eAAe,YAAY;;UCjB7C,qBAAqB;cAEzB,WAAQ;EAAa,WAAW;MAAa;iBAE1C,IACf,MAAM,oBACN,OAAO,4BACP,MAAM,YACJ;cAMU,aAAI;cACJ,eAAM;kBAEF;OACJ,UAAU;OACV,oBAAoB,oBAAoB;YACnC;IAChB;;YAEgB;IAChB,MAAM;;;YAGU,0BAA0B;KACzC,6BAA6B,eAAe"}
1
+ {"version":3,"file":"jsx-runtime-CjiJSx5m.d.ts","names":[],"sources":["../src/jsx-types.d.ts","../src/props.ts","../src/jsx-runtime.ts"],"mappings":";;;KAMY,cAAc,UAAU,SAAS,UAAU,QAAQ,SAAS,KACvE;WAEc,eAAe;KAAO,UAAU,aAAa;WAC7C,gBAAgB,cAAc;;KAEjC,aAAa,UAAU,SAAS,UAAU,QAAQ,UAC7D,OAAO,cAAc,GAAG;KAEb,IAAI,UAAU,YAAY,SAAS;KAE1C,WAAW,QAAQ,WAAW,KAAK,EAAE;;UAGhC;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAEI,UAAU,oBACZ,IACA,WAAW,MACV,gBAAgB,aAAa,WAAW;KACvC,cAAc,UAAU,WAAW,UAAU,mBAC/C,2BACA,UAAU,mBACT,2BACA,UAAU,kBACT,0BACA,UAAU,sBACT,8BACA,UAAU,gBACT,wBACA,UAAU,aACT,qBACA;KACI,gBAAgB,UAAU,cAEpC,WAAW,cAAc,oBAAoB,UAAU,yBACpD,aAAa,GAAG,QAAQ,cAAc,GAAG,IAAI;KAG7C;KACO,iBAAiB;GAC3B;GACA,gBAAgB;GAChB;GACA;GACA;GACA,cAAc;GACd,iBAAiB;GACjB;GACA;GACA;GACA;GACA;GACA,iBAAiB;GACjB;GACA;GACA;GACA,kBAAkB;GAClB;GACA;GACA,kBAAkB;GAClB;GACA,iBAAiB;GACjB,kBAAkB;GAClB,gBAAgB;GAChB,iBAAiB;GACjB;GACA;GACA;GACA;GACA;GACA,eAAe;GACf,mBAAmB;GACnB,yBAAyB;GACzB;GACA;GACA;GACA;GACA,iBAAiB;GACjB,kBAAkB;GAClB;GAWA,kBAAkB;GAClB;GACA;GACA;GACA;GACA;GACA,kBAAkB;GAClB;GACA;GACA;GACA;GACA;GACA;;KAGU,cAAc,UAAU,WAAW,8BAC9C,gBAAgB,KAChB,iBACA;EACC,UAAU;EACV,KAAK;EACL,KAAK,IAAI;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;QACO;;;KAIJ,YAAY,KAAK,WAAW,QAC/B,WAAW,KAAK,mBAAmB,UAAU,cAC3C,EAAE;KAIM,eAAe,UAAU,cAAc,eAClD,cAAc,KACb;EACC;EACA;EAOA;EACA;EACA;EACA;EACA;EACA;EAQA;EACA;EACA;EACA;EASA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGE;KACA;KAUA;KACA;EACJ;EACA;EACA;EACA;EACA;EACA;;KAEI;EACJ;EACA;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;;KAEI;EACJ;EACA;EACA;EACA;EACA,gBAAgB;EAChB;EACA;EACA;;KAEI;EACJ;EACA;EACA;EACA;EACA;;;UAIS;EACT,GAAG;EACH,MAAM;IACL;IACA;IACA;;EAED,OAAO;EACP;IAAQ;IAAc;;EACtB;IAAc;;EACd,QAAQ;IACP;IACA;IACA;IACA,OAAO;IACP;IACA;IACA;IACA;;EAED;IAAU,QAAQ;IAAgB,OAAO;;EACzC;IAAO;;EACP;IAAY;;EACZ;IAAQ,OAAO;;EACf;IAAO;IAAc;;EACrB;IAAW;IAAc;;EACzB;IAAU;IAAe;;EACzB;IACC,QAAQ;IACR;IACA;IACA,OAAO;;EAER;IAAY;IAAmB;IAAc;;EAC7C;IACC;KACC;IACD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAED;IAAQ;;EACR;IACC;IACA;IACA;IACA,QAAQ;IACR;IACA;IACA,gBAAgB;IAChB;IACA;IACA;IACA,OAAO;;EAER;IACC;IACA,aAAa;IACb;IACA;IACA,QAAQ;IACR;IACA;IACA,gBAAgB;IAChB;IACA;IACA;IACA;IACA,OAAO;;EAER,OAAO;IACN;IACA;IACA;IACA;IACA;IACA;IACA,cAAc;IACd;IACA;IACA,QAAQ;IACR;IACA,KAAK;IACL;IACA,KAAK;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAM;IACN;IACA,OAAO;IACP,OAAO;;EAER;IAAO;IAAc;;EACrB;IAAS;IAAa;IAAiB;;EACvC;IAAM;;EACN;IACC;IACA;IACA,aAAa;IACb;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,gBAAgB;IAChB;IACA;IACA;;EAED;IAAO;;EACP;IACC;IACA;IACA;KACC;IACD;IACA;;EAED;IACC;IACA;IACA;IACA;IACA;IACA;;EAED;IACC;IACA;IACA,QAAQ;IACR;IACA;IACA;IACA,OAAO;;EAER;IAAM;IAAmB;IAAe;;EACxC;IAAY;IAAmB;;EAC/B;IACC;IACA;IACA;IACA,OAAO;;EAER;IAAU;IAAa;IAAiB;IAAc;;EACtD;IAAY;IAAa;;EACzB;IAAK;;EACL;IACC;IACA;IACA;IACA,aAAa;IACb;IACA;IACA;IACA;IACA,gBAAgB;IAChB;IACA;;EAED;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA,OAAO;;EAER;IAAQ;;EACR;IACC,QAAQ;IACR;IACA;IACA;IACA;IACA;IACA,OAAO;;EAER;IAAS;IAAkB;IAAe;IAAe;;EACzD;IAAS,aAAa;IAAgB,aAAa;;EACnD,IAAI;EACJ;IACC;IACA;IACA;IACA;;EAED;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAED,IAAI;EACJ;IAAQ;;EACR;IACC;IACA;IACA;IACA;IACA;;EAED,OAAO;IACN;IACA,QAAQ;IACR;IACA;IACA,OAAO;;;KAIG,2BACV,aAAa,wBAAwB,eACrC,sBAAsB,SAErB,kBAAkB,oBAChB,YAAY,kBAAkB;;KAKvB,cAAc,UAAU,aAAa,cAAc,cAAc,KAC5E;EACC,WAAW;EACX;GACC;GACA;EACD;GACC;GACA;GACA,mBAAmB;EACpB;GACC;GACA;EACD;GACC;GACA;GACA;EACD;EACA;EACA;GACC;EACD;GACC,iBAAiB;GACjB;EACD;GACC;GACA,kBAAkB;GAClB;GACA,cAAc;GACd,qBAAqB;GACrB;GACA;GACA;GACA,gBAAgB;GAChB;GACA,mBAAmB;GACnB;GACA;GACA;GACA;EACD;EACA,SAAS;EACT;GACC;GACA;GACA;GACA;GACA,iBAAiB;EAClB;GACC,qBAAqB;GACrB,sBAAsB;GACtB;GACA;GACA,sBAAsB;GACtB,mBAAmB;GACnB,iBAAiB;GACjB;GACA;GACA;EACD;GACC;GACA;GACA;EACD;GACC,iBAAiB;GACjB;;KAGE;EACJ,GAAG;EACH,GAAG;EACH,OAAO;EACP,QAAQ;;KAEJ;EAAe;EAAiB;;KAChC;EAAY;GAAe;;KAC3B,qBAAqB;EAAW;;KAChC,eAAe;EACnB;EACA;EACA,OAAO;EACP,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL;EACA,aAAa;EACb,WAAW;EACX;EACA;EACA;EACA;EACA,MAAM;EACN,IAAI;EACJ,IAAI;EACJ;EACA;;KAEI;EACJ,GAAG;EACH,GAAG;EACH,IAAI;EACJ,IAAI;EACJ,QAAQ;EACR,YAAY;EACZ;;UAES;EACT,GAAG;IACF;IACA;IACA;IACA;IACA;;EAED,SAAS;EACT,eAAe;IACd;IACA;IACA,QAAQ;IACR;;EAED,kBAAkB;IACjB;;EAED;IACC,IAAI;IACJ,IAAI;IACJ,GAAG;IACH;;EAED;IAAY;;EACZ;IACC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ;;EAED,SAAS;IAAuB;IAAY;IAAa;;EACzD,eAAe;IACd;IACA;IACA;;EAED,qBAAqB;IAAuB;;EAC5C,aAAa;IACZ;IACA;IACA;IACA;IACA;IACA;IACA;;EAED,kBAAkB;IACjB;IACA,OAAO;IACP;IACA;IACA;IACA;IACA;IACA;IACA,eAAe;;EAEhB,mBAAmB;IAClB;IACA;IACA;IACA,kBAAkB;;EAEnB,mBAAmB;IAClB;IACA;IACA;IACA;IACA;;EAED;IAAkB;IAAiB;;EACnC,cAAc;IACb,IAAI;IACJ,IAAI;IACJ,cAAc;;EAEf,SAAS;EACT;IACC;IACA;IACA;IACA;IACA;IACA;IACA;;EAED,SAAS;EACT,SAAS;EACT,SAAS;EACT,gBAAgB;IACf;IACA,cAAc;IACd;;EAED,SAAS,qBACR;IAAY;IAA6B,aAAa;;EACvD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4B;KC/4B7B,QAAQ;;iBAiCG,SAAS,UAAU,eAAe,YAAY;;UCjB7C,qBAAqB;cAEzB,WAAQ;EAAa,WAAW;MAAa;iBAE1C,IACf,MAAM,oBACN,OAAO,4BACP,MAAM,YACJ;cAMU,aAAI;cACJ,eAAM;kBAEF;OACJ,UAAU;OACV,oBAAoB,oBAAoB;YACnC;IAChB;;YAEgB;IAChB,MAAM;;;YAGU,0BAA0B;KACzC,6BAA6B,eAAe"}
@@ -1,2 +1,2 @@
1
- import { a as jsxDEV, c as AriaAttributes, d as EventHandler, f as HTMLAttributes, h as TargetedEvent, i as jsx, l as DOMAttributes, m as SVGAttributes, n as Fragment, o as jsxs, p as Ref, r as JSX, s as merge, t as CapabilityAttributes, u as EventAttributes } from "./jsx-runtime-CCvcEosg.js";
1
+ import { a as jsxDEV, c as AriaAttributes, d as EventHandler, f as HTMLAttributes, h as TargetedEvent, i as jsx, l as DOMAttributes, m as SVGAttributes, n as Fragment, o as jsxs, p as Ref, r as JSX, s as merge, t as CapabilityAttributes, u as EventAttributes } from "./jsx-runtime-CjiJSx5m.js";
2
2
  export { type AriaAttributes, CapabilityAttributes, type DOMAttributes, type EventAttributes, type EventHandler, Fragment, type HTMLAttributes, JSX, type Ref, type SVGAttributes, type TargetedEvent, jsx, jsxDEV, jsxs, merge };