@ng-native/web 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-engine.d.ts +2 -0
- package/dist/browser-engine.js +32 -0
- package/dist/browser-engine.js.map +1 -1
- package/dist/browser-renderer.d.ts +1 -1
- package/dist/browser-renderer.js +2 -0
- package/dist/browser-renderer.js.map +1 -1
- package/dist/dom-node.d.ts +1 -0
- package/dist/dom-node.js +25 -0
- package/dist/dom-node.js.map +1 -1
- package/dist/mount.js +2 -1
- package/dist/mount.js.map +1 -1
- package/dist/props.js +12 -0
- package/dist/props.js.map +1 -1
- package/dist/reset-css.d.ts +1 -1
- package/dist/reset-css.js +26 -0
- package/dist/reset-css.js.map +1 -1
- package/dist/reset.css +46 -0
- package/package.json +10 -8
package/dist/mount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mount.js","sourceRoot":"","sources":["../src/mount.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,MAAM,EACN,yBAAyB,EAMzB,8BAA8B,IAAI,6BAA6B,EAC/D,eAAe,IAAI,cAAc,EACjC,uCAAuC,IAAI,sCAAsC,GAClF,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,sBAA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SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC,EACvE,YAAY,CAAC,GAAG,CAAC,mBAAmB,CAAC,CACtC,CAAC;IAEF,MAAM,YAAY,GAAG,eAAe,CAAC,SAAS,EAAE;QAC9C,mBAAmB,EAAE,QAAQ;QAC7B,eAAe,EAAE,YAAY;QAC7B,WAAW,EAAE,QAAQ;KACtB,CAAC,CAAC;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAEhC,4FAA4F;IAC5F,MAAM,cAAc,GAAG,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACxD,cAAc,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACjD,YAAY,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;IAE/C,OAAO;QACL,YAAY;QACZ,cAAc;QACd,GAAG,IAAI;QACP,OAAO,EAAE,GAAG,EAAE;YACZ,YAAY,CAAC,OAAO,EAAE,CAAC;YACvB,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnB,WAAW,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;YAC5C,IAAI,aAAa,KAAK,IAAI;gBAAE,WAAW,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;;gBACtE,WAAW,CAAC,YAAY,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;YAChE,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,YAAmC,EAAE,MAAyC;IAC/F,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACzF,CAAC","sourcesContent":["/**\n * Put an Angular application on a page.\n *\n * The browser counterpart to `@ng-native/platform`'s `mount()`, and named the same on\n * purpose: an app imports one or the other, never both, and which one it gets is the import path's\n * job to say rather than the identifier's. Reading the native one first is worth it - this follows\n * its shape and its documented distinction\n * between `ApplicationRef` and the root `ComponentRef` (`createComponent` resolves the latter;\n * `applicationRef.components` needs it pushed by hand, the same bookkeeping\n * `ApplicationRef.bootstrap()` would otherwise do, for the same reason - a routed app's initial\n * navigation checks `applicationRef.components[0]` before it will run at all).\n *\n * What is different from the native `mount()`, and why:\n *\n * - **The first argument is a real `Element`, not a numeric root tag.** Fabric addresses its root\n * by the tag React Native's host gave it; a browser page has no such number, only the element\n * an app mounts into (`document.getElementById('app-root')`, or one `document.body` itself).\n * - **No `FabricUIManager`, and no `Engine` provided under its own token.** Only `HostEngine` is\n * provided. `worklet-style`, `worklet-scroll` and `native-gesture`\n * `inject(Engine)` directly (see `packages/fabric/src/host.ts`'s doc comment for why that is\n * the honest place to draw the line) - on native `Engine` is provided under both tokens so both\n * paths resolve; here it is provided under neither, so an app that uses one of those three on\n * the web gets Angular's own `NullInjectorError` at the point it tries to inject `Engine`,\n * which names exactly what is unsupported rather than rendering something silently wrong.\n * - **`DOCUMENT` is the real `document`**, not the stub the native `mount()` builds for\n * `TransferState`'s\n * `getElementById`. A browser host already has one.\n * - **No dev-mode animation warning, no HMR reload hook.** The native check exists\n * because `@angular/core` reads whether `animate.enter`/`animate.leave` do anything from a\n * global a Metro polyfill has to set before `@angular/core` first evaluates; a real browser\n * already has `document.documentElement.getAnimations`, which is the same thing that global\n * stands in for on native, so there is nothing to warn about. The reload hook is Metro Fast\n * Refresh's fallback path specifically; a browser dev server has its own, unrelated story for\n * picking up an edit, so wiring `__angularNativeReload` here would install a hook nothing calls.\n */\nimport {\n APP_BOOTSTRAP_LISTENER,\n ApplicationRef,\n DOCUMENT,\n PLATFORM_ID,\n EnvironmentInjector,\n ErrorHandler,\n RendererFactory2,\n createComponent,\n effect,\n createEnvironmentInjector,\n type ComponentRef,\n type EnvironmentProviders,\n type Injector,\n type Provider,\n type Type,\n ɵcreateOrReusePlatformInjector as createOrReusePlatformInjector,\n ɵINJECTOR_SCOPE as INJECTOR_SCOPE,\n ɵprovideZonelessChangeDetectionInternal as provideZonelessChangeDetectionInternal,\n} from '@angular/core';\nimport { HostEngine } from '@ng-native/fabric';\nimport { ColorScheme, Direction, HardwareBack, Screen, StatusBar } from '@ng-native/device';\nimport {\n browserColorSchemeSource,\n browserDirectionSource,\n browserScreenSource,\n} from './device-sources.ts';\nimport { BrowserEngine } from './browser-engine.ts';\nimport { BrowserRendererFactory } from './browser-renderer.ts';\nimport { ISLAND_RESET_CSS, RESET_CSS } from './reset-css.ts';\n\nconst RESET_STYLE_ID = 'angular-native-web-reset';\nconst ISLAND_RESET_STYLE_ID = 'angular-native-web-island-reset';\n\n/**\n * Injects `reset.css`'s content as a `<style>` in `document.head`, once per document. Idempotent,\n * so an app free to call it itself (or to load `reset.css` through its own bundler instead, and\n * pass `injectReset: false` to `mount`) never ends up with the rule twice.\n */\nexport function injectResetStylesheet(document: Document): void {\n injectStyle(document, RESET_STYLE_ID, RESET_CSS);\n}\n\n/**\n * The same for an island inside someone else's page: `ISLAND_RESET_CSS`, which leaves the host's\n * `html` and `body` alone. Its own id, so it sits beside a full reset if the page has both kinds.\n */\nexport function injectIslandResetStylesheet(document: Document): void {\n injectStyle(document, ISLAND_RESET_STYLE_ID, ISLAND_RESET_CSS);\n}\n\nfunction injectStyle(document: Document, id: string, css: string): void {\n if (document.getElementById(id)) return;\n const style = document.createElement('style');\n style.id = id;\n // In Tailwind's `base` layer, below every utility, as `@import '@ng-native/web/reset.css'\n // layer(base)` puts it. Injected unlayered after the app's stylesheet, a reset rule is as\n // specific as a class and later, so it beat `border-2`, `flex-row` and `hidden` alike. With no\n // Tailwind on the page, a layered rule still loses to every unlayered one, as a reset should.\n style.textContent = `@layer base {\\n${css}\\n}`;\n // First in the head: a layer is ordered by where it is first declared, and the documented entry\n // (theme.css and utilities.css) declares no `base`. Declared after it, `base` came after\n // `utilities` and beat every utility again.\n document.head.insertBefore(style, document.head.firstChild);\n}\n\nexport interface MountOptions {\n readonly providers?: (Provider | EnvironmentProviders)[];\n /**\n * The component's inputs, by their public name, set before its first render - so an\n * `input.required()` has its value from the start rather than throwing on the first check.\n * Change them afterwards with `componentRef.setInput`.\n */\n readonly inputs?: Readonly<Record<string, unknown>>;\n /**\n * Injects the reset stylesheet into `document.head` before mounting. Defaults to `true`. With\n * `injector` it is the island reset, which leaves the host page's `html` and `body` alone.\n */\n readonly injectReset?: boolean;\n /**\n * Mount inside an existing Angular app instead of as an app of its own: pass an injector from\n * that app - `inject(Injector)` in the component that owns `rootElement` is the usual one.\n *\n * The island then shares the host app's services (anything `providedIn: 'root'`, and anything\n * its `bootstrapApplication` or a component above it provides) and is checked by the host's\n * change detection. Only what the island has to render differently is its own: the renderer,\n * the engine, and the device services that read the browser rather than a phone. See\n * `packages/web/islands.md` in the documentation.\n */\n readonly injector?: Injector;\n /**\n * Keeps a `dark` class on `rootElement` in step with `ColorScheme`, which is what\n * `@ng-native/tailwind`'s `dark:` variant and a theme's `.dark` block match beneath: the system's\n * `prefers-color-scheme`, or what `ColorScheme.set()` chose over it. Defaults to `true`, as\n * `watchConditions` does on a device. An app that puts `dark` on its own root view turns it off.\n */\n readonly darkClass?: boolean;\n}\n\nexport interface MountResult {\n readonly componentRef: ComponentRef<unknown>;\n /** The island's own app, or with `injector` the host app it was mounted into. */\n readonly applicationRef: ApplicationRef;\n readonly factory: BrowserRendererFactory;\n readonly engine: BrowserEngine;\n /**\n * Takes the island down: its component, and whatever it owns. With `injector` that is only the\n * island - the host app it was mounted into keeps running - so call this rather than\n * `applicationRef.destroy()`, which there would destroy the host.\n */\n destroy(): void;\n}\n\nexport function mount(\n rootElement: Element,\n component: Type<unknown>,\n options: MountOptions = {},\n): MountResult {\n const {\n providers: extraProviders = [],\n inputs = {},\n injectReset = true,\n injector: host,\n darkClass = true,\n } = options;\n const document = rootElement.ownerDocument;\n if (injectReset) {\n if (host) injectIslandResetStylesheet(document);\n else injectResetStylesheet(document);\n }\n // What `reset.css` hangs the root's height off. Stamped rather than required of the app,\n // because an app that forgot it would get a page whose `flex: 1` silently resolved to zero.\n rootElement.setAttribute('data-rn-root', '');\n // What `@ng-native/tailwind`'s `web:` variant matches beneath, as `platform-ios` does on a phone.\n rootElement.classList.add('platform-web');\n\n const engine = new BrowserEngine(document);\n const factory = new BrowserRendererFactory(engine, document);\n // `wrapRoot` marks the element `ngSkipHydration`; an island gives back what it had on unmount.\n const skipHydration = rootElement.getAttribute('ngSkipHydration');\n const rootNode = engine.wrapRoot(rootElement) as unknown as Element;\n const own = hostProviders(engine, factory, document.defaultView);\n\n const mounted = host\n ? mountInside(\n host,\n rootElement,\n rootNode,\n component,\n [...own, ...extraProviders],\n inputs,\n {\n factory,\n engine,\n },\n skipHydration,\n )\n : mountAlone(rootNode, component, [...own, ...extraProviders], inputs, document, {\n factory,\n engine,\n });\n // The engine listens on the whole document, so it has to stop once its app is gone, however\n // the app went: through `destroy()` or straight through the component ref.\n mounted.componentRef.onDestroy(() => engine.dispose());\n if (darkClass) keepDarkClass(rootElement, mounted.componentRef);\n return mounted;\n}\n\n/** The `darkClass` option: the class now, and again whenever `ColorScheme` changes. */\nfunction keepDarkClass(rootElement: Element, componentRef: ComponentRef<unknown>): void {\n const scheme = componentRef.injector.get(ColorScheme);\n const apply = () => rootElement.classList.toggle('dark', scheme.current() === 'dark');\n apply();\n effect(apply, { injector: componentRef.injector });\n componentRef.onDestroy(() => rootElement.classList.remove('dark'));\n}\n\n/**\n * What an island has to have of its own, whichever way it is mounted: the renderer and engine\n * that turn `<view>` into a `<div>`, and the device capabilities answered by the browser.\n */\nfunction hostProviders(\n engine: BrowserEngine,\n factory: BrowserRendererFactory,\n view: Document['defaultView'],\n): (Provider | EnvironmentProviders)[] {\n return [\n { provide: RendererFactory2, useValue: factory },\n // The one seam the shared packages inject. See the file doc for why `Engine` itself is not\n // also provided here.\n { provide: HostEngine, useValue: engine },\n // The device capabilities, from the browser rather than from React Native. Without these\n // `Screen` falls back to its off-device answer of a zero-sized window, and every component\n // that branches on `compact()` takes the phone tree. See `device-sources.ts`.\n ...(view\n ? [\n { provide: Screen.SOURCE, useValue: browserScreenSource(view) },\n { provide: ColorScheme.SOURCE, useValue: browserColorSchemeSource(view) },\n { provide: Direction.SOURCE, useValue: browserDirectionSource(view) },\n ]\n : []),\n // A tab has no hardware back button, so this is the same inert fallback\n // `hardwareBackSource()`'s own off-device branch answers with, provided here so the browser\n // host says so itself rather than relying on that branch.\n { provide: HardwareBack.SOURCE, useValue: { subscribe: () => () => {} } },\n // A tab has no status bar either.\n {\n provide: StatusBar.SOURCE,\n useValue: {\n setStyle: () => {},\n setHidden: () => {},\n setBackgroundColor: () => {},\n setTranslucent: () => {},\n height: undefined,\n },\n },\n ];\n}\n\n/** An app of its own: its own root injector, change detection and `ApplicationRef`. */\nfunction mountAlone(\n rootNode: Element,\n component: Type<unknown>,\n providers: (Provider | EnvironmentProviders)[],\n inputs: Readonly<Record<string, unknown>>,\n document: Document,\n host: { factory: BrowserRendererFactory; engine: BrowserEngine },\n): MountResult {\n // Parent the app injector to the platform injector, exactly as `internalCreateApplication`\n // does and `mount()` documents: some Angular services are `providedIn: 'platform'`, and with a\n // null parent they simply do not exist.\n const platformInjector = createOrReusePlatformInjector();\n\n const injector = createEnvironmentInjector(\n [\n { provide: INJECTOR_SCOPE, useValue: 'root' },\n provideZonelessChangeDetectionInternal(),\n { provide: DOCUMENT, useValue: document },\n // A DOM is what this is running in, so libraries that check isPlatformBrowser() are right to\n // use it. An island inside an app is the app's own and inherits its value instead.\n { provide: PLATFORM_ID, useValue: 'browser' },\n { provide: ErrorHandler, useClass: ErrorHandler },\n ...providers,\n ],\n platformInjector as EnvironmentInjector,\n );\n\n const componentRef = createComponent(component, {\n environmentInjector: injector,\n hostElement: rootNode,\n });\n setInputs(componentRef, inputs);\n\n const applicationRef = injector.get(ApplicationRef);\n\n // Mirrors `ApplicationRef.bootstrap()`, which is not used directly because it wants a DOM\n // selector rather than an element `mount`'s own caller already resolved.\n applicationRef.componentTypes.push(component);\n applicationRef.attachView(componentRef.hostView);\n applicationRef.tick();\n // Load-bearing, not bookkeeping: the router's bootstrap listener returns early unless the ref\n // it is handed is `ApplicationRef.components[0]`.\n applicationRef.components.push(componentRef);\n componentRef.onDestroy(() => {\n applicationRef.detachView(componentRef.hostView);\n const at = applicationRef.components.indexOf(componentRef);\n if (at !== -1) applicationRef.components.splice(at, 1);\n });\n\n for (const listener of injector.get(APP_BOOTSTRAP_LISTENER, [])) {\n listener(componentRef);\n }\n\n return {\n componentRef,\n applicationRef,\n ...host,\n destroy: () => {\n componentRef.destroy();\n applicationRef.destroy();\n },\n };\n}\n\n/**\n * An island inside a running app. Its environment injector is a child of the host's, without a\n * root scope of its own, so anything it does not provide - a `providedIn: 'root'` service, the\n * host's `ApplicationRef` and scheduler, its `ErrorHandler` - resolves from the host, once, for\n * both. What it does provide is only what has to differ: the renderer and engine, the browser's\n * device sources, and the five device services that read them. Those five are provided here as\n * classes so they are built in the island, against its sources, rather than in the host's root\n * against the phone defaults.\n *\n * The host's element injector goes in too, so a service a component above the island provides\n * is visible to it as well as one the app does.\n */\nfunction mountInside(\n hostInjector: Injector,\n rootElement: Element,\n rootNode: Element,\n component: Type<unknown>,\n providers: (Provider | EnvironmentProviders)[],\n inputs: Readonly<Record<string, unknown>>,\n host: { factory: BrowserRendererFactory; engine: BrowserEngine },\n skipHydration: string | null,\n): MountResult {\n const injector = createEnvironmentInjector(\n [Screen, ColorScheme, Direction, HardwareBack, StatusBar, ...providers],\n hostInjector.get(EnvironmentInjector),\n );\n\n const componentRef = createComponent(component, {\n environmentInjector: injector,\n elementInjector: hostInjector,\n hostElement: rootNode,\n });\n setInputs(componentRef, inputs);\n\n // The host's own change detection checks the island from here on, like any view of its own.\n const applicationRef = hostInjector.get(ApplicationRef);\n applicationRef.attachView(componentRef.hostView);\n componentRef.changeDetectorRef.detectChanges();\n\n return {\n componentRef,\n applicationRef,\n ...host,\n destroy: () => {\n componentRef.destroy();\n injector.destroy();\n rootElement.removeAttribute('data-rn-root');\n if (skipHydration === null) rootElement.removeAttribute('ngSkipHydration');\n else rootElement.setAttribute('ngSkipHydration', skipHydration);\n rootElement.classList.remove('platform-web');\n },\n };\n}\n\nfunction setInputs(componentRef: ComponentRef<unknown>, inputs: Readonly<Record<string, unknown>>) {\n for (const [name, value] of Object.entries(inputs)) componentRef.setInput(name, value);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"mount.js","sourceRoot":"","sources":["../src/mount.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,MAAM,EACN,yBAAyB,EAMzB,8BAA8B,IAAI,6BAA6B,EAC/D,eAAe,IAAI,cAAc,EACjC,uCAAuC,IAAI,sCAAsC,EACjF,YAAY,IAAI,WAAW,GAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE7D,MAAM,cAAc,GAAG,0BAA0B,CAAC;AAClD,MAAM,qBAAqB,GAAG,iCAAiC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAkB;IACtD,WAA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9C,mBAAmB,EAAE,QAAQ;QAC7B,eAAe,EAAE,YAAY;QAC7B,WAAW,EAAE,QAAQ;KACtB,CAAC,CAAC;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAEhC,4FAA4F;IAC5F,MAAM,cAAc,GAAG,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACxD,cAAc,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACjD,YAAY,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;IAE/C,OAAO;QACL,YAAY;QACZ,cAAc;QACd,GAAG,IAAI;QACP,OAAO,EAAE,GAAG,EAAE;YACZ,YAAY,CAAC,OAAO,EAAE,CAAC;YACvB,QAAQ,CAAC,OAAO,EAAE,CAAC;YACnB,WAAW,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;YAC5C,IAAI,aAAa,KAAK,IAAI;gBAAE,WAAW,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;;gBACtE,WAAW,CAAC,YAAY,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;YAChE,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,YAAmC,EAAE,MAAyC;IAC/F,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACzF,CAAC","sourcesContent":["/**\n * Put an Angular application on a page.\n *\n * The browser counterpart to `@ng-native/platform`'s `mount()`, and named the same on\n * purpose: an app imports one or the other, never both, and which one it gets is the import path's\n * job to say rather than the identifier's. Reading the native one first is worth it - this follows\n * its shape and its documented distinction\n * between `ApplicationRef` and the root `ComponentRef` (`createComponent` resolves the latter;\n * `applicationRef.components` needs it pushed by hand, the same bookkeeping\n * `ApplicationRef.bootstrap()` would otherwise do, for the same reason - a routed app's initial\n * navigation checks `applicationRef.components[0]` before it will run at all).\n *\n * What is different from the native `mount()`, and why:\n *\n * - **The first argument is a real `Element`, not a numeric root tag.** Fabric addresses its root\n * by the tag React Native's host gave it; a browser page has no such number, only the element\n * an app mounts into (`document.getElementById('app-root')`, or one `document.body` itself).\n * - **No `FabricUIManager`, and no `Engine` provided under its own token.** Only `HostEngine` is\n * provided. `worklet-style`, `worklet-scroll` and `native-gesture`\n * `inject(Engine)` directly (see `packages/fabric/src/host.ts`'s doc comment for why that is\n * the honest place to draw the line) - on native `Engine` is provided under both tokens so both\n * paths resolve; here it is provided under neither, so an app that uses one of those three on\n * the web gets Angular's own `NullInjectorError` at the point it tries to inject `Engine`,\n * which names exactly what is unsupported rather than rendering something silently wrong.\n * - **`DOCUMENT` is the real `document`**, not the stub the native `mount()` builds for\n * `TransferState`'s\n * `getElementById`. A browser host already has one.\n * - **No dev-mode animation warning, no HMR reload hook.** The native check exists\n * because `@angular/core` reads whether `animate.enter`/`animate.leave` do anything from a\n * global a Metro polyfill has to set before `@angular/core` first evaluates; a real browser\n * already has `document.documentElement.getAnimations`, which is the same thing that global\n * stands in for on native, so there is nothing to warn about. The reload hook is Metro Fast\n * Refresh's fallback path specifically; a browser dev server has its own, unrelated story for\n * picking up an edit, so wiring `__angularNativeReload` here would install a hook nothing calls.\n */\nimport {\n APP_BOOTSTRAP_LISTENER,\n ApplicationRef,\n DOCUMENT,\n PLATFORM_ID,\n EnvironmentInjector,\n ErrorHandler,\n LOCALE_ID,\n RendererFactory2,\n createComponent,\n effect,\n createEnvironmentInjector,\n type ComponentRef,\n type EnvironmentProviders,\n type Injector,\n type Provider,\n type Type,\n ɵcreateOrReusePlatformInjector as createOrReusePlatformInjector,\n ɵINJECTOR_SCOPE as INJECTOR_SCOPE,\n ɵprovideZonelessChangeDetectionInternal as provideZonelessChangeDetectionInternal,\n ɵsetLocaleId as setLocaleId,\n} from '@angular/core';\nimport { HostEngine } from '@ng-native/fabric';\nimport { ColorScheme, Direction, HardwareBack, Screen, StatusBar } from '@ng-native/device';\nimport {\n browserColorSchemeSource,\n browserDirectionSource,\n browserScreenSource,\n} from './device-sources.ts';\nimport { BrowserEngine } from './browser-engine.ts';\nimport { BrowserRendererFactory } from './browser-renderer.ts';\nimport { ISLAND_RESET_CSS, RESET_CSS } from './reset-css.ts';\n\nconst RESET_STYLE_ID = 'angular-native-web-reset';\nconst ISLAND_RESET_STYLE_ID = 'angular-native-web-island-reset';\n\n/**\n * Injects `reset.css`'s content as a `<style>` in `document.head`, once per document. Idempotent,\n * so an app free to call it itself (or to load `reset.css` through its own bundler instead, and\n * pass `injectReset: false` to `mount`) never ends up with the rule twice.\n */\nexport function injectResetStylesheet(document: Document): void {\n injectStyle(document, RESET_STYLE_ID, RESET_CSS);\n}\n\n/**\n * The same for an island inside someone else's page: `ISLAND_RESET_CSS`, which leaves the host's\n * `html` and `body` alone. Its own id, so it sits beside a full reset if the page has both kinds.\n */\nexport function injectIslandResetStylesheet(document: Document): void {\n injectStyle(document, ISLAND_RESET_STYLE_ID, ISLAND_RESET_CSS);\n}\n\nfunction injectStyle(document: Document, id: string, css: string): void {\n if (document.getElementById(id)) return;\n const style = document.createElement('style');\n style.id = id;\n // In Tailwind's `base` layer, below every utility, as `@import '@ng-native/web/reset.css'\n // layer(base)` puts it. Injected unlayered after the app's stylesheet, a reset rule is as\n // specific as a class and later, so it beat `border-2`, `flex-row` and `hidden` alike. With no\n // Tailwind on the page, a layered rule still loses to every unlayered one, as a reset should.\n style.textContent = `@layer base {\\n${css}\\n}`;\n // First in the head: a layer is ordered by where it is first declared, and the documented entry\n // (theme.css and utilities.css) declares no `base`. Declared after it, `base` came after\n // `utilities` and beat every utility again.\n document.head.insertBefore(style, document.head.firstChild);\n}\n\nexport interface MountOptions {\n readonly providers?: (Provider | EnvironmentProviders)[];\n /**\n * The component's inputs, by their public name, set before its first render - so an\n * `input.required()` has its value from the start rather than throwing on the first check.\n * Change them afterwards with `componentRef.setInput`.\n */\n readonly inputs?: Readonly<Record<string, unknown>>;\n /**\n * Injects the reset stylesheet into `document.head` before mounting. Defaults to `true`. With\n * `injector` it is the island reset, which leaves the host page's `html` and `body` alone.\n */\n readonly injectReset?: boolean;\n /**\n * Mount inside an existing Angular app instead of as an app of its own: pass an injector from\n * that app - `inject(Injector)` in the component that owns `rootElement` is the usual one.\n *\n * The island then shares the host app's services (anything `providedIn: 'root'`, and anything\n * its `bootstrapApplication` or a component above it provides) and is checked by the host's\n * change detection. Only what the island has to render differently is its own: the renderer,\n * the engine, and the device services that read the browser rather than a phone. See\n * `packages/web/islands.md` in the documentation.\n */\n readonly injector?: Injector;\n /**\n * Keeps a `dark` class on `rootElement` in step with `ColorScheme`, which is what\n * `@ng-native/tailwind`'s `dark:` variant and a theme's `.dark` block match beneath: the system's\n * `prefers-color-scheme`, or what `ColorScheme.set()` chose over it. Defaults to `true`, as\n * `watchConditions` does on a device. An app that puts `dark` on its own root view turns it off.\n */\n readonly darkClass?: boolean;\n}\n\nexport interface MountResult {\n readonly componentRef: ComponentRef<unknown>;\n /** The island's own app, or with `injector` the host app it was mounted into. */\n readonly applicationRef: ApplicationRef;\n readonly factory: BrowserRendererFactory;\n readonly engine: BrowserEngine;\n /**\n * Takes the island down: its component, and whatever it owns. With `injector` that is only the\n * island - the host app it was mounted into keeps running - so call this rather than\n * `applicationRef.destroy()`, which there would destroy the host.\n */\n destroy(): void;\n}\n\nexport function mount(\n rootElement: Element,\n component: Type<unknown>,\n options: MountOptions = {},\n): MountResult {\n const {\n providers: extraProviders = [],\n inputs = {},\n injectReset = true,\n injector: host,\n darkClass = true,\n } = options;\n const document = rootElement.ownerDocument;\n if (injectReset) {\n if (host) injectIslandResetStylesheet(document);\n else injectResetStylesheet(document);\n }\n // What `reset.css` hangs the root's height off. Stamped rather than required of the app,\n // because an app that forgot it would get a page whose `flex: 1` silently resolved to zero.\n rootElement.setAttribute('data-rn-root', '');\n // What `@ng-native/tailwind`'s `web:` variant matches beneath, as `platform-ios` does on a phone.\n rootElement.classList.add('platform-web');\n\n const engine = new BrowserEngine(document);\n const factory = new BrowserRendererFactory(engine, document);\n // `wrapRoot` marks the element `ngSkipHydration`; an island gives back what it had on unmount.\n const skipHydration = rootElement.getAttribute('ngSkipHydration');\n const rootNode = engine.wrapRoot(rootElement) as unknown as Element;\n const own = hostProviders(engine, factory, document.defaultView);\n\n const mounted = host\n ? mountInside(\n host,\n rootElement,\n rootNode,\n component,\n [...own, ...extraProviders],\n inputs,\n {\n factory,\n engine,\n },\n skipHydration,\n )\n : mountAlone(rootNode, component, [...own, ...extraProviders], inputs, document, {\n factory,\n engine,\n });\n // The engine listens on the whole document, so it has to stop once its app is gone, however\n // the app went: through `destroy()` or straight through the component ref.\n mounted.componentRef.onDestroy(() => engine.dispose());\n if (darkClass) keepDarkClass(rootElement, mounted.componentRef);\n return mounted;\n}\n\n/** The `darkClass` option: the class now, and again whenever `ColorScheme` changes. */\nfunction keepDarkClass(rootElement: Element, componentRef: ComponentRef<unknown>): void {\n const scheme = componentRef.injector.get(ColorScheme);\n const apply = () => rootElement.classList.toggle('dark', scheme.current() === 'dark');\n apply();\n effect(apply, { injector: componentRef.injector });\n componentRef.onDestroy(() => rootElement.classList.remove('dark'));\n}\n\n/**\n * What an island has to have of its own, whichever way it is mounted: the renderer and engine\n * that turn `<view>` into a `<div>`, and the device capabilities answered by the browser.\n */\nfunction hostProviders(\n engine: BrowserEngine,\n factory: BrowserRendererFactory,\n view: Document['defaultView'],\n): (Provider | EnvironmentProviders)[] {\n return [\n { provide: RendererFactory2, useValue: factory },\n // The one seam the shared packages inject. See the file doc for why `Engine` itself is not\n // also provided here.\n { provide: HostEngine, useValue: engine },\n // The device capabilities, from the browser rather than from React Native. Without these\n // `Screen` falls back to its off-device answer of a zero-sized window, and every component\n // that branches on `compact()` takes the phone tree. See `device-sources.ts`.\n ...(view\n ? [\n { provide: Screen.SOURCE, useValue: browserScreenSource(view) },\n { provide: ColorScheme.SOURCE, useValue: browserColorSchemeSource(view) },\n { provide: Direction.SOURCE, useValue: browserDirectionSource(view) },\n ]\n : []),\n // A tab has no hardware back button, so this is the same inert fallback\n // `hardwareBackSource()`'s own off-device branch answers with, provided here so the browser\n // host says so itself rather than relying on that branch.\n { provide: HardwareBack.SOURCE, useValue: { subscribe: () => () => {} } },\n // A tab has no status bar either.\n {\n provide: StatusBar.SOURCE,\n useValue: {\n setStyle: () => {},\n setHidden: () => {},\n setBackgroundColor: () => {},\n setTranslucent: () => {},\n height: undefined,\n },\n },\n ];\n}\n\n/** An app of its own: its own root injector, change detection and `ApplicationRef`. */\nfunction mountAlone(\n rootNode: Element,\n component: Type<unknown>,\n providers: (Provider | EnvironmentProviders)[],\n inputs: Readonly<Record<string, unknown>>,\n document: Document,\n host: { factory: BrowserRendererFactory; engine: BrowserEngine },\n): MountResult {\n // Parent the app injector to the platform injector, exactly as `internalCreateApplication`\n // does and `mount()` documents: some Angular services are `providedIn: 'platform'`, and with a\n // null parent they simply do not exist.\n const platformInjector = createOrReusePlatformInjector();\n\n const injector = createEnvironmentInjector(\n [\n { provide: INJECTOR_SCOPE, useValue: 'root' },\n provideZonelessChangeDetectionInternal(),\n { provide: DOCUMENT, useValue: document },\n // A DOM is what this is running in, so libraries that check isPlatformBrowser() are right to\n // use it. An island inside an app is the app's own and inherits its value instead.\n { provide: PLATFORM_ID, useValue: 'browser' },\n { provide: ErrorHandler, useClass: ErrorHandler },\n ...providers,\n ],\n platformInjector as EnvironmentInjector,\n );\n setLocaleId(injector.get(LOCALE_ID) || 'en-US');\n\n const componentRef = createComponent(component, {\n environmentInjector: injector,\n hostElement: rootNode,\n });\n setInputs(componentRef, inputs);\n\n const applicationRef = injector.get(ApplicationRef);\n\n // Mirrors `ApplicationRef.bootstrap()`, which is not used directly because it wants a DOM\n // selector rather than an element `mount`'s own caller already resolved.\n applicationRef.componentTypes.push(component);\n applicationRef.attachView(componentRef.hostView);\n applicationRef.tick();\n // Load-bearing, not bookkeeping: the router's bootstrap listener returns early unless the ref\n // it is handed is `ApplicationRef.components[0]`.\n applicationRef.components.push(componentRef);\n componentRef.onDestroy(() => {\n applicationRef.detachView(componentRef.hostView);\n const at = applicationRef.components.indexOf(componentRef);\n if (at !== -1) applicationRef.components.splice(at, 1);\n });\n\n for (const listener of injector.get(APP_BOOTSTRAP_LISTENER, [])) {\n listener(componentRef);\n }\n\n return {\n componentRef,\n applicationRef,\n ...host,\n destroy: () => {\n componentRef.destroy();\n applicationRef.destroy();\n },\n };\n}\n\n/**\n * An island inside a running app. Its environment injector is a child of the host's, without a\n * root scope of its own, so anything it does not provide - a `providedIn: 'root'` service, the\n * host's `ApplicationRef` and scheduler, its `ErrorHandler` - resolves from the host, once, for\n * both. What it does provide is only what has to differ: the renderer and engine, the browser's\n * device sources, and the five device services that read them. Those five are provided here as\n * classes so they are built in the island, against its sources, rather than in the host's root\n * against the phone defaults.\n *\n * The host's element injector goes in too, so a service a component above the island provides\n * is visible to it as well as one the app does.\n */\nfunction mountInside(\n hostInjector: Injector,\n rootElement: Element,\n rootNode: Element,\n component: Type<unknown>,\n providers: (Provider | EnvironmentProviders)[],\n inputs: Readonly<Record<string, unknown>>,\n host: { factory: BrowserRendererFactory; engine: BrowserEngine },\n skipHydration: string | null,\n): MountResult {\n const injector = createEnvironmentInjector(\n [Screen, ColorScheme, Direction, HardwareBack, StatusBar, ...providers],\n hostInjector.get(EnvironmentInjector),\n );\n\n const componentRef = createComponent(component, {\n environmentInjector: injector,\n elementInjector: hostInjector,\n hostElement: rootNode,\n });\n setInputs(componentRef, inputs);\n\n // The host's own change detection checks the island from here on, like any view of its own.\n const applicationRef = hostInjector.get(ApplicationRef);\n applicationRef.attachView(componentRef.hostView);\n componentRef.changeDetectorRef.detectChanges();\n\n return {\n componentRef,\n applicationRef,\n ...host,\n destroy: () => {\n componentRef.destroy();\n injector.destroy();\n rootElement.removeAttribute('data-rn-root');\n if (skipHydration === null) rootElement.removeAttribute('ngSkipHydration');\n else rootElement.setAttribute('ngSkipHydration', skipHydration);\n rootElement.classList.remove('platform-web');\n },\n };\n}\n\nfunction setInputs(componentRef: ComponentRef<unknown>, inputs: Readonly<Record<string, unknown>>) {\n for (const [name, value] of Object.entries(inputs)) componentRef.setInput(name, value);\n}\n"]}
|
package/dist/props.js
CHANGED
|
@@ -702,7 +702,19 @@ const SVG_ROOT_HANDLERS = {
|
|
|
702
702
|
const ACTIVITY_INDICATOR_HANDLERS = {
|
|
703
703
|
color: (n, v, c) => setStyleProp(n, 'color', v, c || typeof v !== 'string'),
|
|
704
704
|
};
|
|
705
|
+
/**
|
|
706
|
+
* `text.ts`'s `numberOfLines`, as the attribute and the line count `reset.css` clamps the text
|
|
707
|
+
* with. Neither is written for `0`, which is no limit on a device, as it is when the prop is unset.
|
|
708
|
+
*/
|
|
709
|
+
const TEXT_HANDLERS = {
|
|
710
|
+
numberOfLines: (n, v, c) => {
|
|
711
|
+
const lines = typeof v === 'number' && v > 0 ? v : undefined;
|
|
712
|
+
setOrRemove(n, 'numberoflines', lines, c || lines === undefined);
|
|
713
|
+
setStyleProp(n, '--rn-number-of-lines', lines, c || lines === undefined);
|
|
714
|
+
},
|
|
715
|
+
};
|
|
705
716
|
const BY_ELEMENT = {
|
|
717
|
+
text: TEXT_HANDLERS,
|
|
706
718
|
'activity-indicator': ACTIVITY_INDICATOR_HANDLERS,
|
|
707
719
|
'text-input': TEXT_INPUT_HANDLERS,
|
|
708
720
|
switch: SWITCH_HANDLERS,
|
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;A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,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/** `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 setStyleProp(n, 'background-image', uri ? `url(\"${cssEscape(uri)}\")` : '', !uri);\n if (uri) watchImageLoad(n, uri);\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 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): 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 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\nconst BY_ELEMENT: Record<string, Record<string, Handler>> = {\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.name]?.[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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UAAU,SAAS,CAAC,IAAiB,EAAE,GAAW,EAAE,KAAc,EAAE,KAAc;IACtF,MAAM,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACpD,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/** `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 setStyleProp(n, 'background-image', uri ? `url(\"${cssEscape(uri)}\")` : '', !uri);\n if (uri) watchImageLoad(n, uri);\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 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): 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 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.name]?.[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/dist/reset-css.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* `.css` only, and the version `mount` actually injects would have gone on shipping the old
|
|
14
14
|
* rules with nothing to say so.
|
|
15
15
|
*/
|
|
16
|
-
export declare const RESET_CSS = "\n[data-rn] {\n box-sizing: border-box;\n position: relative;\n flex-shrink: 0;\n min-width: 0;\n min-height: 0;\n}\n\n[data-rn]:where(:not([data-rn='root'])) {\n border-width: 0;\n border-style: solid;\n border-color: black;\n}\n\nhtml,\nbody {\n height: 100%;\n}\n\n[data-rn-root] {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\nbody {\n font-family: var(\n --font-sans,\n system-ui,\n -apple-system,\n 'Segoe UI',\n Roboto,\n 'Helvetica Neue',\n Arial,\n sans-serif\n );\n font-size: 14px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n[data-rn]:not([data-rn='text']):not(\n :where(\n :is(\n [data-rn='span'],\n [data-rn='p'],\n [data-rn='h1'],\n [data-rn='h2'],\n [data-rn='h3'],\n [data-rn='h4'],\n [data-rn='h5'],\n [data-rn='h6'],\n [data-rn='label'],\n [data-rn='strong'],\n [data-rn='b'],\n [data-rn='em'],\n [data-rn='i'],\n [data-rn='u'],\n [data-rn='s'],\n [data-rn='small'],\n [data-rn='code'],\n [data-rn='mark'],\n [data-rn='abbr'],\n [data-rn='cite'],\n [data-rn='time']\n ):not(\n :has(\n [data-rn]:not(\n [data-rn='text'],\n [data-rn='span'],\n [data-rn='p'],\n [data-rn='h1'],\n [data-rn='h2'],\n [data-rn='h3'],\n [data-rn='h4'],\n [data-rn='h5'],\n [data-rn='h6'],\n [data-rn='label'],\n [data-rn='strong'],\n [data-rn='b'],\n [data-rn='em'],\n [data-rn='i'],\n [data-rn='u'],\n [data-rn='s'],\n [data-rn='small'],\n [data-rn='code'],\n [data-rn='mark'],\n [data-rn='abbr'],\n [data-rn='cite'],\n [data-rn='time']\n )\n )\n )\n )\n ) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n[data-rn='text'],\n:where(\n :is(\n [data-rn='span'],\n [data-rn='p'],\n [data-rn='h1'],\n [data-rn='h2'],\n [data-rn='h3'],\n [data-rn='h4'],\n [data-rn='h5'],\n [data-rn='h6'],\n [data-rn='label'],\n [data-rn='strong'],\n [data-rn='b'],\n [data-rn='em'],\n [data-rn='i'],\n [data-rn='u'],\n [data-rn='s'],\n [data-rn='small'],\n [data-rn='code'],\n [data-rn='mark'],\n [data-rn='abbr'],\n [data-rn='cite'],\n [data-rn='time']\n ):not(\n :has(\n [data-rn]:not(\n [data-rn='text'],\n [data-rn='span'],\n [data-rn='p'],\n [data-rn='h1'],\n [data-rn='h2'],\n [data-rn='h3'],\n [data-rn='h4'],\n [data-rn='h5'],\n [data-rn='h6'],\n [data-rn='label'],\n [data-rn='strong'],\n [data-rn='b'],\n [data-rn='em'],\n [data-rn='i'],\n [data-rn='u'],\n [data-rn='s'],\n [data-rn='small'],\n [data-rn='code'],\n [data-rn='mark'],\n [data-rn='abbr'],\n [data-rn='cite'],\n [data-rn='time']\n )\n )\n )\n)[data-rn] {\n display: inline;\n}\n\n:where(h1, h2, h3, h4, h5, h6, p)[data-rn] {\n font-size: inherit;\n font-weight: inherit;\n margin: 0;\n}\n\n:where(ul, ol)[data-rn] {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n:where(strong, b)[data-rn] {\n font-weight: bold;\n}\n\n:where(small)[data-rn] {\n font-size: 80%;\n}\n\n:where(code)[data-rn] {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 1em;\n}\n\n:where(mark)[data-rn] {\n background-color: rgb(255, 255, 0);\n color: rgb(0, 0, 0);\n}\n\n[data-rn='scroll-view'],\n[data-rn='virtual-list'] {\n flex-grow: 1;\n flex-shrink: 1;\n flex-direction: column;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rn='scroll-view'][flexdirection='row'] {\n flex-direction: row;\n}\n\n[data-rn='scroll-view'][scrollenabled='false'] {\n overflow: hidden;\n}\n\n[data-rn='image'] {\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n:where([data-rn='image']) {\n width: var(--rn-intrinsic-width, auto);\n height: var(--rn-intrinsic-height, auto);\n}\n\n:where([data-rn='gesture-root']) {\n flex-grow: 1;\n flex-basis: 0%;\n}\n\n[data-rn='modal'] {\n position: fixed;\n inset: 0;\n z-index: 1000;\n background-color: rgb(0 0 0 / 50%);\n}\n[data-rn='modal'][hidden] {\n display: none;\n}\n\n[data-rn='input-accessory-view'] {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n[data-rn='activity-indicator'] {\n color: #999999;\n}\n[data-rn='activity-indicator']::after {\n content: '';\n box-sizing: border-box;\n flex: 1;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: rn-activity-indicator 0.8s linear infinite;\n}\n[data-rn='activity-indicator'][animating='false']::after {\n animation-play-state: paused;\n}\n[data-rn='activity-indicator'][animating='false']:not([hideswhenstopped='false'])::after {\n visibility: hidden;\n}\n@keyframes rn-activity-indicator {\n to {\n transform: rotate(360deg);\n }\n}\n\n[data-rn='text-input'] {\n background-color: transparent;\n font: inherit;\n color: inherit;\n letter-spacing: inherit;\n text-transform: inherit;\n margin: 0;\n padding: 0;\n resize: none;\n}\n\n[data-rn='text-input']::placeholder {\n /* A device draws an unset placeholder grey; this is the text colour, faded, on any theme. */\n color: var(--rn-placeholder-color, color-mix(in srgb, currentColor 45%, transparent));\n}\n\n[data-rn='gradient-text'] {\n -webkit-background-clip: text;\n background-clip: text;\n}\n\n[data-rn='gradient-text'] > [data-rn='text'][data-rn] {\n color: transparent;\n}\n\n[data-rn='gradient-text'] > [data-rn='view'][data-rn] {\n display: none;\n}\n";
|
|
16
|
+
export declare const RESET_CSS = "\n[data-rn] {\n box-sizing: border-box;\n position: relative;\n flex-shrink: 0;\n min-width: 0;\n min-height: 0;\n}\n\n[data-rn]:where(:not([data-rn='root'])) {\n border-width: 0;\n border-style: solid;\n border-color: black;\n}\n\nhtml,\nbody {\n height: 100%;\n}\n\n[data-rn-root] {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\nbody {\n font-family: var(\n --font-sans,\n system-ui,\n -apple-system,\n 'Segoe UI',\n Roboto,\n 'Helvetica Neue',\n Arial,\n sans-serif\n );\n font-size: 14px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n[data-rn]:not([data-rn='text']):not(\n :where(\n :is(\n [data-rn='span'],\n [data-rn='p'],\n [data-rn='h1'],\n [data-rn='h2'],\n [data-rn='h3'],\n [data-rn='h4'],\n [data-rn='h5'],\n [data-rn='h6'],\n [data-rn='label'],\n [data-rn='strong'],\n [data-rn='b'],\n [data-rn='em'],\n [data-rn='i'],\n [data-rn='u'],\n [data-rn='s'],\n [data-rn='small'],\n [data-rn='code'],\n [data-rn='mark'],\n [data-rn='abbr'],\n [data-rn='cite'],\n [data-rn='time']\n ):not(\n :has(\n [data-rn]:not(\n [data-rn='text'],\n [data-rn='span'],\n [data-rn='p'],\n [data-rn='h1'],\n [data-rn='h2'],\n [data-rn='h3'],\n [data-rn='h4'],\n [data-rn='h5'],\n [data-rn='h6'],\n [data-rn='label'],\n [data-rn='strong'],\n [data-rn='b'],\n [data-rn='em'],\n [data-rn='i'],\n [data-rn='u'],\n [data-rn='s'],\n [data-rn='small'],\n [data-rn='code'],\n [data-rn='mark'],\n [data-rn='abbr'],\n [data-rn='cite'],\n [data-rn='time']\n )\n )\n )\n )\n ) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n\n[data-rn='text'],\n:where(\n :is(\n [data-rn='span'],\n [data-rn='p'],\n [data-rn='h1'],\n [data-rn='h2'],\n [data-rn='h3'],\n [data-rn='h4'],\n [data-rn='h5'],\n [data-rn='h6'],\n [data-rn='label'],\n [data-rn='strong'],\n [data-rn='b'],\n [data-rn='em'],\n [data-rn='i'],\n [data-rn='u'],\n [data-rn='s'],\n [data-rn='small'],\n [data-rn='code'],\n [data-rn='mark'],\n [data-rn='abbr'],\n [data-rn='cite'],\n [data-rn='time']\n ):not(\n :has(\n [data-rn]:not(\n [data-rn='text'],\n [data-rn='span'],\n [data-rn='p'],\n [data-rn='h1'],\n [data-rn='h2'],\n [data-rn='h3'],\n [data-rn='h4'],\n [data-rn='h5'],\n [data-rn='h6'],\n [data-rn='label'],\n [data-rn='strong'],\n [data-rn='b'],\n [data-rn='em'],\n [data-rn='i'],\n [data-rn='u'],\n [data-rn='s'],\n [data-rn='small'],\n [data-rn='code'],\n [data-rn='mark'],\n [data-rn='abbr'],\n [data-rn='cite'],\n [data-rn='time']\n )\n )\n )\n)[data-rn] {\n display: inline;\n}\n\n:where(h1, h2, h3, h4, h5, h6, p)[data-rn] {\n font-size: inherit;\n font-weight: inherit;\n margin: 0;\n}\n\n:where(ul, ol)[data-rn] {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n:where(strong, b)[data-rn] {\n font-weight: bold;\n}\n\n:where(small)[data-rn] {\n font-size: 80%;\n}\n\n:where(code)[data-rn] {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 1em;\n}\n\n:where(mark)[data-rn] {\n background-color: rgb(255, 255, 0);\n color: rgb(0, 0, 0);\n}\n\n[data-rn='text']:where([numberoflines]:not([data-rn='text'] *)) {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: var(--rn-number-of-lines);\n overflow: hidden;\n}\n\n[data-rn='text']:where([numberoflines][ellipsizemode='clip']:not([data-rn='text'] *)) {\n display: block;\n -webkit-line-clamp: none;\n max-height: calc(var(--rn-number-of-lines) * 1lh);\n}\n\n[data-rn='scroll-view'],\n[data-rn='virtual-list'] {\n flex-grow: 1;\n flex-shrink: 1;\n flex-direction: column;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rn='scroll-view'][flexdirection='row'] {\n flex-direction: row;\n}\n\n[data-rn='scroll-view'][scrollenabled='false'] {\n overflow: hidden;\n}\n\n[data-rn='scroll-view'][pagingenabled='true'] {\n scroll-snap-type: y mandatory;\n}\n\n[data-rn='scroll-view'][pagingenabled='true'][horizontal='true'] {\n scroll-snap-type: x mandatory;\n}\n\n[data-rn='scroll-view'][pagingenabled='true'] > [data-rn='view'] > * {\n scroll-snap-align: start;\n scroll-snap-stop: always;\n}\n\n[data-rn='image'] {\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n}\n\n:where([data-rn='image']) {\n width: var(--rn-intrinsic-width, auto);\n height: var(--rn-intrinsic-height, auto);\n}\n\n:where([data-rn='gesture-root']) {\n flex-grow: 1;\n flex-basis: 0%;\n}\n\n[data-rn='modal'] {\n position: fixed;\n inset: 0;\n z-index: 1000;\n background-color: rgb(0 0 0 / 50%);\n}\n[data-rn='modal'][hidden] {\n display: none;\n}\n\n[data-rn='input-accessory-view'] {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n[data-rn='activity-indicator'] {\n color: #999999;\n}\n[data-rn='activity-indicator']::after {\n content: '';\n box-sizing: border-box;\n flex: 1;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: rn-activity-indicator 0.8s linear infinite;\n}\n[data-rn='activity-indicator'][animating='false']::after {\n animation-play-state: paused;\n}\n[data-rn='activity-indicator'][animating='false']:not([hideswhenstopped='false'])::after {\n visibility: hidden;\n}\n@keyframes rn-activity-indicator {\n to {\n transform: rotate(360deg);\n }\n}\n\n[data-rn='text-input'] {\n background-color: transparent;\n font: inherit;\n color: inherit;\n letter-spacing: inherit;\n text-transform: inherit;\n margin: 0;\n padding: 0;\n resize: none;\n}\n\n[data-rn='text-input']::placeholder {\n /* A device draws an unset placeholder grey; this is the text colour, faded, on any theme. */\n color: var(--rn-placeholder-color, color-mix(in srgb, currentColor 45%, transparent));\n}\n\n[data-rn='gradient-text'] {\n -webkit-background-clip: text;\n background-clip: text;\n}\n\n[data-rn='gradient-text'] > [data-rn='text'][data-rn] {\n color: transparent;\n}\n\n[data-rn='gradient-text'] > [data-rn='view'][data-rn] {\n display: none;\n}\n";
|
|
17
17
|
/**
|
|
18
18
|
* The reset for an island inside someone else's page: `RESET_CSS` without the two rules that
|
|
19
19
|
* reach outside the island.
|
package/dist/reset-css.js
CHANGED
|
@@ -200,6 +200,19 @@ body {
|
|
|
200
200
|
color: rgb(0, 0, 0);
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
+
[data-rn='text']:where([numberoflines]:not([data-rn='text'] *)) {
|
|
204
|
+
display: -webkit-box;
|
|
205
|
+
-webkit-box-orient: vertical;
|
|
206
|
+
-webkit-line-clamp: var(--rn-number-of-lines);
|
|
207
|
+
overflow: hidden;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
[data-rn='text']:where([numberoflines][ellipsizemode='clip']:not([data-rn='text'] *)) {
|
|
211
|
+
display: block;
|
|
212
|
+
-webkit-line-clamp: none;
|
|
213
|
+
max-height: calc(var(--rn-number-of-lines) * 1lh);
|
|
214
|
+
}
|
|
215
|
+
|
|
203
216
|
[data-rn='scroll-view'],
|
|
204
217
|
[data-rn='virtual-list'] {
|
|
205
218
|
flex-grow: 1;
|
|
@@ -217,6 +230,19 @@ body {
|
|
|
217
230
|
overflow: hidden;
|
|
218
231
|
}
|
|
219
232
|
|
|
233
|
+
[data-rn='scroll-view'][pagingenabled='true'] {
|
|
234
|
+
scroll-snap-type: y mandatory;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
[data-rn='scroll-view'][pagingenabled='true'][horizontal='true'] {
|
|
238
|
+
scroll-snap-type: x mandatory;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
[data-rn='scroll-view'][pagingenabled='true'] > [data-rn='view'] > * {
|
|
242
|
+
scroll-snap-align: start;
|
|
243
|
+
scroll-snap-stop: always;
|
|
244
|
+
}
|
|
245
|
+
|
|
220
246
|
[data-rn='image'] {
|
|
221
247
|
background-size: cover;
|
|
222
248
|
background-repeat: no-repeat;
|