@takazudo/zfb 3.0.0 → 3.2.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 +8 -7
- package/dist/config.d.ts +43 -9
- package/dist/config.js +23 -12
- package/dist/config.js.map +1 -1
- package/dist/content.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/dist/island-boundary.d.ts +2 -2
- package/dist/island-boundary.js +4 -2
- package/dist/island-boundary.js.map +1 -1
- package/dist/island.d.ts +8 -4
- package/dist/island.js +1 -1
- package/dist/island.js.map +1 -1
- package/dist/jsx-types.d.ts +1 -1
- package/dist/jsx-types.js.map +1 -1
- package/dist/runtime.d.ts +7 -4
- package/dist/runtime.js +166 -28
- package/dist/runtime.js.map +1 -1
- package/dist/slugify.js.map +1 -1
- package/dist/zudo-react/description.d.ts +18 -0
- package/dist/zudo-react/description.js +41 -0
- package/dist/zudo-react/description.js.map +1 -1
- package/dist/zudo-react/dom-bindings.d.ts +2 -1
- package/dist/zudo-react/dom-bindings.js +16 -22
- package/dist/zudo-react/dom-bindings.js.map +1 -1
- package/dist/zudo-react/forms.js.map +1 -1
- package/dist/zudo-react/hydrate.js +27 -34
- package/dist/zudo-react/hydrate.js.map +1 -1
- package/dist/zudo-react/index.d.ts +2 -1
- package/dist/zudo-react/index.js.map +1 -1
- package/dist/zudo-react/jsx-dev-runtime.d.ts +2 -6
- package/dist/zudo-react/jsx-dev-runtime.js +3 -3
- package/dist/zudo-react/jsx-dev-runtime.js.map +1 -1
- package/dist/zudo-react/jsx-runtime.js +2 -2
- package/dist/zudo-react/jsx-runtime.js.map +1 -1
- package/dist/zudo-react/jsx-types.d.ts +80 -31
- package/dist/zudo-react/jsx-types.js.map +1 -1
- package/dist/zudo-react/props-transport.d.ts +2 -0
- package/dist/zudo-react/props-transport.js +42 -14
- package/dist/zudo-react/props-transport.js.map +1 -1
- package/dist/zudo-react/raw-html.d.ts +1 -0
- package/dist/zudo-react/raw-html.js +120 -0
- package/dist/zudo-react/raw-html.js.map +1 -0
- package/dist/zudo-react/reactive.js.map +1 -1
- package/dist/zudo-react/render-html.d.ts +11 -1
- package/dist/zudo-react/render-html.js +96 -71
- package/dist/zudo-react/render-html.js.map +1 -1
- package/dist/zudo-react/root.js +24 -1
- package/dist/zudo-react/root.js.map +1 -1
- package/dist/zudo-react/server.d.ts +2 -0
- package/dist/zudo-react/server.js.map +1 -1
- package/dist/zudo-react/structure.d.ts +2 -0
- package/dist/zudo-react/structure.js +14 -0
- package/dist/zudo-react/structure.js.map +1 -1
- package/dist/zudo-react/style.d.ts +10 -0
- package/dist/zudo-react/style.js +525 -0
- package/dist/zudo-react/style.js.map +1 -0
- package/dist/zudo-react/testing.d.ts +27 -0
- package/dist/zudo-react/testing.js +117 -0
- package/dist/zudo-react/testing.js.map +1 -0
- package/dist/zudo-react/vocabulary.d.ts +19 -0
- package/dist/zudo-react/vocabulary.js +155 -0
- package/dist/zudo-react/vocabulary.js.map +1 -0
- package/package.json +16 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-html.js","sourceRoot":"","sources":["../../src/zudo-react/render-html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAgC,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAqB,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEzF,MAAM,KAAK,GA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,gBAAgB,EAAE,OAAO,EAAE,uBAAuB,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;AAC5E,CAAC;AACD,MAAM,UAAU,UAAU,CAAC,IAAW,EAAE,OAAsB;IAC5D,MAAM,IAAI,GAAG,WAAW,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,IAAI,QAAQ,EAAE,CAAC,CAAC;IAC/E,MAAM,OAAO,GAAY;QACvB,WAAW,EAAE,IAAI,GAAG,EAAE;QACtB,UAAU,EAAE,IAAI,GAAG,EAAE;QACrB,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,CAAC;QACb,QAAQ,EAAE,OAAO,CAAC,MAAM;QACxB,QAAQ,EAAE,OAAO,CAAC,MAAM,KAAK,SAAS;QACtC,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,MAAM;KACb,CAAC;IACF,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAC/C,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["import { Fragment, isDescription, type Child, type Description } from \"./description.js\";\nimport { escapeAttribute, escapeText } from \"./escape.js\";\nimport type { IslandIdentity } from \"./index.js\";\nimport { readSnapshot } from \"./reactive.js\";\nimport type { ReadonlySignal } from \"./reactive-types.js\";\nimport { createScope, withScope, type RuntimeScope } from \"./scope.js\";\nimport { serializeProps } from \"./props-transport.js\";\nimport { islandRootType } from \"./island-root-type.js\";\nimport type { IslandOptions, RenderOptions } from \"./server.js\";\nimport { Show, For, showProps, forProps, keyed, keyPayload, view } from \"./structure.js\";\n\nconst words = (value: string) => new Set(value.split(\" \"));\nconst voidTags = words(\"area base br col embed hr img input link meta param source track wbr\");\nconst booleanAttrs = words(\n \"hidden inert readonly autofocus required disabled checked selected multiple open controls muted loop autoplay novalidate formnovalidate allowfullscreen\",\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);\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 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 dialect = words(\n \"className htmlFor charSet dateTime tabIndex readOnly strokeWidth dangerouslySetInnerHTML\",\n);\nconst reserved = words(\"key ref children rawHtml\");\nconst forms = words(\"modelValue modelChecked defaultValue defaultChecked\");\nconst sensitive = words(\"noscript xmp iframe noembed noframes plaintext\");\nconst tableChildren: Record<string, Set<string>> = {\n table: words(\"caption colgroup thead tbody tfoot\"),\n thead: words(\"tr\"),\n tbody: words(\"tr\"),\n tfoot: words(\"tr\"),\n tr: words(\"td th\"),\n colgroup: words(\"col\"),\n};\ntype Namespace = \"html\" | \"svg\";\ninterface Context {\n identity: IslandIdentity | undefined;\n boundary: boolean;\n next: number;\n scope: RuntimeScope;\n path: string;\n selectValue?: string | undefined;\n selectSeen?: Set<string> | undefined;\n selectMatches?: number | undefined;\n radioGroups: Map<\n unknown,\n { name: string; form: string; value: string | null; options: Set<string> }\n >;\n radioNames: Map<string, unknown>;\n formId: string;\n nextFormId: number;\n}\nfunction fail(code: string, context: Context, detail: string): never {\n throw new TypeError(\n `${code}: ${detail} at ${context.path} in ${context.identity?.component ?? \"static render\"}`,\n );\n}\nfunction reactive(value: unknown): value is ReadonlySignal<unknown> {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"$$zudoReactive\" in value &&\n value.$$zudoReactive === \"zudo-react.reactive.v1\"\n );\n}\nfunction read(value: unknown): unknown {\n return reactive(value) ? readSnapshot(value) : value;\n}\nfunction region(context: Context, kind: string, content: () => string): string {\n if (!context.identity) return content();\n const id = context.next++;\n return `<!--zr:1:${id}:${kind}-->${content()}<!--/zr:1:${id}-->`;\n}\nfunction at<T>(context: Context, part: string, fn: () => T): T {\n const old = context.path;\n context.path += part;\n try {\n return fn();\n } finally {\n context.path = old;\n }\n}\nfunction children(value: unknown, context: Context, namespace: Namespace, parent: string): string {\n if (value == null || typeof value === \"boolean\") return \"\";\n if (Array.isArray(value))\n return value\n .map((item, index) =>\n at(context, `[${index}]`, () => render(item, context, namespace, parent)),\n )\n .join(\"\");\n return render(value, context, namespace, parent);\n}\nfunction renderText(value: unknown, context: Context): string {\n if (value == null || typeof value === \"boolean\") return \"\";\n if (typeof value === \"string\" || (typeof value === \"number\" && Number.isFinite(value)))\n return escapeText(String(value));\n fail(\"ZR_CHILD\", context, `invalid scalar ${typeof value}`);\n}\nfunction style(value: unknown, context: Context): string {\n if (typeof value === \"string\") return value;\n if (\n value === null ||\n typeof value !== \"object\" ||\n Array.isArray(value) ||\n Object.getPrototypeOf(value) !== Object.prototype\n )\n fail(\"ZR_STYLE\", context, \"style must be a string or flat object\");\n let result = \"\";\n for (const [name, entry] of Object.entries(value)) {\n if (!/^(--[a-zA-Z0-9_-]+|[a-z][a-z0-9-]*)$/.test(name) || /[A-Z]/.test(name))\n fail(\"ZR_STYLE\", context, `invalid property ${name}`);\n if (entry == null) continue;\n if (typeof entry !== \"string\" && !(typeof entry === \"number\" && Number.isFinite(entry)))\n fail(\"ZR_STYLE\", context, `invalid value for ${name}`);\n result += `${name}:${entry};`;\n }\n return result;\n}\nfunction attributes(\n tag: string,\n props: Readonly<Record<string, unknown>>,\n context: Context,\n namespace: Namespace,\n custom: boolean,\n): string {\n let output = \"\";\n for (const [name, original] of Object.entries(props)) {\n if (reserved.has(name)) continue;\n if (forms.has(name)) continue;\n if (dialect.has(name) || /^on[A-Z]/.test(name))\n fail(\"ZR_PROP_DIALECT\", context, `${tag}.${name}`);\n if (name.startsWith(\"on:\")) {\n if (!/^on:[A-Za-z][A-Za-z0-9_-]*(?::capture)?$/.test(name))\n fail(\"ZR_LISTENER\", context, `${tag}.${name}`);\n if (typeof original !== \"function\") fail(\"ZR_LISTENER\", context, `${tag}.${name}`);\n const inline = `on${name.slice(3).replace(/:capture$/, \"\")}`;\n if (inline in props) fail(\"ZR_LISTENER_CONFLICT\", context, `${tag}.${inline}`);\n continue;\n }\n if (!/^[A-Za-z_:][A-Za-z0-9_:.-]*$/.test(name)) fail(\"ZR_ATTRIBUTE\", context, `${tag}.${name}`);\n if (\n !custom &&\n !commonAttrs.has(name) &&\n !(namespace === \"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\", context, `${tag}.${name}`);\n const value = read(original);\n if ((name === \"value\" || name === \"checked\") && reactive(original))\n fail(\"ZR_MODEL_UNSUPPORTED\", context, `${tag}.${name} requires modelValue/modelChecked`);\n if (value == null) continue;\n if (/^on[a-z]/.test(name) && typeof value === \"function\")\n fail(\"ZR_PROP_DIALECT\", context, `${tag}.${name} must use on:${name.slice(2)}`);\n if (custom && typeof value !== \"string\")\n fail(\"ZR_ATTRIBUTE\", context, `${tag}.${name} requires a string`);\n if (name === \"style\") output += ` style=\"${escapeAttribute(style(value, context))}\"`;\n else if (booleanAttrs.has(name)) {\n if (typeof value !== \"boolean\")\n fail(\"ZR_ATTRIBUTE\", context, `${tag}.${name} requires a boolean`);\n if (value) output += ` ${name}`;\n } else {\n if (\n typeof value !== \"string\" &&\n typeof value !== \"boolean\" &&\n !(typeof value === \"number\" && Number.isFinite(value))\n )\n fail(\"ZR_ATTRIBUTE\", context, `${tag}.${name} requires a scalar`);\n if (typeof value === \"boolean\" && !name.startsWith(\"aria-\") && !name.startsWith(\"data-\"))\n fail(\"ZR_ATTRIBUTE\", context, `${tag}.${name} requires a string`);\n if (/^on[a-z]/.test(name) && typeof value !== \"string\")\n fail(\"ZR_ATTRIBUTE\", context, `${tag}.${name} requires a string`);\n output += ` ${name}=\"${escapeAttribute(String(value))}\"`;\n }\n }\n return output;\n}\nfunction restricted(\n value: unknown,\n context: Context,\n namespace: Namespace,\n parent: string,\n): string {\n if (value == null || typeof value === \"boolean\") return \"\";\n if (Array.isArray(value))\n return value\n .map((item, index) =>\n at(context, `[${index}]`, () => restricted(item, context, namespace, parent)),\n )\n .join(\"\");\n if (typeof value === \"string\" || typeof value === \"number\") {\n if (parent in tableChildren && String(value).trim())\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} text`);\n return renderText(value, context);\n }\n if (parent === \"title\" || parent === \"option\")\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} requires static text`);\n if (!isDescription(value) || typeof value.type !== \"string\")\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} requires intrinsic children`);\n return element(value, context, namespace, parent);\n}\nfunction element(\n description: Description,\n context: Context,\n namespace: Namespace,\n parent: string,\n): string {\n const tag = description.type as string;\n const custom = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/.test(tag);\n const elementNamespace = tag === \"svg\" || namespace === \"svg\" ? \"svg\" : \"html\";\n const childNamespace = tag === \"foreignObject\" ? \"html\" : elementNamespace;\n if (elementNamespace === \"svg\" ? !svgTags.has(tag) : !custom && !htmlTags.has(tag))\n fail(\"ZR_TAG\", context, tag);\n if (context.identity && (tag === \"template\" || sensitive.has(tag)))\n fail(\"ZR_PARSER_CONTEXT\", context, tag);\n if (parent in tableChildren && !tableChildren[parent]?.has(tag))\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} > ${tag}`);\n if (\n (parent === \"select\" && tag !== \"option\" && tag !== \"optgroup\") ||\n (parent === \"optgroup\" && tag !== \"option\")\n )\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} > ${tag}`);\n const previousFormId = context.formId;\n if (tag === \"form\")\n context.formId =\n typeof description.props.id === \"string\"\n ? `id:${description.props.id}`\n : `form:${context.nextFormId++}`;\n const source = description.props;\n const props: Record<string, unknown> = { ...source };\n const hasValue = source.modelValue !== undefined;\n const hasChecked = source.modelChecked !== undefined;\n if (\n (hasValue && hasChecked) ||\n (source.defaultValue !== undefined && source.value !== undefined) ||\n (source.defaultChecked !== undefined && source.checked !== undefined) ||\n (hasValue &&\n (source.defaultValue !== undefined ||\n (source.type !== \"radio\" && source.value !== undefined))) ||\n (hasChecked && (source.defaultChecked !== undefined || source.checked !== undefined))\n )\n fail(\"ZR_MODEL_CONFLICT\", context, tag);\n if (hasValue || hasChecked) {\n for (const name of [\"type\", \"multiple\", \"name\", \"form\"])\n if (reactive(source[name])) fail(\"ZR_MODEL_UNSUPPORTED\", context, `reactive ${name} shape`);\n const model = hasValue ? source.modelValue : source.modelChecked;\n let prototype = model;\n let writable = false;\n while (prototype && typeof prototype === \"object\") {\n const property = Object.getOwnPropertyDescriptor(prototype, \"value\");\n if (property) {\n writable = typeof property.set === \"function\";\n break;\n }\n prototype = Object.getPrototypeOf(prototype);\n }\n if (\n !reactive(model) ||\n !writable ||\n !(\"$$zudoWritable\" in model) ||\n model.$$zudoWritable !== \"zudo-react.writable.v1\"\n )\n fail(\"ZR_MODEL_READONLY\", context, tag);\n }\n if ((hasValue || hasChecked) && source.contenteditable !== undefined)\n fail(\"ZR_MODEL_UNSUPPORTED\", context, `${tag}[contenteditable]`);\n const inputType = String(source.type ?? \"text\");\n if (\n hasValue &&\n !(\n tag === \"textarea\" ||\n tag === \"select\" ||\n (tag === \"input\" &&\n [\"text\", \"search\", \"email\", \"url\", \"tel\", \"password\", \"radio\"].includes(inputType))\n )\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, `${tag}[type=${inputType}]`);\n if (hasChecked && !(tag === \"input\" && inputType === \"checkbox\"))\n fail(\"ZR_MODEL_UNSUPPORTED\", context, tag);\n if (\n source.defaultValue !== undefined &&\n !(tag === \"textarea\" || tag === \"select\" || tag === \"input\")\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, tag);\n if (\n source.defaultValue !== undefined &&\n tag === \"input\" &&\n ![\"text\", \"search\", \"email\", \"url\", \"tel\", \"password\"].includes(inputType)\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, `${tag}[type=${inputType}]`);\n if (\n source.defaultChecked !== undefined &&\n !(tag === \"input\" && [\"checkbox\", \"radio\"].includes(inputType))\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, tag);\n if (tag === \"input\") {\n if (source.defaultValue !== undefined || (hasValue && inputType !== \"radio\"))\n props.value = read(source.modelValue ?? source.defaultValue);\n if (source.defaultChecked !== undefined || hasChecked)\n props.checked = read(source.modelChecked ?? source.defaultChecked);\n if (hasValue && inputType === \"radio\") {\n if (typeof source.name !== \"string\" || !source.name || typeof source.value !== \"string\")\n fail(\"ZR_MODEL_UNSUPPORTED\", context, \"radio requires static name and value\");\n const selected = read(source.modelValue);\n if (selected !== null && typeof selected !== \"string\")\n fail(\"ZR_MODEL_VALUE\", context, \"radio requires string or null\");\n const form = typeof source.form === \"string\" ? `id:${source.form}` : context.formId;\n const key = `${source.name}\\u0000${form}`;\n const owner = context.radioNames.get(key);\n if (owner && owner !== source.modelValue)\n fail(\"ZR_MODEL_CONFLICT\", context, \"same-name radios use different models\");\n context.radioNames.set(key, source.modelValue);\n const group = context.radioGroups.get(source.modelValue);\n if (\n group &&\n (group.name !== source.name || group.form !== form || group.options.has(source.value))\n )\n fail(\"ZR_MODEL_CONFLICT\", context, \"radio membership or duplicate value\");\n if (group) group.options.add(source.value);\n else\n context.radioGroups.set(source.modelValue, {\n name: source.name,\n form,\n value: selected,\n options: new Set([source.value]),\n });\n props.checked = selected === source.value;\n }\n }\n if (tag === \"option\" && context.selectValue !== undefined) {\n const value = source.value;\n if (typeof value !== \"string\")\n fail(\"ZR_MODEL_UNSUPPORTED\", context, \"select option requires static value\");\n if (context.selectSeen!.has(value))\n fail(\"ZR_MODEL_CONFLICT\", context, \"duplicate option value\");\n context.selectSeen!.add(value);\n if (source.selected !== undefined)\n fail(\"ZR_MODEL_CONFLICT\", context, \"select-level value with option selected\");\n props.selected = value === context.selectValue;\n if (props.selected) context.selectMatches = (context.selectMatches ?? 0) + 1;\n }\n if (context.boundary && (\"data-zfb-island\" in props || \"data-zfb-island-skip-ssr\" in props))\n fail(\"ZR_NESTED_ISLAND\", context, tag);\n if (\n tag === \"select\" &&\n read(props.multiple) === true &&\n (context.identity || hasValue || source.defaultValue !== undefined)\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, \"select[multiple]\");\n const attrs = attributes(tag, props, context, elementNamespace, custom);\n const raw = props.rawHtml;\n const hasChildren = Object.hasOwn(props, \"children\");\n if (raw !== undefined && hasChildren)\n fail(\"ZR_RAW_HTML\", context, `${tag} has children and rawHtml`);\n if (voidTags.has(tag) && (hasChildren || raw !== undefined))\n fail(\"ZR_VOID_CHILDREN\", context, tag);\n if (\n raw !== undefined &&\n (elementNamespace === \"svg\" ||\n tag === \"textarea\" ||\n tag === \"title\" ||\n tag === \"select\" ||\n tag === \"option\")\n )\n fail(\"ZR_RAW_HTML\", context, tag);\n if (tag === \"textarea\" && hasChildren && (hasValue || source.defaultValue !== undefined))\n fail(\"ZR_MODEL_CONFLICT\", context, tag);\n let content = \"\";\n if (raw !== undefined) {\n if ((tag === \"script\" || tag === \"style\") && reactive(raw))\n fail(\"ZR_RAW_HTML\", context, `${tag} requires static rawHtml`);\n const payload = read(raw);\n if (typeof payload !== \"string\") fail(\"ZR_RAW_HTML\", context, `${tag} requires string rawHtml`);\n if (/<!--\\/?zr:1:|data-zfb-island(?:-skip-ssr)?\\s*=/.test(payload))\n fail(\"ZR_RAW_HTML\", context, \"reserved boundary in rawHtml\");\n if (\n (tag === \"script\" && /<\\/script/i.test(payload)) ||\n (tag === \"style\" && /<\\/style/i.test(payload))\n )\n fail(\"ZR_RAW_HTML\", context, `closing ${tag} in rawHtml`);\n content = tag === \"script\" || tag === \"style\" ? payload : region(context, \"h\", () => payload);\n } else if (tag === \"textarea\" && (hasValue || source.defaultValue !== undefined)) {\n const value = read(source.modelValue ?? source.defaultValue);\n if (typeof value !== \"string\") fail(\"ZR_MODEL_VALUE\", context, \"textarea requires string\");\n content = `${value.startsWith(\"\\n\") ? \"\\n\" : \"\"}${escapeText(value)}`;\n } else if (tag === \"script\" || tag === \"style\") {\n if (hasChildren) fail(\"ZR_RAW_HTML\", context, `${tag} requires rawHtml`);\n } else if (\n tag === \"title\" ||\n tag === \"option\" ||\n tag === \"optgroup\" ||\n tag === \"select\" ||\n tag in tableChildren\n ) {\n if (tag === \"select\" && (hasValue || source.defaultValue !== undefined)) {\n const value = read(source.modelValue ?? source.defaultValue);\n if (typeof value !== \"string\") fail(\"ZR_MODEL_VALUE\", context, \"select requires string\");\n const oldValue = context.selectValue;\n const oldSeen = context.selectSeen;\n const oldMatches = context.selectMatches;\n context.selectValue = value;\n context.selectSeen = new Set();\n context.selectMatches = 0;\n try {\n content = restricted(props.children, context, childNamespace, tag);\n if (context.selectMatches !== 1)\n fail(\"ZR_MODEL_VALUE\", context, `select has no option ${value}`);\n } finally {\n context.selectValue = oldValue;\n context.selectSeen = oldSeen;\n context.selectMatches = oldMatches;\n }\n } else content = restricted(props.children, context, childNamespace, tag);\n } else content = children(props.children, context, childNamespace, tag);\n context.formId = previousFormId;\n return `<${tag}${attrs}>${voidTags.has(tag) ? \"\" : `${content}</${tag}>`}`;\n}\nfunction render(value: unknown, context: Context, namespace: Namespace, parent: string): string {\n if (value == null || typeof value === \"boolean\") return \"\";\n if (Array.isArray(value))\n return region(context, \"f\", () => children(value, context, namespace, parent));\n if (reactive(value)) return region(context, \"t\", () => renderText(read(value), context));\n if (typeof value === \"string\" || typeof value === \"number\") return renderText(value, context);\n if (typeof value === \"object\" && value !== null && \"then\" in value)\n fail(\"ZR_ASYNC_COMPONENT\", context, \"promise child\");\n if (!isDescription(value)) fail(\"ZR_CHILD\", context, typeof value);\n if ((value.type as symbol | typeof value.type) === islandRootType)\n return island(value, context, namespace, parent);\n if (value.type === Fragment)\n return region(context, \"f\", () => children(value.props.children, context, namespace, parent));\n if (value.type === Show) {\n if (\n parent in tableChildren ||\n [\"select\", \"optgroup\", \"option\", \"title\", \"textarea\", \"script\", \"style\"].includes(parent)\n )\n fail(\"ZR_PARSER_CONTEXT\", context, parent);\n const props = showProps(value);\n if (\n !reactive(props.when) ||\n typeof props.children !== \"function\" ||\n (props.fallback !== undefined && typeof props.fallback !== \"function\")\n )\n fail(\"ZR_CHILD\", context, \"Show requires signal and factories\");\n const selected = read(props.when);\n if (typeof selected !== \"boolean\") fail(\"ZR_CHILD\", context, \"Show.when requires boolean\");\n return region(context, `s:${selected ? 1 : 0}`, () => {\n const factory = selected ? props.children : props.fallback;\n if (!factory) return \"\";\n const scope = context.scope.child(\"Show\");\n const previous = context.scope;\n context.scope = scope;\n try {\n return withScope(scope, () => render(factory(), context, namespace, parent));\n } finally {\n context.scope = previous;\n }\n });\n }\n if (value.type === For) {\n if (\n parent in tableChildren ||\n [\"select\", \"optgroup\", \"option\", \"title\", \"textarea\", \"script\", \"style\"].includes(parent)\n )\n fail(\"ZR_PARSER_CONTEXT\", context, parent);\n const props = forProps<unknown>(value);\n if (\n !reactive(props.each) ||\n typeof props.by !== \"function\" ||\n typeof props.children !== \"function\"\n )\n fail(\"ZR_CHILD\", context, \"For requires signal, key and factory\");\n const items = read(props.each);\n if (!Array.isArray(items)) fail(\"ZR_CHILD\", context, \"For.each requires array\");\n const keys = keyed(items, props.by, context.path);\n return region(context, \"l\", () =>\n items\n .map((item, index) => {\n const scope = context.scope.child(\"For\");\n const previous = context.scope;\n context.scope = scope;\n try {\n return region(context, `i:${keyPayload(keys[index]!)}`, () =>\n withScope(scope, () =>\n render(\n props.children(view(item).value, view(index).value),\n context,\n namespace,\n parent,\n ),\n ),\n );\n } finally {\n context.scope = previous;\n }\n })\n .join(\"\"),\n );\n }\n if (typeof value.type === \"string\") return element(value, context, namespace, parent);\n const component = value.type;\n const scope = context.scope.child(component.name || \"Anonymous\");\n const prior = context.scope;\n context.scope = scope;\n try {\n return region(context, \"c\", () => {\n const output = withScope(scope, () => component(value.props));\n if (output && typeof output === \"object\" && \"then\" in output)\n fail(\"ZR_ASYNC_COMPONENT\", context, component.name);\n return render(output, context, namespace, parent);\n });\n } finally {\n context.scope = prior;\n }\n}\nfunction empty(value: unknown): boolean {\n return (\n value == null || typeof value === \"boolean\" || (Array.isArray(value) && value.every(empty))\n );\n}\nfunction island(\n description: Description,\n context: Context,\n namespace: Namespace,\n parent: string,\n): string {\n if (context.boundary) fail(\"ZR_NESTED_ISLAND\", context, \"nested island\");\n if (namespace !== \"html\" || parent === \"p\" || parent in tableChildren || parent === \"select\")\n fail(\"ZR_PARSER_CONTEXT\", context, \"island wrapper\");\n const child = description.props.child;\n const options = description.props.options as IslandOptions;\n if (!isDescription(child) || typeof child.type !== \"function\")\n fail(\"ZR_ISLAND_CHILD\", context, \"one function component required\");\n if (!options?.identity?.component || !options.identity.build)\n fail(\"ZR_ISLAND_IDENTITY\", context, \"component/build required\");\n const component =\n (child.type as typeof child.type & { displayName?: string }).displayName ?? child.type.name;\n if (component !== options.identity.component)\n fail(\"ZR_ISLAND_IDENTITY\", context, `expected ${options.identity.component}, got ${component}`);\n if (Object.hasOwn(child.props, \"children\") && !empty(child.props.children))\n fail(\"ZR_ISLAND_CHILD\", context, \"nonempty children\");\n const props = { ...child.props };\n delete props.children;\n let payload: string;\n try {\n payload = serializeProps(props);\n } catch (error) {\n throw new TypeError(\n `ZR_ISLAND_PROPS ${component}: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n const when = options.when ?? \"load\";\n if (\n ![\"load\", \"idle\", \"visible\", \"media\"].includes(when) ||\n (when === \"media\" && !options.media?.trim()) ||\n (when !== \"media\" && options.media !== undefined)\n )\n fail(\"ZR_ISLAND_WHEN\", context, when);\n const marker = options.skipSsr ? \"data-zfb-island-skip-ssr\" : \"data-zfb-island\";\n const attrs = ` ${marker}=\"${escapeAttribute(options.identity.component)}\" data-when=\"${when}\"${when === \"media\" ? ` data-media=\"${escapeAttribute(options.media!)}\"` : \"\"} data-zfb-transport=\"json/1\" data-zfb-protocol=\"zudo-react/1\" data-zfb-build=\"${escapeAttribute(options.identity.build)}\" data-props=\"${escapeAttribute(payload)}\"`;\n const local: Context = {\n radioGroups: new Map(),\n radioNames: new Map(),\n formId: \"\",\n nextFormId: 0,\n identity: options.skipSsr ? undefined : options.identity,\n boundary: true,\n next: 0,\n scope: context.scope,\n path: context.path,\n };\n const content = options.skipSsr\n ? children(options.fallback, local, namespace, \"div\")\n : render({ ...child, props }, local, \"html\", \"div\");\n validateRadioGroups(local);\n return `<div${attrs}>${content}</div>`;\n}\nfunction validateRadioGroups(context: Context): void {\n for (const group of context.radioGroups.values())\n if (group.value !== null && !group.options.has(group.value))\n fail(\"ZR_MODEL_VALUE\", context, `radio has no option ${group.value}`);\n}\nexport function renderHtml(node: Child, options: RenderOptions): string {\n const root = createScope({ component: options.island?.component ?? \"<root>\" });\n const context: Context = {\n radioGroups: new Map(),\n radioNames: new Map(),\n formId: \"\",\n nextFormId: 0,\n identity: options.island,\n boundary: options.island !== undefined,\n next: 0,\n scope: root,\n path: \"root\",\n };\n try {\n const html = render(node, context, \"html\", \"\");\n validateRadioGroups(context);\n return html;\n } finally {\n root.dispose();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"render-html.js","sourceRoot":"","sources":["../../src/zudo-react/render-html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,QAAQ,EACR,eAAe,EACf,aAAa,GAId,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAqB,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,KAAK,EACL,UAAU,EACV,IAAI,GACL,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,aAAa,EACb,uBAAuB,EACvB,QAAQ,EACR,OAAO,EAEP,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAEzB,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3D,MAAM,QAAQ,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAC;AACnD,MAAM,S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AAE,IAAI,GAAG,EAAE;QACtB,UAAU,EAAE,IAAI,GAAG,EAAE;QACrB,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,CAAC;QACb,QAAQ,EAAE,OAAO,CAAC,MAAM;QACxB,QAAQ,EAAE,OAAO,CAAC,MAAM,KAAK,SAAS;QACtC,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,MAAM;KACb,CAAC;IACF,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;QAC/C,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["import { serializeStyle } from \"./style.js\";\nimport {\n Fragment,\n descriptionSite,\n isDescription,\n type Child,\n type Description,\n type DescriptionSite,\n} from \"./description.js\";\nimport { escapeAttribute, escapeText } from \"./escape.js\";\nimport { rawHtmlReserved } from \"./raw-html.js\";\nimport type { IslandIdentity } from \"./index.js\";\nimport { readSnapshot } from \"./reactive.js\";\nimport type { ReadonlySignal } from \"./reactive-types.js\";\nimport { createScope, withScope, type RuntimeScope } from \"./scope.js\";\nimport { emptyChildren, normalizeProps } from \"./props-transport.js\";\nimport { islandRootType } from \"./island-root-type.js\";\nimport type { IslandOptions, RenderOptions } from \"./server.js\";\nimport {\n isShowType,\n isForType,\n showProps,\n forProps,\n keyed,\n keyPayload,\n view,\n} from \"./structure.js\";\nimport {\n attributeError,\n attributeText,\n booleanAttrs,\n commonAttrs,\n dialectSuggestion,\n emptyIframeChildren,\n formProps,\n htmlAttrs,\n htmlTags,\n isDialectProp,\n reactiveModelSuggestion,\n svgAttrs,\n svgTags,\n type Namespace,\n voidTags,\n} from \"./vocabulary.js\";\n\nconst words = (value: string) => new Set(value.split(\" \"));\nconst reserved = words(\"key ref children rawHtml\");\nconst sensitive = words(\"noscript xmp iframe noembed noframes plaintext\");\nconst tableChildren: Record<string, Set<string>> = {\n table: words(\"caption colgroup thead tbody tfoot\"),\n thead: words(\"tr\"),\n tbody: words(\"tr\"),\n tfoot: words(\"tr\"),\n tr: words(\"td th\"),\n colgroup: words(\"col\"),\n};\ninterface Context {\n identity: IslandIdentity | undefined;\n boundary: boolean;\n next: number;\n scope: RuntimeScope;\n path: string;\n node?: Description | undefined;\n selectValue?: string | undefined;\n selectSeen?: Set<string> | undefined;\n selectMatches?: number | undefined;\n radioGroups: Map<\n unknown,\n { name: string; form: string; value: string | null; options: Set<string> }\n >;\n radioNames: Map<string, unknown>;\n formId: string;\n nextFormId: number;\n}\nexport interface RenderDiagnostic {\n readonly code: string;\n readonly path: string;\n readonly component: string;\n readonly spelling?: { readonly name: string; readonly suggestion?: string };\n readonly site?: DescriptionSite;\n}\nfunction fail(\n code: string,\n context: Context,\n detail: string,\n spelling?: RenderDiagnostic[\"spelling\"],\n): never {\n const component = context.identity?.component ?? \"static render\";\n const site = context.node && descriptionSite(context.node);\n const diagnostic: RenderDiagnostic = {\n code,\n path: context.path,\n component,\n ...(spelling && { spelling }),\n ...(site && { site }),\n };\n throw Object.assign(new TypeError(`${code}: ${detail} at ${context.path} in ${component}`), {\n diagnostic,\n });\n}\nfunction reactive(value: unknown): value is ReadonlySignal<unknown> {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"$$zudoReactive\" in value &&\n value.$$zudoReactive === \"zudo-react.reactive.v1\"\n );\n}\nfunction read(value: unknown): unknown {\n return reactive(value) ? readSnapshot(value) : value;\n}\nfunction region(context: Context, kind: string, content: () => string): string {\n if (!context.identity) return content();\n const id = context.next++;\n return `<!--zr:1:${id}:${kind}-->${content()}<!--/zr:1:${id}-->`;\n}\nfunction at<T>(context: Context, part: string, fn: () => T): T {\n const old = context.path;\n context.path += part;\n try {\n return fn();\n } finally {\n context.path = old;\n }\n}\nfunction children(value: unknown, context: Context, namespace: Namespace, parent: string): string {\n if (value == null || typeof value === \"boolean\") return \"\";\n if (Array.isArray(value))\n return value\n .map((item, index) =>\n at(context, `[${index}]`, () => render(item, context, namespace, parent)),\n )\n .join(\"\");\n return render(value, context, namespace, parent);\n}\nfunction renderText(value: unknown, context: Context): string {\n if (value == null || typeof value === \"boolean\") return \"\";\n if (typeof value === \"string\" || (typeof value === \"number\" && Number.isFinite(value)))\n return escapeText(String(value));\n fail(\"ZR_CHILD\", context, `invalid scalar ${typeof value}`);\n}\nfunction style(value: unknown, context: Context): string {\n try {\n return serializeStyle(value);\n } catch (error) {\n if (error instanceof TypeError)\n fail(\"ZR_STYLE\", context, error.message.replace(/^ZR_STYLE: /, \"\"));\n throw error;\n }\n}\nfunction attributes(\n tag: string,\n props: Readonly<Record<string, unknown>>,\n context: Context,\n namespace: Namespace,\n custom: boolean,\n): string {\n let output = \"\";\n for (const [name, original] of Object.entries(props)) {\n if (reserved.has(name)) continue;\n if (formProps.has(name)) continue;\n if (isDialectProp(name, namespace, custom)) {\n const suggestion = dialectSuggestion(name, namespace, custom);\n fail(\n \"ZR_PROP_DIALECT\",\n context,\n `${tag}.${name}${suggestion ? ` (use \\`${suggestion}\\` instead of \\`${name}\\`)` : \"\"}`,\n suggestion ? { name, suggestion } : { name },\n );\n }\n if (name.startsWith(\"on:\")) {\n if (!/^on:[A-Za-z][A-Za-z0-9_-]*(?::capture)?$/.test(name))\n fail(\"ZR_LISTENER\", context, `${tag}.${name}`);\n if (typeof original !== \"function\") fail(\"ZR_LISTENER\", context, `${tag}.${name}`);\n const inline = `on${name.slice(3).replace(/:capture$/, \"\")}`;\n if (inline in props) fail(\"ZR_LISTENER_CONFLICT\", context, `${tag}.${inline}`);\n continue;\n }\n if (!/^[A-Za-z_:][A-Za-z0-9_:.-]*$/.test(name)) fail(\"ZR_ATTRIBUTE\", context, `${tag}.${name}`);\n if (\n !custom &&\n !commonAttrs.has(name) &&\n !(namespace === \"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\", context, `${tag}.${name}`);\n const value = read(original);\n if ((name === \"value\" || name === \"checked\") && reactive(original)) {\n const suggestion = reactiveModelSuggestion(\n tag,\n name,\n String(read(props.type) ?? \"text\"),\n custom,\n );\n fail(\n \"ZR_MODEL_UNSUPPORTED\",\n context,\n `${tag}.${name} requires ${suggestion ?? \"a static value\"}`,\n );\n }\n if (/^on[a-z]/.test(name) && typeof value === \"function\")\n fail(\"ZR_PROP_DIALECT\", context, `${tag}.${name} must use on:${name.slice(2)}`, {\n name,\n suggestion: `on:${name.slice(2)}`,\n });\n const error = attributeError(name, value, custom);\n if (error) fail(\"ZR_ATTRIBUTE\", context, `${tag}.${name} ${error}`);\n if (value == null) continue;\n const text = name === \"style\" ? style(value, context) : attributeText(name, value);\n if (text === null) continue;\n output +=\n booleanAttrs.has(name) && value === true ? ` ${name}` : ` ${name}=\"${escapeAttribute(text)}\"`;\n }\n return output;\n}\nfunction restricted(\n value: unknown,\n context: Context,\n namespace: Namespace,\n parent: string,\n): string {\n return tracked(value, context, () => restrictedValue(value, context, namespace, parent));\n}\nfunction restrictedValue(\n value: unknown,\n context: Context,\n namespace: Namespace,\n parent: string,\n): string {\n if (value == null || typeof value === \"boolean\") return \"\";\n if (Array.isArray(value))\n return value\n .map((item, index) =>\n at(context, `[${index}]`, () => restricted(item, context, namespace, parent)),\n )\n .join(\"\");\n if (typeof value === \"string\" || typeof value === \"number\") {\n if (parent in tableChildren && String(value).trim())\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} text`);\n return renderText(value, context);\n }\n if (parent === \"title\" || parent === \"option\")\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} requires static text`);\n if (!isDescription(value) || typeof value.type !== \"string\")\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} requires intrinsic children`);\n return element(value, context, namespace, parent);\n}\nfunction element(\n description: Description,\n context: Context,\n namespace: Namespace,\n parent: string,\n): string {\n const tag = description.type as string;\n const custom = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/.test(tag);\n const elementNamespace = tag === \"svg\" || namespace === \"svg\" ? \"svg\" : \"html\";\n const childNamespace = tag === \"foreignObject\" ? \"html\" : elementNamespace;\n if (elementNamespace === \"svg\" ? !svgTags.has(tag) : !custom && !htmlTags.has(tag))\n fail(\"ZR_TAG\", context, tag);\n if (context.identity && (tag === \"template\" || (tag !== \"iframe\" && sensitive.has(tag))))\n fail(\"ZR_PARSER_CONTEXT\", context, tag);\n if (parent in tableChildren && !tableChildren[parent]?.has(tag))\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} > ${tag}`);\n if (\n (parent === \"select\" && tag !== \"option\" && tag !== \"optgroup\") ||\n (parent === \"optgroup\" && tag !== \"option\")\n )\n fail(\"ZR_PARSER_CONTEXT\", context, `${parent} > ${tag}`);\n const previousFormId = context.formId;\n if (tag === \"form\")\n context.formId =\n typeof description.props.id === \"string\"\n ? `id:${description.props.id}`\n : `form:${context.nextFormId++}`;\n const source = description.props;\n const props: Record<string, unknown> = { ...source };\n if (tag === \"iframe\") {\n if (Object.hasOwn(props, \"rawHtml\")) fail(\"ZR_RAW_HTML\", context, \"iframe forbids rawHtml\");\n if (!emptyIframeChildren(props.children))\n fail(\"ZR_PARSER_CONTEXT\", context, \"iframe requires empty children\");\n }\n const hasValue = source.modelValue !== undefined;\n const hasChecked = source.modelChecked !== undefined;\n if (\n (hasValue && hasChecked) ||\n (source.defaultValue !== undefined && source.value !== undefined) ||\n (source.defaultChecked !== undefined && source.checked !== undefined) ||\n (hasValue &&\n (source.defaultValue !== undefined ||\n (source.type !== \"radio\" && source.value !== undefined))) ||\n (hasChecked && (source.defaultChecked !== undefined || source.checked !== undefined))\n )\n fail(\"ZR_MODEL_CONFLICT\", context, tag);\n if (hasValue || hasChecked) {\n for (const name of [\"type\", \"multiple\", \"name\", \"form\"])\n if (reactive(source[name])) fail(\"ZR_MODEL_UNSUPPORTED\", context, `reactive ${name} shape`);\n const model = hasValue ? source.modelValue : source.modelChecked;\n let prototype = model;\n let writable = false;\n while (prototype && typeof prototype === \"object\") {\n const property = Object.getOwnPropertyDescriptor(prototype, \"value\");\n if (property) {\n writable = typeof property.set === \"function\";\n break;\n }\n prototype = Object.getPrototypeOf(prototype);\n }\n if (\n !reactive(model) ||\n !writable ||\n !(\"$$zudoWritable\" in model) ||\n model.$$zudoWritable !== \"zudo-react.writable.v1\"\n )\n fail(\"ZR_MODEL_READONLY\", context, tag);\n }\n if ((hasValue || hasChecked) && source.contenteditable !== undefined)\n fail(\"ZR_MODEL_UNSUPPORTED\", context, `${tag}[contenteditable]`);\n const inputType = String(source.type ?? \"text\");\n if (\n hasValue &&\n !(\n tag === \"textarea\" ||\n tag === \"select\" ||\n (tag === \"input\" &&\n [\"text\", \"search\", \"email\", \"url\", \"tel\", \"password\", \"radio\"].includes(inputType))\n )\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, `${tag}[type=${inputType}]`);\n if (hasChecked && !(tag === \"input\" && inputType === \"checkbox\"))\n fail(\"ZR_MODEL_UNSUPPORTED\", context, tag);\n if (\n source.defaultValue !== undefined &&\n !(tag === \"textarea\" || tag === \"select\" || tag === \"input\")\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, tag);\n if (\n source.defaultValue !== undefined &&\n tag === \"input\" &&\n ![\"text\", \"search\", \"email\", \"url\", \"tel\", \"password\"].includes(inputType)\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, `${tag}[type=${inputType}]`);\n if (\n source.defaultChecked !== undefined &&\n !(tag === \"input\" && [\"checkbox\", \"radio\"].includes(inputType))\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, tag);\n if (tag === \"input\") {\n if (source.defaultValue !== undefined || (hasValue && inputType !== \"radio\"))\n props.value = read(source.modelValue ?? source.defaultValue);\n if (source.defaultChecked !== undefined || hasChecked)\n props.checked = read(source.modelChecked ?? source.defaultChecked);\n if (hasValue && inputType === \"radio\") {\n if (typeof source.name !== \"string\" || !source.name || typeof source.value !== \"string\")\n fail(\"ZR_MODEL_UNSUPPORTED\", context, \"radio requires static name and value\");\n const selected = read(source.modelValue);\n if (selected !== null && typeof selected !== \"string\")\n fail(\"ZR_MODEL_VALUE\", context, \"radio requires string or null\");\n const form = typeof source.form === \"string\" ? `id:${source.form}` : context.formId;\n const key = `${source.name}\\u0000${form}`;\n const owner = context.radioNames.get(key);\n if (owner && owner !== source.modelValue)\n fail(\"ZR_MODEL_CONFLICT\", context, \"same-name radios use different models\");\n context.radioNames.set(key, source.modelValue);\n const group = context.radioGroups.get(source.modelValue);\n if (\n group &&\n (group.name !== source.name || group.form !== form || group.options.has(source.value))\n )\n fail(\"ZR_MODEL_CONFLICT\", context, \"radio membership or duplicate value\");\n if (group) group.options.add(source.value);\n else\n context.radioGroups.set(source.modelValue, {\n name: source.name,\n form,\n value: selected,\n options: new Set([source.value]),\n });\n props.checked = selected === source.value;\n }\n }\n if (tag === \"option\" && context.selectValue !== undefined) {\n const value = source.value;\n if (typeof value !== \"string\")\n fail(\"ZR_MODEL_UNSUPPORTED\", context, \"select option requires static value\");\n if (context.selectSeen!.has(value))\n fail(\"ZR_MODEL_CONFLICT\", context, \"duplicate option value\");\n context.selectSeen!.add(value);\n if (source.selected !== undefined)\n fail(\"ZR_MODEL_CONFLICT\", context, \"select-level value with option selected\");\n props.selected = value === context.selectValue;\n if (props.selected) context.selectMatches = (context.selectMatches ?? 0) + 1;\n }\n if (context.boundary && (\"data-zfb-island\" in props || \"data-zfb-island-skip-ssr\" in props))\n fail(\"ZR_NESTED_ISLAND\", context, tag);\n if (\n tag === \"select\" &&\n read(props.multiple) === true &&\n (context.identity || hasValue || source.defaultValue !== undefined)\n )\n fail(\"ZR_MODEL_UNSUPPORTED\", context, \"select[multiple]\");\n const attrs = attributes(tag, props, context, elementNamespace, custom);\n const raw = props.rawHtml;\n const hasChildren = Object.hasOwn(props, \"children\");\n if (raw !== undefined && hasChildren)\n fail(\"ZR_RAW_HTML\", context, `${tag} has children and rawHtml`);\n if (voidTags.has(tag) && (hasChildren || raw !== undefined))\n fail(\"ZR_VOID_CHILDREN\", context, tag);\n if (\n raw !== undefined &&\n (elementNamespace === \"svg\" ||\n tag === \"textarea\" ||\n tag === \"title\" ||\n tag === \"select\" ||\n tag === \"option\")\n )\n fail(\"ZR_RAW_HTML\", context, tag);\n if (tag === \"textarea\" && hasChildren && (hasValue || source.defaultValue !== undefined))\n fail(\"ZR_MODEL_CONFLICT\", context, tag);\n let content = \"\";\n if (raw !== undefined) {\n if ((tag === \"script\" || tag === \"style\") && reactive(raw))\n fail(\"ZR_RAW_HTML\", context, `${tag} requires static rawHtml`);\n const payload = read(raw);\n if (typeof payload !== \"string\") fail(\"ZR_RAW_HTML\", context, `${tag} requires string rawHtml`);\n if (rawHtmlReserved(payload, tag)) fail(\"ZR_RAW_HTML\", context, \"reserved boundary in rawHtml\");\n if (\n (tag === \"script\" && /<\\/script/i.test(payload)) ||\n (tag === \"style\" && /<\\/style/i.test(payload))\n )\n fail(\"ZR_RAW_HTML\", context, `closing ${tag} in rawHtml`);\n content = tag === \"script\" || tag === \"style\" ? payload : region(context, \"h\", () => payload);\n } else if (tag === \"textarea\" && (hasValue || source.defaultValue !== undefined)) {\n const value = read(source.modelValue ?? source.defaultValue);\n if (typeof value !== \"string\") fail(\"ZR_MODEL_VALUE\", context, \"textarea requires string\");\n content = `${value.startsWith(\"\\n\") ? \"\\n\" : \"\"}${escapeText(value)}`;\n } else if (tag === \"iframe\") {\n // The shell has no owned children; srcdoc belongs to the browser's foreign document.\n } else if (tag === \"script\" || tag === \"style\") {\n if (hasChildren) fail(\"ZR_RAW_HTML\", context, `${tag} requires rawHtml`);\n } else if (\n tag === \"title\" ||\n tag === \"option\" ||\n tag === \"optgroup\" ||\n tag === \"select\" ||\n tag in tableChildren\n ) {\n if (tag === \"select\" && (hasValue || source.defaultValue !== undefined)) {\n const value = read(source.modelValue ?? source.defaultValue);\n if (typeof value !== \"string\") fail(\"ZR_MODEL_VALUE\", context, \"select requires string\");\n const oldValue = context.selectValue;\n const oldSeen = context.selectSeen;\n const oldMatches = context.selectMatches;\n context.selectValue = value;\n context.selectSeen = new Set();\n context.selectMatches = 0;\n try {\n content = restricted(props.children, context, childNamespace, tag);\n if (context.selectMatches !== 1)\n fail(\"ZR_MODEL_VALUE\", context, `select has no option ${value}`);\n } finally {\n context.selectValue = oldValue;\n context.selectSeen = oldSeen;\n context.selectMatches = oldMatches;\n }\n } else content = restricted(props.children, context, childNamespace, tag);\n } else content = children(props.children, context, childNamespace, tag);\n if (tag === \"pre\" && raw === undefined && (content.startsWith(\"\\n\") || content.startsWith(\"\\r\")))\n content = `\\n${content}`;\n context.formId = previousFormId;\n return `<${tag}${attrs}>${voidTags.has(tag) ? \"\" : `${content}</${tag}>`}`;\n}\n// A failure is attributed only to the value being rendered: a description's own site,\n// or no site at all for scalars, promises and other non-description children.\nfunction tracked<T>(value: unknown, context: Context, fn: () => T): T {\n const prior = context.node;\n context.node = isDescription(value) ? value : undefined;\n try {\n return fn();\n } finally {\n context.node = prior;\n }\n}\nfunction render(value: unknown, context: Context, namespace: Namespace, parent: string): string {\n return tracked(value, context, () => renderValue(value, context, namespace, parent));\n}\nfunction renderValue(\n value: unknown,\n context: Context,\n namespace: Namespace,\n parent: string,\n): string {\n if (value == null || typeof value === \"boolean\") return \"\";\n if (Array.isArray(value))\n return region(context, \"f\", () => children(value, context, namespace, parent));\n if (reactive(value)) return region(context, \"t\", () => renderText(read(value), context));\n if (typeof value === \"string\" || typeof value === \"number\") return renderText(value, context);\n if (typeof value === \"object\" && value !== null && \"then\" in value)\n fail(\"ZR_ASYNC_COMPONENT\", context, \"promise child\");\n if (!isDescription(value)) fail(\"ZR_CHILD\", context, typeof value);\n if ((value.type as symbol | typeof value.type) === islandRootType)\n return island(value, context, namespace, parent);\n if (value.type === Fragment)\n return region(context, \"f\", () => children(value.props.children, context, namespace, parent));\n if (isShowType(value.type)) {\n if (\n parent in tableChildren ||\n [\"select\", \"optgroup\", \"option\", \"title\", \"textarea\", \"script\", \"style\"].includes(parent)\n )\n fail(\"ZR_PARSER_CONTEXT\", context, parent);\n const props = showProps(value);\n if (\n !reactive(props.when) ||\n typeof props.children !== \"function\" ||\n (props.fallback !== undefined && typeof props.fallback !== \"function\")\n )\n fail(\"ZR_CHILD\", context, \"Show requires signal and factories\");\n const selected = read(props.when);\n if (typeof selected !== \"boolean\") fail(\"ZR_CHILD\", context, \"Show.when requires boolean\");\n return region(context, `s:${selected ? 1 : 0}`, () => {\n const factory = selected ? props.children : props.fallback;\n if (!factory) return \"\";\n const scope = context.scope.child(\"Show\");\n const previous = context.scope;\n context.scope = scope;\n try {\n return withScope(scope, () => render(factory(), context, namespace, parent));\n } finally {\n context.scope = previous;\n }\n });\n }\n if (isForType(value.type)) {\n if (\n parent in tableChildren ||\n [\"select\", \"optgroup\", \"option\", \"title\", \"textarea\", \"script\", \"style\"].includes(parent)\n )\n fail(\"ZR_PARSER_CONTEXT\", context, parent);\n const props = forProps<unknown>(value);\n if (\n !reactive(props.each) ||\n typeof props.by !== \"function\" ||\n typeof props.children !== \"function\"\n )\n fail(\"ZR_CHILD\", context, \"For requires signal, key and factory\");\n const items = read(props.each);\n if (!Array.isArray(items)) fail(\"ZR_CHILD\", context, \"For.each requires array\");\n const keys = keyed(items, props.by, context.path);\n return region(context, \"l\", () =>\n items\n .map((item, index) => {\n const scope = context.scope.child(\"For\");\n const previous = context.scope;\n context.scope = scope;\n try {\n return region(context, `i:${keyPayload(keys[index]!)}`, () =>\n withScope(scope, () =>\n render(\n props.children(view(item).value, view(index).value),\n context,\n namespace,\n parent,\n ),\n ),\n );\n } finally {\n context.scope = previous;\n }\n })\n .join(\"\"),\n );\n }\n if (typeof value.type === \"string\") return element(value, context, namespace, parent);\n const component = value.type;\n const scope = context.scope.child(component.name || \"Anonymous\");\n const prior = context.scope;\n context.scope = scope;\n try {\n return region(context, \"c\", () => {\n const output = withScope(scope, () => component(value.props));\n if (output && typeof output === \"object\" && \"then\" in output)\n fail(\"ZR_ASYNC_COMPONENT\", context, component.name);\n return render(output, context, namespace, parent);\n });\n } finally {\n context.scope = prior;\n }\n}\nfunction island(\n description: Description,\n context: Context,\n namespace: Namespace,\n parent: string,\n): string {\n if (context.boundary) fail(\"ZR_NESTED_ISLAND\", context, \"nested island\");\n if (namespace !== \"html\" || parent === \"p\" || parent in tableChildren || parent === \"select\")\n fail(\"ZR_PARSER_CONTEXT\", context, \"island wrapper\");\n const child = description.props.child;\n const options = description.props.options as IslandOptions;\n if (!isDescription(child) || typeof child.type !== \"function\")\n fail(\"ZR_ISLAND_CHILD\", context, \"one function component required\");\n if (!options?.identity?.component || !options.identity.build)\n fail(\"ZR_ISLAND_IDENTITY\", context, \"component/build required\");\n const component =\n (child.type as typeof child.type & { displayName?: string }).displayName ?? child.type.name;\n if (component !== options.identity.component)\n fail(\"ZR_ISLAND_IDENTITY\", context, `expected ${options.identity.component}, got ${component}`);\n if (Object.hasOwn(child.props, \"children\") && !emptyChildren(child.props.children))\n fail(\"ZR_ISLAND_CHILD\", context, \"nonempty children\");\n let props: Record<string, unknown>;\n let payload: string;\n try {\n props = normalizeProps(child.props);\n payload = JSON.stringify(props);\n } catch (error) {\n throw new TypeError(\n `ZR_ISLAND_PROPS ${component}: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n const when = options.when ?? \"load\";\n if (\n ![\"load\", \"idle\", \"visible\", \"media\"].includes(when) ||\n (when === \"media\" && !options.media?.trim()) ||\n (when !== \"media\" && options.media !== undefined)\n )\n fail(\"ZR_ISLAND_WHEN\", context, when);\n if (\n options.persist !== undefined &&\n (typeof options.persist !== \"string\" ||\n !options.persist.trim() ||\n options.persist !== options.persist.trim() ||\n /[\\u0000-\\u001f\\u007f]/.test(options.persist))\n )\n fail(\n \"ZR_ISLAND_PERSIST\",\n context,\n \"persist must be a nonempty string without surrounding whitespace or control characters\",\n );\n if (options.persistProps !== undefined && typeof options.persistProps !== \"boolean\")\n fail(\"ZR_ISLAND_PERSIST\", context, \"persistProps must be a boolean\");\n if (options.persistProps !== undefined && options.persist === undefined)\n fail(\"ZR_ISLAND_PERSIST\", context, \"persistProps requires persist\");\n const marker = options.skipSsr ? \"data-zfb-island-skip-ssr\" : \"data-zfb-island\";\n const attrs = ` ${marker}=\"${escapeAttribute(options.identity.component)}\" data-when=\"${when}\"${when === \"media\" ? ` data-media=\"${escapeAttribute(options.media!)}\"` : \"\"} data-zfb-transport=\"json/1\" data-zfb-protocol=\"zudo-react/1\" data-zfb-build=\"${escapeAttribute(options.identity.build)}\" data-props=\"${escapeAttribute(payload)}\"${options.persist === undefined ? \"\" : ` data-zfb-transition-persist=\"${escapeAttribute(options.persist)}\"`}${options.persistProps === true ? ' data-zfb-transition-persist-props=\"true\"' : \"\"}`;\n const local: Context = {\n radioGroups: new Map(),\n radioNames: new Map(),\n formId: \"\",\n nextFormId: 0,\n identity: options.skipSsr ? undefined : options.identity,\n boundary: true,\n next: 0,\n scope: context.scope,\n path: context.path,\n };\n const content = options.skipSsr\n ? children(options.fallback, local, namespace, \"div\")\n : render({ ...child, props }, local, \"html\", \"div\");\n validateRadioGroups(local);\n return `<div${attrs}>${content}</div>`;\n}\nfunction validateRadioGroups(context: Context): void {\n for (const group of context.radioGroups.values())\n if (group.value !== null && !group.options.has(group.value))\n fail(\"ZR_MODEL_VALUE\", context, `radio has no option ${group.value}`);\n}\nexport function renderHtml(node: Child, options: RenderOptions): string {\n const root = createScope({ component: options.island?.component ?? \"<root>\" });\n const context: Context = {\n radioGroups: new Map(),\n radioNames: new Map(),\n formId: \"\",\n nextFormId: 0,\n identity: options.island,\n boundary: options.island !== undefined,\n next: 0,\n scope: root,\n path: \"root\",\n };\n try {\n const html = render(node, context, \"html\", \"\");\n validateRadioGroups(context);\n return html;\n } finally {\n root.dispose();\n }\n}\n"]}
|
package/dist/zudo-react/root.js
CHANGED
|
@@ -2,9 +2,32 @@ export const ROOT_KEY = Symbol.for("@takazudo/zfb/zudo-react/root-v1");
|
|
|
2
2
|
export function storedRoot(container) {
|
|
3
3
|
return container[ROOT_KEY];
|
|
4
4
|
}
|
|
5
|
+
const phaseMessages = {
|
|
6
|
+
setup: "root setup failed",
|
|
7
|
+
preflight: "root validation failed",
|
|
8
|
+
commit: "root commit failed",
|
|
9
|
+
activation: "activation failed",
|
|
10
|
+
update: "reactive update failed",
|
|
11
|
+
cleanup: "cleanup failed",
|
|
12
|
+
};
|
|
13
|
+
function diagnosticLine(value) {
|
|
14
|
+
// Only runtime-shaped identifiers and DOM paths belong on the searchable line.
|
|
15
|
+
// The structured object retains the full details for inspection.
|
|
16
|
+
const code = /^ZR_[A-Z0-9_]+$/.test(value.code) ? value.code : "ZR_UNKNOWN";
|
|
17
|
+
const phase = Object.hasOwn(phaseMessages, value.phase) ? value.phase : "setup";
|
|
18
|
+
const component = /^[A-Za-z_$][\w$.-]*$/.test(value.component) ? value.component : "[component]";
|
|
19
|
+
const path = /^\/[a-z][a-z0-9-]*:nth-child\(\d+\)(?:\/[a-z#][a-z0-9#-]*(?::nth-child\(\d+\))?(?:\[\d+\])?)*$/.test(value.path)
|
|
20
|
+
? value.path
|
|
21
|
+
: "[path]";
|
|
22
|
+
const message = code === "ZR_HYDRATION_MISMATCH" ? "hydration mismatch" : phaseMessages[phase];
|
|
23
|
+
return `[zudo-react] ${code} ${phase} ${component} ${path}: ${message}`;
|
|
24
|
+
}
|
|
5
25
|
export function report(options, diagnostic) {
|
|
6
26
|
try {
|
|
7
|
-
(options.report
|
|
27
|
+
if (options.report)
|
|
28
|
+
options.report(diagnostic);
|
|
29
|
+
else
|
|
30
|
+
console.error(diagnosticLine(diagnostic), diagnostic);
|
|
8
31
|
}
|
|
9
32
|
catch (error) {
|
|
10
33
|
console.error(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.js","sourceRoot":"","sources":["../../src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O,EAAE,CAAC;YACjB,IAAI,OAAO,IAAI,UAAU,CAAC,SAAS,CAAC,KAAK,MAAM;gBAAE,OAAO;YACxD,OAAO,GAAG,IAAI,CAAC;YACf,KAAK,MAAM,IAAI,IAAI,KAAK;gBAAE,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS;oBAAE,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACzF,IAAI,UAAU,CAAC,SAAS,CAAC,KAAK,MAAM;gBAAE,OAAQ,SAAyB,CAAC,QAAQ,CAAC,CAAC;QACpF,CAAC;KACF,CAAC;IACD,SAAyB,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IAC9C,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import type { Diagnostic, IslandIdentity, Reporter } from \"./index.js\";\nimport type { RuntimeScope } from \"./scope.js\";\n\nexport interface RootOptions {\n identity: IslandIdentity;\n signal?: AbortSignal | undefined;\n report?: Reporter | undefined;\n}\nexport interface RootHandle {\n readonly protocol: \"zudo-react/1\";\n readonly identity: IslandIdentity;\n readonly disposed: boolean;\n dispose(): void;\n unmount(): void;\n}\nexport const ROOT_KEY = Symbol.for(\"@takazudo/zfb/zudo-react/root-v1\");\ntype RootElement = Element & { [ROOT_KEY]?: RootHandle };\nexport function storedRoot(container: Element): RootHandle | undefined {\n return (container as RootElement)[ROOT_KEY];\n}\nconst phaseMessages: Record<Diagnostic[\"phase\"], string> = {\n setup: \"root setup failed\",\n preflight: \"root validation failed\",\n commit: \"root commit failed\",\n activation: \"activation failed\",\n update: \"reactive update failed\",\n cleanup: \"cleanup failed\",\n};\n\nfunction diagnosticLine(value: Diagnostic): string {\n // Only runtime-shaped identifiers and DOM paths belong on the searchable line.\n // The structured object retains the full details for inspection.\n const code = /^ZR_[A-Z0-9_]+$/.test(value.code) ? value.code : \"ZR_UNKNOWN\";\n const phase = Object.hasOwn(phaseMessages, value.phase) ? value.phase : \"setup\";\n const component = /^[A-Za-z_$][\\w$.-]*$/.test(value.component) ? value.component : \"[component]\";\n const path =\n /^\\/[a-z][a-z0-9-]*:nth-child\\(\\d+\\)(?:\\/[a-z#][a-z0-9#-]*(?::nth-child\\(\\d+\\))?(?:\\[\\d+\\])?)*$/.test(\n value.path,\n )\n ? value.path\n : \"[path]\";\n const message = code === \"ZR_HYDRATION_MISMATCH\" ? \"hydration mismatch\" : phaseMessages[phase];\n return `[zudo-react] ${code} ${phase} ${component} ${path}: ${message}`;\n}\n\nexport function report(options: RootOptions, diagnostic: Diagnostic): void {\n try {\n if (options.report) options.report(diagnostic);\n else console.error(diagnosticLine(diagnostic), diagnostic);\n } catch (error) {\n console.error(error);\n }\n}\nexport function diagnostic(\n options: RootOptions,\n code: string,\n phase: Diagnostic[\"phase\"],\n path: string,\n expected: string,\n actual: string,\n stack: readonly string[] = [options.identity.component],\n): Diagnostic {\n return {\n code,\n phase,\n component: stack.at(-1) ?? options.identity.component,\n componentStack: stack,\n path,\n expected,\n actual,\n protocol: \"zudo-react/1\",\n build: options.identity.build,\n };\n}\nexport function rootPath(element: Element): string {\n const parts: string[] = [];\n for (let node: Element | null = element; node; node = node.parentElement) {\n const index = node.parentElement\n ? Array.prototype.indexOf.call(node.parentElement.children, node) + 1\n : 1;\n parts.unshift(`${node.localName}:nth-child(${index})`);\n }\n return `/${parts.join(\"/\")}`;\n}\nexport function createRoot(\n container: Element,\n options: RootOptions,\n scope: RuntimeScope,\n cleanups: Array<() => void>,\n owned: readonly Node[],\n): RootHandle {\n let disposed = false;\n let removed = false;\n const handle: RootHandle = {\n protocol: \"zudo-react/1\",\n identity: options.identity,\n get disposed() {\n return disposed;\n },\n dispose() {\n if (disposed) return;\n disposed = true;\n for (const cleanup of [...cleanups].reverse()) {\n try {\n cleanup();\n } catch (error) {\n report(\n options,\n diagnostic(\n options,\n \"ZR_CLEANUP_ERROR\",\n \"cleanup\",\n rootPath(container),\n \"cleanup\",\n String(error),\n ),\n );\n }\n }\n scope.dispose();\n },\n unmount() {\n handle.dispose();\n if (removed || storedRoot(container) !== handle) return;\n removed = true;\n for (const node of owned) if (node.parentNode === container) container.removeChild(node);\n if (storedRoot(container) === handle) delete (container as RootElement)[ROOT_KEY];\n },\n };\n (container as RootElement)[ROOT_KEY] = handle;\n return handle;\n}\n"]}
|
|
@@ -10,6 +10,8 @@ export interface IslandOptions {
|
|
|
10
10
|
media?: string | undefined;
|
|
11
11
|
skipSsr?: boolean | undefined;
|
|
12
12
|
fallback?: Child;
|
|
13
|
+
persist?: string | undefined;
|
|
14
|
+
persistProps?: boolean | undefined;
|
|
13
15
|
}
|
|
14
16
|
export declare function islandRoot(child: Description, options: IslandOptions): Description;
|
|
15
17
|
export declare function renderToString(node: Child, options?: RenderOptions): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/zudo-react/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/zudo-react/server.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AActD,MAAM,UAAU,UAAU,CAAC,KAAkB,EAAE,OAAsB;IACnE,OAAO,iBAAiB,CAAC,cAAuB,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;AACxE,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,IAAW,EAAE,OAAO,GAAkB,EAAE;IACrE,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import type { Child, Description } from \"./description.js\";\nimport type { IslandIdentity } from \"./index.js\";\nimport { createDescription } from \"./description.js\";\nimport { islandRootType } from \"./island-root-type.js\";\nimport { renderHtml } from \"./render-html.js\";\n\nexport { serializeProps } from \"./props-transport.js\";\n\nexport interface RenderOptions {\n island?: IslandIdentity | undefined;\n}\nexport interface IslandOptions {\n identity: IslandIdentity;\n when?: \"load\" | \"idle\" | \"visible\" | \"media\" | undefined;\n media?: string | undefined;\n skipSsr?: boolean | undefined;\n fallback?: Child;\n persist?: string | undefined;\n persistProps?: boolean | undefined;\n}\nexport function islandRoot(child: Description, options: IslandOptions): Description {\n return createDescription(islandRootType as never, { child, options });\n}\nexport function renderToString(node: Child, options: RenderOptions = {}): string {\n return renderHtml(node, options);\n}\n"]}
|
|
@@ -3,6 +3,8 @@ import type { ReadonlySignal } from "./reactive-types.js";
|
|
|
3
3
|
import type { ShowProps, ForProps } from "./index.js";
|
|
4
4
|
export declare function Show(props: ShowProps): Description;
|
|
5
5
|
export declare function For<T>(props: ForProps<T>): Description;
|
|
6
|
+
export declare function isShowType(type: unknown): type is typeof Show;
|
|
7
|
+
export declare function isForType(type: unknown): type is typeof For;
|
|
6
8
|
export declare function showProps(description: Description): ShowProps;
|
|
7
9
|
export declare function forProps<T>(description: Description): ForProps<T>;
|
|
8
10
|
export declare function keyed<T>(items: readonly T[], by: (item: T) => Key, path: string): Key[];
|
|
@@ -6,6 +6,20 @@ export function Show(props) {
|
|
|
6
6
|
export function For(props) {
|
|
7
7
|
return createDescription(For, props);
|
|
8
8
|
}
|
|
9
|
+
// The renderer and an island component can resolve separate copies of this
|
|
10
|
+
// module when a package manager preserves dependency symlinks. Recognize the
|
|
11
|
+
// component by a shared marker so rendering does not recursively call Show/For
|
|
12
|
+
// as ordinary function components.
|
|
13
|
+
const showMarker = Symbol.for("@takazudo/zfb/zudo-react/Show");
|
|
14
|
+
const forMarker = Symbol.for("@takazudo/zfb/zudo-react/For");
|
|
15
|
+
Object.defineProperty(Show, showMarker, { value: true });
|
|
16
|
+
Object.defineProperty(For, forMarker, { value: true });
|
|
17
|
+
export function isShowType(type) {
|
|
18
|
+
return typeof type === "function" && showMarker in type;
|
|
19
|
+
}
|
|
20
|
+
export function isForType(type) {
|
|
21
|
+
return typeof type === "function" && forMarker in type;
|
|
22
|
+
}
|
|
9
23
|
export function showProps(description) {
|
|
10
24
|
return description.props;
|
|
11
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structure.js","sourceRoot":"","sources":["../../src/zudo-react/structure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA0C,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIjD,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,OAAO,iBAAiB,CAAC,IAAI,EAAE,KAA2C,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,GAAG,CAAI,KAAkB;IACvC,OAAO,iBAAiB,CAAC,GAAG,EAAE,KAA2C,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,WAAwB;IAChD,OAAO,WAAW,CAAC,KAA6B,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,QAAQ,CAAI,WAAwB;IAClD,OAAO,WAAW,CAAC,KAA+B,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,KAAK,CAAI,KAAmB,EAAE,EAAoB,EAAE,IAAY;IAC9E,MAAM,IAAI,GAAG,IAAI,GAAG,EAAO,CAAC;IAC5B,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC/E,MAAM,IAAI,SAAS,CAAC,uBAAuB,IAAI,SAAS,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzE,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,SAAS,CAAC,4BAA4B,IAAI,SAAS,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC/F,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACd,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAQ;IACjC,MAAM,KAAK,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACpD,OAAO,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CACzE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CACnC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AACf,CAAC;AAED,MAAM,UAAU,IAAI,CAAI,OAAU;IAChC,MAAM,MAAM,GAAc,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1C,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC;AACzF,CAAC","sourcesContent":["import { createDescription, type Child, type Description, type Key } from \"./description.js\";\nimport { computed, signal } from \"./reactive.js\";\nimport type { ReadonlySignal, Signal } from \"./reactive-types.js\";\nimport type { ShowProps, ForProps } from \"./index.js\";\n\nexport function Show(props: ShowProps): Description {\n return createDescription(Show, props as unknown as Record<string, unknown>);\n}\n\nexport function For<T>(props: ForProps<T>): Description {\n return createDescription(For, props as unknown as Record<string, unknown>);\n}\n\nexport function showProps(description: Description): ShowProps {\n return description.props as unknown as ShowProps;\n}\n\nexport function forProps<T>(description: Description): ForProps<T> {\n return description.props as unknown as ForProps<T>;\n}\n\nexport function keyed<T>(items: readonly T[], by: (item: T) => Key, path: string): Key[] {\n const seen = new Set<Key>();\n return items.map((item) => {\n const key = by(item);\n if (typeof key !== \"string\" && !(typeof key === \"number\" && Number.isFinite(key)))\n throw new TypeError(`ZR_KEY_TYPE: For at ${path}, key ${String(key)}`);\n if (seen.has(key)) throw new TypeError(`ZR_DUPLICATE_KEY: For at ${path}, key ${String(key)}`);\n seen.add(key);\n return key;\n });\n}\n\nexport function keyPayload(key: Key): string {\n const bytes = new TextEncoder().encode(String(key));\n return `${typeof key === \"number\" ? \"n\" : \"s\"}${Array.from(bytes, (byte) =>\n byte.toString(16).padStart(2, \"0\"),\n ).join(\"\")}`;\n}\n\nexport function view<T>(initial: T): { readonly value: ReadonlySignal<T>; write(next: T): void } {\n const source: Signal<T> = signal(initial);\n return { value: computed(() => source.value), write: (next) => (source.value = next) };\n}\n\nexport type Factory = () => Child;\n"]}
|
|
1
|
+
{"version":3,"file":"structure.js","sourceRoot":"","sources":["../../src/zudo-react/structure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA0C,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIjD,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,OAAO,iBAAiB,CAAC,IAAI,EAAE,KAA2C,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,GAAG,CAAI,KAAkB;IACvC,OAAO,iBAAiB,CAAC,GAAG,EAAE,KAA2C,CA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AAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzE,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,SAAS,CAAC,4BAA4B,IAAI,SAAS,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC/F,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACd,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAQ;IACjC,MAAM,KAAK,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACpD,OAAO,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CACzE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CACnC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AACf,CAAC;AAED,MAAM,UAAU,IAAI,CAAI,OAAU;IAChC,MAAM,MAAM,GAAc,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1C,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC;AACzF,CAAC","sourcesContent":["import { createDescription, type Child, type Description, type Key } from \"./description.js\";\nimport { computed, signal } from \"./reactive.js\";\nimport type { ReadonlySignal, Signal } from \"./reactive-types.js\";\nimport type { ShowProps, ForProps } from \"./index.js\";\n\nexport function Show(props: ShowProps): Description {\n return createDescription(Show, props as unknown as Record<string, unknown>);\n}\n\nexport function For<T>(props: ForProps<T>): Description {\n return createDescription(For, props as unknown as Record<string, unknown>);\n}\n\n// The renderer and an island component can resolve separate copies of this\n// module when a package manager preserves dependency symlinks. Recognize the\n// component by a shared marker so rendering does not recursively call Show/For\n// as ordinary function components.\nconst showMarker = Symbol.for(\"@takazudo/zfb/zudo-react/Show\");\nconst forMarker = Symbol.for(\"@takazudo/zfb/zudo-react/For\");\nObject.defineProperty(Show, showMarker, { value: true });\nObject.defineProperty(For, forMarker, { value: true });\n\nexport function isShowType(type: unknown): type is typeof Show {\n return typeof type === \"function\" && showMarker in type;\n}\n\nexport function isForType(type: unknown): type is typeof For {\n return typeof type === \"function\" && forMarker in type;\n}\n\nexport function showProps(description: Description): ShowProps {\n return description.props as unknown as ShowProps;\n}\n\nexport function forProps<T>(description: Description): ForProps<T> {\n return description.props as unknown as ForProps<T>;\n}\n\nexport function keyed<T>(items: readonly T[], by: (item: T) => Key, path: string): Key[] {\n const seen = new Set<Key>();\n return items.map((item) => {\n const key = by(item);\n if (typeof key !== \"string\" && !(typeof key === \"number\" && Number.isFinite(key)))\n throw new TypeError(`ZR_KEY_TYPE: For at ${path}, key ${String(key)}`);\n if (seen.has(key)) throw new TypeError(`ZR_DUPLICATE_KEY: For at ${path}, key ${String(key)}`);\n seen.add(key);\n return key;\n });\n}\n\nexport function keyPayload(key: Key): string {\n const bytes = new TextEncoder().encode(String(key));\n return `${typeof key === \"number\" ? \"n\" : \"s\"}${Array.from(bytes, (byte) =>\n byte.toString(16).padStart(2, \"0\"),\n ).join(\"\")}`;\n}\n\nexport function view<T>(initial: T): { readonly value: ReadonlySignal<T>; write(next: T): void } {\n const source: Signal<T> = signal(initial);\n return { value: computed(() => source.value), write: (next) => (source.value = next) };\n}\n\nexport type Factory = () => Child;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** The literal style surface shared by JSX typing and both renderers. */
|
|
2
|
+
export declare const cssProperties: readonly ["accent-color", "align-content", "align-items", "align-self", "alignment-baseline", "all", "animation", "animation-composition", "animation-delay", "animation-direction", "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "appearance", "aspect-ratio", "backdrop-filter", "backface-visibility", "background", "background-attachment", "background-blend-mode", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-position-x", "background-position-y", "background-repeat", "background-size", "block-size", "border", "border-block", "border-block-color", "border-block-end", "border-block-end-color", "border-block-end-style", "border-block-end-width", "border-block-start", "border-block-start-color", "border-block-start-style", "border-block-start-width", "border-block-style", "border-block-width", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-end-end-radius", "border-end-start-radius", "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", "border-image-width", "border-inline", "border-inline-color", "border-inline-end", "border-inline-end-color", "border-inline-end-style", "border-inline-end-width", "border-inline-start", "border-inline-start-color", "border-inline-start-style", "border-inline-start-width", "border-inline-style", "border-inline-width", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-start-end-radius", "border-start-start-radius", "border-style", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", "border-width", "bottom", "box-align", "box-decoration-break", "box-flex", "box-ordinal-group", "box-orient", "box-pack", "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", "caption-side", "caret-color", "clear", "clip", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-scheme", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "column-span", "column-width", "columns", "contain", "contain-intrinsic-block-size", "contain-intrinsic-height", "contain-intrinsic-inline-size", "contain-intrinsic-size", "contain-intrinsic-width", "container", "container-name", "container-type", "content", "content-visibility", "counter-increment", "counter-reset", "counter-set", "cursor", "cx", "cy", "d", "direction", "display", "dominant-baseline", "empty-cells", "fill", "fill-opacity", "fill-rule", "filter", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "flood-color", "flood-opacity", "font", "font-family", "font-feature-settings", "font-kerning", "font-optical-sizing", "font-palette", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-synthesis", "font-synthesis-small-caps", "font-synthesis-style", "font-synthesis-weight", "font-variant", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position", "font-variation-settings", "font-weight", "forced-color-adjust", "gap", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows", "grid-column", "grid-column-end", "grid-column-start", "grid-row", "grid-row-end", "grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns", "grid-template-rows", "height", "hyphenate-character", "hyphenate-limit-chars", "hyphens", "image-orientation", "image-rendering", "inline-size", "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline", "inset-inline-end", "inset-inline-start", "isolation", "justify-content", "justify-items", "justify-self", "left", "letter-spacing", "lighting-color", "line-break", "line-clamp", "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-block", "margin-block-end", "margin-block-start", "margin-bottom", "margin-inline", "margin-inline-end", "margin-inline-start", "margin-left", "margin-right", "margin-top", "marker", "marker-end", "marker-mid", "marker-start", "mask", "mask-border", "mask-border-outset", "mask-border-repeat", "mask-border-slice", "mask-border-source", "mask-border-width", "mask-clip", "mask-composite", "mask-image", "mask-mode", "mask-origin", "mask-position", "mask-repeat", "mask-size", "mask-type", "math-depth", "math-style", "max-block-size", "max-height", "max-inline-size", "max-width", "min-block-size", "min-height", "min-inline-size", "min-width", "mix-blend-mode", "object-fit", "object-position", "offset", "offset-anchor", "offset-distance", "offset-path", "offset-position", "offset-rotate", "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-anchor", "overflow-block", "overflow-clip-margin", "overflow-inline", "overflow-wrap", "overflow-x", "overflow-y", "overscroll-behavior", "overscroll-behavior-block", "overscroll-behavior-inline", "overscroll-behavior-x", "overscroll-behavior-y", "padding", "padding-block", "padding-block-end", "padding-block-start", "padding-bottom", "padding-inline", "padding-inline-end", "padding-inline-start", "padding-left", "padding-right", "padding-top", "page", "page-break-after", "page-break-before", "page-break-inside", "paint-order", "perspective", "perspective-origin", "place-content", "place-items", "place-self", "pointer-events", "position", "print-color-adjust", "quotes", "r", "resize", "right", "rotate", "row-gap", "ruby-align", "ruby-position", "rx", "ry", "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block", "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom", "scroll-margin-inline", "scroll-margin-inline-end", "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right", "scroll-margin-top", "scroll-padding", "scroll-padding-block", "scroll-padding-block-end", "scroll-padding-block-start", "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end", "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right", "scroll-padding-top", "scroll-snap-align", "scroll-snap-stop", "scroll-snap-type", "scrollbar-color", "scrollbar-gutter", "scrollbar-width", "shape-image-threshold", "shape-margin", "shape-outside", "shape-rendering", "stop-color", "stop-opacity", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "tab-size", "table-layout", "text-align", "text-align-last", "text-anchor", "text-box", "text-box-edge", "text-box-trim", "text-combine-upright", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-skip-ink", "text-decoration-style", "text-decoration-thickness", "text-emphasis", "text-emphasis-color", "text-emphasis-position", "text-emphasis-style", "text-indent", "text-orientation", "text-overflow", "text-rendering", "text-shadow", "text-size-adjust", "text-transform", "text-underline-offset", "text-underline-position", "text-wrap", "text-wrap-mode", "text-wrap-style", "top", "touch-action", "transform", "transform-box", "transform-origin", "transform-style", "transition", "transition-behavior", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "translate", "unicode-bidi", "user-select", "vector-effect", "vertical-align", "view-transition-class", "view-transition-name", "visibility", "white-space", "white-space-collapse", "widows", "width", "will-change", "word-break", "word-spacing", "writing-mode", "x", "y", "z-index", "zoom"];
|
|
3
|
+
export declare const vendorProperties: readonly ["-webkit-appearance", "-webkit-backdrop-filter", "-webkit-line-clamp", "-webkit-mask", "-webkit-mask-image", "-webkit-mask-position", "-webkit-mask-size", "-webkit-text-fill-color", "-webkit-text-stroke", "-webkit-transform", "-webkit-user-select", "-moz-appearance", "-moz-osx-font-smoothing", "-moz-user-select", "-ms-overflow-style", "-ms-transform", "-ms-user-select"];
|
|
4
|
+
export declare const unitlessProperties: readonly ["animation-iteration-count", "aspect-ratio", "column-count", "fill-opacity", "flex", "flex-grow", "flex-shrink", "flood-opacity", "font-weight", "grid-column", "grid-column-end", "grid-column-start", "grid-row", "grid-row-end", "grid-row-start", "line-clamp", "line-height", "opacity", "order", "orphans", "scale", "stop-opacity", "stroke-miterlimit", "stroke-opacity", "tab-size", "widows", "z-index", "zoom"];
|
|
5
|
+
export type CssProperty = (typeof cssProperties)[number] | (typeof vendorProperties)[number] | `--${string}`;
|
|
6
|
+
type UnitlessProperty = (typeof unitlessProperties)[number];
|
|
7
|
+
type ZeroOnlyProperty = Exclude<CssProperty, UnitlessProperty | `--${string}`>;
|
|
8
|
+
export type CSSProperties = Readonly<Partial<Record<ZeroOnlyProperty, string | 0 | null | undefined>> & Partial<Record<UnitlessProperty | `--${string}`, string | number | null | undefined>>>;
|
|
9
|
+
export declare function serializeStyle(value: unknown): string;
|
|
10
|
+
export {};
|