@ng-native/expo 0.18.2 → 0.19.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.
@@ -31,9 +31,9 @@
31
31
  * has no output for is an error naming the ones it does have, as `<ng-native-island>`'s is.
32
32
  * - **Errors** the page throws reach the app's `ErrorHandler`.
33
33
  * - **Only its own page is heard.** A message from any other page the web view shows, after a link
34
- * in the content, say, is ignored, as is one that is not JSON. The inputs given before the page
35
- * loads are the web view's to hand out, though, and it hands them to whatever page it is showing,
36
- * so they are no place for a secret.
34
+ * in the content, say, is ignored, as is one that is not JSON, and a changed input is sent to
35
+ * its own page alone. The inputs given before the page loads are the web view's to hand out,
36
+ * though, and it hands them to whatever page it is showing, so they are no place for a secret.
37
37
  */
38
38
  import { InjectionToken } from '@angular/core';
39
39
  import { type NativeSyntheticEvent } from '@ng-native/fabric';
@@ -31,9 +31,9 @@
31
31
  * has no output for is an error naming the ones it does have, as `<ng-native-island>`'s is.
32
32
  * - **Errors** the page throws reach the app's `ErrorHandler`.
33
33
  * - **Only its own page is heard.** A message from any other page the web view shows, after a link
34
- * in the content, say, is ignored, as is one that is not JSON. The inputs given before the page
35
- * loads are the web view's to hand out, though, and it hands them to whatever page it is showing,
36
- * so they are no place for a secret.
34
+ * in the content, say, is ignored, as is one that is not JSON, and a changed input is sent to
35
+ * its own page alone. The inputs given before the page loads are the web view's to hand out,
36
+ * though, and it hands them to whatever page it is showing, so they are no place for a secret.
37
37
  */
38
38
  import { Component, ElementRef, InjectionToken, computed, effect, inject, input, untracked, } from '@angular/core';
39
39
  import { Engine } from '@ng-native/fabric';
@@ -136,10 +136,11 @@ export class DomComponent {
136
136
  }
137
137
  send(inputs) {
138
138
  const nativeTag = this.engine.tagOf(this.node);
139
- if (!this.native.functions || nativeTag === null)
139
+ const source = this.source();
140
+ if (!this.native.functions || nativeTag === null || !source)
140
141
  return;
141
142
  const message = JSON.stringify({ type: 'inputs', inputs });
142
- void this.native.functions.injectJavaScript.call({ nativeTag }, `window.__ngNative && window.__ngNative.receive(${message}); true;`);
143
+ void this.native.functions.injectJavaScript.call({ nativeTag }, inOwnPage(source.uri, `window.__ngNative && window.__ngNative.receive(${message});`));
143
144
  }
144
145
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: DomComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
145
146
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: DomComponent, isStandalone: true, selector: "dom-component", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: false, transformFunction: null }, outputs: { classPropertyName: "outputs", publicName: "outputs", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "message": "receive($event)" }, properties: { "source": "source()", "injectedJavaScriptObject": "page()", "webviewDebuggingEnabled": "debuggable" } }, ngImport: i0, template: '', isInline: true });
@@ -174,11 +175,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
174
175
  function isOwnPage(url, source) {
175
176
  if (!url)
176
177
  return false;
177
- const served = /^https?:\/\/[^/?#]+/i.exec(source)?.[0];
178
+ const served = servedFrom(source);
178
179
  if (served)
179
- return url.toLowerCase().startsWith(`${served.toLowerCase()}/`);
180
+ return url.toLowerCase().startsWith(`${served}/`);
180
181
  return /^file:/i.test(url) && fileName(url) === fileName(source);
181
182
  }
183
+ /**
184
+ * A script that runs `call` only where the web view shows the component's own page, by
185
+ * `isOwnPage`'s rule, as the page itself reads its address. The web view runs what it is given
186
+ * in whatever page it is showing, and one a link took it to may define `__ngNative` to be handed
187
+ * the app's inputs, and may replace any method of a string or a pattern to pass a check made with
188
+ * one. So the check reads only what such a page cannot change: `location`'s own properties, a
189
+ * string's length and characters, and `===`.
190
+ */
191
+ function inOwnPage(source, call) {
192
+ const served = servedFrom(source);
193
+ const own = served
194
+ ? `location.origin === ${JSON.stringify(served)}`
195
+ : `location.protocol === 'file:' && (function (path, end) {
196
+ var from = path.length - end.length;
197
+ for (var at = 0; at < end.length; at++) if (path[from + at] !== end[at]) return false;
198
+ return true;
199
+ })(location.pathname, ${JSON.stringify(`/${fileName(source)}`)})`;
200
+ return `if (${own}) { ${call} } true;`;
201
+ }
202
+ /** The origin of the dev server that serves the page, lowercased, as `location.origin` has it. */
203
+ function servedFrom(source) {
204
+ return /^https?:\/\/[^/?#]+/i.exec(source)?.[0]?.toLowerCase();
205
+ }
182
206
  function fileName(url) {
183
207
  return url.split(/[?#]/)[0].split('/').at(-1);
184
208
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dom-component.js","sourceRoot":"","sources":["../src/dom-component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EACL,SAAS,EACT,UAAU,EACV,cAAc,EACd,QAAQ,EACR,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAA8C,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;;AAE3D,yFAAyF;AACzF,gBAAgB,CAAC,eAAe,EAAE,sBAAsB,CAAC,CAAC;AAqC1D,MAAM,OAAO,YAAY;IACvB,+DAA+D;IAC/D,MAAM,CAAU,MAAM,GAAG,IAAI,cAAc,CACzC,mCAAmC,EACnC;QACE,OAAO,EAAE,GAAG,EAAE;YACZ,+EAA+E;YAC/E,+EAA+E;YAC/E,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAA6B,CAAC,CAAC;YACtF,MAAM,IAAI,GAAG,QAAQ,CACnB,GAAG,EAAE,CAAC,OAAO,CAAC,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,MAAM,OAAO,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1C,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,CAAE,OAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;IAChG,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","sourcesContent":["/**\n * `<dom-component>`: an Angular component rendered by a browser - DOM, CSS, anything a browser\n * runs - in a web view inside a native screen, with its inputs and outputs bound from the app's\n * template. Expo calls this a DOM component; it is not the Web Components standard.\n *\n * ```ts\n * // web/note.ts: an ordinary Angular component for the browser, in the app's own source\n * 'use dom';\n * @Component({ selector: 'app-note', template: '<textarea ...></textarea>', styles: [...] })\n * export class Note {\n * readonly label = input('');\n * readonly sent = output<string>();\n * }\n * export default mountInWebView(Note); // from '@ng-native/web/web-view'\n *\n * // a native screen\n * import note from './web/note.ts';\n * <dom-component [src]=\"note\" class=\"flex-1\"\n * [inputs]=\"{ label: title() }\" [outputs]=\"{ sent: save }\" />\n * ```\n *\n * The component runs in Expo's own web view (`@expo/dom-webview`, which `expo` already installs),\n * so it is a separate JavaScript runtime from the app and only JSON crosses. It is shipped the way\n * Expo ships its `'use dom'` components: the import is a reference to a page that Expo's dev server\n * serves in development and `expo export:embed` bundles into the app for a release build (see\n * `@ng-native/metro`'s `dom-component.cjs`), and the page is found where Expo finds its own.\n *\n * - **`inputs`** go into the page before it loads, and a changed value is sent to it afterwards\n * without reloading. Anything sent before the page is ready is sent again once it is.\n * - **`outputs`** map the component's outputs, by public name, to handlers. A name the component\n * has no output for is an error naming the ones it does have, as `<ng-native-island>`'s is.\n * - **Errors** the page throws reach the app's `ErrorHandler`.\n * - **Only its own page is heard.** A message from any other page the web view shows, after a link\n * in the content, say, is ignored, as is one that is not JSON. The inputs given before the page\n * loads are the web view's to hand out, though, and it hands them to whatever page it is showing,\n * so they are no place for a secret.\n */\nimport {\n Component,\n ElementRef,\n InjectionToken,\n computed,\n effect,\n inject,\n input,\n untracked,\n} from '@angular/core';\nimport { Engine, type EngineNode, type NativeSyntheticEvent } from '@ng-native/fabric';\nimport { optional } from './native.ts';\nimport { registerExpoView } from './register-expo-view.ts';\n\n/** The element is this package's, so it needs no `registerExpoViews` call of its own. */\nregisterExpoView('dom-component', 'ExpoDomWebViewModule');\n\n/** A handler for one of the DOM component's outputs. */\nexport type DomComponentOutputHandler = (value: never) => void;\n\n/** The functions Expo's web view defines on its view, called with the view's tag as `this`. */\nexport interface WebViewFunctions {\n injectJavaScript(this: { nativeTag: number }, script: string): Promise<void>;\n}\n\n/** Where the pages are, and how to reach the view once it is on screen. */\nexport interface DomComponentSource {\n /** Where Expo keeps DOM components' pages: the dev server, `www.bundle`, or an update. */\n readonly baseUrl: string | null;\n readonly functions: WebViewFunctions | null;\n}\n\n/** What native code gets for `import note from './web/note.ts'`. */\nexport interface DomComponentReference {\n readonly domComponent: string;\n}\n\ntype PageMessage =\n | { type: 'ready'; outputs: string[] }\n | { type: 'output'; name: string; value: unknown }\n | { type: 'error'; message: string };\n\n@Component({\n selector: 'dom-component',\n template: '',\n host: {\n '[source]': 'source()',\n '[injectedJavaScriptObject]': 'page()',\n '[webviewDebuggingEnabled]': 'debuggable',\n '(message)': 'receive($event)',\n },\n})\nexport class DomComponent {\n /** Overridden in a test to load pages without a dev server. */\n static readonly SOURCE = new InjectionToken<DomComponentSource>(\n 'angular-native.domComponentSource',\n {\n factory: () => {\n // Expo's own resolution, so a page is found wherever Expo would look for a DOM\n // component's: the dev server, the app's `www.bundle`, or a downloaded update.\n const base = optional(() => require('expo/src/dom/base') as { getBaseURL(): string });\n const core = optional(\n () => require('expo-modules-core') as typeof import('expo-modules-core'),\n );\n const module = core?.requireOptionalNativeModule<{\n ViewPrototypes?: Record<string, WebViewFunctions>;\n }>('ExpoDomWebViewModule');\n return {\n baseUrl: optional(() => base?.getBaseURL() ?? null),\n functions: module?.ViewPrototypes?.['ExpoDomWebViewModule'] ?? null,\n };\n },\n },\n );\n\n private readonly native = inject(DomComponent.SOURCE);\n private readonly engine = inject(Engine);\n private readonly node = inject<ElementRef<EngineNode>>(ElementRef).nativeElement;\n private ready = false;\n\n /** The DOM component, as imported: `import note from './web/note.ts'`. */\n readonly src = input.required<DomComponentReference>();\n /** Its inputs, by public name. JSON only: this crosses into another runtime. */\n readonly inputs = input<Readonly<Record<string, unknown>>>({});\n /** Handlers for its outputs, by public name. */\n readonly outputs = input<Readonly<Record<string, DomComponentOutputHandler>>>({});\n\n protected readonly debuggable = typeof __DEV__ === 'undefined' || __DEV__;\n\n protected readonly source = computed(() => {\n const { domComponent } = this.src();\n return this.native.baseUrl === null ? null : { uri: `${this.native.baseUrl}/${domComponent}` };\n });\n\n /** The file's name for an error message: the dev page names it, a release page is a hash. */\n private readonly name = computed(() => this.src().domComponent.split('?')[0]!);\n\n /**\n * What the page reads before it loads. The inputs are read untracked: a change to this prop\n * reloads the page, so a changed input is sent to the running page instead.\n */\n protected readonly page = computed(() => {\n this.src();\n return JSON.stringify({ inputs: untracked(this.inputs) });\n });\n\n constructor() {\n effect(() => {\n const inputs = this.inputs();\n if (this.ready) untracked(() => this.send(inputs));\n });\n }\n\n protected receive(event: NativeSyntheticEvent<{ data: string; url?: string }>): void {\n const { data, url } = event.nativeEvent;\n const source = this.source();\n if (!source || !isOwnPage(url, source.uri)) {\n if (this.debuggable) {\n console.warn(\n `[angular-native] <dom-component> ${this.name()}: ignored a message from ` +\n `${url || 'an unnamed page'}, which is not its own page.`,\n );\n }\n return;\n }\n const message = parse(data);\n if (!message) {\n if (this.debuggable) {\n console.warn(\n `[angular-native] <dom-component> ${this.name()}: dropped a message that is not JSON.`,\n );\n }\n return;\n }\n if (message.type === 'ready') {\n this.checkOutputs(message.outputs);\n this.ready = true;\n this.send(this.inputs());\n } else if (message.type === 'output') {\n const outputs = this.outputs();\n if (Object.hasOwn(outputs, message.name)) outputs[message.name]!(message.value as never);\n } else if (message.type === 'error') {\n throw new Error(`[angular-native] <dom-component> ${this.name()}: ${message.message}`);\n }\n }\n\n private checkOutputs(declared: readonly string[]): void {\n for (const name of Object.keys(this.outputs())) {\n if (!declared.includes(name)) {\n throw new Error(\n `[angular-native] <dom-component>: ${this.name()} has no output '${name}' ` +\n `(its outputs: ${declared.join(', ') || 'none'}).`,\n );\n }\n }\n }\n\n private send(inputs: Readonly<Record<string, unknown>>): void {\n const nativeTag = this.engine.tagOf(this.node);\n if (!this.native.functions || nativeTag === null) return;\n const message = JSON.stringify({ type: 'inputs', inputs });\n void this.native.functions.injectJavaScript.call(\n { nativeTag },\n `window.__ngNative && window.__ngNative.receive(${message}); true;`,\n );\n }\n}\n\n/**\n * Whether the page a message came from is the one the component loaded, so a page the web view\n * was taken to (by a link in the content, say) cannot fire the app's outputs or ask for its inputs.\n *\n * The web view names the page it is showing, not the frame that posted, so this tells pages apart\n * and not an iframe from the page that holds it. Every message is named on both platforms, from\n * the web view's own URL; one with no URL cannot be placed, so it is not trusted either.\n *\n * - **Served by the dev server**, the page is trusted by origin: that server serves the app itself.\n * - **Loaded from a file** in a release build or an update, the page is trusted by file name. The\n * web view reports the file as the native side resolved it, which differs from the source URI\n * before the name (on iOS the source is `www.bundle/...`, relative to the app), so the page must\n * be a `file:` URL whose file name is the source's, a hash of the component's path.\n */\nfunction isOwnPage(url: string | undefined, source: string): boolean {\n if (!url) return false;\n const served = /^https?:\\/\\/[^/?#]+/i.exec(source)?.[0];\n if (served) return url.toLowerCase().startsWith(`${served.toLowerCase()}/`);\n return /^file:/i.test(url) && fileName(url) === fileName(source);\n}\n\nfunction fileName(url: string): string {\n return url.split(/[?#]/)[0]!.split('/').at(-1)!;\n}\n\nfunction parse(data: string): PageMessage | undefined {\n try {\n const message: unknown = JSON.parse(data);\n return typeof message === 'object' && message !== null ? (message as PageMessage) : undefined;\n } catch {\n return undefined;\n }\n}\n\ndeclare const __DEV__: boolean | undefined;\n"]}
1
+ {"version":3,"file":"dom-component.js","s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AAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC;AAClD,CAAC;AAED,SAAS,KAAK,CAAC,IAAY;IACzB,IAAI,CAAC;QACH,MAAM,OAAO,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1C,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,CAAE,OAAuB,CAAC,CAAC,CAAC,SAAS,CAAC;IAChG,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","sourcesContent":["/**\n * `<dom-component>`: an Angular component rendered by a browser - DOM, CSS, anything a browser\n * runs - in a web view inside a native screen, with its inputs and outputs bound from the app's\n * template. Expo calls this a DOM component; it is not the Web Components standard.\n *\n * ```ts\n * // web/note.ts: an ordinary Angular component for the browser, in the app's own source\n * 'use dom';\n * @Component({ selector: 'app-note', template: '<textarea ...></textarea>', styles: [...] })\n * export class Note {\n * readonly label = input('');\n * readonly sent = output<string>();\n * }\n * export default mountInWebView(Note); // from '@ng-native/web/web-view'\n *\n * // a native screen\n * import note from './web/note.ts';\n * <dom-component [src]=\"note\" class=\"flex-1\"\n * [inputs]=\"{ label: title() }\" [outputs]=\"{ sent: save }\" />\n * ```\n *\n * The component runs in Expo's own web view (`@expo/dom-webview`, which `expo` already installs),\n * so it is a separate JavaScript runtime from the app and only JSON crosses. It is shipped the way\n * Expo ships its `'use dom'` components: the import is a reference to a page that Expo's dev server\n * serves in development and `expo export:embed` bundles into the app for a release build (see\n * `@ng-native/metro`'s `dom-component.cjs`), and the page is found where Expo finds its own.\n *\n * - **`inputs`** go into the page before it loads, and a changed value is sent to it afterwards\n * without reloading. Anything sent before the page is ready is sent again once it is.\n * - **`outputs`** map the component's outputs, by public name, to handlers. A name the component\n * has no output for is an error naming the ones it does have, as `<ng-native-island>`'s is.\n * - **Errors** the page throws reach the app's `ErrorHandler`.\n * - **Only its own page is heard.** A message from any other page the web view shows, after a link\n * in the content, say, is ignored, as is one that is not JSON, and a changed input is sent to\n * its own page alone. The inputs given before the page loads are the web view's to hand out,\n * though, and it hands them to whatever page it is showing, so they are no place for a secret.\n */\nimport {\n Component,\n ElementRef,\n InjectionToken,\n computed,\n effect,\n inject,\n input,\n untracked,\n} from '@angular/core';\nimport { Engine, type EngineNode, type NativeSyntheticEvent } from '@ng-native/fabric';\nimport { optional } from './native.ts';\nimport { registerExpoView } from './register-expo-view.ts';\n\n/** The element is this package's, so it needs no `registerExpoViews` call of its own. */\nregisterExpoView('dom-component', 'ExpoDomWebViewModule');\n\n/** A handler for one of the DOM component's outputs. */\nexport type DomComponentOutputHandler = (value: never) => void;\n\n/** The functions Expo's web view defines on its view, called with the view's tag as `this`. */\nexport interface WebViewFunctions {\n injectJavaScript(this: { nativeTag: number }, script: string): Promise<void>;\n}\n\n/** Where the pages are, and how to reach the view once it is on screen. */\nexport interface DomComponentSource {\n /** Where Expo keeps DOM components' pages: the dev server, `www.bundle`, or an update. */\n readonly baseUrl: string | null;\n readonly functions: WebViewFunctions | null;\n}\n\n/** What native code gets for `import note from './web/note.ts'`. */\nexport interface DomComponentReference {\n readonly domComponent: string;\n}\n\ntype PageMessage =\n | { type: 'ready'; outputs: string[] }\n | { type: 'output'; name: string; value: unknown }\n | { type: 'error'; message: string };\n\n@Component({\n selector: 'dom-component',\n template: '',\n host: {\n '[source]': 'source()',\n '[injectedJavaScriptObject]': 'page()',\n '[webviewDebuggingEnabled]': 'debuggable',\n '(message)': 'receive($event)',\n },\n})\nexport class DomComponent {\n /** Overridden in a test to load pages without a dev server. */\n static readonly SOURCE = new InjectionToken<DomComponentSource>(\n 'angular-native.domComponentSource',\n {\n factory: () => {\n // Expo's own resolution, so a page is found wherever Expo would look for a DOM\n // component's: the dev server, the app's `www.bundle`, or a downloaded update.\n const base = optional(() => require('expo/src/dom/base') as { getBaseURL(): string });\n const core = optional(\n () => require('expo-modules-core') as typeof import('expo-modules-core'),\n );\n const module = core?.requireOptionalNativeModule<{\n ViewPrototypes?: Record<string, WebViewFunctions>;\n }>('ExpoDomWebViewModule');\n return {\n baseUrl: optional(() => base?.getBaseURL() ?? null),\n functions: module?.ViewPrototypes?.['ExpoDomWebViewModule'] ?? null,\n };\n },\n },\n );\n\n private readonly native = inject(DomComponent.SOURCE);\n private readonly engine = inject(Engine);\n private readonly node = inject<ElementRef<EngineNode>>(ElementRef).nativeElement;\n private ready = false;\n\n /** The DOM component, as imported: `import note from './web/note.ts'`. */\n readonly src = input.required<DomComponentReference>();\n /** Its inputs, by public name. JSON only: this crosses into another runtime. */\n readonly inputs = input<Readonly<Record<string, unknown>>>({});\n /** Handlers for its outputs, by public name. */\n readonly outputs = input<Readonly<Record<string, DomComponentOutputHandler>>>({});\n\n protected readonly debuggable = typeof __DEV__ === 'undefined' || __DEV__;\n\n protected readonly source = computed(() => {\n const { domComponent } = this.src();\n return this.native.baseUrl === null ? null : { uri: `${this.native.baseUrl}/${domComponent}` };\n });\n\n /** The file's name for an error message: the dev page names it, a release page is a hash. */\n private readonly name = computed(() => this.src().domComponent.split('?')[0]!);\n\n /**\n * What the page reads before it loads. The inputs are read untracked: a change to this prop\n * reloads the page, so a changed input is sent to the running page instead.\n */\n protected readonly page = computed(() => {\n this.src();\n return JSON.stringify({ inputs: untracked(this.inputs) });\n });\n\n constructor() {\n effect(() => {\n const inputs = this.inputs();\n if (this.ready) untracked(() => this.send(inputs));\n });\n }\n\n protected receive(event: NativeSyntheticEvent<{ data: string; url?: string }>): void {\n const { data, url } = event.nativeEvent;\n const source = this.source();\n if (!source || !isOwnPage(url, source.uri)) {\n if (this.debuggable) {\n console.warn(\n `[angular-native] <dom-component> ${this.name()}: ignored a message from ` +\n `${url || 'an unnamed page'}, which is not its own page.`,\n );\n }\n return;\n }\n const message = parse(data);\n if (!message) {\n if (this.debuggable) {\n console.warn(\n `[angular-native] <dom-component> ${this.name()}: dropped a message that is not JSON.`,\n );\n }\n return;\n }\n if (message.type === 'ready') {\n this.checkOutputs(message.outputs);\n this.ready = true;\n this.send(this.inputs());\n } else if (message.type === 'output') {\n const outputs = this.outputs();\n if (Object.hasOwn(outputs, message.name)) outputs[message.name]!(message.value as never);\n } else if (message.type === 'error') {\n throw new Error(`[angular-native] <dom-component> ${this.name()}: ${message.message}`);\n }\n }\n\n private checkOutputs(declared: readonly string[]): void {\n for (const name of Object.keys(this.outputs())) {\n if (!declared.includes(name)) {\n throw new Error(\n `[angular-native] <dom-component>: ${this.name()} has no output '${name}' ` +\n `(its outputs: ${declared.join(', ') || 'none'}).`,\n );\n }\n }\n }\n\n private send(inputs: Readonly<Record<string, unknown>>): void {\n const nativeTag = this.engine.tagOf(this.node);\n const source = this.source();\n if (!this.native.functions || nativeTag === null || !source) return;\n const message = JSON.stringify({ type: 'inputs', inputs });\n void this.native.functions.injectJavaScript.call(\n { nativeTag },\n inOwnPage(source.uri, `window.__ngNative && window.__ngNative.receive(${message});`),\n );\n }\n}\n\n/**\n * Whether the page a message came from is the one the component loaded, so a page the web view\n * was taken to (by a link in the content, say) cannot fire the app's outputs or ask for its inputs.\n *\n * The web view names the page it is showing, not the frame that posted, so this tells pages apart\n * and not an iframe from the page that holds it. Every message is named on both platforms, from\n * the web view's own URL; one with no URL cannot be placed, so it is not trusted either.\n *\n * - **Served by the dev server**, the page is trusted by origin: that server serves the app itself.\n * - **Loaded from a file** in a release build or an update, the page is trusted by file name. The\n * web view reports the file as the native side resolved it, which differs from the source URI\n * before the name (on iOS the source is `www.bundle/...`, relative to the app), so the page must\n * be a `file:` URL whose file name is the source's, a hash of the component's path.\n */\nfunction isOwnPage(url: string | undefined, source: string): boolean {\n if (!url) return false;\n const served = servedFrom(source);\n if (served) return url.toLowerCase().startsWith(`${served}/`);\n return /^file:/i.test(url) && fileName(url) === fileName(source);\n}\n\n/**\n * A script that runs `call` only where the web view shows the component's own page, by\n * `isOwnPage`'s rule, as the page itself reads its address. The web view runs what it is given\n * in whatever page it is showing, and one a link took it to may define `__ngNative` to be handed\n * the app's inputs, and may replace any method of a string or a pattern to pass a check made with\n * one. So the check reads only what such a page cannot change: `location`'s own properties, a\n * string's length and characters, and `===`.\n */\nfunction inOwnPage(source: string, call: string): string {\n const served = servedFrom(source);\n const own = served\n ? `location.origin === ${JSON.stringify(served)}`\n : `location.protocol === 'file:' && (function (path, end) {\n var from = path.length - end.length;\n for (var at = 0; at < end.length; at++) if (path[from + at] !== end[at]) return false;\n return true;\n })(location.pathname, ${JSON.stringify(`/${fileName(source)}`)})`;\n return `if (${own}) { ${call} } true;`;\n}\n\n/** The origin of the dev server that serves the page, lowercased, as `location.origin` has it. */\nfunction servedFrom(source: string): string | undefined {\n return /^https?:\\/\\/[^/?#]+/i.exec(source)?.[0]?.toLowerCase();\n}\n\nfunction fileName(url: string): string {\n return url.split(/[?#]/)[0]!.split('/').at(-1)!;\n}\n\nfunction parse(data: string): PageMessage | undefined {\n try {\n const message: unknown = JSON.parse(data);\n return typeof message === 'object' && message !== null ? (message as PageMessage) : undefined;\n } catch {\n return undefined;\n }\n}\n\ndeclare const __DEV__: boolean | undefined;\n"]}
@@ -967,9 +967,13 @@ export declare class UiBottomSheet {
967
967
  */
968
968
  readonly backgroundInteraction: import("@angular/core").InputSignal<UiBottomSheetBackgroundInteraction | undefined>;
969
969
  /**
970
- * More SwiftUI modifiers, iOS only, after the sheet's own on the `ui-group` around its content,
971
- * where SwiftUI reads presentation modifiers from: `presentationCornerRadius`, for one. They
972
- * apply to the content too. Android takes no notice of them.
970
+ * More SwiftUI modifiers, iOS only, for presentation modifiers such as `presentationCornerRadius`
971
+ * and for ones that apply to the content, such as `ignoreSafeArea`. Where the content is in a
972
+ * navigation stack (the build has SwiftUI's toolbar and the sheet is not sized to its content)
973
+ * they are on the `ui-zstack` inside that stack, since the stack sets up the safe area again for
974
+ * what is inside it, and a content modifier such as `background` or `padding` applies below the
975
+ * sheet's bar, where it has one. Otherwise they are after the sheet's own on the `ui-group`
976
+ * around its content. Android takes no notice of them.
973
977
  */
974
978
  readonly modifiers: import("@angular/core").InputSignal<readonly UiModifier[] | undefined>;
975
979
  /**
@@ -1845,9 +1845,13 @@ export class UiBottomSheet {
1845
1845
  backgroundInteraction = input(/* @ts-ignore */
1846
1846
  ...(ngDevMode ? [undefined, { debugName: "backgroundInteraction" }] : /* istanbul ignore next */ []));
1847
1847
  /**
1848
- * More SwiftUI modifiers, iOS only, after the sheet's own on the `ui-group` around its content,
1849
- * where SwiftUI reads presentation modifiers from: `presentationCornerRadius`, for one. They
1850
- * apply to the content too. Android takes no notice of them.
1848
+ * More SwiftUI modifiers, iOS only, for presentation modifiers such as `presentationCornerRadius`
1849
+ * and for ones that apply to the content, such as `ignoreSafeArea`. Where the content is in a
1850
+ * navigation stack (the build has SwiftUI's toolbar and the sheet is not sized to its content)
1851
+ * they are on the `ui-zstack` inside that stack, since the stack sets up the safe area again for
1852
+ * what is inside it, and a content modifier such as `background` or `padding` applies below the
1853
+ * sheet's bar, where it has one. Otherwise they are after the sheet's own on the `ui-group`
1854
+ * around its content. Android takes no notice of them.
1851
1855
  */
1852
1856
  modifiers = input(/* @ts-ignore */
1853
1857
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
@@ -1923,7 +1927,7 @@ export class UiBottomSheet {
1923
1927
  ? [{ $type: 'interactiveDismissDisabled', isDisabled: true }]
1924
1928
  : []),
1925
1929
  ...this.interaction(),
1926
- ...(this.modifiers() ?? []),
1930
+ ...(this.stacked() ? [] : (this.modifiers() ?? [])),
1927
1931
  ], /* @ts-ignore */
1928
1932
  ...(ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []));
1929
1933
  /** Whether the screen behind the sheet takes touches, in `@expo/ui`'s shape, where one is set. */
@@ -2090,7 +2094,7 @@ export class UiBottomSheet {
2090
2094
  <ui-group [modifiers]="presentation()">
2091
2095
  @if (stacked()) {
2092
2096
  <ui-navigation-stack>
2093
- <ui-zstack>
2097
+ <ui-zstack [modifiers]="modifiers()">
2094
2098
  <ui-toolbar [modifiers]="inlineTitle">
2095
2099
  <ui-spacer />
2096
2100
  <ui-slot name="content"><ng-content select="ui-toolbar-item" /></ui-slot>
@@ -2159,7 +2163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
2159
2163
  <ui-group [modifiers]="presentation()">
2160
2164
  @if (stacked()) {
2161
2165
  <ui-navigation-stack>
2162
- <ui-zstack>
2166
+ <ui-zstack [modifiers]="modifiers()">
2163
2167
  <ui-toolbar [modifiers]="inlineTitle">
2164
2168
  <ui-spacer />
2165
2169
  <ui-slot name="content"><ng-content select="ui-toolbar-item" /></ui-slot>
@@ -1 +1 @@
1
- {"version":3,"file":"expo-ui-components.js","sourceRoot":"","sources":["../src/expo-ui-components.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,cAAc,EACd,QAAQ,EAER,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,MAAM,EACN,MAAM,EACN,KAAK,EACL,YAAY,EACZ,KAAK,EACL,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,MAAM,EAEN,UAAU,EAGV,cAAc,EACd,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAoC,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;;AAQhG;;;GAGG;AACH,SAAS,UAAU;IACjB,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAC;IACjD,OAAO,IAAI,CAAC;AAC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;;;;;;;;;;;;;;;;;;;;;;;;GAmDT,4DA9DC,oBAAoB,yFACpB,iBAAiB,2QA/JR,OAAO,4EA73CP,MAAM,+HA24CN,iBAAiB,uFAzuCjB,MAAM,oFAi+BN,QAAQ,6EAuRR,SAAS,8EAt1CT,UAAU,+GA0mCV,QAAQ;;2FA8aR,aAAa;kBApEzB,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE;wBACP,oBAAoB;wBACpB,iBAAiB;wBACjB,OAAO;wBACP,MAAM;wBACN,iBAAiB;wBACjB,MAAM;wBACN,QAAQ;wBACR,SAAS;wBACT,UAAU;wBACV,QAAQ;qBACT;oBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDT;oBACD,IAAI,EAAE,EAAE,kBAAkB,EAAE,YAAY,EAAE;iBAC3C;6FAwCqE,OAAO,OAAE;4BAC3E,IAAI,EAAE,UAAU;yBACjB,giCAyD+C,aAAa","sourcesContent":["/**\n * Typed components for the `@expo/ui` views an app reaches for most, named and shaped as SwiftUI's.\n *\n * `EXPO_UI_VIEWS` makes every view reachable by name, and a name is all the renderer needs. What a\n * name cannot give is a type: under strict templates an unknown element is an error, and so is\n * each prop on it. These are the same elements, claimed by a component whose inputs carry the\n * props' types and whose host bindings pass each one straight to the node, so nothing changes at\n * runtime. An unset input stays `undefined` and never reaches native.\n *\n * Events are declared as outputs so that `$event` is typed. SwiftUI's events are never emitted:\n * Angular binds a template's `(dateChange)` to the output *and* to the element, and it is the\n * element's own event that arrives, once. Emitting from a host listener as well would deliver it\n * twice; a host listener of the same name as the output listens to the output itself and recurses.\n * So subscribe in a template, not to the output in code.\n *\n * Where Compose names a prop or an event differently, a component sends Android its own names and\n * emits the output from a host listener for Compose's event, which SwiftUI never sends. Only a few\n * do: the toggle, slider, button, progress, stacks and slot, and the date picker.\n *\n * Only the views and props an app has needed are here; the rest stay names, as before. Add a view\n * when a template wants it typed, from `@expo/ui`'s own props for it.\n *\n * Still register the names with `registerExpoUiViews`: the component types the element, the\n * registration is what makes it commit as the SwiftUI or Compose view.\n */\nimport {\n Component,\n DestroyRef,\n forwardRef,\n ElementRef,\n InjectionToken,\n Injector,\n type Signal,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n linkedSignal,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport type { NativeState } from './native-state.ts';\nimport {\n Engine,\n type EngineNode,\n HostEngine,\n type HostNode,\n type NativeSyntheticEvent,\n keepNativeView,\n nativePlatform,\n} from '@ng-native/fabric';\nimport { optional } from './native.ts';\nimport { optionalBoolean, optionalNumber } from './transforms.ts';\nimport { UiBottomSheetContent } from './ui-bottom-sheet-content.ts';\nimport { type UiBottomSheetPresentedEvent, UiBottomSheetView } from './ui-bottom-sheet-view.ts';\n\n/** One SwiftUI modifier, as `@expo/ui`'s modifier functions build them: `{ $type: 'frame', ... }`. */\nexport interface UiModifier {\n readonly $type: string;\n readonly [key: string]: unknown;\n}\n\n/**\n * Says the component's host is the `@expo/ui` view its selector is registered as. A component of\n * an app's own with a `ui-` selector does not, and its host is a plain view.\n */\nfunction nativeView(): true {\n keepNativeView(inject(ElementRef).nativeElement);\n return true;\n}\n\n/**\n * The bridge from Yoga's layout to SwiftUI's; every other `ui-*` view goes inside one.\n * `matchContents` sizes the host to the SwiftUI content rather than the other way round, on both\n * axes or on the ones named. Native reads a flag per axis, which is what this splits it into, as\n * `@expo/ui`'s own `Host` does: without them the host has no size of its own, and the control\n * drawn in it spills outside it, where it can be seen but not touched or read by VoiceOver.\n */\n@Component({\n selector: 'ui-host',\n template: '<ng-content />',\n host: {\n '[matchContentsVertical]': 'matchVertical()',\n '[matchContentsHorizontal]': 'matchHorizontal()',\n '[ignoreSafeArea]': 'android ? undefined : ignoreSafeArea()',\n '[useViewportSizeMeasurement]': 'useViewportSizeMeasurement()',\n },\n})\nexport class UiHost {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly matchContents = input<\n boolean | { readonly vertical?: boolean; readonly horizontal?: boolean }\n >();\n protected readonly matchVertical = computed(() => {\n const match = this.matchContents();\n return typeof match === 'object' ? match.vertical : match;\n });\n protected readonly matchHorizontal = computed(() => {\n const match = this.matchContents();\n return typeof match === 'object' ? match.horizontal : match;\n });\n /** The safe area SwiftUI's host ignores, iOS only: Compose's host has no such prop. */\n readonly ignoreSafeArea = input<'all' | 'keyboard' | 'container'>();\n readonly useViewportSizeMeasurement = input<boolean>(undefined, { transform: optionalBoolean });\n}\n\n/** A SwiftUI `Menu`. Its trigger is the `label` or a `<ui-slot name=\"label\">`; its items are children. */\n@Component({\n selector: 'ui-menu',\n template: '<ng-content />',\n host: {\n '[label]': 'android ? undefined : label()',\n '[systemImage]': 'android ? undefined : systemImage()',\n '[modifiers]': 'android ? modifiers() : resolvedModifiers()',\n },\n})\nexport class UiMenu {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly label = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n /** What VoiceOver reads for the menu's trigger: SwiftUI's `accessibilityLabel` modifier. */\n readonly accessibilityLabel = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly resolvedModifiers = computed(() =>\n withModifiers(this.modifiers(), spokenLabel(this.accessibilityLabel())),\n );\n}\n\n/**\n * Views of the app's own inside SwiftUI or Compose content: the way back from a `ui-host`. What\n * it holds is laid out by the engine, as anywhere else, and takes presses as anywhere else, so a\n * row drawn with the app's own components can be a context menu's trigger or a sheet's body.\n *\n * It holds one element. `matchContents` sizes it to that element, both ways: the element needs a\n * width of its own, since nothing here stretches it. Without `matchContents` it fills what the\n * SwiftUI or Compose view around it offers, which inside a view sized to its content is a width\n * and no height.\n */\n@Component({\n selector: 'ui-view-host',\n template: '<ng-content />',\n host: {\n // `@expo/ui` to 57.0.22 reads `matchContents`, and from 57.0.23 one prop for each axis.\n '[matchContents]': 'matchContents()',\n '[matchContentsHorizontal]': 'matchContents()',\n '[matchContentsVertical]': 'matchContents()',\n '[expoInternalSizeFromChildren]': 'matchContents()',\n '[layoutRoot]': 'layoutRoot()',\n // SwiftUI's view host takes no modifiers; Compose's does.\n '[modifiers]': 'android ? modifiers() : undefined',\n },\n})\nexport class UiViewHost {\n protected readonly android = nativePlatform() === 'android';\n protected readonly nativeView = nativeView();\n readonly matchContents = input<boolean>(undefined, { transform: optionalBoolean });\n /**\n * For content presented in a window of its own, a sheet or a popover, where nothing above it\n * delivers its touches: it then takes them itself, and is measured from itself.\n */\n readonly layoutRoot = input<boolean>(undefined, { transform: optionalBoolean });\n /** Compose's modifiers for the view host, Android only: SwiftUI's view host takes none. */\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `contextMenu`: the menu a long press on its trigger opens, with the trigger lifted\n * over the dimmed screen. iOS only.\n *\n * Its content is three slots: `<ui-slot name=\"trigger\">` is what is always shown,\n * `<ui-slot name=\"items\">` holds the `ui-button`s, `ui-divider`s and `ui-section`s of the menu, and\n * `<ui-slot name=\"preview\">`, when there is one, is shown above the open menu in place of the\n * trigger. All three are SwiftUI content, as everything inside a `ui-host` is.\n */\n@Component({\n selector: 'ui-context-menu',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiContextMenu {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `Button`, as a menu item or on its own, or Compose's on Android, which draws `label` as\n * text inside it. `systemImage` and `role` are SwiftUI's alone. A `close` button with no label and\n * no content is the system's own close button, from iOS 26.\n */\n@Component({\n selector: 'ui-button',\n imports: [forwardRef(() => UiText)],\n template: `@if (android && label()) {\n <ui-text [text]=\"label()\" />\n }\n <ng-content />`,\n host: {\n '(buttonPressed)': 'android && buttonPress.emit($event)',\n '[label]': 'android ? undefined : label()',\n '[systemImage]': 'android ? undefined : systemImage()',\n '[role]': 'android ? undefined : role()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiButton {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly label = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n readonly role = input<'default' | 'cancel' | 'destructive' | 'close'>();\n /**\n * In a home-screen widget's or a Live Activity's layout, what a tap on it hands the app: see\n * `@ng-native/expo/widget` and `@ng-native/expo/live-activity`. The layout's build reads it, so\n * an app's own button is not sent it: `@expo/ui`'s button there has no target.\n */\n readonly target = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n readonly buttonPress = output<NativeSyntheticEvent<Record<string, never>>>();\n}\n\n/** A SwiftUI `Divider`, or Compose's `HorizontalDivider`: a separator between groups of items. */\n@Component({\n selector: 'ui-divider',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiDivider {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * Content for a named slot of its parent view, such as a menu's `label`. `extraProps` is what\n * the slot tells its parent about itself: a `ui-swipe-actions` group's `edge` and\n * `allowsFullSwipe`.\n */\n@Component({\n selector: 'ui-slot',\n template: '<ng-content />',\n host: {\n '[name]': 'android ? undefined : name()',\n '[slotName]': 'android ? name() : undefined',\n '[extraProps]': 'android ? undefined : extraProps()',\n },\n})\nexport class UiSlot {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly name = input.required<string>();\n /** What the slot tells its SwiftUI parent about itself, iOS only. */\n readonly extraProps = input<Readonly<Record<string, unknown>>>();\n}\n\n/**\n * A SwiftUI `List`: rows as SwiftUI lays them out, which is what lets a row take the system's own\n * swipe actions through `ui-swipe-actions`.\n */\n@Component({\n selector: 'ui-list',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiList {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * How far a finger goes sideways, and further than it goes down, before a row's swipe actions take\n * the touch. SwiftUI's own row button still taps at about 20 points and its actions come out by\n * about 30.\n */\nconst SWIPE_SLOP = 20;\n\n/**\n * Take a sideways drag from what holds the touch inside the row, as SwiftUI does: its list moves\n * the row and never taps it. Native sends the app's views inside the row no cancel, since React\n * Native's touch handler runs beside the list's gestures rather than giving way to them, so the\n * row's own responder asks for the drag, and a `pressable` that gives it up does not press.\n */\nfunction takeSidewaysDrag(): void {\n const node = inject(ElementRef).nativeElement as HostNode;\n const engine = node.engine ?? inject(HostEngine);\n let from: { x: number; y: number } | null = null;\n const stop = engine.setResponder(node, {\n onStartShouldSetResponderCapture: (event) => {\n from = { x: event.nativeEvent.pageX ?? 0, y: event.nativeEvent.pageY ?? 0 };\n return false;\n },\n onMoveShouldSetResponderCapture: (event) => {\n if (!from) return false;\n const across = Math.abs((event.nativeEvent.pageX ?? from.x) - from.x);\n const down = Math.abs((event.nativeEvent.pageY ?? from.y) - from.y);\n return across >= SWIPE_SLOP && across > down;\n },\n });\n inject(DestroyRef).onDestroy(stop);\n}\n\n/**\n * The system's swipe actions on a list row, iOS only. The first child is the row; the actions go\n * in `<ui-slot name=\"actions\" [extraProps]=\"{ edge: 'trailing', allowsFullSwipe: true }\">`, one\n * slot per edge, as `ui-button`s. A sideways drag on the row is the swipe's, so a `pressable` in a\n * `ui-view-host` in the row does not press for it.\n */\n@Component({\n selector: 'ui-swipe-actions',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiSwipeActions {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n\n constructor() {\n if (nativePlatform() !== 'android') takeSidewaysDrag();\n }\n}\n\n/** What `ui-slider` sends as the thumb moves: its new value. */\nexport type UiSliderChangeEvent = NativeSyntheticEvent<{ readonly value: number }>;\n\n/**\n * A SwiftUI `Slider`, or Compose's on Android. `valueChanged` reports each new value as the thumb\n * moves; note the d, which SwiftUI's event has and `@expo/ui`'s React prop does not.\n */\n@Component({\n selector: 'ui-slider',\n template: '',\n host: {\n '[value]': 'value()',\n '[min]': 'min()',\n '[max]': 'max()',\n '[step]': 'android ? undefined : stepSize()',\n '[steps]': 'android ? stepsBetween() : undefined',\n '[modifiers]': 'modifiers()',\n '(valueChange)': 'android && valueChanged.emit($event)',\n },\n})\nexport class UiSlider {\n protected readonly nativeView = nativeView();\n readonly value = input<number>(undefined, { transform: optionalNumber });\n readonly min = input<number>(undefined, { transform: optionalNumber });\n readonly max = input<number>(undefined, { transform: optionalNumber });\n /** How many steps the range is divided into; none moves the thumb continuously. */\n readonly steps = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n readonly valueChanged = output<UiSliderChangeEvent>();\n\n protected readonly android = nativePlatform() === 'android';\n /** A whole number of steps, which is all Compose can draw. */\n private readonly wholeSteps = computed(() => {\n const steps = Math.round(this.steps() ?? 0);\n return steps > 0 ? steps : undefined;\n });\n /** SwiftUI takes a step size, and draws 0 to 1 unless it has both ends. */\n protected readonly stepSize = computed(() => {\n const steps = this.wholeSteps();\n const min = this.min();\n const max = this.max();\n return steps && (min !== undefined && max !== undefined ? max - min : 1) / steps;\n });\n /** Compose takes the number of points between the ends. */\n protected readonly stepsBetween = computed(() => {\n const steps = this.wholeSteps();\n return steps && steps - 1;\n });\n}\n\n/**\n * A SwiftUI `VStack`, or Compose's `Column` on Android, centred, as SwiftUI's is, unless `alignment`\n * says otherwise. Without `spacing`, SwiftUI puts its own default spacing between children and Compose\n * puts none.\n */\n@Component({\n selector: 'ui-vstack',\n template: '<ng-content />',\n host: {\n '[alignment]': 'android ? undefined : alignment()',\n '[spacing]': 'android ? undefined : spacing()',\n '[verticalArrangement]': 'android ? spacedBy(spacing()) : undefined',\n '[horizontalAlignment]': 'android ? composeAlignment(alignment()) : undefined',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiVStack {\n protected readonly nativeView = nativeView();\n readonly alignment = input<'leading' | 'center' | 'trailing'>();\n readonly spacing = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly android = nativePlatform() === 'android';\n protected readonly spacedBy = spacedBy;\n protected composeAlignment(alignment: 'leading' | 'center' | 'trailing' | undefined) {\n return alignment === 'leading' ? 'start' : alignment === 'trailing' ? 'end' : 'center';\n }\n}\n\n/**\n * A SwiftUI `Image`: an SF Symbol by `systemName`, a symbol or picture in the asset catalog by\n * `assetName`, or a picture by `uiImage`, the URL of a file on the device.\n */\n@Component({\n selector: 'ui-image',\n template: '',\n host: {\n '[systemName]': 'android ? undefined : systemName()',\n '[assetName]': 'android ? undefined : assetName()',\n '[uiImage]': 'android ? undefined : uiImage()',\n '[modifiers]': 'android ? modifiers() : resolvedModifiers()',\n },\n})\nexport class UiImage {\n protected readonly nativeView = nativeView();\n /** Compose's image is another control, which takes a `source`: none of these are its. */\n protected readonly android = nativePlatform() === 'android';\n readonly systemName = input<string>();\n readonly assetName = input<string>();\n readonly uiImage = input<string>();\n /**\n * A symbol's size in points, as a `font` modifier of that size, which does not scale with\n * Dynamic Type. A `font` modifier in `modifiers` wins over it. Without either, the symbol is\n * SwiftUI's default size, where `@expo/ui`'s own `Image` and a widget layout draw it at 24.\n */\n readonly size = input<number>(undefined, { transform: optionalNumber });\n /** A symbol's colour, as a `foregroundStyle` modifier. */\n readonly color = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n /** SwiftUI's image reads neither `size` nor `color`: `@expo/ui`'s `Image` makes them modifiers. */\n protected readonly resolvedModifiers = computed(() => {\n const modifiers = this.modifiers();\n const size = this.size();\n const hasFont = modifiers?.some((modifier) => modifier.$type === 'font');\n return withModifiers(\n modifiers,\n size !== undefined && !hasFont && { $type: 'font', size },\n foregroundColor(this.color()),\n );\n });\n}\n\n/** A moment: a `Date`, milliseconds since the epoch, or a string `Date` reads. */\nexport type UiDate = Date | number | string;\n\n/** The start and end of a timer. */\nexport interface UiTimerInterval {\n readonly lower: UiDate;\n readonly upper: UiDate;\n}\n\n/** A moment as SwiftUI takes it, in milliseconds since the epoch, or none for what is not one. */\nfunction milliseconds(value: UiDate | null | undefined): number | undefined {\n const time = value == null ? NaN : new Date(value).getTime();\n return Number.isNaN(time) ? undefined : time;\n}\n\n/** No timer unless both ends are moments, as the extension has none. */\nfunction timerMilliseconds(value: UiTimerInterval | null | undefined) {\n const lower = milliseconds(value?.lower);\n const upper = milliseconds(value?.upper);\n return lower === undefined || upper === undefined ? undefined : { lower, upper };\n}\n\n/**\n * A SwiftUI `Text`, or Compose's on Android. Its text is what is written inside it,\n * `<ui-text>Us {{ score }}</ui-text>`, as `<text>` takes its own, or `text`, which wins over it.\n *\n * On iOS it can keep time by itself instead, with no update from the app: `date` is drawn by\n * `dateStyle`, as the time since or until it for `'relative'`, `'offset'` and `'timer'`, and\n * `timerInterval` is a timer running from its `lower` to its `upper`, down unless `countsDown` is\n * false.\n */\n@Component({\n selector: 'ui-text',\n template: '<ng-content />',\n host: {\n '[text]': 'text()',\n '[date]': 'android ? undefined : date()',\n '[dateStyle]': 'android ? undefined : dateStyle()',\n '[timerInterval]': 'android ? undefined : timerInterval()',\n '[countsDown]': 'android ? undefined : countsDown()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiText {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly text = input<string>();\n readonly date = input(undefined, { transform: milliseconds });\n readonly dateStyle = input<'timer' | 'relative' | 'offset' | 'date' | 'time'>();\n readonly timerInterval = input(undefined, { transform: timerMilliseconds });\n readonly countsDown = input<boolean>(undefined, { transform: optionalBoolean });\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * What `ui-date-picker` sends when the user picks: the chosen moment, which SwiftUI reports in\n * milliseconds since the epoch.\n */\nexport type UiDateChangeEvent = NativeSyntheticEvent<{ readonly date: number | string }>;\n\n/**\n * Listen for one of a `ui-*` view's own events from inside its component. Not a host listener:\n * one named as an output listens to the output itself, and see the note at the top of this file\n * for why the outputs are never emitted.\n */\nfunction listen(event: string, handle: (payload: Record<string, unknown>) => void): void {\n const node = inject(ElementRef).nativeElement as HostNode;\n const engine = node.engine ?? inject(HostEngine);\n const stop = engine.setEventListener(node, event, (raw) =>\n handle((raw as NativeSyntheticEvent<Record<string, unknown>>)?.nativeEvent ?? {}),\n );\n inject(DestroyRef).onDestroy(stop);\n}\n\n/**\n * A Compose event as the SwiftUI one it stands in for: its payload renamed, and stopping it stops the\n * event it came from.\n */\nfunction withNativeEvent<T>(event: NativeSyntheticEvent, nativeEvent: T): NativeSyntheticEvent<T> {\n return {\n nativeEvent,\n target: event.target,\n stopPropagation: () => event.stopPropagation(),\n isPropagationStopped: () => event.isPropagationStopped(),\n };\n}\n\n/**\n * The caller's modifiers, with each modifier given added after them: what `@expo/ui`'s own\n * components do with an input their native view reads as a modifier rather than as a prop.\n */\nfunction withModifiers(\n modifiers: readonly UiModifier[] | undefined,\n ...added: readonly (UiModifier | false | undefined)[]\n): readonly UiModifier[] | undefined {\n const given = added.filter((modifier): modifier is UiModifier => !!modifier);\n return given.length ? [...(modifiers ?? []), ...given] : modifiers;\n}\n\n/**\n * SwiftUI's `foregroundStyle` modifier in one colour, as `@expo/ui`'s `foregroundStyle(color)`.\n * `@expo/ui` to 57.0.14 reads `styleType` and `color`, and from 57.0.15 a `style`: this sends both.\n */\nfunction foregroundColor(color: string | undefined): UiModifier | undefined {\n return color === undefined\n ? undefined\n : { $type: 'foregroundStyle', style: { type: 'color', color }, styleType: 'color', color };\n}\n\n/** SwiftUI's `accessibilityLabel` modifier, what VoiceOver reads for the view. */\nfunction spokenLabel(label: string | undefined): UiModifier | undefined {\n return label === undefined ? undefined : { $type: 'accessibilityLabel', label };\n}\n\n/** Compose's `semantics` modifier with a `contentDescription`, what TalkBack reads for the view. */\nfunction contentDescription(label: string | undefined): UiModifier | undefined {\n return label === undefined ? undefined : { $type: 'semantics', contentDescription: label };\n}\n\n/** The caller's modifiers, with SwiftUI's `disabled` added while the field is. */\nfunction withDisabled(\n modifiers: readonly UiModifier[] | undefined,\n disabled: boolean,\n): readonly UiModifier[] | undefined {\n return disabled ? [...(modifiers ?? []), { $type: 'disabled', disabled: true }] : modifiers;\n}\n\n/**\n * A date picker: SwiftUI's `DatePicker` on iOS, Compose's on Android.\n *\n * A Signal Forms field as it stands - `<ui-date-picker [formField]=\"f.arrival\" />` - through its\n * `value` model, a `Date` (or null). The two platforms take and report a date differently, and\n * this is where that difference ends: SwiftUI is handed `selection` as ISO text and reports\n * `dateChange`; Compose is handed `initialDate` in milliseconds and reports `dateSelected`. Either\n * way the model gets a `Date`. A `disabled` field adds SwiftUI's `disabled` modifier. SwiftUI's\n * picker always shows a date, today when the field is empty, and the date it reports as it appears\n * is not taken as the user's; an optional date is best asked for behind a button that shows the\n * picker once the user wants to give one.\n *\n * `selection` is still accepted as ISO text, for a picker bound without a form.\n */\n@Component({\n selector: 'ui-date-picker',\n template: '',\n host: {\n '[title]': 'android ? undefined : title()',\n '[selection]': 'android ? undefined : resolvedSelection()',\n '[initialDate]': 'android ? initialDate() : undefined',\n '[displayedComponents]': 'resolvedComponents()',\n '[range]': 'android ? undefined : range()',\n '[selectableDates]': 'android ? selectableDates() : undefined',\n '[modifiers]': 'resolvedModifiers()',\n },\n})\nexport class UiDatePicker {\n protected readonly nativeView = nativeView();\n readonly title = input<string>();\n readonly selection = input<string>();\n /**\n * What the picker shows. An empty list shows nothing in SwiftUI; Compose has no such choice,\n * so on Android it shows the date and the time.\n */\n readonly displayedComponents = input<readonly ('date' | 'hourAndMinute')[]>();\n readonly range = input<{ readonly start?: string; readonly end?: string }>();\n readonly accessibilityLabel = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n /** The picked date: what `[formField]` binds. */\n readonly value = model<Date | null>(null);\n readonly disabled = input(false, { transform: booleanAttribute });\n /** The user picked, which is when a form shows a field's errors: a picker has no blur. */\n readonly touch = output<void>();\n readonly dateChange = output<UiDateChangeEvent>();\n\n private readonly android = nativePlatform() === 'android';\n\n protected readonly resolvedSelection = computed(\n () => this.selection() ?? this.value()?.toISOString(),\n );\n /** SwiftUI takes a list of what to show, and Compose one word for it. */\n protected readonly resolvedComponents = computed(() => {\n const shown = this.displayedComponents();\n if (!this.android || !shown) return shown;\n return shown.length === 1 ? shown[0] : 'dateAndTime';\n });\n protected readonly initialDate = computed(() => this.value()?.getTime() ?? null);\n /** Compose takes `range` as `selectableDates`, each end in milliseconds. */\n protected readonly selectableDates = computed(() => {\n const range = this.range();\n return (\n range && { start: milliseconds(range.start) ?? null, end: milliseconds(range.end) ?? null }\n );\n });\n /**\n * SwiftUI's picker reads `disabled` and `accessibilityLabel` as modifiers, and Compose's reads\n * `accessibilityLabel` as the `semantics` modifier's `contentDescription`.\n */\n protected readonly resolvedModifiers = computed(() =>\n this.android\n ? withModifiers(this.modifiers(), contentDescription(this.accessibilityLabel()))\n : withModifiers(\n withDisabled(this.modifiers(), this.disabled()),\n spokenLabel(this.accessibilityLabel()),\n ),\n );\n\n /**\n * SwiftUI's picker cannot be empty: it shows today, and reports that as a change the moment it\n * appears. Taken as the user's choice, an empty date field would fill itself in, pass\n * `required` and mark the form dirty before anyone touched it. So the first report, while the\n * field is empty and the picker has only just appeared, is the picker describing itself.\n */\n private readonly appeared = Date.now();\n private settled = false;\n\n constructor() {\n listen(this.android ? 'topDateSelected' : 'topDateChange', ({ date }) => {\n if (typeof date !== 'string' && typeof date !== 'number') return;\n const describingItself =\n !this.settled && this.value() === null && Date.now() - this.appeared < APPEARING_MS;\n this.settled = true;\n if (describingItself) return;\n this.value.set(new Date(date));\n this.touch.emit();\n });\n }\n}\n\n/** How long after a date picker appears its first report is taken to be about itself. */\nconst APPEARING_MS = 1000;\n\n/** Compose's `SingleChoiceSegmentedButtonRow`, Android only: a row of `ui-segmented-button`s. */\n@Component({\n selector: 'ui-single-choice-segmented-button-row',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiSingleChoiceSegmentedButtonRow {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** Compose's `SegmentedButton`, Android only, its label in a `<ui-slot name=\"label\">`. */\n@Component({\n selector: 'ui-segmented-button',\n template: '<ng-content />',\n host: {\n '[selected]': 'selected()',\n '[enabled]': 'enabled()',\n '[modifiers]': 'modifiers()',\n '(buttonPressed)': 'press.emit()',\n },\n})\nexport class UiSegmentedButton {\n protected readonly nativeView = nativeView();\n readonly selected = input(false, { transform: booleanAttribute });\n readonly enabled = input(true, { transform: booleanAttribute });\n readonly modifiers = input<readonly UiModifier[]>();\n readonly press = output<void>();\n}\n\n/**\n * Compose's `ExposedDropdownMenuBox`, Android only: an anchor, a view with the `menuAnchor`\n * modifier, and the `ui-exposed-dropdown-menu` it opens. A tap on the anchor asks to open or close\n * it, through `toggled`; `expanded` says which it is.\n */\n@Component({\n selector: 'ui-exposed-dropdown-menu-box',\n template: '<ng-content />',\n host: {\n '[expanded]': 'expanded()',\n '[modifiers]': 'modifiers()',\n // Not a model: its output would be named for this event, and take it.\n '(expandedChange)': 'toggled.emit($event.nativeEvent.value)',\n },\n})\nexport class UiExposedDropdownMenuBox {\n protected readonly nativeView = nativeView();\n readonly expanded = input(false, { transform: booleanAttribute });\n readonly toggled = output<boolean>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** Compose's `ExposedDropdownMenu`, Android only: the `ui-dropdown-menu-item`s a box opens. */\n@Component({\n selector: 'ui-exposed-dropdown-menu',\n template: '<ng-content />',\n host: {\n '[expanded]': 'expanded()',\n '[modifiers]': 'modifiers()',\n '(dismissRequest)': 'dismiss.emit()',\n },\n})\nexport class UiExposedDropdownMenu {\n protected readonly nativeView = nativeView();\n readonly expanded = input(false, { transform: booleanAttribute });\n readonly modifiers = input<readonly UiModifier[]>();\n /** A tap outside the menu, or Back: the box should close it. */\n readonly dismiss = output<void>();\n}\n\n/** Compose's `DropdownMenuItem`, Android only, its text in a `<ui-slot name=\"text\">`. */\n@Component({\n selector: 'ui-dropdown-menu-item',\n template: '<ng-content />',\n host: {\n '[enabled]': 'enabled()',\n '[modifiers]': 'modifiers()',\n '(itemPressed)': 'press.emit()',\n },\n})\nexport class UiDropdownMenuItem {\n protected readonly nativeView = nativeView();\n readonly enabled = input(true, { transform: booleanAttribute });\n readonly modifiers = input<readonly UiModifier[]>();\n readonly press = output<void>();\n}\n\n/**\n * A segmented picker's `font` modifiers again, as `@ng-native/expo`'s own modifier: SwiftUI draws\n * the segments as a `UISegmentedControl`, which `font` does not reach. In a build without that\n * modifier, Expo Go's, the segments stay in the system font.\n */\nfunction segmentFonts(modifiers: readonly UiModifier[]): UiModifier[] {\n const segmented = modifiers.some((m) => m.$type === 'pickerStyle' && m['style'] === 'segmented');\n if (!segmented) return [];\n return modifiers\n .filter((m) => m.$type === 'font')\n .map((m) => ({ ...m, $type: 'ngNativeSegmentedFont' }));\n}\n\n/** One choice in a `ui-picker`: what the field is set to, and what the user reads. */\nexport interface UiPickerOption {\n readonly value: string | number;\n readonly label: string;\n}\n\n/**\n * A SwiftUI `Picker` as a Signal Forms field: `<ui-picker [options]=\"rooms\" [formField]=\"f.room\"\n * />`. `options` draws the choices, each tagged with its value, which is the content slot and `tag`\n * modifiers `@expo/ui` otherwise wants written out by hand; children still work for anything\n * richer on iOS. `pickerStyle` is SwiftUI's (`menu`, `segmented`, `wheel`, `inline`).\n *\n * Compose has no `Picker`, so on Android the options are drawn with its own controls: `segmented`\n * as a row of segmented buttons, and any other style as an exposed dropdown menu under the chosen\n * option. `label`, `systemImage`, children and `modifiers` are SwiftUI's alone. A `font` modifier\n * reaches a segmented picker's segments in a development build, not in Expo Go.\n */\n@Component({\n selector: 'ui-picker',\n imports: [\n UiDropdownMenuItem,\n UiExposedDropdownMenu,\n UiExposedDropdownMenuBox,\n UiSegmentedButton,\n UiSingleChoiceSegmentedButtonRow,\n UiSlot,\n UiText,\n ],\n template: `\n @if (android) {\n @if (pickerStyle() === 'segmented') {\n <ui-single-choice-segmented-button-row>\n @for (option of options() ?? []; track option.value) {\n <ui-segmented-button\n [selected]=\"option.value === value()\"\n [enabled]=\"!disabled()\"\n (press)=\"choose(option.value)\"\n >\n <ui-slot name=\"label\"><ui-text [text]=\"option.label\" /></ui-slot>\n </ui-segmented-button>\n }\n </ui-single-choice-segmented-button-row>\n } @else {\n <ui-exposed-dropdown-menu-box\n [expanded]=\"open()\"\n (toggled)=\"open.set(!disabled() && $event)\"\n >\n <ui-text [text]=\"chosenLabel()\" [modifiers]=\"anchor()\" />\n <ui-exposed-dropdown-menu [expanded]=\"open()\" (dismiss)=\"open.set(false)\">\n @for (option of options() ?? []; track option.value) {\n <ui-dropdown-menu-item [enabled]=\"!disabled()\" (press)=\"choose(option.value)\">\n <ui-slot name=\"text\"><ui-text [text]=\"option.label\" /></ui-slot>\n </ui-dropdown-menu-item>\n }\n </ui-exposed-dropdown-menu>\n </ui-exposed-dropdown-menu-box>\n }\n } @else {\n @if (options(); as options) {\n <ui-slot name=\"content\">\n @for (option of options; track option.value) {\n <ui-text [text]=\"option.label\" [modifiers]=\"tags().get(option.value)\" />\n }\n </ui-slot>\n }\n <ng-content />\n }\n `,\n host: {\n '[label]': 'android ? undefined : shownLabel()',\n '[systemImage]': 'android ? undefined : systemImage()',\n '[selection]': 'android ? undefined : value()',\n '[modifiers]': 'android ? undefined : resolvedModifiers()',\n },\n})\nexport class UiPicker {\n protected readonly nativeView = nativeView();\n readonly label = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n readonly options = input<readonly UiPickerOption[]>();\n readonly pickerStyle = input<\n 'automatic' | 'menu' | 'segmented' | 'wheel' | 'inline' | 'palette'\n >();\n readonly modifiers = input<readonly UiModifier[]>();\n /** The chosen option's value: what `[formField]` binds. */\n readonly value = model<string | number | null>(null);\n readonly disabled = input(false, { transform: booleanAttribute });\n /** The user picked, which is when a form shows a field's errors: a picker has no blur. */\n readonly touch = output<void>();\n readonly selectionChange =\n output<NativeSyntheticEvent<{ readonly selection: string | number }>>();\n\n /** Each option's `tag`, one array per value, so a pass hands native the same objects. */\n protected readonly tags = computed(\n () =>\n new Map(\n (this.options() ?? []).map((option) => [\n option.value,\n [{ $type: 'tag', tag: option.value }] as readonly UiModifier[],\n ]),\n ),\n );\n\n protected readonly android = nativePlatform() === 'android';\n /** SwiftUI's picker view draws nothing without a label, and a segmented one never shows it. */\n protected readonly shownLabel = computed(() => this.label() ?? '');\n /** Whether Android's dropdown is open. */\n protected readonly open = signal(false);\n /**\n * What Android's dropdown shows closed: the chosen option, or the label before there is one,\n * with the arrow that says a tap opens it, which plain text otherwise does not.\n */\n protected readonly chosenLabel = computed(() => {\n const chosen = this.options()?.find((option) => option.value === this.value());\n return `${chosen?.label ?? this.label() ?? ''} \\u25BE`;\n });\n /** What anchors Android's dropdown to the option it shows. */\n protected readonly anchor = computed(() => [\n { $type: 'menuAnchor', type: 'primaryNotEditable', enabled: !this.disabled() },\n ]);\n\n protected readonly resolvedModifiers = computed(() => {\n const style = this.pickerStyle();\n const own = style\n ? [{ $type: 'pickerStyle', style }, ...(this.modifiers() ?? [])]\n : this.modifiers();\n return withDisabled(own && [...own, ...segmentFonts(own)], this.disabled());\n });\n\n constructor() {\n listen('topSelectionChange', ({ selection }) => {\n if (typeof selection !== 'string' && typeof selection !== 'number') return;\n this.choose(selection);\n });\n }\n\n protected choose(selection: string | number): void {\n this.open.set(false);\n if (this.disabled()) return;\n this.value.set(selection);\n this.touch.emit();\n }\n}\n\n/** What `ui-toggle` sends when it is switched: whether it is now on. */\nexport type UiToggleChangeEvent = NativeSyntheticEvent<{ readonly isOn: boolean }>;\n\n/**\n * A SwiftUI `Toggle`, or Compose's `Switch` on Android. `isOnChange` reports each flip. Bound to\n * `isOn`, it shows what `isOn` says; without it, it switches itself. `label` is SwiftUI's alone.\n */\n@Component({\n selector: 'ui-toggle',\n template: '<ng-content />',\n host: {\n '[isOn]': 'android ? undefined : isOn()',\n '[value]': 'android ? (isOn() ?? switchedOn()) : undefined',\n '[label]': 'android ? undefined : label()',\n '[modifiers]': 'modifiers()',\n '(checkedChange)': 'android && checked($event)',\n },\n})\nexport class UiToggle {\n protected readonly nativeView = nativeView();\n readonly isOn = input<boolean>(undefined, { transform: optionalBoolean });\n readonly label = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n readonly isOnChange = output<UiToggleChangeEvent>();\n\n protected readonly android = nativePlatform() === 'android';\n /** What Compose's switch shows without `isOn`: SwiftUI's keeps this itself, Compose's does not. */\n protected readonly switchedOn = signal(false);\n protected checked(event: NativeSyntheticEvent<{ readonly value: boolean }>): void {\n this.switchedOn.set(event.nativeEvent.value);\n this.isOnChange.emit(withNativeEvent(event, { isOn: event.nativeEvent.value }));\n }\n}\n\n/** What `ui-stepper` sends as it is stepped: its new value. */\nexport type UiStepperChangeEvent = NativeSyntheticEvent<{ readonly value: number }>;\n\n/** A SwiftUI `Stepper`, between `min` and `max` by `step`. */\n@Component({\n selector: 'ui-stepper',\n template: '<ng-content />',\n host: {\n '[value]': 'value()',\n '[min]': 'min()',\n '[max]': 'max()',\n '[step]': 'step()',\n '[label]': 'label()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiStepper {\n protected readonly nativeView = nativeView();\n readonly value = input<number>(undefined, { transform: optionalNumber });\n readonly min = input<number>(undefined, { transform: optionalNumber });\n readonly max = input<number>(undefined, { transform: optionalNumber });\n readonly step = input<number>(undefined, { transform: optionalNumber });\n readonly label = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n readonly valueChange = output<UiStepperChangeEvent>();\n}\n\n/** What `ui-text-field` sends as it is typed into: the text so far. */\nexport type UiTextFieldChangeEvent = NativeSyntheticEvent<{ readonly value: string }>;\n\n/**\n * A SwiftUI `TextField`. `text` is where it keeps what is typed, a `nativeState('')`: the field\n * writes to it on the UI thread, and `textChange` reports each change.\n */\n@Component({\n selector: 'ui-text-field',\n template: '',\n host: {\n '[text]': 'text()?.id',\n '[placeholder]': 'placeholder()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiTextField {\n protected readonly nativeView = nativeView();\n readonly text = input<NativeState<string> | null>();\n readonly placeholder = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n readonly textChange = output<UiTextFieldChangeEvent>();\n}\n\n/** What `ui-color-picker` sends when a colour is picked: the colour, as hex. */\nexport type UiColorChangeEvent = NativeSyntheticEvent<{ readonly value: string }>;\n\n/** A SwiftUI `ColorPicker`. `selection` is a colour as hex. */\n@Component({\n selector: 'ui-color-picker',\n template: '',\n host: {\n '[selection]': 'selection()',\n '[label]': 'label()',\n '[supportsOpacity]': 'supportsOpacity()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiColorPicker {\n protected readonly nativeView = nativeView();\n readonly selection = input<string>();\n readonly label = input<string>();\n readonly supportsOpacity = input<boolean>(undefined, { transform: optionalBoolean });\n readonly modifiers = input<readonly UiModifier[]>();\n readonly selectionChange = output<UiColorChangeEvent>();\n}\n\n/**\n * A SwiftUI `Gauge`: `value` between `min` and `max`, drawn as `type` says, with its labels drawn as\n * text in the slots SwiftUI reads them from, as `@expo/ui`'s `Gauge` draws them.\n */\n@Component({\n selector: 'ui-gauge',\n imports: [UiSlot, UiText],\n template: `@if (currentValueLabel() !== undefined) {\n <ui-slot name=\"currentValue\"><ui-text [text]=\"currentValueLabel()\" /></ui-slot>\n }\n @if (minimumValueLabel() !== undefined) {\n <ui-slot name=\"minimumValue\"><ui-text [text]=\"minimumValueLabel()\" /></ui-slot>\n }\n @if (maximumValueLabel() !== undefined) {\n <ui-slot name=\"maximumValue\"><ui-text [text]=\"maximumValueLabel()\" /></ui-slot>\n }\n <ng-content />`,\n host: {\n '[value]': 'value()',\n '[min]': 'min()',\n '[max]': 'max()',\n '[modifiers]': 'resolvedModifiers()',\n },\n})\nexport class UiGauge {\n protected readonly nativeView = nativeView();\n readonly value = input<number>(undefined, { transform: optionalNumber });\n readonly min = input<number>(undefined, { transform: optionalNumber });\n readonly max = input<number>(undefined, { transform: optionalNumber });\n /**\n * How it is drawn, as the `gaugeStyle` modifier: `'automatic'`, `'circular'`,\n * `'circularCapacity'`, `'linear'` or `'linearCapacity'`.\n */\n readonly type = input<string>();\n readonly currentValueLabel = input<string>();\n readonly minimumValueLabel = input<string>();\n readonly maximumValueLabel = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly resolvedModifiers = computed(() => {\n const style = this.type();\n return withModifiers(this.modifiers(), style !== undefined && { $type: 'gaugeStyle', style });\n });\n}\n\n/** One point of a `ui-chart`: `x`, a label or a number, against `y`, with a colour of its own. */\nexport interface UiChartDataPoint {\n readonly x: string | number;\n readonly y: number;\n readonly color?: string;\n}\n\n/** How a `ui-chart` draws its points: `pie` needs iOS 17. */\nexport type UiChartType = 'line' | 'point' | 'bar' | 'area' | 'pie' | 'rectangle';\n\n/** The symbol a `ui-chart` marks a point with. */\nexport type UiChartPointSymbol = 'circle' | 'square' | 'diamond';\n\n/** A line chart's line: its dashes, width, colour, and the symbol at each point. */\nexport interface UiChartLineStyle {\n readonly dashArray?: readonly number[];\n readonly width?: number;\n readonly pointStyle?: UiChartPointSymbol;\n readonly pointSize?: number;\n readonly color?: string;\n}\n\n/** A point chart's symbol and its size. */\nexport interface UiChartPointStyle {\n readonly pointStyle?: UiChartPointSymbol;\n readonly pointSize?: number;\n}\n\n/** An area chart's fill. */\nexport interface UiChartAreaStyle {\n readonly color?: string;\n}\n\n/** A bar chart's bars: their corner radius and width. */\nexport interface UiChartBarStyle {\n readonly cornerRadius?: number;\n readonly width?: number;\n}\n\n/** A pie chart's slices: `innerRadius` from 0, a full pie, to 0.5 for a donut, and the gap between. */\nexport interface UiChartPieStyle {\n readonly innerRadius?: number;\n readonly angularInset?: number;\n}\n\n/** A rectangle chart's colour and corner radius. */\nexport interface UiChartRectangleStyle {\n readonly color?: string;\n readonly cornerRadius?: number;\n}\n\n/** The lines `referenceLines` draws across a `ui-chart`. */\nexport interface UiChartRuleStyle {\n readonly color?: string;\n readonly lineWidth?: number;\n readonly dashArray?: readonly number[];\n}\n\n/**\n * A Swift Charts chart of `data`, drawn as `type` says, iOS only, as Compose has no chart. Each\n * style applies to its own type alone; `referenceLines` are drawn across it in `ruleStyle`.\n * `showLegend` shows only when no point has a colour of its own.\n */\n@Component({\n selector: 'ui-chart',\n template: '',\n host: {\n '[data]': 'data()',\n '[type]': 'type()',\n '[showGrid]': 'showGrid()',\n '[animate]': 'animate()',\n '[showLegend]': 'showLegend()',\n '[referenceLines]': 'referenceLines()',\n '[lineStyle]': 'lineStyle()',\n '[pointStyle]': 'pointStyle()',\n '[areaStyle]': 'areaStyle()',\n '[barStyle]': 'barStyle()',\n '[pieStyle]': 'pieStyle()',\n '[rectangleStyle]': 'rectangleStyle()',\n '[ruleStyle]': 'ruleStyle()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiChart {\n protected readonly nativeView = nativeView();\n readonly data = input.required<readonly UiChartDataPoint[]>();\n readonly type = input<UiChartType>();\n readonly showGrid = input<boolean>(undefined, { transform: optionalBoolean });\n readonly animate = input<boolean>(undefined, { transform: optionalBoolean });\n readonly showLegend = input<boolean>(undefined, { transform: optionalBoolean });\n readonly referenceLines = input<readonly UiChartDataPoint[]>();\n readonly lineStyle = input<UiChartLineStyle>();\n readonly pointStyle = input<UiChartPointStyle>();\n readonly areaStyle = input<UiChartAreaStyle>();\n readonly barStyle = input<UiChartBarStyle>();\n readonly pieStyle = input<UiChartPieStyle>();\n readonly rectangleStyle = input<UiChartRectangleStyle>();\n readonly ruleStyle = input<UiChartRuleStyle>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `ProgressView`: a bar filled to `value`, from 0 to 1, or a spinner without one. On\n * Android, Compose's `LinearProgressIndicator`, a moving bar rather than a spinner without a value.\n * On iOS, `timerInterval` has the bar keep time by itself from its `lower` to its `upper`, emptying\n * unless `countsDown` is false.\n */\n@Component({\n selector: 'ui-progress',\n template: '',\n host: {\n '[value]': 'android ? undefined : value()',\n '[progress]': 'android ? value() : undefined',\n '[timerInterval]': 'android ? undefined : timerInterval()',\n '[countsDown]': 'android ? undefined : countsDown()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiProgress {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly value = input<number>(undefined, { transform: optionalNumber });\n readonly timerInterval = input(undefined, { transform: timerMilliseconds });\n readonly countsDown = input<boolean>(undefined, { transform: optionalBoolean });\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `HStack`, or Compose's `Row` on Android, centred, as SwiftUI's is, unless `alignment`\n * says otherwise. Compose has no `firstTextBaseline`, and centres instead. Without `spacing`, SwiftUI\n * puts its own default spacing between children and Compose puts none.\n */\n@Component({\n selector: 'ui-hstack',\n template: '<ng-content />',\n host: {\n '[alignment]': 'android ? undefined : alignment()',\n '[spacing]': 'android ? undefined : spacing()',\n '[horizontalArrangement]': 'android ? spacedBy(spacing()) : undefined',\n '[verticalAlignment]': 'android ? composeAlignment(alignment()) : undefined',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiHStack {\n protected readonly nativeView = nativeView();\n readonly alignment = input<'top' | 'center' | 'bottom' | 'firstTextBaseline'>();\n readonly spacing = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly android = nativePlatform() === 'android';\n protected readonly spacedBy = spacedBy;\n protected composeAlignment(\n alignment: 'top' | 'center' | 'bottom' | 'firstTextBaseline' | undefined,\n ) {\n return alignment === 'top' || alignment === 'bottom' ? alignment : 'center';\n }\n}\n\nfunction spacedBy(spacing: number | undefined) {\n return spacing === undefined ? undefined : { spacedBy: Math.round(spacing) };\n}\n\n/** A SwiftUI `Spacer`: the room left over in its stack. */\n@Component({\n selector: 'ui-spacer',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiSpacer {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** Where `ui-zstack` puts its layers, as SwiftUI names it. */\nexport type UiZStackAlignment =\n | 'center'\n | 'leading'\n | 'trailing'\n | 'top'\n | 'bottom'\n | 'topLeading'\n | 'topTrailing'\n | 'bottomLeading'\n | 'bottomTrailing';\n\n/** The same place, as Compose's `Box` names it. */\nconst CONTENT_ALIGNMENT: Record<UiZStackAlignment, string> = {\n center: 'center',\n leading: 'centerStart',\n trailing: 'centerEnd',\n top: 'topCenter',\n bottom: 'bottomCenter',\n topLeading: 'topStart',\n topTrailing: 'topEnd',\n bottomLeading: 'bottomStart',\n bottomTrailing: 'bottomEnd',\n};\n\n/**\n * A SwiftUI `ZStack`: its children drawn over one another, the first at the back. On Android,\n * Compose's `Box`, centred, as SwiftUI's is, unless `alignment` says otherwise.\n */\n@Component({\n selector: 'ui-zstack',\n template: '<ng-content />',\n host: {\n '[alignment]': 'android ? undefined : alignment()',\n '[contentAlignment]': 'android ? contentAlignment[alignment() ?? \"center\"] : undefined',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiZStack {\n protected readonly nativeView = nativeView();\n readonly alignment = input<UiZStackAlignment>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly android = nativePlatform() === 'android';\n protected readonly contentAlignment = CONTENT_ALIGNMENT;\n}\n\n/** A SwiftUI `Rectangle`, filling the space it is given. Colour it with `foregroundStyle`. */\n@Component({\n selector: 'ui-rectangle',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiRectangle {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `RoundedRectangle`, its corners rounded by `cornerRadius`. */\n@Component({\n selector: 'ui-rounded-rectangle',\n template: '',\n host: { '[cornerRadius]': 'cornerRadius()', '[modifiers]': 'modifiers()' },\n})\nexport class UiRoundedRectangle {\n protected readonly nativeView = nativeView();\n readonly cornerRadius = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `UnevenRoundedRectangle`: a rectangle with a radius of its own for each corner. */\n@Component({\n selector: 'ui-uneven-rounded-rectangle',\n template: '',\n host: {\n '[topLeadingRadius]': 'topLeadingRadius()',\n '[topTrailingRadius]': 'topTrailingRadius()',\n '[bottomLeadingRadius]': 'bottomLeadingRadius()',\n '[bottomTrailingRadius]': 'bottomTrailingRadius()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiUnevenRoundedRectangle {\n protected readonly nativeView = nativeView();\n readonly topLeadingRadius = input<number>(undefined, { transform: optionalNumber });\n readonly topTrailingRadius = input<number>(undefined, { transform: optionalNumber });\n readonly bottomLeadingRadius = input<number>(undefined, { transform: optionalNumber });\n readonly bottomTrailingRadius = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Capsule`: a rectangle with fully rounded ends. */\n@Component({\n selector: 'ui-capsule',\n template: '',\n host: { '[cornerStyle]': 'cornerStyle()', '[modifiers]': 'modifiers()' },\n})\nexport class UiCapsule {\n protected readonly nativeView = nativeView();\n readonly cornerStyle = input<'continuous' | 'circular'>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Circle`, as large as fits the space it is given. */\n@Component({\n selector: 'ui-circle',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiCircle {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Ellipse`, filling the space it is given. */\n@Component({\n selector: 'ui-ellipse',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiEllipse {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * WidgetKit's `AccessoryWidgetBackground`: the system's backdrop for a lock screen widget, the\n * translucent disc or panel behind its content.\n */\n@Component({\n selector: 'ui-accessory-widget-background',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiAccessoryWidgetBackground {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Label`: a title beside an SF Symbol. */\n@Component({\n selector: 'ui-label',\n imports: [UiImage, UiSlot],\n template: `@if (iconColor(); as color) {\n <ui-slot name=\"icon\"><ui-image [systemName]=\"systemImage()\" [modifiers]=\"[color]\" /></ui-slot>\n }`,\n host: {\n '[title]': 'title()',\n '[systemImage]': 'systemImage()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiLabel {\n protected readonly nativeView = nativeView();\n readonly title = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n /**\n * The colour of the symbol alone, drawn as the label's icon in that colour, since SwiftUI's\n * label takes no colour. The `foregroundStyle` modifier colours the title too.\n */\n readonly color = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n /** The icon's colour, when there is a symbol to draw in it. */\n protected readonly iconColor = computed(() =>\n this.systemImage() === undefined ? undefined : foregroundColor(this.color()),\n );\n}\n\n/**\n * A SwiftUI `Link`: opens `destination`, a URL, when tapped. It shows `label`, or the views\n * written inside it. In a widget, a link is how a tap opens the app at a deep link.\n */\n@Component({\n selector: 'ui-link',\n template: '<ng-content />',\n host: {\n '[destination]': 'destination()',\n '[label]': 'label()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiLink {\n protected readonly nativeView = nativeView();\n readonly destination = input.required<string>();\n readonly label = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `LabeledContent`: a label, and its content beside it. */\n@Component({\n selector: 'ui-labeled-content',\n imports: [UiSlot],\n template: '<ui-slot name=\"content\"><ng-content /></ui-slot>',\n host: { '[label]': 'label()', '[modifiers]': 'modifiers()' },\n})\nexport class UiLabeledContent {\n protected readonly nativeView = nativeView();\n readonly label = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Form`: settings-style grouped rows. */\n@Component({\n selector: 'ui-form',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiForm {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `Section` of a form or a list, under `title`, iOS only. A `<ui-slot name=\"header\">`\n * is its header in place of a `title`, and a `<ui-slot name=\"footer\">` is the note under its rows.\n * When both a non-empty `title` and a header slot are set, `@expo/ui`'s `SectionView` draws the\n * `title` and drops the slot; an empty `title` counts as unset. The slot's `name` is written as it is,\n * not bound, as that is what picks it out of the rows.\n */\n@Component({\n selector: 'ui-section',\n imports: [UiSlot],\n template: `<ng-content select=\"ui-slot[name=header]\" />\n <ui-slot name=\"content\"><ng-content /></ui-slot>\n <ng-content select=\"ui-slot[name=footer]\" />`,\n host: { '[title]': 'title()', '[modifiers]': 'modifiers()' },\n})\nexport class UiSection {\n protected readonly nativeView = nativeView();\n readonly title = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `Group`, iOS only: its children as they are, with no layout of its own. What it is for\n * is `modifiers` that belong to several views at once, or to content that takes none itself, as a\n * sheet's presentation modifiers go on a group around a `ui-view-host`.\n */\n@Component({\n selector: 'ui-group',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiGroup {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `NavigationStack`, iOS only: the bar a `ui-toolbar` inside it puts its items in, and\n * that a `navigationTitle` modifier on its content titles.\n */\n@Component({\n selector: 'ui-navigation-stack',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiNavigationStack {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * SwiftUI's `toolbar`, iOS only. Its children are the view the toolbar belongs to, and its items go\n * in `<ui-slot name=\"content\">`, each a `ui-toolbar-item`. It shows in the bar of the\n * `ui-navigation-stack` around it.\n */\n@Component({\n selector: 'ui-toolbar',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiToolbar {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** Where a `ui-toolbar-item` sits, as SwiftUI's `ToolbarItemPlacement` names them. */\nexport type UiToolbarItemPlacement =\n | 'automatic'\n | 'principal'\n | 'navigation'\n | 'primaryAction'\n | 'secondaryAction'\n | 'status'\n | 'confirmationAction'\n | 'cancellationAction'\n | 'destructiveAction'\n | 'keyboard'\n | 'topBarLeading'\n | 'topBarTrailing'\n | 'topBarPinnedTrailing'\n | 'largeTitle'\n | 'bottomBar';\n\n/**\n * One item of a `ui-toolbar`, SwiftUI's `ToolbarItem`: a `ui-button`, or a `ui-text` as a title\n * with `placement=\"principal\"`. Unplaced, SwiftUI places it. A placement the OS does not have is\n * read as `automatic`.\n *\n * Written inside a `ui-bottom-sheet` it goes in the sheet's own toolbar, which is how a sheet\n * shows the system's close button.\n */\n@Component({\n selector: 'ui-toolbar-item',\n template: '<ng-content />',\n host: { '[name]': '\"item\"', '[extraProps]': 'extraProps()' },\n})\nexport class UiToolbarItem {\n protected readonly nativeView = nativeView();\n readonly placement = input<UiToolbarItemPlacement>();\n /** How readily the item gives up its place when the bar runs out of room, from iOS 27. */\n readonly visibilityPriority = input<'automatic' | 'low' | 'high'>();\n\n /** What the slot tells the toolbar about itself: only what is set, so SwiftUI decides the rest. */\n protected readonly extraProps = computed(() => {\n const placement = this.placement();\n const visibilityPriority = this.visibilityPriority();\n if (!placement && !visibilityPriority) return undefined;\n return { ...(placement && { placement }), ...(visibilityPriority && { visibilityPriority }) };\n });\n}\n\n/**\n * A height a SwiftUI sheet rests at, as `@expo/ui`'s `PresentationDetent`: about half the screen,\n * all of it, a fraction of it from 0 to 1, or a height in points.\n */\nexport type UiPresentationDetent =\n 'medium' | 'large' | { readonly fraction: number } | { readonly height: number };\n\n/**\n * Whether the screen behind a SwiftUI sheet takes touches, as `presentationBackgroundInteraction`\n * says it: as the system decides, always, never, or while the sheet rests at or below a detent.\n */\nexport type UiBottomSheetBackgroundInteraction =\n 'automatic' | 'enabled' | 'disabled' | { readonly upThrough: UiPresentationDetent };\n\n/** The detents of a sheet given none and not sized to its content. */\nconst HALF_AND_FULL: readonly UiPresentationDetent[] = ['medium', 'large'];\n\n/** The functions `@expo/ui` defines on Compose's sheet, called with the view's tag as `this`. */\nexport interface UiBottomSheetViewFunctions {\n /** Slides the sheet away, answering once it has gone. */\n hide?(this: { nativeTag: number }): Promise<void>;\n}\n\n/** The window's width as the engine knows it, or undefined before the platform has said. */\nfunction windowWidth(): Signal<number | undefined> {\n const node = inject(ElementRef).nativeElement as HostNode;\n const engine = (node.engine ?? inject(HostEngine)) as Partial<\n Pick<Engine, 'viewport' | 'watchViewport'>\n >;\n const read = () => engine.viewport?.width || undefined;\n const width = signal(read());\n const stop = engine.watchViewport?.(() => width.set(read()));\n if (stop) inject(DestroyRef).onDestroy(stop);\n return width;\n}\n\n/**\n * A sheet that slides up from the bottom of the screen, opened from any component: SwiftUI's on\n * iOS, Material's on Android.\n *\n * ```html\n * <ui-bottom-sheet [(open)]=\"sorting\" fitToContents>\n * <app-sort-options (done)=\"sorting.set(false)\" />\n * </ui-bottom-sheet>\n * ```\n *\n * `open` presents and dismisses it, and is written back when the user dismisses it. Its content is\n * what is written inside it, the app's own components, in the tree while the sheet is on screen.\n *\n * A `ui-toolbar-item` written inside it is not content: on iOS it goes in a toolbar of the sheet's\n * own, in a bar across its top, which is where the system's close button belongs.\n *\n * ```html\n * <ui-bottom-sheet [(open)]=\"sorting\">\n * <ui-toolbar-item placement=\"cancellationAction\">\n * <ui-button role=\"close\" (buttonPress)=\"sorting.set(false)\" />\n * </ui-toolbar-item>\n * <app-sort-options />\n * </ui-bottom-sheet>\n * ```\n *\n * Compose's sheet has no toolbar, so Android draws no item. Nor does an iOS build whose `@expo/ui`\n * is older than 57.0.20, which Expo Go's can be: it warns, and shows the sheet without one.\n *\n * The two platforms drive a sheet differently, and this is where that difference ends. SwiftUI's\n * stays in the tree and is presented by `isPresented`, reporting `isPresentedChange` and\n * `dismiss`. Compose's shows for as long as it is in the tree, and reports `dismissRequest`.\n *\n * Unlike the other components here, the element this is mounted on is a plain view, which takes\n * no room and needs no `ui-host` around it. The sheet is inside it, wrapped as `@expo/ui`'s own\n * React component wraps one: a `ui-host`, the sheet, on iOS a `ui-group` that carries the\n * presentation modifiers, and a `ui-view-host` holding the one view the content goes in. Where the\n * build has SwiftUI's toolbar and the sheet is not sized to its content, the view host is in a\n * `ui-navigation-stack` under the group, over a `ui-toolbar` that holds the items.\n */\n@Component({\n selector: 'ui-bottom-sheet',\n imports: [\n UiBottomSheetContent,\n UiBottomSheetView,\n UiGroup,\n UiHost,\n UiNavigationStack,\n UiSlot,\n UiSpacer,\n UiToolbar,\n UiViewHost,\n UiZStack,\n ],\n template: `\n <ng-template #content><ng-content /></ng-template>\n @if (swiftUI) {\n <ui-host style=\"position: absolute\" pointerEvents=\"none\" [style.width.px]=\"width()\">\n <ui-bottom-sheet-view\n #sheet\n [isPresented]=\"open()\"\n [fitToContents]=\"fits()\"\n (isPresentedChange)=\"presented($event)\"\n (dismiss)=\"gone($event)\"\n >\n @if (mounted()) {\n <ui-group [modifiers]=\"presentation()\">\n @if (stacked()) {\n <ui-navigation-stack>\n <ui-zstack>\n <ui-toolbar [modifiers]=\"inlineTitle\">\n <ui-spacer />\n <ui-slot name=\"content\"><ng-content select=\"ui-toolbar-item\" /></ui-slot>\n </ui-toolbar>\n <ui-view-host layoutRoot [matchContents]=\"fits() || undefined\">\n <ui-bottom-sheet-content [style]=\"body()\" [content]=\"content\" />\n </ui-view-host>\n </ui-zstack>\n </ui-navigation-stack>\n } @else {\n <ui-view-host layoutRoot [matchContents]=\"fits() || undefined\">\n <ui-bottom-sheet-content [style]=\"body()\" [content]=\"content\" />\n </ui-view-host>\n }\n </ui-group>\n }\n </ui-bottom-sheet-view>\n </ui-host>\n } @else if (mounted()) {\n <ui-host style=\"position: absolute\" pointerEvents=\"none\" [style.width.px]=\"width()\">\n <ui-bottom-sheet-view\n #sheet\n [showDragHandle]=\"showDragIndicator()\"\n [containerColor]=\"color()\"\n [skipPartiallyExpanded]=\"fits()\"\n [sheetGesturesEnabled]=\"!interactiveDismissDisabled()\"\n [properties]=\"dismissal()\"\n (dismissRequest)=\"dismissRequested($event)\"\n >\n <ui-view-host layoutRoot [matchContents]=\"fits() || undefined\">\n <ui-bottom-sheet-content [style]=\"body()\" [content]=\"content\" />\n </ui-view-host>\n </ui-bottom-sheet-view>\n </ui-host>\n }\n `,\n host: { '[style.position]': '\"absolute\"' },\n})\nexport class UiBottomSheet {\n /**\n * The functions of Compose's sheet, none of them on iOS, or null where `@expo/ui` is not in the\n * build and there is no sheet. Overridden in a test to hide a sheet without a device.\n */\n static readonly SOURCE = new InjectionToken<UiBottomSheetViewFunctions | null>(\n 'angular-native.bottomSheetSource',\n {\n factory: () =>\n optional(() => {\n const core = require('expo-modules-core') as typeof import('expo-modules-core');\n const module = core.requireOptionalNativeModule<{\n ViewPrototypes?: Record<string, UiBottomSheetViewFunctions>;\n }>('ExpoUI');\n return module ? (module.ViewPrototypes?.['ExpoUI_ModalBottomSheetView'] ?? {}) : null;\n }),\n },\n );\n\n /**\n * Whether the build has SwiftUI's toolbar. `@expo/ui` has had it since 57.0.20, and Expo Go has\n * the version its SDK shipped with. A SwiftUI view under one the build lacks is a crash, so a\n * sheet there leaves its toolbar out. Overridden in a test.\n */\n static readonly TOOLBAR = new InjectionToken<boolean>('angular-native.bottomSheetToolbar', {\n factory: () => {\n const expo = (\n globalThis as { expo?: { getViewConfig?(module: string, view: string): unknown } }\n ).expo;\n return ['NavigationStackView', 'ToolbarView'].every(\n (view) => optional(() => expo?.getViewConfig?.('ExpoUI', view)) != null,\n );\n },\n });\n\n private readonly functions = inject(UiBottomSheet.SOURCE);\n private readonly toolbarInBuild = inject(UiBottomSheet.TOOLBAR);\n private readonly engine = inject(Engine, { optional: true });\n private readonly injector = inject(Injector);\n private readonly sheet = viewChild<unknown, ElementRef<EngineNode>>('sheet', {\n read: ElementRef,\n });\n\n /** Whether the sheet is on screen. Written back as false when the user dismisses it. */\n readonly open = model(false);\n /**\n * The sheet is as tall as its content. Without it the sheet rests at half the screen's height\n * and drags up to all of it. Read as the sheet opens. A sheet with a toolbar on iOS is not\n * sized to its content: it rests at its `detents`, or at half and full height.\n */\n readonly fitToContents = input(false, { transform: booleanAttribute });\n /**\n * The heights the sheet rests at, iOS only: SwiftUI's `presentationDetents`. Compose's sheet has\n * a half and a full height and no others, so Android takes no notice of this. On iOS a sheet\n * given detents rests at them rather than at the height of its content, whatever `fitToContents`\n * says, as `@expo/ui`'s own sheets do. None, or an empty list, is the sheet without them.\n */\n readonly detents = input<readonly UiPresentationDetent[]>();\n /** Whether the grabber shows at the top of the sheet. */\n readonly showDragIndicator = input(true, { transform: booleanAttribute });\n /**\n * The colour of the sheet behind its content: SwiftUI's `presentationBackground` on iOS, where\n * a sheet below its full height is otherwise drawn as glass, and Compose's `containerColor` on\n * Android. Over a `background-color` the element has from CSS, which colours the sheet the same\n * way. Neither is the sheet as the system draws it.\n */\n readonly backgroundColor = input<string>();\n /**\n * The user cannot dismiss the sheet; only `open` closes it. On iOS it is SwiftUI's\n * `interactiveDismissDisabled`: a swipe down takes the sheet to its smallest detent and no\n * further, and a tap outside it does nothing. On Android a swipe, the back button and a tap\n * outside the sheet are all turned off, as `@expo/ui`'s own sheet does; Compose's sheet has no\n * way to keep the drag between its heights without the swipe that dismisses it, so that drag is\n * off too.\n */\n readonly interactiveDismissDisabled = input(false, { transform: booleanAttribute });\n /**\n * Whether the screen behind the sheet takes touches, iOS 16.4 and later only: SwiftUI's\n * `presentationBackgroundInteraction`. `'enabled'` always, `'disabled'` never, `'automatic'` as\n * the system decides, and `{ upThrough: 'medium' }` while the sheet rests at that detent or\n * below it, which should be one of its `detents`. Unset, SwiftUI decides. Android has no\n * equivalent: Compose's sheet is in a window of its own over the screen, which takes no touch\n * while it shows.\n */\n readonly backgroundInteraction = input<UiBottomSheetBackgroundInteraction>();\n /**\n * More SwiftUI modifiers, iOS only, after the sheet's own on the `ui-group` around its content,\n * where SwiftUI reads presentation modifiers from: `presentationCornerRadius`, for one. They\n * apply to the content too. Android takes no notice of them.\n */\n readonly modifiers = input<readonly UiModifier[]>();\n /**\n * The sheet has finished closing, whether the user dismissed it or `open` was set false: the\n * moment another sheet or a dialog can be presented.\n */\n readonly dismissed = output<void>();\n\n /** The toolbar items written inside the sheet, which give it a bar to hold them. */\n private readonly toolbarItems = contentChildren(UiToolbarItem);\n /** Whether the sheet has a toolbar: it has items for one, and the build has the views. */\n protected readonly toolbar = computed(\n () => this.toolbarInBuild && this.toolbarItems().length > 0,\n );\n\n /**\n * A sheet's bar never shows a large title, but a navigation stack leaves room for one under its\n * bar. `@expo/ui` has no modifier for the title's display mode, so `@ng-native/expo` registers\n * one natively, in a build with `@expo/ui`. One without it, Expo Go's, ignores the modifier.\n */\n protected readonly inlineTitle: readonly UiModifier[] = [\n { $type: 'ngNativeInlineNavigationTitle' },\n ];\n\n /** SwiftUI's sheet stays in the tree; anywhere else it is there while it shows. */\n protected readonly swiftUI = nativePlatform() === 'ios';\n protected readonly width = windowWidth();\n\n /**\n * Whether the content is in the tree: from when the sheet opens until it has gone, which is\n * after `open` turns false, so that it slides away with its content still in it.\n */\n protected readonly mounted = linkedSignal<boolean, boolean>({\n source: this.open,\n computation: (open, previous) => open || (previous?.value ?? false),\n });\n\n /**\n * Whether the sheet is sized to its content, as it opened: a view host takes its sizing once,\n * as it mounts. SwiftUI's sheet is not where it has detents to rest at, nor where it has a\n * toolbar: a navigation stack fills what it is given, and the bar is no part of the content.\n * A toolbar that comes or goes while such a sheet is open is followed, since the view host is\n * made again around it.\n */\n protected readonly fits = computed(() => {\n this.mounted();\n const toolbar = this.toolbar();\n return untracked(\n () => this.fitToContents() && !(this.swiftUI && (this.detents()?.length || toolbar)),\n );\n });\n\n /**\n * Whether the content is in a navigation stack, beside a toolbar: wherever the build has one and\n * the sheet is not sized to its content, items or none, so that an item coming or going never\n * makes the view host again. `@expo/ui`'s view host takes its content's touches as it appears and\n * gives them up as it disappears, and one made again around the same content appears before the\n * old one has gone, leaving the content none. A stack with no item draws no bar. The toolbar is\n * beside the view host rather than around it, since SwiftUI makes the view a toolbar is on again\n * as its items change.\n */\n protected readonly stacked = computed(() => this.toolbarInBuild && !this.fits());\n\n /**\n * SwiftUI reads how a sheet is presented from modifiers on its content, not from props. The\n * detents of a sheet not sized to its content are followed while it is open.\n */\n protected readonly presentation = computed<readonly UiModifier[]>(() => [\n this.fits()\n ? { $type: 'presentationSizing', sizing: 'fitted' }\n : {\n $type: 'presentationDetents',\n detents: this.detents()?.length ? this.detents() : HALF_AND_FULL,\n },\n {\n $type: 'presentationDragIndicator',\n visibility: this.showDragIndicator() ? 'visible' : 'hidden',\n },\n ...this.background(),\n ...(this.interactiveDismissDisabled()\n ? [{ $type: 'interactiveDismissDisabled', isDisabled: true }]\n : []),\n ...this.interaction(),\n ...(this.modifiers() ?? []),\n ]);\n\n /** Whether the screen behind the sheet takes touches, in `@expo/ui`'s shape, where one is set. */\n private readonly interaction = computed<readonly UiModifier[]>(() => {\n const given = this.backgroundInteraction();\n if (given === undefined) return [];\n const $type = 'presentationBackgroundInteraction';\n return typeof given === 'string'\n ? [{ $type, interactionType: given }]\n : [{ $type, interactionType: 'enabledUpThrough', detent: given.upThrough }];\n });\n\n /**\n * How Compose's sheet may be dismissed other than by a swipe. Always committed, so that turning\n * `interactiveDismissDisabled` off again reaches native.\n */\n protected readonly dismissal = computed(() => {\n const dismissible = !this.interactiveDismissDisabled();\n return { shouldDismissOnBackPress: dismissible, shouldDismissOnClickOutside: dismissible };\n });\n\n /** The `background-color` the element has from CSS, which the sheet draws rather than it. */\n private readonly painted = signal<unknown>(undefined);\n\n /** The sheet's colour: the input's, or else the element's from CSS. */\n protected readonly color = computed(() => this.backgroundColor() || this.painted() || undefined);\n\n /**\n * The sheet's own background, a colour converted as any colour is, where one is given. As a\n * shape style for `@expo/ui` 57.0.17 and later, and as the plain colour the versions before it\n * read, Expo Go's among them. Each ignores the other's field.\n */\n private readonly background = computed<readonly UiModifier[]>(() => {\n const given = this.color();\n if (given === undefined) return [];\n const color = this.engine?.color(given) ?? given;\n return [{ $type: 'presentationBackground', style: { type: 'color', color }, color }];\n });\n\n /**\n * The one view a view host holds. Sized to its content it needs a width of its own, the\n * window's; otherwise it fills the height the sheet gives it.\n */\n protected readonly body = computed(() =>\n this.fits() ? { width: this.width() } : { flexGrow: 1, height: 0 },\n );\n\n /** Whether `open` has turned false on a sheet that has yet to go. */\n private closing = false;\n /** Whether Compose is sliding the sheet away. */\n private hiding = false;\n\n constructor() {\n effect(() => {\n if (!this.open()) untracked(() => this.close());\n });\n const host = inject<ElementRef<EngineNode>>(ElementRef).nativeElement;\n const stop = this.engine?.takePaint?.(host, (color) => this.painted.set(color));\n if (stop) inject(DestroyRef).onDestroy(stop);\n if (this.swiftUI && !this.toolbarInBuild) {\n const warned = effect(() => {\n if (!this.toolbarItems().length) return;\n console.warn(\n '[angular-native] A ui-toolbar-item in a ui-bottom-sheet needs @expo/ui 57.0.20 or ' +\n 'later in the native build. This build has no SwiftUI toolbar, as Expo Go may not, ' +\n 'so the sheet is shown without the item.',\n );\n warned.destroy();\n });\n }\n }\n\n protected presented(event: UiBottomSheetPresentedEvent): void {\n if (!this.own(event)) return;\n const isPresented: unknown = event.nativeEvent?.isPresented;\n if (typeof isPresented === 'boolean') this.open.set(isPresented);\n }\n\n protected dismissRequested(event: NativeSyntheticEvent): void {\n if (this.own(event)) this.open.set(false);\n }\n\n /**\n * SwiftUI has finished dismissing the sheet. After a swipe it says so before it reports that the\n * sheet is no longer presented, so a sheet that has gone while `open`, and was not closing, is\n * one the user dismissed.\n */\n protected gone(event: NativeSyntheticEvent): void {\n if (!this.own(event)) return;\n if (!this.closing) this.open.set(false);\n this.finish();\n }\n\n /**\n * Whether an event is this sheet's own, which it then stops. Events bubble, so a `dismiss` from\n * a modal in the content arrives here too, and the sheet's own would go on to a listener around\n * it.\n */\n private own(event: NativeSyntheticEvent): boolean {\n const target = event.target;\n if (target != null && target !== this.sheet()?.nativeElement) return false;\n event.stopPropagation();\n return true;\n }\n\n /**\n * `open` turned false. SwiftUI dismisses its sheet on the prop, and says when it has gone.\n * Compose shows a sheet for as long as it is in the tree, so one taken out is gone at once:\n * its `hide` slides it away first, as `@expo/ui`'s own component calls it before unmounting.\n */\n private close(): void {\n if (!this.mounted()) return;\n // No `@expo/ui` in the build: no sheet is there to slide away, or to say that it has.\n if (!this.functions) return this.finish();\n this.closing = true;\n if (this.swiftUI || this.hiding) return;\n const node = this.sheet()?.nativeElement;\n const nativeTag = node ? (this.engine?.tagOf(node) ?? null) : null;\n const hidden =\n nativeTag === null ? undefined : optional(() => this.functions?.hide?.call({ nativeTag }));\n if (!hidden) return this.finish();\n this.hiding = true;\n const done = () => {\n this.hiding = false;\n this.finish();\n };\n hidden.then(done, done);\n }\n\n /** The sheet has gone: its content leaves the tree. */\n private finish(): void {\n this.closing = false;\n if (!this.mounted()) return;\n if (!this.open()) {\n this.mounted.set(false);\n this.dismissed.emit();\n return;\n }\n // Opened again before it had gone. SwiftUI presents the sheet it still has; Compose hid the\n // one it was asked to, and shows a sheet only as it enters the tree.\n if (this.swiftUI) return;\n this.mounted.set(false);\n afterNextRender(() => this.mounted.set(this.open()), { injector: this.injector });\n }\n}\n"]}
1
+ {"version":3,"file":"expo-ui-components.js","sourceRoot":"","sources":["../src/expo-ui-components.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,cAAc,EACd,QAAQ,EAER,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,MAAM,EACN,MAAM,EACN,KAAK,EACL,YAAY,EACZ,KAAK,EACL,MAAM,EACN,MAAM,EACN,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,MAAM,EAEN,UAAU,EAG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IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;YACtB,OAAO;QACT,CAAC;QACD,4FAA4F;QAC5F,qEAAqE;QACrE,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO;QACzB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxB,eAAe,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACpF,CAAC;uGAhUU,aAAa;2FAAb,aAAa,i4CAsGwB,aAAa,wHA9DrD,UAAU,6CA9FR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDT,4DA9DC,oBAAoB,yFACpB,iBAAiB,2QA/JR,OAAO,4EA73CP,MAAM,+HA24CN,iBAAiB,uFAzuCjB,MAAM,oFAi+BN,QAAQ,6EAuRR,SAAS,8EAt1CT,UAAU,+GA0mCV,QAAQ;;2FA8aR,aAAa;kBApEzB,SAAS;mBAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,OAAO,EAAE;wBACP,oBAAoB;wBACpB,iBAAiB;wBACjB,OAAO;wBACP,MAAM;wBACN,iBAAiB;wBACjB,MAAM;wBACN,QAAQ;wBACR,SAAS;wBACT,UAAU;wBACV,QAAQ;qBACT;oBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDT;oBACD,IAAI,EAAE,EAAE,kBAAkB,EAAE,YAAY,EAAE;iBAC3C;6FAwCqE,OAAO,OAAE;4BAC3E,IAAI,EAAE,UAAU;yBACjB,giCA6D+C,aAAa","sourcesContent":["/**\n * Typed components for the `@expo/ui` views an app reaches for most, named and shaped as SwiftUI's.\n *\n * `EXPO_UI_VIEWS` makes every view reachable by name, and a name is all the renderer needs. What a\n * name cannot give is a type: under strict templates an unknown element is an error, and so is\n * each prop on it. These are the same elements, claimed by a component whose inputs carry the\n * props' types and whose host bindings pass each one straight to the node, so nothing changes at\n * runtime. An unset input stays `undefined` and never reaches native.\n *\n * Events are declared as outputs so that `$event` is typed. SwiftUI's events are never emitted:\n * Angular binds a template's `(dateChange)` to the output *and* to the element, and it is the\n * element's own event that arrives, once. Emitting from a host listener as well would deliver it\n * twice; a host listener of the same name as the output listens to the output itself and recurses.\n * So subscribe in a template, not to the output in code.\n *\n * Where Compose names a prop or an event differently, a component sends Android its own names and\n * emits the output from a host listener for Compose's event, which SwiftUI never sends. Only a few\n * do: the toggle, slider, button, progress, stacks and slot, and the date picker.\n *\n * Only the views and props an app has needed are here; the rest stay names, as before. Add a view\n * when a template wants it typed, from `@expo/ui`'s own props for it.\n *\n * Still register the names with `registerExpoUiViews`: the component types the element, the\n * registration is what makes it commit as the SwiftUI or Compose view.\n */\nimport {\n Component,\n DestroyRef,\n forwardRef,\n ElementRef,\n InjectionToken,\n Injector,\n type Signal,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChildren,\n effect,\n inject,\n input,\n linkedSignal,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport type { NativeState } from './native-state.ts';\nimport {\n Engine,\n type EngineNode,\n HostEngine,\n type HostNode,\n type NativeSyntheticEvent,\n keepNativeView,\n nativePlatform,\n} from '@ng-native/fabric';\nimport { optional } from './native.ts';\nimport { optionalBoolean, optionalNumber } from './transforms.ts';\nimport { UiBottomSheetContent } from './ui-bottom-sheet-content.ts';\nimport { type UiBottomSheetPresentedEvent, UiBottomSheetView } from './ui-bottom-sheet-view.ts';\n\n/** One SwiftUI modifier, as `@expo/ui`'s modifier functions build them: `{ $type: 'frame', ... }`. */\nexport interface UiModifier {\n readonly $type: string;\n readonly [key: string]: unknown;\n}\n\n/**\n * Says the component's host is the `@expo/ui` view its selector is registered as. A component of\n * an app's own with a `ui-` selector does not, and its host is a plain view.\n */\nfunction nativeView(): true {\n keepNativeView(inject(ElementRef).nativeElement);\n return true;\n}\n\n/**\n * The bridge from Yoga's layout to SwiftUI's; every other `ui-*` view goes inside one.\n * `matchContents` sizes the host to the SwiftUI content rather than the other way round, on both\n * axes or on the ones named. Native reads a flag per axis, which is what this splits it into, as\n * `@expo/ui`'s own `Host` does: without them the host has no size of its own, and the control\n * drawn in it spills outside it, where it can be seen but not touched or read by VoiceOver.\n */\n@Component({\n selector: 'ui-host',\n template: '<ng-content />',\n host: {\n '[matchContentsVertical]': 'matchVertical()',\n '[matchContentsHorizontal]': 'matchHorizontal()',\n '[ignoreSafeArea]': 'android ? undefined : ignoreSafeArea()',\n '[useViewportSizeMeasurement]': 'useViewportSizeMeasurement()',\n },\n})\nexport class UiHost {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly matchContents = input<\n boolean | { readonly vertical?: boolean; readonly horizontal?: boolean }\n >();\n protected readonly matchVertical = computed(() => {\n const match = this.matchContents();\n return typeof match === 'object' ? match.vertical : match;\n });\n protected readonly matchHorizontal = computed(() => {\n const match = this.matchContents();\n return typeof match === 'object' ? match.horizontal : match;\n });\n /** The safe area SwiftUI's host ignores, iOS only: Compose's host has no such prop. */\n readonly ignoreSafeArea = input<'all' | 'keyboard' | 'container'>();\n readonly useViewportSizeMeasurement = input<boolean>(undefined, { transform: optionalBoolean });\n}\n\n/** A SwiftUI `Menu`. Its trigger is the `label` or a `<ui-slot name=\"label\">`; its items are children. */\n@Component({\n selector: 'ui-menu',\n template: '<ng-content />',\n host: {\n '[label]': 'android ? undefined : label()',\n '[systemImage]': 'android ? undefined : systemImage()',\n '[modifiers]': 'android ? modifiers() : resolvedModifiers()',\n },\n})\nexport class UiMenu {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly label = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n /** What VoiceOver reads for the menu's trigger: SwiftUI's `accessibilityLabel` modifier. */\n readonly accessibilityLabel = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly resolvedModifiers = computed(() =>\n withModifiers(this.modifiers(), spokenLabel(this.accessibilityLabel())),\n );\n}\n\n/**\n * Views of the app's own inside SwiftUI or Compose content: the way back from a `ui-host`. What\n * it holds is laid out by the engine, as anywhere else, and takes presses as anywhere else, so a\n * row drawn with the app's own components can be a context menu's trigger or a sheet's body.\n *\n * It holds one element. `matchContents` sizes it to that element, both ways: the element needs a\n * width of its own, since nothing here stretches it. Without `matchContents` it fills what the\n * SwiftUI or Compose view around it offers, which inside a view sized to its content is a width\n * and no height.\n */\n@Component({\n selector: 'ui-view-host',\n template: '<ng-content />',\n host: {\n // `@expo/ui` to 57.0.22 reads `matchContents`, and from 57.0.23 one prop for each axis.\n '[matchContents]': 'matchContents()',\n '[matchContentsHorizontal]': 'matchContents()',\n '[matchContentsVertical]': 'matchContents()',\n '[expoInternalSizeFromChildren]': 'matchContents()',\n '[layoutRoot]': 'layoutRoot()',\n // SwiftUI's view host takes no modifiers; Compose's does.\n '[modifiers]': 'android ? modifiers() : undefined',\n },\n})\nexport class UiViewHost {\n protected readonly android = nativePlatform() === 'android';\n protected readonly nativeView = nativeView();\n readonly matchContents = input<boolean>(undefined, { transform: optionalBoolean });\n /**\n * For content presented in a window of its own, a sheet or a popover, where nothing above it\n * delivers its touches: it then takes them itself, and is measured from itself.\n */\n readonly layoutRoot = input<boolean>(undefined, { transform: optionalBoolean });\n /** Compose's modifiers for the view host, Android only: SwiftUI's view host takes none. */\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `contextMenu`: the menu a long press on its trigger opens, with the trigger lifted\n * over the dimmed screen. iOS only.\n *\n * Its content is three slots: `<ui-slot name=\"trigger\">` is what is always shown,\n * `<ui-slot name=\"items\">` holds the `ui-button`s, `ui-divider`s and `ui-section`s of the menu, and\n * `<ui-slot name=\"preview\">`, when there is one, is shown above the open menu in place of the\n * trigger. All three are SwiftUI content, as everything inside a `ui-host` is.\n */\n@Component({\n selector: 'ui-context-menu',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiContextMenu {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `Button`, as a menu item or on its own, or Compose's on Android, which draws `label` as\n * text inside it. `systemImage` and `role` are SwiftUI's alone. A `close` button with no label and\n * no content is the system's own close button, from iOS 26.\n */\n@Component({\n selector: 'ui-button',\n imports: [forwardRef(() => UiText)],\n template: `@if (android && label()) {\n <ui-text [text]=\"label()\" />\n }\n <ng-content />`,\n host: {\n '(buttonPressed)': 'android && buttonPress.emit($event)',\n '[label]': 'android ? undefined : label()',\n '[systemImage]': 'android ? undefined : systemImage()',\n '[role]': 'android ? undefined : role()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiButton {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly label = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n readonly role = input<'default' | 'cancel' | 'destructive' | 'close'>();\n /**\n * In a home-screen widget's or a Live Activity's layout, what a tap on it hands the app: see\n * `@ng-native/expo/widget` and `@ng-native/expo/live-activity`. The layout's build reads it, so\n * an app's own button is not sent it: `@expo/ui`'s button there has no target.\n */\n readonly target = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n readonly buttonPress = output<NativeSyntheticEvent<Record<string, never>>>();\n}\n\n/** A SwiftUI `Divider`, or Compose's `HorizontalDivider`: a separator between groups of items. */\n@Component({\n selector: 'ui-divider',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiDivider {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * Content for a named slot of its parent view, such as a menu's `label`. `extraProps` is what\n * the slot tells its parent about itself: a `ui-swipe-actions` group's `edge` and\n * `allowsFullSwipe`.\n */\n@Component({\n selector: 'ui-slot',\n template: '<ng-content />',\n host: {\n '[name]': 'android ? undefined : name()',\n '[slotName]': 'android ? name() : undefined',\n '[extraProps]': 'android ? undefined : extraProps()',\n },\n})\nexport class UiSlot {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly name = input.required<string>();\n /** What the slot tells its SwiftUI parent about itself, iOS only. */\n readonly extraProps = input<Readonly<Record<string, unknown>>>();\n}\n\n/**\n * A SwiftUI `List`: rows as SwiftUI lays them out, which is what lets a row take the system's own\n * swipe actions through `ui-swipe-actions`.\n */\n@Component({\n selector: 'ui-list',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiList {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * How far a finger goes sideways, and further than it goes down, before a row's swipe actions take\n * the touch. SwiftUI's own row button still taps at about 20 points and its actions come out by\n * about 30.\n */\nconst SWIPE_SLOP = 20;\n\n/**\n * Take a sideways drag from what holds the touch inside the row, as SwiftUI does: its list moves\n * the row and never taps it. Native sends the app's views inside the row no cancel, since React\n * Native's touch handler runs beside the list's gestures rather than giving way to them, so the\n * row's own responder asks for the drag, and a `pressable` that gives it up does not press.\n */\nfunction takeSidewaysDrag(): void {\n const node = inject(ElementRef).nativeElement as HostNode;\n const engine = node.engine ?? inject(HostEngine);\n let from: { x: number; y: number } | null = null;\n const stop = engine.setResponder(node, {\n onStartShouldSetResponderCapture: (event) => {\n from = { x: event.nativeEvent.pageX ?? 0, y: event.nativeEvent.pageY ?? 0 };\n return false;\n },\n onMoveShouldSetResponderCapture: (event) => {\n if (!from) return false;\n const across = Math.abs((event.nativeEvent.pageX ?? from.x) - from.x);\n const down = Math.abs((event.nativeEvent.pageY ?? from.y) - from.y);\n return across >= SWIPE_SLOP && across > down;\n },\n });\n inject(DestroyRef).onDestroy(stop);\n}\n\n/**\n * The system's swipe actions on a list row, iOS only. The first child is the row; the actions go\n * in `<ui-slot name=\"actions\" [extraProps]=\"{ edge: 'trailing', allowsFullSwipe: true }\">`, one\n * slot per edge, as `ui-button`s. A sideways drag on the row is the swipe's, so a `pressable` in a\n * `ui-view-host` in the row does not press for it.\n */\n@Component({\n selector: 'ui-swipe-actions',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiSwipeActions {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n\n constructor() {\n if (nativePlatform() !== 'android') takeSidewaysDrag();\n }\n}\n\n/** What `ui-slider` sends as the thumb moves: its new value. */\nexport type UiSliderChangeEvent = NativeSyntheticEvent<{ readonly value: number }>;\n\n/**\n * A SwiftUI `Slider`, or Compose's on Android. `valueChanged` reports each new value as the thumb\n * moves; note the d, which SwiftUI's event has and `@expo/ui`'s React prop does not.\n */\n@Component({\n selector: 'ui-slider',\n template: '',\n host: {\n '[value]': 'value()',\n '[min]': 'min()',\n '[max]': 'max()',\n '[step]': 'android ? undefined : stepSize()',\n '[steps]': 'android ? stepsBetween() : undefined',\n '[modifiers]': 'modifiers()',\n '(valueChange)': 'android && valueChanged.emit($event)',\n },\n})\nexport class UiSlider {\n protected readonly nativeView = nativeView();\n readonly value = input<number>(undefined, { transform: optionalNumber });\n readonly min = input<number>(undefined, { transform: optionalNumber });\n readonly max = input<number>(undefined, { transform: optionalNumber });\n /** How many steps the range is divided into; none moves the thumb continuously. */\n readonly steps = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n readonly valueChanged = output<UiSliderChangeEvent>();\n\n protected readonly android = nativePlatform() === 'android';\n /** A whole number of steps, which is all Compose can draw. */\n private readonly wholeSteps = computed(() => {\n const steps = Math.round(this.steps() ?? 0);\n return steps > 0 ? steps : undefined;\n });\n /** SwiftUI takes a step size, and draws 0 to 1 unless it has both ends. */\n protected readonly stepSize = computed(() => {\n const steps = this.wholeSteps();\n const min = this.min();\n const max = this.max();\n return steps && (min !== undefined && max !== undefined ? max - min : 1) / steps;\n });\n /** Compose takes the number of points between the ends. */\n protected readonly stepsBetween = computed(() => {\n const steps = this.wholeSteps();\n return steps && steps - 1;\n });\n}\n\n/**\n * A SwiftUI `VStack`, or Compose's `Column` on Android, centred, as SwiftUI's is, unless `alignment`\n * says otherwise. Without `spacing`, SwiftUI puts its own default spacing between children and Compose\n * puts none.\n */\n@Component({\n selector: 'ui-vstack',\n template: '<ng-content />',\n host: {\n '[alignment]': 'android ? undefined : alignment()',\n '[spacing]': 'android ? undefined : spacing()',\n '[verticalArrangement]': 'android ? spacedBy(spacing()) : undefined',\n '[horizontalAlignment]': 'android ? composeAlignment(alignment()) : undefined',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiVStack {\n protected readonly nativeView = nativeView();\n readonly alignment = input<'leading' | 'center' | 'trailing'>();\n readonly spacing = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly android = nativePlatform() === 'android';\n protected readonly spacedBy = spacedBy;\n protected composeAlignment(alignment: 'leading' | 'center' | 'trailing' | undefined) {\n return alignment === 'leading' ? 'start' : alignment === 'trailing' ? 'end' : 'center';\n }\n}\n\n/**\n * A SwiftUI `Image`: an SF Symbol by `systemName`, a symbol or picture in the asset catalog by\n * `assetName`, or a picture by `uiImage`, the URL of a file on the device.\n */\n@Component({\n selector: 'ui-image',\n template: '',\n host: {\n '[systemName]': 'android ? undefined : systemName()',\n '[assetName]': 'android ? undefined : assetName()',\n '[uiImage]': 'android ? undefined : uiImage()',\n '[modifiers]': 'android ? modifiers() : resolvedModifiers()',\n },\n})\nexport class UiImage {\n protected readonly nativeView = nativeView();\n /** Compose's image is another control, which takes a `source`: none of these are its. */\n protected readonly android = nativePlatform() === 'android';\n readonly systemName = input<string>();\n readonly assetName = input<string>();\n readonly uiImage = input<string>();\n /**\n * A symbol's size in points, as a `font` modifier of that size, which does not scale with\n * Dynamic Type. A `font` modifier in `modifiers` wins over it. Without either, the symbol is\n * SwiftUI's default size, where `@expo/ui`'s own `Image` and a widget layout draw it at 24.\n */\n readonly size = input<number>(undefined, { transform: optionalNumber });\n /** A symbol's colour, as a `foregroundStyle` modifier. */\n readonly color = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n /** SwiftUI's image reads neither `size` nor `color`: `@expo/ui`'s `Image` makes them modifiers. */\n protected readonly resolvedModifiers = computed(() => {\n const modifiers = this.modifiers();\n const size = this.size();\n const hasFont = modifiers?.some((modifier) => modifier.$type === 'font');\n return withModifiers(\n modifiers,\n size !== undefined && !hasFont && { $type: 'font', size },\n foregroundColor(this.color()),\n );\n });\n}\n\n/** A moment: a `Date`, milliseconds since the epoch, or a string `Date` reads. */\nexport type UiDate = Date | number | string;\n\n/** The start and end of a timer. */\nexport interface UiTimerInterval {\n readonly lower: UiDate;\n readonly upper: UiDate;\n}\n\n/** A moment as SwiftUI takes it, in milliseconds since the epoch, or none for what is not one. */\nfunction milliseconds(value: UiDate | null | undefined): number | undefined {\n const time = value == null ? NaN : new Date(value).getTime();\n return Number.isNaN(time) ? undefined : time;\n}\n\n/** No timer unless both ends are moments, as the extension has none. */\nfunction timerMilliseconds(value: UiTimerInterval | null | undefined) {\n const lower = milliseconds(value?.lower);\n const upper = milliseconds(value?.upper);\n return lower === undefined || upper === undefined ? undefined : { lower, upper };\n}\n\n/**\n * A SwiftUI `Text`, or Compose's on Android. Its text is what is written inside it,\n * `<ui-text>Us {{ score }}</ui-text>`, as `<text>` takes its own, or `text`, which wins over it.\n *\n * On iOS it can keep time by itself instead, with no update from the app: `date` is drawn by\n * `dateStyle`, as the time since or until it for `'relative'`, `'offset'` and `'timer'`, and\n * `timerInterval` is a timer running from its `lower` to its `upper`, down unless `countsDown` is\n * false.\n */\n@Component({\n selector: 'ui-text',\n template: '<ng-content />',\n host: {\n '[text]': 'text()',\n '[date]': 'android ? undefined : date()',\n '[dateStyle]': 'android ? undefined : dateStyle()',\n '[timerInterval]': 'android ? undefined : timerInterval()',\n '[countsDown]': 'android ? undefined : countsDown()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiText {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly text = input<string>();\n readonly date = input(undefined, { transform: milliseconds });\n readonly dateStyle = input<'timer' | 'relative' | 'offset' | 'date' | 'time'>();\n readonly timerInterval = input(undefined, { transform: timerMilliseconds });\n readonly countsDown = input<boolean>(undefined, { transform: optionalBoolean });\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * What `ui-date-picker` sends when the user picks: the chosen moment, which SwiftUI reports in\n * milliseconds since the epoch.\n */\nexport type UiDateChangeEvent = NativeSyntheticEvent<{ readonly date: number | string }>;\n\n/**\n * Listen for one of a `ui-*` view's own events from inside its component. Not a host listener:\n * one named as an output listens to the output itself, and see the note at the top of this file\n * for why the outputs are never emitted.\n */\nfunction listen(event: string, handle: (payload: Record<string, unknown>) => void): void {\n const node = inject(ElementRef).nativeElement as HostNode;\n const engine = node.engine ?? inject(HostEngine);\n const stop = engine.setEventListener(node, event, (raw) =>\n handle((raw as NativeSyntheticEvent<Record<string, unknown>>)?.nativeEvent ?? {}),\n );\n inject(DestroyRef).onDestroy(stop);\n}\n\n/**\n * A Compose event as the SwiftUI one it stands in for: its payload renamed, and stopping it stops the\n * event it came from.\n */\nfunction withNativeEvent<T>(event: NativeSyntheticEvent, nativeEvent: T): NativeSyntheticEvent<T> {\n return {\n nativeEvent,\n target: event.target,\n stopPropagation: () => event.stopPropagation(),\n isPropagationStopped: () => event.isPropagationStopped(),\n };\n}\n\n/**\n * The caller's modifiers, with each modifier given added after them: what `@expo/ui`'s own\n * components do with an input their native view reads as a modifier rather than as a prop.\n */\nfunction withModifiers(\n modifiers: readonly UiModifier[] | undefined,\n ...added: readonly (UiModifier | false | undefined)[]\n): readonly UiModifier[] | undefined {\n const given = added.filter((modifier): modifier is UiModifier => !!modifier);\n return given.length ? [...(modifiers ?? []), ...given] : modifiers;\n}\n\n/**\n * SwiftUI's `foregroundStyle` modifier in one colour, as `@expo/ui`'s `foregroundStyle(color)`.\n * `@expo/ui` to 57.0.14 reads `styleType` and `color`, and from 57.0.15 a `style`: this sends both.\n */\nfunction foregroundColor(color: string | undefined): UiModifier | undefined {\n return color === undefined\n ? undefined\n : { $type: 'foregroundStyle', style: { type: 'color', color }, styleType: 'color', color };\n}\n\n/** SwiftUI's `accessibilityLabel` modifier, what VoiceOver reads for the view. */\nfunction spokenLabel(label: string | undefined): UiModifier | undefined {\n return label === undefined ? undefined : { $type: 'accessibilityLabel', label };\n}\n\n/** Compose's `semantics` modifier with a `contentDescription`, what TalkBack reads for the view. */\nfunction contentDescription(label: string | undefined): UiModifier | undefined {\n return label === undefined ? undefined : { $type: 'semantics', contentDescription: label };\n}\n\n/** The caller's modifiers, with SwiftUI's `disabled` added while the field is. */\nfunction withDisabled(\n modifiers: readonly UiModifier[] | undefined,\n disabled: boolean,\n): readonly UiModifier[] | undefined {\n return disabled ? [...(modifiers ?? []), { $type: 'disabled', disabled: true }] : modifiers;\n}\n\n/**\n * A date picker: SwiftUI's `DatePicker` on iOS, Compose's on Android.\n *\n * A Signal Forms field as it stands - `<ui-date-picker [formField]=\"f.arrival\" />` - through its\n * `value` model, a `Date` (or null). The two platforms take and report a date differently, and\n * this is where that difference ends: SwiftUI is handed `selection` as ISO text and reports\n * `dateChange`; Compose is handed `initialDate` in milliseconds and reports `dateSelected`. Either\n * way the model gets a `Date`. A `disabled` field adds SwiftUI's `disabled` modifier. SwiftUI's\n * picker always shows a date, today when the field is empty, and the date it reports as it appears\n * is not taken as the user's; an optional date is best asked for behind a button that shows the\n * picker once the user wants to give one.\n *\n * `selection` is still accepted as ISO text, for a picker bound without a form.\n */\n@Component({\n selector: 'ui-date-picker',\n template: '',\n host: {\n '[title]': 'android ? undefined : title()',\n '[selection]': 'android ? undefined : resolvedSelection()',\n '[initialDate]': 'android ? initialDate() : undefined',\n '[displayedComponents]': 'resolvedComponents()',\n '[range]': 'android ? undefined : range()',\n '[selectableDates]': 'android ? selectableDates() : undefined',\n '[modifiers]': 'resolvedModifiers()',\n },\n})\nexport class UiDatePicker {\n protected readonly nativeView = nativeView();\n readonly title = input<string>();\n readonly selection = input<string>();\n /**\n * What the picker shows. An empty list shows nothing in SwiftUI; Compose has no such choice,\n * so on Android it shows the date and the time.\n */\n readonly displayedComponents = input<readonly ('date' | 'hourAndMinute')[]>();\n readonly range = input<{ readonly start?: string; readonly end?: string }>();\n readonly accessibilityLabel = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n /** The picked date: what `[formField]` binds. */\n readonly value = model<Date | null>(null);\n readonly disabled = input(false, { transform: booleanAttribute });\n /** The user picked, which is when a form shows a field's errors: a picker has no blur. */\n readonly touch = output<void>();\n readonly dateChange = output<UiDateChangeEvent>();\n\n private readonly android = nativePlatform() === 'android';\n\n protected readonly resolvedSelection = computed(\n () => this.selection() ?? this.value()?.toISOString(),\n );\n /** SwiftUI takes a list of what to show, and Compose one word for it. */\n protected readonly resolvedComponents = computed(() => {\n const shown = this.displayedComponents();\n if (!this.android || !shown) return shown;\n return shown.length === 1 ? shown[0] : 'dateAndTime';\n });\n protected readonly initialDate = computed(() => this.value()?.getTime() ?? null);\n /** Compose takes `range` as `selectableDates`, each end in milliseconds. */\n protected readonly selectableDates = computed(() => {\n const range = this.range();\n return (\n range && { start: milliseconds(range.start) ?? null, end: milliseconds(range.end) ?? null }\n );\n });\n /**\n * SwiftUI's picker reads `disabled` and `accessibilityLabel` as modifiers, and Compose's reads\n * `accessibilityLabel` as the `semantics` modifier's `contentDescription`.\n */\n protected readonly resolvedModifiers = computed(() =>\n this.android\n ? withModifiers(this.modifiers(), contentDescription(this.accessibilityLabel()))\n : withModifiers(\n withDisabled(this.modifiers(), this.disabled()),\n spokenLabel(this.accessibilityLabel()),\n ),\n );\n\n /**\n * SwiftUI's picker cannot be empty: it shows today, and reports that as a change the moment it\n * appears. Taken as the user's choice, an empty date field would fill itself in, pass\n * `required` and mark the form dirty before anyone touched it. So the first report, while the\n * field is empty and the picker has only just appeared, is the picker describing itself.\n */\n private readonly appeared = Date.now();\n private settled = false;\n\n constructor() {\n listen(this.android ? 'topDateSelected' : 'topDateChange', ({ date }) => {\n if (typeof date !== 'string' && typeof date !== 'number') return;\n const describingItself =\n !this.settled && this.value() === null && Date.now() - this.appeared < APPEARING_MS;\n this.settled = true;\n if (describingItself) return;\n this.value.set(new Date(date));\n this.touch.emit();\n });\n }\n}\n\n/** How long after a date picker appears its first report is taken to be about itself. */\nconst APPEARING_MS = 1000;\n\n/** Compose's `SingleChoiceSegmentedButtonRow`, Android only: a row of `ui-segmented-button`s. */\n@Component({\n selector: 'ui-single-choice-segmented-button-row',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiSingleChoiceSegmentedButtonRow {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** Compose's `SegmentedButton`, Android only, its label in a `<ui-slot name=\"label\">`. */\n@Component({\n selector: 'ui-segmented-button',\n template: '<ng-content />',\n host: {\n '[selected]': 'selected()',\n '[enabled]': 'enabled()',\n '[modifiers]': 'modifiers()',\n '(buttonPressed)': 'press.emit()',\n },\n})\nexport class UiSegmentedButton {\n protected readonly nativeView = nativeView();\n readonly selected = input(false, { transform: booleanAttribute });\n readonly enabled = input(true, { transform: booleanAttribute });\n readonly modifiers = input<readonly UiModifier[]>();\n readonly press = output<void>();\n}\n\n/**\n * Compose's `ExposedDropdownMenuBox`, Android only: an anchor, a view with the `menuAnchor`\n * modifier, and the `ui-exposed-dropdown-menu` it opens. A tap on the anchor asks to open or close\n * it, through `toggled`; `expanded` says which it is.\n */\n@Component({\n selector: 'ui-exposed-dropdown-menu-box',\n template: '<ng-content />',\n host: {\n '[expanded]': 'expanded()',\n '[modifiers]': 'modifiers()',\n // Not a model: its output would be named for this event, and take it.\n '(expandedChange)': 'toggled.emit($event.nativeEvent.value)',\n },\n})\nexport class UiExposedDropdownMenuBox {\n protected readonly nativeView = nativeView();\n readonly expanded = input(false, { transform: booleanAttribute });\n readonly toggled = output<boolean>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** Compose's `ExposedDropdownMenu`, Android only: the `ui-dropdown-menu-item`s a box opens. */\n@Component({\n selector: 'ui-exposed-dropdown-menu',\n template: '<ng-content />',\n host: {\n '[expanded]': 'expanded()',\n '[modifiers]': 'modifiers()',\n '(dismissRequest)': 'dismiss.emit()',\n },\n})\nexport class UiExposedDropdownMenu {\n protected readonly nativeView = nativeView();\n readonly expanded = input(false, { transform: booleanAttribute });\n readonly modifiers = input<readonly UiModifier[]>();\n /** A tap outside the menu, or Back: the box should close it. */\n readonly dismiss = output<void>();\n}\n\n/** Compose's `DropdownMenuItem`, Android only, its text in a `<ui-slot name=\"text\">`. */\n@Component({\n selector: 'ui-dropdown-menu-item',\n template: '<ng-content />',\n host: {\n '[enabled]': 'enabled()',\n '[modifiers]': 'modifiers()',\n '(itemPressed)': 'press.emit()',\n },\n})\nexport class UiDropdownMenuItem {\n protected readonly nativeView = nativeView();\n readonly enabled = input(true, { transform: booleanAttribute });\n readonly modifiers = input<readonly UiModifier[]>();\n readonly press = output<void>();\n}\n\n/**\n * A segmented picker's `font` modifiers again, as `@ng-native/expo`'s own modifier: SwiftUI draws\n * the segments as a `UISegmentedControl`, which `font` does not reach. In a build without that\n * modifier, Expo Go's, the segments stay in the system font.\n */\nfunction segmentFonts(modifiers: readonly UiModifier[]): UiModifier[] {\n const segmented = modifiers.some((m) => m.$type === 'pickerStyle' && m['style'] === 'segmented');\n if (!segmented) return [];\n return modifiers\n .filter((m) => m.$type === 'font')\n .map((m) => ({ ...m, $type: 'ngNativeSegmentedFont' }));\n}\n\n/** One choice in a `ui-picker`: what the field is set to, and what the user reads. */\nexport interface UiPickerOption {\n readonly value: string | number;\n readonly label: string;\n}\n\n/**\n * A SwiftUI `Picker` as a Signal Forms field: `<ui-picker [options]=\"rooms\" [formField]=\"f.room\"\n * />`. `options` draws the choices, each tagged with its value, which is the content slot and `tag`\n * modifiers `@expo/ui` otherwise wants written out by hand; children still work for anything\n * richer on iOS. `pickerStyle` is SwiftUI's (`menu`, `segmented`, `wheel`, `inline`).\n *\n * Compose has no `Picker`, so on Android the options are drawn with its own controls: `segmented`\n * as a row of segmented buttons, and any other style as an exposed dropdown menu under the chosen\n * option. `label`, `systemImage`, children and `modifiers` are SwiftUI's alone. A `font` modifier\n * reaches a segmented picker's segments in a development build, not in Expo Go.\n */\n@Component({\n selector: 'ui-picker',\n imports: [\n UiDropdownMenuItem,\n UiExposedDropdownMenu,\n UiExposedDropdownMenuBox,\n UiSegmentedButton,\n UiSingleChoiceSegmentedButtonRow,\n UiSlot,\n UiText,\n ],\n template: `\n @if (android) {\n @if (pickerStyle() === 'segmented') {\n <ui-single-choice-segmented-button-row>\n @for (option of options() ?? []; track option.value) {\n <ui-segmented-button\n [selected]=\"option.value === value()\"\n [enabled]=\"!disabled()\"\n (press)=\"choose(option.value)\"\n >\n <ui-slot name=\"label\"><ui-text [text]=\"option.label\" /></ui-slot>\n </ui-segmented-button>\n }\n </ui-single-choice-segmented-button-row>\n } @else {\n <ui-exposed-dropdown-menu-box\n [expanded]=\"open()\"\n (toggled)=\"open.set(!disabled() && $event)\"\n >\n <ui-text [text]=\"chosenLabel()\" [modifiers]=\"anchor()\" />\n <ui-exposed-dropdown-menu [expanded]=\"open()\" (dismiss)=\"open.set(false)\">\n @for (option of options() ?? []; track option.value) {\n <ui-dropdown-menu-item [enabled]=\"!disabled()\" (press)=\"choose(option.value)\">\n <ui-slot name=\"text\"><ui-text [text]=\"option.label\" /></ui-slot>\n </ui-dropdown-menu-item>\n }\n </ui-exposed-dropdown-menu>\n </ui-exposed-dropdown-menu-box>\n }\n } @else {\n @if (options(); as options) {\n <ui-slot name=\"content\">\n @for (option of options; track option.value) {\n <ui-text [text]=\"option.label\" [modifiers]=\"tags().get(option.value)\" />\n }\n </ui-slot>\n }\n <ng-content />\n }\n `,\n host: {\n '[label]': 'android ? undefined : shownLabel()',\n '[systemImage]': 'android ? undefined : systemImage()',\n '[selection]': 'android ? undefined : value()',\n '[modifiers]': 'android ? undefined : resolvedModifiers()',\n },\n})\nexport class UiPicker {\n protected readonly nativeView = nativeView();\n readonly label = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n readonly options = input<readonly UiPickerOption[]>();\n readonly pickerStyle = input<\n 'automatic' | 'menu' | 'segmented' | 'wheel' | 'inline' | 'palette'\n >();\n readonly modifiers = input<readonly UiModifier[]>();\n /** The chosen option's value: what `[formField]` binds. */\n readonly value = model<string | number | null>(null);\n readonly disabled = input(false, { transform: booleanAttribute });\n /** The user picked, which is when a form shows a field's errors: a picker has no blur. */\n readonly touch = output<void>();\n readonly selectionChange =\n output<NativeSyntheticEvent<{ readonly selection: string | number }>>();\n\n /** Each option's `tag`, one array per value, so a pass hands native the same objects. */\n protected readonly tags = computed(\n () =>\n new Map(\n (this.options() ?? []).map((option) => [\n option.value,\n [{ $type: 'tag', tag: option.value }] as readonly UiModifier[],\n ]),\n ),\n );\n\n protected readonly android = nativePlatform() === 'android';\n /** SwiftUI's picker view draws nothing without a label, and a segmented one never shows it. */\n protected readonly shownLabel = computed(() => this.label() ?? '');\n /** Whether Android's dropdown is open. */\n protected readonly open = signal(false);\n /**\n * What Android's dropdown shows closed: the chosen option, or the label before there is one,\n * with the arrow that says a tap opens it, which plain text otherwise does not.\n */\n protected readonly chosenLabel = computed(() => {\n const chosen = this.options()?.find((option) => option.value === this.value());\n return `${chosen?.label ?? this.label() ?? ''} \\u25BE`;\n });\n /** What anchors Android's dropdown to the option it shows. */\n protected readonly anchor = computed(() => [\n { $type: 'menuAnchor', type: 'primaryNotEditable', enabled: !this.disabled() },\n ]);\n\n protected readonly resolvedModifiers = computed(() => {\n const style = this.pickerStyle();\n const own = style\n ? [{ $type: 'pickerStyle', style }, ...(this.modifiers() ?? [])]\n : this.modifiers();\n return withDisabled(own && [...own, ...segmentFonts(own)], this.disabled());\n });\n\n constructor() {\n listen('topSelectionChange', ({ selection }) => {\n if (typeof selection !== 'string' && typeof selection !== 'number') return;\n this.choose(selection);\n });\n }\n\n protected choose(selection: string | number): void {\n this.open.set(false);\n if (this.disabled()) return;\n this.value.set(selection);\n this.touch.emit();\n }\n}\n\n/** What `ui-toggle` sends when it is switched: whether it is now on. */\nexport type UiToggleChangeEvent = NativeSyntheticEvent<{ readonly isOn: boolean }>;\n\n/**\n * A SwiftUI `Toggle`, or Compose's `Switch` on Android. `isOnChange` reports each flip. Bound to\n * `isOn`, it shows what `isOn` says; without it, it switches itself. `label` is SwiftUI's alone.\n */\n@Component({\n selector: 'ui-toggle',\n template: '<ng-content />',\n host: {\n '[isOn]': 'android ? undefined : isOn()',\n '[value]': 'android ? (isOn() ?? switchedOn()) : undefined',\n '[label]': 'android ? undefined : label()',\n '[modifiers]': 'modifiers()',\n '(checkedChange)': 'android && checked($event)',\n },\n})\nexport class UiToggle {\n protected readonly nativeView = nativeView();\n readonly isOn = input<boolean>(undefined, { transform: optionalBoolean });\n readonly label = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n readonly isOnChange = output<UiToggleChangeEvent>();\n\n protected readonly android = nativePlatform() === 'android';\n /** What Compose's switch shows without `isOn`: SwiftUI's keeps this itself, Compose's does not. */\n protected readonly switchedOn = signal(false);\n protected checked(event: NativeSyntheticEvent<{ readonly value: boolean }>): void {\n this.switchedOn.set(event.nativeEvent.value);\n this.isOnChange.emit(withNativeEvent(event, { isOn: event.nativeEvent.value }));\n }\n}\n\n/** What `ui-stepper` sends as it is stepped: its new value. */\nexport type UiStepperChangeEvent = NativeSyntheticEvent<{ readonly value: number }>;\n\n/** A SwiftUI `Stepper`, between `min` and `max` by `step`. */\n@Component({\n selector: 'ui-stepper',\n template: '<ng-content />',\n host: {\n '[value]': 'value()',\n '[min]': 'min()',\n '[max]': 'max()',\n '[step]': 'step()',\n '[label]': 'label()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiStepper {\n protected readonly nativeView = nativeView();\n readonly value = input<number>(undefined, { transform: optionalNumber });\n readonly min = input<number>(undefined, { transform: optionalNumber });\n readonly max = input<number>(undefined, { transform: optionalNumber });\n readonly step = input<number>(undefined, { transform: optionalNumber });\n readonly label = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n readonly valueChange = output<UiStepperChangeEvent>();\n}\n\n/** What `ui-text-field` sends as it is typed into: the text so far. */\nexport type UiTextFieldChangeEvent = NativeSyntheticEvent<{ readonly value: string }>;\n\n/**\n * A SwiftUI `TextField`. `text` is where it keeps what is typed, a `nativeState('')`: the field\n * writes to it on the UI thread, and `textChange` reports each change.\n */\n@Component({\n selector: 'ui-text-field',\n template: '',\n host: {\n '[text]': 'text()?.id',\n '[placeholder]': 'placeholder()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiTextField {\n protected readonly nativeView = nativeView();\n readonly text = input<NativeState<string> | null>();\n readonly placeholder = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n readonly textChange = output<UiTextFieldChangeEvent>();\n}\n\n/** What `ui-color-picker` sends when a colour is picked: the colour, as hex. */\nexport type UiColorChangeEvent = NativeSyntheticEvent<{ readonly value: string }>;\n\n/** A SwiftUI `ColorPicker`. `selection` is a colour as hex. */\n@Component({\n selector: 'ui-color-picker',\n template: '',\n host: {\n '[selection]': 'selection()',\n '[label]': 'label()',\n '[supportsOpacity]': 'supportsOpacity()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiColorPicker {\n protected readonly nativeView = nativeView();\n readonly selection = input<string>();\n readonly label = input<string>();\n readonly supportsOpacity = input<boolean>(undefined, { transform: optionalBoolean });\n readonly modifiers = input<readonly UiModifier[]>();\n readonly selectionChange = output<UiColorChangeEvent>();\n}\n\n/**\n * A SwiftUI `Gauge`: `value` between `min` and `max`, drawn as `type` says, with its labels drawn as\n * text in the slots SwiftUI reads them from, as `@expo/ui`'s `Gauge` draws them.\n */\n@Component({\n selector: 'ui-gauge',\n imports: [UiSlot, UiText],\n template: `@if (currentValueLabel() !== undefined) {\n <ui-slot name=\"currentValue\"><ui-text [text]=\"currentValueLabel()\" /></ui-slot>\n }\n @if (minimumValueLabel() !== undefined) {\n <ui-slot name=\"minimumValue\"><ui-text [text]=\"minimumValueLabel()\" /></ui-slot>\n }\n @if (maximumValueLabel() !== undefined) {\n <ui-slot name=\"maximumValue\"><ui-text [text]=\"maximumValueLabel()\" /></ui-slot>\n }\n <ng-content />`,\n host: {\n '[value]': 'value()',\n '[min]': 'min()',\n '[max]': 'max()',\n '[modifiers]': 'resolvedModifiers()',\n },\n})\nexport class UiGauge {\n protected readonly nativeView = nativeView();\n readonly value = input<number>(undefined, { transform: optionalNumber });\n readonly min = input<number>(undefined, { transform: optionalNumber });\n readonly max = input<number>(undefined, { transform: optionalNumber });\n /**\n * How it is drawn, as the `gaugeStyle` modifier: `'automatic'`, `'circular'`,\n * `'circularCapacity'`, `'linear'` or `'linearCapacity'`.\n */\n readonly type = input<string>();\n readonly currentValueLabel = input<string>();\n readonly minimumValueLabel = input<string>();\n readonly maximumValueLabel = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly resolvedModifiers = computed(() => {\n const style = this.type();\n return withModifiers(this.modifiers(), style !== undefined && { $type: 'gaugeStyle', style });\n });\n}\n\n/** One point of a `ui-chart`: `x`, a label or a number, against `y`, with a colour of its own. */\nexport interface UiChartDataPoint {\n readonly x: string | number;\n readonly y: number;\n readonly color?: string;\n}\n\n/** How a `ui-chart` draws its points: `pie` needs iOS 17. */\nexport type UiChartType = 'line' | 'point' | 'bar' | 'area' | 'pie' | 'rectangle';\n\n/** The symbol a `ui-chart` marks a point with. */\nexport type UiChartPointSymbol = 'circle' | 'square' | 'diamond';\n\n/** A line chart's line: its dashes, width, colour, and the symbol at each point. */\nexport interface UiChartLineStyle {\n readonly dashArray?: readonly number[];\n readonly width?: number;\n readonly pointStyle?: UiChartPointSymbol;\n readonly pointSize?: number;\n readonly color?: string;\n}\n\n/** A point chart's symbol and its size. */\nexport interface UiChartPointStyle {\n readonly pointStyle?: UiChartPointSymbol;\n readonly pointSize?: number;\n}\n\n/** An area chart's fill. */\nexport interface UiChartAreaStyle {\n readonly color?: string;\n}\n\n/** A bar chart's bars: their corner radius and width. */\nexport interface UiChartBarStyle {\n readonly cornerRadius?: number;\n readonly width?: number;\n}\n\n/** A pie chart's slices: `innerRadius` from 0, a full pie, to 0.5 for a donut, and the gap between. */\nexport interface UiChartPieStyle {\n readonly innerRadius?: number;\n readonly angularInset?: number;\n}\n\n/** A rectangle chart's colour and corner radius. */\nexport interface UiChartRectangleStyle {\n readonly color?: string;\n readonly cornerRadius?: number;\n}\n\n/** The lines `referenceLines` draws across a `ui-chart`. */\nexport interface UiChartRuleStyle {\n readonly color?: string;\n readonly lineWidth?: number;\n readonly dashArray?: readonly number[];\n}\n\n/**\n * A Swift Charts chart of `data`, drawn as `type` says, iOS only, as Compose has no chart. Each\n * style applies to its own type alone; `referenceLines` are drawn across it in `ruleStyle`.\n * `showLegend` shows only when no point has a colour of its own.\n */\n@Component({\n selector: 'ui-chart',\n template: '',\n host: {\n '[data]': 'data()',\n '[type]': 'type()',\n '[showGrid]': 'showGrid()',\n '[animate]': 'animate()',\n '[showLegend]': 'showLegend()',\n '[referenceLines]': 'referenceLines()',\n '[lineStyle]': 'lineStyle()',\n '[pointStyle]': 'pointStyle()',\n '[areaStyle]': 'areaStyle()',\n '[barStyle]': 'barStyle()',\n '[pieStyle]': 'pieStyle()',\n '[rectangleStyle]': 'rectangleStyle()',\n '[ruleStyle]': 'ruleStyle()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiChart {\n protected readonly nativeView = nativeView();\n readonly data = input.required<readonly UiChartDataPoint[]>();\n readonly type = input<UiChartType>();\n readonly showGrid = input<boolean>(undefined, { transform: optionalBoolean });\n readonly animate = input<boolean>(undefined, { transform: optionalBoolean });\n readonly showLegend = input<boolean>(undefined, { transform: optionalBoolean });\n readonly referenceLines = input<readonly UiChartDataPoint[]>();\n readonly lineStyle = input<UiChartLineStyle>();\n readonly pointStyle = input<UiChartPointStyle>();\n readonly areaStyle = input<UiChartAreaStyle>();\n readonly barStyle = input<UiChartBarStyle>();\n readonly pieStyle = input<UiChartPieStyle>();\n readonly rectangleStyle = input<UiChartRectangleStyle>();\n readonly ruleStyle = input<UiChartRuleStyle>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `ProgressView`: a bar filled to `value`, from 0 to 1, or a spinner without one. On\n * Android, Compose's `LinearProgressIndicator`, a moving bar rather than a spinner without a value.\n * On iOS, `timerInterval` has the bar keep time by itself from its `lower` to its `upper`, emptying\n * unless `countsDown` is false.\n */\n@Component({\n selector: 'ui-progress',\n template: '',\n host: {\n '[value]': 'android ? undefined : value()',\n '[progress]': 'android ? value() : undefined',\n '[timerInterval]': 'android ? undefined : timerInterval()',\n '[countsDown]': 'android ? undefined : countsDown()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiProgress {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly value = input<number>(undefined, { transform: optionalNumber });\n readonly timerInterval = input(undefined, { transform: timerMilliseconds });\n readonly countsDown = input<boolean>(undefined, { transform: optionalBoolean });\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `HStack`, or Compose's `Row` on Android, centred, as SwiftUI's is, unless `alignment`\n * says otherwise. Compose has no `firstTextBaseline`, and centres instead. Without `spacing`, SwiftUI\n * puts its own default spacing between children and Compose puts none.\n */\n@Component({\n selector: 'ui-hstack',\n template: '<ng-content />',\n host: {\n '[alignment]': 'android ? undefined : alignment()',\n '[spacing]': 'android ? undefined : spacing()',\n '[horizontalArrangement]': 'android ? spacedBy(spacing()) : undefined',\n '[verticalAlignment]': 'android ? composeAlignment(alignment()) : undefined',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiHStack {\n protected readonly nativeView = nativeView();\n readonly alignment = input<'top' | 'center' | 'bottom' | 'firstTextBaseline'>();\n readonly spacing = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly android = nativePlatform() === 'android';\n protected readonly spacedBy = spacedBy;\n protected composeAlignment(\n alignment: 'top' | 'center' | 'bottom' | 'firstTextBaseline' | undefined,\n ) {\n return alignment === 'top' || alignment === 'bottom' ? alignment : 'center';\n }\n}\n\nfunction spacedBy(spacing: number | undefined) {\n return spacing === undefined ? undefined : { spacedBy: Math.round(spacing) };\n}\n\n/** A SwiftUI `Spacer`: the room left over in its stack. */\n@Component({\n selector: 'ui-spacer',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiSpacer {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** Where `ui-zstack` puts its layers, as SwiftUI names it. */\nexport type UiZStackAlignment =\n | 'center'\n | 'leading'\n | 'trailing'\n | 'top'\n | 'bottom'\n | 'topLeading'\n | 'topTrailing'\n | 'bottomLeading'\n | 'bottomTrailing';\n\n/** The same place, as Compose's `Box` names it. */\nconst CONTENT_ALIGNMENT: Record<UiZStackAlignment, string> = {\n center: 'center',\n leading: 'centerStart',\n trailing: 'centerEnd',\n top: 'topCenter',\n bottom: 'bottomCenter',\n topLeading: 'topStart',\n topTrailing: 'topEnd',\n bottomLeading: 'bottomStart',\n bottomTrailing: 'bottomEnd',\n};\n\n/**\n * A SwiftUI `ZStack`: its children drawn over one another, the first at the back. On Android,\n * Compose's `Box`, centred, as SwiftUI's is, unless `alignment` says otherwise.\n */\n@Component({\n selector: 'ui-zstack',\n template: '<ng-content />',\n host: {\n '[alignment]': 'android ? undefined : alignment()',\n '[contentAlignment]': 'android ? contentAlignment[alignment() ?? \"center\"] : undefined',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiZStack {\n protected readonly nativeView = nativeView();\n readonly alignment = input<UiZStackAlignment>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n protected readonly android = nativePlatform() === 'android';\n protected readonly contentAlignment = CONTENT_ALIGNMENT;\n}\n\n/** A SwiftUI `Rectangle`, filling the space it is given. Colour it with `foregroundStyle`. */\n@Component({\n selector: 'ui-rectangle',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiRectangle {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `RoundedRectangle`, its corners rounded by `cornerRadius`. */\n@Component({\n selector: 'ui-rounded-rectangle',\n template: '',\n host: { '[cornerRadius]': 'cornerRadius()', '[modifiers]': 'modifiers()' },\n})\nexport class UiRoundedRectangle {\n protected readonly nativeView = nativeView();\n readonly cornerRadius = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `UnevenRoundedRectangle`: a rectangle with a radius of its own for each corner. */\n@Component({\n selector: 'ui-uneven-rounded-rectangle',\n template: '',\n host: {\n '[topLeadingRadius]': 'topLeadingRadius()',\n '[topTrailingRadius]': 'topTrailingRadius()',\n '[bottomLeadingRadius]': 'bottomLeadingRadius()',\n '[bottomTrailingRadius]': 'bottomTrailingRadius()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiUnevenRoundedRectangle {\n protected readonly nativeView = nativeView();\n readonly topLeadingRadius = input<number>(undefined, { transform: optionalNumber });\n readonly topTrailingRadius = input<number>(undefined, { transform: optionalNumber });\n readonly bottomLeadingRadius = input<number>(undefined, { transform: optionalNumber });\n readonly bottomTrailingRadius = input<number>(undefined, { transform: optionalNumber });\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Capsule`: a rectangle with fully rounded ends. */\n@Component({\n selector: 'ui-capsule',\n template: '',\n host: { '[cornerStyle]': 'cornerStyle()', '[modifiers]': 'modifiers()' },\n})\nexport class UiCapsule {\n protected readonly nativeView = nativeView();\n readonly cornerStyle = input<'continuous' | 'circular'>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Circle`, as large as fits the space it is given. */\n@Component({\n selector: 'ui-circle',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiCircle {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Ellipse`, filling the space it is given. */\n@Component({\n selector: 'ui-ellipse',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiEllipse {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * WidgetKit's `AccessoryWidgetBackground`: the system's backdrop for a lock screen widget, the\n * translucent disc or panel behind its content.\n */\n@Component({\n selector: 'ui-accessory-widget-background',\n template: '',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiAccessoryWidgetBackground {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Label`: a title beside an SF Symbol. */\n@Component({\n selector: 'ui-label',\n imports: [UiImage, UiSlot],\n template: `@if (iconColor(); as color) {\n <ui-slot name=\"icon\"><ui-image [systemName]=\"systemImage()\" [modifiers]=\"[color]\" /></ui-slot>\n }`,\n host: {\n '[title]': 'title()',\n '[systemImage]': 'systemImage()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiLabel {\n protected readonly nativeView = nativeView();\n readonly title = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n /**\n * The colour of the symbol alone, drawn as the label's icon in that colour, since SwiftUI's\n * label takes no colour. The `foregroundStyle` modifier colours the title too.\n */\n readonly color = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n\n /** The icon's colour, when there is a symbol to draw in it. */\n protected readonly iconColor = computed(() =>\n this.systemImage() === undefined ? undefined : foregroundColor(this.color()),\n );\n}\n\n/**\n * A SwiftUI `Link`: opens `destination`, a URL, when tapped. It shows `label`, or the views\n * written inside it. In a widget, a link is how a tap opens the app at a deep link.\n */\n@Component({\n selector: 'ui-link',\n template: '<ng-content />',\n host: {\n '[destination]': 'destination()',\n '[label]': 'label()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiLink {\n protected readonly nativeView = nativeView();\n readonly destination = input.required<string>();\n readonly label = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `LabeledContent`: a label, and its content beside it. */\n@Component({\n selector: 'ui-labeled-content',\n imports: [UiSlot],\n template: '<ui-slot name=\"content\"><ng-content /></ui-slot>',\n host: { '[label]': 'label()', '[modifiers]': 'modifiers()' },\n})\nexport class UiLabeledContent {\n protected readonly nativeView = nativeView();\n readonly label = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Form`: settings-style grouped rows. */\n@Component({\n selector: 'ui-form',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiForm {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `Section` of a form or a list, under `title`, iOS only. A `<ui-slot name=\"header\">`\n * is its header in place of a `title`, and a `<ui-slot name=\"footer\">` is the note under its rows.\n * When both a non-empty `title` and a header slot are set, `@expo/ui`'s `SectionView` draws the\n * `title` and drops the slot; an empty `title` counts as unset. The slot's `name` is written as it is,\n * not bound, as that is what picks it out of the rows.\n */\n@Component({\n selector: 'ui-section',\n imports: [UiSlot],\n template: `<ng-content select=\"ui-slot[name=header]\" />\n <ui-slot name=\"content\"><ng-content /></ui-slot>\n <ng-content select=\"ui-slot[name=footer]\" />`,\n host: { '[title]': 'title()', '[modifiers]': 'modifiers()' },\n})\nexport class UiSection {\n protected readonly nativeView = nativeView();\n readonly title = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `Group`, iOS only: its children as they are, with no layout of its own. What it is for\n * is `modifiers` that belong to several views at once, or to content that takes none itself, as a\n * sheet's presentation modifiers go on a group around a `ui-view-host`.\n */\n@Component({\n selector: 'ui-group',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiGroup {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * A SwiftUI `NavigationStack`, iOS only: the bar a `ui-toolbar` inside it puts its items in, and\n * that a `navigationTitle` modifier on its content titles.\n */\n@Component({\n selector: 'ui-navigation-stack',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiNavigationStack {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/**\n * SwiftUI's `toolbar`, iOS only. Its children are the view the toolbar belongs to, and its items go\n * in `<ui-slot name=\"content\">`, each a `ui-toolbar-item`. It shows in the bar of the\n * `ui-navigation-stack` around it.\n */\n@Component({\n selector: 'ui-toolbar',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiToolbar {\n protected readonly nativeView = nativeView();\n readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** Where a `ui-toolbar-item` sits, as SwiftUI's `ToolbarItemPlacement` names them. */\nexport type UiToolbarItemPlacement =\n | 'automatic'\n | 'principal'\n | 'navigation'\n | 'primaryAction'\n | 'secondaryAction'\n | 'status'\n | 'confirmationAction'\n | 'cancellationAction'\n | 'destructiveAction'\n | 'keyboard'\n | 'topBarLeading'\n | 'topBarTrailing'\n | 'topBarPinnedTrailing'\n | 'largeTitle'\n | 'bottomBar';\n\n/**\n * One item of a `ui-toolbar`, SwiftUI's `ToolbarItem`: a `ui-button`, or a `ui-text` as a title\n * with `placement=\"principal\"`. Unplaced, SwiftUI places it. A placement the OS does not have is\n * read as `automatic`.\n *\n * Written inside a `ui-bottom-sheet` it goes in the sheet's own toolbar, which is how a sheet\n * shows the system's close button.\n */\n@Component({\n selector: 'ui-toolbar-item',\n template: '<ng-content />',\n host: { '[name]': '\"item\"', '[extraProps]': 'extraProps()' },\n})\nexport class UiToolbarItem {\n protected readonly nativeView = nativeView();\n readonly placement = input<UiToolbarItemPlacement>();\n /** How readily the item gives up its place when the bar runs out of room, from iOS 27. */\n readonly visibilityPriority = input<'automatic' | 'low' | 'high'>();\n\n /** What the slot tells the toolbar about itself: only what is set, so SwiftUI decides the rest. */\n protected readonly extraProps = computed(() => {\n const placement = this.placement();\n const visibilityPriority = this.visibilityPriority();\n if (!placement && !visibilityPriority) return undefined;\n return { ...(placement && { placement }), ...(visibilityPriority && { visibilityPriority }) };\n });\n}\n\n/**\n * A height a SwiftUI sheet rests at, as `@expo/ui`'s `PresentationDetent`: about half the screen,\n * all of it, a fraction of it from 0 to 1, or a height in points.\n */\nexport type UiPresentationDetent =\n 'medium' | 'large' | { readonly fraction: number } | { readonly height: number };\n\n/**\n * Whether the screen behind a SwiftUI sheet takes touches, as `presentationBackgroundInteraction`\n * says it: as the system decides, always, never, or while the sheet rests at or below a detent.\n */\nexport type UiBottomSheetBackgroundInteraction =\n 'automatic' | 'enabled' | 'disabled' | { readonly upThrough: UiPresentationDetent };\n\n/** The detents of a sheet given none and not sized to its content. */\nconst HALF_AND_FULL: readonly UiPresentationDetent[] = ['medium', 'large'];\n\n/** The functions `@expo/ui` defines on Compose's sheet, called with the view's tag as `this`. */\nexport interface UiBottomSheetViewFunctions {\n /** Slides the sheet away, answering once it has gone. */\n hide?(this: { nativeTag: number }): Promise<void>;\n}\n\n/** The window's width as the engine knows it, or undefined before the platform has said. */\nfunction windowWidth(): Signal<number | undefined> {\n const node = inject(ElementRef).nativeElement as HostNode;\n const engine = (node.engine ?? inject(HostEngine)) as Partial<\n Pick<Engine, 'viewport' | 'watchViewport'>\n >;\n const read = () => engine.viewport?.width || undefined;\n const width = signal(read());\n const stop = engine.watchViewport?.(() => width.set(read()));\n if (stop) inject(DestroyRef).onDestroy(stop);\n return width;\n}\n\n/**\n * A sheet that slides up from the bottom of the screen, opened from any component: SwiftUI's on\n * iOS, Material's on Android.\n *\n * ```html\n * <ui-bottom-sheet [(open)]=\"sorting\" fitToContents>\n * <app-sort-options (done)=\"sorting.set(false)\" />\n * </ui-bottom-sheet>\n * ```\n *\n * `open` presents and dismisses it, and is written back when the user dismisses it. Its content is\n * what is written inside it, the app's own components, in the tree while the sheet is on screen.\n *\n * A `ui-toolbar-item` written inside it is not content: on iOS it goes in a toolbar of the sheet's\n * own, in a bar across its top, which is where the system's close button belongs.\n *\n * ```html\n * <ui-bottom-sheet [(open)]=\"sorting\">\n * <ui-toolbar-item placement=\"cancellationAction\">\n * <ui-button role=\"close\" (buttonPress)=\"sorting.set(false)\" />\n * </ui-toolbar-item>\n * <app-sort-options />\n * </ui-bottom-sheet>\n * ```\n *\n * Compose's sheet has no toolbar, so Android draws no item. Nor does an iOS build whose `@expo/ui`\n * is older than 57.0.20, which Expo Go's can be: it warns, and shows the sheet without one.\n *\n * The two platforms drive a sheet differently, and this is where that difference ends. SwiftUI's\n * stays in the tree and is presented by `isPresented`, reporting `isPresentedChange` and\n * `dismiss`. Compose's shows for as long as it is in the tree, and reports `dismissRequest`.\n *\n * Unlike the other components here, the element this is mounted on is a plain view, which takes\n * no room and needs no `ui-host` around it. The sheet is inside it, wrapped as `@expo/ui`'s own\n * React component wraps one: a `ui-host`, the sheet, on iOS a `ui-group` that carries the\n * presentation modifiers, and a `ui-view-host` holding the one view the content goes in. Where the\n * build has SwiftUI's toolbar and the sheet is not sized to its content, the view host is in a\n * `ui-navigation-stack` under the group, over a `ui-toolbar` that holds the items.\n */\n@Component({\n selector: 'ui-bottom-sheet',\n imports: [\n UiBottomSheetContent,\n UiBottomSheetView,\n UiGroup,\n UiHost,\n UiNavigationStack,\n UiSlot,\n UiSpacer,\n UiToolbar,\n UiViewHost,\n UiZStack,\n ],\n template: `\n <ng-template #content><ng-content /></ng-template>\n @if (swiftUI) {\n <ui-host style=\"position: absolute\" pointerEvents=\"none\" [style.width.px]=\"width()\">\n <ui-bottom-sheet-view\n #sheet\n [isPresented]=\"open()\"\n [fitToContents]=\"fits()\"\n (isPresentedChange)=\"presented($event)\"\n (dismiss)=\"gone($event)\"\n >\n @if (mounted()) {\n <ui-group [modifiers]=\"presentation()\">\n @if (stacked()) {\n <ui-navigation-stack>\n <ui-zstack [modifiers]=\"modifiers()\">\n <ui-toolbar [modifiers]=\"inlineTitle\">\n <ui-spacer />\n <ui-slot name=\"content\"><ng-content select=\"ui-toolbar-item\" /></ui-slot>\n </ui-toolbar>\n <ui-view-host layoutRoot [matchContents]=\"fits() || undefined\">\n <ui-bottom-sheet-content [style]=\"body()\" [content]=\"content\" />\n </ui-view-host>\n </ui-zstack>\n </ui-navigation-stack>\n } @else {\n <ui-view-host layoutRoot [matchContents]=\"fits() || undefined\">\n <ui-bottom-sheet-content [style]=\"body()\" [content]=\"content\" />\n </ui-view-host>\n }\n </ui-group>\n }\n </ui-bottom-sheet-view>\n </ui-host>\n } @else if (mounted()) {\n <ui-host style=\"position: absolute\" pointerEvents=\"none\" [style.width.px]=\"width()\">\n <ui-bottom-sheet-view\n #sheet\n [showDragHandle]=\"showDragIndicator()\"\n [containerColor]=\"color()\"\n [skipPartiallyExpanded]=\"fits()\"\n [sheetGesturesEnabled]=\"!interactiveDismissDisabled()\"\n [properties]=\"dismissal()\"\n (dismissRequest)=\"dismissRequested($event)\"\n >\n <ui-view-host layoutRoot [matchContents]=\"fits() || undefined\">\n <ui-bottom-sheet-content [style]=\"body()\" [content]=\"content\" />\n </ui-view-host>\n </ui-bottom-sheet-view>\n </ui-host>\n }\n `,\n host: { '[style.position]': '\"absolute\"' },\n})\nexport class UiBottomSheet {\n /**\n * The functions of Compose's sheet, none of them on iOS, or null where `@expo/ui` is not in the\n * build and there is no sheet. Overridden in a test to hide a sheet without a device.\n */\n static readonly SOURCE = new InjectionToken<UiBottomSheetViewFunctions | null>(\n 'angular-native.bottomSheetSource',\n {\n factory: () =>\n optional(() => {\n const core = require('expo-modules-core') as typeof import('expo-modules-core');\n const module = core.requireOptionalNativeModule<{\n ViewPrototypes?: Record<string, UiBottomSheetViewFunctions>;\n }>('ExpoUI');\n return module ? (module.ViewPrototypes?.['ExpoUI_ModalBottomSheetView'] ?? {}) : null;\n }),\n },\n );\n\n /**\n * Whether the build has SwiftUI's toolbar. `@expo/ui` has had it since 57.0.20, and Expo Go has\n * the version its SDK shipped with. A SwiftUI view under one the build lacks is a crash, so a\n * sheet there leaves its toolbar out. Overridden in a test.\n */\n static readonly TOOLBAR = new InjectionToken<boolean>('angular-native.bottomSheetToolbar', {\n factory: () => {\n const expo = (\n globalThis as { expo?: { getViewConfig?(module: string, view: string): unknown } }\n ).expo;\n return ['NavigationStackView', 'ToolbarView'].every(\n (view) => optional(() => expo?.getViewConfig?.('ExpoUI', view)) != null,\n );\n },\n });\n\n private readonly functions = inject(UiBottomSheet.SOURCE);\n private readonly toolbarInBuild = inject(UiBottomSheet.TOOLBAR);\n private readonly engine = inject(Engine, { optional: true });\n private readonly injector = inject(Injector);\n private readonly sheet = viewChild<unknown, ElementRef<EngineNode>>('sheet', {\n read: ElementRef,\n });\n\n /** Whether the sheet is on screen. Written back as false when the user dismisses it. */\n readonly open = model(false);\n /**\n * The sheet is as tall as its content. Without it the sheet rests at half the screen's height\n * and drags up to all of it. Read as the sheet opens. A sheet with a toolbar on iOS is not\n * sized to its content: it rests at its `detents`, or at half and full height.\n */\n readonly fitToContents = input(false, { transform: booleanAttribute });\n /**\n * The heights the sheet rests at, iOS only: SwiftUI's `presentationDetents`. Compose's sheet has\n * a half and a full height and no others, so Android takes no notice of this. On iOS a sheet\n * given detents rests at them rather than at the height of its content, whatever `fitToContents`\n * says, as `@expo/ui`'s own sheets do. None, or an empty list, is the sheet without them.\n */\n readonly detents = input<readonly UiPresentationDetent[]>();\n /** Whether the grabber shows at the top of the sheet. */\n readonly showDragIndicator = input(true, { transform: booleanAttribute });\n /**\n * The colour of the sheet behind its content: SwiftUI's `presentationBackground` on iOS, where\n * a sheet below its full height is otherwise drawn as glass, and Compose's `containerColor` on\n * Android. Over a `background-color` the element has from CSS, which colours the sheet the same\n * way. Neither is the sheet as the system draws it.\n */\n readonly backgroundColor = input<string>();\n /**\n * The user cannot dismiss the sheet; only `open` closes it. On iOS it is SwiftUI's\n * `interactiveDismissDisabled`: a swipe down takes the sheet to its smallest detent and no\n * further, and a tap outside it does nothing. On Android a swipe, the back button and a tap\n * outside the sheet are all turned off, as `@expo/ui`'s own sheet does; Compose's sheet has no\n * way to keep the drag between its heights without the swipe that dismisses it, so that drag is\n * off too.\n */\n readonly interactiveDismissDisabled = input(false, { transform: booleanAttribute });\n /**\n * Whether the screen behind the sheet takes touches, iOS 16.4 and later only: SwiftUI's\n * `presentationBackgroundInteraction`. `'enabled'` always, `'disabled'` never, `'automatic'` as\n * the system decides, and `{ upThrough: 'medium' }` while the sheet rests at that detent or\n * below it, which should be one of its `detents`. Unset, SwiftUI decides. Android has no\n * equivalent: Compose's sheet is in a window of its own over the screen, which takes no touch\n * while it shows.\n */\n readonly backgroundInteraction = input<UiBottomSheetBackgroundInteraction>();\n /**\n * More SwiftUI modifiers, iOS only, for presentation modifiers such as `presentationCornerRadius`\n * and for ones that apply to the content, such as `ignoreSafeArea`. Where the content is in a\n * navigation stack (the build has SwiftUI's toolbar and the sheet is not sized to its content)\n * they are on the `ui-zstack` inside that stack, since the stack sets up the safe area again for\n * what is inside it, and a content modifier such as `background` or `padding` applies below the\n * sheet's bar, where it has one. Otherwise they are after the sheet's own on the `ui-group`\n * around its content. Android takes no notice of them.\n */\n readonly modifiers = input<readonly UiModifier[]>();\n /**\n * The sheet has finished closing, whether the user dismissed it or `open` was set false: the\n * moment another sheet or a dialog can be presented.\n */\n readonly dismissed = output<void>();\n\n /** The toolbar items written inside the sheet, which give it a bar to hold them. */\n private readonly toolbarItems = contentChildren(UiToolbarItem);\n /** Whether the sheet has a toolbar: it has items for one, and the build has the views. */\n protected readonly toolbar = computed(\n () => this.toolbarInBuild && this.toolbarItems().length > 0,\n );\n\n /**\n * A sheet's bar never shows a large title, but a navigation stack leaves room for one under its\n * bar. `@expo/ui` has no modifier for the title's display mode, so `@ng-native/expo` registers\n * one natively, in a build with `@expo/ui`. One without it, Expo Go's, ignores the modifier.\n */\n protected readonly inlineTitle: readonly UiModifier[] = [\n { $type: 'ngNativeInlineNavigationTitle' },\n ];\n\n /** SwiftUI's sheet stays in the tree; anywhere else it is there while it shows. */\n protected readonly swiftUI = nativePlatform() === 'ios';\n protected readonly width = windowWidth();\n\n /**\n * Whether the content is in the tree: from when the sheet opens until it has gone, which is\n * after `open` turns false, so that it slides away with its content still in it.\n */\n protected readonly mounted = linkedSignal<boolean, boolean>({\n source: this.open,\n computation: (open, previous) => open || (previous?.value ?? false),\n });\n\n /**\n * Whether the sheet is sized to its content, as it opened: a view host takes its sizing once,\n * as it mounts. SwiftUI's sheet is not where it has detents to rest at, nor where it has a\n * toolbar: a navigation stack fills what it is given, and the bar is no part of the content.\n * A toolbar that comes or goes while such a sheet is open is followed, since the view host is\n * made again around it.\n */\n protected readonly fits = computed(() => {\n this.mounted();\n const toolbar = this.toolbar();\n return untracked(\n () => this.fitToContents() && !(this.swiftUI && (this.detents()?.length || toolbar)),\n );\n });\n\n /**\n * Whether the content is in a navigation stack, beside a toolbar: wherever the build has one and\n * the sheet is not sized to its content, items or none, so that an item coming or going never\n * makes the view host again. `@expo/ui`'s view host takes its content's touches as it appears and\n * gives them up as it disappears, and one made again around the same content appears before the\n * old one has gone, leaving the content none. A stack with no item draws no bar. The toolbar is\n * beside the view host rather than around it, since SwiftUI makes the view a toolbar is on again\n * as its items change.\n */\n protected readonly stacked = computed(() => this.toolbarInBuild && !this.fits());\n\n /**\n * SwiftUI reads how a sheet is presented from modifiers on its content, not from props. The\n * detents of a sheet not sized to its content are followed while it is open.\n */\n protected readonly presentation = computed<readonly UiModifier[]>(() => [\n this.fits()\n ? { $type: 'presentationSizing', sizing: 'fitted' }\n : {\n $type: 'presentationDetents',\n detents: this.detents()?.length ? this.detents() : HALF_AND_FULL,\n },\n {\n $type: 'presentationDragIndicator',\n visibility: this.showDragIndicator() ? 'visible' : 'hidden',\n },\n ...this.background(),\n ...(this.interactiveDismissDisabled()\n ? [{ $type: 'interactiveDismissDisabled', isDisabled: true }]\n : []),\n ...this.interaction(),\n ...(this.stacked() ? [] : (this.modifiers() ?? [])),\n ]);\n\n /** Whether the screen behind the sheet takes touches, in `@expo/ui`'s shape, where one is set. */\n private readonly interaction = computed<readonly UiModifier[]>(() => {\n const given = this.backgroundInteraction();\n if (given === undefined) return [];\n const $type = 'presentationBackgroundInteraction';\n return typeof given === 'string'\n ? [{ $type, interactionType: given }]\n : [{ $type, interactionType: 'enabledUpThrough', detent: given.upThrough }];\n });\n\n /**\n * How Compose's sheet may be dismissed other than by a swipe. Always committed, so that turning\n * `interactiveDismissDisabled` off again reaches native.\n */\n protected readonly dismissal = computed(() => {\n const dismissible = !this.interactiveDismissDisabled();\n return { shouldDismissOnBackPress: dismissible, shouldDismissOnClickOutside: dismissible };\n });\n\n /** The `background-color` the element has from CSS, which the sheet draws rather than it. */\n private readonly painted = signal<unknown>(undefined);\n\n /** The sheet's colour: the input's, or else the element's from CSS. */\n protected readonly color = computed(() => this.backgroundColor() || this.painted() || undefined);\n\n /**\n * The sheet's own background, a colour converted as any colour is, where one is given. As a\n * shape style for `@expo/ui` 57.0.17 and later, and as the plain colour the versions before it\n * read, Expo Go's among them. Each ignores the other's field.\n */\n private readonly background = computed<readonly UiModifier[]>(() => {\n const given = this.color();\n if (given === undefined) return [];\n const color = this.engine?.color(given) ?? given;\n return [{ $type: 'presentationBackground', style: { type: 'color', color }, color }];\n });\n\n /**\n * The one view a view host holds. Sized to its content it needs a width of its own, the\n * window's; otherwise it fills the height the sheet gives it.\n */\n protected readonly body = computed(() =>\n this.fits() ? { width: this.width() } : { flexGrow: 1, height: 0 },\n );\n\n /** Whether `open` has turned false on a sheet that has yet to go. */\n private closing = false;\n /** Whether Compose is sliding the sheet away. */\n private hiding = false;\n\n constructor() {\n effect(() => {\n if (!this.open()) untracked(() => this.close());\n });\n const host = inject<ElementRef<EngineNode>>(ElementRef).nativeElement;\n const stop = this.engine?.takePaint?.(host, (color) => this.painted.set(color));\n if (stop) inject(DestroyRef).onDestroy(stop);\n if (this.swiftUI && !this.toolbarInBuild) {\n const warned = effect(() => {\n if (!this.toolbarItems().length) return;\n console.warn(\n '[angular-native] A ui-toolbar-item in a ui-bottom-sheet needs @expo/ui 57.0.20 or ' +\n 'later in the native build. This build has no SwiftUI toolbar, as Expo Go may not, ' +\n 'so the sheet is shown without the item.',\n );\n warned.destroy();\n });\n }\n }\n\n protected presented(event: UiBottomSheetPresentedEvent): void {\n if (!this.own(event)) return;\n const isPresented: unknown = event.nativeEvent?.isPresented;\n if (typeof isPresented === 'boolean') this.open.set(isPresented);\n }\n\n protected dismissRequested(event: NativeSyntheticEvent): void {\n if (this.own(event)) this.open.set(false);\n }\n\n /**\n * SwiftUI has finished dismissing the sheet. After a swipe it says so before it reports that the\n * sheet is no longer presented, so a sheet that has gone while `open`, and was not closing, is\n * one the user dismissed.\n */\n protected gone(event: NativeSyntheticEvent): void {\n if (!this.own(event)) return;\n if (!this.closing) this.open.set(false);\n this.finish();\n }\n\n /**\n * Whether an event is this sheet's own, which it then stops. Events bubble, so a `dismiss` from\n * a modal in the content arrives here too, and the sheet's own would go on to a listener around\n * it.\n */\n private own(event: NativeSyntheticEvent): boolean {\n const target = event.target;\n if (target != null && target !== this.sheet()?.nativeElement) return false;\n event.stopPropagation();\n return true;\n }\n\n /**\n * `open` turned false. SwiftUI dismisses its sheet on the prop, and says when it has gone.\n * Compose shows a sheet for as long as it is in the tree, so one taken out is gone at once:\n * its `hide` slides it away first, as `@expo/ui`'s own component calls it before unmounting.\n */\n private close(): void {\n if (!this.mounted()) return;\n // No `@expo/ui` in the build: no sheet is there to slide away, or to say that it has.\n if (!this.functions) return this.finish();\n this.closing = true;\n if (this.swiftUI || this.hiding) return;\n const node = this.sheet()?.nativeElement;\n const nativeTag = node ? (this.engine?.tagOf(node) ?? null) : null;\n const hidden =\n nativeTag === null ? undefined : optional(() => this.functions?.hide?.call({ nativeTag }));\n if (!hidden) return this.finish();\n this.hiding = true;\n const done = () => {\n this.hiding = false;\n this.finish();\n };\n hidden.then(done, done);\n }\n\n /** The sheet has gone: its content leaves the tree. */\n private finish(): void {\n this.closing = false;\n if (!this.mounted()) return;\n if (!this.open()) {\n this.mounted.set(false);\n this.dismissed.emit();\n return;\n }\n // Opened again before it had gone. SwiftUI presents the sheet it still has; Compose hid the\n // one it was asked to, and shows a sheet only as it enters the tree.\n if (this.swiftUI) return;\n this.mounted.set(false);\n afterNextRender(() => this.mounted.set(this.open()), { injector: this.injector });\n }\n}\n"]}
@@ -13,13 +13,27 @@ public final class ExpoUIModifiersModule: Module {
13
13
 
14
14
  OnCreate {
15
15
  #if canImport(ExpoUI)
16
- ViewModifierRegistry.register("ngNativeInlineNavigationTitle") { _, _, _ in
17
- InlineNavigationTitle()
18
- }
19
- ViewModifierRegistry.register("ngNativeSegmentedFont") { params, _, _ in
20
- SegmentedFont(params: params)
21
- }
16
+ _ = Self.registered
22
17
  #endif
23
18
  }
24
19
  }
20
+
21
+ #if canImport(ExpoUI)
22
+ /**
23
+ Registers the modifiers once per process, as `expo-widgets` registers its own. `@expo/ui`'s
24
+ registry is one dictionary for the whole process, outlives a reload, and has no lock: Expo creates
25
+ this module again on every reload, on the JavaScript thread, while the main thread can still be
26
+ drawing the outgoing screens' SwiftUI views and reading that dictionary. Writing it again then
27
+ is a data race, and these factories capture nothing, so there is nothing to replace. A static's
28
+ initializer runs once, behind a lock, and the first one runs before any SwiftUI view is drawn.
29
+ */
30
+ private static let registered: Void = {
31
+ ViewModifierRegistry.register("ngNativeInlineNavigationTitle") { _, _, _ in
32
+ InlineNavigationTitle()
33
+ }
34
+ ViewModifierRegistry.register("ngNativeSegmentedFont") { params, _, _ in
35
+ SegmentedFont(params: params)
36
+ }
37
+ }()
38
+ #endif
25
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-native/expo",
3
- "version": "0.18.2",
3
+ "version": "0.19.0",
4
4
  "description": "Expo modules as Angular services for Angular Native, plus registerExpoView for a module's native view.",
5
5
  "keywords": [
6
6
  "angular",
@@ -225,8 +225,8 @@
225
225
  "access": "public"
226
226
  },
227
227
  "dependencies": {
228
- "@ng-native/device": "0.18.2",
229
- "@ng-native/fabric": "0.18.2"
228
+ "@ng-native/device": "0.19.0",
229
+ "@ng-native/fabric": "0.19.0"
230
230
  },
231
231
  "nx": {
232
232
  "tags": [