@takazudo/zfb 2.22.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -9
- package/dist/config.d.ts +62 -19
- package/dist/config.js +27 -6
- package/dist/config.js.map +1 -1
- package/dist/content.d.ts +8 -22
- package/dist/content.js +6 -28
- package/dist/content.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/island-boundary.d.ts +4 -0
- package/dist/island-boundary.js +42 -0
- package/dist/island-boundary.js.map +1 -0
- package/dist/island.d.ts +2 -118
- package/dist/island.js +4 -284
- package/dist/island.js.map +1 -1
- package/dist/jsx-types.d.ts +2 -38
- package/dist/jsx-types.js +3 -10
- package/dist/jsx-types.js.map +1 -1
- package/dist/plugins.d.ts +40 -0
- package/dist/plugins.js.map +1 -1
- package/dist/runtime.d.ts +23 -77
- package/dist/runtime.js +149 -320
- package/dist/runtime.js.map +1 -1
- package/dist/zudo-react/client.d.ts +3 -0
- package/dist/zudo-react/client.js +3 -0
- package/dist/zudo-react/client.js.map +1 -0
- package/dist/zudo-react/description.d.ts +16 -0
- package/dist/zudo-react/description.js +64 -0
- package/dist/zudo-react/description.js.map +1 -0
- package/dist/zudo-react/dom-bindings.d.ts +13 -0
- package/dist/zudo-react/dom-bindings.js +58 -0
- package/dist/zudo-react/dom-bindings.js.map +1 -0
- package/dist/zudo-react/escape.d.ts +2 -0
- package/dist/zudo-react/escape.js +7 -0
- package/dist/zudo-react/escape.js.map +1 -0
- package/dist/zudo-react/forms.d.ts +29 -0
- package/dist/zudo-react/forms.js +371 -0
- package/dist/zudo-react/forms.js.map +1 -0
- package/dist/zudo-react/hydrate.d.ts +4 -0
- package/dist/zudo-react/hydrate.js +909 -0
- package/dist/zudo-react/hydrate.js.map +1 -0
- package/dist/zudo-react/index.d.ts +47 -0
- package/dist/zudo-react/index.js +13 -0
- package/dist/zudo-react/index.js.map +1 -0
- package/dist/zudo-react/island-root-type.d.ts +1 -0
- package/dist/zudo-react/island-root-type.js +2 -0
- package/dist/zudo-react/island-root-type.js.map +1 -0
- package/dist/zudo-react/jsx-dev-runtime.d.ts +8 -0
- package/dist/zudo-react/jsx-dev-runtime.js +6 -0
- package/dist/zudo-react/jsx-dev-runtime.js.map +1 -0
- package/dist/zudo-react/jsx-runtime.d.ts +5 -0
- package/dist/zudo-react/jsx-runtime.js +7 -0
- package/dist/zudo-react/jsx-runtime.js.map +1 -0
- package/dist/zudo-react/jsx-types.d.ts +203 -0
- package/dist/zudo-react/jsx-types.js +2 -0
- package/dist/zudo-react/jsx-types.js.map +1 -0
- package/dist/zudo-react/props-transport.d.ts +2 -0
- package/dist/zudo-react/props-transport.js +95 -0
- package/dist/zudo-react/props-transport.js.map +1 -0
- package/dist/zudo-react/reactive-types.d.ts +8 -0
- package/dist/zudo-react/reactive-types.js +2 -0
- package/dist/zudo-react/reactive-types.js.map +1 -0
- package/dist/zudo-react/reactive.d.ts +20 -0
- package/dist/zudo-react/reactive.js +176 -0
- package/dist/zudo-react/reactive.js.map +1 -0
- package/dist/zudo-react/render-html.d.ts +3 -0
- package/dist/zudo-react/render-html.js +537 -0
- package/dist/zudo-react/render-html.js.map +1 -0
- package/dist/zudo-react/root.d.ts +20 -0
- package/dist/zudo-react/root.js +74 -0
- package/dist/zudo-react/root.js.map +1 -0
- package/dist/zudo-react/scheduler.d.ts +12 -0
- package/dist/zudo-react/scheduler.js +113 -0
- package/dist/zudo-react/scheduler.js.map +1 -0
- package/dist/zudo-react/scope.d.ts +42 -0
- package/dist/zudo-react/scope.js +220 -0
- package/dist/zudo-react/scope.js.map +1 -0
- package/dist/zudo-react/server.d.ts +15 -0
- package/dist/zudo-react/server.js +11 -0
- package/dist/zudo-react/server.js.map +1 -0
- package/dist/zudo-react/structure.d.ts +14 -0
- package/dist/zudo-react/structure.js +35 -0
- package/dist/zudo-react/structure.js.map +1 -0
- package/package.json +28 -24
|
@@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AAC,KAAK,CAAC,OAAO,CAAC;oBAC9E,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACtE,CAAC,CAAC,uBAAuB,EAC3B,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAC9B,iBAAiB,EACjB,MAAM,CAAC,KAAK,CAAC,EACb,QAAQ,CAAC,SAAS,CAAC,CACpB,CAAC;QACV,MAAM,CACJ,OAAO,EACP,UAAU,CACR,OAAO,EACP,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,MAAM,CACf,CACF,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AACD,MAAM,UAAU,OAAO,CAAC,IAAW,EAAE,SAAkB,EAAE,OAAoB;IAC3E,OAAO,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;AACtD,CAAC;AACD,MAAM,UAAU,KAAK,CAAC,IAAW,EAAE,SAAkB,EAAE,OAAoB;IACzE,OAAO,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import { activateForms, prepareForms, reconcileForms, FormError, type FormPlan } from \"./forms.js\";\nimport { Fragment, isDescription, type Child, type Description } from \"./description.js\";\nimport { createScope, withScope, type RuntimeScope } from \"./scope.js\";\nimport { isReactive, read, styleText, setAttribute, bind, listener } from \"./dom-bindings.js\";\nimport {\n createRoot,\n diagnostic,\n report,\n rootPath,\n storedRoot,\n type RootHandle,\n type RootOptions,\n} from \"./root.js\";\nimport type { ReadonlySignal } from \"./reactive-types.js\";\nimport { subscribe } from \"./reactive.js\";\nimport { batch } from \"./scheduler.js\";\nimport { Show, For, showProps, forProps, keyed, keyPayload, view } from \"./structure.js\";\nimport type { Key } from \"./description.js\";\n\nconst HTML = \"http://www.w3.org/1999/xhtml\";\nconst SVG = \"http://www.w3.org/2000/svg\";\nconst voidTags = new Set(\n \"area base br col embed hr img input link meta param source track wbr\".split(\" \"),\n);\nconst sensitive = new Set(\"template noscript xmp iframe noembed noframes plaintext\".split(\" \"));\nconst tableChildren: Record<string, Set<string>> = {\n table: new Set(\"caption colgroup thead tbody tfoot\".split(\" \")),\n thead: new Set([\"tr\"]),\n tbody: new Set([\"tr\"]),\n tfoot: new Set([\"tr\"]),\n tr: new Set([\"td\", \"th\"]),\n colgroup: new Set([\"col\"]),\n};\nconst restricted = new Set(\n \"title select optgroup option table thead tbody tfoot tr colgroup\".split(\" \"),\n);\nconst booleanAttrs = new Set(\n \"hidden inert readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate allowfullscreen\".split(\n \" \",\n ),\n);\nconst dialect = new Set(\n \"className htmlFor charSet dateTime tabIndex readOnly strokeWidth dangerouslySetInnerHTML\".split(\n \" \",\n ),\n);\nconst formProps = new Set(\"modelValue modelChecked defaultValue defaultChecked\".split(\" \"));\nconst shapeAttrs: Record<string, string[]> = {\n input: [\"type\", \"form\"],\n select: [\"multiple\", \"form\"],\n option: [\"value\"],\n textarea: [\"form\"],\n};\nconst protocol = \"zudo-react/1\";\nconst words = (value: string) => new Set(value.split(\" \"));\nconst htmlTags = words(\n \"html head body title base link meta style script div span p a br hr main header footer nav section article aside h1 h2 h3 h4 h5 h6 ul ol li dl dt dd blockquote pre code strong em b i small mark time figure figcaption img picture source video audio track canvas form label input button textarea select option optgroup fieldset legend output progress meter datalist table caption thead tbody tfoot tr th td col colgroup details summary dialog template slot iframe noscript address abbr bdi bdo cite data del dfn ins kbd map area object param q rp rt ruby s samp sub sup u var wbr embed xmp noembed noframes plaintext\",\n);\nconst svgTags = words(\n \"svg g path circle ellipse rect line polyline polygon text tspan defs symbol use clipPath mask linearGradient radialGradient stop title desc foreignObject\",\n);\nconst commonAttrs = words(\n \"id class title lang dir slot role style hidden inert contenteditable draggable spellcheck tabindex accesskey translate onclick onload onerror\",\n);\nconst htmlAttrs = words(\n \"href target rel download src alt width height type name value placeholder for charset datetime readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate maxlength minlength min max step pattern autocomplete accept accept-charset http-equiv content media method action enctype rows cols colspan rowspan scope cite poster loading decoding sizes srcset crossorigin referrerpolicy sandbox allow allowfullscreen\",\n);\nconst svgAttrs = words(\n \"width height viewBox preserveAspectRatio gradientUnits gradientTransform markerWidth markerHeight refX refY xlink:href xml:lang stroke-width fill-rule clip-rule stroke-linecap stroke-linejoin stop-color stop-opacity fill stroke d x y x1 x2 y1 y2 cx cy r rx ry points transform opacity offset\",\n);\n\ntype Operation = (map: Map<Node, Node>, cleanups: Array<() => void>) => void;\ninterface BuildContext {\n readonly document: Document;\n readonly options: RootOptions;\n readonly container: Element;\n readonly root: RuntimeScope;\n scope: RuntimeScope;\n next: number;\n readonly operations: Operation[];\n readonly forms: FormPlan[];\n readonly formOwners: Map<FormPlan, Owned>;\n readonly opaque: Set<Node>;\n readonly textSlots: Set<Node>;\n}\ninterface Owned {\n scope: RuntimeScope;\n fragment: DocumentFragment;\n operations: Operation[];\n forms: FormPlan[];\n cleanups: Array<() => void>;\n}\nfunction owned(\n context: BuildContext,\n name: string,\n namespace: string,\n parentTag: string,\n path: string,\n factory: () => Child,\n initial: boolean,\n kind?: string,\n parentScope?: RuntimeScope,\n): Owned {\n const scope = (parentScope ?? context.scope).child(name);\n const fragment = context.document.createDocumentFragment();\n const operationsStart = context.operations.length;\n const formsStart = context.forms.length;\n const previous = context.scope;\n context.scope = scope;\n const cleanups: Array<() => void> = [];\n try {\n withScope(scope, () => {\n scope.onCleanup(() => {\n for (const cleanup of [...cleanups].reverse()) cleanup();\n });\n const output = factory();\n if (kind)\n marker(context, fragment, kind, () =>\n render(output, fragment, context, namespace, parentTag, path),\n );\n else render(output, fragment, context, namespace, parentTag, path);\n });\n const operations = context.operations.splice(operationsStart);\n const forms = initial ? context.forms.slice(formsStart) : context.forms.splice(formsStart);\n const instance = { scope, fragment, operations, forms, cleanups };\n if (initial)\n for (const form of forms)\n if (!context.formOwners.has(form)) context.formOwners.set(form, instance);\n return instance;\n } catch (error) {\n context.operations.length = operationsStart;\n context.forms.length = formsStart;\n scope.dispose();\n throw error;\n } finally {\n context.scope = previous;\n }\n}\nfunction installOwned(\n instance: Owned,\n map: Map<Node, Node>,\n context: BuildContext,\n mode: \"hydrate\" | \"mount\",\n): void {\n if (mode === \"mount\" && instance.forms.length) {\n const bindings = prepareForms(instance.forms, map, \"mount\", context.container);\n reconcileForms(bindings, \"mount\");\n activateForms(bindings, instance.scope, instance.cleanups, context.options, context.container);\n }\n for (const operation of instance.operations) operation(map, instance.cleanups);\n}\nfunction selfMap(fragment: DocumentFragment): Map<Node, Node> {\n const map = new Map<Node, Node>();\n const visit = (node: Node): void => {\n map.set(node, node);\n for (const child of node.childNodes) visit(child);\n };\n for (const node of fragment.childNodes) visit(node);\n return map;\n}\nclass Failure extends Error {\n constructor(\n readonly code: string,\n readonly phase: \"setup\" | \"preflight\" | \"commit\" | \"activation\",\n readonly expected: string,\n readonly actual: string,\n readonly path: string,\n ) {\n super(`${code}: ${expected}; got ${actual}`);\n }\n}\nfunction fail(\n code: string,\n phase: Failure[\"phase\"],\n expected: string,\n actual: string,\n path: string,\n): never {\n throw new Failure(code, phase, expected, actual, path);\n}\nfunction append(parent: Node, node: Node): void {\n if (node.nodeType === Node.TEXT_NODE && parent.lastChild?.nodeType === Node.TEXT_NODE) {\n parent.lastChild.textContent = (parent.lastChild.textContent ?? \"\") + (node.textContent ?? \"\");\n } else parent.appendChild(node);\n}\nfunction marker(\n context: BuildContext,\n parent: Node,\n kind: string,\n content: () => void,\n): [Comment, Comment] {\n const id = context.next++;\n const open = context.document.createComment(`zr:1:${id}:${kind}`);\n parent.appendChild(open);\n content();\n const close = context.document.createComment(`/zr:1:${id}`);\n parent.appendChild(close);\n if (kind === \"h\") context.opaque.add(open);\n if (kind === \"t\") context.textSlots.add(open);\n return [open, close];\n}\nfunction range(start: Node, end: Node): Node[] {\n const nodes: Node[] = [];\n for (let node: Node | null = start; node; node = node.nextSibling) {\n nodes.push(node);\n if (node === end) return nodes;\n }\n throw new Error(\"ZR_REGION_RANGE\");\n}\nfunction removeRange(start: Node, end: Node): void {\n for (const node of range(start, end)) node.parentNode?.removeChild(node);\n}\nfunction moveRange(start: Node, end: Node, before: Node): void {\n if (end.nextSibling === before) return;\n const parent = before.parentNode!;\n const nodes = range(start, end);\n if (nodes.includes(before)) return;\n const focused = parent.ownerDocument?.activeElement;\n const focusedInside =\n focused &&\n nodes.some((node) => node === focused || (node instanceof Element && node.contains(focused)));\n const selection =\n focusedInside && focused instanceof HTMLInputElement\n ? [focused.selectionStart, focused.selectionEnd]\n : null;\n for (const node of nodes) parent.insertBefore(node, before);\n if (focusedInside && focused instanceof HTMLElement) {\n focused.focus();\n if (\n selection &&\n focused instanceof HTMLInputElement &&\n selection[0] != null &&\n selection[1] != null\n )\n focused.setSelectionRange(selection[0], selection[1]);\n }\n}\nfunction containsRange(start: Node, end: Node, target: Node): boolean {\n if (!start.parentNode || start.parentNode !== end.parentNode) return false;\n return range(start, end).some(\n (node) => node === target || (node instanceof Element && node.contains(target)),\n );\n}\nfunction scalar(value: unknown, path: string): string {\n if (value == null || typeof value === \"boolean\") return \"\";\n if (typeof value === \"string\" || (typeof value === \"number\" && Number.isFinite(value)))\n return String(value);\n fail(\"ZR_CHILD\", \"setup\", \"scalar\", typeof value, path);\n}\nfunction validateRawHtml(value: unknown, tag: string, path: string): asserts value is string {\n if (\n typeof value !== \"string\" ||\n /<!--\\/?zr:1:|data-zfb-island(?:-skip-ssr)?\\s*=/.test(value) ||\n (tag === \"script\" && /<\\/script/i.test(value)) ||\n (tag === \"style\" && /<\\/style/i.test(value))\n )\n fail(\"ZR_RAW_HTML\", \"setup\", \"valid rawHtml\", typeof value, path);\n}\nfunction children(\n value: unknown,\n parent: Node,\n context: BuildContext,\n namespace: string,\n tag: string,\n path: string,\n): void {\n if (value == null || typeof value === \"boolean\") return;\n if (Array.isArray(value)) {\n value.forEach((entry, index) =>\n render(entry, parent, context, namespace, tag, `${path}[${index}]`),\n );\n } else render(value, parent, context, namespace, tag, path);\n}\nfunction validatePosition(tag: string, parent: string, context: BuildContext, path: string): void {\n if (sensitive.has(tag))\n fail(\"ZR_UNSUPPORTED_POSITION\", \"preflight\", \"hydratable element\", tag, path);\n if (tableChildren[parent] && !tableChildren[parent].has(tag))\n fail(\"ZR_UNSUPPORTED_POSITION\", \"preflight\", `valid ${parent} child`, tag, path);\n if (\n (parent === \"select\" && tag !== \"option\" && tag !== \"optgroup\") ||\n (parent === \"optgroup\" && tag !== \"option\")\n )\n fail(\"ZR_UNSUPPORTED_POSITION\", \"preflight\", `valid ${parent} child`, tag, path);\n}\nfunction element(\n desc: Description,\n parent: Node,\n context: BuildContext,\n namespace: string,\n parentTag: string,\n path: string,\n): void {\n const tag = desc.type as string;\n validatePosition(tag, parentTag, context, path);\n const ownNamespace = tag === \"svg\" || namespace === SVG ? SVG : HTML;\n const custom = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/.test(tag);\n if (ownNamespace === SVG ? !svgTags.has(tag) : !custom && !htmlTags.has(tag))\n fail(\"ZR_TAG\", \"setup\", \"supported element\", tag, path);\n const childNamespace = tag === \"foreignObject\" ? HTML : ownNamespace;\n const element = context.document.createElementNS(ownNamespace, tag);\n const props = desc.props;\n if (tag === \"select\" && read(props.multiple) === true)\n fail(\"ZR_MODEL_UNSUPPORTED\", \"preflight\", \"single select\", \"multiple\", path);\n if (voidTags.has(tag) && (\"children\" in props || \"rawHtml\" in props))\n fail(\"ZR_VOID_CHILDREN\", \"setup\", \"empty element\", tag, path);\n if (\"rawHtml\" in props && \"children\" in props)\n fail(\"ZR_RAW_HTML\", \"setup\", \"rawHtml without children\", tag, path);\n if (\n tag === \"textarea\" &&\n \"children\" in props &&\n (\"modelValue\" in props || \"defaultValue\" in props)\n )\n fail(\n \"ZR_MODEL_CONFLICT\",\n \"preflight\",\n \"textarea model/default without children\",\n \"children\",\n path,\n );\n context.forms.push({ element, props, path });\n for (const [name, original] of Object.entries(props)) {\n if (name === \"children\" || name === \"key\" || name === \"rawHtml\") continue;\n if (formProps.has(name)) {\n if (name === \"defaultValue\" && tag === \"input\") setAttribute(element, \"value\", original);\n if (name === \"defaultChecked\" && tag === \"input\") setAttribute(element, \"checked\", original);\n if (name === \"modelValue\" && tag === \"input\" && read(props.type) !== \"radio\")\n setAttribute(element, \"value\", read(original));\n if (name === \"modelChecked\" && tag === \"input\")\n setAttribute(element, \"checked\", read(original));\n continue;\n }\n if (dialect.has(name) || /^on[A-Z]/.test(name))\n fail(\"ZR_PROP_DIALECT\", \"setup\", \"HTML-spelled prop\", name, path);\n if (name === \"ref\") {\n if (!original || typeof original !== \"object\" || !(\"current\" in original))\n fail(\"ZR_REF\", \"setup\", \"object ref\", typeof original, path);\n const ref = original as { current: Element | null };\n context.operations.push((map, cleanups) => {\n const node = map.get(element) as Element;\n ref.current = node;\n cleanups.push(() => {\n if (ref.current === node) ref.current = null;\n });\n });\n continue;\n }\n if (name.startsWith(\"on:\")) {\n const parsed = listener(name);\n if (!parsed || typeof original !== \"function\")\n fail(\"ZR_LISTENER\", \"setup\", \"native listener\", name, path);\n context.operations.push((map, cleanups) => {\n const node = map.get(element) as Element;\n const handler = (event: Event) => {\n try {\n const result: unknown = (original as (event: Event) => unknown)(event);\n if (result && typeof result === \"object\" && \"then\" in result)\n Promise.resolve(result).catch((error) =>\n report(\n context.options,\n diagnostic(\n context.options,\n \"ZR_EVENT_ERROR\",\n \"update\",\n `${rootPath(context.container)}${path}`,\n \"handler success\",\n String(error),\n ),\n ),\n );\n } catch (error) {\n report(\n context.options,\n diagnostic(\n context.options,\n \"ZR_EVENT_ERROR\",\n \"update\",\n `${rootPath(context.container)}${path}`,\n \"handler success\",\n String(error),\n ),\n );\n }\n };\n node.addEventListener(parsed.name, handler, parsed.capture);\n cleanups.push(() => node.removeEventListener(parsed.name, handler, parsed.capture));\n });\n continue;\n }\n if (name === \"value\" || name === \"checked\") {\n if (isReactive(original))\n fail(\"ZR_MODEL_UNSUPPORTED\", \"preflight\", \"modelValue/modelChecked\", name, path);\n }\n if (\n !/^[A-Za-z_:][A-Za-z0-9_:.-]*$/.test(name) ||\n (!custom &&\n !commonAttrs.has(name) &&\n !(ownNamespace === SVG ? svgAttrs.has(name) : htmlAttrs.has(name)) &&\n !/^data-[\\w.-]+$/.test(name) &&\n !/^aria-[\\w.-]+$/.test(name) &&\n !/^on[a-z]+$/.test(name))\n )\n fail(\"ZR_ATTRIBUTE\", \"setup\", \"supported attribute\", name, path);\n const initial = read(original);\n if (custom && initial != null && typeof initial !== \"string\")\n fail(\"ZR_ATTRIBUTE\", \"setup\", \"custom element string attribute\", name, path);\n if (/^on[a-z]/.test(name) && typeof initial === \"function\")\n fail(\"ZR_PROP_DIALECT\", \"setup\", \"on:event\", name, path);\n if (initial != null) {\n if (\n ownNamespace === SVG &&\n (name === \"width\" || name === \"height\") &&\n typeof initial !== \"string\" &&\n !(typeof initial === \"number\" && Number.isFinite(initial))\n )\n fail(\"ZR_ATTRIBUTE\", \"setup\", \"SVG dimension string or number\", typeof initial, path);\n if (name === \"style\") styleText(initial);\n else if (booleanAttrs.has(name) && typeof initial !== \"boolean\")\n fail(\"ZR_ATTRIBUTE\", \"setup\", \"boolean\", typeof initial, path);\n else if (\n typeof initial !== \"string\" &&\n typeof initial !== \"number\" &&\n typeof initial !== \"boolean\"\n )\n fail(\"ZR_ATTRIBUTE\", \"setup\", \"scalar\", typeof initial, path);\n setAttribute(element, name, initial);\n }\n if (isReactive(original)) {\n const bindingScope = context.scope;\n context.operations.push((map, cleanups) => {\n const node = map.get(element) as Element;\n const subscription = bind(\n original,\n bindingScope,\n context.options,\n context.container,\n path,\n (value) => {\n if (\n ownNamespace === SVG &&\n (name === \"width\" || name === \"height\") &&\n value != null &&\n typeof value !== \"string\" &&\n !(typeof value === \"number\" && Number.isFinite(value))\n )\n throw new TypeError(\n `ZR_ATTRIBUTE: SVG dimension ${name} requires a string or number`,\n );\n setAttribute(node, name, value);\n },\n initial,\n );\n cleanups.push(() => subscription.dispose());\n });\n }\n }\n if (\"rawHtml\" in props) {\n const raw = props.rawHtml;\n if (ownNamespace === SVG || [\"textarea\", \"title\", \"select\", \"option\"].includes(tag))\n fail(\"ZR_RAW_HTML\", \"setup\", \"ordinary HTML container\", tag, path);\n if ((tag === \"script\" || tag === \"style\") && isReactive(raw))\n fail(\"ZR_RAW_HTML\", \"setup\", \"static rawHtml\", tag, path);\n const initial = read(raw);\n validateRawHtml(initial, tag, path);\n let region: [Comment, Comment] | undefined;\n if (tag === \"script\" || tag === \"style\") element.innerHTML = initial;\n else\n region = marker(context, element, \"h\", () => {\n element.insertAdjacentHTML(\"beforeend\", initial);\n });\n const bindingScope = context.scope;\n if (isReactive(raw) && region) {\n const [open, close] = region;\n context.operations.push((map, cleanups) => {\n const node = map.get(element) as Element;\n const start = map.get(open)!;\n const end = map.get(close)!;\n let previous = initial;\n const subscription = bind(\n raw as ReadonlySignal<string>,\n bindingScope,\n context.options,\n context.container,\n path,\n (value) => {\n validateRawHtml(value, tag, path);\n if (value === previous) return;\n const template = context.document.createElement(\"template\");\n template.innerHTML = value;\n if (start.parentNode !== node || end.parentNode !== node)\n throw new Error(\"ZR_REGION_RANGE\");\n for (const child of range(start, end).slice(1, -1)) node.removeChild(child);\n node.insertBefore(template.content, end);\n previous = value;\n },\n initial,\n );\n cleanups.push(() => subscription.dispose());\n });\n }\n } else if (\n tag === \"textarea\" &&\n (props.modelValue !== undefined || props.defaultValue !== undefined)\n ) {\n const value = String(read(props.modelValue ?? props.defaultValue));\n element.textContent = value;\n } else if (restricted.has(tag)) {\n if (tag === \"title\" || tag === \"option\") {\n const value = props.children;\n if (isReactive(value) || isDescription(value))\n fail(\"ZR_UNSUPPORTED_POSITION\", \"preflight\", \"static text\", tag, path);\n append(element, context.document.createTextNode(scalar(value, path)));\n } else children(props.children, element, context, childNamespace, tag, `${path}/${tag}`);\n } else children(props.children, element, context, childNamespace, tag, `${path}/${tag}`);\n if (tag === \"select\" && (props.modelValue !== undefined || props.defaultValue !== undefined)) {\n const value = String(read(props.modelValue ?? props.defaultValue));\n const select = element as HTMLSelectElement;\n if (![...select.options].some((option) => option.value === value))\n fail(\"ZR_MODEL_VALUE\", \"preflight\", \"matching select option\", value, path);\n for (const option of select.options) option.selected = option.value === value;\n }\n if (tag === \"input\" && read(props.type) === \"radio\" && props.modelValue !== undefined)\n setAttribute(element, \"checked\", read(props.modelValue) === read(props.value));\n parent.appendChild(element);\n}\nfunction render(\n value: unknown,\n parent: Node,\n context: BuildContext,\n namespace: string,\n parentTag: string,\n path: string,\n): void {\n if (value == null || typeof value === \"boolean\") return;\n if (Array.isArray(value)) {\n marker(context, parent, \"f\", () =>\n children(value, parent, context, namespace, parentTag, path),\n );\n return;\n }\n if (isReactive(value)) {\n const initialValue = read(value) as string | number | boolean | null | undefined;\n const initial = scalar(initialValue, path);\n marker(context, parent, \"t\", () => {\n if (initial) parent.appendChild(context.document.createTextNode(initial));\n });\n const opener = parent.childNodes[parent.childNodes.length - (initial ? 3 : 2)]!;\n const bindingScope = context.scope;\n context.operations.push((map, cleanups) => {\n const start = map.get(opener)!;\n const end =\n start.nextSibling?.nodeType === Node.TEXT_NODE\n ? start.nextSibling.nextSibling\n : start.nextSibling;\n let textNode =\n start.nextSibling?.nodeType === Node.TEXT_NODE ? (start.nextSibling as Text) : null;\n if (!textNode) {\n textNode = context.document.createTextNode(\"\");\n start.parentNode!.insertBefore(textNode, end ?? null);\n }\n const slot = textNode;\n const subscription = bind(\n value as ReadonlySignal<string | number | boolean | null | undefined>,\n bindingScope,\n context.options,\n context.container,\n path,\n (next) => {\n const text = scalar(next, path);\n if (slot.data !== text) slot.data = text;\n },\n initialValue,\n );\n cleanups.push(() => subscription.dispose());\n });\n return;\n }\n if (typeof value === \"string\" || typeof value === \"number\") {\n append(parent, context.document.createTextNode(scalar(value, path)));\n return;\n }\n if (!isDescription(value)) fail(\"ZR_CHILD\", \"setup\", \"description\", typeof value, path);\n if (value.type === Fragment) {\n marker(context, parent, \"f\", () =>\n children(value.props.children, parent, context, namespace, parentTag, path),\n );\n return;\n }\n if (value.type === Show) {\n if (restricted.has(parentTag))\n fail(\"ZR_UNSUPPORTED_POSITION\", \"preflight\", \"flow region\", parentTag, path);\n const props = showProps(value);\n if (\n !isReactive(props.when) ||\n typeof props.children !== \"function\" ||\n (props.fallback !== undefined && typeof props.fallback !== \"function\")\n )\n fail(\"ZR_CHILD\", \"setup\", \"Show signal and factories\", \"invalid props\", path);\n const selected = read(props.when);\n if (typeof selected !== \"boolean\")\n fail(\"ZR_CHILD\", \"setup\", \"boolean Show.when\", typeof selected, path);\n let initial: Owned | null = null;\n const ends = marker(context, parent, `s:${selected ? 1 : 0}`, () => {\n const factory = selected ? props.children : props.fallback;\n if (factory) {\n initial = owned(context, \"Show\", namespace, parentTag, path, factory, true);\n parent.appendChild(initial.fragment);\n }\n });\n const owner = context.scope;\n context.operations.push((map, cleanups) => {\n const start = map.get(ends[0])!;\n const end = map.get(ends[1])!;\n let current: Owned | null = initial;\n let shown = selected;\n if (current) installOwned(current, map, context, \"hydrate\");\n const subscription = subscribe(\n () => {\n const next = props.when.value;\n if (next === shown) return;\n const factory = next ? props.children : props.fallback;\n let replacement: Owned | null = null;\n try {\n if (factory)\n replacement = owned(\n context,\n \"Show\",\n namespace,\n parentTag,\n path,\n factory,\n false,\n undefined,\n owner,\n );\n const replacementMap = replacement ? selfMap(replacement.fragment) : null;\n if (replacement && replacement.forms.length)\n prepareForms(replacement.forms, replacementMap!, \"mount\", context.container);\n if (current) {\n current.scope.dispose();\n let node = start.nextSibling;\n while (node && node !== end) {\n const following = node.nextSibling;\n node.parentNode?.removeChild(node);\n node = following;\n }\n }\n if (replacement) {\n end.parentNode!.insertBefore(replacement.fragment, end);\n installOwned(replacement, replacementMap!, context, \"mount\");\n replacement.scope.activate();\n }\n current = replacement;\n shown = next;\n } catch (error) {\n replacement?.scope.dispose();\n throw error;\n }\n },\n {\n active: () => owner.active,\n report: (code, actual) =>\n report(\n context.options,\n diagnostic(context.options, code, \"update\", path, \"Show update\", actual),\n ),\n },\n );\n subscription.run();\n cleanups.push(() => subscription.dispose());\n });\n return;\n }\n if (value.type === For) {\n if (restricted.has(parentTag))\n fail(\"ZR_UNSUPPORTED_POSITION\", \"preflight\", \"flow region\", parentTag, path);\n const props = forProps<unknown>(value);\n if (\n !isReactive(props.each) ||\n typeof props.by !== \"function\" ||\n typeof props.children !== \"function\"\n )\n fail(\"ZR_CHILD\", \"setup\", \"For signal, key and factory\", \"invalid props\", path);\n const items = read(props.each);\n if (!Array.isArray(items)) fail(\"ZR_CHILD\", \"setup\", \"array For.each\", typeof items, path);\n const keys = keyed(items, props.by, path);\n type Item = {\n key: Key;\n owned: Owned;\n start: Node;\n end: Node;\n item: ReturnType<typeof view<unknown>>;\n index: ReturnType<typeof view<number>>;\n };\n const entries: Item[] = [];\n const ends = marker(context, parent, \"l\", () => {\n items.forEach((item, index) => {\n const key = keys[index]!;\n const itemView = view(item);\n const indexView = view(index);\n const instance = owned(\n context,\n \"For\",\n namespace,\n parentTag,\n path,\n () => props.children(itemView.value, indexView.value),\n true,\n `i:${keyPayload(key)}`,\n );\n const nodes = [...instance.fragment.childNodes];\n entries.push({\n key,\n owned: instance,\n start: nodes[0]!,\n end: nodes[nodes.length - 1]!,\n item: itemView,\n index: indexView,\n });\n parent.appendChild(instance.fragment);\n });\n });\n const owner = context.scope;\n context.operations.push((map, cleanups) => {\n let current = entries.map((entry) => ({\n ...entry,\n start: map.get(entry.start)!,\n end: map.get(entry.end)!,\n }));\n for (const entry of current) installOwned(entry.owned, map, context, \"hydrate\");\n const end = map.get(ends[1])!;\n const subscription = subscribe(\n () => {\n const next = props.each.value;\n if (!Array.isArray(next)) throw new TypeError(`ZR_CHILD: For.each at ${path}`);\n let nextKeys: Key[];\n try {\n nextKeys = keyed(next, props.by, path);\n } catch (error) {\n const detail = String(error);\n const code = detail.includes(\"ZR_DUPLICATE_KEY\")\n ? \"ZR_DUPLICATE_KEY\"\n : detail.includes(\"ZR_KEY_TYPE\")\n ? \"ZR_KEY_TYPE\"\n : \"ZR_SUBSCRIBER_ERROR\";\n report(\n context.options,\n diagnostic(\n context.options,\n code,\n \"update\",\n path,\n \"unique string or finite number keys\",\n detail,\n ),\n );\n return;\n }\n const old = new Map(current.map((entry) => [entry.key, entry]));\n const created: Item[] = [];\n try {\n const ordered = nextKeys.map((key, index) => {\n const retained = old.get(key);\n if (retained) return retained;\n const itemView = view(next[index]);\n const indexView = view(index);\n const instance = owned(\n context,\n \"For\",\n namespace,\n parentTag,\n path,\n () => props.children(itemView.value, indexView.value),\n false,\n `i:${keyPayload(key)}`,\n owner,\n );\n const nodes = [...instance.fragment.childNodes];\n const entry = {\n key,\n owned: instance,\n start: nodes[0]!,\n end: nodes[nodes.length - 1]!,\n item: itemView,\n index: indexView,\n };\n created.push(entry);\n return entry;\n });\n for (const entry of created)\n if (entry.owned.forms.length)\n prepareForms(\n entry.owned.forms,\n selfMap(entry.owned.fragment),\n \"mount\",\n context.container,\n );\n for (const entry of current)\n if (!nextKeys.includes(entry.key)) {\n entry.owned.scope.dispose();\n removeRange(entry.start, entry.end);\n }\n const focused = end.ownerDocument?.activeElement;\n const anchored =\n focused && current.find((entry) => containsRange(entry.start, entry.end, focused));\n const anchorIndex = anchored ? ordered.indexOf(anchored) : -1;\n const place = (index: number, before: Node): Node => {\n const entry = ordered[index]!;\n if (created.includes(entry)) {\n const itemMap = selfMap(entry.owned.fragment);\n before.parentNode!.insertBefore(entry.owned.fragment, before);\n installOwned(entry.owned, itemMap, context, \"mount\");\n entry.owned.scope.activate();\n } else moveRange(entry.start, entry.end, before);\n return entry.start;\n };\n let before = end;\n for (let index = ordered.length - 1; index > anchorIndex; index--)\n before = place(index, before);\n if (anchorIndex >= 0) {\n before = anchored!.start;\n for (let index = anchorIndex - 1; index >= 0; index--) before = place(index, before);\n }\n batch(() =>\n ordered.forEach((entry, index) => {\n entry.item.write(next[index]);\n entry.index.write(index);\n }),\n );\n current = ordered;\n } catch (error) {\n for (const entry of created) entry.owned.scope.dispose();\n throw error;\n }\n },\n {\n active: () => owner.active,\n report: (code, actual) =>\n report(\n context.options,\n diagnostic(context.options, code, \"update\", path, \"For update\", actual),\n ),\n },\n );\n subscription.run();\n cleanups.push(() => subscription.dispose());\n });\n return;\n }\n if (typeof value.type === \"string\") {\n element(value, parent, context, namespace, parentTag, path);\n return;\n }\n if (typeof value.type !== \"function\")\n fail(\"ZR_CHILD\", \"setup\", \"component\", typeof value.type, path);\n if (restricted.has(parentTag))\n fail(\"ZR_UNSUPPORTED_POSITION\", \"preflight\", \"intrinsic child\", \"component\", path);\n const component = value.type;\n const childScope = context.scope.child(component.name || \"Anonymous\");\n const previous = context.scope;\n context.scope = childScope;\n try {\n marker(context, parent, \"c\", () => {\n const output = withScope(childScope, () => component(value.props));\n if (output && typeof output === \"object\" && \"then\" in output)\n fail(\"ZR_ASYNC_COMPONENT\", \"setup\", \"synchronous component\", \"promise\", path);\n render(output, parent, context, namespace, parentTag, path);\n });\n } finally {\n context.scope = previous;\n }\n}\nfunction normalize(text: string, pre: boolean): string {\n const line = text.replace(/\\r\\n?/g, \"\\n\");\n return pre ? line : line.replace(/[\\t\\n\\f\\r ]+/g, \" \").replace(/^ | $/g, \"\");\n}\nfunction compare(\n expected: Node,\n actual: Node,\n map: Map<Node, Node>,\n context: BuildContext,\n path: string,\n pre = false,\n): void {\n if (expected.nodeType !== actual.nodeType)\n fail(\"ZR_HYDRATION_MISMATCH\", \"preflight\", expected.nodeName, actual.nodeName, path);\n map.set(expected, actual);\n if (expected.nodeType === Node.TEXT_NODE) {\n if (normalize(expected.textContent ?? \"\", pre) !== normalize(actual.textContent ?? \"\", pre))\n fail(\"ZR_HYDRATION_MISMATCH\", \"preflight\", \"matching text\", \"different text\", path);\n return;\n }\n if (expected.nodeType === Node.COMMENT_NODE) {\n if (expected.textContent !== actual.textContent)\n fail(\n \"ZR_HYDRATION_MISMATCH\",\n \"preflight\",\n expected.textContent ?? \"\",\n actual.textContent ?? \"\",\n path,\n );\n return;\n }\n if (expected.nodeType === Node.ELEMENT_NODE) {\n const wanted = expected as Element;\n const found = actual as Element;\n if (wanted.localName !== found.localName || wanted.namespaceURI !== found.namespaceURI)\n fail(\n \"ZR_HYDRATION_MISMATCH\",\n \"preflight\",\n `${wanted.namespaceURI}:${wanted.localName}`,\n `${found.namespaceURI}:${found.localName}`,\n path,\n );\n const shape = [...(shapeAttrs[wanted.localName] ?? [])];\n if (wanted.localName === \"input\" && (wanted.getAttribute(\"type\") ?? \"text\") === \"radio\")\n shape.push(\"name\", \"value\");\n for (const name of shape) {\n const expectedValue =\n name === \"type\" && wanted.localName === \"input\"\n ? (wanted.getAttribute(name) ?? \"text\")\n : wanted.getAttribute(name);\n const actualValue =\n name === \"type\" && wanted.localName === \"input\"\n ? (found.getAttribute(name) ?? \"text\")\n : found.getAttribute(name);\n if (expectedValue !== actualValue)\n fail(\n \"ZR_HYDRATION_MISMATCH\",\n \"preflight\",\n `${name}=${expectedValue}`,\n `${name}=${actualValue}`,\n path,\n );\n }\n if (wanted.localName === \"script\" || wanted.localName === \"style\") return;\n compareChildren(wanted, found, map, context, path, pre || wanted.localName === \"pre\");\n }\n}\nfunction significant(nodes: Node[], pre: boolean): Node[] {\n return pre\n ? nodes\n : nodes.filter(\n (node) =>\n node.nodeType !== Node.TEXT_NODE || normalize(node.textContent ?? \"\", false) !== \"\",\n );\n}\nfunction matchingClose(nodes: Node[], start: number): number {\n const open = nodes[start]!.textContent ?? \"\";\n const id = /^zr:1:(\\d+):/.exec(open)?.[1];\n if (id === undefined) return -1;\n let depth = 0;\n for (let i = start + 1; i < nodes.length; i++) {\n const value = nodes[i]!.textContent;\n if (value?.startsWith(\"zr:1:\")) depth++;\n else if (value?.startsWith(\"/zr:1:\")) {\n if (depth) depth--;\n else return value === `/zr:1:${id}` ? i : -1;\n }\n }\n return -1;\n}\nfunction compareChildren(\n expected: Node,\n actual: Node,\n map: Map<Node, Node>,\n context: BuildContext,\n path: string,\n pre = false,\n): void {\n const wants = significant([...expected.childNodes], pre);\n const has = significant([...actual.childNodes], pre);\n let i = 0;\n let j = 0;\n while (i < wants.length && j < has.length) {\n const wanted = wants[i]!;\n const found = has[j]!;\n const childPath = `${path}/${wanted.nodeName.toLowerCase()}[${i}]`;\n if (context.opaque.has(wanted)) {\n compare(wanted, found, map, context, childPath, pre);\n const wantedEnd = matchingClose(wants, i);\n const foundEnd = matchingClose(has, j);\n if (wantedEnd < 0 || foundEnd < 0)\n fail(\n \"ZR_HYDRATION_MISMATCH\",\n \"preflight\",\n \"balanced rawHtml marker\",\n \"missing marker\",\n childPath,\n );\n map.set(wants[wantedEnd]!, has[foundEnd]!);\n i = wantedEnd + 1;\n j = foundEnd + 1;\n continue;\n }\n if (context.textSlots.has(wanted)) {\n compare(wanted, found, map, context, childPath, pre);\n const wantedEnd = matchingClose(wants, i);\n const foundEnd = matchingClose(has, j);\n if (wantedEnd !== i + 1 && wantedEnd !== i + 2)\n fail(\"ZR_HYDRATION_MISMATCH\", \"preflight\", \"single text slot\", \"invalid slot\", childPath);\n if (foundEnd !== j + 1 && foundEnd !== j + 2)\n fail(\"ZR_HYDRATION_MISMATCH\", \"preflight\", \"single text slot\", \"invalid slot\", childPath);\n if (wantedEnd === i + 2) {\n if (foundEnd !== j + 2)\n fail(\"ZR_HYDRATION_MISMATCH\", \"preflight\", \"text slot\", \"empty slot\", childPath);\n compare(wants[i + 1]!, has[j + 1]!, map, context, childPath, pre);\n } else if (foundEnd === j + 2 && normalize(has[j + 1]!.textContent ?? \"\", pre) !== \"\")\n fail(\"ZR_HYDRATION_MISMATCH\", \"preflight\", \"empty slot\", \"nonempty slot\", childPath);\n map.set(wants[wantedEnd]!, has[foundEnd]!);\n i = wantedEnd + 1;\n j = foundEnd + 1;\n continue;\n }\n compare(wanted, found, map, context, childPath, pre);\n i++;\n j++;\n }\n if (i !== wants.length || j !== has.length)\n fail(\n \"ZR_HYDRATION_MISMATCH\",\n \"preflight\",\n `${wants.length} children`,\n `${has.length} children`,\n path,\n );\n}\nfunction validate(container: Element, options: RootOptions, mode: \"hydrate\" | \"mount\"): void {\n const path = rootPath(container);\n if (storedRoot(container) && !storedRoot(container)!.disposed)\n fail(\"ZR_DUPLICATE_ROOT\", \"preflight\", \"unowned root\", \"live root\", path);\n if (options.signal?.aborted || !container.isConnected)\n fail(\"ZR_CANCELLED\", \"preflight\", \"connected root\", \"aborted or disconnected\", path);\n const component =\n container.getAttribute(mode === \"hydrate\" ? \"data-zfb-island\" : \"data-zfb-island-skip-ssr\") ??\n container.getAttribute(\"data-zfb-island\");\n const transport = container.getAttribute(\"data-zfb-transport\");\n const serverProtocol = container.getAttribute(\"data-zfb-protocol\");\n const build = container.getAttribute(\"data-zfb-build\");\n if (\n component !== options.identity.component ||\n transport !== \"json/1\" ||\n serverProtocol !== protocol ||\n build !== options.identity.build\n )\n fail(\n \"ZR_IDENTITY\",\n \"preflight\",\n `${options.identity.component}/${protocol}/${options.identity.build}/json/1`,\n `${component}/${serverProtocol}/${build}/${transport}`,\n path,\n );\n if (container.querySelector(\"[data-zfb-island], [data-zfb-island-skip-ssr]\"))\n fail(\"ZR_UNSUPPORTED_POSITION\", \"preflight\", \"no nested root\", \"nested root\", path);\n}\nfunction execute(\n node: Child,\n container: Element,\n options: RootOptions,\n mode: \"hydrate\" | \"mount\",\n): RootHandle | null {\n let scope: RuntimeScope | undefined;\n const cleanups: Array<() => void> = [];\n let committed = false;\n try {\n validate(container, options, mode);\n if (\n !isDescription(node) ||\n typeof node.type !== \"function\" ||\n ((node.type as typeof node.type & { displayName?: string }).displayName ?? node.type.name) !==\n options.identity.component\n )\n fail(\n \"ZR_IDENTITY\",\n \"preflight\",\n options.identity.component,\n \"different child component\",\n rootPath(container),\n );\n scope = createScope({\n component: options.identity.component,\n ...(options.report ? { reporter: options.report } : {}),\n protocol,\n build: options.identity.build,\n path: rootPath(container),\n });\n const context: BuildContext = {\n document: container.ownerDocument,\n options,\n container,\n root: scope,\n scope,\n next: 0,\n operations: [],\n forms: [],\n formOwners: new Map(),\n opaque: new Set(),\n textSlots: new Set(),\n };\n const fragment = container.ownerDocument.createDocumentFragment();\n render(node, fragment, context, HTML, \"\", rootPath(container));\n const built = [...fragment.childNodes];\n const map = new Map<Node, Node>();\n if (mode === \"hydrate\") compareChildren(fragment, container, map, context, rootPath(container));\n else {\n for (const expected of built) {\n const visit = (item: Node): void => {\n map.set(item, item);\n for (const child of item.childNodes) visit(child);\n };\n visit(expected);\n }\n }\n const formBindings = prepareForms(context.forms, map, mode, container);\n if (options.signal?.aborted || !container.isConnected)\n fail(\n \"ZR_CANCELLED\",\n \"commit\",\n \"connected root\",\n \"aborted or disconnected\",\n rootPath(container),\n );\n reconcileForms(formBindings, mode);\n if (mode === \"mount\") container.replaceChildren(fragment);\n committed = true;\n for (const operation of context.operations) operation(map, cleanups);\n const formOwnerByNode = new Map<Node, Owned>();\n for (const [plan, owner] of context.formOwners)\n formOwnerByNode.set(map.get(plan.element)!, owner);\n const rootForms = formBindings.filter((binding) => !formOwnerByNode.has(binding.node));\n activateForms(rootForms, scope, cleanups, options, container);\n const ownedForms = new Map<Owned, typeof formBindings>();\n for (const binding of formBindings) {\n const owner = formOwnerByNode.get(binding.node);\n if (owner) ownedForms.set(owner, [...(ownedForms.get(owner) ?? []), binding]);\n }\n for (const [owner, bindings] of ownedForms)\n activateForms(bindings, owner.scope, owner.cleanups, options, container);\n const owned = mode === \"hydrate\" ? [...container.childNodes] : built;\n const handle = createRoot(container, options, scope, cleanups, owned);\n try {\n scope.activate();\n } catch (error) {\n handle.dispose();\n report(\n options,\n diagnostic(\n options,\n \"ZR_ACTIVATION_ERROR\",\n \"activation\",\n rootPath(container),\n \"activation\",\n String(error),\n ),\n );\n return null;\n }\n return handle;\n } catch (error) {\n for (const cleanup of [...cleanups].reverse())\n try {\n cleanup();\n } catch {\n /* preserve original error */\n }\n scope?.dispose();\n const failure =\n error instanceof Failure\n ? error\n : error instanceof FormError\n ? new Failure(error.code, \"preflight\", \"valid form model\", error.detail, error.path)\n : new Failure(\n error instanceof TypeError && /ZR_(DUPLICATE_KEY|KEY_TYPE):/.test(error.message)\n ? error.message.match(/ZR_(DUPLICATE_KEY|KEY_TYPE):/)![0].slice(0, -1)\n : \"ZR_HYDRATION_MISMATCH\",\n committed ? \"commit\" : \"setup\",\n \"successful root\",\n String(error),\n rootPath(container),\n );\n report(\n options,\n diagnostic(\n options,\n failure.code,\n failure.phase,\n failure.path,\n failure.expected,\n failure.actual,\n ),\n );\n return null;\n }\n}\nexport function hydrate(node: Child, container: Element, options: RootOptions): RootHandle | null {\n return execute(node, container, options, \"hydrate\");\n}\nexport function mount(node: Child, container: Element, options: RootOptions): RootHandle | null {\n return execute(node, container, options, \"mount\");\n}\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Child, ElementType } from "./description.js";
|
|
2
|
+
export { Fragment, isDescription, flattenChildren } from "./description.js";
|
|
3
|
+
export type { Key, Scalar, Child, Component, ElementType, Description } from "./description.js";
|
|
4
|
+
export type { ReadonlySignal, Signal } from "./reactive-types.js";
|
|
5
|
+
export { signal, computed } from "./reactive.js";
|
|
6
|
+
export { batch, flush } from "./scheduler.js";
|
|
7
|
+
export { getScope } from "./scope.js";
|
|
8
|
+
export { Show, For } from "./structure.js";
|
|
9
|
+
export type Cleanup = () => void;
|
|
10
|
+
export interface Scope {
|
|
11
|
+
readonly abortSignal: AbortSignal;
|
|
12
|
+
onActivate(fn: () => void | Cleanup): void;
|
|
13
|
+
onCleanup(fn: Cleanup): void;
|
|
14
|
+
effect(fn: () => void | Cleanup): void;
|
|
15
|
+
}
|
|
16
|
+
export interface Ref<T> {
|
|
17
|
+
current: T | null;
|
|
18
|
+
}
|
|
19
|
+
export type Style = string | Readonly<Record<string, string | number | null | undefined>>;
|
|
20
|
+
export type Listener<E extends Event = Event> = (event: E) => void | Promise<void>;
|
|
21
|
+
export interface IslandIdentity {
|
|
22
|
+
readonly component: string;
|
|
23
|
+
readonly build: string;
|
|
24
|
+
}
|
|
25
|
+
export interface Diagnostic {
|
|
26
|
+
readonly code: string;
|
|
27
|
+
readonly phase: "setup" | "preflight" | "commit" | "activation" | "update" | "cleanup";
|
|
28
|
+
readonly component: string;
|
|
29
|
+
readonly componentStack: readonly string[];
|
|
30
|
+
readonly path: string;
|
|
31
|
+
readonly expected: string;
|
|
32
|
+
readonly actual: string;
|
|
33
|
+
readonly protocol: string;
|
|
34
|
+
readonly build: string;
|
|
35
|
+
}
|
|
36
|
+
export type Reporter = (diagnostic: Diagnostic) => void;
|
|
37
|
+
export interface ShowProps {
|
|
38
|
+
when: import("./reactive-types.js").ReadonlySignal<boolean>;
|
|
39
|
+
children: () => Child;
|
|
40
|
+
fallback?: (() => Child) | undefined;
|
|
41
|
+
}
|
|
42
|
+
export interface ForProps<T> {
|
|
43
|
+
each: import("./reactive-types.js").ReadonlySignal<readonly T[]>;
|
|
44
|
+
by: (item: T) => import("./description.js").Key;
|
|
45
|
+
children: (item: import("./reactive-types.js").ReadonlySignal<T>, index: import("./reactive-types.js").ReadonlySignal<number>) => Child;
|
|
46
|
+
}
|
|
47
|
+
export declare function h(type: ElementType, props: Record<string, unknown> | null, ...children: Child[]): import("./description.js").Description;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createDescription } from "./description.js";
|
|
2
|
+
export { Fragment, isDescription, flattenChildren } from "./description.js";
|
|
3
|
+
export { signal, computed } from "./reactive.js";
|
|
4
|
+
export { batch, flush } from "./scheduler.js";
|
|
5
|
+
export { getScope } from "./scope.js";
|
|
6
|
+
export { Show, For } from "./structure.js";
|
|
7
|
+
export function h(type, props, ...children) {
|
|
8
|
+
const copy = { ...props };
|
|
9
|
+
if (children.length > 0)
|
|
10
|
+
copy.children = children.length === 1 ? children[0] : children;
|
|
11
|
+
return createDescription(type, copy);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/zudo-react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG5E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AA4C3C,MAAM,UAAU,CAAC,CAAC,IAAiB,EAAE,KAAqC,EAAE,GAAG,QAAiB;IAC9F,MAAM,IAAI,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IAC1B,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACxF,OAAO,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import { createDescription } from \"./description.js\";\nimport type { Child, ElementType } from \"./description.js\";\n\nexport { Fragment, isDescription, flattenChildren } from \"./description.js\";\nexport type { Key, Scalar, Child, Component, ElementType, Description } from \"./description.js\";\nexport type { ReadonlySignal, Signal } from \"./reactive-types.js\";\nexport { signal, computed } from \"./reactive.js\";\nexport { batch, flush } from \"./scheduler.js\";\nexport { getScope } from \"./scope.js\";\nexport { Show, For } from \"./structure.js\";\n\nexport type Cleanup = () => void;\nexport interface Scope {\n readonly abortSignal: AbortSignal;\n onActivate(fn: () => void | Cleanup): void;\n onCleanup(fn: Cleanup): void;\n effect(fn: () => void | Cleanup): void;\n}\nexport interface Ref<T> {\n current: T | null;\n}\nexport type Style = string | Readonly<Record<string, string | number | null | undefined>>;\nexport type Listener<E extends Event = Event> = (event: E) => void | Promise<void>;\nexport interface IslandIdentity {\n readonly component: string;\n readonly build: string;\n}\nexport interface Diagnostic {\n readonly code: string;\n readonly phase: \"setup\" | \"preflight\" | \"commit\" | \"activation\" | \"update\" | \"cleanup\";\n readonly component: string;\n readonly componentStack: readonly string[];\n readonly path: string;\n readonly expected: string;\n readonly actual: string;\n readonly protocol: string;\n readonly build: string;\n}\nexport type Reporter = (diagnostic: Diagnostic) => void;\nexport interface ShowProps {\n when: import(\"./reactive-types.js\").ReadonlySignal<boolean>;\n children: () => Child;\n fallback?: (() => Child) | undefined;\n}\nexport interface ForProps<T> {\n each: import(\"./reactive-types.js\").ReadonlySignal<readonly T[]>;\n by: (item: T) => import(\"./description.js\").Key;\n children: (\n item: import(\"./reactive-types.js\").ReadonlySignal<T>,\n index: import(\"./reactive-types.js\").ReadonlySignal<number>,\n ) => Child;\n}\n\nexport function h(type: ElementType, props: Record<string, unknown> | null, ...children: Child[]) {\n const copy = { ...props };\n if (children.length > 0) copy.children = children.length === 1 ? children[0] : children;\n return createDescription(type, copy);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const islandRootType: unique symbol;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"island-root-type.js","sourceRoot":"","sources":["../../src/zudo-react/island-root-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC","sourcesContent":["export const islandRootType = Symbol.for(\"@takazudo/zfb/zudo-react/island-root-v1\");\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Description, ElementType, Key } from "./description.js";
|
|
2
|
+
export { Fragment } from "./index.js";
|
|
3
|
+
export type { JSX } from "./jsx-types.js";
|
|
4
|
+
export declare function jsxDEV(type: ElementType, props: Record<string, unknown> | null, key: Key | undefined, _isStaticChildren: boolean, _source: {
|
|
5
|
+
fileName: string;
|
|
6
|
+
lineNumber: number;
|
|
7
|
+
columnNumber: number;
|
|
8
|
+
} | undefined, _self: unknown): Description;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createDescription } from "./description.js";
|
|
2
|
+
export { Fragment } from "./index.js";
|
|
3
|
+
export function jsxDEV(type, props, key, _isStaticChildren, _source, _self) {
|
|
4
|
+
return createDescription(type, props, key);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=jsx-dev-runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../src/zudo-react/jsx-dev-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,MAAM,UAAU,MAAM,CACpB,IAAiB,EACjB,KAAqC,EACrC,GAAoB,EACpB,iBAA0B,EAC1B,OAAmF,EACnF,KAAc;IAEd,OAAO,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import { createDescription } from \"./description.js\";\nimport type { Description, ElementType, Key } from \"./description.js\";\n\nexport { Fragment } from \"./index.js\";\nexport type { JSX } from \"./jsx-types.js\";\n\nexport function jsxDEV(\n type: ElementType,\n props: Record<string, unknown> | null,\n key: Key | undefined,\n _isStaticChildren: boolean,\n _source: { fileName: string; lineNumber: number; columnNumber: number } | undefined,\n _self: unknown,\n): Description {\n return createDescription(type, props, key);\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Description, ElementType, Key } from "./description.js";
|
|
2
|
+
export { Fragment } from "./index.js";
|
|
3
|
+
export type { JSX } from "./jsx-types.js";
|
|
4
|
+
export declare function jsx(type: ElementType, props: Record<string, unknown> | null, key?: Key | undefined): Description;
|
|
5
|
+
export declare const jsxs: typeof jsx;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../src/zudo-react/jsx-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,MAAM,UAAU,GAAG,CACjB,IAAiB,EACjB,KAAqC,EACrC,GAAqB;IAErB,OAAO,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAe,GAAG,CAAC","sourcesContent":["import { createDescription } from \"./description.js\";\nimport type { Description, ElementType, Key } from \"./description.js\";\n\nexport { Fragment } from \"./index.js\";\nexport type { JSX } from \"./jsx-types.js\";\n\nexport function jsx(\n type: ElementType,\n props: Record<string, unknown> | null,\n key?: Key | undefined,\n): Description {\n return createDescription(type, props, key);\n}\n\nexport const jsxs: typeof jsx = jsx;\n"]}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import type { Child, Component, Key } from "./description.js";
|
|
2
|
+
import type { Listener, Ref } from "./index.js";
|
|
3
|
+
import type { ReadonlySignal, Signal } from "./reactive-types.js";
|
|
4
|
+
type Value<T> = T | ReadonlySignal<T> | undefined;
|
|
5
|
+
type ScalarAttribute = Value<string | number | boolean | null>;
|
|
6
|
+
type DimensionAttribute = Value<string | number | null>;
|
|
7
|
+
type StringAttribute = Value<string | null>;
|
|
8
|
+
type BooleanAttribute = Value<boolean | null>;
|
|
9
|
+
type CssProperty = `--${string}` | `${string}-${string}` | "color" | "display" | "opacity" | "width" | "height" | "margin" | "padding" | "border" | "background" | "position" | "top" | "right" | "bottom" | "left" | "overflow" | "transform" | "transition" | "animation" | "font" | "flex" | "grid" | "gap";
|
|
10
|
+
type CssStyle = Readonly<Partial<Record<CssProperty, string | number | null | undefined>>>;
|
|
11
|
+
type EventProps = {
|
|
12
|
+
[name: `on:${string}`]: Listener | undefined;
|
|
13
|
+
};
|
|
14
|
+
type DataAria = {
|
|
15
|
+
[name: `data-${string}`]: ScalarAttribute;
|
|
16
|
+
} & {
|
|
17
|
+
[name: `aria-${string}`]: ScalarAttribute;
|
|
18
|
+
};
|
|
19
|
+
interface ReservedProps<T extends Element = Element> {
|
|
20
|
+
children?: Child | undefined;
|
|
21
|
+
key?: Key | undefined;
|
|
22
|
+
ref?: Ref<T> | undefined;
|
|
23
|
+
rawHtml?: Value<string | null>;
|
|
24
|
+
}
|
|
25
|
+
interface CommonAttributes<T extends Element = Element> extends ReservedProps<T> {
|
|
26
|
+
id?: StringAttribute;
|
|
27
|
+
class?: StringAttribute;
|
|
28
|
+
title?: StringAttribute;
|
|
29
|
+
lang?: StringAttribute;
|
|
30
|
+
dir?: StringAttribute;
|
|
31
|
+
slot?: StringAttribute;
|
|
32
|
+
role?: StringAttribute;
|
|
33
|
+
style?: Value<string | CssStyle | null>;
|
|
34
|
+
hidden?: BooleanAttribute;
|
|
35
|
+
inert?: BooleanAttribute;
|
|
36
|
+
contenteditable?: StringAttribute;
|
|
37
|
+
draggable?: StringAttribute;
|
|
38
|
+
spellcheck?: StringAttribute;
|
|
39
|
+
tabindex?: Value<number | null>;
|
|
40
|
+
accesskey?: StringAttribute;
|
|
41
|
+
translate?: StringAttribute;
|
|
42
|
+
onclick?: string | undefined;
|
|
43
|
+
onload?: string | undefined;
|
|
44
|
+
onerror?: string | undefined;
|
|
45
|
+
}
|
|
46
|
+
interface HtmlAttributes<T extends Element = HTMLElement> extends CommonAttributes<T> {
|
|
47
|
+
href?: StringAttribute;
|
|
48
|
+
target?: StringAttribute;
|
|
49
|
+
rel?: StringAttribute;
|
|
50
|
+
download?: StringAttribute;
|
|
51
|
+
src?: StringAttribute;
|
|
52
|
+
alt?: StringAttribute;
|
|
53
|
+
width?: Value<string | number | null>;
|
|
54
|
+
height?: Value<string | number | null>;
|
|
55
|
+
type?: StringAttribute;
|
|
56
|
+
name?: StringAttribute;
|
|
57
|
+
value?: ScalarAttribute;
|
|
58
|
+
placeholder?: StringAttribute;
|
|
59
|
+
for?: StringAttribute;
|
|
60
|
+
charset?: StringAttribute;
|
|
61
|
+
datetime?: StringAttribute;
|
|
62
|
+
readonly?: BooleanAttribute;
|
|
63
|
+
autofocus?: BooleanAttribute;
|
|
64
|
+
required?: BooleanAttribute;
|
|
65
|
+
disabled?: BooleanAttribute;
|
|
66
|
+
checked?: BooleanAttribute;
|
|
67
|
+
selected?: BooleanAttribute;
|
|
68
|
+
multiple?: BooleanAttribute;
|
|
69
|
+
open?: BooleanAttribute;
|
|
70
|
+
controls?: BooleanAttribute;
|
|
71
|
+
muted?: BooleanAttribute;
|
|
72
|
+
loop?: BooleanAttribute;
|
|
73
|
+
autoplay?: BooleanAttribute;
|
|
74
|
+
novalidate?: BooleanAttribute;
|
|
75
|
+
formnovalidate?: BooleanAttribute;
|
|
76
|
+
maxlength?: Value<number | null>;
|
|
77
|
+
minlength?: Value<number | null>;
|
|
78
|
+
min?: StringAttribute;
|
|
79
|
+
max?: StringAttribute;
|
|
80
|
+
step?: StringAttribute;
|
|
81
|
+
pattern?: StringAttribute;
|
|
82
|
+
autocomplete?: StringAttribute;
|
|
83
|
+
accept?: StringAttribute;
|
|
84
|
+
"accept-charset"?: StringAttribute;
|
|
85
|
+
"http-equiv"?: StringAttribute;
|
|
86
|
+
content?: StringAttribute;
|
|
87
|
+
media?: StringAttribute;
|
|
88
|
+
method?: StringAttribute;
|
|
89
|
+
action?: StringAttribute;
|
|
90
|
+
enctype?: StringAttribute;
|
|
91
|
+
rows?: Value<number | null>;
|
|
92
|
+
cols?: Value<number | null>;
|
|
93
|
+
colspan?: Value<number | null>;
|
|
94
|
+
rowspan?: Value<number | null>;
|
|
95
|
+
scope?: StringAttribute;
|
|
96
|
+
cite?: StringAttribute;
|
|
97
|
+
poster?: StringAttribute;
|
|
98
|
+
loading?: StringAttribute;
|
|
99
|
+
decoding?: StringAttribute;
|
|
100
|
+
sizes?: StringAttribute;
|
|
101
|
+
srcset?: StringAttribute;
|
|
102
|
+
crossorigin?: StringAttribute;
|
|
103
|
+
referrerpolicy?: StringAttribute;
|
|
104
|
+
sandbox?: StringAttribute;
|
|
105
|
+
allow?: StringAttribute;
|
|
106
|
+
allowfullscreen?: BooleanAttribute;
|
|
107
|
+
}
|
|
108
|
+
type HtmlProps<T extends Element = HTMLElement> = HtmlAttributes<T> & DataAria & EventProps;
|
|
109
|
+
type InputBase = Omit<HtmlProps<HTMLInputElement>, "type"> & {
|
|
110
|
+
defaultValue?: string | undefined;
|
|
111
|
+
defaultChecked?: boolean | undefined;
|
|
112
|
+
};
|
|
113
|
+
type InputProps = (InputBase & {
|
|
114
|
+
type?: "text" | "search" | "email" | "url" | "tel" | "password" | undefined;
|
|
115
|
+
modelValue?: Signal<string> | undefined;
|
|
116
|
+
modelChecked?: never;
|
|
117
|
+
}) | (InputBase & {
|
|
118
|
+
type: "checkbox";
|
|
119
|
+
modelChecked?: Signal<boolean> | undefined;
|
|
120
|
+
modelValue?: never;
|
|
121
|
+
}) | (InputBase & {
|
|
122
|
+
type: "radio";
|
|
123
|
+
name: string;
|
|
124
|
+
value: string;
|
|
125
|
+
modelValue?: Signal<string | null> | undefined;
|
|
126
|
+
modelChecked?: never;
|
|
127
|
+
}) | (InputBase & {
|
|
128
|
+
type: string;
|
|
129
|
+
modelValue?: never;
|
|
130
|
+
modelChecked?: never;
|
|
131
|
+
});
|
|
132
|
+
type TextareaProps = HtmlProps<HTMLTextAreaElement> & {
|
|
133
|
+
modelValue?: Signal<string> | undefined;
|
|
134
|
+
defaultValue?: string | undefined;
|
|
135
|
+
};
|
|
136
|
+
type SelectProps = HtmlProps<HTMLSelectElement> & {
|
|
137
|
+
modelValue?: Signal<string> | undefined;
|
|
138
|
+
defaultValue?: string | undefined;
|
|
139
|
+
};
|
|
140
|
+
interface SvgAttributes extends CommonAttributes<SVGElement> {
|
|
141
|
+
width?: DimensionAttribute;
|
|
142
|
+
height?: DimensionAttribute;
|
|
143
|
+
viewBox?: StringAttribute;
|
|
144
|
+
preserveAspectRatio?: StringAttribute;
|
|
145
|
+
gradientUnits?: StringAttribute;
|
|
146
|
+
gradientTransform?: StringAttribute;
|
|
147
|
+
markerWidth?: ScalarAttribute;
|
|
148
|
+
markerHeight?: ScalarAttribute;
|
|
149
|
+
refX?: ScalarAttribute;
|
|
150
|
+
refY?: ScalarAttribute;
|
|
151
|
+
"xlink:href"?: StringAttribute;
|
|
152
|
+
"xml:lang"?: StringAttribute;
|
|
153
|
+
"stroke-width"?: ScalarAttribute;
|
|
154
|
+
"fill-rule"?: StringAttribute;
|
|
155
|
+
"clip-rule"?: StringAttribute;
|
|
156
|
+
"stroke-linecap"?: StringAttribute;
|
|
157
|
+
"stroke-linejoin"?: StringAttribute;
|
|
158
|
+
"stop-color"?: StringAttribute;
|
|
159
|
+
"stop-opacity"?: ScalarAttribute;
|
|
160
|
+
fill?: StringAttribute;
|
|
161
|
+
stroke?: StringAttribute;
|
|
162
|
+
d?: StringAttribute;
|
|
163
|
+
x?: ScalarAttribute;
|
|
164
|
+
y?: ScalarAttribute;
|
|
165
|
+
x1?: ScalarAttribute;
|
|
166
|
+
x2?: ScalarAttribute;
|
|
167
|
+
y1?: ScalarAttribute;
|
|
168
|
+
y2?: ScalarAttribute;
|
|
169
|
+
cx?: ScalarAttribute;
|
|
170
|
+
cy?: ScalarAttribute;
|
|
171
|
+
r?: ScalarAttribute;
|
|
172
|
+
rx?: ScalarAttribute;
|
|
173
|
+
ry?: ScalarAttribute;
|
|
174
|
+
points?: StringAttribute;
|
|
175
|
+
transform?: StringAttribute;
|
|
176
|
+
opacity?: ScalarAttribute;
|
|
177
|
+
offset?: ScalarAttribute;
|
|
178
|
+
id?: StringAttribute;
|
|
179
|
+
}
|
|
180
|
+
type SvgProps = SvgAttributes & DataAria & EventProps;
|
|
181
|
+
type CustomProps = ReservedProps & EventProps & {
|
|
182
|
+
[attribute: string]: StringAttribute | Child | Ref<Element> | Listener | undefined;
|
|
183
|
+
};
|
|
184
|
+
type HtmlTag = "html" | "head" | "body" | "title" | "base" | "link" | "meta" | "style" | "script" | "div" | "span" | "p" | "a" | "br" | "hr" | "main" | "header" | "footer" | "nav" | "section" | "article" | "aside" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "ul" | "ol" | "li" | "dl" | "dt" | "dd" | "blockquote" | "pre" | "code" | "strong" | "em" | "b" | "i" | "small" | "mark" | "time" | "figure" | "figcaption" | "img" | "picture" | "source" | "video" | "audio" | "track" | "canvas" | "form" | "label" | "input" | "button" | "textarea" | "select" | "option" | "optgroup" | "fieldset" | "legend" | "output" | "progress" | "meter" | "datalist" | "table" | "caption" | "thead" | "tbody" | "tfoot" | "tr" | "th" | "td" | "col" | "colgroup" | "details" | "summary" | "dialog" | "template" | "slot" | "iframe" | "noscript" | "address" | "abbr" | "bdi" | "bdo" | "cite" | "data" | "del" | "dfn" | "ins" | "kbd" | "map" | "area" | "object" | "param" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "sub" | "sup" | "u" | "var" | "wbr" | "embed";
|
|
185
|
+
type SvgTag = "svg" | "g" | "path" | "circle" | "ellipse" | "rect" | "line" | "polyline" | "polygon" | "text" | "tspan" | "defs" | "symbol" | "use" | "clipPath" | "mask" | "linearGradient" | "radialGradient" | "stop" | "desc" | "foreignObject";
|
|
186
|
+
export declare namespace JSX {
|
|
187
|
+
type Element = Child;
|
|
188
|
+
type ElementType = string | Component<any> | typeof import("../island.js").Island | typeof import("./description.js").Fragment;
|
|
189
|
+
type IntrinsicElements = {
|
|
190
|
+
[K in HtmlTag]: K extends "input" ? InputProps : K extends "textarea" ? TextareaProps : K extends "select" ? SelectProps : HtmlProps;
|
|
191
|
+
} & {
|
|
192
|
+
[K in SvgTag]: SvgProps;
|
|
193
|
+
} & {
|
|
194
|
+
[K in `${string}-${string}`]: CustomProps;
|
|
195
|
+
};
|
|
196
|
+
interface IntrinsicAttributes {
|
|
197
|
+
key?: Key | undefined;
|
|
198
|
+
}
|
|
199
|
+
interface ElementChildrenAttribute {
|
|
200
|
+
children: unknown;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-types.js","sourceRoot":"","sources":["../../src/zudo-react/jsx-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Child, Component, Key } from \"./description.js\";\nimport type { Listener, Ref } from \"./index.js\";\nimport type { ReadonlySignal, Signal } from \"./reactive-types.js\";\n\ntype Value<T> = T | ReadonlySignal<T> | undefined;\ntype ScalarAttribute = Value<string | number | boolean | null>;\ntype DimensionAttribute = Value<string | number | null>;\ntype StringAttribute = Value<string | null>;\ntype BooleanAttribute = Value<boolean | null>;\ntype CssProperty =\n | `--${string}`\n | `${string}-${string}`\n | \"color\"\n | \"display\"\n | \"opacity\"\n | \"width\"\n | \"height\"\n | \"margin\"\n | \"padding\"\n | \"border\"\n | \"background\"\n | \"position\"\n | \"top\"\n | \"right\"\n | \"bottom\"\n | \"left\"\n | \"overflow\"\n | \"transform\"\n | \"transition\"\n | \"animation\"\n | \"font\"\n | \"flex\"\n | \"grid\"\n | \"gap\";\ntype CssStyle = Readonly<Partial<Record<CssProperty, string | number | null | undefined>>>;\ntype EventProps = {\n [name: `on:${string}`]: Listener | undefined;\n};\ntype DataAria = {\n [name: `data-${string}`]: ScalarAttribute;\n} & {\n [name: `aria-${string}`]: ScalarAttribute;\n};\n\ninterface ReservedProps<T extends Element = Element> {\n children?: Child | undefined;\n key?: Key | undefined;\n ref?: Ref<T> | undefined;\n rawHtml?: Value<string | null>;\n}\n\ninterface CommonAttributes<T extends Element = Element> extends ReservedProps<T> {\n id?: StringAttribute;\n class?: StringAttribute;\n title?: StringAttribute;\n lang?: StringAttribute;\n dir?: StringAttribute;\n slot?: StringAttribute;\n role?: StringAttribute;\n style?: Value<string | CssStyle | null>;\n hidden?: BooleanAttribute;\n inert?: BooleanAttribute;\n contenteditable?: StringAttribute;\n draggable?: StringAttribute;\n spellcheck?: StringAttribute;\n tabindex?: Value<number | null>;\n accesskey?: StringAttribute;\n translate?: StringAttribute;\n onclick?: string | undefined;\n onload?: string | undefined;\n onerror?: string | undefined;\n}\n\ninterface HtmlAttributes<T extends Element = HTMLElement> extends CommonAttributes<T> {\n href?: StringAttribute;\n target?: StringAttribute;\n rel?: StringAttribute;\n download?: StringAttribute;\n src?: StringAttribute;\n alt?: StringAttribute;\n width?: Value<string | number | null>;\n height?: Value<string | number | null>;\n type?: StringAttribute;\n name?: StringAttribute;\n value?: ScalarAttribute;\n placeholder?: StringAttribute;\n for?: StringAttribute;\n charset?: StringAttribute;\n datetime?: StringAttribute;\n readonly?: BooleanAttribute;\n autofocus?: BooleanAttribute;\n required?: BooleanAttribute;\n disabled?: BooleanAttribute;\n checked?: BooleanAttribute;\n selected?: BooleanAttribute;\n multiple?: BooleanAttribute;\n open?: BooleanAttribute;\n controls?: BooleanAttribute;\n muted?: BooleanAttribute;\n loop?: BooleanAttribute;\n autoplay?: BooleanAttribute;\n novalidate?: BooleanAttribute;\n formnovalidate?: BooleanAttribute;\n maxlength?: Value<number | null>;\n minlength?: Value<number | null>;\n min?: StringAttribute;\n max?: StringAttribute;\n step?: StringAttribute;\n pattern?: StringAttribute;\n autocomplete?: StringAttribute;\n accept?: StringAttribute;\n \"accept-charset\"?: StringAttribute;\n \"http-equiv\"?: StringAttribute;\n content?: StringAttribute;\n media?: StringAttribute;\n method?: StringAttribute;\n action?: StringAttribute;\n enctype?: StringAttribute;\n rows?: Value<number | null>;\n cols?: Value<number | null>;\n colspan?: Value<number | null>;\n rowspan?: Value<number | null>;\n scope?: StringAttribute;\n cite?: StringAttribute;\n poster?: StringAttribute;\n loading?: StringAttribute;\n decoding?: StringAttribute;\n sizes?: StringAttribute;\n srcset?: StringAttribute;\n crossorigin?: StringAttribute;\n referrerpolicy?: StringAttribute;\n sandbox?: StringAttribute;\n allow?: StringAttribute;\n allowfullscreen?: BooleanAttribute;\n}\n\ntype HtmlProps<T extends Element = HTMLElement> = HtmlAttributes<T> & DataAria & EventProps;\ntype InputBase = Omit<HtmlProps<HTMLInputElement>, \"type\"> & {\n defaultValue?: string | undefined;\n defaultChecked?: boolean | undefined;\n};\ntype InputProps =\n | (InputBase & {\n type?: \"text\" | \"search\" | \"email\" | \"url\" | \"tel\" | \"password\" | undefined;\n modelValue?: Signal<string> | undefined;\n modelChecked?: never;\n })\n | (InputBase & {\n type: \"checkbox\";\n modelChecked?: Signal<boolean> | undefined;\n modelValue?: never;\n })\n | (InputBase & {\n type: \"radio\";\n name: string;\n value: string;\n modelValue?: Signal<string | null> | undefined;\n modelChecked?: never;\n })\n | (InputBase & {\n type: string;\n modelValue?: never;\n modelChecked?: never;\n });\ntype TextareaProps = HtmlProps<HTMLTextAreaElement> & {\n modelValue?: Signal<string> | undefined;\n defaultValue?: string | undefined;\n};\ntype SelectProps = HtmlProps<HTMLSelectElement> & {\n modelValue?: Signal<string> | undefined;\n defaultValue?: string | undefined;\n};\n\ninterface SvgAttributes extends CommonAttributes<SVGElement> {\n width?: DimensionAttribute;\n height?: DimensionAttribute;\n viewBox?: StringAttribute;\n preserveAspectRatio?: StringAttribute;\n gradientUnits?: StringAttribute;\n gradientTransform?: StringAttribute;\n markerWidth?: ScalarAttribute;\n markerHeight?: ScalarAttribute;\n refX?: ScalarAttribute;\n refY?: ScalarAttribute;\n \"xlink:href\"?: StringAttribute;\n \"xml:lang\"?: StringAttribute;\n \"stroke-width\"?: ScalarAttribute;\n \"fill-rule\"?: StringAttribute;\n \"clip-rule\"?: StringAttribute;\n \"stroke-linecap\"?: StringAttribute;\n \"stroke-linejoin\"?: StringAttribute;\n \"stop-color\"?: StringAttribute;\n \"stop-opacity\"?: ScalarAttribute;\n fill?: StringAttribute;\n stroke?: StringAttribute;\n d?: StringAttribute;\n x?: ScalarAttribute;\n y?: ScalarAttribute;\n x1?: ScalarAttribute;\n x2?: ScalarAttribute;\n y1?: ScalarAttribute;\n y2?: ScalarAttribute;\n cx?: ScalarAttribute;\n cy?: ScalarAttribute;\n r?: ScalarAttribute;\n rx?: ScalarAttribute;\n ry?: ScalarAttribute;\n points?: StringAttribute;\n transform?: StringAttribute;\n opacity?: ScalarAttribute;\n offset?: ScalarAttribute;\n id?: StringAttribute;\n}\n\ntype SvgProps = SvgAttributes & DataAria & EventProps;\ntype CustomProps = ReservedProps &\n EventProps & {\n [attribute: string]: StringAttribute | Child | Ref<Element> | Listener | undefined;\n };\n\ntype HtmlTag =\n | \"html\"\n | \"head\"\n | \"body\"\n | \"title\"\n | \"base\"\n | \"link\"\n | \"meta\"\n | \"style\"\n | \"script\"\n | \"div\"\n | \"span\"\n | \"p\"\n | \"a\"\n | \"br\"\n | \"hr\"\n | \"main\"\n | \"header\"\n | \"footer\"\n | \"nav\"\n | \"section\"\n | \"article\"\n | \"aside\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"ul\"\n | \"ol\"\n | \"li\"\n | \"dl\"\n | \"dt\"\n | \"dd\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"strong\"\n | \"em\"\n | \"b\"\n | \"i\"\n | \"small\"\n | \"mark\"\n | \"time\"\n | \"figure\"\n | \"figcaption\"\n | \"img\"\n | \"picture\"\n | \"source\"\n | \"video\"\n | \"audio\"\n | \"track\"\n | \"canvas\"\n | \"form\"\n | \"label\"\n | \"input\"\n | \"button\"\n | \"textarea\"\n | \"select\"\n | \"option\"\n | \"optgroup\"\n | \"fieldset\"\n | \"legend\"\n | \"output\"\n | \"progress\"\n | \"meter\"\n | \"datalist\"\n | \"table\"\n | \"caption\"\n | \"thead\"\n | \"tbody\"\n | \"tfoot\"\n | \"tr\"\n | \"th\"\n | \"td\"\n | \"col\"\n | \"colgroup\"\n | \"details\"\n | \"summary\"\n | \"dialog\"\n | \"template\"\n | \"slot\"\n | \"iframe\"\n | \"noscript\"\n | \"address\"\n | \"abbr\"\n | \"bdi\"\n | \"bdo\"\n | \"cite\"\n | \"data\"\n | \"del\"\n | \"dfn\"\n | \"ins\"\n | \"kbd\"\n | \"map\"\n | \"area\"\n | \"object\"\n | \"param\"\n | \"q\"\n | \"rp\"\n | \"rt\"\n | \"ruby\"\n | \"s\"\n | \"samp\"\n | \"sub\"\n | \"sup\"\n | \"u\"\n | \"var\"\n | \"wbr\"\n | \"embed\";\n\ntype SvgTag =\n | \"svg\"\n | \"g\"\n | \"path\"\n | \"circle\"\n | \"ellipse\"\n | \"rect\"\n | \"line\"\n | \"polyline\"\n | \"polygon\"\n | \"text\"\n | \"tspan\"\n | \"defs\"\n | \"symbol\"\n | \"use\"\n | \"clipPath\"\n | \"mask\"\n | \"linearGradient\"\n | \"radialGradient\"\n | \"stop\"\n | \"desc\"\n | \"foreignObject\";\n\nexport namespace JSX {\n export type Element = Child;\n export type ElementType =\n | string\n | Component<any>\n | typeof import(\"../island.js\").Island\n | typeof import(\"./description.js\").Fragment;\n export type IntrinsicElements = {\n [K in HtmlTag]: K extends \"input\"\n ? InputProps\n : K extends \"textarea\"\n ? TextareaProps\n : K extends \"select\"\n ? SelectProps\n : HtmlProps;\n } & { [K in SvgTag]: SvgProps } & {\n [K in `${string}-${string}`]: CustomProps;\n };\n export interface IntrinsicAttributes {\n key?: Key | undefined;\n }\n export interface ElementChildrenAttribute {\n children: unknown;\n }\n}\n"]}
|