@ng-native/web 0.22.1 → 0.23.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.
@@ -79,6 +79,9 @@ export declare class BrowserRendererFactory implements RendererFactory2 {
79
79
  *
80
80
  * The compiler already turns `Emulated` into `None` for a component with no styles, so the
81
81
  * shared renderer is still what nearly every component here gets.
82
+ *
83
+ * `host` is marked as a component's whatever its styles, as the native adapter marks it: an
84
+ * interaction report names the component around a control by it.
82
85
  */
83
86
  createRenderer(host: unknown, type: ComponentDefLike | null): Renderer2;
84
87
  private addStyles;
@@ -21,7 +21,7 @@
21
21
  * without this they would read whatever was there before Angular's *first* style write, forever.
22
22
  */
23
23
  import { RendererStyleFlags2, ViewEncapsulation, } from '@angular/core';
24
- import { reportUnboundFormsInput } from '@ng-native/fabric';
24
+ import { markComponentHost, reportUnboundFormsInput } from '@ng-native/fabric';
25
25
  import { letBrowserNodesPassAsDomNodes } from "./dom-node.js";
26
26
  import { dashCase } from "./css-units.js";
27
27
  import { writeStyleKey } from "./native-style.js";
@@ -265,8 +265,13 @@ export class BrowserRendererFactory {
265
265
  *
266
266
  * The compiler already turns `Emulated` into `None` for a component with no styles, so the
267
267
  * shared renderer is still what nearly every component here gets.
268
+ *
269
+ * `host` is marked as a component's whatever its styles, as the native adapter marks it: an
270
+ * interaction report names the component around a control by it.
268
271
  */
269
272
  createRenderer(host, type) {
273
+ if (host && typeof host === 'object')
274
+ markComponentHost(host, type ?? undefined);
270
275
  if (!type?.styles?.length)
271
276
  return this.renderer;
272
277
  this.addStyles(type.id, type.styles);
@@ -1 +1 @@
1
- {"version":3,"file":"browser-renderer.js","sourceRoot":"","sources":["../src/browser-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EACL,mBAAmB,EACnB,iBAAiB,GAGlB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CA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ourcesContent":["/**\n * `Renderer2`/`RendererFactory2` over `BrowserEngine`, the browser counterpart to\n * `packages/platform/src/adapter.ts`'s `NativeRenderer`/`NativeRendererFactory`.\n *\n * Much smaller than that file, and for the reason its own doc comment gives: a real DOM already\n * does attribute, class and style writes, and there is no style resolver here at all - the class\n * strings Angular writes with `addClass`/`removeClass` are matched by a real stylesheet loaded\n * into the page, the way they would be in any other Angular app. What is not smaller is\n * `setProperty`/`setAttribute`: those still delegate to `BrowserEngine.setProp`, not to a raw DOM\n * write, because a component's own host bindings (`text-input.ts`'s forty-odd, `switch.ts`'s\n * handful) are *logical* props with a translation `props.ts` owns - exactly the reason\n * `NativeRenderer.setProperty` delegates to `engine.setProp` rather than writing a native prop\n * directly. `class` and `style` are the two genuine exceptions, because a browser's own cascade is\n * what resolves them and nothing here needs to get in front of that.\n *\n * `setStyle`/`removeStyle` do one thing beyond the real DOM write: they keep `node.props['style']`\n * in sync as a plain object, mirroring `NativeRenderer`'s own `OWN_STYLES`-owned-object trick.\n * Two components read `this.node.props['style']` directly rather than going through the\n * engine - `image-background.ts` (the outer view's width/height, copied onto the\n * absolutely-filled image), `animated-style.ts` (the style an animation frame merges into) - and\n * without this they would read whatever was there before Angular's *first* style write, forever.\n */\nimport {\n RendererStyleFlags2,\n ViewEncapsulation,\n type Renderer2,\n type RendererFactory2,\n} from '@angular/core';\nimport { reportUnboundFormsInput } from '@ng-native/fabric';\nimport { letBrowserNodesPassAsDomNodes, type BrowserNode } from './dom-node.ts';\nimport type { BrowserEngine } from './browser-engine.ts';\nimport { dashCase } from './css-units.ts';\nimport { writeStyleKey } from './native-style.ts';\n\n/** `(touchEnd)` -> `topTouchEnd`. No alias for `press`; see `packages/platform/src/adapter.ts`. */\nfunction topLevelType(eventName: string): string {\n return 'top' + eventName.charAt(0).toUpperCase() + eventName.slice(1);\n}\n\n/** The style objects this renderer made, and may therefore mutate in place. See the file doc. */\nconst OWN_STYLES = new WeakSet<object>();\n\nexport class BrowserRenderer implements Renderer2 {\n readonly data: Record<string, unknown> = Object.create(null);\n /** Nothing here needs teardown beyond garbage collection; matches the native adapter's null. */\n readonly destroyNode: ((node: unknown) => void) | null = null;\n\n private readonly engine: BrowserEngine;\n private readonly document: Document;\n\n constructor(engine: BrowserEngine, document: Document) {\n this.engine = engine;\n this.document = document;\n }\n\n destroy(): void {}\n\n createElement(name: string): BrowserNode {\n return this.engine.createElementNode(name);\n }\n\n createComment(): BrowserNode {\n return this.engine.createAnchorNode();\n }\n\n createText(value: string): BrowserNode {\n return this.engine.createTextNode(value);\n }\n\n appendChild(parent: BrowserNode, child: BrowserNode): void {\n this.detach(child);\n child.parent = parent;\n parent.childList.push(child);\n (parent.el as Element).appendChild(child.el);\n }\n\n insertBefore(parent: BrowserNode, child: BrowserNode, refChild: BrowserNode | null): void {\n if (!parent) return;\n this.detach(child);\n child.parent = parent;\n const at = refChild ? parent.childList.indexOf(refChild) : -1;\n if (at === -1) parent.childList.push(child);\n else parent.childList.splice(at, 0, child);\n (parent.el as Element).insertBefore(child.el, refChild?.el ?? null);\n }\n\n removeChild(parent: BrowserNode | null, child: BrowserNode): void {\n // Angular removes a root component's host element when the component is destroyed. Here that\n // element is the one `mount` was given - a `<div>` of the caller's, or an `<ng-native-island>`\n // in a host app's template - and it is not this app's to take out of the page. What was\n // rendered into it goes; the element stays, empty, for its owner.\n if (this.engine.isRoot(child)) {\n for (const node of [...child.childList]) this.removeChild(child, node);\n // A root is always an element: `wrapRoot` only ever wraps one.\n (child.el as Element).replaceChildren();\n return;\n }\n const actualParent = parent ?? child.parent;\n if (actualParent) {\n const at = actualParent.childList.indexOf(child);\n if (at !== -1) actualParent.childList.splice(at, 1);\n }\n child.el.parentNode?.removeChild(child.el);\n child.parent = null;\n }\n\n private detach(child: BrowserNode): void {\n if (child.parent) this.removeChild(child.parent, child);\n }\n\n selectRootElement(selectorOrNode: string | BrowserNode): BrowserNode {\n if (typeof selectorOrNode !== 'string') return selectorOrNode;\n const found = this.document.querySelector(selectorOrNode);\n if (!found) throw new Error(`BrowserRenderer: no element matches '${selectorOrNode}'`);\n found.textContent = '';\n return this.engine.wrapRoot(found);\n }\n\n parentNode(node: BrowserNode): BrowserNode | null {\n return node.parent;\n }\n\n nextSibling(node: BrowserNode): BrowserNode | null {\n const siblings = node.parent?.childList;\n if (!siblings) return null;\n return siblings[siblings.indexOf(node) + 1] ?? null;\n }\n\n setAttribute(node: BrowserNode, name: string, value: string): void {\n // `class` drives real CSS selector matching; nothing about it goes through `props.ts`.\n //\n // `setAttribute('class', ...)`, not `.className =`: an SVG element's `className` is a\n // read-only `SVGAnimatedString` - only `.baseVal` is writable - so a direct assignment throws\n // in strict mode (every file in this package is a module, so every file is strict mode).\n // `setAttribute` is the one spelling that commits a class list on both an `HTMLElement` and\n // an `SVGElement`, which is what a static `class=\"...\"` on an icon's `<svg>`/`<path>` needs -\n // found by every test that opens a dialog with its default close button, an icon with a\n // static class the compiler writes through this exact path.\n if (name === 'class') {\n (node.el as Element).setAttribute('class', value);\n return;\n }\n this.engine.setProp(node, name, value);\n }\n\n removeAttribute(node: BrowserNode, name: string): void {\n if (name === 'class') {\n (node.el as Element).removeAttribute('class');\n return;\n }\n this.engine.setProp(node, name, null);\n }\n\n addClass(node: BrowserNode, name: string): void {\n (node.el as Element).classList.add(name);\n }\n\n removeClass(node: BrowserNode, name: string): void {\n (node.el as Element).classList.remove(name);\n }\n\n setStyle(node: BrowserNode, style: string, value: unknown, flags?: RendererStyleFlags2): void {\n if (value === null || value === undefined) {\n this.removeStyle(node, style);\n return;\n }\n const key = styleName(style);\n const important = !!(flags && flags & RendererStyleFlags2.Important);\n this.mirrorStyle(node, key, value);\n this.writeStyle(node, key, important ? 'important' : '');\n }\n\n removeStyle(node: BrowserNode, style: string): void {\n const key = styleName(style);\n this.mirrorStyle(node, key, undefined);\n this.writeStyle(node, key, '');\n }\n\n /** From the mirror, which is the whole style: see `native-style.ts` for why one key needs it. */\n private writeStyle(node: BrowserNode, key: string, priority: string): void {\n const style = (node.props['style'] ?? {}) as Record<string, unknown>;\n writeStyleKey((node.el as HTMLElement).style, key, style, priority);\n }\n\n /** Keeps `node.props['style']` an accurate mirror of the real inline style. See the file doc. */\n private mirrorStyle(node: BrowserNode, key: string, value: unknown): void {\n const current = node.props['style'] as Record<string, unknown> | undefined;\n if (current && OWN_STYLES.has(current)) {\n if (value === undefined) delete current[key];\n else current[key] = value;\n return;\n }\n if (value === undefined && (!current || !(key in current))) return;\n const next = { ...current };\n if (value === undefined) delete next[key];\n else next[key] = value;\n OWN_STYLES.add(next);\n node.props['style'] = next;\n }\n\n setProperty(node: BrowserNode, name: string, value: unknown): void {\n // `ngDevMode`, not a build-time flag: this package ships to a browser bundler rather than\n // through Metro, so there is no `__DEV__` to fold away - `ngDevMode` is the one dev/release\n // signal Angular itself sets the same way here as it does natively. See\n // `packages/platform/src/adapter.ts`'s `NativeRenderer.setProperty` for the native check this\n // mirrors, and `@ng-native/fabric`'s `forms-inputs.ts` for the table and report both share.\n if (typeof ngDevMode !== 'undefined' && ngDevMode)\n reportUnboundFormsInput(this.engine, node, name);\n this.engine.setProp(node, name, value);\n }\n\n setValue(node: BrowserNode, value: string): void {\n node.nodeText = value;\n (node.el as Text).data = value;\n }\n\n listen(\n target: BrowserNode,\n eventName: string,\n callback: (event: unknown) => boolean | void,\n ): () => void {\n return this.engine.setEventListener(target, topLevelType(eventName), callback);\n }\n}\n\n/**\n * A component with emulated encapsulation: every element its template creates carries\n * `_ngcontent-<id>`, and its host carries `_nghost-<id>`, which is what the selectors Angular's\n * compiler rewrote (`.card[_ngcontent-%COMP%]`, `[_nghost-%COMP%]`) match. These are the\n * attributes `@angular/platform-browser`'s own emulated renderer writes, so a component's CSS is\n * scoped here exactly as in any other Angular app - and as on a device, where a component's\n * renderer only ever matches its own elements against its own sheet.\n */\nclass EmulatedRenderer extends BrowserRenderer {\n private readonly contentAttr: string;\n private readonly hostAttr: string;\n\n constructor(engine: BrowserEngine, document: Document, id: string) {\n super(engine, document);\n this.contentAttr = `_ngcontent-${id}`;\n this.hostAttr = `_nghost-${id}`;\n }\n\n applyToHost(host: BrowserNode): void {\n if (host.nodeKind === 'element') (host.el as Element).setAttribute(this.hostAttr, '');\n }\n\n override createElement(name: string): BrowserNode {\n const node = super.createElement(name);\n (node.el as Element).setAttribute(this.contentAttr, '');\n return node;\n }\n}\n\n/** The slice of Angular's component definition `createRenderer` is handed that matters here. */\ninterface ComponentDefLike {\n readonly id: string;\n readonly styles?: readonly string[];\n readonly encapsulation?: ViewEncapsulation;\n}\n\n/** The placeholder Angular's compiler writes into scoped selectors, for the renderer to resolve. */\nconst COMPONENT_ID = /%COMP%/g;\n\n/**\n * The placeholder Angular 22's compiler writes into every custom property in a component's\n * styles, `--%NS%tint`, for a renderer to fill with the app's CSS variable namespace. This host\n * has no namespace, as platform-browser has none by default, so it is filled with nothing: left\n * in, `var(--tint)` never finds `--%NS%tint` and every custom property silently does nothing.\n */\nconst CSS_VAR_NAMESPACE = /%NS%/g;\n\n/**\n * The property a style binding names. A bound custom property, `[style.--tint]`, arrives with the\n * same placeholder as `--%NS%tint`, filled with nothing for the same reason, and keeps its case:\n * `--brandTint` and `--brand-tint` are two different properties.\n */\nfunction styleName(style: string): string {\n return style.startsWith('--') ? style.replace(CSS_VAR_NAMESPACE, '') : dashCase(style);\n}\n\nexport class BrowserRendererFactory implements RendererFactory2 {\n private readonly renderer: BrowserRenderer;\n /** One renderer per component with scoped styles, because each stamps its own attribute. */\n private readonly byComponent = new Map<string, EmulatedRenderer>();\n /** Component ids whose stylesheet is already in the document. */\n private readonly styled = new Set<string>();\n private readonly document: Document;\n readonly engine: BrowserEngine;\n\n constructor(engine: BrowserEngine, document: Document) {\n this.engine = engine;\n this.document = document;\n this.renderer = new BrowserRenderer(engine, document);\n letBrowserNodesPassAsDomNodes();\n }\n\n /**\n * One shared renderer for every component without styles of its own, and one per component\n * with them. A component's `styles` go into the document once, the first time it renders, with\n * the compiler's `%COMP%` placeholder resolved to its id. `ViewEncapsulation.None` adds them as\n * written and needs no attributes. Shadow DOM encapsulation is treated as emulated: a native\n * view has no shadow root either, and emulated scoping is what the device's matcher does.\n *\n * The compiler already turns `Emulated` into `None` for a component with no styles, so the\n * shared renderer is still what nearly every component here gets.\n */\n createRenderer(host: unknown, type: ComponentDefLike | null): Renderer2 {\n if (!type?.styles?.length) return this.renderer;\n this.addStyles(type.id, type.styles);\n if (type.encapsulation === ViewEncapsulation.None) return this.renderer;\n\n let renderer = this.byComponent.get(type.id);\n if (!renderer) {\n renderer = new EmulatedRenderer(this.engine, this.document, type.id);\n this.byComponent.set(type.id, renderer);\n }\n if (host) renderer.applyToHost(host as BrowserNode);\n return renderer;\n }\n\n private addStyles(id: string, styles: readonly string[]): void {\n if (this.styled.has(id)) return;\n this.styled.add(id);\n const style = this.document.createElement('style');\n style.setAttribute('data-ng-native-component', id);\n style.textContent = styles\n .map((css) => css.replace(COMPONENT_ID, id).replace(CSS_VAR_NAMESPACE, ''))\n .join('\\n');\n this.document.head.appendChild(style);\n }\n}\n"]}
1
+ {"version":3,"file":"browser-renderer.js","sourceRoot":"","sources":["../src/browser-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EACL,mBAAmB,EACnB,iBAAiB,GAGlB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,6BAA6B,EAAoB,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,mGAAmG;AACnG,SAAS,YAAY,CAAC,SAAiB;IACrC,OAAO,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,iGA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E,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;YACrE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QAC1C,CAAC;QACD,IAAI,IAAI;YAAE,QAAQ,CAAC,WAAW,CAAC,IAAmB,CAAC,CAAC;QACpD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEO,SAAS,CAAC,EAAU,EAAE,MAAyB;QACrD,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,OAAO;QAChC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACnD,KAAK,CAAC,YAAY,CAAC,0BAA0B,EAAE,EAAE,CAAC,CAAC;QACnD,KAAK,CAAC,WAAW,GAAG,MAAM;aACvB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;aAC1E,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["/**\n * `Renderer2`/`RendererFactory2` over `BrowserEngine`, the browser counterpart to\n * `packages/platform/src/adapter.ts`'s `NativeRenderer`/`NativeRendererFactory`.\n *\n * Much smaller than that file, and for the reason its own doc comment gives: a real DOM already\n * does attribute, class and style writes, and there is no style resolver here at all - the class\n * strings Angular writes with `addClass`/`removeClass` are matched by a real stylesheet loaded\n * into the page, the way they would be in any other Angular app. What is not smaller is\n * `setProperty`/`setAttribute`: those still delegate to `BrowserEngine.setProp`, not to a raw DOM\n * write, because a component's own host bindings (`text-input.ts`'s forty-odd, `switch.ts`'s\n * handful) are *logical* props with a translation `props.ts` owns - exactly the reason\n * `NativeRenderer.setProperty` delegates to `engine.setProp` rather than writing a native prop\n * directly. `class` and `style` are the two genuine exceptions, because a browser's own cascade is\n * what resolves them and nothing here needs to get in front of that.\n *\n * `setStyle`/`removeStyle` do one thing beyond the real DOM write: they keep `node.props['style']`\n * in sync as a plain object, mirroring `NativeRenderer`'s own `OWN_STYLES`-owned-object trick.\n * Two components read `this.node.props['style']` directly rather than going through the\n * engine - `image-background.ts` (the outer view's width/height, copied onto the\n * absolutely-filled image), `animated-style.ts` (the style an animation frame merges into) - and\n * without this they would read whatever was there before Angular's *first* style write, forever.\n */\nimport {\n RendererStyleFlags2,\n ViewEncapsulation,\n type Renderer2,\n type RendererFactory2,\n} from '@angular/core';\nimport { markComponentHost, reportUnboundFormsInput } from '@ng-native/fabric';\nimport { letBrowserNodesPassAsDomNodes, type BrowserNode } from './dom-node.ts';\nimport type { BrowserEngine } from './browser-engine.ts';\nimport { dashCase } from './css-units.ts';\nimport { writeStyleKey } from './native-style.ts';\n\n/** `(touchEnd)` -> `topTouchEnd`. No alias for `press`; see `packages/platform/src/adapter.ts`. */\nfunction topLevelType(eventName: string): string {\n return 'top' + eventName.charAt(0).toUpperCase() + eventName.slice(1);\n}\n\n/** The style objects this renderer made, and may therefore mutate in place. See the file doc. */\nconst OWN_STYLES = new WeakSet<object>();\n\nexport class BrowserRenderer implements Renderer2 {\n readonly data: Record<string, unknown> = Object.create(null);\n /** Nothing here needs teardown beyond garbage collection; matches the native adapter's null. */\n readonly destroyNode: ((node: unknown) => void) | null = null;\n\n private readonly engine: BrowserEngine;\n private readonly document: Document;\n\n constructor(engine: BrowserEngine, document: Document) {\n this.engine = engine;\n this.document = document;\n }\n\n destroy(): void {}\n\n createElement(name: string): BrowserNode {\n return this.engine.createElementNode(name);\n }\n\n createComment(): BrowserNode {\n return this.engine.createAnchorNode();\n }\n\n createText(value: string): BrowserNode {\n return this.engine.createTextNode(value);\n }\n\n appendChild(parent: BrowserNode, child: BrowserNode): void {\n this.detach(child);\n child.parent = parent;\n parent.childList.push(child);\n (parent.el as Element).appendChild(child.el);\n }\n\n insertBefore(parent: BrowserNode, child: BrowserNode, refChild: BrowserNode | null): void {\n if (!parent) return;\n this.detach(child);\n child.parent = parent;\n const at = refChild ? parent.childList.indexOf(refChild) : -1;\n if (at === -1) parent.childList.push(child);\n else parent.childList.splice(at, 0, child);\n (parent.el as Element).insertBefore(child.el, refChild?.el ?? null);\n }\n\n removeChild(parent: BrowserNode | null, child: BrowserNode): void {\n // Angular removes a root component's host element when the component is destroyed. Here that\n // element is the one `mount` was given - a `<div>` of the caller's, or an `<ng-native-island>`\n // in a host app's template - and it is not this app's to take out of the page. What was\n // rendered into it goes; the element stays, empty, for its owner.\n if (this.engine.isRoot(child)) {\n for (const node of [...child.childList]) this.removeChild(child, node);\n // A root is always an element: `wrapRoot` only ever wraps one.\n (child.el as Element).replaceChildren();\n return;\n }\n const actualParent = parent ?? child.parent;\n if (actualParent) {\n const at = actualParent.childList.indexOf(child);\n if (at !== -1) actualParent.childList.splice(at, 1);\n }\n child.el.parentNode?.removeChild(child.el);\n child.parent = null;\n }\n\n private detach(child: BrowserNode): void {\n if (child.parent) this.removeChild(child.parent, child);\n }\n\n selectRootElement(selectorOrNode: string | BrowserNode): BrowserNode {\n if (typeof selectorOrNode !== 'string') return selectorOrNode;\n const found = this.document.querySelector(selectorOrNode);\n if (!found) throw new Error(`BrowserRenderer: no element matches '${selectorOrNode}'`);\n found.textContent = '';\n return this.engine.wrapRoot(found);\n }\n\n parentNode(node: BrowserNode): BrowserNode | null {\n return node.parent;\n }\n\n nextSibling(node: BrowserNode): BrowserNode | null {\n const siblings = node.parent?.childList;\n if (!siblings) return null;\n return siblings[siblings.indexOf(node) + 1] ?? null;\n }\n\n setAttribute(node: BrowserNode, name: string, value: string): void {\n // `class` drives real CSS selector matching; nothing about it goes through `props.ts`.\n //\n // `setAttribute('class', ...)`, not `.className =`: an SVG element's `className` is a\n // read-only `SVGAnimatedString` - only `.baseVal` is writable - so a direct assignment throws\n // in strict mode (every file in this package is a module, so every file is strict mode).\n // `setAttribute` is the one spelling that commits a class list on both an `HTMLElement` and\n // an `SVGElement`, which is what a static `class=\"...\"` on an icon's `<svg>`/`<path>` needs -\n // found by every test that opens a dialog with its default close button, an icon with a\n // static class the compiler writes through this exact path.\n if (name === 'class') {\n (node.el as Element).setAttribute('class', value);\n return;\n }\n this.engine.setProp(node, name, value);\n }\n\n removeAttribute(node: BrowserNode, name: string): void {\n if (name === 'class') {\n (node.el as Element).removeAttribute('class');\n return;\n }\n this.engine.setProp(node, name, null);\n }\n\n addClass(node: BrowserNode, name: string): void {\n (node.el as Element).classList.add(name);\n }\n\n removeClass(node: BrowserNode, name: string): void {\n (node.el as Element).classList.remove(name);\n }\n\n setStyle(node: BrowserNode, style: string, value: unknown, flags?: RendererStyleFlags2): void {\n if (value === null || value === undefined) {\n this.removeStyle(node, style);\n return;\n }\n const key = styleName(style);\n const important = !!(flags && flags & RendererStyleFlags2.Important);\n this.mirrorStyle(node, key, value);\n this.writeStyle(node, key, important ? 'important' : '');\n }\n\n removeStyle(node: BrowserNode, style: string): void {\n const key = styleName(style);\n this.mirrorStyle(node, key, undefined);\n this.writeStyle(node, key, '');\n }\n\n /** From the mirror, which is the whole style: see `native-style.ts` for why one key needs it. */\n private writeStyle(node: BrowserNode, key: string, priority: string): void {\n const style = (node.props['style'] ?? {}) as Record<string, unknown>;\n writeStyleKey((node.el as HTMLElement).style, key, style, priority);\n }\n\n /** Keeps `node.props['style']` an accurate mirror of the real inline style. See the file doc. */\n private mirrorStyle(node: BrowserNode, key: string, value: unknown): void {\n const current = node.props['style'] as Record<string, unknown> | undefined;\n if (current && OWN_STYLES.has(current)) {\n if (value === undefined) delete current[key];\n else current[key] = value;\n return;\n }\n if (value === undefined && (!current || !(key in current))) return;\n const next = { ...current };\n if (value === undefined) delete next[key];\n else next[key] = value;\n OWN_STYLES.add(next);\n node.props['style'] = next;\n }\n\n setProperty(node: BrowserNode, name: string, value: unknown): void {\n // `ngDevMode`, not a build-time flag: this package ships to a browser bundler rather than\n // through Metro, so there is no `__DEV__` to fold away - `ngDevMode` is the one dev/release\n // signal Angular itself sets the same way here as it does natively. See\n // `packages/platform/src/adapter.ts`'s `NativeRenderer.setProperty` for the native check this\n // mirrors, and `@ng-native/fabric`'s `forms-inputs.ts` for the table and report both share.\n if (typeof ngDevMode !== 'undefined' && ngDevMode)\n reportUnboundFormsInput(this.engine, node, name);\n this.engine.setProp(node, name, value);\n }\n\n setValue(node: BrowserNode, value: string): void {\n node.nodeText = value;\n (node.el as Text).data = value;\n }\n\n listen(\n target: BrowserNode,\n eventName: string,\n callback: (event: unknown) => boolean | void,\n ): () => void {\n return this.engine.setEventListener(target, topLevelType(eventName), callback);\n }\n}\n\n/**\n * A component with emulated encapsulation: every element its template creates carries\n * `_ngcontent-<id>`, and its host carries `_nghost-<id>`, which is what the selectors Angular's\n * compiler rewrote (`.card[_ngcontent-%COMP%]`, `[_nghost-%COMP%]`) match. These are the\n * attributes `@angular/platform-browser`'s own emulated renderer writes, so a component's CSS is\n * scoped here exactly as in any other Angular app - and as on a device, where a component's\n * renderer only ever matches its own elements against its own sheet.\n */\nclass EmulatedRenderer extends BrowserRenderer {\n private readonly contentAttr: string;\n private readonly hostAttr: string;\n\n constructor(engine: BrowserEngine, document: Document, id: string) {\n super(engine, document);\n this.contentAttr = `_ngcontent-${id}`;\n this.hostAttr = `_nghost-${id}`;\n }\n\n applyToHost(host: BrowserNode): void {\n if (host.nodeKind === 'element') (host.el as Element).setAttribute(this.hostAttr, '');\n }\n\n override createElement(name: string): BrowserNode {\n const node = super.createElement(name);\n (node.el as Element).setAttribute(this.contentAttr, '');\n return node;\n }\n}\n\n/** The slice of Angular's component definition `createRenderer` is handed that matters here. */\ninterface ComponentDefLike {\n readonly id: string;\n readonly styles?: readonly string[];\n readonly encapsulation?: ViewEncapsulation;\n}\n\n/** The placeholder Angular's compiler writes into scoped selectors, for the renderer to resolve. */\nconst COMPONENT_ID = /%COMP%/g;\n\n/**\n * The placeholder Angular 22's compiler writes into every custom property in a component's\n * styles, `--%NS%tint`, for a renderer to fill with the app's CSS variable namespace. This host\n * has no namespace, as platform-browser has none by default, so it is filled with nothing: left\n * in, `var(--tint)` never finds `--%NS%tint` and every custom property silently does nothing.\n */\nconst CSS_VAR_NAMESPACE = /%NS%/g;\n\n/**\n * The property a style binding names. A bound custom property, `[style.--tint]`, arrives with the\n * same placeholder as `--%NS%tint`, filled with nothing for the same reason, and keeps its case:\n * `--brandTint` and `--brand-tint` are two different properties.\n */\nfunction styleName(style: string): string {\n return style.startsWith('--') ? style.replace(CSS_VAR_NAMESPACE, '') : dashCase(style);\n}\n\nexport class BrowserRendererFactory implements RendererFactory2 {\n private readonly renderer: BrowserRenderer;\n /** One renderer per component with scoped styles, because each stamps its own attribute. */\n private readonly byComponent = new Map<string, EmulatedRenderer>();\n /** Component ids whose stylesheet is already in the document. */\n private readonly styled = new Set<string>();\n private readonly document: Document;\n readonly engine: BrowserEngine;\n\n constructor(engine: BrowserEngine, document: Document) {\n this.engine = engine;\n this.document = document;\n this.renderer = new BrowserRenderer(engine, document);\n letBrowserNodesPassAsDomNodes();\n }\n\n /**\n * One shared renderer for every component without styles of its own, and one per component\n * with them. A component's `styles` go into the document once, the first time it renders, with\n * the compiler's `%COMP%` placeholder resolved to its id. `ViewEncapsulation.None` adds them as\n * written and needs no attributes. Shadow DOM encapsulation is treated as emulated: a native\n * view has no shadow root either, and emulated scoping is what the device's matcher does.\n *\n * The compiler already turns `Emulated` into `None` for a component with no styles, so the\n * shared renderer is still what nearly every component here gets.\n *\n * `host` is marked as a component's whatever its styles, as the native adapter marks it: an\n * interaction report names the component around a control by it.\n */\n createRenderer(host: unknown, type: ComponentDefLike | null): Renderer2 {\n if (host && typeof host === 'object') markComponentHost(host as BrowserNode, type ?? undefined);\n if (!type?.styles?.length) return this.renderer;\n this.addStyles(type.id, type.styles);\n if (type.encapsulation === ViewEncapsulation.None) return this.renderer;\n\n let renderer = this.byComponent.get(type.id);\n if (!renderer) {\n renderer = new EmulatedRenderer(this.engine, this.document, type.id);\n this.byComponent.set(type.id, renderer);\n }\n if (host) renderer.applyToHost(host as BrowserNode);\n return renderer;\n }\n\n private addStyles(id: string, styles: readonly string[]): void {\n if (this.styled.has(id)) return;\n this.styled.add(id);\n const style = this.document.createElement('style');\n style.setAttribute('data-ng-native-component', id);\n style.textContent = styles\n .map((css) => css.replace(COMPONENT_ID, id).replace(CSS_VAR_NAMESPACE, ''))\n .join('\\n');\n this.document.head.appendChild(style);\n }\n}\n"]}
package/dist/elements.js CHANGED
@@ -3,6 +3,7 @@ export const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
3
3
  const SPECS = {
4
4
  'text-input': { tag: 'input', attrs: { type: 'text' } },
5
5
  switch: { tag: 'input', attrs: { type: 'checkbox' } },
6
+ 'native-button': { tag: 'button', attrs: { type: 'button' } },
6
7
  'activity-indicator': { tag: 'activity-indicator', attrs: { role: 'progressbar' } },
7
8
  // The shapes `@ng-native/icons`' `svg-elements.ts` registers. Real SVG tag names, not the prefixed
8
9
  // template names - `svg-path` would otherwise ask the DOM for an element literally called
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AA0DA,0DAA0D;AAC1D,MAAM,CAAC,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAE1D,MAAM,KAAK,GAAgC;IACzC,YAAY,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvD,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,E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,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/C,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IACxB,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * The DOM tag each element name commits as.\n *\n * Every name Angular ever creates a host element for - `view`, `text`, `pressable`, and also\n * every component's own selector (a caller's own `x-widget`, say) - becomes a real element with\n * exactly that tag. A browser accepts any tag name and gives it no built-in\n * unregistered name to a plain `View`, because native only has a fixed set of *real* native views\n * to commit as and an arbitrary string is not one of them. A browser has no such list - there is\n * nothing to fall back from - so this file does not reproduce that fallback; the reason for it on\n * native does not exist on the web. `data-rn=\"<name>\"` still goes on every element regardless (it\n * is what `reset.css` selects on, and what the two exceptions below need it for), but the tag\n * itself is always the literal name unless this table says otherwise.\n *\n * ## The two exceptions\n *\n * `ViewBase`'s own prop writes (a real ARIA `role`, `tabindex`, `aria-*`) are enough accessible\n * behaviour for a view, a piece of text, or a scroll container - no amount of them makes a\n * `<view>` accept a text cursor or a space-bar toggle, though, because those are behaviours the\n * browser's own form controls implement in C++, not CSS or JavaScript this package could add. So:\n *\n * - `text-input` commits as a real `<input>`, and as a `<textarea>` while `multiline` is on. The\n * tag a field needs is not known here: `multiline` is a prop set *after* creation (an Angular\n * host binding, run on the first change detection pass), so `browser-engine.ts` swaps the\n * element when it arrives. Only an `<input>` centres its line in a taller box, as a device's\n * one-line field does, and only an `<input>` can be `type=\"password\"` for `secureTextEntry`. A\n * multiline field masks with the non-standard `-webkit-text-security` instead (see `props.ts`).\n * - `switch` commits as a real `<input type=\"checkbox\">`. Its accessible role still comes from\n * `ViewBase`'s normal prop pipeline (`Switch.roleByDefault()` returns `'switch'`, which\n * `props.ts`'s `ROLE_MAP` turns into `role=\"switch\"`) - this file only has to make the element\n * a genuine, keyboard- and screen-reader-operable checkbox underneath that role.\n *\n * `image` stays a plain `data-rn=\"image\"` element rather than a real `<img>`, on purpose: RN's\n * `Image` is a box that a picture fills, sized by flex like any other view, not a replaced\n * inline element with its own intrinsic size fighting the layout. `browser-engine.ts` paints the\n * picture with `background-image`, which is what lets `resizeMode` map straight onto\n * `background-size` instead of needing a wrapper element `object-fit` does not.\n *\n * ## The third exception: SVG\n *\n * `packages/icons/src/svg-elements.ts` registers `svg-g`/`svg-path`/`svg-circle`/`svg-ellipse`/\n * `svg-rect`/`svg-line` and its root (`ng-icon`) against Fabric view names (`RNSVGPath` and so\n * on) so that native drives `react-native-svg` directly with no React component of its own in\n * between - see that file's doc comment. A tag created with `document.createElement` is not\n * enough to make that work here: an element born outside the SVG namespace never paints as SVG no\n * matter what tag string it is given (`document.createElement` always mints an\n * `HTMLUnknownElement` for a name a browser does not recognise, SVG names very much included), so\n * these names are the only ones in this file that need `ns` - everything else is content\n * HTML has no opinion on and is happy to create by string alone.\n */\nexport interface ElementSpec {\n readonly tag: string;\n /** Attributes set once, at creation, because the DOM tag needs them to behave at all. */\n readonly attrs?: Readonly<Record<string, string>>;\n /** The element's creation namespace, when it is not HTML's. `createDomElement` reads this to\n * choose `createElementNS` over `createElement` - see \"The third exception: SVG\" above. */\n readonly ns?: string;\n}\n\n/** The one non-HTML namespace this package ever needs. */\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n\nconst SPECS: Record<string, ElementSpec> = {\n 'text-input': { tag: 'input', attrs: { type: 'text' } },\n switch: { tag: 'input', attrs: { type: 'checkbox' } },\n 'activity-indicator': { tag: 'activity-indicator', attrs: { role: 'progressbar' } },\n // The shapes `@ng-native/icons`' `svg-elements.ts` registers. Real SVG tag names, not the prefixed\n // template names - `svg-path` would otherwise ask the DOM for an element literally called\n // `<svg-path>`, which the SVG namespace has no such thing as and so mints as an unstyled,\n // unpainted `SVGUnknownElement` instead of a `<path>`.\n 'svg-g': { tag: 'g', ns: SVG_NAMESPACE },\n 'svg-path': { tag: 'path', ns: SVG_NAMESPACE },\n 'svg-circle': { tag: 'circle', ns: SVG_NAMESPACE },\n 'svg-ellipse': { tag: 'ellipse', ns: SVG_NAMESPACE },\n 'svg-rect': { tag: 'rect', ns: SVG_NAMESPACE },\n 'svg-line': { tag: 'line', ns: SVG_NAMESPACE },\n 'svg-defs': { tag: 'defs', ns: SVG_NAMESPACE },\n 'svg-linear-gradient': { tag: 'linearGradient', ns: SVG_NAMESPACE },\n 'svg-radial-gradient': { tag: 'radialGradient', ns: SVG_NAMESPACE },\n 'svg-text': { tag: 'text', ns: SVG_NAMESPACE },\n 'svg-tspan': { tag: 'tspan', ns: SVG_NAMESPACE },\n // The root. Commits as the same Fabric view natively (`svg-elements.ts`'s own doc comment); a\n // plain `<svg>` here too; `props.ts`'s `SVG_ROOT_HANDLERS` is what reads `NgIcon`'s own host\n // bindings into its `viewBox`/size.\n 'ng-icon': { tag: 'svg', ns: SVG_NAMESPACE },\n};\n\n/**\n * Register a name that needs a real DOM tag or baseline attributes beyond the default (its own\n * name, no attributes) - the web counterpart to `engine.ts`'s `registerViewName`. Nothing in this\n * package needs to guess at an unknown name the way `viewNameOf` does; see the file doc comment\n * for why.\n */\nexport function registerElementName(name: string, spec: ElementSpec): void {\n SPECS[name] = spec;\n}\n\nexport function specFor(name: string): ElementSpec {\n return SPECS[name] ?? { tag: name };\n}\n\n/**\n * Create the real DOM element for a template tag name, with its `data-rn` marker and attrs.\n *\n * `createElementNS` rather than `createElement` whenever a spec names a namespace - see \"The\n * third exception: SVG\" above. `setAttribute`, on the other hand, is namespace-agnostic either\n * way (an attribute has no namespace of its own unless explicitly qualified, which `data-rn` and\n * every attribute this package writes never is), so nothing below the element's own creation\n * needs to change for it.\n */\nexport function createDomElement(document: Document, name: string): Element {\n const spec = specFor(name);\n const el = spec.ns\n ? document.createElementNS(spec.ns, spec.tag)\n : document.createElement(spec.tag);\n el.setAttribute('data-rn', name);\n for (const [attr, value] of Object.entries(spec.attrs ?? {})) el.setAttribute(attr, value);\n return el;\n}\n\n/**\n * A `<textarea>` for a multiline `text-input`, or an `<input>` for a one-line one, standing in for\n * `old`: its attributes (inline style and scoping attributes among them) and its value. What the\n * two tags do differently (`type`, `rows` and a textarea's masking) is left for the caller to\n * write again.\n */\nexport function textFieldLike(\n old: HTMLInputElement | HTMLTextAreaElement,\n multiline: boolean,\n): HTMLInputElement | HTMLTextAreaElement {\n const field = old.ownerDocument.createElement(multiline ? 'textarea' : 'input');\n for (const { name, value } of old.attributes) {\n if (name !== 'type' && name !== 'rows') field.setAttribute(name, value);\n }\n field.style.removeProperty('-webkit-text-security');\n if (multiline) field.setAttribute('rows', '1');\n field.value = old.value;\n return field;\n}\n"]}
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AA0DA,0DAA0D;AAC1D,MAAM,CAAC,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAE1D,MAAM,KAAK,GAAgC;IACzC,YAAY,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvD,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;IACrD,eAAe,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC7D,oBAAoB,EAAE,EAAE,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE;IACnF,mGAAmG;IACnG,0FAA0F;IAC1F,0FAA0F;IAC1F,uDAAuD;IACvD,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,aAAa,EAAE;IACxC,UAAU,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE;IAC9C,YAAY,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,aAAa,EAAE;IAClD,aAAa,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,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IAAI,CAAC,GAAG,CAAC,CAAC;IACrC,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACjC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;QAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3F,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAC3B,GAA2C,EAC3C,SAAkB;IAElB,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAChF,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;QAC7C,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM;YAAE,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAAC;IACpD,IAAI,SAAS;QAAE,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/C,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IACxB,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * The DOM tag each element name commits as.\n *\n * Every name Angular ever creates a host element for - `view`, `text`, `pressable`, and also\n * every component's own selector (a caller's own `x-widget`, say) - becomes a real element with\n * exactly that tag. A browser accepts any tag name and gives it no built-in\n * unregistered name to a plain `View`, because native only has a fixed set of *real* native views\n * to commit as and an arbitrary string is not one of them. A browser has no such list - there is\n * nothing to fall back from - so this file does not reproduce that fallback; the reason for it on\n * native does not exist on the web. `data-rn=\"<name>\"` still goes on every element regardless (it\n * is what `reset.css` selects on, and what the two exceptions below need it for), but the tag\n * itself is always the literal name unless this table says otherwise.\n *\n * ## The two exceptions\n *\n * `ViewBase`'s own prop writes (a real ARIA `role`, `tabindex`, `aria-*`) are enough accessible\n * behaviour for a view, a piece of text, or a scroll container - no amount of them makes a\n * `<view>` accept a text cursor or a space-bar toggle, though, because those are behaviours the\n * browser's own form controls implement in C++, not CSS or JavaScript this package could add. So:\n *\n * - `text-input` commits as a real `<input>`, and as a `<textarea>` while `multiline` is on. The\n * tag a field needs is not known here: `multiline` is a prop set *after* creation (an Angular\n * host binding, run on the first change detection pass), so `browser-engine.ts` swaps the\n * element when it arrives. Only an `<input>` centres its line in a taller box, as a device's\n * one-line field does, and only an `<input>` can be `type=\"password\"` for `secureTextEntry`. A\n * multiline field masks with the non-standard `-webkit-text-security` instead (see `props.ts`).\n * - `switch` commits as a real `<input type=\"checkbox\">`. Its accessible role still comes from\n * `ViewBase`'s normal prop pipeline (`Switch.roleByDefault()` returns `'switch'`, which\n * `props.ts`'s `ROLE_MAP` turns into `role=\"switch\"`) - this file only has to make the element\n * a genuine, keyboard- and screen-reader-operable checkbox underneath that role.\n *\n * `image` stays a plain `data-rn=\"image\"` element rather than a real `<img>`, on purpose: RN's\n * `Image` is a box that a picture fills, sized by flex like any other view, not a replaced\n * inline element with its own intrinsic size fighting the layout. `browser-engine.ts` paints the\n * picture with `background-image`, which is what lets `resizeMode` map straight onto\n * `background-size` instead of needing a wrapper element `object-fit` does not.\n *\n * ## The third exception: SVG\n *\n * `packages/icons/src/svg-elements.ts` registers `svg-g`/`svg-path`/`svg-circle`/`svg-ellipse`/\n * `svg-rect`/`svg-line` and its root (`ng-icon`) against Fabric view names (`RNSVGPath` and so\n * on) so that native drives `react-native-svg` directly with no React component of its own in\n * between - see that file's doc comment. A tag created with `document.createElement` is not\n * enough to make that work here: an element born outside the SVG namespace never paints as SVG no\n * matter what tag string it is given (`document.createElement` always mints an\n * `HTMLUnknownElement` for a name a browser does not recognise, SVG names very much included), so\n * these names are the only ones in this file that need `ns` - everything else is content\n * HTML has no opinion on and is happy to create by string alone.\n */\nexport interface ElementSpec {\n readonly tag: string;\n /** Attributes set once, at creation, because the DOM tag needs them to behave at all. */\n readonly attrs?: Readonly<Record<string, string>>;\n /** The element's creation namespace, when it is not HTML's. `createDomElement` reads this to\n * choose `createElementNS` over `createElement` - see \"The third exception: SVG\" above. */\n readonly ns?: string;\n}\n\n/** The one non-HTML namespace this package ever needs. */\nexport const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n\nconst SPECS: Record<string, ElementSpec> = {\n 'text-input': { tag: 'input', attrs: { type: 'text' } },\n switch: { tag: 'input', attrs: { type: 'checkbox' } },\n 'native-button': { tag: 'button', attrs: { type: 'button' } },\n 'activity-indicator': { tag: 'activity-indicator', attrs: { role: 'progressbar' } },\n // The shapes `@ng-native/icons`' `svg-elements.ts` registers. Real SVG tag names, not the prefixed\n // template names - `svg-path` would otherwise ask the DOM for an element literally called\n // `<svg-path>`, which the SVG namespace has no such thing as and so mints as an unstyled,\n // unpainted `SVGUnknownElement` instead of a `<path>`.\n 'svg-g': { tag: 'g', ns: SVG_NAMESPACE },\n 'svg-path': { tag: 'path', ns: SVG_NAMESPACE },\n 'svg-circle': { tag: 'circle', ns: SVG_NAMESPACE },\n 'svg-ellipse': { tag: 'ellipse', ns: SVG_NAMESPACE },\n 'svg-rect': { tag: 'rect', ns: SVG_NAMESPACE },\n 'svg-line': { tag: 'line', ns: SVG_NAMESPACE },\n 'svg-defs': { tag: 'defs', ns: SVG_NAMESPACE },\n 'svg-linear-gradient': { tag: 'linearGradient', ns: SVG_NAMESPACE },\n 'svg-radial-gradient': { tag: 'radialGradient', ns: SVG_NAMESPACE },\n 'svg-text': { tag: 'text', ns: SVG_NAMESPACE },\n 'svg-tspan': { tag: 'tspan', ns: SVG_NAMESPACE },\n // The root. Commits as the same Fabric view natively (`svg-elements.ts`'s own doc comment); a\n // plain `<svg>` here too; `props.ts`'s `SVG_ROOT_HANDLERS` is what reads `NgIcon`'s own host\n // bindings into its `viewBox`/size.\n 'ng-icon': { tag: 'svg', ns: SVG_NAMESPACE },\n};\n\n/**\n * Register a name that needs a real DOM tag or baseline attributes beyond the default (its own\n * name, no attributes) - the web counterpart to `engine.ts`'s `registerViewName`. Nothing in this\n * package needs to guess at an unknown name the way `viewNameOf` does; see the file doc comment\n * for why.\n */\nexport function registerElementName(name: string, spec: ElementSpec): void {\n SPECS[name] = spec;\n}\n\nexport function specFor(name: string): ElementSpec {\n return SPECS[name] ?? { tag: name };\n}\n\n/**\n * Create the real DOM element for a template tag name, with its `data-rn` marker and attrs.\n *\n * `createElementNS` rather than `createElement` whenever a spec names a namespace - see \"The\n * third exception: SVG\" above. `setAttribute`, on the other hand, is namespace-agnostic either\n * way (an attribute has no namespace of its own unless explicitly qualified, which `data-rn` and\n * every attribute this package writes never is), so nothing below the element's own creation\n * needs to change for it.\n */\nexport function createDomElement(document: Document, name: string): Element {\n const spec = specFor(name);\n const el = spec.ns\n ? document.createElementNS(spec.ns, spec.tag)\n : document.createElement(spec.tag);\n el.setAttribute('data-rn', name);\n for (const [attr, value] of Object.entries(spec.attrs ?? {})) el.setAttribute(attr, value);\n return el;\n}\n\n/**\n * A `<textarea>` for a multiline `text-input`, or an `<input>` for a one-line one, standing in for\n * `old`: its attributes (inline style and scoping attributes among them) and its value. What the\n * two tags do differently (`type`, `rows` and a textarea's masking) is left for the caller to\n * write again.\n */\nexport function textFieldLike(\n old: HTMLInputElement | HTMLTextAreaElement,\n multiline: boolean,\n): HTMLInputElement | HTMLTextAreaElement {\n const field = old.ownerDocument.createElement(multiline ? 'textarea' : 'input');\n for (const { name, value } of old.attributes) {\n if (name !== 'type' && name !== 'rows') field.setAttribute(name, value);\n }\n field.style.removeProperty('-webkit-text-security');\n if (multiline) field.setAttribute('rows', '1');\n field.value = old.value;\n return field;\n}\n"]}
package/dist/props.d.ts CHANGED
@@ -1,38 +1,3 @@
1
- /**
2
- * Every prop `BrowserEngine.setProp` gives a DOM or ARIA meaning to, keyed by prop name and
3
- * (where two elements use the same prop name differently) by the node's own template name.
4
- *
5
- * `packages/components/src/view-base.ts` is the biggest source of these - roughly forty
6
- * accessibility and identity inputs every host primitive carries - plus a smaller set each of
7
- * `text-input.ts`, `switch.ts`, `image.ts`, `safe-area-view.ts` and `modal.ts` layers on top for
8
- * their own element. A lookup table rather than a `switch`, for the same reason the prototype
9
- * (`examples/web-button/src/browser-engine.ts`) gives: this reads as data instead of control
10
- * flow, and it is where a review can see, at a glance, what the file's own comments below say in
11
- * prose - which props got a translated DOM meaning and which did not.
12
- *
13
- * ## The fallback for everything not in a table
14
- *
15
- * A prop with no handler here does not disappear the way it would if this file's tables were the
16
- * whole story: `applyProp`'s fallback writes any remaining string, number or boolean prop as a
17
- * plain attribute under its own name. This is not a guess - it is what a real prop reaches native
18
- * as too. `engine.ts`'s `Engine.setProp` puts *everything* in `node.props`, unconditionally, and
19
- * the whole bag is what a commit sends to the native view; native ignores what it does not
20
- * recognise rather than this package having to know in advance which of Tailwind's compiled
21
- * `data-*` attribute selectors (`data-slot`, `data-variant`, `data-state`, and whatever a future
22
- * component invents) a class string will need to match against. The fallback is what makes that
23
- * true here too, without enumerating every one.
24
- *
25
- * What genuinely gets nothing, because a plain attribute could not carry it or would be actively
26
- * wrong: an object or array prop with no scalar form (`hitSlop`'s insets, `accessibilityActions`,
27
- * the Android-drawable props), and iOS-only accessibility surfaces with no ARIA equivalent at all
28
- * (`accessibilityIgnoresInvertColors`, `accessibilityLargeContentTitle`,
29
- * `accessibilityShowsLargeContentViewer`, `accessibilityRespondsToUserInteraction`) - these last
30
- * four are strings/booleans that *would* fall through to the generic attribute write and sit
31
- * inertly in the DOM if not named here, which is harmless but worth being honest about rather
32
- * than implying they did something. Named in this comment rather than omitted from it, for the
33
- * reason `host.ts` gives for its own exclusions: a divergence that is not written down is the
34
- * failure this project cares about.
35
- */
36
1
  import type { BrowserNode } from './dom-node.ts';
37
2
  /**
38
3
  * `accessibilityRole`/`role` values with a direct ARIA `role`. Not every RN role has one -
package/dist/props.js CHANGED
@@ -1,3 +1,39 @@
1
+ /**
2
+ * Every prop `BrowserEngine.setProp` gives a DOM or ARIA meaning to, keyed by prop name and
3
+ * (where two elements use the same prop name differently) by the node's own template name.
4
+ *
5
+ * `packages/components/src/view-base.ts` is the biggest source of these - roughly forty
6
+ * accessibility and identity inputs every host primitive carries - plus a smaller set each of
7
+ * `text-input.ts`, `switch.ts`, `image.ts`, `safe-area-view.ts` and `modal.ts` layers on top for
8
+ * their own element. A lookup table rather than a `switch`, for the same reason the prototype
9
+ * (`examples/web-button/src/browser-engine.ts`) gives: this reads as data instead of control
10
+ * flow, and it is where a review can see, at a glance, what the file's own comments below say in
11
+ * prose - which props got a translated DOM meaning and which did not.
12
+ *
13
+ * ## The fallback for everything not in a table
14
+ *
15
+ * A prop with no handler here does not disappear the way it would if this file's tables were the
16
+ * whole story: `applyProp`'s fallback writes any remaining string, number or boolean prop as a
17
+ * plain attribute under its own name. This is not a guess - it is what a real prop reaches native
18
+ * as too. `engine.ts`'s `Engine.setProp` puts *everything* in `node.props`, unconditionally, and
19
+ * the whole bag is what a commit sends to the native view; native ignores what it does not
20
+ * recognise rather than this package having to know in advance which of Tailwind's compiled
21
+ * `data-*` attribute selectors (`data-slot`, `data-variant`, `data-state`, and whatever a future
22
+ * component invents) a class string will need to match against. The fallback is what makes that
23
+ * true here too, without enumerating every one.
24
+ *
25
+ * What genuinely gets nothing, because a plain attribute could not carry it or would be actively
26
+ * wrong: an object or array prop with no scalar form (`hitSlop`'s insets, `accessibilityActions`,
27
+ * the Android-drawable props), and iOS-only accessibility surfaces with no ARIA equivalent at all
28
+ * (`accessibilityIgnoresInvertColors`, `accessibilityLargeContentTitle`,
29
+ * `accessibilityShowsLargeContentViewer`, `accessibilityRespondsToUserInteraction`) - these last
30
+ * four are strings/booleans that *would* fall through to the generic attribute write and sit
31
+ * inertly in the DOM if not named here, which is harmless but worth being honest about rather
32
+ * than implying they did something. Named in this comment rather than omitted from it, for the
33
+ * reason `host.ts` gives for its own exclusions: a divergence that is not written down is the
34
+ * failure this project cares about.
35
+ */
36
+ import { INTERACTION_NAME } from '@ng-native/fabric';
1
37
  import { cssValue, dashCase } from "./css-units.js";
2
38
  import { writeStyleKey } from "./native-style.js";
3
39
  function el(node) {
@@ -181,6 +217,15 @@ const VIEW_BASE_HANDLERS = {
181
217
  accessibilityLabel: (n, v, c) => setOrRemove(n, 'aria-label', v, c),
182
218
  accessibilityHint: (n, v, c) => setOrRemove(n, 'aria-description', v, c),
183
219
  accessibilityLabelledBy: (n, v, c) => setOrRemove(n, 'aria-labelledby', joinIfArray(v), c),
220
+ // What the desktop host reads, which the web has an attribute for each of.
221
+ accessibilityLevel: (n, v, c) => setOrRemove(n, 'aria-level', v, c),
222
+ accessibilityDescribedBy: (n, v, c) => setOrRemove(n, 'aria-describedby', joinIfArray(v), c),
223
+ accessibilityRequired: (n, v, c) => setOrRemove(n, 'aria-required', v, c),
224
+ accessibilityInvalid: (n, v, c) => setOrRemove(n, 'aria-invalid', v, c),
225
+ accessibilityPosInSet: (n, v, c) => setOrRemove(n, 'aria-posinset', v, c),
226
+ accessibilitySetSize: (n, v, c) => setOrRemove(n, 'aria-setsize', v, c),
227
+ accessibilityRowCount: (n, v, c) => setOrRemove(n, 'aria-rowcount', v, c),
228
+ accessibilityColumnCount: (n, v, c) => setOrRemove(n, 'aria-colcount', v, c),
184
229
  accessibilityRole: applyRole,
185
230
  role: applyRole,
186
231
  accessibilityState: applyAccessibilityState,
@@ -239,6 +284,9 @@ const VIEW_BASE_HANDLERS = {
239
284
  accessibilityLargeContentTitle: noop,
240
285
  accessibilityShowsLargeContentViewer: noop,
241
286
  accessibilityRespondsToUserInteraction: noop,
287
+ // Read off `node.props` when an interaction is reported, as on a device, and kept off the
288
+ // element so a name an app gives its reports is not in the page's markup.
289
+ [INTERACTION_NAME]: noop,
242
290
  };
243
291
  /**
244
292
  * A one-line field's `type`: a password while `secureTextEntry` is on, `tel` for a phone keyboard,
package/dist/props.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sourceRoot":"","sources":["../src/props.ts"],"names":[],"mappings":"AAoCA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,SAAS,EAAE,CAAC,IAAiB;IAC3B,OAAO,IAAI,CAAC,EAAa,CAAC;AAC5B,CAAC;AAED,SAAS,WAAW,CAAC,IAAiB,EAAE,IAAY,EAAE,KAAc,EAAE,KAAc;IAClF,IAAI,KAAK;QAAE,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;;QACrC,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,YAAY,CAAC,IAAiB,EAAE,IAAY,EAAE,KAAc,EAAE,KAAc;IACnF,MAAM,KAAK,GAAI,EAAE,CAAC,IAAI,CAAiB,CAAC,KAAK,CAAC;IAC9C,IAAI,KAAK;QAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;;QACjC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAqC;IACxD,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,QAAQ;IACtB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,QAAQ;IACpB,WAAW,EAAE,QAAQ;IACrB,MAAM,EAAE,SAAS;IACjB,8FAA8F;IAC9F,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE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,CAAC;IACnD,MAAM,WAAW,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,cAAc,IAAI,WAAW,EAAE,CAAC;QAClC,cAAc,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACrC,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAClC,OAAO;IACT,CAAC;IACD,IAAI,KAAK,EAAE,CAAC;QACV,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO;IACT,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QACzF,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC","sourcesContent":["/**\n * Every prop `BrowserEngine.setProp` gives a DOM or ARIA meaning to, keyed by prop name and\n * (where two elements use the same prop name differently) by the node's own template name.\n *\n * `packages/components/src/view-base.ts` is the biggest source of these - roughly forty\n * accessibility and identity inputs every host primitive carries - plus a smaller set each of\n * `text-input.ts`, `switch.ts`, `image.ts`, `safe-area-view.ts` and `modal.ts` layers on top for\n * their own element. A lookup table rather than a `switch`, for the same reason the prototype\n * (`examples/web-button/src/browser-engine.ts`) gives: this reads as data instead of control\n * flow, and it is where a review can see, at a glance, what the file's own comments below say in\n * prose - which props got a translated DOM meaning and which did not.\n *\n * ## The fallback for everything not in a table\n *\n * A prop with no handler here does not disappear the way it would if this file's tables were the\n * whole story: `applyProp`'s fallback writes any remaining string, number or boolean prop as a\n * plain attribute under its own name. This is not a guess - it is what a real prop reaches native\n * as too. `engine.ts`'s `Engine.setProp` puts *everything* in `node.props`, unconditionally, and\n * the whole bag is what a commit sends to the native view; native ignores what it does not\n * recognise rather than this package having to know in advance which of Tailwind's compiled\n * `data-*` attribute selectors (`data-slot`, `data-variant`, `data-state`, and whatever a future\n * component invents) a class string will need to match against. The fallback is what makes that\n * true here too, without enumerating every one.\n *\n * What genuinely gets nothing, because a plain attribute could not carry it or would be actively\n * wrong: an object or array prop with no scalar form (`hitSlop`'s insets, `accessibilityActions`,\n * the Android-drawable props), and iOS-only accessibility surfaces with no ARIA equivalent at all\n * (`accessibilityIgnoresInvertColors`, `accessibilityLargeContentTitle`,\n * `accessibilityShowsLargeContentViewer`, `accessibilityRespondsToUserInteraction`) - these last\n * four are strings/booleans that *would* fall through to the generic attribute write and sit\n * inertly in the DOM if not named here, which is harmless but worth being honest about rather\n * than implying they did something. Named in this comment rather than omitted from it, for the\n * reason `host.ts` gives for its own exclusions: a divergence that is not written down is the\n * failure this project cares about.\n */\nimport type { BrowserNode } from './dom-node.ts';\nimport { cssValue, dashCase } from './css-units.ts';\nimport { writeStyleKey } from './native-style.ts';\n\nfunction el(node: BrowserNode): Element {\n return node.el as Element;\n}\n\nfunction setOrRemove(node: BrowserNode, attr: string, value: unknown, clear: boolean): void {\n if (clear) el(node).removeAttribute(attr);\n else el(node).setAttribute(attr, String(value));\n}\n\nfunction setStyleProp(node: BrowserNode, prop: string, value: unknown, clear: boolean): void {\n const style = (el(node) as HTMLElement).style;\n if (clear) style.removeProperty(prop);\n else style.setProperty(prop, cssValue(prop, value));\n}\n\n/**\n * `accessibilityRole`/`role` values with a direct ARIA `role`. Not every RN role has one -\n * `pager`, `scrollview`, `horizontalscrollview`, `webview`, `drawerlayout`, `slidingdrawer`,\n * `keyboardkey` and `text` name platform widgets ARIA has no vocabulary for - those fall through\n * to the literal value, an unrecognised `role` an assistive technology ignores rather than a wrong\n * one it acts on. `element-props.test.ts` holds this list against `view-base.ts`'s own.\n */\nexport const ROLE_MAP: Readonly<Record<string, string>> = {\n none: 'presentation',\n button: 'button',\n togglebutton: 'button',\n link: 'link',\n search: 'searchbox',\n image: 'img',\n adjustable: 'slider',\n imagebutton: 'button',\n header: 'heading',\n // A summary of the screen, as a region with its own name; `contentinfo` is the page's footer.\n summary: 'region',\n alert: 'alert',\n checkbox: 'checkbox',\n combobox: 'combobox',\n menu: 'menu',\n menubar: 'menubar',\n menuitem: 'menuitem',\n progressbar: 'progressbar',\n radio: 'radio',\n radiogroup: 'radiogroup',\n scrollbar: 'scrollbar',\n spinbutton: 'spinbutton',\n switch: 'switch',\n tab: 'tab',\n tabbar: 'tablist',\n tablist: 'tablist',\n timer: 'timer',\n list: 'list',\n toolbar: 'toolbar',\n grid: 'grid',\n viewgroup: 'group',\n iconmenu: 'menu',\n};\n\nfunction applyRole(node: BrowserNode): void {\n // Whichever of the two changed, `role` is the one read where an element has both, as on native.\n const value = node.props['role'] ?? node.props['accessibilityRole'];\n const role = typeof value === 'string' ? (ROLE_MAP[value] ?? value) : undefined;\n setOrRemove(node, 'role', role, role === undefined);\n // Which attribute `checked` goes to depends on the role, and the two arrive in either order.\n const state = node.props['accessibilityState'];\n applyAccessibilityState(node, state, state === undefined || state === null);\n}\n\nfunction applyAccessibilityState(node: BrowserNode, value: unknown, clear: boolean): void {\n const state = clear ? undefined : (value as Record<string, unknown> | undefined);\n setOrRemove(node, 'aria-disabled', state?.['disabled'], state?.['disabled'] !== true);\n setOrRemove(node, 'aria-busy', state?.['busy'], state?.['busy'] !== true);\n setOrRemove(node, 'aria-selected', state?.['selected'], state?.['selected'] === undefined);\n setOrRemove(node, 'aria-expanded', state?.['expanded'], state?.['expanded'] === undefined);\n applyChecked(node, state?.['checked']);\n restorePublishedAria(node, STATE_ARIA);\n}\n\n/**\n * A button is pressed rather than checked: ARIA gives `aria-checked` no meaning on one, so a\n * screen reader said nothing of a checked `togglebutton`, where a device says \"on\".\n */\nfunction applyChecked(node: BrowserNode, checked: unknown): void {\n const pressed = el(node).getAttribute('role') === 'button';\n setOrRemove(node, 'aria-pressed', checked, checked === undefined || !pressed);\n setOrRemove(node, 'aria-checked', checked, checked === undefined || pressed);\n}\n\n/**\n * An aria state `ViewBase` puts back on the node for a native stylesheet, where nothing else\n * carries it. Here the accessibility state, or for `aria-hidden` the hidden props, already writes\n * the real attribute whenever the input is set, so the copy defers to it rather than fight it:\n * `aria-checked` beside the `aria-pressed` a button takes, or `aria-disabled` removed while a\n * disabled pressable still is. With nothing behind it, a raw `[attr.aria-*]` is written as before,\n * and written again once whatever governed it lets go, since that removed the attribute.\n */\nfunction publishedAria(attr: string): Handler {\n return (node, value, clear) => {\n if (!PUBLISHED_ARIA[attr]!(node.props)) setOrRemove(node, attr, value, clear);\n };\n}\n\n/** Writes each raw published attribute in `attrs` that nothing governs any more. */\nfunction restorePublishedAria(node: BrowserNode, attrs: readonly string[]): void {\n for (const attr of attrs) {\n const value = node.props[attr];\n if (value !== undefined && value !== null && !PUBLISHED_ARIA[attr]!(node.props)) {\n el(node).setAttribute(attr, String(value));\n }\n }\n}\n\nfunction inState(key: string): (props: Record<string, unknown>) => boolean {\n return (props) =>\n (props['accessibilityState'] as Record<string, unknown> | undefined)?.[key] !== undefined;\n}\n\n/** Each published aria attribute, and whether something else is writing it at the moment. */\nconst PUBLISHED_ARIA: Readonly<Record<string, (props: Record<string, unknown>) => boolean>> = {\n 'aria-busy': inState('busy'),\n 'aria-checked': inState('checked'),\n 'aria-disabled': inState('disabled'),\n 'aria-expanded': inState('expanded'),\n 'aria-selected': inState('selected'),\n 'aria-hidden': (props) =>\n props['accessibilityElementsHidden'] !== undefined ||\n props['importantForAccessibility'] !== undefined,\n};\n\nconst STATE_ARIA = ['aria-busy', 'aria-checked', 'aria-disabled', 'aria-expanded', 'aria-selected'];\n\nfunction applyAccessibilityValue(node: BrowserNode, value: unknown, clear: boolean): void {\n const v = clear ? undefined : (value as Record<string, unknown> | undefined);\n setOrRemove(node, 'aria-valuemin', v?.['min'], v?.['min'] === undefined);\n setOrRemove(node, 'aria-valuemax', v?.['max'], v?.['max'] === undefined);\n setOrRemove(node, 'aria-valuenow', v?.['now'], v?.['now'] === undefined);\n setOrRemove(node, 'aria-valuetext', v?.['text'], v?.['text'] === undefined);\n}\n\nfunction joinIfArray(value: unknown): unknown {\n return Array.isArray(value) ? value.join(' ') : value;\n}\n\ntype Handler = (node: BrowserNode, value: unknown, clear: boolean) => void;\n\n/** For a prop that genuinely has nothing to do on the web; see the file doc comment. */\nconst noop: Handler = () => {};\n\n/** The keys the last whole `style` object wrote, so the next one can remove what it leaves out. */\nconst writtenStyles = new WeakMap<BrowserNode, Set<string>>();\n\n/**\n * A static `style=\"flex: 1; margin-top: 4px\"`, which Angular writes whole through `setAttribute`,\n * as the object it declares. Parsed by a scratch declaration rather than split on `;` and `:`,\n * because on the web a value can hold both: `url(data:image/png;base64,...)`.\n */\nfunction declarations(node: BrowserNode, css: string): Record<string, string> {\n const scratch = el(node).ownerDocument.createElement('div').style;\n scratch.cssText = css;\n const out: Record<string, string> = {};\n for (const name of Array.from(scratch)) out[name] = scratch.getPropertyValue(name);\n return out;\n}\n\n/**\n * A whole style object as the `style` prop: what `[animatedStyle]` writes each frame. Angular's\n * own `[style]` bindings arrive one key at a time through the renderer's `setStyle` instead, and\n * a static `style` attribute arrives here too, as a string.\n */\nfunction applyStyleObject(node: BrowserNode, value: unknown, clear: boolean): void {\n const style = (el(node) as HTMLElement).style;\n const next = new Set<string>();\n // Kept as the object too, so a later `setStyle` mirrors into declarations rather than a string.\n if (typeof value === 'string') value = node.props['style'] = declarations(node, value);\n if (!clear && typeof value === 'object') {\n const keyed: Record<string, unknown> = {};\n for (const [name, v] of Object.entries(value as Record<string, unknown>)) {\n if (v !== null && v !== undefined) keyed[dashCase(name)] = v;\n }\n for (const key of Object.keys(keyed)) {\n for (const written of writeStyleKey(style, key, keyed)) next.add(written);\n }\n }\n for (const key of writtenStyles.get(node) ?? []) if (!next.has(key)) style.removeProperty(key);\n writtenStyles.set(node, next);\n}\n\n/** `ViewBase`'s own props: identical meaning on every element, whatever it committed as. */\nconst VIEW_BASE_HANDLERS: Record<string, Handler> = {\n style: applyStyleObject,\n accessibilityLabel: (n, v, c) => setOrRemove(n, 'aria-label', v, c),\n accessibilityHint: (n, v, c) => setOrRemove(n, 'aria-description', v, c),\n accessibilityLabelledBy: (n, v, c) => setOrRemove(n, 'aria-labelledby', joinIfArray(v), c),\n accessibilityRole: applyRole,\n role: applyRole,\n accessibilityState: applyAccessibilityState,\n accessibilityValue: applyAccessibilityValue,\n ...Object.fromEntries(Object.keys(PUBLISHED_ARIA).map((attr) => [attr, publishedAria(attr)])),\n accessibilityLiveRegion: (n, v, c) => setOrRemove(n, 'aria-live', v === 'none' ? 'off' : v, c),\n accessibilityElementsHidden: (n, v, c) => {\n setOrRemove(n, 'aria-hidden', v, c || v !== true);\n restorePublishedAria(n, ['aria-hidden']);\n },\n // `no` and `no-hide-descendants` both hide the subtree on the web: ARIA has no way to hide a\n // node from the accessibility tree while keeping its descendants individually reachable, which\n // is the one place `no` and `no-hide-descendants` differ on Android.\n importantForAccessibility: (n, v, c) => {\n const hide = v === 'no' || v === 'no-hide-descendants';\n setOrRemove(n, 'aria-hidden', true, c || !hide);\n restorePublishedAria(n, ['aria-hidden']);\n },\n accessibilityViewIsModal: (n, v, c) => setOrRemove(n, 'aria-modal', v, c || v !== true),\n accessibilityLanguage: (n, v, c) => setOrRemove(n, 'lang', v, c),\n nativeID: (n, v, c) => setOrRemove(n, 'id', v, c),\n id: (n, v, c) => setOrRemove(n, 'id', v, c),\n testID: (n, v, c) => setOrRemove(n, 'data-testid', v, c),\n focusable: (n, v, c) => setOrRemove(n, 'tabindex', v ? '0' : '-1', c),\n pointerEvents: (n, v, c) => {\n // `none` and `auto` map onto the CSS property directly. `box-none` and `box-only` have no\n // exact CSS equivalent - native's version lets a *box* opt out of hit-testing while every\n // descendant keeps receiving touches regardless of its own props; CSS `pointer-events` only\n // has inheritance, which an explicit `auto` on a descendant can override but a plain,\n // untouched descendant cannot escape. Approximated rather than left as a no-op: `box-none`\n // sets `none` on the node itself, `box-only` sets `auto`, which is the more useful default in\n // both directions: a full-window layer that is `box-none` lets touches through to the app\n // under it, and a card inside that sets its own `pointerEvents: 'auto'` opts back in, which\n // is precisely CSS's override rule and needs no web-specific code of its own to work.\n //\n // What this does not do: it does not make an *untouched* descendant of a `box-none` node\n // clickable the way native does automatically - a component that never had to say\n // `pointerEvents=\"auto\"` on native because `box-none` only ever excluded the box itself will\n // need to say so here too. `overlay-host`'s own content is the only place this project has\n // exercised the gap.\n if (v === 'none' || v === 'box-none') setStyleProp(n, 'pointer-events', 'none', c);\n else if (v === 'auto' || v === 'box-only') setStyleProp(n, 'pointer-events', 'auto', c);\n else setStyleProp(n, 'pointer-events', '', true);\n },\n // Object/array props with no scalar form the generic fallback could write, and iOS-only\n // accessibility surfaces with no ARIA equivalent at all. See the file doc comment's second\n // section for why these are named rather than left to fall through.\n hitSlop: noop,\n accessibilityActions: noop,\n nativeBackgroundAndroid: noop,\n nativeForegroundAndroid: noop,\n accessibilityIgnoresInvertColors: noop,\n accessibilityLargeContentTitle: noop,\n accessibilityShowsLargeContentViewer: noop,\n accessibilityRespondsToUserInteraction: noop,\n};\n\n/**\n * A one-line field's `type`: a password while `secureTextEntry` is on, `tel` for a phone keyboard,\n * and `text` otherwise. The other keyboards stay `inputmode` only, which is what picks the\n * on-screen keyboard. In Chromium, `type=\"email\"` throws from `setSelectionRange`, reads null for\n * `selectionStart`, trims the value the app set, and hides the spaces the user types from its\n * value, so `changeText` would report something other than what is on screen. `type=\"url\"` trims\n * the value the app set. `type=\"number\"` has no selection API, and `type=\"search\"` draws a clear\n * button of its own and empties itself on Escape.\n */\nfunction setInputType(n: BrowserNode): void {\n const field = el(n);\n if (field.tagName !== 'INPUT') return;\n const secure = n.props['secureTextEntry'] === true;\n const phone = n.props['keyboardType'] === 'phone-pad';\n (field as HTMLInputElement).type = secure ? 'password' : phone ? 'tel' : 'text';\n}\n\n/** `text-input.ts`'s own props, applied to the `<input>` or `<textarea>` it commits as. */\nconst TEXT_INPUT_HANDLERS: Record<string, Handler> = {\n text: (n, v, c) => {\n const textarea = el(n) as HTMLInputElement | HTMLTextAreaElement;\n const next = c ? '' : String(v);\n // Only when it actually differs: the caret and scroll position reset on every write, even\n // one that sets the value to what it already was, and `TextInput`'s own echo write does\n // exactly that on every keystroke unless this guard is here.\n if (textarea.value !== next) textarea.value = next;\n },\n placeholder: (n, v, c) => setOrRemove(n, 'placeholder', v, c),\n // No inline way to style a pseudo-element, so the colour travels as a custom property and\n // `reset.css` reads it back with `::placeholder`.\n placeholderTextColor: (n, v, c) => setStyleProp(n, '--rn-placeholder-color', v, c),\n keyboardType: (n, v, c) => {\n const map: Record<string, string> = {\n numeric: 'numeric',\n 'number-pad': 'numeric',\n 'decimal-pad': 'decimal',\n 'email-address': 'email',\n 'phone-pad': 'tel',\n url: 'url',\n 'web-search': 'search',\n };\n const mode = typeof v === 'string' ? map[v] : undefined;\n setOrRemove(n, 'inputmode', mode, c || mode === undefined);\n setInputType(n);\n },\n returnKeyType: (n, v, c) => {\n const known = new Set(['done', 'go', 'next', 'search', 'send', 'previous']);\n const hint = typeof v === 'string' && known.has(v) ? v : undefined;\n setOrRemove(n, 'enterkeyhint', hint, c || hint === undefined);\n },\n // A password field where there can be one. A textarea has no password type, so a multiline\n // field masks with the non-standard property, which Firefox does not have.\n secureTextEntry: (n, v, c) => {\n if (el(n).tagName === 'INPUT') setInputType(n);\n else setStyleProp(n, '-webkit-text-security', v ? 'disc' : '', c || !v);\n },\n autoCapitalize: (n, v, c) => setOrRemove(n, 'autocapitalize', v === 'none' ? 'off' : v, c),\n autoCorrect: (n, v, c) => setOrRemove(n, 'autocorrect', v ? 'on' : 'off', c),\n autoFocus: (n, v, c) => {\n if (!c && v) (el(n) as HTMLElement).focus();\n },\n maxLength: (n, v, c) => setOrRemove(n, 'maxlength', v, c),\n multiline: (n, v, c) => setOrRemove(n, 'data-multiline', '', c || v !== true),\n numberOfLines: (n, v, c) => setOrRemove(n, 'rows', v, c || n.props['multiline'] !== true),\n editable: (n, v, c) => {\n (el(n) as HTMLTextAreaElement).readOnly = !c && v === false;\n },\n selection: (n, v, c) => {\n if (c) return;\n const range = v as { start: number; end?: number };\n (el(n) as HTMLTextAreaElement).setSelectionRange(range.start, range.end ?? range.start);\n },\n selectTextOnFocus: (n, v, c) => setOrRemove(n, 'data-select-on-focus', '', c || v !== true),\n textAlign: (n, v, c) => setStyleProp(n, 'text-align', v, c),\n spellCheck: (n, v, c) => setOrRemove(n, 'spellcheck', v ? 'true' : 'false', c),\n autoComplete: (n, v, c) => setOrRemove(n, 'autocomplete', v, c),\n};\n\n/** `switch.ts`'s own props, applied to the `<input type=\"checkbox\">` `elements.ts` creates. */\nconst SWITCH_HANDLERS: Record<string, Handler> = {\n on: (n, v, c) => {\n (el(n) as HTMLInputElement).checked = !c && v === true;\n },\n value: (n, v, c) => {\n (el(n) as HTMLInputElement).checked = !c && v === true;\n },\n disabled: (n, v, c) => {\n (el(n) as HTMLInputElement).disabled = !c && v === true;\n },\n};\n\n/** How an `<img>` fits a picture for each resizeMode, as `background-size` does below. */\nconst FIT: Record<string, string> = { cover: 'cover', contain: 'contain', stretch: 'fill' };\nconst MODES = new WeakMap<object, string | undefined>();\n/** The `<img>` each image paints with, where its source names a referrer policy. */\nconst PICTURES = new WeakMap<object, HTMLImageElement>();\n\n/**\n * A source's `Referrer-Policy`, which `image.ts` gives as a header as React Native does. A\n * background is fetched with the page's policy whatever this says, so a source with one is\n * painted with an `<img>` that sends what it asks for instead.\n */\nfunction referrerPolicyOf(value: unknown): string | undefined {\n const source = Array.isArray(value) ? value[0] : value;\n const headers = (source as { headers?: Record<string, unknown> } | null)?.headers;\n const policy = headers?.['Referrer-Policy'];\n return typeof policy === 'string' && policy ? policy : undefined;\n}\n\nfunction paintWithImg(n: BrowserNode, uri: string | undefined, policy: string | undefined): void {\n let img = PICTURES.get(n);\n if (!uri || !policy) {\n img?.remove();\n PICTURES.delete(n);\n return;\n }\n if (!img) {\n img = el(n).ownerDocument.createElement('img');\n img.alt = '';\n img.setAttribute('aria-hidden', 'true');\n img.style.cssText =\n 'position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;pointer-events:none';\n el(n).appendChild(img);\n PICTURES.set(n, img);\n }\n img.style.objectFit = FIT[MODES.get(n) ?? 'cover'] ?? 'none';\n // Before the src, which starts the fetch.\n img.referrerPolicy = policy;\n img.src = uri;\n}\n\n/** `image.ts`'s own props. `image` paints with `background-image`; see `elements.ts`. */\nconst IMAGE_HANDLERS: Record<string, Handler> = {\n source: (n, v, c) => {\n const uri = sourceUri(c ? undefined : v);\n const policy = c ? undefined : referrerPolicyOf(v);\n const background = uri && !policy ? `url(\"${cssEscape(uri)}\")` : '';\n setStyleProp(n, 'background-image', background, !background);\n paintWithImg(n, uri, policy);\n if (uri) watchImageLoad(n, uri, policy);\n },\n resizeMode: (n, v, c) => {\n const size: Record<string, string> = {\n cover: 'cover',\n contain: 'contain',\n stretch: '100% 100%',\n };\n const mode = typeof v === 'string' ? v : undefined;\n MODES.set(n, c ? undefined : mode);\n const img = PICTURES.get(n);\n if (img) img.style.objectFit = FIT[mode ?? 'cover'] ?? 'none';\n setStyleProp(n, 'background-size', mode ? (size[mode] ?? 'auto') : '', c || !mode);\n setStyleProp(n, 'background-repeat', mode === 'repeat' ? 'repeat' : 'no-repeat', c);\n setStyleProp(n, 'background-position', 'center', c);\n },\n blurRadius: (n, v, c) =>\n setStyleProp(n, 'filter', typeof v === 'number' ? `blur(${v}px)` : '', c),\n /**\n * The picture's own size, which on native is a default the cascade can override. Written as\n * custom properties that `reset.css` reads at the weakest specificity there is, since an inline\n * `width` would beat the app's own classes here exactly as it would on a device.\n */\n intrinsicSize: (n, v, c) => {\n const size = c ? undefined : (v as { width?: unknown; height?: unknown } | undefined);\n const px = (value: unknown) => (typeof value === 'number' ? `${value}px` : '');\n setStyleProp(n, '--rn-intrinsic-width', px(size?.width), !px(size?.width));\n setStyleProp(n, '--rn-intrinsic-height', px(size?.height), !px(size?.height));\n },\n};\n\n/**\n * Says whether a `background-image` loaded, which the property itself will not.\n *\n * An `<image>` paints with `background-image` here (see `elements.ts` for why), and a background\n * fires no `load` or `error` event - only a real `<img>` does. React Native's `Image` reports\n * both, and things depend on it: an avatar-style component that swaps to a fallback when the\n * image errors needs exactly this signal. Without it a broken image URL sat blank forever,\n * showing neither a picture nor a fallback.\n *\n * A detached `Image()` is the standard way to ask. It shares the browser's cache with the\n * background the element is already painting, so this costs a cache lookup rather than a second\n * download.\n *\n * The answer is dispatched as an ordinary DOM event on the element itself, rather than pushed\n * through the engine, so it reaches `(load)` and `(error)` by the same path every other plain\n * binding takes. That is also why `topLoad` and `topError` are not in `browser-engine.ts`'s\n * reserved set: there is a real DOM event of each name here, and it is this one.\n *\n * The uri is remembered so a source that changes mid-flight cannot have its old answer arrive\n * late and overwrite the new one, which is the stale-response guard any fetch needs.\n */\nconst IMAGE_LOADS = new WeakMap<object, string>();\n\nfunction watchImageLoad(node: BrowserNode, uri: string, policy?: string): void {\n IMAGE_LOADS.set(node, uri);\n const el = node.el as Element;\n const view = el.ownerDocument.defaultView;\n if (!view) return;\n const probe = new view.Image();\n const settle = (type: 'load' | 'error') => () => {\n if (IMAGE_LOADS.get(node) === uri) el.dispatchEvent(new view.Event(type));\n };\n probe.addEventListener('load', settle('load'));\n probe.addEventListener('error', settle('error'));\n if (policy) probe.referrerPolicy = policy;\n probe.src = uri;\n}\n\nfunction sourceUri(value: unknown): string | undefined {\n if (!value) return undefined;\n if (typeof value === 'object' && 'uri' in (value as object)) {\n return (value as { uri?: string }).uri;\n }\n if (Array.isArray(value) && value.length > 0) return sourceUri(value[0]);\n return undefined;\n}\n\nfunction cssEscape(value: string): string {\n return value.replace(/[\"\\\\]/g, (c) => `\\\\${c}`);\n}\n\n/**\n * `safe-area-view.ts`'s `edges`/`mode`. Applied on either changing, from both current values,\n * because native takes all four edges together and this follows the same rule (see that file's\n * own `resolvedEdges` comment).\n *\n * `env(safe-area-inset-*)` is the real CSS mechanism for this - a phone with a notch reports a\n * non-zero inset through it, the same number `react-native-safe-area-context` reads on iOS. What\n * is not reproduced: `additive` mode is documented as adding the inset to whatever padding a\n * caller's own class already put there, and there is no way to read that back out of a\n * stylesheet this engine cannot inspect - so `additive` and `maximum` both resolve to `env()`\n * alone here, which is `maximum` against a base of zero. A caller relying on `additive` stacking\n * with its own padding will see less padding on the web than on native.\n */\nconst EDGE_PROP: Record<string, string> = {\n top: 'top',\n right: 'right',\n bottom: 'bottom',\n left: 'left',\n};\n\nfunction applySafeAreaInsets(node: BrowserNode): void {\n const edges = node.props['edges'] as Record<string, string> | undefined;\n const mode = (node.props['mode'] as string | undefined) ?? 'padding';\n const family = mode === 'margin' ? 'margin' : 'padding';\n // The family not in use is cleared too, or switching mode left the old insets behind.\n const other = family === 'margin' ? 'padding' : 'margin';\n for (const edge of Object.keys(EDGE_PROP)) {\n const edgeMode = edges?.[edge];\n const prop = `${family}-${EDGE_PROP[edge]}`;\n setStyleProp(node, `${other}-${EDGE_PROP[edge]}`, '', true);\n if (!edgeMode || edgeMode === 'off') setStyleProp(node, prop, '', true);\n else setStyleProp(node, prop, `env(safe-area-inset-${edge})`, false);\n }\n}\n\nconst SAFE_AREA_HANDLERS: Record<string, Handler> = {\n edges: (n) => applySafeAreaInsets(n),\n mode: (n) => applySafeAreaInsets(n),\n};\n\n/**\n * `modal.ts`'s own props. `visible` defaults to `true` there specifically so a mounted-but-hidden\n * host does not swallow touches over nothing (see that file's doc comment); on the web the same\n * concern is a `hidden` attribute, which `reset.css` gives higher specificity than the layout\n * reset's `display: flex` so it actually hides rather than being immediately overridden by it.\n */\nconst MODAL_HANDLERS: Record<string, Handler> = {\n visible: (n, v, c) => setOrRemove(n, 'hidden', '', c || v !== false),\n transparent: (n, v, c) => setStyleProp(n, 'background-color', 'transparent', c || v !== true),\n};\n\n/**\n * `packages/icons/src/svg-props.ts`'s translation, read back the other way.\n *\n * `fill`/`stroke` arrive as a *brush*, not a colour string: `null` for \"paint nothing\", a real\n * `{type: 0, payload}` object for an actual colour (`payload` already run through\n * `BrowserEngine.color`, which passes a normal CSS colour string straight through), `{type: 2}`\n * for `currentColor`, `{type: 1, brushRef}` for a gradient reference. `strokeLinecap`/\n * `strokeLinejoin`/`fillRule`/`clipRule` arrive as the integers `svg-props.ts` encodes SVG's\n * keywords as - native prop values, not the strings a `<svg-path stroke-linecap=\"round\">` was\n * written with - so the tables below are `svg-props.ts`'s own `LINECAP`/`LINEJOIN`/`FILL_RULE`\n * read backwards. `strokeDasharray` arrives as a string array, already split on commas/whitespace\n * rather than the original string; `matrix` as the six numbers of a 2x3 matrix rather than the\n * `transform` string they came from. All are reconstructed here into the attribute form a browser\n * wants.\n *\n * `propList` gets nothing: it is native prop names this element declared for itself, so that\n * *its* `RNSVGGroup`/`RNSVGPath` inherits nothing it did not ask to inherit - a fake for\n * inheritance real SVG attributes already do on their own, which is the entire reason\n * `svg-props.ts` had to invent it.\n *\n * Geometry (`d`, `cx`, `cy`, `r`, `rx`, `ry`, `x`, `y`, `width`, `height`, `x1`, `y1`, `x2`, `y2`)\n * gets no handler either, on purpose: those prop names are already the SVG attribute names,\n * untouched by `nativeProps`, so `applyProp`'s generic string/number fallback at the bottom of\n * this file writes them correctly with nothing said here.\n */\nfunction brushAttr(value: unknown): string | undefined {\n const brush = value as { type: number; payload?: unknown; brushRef?: string };\n if (brush.type === 2) return 'currentColor';\n if (brush.type === 1) return `url(#${brush.brushRef})`;\n if (brush.type === 0) return typeof brush.payload === 'string' ? brush.payload : undefined;\n return undefined;\n}\n\n/**\n * `fill`/`stroke`. Reads `value` itself rather than the `clear` flag `applyProp` would otherwise\n * pass every other handler, because `clear` alone cannot tell apart the two things a cleared\n * brush prop means: `undefined` (\"never declared - inherit from the ancestor group, same as real\n * SVG's own cascade\") and the brush `null` (\"declared as `none` - paint nothing, even if an\n * ancestor would otherwise supply a paint\"). Only the second needs an attribute written at all.\n * `dom-node.ts`'s `SVG_BRUSH_ELEMENTS` seeding is what makes sure this handler is even reached for\n * a shape's first `fill=\"none\"`/`stroke=\"none\"` - see that file's own doc comment for why a\n * `null` brush needs help getting here in the first place.\n */\nfunction applyBrush(node: BrowserNode, attr: string, value: unknown): void {\n if (value === undefined) {\n el(node).removeAttribute(attr);\n return;\n }\n if (value === null) {\n el(node).setAttribute(attr, 'none');\n return;\n }\n const resolved = brushAttr(value);\n if (resolved === undefined) el(node).removeAttribute(attr);\n else el(node).setAttribute(attr, resolved);\n}\n\nconst LINECAP_KEYWORD: Record<number, string> = { 0: 'butt', 1: 'round', 2: 'square' };\nconst LINEJOIN_KEYWORD: Record<number, string> = { 0: 'miter', 1: 'round', 2: 'bevel' };\nconst FILL_RULE_KEYWORD: Record<number, string> = { 0: 'evenodd', 1: 'nonzero' };\n\nfunction applyKeyword(\n node: BrowserNode,\n attr: string,\n map: Readonly<Record<number, string>>,\n value: unknown,\n clear: boolean,\n): void {\n const resolved = typeof value === 'number' ? map[value] : undefined;\n setOrRemove(node, attr, resolved, clear || resolved === undefined);\n}\n\n/**\n * Every shape `ng-icon.ts` parses out of an icon's markup - `svg-path`, `svg-rect`, `svg-circle`,\n * `svg-line`, plus `svg-g` and `svg-ellipse` - shares this one set of presentation props, the\n * same names `svg-props.ts`'s own `PRESENTATION` table lists.\n */\nconst SVG_PRESENTATION_HANDLERS: Record<string, Handler> = {\n fill: (n, v) => applyBrush(n, 'fill', v),\n stroke: (n, v) => applyBrush(n, 'stroke', v),\n fillOpacity: (n, v, c) => setOrRemove(n, 'fill-opacity', v, c),\n strokeOpacity: (n, v, c) => setOrRemove(n, 'stroke-opacity', v, c),\n strokeWidth: (n, v, c) => setOrRemove(n, 'stroke-width', v, c),\n strokeLinecap: (n, v, c) => applyKeyword(n, 'stroke-linecap', LINECAP_KEYWORD, v, c),\n strokeLinejoin: (n, v, c) => applyKeyword(n, 'stroke-linejoin', LINEJOIN_KEYWORD, v, c),\n fillRule: (n, v, c) => applyKeyword(n, 'fill-rule', FILL_RULE_KEYWORD, v, c),\n clipRule: (n, v, c) => applyKeyword(n, 'clip-rule', FILL_RULE_KEYWORD, v, c),\n strokeDasharray: (n, v, c) => {\n const joined = Array.isArray(v) ? v.join(',') : undefined;\n setOrRemove(n, 'stroke-dasharray', joined, c || joined === undefined);\n },\n strokeDashoffset: (n, v, c) => setOrRemove(n, 'stroke-dashoffset', v, c),\n strokeMiterlimit: (n, v, c) => setOrRemove(n, 'stroke-miterlimit', v, c),\n opacity: (n, v, c) => setOrRemove(n, 'opacity', v, c),\n matrix: (n, v, c) => {\n const matrix = Array.isArray(v) ? `matrix(${v.join(',')})` : undefined;\n setOrRemove(n, 'transform', matrix, c || matrix === undefined);\n },\n propList: noop,\n};\n\n/**\n * A gradient, read back from `svg-props.ts`'s `gradientProps`. Its stops arrive as one flat list,\n * `[offset, colour, offset, colour]`, which is how native takes them, and a browser wants them as\n * `<stop>` children. Its `name` is the `id` a `url(#id)` brush finds it by, and a radial one's\n * two radii are the one `r` it was written with.\n */\nconst SVG_GRADIENT_HANDLERS: Record<string, Handler> = {\n name: (n, v, c) => setOrRemove(n, 'id', v, c),\n gradient: (n, v) => {\n const list = Array.isArray(v) ? v : [];\n const stops: Element[] = [];\n for (let i = 0; i + 1 < list.length; i += 2) {\n const stop = el(n).ownerDocument.createElementNS(el(n).namespaceURI, 'stop');\n stop.setAttribute('offset', String(list[i]));\n stop.setAttribute('stop-color', String(list[i + 1]));\n stops.push(stop);\n }\n el(n).replaceChildren(...stops);\n },\n gradientUnits: (n, v, c) =>\n setOrRemove(n, 'gradientUnits', v === 1 ? 'userSpaceOnUse' : 'objectBoundingBox', c),\n gradientTransform: (n, v, c) => {\n const matrix = Array.isArray(v) ? `matrix(${v.join(',')})` : undefined;\n setOrRemove(n, 'gradientTransform', matrix, c || matrix === undefined);\n },\n rx: (n, v, c) => setOrRemove(n, 'r', v, c),\n ry: noop,\n};\n\n/** The attributes `svg-props.ts`'s `textProps` gathers into the one `font` object native reads. */\nconst FONT_ATTRIBUTES = [\n 'font-size',\n 'font-weight',\n 'font-style',\n 'font-family',\n 'font-variant',\n 'font-stretch',\n 'text-anchor',\n 'text-decoration',\n 'letter-spacing',\n 'word-spacing',\n 'kerning',\n];\n\nconst camelCase = (name: string): string =>\n name.replace(/-([a-z])/g, (_, letter: string) => letter.toUpperCase());\n\n/** A position list, `x: ['0', '9']`, as the attribute it was written as. An empty one is none. */\nconst lengthList =\n (attr: string): Handler =>\n (n, v) => {\n const list = Array.isArray(v) ? v : [];\n setOrRemove(n, attr, list.join(' '), list.length === 0);\n };\n\n/** A `text` or a `tspan`: a shape's paint, with its font, its positions and its characters. */\nconst SVG_TEXT_HANDLERS: Record<string, Handler> = {\n ...SVG_PRESENTATION_HANDLERS,\n font: (n, v) => {\n const font = (v ?? {}) as Record<string, unknown>;\n for (const attr of FONT_ATTRIBUTES) {\n const value = font[camelCase(attr)];\n setOrRemove(n, attr, value, value === undefined || value === null);\n }\n },\n x: lengthList('x'),\n y: lengthList('y'),\n dx: lengthList('dx'),\n dy: lengthList('dy'),\n rotate: lengthList('rotate'),\n content: (n, v, c) => {\n el(n).textContent = c ? '' : String(v);\n },\n};\n\n/**\n * The SVG root's own sizing props - `ng-icon.ts`'s host bindings, none of which go through\n * `svg-props.ts`'s `nativeProps` (they are written directly, not parsed off markup).\n * `minX`/`minY`/`vbWidth`/`vbHeight` build one `viewBox` attribute together, and\n * `align`/`meetOrSlice` build one `preserveAspectRatio` together, so each handler rereads every\n * prop in its group off `node.props` rather than trusting the single value it was called with -\n * the same pattern `applySafeAreaInsets` above uses for `edges`/`mode`, needed for the same\n * reason: Angular commits host bindings one at a time, so whichever of a group changes first would\n * otherwise write an attribute built from the rest still being stale (`undefined`, before their\n * own first commit) or from a previous render's values.\n */\nfunction applySvgViewBox(node: BrowserNode): void {\n const minX = node.props['minX'];\n const minY = node.props['minY'];\n const vbWidth = node.props['vbWidth'];\n const vbHeight = node.props['vbHeight'];\n const complete =\n typeof minX === 'number' &&\n typeof minY === 'number' &&\n typeof vbWidth === 'number' &&\n typeof vbHeight === 'number';\n setOrRemove(\n node,\n 'viewBox',\n complete ? `${minX} ${minY} ${vbWidth} ${vbHeight}` : undefined,\n !complete,\n );\n}\n\n/**\n * `bbWidth`/`bbHeight` are the root's own rendered size in points - `NgIcon`'s `size()` input -\n * kept as real `width`/`height` attributes alongside the `[style]` host binding that sizes the\n * box for layout, so an inspector reading the SVG element in isolation sees the same size CSS is\n * about to give it.\n */\nfunction applySvgSize(node: BrowserNode): void {\n const bbWidth = node.props['bbWidth'];\n const bbHeight = node.props['bbHeight'];\n setOrRemove(node, 'width', bbWidth, typeof bbWidth !== 'number');\n setOrRemove(node, 'height', bbHeight, typeof bbHeight !== 'number');\n}\n\n/**\n * `0`/`1`/`2` are `RNSVGSvgView`'s own encoding of `meet`/`slice`/`none` - see `svg-props.ts`'s\n * `viewBoxProps`, which always sends `0` for both roots today. `slice`/`none` are translated on\n * the chance a future caller sets one directly, not because either root emits them yet; that\n * would be a divergence worth noting if it ever mattered, but nothing in this codebase exercises\n * it.\n */\nconst MEET_OR_SLICE: Record<number, string> = { 0: 'meet', 1: 'slice', 2: 'none' };\n\nfunction applySvgAspectRatio(node: BrowserNode): void {\n const align = node.props['align'];\n const meetOrSlice = node.props['meetOrSlice'];\n if (typeof align !== 'string') {\n el(node).removeAttribute('preserveAspectRatio');\n return;\n }\n const slice = typeof meetOrSlice === 'number' ? (MEET_OR_SLICE[meetOrSlice] ?? 'meet') : 'meet';\n el(node).setAttribute('preserveAspectRatio', `${align} ${slice}`);\n}\n\nconst SVG_ROOT_HANDLERS: Record<string, Handler> = {\n minX: (n) => applySvgViewBox(n),\n minY: (n) => applySvgViewBox(n),\n vbWidth: (n) => applySvgViewBox(n),\n vbHeight: (n) => applySvgViewBox(n),\n bbWidth: (n) => applySvgSize(n),\n bbHeight: (n) => applySvgSize(n),\n align: (n) => applySvgAspectRatio(n),\n meetOrSlice: (n) => applySvgAspectRatio(n),\n // `NgIcon`'s own `[color]` host binding - what a shape's `currentColor` brush (`brushAttr`'s\n // `{type: 2}` case, written as the literal attribute value `currentColor`) resolves against.\n // Real SVG's `currentColor` already means \"this element's computed CSS `color`\", so setting it\n // here as an inline style *is* the whole translation - no downstream shape needs to know the\n // actual value, exactly as native's brush stays unresolved until the view paints.\n color: (n, v, c) => setStyleProp(n, 'color', v, c || typeof v !== 'string'),\n};\n\n/**\n * `activity-indicator.ts`'s colour, as the `color` its spinner in `reset.css` paints with. The\n * spinner is drawn by the stylesheet, and `animating` and `hidesWhenStopped` reach it as the\n * plain attributes the fallback writes.\n */\nconst ACTIVITY_INDICATOR_HANDLERS: Record<string, Handler> = {\n color: (n, v, c) => setStyleProp(n, 'color', v, c || typeof v !== 'string'),\n};\n\n/**\n * `text.ts`'s `numberOfLines`, as the attribute and the line count `reset.css` clamps the text\n * with. Neither is written for `0`, which is no limit on a device, as it is when the prop is unset.\n */\nconst TEXT_HANDLERS: Record<string, Handler> = {\n numberOfLines: (n, v, c) => {\n const lines = typeof v === 'number' && v > 0 ? v : undefined;\n setOrRemove(n, 'numberoflines', lines, c || lines === undefined);\n setStyleProp(n, '--rn-number-of-lines', lines, c || lines === undefined);\n },\n};\n\nconst BY_ELEMENT: Record<string, Record<string, Handler>> = {\n text: TEXT_HANDLERS,\n 'activity-indicator': ACTIVITY_INDICATOR_HANDLERS,\n 'text-input': TEXT_INPUT_HANDLERS,\n switch: SWITCH_HANDLERS,\n image: IMAGE_HANDLERS,\n 'safe-area-view': SAFE_AREA_HANDLERS,\n modal: MODAL_HANDLERS,\n 'svg-g': SVG_PRESENTATION_HANDLERS,\n 'svg-path': SVG_PRESENTATION_HANDLERS,\n 'svg-circle': SVG_PRESENTATION_HANDLERS,\n 'svg-ellipse': SVG_PRESENTATION_HANDLERS,\n 'svg-rect': SVG_PRESENTATION_HANDLERS,\n 'svg-line': SVG_PRESENTATION_HANDLERS,\n 'svg-linear-gradient': SVG_GRADIENT_HANDLERS,\n 'svg-radial-gradient': SVG_GRADIENT_HANDLERS,\n 'svg-text': SVG_TEXT_HANDLERS,\n 'svg-tspan': SVG_TEXT_HANDLERS,\n 'ng-icon': SVG_ROOT_HANDLERS,\n};\n\n/**\n * Apply one prop to its node. `clear` is `value === undefined || value === null`.\n *\n * A key with a handler - either element-specific or from `ViewBase`'s own set - runs exactly\n * that translation. Everything else falls to the generic attribute write the file doc comment\n * describes, which is why a `noop` entry (`hitSlop`, `accessibilityActions`, ...) has to be a\n * real entry rather than an absent one: an absent key falls through and gets written as a raw\n * attribute, a `noop` key is claimed and genuinely does nothing.\n */\nexport function applyProp(node: BrowserNode, key: string, value: unknown, clear: boolean): void {\n const elementHandler = BY_ELEMENT[node.tag]?.[key];\n const baseHandler = VIEW_BASE_HANDLERS[key];\n if (elementHandler || baseHandler) {\n elementHandler?.(node, value, clear);\n baseHandler?.(node, value, clear);\n return;\n }\n if (clear) {\n el(node).removeAttribute(key);\n return;\n }\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n el(node).setAttribute(key, String(value));\n }\n}\n"]}
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../src/props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,SAAS,EAAE,CAAC,IAAiB;IAC3B,OAAO,IAAI,CAAC,EAAa,CAAC;AAC5B,CAAC;AAED,SAAS,WAAW,CAAC,IAAiB,EAAE,IAAY,EAAE,KAAc,EAAE,KAAc;IAClF,IAAI,KAAK;QAAE,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;;QACrC,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,YAAY,CAAC,IAAiB,EAAE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and\n * (where two elements use the same prop name differently) by the node's own template name.\n *\n * `packages/components/src/view-base.ts` is the biggest source of these - roughly forty\n * accessibility and identity inputs every host primitive carries - plus a smaller set each of\n * `text-input.ts`, `switch.ts`, `image.ts`, `safe-area-view.ts` and `modal.ts` layers on top for\n * their own element. A lookup table rather than a `switch`, for the same reason the prototype\n * (`examples/web-button/src/browser-engine.ts`) gives: this reads as data instead of control\n * flow, and it is where a review can see, at a glance, what the file's own comments below say in\n * prose - which props got a translated DOM meaning and which did not.\n *\n * ## The fallback for everything not in a table\n *\n * A prop with no handler here does not disappear the way it would if this file's tables were the\n * whole story: `applyProp`'s fallback writes any remaining string, number or boolean prop as a\n * plain attribute under its own name. This is not a guess - it is what a real prop reaches native\n * as too. `engine.ts`'s `Engine.setProp` puts *everything* in `node.props`, unconditionally, and\n * the whole bag is what a commit sends to the native view; native ignores what it does not\n * recognise rather than this package having to know in advance which of Tailwind's compiled\n * `data-*` attribute selectors (`data-slot`, `data-variant`, `data-state`, and whatever a future\n * component invents) a class string will need to match against. The fallback is what makes that\n * true here too, without enumerating every one.\n *\n * What genuinely gets nothing, because a plain attribute could not carry it or would be actively\n * wrong: an object or array prop with no scalar form (`hitSlop`'s insets, `accessibilityActions`,\n * the Android-drawable props), and iOS-only accessibility surfaces with no ARIA equivalent at all\n * (`accessibilityIgnoresInvertColors`, `accessibilityLargeContentTitle`,\n * `accessibilityShowsLargeContentViewer`, `accessibilityRespondsToUserInteraction`) - these last\n * four are strings/booleans that *would* fall through to the generic attribute write and sit\n * inertly in the DOM if not named here, which is harmless but worth being honest about rather\n * than implying they did something. Named in this comment rather than omitted from it, for the\n * reason `host.ts` gives for its own exclusions: a divergence that is not written down is the\n * failure this project cares about.\n */\nimport { INTERACTION_NAME } from '@ng-native/fabric';\nimport type { BrowserNode } from './dom-node.ts';\nimport { cssValue, dashCase } from './css-units.ts';\nimport { writeStyleKey } from './native-style.ts';\n\nfunction el(node: BrowserNode): Element {\n return node.el as Element;\n}\n\nfunction setOrRemove(node: BrowserNode, attr: string, value: unknown, clear: boolean): void {\n if (clear) el(node).removeAttribute(attr);\n else el(node).setAttribute(attr, String(value));\n}\n\nfunction setStyleProp(node: BrowserNode, prop: string, value: unknown, clear: boolean): void {\n const style = (el(node) as HTMLElement).style;\n if (clear) style.removeProperty(prop);\n else style.setProperty(prop, cssValue(prop, value));\n}\n\n/**\n * `accessibilityRole`/`role` values with a direct ARIA `role`. Not every RN role has one -\n * `pager`, `scrollview`, `horizontalscrollview`, `webview`, `drawerlayout`, `slidingdrawer`,\n * `keyboardkey` and `text` name platform widgets ARIA has no vocabulary for - those fall through\n * to the literal value, an unrecognised `role` an assistive technology ignores rather than a wrong\n * one it acts on. `element-props.test.ts` holds this list against `view-base.ts`'s own.\n */\nexport const ROLE_MAP: Readonly<Record<string, string>> = {\n none: 'presentation',\n button: 'button',\n togglebutton: 'button',\n link: 'link',\n search: 'searchbox',\n image: 'img',\n adjustable: 'slider',\n imagebutton: 'button',\n header: 'heading',\n // A summary of the screen, as a region with its own name; `contentinfo` is the page's footer.\n summary: 'region',\n alert: 'alert',\n checkbox: 'checkbox',\n combobox: 'combobox',\n menu: 'menu',\n menubar: 'menubar',\n menuitem: 'menuitem',\n progressbar: 'progressbar',\n radio: 'radio',\n radiogroup: 'radiogroup',\n scrollbar: 'scrollbar',\n spinbutton: 'spinbutton',\n switch: 'switch',\n tab: 'tab',\n tabbar: 'tablist',\n tablist: 'tablist',\n timer: 'timer',\n list: 'list',\n toolbar: 'toolbar',\n grid: 'grid',\n viewgroup: 'group',\n iconmenu: 'menu',\n};\n\nfunction applyRole(node: BrowserNode): void {\n // Whichever of the two changed, `role` is the one read where an element has both, as on native.\n const value = node.props['role'] ?? node.props['accessibilityRole'];\n const role = typeof value === 'string' ? (ROLE_MAP[value] ?? value) : undefined;\n setOrRemove(node, 'role', role, role === undefined);\n // Which attribute `checked` goes to depends on the role, and the two arrive in either order.\n const state = node.props['accessibilityState'];\n applyAccessibilityState(node, state, state === undefined || state === null);\n}\n\nfunction applyAccessibilityState(node: BrowserNode, value: unknown, clear: boolean): void {\n const state = clear ? undefined : (value as Record<string, unknown> | undefined);\n setOrRemove(node, 'aria-disabled', state?.['disabled'], state?.['disabled'] !== true);\n setOrRemove(node, 'aria-busy', state?.['busy'], state?.['busy'] !== true);\n setOrRemove(node, 'aria-selected', state?.['selected'], state?.['selected'] === undefined);\n setOrRemove(node, 'aria-expanded', state?.['expanded'], state?.['expanded'] === undefined);\n applyChecked(node, state?.['checked']);\n restorePublishedAria(node, STATE_ARIA);\n}\n\n/**\n * A button is pressed rather than checked: ARIA gives `aria-checked` no meaning on one, so a\n * screen reader said nothing of a checked `togglebutton`, where a device says \"on\".\n */\nfunction applyChecked(node: BrowserNode, checked: unknown): void {\n const pressed = el(node).getAttribute('role') === 'button';\n setOrRemove(node, 'aria-pressed', checked, checked === undefined || !pressed);\n setOrRemove(node, 'aria-checked', checked, checked === undefined || pressed);\n}\n\n/**\n * An aria state `ViewBase` puts back on the node for a native stylesheet, where nothing else\n * carries it. Here the accessibility state, or for `aria-hidden` the hidden props, already writes\n * the real attribute whenever the input is set, so the copy defers to it rather than fight it:\n * `aria-checked` beside the `aria-pressed` a button takes, or `aria-disabled` removed while a\n * disabled pressable still is. With nothing behind it, a raw `[attr.aria-*]` is written as before,\n * and written again once whatever governed it lets go, since that removed the attribute.\n */\nfunction publishedAria(attr: string): Handler {\n return (node, value, clear) => {\n if (!PUBLISHED_ARIA[attr]!(node.props)) setOrRemove(node, attr, value, clear);\n };\n}\n\n/** Writes each raw published attribute in `attrs` that nothing governs any more. */\nfunction restorePublishedAria(node: BrowserNode, attrs: readonly string[]): void {\n for (const attr of attrs) {\n const value = node.props[attr];\n if (value !== undefined && value !== null && !PUBLISHED_ARIA[attr]!(node.props)) {\n el(node).setAttribute(attr, String(value));\n }\n }\n}\n\nfunction inState(key: string): (props: Record<string, unknown>) => boolean {\n return (props) =>\n (props['accessibilityState'] as Record<string, unknown> | undefined)?.[key] !== undefined;\n}\n\n/** Each published aria attribute, and whether something else is writing it at the moment. */\nconst PUBLISHED_ARIA: Readonly<Record<string, (props: Record<string, unknown>) => boolean>> = {\n 'aria-busy': inState('busy'),\n 'aria-checked': inState('checked'),\n 'aria-disabled': inState('disabled'),\n 'aria-expanded': inState('expanded'),\n 'aria-selected': inState('selected'),\n 'aria-hidden': (props) =>\n props['accessibilityElementsHidden'] !== undefined ||\n props['importantForAccessibility'] !== undefined,\n};\n\nconst STATE_ARIA = ['aria-busy', 'aria-checked', 'aria-disabled', 'aria-expanded', 'aria-selected'];\n\nfunction applyAccessibilityValue(node: BrowserNode, value: unknown, clear: boolean): void {\n const v = clear ? undefined : (value as Record<string, unknown> | undefined);\n setOrRemove(node, 'aria-valuemin', v?.['min'], v?.['min'] === undefined);\n setOrRemove(node, 'aria-valuemax', v?.['max'], v?.['max'] === undefined);\n setOrRemove(node, 'aria-valuenow', v?.['now'], v?.['now'] === undefined);\n setOrRemove(node, 'aria-valuetext', v?.['text'], v?.['text'] === undefined);\n}\n\nfunction joinIfArray(value: unknown): unknown {\n return Array.isArray(value) ? value.join(' ') : value;\n}\n\ntype Handler = (node: BrowserNode, value: unknown, clear: boolean) => void;\n\n/** For a prop that genuinely has nothing to do on the web; see the file doc comment. */\nconst noop: Handler = () => {};\n\n/** The keys the last whole `style` object wrote, so the next one can remove what it leaves out. */\nconst writtenStyles = new WeakMap<BrowserNode, Set<string>>();\n\n/**\n * A static `style=\"flex: 1; margin-top: 4px\"`, which Angular writes whole through `setAttribute`,\n * as the object it declares. Parsed by a scratch declaration rather than split on `;` and `:`,\n * because on the web a value can hold both: `url(data:image/png;base64,...)`.\n */\nfunction declarations(node: BrowserNode, css: string): Record<string, string> {\n const scratch = el(node).ownerDocument.createElement('div').style;\n scratch.cssText = css;\n const out: Record<string, string> = {};\n for (const name of Array.from(scratch)) out[name] = scratch.getPropertyValue(name);\n return out;\n}\n\n/**\n * A whole style object as the `style` prop: what `[animatedStyle]` writes each frame. Angular's\n * own `[style]` bindings arrive one key at a time through the renderer's `setStyle` instead, and\n * a static `style` attribute arrives here too, as a string.\n */\nfunction applyStyleObject(node: BrowserNode, value: unknown, clear: boolean): void {\n const style = (el(node) as HTMLElement).style;\n const next = new Set<string>();\n // Kept as the object too, so a later `setStyle` mirrors into declarations rather than a string.\n if (typeof value === 'string') value = node.props['style'] = declarations(node, value);\n if (!clear && typeof value === 'object') {\n const keyed: Record<string, unknown> = {};\n for (const [name, v] of Object.entries(value as Record<string, unknown>)) {\n if (v !== null && v !== undefined) keyed[dashCase(name)] = v;\n }\n for (const key of Object.keys(keyed)) {\n for (const written of writeStyleKey(style, key, keyed)) next.add(written);\n }\n }\n for (const key of writtenStyles.get(node) ?? []) if (!next.has(key)) style.removeProperty(key);\n writtenStyles.set(node, next);\n}\n\n/** `ViewBase`'s own props: identical meaning on every element, whatever it committed as. */\nconst VIEW_BASE_HANDLERS: Record<string, Handler> = {\n style: applyStyleObject,\n accessibilityLabel: (n, v, c) => setOrRemove(n, 'aria-label', v, c),\n accessibilityHint: (n, v, c) => setOrRemove(n, 'aria-description', v, c),\n accessibilityLabelledBy: (n, v, c) => setOrRemove(n, 'aria-labelledby', joinIfArray(v), c),\n // What the desktop host reads, which the web has an attribute for each of.\n accessibilityLevel: (n, v, c) => setOrRemove(n, 'aria-level', v, c),\n accessibilityDescribedBy: (n, v, c) => setOrRemove(n, 'aria-describedby', joinIfArray(v), c),\n accessibilityRequired: (n, v, c) => setOrRemove(n, 'aria-required', v, c),\n accessibilityInvalid: (n, v, c) => setOrRemove(n, 'aria-invalid', v, c),\n accessibilityPosInSet: (n, v, c) => setOrRemove(n, 'aria-posinset', v, c),\n accessibilitySetSize: (n, v, c) => setOrRemove(n, 'aria-setsize', v, c),\n accessibilityRowCount: (n, v, c) => setOrRemove(n, 'aria-rowcount', v, c),\n accessibilityColumnCount: (n, v, c) => setOrRemove(n, 'aria-colcount', v, c),\n accessibilityRole: applyRole,\n role: applyRole,\n accessibilityState: applyAccessibilityState,\n accessibilityValue: applyAccessibilityValue,\n ...Object.fromEntries(Object.keys(PUBLISHED_ARIA).map((attr) => [attr, publishedAria(attr)])),\n accessibilityLiveRegion: (n, v, c) => setOrRemove(n, 'aria-live', v === 'none' ? 'off' : v, c),\n accessibilityElementsHidden: (n, v, c) => {\n setOrRemove(n, 'aria-hidden', v, c || v !== true);\n restorePublishedAria(n, ['aria-hidden']);\n },\n // `no` and `no-hide-descendants` both hide the subtree on the web: ARIA has no way to hide a\n // node from the accessibility tree while keeping its descendants individually reachable, which\n // is the one place `no` and `no-hide-descendants` differ on Android.\n importantForAccessibility: (n, v, c) => {\n const hide = v === 'no' || v === 'no-hide-descendants';\n setOrRemove(n, 'aria-hidden', true, c || !hide);\n restorePublishedAria(n, ['aria-hidden']);\n },\n accessibilityViewIsModal: (n, v, c) => setOrRemove(n, 'aria-modal', v, c || v !== true),\n accessibilityLanguage: (n, v, c) => setOrRemove(n, 'lang', v, c),\n nativeID: (n, v, c) => setOrRemove(n, 'id', v, c),\n id: (n, v, c) => setOrRemove(n, 'id', v, c),\n testID: (n, v, c) => setOrRemove(n, 'data-testid', v, c),\n focusable: (n, v, c) => setOrRemove(n, 'tabindex', v ? '0' : '-1', c),\n pointerEvents: (n, v, c) => {\n // `none` and `auto` map onto the CSS property directly. `box-none` and `box-only` have no\n // exact CSS equivalent - native's version lets a *box* opt out of hit-testing while every\n // descendant keeps receiving touches regardless of its own props; CSS `pointer-events` only\n // has inheritance, which an explicit `auto` on a descendant can override but a plain,\n // untouched descendant cannot escape. Approximated rather than left as a no-op: `box-none`\n // sets `none` on the node itself, `box-only` sets `auto`, which is the more useful default in\n // both directions: a full-window layer that is `box-none` lets touches through to the app\n // under it, and a card inside that sets its own `pointerEvents: 'auto'` opts back in, which\n // is precisely CSS's override rule and needs no web-specific code of its own to work.\n //\n // What this does not do: it does not make an *untouched* descendant of a `box-none` node\n // clickable the way native does automatically - a component that never had to say\n // `pointerEvents=\"auto\"` on native because `box-none` only ever excluded the box itself will\n // need to say so here too. `overlay-host`'s own content is the only place this project has\n // exercised the gap.\n if (v === 'none' || v === 'box-none') setStyleProp(n, 'pointer-events', 'none', c);\n else if (v === 'auto' || v === 'box-only') setStyleProp(n, 'pointer-events', 'auto', c);\n else setStyleProp(n, 'pointer-events', '', true);\n },\n // Object/array props with no scalar form the generic fallback could write, and iOS-only\n // accessibility surfaces with no ARIA equivalent at all. See the file doc comment's second\n // section for why these are named rather than left to fall through.\n hitSlop: noop,\n accessibilityActions: noop,\n nativeBackgroundAndroid: noop,\n nativeForegroundAndroid: noop,\n accessibilityIgnoresInvertColors: noop,\n accessibilityLargeContentTitle: noop,\n accessibilityShowsLargeContentViewer: noop,\n accessibilityRespondsToUserInteraction: noop,\n // Read off `node.props` when an interaction is reported, as on a device, and kept off the\n // element so a name an app gives its reports is not in the page's markup.\n [INTERACTION_NAME]: noop,\n};\n\n/**\n * A one-line field's `type`: a password while `secureTextEntry` is on, `tel` for a phone keyboard,\n * and `text` otherwise. The other keyboards stay `inputmode` only, which is what picks the\n * on-screen keyboard. In Chromium, `type=\"email\"` throws from `setSelectionRange`, reads null for\n * `selectionStart`, trims the value the app set, and hides the spaces the user types from its\n * value, so `changeText` would report something other than what is on screen. `type=\"url\"` trims\n * the value the app set. `type=\"number\"` has no selection API, and `type=\"search\"` draws a clear\n * button of its own and empties itself on Escape.\n */\nfunction setInputType(n: BrowserNode): void {\n const field = el(n);\n if (field.tagName !== 'INPUT') return;\n const secure = n.props['secureTextEntry'] === true;\n const phone = n.props['keyboardType'] === 'phone-pad';\n (field as HTMLInputElement).type = secure ? 'password' : phone ? 'tel' : 'text';\n}\n\n/** `text-input.ts`'s own props, applied to the `<input>` or `<textarea>` it commits as. */\nconst TEXT_INPUT_HANDLERS: Record<string, Handler> = {\n text: (n, v, c) => {\n const textarea = el(n) as HTMLInputElement | HTMLTextAreaElement;\n const next = c ? '' : String(v);\n // Only when it actually differs: the caret and scroll position reset on every write, even\n // one that sets the value to what it already was, and `TextInput`'s own echo write does\n // exactly that on every keystroke unless this guard is here.\n if (textarea.value !== next) textarea.value = next;\n },\n placeholder: (n, v, c) => setOrRemove(n, 'placeholder', v, c),\n // No inline way to style a pseudo-element, so the colour travels as a custom property and\n // `reset.css` reads it back with `::placeholder`.\n placeholderTextColor: (n, v, c) => setStyleProp(n, '--rn-placeholder-color', v, c),\n keyboardType: (n, v, c) => {\n const map: Record<string, string> = {\n numeric: 'numeric',\n 'number-pad': 'numeric',\n 'decimal-pad': 'decimal',\n 'email-address': 'email',\n 'phone-pad': 'tel',\n url: 'url',\n 'web-search': 'search',\n };\n const mode = typeof v === 'string' ? map[v] : undefined;\n setOrRemove(n, 'inputmode', mode, c || mode === undefined);\n setInputType(n);\n },\n returnKeyType: (n, v, c) => {\n const known = new Set(['done', 'go', 'next', 'search', 'send', 'previous']);\n const hint = typeof v === 'string' && known.has(v) ? v : undefined;\n setOrRemove(n, 'enterkeyhint', hint, c || hint === undefined);\n },\n // A password field where there can be one. A textarea has no password type, so a multiline\n // field masks with the non-standard property, which Firefox does not have.\n secureTextEntry: (n, v, c) => {\n if (el(n).tagName === 'INPUT') setInputType(n);\n else setStyleProp(n, '-webkit-text-security', v ? 'disc' : '', c || !v);\n },\n autoCapitalize: (n, v, c) => setOrRemove(n, 'autocapitalize', v === 'none' ? 'off' : v, c),\n autoCorrect: (n, v, c) => setOrRemove(n, 'autocorrect', v ? 'on' : 'off', c),\n autoFocus: (n, v, c) => {\n if (!c && v) (el(n) as HTMLElement).focus();\n },\n maxLength: (n, v, c) => setOrRemove(n, 'maxlength', v, c),\n multiline: (n, v, c) => setOrRemove(n, 'data-multiline', '', c || v !== true),\n numberOfLines: (n, v, c) => setOrRemove(n, 'rows', v, c || n.props['multiline'] !== true),\n editable: (n, v, c) => {\n (el(n) as HTMLTextAreaElement).readOnly = !c && v === false;\n },\n selection: (n, v, c) => {\n if (c) return;\n const range = v as { start: number; end?: number };\n (el(n) as HTMLTextAreaElement).setSelectionRange(range.start, range.end ?? range.start);\n },\n selectTextOnFocus: (n, v, c) => setOrRemove(n, 'data-select-on-focus', '', c || v !== true),\n textAlign: (n, v, c) => setStyleProp(n, 'text-align', v, c),\n spellCheck: (n, v, c) => setOrRemove(n, 'spellcheck', v ? 'true' : 'false', c),\n autoComplete: (n, v, c) => setOrRemove(n, 'autocomplete', v, c),\n};\n\n/** `switch.ts`'s own props, applied to the `<input type=\"checkbox\">` `elements.ts` creates. */\nconst SWITCH_HANDLERS: Record<string, Handler> = {\n on: (n, v, c) => {\n (el(n) as HTMLInputElement).checked = !c && v === true;\n },\n value: (n, v, c) => {\n (el(n) as HTMLInputElement).checked = !c && v === true;\n },\n disabled: (n, v, c) => {\n (el(n) as HTMLInputElement).disabled = !c && v === true;\n },\n};\n\n/** How an `<img>` fits a picture for each resizeMode, as `background-size` does below. */\nconst FIT: Record<string, string> = { cover: 'cover', contain: 'contain', stretch: 'fill' };\nconst MODES = new WeakMap<object, string | undefined>();\n/** The `<img>` each image paints with, where its source names a referrer policy. */\nconst PICTURES = new WeakMap<object, HTMLImageElement>();\n\n/**\n * A source's `Referrer-Policy`, which `image.ts` gives as a header as React Native does. A\n * background is fetched with the page's policy whatever this says, so a source with one is\n * painted with an `<img>` that sends what it asks for instead.\n */\nfunction referrerPolicyOf(value: unknown): string | undefined {\n const source = Array.isArray(value) ? value[0] : value;\n const headers = (source as { headers?: Record<string, unknown> } | null)?.headers;\n const policy = headers?.['Referrer-Policy'];\n return typeof policy === 'string' && policy ? policy : undefined;\n}\n\nfunction paintWithImg(n: BrowserNode, uri: string | undefined, policy: string | undefined): void {\n let img = PICTURES.get(n);\n if (!uri || !policy) {\n img?.remove();\n PICTURES.delete(n);\n return;\n }\n if (!img) {\n img = el(n).ownerDocument.createElement('img');\n img.alt = '';\n img.setAttribute('aria-hidden', 'true');\n img.style.cssText =\n 'position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;pointer-events:none';\n el(n).appendChild(img);\n PICTURES.set(n, img);\n }\n img.style.objectFit = FIT[MODES.get(n) ?? 'cover'] ?? 'none';\n // Before the src, which starts the fetch.\n img.referrerPolicy = policy;\n img.src = uri;\n}\n\n/** `image.ts`'s own props. `image` paints with `background-image`; see `elements.ts`. */\nconst IMAGE_HANDLERS: Record<string, Handler> = {\n source: (n, v, c) => {\n const uri = sourceUri(c ? undefined : v);\n const policy = c ? undefined : referrerPolicyOf(v);\n const background = uri && !policy ? `url(\"${cssEscape(uri)}\")` : '';\n setStyleProp(n, 'background-image', background, !background);\n paintWithImg(n, uri, policy);\n if (uri) watchImageLoad(n, uri, policy);\n },\n resizeMode: (n, v, c) => {\n const size: Record<string, string> = {\n cover: 'cover',\n contain: 'contain',\n stretch: '100% 100%',\n };\n const mode = typeof v === 'string' ? v : undefined;\n MODES.set(n, c ? undefined : mode);\n const img = PICTURES.get(n);\n if (img) img.style.objectFit = FIT[mode ?? 'cover'] ?? 'none';\n setStyleProp(n, 'background-size', mode ? (size[mode] ?? 'auto') : '', c || !mode);\n setStyleProp(n, 'background-repeat', mode === 'repeat' ? 'repeat' : 'no-repeat', c);\n setStyleProp(n, 'background-position', 'center', c);\n },\n blurRadius: (n, v, c) =>\n setStyleProp(n, 'filter', typeof v === 'number' ? `blur(${v}px)` : '', c),\n /**\n * The picture's own size, which on native is a default the cascade can override. Written as\n * custom properties that `reset.css` reads at the weakest specificity there is, since an inline\n * `width` would beat the app's own classes here exactly as it would on a device.\n */\n intrinsicSize: (n, v, c) => {\n const size = c ? undefined : (v as { width?: unknown; height?: unknown } | undefined);\n const px = (value: unknown) => (typeof value === 'number' ? `${value}px` : '');\n setStyleProp(n, '--rn-intrinsic-width', px(size?.width), !px(size?.width));\n setStyleProp(n, '--rn-intrinsic-height', px(size?.height), !px(size?.height));\n },\n};\n\n/**\n * Says whether a `background-image` loaded, which the property itself will not.\n *\n * An `<image>` paints with `background-image` here (see `elements.ts` for why), and a background\n * fires no `load` or `error` event - only a real `<img>` does. React Native's `Image` reports\n * both, and things depend on it: an avatar-style component that swaps to a fallback when the\n * image errors needs exactly this signal. Without it a broken image URL sat blank forever,\n * showing neither a picture nor a fallback.\n *\n * A detached `Image()` is the standard way to ask. It shares the browser's cache with the\n * background the element is already painting, so this costs a cache lookup rather than a second\n * download.\n *\n * The answer is dispatched as an ordinary DOM event on the element itself, rather than pushed\n * through the engine, so it reaches `(load)` and `(error)` by the same path every other plain\n * binding takes. That is also why `topLoad` and `topError` are not in `browser-engine.ts`'s\n * reserved set: there is a real DOM event of each name here, and it is this one.\n *\n * The uri is remembered so a source that changes mid-flight cannot have its old answer arrive\n * late and overwrite the new one, which is the stale-response guard any fetch needs.\n */\nconst IMAGE_LOADS = new WeakMap<object, string>();\n\nfunction watchImageLoad(node: BrowserNode, uri: string, policy?: string): void {\n IMAGE_LOADS.set(node, uri);\n const el = node.el as Element;\n const view = el.ownerDocument.defaultView;\n if (!view) return;\n const probe = new view.Image();\n const settle = (type: 'load' | 'error') => () => {\n if (IMAGE_LOADS.get(node) === uri) el.dispatchEvent(new view.Event(type));\n };\n probe.addEventListener('load', settle('load'));\n probe.addEventListener('error', settle('error'));\n if (policy) probe.referrerPolicy = policy;\n probe.src = uri;\n}\n\nfunction sourceUri(value: unknown): string | undefined {\n if (!value) return undefined;\n if (typeof value === 'object' && 'uri' in (value as object)) {\n return (value as { uri?: string }).uri;\n }\n if (Array.isArray(value) && value.length > 0) return sourceUri(value[0]);\n return undefined;\n}\n\nfunction cssEscape(value: string): string {\n return value.replace(/[\"\\\\]/g, (c) => `\\\\${c}`);\n}\n\n/**\n * `safe-area-view.ts`'s `edges`/`mode`. Applied on either changing, from both current values,\n * because native takes all four edges together and this follows the same rule (see that file's\n * own `resolvedEdges` comment).\n *\n * `env(safe-area-inset-*)` is the real CSS mechanism for this - a phone with a notch reports a\n * non-zero inset through it, the same number `react-native-safe-area-context` reads on iOS. What\n * is not reproduced: `additive` mode is documented as adding the inset to whatever padding a\n * caller's own class already put there, and there is no way to read that back out of a\n * stylesheet this engine cannot inspect - so `additive` and `maximum` both resolve to `env()`\n * alone here, which is `maximum` against a base of zero. A caller relying on `additive` stacking\n * with its own padding will see less padding on the web than on native.\n */\nconst EDGE_PROP: Record<string, string> = {\n top: 'top',\n right: 'right',\n bottom: 'bottom',\n left: 'left',\n};\n\nfunction applySafeAreaInsets(node: BrowserNode): void {\n const edges = node.props['edges'] as Record<string, string> | undefined;\n const mode = (node.props['mode'] as string | undefined) ?? 'padding';\n const family = mode === 'margin' ? 'margin' : 'padding';\n // The family not in use is cleared too, or switching mode left the old insets behind.\n const other = family === 'margin' ? 'padding' : 'margin';\n for (const edge of Object.keys(EDGE_PROP)) {\n const edgeMode = edges?.[edge];\n const prop = `${family}-${EDGE_PROP[edge]}`;\n setStyleProp(node, `${other}-${EDGE_PROP[edge]}`, '', true);\n if (!edgeMode || edgeMode === 'off') setStyleProp(node, prop, '', true);\n else setStyleProp(node, prop, `env(safe-area-inset-${edge})`, false);\n }\n}\n\nconst SAFE_AREA_HANDLERS: Record<string, Handler> = {\n edges: (n) => applySafeAreaInsets(n),\n mode: (n) => applySafeAreaInsets(n),\n};\n\n/**\n * `modal.ts`'s own props. `visible` defaults to `true` there specifically so a mounted-but-hidden\n * host does not swallow touches over nothing (see that file's doc comment); on the web the same\n * concern is a `hidden` attribute, which `reset.css` gives higher specificity than the layout\n * reset's `display: flex` so it actually hides rather than being immediately overridden by it.\n */\nconst MODAL_HANDLERS: Record<string, Handler> = {\n visible: (n, v, c) => setOrRemove(n, 'hidden', '', c || v !== false),\n transparent: (n, v, c) => setStyleProp(n, 'background-color', 'transparent', c || v !== true),\n};\n\n/**\n * `packages/icons/src/svg-props.ts`'s translation, read back the other way.\n *\n * `fill`/`stroke` arrive as a *brush*, not a colour string: `null` for \"paint nothing\", a real\n * `{type: 0, payload}` object for an actual colour (`payload` already run through\n * `BrowserEngine.color`, which passes a normal CSS colour string straight through), `{type: 2}`\n * for `currentColor`, `{type: 1, brushRef}` for a gradient reference. `strokeLinecap`/\n * `strokeLinejoin`/`fillRule`/`clipRule` arrive as the integers `svg-props.ts` encodes SVG's\n * keywords as - native prop values, not the strings a `<svg-path stroke-linecap=\"round\">` was\n * written with - so the tables below are `svg-props.ts`'s own `LINECAP`/`LINEJOIN`/`FILL_RULE`\n * read backwards. `strokeDasharray` arrives as a string array, already split on commas/whitespace\n * rather than the original string; `matrix` as the six numbers of a 2x3 matrix rather than the\n * `transform` string they came from. All are reconstructed here into the attribute form a browser\n * wants.\n *\n * `propList` gets nothing: it is native prop names this element declared for itself, so that\n * *its* `RNSVGGroup`/`RNSVGPath` inherits nothing it did not ask to inherit - a fake for\n * inheritance real SVG attributes already do on their own, which is the entire reason\n * `svg-props.ts` had to invent it.\n *\n * Geometry (`d`, `cx`, `cy`, `r`, `rx`, `ry`, `x`, `y`, `width`, `height`, `x1`, `y1`, `x2`, `y2`)\n * gets no handler either, on purpose: those prop names are already the SVG attribute names,\n * untouched by `nativeProps`, so `applyProp`'s generic string/number fallback at the bottom of\n * this file writes them correctly with nothing said here.\n */\nfunction brushAttr(value: unknown): string | undefined {\n const brush = value as { type: number; payload?: unknown; brushRef?: string };\n if (brush.type === 2) return 'currentColor';\n if (brush.type === 1) return `url(#${brush.brushRef})`;\n if (brush.type === 0) return typeof brush.payload === 'string' ? brush.payload : undefined;\n return undefined;\n}\n\n/**\n * `fill`/`stroke`. Reads `value` itself rather than the `clear` flag `applyProp` would otherwise\n * pass every other handler, because `clear` alone cannot tell apart the two things a cleared\n * brush prop means: `undefined` (\"never declared - inherit from the ancestor group, same as real\n * SVG's own cascade\") and the brush `null` (\"declared as `none` - paint nothing, even if an\n * ancestor would otherwise supply a paint\"). Only the second needs an attribute written at all.\n * `dom-node.ts`'s `SVG_BRUSH_ELEMENTS` seeding is what makes sure this handler is even reached for\n * a shape's first `fill=\"none\"`/`stroke=\"none\"` - see that file's own doc comment for why a\n * `null` brush needs help getting here in the first place.\n */\nfunction applyBrush(node: BrowserNode, attr: string, value: unknown): void {\n if (value === undefined) {\n el(node).removeAttribute(attr);\n return;\n }\n if (value === null) {\n el(node).setAttribute(attr, 'none');\n return;\n }\n const resolved = brushAttr(value);\n if (resolved === undefined) el(node).removeAttribute(attr);\n else el(node).setAttribute(attr, resolved);\n}\n\nconst LINECAP_KEYWORD: Record<number, string> = { 0: 'butt', 1: 'round', 2: 'square' };\nconst LINEJOIN_KEYWORD: Record<number, string> = { 0: 'miter', 1: 'round', 2: 'bevel' };\nconst FILL_RULE_KEYWORD: Record<number, string> = { 0: 'evenodd', 1: 'nonzero' };\n\nfunction applyKeyword(\n node: BrowserNode,\n attr: string,\n map: Readonly<Record<number, string>>,\n value: unknown,\n clear: boolean,\n): void {\n const resolved = typeof value === 'number' ? map[value] : undefined;\n setOrRemove(node, attr, resolved, clear || resolved === undefined);\n}\n\n/**\n * Every shape `ng-icon.ts` parses out of an icon's markup - `svg-path`, `svg-rect`, `svg-circle`,\n * `svg-line`, plus `svg-g` and `svg-ellipse` - shares this one set of presentation props, the\n * same names `svg-props.ts`'s own `PRESENTATION` table lists.\n */\nconst SVG_PRESENTATION_HANDLERS: Record<string, Handler> = {\n fill: (n, v) => applyBrush(n, 'fill', v),\n stroke: (n, v) => applyBrush(n, 'stroke', v),\n fillOpacity: (n, v, c) => setOrRemove(n, 'fill-opacity', v, c),\n strokeOpacity: (n, v, c) => setOrRemove(n, 'stroke-opacity', v, c),\n strokeWidth: (n, v, c) => setOrRemove(n, 'stroke-width', v, c),\n strokeLinecap: (n, v, c) => applyKeyword(n, 'stroke-linecap', LINECAP_KEYWORD, v, c),\n strokeLinejoin: (n, v, c) => applyKeyword(n, 'stroke-linejoin', LINEJOIN_KEYWORD, v, c),\n fillRule: (n, v, c) => applyKeyword(n, 'fill-rule', FILL_RULE_KEYWORD, v, c),\n clipRule: (n, v, c) => applyKeyword(n, 'clip-rule', FILL_RULE_KEYWORD, v, c),\n strokeDasharray: (n, v, c) => {\n const joined = Array.isArray(v) ? v.join(',') : undefined;\n setOrRemove(n, 'stroke-dasharray', joined, c || joined === undefined);\n },\n strokeDashoffset: (n, v, c) => setOrRemove(n, 'stroke-dashoffset', v, c),\n strokeMiterlimit: (n, v, c) => setOrRemove(n, 'stroke-miterlimit', v, c),\n opacity: (n, v, c) => setOrRemove(n, 'opacity', v, c),\n matrix: (n, v, c) => {\n const matrix = Array.isArray(v) ? `matrix(${v.join(',')})` : undefined;\n setOrRemove(n, 'transform', matrix, c || matrix === undefined);\n },\n propList: noop,\n};\n\n/**\n * A gradient, read back from `svg-props.ts`'s `gradientProps`. Its stops arrive as one flat list,\n * `[offset, colour, offset, colour]`, which is how native takes them, and a browser wants them as\n * `<stop>` children. Its `name` is the `id` a `url(#id)` brush finds it by, and a radial one's\n * two radii are the one `r` it was written with.\n */\nconst SVG_GRADIENT_HANDLERS: Record<string, Handler> = {\n name: (n, v, c) => setOrRemove(n, 'id', v, c),\n gradient: (n, v) => {\n const list = Array.isArray(v) ? v : [];\n const stops: Element[] = [];\n for (let i = 0; i + 1 < list.length; i += 2) {\n const stop = el(n).ownerDocument.createElementNS(el(n).namespaceURI, 'stop');\n stop.setAttribute('offset', String(list[i]));\n stop.setAttribute('stop-color', String(list[i + 1]));\n stops.push(stop);\n }\n el(n).replaceChildren(...stops);\n },\n gradientUnits: (n, v, c) =>\n setOrRemove(n, 'gradientUnits', v === 1 ? 'userSpaceOnUse' : 'objectBoundingBox', c),\n gradientTransform: (n, v, c) => {\n const matrix = Array.isArray(v) ? `matrix(${v.join(',')})` : undefined;\n setOrRemove(n, 'gradientTransform', matrix, c || matrix === undefined);\n },\n rx: (n, v, c) => setOrRemove(n, 'r', v, c),\n ry: noop,\n};\n\n/** The attributes `svg-props.ts`'s `textProps` gathers into the one `font` object native reads. */\nconst FONT_ATTRIBUTES = [\n 'font-size',\n 'font-weight',\n 'font-style',\n 'font-family',\n 'font-variant',\n 'font-stretch',\n 'text-anchor',\n 'text-decoration',\n 'letter-spacing',\n 'word-spacing',\n 'kerning',\n];\n\nconst camelCase = (name: string): string =>\n name.replace(/-([a-z])/g, (_, letter: string) => letter.toUpperCase());\n\n/** A position list, `x: ['0', '9']`, as the attribute it was written as. An empty one is none. */\nconst lengthList =\n (attr: string): Handler =>\n (n, v) => {\n const list = Array.isArray(v) ? v : [];\n setOrRemove(n, attr, list.join(' '), list.length === 0);\n };\n\n/** A `text` or a `tspan`: a shape's paint, with its font, its positions and its characters. */\nconst SVG_TEXT_HANDLERS: Record<string, Handler> = {\n ...SVG_PRESENTATION_HANDLERS,\n font: (n, v) => {\n const font = (v ?? {}) as Record<string, unknown>;\n for (const attr of FONT_ATTRIBUTES) {\n const value = font[camelCase(attr)];\n setOrRemove(n, attr, value, value === undefined || value === null);\n }\n },\n x: lengthList('x'),\n y: lengthList('y'),\n dx: lengthList('dx'),\n dy: lengthList('dy'),\n rotate: lengthList('rotate'),\n content: (n, v, c) => {\n el(n).textContent = c ? '' : String(v);\n },\n};\n\n/**\n * The SVG root's own sizing props - `ng-icon.ts`'s host bindings, none of which go through\n * `svg-props.ts`'s `nativeProps` (they are written directly, not parsed off markup).\n * `minX`/`minY`/`vbWidth`/`vbHeight` build one `viewBox` attribute together, and\n * `align`/`meetOrSlice` build one `preserveAspectRatio` together, so each handler rereads every\n * prop in its group off `node.props` rather than trusting the single value it was called with -\n * the same pattern `applySafeAreaInsets` above uses for `edges`/`mode`, needed for the same\n * reason: Angular commits host bindings one at a time, so whichever of a group changes first would\n * otherwise write an attribute built from the rest still being stale (`undefined`, before their\n * own first commit) or from a previous render's values.\n */\nfunction applySvgViewBox(node: BrowserNode): void {\n const minX = node.props['minX'];\n const minY = node.props['minY'];\n const vbWidth = node.props['vbWidth'];\n const vbHeight = node.props['vbHeight'];\n const complete =\n typeof minX === 'number' &&\n typeof minY === 'number' &&\n typeof vbWidth === 'number' &&\n typeof vbHeight === 'number';\n setOrRemove(\n node,\n 'viewBox',\n complete ? `${minX} ${minY} ${vbWidth} ${vbHeight}` : undefined,\n !complete,\n );\n}\n\n/**\n * `bbWidth`/`bbHeight` are the root's own rendered size in points - `NgIcon`'s `size()` input -\n * kept as real `width`/`height` attributes alongside the `[style]` host binding that sizes the\n * box for layout, so an inspector reading the SVG element in isolation sees the same size CSS is\n * about to give it.\n */\nfunction applySvgSize(node: BrowserNode): void {\n const bbWidth = node.props['bbWidth'];\n const bbHeight = node.props['bbHeight'];\n setOrRemove(node, 'width', bbWidth, typeof bbWidth !== 'number');\n setOrRemove(node, 'height', bbHeight, typeof bbHeight !== 'number');\n}\n\n/**\n * `0`/`1`/`2` are `RNSVGSvgView`'s own encoding of `meet`/`slice`/`none` - see `svg-props.ts`'s\n * `viewBoxProps`, which always sends `0` for both roots today. `slice`/`none` are translated on\n * the chance a future caller sets one directly, not because either root emits them yet; that\n * would be a divergence worth noting if it ever mattered, but nothing in this codebase exercises\n * it.\n */\nconst MEET_OR_SLICE: Record<number, string> = { 0: 'meet', 1: 'slice', 2: 'none' };\n\nfunction applySvgAspectRatio(node: BrowserNode): void {\n const align = node.props['align'];\n const meetOrSlice = node.props['meetOrSlice'];\n if (typeof align !== 'string') {\n el(node).removeAttribute('preserveAspectRatio');\n return;\n }\n const slice = typeof meetOrSlice === 'number' ? (MEET_OR_SLICE[meetOrSlice] ?? 'meet') : 'meet';\n el(node).setAttribute('preserveAspectRatio', `${align} ${slice}`);\n}\n\nconst SVG_ROOT_HANDLERS: Record<string, Handler> = {\n minX: (n) => applySvgViewBox(n),\n minY: (n) => applySvgViewBox(n),\n vbWidth: (n) => applySvgViewBox(n),\n vbHeight: (n) => applySvgViewBox(n),\n bbWidth: (n) => applySvgSize(n),\n bbHeight: (n) => applySvgSize(n),\n align: (n) => applySvgAspectRatio(n),\n meetOrSlice: (n) => applySvgAspectRatio(n),\n // `NgIcon`'s own `[color]` host binding - what a shape's `currentColor` brush (`brushAttr`'s\n // `{type: 2}` case, written as the literal attribute value `currentColor`) resolves against.\n // Real SVG's `currentColor` already means \"this element's computed CSS `color`\", so setting it\n // here as an inline style *is* the whole translation - no downstream shape needs to know the\n // actual value, exactly as native's brush stays unresolved until the view paints.\n color: (n, v, c) => setStyleProp(n, 'color', v, c || typeof v !== 'string'),\n};\n\n/**\n * `activity-indicator.ts`'s colour, as the `color` its spinner in `reset.css` paints with. The\n * spinner is drawn by the stylesheet, and `animating` and `hidesWhenStopped` reach it as the\n * plain attributes the fallback writes.\n */\nconst ACTIVITY_INDICATOR_HANDLERS: Record<string, Handler> = {\n color: (n, v, c) => setStyleProp(n, 'color', v, c || typeof v !== 'string'),\n};\n\n/**\n * `text.ts`'s `numberOfLines`, as the attribute and the line count `reset.css` clamps the text\n * with. Neither is written for `0`, which is no limit on a device, as it is when the prop is unset.\n */\nconst TEXT_HANDLERS: Record<string, Handler> = {\n numberOfLines: (n, v, c) => {\n const lines = typeof v === 'number' && v > 0 ? v : undefined;\n setOrRemove(n, 'numberoflines', lines, c || lines === undefined);\n setStyleProp(n, '--rn-number-of-lines', lines, c || lines === undefined);\n },\n};\n\nconst BY_ELEMENT: Record<string, Record<string, Handler>> = {\n text: TEXT_HANDLERS,\n 'activity-indicator': ACTIVITY_INDICATOR_HANDLERS,\n 'text-input': TEXT_INPUT_HANDLERS,\n switch: SWITCH_HANDLERS,\n image: IMAGE_HANDLERS,\n 'safe-area-view': SAFE_AREA_HANDLERS,\n modal: MODAL_HANDLERS,\n 'svg-g': SVG_PRESENTATION_HANDLERS,\n 'svg-path': SVG_PRESENTATION_HANDLERS,\n 'svg-circle': SVG_PRESENTATION_HANDLERS,\n 'svg-ellipse': SVG_PRESENTATION_HANDLERS,\n 'svg-rect': SVG_PRESENTATION_HANDLERS,\n 'svg-line': SVG_PRESENTATION_HANDLERS,\n 'svg-linear-gradient': SVG_GRADIENT_HANDLERS,\n 'svg-radial-gradient': SVG_GRADIENT_HANDLERS,\n 'svg-text': SVG_TEXT_HANDLERS,\n 'svg-tspan': SVG_TEXT_HANDLERS,\n 'ng-icon': SVG_ROOT_HANDLERS,\n};\n\n/**\n * Apply one prop to its node. `clear` is `value === undefined || value === null`.\n *\n * A key with a handler - either element-specific or from `ViewBase`'s own set - runs exactly\n * that translation. Everything else falls to the generic attribute write the file doc comment\n * describes, which is why a `noop` entry (`hitSlop`, `accessibilityActions`, ...) has to be a\n * real entry rather than an absent one: an absent key falls through and gets written as a raw\n * attribute, a `noop` key is claimed and genuinely does nothing.\n */\nexport function applyProp(node: BrowserNode, key: string, value: unknown, clear: boolean): void {\n const elementHandler = BY_ELEMENT[node.tag]?.[key];\n const baseHandler = VIEW_BASE_HANDLERS[key];\n if (elementHandler || baseHandler) {\n elementHandler?.(node, value, clear);\n baseHandler?.(node, value, clear);\n return;\n }\n if (clear) {\n el(node).removeAttribute(key);\n return;\n }\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n el(node).setAttribute(key, String(value));\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-native/web",
3
- "version": "0.22.1",
3
+ "version": "0.23.0",
4
4
  "description": "A browser host for Angular Native: the same components, rendered into the DOM instead of native views.",
5
5
  "keywords": [
6
6
  "angular",
@@ -35,8 +35,8 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@ng-native/device": "0.22.1",
39
- "@ng-native/fabric": "0.22.1",
38
+ "@ng-native/device": "0.23.0",
39
+ "@ng-native/fabric": "0.23.0",
40
40
  "@oxc-angular/vite": "0.0.41"
41
41
  },
42
42
  "peerDependencies": {
@@ -54,11 +54,11 @@
54
54
  "@angular/localize": "22.2.0",
55
55
  "@angular/platform-browser": "22.2.0",
56
56
  "@ng-icons/core": "^36.0.0",
57
- "@ng-native/components": "0.22.1",
58
- "@ng-native/icons": "0.22.1",
59
- "@ng-native/metro": "0.22.1",
60
- "@ng-native/tailwind": "0.22.1",
61
- "@ng-native/testing": "0.22.1",
57
+ "@ng-native/components": "0.23.0",
58
+ "@ng-native/icons": "0.23.0",
59
+ "@ng-native/metro": "0.23.0",
60
+ "@ng-native/tailwind": "0.23.0",
61
+ "@ng-native/testing": "0.23.0",
62
62
  "@tailwindcss/vite": "^4.3.3",
63
63
  "@types/jsdom": "^27.0.0",
64
64
  "@vitest/browser": "^5.0.2",