@ng-native/expo 0.2.0 → 0.4.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.
Files changed (83) hide show
  1. package/README.md +32 -382
  2. package/dist/async-storage.d.ts +15 -0
  3. package/dist/async-storage.js +29 -0
  4. package/dist/async-storage.js.map +1 -0
  5. package/dist/audio.d.ts +10 -0
  6. package/dist/audio.js +26 -0
  7. package/dist/audio.js.map +1 -0
  8. package/dist/community-views.js +1 -1
  9. package/dist/community-views.js.map +1 -1
  10. package/dist/crypto.js +2 -2
  11. package/dist/crypto.js.map +1 -1
  12. package/dist/database.d.ts +18 -3
  13. package/dist/database.js +26 -7
  14. package/dist/database.js.map +1 -1
  15. package/dist/date-time-picker.d.ts +33 -0
  16. package/dist/date-time-picker.js +77 -0
  17. package/dist/date-time-picker.js.map +1 -0
  18. package/dist/dom-component.d.ts +5 -0
  19. package/dist/dom-component.js +57 -2
  20. package/dist/dom-component.js.map +1 -1
  21. package/dist/expo-ui-components.d.ts +292 -12
  22. package/dist/expo-ui-components.js +531 -41
  23. package/dist/expo-ui-components.js.map +1 -1
  24. package/dist/expo-ui.js +19 -6
  25. package/dist/expo-ui.js.map +1 -1
  26. package/dist/file-system.d.ts +7 -0
  27. package/dist/file-system.js +16 -3
  28. package/dist/file-system.js.map +1 -1
  29. package/dist/foldable.d.ts +78 -0
  30. package/dist/foldable.js +87 -0
  31. package/dist/foldable.js.map +1 -0
  32. package/dist/fonts.d.ts +3 -9
  33. package/dist/fonts.js +26 -16
  34. package/dist/fonts.js.map +1 -1
  35. package/dist/glass.d.ts +1 -1
  36. package/dist/image-picker.js +3 -9
  37. package/dist/image-picker.js.map +1 -1
  38. package/dist/index.d.ts +3 -2
  39. package/dist/index.js +3 -2
  40. package/dist/index.js.map +1 -1
  41. package/dist/live-activity.d.ts +88 -0
  42. package/dist/live-activity.js +156 -0
  43. package/dist/live-activity.js.map +1 -0
  44. package/dist/location.d.ts +17 -0
  45. package/dist/location.js +20 -7
  46. package/dist/location.js.map +1 -1
  47. package/dist/media-library.js +1 -3
  48. package/dist/media-library.js.map +1 -1
  49. package/dist/native.d.ts +12 -2
  50. package/dist/native.js +81 -10
  51. package/dist/native.js.map +1 -1
  52. package/dist/notifications.js +2 -4
  53. package/dist/notifications.js.map +1 -1
  54. package/dist/permissions.d.ts +2 -0
  55. package/dist/permissions.js +6 -0
  56. package/dist/permissions.js.map +1 -1
  57. package/dist/player.d.ts +24 -11
  58. package/dist/player.js +7 -26
  59. package/dist/player.js.map +1 -1
  60. package/dist/register-expo-view.d.ts +7 -0
  61. package/dist/register-expo-view.js +6 -1
  62. package/dist/register-expo-view.js.map +1 -1
  63. package/dist/screen-capture.js +2 -4
  64. package/dist/screen-capture.js.map +1 -1
  65. package/dist/secure-store.d.ts +15 -0
  66. package/dist/secure-store.js +30 -0
  67. package/dist/secure-store.js.map +1 -0
  68. package/dist/store.d.ts +5 -10
  69. package/dist/store.js +5 -36
  70. package/dist/store.js.map +1 -1
  71. package/dist/tracking.d.ts +1 -1
  72. package/dist/tracking.js +3 -5
  73. package/dist/tracking.js.map +1 -1
  74. package/dist/video.d.ts +5 -0
  75. package/dist/video.js +21 -0
  76. package/dist/video.js.map +1 -0
  77. package/dist/watch.d.ts +103 -0
  78. package/dist/watch.js +228 -0
  79. package/dist/watch.js.map +1 -0
  80. package/dist/widget.d.ts +63 -0
  81. package/dist/widget.js +98 -0
  82. package/dist/widget.js.map +1 -0
  83. package/package.json +53 -4
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Typed components for the `@expo/ui` SwiftUI views an app reaches for most.
2
+ * Typed components for the `@expo/ui` views an app reaches for most, named and shaped as SwiftUI's.
3
3
  *
4
4
  * `EXPO_UI_VIEWS` makes every view reachable by name, and a name is all the renderer needs. What a
5
5
  * name cannot give is a type: under strict templates an unknown element is an error, and so is
@@ -7,22 +7,34 @@
7
7
  * props' types and whose host bindings pass each one straight to the node, so nothing changes at
8
8
  * runtime. An unset input stays `undefined` and never reaches native.
9
9
  *
10
- * Events are declared as outputs so that `$event` is typed, and are never emitted. Angular binds a
11
- * template's `(dateChange)` to the output *and* to the element, and it is the element's own event
12
- * that arrives, once. Emitting from a host listener as well would deliver it twice; a host listener
13
- * of the same name as the output listens to the output itself and recurses. So subscribe in a
14
- * template, not to the output in code.
10
+ * Events are declared as outputs so that `$event` is typed. SwiftUI's events are never emitted:
11
+ * Angular binds a template's `(dateChange)` to the output *and* to the element, and it is the
12
+ * element's own event that arrives, once. Emitting from a host listener as well would deliver it
13
+ * twice; a host listener of the same name as the output listens to the output itself and recurses.
14
+ * So subscribe in a template, not to the output in code.
15
+ *
16
+ * Where Compose names a prop or an event differently, a component sends Android its own names and
17
+ * emits the output from a host listener for Compose's event, which SwiftUI never sends. Only a few
18
+ * do: the toggle, slider, button, progress, stacks and slot, and the date picker.
15
19
  *
16
20
  * Only the views and props an app has needed are here; the rest stay names, as before. Add a view
17
21
  * when a template wants it typed, from `@expo/ui`'s own props for it.
18
22
  *
19
23
  * Still register the names with `registerExpoUiViews`: the component types the element, the
20
- * registration is what makes it commit as the SwiftUI view.
24
+ * registration is what makes it commit as the SwiftUI or Compose view.
21
25
  */
22
- import { Component, DestroyRef, ElementRef, booleanAttribute, computed, inject, input, model, output, } from '@angular/core';
23
- import { HostEngine, nativePlatform, } from '@ng-native/fabric';
26
+ import { Component, DestroyRef, forwardRef, ElementRef, booleanAttribute, computed, inject, input, model, output, signal, } from '@angular/core';
27
+ import { HostEngine, keepNativeView, nativePlatform, } from '@ng-native/fabric';
24
28
  import { optionalBoolean, optionalNumber } from "./transforms.js";
25
29
  import * as i0 from "@angular/core";
30
+ /**
31
+ * Says the component's host is the `@expo/ui` view its selector is registered as. A component of
32
+ * an app's own with a `ui-` selector does not, and its host is a plain view.
33
+ */
34
+ function nativeView() {
35
+ keepNativeView(inject(ElementRef).nativeElement);
36
+ return true;
37
+ }
26
38
  /**
27
39
  * The bridge from Yoga's layout to SwiftUI's; every other `ui-*` view goes inside one.
28
40
  * `matchContents` sizes the host to the SwiftUI content rather than the other way round, on both
@@ -31,6 +43,7 @@ import * as i0 from "@angular/core";
31
43
  * drawn in it spills outside it, where it can be seen but not touched or read by VoiceOver.
32
44
  */
33
45
  export class UiHost {
46
+ nativeView = nativeView();
34
47
  matchContents = input(/* @ts-ignore */
35
48
  ...(ngDevMode ? [undefined, { debugName: "matchContents" }] : /* istanbul ignore next */ []));
36
49
  matchVertical = computed(() => {
@@ -64,6 +77,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
64
77
  }], propDecorators: { matchContents: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchContents", required: false }] }], ignoreSafeArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreSafeArea", required: false }] }], useViewportSizeMeasurement: [{ type: i0.Input, args: [{ isSignal: true, alias: "useViewportSizeMeasurement", required: false }] }] } });
65
78
  /** A SwiftUI `Menu`. Its trigger is the `label` or a `<ui-slot name="label">`; its items are children. */
66
79
  export class UiMenu {
80
+ nativeView = nativeView();
67
81
  label = input(/* @ts-ignore */
68
82
  ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
69
83
  /** An SF Symbol name. */
@@ -89,8 +103,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
89
103
  },
90
104
  }]
91
105
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], systemImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "systemImage", required: false }] }], accessibilityLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibilityLabel", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
92
- /** A SwiftUI `Button`, as a menu item or on its own. */
106
+ /**
107
+ * Views of the app's own inside SwiftUI or Compose content: the way back from a `ui-host`. What
108
+ * it holds is laid out by the engine, as anywhere else, and takes presses as anywhere else, so a
109
+ * row drawn with the app's own components can be a context menu's trigger or a sheet's body.
110
+ *
111
+ * It holds one element. `matchContents` sizes it to that element, both ways: the element needs a
112
+ * width of its own, since nothing here stretches it. Without `matchContents` it fills what the
113
+ * SwiftUI or Compose view around it offers, which inside a view sized to its content is a width
114
+ * and no height.
115
+ */
116
+ export class UiViewHost {
117
+ nativeView = nativeView();
118
+ matchContents = input(undefined, { ...(ngDevMode ? { debugName: "matchContents" } : /* istanbul ignore next */ {}), transform: optionalBoolean });
119
+ /**
120
+ * For content presented in a window of its own, a sheet or a popover, where nothing above it
121
+ * delivers its touches: it then takes them itself, and is measured from itself.
122
+ */
123
+ layoutRoot = input(undefined, { ...(ngDevMode ? { debugName: "layoutRoot" } : /* istanbul ignore next */ {}), transform: optionalBoolean });
124
+ modifiers = input(/* @ts-ignore */
125
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
126
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiViewHost, deps: [], target: i0.ɵɵFactoryTarget.Component });
127
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiViewHost, isStandalone: true, selector: "ui-view-host", inputs: { matchContents: { classPropertyName: "matchContents", publicName: "matchContents", isSignal: true, isRequired: false, transformFunction: null }, layoutRoot: { classPropertyName: "layoutRoot", publicName: "layoutRoot", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "matchContents": "matchContents()", "expoInternalSizeFromChildren": "matchContents()", "layoutRoot": "layoutRoot()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
128
+ }
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiViewHost, decorators: [{
130
+ type: Component,
131
+ args: [{
132
+ selector: 'ui-view-host',
133
+ template: '<ng-content />',
134
+ host: {
135
+ '[matchContents]': 'matchContents()',
136
+ '[expoInternalSizeFromChildren]': 'matchContents()',
137
+ '[layoutRoot]': 'layoutRoot()',
138
+ '[modifiers]': 'modifiers()',
139
+ },
140
+ }]
141
+ }], propDecorators: { matchContents: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchContents", required: false }] }], layoutRoot: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutRoot", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
142
+ /**
143
+ * A SwiftUI `contextMenu`: the menu a long press on its trigger opens, with the trigger lifted
144
+ * over the dimmed screen. iOS only.
145
+ *
146
+ * Its content is three slots: `<ui-slot name="trigger">` is what is always shown,
147
+ * `<ui-slot name="items">` holds the `ui-button`s, `ui-divider`s and `ui-section`s of the menu, and
148
+ * `<ui-slot name="preview">`, when there is one, is shown above the open menu in place of the
149
+ * trigger. All three are SwiftUI content, as everything inside a `ui-host` is.
150
+ */
151
+ export class UiContextMenu {
152
+ nativeView = nativeView();
153
+ modifiers = input(/* @ts-ignore */
154
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiContextMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
156
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiContextMenu, isStandalone: true, selector: "ui-context-menu", inputs: { modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
157
+ }
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiContextMenu, decorators: [{
159
+ type: Component,
160
+ args: [{
161
+ selector: 'ui-context-menu',
162
+ template: '<ng-content />',
163
+ host: { '[modifiers]': 'modifiers()' },
164
+ }]
165
+ }], propDecorators: { modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
166
+ /**
167
+ * A SwiftUI `Button`, as a menu item or on its own, or Compose's on Android, which draws `label` as
168
+ * text inside it. `systemImage` and `role` are SwiftUI's alone.
169
+ */
93
170
  export class UiButton {
171
+ nativeView = nativeView();
172
+ android = nativePlatform() === 'android';
94
173
  label = input(/* @ts-ignore */
95
174
  ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
96
175
  /** An SF Symbol name. */
@@ -98,27 +177,43 @@ export class UiButton {
98
177
  ...(ngDevMode ? [undefined, { debugName: "systemImage" }] : /* istanbul ignore next */ []));
99
178
  role = input(/* @ts-ignore */
100
179
  ...(ngDevMode ? [undefined, { debugName: "role" }] : /* istanbul ignore next */ []));
180
+ /**
181
+ * In a home-screen widget's layout, what a tap on it records for the app: see
182
+ * `@ng-native/expo/widget`.
183
+ */
184
+ target = input(/* @ts-ignore */
185
+ ...(ngDevMode ? [undefined, { debugName: "target" }] : /* istanbul ignore next */ []));
101
186
  modifiers = input(/* @ts-ignore */
102
187
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
103
188
  buttonPress = output();
104
189
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
105
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiButton, isStandalone: true, selector: "ui-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, systemImage: { classPropertyName: "systemImage", publicName: "systemImage", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonPress: "buttonPress" }, host: { properties: { "label": "label()", "systemImage": "systemImage()", "role": "role()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
190
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.0", type: UiButton, isStandalone: true, selector: "ui-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, systemImage: { classPropertyName: "systemImage", publicName: "systemImage", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonPress: "buttonPress" }, host: { listeners: { "buttonPressed": "android && buttonPress.emit($event)" }, properties: { "label": "label()", "systemImage": "systemImage()", "role": "role()", "target": "target()", "modifiers": "modifiers()" } }, ngImport: i0, template: `@if (android && label()) {
191
+ <ui-text [text]="label()" />
192
+ }
193
+ <ng-content />`, isInline: true, dependencies: [{ kind: "component", type: i0.forwardRef(() => UiText), selector: "ui-text", inputs: ["text", "modifiers"] }] });
106
194
  }
107
195
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiButton, decorators: [{
108
196
  type: Component,
109
197
  args: [{
110
198
  selector: 'ui-button',
111
- template: '<ng-content />',
199
+ imports: [forwardRef(() => UiText)],
200
+ template: `@if (android && label()) {
201
+ <ui-text [text]="label()" />
202
+ }
203
+ <ng-content />`,
112
204
  host: {
205
+ '(buttonPressed)': 'android && buttonPress.emit($event)',
113
206
  '[label]': 'label()',
114
207
  '[systemImage]': 'systemImage()',
115
208
  '[role]': 'role()',
209
+ '[target]': 'target()',
116
210
  '[modifiers]': 'modifiers()',
117
211
  },
118
212
  }]
119
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], systemImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "systemImage", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }], buttonPress: [{ type: i0.Output, args: ["buttonPress"] }] } });
120
- /** A SwiftUI `Divider`: a separator between groups of menu items. */
213
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], systemImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "systemImage", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }], buttonPress: [{ type: i0.Output, args: ["buttonPress"] }] } });
214
+ /** A SwiftUI `Divider`, or Compose's `HorizontalDivider`: a separator between groups of items. */
121
215
  export class UiDivider {
216
+ nativeView = nativeView();
122
217
  modifiers = input(/* @ts-ignore */
123
218
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
124
219
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -138,19 +233,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
138
233
  * `allowsFullSwipe`.
139
234
  */
140
235
  export class UiSlot {
236
+ nativeView = nativeView();
237
+ android = nativePlatform() === 'android';
141
238
  name = input.required(/* @ts-ignore */
142
239
  ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
143
240
  extraProps = input(/* @ts-ignore */
144
241
  ...(ngDevMode ? [undefined, { debugName: "extraProps" }] : /* istanbul ignore next */ []));
145
242
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiSlot, deps: [], target: i0.ɵɵFactoryTarget.Component });
146
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiSlot, isStandalone: true, selector: "ui-slot", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, extraProps: { classPropertyName: "extraProps", publicName: "extraProps", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "name": "name()", "extraProps": "extraProps()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
243
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiSlot, isStandalone: true, selector: "ui-slot", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, extraProps: { classPropertyName: "extraProps", publicName: "extraProps", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "name": "android ? undefined : name()", "slotName": "android ? name() : undefined", "extraProps": "extraProps()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
147
244
  }
148
245
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiSlot, decorators: [{
149
246
  type: Component,
150
247
  args: [{
151
248
  selector: 'ui-slot',
152
249
  template: '<ng-content />',
153
- host: { '[name]': 'name()', '[extraProps]': 'extraProps()' },
250
+ host: {
251
+ '[name]': 'android ? undefined : name()',
252
+ '[slotName]': 'android ? name() : undefined',
253
+ '[extraProps]': 'extraProps()',
254
+ },
154
255
  }]
155
256
  }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], extraProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraProps", required: false }] }] } });
156
257
  /**
@@ -158,6 +259,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
158
259
  * swipe actions through `ui-swipe-actions`.
159
260
  */
160
261
  export class UiList {
262
+ nativeView = nativeView();
161
263
  modifiers = input(/* @ts-ignore */
162
264
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
163
265
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiList, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -177,6 +279,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
177
279
  * slot per edge, as `ui-button`s.
178
280
  */
179
281
  export class UiSwipeActions {
282
+ nativeView = nativeView();
180
283
  modifiers = input(/* @ts-ignore */
181
284
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
182
285
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiSwipeActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -191,10 +294,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
191
294
  }]
192
295
  }], propDecorators: { modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
193
296
  /**
194
- * A SwiftUI `Slider`, iOS only. `valueChanged` reports each new value as the thumb moves; note the
195
- * d, which the native event has and `@expo/ui`'s React prop does not.
297
+ * A SwiftUI `Slider`, or Compose's on Android. `valueChanged` reports each new value as the thumb
298
+ * moves; note the d, which SwiftUI's event has and `@expo/ui`'s React prop does not.
196
299
  */
197
300
  export class UiSlider {
301
+ nativeView = nativeView();
198
302
  value = input(undefined, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), transform: optionalNumber });
199
303
  min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: optionalNumber });
200
304
  max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: optionalNumber });
@@ -203,8 +307,29 @@ export class UiSlider {
203
307
  modifiers = input(/* @ts-ignore */
204
308
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
205
309
  valueChanged = output();
310
+ android = nativePlatform() === 'android';
311
+ /** A whole number of steps, which is all Compose can draw. */
312
+ wholeSteps = computed(() => {
313
+ const steps = Math.round(this.steps() ?? 0);
314
+ return steps > 0 ? steps : undefined;
315
+ }, /* @ts-ignore */
316
+ ...(ngDevMode ? [{ debugName: "wholeSteps" }] : /* istanbul ignore next */ []));
317
+ /** SwiftUI takes a step size, and draws 0 to 1 unless it has both ends. */
318
+ stepSize = computed(() => {
319
+ const steps = this.wholeSteps();
320
+ const min = this.min();
321
+ const max = this.max();
322
+ return steps && (min !== undefined && max !== undefined ? max - min : 1) / steps;
323
+ }, /* @ts-ignore */
324
+ ...(ngDevMode ? [{ debugName: "stepSize" }] : /* istanbul ignore next */ []));
325
+ /** Compose takes the number of points between the ends. */
326
+ stepsBetween = computed(() => {
327
+ const steps = this.wholeSteps();
328
+ return steps && steps - 1;
329
+ }, /* @ts-ignore */
330
+ ...(ngDevMode ? [{ debugName: "stepsBetween" }] : /* istanbul ignore next */ []));
206
331
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiSlider, deps: [], target: i0.ɵɵFactoryTarget.Component });
207
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiSlider, isStandalone: true, selector: "ui-slider", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "value": "value()", "min": "min()", "max": "max()", "steps": "steps()", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
332
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiSlider, isStandalone: true, selector: "ui-slider", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChanged: "valueChanged" }, host: { listeners: { "valueChange": "android && valueChanged.emit($event)" }, properties: { "value": "value()", "min": "min()", "max": "max()", "step": "android ? undefined : stepSize()", "steps": "android ? stepsBetween() : undefined", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
208
333
  }
209
334
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiSlider, decorators: [{
210
335
  type: Component,
@@ -215,20 +340,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
215
340
  '[value]': 'value()',
216
341
  '[min]': 'min()',
217
342
  '[max]': 'max()',
218
- '[steps]': 'steps()',
343
+ '[step]': 'android ? undefined : stepSize()',
344
+ '[steps]': 'android ? stepsBetween() : undefined',
219
345
  '[modifiers]': 'modifiers()',
346
+ '(valueChange)': 'android && valueChanged.emit($event)',
220
347
  },
221
348
  }]
222
349
  }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }] } });
223
- /** A SwiftUI `VStack`. */
350
+ /**
351
+ * A SwiftUI `VStack`, or Compose's `Column` on Android, centred, as SwiftUI's is, unless `alignment`
352
+ * says otherwise. Without `spacing`, SwiftUI puts its own default spacing between children and Compose
353
+ * puts none.
354
+ */
224
355
  export class UiVStack {
356
+ nativeView = nativeView();
225
357
  alignment = input(/* @ts-ignore */
226
358
  ...(ngDevMode ? [undefined, { debugName: "alignment" }] : /* istanbul ignore next */ []));
227
359
  spacing = input(undefined, { ...(ngDevMode ? { debugName: "spacing" } : /* istanbul ignore next */ {}), transform: optionalNumber });
228
360
  modifiers = input(/* @ts-ignore */
229
361
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
362
+ android = nativePlatform() === 'android';
363
+ spacedBy = spacedBy;
364
+ composeAlignment(alignment) {
365
+ return alignment === 'leading' ? 'start' : alignment === 'trailing' ? 'end' : 'center';
366
+ }
230
367
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiVStack, deps: [], target: i0.ɵɵFactoryTarget.Component });
231
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiVStack, isStandalone: true, selector: "ui-vstack", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "alignment": "alignment()", "spacing": "spacing()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
368
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiVStack, isStandalone: true, selector: "ui-vstack", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "alignment": "android ? undefined : alignment()", "spacing": "android ? undefined : spacing()", "verticalArrangement": "android ? spacedBy(spacing()) : undefined", "horizontalAlignment": "android ? composeAlignment(alignment()) : undefined", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
232
369
  }
233
370
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiVStack, decorators: [{
234
371
  type: Component,
@@ -236,14 +373,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
236
373
  selector: 'ui-vstack',
237
374
  template: '<ng-content />',
238
375
  host: {
239
- '[alignment]': 'alignment()',
240
- '[spacing]': 'spacing()',
376
+ '[alignment]': 'android ? undefined : alignment()',
377
+ '[spacing]': 'android ? undefined : spacing()',
378
+ '[verticalArrangement]': 'android ? spacedBy(spacing()) : undefined',
379
+ '[horizontalAlignment]': 'android ? composeAlignment(alignment()) : undefined',
241
380
  '[modifiers]': 'modifiers()',
242
381
  },
243
382
  }]
244
383
  }], propDecorators: { alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
245
384
  /** A SwiftUI `Image`: an SF Symbol by `systemName`, or a picture by `uiImage` URL. */
246
385
  export class UiImage {
386
+ nativeView = nativeView();
247
387
  systemName = input(/* @ts-ignore */
248
388
  ...(ngDevMode ? [undefined, { debugName: "systemName" }] : /* istanbul ignore next */ []));
249
389
  uiImage = input(/* @ts-ignore */
@@ -270,20 +410,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
270
410
  },
271
411
  }]
272
412
  }], propDecorators: { systemName: [{ type: i0.Input, args: [{ isSignal: true, alias: "systemName", required: false }] }], uiImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "uiImage", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
273
- /** A SwiftUI `Text`. */
413
+ /**
414
+ * A SwiftUI `Text`, or Compose's on Android. Its text is what is written inside it,
415
+ * `<ui-text>Us {{ score }}</ui-text>`, as `<text>` takes its own, or `text`, which wins over it.
416
+ */
274
417
  export class UiText {
418
+ nativeView = nativeView();
275
419
  text = input(/* @ts-ignore */
276
420
  ...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
277
421
  modifiers = input(/* @ts-ignore */
278
422
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
279
423
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiText, deps: [], target: i0.ɵɵFactoryTarget.Component });
280
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiText, isStandalone: true, selector: "ui-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "text": "text()", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
424
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiText, isStandalone: true, selector: "ui-text", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "text": "text()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
281
425
  }
282
426
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiText, decorators: [{
283
427
  type: Component,
284
428
  args: [{
285
429
  selector: 'ui-text',
286
- template: '',
430
+ template: '<ng-content />',
287
431
  host: { '[text]': 'text()', '[modifiers]': 'modifiers()' },
288
432
  }]
289
433
  }], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
@@ -298,6 +442,18 @@ function listen(event, handle) {
298
442
  const stop = engine.setEventListener(node, event, (raw) => handle(raw?.nativeEvent ?? {}));
299
443
  inject(DestroyRef).onDestroy(stop);
300
444
  }
445
+ /**
446
+ * A Compose event as the SwiftUI one it stands in for: its payload renamed, and stopping it stops the
447
+ * event it came from.
448
+ */
449
+ function withNativeEvent(event, nativeEvent) {
450
+ return {
451
+ nativeEvent,
452
+ target: event.target,
453
+ stopPropagation: () => event.stopPropagation(),
454
+ isPropagationStopped: () => event.isPropagationStopped(),
455
+ };
456
+ }
301
457
  /** The caller's modifiers, with SwiftUI's `disabled` added while the field is. */
302
458
  function withDisabled(modifiers, disabled) {
303
459
  return disabled ? [...(modifiers ?? []), { $type: 'disabled', disabled: true }] : modifiers;
@@ -317,6 +473,7 @@ function withDisabled(modifiers, disabled) {
317
473
  * `selection` is still accepted as ISO text, for a picker bound without a form.
318
474
  */
319
475
  export class UiDatePicker {
476
+ nativeView = nativeView();
320
477
  title = input(/* @ts-ignore */
321
478
  ...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
322
479
  selection = input(/* @ts-ignore */
@@ -391,6 +548,7 @@ const APPEARING_MS = 1000;
391
548
  * work for anything richer. `pickerStyle` is SwiftUI's (`menu`, `segmented`, `wheel`, `inline`).
392
549
  */
393
550
  export class UiPicker {
551
+ nativeView = nativeView();
394
552
  label = input(/* @ts-ignore */
395
553
  ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
396
554
  /** An SF Symbol name. */
@@ -466,27 +624,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
466
624
  },
467
625
  }]
468
626
  }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], systemImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "systemImage", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], pickerStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pickerStyle", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }] } });
469
- /** A SwiftUI `Toggle`. `isOnChange` reports each flip. */
627
+ /**
628
+ * A SwiftUI `Toggle`, or Compose's `Switch` on Android. `isOnChange` reports each flip. Bound to
629
+ * `isOn`, it shows what `isOn` says; without it, it switches itself. `label` is SwiftUI's alone.
630
+ */
470
631
  export class UiToggle {
632
+ nativeView = nativeView();
471
633
  isOn = input(undefined, { ...(ngDevMode ? { debugName: "isOn" } : /* istanbul ignore next */ {}), transform: optionalBoolean });
472
634
  label = input(/* @ts-ignore */
473
635
  ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
474
636
  modifiers = input(/* @ts-ignore */
475
637
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
476
638
  isOnChange = output();
639
+ android = nativePlatform() === 'android';
640
+ /** What Compose's switch shows without `isOn`: SwiftUI's keeps this itself, Compose's does not. */
641
+ switchedOn = signal(false, /* @ts-ignore */
642
+ ...(ngDevMode ? [{ debugName: "switchedOn" }] : /* istanbul ignore next */ []));
643
+ checked(event) {
644
+ this.switchedOn.set(event.nativeEvent.value);
645
+ this.isOnChange.emit(withNativeEvent(event, { isOn: event.nativeEvent.value }));
646
+ }
477
647
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
478
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiToggle, isStandalone: true, selector: "ui-toggle", inputs: { isOn: { classPropertyName: "isOn", publicName: "isOn", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOnChange: "isOnChange" }, host: { properties: { "isOn": "isOn()", "label": "label()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
648
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiToggle, isStandalone: true, selector: "ui-toggle", inputs: { isOn: { classPropertyName: "isOn", publicName: "isOn", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOnChange: "isOnChange" }, host: { listeners: { "checkedChange": "android && checked($event)" }, properties: { "isOn": "android ? undefined : isOn()", "value": "android ? (isOn() ?? switchedOn()) : undefined", "label": "label()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
479
649
  }
480
650
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiToggle, decorators: [{
481
651
  type: Component,
482
652
  args: [{
483
653
  selector: 'ui-toggle',
484
654
  template: '<ng-content />',
485
- host: { '[isOn]': 'isOn()', '[label]': 'label()', '[modifiers]': 'modifiers()' },
655
+ host: {
656
+ '[isOn]': 'android ? undefined : isOn()',
657
+ '[value]': 'android ? (isOn() ?? switchedOn()) : undefined',
658
+ '[label]': 'label()',
659
+ '[modifiers]': 'modifiers()',
660
+ '(checkedChange)': 'android && checked($event)',
661
+ },
486
662
  }]
487
663
  }], propDecorators: { isOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOn", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }], isOnChange: [{ type: i0.Output, args: ["isOnChange"] }] } });
488
664
  /** A SwiftUI `Stepper`, between `min` and `max` by `step`. */
489
665
  export class UiStepper {
666
+ nativeView = nativeView();
490
667
  value = input(undefined, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), transform: optionalNumber });
491
668
  min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: optionalNumber });
492
669
  max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: optionalNumber });
@@ -519,6 +696,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
519
696
  * writes to it on the UI thread, and `textChange` reports each change.
520
697
  */
521
698
  export class UiTextField {
699
+ nativeView = nativeView();
522
700
  text = input(/* @ts-ignore */
523
701
  ...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
524
702
  placeholder = input(/* @ts-ignore */
@@ -543,6 +721,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
543
721
  }], propDecorators: { text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }], textChange: [{ type: i0.Output, args: ["textChange"] }] } });
544
722
  /** A SwiftUI `ColorPicker`. `selection` is a colour as hex. */
545
723
  export class UiColorPicker {
724
+ nativeView = nativeView();
546
725
  selection = input(/* @ts-ignore */
547
726
  ...(ngDevMode ? [undefined, { debugName: "selection" }] : /* istanbul ignore next */ []));
548
727
  label = input(/* @ts-ignore */
@@ -569,6 +748,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
569
748
  }], propDecorators: { selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], supportsOpacity: [{ type: i0.Input, args: [{ isSignal: true, alias: "supportsOpacity", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }] } });
570
749
  /** A SwiftUI `Gauge`: `value` between `min` and `max`, drawn as `type` says. */
571
750
  export class UiGauge {
751
+ nativeView = nativeView();
572
752
  value = input(undefined, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), transform: optionalNumber });
573
753
  min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: optionalNumber });
574
754
  max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: optionalNumber });
@@ -602,31 +782,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
602
782
  },
603
783
  }]
604
784
  }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], currentValueLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentValueLabel", required: false }] }], minimumValueLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimumValueLabel", required: false }] }], maximumValueLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximumValueLabel", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
605
- /** A SwiftUI `ProgressView`: a bar filled to `value`, from 0 to 1, or a spinner without one. */
785
+ /**
786
+ * A Swift Charts chart of `data`, drawn as `type` says, iOS only, as Compose has no chart. Each
787
+ * style applies to its own type alone; `referenceLines` are drawn across it in `ruleStyle`.
788
+ * `showLegend` shows only when no point has a colour of its own.
789
+ */
790
+ export class UiChart {
791
+ nativeView = nativeView();
792
+ data = input.required(/* @ts-ignore */
793
+ ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
794
+ type = input(/* @ts-ignore */
795
+ ...(ngDevMode ? [undefined, { debugName: "type" }] : /* istanbul ignore next */ []));
796
+ showGrid = input(undefined, { ...(ngDevMode ? { debugName: "showGrid" } : /* istanbul ignore next */ {}), transform: optionalBoolean });
797
+ animate = input(undefined, { ...(ngDevMode ? { debugName: "animate" } : /* istanbul ignore next */ {}), transform: optionalBoolean });
798
+ showLegend = input(undefined, { ...(ngDevMode ? { debugName: "showLegend" } : /* istanbul ignore next */ {}), transform: optionalBoolean });
799
+ referenceLines = input(/* @ts-ignore */
800
+ ...(ngDevMode ? [undefined, { debugName: "referenceLines" }] : /* istanbul ignore next */ []));
801
+ lineStyle = input(/* @ts-ignore */
802
+ ...(ngDevMode ? [undefined, { debugName: "lineStyle" }] : /* istanbul ignore next */ []));
803
+ pointStyle = input(/* @ts-ignore */
804
+ ...(ngDevMode ? [undefined, { debugName: "pointStyle" }] : /* istanbul ignore next */ []));
805
+ areaStyle = input(/* @ts-ignore */
806
+ ...(ngDevMode ? [undefined, { debugName: "areaStyle" }] : /* istanbul ignore next */ []));
807
+ barStyle = input(/* @ts-ignore */
808
+ ...(ngDevMode ? [undefined, { debugName: "barStyle" }] : /* istanbul ignore next */ []));
809
+ pieStyle = input(/* @ts-ignore */
810
+ ...(ngDevMode ? [undefined, { debugName: "pieStyle" }] : /* istanbul ignore next */ []));
811
+ rectangleStyle = input(/* @ts-ignore */
812
+ ...(ngDevMode ? [undefined, { debugName: "rectangleStyle" }] : /* istanbul ignore next */ []));
813
+ ruleStyle = input(/* @ts-ignore */
814
+ ...(ngDevMode ? [undefined, { debugName: "ruleStyle" }] : /* istanbul ignore next */ []));
815
+ modifiers = input(/* @ts-ignore */
816
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
817
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
818
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiChart, isStandalone: true, selector: "ui-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, showGrid: { classPropertyName: "showGrid", publicName: "showGrid", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, referenceLines: { classPropertyName: "referenceLines", publicName: "referenceLines", isSignal: true, isRequired: false, transformFunction: null }, lineStyle: { classPropertyName: "lineStyle", publicName: "lineStyle", isSignal: true, isRequired: false, transformFunction: null }, pointStyle: { classPropertyName: "pointStyle", publicName: "pointStyle", isSignal: true, isRequired: false, transformFunction: null }, areaStyle: { classPropertyName: "areaStyle", publicName: "areaStyle", isSignal: true, isRequired: false, transformFunction: null }, barStyle: { classPropertyName: "barStyle", publicName: "barStyle", isSignal: true, isRequired: false, transformFunction: null }, pieStyle: { classPropertyName: "pieStyle", publicName: "pieStyle", isSignal: true, isRequired: false, transformFunction: null }, rectangleStyle: { classPropertyName: "rectangleStyle", publicName: "rectangleStyle", isSignal: true, isRequired: false, transformFunction: null }, ruleStyle: { classPropertyName: "ruleStyle", publicName: "ruleStyle", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "data": "data()", "type": "type()", "showGrid": "showGrid()", "animate": "animate()", "showLegend": "showLegend()", "referenceLines": "referenceLines()", "lineStyle": "lineStyle()", "pointStyle": "pointStyle()", "areaStyle": "areaStyle()", "barStyle": "barStyle()", "pieStyle": "pieStyle()", "rectangleStyle": "rectangleStyle()", "ruleStyle": "ruleStyle()", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
819
+ }
820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiChart, decorators: [{
821
+ type: Component,
822
+ args: [{
823
+ selector: 'ui-chart',
824
+ template: '',
825
+ host: {
826
+ '[data]': 'data()',
827
+ '[type]': 'type()',
828
+ '[showGrid]': 'showGrid()',
829
+ '[animate]': 'animate()',
830
+ '[showLegend]': 'showLegend()',
831
+ '[referenceLines]': 'referenceLines()',
832
+ '[lineStyle]': 'lineStyle()',
833
+ '[pointStyle]': 'pointStyle()',
834
+ '[areaStyle]': 'areaStyle()',
835
+ '[barStyle]': 'barStyle()',
836
+ '[pieStyle]': 'pieStyle()',
837
+ '[rectangleStyle]': 'rectangleStyle()',
838
+ '[ruleStyle]': 'ruleStyle()',
839
+ '[modifiers]': 'modifiers()',
840
+ },
841
+ }]
842
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], showGrid: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGrid", required: false }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], showLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLegend", required: false }] }], referenceLines: [{ type: i0.Input, args: [{ isSignal: true, alias: "referenceLines", required: false }] }], lineStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineStyle", required: false }] }], pointStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pointStyle", required: false }] }], areaStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "areaStyle", required: false }] }], barStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "barStyle", required: false }] }], pieStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pieStyle", required: false }] }], rectangleStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "rectangleStyle", required: false }] }], ruleStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "ruleStyle", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
843
+ /**
844
+ * A SwiftUI `ProgressView`: a bar filled to `value`, from 0 to 1, or a spinner without one. On
845
+ * Android, Compose's `LinearProgressIndicator`, a moving bar rather than a spinner without a value.
846
+ */
606
847
  export class UiProgress {
848
+ nativeView = nativeView();
849
+ android = nativePlatform() === 'android';
607
850
  value = input(undefined, { ...(ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {}), transform: optionalNumber });
608
851
  modifiers = input(/* @ts-ignore */
609
852
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
610
853
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
611
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiProgress, isStandalone: true, selector: "ui-progress", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "value": "value()", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
854
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiProgress, isStandalone: true, selector: "ui-progress", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "value": "android ? undefined : value()", "progress": "android ? value() : undefined", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
612
855
  }
613
856
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiProgress, decorators: [{
614
857
  type: Component,
615
858
  args: [{
616
859
  selector: 'ui-progress',
617
860
  template: '',
618
- host: { '[value]': 'value()', '[modifiers]': 'modifiers()' },
861
+ host: {
862
+ '[value]': 'android ? undefined : value()',
863
+ '[progress]': 'android ? value() : undefined',
864
+ '[modifiers]': 'modifiers()',
865
+ },
619
866
  }]
620
867
  }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
621
- /** A SwiftUI `HStack`. */
868
+ /**
869
+ * A SwiftUI `HStack`, or Compose's `Row` on Android, centred, as SwiftUI's is, unless `alignment`
870
+ * says otherwise. Compose has no `firstTextBaseline`, and centres instead. Without `spacing`, SwiftUI
871
+ * puts its own default spacing between children and Compose puts none.
872
+ */
622
873
  export class UiHStack {
874
+ nativeView = nativeView();
623
875
  alignment = input(/* @ts-ignore */
624
876
  ...(ngDevMode ? [undefined, { debugName: "alignment" }] : /* istanbul ignore next */ []));
625
877
  spacing = input(undefined, { ...(ngDevMode ? { debugName: "spacing" } : /* istanbul ignore next */ {}), transform: optionalNumber });
626
878
  modifiers = input(/* @ts-ignore */
627
879
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
880
+ android = nativePlatform() === 'android';
881
+ spacedBy = spacedBy;
882
+ composeAlignment(alignment) {
883
+ return alignment === 'top' || alignment === 'bottom' ? alignment : 'center';
884
+ }
628
885
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiHStack, deps: [], target: i0.ɵɵFactoryTarget.Component });
629
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiHStack, isStandalone: true, selector: "ui-hstack", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "alignment": "alignment()", "spacing": "spacing()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
886
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiHStack, isStandalone: true, selector: "ui-hstack", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, spacing: { classPropertyName: "spacing", publicName: "spacing", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "alignment": "android ? undefined : alignment()", "spacing": "android ? undefined : spacing()", "horizontalArrangement": "android ? spacedBy(spacing()) : undefined", "verticalAlignment": "android ? composeAlignment(alignment()) : undefined", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
630
887
  }
631
888
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiHStack, decorators: [{
632
889
  type: Component,
@@ -634,14 +891,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
634
891
  selector: 'ui-hstack',
635
892
  template: '<ng-content />',
636
893
  host: {
637
- '[alignment]': 'alignment()',
638
- '[spacing]': 'spacing()',
894
+ '[alignment]': 'android ? undefined : alignment()',
895
+ '[spacing]': 'android ? undefined : spacing()',
896
+ '[horizontalArrangement]': 'android ? spacedBy(spacing()) : undefined',
897
+ '[verticalAlignment]': 'android ? composeAlignment(alignment()) : undefined',
639
898
  '[modifiers]': 'modifiers()',
640
899
  },
641
900
  }]
642
901
  }], propDecorators: { alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], spacing: [{ type: i0.Input, args: [{ isSignal: true, alias: "spacing", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
902
+ function spacedBy(spacing) {
903
+ return spacing === undefined ? undefined : { spacedBy: Math.round(spacing) };
904
+ }
643
905
  /** A SwiftUI `Spacer`: the room left over in its stack. */
644
906
  export class UiSpacer {
907
+ nativeView = nativeView();
645
908
  modifiers = input(/* @ts-ignore */
646
909
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
647
910
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiSpacer, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -655,25 +918,250 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
655
918
  host: { '[modifiers]': 'modifiers()' },
656
919
  }]
657
920
  }], propDecorators: { modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
921
+ /** The same place, as Compose's `Box` names it. */
922
+ const CONTENT_ALIGNMENT = {
923
+ center: 'center',
924
+ leading: 'centerStart',
925
+ trailing: 'centerEnd',
926
+ top: 'topCenter',
927
+ bottom: 'bottomCenter',
928
+ topLeading: 'topStart',
929
+ topTrailing: 'topEnd',
930
+ bottomLeading: 'bottomStart',
931
+ bottomTrailing: 'bottomEnd',
932
+ };
933
+ /**
934
+ * A SwiftUI `ZStack`: its children drawn over one another, the first at the back. On Android,
935
+ * Compose's `Box`, centred, as SwiftUI's is, unless `alignment` says otherwise.
936
+ */
937
+ export class UiZStack {
938
+ nativeView = nativeView();
939
+ alignment = input(/* @ts-ignore */
940
+ ...(ngDevMode ? [undefined, { debugName: "alignment" }] : /* istanbul ignore next */ []));
941
+ modifiers = input(/* @ts-ignore */
942
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
943
+ android = nativePlatform() === 'android';
944
+ contentAlignment = CONTENT_ALIGNMENT;
945
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiZStack, deps: [], target: i0.ɵɵFactoryTarget.Component });
946
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiZStack, isStandalone: true, selector: "ui-zstack", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "alignment": "android ? undefined : alignment()", "contentAlignment": "android ? contentAlignment[alignment() ?? \"center\"] : undefined", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
947
+ }
948
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiZStack, decorators: [{
949
+ type: Component,
950
+ args: [{
951
+ selector: 'ui-zstack',
952
+ template: '<ng-content />',
953
+ host: {
954
+ '[alignment]': 'android ? undefined : alignment()',
955
+ '[contentAlignment]': 'android ? contentAlignment[alignment() ?? "center"] : undefined',
956
+ '[modifiers]': 'modifiers()',
957
+ },
958
+ }]
959
+ }], propDecorators: { alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
960
+ /** A SwiftUI `Rectangle`, filling the space it is given. Colour it with `foregroundStyle`. */
961
+ export class UiRectangle {
962
+ nativeView = nativeView();
963
+ modifiers = input(/* @ts-ignore */
964
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
965
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiRectangle, deps: [], target: i0.ɵɵFactoryTarget.Component });
966
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiRectangle, isStandalone: true, selector: "ui-rectangle", inputs: { modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
967
+ }
968
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiRectangle, decorators: [{
969
+ type: Component,
970
+ args: [{
971
+ selector: 'ui-rectangle',
972
+ template: '',
973
+ host: { '[modifiers]': 'modifiers()' },
974
+ }]
975
+ }], propDecorators: { modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
976
+ /** A SwiftUI `RoundedRectangle`, its corners rounded by `cornerRadius`. */
977
+ export class UiRoundedRectangle {
978
+ nativeView = nativeView();
979
+ cornerRadius = input(undefined, { ...(ngDevMode ? { debugName: "cornerRadius" } : /* istanbul ignore next */ {}), transform: optionalNumber });
980
+ modifiers = input(/* @ts-ignore */
981
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
982
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiRoundedRectangle, deps: [], target: i0.ɵɵFactoryTarget.Component });
983
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiRoundedRectangle, isStandalone: true, selector: "ui-rounded-rectangle", inputs: { cornerRadius: { classPropertyName: "cornerRadius", publicName: "cornerRadius", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "cornerRadius": "cornerRadius()", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
984
+ }
985
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiRoundedRectangle, decorators: [{
986
+ type: Component,
987
+ args: [{
988
+ selector: 'ui-rounded-rectangle',
989
+ template: '',
990
+ host: { '[cornerRadius]': 'cornerRadius()', '[modifiers]': 'modifiers()' },
991
+ }]
992
+ }], propDecorators: { cornerRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "cornerRadius", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
993
+ /** A SwiftUI `UnevenRoundedRectangle`: a rectangle with a radius of its own for each corner. */
994
+ export class UiUnevenRoundedRectangle {
995
+ nativeView = nativeView();
996
+ topLeadingRadius = input(undefined, { ...(ngDevMode ? { debugName: "topLeadingRadius" } : /* istanbul ignore next */ {}), transform: optionalNumber });
997
+ topTrailingRadius = input(undefined, { ...(ngDevMode ? { debugName: "topTrailingRadius" } : /* istanbul ignore next */ {}), transform: optionalNumber });
998
+ bottomLeadingRadius = input(undefined, { ...(ngDevMode ? { debugName: "bottomLeadingRadius" } : /* istanbul ignore next */ {}), transform: optionalNumber });
999
+ bottomTrailingRadius = input(undefined, { ...(ngDevMode ? { debugName: "bottomTrailingRadius" } : /* istanbul ignore next */ {}), transform: optionalNumber });
1000
+ modifiers = input(/* @ts-ignore */
1001
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
1002
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiUnevenRoundedRectangle, deps: [], target: i0.ɵɵFactoryTarget.Component });
1003
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiUnevenRoundedRectangle, isStandalone: true, selector: "ui-uneven-rounded-rectangle", inputs: { topLeadingRadius: { classPropertyName: "topLeadingRadius", publicName: "topLeadingRadius", isSignal: true, isRequired: false, transformFunction: null }, topTrailingRadius: { classPropertyName: "topTrailingRadius", publicName: "topTrailingRadius", isSignal: true, isRequired: false, transformFunction: null }, bottomLeadingRadius: { classPropertyName: "bottomLeadingRadius", publicName: "bottomLeadingRadius", isSignal: true, isRequired: false, transformFunction: null }, bottomTrailingRadius: { classPropertyName: "bottomTrailingRadius", publicName: "bottomTrailingRadius", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "topLeadingRadius": "topLeadingRadius()", "topTrailingRadius": "topTrailingRadius()", "bottomLeadingRadius": "bottomLeadingRadius()", "bottomTrailingRadius": "bottomTrailingRadius()", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
1004
+ }
1005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiUnevenRoundedRectangle, decorators: [{
1006
+ type: Component,
1007
+ args: [{
1008
+ selector: 'ui-uneven-rounded-rectangle',
1009
+ template: '',
1010
+ host: {
1011
+ '[topLeadingRadius]': 'topLeadingRadius()',
1012
+ '[topTrailingRadius]': 'topTrailingRadius()',
1013
+ '[bottomLeadingRadius]': 'bottomLeadingRadius()',
1014
+ '[bottomTrailingRadius]': 'bottomTrailingRadius()',
1015
+ '[modifiers]': 'modifiers()',
1016
+ },
1017
+ }]
1018
+ }], propDecorators: { topLeadingRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "topLeadingRadius", required: false }] }], topTrailingRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "topTrailingRadius", required: false }] }], bottomLeadingRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "bottomLeadingRadius", required: false }] }], bottomTrailingRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "bottomTrailingRadius", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
1019
+ /** A SwiftUI `Capsule`: a rectangle with fully rounded ends. */
1020
+ export class UiCapsule {
1021
+ nativeView = nativeView();
1022
+ cornerStyle = input(/* @ts-ignore */
1023
+ ...(ngDevMode ? [undefined, { debugName: "cornerStyle" }] : /* istanbul ignore next */ []));
1024
+ modifiers = input(/* @ts-ignore */
1025
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
1026
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiCapsule, deps: [], target: i0.ɵɵFactoryTarget.Component });
1027
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiCapsule, isStandalone: true, selector: "ui-capsule", inputs: { cornerStyle: { classPropertyName: "cornerStyle", publicName: "cornerStyle", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "cornerStyle": "cornerStyle()", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
1028
+ }
1029
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiCapsule, decorators: [{
1030
+ type: Component,
1031
+ args: [{
1032
+ selector: 'ui-capsule',
1033
+ template: '',
1034
+ host: { '[cornerStyle]': 'cornerStyle()', '[modifiers]': 'modifiers()' },
1035
+ }]
1036
+ }], propDecorators: { cornerStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "cornerStyle", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
1037
+ /** A SwiftUI `Circle`, as large as fits the space it is given. */
1038
+ export class UiCircle {
1039
+ nativeView = nativeView();
1040
+ modifiers = input(/* @ts-ignore */
1041
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
1042
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiCircle, deps: [], target: i0.ɵɵFactoryTarget.Component });
1043
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiCircle, isStandalone: true, selector: "ui-circle", inputs: { modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
1044
+ }
1045
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiCircle, decorators: [{
1046
+ type: Component,
1047
+ args: [{
1048
+ selector: 'ui-circle',
1049
+ template: '',
1050
+ host: { '[modifiers]': 'modifiers()' },
1051
+ }]
1052
+ }], propDecorators: { modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
1053
+ /** A SwiftUI `Ellipse`, filling the space it is given. */
1054
+ export class UiEllipse {
1055
+ nativeView = nativeView();
1056
+ modifiers = input(/* @ts-ignore */
1057
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
1058
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiEllipse, deps: [], target: i0.ɵɵFactoryTarget.Component });
1059
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiEllipse, isStandalone: true, selector: "ui-ellipse", inputs: { modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
1060
+ }
1061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiEllipse, decorators: [{
1062
+ type: Component,
1063
+ args: [{
1064
+ selector: 'ui-ellipse',
1065
+ template: '',
1066
+ host: { '[modifiers]': 'modifiers()' },
1067
+ }]
1068
+ }], propDecorators: { modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
1069
+ /**
1070
+ * WidgetKit's `AccessoryWidgetBackground`: the system's backdrop for a lock screen widget, the
1071
+ * translucent disc or panel behind its content.
1072
+ */
1073
+ export class UiAccessoryWidgetBackground {
1074
+ nativeView = nativeView();
1075
+ modifiers = input(/* @ts-ignore */
1076
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
1077
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiAccessoryWidgetBackground, deps: [], target: i0.ɵɵFactoryTarget.Component });
1078
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiAccessoryWidgetBackground, isStandalone: true, selector: "ui-accessory-widget-background", inputs: { modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
1079
+ }
1080
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiAccessoryWidgetBackground, decorators: [{
1081
+ type: Component,
1082
+ args: [{
1083
+ selector: 'ui-accessory-widget-background',
1084
+ template: '',
1085
+ host: { '[modifiers]': 'modifiers()' },
1086
+ }]
1087
+ }], propDecorators: { modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
1088
+ /** A SwiftUI `Label`: a title beside an SF Symbol. */
1089
+ export class UiLabel {
1090
+ nativeView = nativeView();
1091
+ title = input(/* @ts-ignore */
1092
+ ...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
1093
+ /** An SF Symbol name. */
1094
+ systemImage = input(/* @ts-ignore */
1095
+ ...(ngDevMode ? [undefined, { debugName: "systemImage" }] : /* istanbul ignore next */ []));
1096
+ color = input(/* @ts-ignore */
1097
+ ...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
1098
+ modifiers = input(/* @ts-ignore */
1099
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
1100
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiLabel, deps: [], target: i0.ɵɵFactoryTarget.Component });
1101
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiLabel, isStandalone: true, selector: "ui-label", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, systemImage: { classPropertyName: "systemImage", publicName: "systemImage", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "title": "title()", "systemImage": "systemImage()", "color": "color()", "modifiers": "modifiers()" } }, ngImport: i0, template: '', isInline: true });
1102
+ }
1103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiLabel, decorators: [{
1104
+ type: Component,
1105
+ args: [{
1106
+ selector: 'ui-label',
1107
+ template: '',
1108
+ host: {
1109
+ '[title]': 'title()',
1110
+ '[systemImage]': 'systemImage()',
1111
+ '[color]': 'color()',
1112
+ '[modifiers]': 'modifiers()',
1113
+ },
1114
+ }]
1115
+ }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], systemImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "systemImage", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
1116
+ /**
1117
+ * A SwiftUI `Link`: opens `destination`, a URL, when tapped. It shows `label`, or the views
1118
+ * written inside it. In a widget, a link is how a tap opens the app at a deep link.
1119
+ */
1120
+ export class UiLink {
1121
+ nativeView = nativeView();
1122
+ destination = input.required(/* @ts-ignore */
1123
+ ...(ngDevMode ? [{ debugName: "destination" }] : /* istanbul ignore next */ []));
1124
+ label = input(/* @ts-ignore */
1125
+ ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
1126
+ modifiers = input(/* @ts-ignore */
1127
+ ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
1128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiLink, deps: [], target: i0.ɵɵFactoryTarget.Component });
1129
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiLink, isStandalone: true, selector: "ui-link", inputs: { destination: { classPropertyName: "destination", publicName: "destination", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "destination": "destination()", "label": "label()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
1130
+ }
1131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiLink, decorators: [{
1132
+ type: Component,
1133
+ args: [{
1134
+ selector: 'ui-link',
1135
+ template: '<ng-content />',
1136
+ host: {
1137
+ '[destination]': 'destination()',
1138
+ '[label]': 'label()',
1139
+ '[modifiers]': 'modifiers()',
1140
+ },
1141
+ }]
1142
+ }], propDecorators: { destination: [{ type: i0.Input, args: [{ isSignal: true, alias: "destination", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
658
1143
  /** A SwiftUI `LabeledContent`: a label, and its content beside it. */
659
1144
  export class UiLabeledContent {
1145
+ nativeView = nativeView();
660
1146
  label = input(/* @ts-ignore */
661
1147
  ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
662
1148
  modifiers = input(/* @ts-ignore */
663
1149
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
664
1150
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiLabeledContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
665
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiLabeledContent, isStandalone: true, selector: "ui-labeled-content", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "label": "label()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
1151
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiLabeledContent, isStandalone: true, selector: "ui-labeled-content", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "label": "label()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ui-slot name="content"><ng-content /></ui-slot>', isInline: true, dependencies: [{ kind: "component", type: UiSlot, selector: "ui-slot", inputs: ["name", "extraProps"] }] });
666
1152
  }
667
1153
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiLabeledContent, decorators: [{
668
1154
  type: Component,
669
1155
  args: [{
670
1156
  selector: 'ui-labeled-content',
671
- template: '<ng-content />',
1157
+ imports: [UiSlot],
1158
+ template: '<ui-slot name="content"><ng-content /></ui-slot>',
672
1159
  host: { '[label]': 'label()', '[modifiers]': 'modifiers()' },
673
1160
  }]
674
1161
  }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
675
1162
  /** A SwiftUI `Form`: settings-style grouped rows. */
676
1163
  export class UiForm {
1164
+ nativeView = nativeView();
677
1165
  modifiers = input(/* @ts-ignore */
678
1166
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
679
1167
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiForm, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -689,18 +1177,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImpor
689
1177
  }], propDecorators: { modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });
690
1178
  /** A SwiftUI `Section` of a form or a list, under `title`. */
691
1179
  export class UiSection {
1180
+ nativeView = nativeView();
692
1181
  title = input(/* @ts-ignore */
693
1182
  ...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
694
1183
  modifiers = input(/* @ts-ignore */
695
1184
  ...(ngDevMode ? [undefined, { debugName: "modifiers" }] : /* istanbul ignore next */ []));
696
1185
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
697
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiSection, isStandalone: true, selector: "ui-section", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "title": "title()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ng-content />', isInline: true });
1186
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.0", type: UiSection, isStandalone: true, selector: "ui-section", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, modifiers: { classPropertyName: "modifiers", publicName: "modifiers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "title": "title()", "modifiers": "modifiers()" } }, ngImport: i0, template: '<ui-slot name="content"><ng-content /></ui-slot>', isInline: true, dependencies: [{ kind: "component", type: UiSlot, selector: "ui-slot", inputs: ["name", "extraProps"] }] });
698
1187
  }
699
1188
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: UiSection, decorators: [{
700
1189
  type: Component,
701
1190
  args: [{
702
1191
  selector: 'ui-section',
703
- template: '<ng-content />',
1192
+ imports: [UiSlot],
1193
+ template: '<ui-slot name="content"><ng-content /></ui-slot>',
704
1194
  host: { '[title]': 'title()', '[modifiers]': 'modifiers()' },
705
1195
  }]
706
1196
  }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], modifiers: [{ type: i0.Input, args: [{ isSignal: true, alias: "modifiers", required: false }] }] } });