@ng-native/expo 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audio.js +2 -2
- package/dist/audio.js.map +1 -1
- package/dist/community-views.js +1 -1
- package/dist/community-views.js.map +1 -1
- package/dist/crypto.js +2 -2
- package/dist/crypto.js.map +1 -1
- package/dist/database.d.ts +18 -3
- package/dist/database.js +26 -7
- package/dist/database.js.map +1 -1
- package/dist/date-time-picker.d.ts +33 -0
- package/dist/date-time-picker.js +77 -0
- package/dist/date-time-picker.js.map +1 -0
- package/dist/dom-component.d.ts +5 -0
- package/dist/dom-component.js +57 -2
- package/dist/dom-component.js.map +1 -1
- package/dist/expo-ui-components.d.ts +150 -2
- package/dist/expo-ui-components.js +170 -3
- package/dist/expo-ui-components.js.map +1 -1
- package/dist/expo-ui.js +11 -1
- package/dist/expo-ui.js.map +1 -1
- package/dist/file-system.d.ts +7 -0
- package/dist/file-system.js +16 -3
- package/dist/file-system.js.map +1 -1
- package/dist/fonts.d.ts +0 -9
- package/dist/fonts.js +19 -14
- package/dist/fonts.js.map +1 -1
- package/dist/glass.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/live-activity.js +7 -1
- package/dist/live-activity.js.map +1 -1
- package/dist/location.d.ts +17 -0
- package/dist/location.js +18 -0
- package/dist/location.js.map +1 -1
- package/dist/native.d.ts +8 -1
- package/dist/native.js +21 -6
- package/dist/native.js.map +1 -1
- package/dist/register-expo-view.d.ts +2 -0
- package/dist/register-expo-view.js +1 -0
- package/dist/register-expo-view.js.map +1 -1
- package/dist/video.js +2 -2
- package/dist/video.js.map +1 -1
- package/dist/widget.d.ts +63 -0
- package/dist/widget.js +98 -0
- package/dist/widget.js.map +1 -0
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expo-ui-components.js","sourceRoot":"","sources":["../src/exp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AU,CAAC;IACxB,SAAS,GAAG,KAAK;6FAAyB,CAAC;uGAFzC,SAAS;2FAAT,SAAS,wZAHV,kDAAkD,4DAxtBjD,MAAM;;2FA2tBN,SAAS;kBANrB,SAAS;mBAAC;oBACT,QAAQ,EAAE,YAAY;oBACtB,OAAO,EAAE,CAAC,MAAM,CAAC;oBACjB,QAAQ,EAAE,kDAAkD;oBAC5D,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE;iBAC7D","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 booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport type { NativeState } from './native-state.ts';\nimport {\n HostEngine,\n type HostNode,\n type NativeSyntheticEvent,\n nativePlatform,\n} from '@ng-native/fabric';\nimport { optionalBoolean, optionalNumber } from './transforms.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 * 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]': 'ignoreSafeArea()',\n '[useViewportSizeMeasurement]': 'useViewportSizeMeasurement()',\n },\n})\nexport class UiHost {\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 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]': 'label()',\n '[systemImage]': 'systemImage()',\n '[accessibilityLabel]': 'accessibilityLabel()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiMenu {\n readonly label = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n readonly accessibilityLabel = input<string>();\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.\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]': 'label()',\n '[systemImage]': 'systemImage()',\n '[role]': 'role()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiButton {\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'>();\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 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]': 'extraProps()',\n },\n})\nexport class UiSlot {\n protected readonly android = nativePlatform() === 'android';\n readonly name = input.required<string>();\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 readonly modifiers = input<readonly UiModifier[]>();\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.\n */\n@Component({\n selector: 'ui-swipe-actions',\n template: '<ng-content />',\n host: { '[modifiers]': 'modifiers()' },\n})\nexport class UiSwipeActions {\n readonly modifiers = input<readonly UiModifier[]>();\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 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 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/** A SwiftUI `Image`: an SF Symbol by `systemName`, or a picture by `uiImage` URL. */\n@Component({\n selector: 'ui-image',\n template: '',\n host: {\n '[systemName]': 'systemName()',\n '[uiImage]': 'uiImage()',\n '[size]': 'size()',\n '[color]': 'color()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiImage {\n readonly systemName = input<string>();\n readonly uiImage = input<string>();\n readonly size = input<number>(undefined, { transform: optionalNumber });\n readonly color = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\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@Component({\n selector: 'ui-text',\n template: '<ng-content />',\n host: { '[text]': 'text()', '[modifiers]': 'modifiers()' },\n})\nexport class UiText {\n readonly text = input<string>();\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.host ?? 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/** 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]': 'title()',\n '[selection]': 'resolvedSelection()',\n '[initialDate]': 'initialDate()',\n '[displayedComponents]': 'displayedComponents()',\n '[range]': 'range()',\n '[accessibilityLabel]': 'accessibilityLabel()',\n '[modifiers]': 'resolvedModifiers()',\n },\n})\nexport class UiDatePicker {\n readonly title = input<string>();\n readonly selection = input<string>();\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.android ? undefined : (this.selection() ?? this.value()?.toISOString()),\n );\n protected readonly initialDate = computed(() =>\n this.android ? (this.value()?.getTime() ?? null) : undefined,\n );\n protected readonly resolvedModifiers = computed(() =>\n this.android ? this.modifiers() : withDisabled(this.modifiers(), this.disabled()),\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/** 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`, iOS only, as a Signal Forms field: `<ui-picker [options]=\"rooms\"\n * [formField]=\"f.room\" />`. `options` draws the choices, each tagged with its value, which is the\n * content slot and `tag` modifiers `@expo/ui` otherwise wants written out by hand; children still\n * work for anything richer. `pickerStyle` is SwiftUI's (`menu`, `segmented`, `wheel`, `inline`).\n */\n@Component({\n selector: 'ui-picker',\n imports: [UiSlot, UiText],\n template: `\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 host: {\n '[label]': 'label()',\n '[systemImage]': 'systemImage()',\n '[selection]': 'value()',\n '[modifiers]': 'resolvedModifiers()',\n },\n})\nexport class UiPicker {\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 resolvedModifiers = computed(() => {\n const style = this.pickerStyle();\n const own = style\n ? [{ $type: 'pickerStyle', style }, ...(this.modifiers() ?? [])]\n : this.modifiers();\n return withDisabled(own, this.disabled());\n });\n\n constructor() {\n listen('topSelectionChange', ({ selection }) => {\n if (typeof selection !== 'string' && typeof selection !== 'number') return;\n this.value.set(selection);\n this.touch.emit();\n });\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]': 'label()',\n '[modifiers]': 'modifiers()',\n '(checkedChange)': 'android && checked($event)',\n },\n})\nexport class UiToggle {\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 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 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 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/** A SwiftUI `Gauge`: `value` between `min` and `max`, drawn as `type` says. */\n@Component({\n selector: 'ui-gauge',\n template: '<ng-content />',\n host: {\n '[value]': 'value()',\n '[min]': 'min()',\n '[max]': 'max()',\n '[type]': 'type()',\n '[currentValueLabel]': 'currentValueLabel()',\n '[minimumValueLabel]': 'minimumValueLabel()',\n '[maximumValueLabel]': 'maximumValueLabel()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiGauge {\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 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\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 */\n@Component({\n selector: 'ui-progress',\n template: '',\n host: {\n '[value]': 'android ? undefined : value()',\n '[progress]': 'android ? value() : undefined',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiProgress {\n protected readonly android = nativePlatform() === 'android';\n readonly value = input<number>(undefined, { transform: optionalNumber });\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 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 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 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 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 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 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 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 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 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 readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Label`: a title beside an SF Symbol. */\n@Component({\n selector: 'ui-label',\n template: '',\n host: {\n '[title]': 'title()',\n '[systemImage]': 'systemImage()',\n '[color]': 'color()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiLabel {\n readonly title = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n readonly color = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\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 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 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 readonly modifiers = input<readonly UiModifier[]>();\n}\n\n/** A SwiftUI `Section` of a form or a list, under `title`. */\n@Component({\n selector: 'ui-section',\n imports: [UiSlot],\n template: '<ui-slot name=\"content\"><ng-content /></ui-slot>',\n host: { '[title]': 'title()', '[modifiers]': 'modifiers()' },\n})\nexport class UiSection {\n readonly title = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\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,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,GACP,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aAAa,EAAE,aAAa,EAAE;iBAC7D","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 booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport type { NativeState } from './native-state.ts';\nimport {\n HostEngine,\n type HostNode,\n type NativeSyntheticEvent,\n keepNativeView,\n nativePlatform,\n} from '@ng-native/fabric';\nimport { optionalBoolean, optionalNumber } from './transforms.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]': 'ignoreSafeArea()',\n '[useViewportSizeMeasurement]': 'useViewportSizeMeasurement()',\n },\n})\nexport class UiHost {\n protected readonly nativeView = nativeView();\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 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]': 'label()',\n '[systemImage]': 'systemImage()',\n '[accessibilityLabel]': 'accessibilityLabel()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiMenu {\n protected readonly nativeView = nativeView();\n readonly label = input<string>();\n /** An SF Symbol name. */\n readonly systemImage = input<string>();\n readonly accessibilityLabel = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\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 '[matchContents]': 'matchContents()',\n '[expoInternalSizeFromChildren]': 'matchContents()',\n '[layoutRoot]': 'layoutRoot()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiViewHost {\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 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.\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]': 'label()',\n '[systemImage]': 'systemImage()',\n '[role]': 'role()',\n '[target]': 'target()',\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'>();\n /**\n * In a home-screen widget's layout, what a tap on it records for the app: see\n * `@ng-native/expo/widget`.\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]': 'extraProps()',\n },\n})\nexport class UiSlot {\n protected readonly nativeView = nativeView();\n protected readonly android = nativePlatform() === 'android';\n readonly name = input.required<string>();\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 * 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.\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\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/** A SwiftUI `Image`: an SF Symbol by `systemName`, or a picture by `uiImage` URL. */\n@Component({\n selector: 'ui-image',\n template: '',\n host: {\n '[systemName]': 'systemName()',\n '[uiImage]': 'uiImage()',\n '[size]': 'size()',\n '[color]': 'color()',\n '[modifiers]': 'modifiers()',\n },\n})\nexport class UiImage {\n protected readonly nativeView = nativeView();\n readonly systemName = input<string>();\n readonly uiImage = input<string>();\n readonly size = input<number>(undefined, { transform: optionalNumber });\n readonly color = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\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@Component({\n selector: 'ui-text',\n template: '<ng-content />',\n host: { '[text]': 'text()', '[modifiers]': 'modifiers()' },\n})\nexport class UiText {\n protected readonly nativeView = nativeView();\n readonly text = input<string>();\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.host ?? 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/** 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]': 'title()',\n '[selection]': 'resolvedSelection()',\n '[initialDate]': 'initialDate()',\n '[displayedComponents]': 'displayedComponents()',\n '[range]': 'range()',\n '[accessibilityLabel]': 'accessibilityLabel()',\n '[modifiers]': 'resolvedModifiers()',\n },\n})\nexport class UiDatePicker {\n protected readonly nativeView = nativeView();\n readonly title = input<string>();\n readonly selection = input<string>();\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.android ? undefined : (this.selection() ?? this.value()?.toISOString()),\n );\n protected readonly initialDate = computed(() =>\n this.android ? (this.value()?.getTime() ?? null) : undefined,\n );\n protected readonly resolvedModifiers = computed(() =>\n this.android ? this.modifiers() : withDisabled(this.modifiers(), this.disabled()),\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/** 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`, iOS only, as a Signal Forms field: `<ui-picker [options]=\"rooms\"\n * [formField]=\"f.room\" />`. `options` draws the choices, each tagged with its value, which is the\n * content slot and `tag` modifiers `@expo/ui` otherwise wants written out by hand; children still\n * work for anything richer. `pickerStyle` is SwiftUI's (`menu`, `segmented`, `wheel`, `inline`).\n */\n@Component({\n selector: 'ui-picker',\n imports: [UiSlot, UiText],\n template: `\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 host: {\n '[label]': 'label()',\n '[systemImage]': 'systemImage()',\n '[selection]': 'value()',\n '[modifiers]': '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 resolvedModifiers = computed(() => {\n const style = this.pickerStyle();\n const own = style\n ? [{ $type: 'pickerStyle', style }, ...(this.modifiers() ?? [])]\n : this.modifiers();\n return withDisabled(own, this.disabled());\n });\n\n constructor() {\n listen('topSelectionChange', ({ selection }) => {\n if (typeof selection !== 'string' && typeof selection !== 'number') return;\n this.value.set(selection);\n this.touch.emit();\n });\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]': '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/** A SwiftUI `Gauge`: `value` between `min` and `max`, drawn as `type` says. */\n@Component({\n selector: 'ui-gauge',\n template: '<ng-content />',\n host: {\n '[value]': 'value()',\n '[min]': 'min()',\n '[max]': 'max()',\n '[type]': 'type()',\n '[currentValueLabel]': 'currentValueLabel()',\n '[minimumValueLabel]': 'minimumValueLabel()',\n '[maximumValueLabel]': 'maximumValueLabel()',\n '[modifiers]': 'modifiers()',\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 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\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 */\n@Component({\n selector: 'ui-progress',\n template: '',\n host: {\n '[value]': 'android ? undefined : value()',\n '[progress]': 'android ? value() : undefined',\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 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 template: '',\n host: {\n '[title]': 'title()',\n '[systemImage]': 'systemImage()',\n '[color]': 'color()',\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 readonly color = input<string>();\n readonly modifiers = input<readonly UiModifier[]>();\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/** A SwiftUI `Section` of a form or a list, under `title`. */\n@Component({\n selector: 'ui-section',\n imports: [UiSlot],\n template: '<ui-slot name=\"content\"><ng-content /></ui-slot>',\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"]}
|
package/dist/expo-ui.js
CHANGED
|
@@ -101,6 +101,11 @@ export const EXPO_UI_VIEWS = {
|
|
|
101
101
|
'tri-state-checkbox': [null, 'TriStateCheckboxView'],
|
|
102
102
|
'uneven-rounded-rectangle': ['UnevenRoundedRectangleView', null],
|
|
103
103
|
'vertical-slider': [null, 'VerticalSliderView'],
|
|
104
|
+
/**
|
|
105
|
+
* The other way round from `host`: views of the app's own inside SwiftUI or Compose content,
|
|
106
|
+
* as a context menu's trigger or a sheet's body. `@expo/ui` calls it `RNHostView`.
|
|
107
|
+
*/
|
|
108
|
+
'view-host': ['RNHostView', 'RNHostView'],
|
|
104
109
|
vstack: ['VStackView', 'ColumnView'],
|
|
105
110
|
zstack: ['ZStackView', 'BoxView'],
|
|
106
111
|
};
|
|
@@ -125,7 +130,12 @@ export function registerExpoUiViews(platform) {
|
|
|
125
130
|
continue;
|
|
126
131
|
// SwiftUI's and Compose's `Text` read their text from `text`, and take no child views.
|
|
127
132
|
const textContent = element === 'text' ? 'text' : undefined;
|
|
128
|
-
|
|
133
|
+
// `ui-` is a prefix a design system picks too: a component of the app's own keeps its host.
|
|
134
|
+
registerExpoView(`ui-${element}`, 'ExpoUI', {
|
|
135
|
+
viewName,
|
|
136
|
+
textContent,
|
|
137
|
+
yieldsToComponents: true,
|
|
138
|
+
});
|
|
129
139
|
}
|
|
130
140
|
}
|
|
131
141
|
//# sourceMappingURL=expo-ui.js.map
|
package/dist/expo-ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expo-ui.js","sourceRoot":"","sources":["../src/expo-ui.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,oGAAoG;AACpG,MAAM,CAAC,MAAM,aAAa,GAAsE;IAC9F,6BAA6B,EAAE,CAAC,+BAA+B,EAAE,IAAI,CAAC;IACtE,KAAK,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACvC,qBAAqB,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACvD,aAAa,EAAE,CAAC,IAAI,EAAE,gBAAgB,CAAC;IACvC,UAAU,EAAE,CAAC,gBAAgB,EAAE,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC;IAC1B,YAAY,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC;IACrC,oBAAoB,EAAE,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACpD,cAAc,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;IAC3D,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C","sourcesContent":["/**\n * `@expo/ui`: real SwiftUI and Jetpack Compose views, as elements.\n *\n * This is the closest thing in the ecosystem to what this project is for. Every one of these is a\n * platform control - a real `Picker`, a real `BottomSheet`, a real `Gauge` - rather than something\n * drawn to look like one, and `@expo/ui` reaches them through `requireNativeView('ExpoUI', ...)`,\n * which is the same derivation `registerExpoView` already mirrors. So the whole surface is\n * available here for the price of a table of names.\n *\n * The element names are platform-neutral where both platforms have the control, because an app\n * should write `<ui-slider>` once. Where only one platform has it - a `Gauge` is SwiftUI's, a\n * `SearchBar` is Compose's - the element exists only there, and registering for the wrong platform\n * would be an element that commits as nothing.\n *\n * ```ts\n * registerExpoUiViews(Platform.OS);\n * ```\n * ```html\n * <ui-host style=\"height: 44\">\n * <ui-slider [value]=\"volume()\" (valueChanged)=\"volume.set($event.value)\" />\n * </ui-host>\n * ```\n *\n * **A `<ui-host>` is required around any of these.** SwiftUI and Compose lay out their own\n * subtrees, and the host view is what bridges Yoga's layout to theirs; without one the control has\n * no size and does not appear - which looks exactly like a module that failed to install.\n *\n * Names, not components. There are ninety-odd of these, each with its own props and its own\n * modifier system, and a component per view prop-for-prop would be a second place for every one of\n * them to be wrong. The module's own documentation describes the props; this makes them reachable.\n */\nimport type { PlatformOSType } from 'react-native';\nimport { registerExpoView } from './register-expo-view.ts';\n\n/** Element name -> the `ExpoUI` view on iOS and on Android. Null where the platform has no such. */\nexport const EXPO_UI_VIEWS: Readonly<Record<string, readonly [string | null, string | null]>> = {\n 'accessory-widget-background': ['AccessoryWidgetBackgroundView', null],\n alert: ['AlertView', 'AlertDialogView'],\n 'animated-visibility': [null, 'AnimatedVisibilityView'],\n 'assist-chip': [null, 'AssistChipView'],\n background: ['BackgroundView', null],\n badge: [null, 'BadgeView'],\n 'badged-box': [null, 'BadgedBoxView'],\n 'basic-alert-dialog': [null, 'BasicAlertDialogView'],\n 'bottom-sheet': ['BottomSheetView', 'ModalBottomSheetView'],\n button: ['Button', 'Button'],\n capsule: ['CapsuleView', null],\n chart: ['ChartView', null],\n checkbox: [null, 'CheckboxView'],\n circle: ['CircleView', null],\n 'color-picker': ['ColorPickerView', null],\n 'confirmation-dialog': ['ConfirmationDialogView', null],\n 'content-unavailable': ['ContentUnavailableView', null],\n 'context-menu': ['ContextMenu', null],\n 'control-group': ['ControlGroupView', null],\n 'date-picker': ['DatePickerView', 'DateTimePickerView'],\n 'date-picker-dialog': [null, 'DatePickerDialogView'],\n 'disclosure-group': ['DisclosureGroupView', null],\n divider: ['DividerView', 'HorizontalDividerView'],\n 'docked-search-bar': [null, 'DockedSearchBarView'],\n ellipse: ['EllipseView', null],\n 'exposed-dropdown-menu-box': [null, 'ExposedDropdownMenuBoxView'],\n 'filter-chip': [null, 'FilterChipView'],\n 'floating-action-button': [null, 'FloatingActionButtonView'],\n 'flow-row': [null, 'FlowRowView'],\n form: ['FormView', null],\n gauge: ['GaugeView', null],\n 'glass-effect-container': ['GlassEffectContainerView', null],\n grid: ['GridView', null],\n 'grid-row': ['GridRowView', null],\n group: ['GroupView', null],\n 'horizontal-floating-toolbar': [null, 'HorizontalFloatingToolbarView'],\n host: ['HostView', 'HostView'],\n hstack: ['HStackView', 'RowView'],\n icon: [null, 'IconView'],\n image: ['ImageView', 'ImageView'],\n 'input-chip': [null, 'InputChipView'],\n label: ['LabelView', null],\n list: ['ListView', null],\n 'labeled-content': ['LabeledContentView', null],\n 'lazy-hstack': ['LazyHStackView', 'LazyRowView'],\n 'lazy-vstack': ['LazyVStackView', 'LazyColumnView'],\n link: ['LinkView', null],\n 'list-item': [null, 'ListItemView'],\n mask: ['MaskView', null],\n menu: ['MenuView', 'DropdownMenuView'],\n 'multi-choice-segmented-button-row': [null, 'MultiChoiceSegmentedButtonRowView'],\n 'navigation-bar': [null, 'NavigationBarView'],\n 'navigation-bar-item': [null, 'NavigationBarItemView'],\n overlay: ['OverlayView', null],\n pager: [null, 'HorizontalPagerView'],\n picker: ['PickerView', null],\n 'plain-tooltip': [null, 'PlainTooltipView'],\n popover: ['PopoverView', null],\n progress: ['ProgressView', 'LinearProgressIndicatorView'],\n 'pull-to-refresh-box': [null, 'PullToRefreshBoxView'],\n 'radio-button': [null, 'RadioButtonView'],\n rectangle: ['RectangleView', null],\n 'rich-tooltip': [null, 'RichTooltipView'],\n 'rounded-rectangle': ['RoundedRectangleView', null],\n 'scroll-view-component': ['ScrollViewComponent', null],\n 'search-bar': [null, 'SearchBarView'],\n section: ['SectionView', null],\n 'secure-field': ['SecureFieldView', null],\n 'segmented-button': [null, 'SegmentedButtonView'],\n shape: [null, 'ShapeView'],\n 'share-link': ['ShareLinkView', null],\n 'single-choice-segmented-button-row': [null, 'SingleChoiceSegmentedButtonRowView'],\n slider: ['SliderView', 'SliderView'],\n /**\n * Both platforms, though it looks Android-only at a glance.\n *\n * SwiftUI's `SlotView` lives in a top-level `SlotView.tsx` rather than in a directory of its\n * own, which is how it was missed. Twenty SwiftUI components put their children through one:\n * a picker's options, a section's rows, a labelled content's value. Without it those children\n * mount into a plain `UIView` and SwiftUI refuses them, which is a red screen on iOS and an\n * empty control everywhere else.\n */\n slot: ['SlotView', 'SlotView'],\n snackbar: [null, 'SnackbarView'],\n 'snackbar-host': [null, 'SnackbarHostView'],\n spacer: ['SpacerView', 'SpacerView'],\n stepper: ['StepperView', null],\n 'suggestion-chip': [null, 'SuggestionChipView'],\n surface: [null, 'SurfaceView'],\n 'swipe-actions': ['SwipeActionsView', null],\n 'sync-toggle': ['SyncToggleView', 'SyncSwitchView'],\n tab: ['TabView', null],\n text: ['TextView', 'TextView'],\n 'text-field': ['TextFieldView', null],\n 'time-picker-dialog': [null, 'TimePickerDialogView'],\n toggle: ['ToggleView', 'SwitchView'],\n 'tooltip-box': [null, 'TooltipBoxView'],\n 'tri-state-checkbox': [null, 'TriStateCheckboxView'],\n 'uneven-rounded-rectangle': ['UnevenRoundedRectangleView', null],\n 'vertical-slider': [null, 'VerticalSliderView'],\n vstack: ['VStackView', 'ColumnView'],\n zstack: ['ZStackView', 'BoxView'],\n};\n\n/**\n * Register every `@expo/ui` view the platform has.\n *\n * All of them at once, unlike the other registrations here, because they are all one module: an\n * app that has `@expo/ui` installed has all of these, and an app that does not has none of them.\n *\n * Takes `Platform.OS` itself - `'ios' | 'android' | 'macos' | 'windows' | 'web'` - rather than the\n * two platforms `@expo/ui` actually ships for, so a canary app can pass it straight through\n * without narrowing. Anything other than iOS or Android registers nothing, the same \"not\n * installed\" outcome as never calling this at all.\n */\nexport function registerExpoUiViews(platform: PlatformOSType): void {\n if (platform !== 'ios' && platform !== 'android') return;\n const index = platform === 'ios' ? 0 : 1;\n for (const [element, views] of Object.entries(EXPO_UI_VIEWS)) {\n const viewName = views[index];\n if (!viewName) continue;\n // SwiftUI's and Compose's `Text` read their text from `text`, and take no child views.\n const textContent = element === 'text' ? 'text' : undefined;\n registerExpoView(`ui-${element}`, 'ExpoUI', { viewName, textContent });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"expo-ui.js","sourceRoot":"","sources":["../src/expo-ui.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,oGAAoG;AACpG,MAAM,CAAC,MAAM,aAAa,GAAsE;IAC9F,6BAA6B,EAAE,CAAC,+BAA+B,EAAE,IAAI,CAAC;IACtE,KAAK,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC;IACvC,qBAAqB,EAAE,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACvD,aAAa,EAAE,CAAC,IAAI,EAAE,gBAAgB,CAAC;IACvC,UAAU,EAAE,CAAC,gBAAgB,EAAE,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC;IAC1B,YAAY,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC;IACrC,oBAAoB,EAAE,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACpD,cAAc,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;IAC3D,MAAM,EAAE,CAAC,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C,QAAQ;YACR,WAAW;YACX,kBAAkB,EAAE,IAAI;SACzB,CAAC,CAAC;IACL,CAAC;AACH,CAAC","sourcesContent":["/**\n * `@expo/ui`: real SwiftUI and Jetpack Compose views, as elements.\n *\n * This is the closest thing in the ecosystem to what this project is for. Every one of these is a\n * platform control - a real `Picker`, a real `BottomSheet`, a real `Gauge` - rather than something\n * drawn to look like one, and `@expo/ui` reaches them through `requireNativeView('ExpoUI', ...)`,\n * which is the same derivation `registerExpoView` already mirrors. So the whole surface is\n * available here for the price of a table of names.\n *\n * The element names are platform-neutral where both platforms have the control, because an app\n * should write `<ui-slider>` once. Where only one platform has it - a `Gauge` is SwiftUI's, a\n * `SearchBar` is Compose's - the element exists only there, and registering for the wrong platform\n * would be an element that commits as nothing.\n *\n * ```ts\n * registerExpoUiViews(Platform.OS);\n * ```\n * ```html\n * <ui-host style=\"height: 44\">\n * <ui-slider [value]=\"volume()\" (valueChanged)=\"volume.set($event.value)\" />\n * </ui-host>\n * ```\n *\n * **A `<ui-host>` is required around any of these.** SwiftUI and Compose lay out their own\n * subtrees, and the host view is what bridges Yoga's layout to theirs; without one the control has\n * no size and does not appear - which looks exactly like a module that failed to install.\n *\n * Names, not components. There are ninety-odd of these, each with its own props and its own\n * modifier system, and a component per view prop-for-prop would be a second place for every one of\n * them to be wrong. The module's own documentation describes the props; this makes them reachable.\n */\nimport type { PlatformOSType } from 'react-native';\nimport { registerExpoView } from './register-expo-view.ts';\n\n/** Element name -> the `ExpoUI` view on iOS and on Android. Null where the platform has no such. */\nexport const EXPO_UI_VIEWS: Readonly<Record<string, readonly [string | null, string | null]>> = {\n 'accessory-widget-background': ['AccessoryWidgetBackgroundView', null],\n alert: ['AlertView', 'AlertDialogView'],\n 'animated-visibility': [null, 'AnimatedVisibilityView'],\n 'assist-chip': [null, 'AssistChipView'],\n background: ['BackgroundView', null],\n badge: [null, 'BadgeView'],\n 'badged-box': [null, 'BadgedBoxView'],\n 'basic-alert-dialog': [null, 'BasicAlertDialogView'],\n 'bottom-sheet': ['BottomSheetView', 'ModalBottomSheetView'],\n button: ['Button', 'Button'],\n capsule: ['CapsuleView', null],\n chart: ['ChartView', null],\n checkbox: [null, 'CheckboxView'],\n circle: ['CircleView', null],\n 'color-picker': ['ColorPickerView', null],\n 'confirmation-dialog': ['ConfirmationDialogView', null],\n 'content-unavailable': ['ContentUnavailableView', null],\n 'context-menu': ['ContextMenu', null],\n 'control-group': ['ControlGroupView', null],\n 'date-picker': ['DatePickerView', 'DateTimePickerView'],\n 'date-picker-dialog': [null, 'DatePickerDialogView'],\n 'disclosure-group': ['DisclosureGroupView', null],\n divider: ['DividerView', 'HorizontalDividerView'],\n 'docked-search-bar': [null, 'DockedSearchBarView'],\n ellipse: ['EllipseView', null],\n 'exposed-dropdown-menu-box': [null, 'ExposedDropdownMenuBoxView'],\n 'filter-chip': [null, 'FilterChipView'],\n 'floating-action-button': [null, 'FloatingActionButtonView'],\n 'flow-row': [null, 'FlowRowView'],\n form: ['FormView', null],\n gauge: ['GaugeView', null],\n 'glass-effect-container': ['GlassEffectContainerView', null],\n grid: ['GridView', null],\n 'grid-row': ['GridRowView', null],\n group: ['GroupView', null],\n 'horizontal-floating-toolbar': [null, 'HorizontalFloatingToolbarView'],\n host: ['HostView', 'HostView'],\n hstack: ['HStackView', 'RowView'],\n icon: [null, 'IconView'],\n image: ['ImageView', 'ImageView'],\n 'input-chip': [null, 'InputChipView'],\n label: ['LabelView', null],\n list: ['ListView', null],\n 'labeled-content': ['LabeledContentView', null],\n 'lazy-hstack': ['LazyHStackView', 'LazyRowView'],\n 'lazy-vstack': ['LazyVStackView', 'LazyColumnView'],\n link: ['LinkView', null],\n 'list-item': [null, 'ListItemView'],\n mask: ['MaskView', null],\n menu: ['MenuView', 'DropdownMenuView'],\n 'multi-choice-segmented-button-row': [null, 'MultiChoiceSegmentedButtonRowView'],\n 'navigation-bar': [null, 'NavigationBarView'],\n 'navigation-bar-item': [null, 'NavigationBarItemView'],\n overlay: ['OverlayView', null],\n pager: [null, 'HorizontalPagerView'],\n picker: ['PickerView', null],\n 'plain-tooltip': [null, 'PlainTooltipView'],\n popover: ['PopoverView', null],\n progress: ['ProgressView', 'LinearProgressIndicatorView'],\n 'pull-to-refresh-box': [null, 'PullToRefreshBoxView'],\n 'radio-button': [null, 'RadioButtonView'],\n rectangle: ['RectangleView', null],\n 'rich-tooltip': [null, 'RichTooltipView'],\n 'rounded-rectangle': ['RoundedRectangleView', null],\n 'scroll-view-component': ['ScrollViewComponent', null],\n 'search-bar': [null, 'SearchBarView'],\n section: ['SectionView', null],\n 'secure-field': ['SecureFieldView', null],\n 'segmented-button': [null, 'SegmentedButtonView'],\n shape: [null, 'ShapeView'],\n 'share-link': ['ShareLinkView', null],\n 'single-choice-segmented-button-row': [null, 'SingleChoiceSegmentedButtonRowView'],\n slider: ['SliderView', 'SliderView'],\n /**\n * Both platforms, though it looks Android-only at a glance.\n *\n * SwiftUI's `SlotView` lives in a top-level `SlotView.tsx` rather than in a directory of its\n * own, which is how it was missed. Twenty SwiftUI components put their children through one:\n * a picker's options, a section's rows, a labelled content's value. Without it those children\n * mount into a plain `UIView` and SwiftUI refuses them, which is a red screen on iOS and an\n * empty control everywhere else.\n */\n slot: ['SlotView', 'SlotView'],\n snackbar: [null, 'SnackbarView'],\n 'snackbar-host': [null, 'SnackbarHostView'],\n spacer: ['SpacerView', 'SpacerView'],\n stepper: ['StepperView', null],\n 'suggestion-chip': [null, 'SuggestionChipView'],\n surface: [null, 'SurfaceView'],\n 'swipe-actions': ['SwipeActionsView', null],\n 'sync-toggle': ['SyncToggleView', 'SyncSwitchView'],\n tab: ['TabView', null],\n text: ['TextView', 'TextView'],\n 'text-field': ['TextFieldView', null],\n 'time-picker-dialog': [null, 'TimePickerDialogView'],\n toggle: ['ToggleView', 'SwitchView'],\n 'tooltip-box': [null, 'TooltipBoxView'],\n 'tri-state-checkbox': [null, 'TriStateCheckboxView'],\n 'uneven-rounded-rectangle': ['UnevenRoundedRectangleView', null],\n 'vertical-slider': [null, 'VerticalSliderView'],\n /**\n * The other way round from `host`: views of the app's own inside SwiftUI or Compose content,\n * as a context menu's trigger or a sheet's body. `@expo/ui` calls it `RNHostView`.\n */\n 'view-host': ['RNHostView', 'RNHostView'],\n vstack: ['VStackView', 'ColumnView'],\n zstack: ['ZStackView', 'BoxView'],\n};\n\n/**\n * Register every `@expo/ui` view the platform has.\n *\n * All of them at once, unlike the other registrations here, because they are all one module: an\n * app that has `@expo/ui` installed has all of these, and an app that does not has none of them.\n *\n * Takes `Platform.OS` itself - `'ios' | 'android' | 'macos' | 'windows' | 'web'` - rather than the\n * two platforms `@expo/ui` actually ships for, so a canary app can pass it straight through\n * without narrowing. Anything other than iOS or Android registers nothing, the same \"not\n * installed\" outcome as never calling this at all.\n */\nexport function registerExpoUiViews(platform: PlatformOSType): void {\n if (platform !== 'ios' && platform !== 'android') return;\n const index = platform === 'ios' ? 0 : 1;\n for (const [element, views] of Object.entries(EXPO_UI_VIEWS)) {\n const viewName = views[index];\n if (!viewName) continue;\n // SwiftUI's and Compose's `Text` read their text from `text`, and take no child views.\n const textContent = element === 'text' ? 'text' : undefined;\n // `ui-` is a prefix a design system picks too: a component of the app's own keeps its host.\n registerExpoView(`ui-${element}`, 'ExpoUI', {\n viewName,\n textContent,\n yieldsToComponents: true,\n });\n }\n}\n"]}
|
package/dist/file-system.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export interface NativeFiles {
|
|
|
35
35
|
/** Survives, and is backed up. */
|
|
36
36
|
readonly documentDirectory: NativeDirectory;
|
|
37
37
|
file(directory: NativeDirectory, name: string): NativeFile;
|
|
38
|
+
/** The file at a uri, such as one a picker answers with. */
|
|
39
|
+
fileAt?(uri: string): NativeFile;
|
|
38
40
|
}
|
|
39
41
|
/**
|
|
40
42
|
* The two directories an app actually chooses between, plus the create-then-write dance that
|
|
@@ -51,6 +53,11 @@ export declare class FileSystem {
|
|
|
51
53
|
cache(name: string): NativeFile;
|
|
52
54
|
/** A file that survives, and is included in backups. */
|
|
53
55
|
document(name: string): NativeFile;
|
|
56
|
+
/**
|
|
57
|
+
* The file at a uri: a document the user picked, a photo from the library, a download. What a
|
|
58
|
+
* picker answers with is a uri, and this is the file to read from it.
|
|
59
|
+
*/
|
|
60
|
+
file(uri: string): NativeFile;
|
|
54
61
|
/**
|
|
55
62
|
* Write text, or bytes for anything that is not text, whether or not the file is there already.
|
|
56
63
|
* `write` alone throws on a file that has never been created, which is the first thing everyone
|
package/dist/file-system.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* name lands in and hands the file back.
|
|
7
7
|
*/
|
|
8
8
|
import { InjectionToken, Service, inject } from '@angular/core';
|
|
9
|
-
import { expoModule } from "./native.js";
|
|
9
|
+
import { expoModule, unavailable } from "./native.js";
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
/**
|
|
12
12
|
* The two directories an app actually chooses between, plus the create-then-write dance that
|
|
@@ -31,6 +31,7 @@ export class FileSystem {
|
|
|
31
31
|
return expo.Paths.document;
|
|
32
32
|
},
|
|
33
33
|
file: (directory, name) => new expo.File(directory, name),
|
|
34
|
+
fileAt: (uri) => new expo.File(uri),
|
|
34
35
|
};
|
|
35
36
|
},
|
|
36
37
|
});
|
|
@@ -45,6 +46,17 @@ export class FileSystem {
|
|
|
45
46
|
const native = this.installed();
|
|
46
47
|
return native.file(native.documentDirectory, name);
|
|
47
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* The file at a uri: a document the user picked, a photo from the library, a download. What a
|
|
51
|
+
* picker answers with is a uri, and this is the file to read from it.
|
|
52
|
+
*/
|
|
53
|
+
file(uri) {
|
|
54
|
+
const native = this.installed();
|
|
55
|
+
if (!native.fileAt) {
|
|
56
|
+
throw new Error('[angular-native] this FileSystem.SOURCE has no fileAt(uri), which file() opens a uri with.');
|
|
57
|
+
}
|
|
58
|
+
return native.fileAt(uri);
|
|
59
|
+
}
|
|
48
60
|
/**
|
|
49
61
|
* Write text, or bytes for anything that is not text, whether or not the file is there already.
|
|
50
62
|
* `write` alone throws on a file that has never been created, which is the first thing everyone
|
|
@@ -56,8 +68,9 @@ export class FileSystem {
|
|
|
56
68
|
file.write(content);
|
|
57
69
|
}
|
|
58
70
|
installed() {
|
|
59
|
-
if (!this.native)
|
|
60
|
-
throw
|
|
71
|
+
if (!this.native) {
|
|
72
|
+
throw unavailable('expo-file-system', 'Provide FileSystem.SOURCE with a stand-in.');
|
|
73
|
+
}
|
|
61
74
|
return this.native;
|
|
62
75
|
}
|
|
63
76
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: FileSystem, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
package/dist/file-system.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-system.js","sourceRoot":"","sources":["../src/file-system.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;;
|
|
1
|
+
{"version":3,"file":"file-system.js","sourceRoot":"","sources":["../src/file-system.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;;AAiCtD;;;;;;GAMG;AAEH,MAAM,OAAO,UAAU;IACrB,kEAAkE;IAClE,MAAM,CAAU,MAAM,GAAG,IAAI,cAAc,CACzC,iCAAiC,EACjC;QACE,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,IAAI,GAAG,UAAU,CACrB,kBAAkB,EAClB,GAAG,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAsC,CACvE,CAAC;YACF,IAAI,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC;YACvB,OA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AC,MAAM,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC;IAEO,SAAS;QACf,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,WAAW,CAAC,kBAAkB,EAAE,4CAA4C,CAAC,CAAC;QACtF,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;uGAtEU,UAAU;wGAAV,UAAU;;2FAAV,UAAU;kBADtB,OAAO","sourcesContent":["/**\n * `FileSystem`, bound to `expo-file-system`.\n *\n * Files located by what they are for rather than by path. `File` and `Paths` are Expo's own\n * classes over a native one, so they are used as published; this only decides which directory a\n * name lands in and hands the file back.\n */\nimport { InjectionToken, Service, inject } from '@angular/core';\nimport { expoModule, unavailable } from './native.ts';\n\n/**\n * A file. Structural on purpose: this is Expo's `File`, described in terms a test can satisfy, so\n * a fake needs no Expo. An app gets the real object back and may use the rest of its surface.\n */\nexport interface NativeFile {\n readonly uri: string;\n readonly exists: boolean;\n readonly size: number;\n create(options?: { overwrite?: boolean; intermediates?: boolean }): void;\n write(content: string | Uint8Array): void;\n text(): Promise<string>;\n textSync(): string;\n /** The contents as bytes: a PDF, an image, anything that is not text. */\n bytes(): Promise<Uint8Array>;\n delete(): void;\n}\n\n/** A directory, as far as this needs to know: something a file can be named inside. */\nexport type NativeDirectory = object;\n\n/** The slice of `expo-file-system` this needs. */\nexport interface NativeFiles {\n /** Cleared by the system under storage pressure. */\n readonly cacheDirectory: NativeDirectory;\n /** Survives, and is backed up. */\n readonly documentDirectory: NativeDirectory;\n file(directory: NativeDirectory, name: string): NativeFile;\n /** The file at a uri, such as one a picker answers with. */\n fileAt?(uri: string): NativeFile;\n}\n\n/**\n * The two directories an app actually chooses between, plus the create-then-write dance that\n * writing a file for the first time needs.\n *\n * ponytail: a locator, not a file API. Everything else - moving, listing, downloading, streaming\n * - is on the object this hands back, documented by Expo, and not worth restating here.\n */\n@Service()\nexport class FileSystem {\n /** Overridden in a test to write files that are not on a disk. */\n static readonly SOURCE = new InjectionToken<NativeFiles | null>(\n 'angular-native.fileSystemSource',\n {\n factory: () => {\n const expo = expoModule(\n 'expo-file-system',\n () => require('expo-file-system') as typeof import('expo-file-system'),\n );\n if (!expo) return null;\n return {\n // Both are getters on Expo's side, handing back a fresh Directory each time.\n get cacheDirectory() {\n return expo.Paths.cache;\n },\n get documentDirectory() {\n return expo.Paths.document;\n },\n file: (directory, name) =>\n new expo.File(directory as InstanceType<typeof expo.Directory>, name),\n fileAt: (uri) => new expo.File(uri),\n };\n },\n },\n );\n\n private readonly native = inject(FileSystem.SOURCE);\n\n /** A file the system may delete when the device runs low on storage. */\n cache(name: string): NativeFile {\n const native = this.installed();\n return native.file(native.cacheDirectory, name);\n }\n\n /** A file that survives, and is included in backups. */\n document(name: string): NativeFile {\n const native = this.installed();\n return native.file(native.documentDirectory, name);\n }\n\n /**\n * The file at a uri: a document the user picked, a photo from the library, a download. What a\n * picker answers with is a uri, and this is the file to read from it.\n */\n file(uri: string): NativeFile {\n const native = this.installed();\n if (!native.fileAt) {\n throw new Error(\n '[angular-native] this FileSystem.SOURCE has no fileAt(uri), which file() opens a uri with.',\n );\n }\n return native.fileAt(uri);\n }\n\n /**\n * Write text, or bytes for anything that is not text, whether or not the file is there already.\n * `write` alone throws on a file that has never been created, which is the first thing everyone\n * hits. It replaces what was there.\n */\n write(file: NativeFile, content: string | Uint8Array): void {\n if (!file.exists) file.create({ intermediates: true });\n file.write(content);\n }\n\n private installed(): NativeFiles {\n if (!this.native) {\n throw unavailable('expo-file-system', 'Provide FileSystem.SOURCE with a stand-in.');\n }\n return this.native;\n }\n}\n"]}
|
package/dist/fonts.d.ts
CHANGED
|
@@ -54,15 +54,6 @@ export declare function registrationsFor(faces: readonly FontFace[]): Record<str
|
|
|
54
54
|
export declare function expoFonts(): NativeFonts | null;
|
|
55
55
|
export declare class FontRegistry {
|
|
56
56
|
private readonly native;
|
|
57
|
-
/**
|
|
58
|
-
* Bumped whenever faces are registered.
|
|
59
|
-
*
|
|
60
|
-
* The platform's own list is a plain array that changes underneath us, so a template binding to
|
|
61
|
-
* it would render once and never again - and the one moment it changes is exactly the moment a
|
|
62
|
-
* screen waiting on a font wants to hear about. This makes both readers reactive without
|
|
63
|
-
* mirroring the list.
|
|
64
|
-
*/
|
|
65
|
-
private readonly generation;
|
|
66
57
|
constructor(native: NativeFonts | null);
|
|
67
58
|
/** Whether `expo-font` is installed at all. Without it a custom face simply never appears. */
|
|
68
59
|
get available(): boolean;
|
package/dist/fonts.js
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* here would be copying out its internals rather than using it.
|
|
22
22
|
*/
|
|
23
23
|
import { InjectionToken, computed, signal } from '@angular/core';
|
|
24
|
-
import { faceName, fontsRegistered } from '@ng-native/fabric';
|
|
24
|
+
import { faceName, fontsLoading, fontsRegistered, fontsSettled, onFontsRegistered, } from '@ng-native/fabric';
|
|
25
25
|
import { expoModule } from "./native.js";
|
|
26
26
|
/**
|
|
27
27
|
* Loading is by family name, which is also all native matches on.
|
|
@@ -58,18 +58,20 @@ export function expoFonts() {
|
|
|
58
58
|
getLoadedFonts: () => expo.getLoadedFonts(),
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Bumped whenever faces are registered, by any registry.
|
|
63
|
+
*
|
|
64
|
+
* The platform's own list is a plain array that changes underneath us, so a template binding to
|
|
65
|
+
* it would render once and never again - and the one moment it changes is exactly the moment a
|
|
66
|
+
* screen waiting on a font wants to hear about. This makes both readers reactive without
|
|
67
|
+
* mirroring the list. Shared by every registry, because `loadFonts()` registers through its own
|
|
68
|
+
* and a screen reads through the injected one.
|
|
69
|
+
*/
|
|
70
|
+
const generation = signal(0, /* @ts-ignore */
|
|
71
|
+
...(ngDevMode ? [{ debugName: "generation" }] : /* istanbul ignore next */ []));
|
|
72
|
+
onFontsRegistered(() => generation.update((n) => n + 1));
|
|
61
73
|
export class FontRegistry {
|
|
62
74
|
native;
|
|
63
|
-
/**
|
|
64
|
-
* Bumped whenever faces are registered.
|
|
65
|
-
*
|
|
66
|
-
* The platform's own list is a plain array that changes underneath us, so a template binding to
|
|
67
|
-
* it would render once and never again - and the one moment it changes is exactly the moment a
|
|
68
|
-
* screen waiting on a font wants to hear about. This makes both readers reactive without
|
|
69
|
-
* mirroring the list.
|
|
70
|
-
*/
|
|
71
|
-
generation = signal(0, /* @ts-ignore */
|
|
72
|
-
...(ngDevMode ? [{ debugName: "generation" }] : /* istanbul ignore next */ []));
|
|
73
75
|
constructor(native) {
|
|
74
76
|
this.native = native;
|
|
75
77
|
}
|
|
@@ -79,13 +81,13 @@ export class FontRegistry {
|
|
|
79
81
|
}
|
|
80
82
|
/** Every family the platform can currently find, custom or bundled. */
|
|
81
83
|
families = computed(() => {
|
|
82
|
-
|
|
84
|
+
generation();
|
|
83
85
|
return this.native?.getLoadedFonts() ?? [];
|
|
84
86
|
}, /* @ts-ignore */
|
|
85
87
|
...(ngDevMode ? [{ debugName: "families" }] : /* istanbul ignore next */ []));
|
|
86
88
|
/** Whether a family is registered. Reactive: re-read after a `load` that adds one. */
|
|
87
89
|
has(family) {
|
|
88
|
-
|
|
90
|
+
generation();
|
|
89
91
|
return this.native?.isLoaded(family) ?? false;
|
|
90
92
|
}
|
|
91
93
|
/**
|
|
@@ -106,15 +108,18 @@ export class FontRegistry {
|
|
|
106
108
|
const native = this.native;
|
|
107
109
|
if (!native)
|
|
108
110
|
return;
|
|
111
|
+
// Before the first await, so text the app lays out meanwhile waits for the face by name.
|
|
112
|
+
const families = Object.keys(map);
|
|
113
|
+
fontsLoading(families);
|
|
109
114
|
try {
|
|
110
115
|
await native.loadAsync(map);
|
|
111
116
|
}
|
|
112
117
|
finally {
|
|
118
|
+
fontsSettled(families);
|
|
113
119
|
// Text already laid out in the fallback face keeps it until it is laid out again. Only the
|
|
114
120
|
// faces that registered: one failing fails the whole load, not the others in it.
|
|
115
121
|
fontsRegistered(Object.keys(map).filter((family) => native.isLoaded(family)));
|
|
116
122
|
}
|
|
117
|
-
this.generation.update((n) => n + 1);
|
|
118
123
|
}
|
|
119
124
|
}
|
|
120
125
|
/** Injected where an app wants to ask what is loaded. */
|