@ng-native/device 0.29.0 → 0.30.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/README.md +2 -2
- package/dist/accessibility.js +3 -3
- package/dist/app-lifecycle.js +3 -3
- package/dist/app-state.js +3 -3
- package/dist/app-windows.d.ts +9 -0
- package/dist/app-windows.js +3 -3
- package/dist/app-windows.js.map +1 -1
- package/dist/color-scheme.js +3 -3
- package/dist/deep-links.js +3 -3
- package/dist/dev-menu.js +3 -3
- package/dist/dialogs.js +3 -3
- package/dist/direction.js +3 -3
- package/dist/dock.js +3 -3
- package/dist/drag-and-drop.js +3 -3
- package/dist/hardware-back.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/keyboard-focus.d.ts +13 -0
- package/dist/keyboard-focus.js +22 -0
- package/dist/keyboard-focus.js.map +1 -0
- package/dist/keyboard.js +3 -3
- package/dist/layout-animation.js +3 -3
- package/dist/menus.d.ts +15 -2
- package/dist/menus.js +20 -7
- package/dist/menus.js.map +1 -1
- package/dist/navigation-bar.js +3 -3
- package/dist/os-support.js +3 -0
- package/dist/os-support.js.map +1 -1
- package/dist/processes.js +3 -3
- package/dist/safe-area.js +3 -3
- package/dist/screen.js +3 -3
- package/dist/sharing.js +3 -3
- package/dist/shell.js +3 -3
- package/dist/spawn-rules.d.ts +10 -4
- package/dist/spawn-rules.js +32 -16
- package/dist/spawn-rules.js.map +1 -1
- package/dist/status-bar.js +3 -3
- package/dist/tray.js +3 -3
- package/dist/undo-stack.js +3 -3
- package/dist/vibration.js +3 -3
- package/package.json +5 -5
package/dist/layout-animation.js
CHANGED
|
@@ -119,10 +119,10 @@ export class LayoutAnimation {
|
|
|
119
119
|
return false;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
123
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.
|
|
122
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: LayoutAnimation, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
123
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.3.0", ngImport: i0, type: LayoutAnimation });
|
|
124
124
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: LayoutAnimation, decorators: [{
|
|
126
126
|
type: Service
|
|
127
127
|
}] });
|
|
128
128
|
/**
|
package/dist/menus.d.ts
CHANGED
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
* - On iOS it is a TurboModule with `setContextMenu(nativeID, entries)` too, for the same reason.
|
|
19
19
|
* React Native's iOS view sends no event it does not know either, so the module sends the item
|
|
20
20
|
* chosen as `{ type: 'contextMenuSelect', nativeID, id }`. Its `setPressMenu(nativeID, entries)`
|
|
21
|
-
*
|
|
22
|
-
* `{ type: 'pressMenuSelect', nativeID, id }
|
|
21
|
+
* keeps a menu a press opens for that view, and sends the item chosen as
|
|
22
|
+
* `{ type: 'pressMenuSelect', nativeID, id }`. From iOS 17.4, where its `opensPressMenus`
|
|
23
|
+
* constant is true, `openPressMenu(nativeID)` opens it from code too.
|
|
23
24
|
* - Where it draws menus on a press, `popUpMenu(view, entries)` draws one under the view with that
|
|
24
25
|
* tag now, and sends the item chosen as the view's `topContextMenuSelect`, as a context menu's
|
|
25
26
|
* (the desktop host, and Android).
|
|
@@ -149,6 +150,11 @@ export interface NativeMenus {
|
|
|
149
150
|
* one on a touch but has no way to open one from code.
|
|
150
151
|
*/
|
|
151
152
|
setPressMenu?(nativeID: string, entries: readonly NativeMenuEntry[] | null): void;
|
|
153
|
+
/**
|
|
154
|
+
* Open the menu `setPressMenu` gave the view with `nativeID`, now, for a press its own touch did
|
|
155
|
+
* not open it on. iOS 17.4 and later.
|
|
156
|
+
*/
|
|
157
|
+
openPressMenu?(nativeID: string): void;
|
|
152
158
|
subscribe(listener: (event: NativeMenuEvent) => void): () => void;
|
|
153
159
|
}
|
|
154
160
|
/**
|
|
@@ -211,6 +217,13 @@ export declare class Menus {
|
|
|
211
217
|
* opens it on a touch itself: iOS.
|
|
212
218
|
*/
|
|
213
219
|
readonly pressMenuByNativeId: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Whether the host opens a press menu by `nativeID` from code (`openPressMenu`): iOS 17.4 and
|
|
222
|
+
* later.
|
|
223
|
+
*/
|
|
224
|
+
readonly opensPressMenus: boolean;
|
|
225
|
+
/** Open the menu `setPressMenu` gave the view with `nativeID`, now. */
|
|
226
|
+
openPressMenu(nativeID: string): void;
|
|
214
227
|
/** What choosing an item does, by the `nativeID` of the view whose press menu it is in. */
|
|
215
228
|
private readonly pressMenuChoices;
|
|
216
229
|
/**
|
package/dist/menus.js
CHANGED
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
* - On iOS it is a TurboModule with `setContextMenu(nativeID, entries)` too, for the same reason.
|
|
19
19
|
* React Native's iOS view sends no event it does not know either, so the module sends the item
|
|
20
20
|
* chosen as `{ type: 'contextMenuSelect', nativeID, id }`. Its `setPressMenu(nativeID, entries)`
|
|
21
|
-
*
|
|
22
|
-
* `{ type: 'pressMenuSelect', nativeID, id }
|
|
21
|
+
* keeps a menu a press opens for that view, and sends the item chosen as
|
|
22
|
+
* `{ type: 'pressMenuSelect', nativeID, id }`. From iOS 17.4, where its `opensPressMenus`
|
|
23
|
+
* constant is true, `openPressMenu(nativeID)` opens it from code too.
|
|
23
24
|
* - Where it draws menus on a press, `popUpMenu(view, entries)` draws one under the view with that
|
|
24
25
|
* tag now, and sends the item chosen as the view's `topContextMenuSelect`, as a context menu's
|
|
25
26
|
* (the desktop host, and Android).
|
|
@@ -129,7 +130,7 @@ export function menusSource() {
|
|
|
129
130
|
setMenuBar: (groups) => module.setMenuBar?.(groups),
|
|
130
131
|
setShortcuts: (shortcuts) => module.setShortcuts?.(shortcuts),
|
|
131
132
|
setHistory: (surface, history) => module.setHistory?.(surface, history),
|
|
132
|
-
...contextMenuMethods(module),
|
|
133
|
+
...contextMenuMethods(module, constants.opensPressMenus === true),
|
|
133
134
|
subscribe: (listener) => {
|
|
134
135
|
const subscription = listen((event) => listener(event));
|
|
135
136
|
return () => subscription?.remove();
|
|
@@ -139,17 +140,20 @@ export function menusSource() {
|
|
|
139
140
|
/**
|
|
140
141
|
* The menu methods a module may lack, bound, and none it lacks: a host without the context menu
|
|
141
142
|
* ones reads props, and one without `popUpMenu` or `setPressMenu` leaves a press to `(press)`.
|
|
143
|
+
* `openPressMenu` only where the module says it opens one (`opens`): iOS 17.4 and later.
|
|
142
144
|
*/
|
|
143
|
-
function contextMenuMethods(module) {
|
|
145
|
+
function contextMenuMethods(module, opens) {
|
|
144
146
|
const setContextMenu = module.setContextMenu?.bind(module);
|
|
145
147
|
const setTakesLongPress = module.setTakesLongPress?.bind(module);
|
|
146
148
|
const popUpMenu = module.popUpMenu?.bind(module);
|
|
147
149
|
const setPressMenu = module.setPressMenu?.bind(module);
|
|
150
|
+
const openPressMenu = opens ? module.openPressMenu?.bind(module) : undefined;
|
|
148
151
|
return {
|
|
149
152
|
...(setContextMenu && { setContextMenu }),
|
|
150
153
|
...(setTakesLongPress && { setTakesLongPress }),
|
|
151
154
|
...(popUpMenu && { popUpMenu }),
|
|
152
155
|
...(setPressMenu && { setPressMenu }),
|
|
156
|
+
...(openPressMenu && { openPressMenu }),
|
|
153
157
|
};
|
|
154
158
|
}
|
|
155
159
|
/**
|
|
@@ -227,6 +231,15 @@ export class Menus {
|
|
|
227
231
|
* opens it on a touch itself: iOS.
|
|
228
232
|
*/
|
|
229
233
|
pressMenuByNativeId = this.native?.setPressMenu !== undefined;
|
|
234
|
+
/**
|
|
235
|
+
* Whether the host opens a press menu by `nativeID` from code (`openPressMenu`): iOS 17.4 and
|
|
236
|
+
* later.
|
|
237
|
+
*/
|
|
238
|
+
opensPressMenus = this.native?.openPressMenu !== undefined;
|
|
239
|
+
/** Open the menu `setPressMenu` gave the view with `nativeID`, now. */
|
|
240
|
+
openPressMenu(nativeID) {
|
|
241
|
+
this.native?.openPressMenu?.(nativeID);
|
|
242
|
+
}
|
|
230
243
|
/** What choosing an item does, by the `nativeID` of the view whose press menu it is in. */
|
|
231
244
|
pressMenuChoices = new Map();
|
|
232
245
|
/**
|
|
@@ -419,10 +432,10 @@ export class Menus {
|
|
|
419
432
|
ngOnDestroy() {
|
|
420
433
|
this.unsubscribe?.();
|
|
421
434
|
}
|
|
422
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
423
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.
|
|
435
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Menus, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
436
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.3.0", ngImport: i0, type: Menus });
|
|
424
437
|
}
|
|
425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
438
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Menus, decorators: [{
|
|
426
439
|
type: Service
|
|
427
440
|
}], ctorParameters: () => [] });
|
|
428
441
|
//# sourceMappingURL=menus.js.map
|
package/dist/menus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menus.js","sourceRoot":"","sources":["../src/menus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EACL,cAAc,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MA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,CAAC;YACvC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACxD,OAAO;QACT,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;YACrC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACtD,OAAO;QACT,CAAC;QACD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAClD,oFAAoF;QACpF,IAAI,KAAK,CAAC,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAAE,OAAO;QAC5D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC5B,CAAC;IAED,WAAW;QACT,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;IACvB,CAAC;uGAtSU,KAAK;wGAAL,KAAK;;2FAAL,KAAK;kBADjB,OAAO","sourcesContent":["/**\n * Menus and keyboard shortcuts as the host receives them: the menu bar, the shortcuts that are in\n * no menu, and the form a menu takes on its way to native, which a context menu shares.\n *\n * The host contract, on the `NgNativeMenus` module:\n * - `setMenuBar(groups)`: the whole merged menu bar, each time it changes. The desktop host draws\n * it as the main menu, iPadOS through UIMenuBuilder. Each item has an `id`; an item with a\n * `menuRole` and no `id`'s action is the OS's own (Copy, Quit).\n * - `setShortcuts(shortcuts)`: every shortcut the app listens for outside the menu bar, each with\n * its `id`, its chord read for the OS, and a `label` and `group` for Android's Keyboard Shortcuts\n * helper. On iPhone and Android the menu bar's own shortcuts are in it too, since no bar is drawn.\n * - It sends `ngNativeMenus` events on `DeviceEventEmitter`: `{ type: 'menuSelect', id }` for a menu\n * bar item, and `{ type: 'shortcut', id, textInputFocused }` for a chord pressed.\n * - Its constants say whether it draws a menu bar (`menuBar`) and the app's name (`appName`).\n * - On Android it is an Expo module: the constants are properties, it sends the same events through\n * its own `addListener('ngNativeMenus', ...)`, and it has `setContextMenu(nativeID, entries)`,\n * since React Native's Android view drops a `contextMenu` prop it does not know.\n * - On iOS it is a TurboModule with `setContextMenu(nativeID, entries)` too, for the same reason.\n * React Native's iOS view sends no event it does not know either, so the module sends the item\n * chosen as `{ type: 'contextMenuSelect', nativeID, id }`. Its `setPressMenu(nativeID, entries)`\n * lays a menu a press opens over that view, and sends the item chosen as\n * `{ type: 'pressMenuSelect', nativeID, id }`: UIKit opens a menu on a touch, but not from code.\n * - Where it draws menus on a press, `popUpMenu(view, entries)` draws one under the view with that\n * tag now, and sends the item chosen as the view's `topContextMenuSelect`, as a context menu's\n * (the desktop host, and Android).\n * - Where it draws context menus, `setTakesLongPress(nativeID, takes)` names a view inside one\n * whose own `(longPress)` takes a long press first: a long press there opens no menu around it,\n * as the innermost handler wins in a native app. A right-click still opens the menu on Android.\n * iOS tells a long press from a secondary click only by the gesture, so an iPad pointer's\n * secondary click there opens none either.\n */\nimport {\n InjectionToken,\n Service,\n computed,\n effect,\n inject,\n signal,\n type Signal,\n} from '@angular/core';\nimport {\n defaultMenuBar,\n isSeparator,\n mergeMenuBar,\n unmergedGroups,\n type MenuEntry,\n type MenuGroupModel,\n} from './menu-model.ts';\nimport { injectOs } from './os.ts';\nimport { reactNative } from './react-native.ts';\nimport {\n isEditingShortcut,\n matchesShortcut,\n navigationShortcut,\n parseShortcut,\n type ParsedShortcut,\n type ShortcutOs,\n} from './shortcut.ts';\n\n/** A menu entry as the host receives it. */\nexport type NativeMenuEntry =\n | { readonly separator: true }\n | {\n readonly id: string;\n readonly label: string;\n readonly menuRole?: string;\n /** On an item with a `menuRole`: the app handles it, and the OS does not. */\n readonly handled?: true;\n readonly shortcut?: ParsedShortcut;\n readonly disabled?: boolean;\n readonly checked?: boolean;\n readonly destructive?: boolean;\n readonly subtitle?: string;\n readonly sfSymbol?: string;\n readonly icon?: string;\n readonly svgIcon?: string;\n readonly inline?: boolean;\n readonly items?: readonly NativeMenuEntry[];\n };\n\n/** A menu ready for the host, and what each id it was given does. */\nexport interface SerializedMenu {\n readonly entries: NativeMenuEntry[];\n readonly actions: ReadonlyMap<string, () => void>;\n}\n\nconst actionIds = new WeakMap<() => void, string>();\nlet actionsNamed = 0;\n\n/**\n * The id a menu item with `select` is sent under: the same for as long as the handler is, and no\n * other handler's. `<menu-item>` keeps one handler for its life, so a host that reports a choice\n * from a menu it drew before the items changed still runs that item, or nothing once it has gone,\n * never the item that has taken its place.\n */\nexport function menuActionId(select: () => void): string {\n let id = actionIds.get(select);\n if (id === undefined) actionIds.set(select, (id = `a${++actionsNamed}`));\n return id;\n}\n\n/**\n * `entries` as the host takes them: an id for each item, its shortcut read for `os`, and the\n * handlers by id. An item with a handler is named by it (`menuActionId`); one without, which the\n * app never runs, by its place (`2.0.1`).\n */\nexport function serializeMenu(\n entries: readonly MenuEntry[],\n os: ShortcutOs,\n prefix = '',\n): SerializedMenu {\n const actions = new Map<string, () => void>();\n const walk = (list: readonly MenuEntry[], at: string): NativeMenuEntry[] =>\n list.map((entry, index) => {\n if (isSeparator(entry)) return { separator: true };\n const place = `${at}${index}`;\n const { select, shortcut, items, group: _group, ...rest } = entry;\n const id = select ? menuActionId(select) : place;\n if (select) actions.set(id, select);\n return {\n id,\n ...rest,\n // A role item the app handles: the host sends its select rather than doing the role.\n ...(select && entry.menuRole && { handled: true }),\n ...(shortcut\n ? { shortcut: parseShortcut(shortcut, os) }\n : (entry.menuRole === 'back' || entry.menuRole === 'forward') && {\n shortcut: navigationShortcut(entry.menuRole, os),\n }),\n ...(items && { items: walk(items, `${place}.`) }),\n };\n });\n return { entries: walk(entries, prefix), actions };\n}\n\n/** Whether an enabled app menu item, including one in a submenu, takes this chord. */\nfunction hasMacMenuAction(entries: readonly MenuEntry[], chord: ParsedShortcut): boolean {\n return entries.some((entry) => {\n if (isSeparator(entry) || entry.disabled) return false;\n if (entry.items) return hasMacMenuAction(entry.items, chord);\n return Boolean(\n entry.select && entry.shortcut && matchesShortcut(entry.shortcut, chord, 'macos'),\n );\n });\n}\n\n/** Keep the built-in navigation commands clickable when an app item takes their keys. */\nfunction releaseMacNavigationKeys(\n entries: NativeMenuEntry[],\n groups: readonly MenuGroupModel[],\n): NativeMenuEntry[] {\n return entries.map((entry) => {\n if ('separator' in entry || entry.handled) return entry;\n if (entry.menuRole !== 'back' && entry.menuRole !== 'forward') return entry;\n const { shortcut, ...item } = entry;\n return shortcut && groups.some((group) => hasMacMenuAction(group.items, shortcut))\n ? item\n : entry;\n });\n}\n\n/** A shortcut as the host receives it. */\nexport interface NativeShortcut {\n readonly id: string;\n readonly chord: ParsedShortcut;\n /** What Android's Keyboard Shortcuts helper lists it as. */\n readonly label: string;\n /** The heading it is listed under there: its menu's label, or the app's name. */\n readonly group: string;\n}\n\nexport type NativeMenuEvent =\n | { readonly type: 'menuSelect'; readonly id: string }\n | { readonly type: 'shortcut'; readonly id: string; readonly textInputFocused?: boolean }\n /** An item chosen in the context menu of the view with `nativeID` (iOS). */\n | { readonly type: 'contextMenuSelect'; readonly nativeID: string; readonly id: string }\n /** An item chosen in the press menu of the view with `nativeID` (iOS). */\n | { readonly type: 'pressMenuSelect'; readonly nativeID: string; readonly id: string }\n /**\n * Back or forward, from whichever input the OS has for it: View > Back and Forward and their\n * keys, a two-finger swipe, mouse buttons 4 and 5, the toolbar's chevrons and their history\n * menus. `surface` is the window it was in, and `steps` how many entries (one where absent).\n */\n | {\n readonly type: 'navigate';\n readonly direction: 'back' | 'forward';\n readonly surface?: number;\n readonly steps?: number;\n };\n\n/** A window's history as the host draws it: the titles behind and ahead, nearest first. */\nexport interface NativeWindowHistory {\n readonly back: readonly string[];\n readonly forward: readonly string[];\n}\n\n/** The host's menu module. */\nexport interface NativeMenus {\n /** Whether the host draws a menu bar: macOS, and iPadOS. */\n readonly menuBar: boolean;\n readonly appName: string;\n setMenuBar(\n groups: readonly { label: string; menuRole?: string; items: NativeMenuEntry[] }[],\n ): void;\n setShortcuts(shortcuts: readonly NativeShortcut[]): void;\n /** The history of the window on `surface`, for its back and forward chevrons. Desktop only. */\n setHistory?(surface: number, history: NativeWindowHistory): void;\n /**\n * The context menu of the view with `nativeID`, or null to take it away. Android and iOS, whose\n * views read no `contextMenu` prop: the host finds the view by its `nativeID`.\n */\n setContextMenu?(nativeID: string, entries: readonly NativeMenuEntry[] | null): void;\n /**\n * Whether the view with `nativeID` takes a long press itself, so a context menu around it does\n * not open on one there. Android and iOS, beside `setContextMenu`.\n */\n setTakesLongPress?(nativeID: string, takes: boolean): void;\n /**\n * Draw `entries` under the view with tag `view` now, and send the item chosen as its\n * `topContextMenuSelect`. The desktop host, and Android.\n */\n popUpMenu?(view: number, entries: readonly NativeMenuEntry[]): void;\n /**\n * The menu a press opens on the view with `nativeID`, or null to take it away. iOS, which opens\n * one on a touch but has no way to open one from code.\n */\n setPressMenu?(nativeID: string, entries: readonly NativeMenuEntry[] | null): void;\n subscribe(listener: (event: NativeMenuEvent) => void): () => void;\n}\n\ninterface MenusModule {\n getConstants?(): { menuBar?: boolean; appName?: string };\n /** An Expo module's constants, which are its properties. */\n readonly menuBar?: boolean;\n readonly appName?: string;\n setMenuBar?(groups: unknown): void;\n setShortcuts?(shortcuts: unknown): void;\n setHistory?(surface: number, history: unknown): void;\n setContextMenu?(nativeID: string, entries: unknown): void;\n setTakesLongPress?(nativeID: string, takes: boolean): void;\n popUpMenu?(view: number, entries: unknown): void;\n setPressMenu?(nativeID: string, entries: unknown): void;\n /** An Expo module's own events. */\n addListener?(event: string, listener: (event: unknown) => void): { remove(): void };\n}\n\n/** Android's `NgNativeMenus`, an Expo module, where React Native has no TurboModule of the name. */\nfunction expoMenusModule(): MenusModule | undefined {\n const modules = (globalThis as { expo?: { modules?: Record<string, unknown> } }).expo?.modules;\n return modules?.['NgNativeMenus'] as MenusModule | undefined;\n}\n\n/**\n * The host's menu module: a TurboModule (the desktop host, iOS), or else Android's Expo module.\n * Null where there is neither, as in Expo Go.\n */\nexport function menusSource(): NativeMenus | null {\n const native = reactNative();\n const turbo = native?.TurboModuleRegistry?.get?.('NgNativeMenus') as\n MenusModule | null | undefined;\n const expo = turbo ? undefined : expoMenusModule();\n const module = turbo ?? expo;\n if (!module) return null;\n const constants = module.getConstants?.() ?? module;\n // An Expo module sends its events itself; a TurboModule's come through DeviceEventEmitter.\n const listen = (hear: (event: unknown) => void) =>\n expo\n ? expo.addListener?.('ngNativeMenus', hear)\n : native?.DeviceEventEmitter?.addListener('ngNativeMenus', hear);\n return {\n menuBar: constants.menuBar === true,\n appName: constants.appName ?? '',\n setMenuBar: (groups) => module.setMenuBar?.(groups),\n setShortcuts: (shortcuts) => module.setShortcuts?.(shortcuts),\n setHistory: (surface, history) => module.setHistory?.(surface, history),\n ...contextMenuMethods(module),\n subscribe: (listener) => {\n const subscription = listen((event) => listener(event as NativeMenuEvent));\n return () => subscription?.remove();\n },\n };\n}\n\n/**\n * The menu methods a module may lack, bound, and none it lacks: a host without the context menu\n * ones reads props, and one without `popUpMenu` or `setPressMenu` leaves a press to `(press)`.\n */\nfunction contextMenuMethods(\n module: MenusModule,\n): Pick<NativeMenus, 'setContextMenu' | 'setTakesLongPress' | 'popUpMenu' | 'setPressMenu'> {\n const setContextMenu = module.setContextMenu?.bind(module);\n const setTakesLongPress = module.setTakesLongPress?.bind(module);\n const popUpMenu = module.popUpMenu?.bind(module);\n const setPressMenu = module.setPressMenu?.bind(module);\n return {\n ...(setContextMenu && { setContextMenu }),\n ...(setTakesLongPress && { setTakesLongPress }),\n ...(popUpMenu && { popUpMenu }),\n ...(setPressMenu && { setPressMenu }),\n };\n}\n\n/** A `[shortcut]` registered with `KeyboardShortcuts`. */\ninterface Registered {\n readonly shortcut: Signal<string>;\n readonly label: Signal<string>;\n readonly press: () => void;\n}\n\n/**\n * The menus and shortcuts an app has, sent to the host as they change. `<menu-bar>` and\n * `[shortcut]` in `@ng-native/components` register here; an app rarely injects it.\n */\n@Service()\nexport class Menus {\n /** Overridden in a test with a fake host. */\n static readonly SOURCE = new InjectionToken<NativeMenus | null>('angular-native.menusSource', {\n factory: menusSource,\n });\n\n private readonly native = inject(Menus.SOURCE);\n private readonly os: ShortcutOs = injectOs();\n\n /** Whether the host has the module: shortcuts from a hardware keyboard, and menus. */\n readonly available: Signal<boolean> = signal(this.native !== null).asReadonly();\n\n /** Whether the menu bar is drawn: macOS and iPadOS. Elsewhere its shortcuts still work. */\n readonly menuBarShown: Signal<boolean> = signal(this.native?.menuBar === true).asReadonly();\n\n /**\n * Whether the host takes a `[contextMenu]` by the view's `nativeID` through `setContextMenu`\n * (Android and iOS) rather than as the view's `contextMenu` prop. Where it does, it draws the\n * menu on a long press.\n */\n readonly contextMenuByNativeId: boolean = this.native?.setContextMenu !== undefined;\n\n /**\n * Whether the host, which draws context menus on a long press, can be told which views inside\n * one take a long press themselves (`setTakesLongPress`).\n */\n readonly longPressByNativeId: boolean =\n this.contextMenuByNativeId && this.native?.setTakesLongPress !== undefined;\n\n /**\n * Say whether the view with `nativeID` takes a long press itself: one there then opens no\n * context menu around it.\n */\n setTakesLongPress(nativeID: string, takes: boolean): void {\n if (takes) this.longPressTakers.add(nativeID);\n else this.longPressTakers.delete(nativeID);\n this.native?.setTakesLongPress?.(nativeID, takes);\n }\n\n /** The `nativeID`s sent with a context menu, and with a long press of their own. */\n private readonly withContextMenu = new Set<string>();\n private readonly longPressTakers = new Set<string>();\n\n /**\n * Whether the host opens a context menu on a long press of the view whose `nativeID`s, from it\n * outwards, are `chain`: as it decides, the nearest view with a menu, unless one on the way takes\n * the long press itself. A `(longPress)` around that view leaves the hold to the menu, which the\n * host opens after its own long-press timeout.\n */\n opensContextMenu(chain: Iterable<string | null>): boolean {\n for (const nativeID of chain) {\n if (nativeID === null) continue;\n if (this.withContextMenu.has(nativeID)) return true;\n if (this.longPressTakers.has(nativeID)) return false;\n }\n return false;\n }\n\n /**\n * Whether the host draws a menu under a view on a press (`popUpMenu`): the desktop host, and\n * Android.\n */\n readonly popsUpMenus: boolean = this.native?.popUpMenu !== undefined;\n\n /**\n * Draw `entries` under the view with tag `view` now. The host sends the item chosen as the\n * view's `topContextMenuSelect`. It draws nothing for a view it is not showing, and does not say\n * so.\n */\n popUpMenu(view: number, entries: readonly NativeMenuEntry[]): void {\n this.native?.popUpMenu?.(view, entries);\n }\n\n /**\n * Whether the host takes a menu a press opens by the view's `nativeID` (`setPressMenu`), and\n * opens it on a touch itself: iOS.\n */\n readonly pressMenuByNativeId: boolean = this.native?.setPressMenu !== undefined;\n\n /** What choosing an item does, by the `nativeID` of the view whose press menu it is in. */\n private readonly pressMenuChoices = new Map<string, (id: string) => void>();\n\n /**\n * Send the menu a press opens on the view with `nativeID`, or null to take it away. `choose`\n * runs with the item's `id` as the host sends the choice.\n */\n setPressMenu(\n nativeID: string,\n entries: readonly NativeMenuEntry[] | null,\n choose: (id: string) => void,\n ): void {\n if (entries) this.pressMenuChoices.set(nativeID, choose);\n else this.pressMenuChoices.delete(nativeID);\n this.native?.setPressMenu?.(nativeID, entries);\n }\n\n /** What choosing an item does, by the `nativeID` of the view whose menu it is in. */\n private readonly contextMenuChoices = new Map<string, (id: string) => void>();\n\n /**\n * Send the context menu of the view with `nativeID`, or null to take it away. `choose` runs with\n * the item's `id` where the host sends the choice itself (iOS) rather than through the view.\n */\n setContextMenu(\n nativeID: string,\n entries: readonly NativeMenuEntry[] | null,\n choose?: (id: string) => void,\n ): void {\n if (entries && choose) this.contextMenuChoices.set(nativeID, choose);\n else this.contextMenuChoices.delete(nativeID);\n if (entries?.length) this.withContextMenu.add(nativeID);\n else this.withContextMenu.delete(nativeID);\n this.native?.setContextMenu?.(nativeID, entries);\n }\n\n private readonly bars = signal<readonly Signal<readonly MenuEntry[]>[]>([]);\n private readonly shortcuts = signal<readonly Registered[]>([]);\n\n /** The app's groups, from every `<menu-bar>`, in the order they registered. */\n private readonly appGroups = computed<MenuGroupModel[]>(() =>\n this.bars()\n .flatMap((bar) => bar())\n .flatMap((entry) =>\n isSeparator(entry)\n ? []\n : [\n {\n label: entry.label,\n ...(entry.group && { menuRole: entry.group }),\n items: entry.items ?? [],\n },\n ],\n ),\n );\n\n /** The menu bar as it is drawn: the OS's defaults with the app's merged in. */\n readonly menuBar: Signal<MenuGroupModel[]> = computed(() =>\n mergeMenuBar(defaultMenuBar(this.native?.appName || 'App', this.os), this.appGroups()),\n );\n\n private readonly sentBar = computed(() => {\n const groups = this.menuBar();\n const actions = new Map<string, () => void>();\n const sent = groups.map((group, index) => {\n const menu = serializeMenu(group.items, this.os, `${index}.`);\n menu.actions.forEach((action, id) => actions.set(id, action));\n return {\n label: group.label,\n ...(group.menuRole && { menuRole: group.menuRole }),\n items:\n this.os === 'macos' && group.menuRole === 'view'\n ? releaseMacNavigationKeys(menu.entries, groups)\n : menu.entries,\n };\n });\n return { sent, actions };\n });\n\n /**\n * The shortcuts sent to the host: every `[shortcut]`, and where no menu bar is drawn, every\n * menu bar item the app gave a shortcut and a handler, so a hardware keyboard still has them.\n */\n private readonly sentShortcuts = computed(() => {\n const presses = new Map<string, () => void>();\n const editing = new Set<string>();\n const sent: NativeShortcut[] = [];\n const add = (id: string, shortcut: string, label: string, group: string, press: () => void) => {\n presses.set(id, press);\n if (isEditingShortcut(shortcut, this.os)) editing.add(id);\n sent.push({ id, chord: parseShortcut(shortcut, this.os), label, group });\n };\n this.shortcuts().forEach((one, index) =>\n add(`s${index}`, one.shortcut(), one.label(), this.native?.appName || 'App', one.press),\n );\n if (!this.menuBarShown()) {\n const walk = (entries: readonly MenuEntry[], group: string, at: string) =>\n entries.forEach((entry, index) => {\n if (isSeparator(entry)) return;\n if (entry.shortcut && entry.select && !entry.disabled) {\n add(`m${at}${index}`, entry.shortcut, entry.label, group, entry.select);\n }\n if (entry.items) walk(entry.items, group, `${at}${index}.`);\n });\n this.appGroups().forEach((group, index) => walk(group.items, group.label, `${index}.`));\n }\n return { sent, presses, editing };\n });\n\n private readonly unsubscribe = this.native?.subscribe((event) => this.hostSaid(event)) ?? null;\n\n constructor() {\n // Once a label: a `<menu-group label=\"File\">` with no role that is still a group of its own\n // once merged is drawn as a second File menu, on a host that draws a menu bar.\n const warned = new Set<string>();\n effect(() => {\n if (!this.menuBarShown()) return;\n const defaults = defaultMenuBar(this.native?.appName || 'App', this.os);\n for (const label of unmergedGroups(defaults, this.menuBar())) {\n if (warned.has(label)) continue;\n warned.add(label);\n const role = defaults.find(\n (group) => group.label.toLowerCase() === label.toLowerCase(),\n )?.menuRole;\n console.warn(\n `[angular-native] <menu-group label=\"${label}\"> has no menuRole, so it shows as a second ` +\n `${label} menu. Give it menuRole=\"${role}\" to add its items to the ${label} menu.`,\n );\n }\n });\n const native = this.native;\n if (!native) {\n // Read for nothing, so a shortcut the app gets wrong throws where there is no host too, and\n // not first on a device that has one.\n effect(() => this.sentShortcuts());\n return;\n }\n effect(() => {\n if (this.menuBarShown()) native.setMenuBar(this.sentBar().sent);\n });\n effect(() => native.setShortcuts(this.sentShortcuts().sent));\n }\n\n /**\n * Add a `<menu-bar>`'s groups, each a `MenuItemModel` with `items` and its `group` role. Answers\n * the function that takes them out again, as the `<menu-bar>` goes.\n */\n addMenuBar(groups: Signal<readonly MenuEntry[]>): () => void {\n this.bars.update((all) => [...all, groups]);\n return () => this.bars.update((all) => all.filter((one) => one !== groups));\n }\n\n /**\n * Listen for `shortcut`, pressed anywhere in the app: `mod+k`, as `parseShortcut` reads it.\n * `label` is what Android's Keyboard Shortcuts helper lists it as. Answers the function that\n * stops listening.\n */\n addShortcut(shortcut: Signal<string>, label: Signal<string>, press: () => void): () => void {\n const registered: Registered = { shortcut, label, press };\n this.shortcuts.update((all) => [...all, registered]);\n return () => this.shortcuts.update((all) => all.filter((one) => one !== registered));\n }\n\n private readonly navigators = new Set<\n (direction: 'back' | 'forward', surface?: number, steps?: number) => void\n >();\n\n /**\n * Hear the OS's back and forward commands. Apps with their own history can listen here.\n * `@ng-native/router` listens and moves through the history of the window each was in,\n * `steps` entries (one, but for a pick from a chevron's history menu). Returns a function to\n * stop listening.\n */\n onNavigate(\n listener: (direction: 'back' | 'forward', surface?: number, steps?: number) => void,\n ): () => void {\n this.navigators.add(listener);\n return () => void this.navigators.delete(listener);\n }\n\n /**\n * Tell the host the history of the window on `surface`, which its toolbar's back and forward\n * chevrons and their menus show. `@ng-native/router` calls it. Does nothing where the host has\n * no chevrons.\n */\n setHistory(surface: number, history: NativeWindowHistory): void {\n this.native?.setHistory?.(surface, history);\n }\n\n private hostSaid(event: NativeMenuEvent): void {\n if (event.type === 'navigate') {\n const steps = event.steps ?? 1;\n this.navigators.forEach((listener) => listener(event.direction, event.surface, steps));\n return;\n }\n if (event.type === 'menuSelect') {\n this.sentBar().actions.get(event.id)?.();\n return;\n }\n if (event.type === 'contextMenuSelect') {\n this.contextMenuChoices.get(event.nativeID)?.(event.id);\n return;\n }\n if (event.type === 'pressMenuSelect') {\n this.pressMenuChoices.get(event.nativeID)?.(event.id);\n return;\n }\n const { presses, editing } = this.sentShortcuts();\n // The editing keys belong to a focused text input: the app's shortcut on one waits.\n if (event.textInputFocused && editing.has(event.id)) return;\n presses.get(event.id)?.();\n }\n\n ngOnDestroy(): void {\n this.unsubscribe?.();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"menus.js","sourceRoot":"","sources":["../src/menus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EACL,cAAc,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,GAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,GAGf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,iBAAiB,EACjB,eAAe,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,CAAC;YAChC,IAAI,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,OAAO;QACT,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YACvC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACxD,OAAO;QACT,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;YACrC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACtD,OAAO;QACT,CAAC;QACD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QAClD,oFAAoF;QACpF,IAAI,KAAK,CAAC,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAAE,OAAO;QAC5D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;IAC5B,CAAC;IAED,WAAW;QACT,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;IACvB,CAAC;uGAjTU,KAAK;wGAAL,KAAK;;2FAAL,KAAK;kBADjB,OAAO","sourcesContent":["/**\n * Menus and keyboard shortcuts as the host receives them: the menu bar, the shortcuts that are in\n * no menu, and the form a menu takes on its way to native, which a context menu shares.\n *\n * The host contract, on the `NgNativeMenus` module:\n * - `setMenuBar(groups)`: the whole merged menu bar, each time it changes. The desktop host draws\n * it as the main menu, iPadOS through UIMenuBuilder. Each item has an `id`; an item with a\n * `menuRole` and no `id`'s action is the OS's own (Copy, Quit).\n * - `setShortcuts(shortcuts)`: every shortcut the app listens for outside the menu bar, each with\n * its `id`, its chord read for the OS, and a `label` and `group` for Android's Keyboard Shortcuts\n * helper. On iPhone and Android the menu bar's own shortcuts are in it too, since no bar is drawn.\n * - It sends `ngNativeMenus` events on `DeviceEventEmitter`: `{ type: 'menuSelect', id }` for a menu\n * bar item, and `{ type: 'shortcut', id, textInputFocused }` for a chord pressed.\n * - Its constants say whether it draws a menu bar (`menuBar`) and the app's name (`appName`).\n * - On Android it is an Expo module: the constants are properties, it sends the same events through\n * its own `addListener('ngNativeMenus', ...)`, and it has `setContextMenu(nativeID, entries)`,\n * since React Native's Android view drops a `contextMenu` prop it does not know.\n * - On iOS it is a TurboModule with `setContextMenu(nativeID, entries)` too, for the same reason.\n * React Native's iOS view sends no event it does not know either, so the module sends the item\n * chosen as `{ type: 'contextMenuSelect', nativeID, id }`. Its `setPressMenu(nativeID, entries)`\n * keeps a menu a press opens for that view, and sends the item chosen as\n * `{ type: 'pressMenuSelect', nativeID, id }`. From iOS 17.4, where its `opensPressMenus`\n * constant is true, `openPressMenu(nativeID)` opens it from code too.\n * - Where it draws menus on a press, `popUpMenu(view, entries)` draws one under the view with that\n * tag now, and sends the item chosen as the view's `topContextMenuSelect`, as a context menu's\n * (the desktop host, and Android).\n * - Where it draws context menus, `setTakesLongPress(nativeID, takes)` names a view inside one\n * whose own `(longPress)` takes a long press first: a long press there opens no menu around it,\n * as the innermost handler wins in a native app. A right-click still opens the menu on Android.\n * iOS tells a long press from a secondary click only by the gesture, so an iPad pointer's\n * secondary click there opens none either.\n */\nimport {\n InjectionToken,\n Service,\n computed,\n effect,\n inject,\n signal,\n type Signal,\n} from '@angular/core';\nimport {\n defaultMenuBar,\n isSeparator,\n mergeMenuBar,\n unmergedGroups,\n type MenuEntry,\n type MenuGroupModel,\n} from './menu-model.ts';\nimport { injectOs } from './os.ts';\nimport { reactNative } from './react-native.ts';\nimport {\n isEditingShortcut,\n matchesShortcut,\n navigationShortcut,\n parseShortcut,\n type ParsedShortcut,\n type ShortcutOs,\n} from './shortcut.ts';\n\n/** A menu entry as the host receives it. */\nexport type NativeMenuEntry =\n | { readonly separator: true }\n | {\n readonly id: string;\n readonly label: string;\n readonly menuRole?: string;\n /** On an item with a `menuRole`: the app handles it, and the OS does not. */\n readonly handled?: true;\n readonly shortcut?: ParsedShortcut;\n readonly disabled?: boolean;\n readonly checked?: boolean;\n readonly destructive?: boolean;\n readonly subtitle?: string;\n readonly sfSymbol?: string;\n readonly icon?: string;\n readonly svgIcon?: string;\n readonly inline?: boolean;\n readonly items?: readonly NativeMenuEntry[];\n };\n\n/** A menu ready for the host, and what each id it was given does. */\nexport interface SerializedMenu {\n readonly entries: NativeMenuEntry[];\n readonly actions: ReadonlyMap<string, () => void>;\n}\n\nconst actionIds = new WeakMap<() => void, string>();\nlet actionsNamed = 0;\n\n/**\n * The id a menu item with `select` is sent under: the same for as long as the handler is, and no\n * other handler's. `<menu-item>` keeps one handler for its life, so a host that reports a choice\n * from a menu it drew before the items changed still runs that item, or nothing once it has gone,\n * never the item that has taken its place.\n */\nexport function menuActionId(select: () => void): string {\n let id = actionIds.get(select);\n if (id === undefined) actionIds.set(select, (id = `a${++actionsNamed}`));\n return id;\n}\n\n/**\n * `entries` as the host takes them: an id for each item, its shortcut read for `os`, and the\n * handlers by id. An item with a handler is named by it (`menuActionId`); one without, which the\n * app never runs, by its place (`2.0.1`).\n */\nexport function serializeMenu(\n entries: readonly MenuEntry[],\n os: ShortcutOs,\n prefix = '',\n): SerializedMenu {\n const actions = new Map<string, () => void>();\n const walk = (list: readonly MenuEntry[], at: string): NativeMenuEntry[] =>\n list.map((entry, index) => {\n if (isSeparator(entry)) return { separator: true };\n const place = `${at}${index}`;\n const { select, shortcut, items, group: _group, ...rest } = entry;\n const id = select ? menuActionId(select) : place;\n if (select) actions.set(id, select);\n return {\n id,\n ...rest,\n // A role item the app handles: the host sends its select rather than doing the role.\n ...(select && entry.menuRole && { handled: true }),\n ...(shortcut\n ? { shortcut: parseShortcut(shortcut, os) }\n : (entry.menuRole === 'back' || entry.menuRole === 'forward') && {\n shortcut: navigationShortcut(entry.menuRole, os),\n }),\n ...(items && { items: walk(items, `${place}.`) }),\n };\n });\n return { entries: walk(entries, prefix), actions };\n}\n\n/** Whether an enabled app menu item, including one in a submenu, takes this chord. */\nfunction hasMacMenuAction(entries: readonly MenuEntry[], chord: ParsedShortcut): boolean {\n return entries.some((entry) => {\n if (isSeparator(entry) || entry.disabled) return false;\n if (entry.items) return hasMacMenuAction(entry.items, chord);\n return Boolean(\n entry.select && entry.shortcut && matchesShortcut(entry.shortcut, chord, 'macos'),\n );\n });\n}\n\n/** Keep the built-in navigation commands clickable when an app item takes their keys. */\nfunction releaseMacNavigationKeys(\n entries: NativeMenuEntry[],\n groups: readonly MenuGroupModel[],\n): NativeMenuEntry[] {\n return entries.map((entry) => {\n if ('separator' in entry || entry.handled) return entry;\n if (entry.menuRole !== 'back' && entry.menuRole !== 'forward') return entry;\n const { shortcut, ...item } = entry;\n return shortcut && groups.some((group) => hasMacMenuAction(group.items, shortcut))\n ? item\n : entry;\n });\n}\n\n/** A shortcut as the host receives it. */\nexport interface NativeShortcut {\n readonly id: string;\n readonly chord: ParsedShortcut;\n /** What Android's Keyboard Shortcuts helper lists it as. */\n readonly label: string;\n /** The heading it is listed under there: its menu's label, or the app's name. */\n readonly group: string;\n}\n\nexport type NativeMenuEvent =\n | { readonly type: 'menuSelect'; readonly id: string }\n | { readonly type: 'shortcut'; readonly id: string; readonly textInputFocused?: boolean }\n /** An item chosen in the context menu of the view with `nativeID` (iOS). */\n | { readonly type: 'contextMenuSelect'; readonly nativeID: string; readonly id: string }\n /** An item chosen in the press menu of the view with `nativeID` (iOS). */\n | { readonly type: 'pressMenuSelect'; readonly nativeID: string; readonly id: string }\n /**\n * Back or forward, from whichever input the OS has for it: View > Back and Forward and their\n * keys, a two-finger swipe, mouse buttons 4 and 5, the toolbar's chevrons and their history\n * menus. `surface` is the window it was in, and `steps` how many entries (one where absent).\n */\n | {\n readonly type: 'navigate';\n readonly direction: 'back' | 'forward';\n readonly surface?: number;\n readonly steps?: number;\n };\n\n/** A window's history as the host draws it: the titles behind and ahead, nearest first. */\nexport interface NativeWindowHistory {\n readonly back: readonly string[];\n readonly forward: readonly string[];\n}\n\n/** The host's menu module. */\nexport interface NativeMenus {\n /** Whether the host draws a menu bar: macOS, and iPadOS. */\n readonly menuBar: boolean;\n readonly appName: string;\n setMenuBar(\n groups: readonly { label: string; menuRole?: string; items: NativeMenuEntry[] }[],\n ): void;\n setShortcuts(shortcuts: readonly NativeShortcut[]): void;\n /** The history of the window on `surface`, for its back and forward chevrons. Desktop only. */\n setHistory?(surface: number, history: NativeWindowHistory): void;\n /**\n * The context menu of the view with `nativeID`, or null to take it away. Android and iOS, whose\n * views read no `contextMenu` prop: the host finds the view by its `nativeID`.\n */\n setContextMenu?(nativeID: string, entries: readonly NativeMenuEntry[] | null): void;\n /**\n * Whether the view with `nativeID` takes a long press itself, so a context menu around it does\n * not open on one there. Android and iOS, beside `setContextMenu`.\n */\n setTakesLongPress?(nativeID: string, takes: boolean): void;\n /**\n * Draw `entries` under the view with tag `view` now, and send the item chosen as its\n * `topContextMenuSelect`. The desktop host, and Android.\n */\n popUpMenu?(view: number, entries: readonly NativeMenuEntry[]): void;\n /**\n * The menu a press opens on the view with `nativeID`, or null to take it away. iOS, which opens\n * one on a touch but has no way to open one from code.\n */\n setPressMenu?(nativeID: string, entries: readonly NativeMenuEntry[] | null): void;\n /**\n * Open the menu `setPressMenu` gave the view with `nativeID`, now, for a press its own touch did\n * not open it on. iOS 17.4 and later.\n */\n openPressMenu?(nativeID: string): void;\n subscribe(listener: (event: NativeMenuEvent) => void): () => void;\n}\n\ninterface MenusModule {\n getConstants?(): { menuBar?: boolean; appName?: string; opensPressMenus?: boolean };\n /** An Expo module's constants, which are its properties. */\n readonly menuBar?: boolean;\n readonly appName?: string;\n readonly opensPressMenus?: boolean;\n setMenuBar?(groups: unknown): void;\n setShortcuts?(shortcuts: unknown): void;\n setHistory?(surface: number, history: unknown): void;\n setContextMenu?(nativeID: string, entries: unknown): void;\n setTakesLongPress?(nativeID: string, takes: boolean): void;\n popUpMenu?(view: number, entries: unknown): void;\n setPressMenu?(nativeID: string, entries: unknown): void;\n openPressMenu?(nativeID: string): void;\n /** An Expo module's own events. */\n addListener?(event: string, listener: (event: unknown) => void): { remove(): void };\n}\n\n/** Android's `NgNativeMenus`, an Expo module, where React Native has no TurboModule of the name. */\nfunction expoMenusModule(): MenusModule | undefined {\n const modules = (globalThis as { expo?: { modules?: Record<string, unknown> } }).expo?.modules;\n return modules?.['NgNativeMenus'] as MenusModule | undefined;\n}\n\n/**\n * The host's menu module: a TurboModule (the desktop host, iOS), or else Android's Expo module.\n * Null where there is neither, as in Expo Go.\n */\nexport function menusSource(): NativeMenus | null {\n const native = reactNative();\n const turbo = native?.TurboModuleRegistry?.get?.('NgNativeMenus') as\n MenusModule | null | undefined;\n const expo = turbo ? undefined : expoMenusModule();\n const module = turbo ?? expo;\n if (!module) return null;\n const constants = module.getConstants?.() ?? module;\n // An Expo module sends its events itself; a TurboModule's come through DeviceEventEmitter.\n const listen = (hear: (event: unknown) => void) =>\n expo\n ? expo.addListener?.('ngNativeMenus', hear)\n : native?.DeviceEventEmitter?.addListener('ngNativeMenus', hear);\n return {\n menuBar: constants.menuBar === true,\n appName: constants.appName ?? '',\n setMenuBar: (groups) => module.setMenuBar?.(groups),\n setShortcuts: (shortcuts) => module.setShortcuts?.(shortcuts),\n setHistory: (surface, history) => module.setHistory?.(surface, history),\n ...contextMenuMethods(module, constants.opensPressMenus === true),\n subscribe: (listener) => {\n const subscription = listen((event) => listener(event as NativeMenuEvent));\n return () => subscription?.remove();\n },\n };\n}\n\n/**\n * The menu methods a module may lack, bound, and none it lacks: a host without the context menu\n * ones reads props, and one without `popUpMenu` or `setPressMenu` leaves a press to `(press)`.\n * `openPressMenu` only where the module says it opens one (`opens`): iOS 17.4 and later.\n */\nfunction contextMenuMethods(\n module: MenusModule,\n opens: boolean,\n): Pick<\n NativeMenus,\n 'setContextMenu' | 'setTakesLongPress' | 'popUpMenu' | 'setPressMenu' | 'openPressMenu'\n> {\n const setContextMenu = module.setContextMenu?.bind(module);\n const setTakesLongPress = module.setTakesLongPress?.bind(module);\n const popUpMenu = module.popUpMenu?.bind(module);\n const setPressMenu = module.setPressMenu?.bind(module);\n const openPressMenu = opens ? module.openPressMenu?.bind(module) : undefined;\n return {\n ...(setContextMenu && { setContextMenu }),\n ...(setTakesLongPress && { setTakesLongPress }),\n ...(popUpMenu && { popUpMenu }),\n ...(setPressMenu && { setPressMenu }),\n ...(openPressMenu && { openPressMenu }),\n };\n}\n\n/** A `[shortcut]` registered with `KeyboardShortcuts`. */\ninterface Registered {\n readonly shortcut: Signal<string>;\n readonly label: Signal<string>;\n readonly press: () => void;\n}\n\n/**\n * The menus and shortcuts an app has, sent to the host as they change. `<menu-bar>` and\n * `[shortcut]` in `@ng-native/components` register here; an app rarely injects it.\n */\n@Service()\nexport class Menus {\n /** Overridden in a test with a fake host. */\n static readonly SOURCE = new InjectionToken<NativeMenus | null>('angular-native.menusSource', {\n factory: menusSource,\n });\n\n private readonly native = inject(Menus.SOURCE);\n private readonly os: ShortcutOs = injectOs();\n\n /** Whether the host has the module: shortcuts from a hardware keyboard, and menus. */\n readonly available: Signal<boolean> = signal(this.native !== null).asReadonly();\n\n /** Whether the menu bar is drawn: macOS and iPadOS. Elsewhere its shortcuts still work. */\n readonly menuBarShown: Signal<boolean> = signal(this.native?.menuBar === true).asReadonly();\n\n /**\n * Whether the host takes a `[contextMenu]` by the view's `nativeID` through `setContextMenu`\n * (Android and iOS) rather than as the view's `contextMenu` prop. Where it does, it draws the\n * menu on a long press.\n */\n readonly contextMenuByNativeId: boolean = this.native?.setContextMenu !== undefined;\n\n /**\n * Whether the host, which draws context menus on a long press, can be told which views inside\n * one take a long press themselves (`setTakesLongPress`).\n */\n readonly longPressByNativeId: boolean =\n this.contextMenuByNativeId && this.native?.setTakesLongPress !== undefined;\n\n /**\n * Say whether the view with `nativeID` takes a long press itself: one there then opens no\n * context menu around it.\n */\n setTakesLongPress(nativeID: string, takes: boolean): void {\n if (takes) this.longPressTakers.add(nativeID);\n else this.longPressTakers.delete(nativeID);\n this.native?.setTakesLongPress?.(nativeID, takes);\n }\n\n /** The `nativeID`s sent with a context menu, and with a long press of their own. */\n private readonly withContextMenu = new Set<string>();\n private readonly longPressTakers = new Set<string>();\n\n /**\n * Whether the host opens a context menu on a long press of the view whose `nativeID`s, from it\n * outwards, are `chain`: as it decides, the nearest view with a menu, unless one on the way takes\n * the long press itself. A `(longPress)` around that view leaves the hold to the menu, which the\n * host opens after its own long-press timeout.\n */\n opensContextMenu(chain: Iterable<string | null>): boolean {\n for (const nativeID of chain) {\n if (nativeID === null) continue;\n if (this.withContextMenu.has(nativeID)) return true;\n if (this.longPressTakers.has(nativeID)) return false;\n }\n return false;\n }\n\n /**\n * Whether the host draws a menu under a view on a press (`popUpMenu`): the desktop host, and\n * Android.\n */\n readonly popsUpMenus: boolean = this.native?.popUpMenu !== undefined;\n\n /**\n * Draw `entries` under the view with tag `view` now. The host sends the item chosen as the\n * view's `topContextMenuSelect`. It draws nothing for a view it is not showing, and does not say\n * so.\n */\n popUpMenu(view: number, entries: readonly NativeMenuEntry[]): void {\n this.native?.popUpMenu?.(view, entries);\n }\n\n /**\n * Whether the host takes a menu a press opens by the view's `nativeID` (`setPressMenu`), and\n * opens it on a touch itself: iOS.\n */\n readonly pressMenuByNativeId: boolean = this.native?.setPressMenu !== undefined;\n\n /**\n * Whether the host opens a press menu by `nativeID` from code (`openPressMenu`): iOS 17.4 and\n * later.\n */\n readonly opensPressMenus: boolean = this.native?.openPressMenu !== undefined;\n\n /** Open the menu `setPressMenu` gave the view with `nativeID`, now. */\n openPressMenu(nativeID: string): void {\n this.native?.openPressMenu?.(nativeID);\n }\n\n /** What choosing an item does, by the `nativeID` of the view whose press menu it is in. */\n private readonly pressMenuChoices = new Map<string, (id: string) => void>();\n\n /**\n * Send the menu a press opens on the view with `nativeID`, or null to take it away. `choose`\n * runs with the item's `id` as the host sends the choice.\n */\n setPressMenu(\n nativeID: string,\n entries: readonly NativeMenuEntry[] | null,\n choose: (id: string) => void,\n ): void {\n if (entries) this.pressMenuChoices.set(nativeID, choose);\n else this.pressMenuChoices.delete(nativeID);\n this.native?.setPressMenu?.(nativeID, entries);\n }\n\n /** What choosing an item does, by the `nativeID` of the view whose menu it is in. */\n private readonly contextMenuChoices = new Map<string, (id: string) => void>();\n\n /**\n * Send the context menu of the view with `nativeID`, or null to take it away. `choose` runs with\n * the item's `id` where the host sends the choice itself (iOS) rather than through the view.\n */\n setContextMenu(\n nativeID: string,\n entries: readonly NativeMenuEntry[] | null,\n choose?: (id: string) => void,\n ): void {\n if (entries && choose) this.contextMenuChoices.set(nativeID, choose);\n else this.contextMenuChoices.delete(nativeID);\n if (entries?.length) this.withContextMenu.add(nativeID);\n else this.withContextMenu.delete(nativeID);\n this.native?.setContextMenu?.(nativeID, entries);\n }\n\n private readonly bars = signal<readonly Signal<readonly MenuEntry[]>[]>([]);\n private readonly shortcuts = signal<readonly Registered[]>([]);\n\n /** The app's groups, from every `<menu-bar>`, in the order they registered. */\n private readonly appGroups = computed<MenuGroupModel[]>(() =>\n this.bars()\n .flatMap((bar) => bar())\n .flatMap((entry) =>\n isSeparator(entry)\n ? []\n : [\n {\n label: entry.label,\n ...(entry.group && { menuRole: entry.group }),\n items: entry.items ?? [],\n },\n ],\n ),\n );\n\n /** The menu bar as it is drawn: the OS's defaults with the app's merged in. */\n readonly menuBar: Signal<MenuGroupModel[]> = computed(() =>\n mergeMenuBar(defaultMenuBar(this.native?.appName || 'App', this.os), this.appGroups()),\n );\n\n private readonly sentBar = computed(() => {\n const groups = this.menuBar();\n const actions = new Map<string, () => void>();\n const sent = groups.map((group, index) => {\n const menu = serializeMenu(group.items, this.os, `${index}.`);\n menu.actions.forEach((action, id) => actions.set(id, action));\n return {\n label: group.label,\n ...(group.menuRole && { menuRole: group.menuRole }),\n items:\n this.os === 'macos' && group.menuRole === 'view'\n ? releaseMacNavigationKeys(menu.entries, groups)\n : menu.entries,\n };\n });\n return { sent, actions };\n });\n\n /**\n * The shortcuts sent to the host: every `[shortcut]`, and where no menu bar is drawn, every\n * menu bar item the app gave a shortcut and a handler, so a hardware keyboard still has them.\n */\n private readonly sentShortcuts = computed(() => {\n const presses = new Map<string, () => void>();\n const editing = new Set<string>();\n const sent: NativeShortcut[] = [];\n const add = (id: string, shortcut: string, label: string, group: string, press: () => void) => {\n presses.set(id, press);\n if (isEditingShortcut(shortcut, this.os)) editing.add(id);\n sent.push({ id, chord: parseShortcut(shortcut, this.os), label, group });\n };\n this.shortcuts().forEach((one, index) =>\n add(`s${index}`, one.shortcut(), one.label(), this.native?.appName || 'App', one.press),\n );\n if (!this.menuBarShown()) {\n const walk = (entries: readonly MenuEntry[], group: string, at: string) =>\n entries.forEach((entry, index) => {\n if (isSeparator(entry)) return;\n if (entry.shortcut && entry.select && !entry.disabled) {\n add(`m${at}${index}`, entry.shortcut, entry.label, group, entry.select);\n }\n if (entry.items) walk(entry.items, group, `${at}${index}.`);\n });\n this.appGroups().forEach((group, index) => walk(group.items, group.label, `${index}.`));\n }\n return { sent, presses, editing };\n });\n\n private readonly unsubscribe = this.native?.subscribe((event) => this.hostSaid(event)) ?? null;\n\n constructor() {\n // Once a label: a `<menu-group label=\"File\">` with no role that is still a group of its own\n // once merged is drawn as a second File menu, on a host that draws a menu bar.\n const warned = new Set<string>();\n effect(() => {\n if (!this.menuBarShown()) return;\n const defaults = defaultMenuBar(this.native?.appName || 'App', this.os);\n for (const label of unmergedGroups(defaults, this.menuBar())) {\n if (warned.has(label)) continue;\n warned.add(label);\n const role = defaults.find(\n (group) => group.label.toLowerCase() === label.toLowerCase(),\n )?.menuRole;\n console.warn(\n `[angular-native] <menu-group label=\"${label}\"> has no menuRole, so it shows as a second ` +\n `${label} menu. Give it menuRole=\"${role}\" to add its items to the ${label} menu.`,\n );\n }\n });\n const native = this.native;\n if (!native) {\n // Read for nothing, so a shortcut the app gets wrong throws where there is no host too, and\n // not first on a device that has one.\n effect(() => this.sentShortcuts());\n return;\n }\n effect(() => {\n if (this.menuBarShown()) native.setMenuBar(this.sentBar().sent);\n });\n effect(() => native.setShortcuts(this.sentShortcuts().sent));\n }\n\n /**\n * Add a `<menu-bar>`'s groups, each a `MenuItemModel` with `items` and its `group` role. Answers\n * the function that takes them out again, as the `<menu-bar>` goes.\n */\n addMenuBar(groups: Signal<readonly MenuEntry[]>): () => void {\n this.bars.update((all) => [...all, groups]);\n return () => this.bars.update((all) => all.filter((one) => one !== groups));\n }\n\n /**\n * Listen for `shortcut`, pressed anywhere in the app: `mod+k`, as `parseShortcut` reads it.\n * `label` is what Android's Keyboard Shortcuts helper lists it as. Answers the function that\n * stops listening.\n */\n addShortcut(shortcut: Signal<string>, label: Signal<string>, press: () => void): () => void {\n const registered: Registered = { shortcut, label, press };\n this.shortcuts.update((all) => [...all, registered]);\n return () => this.shortcuts.update((all) => all.filter((one) => one !== registered));\n }\n\n private readonly navigators = new Set<\n (direction: 'back' | 'forward', surface?: number, steps?: number) => void\n >();\n\n /**\n * Hear the OS's back and forward commands. Apps with their own history can listen here.\n * `@ng-native/router` listens and moves through the history of the window each was in,\n * `steps` entries (one, but for a pick from a chevron's history menu). Returns a function to\n * stop listening.\n */\n onNavigate(\n listener: (direction: 'back' | 'forward', surface?: number, steps?: number) => void,\n ): () => void {\n this.navigators.add(listener);\n return () => void this.navigators.delete(listener);\n }\n\n /**\n * Tell the host the history of the window on `surface`, which its toolbar's back and forward\n * chevrons and their menus show. `@ng-native/router` calls it. Does nothing where the host has\n * no chevrons.\n */\n setHistory(surface: number, history: NativeWindowHistory): void {\n this.native?.setHistory?.(surface, history);\n }\n\n private hostSaid(event: NativeMenuEvent): void {\n if (event.type === 'navigate') {\n const steps = event.steps ?? 1;\n this.navigators.forEach((listener) => listener(event.direction, event.surface, steps));\n return;\n }\n if (event.type === 'menuSelect') {\n this.sentBar().actions.get(event.id)?.();\n return;\n }\n if (event.type === 'contextMenuSelect') {\n this.contextMenuChoices.get(event.nativeID)?.(event.id);\n return;\n }\n if (event.type === 'pressMenuSelect') {\n this.pressMenuChoices.get(event.nativeID)?.(event.id);\n return;\n }\n const { presses, editing } = this.sentShortcuts();\n // The editing keys belong to a focused text input: the app's shortcut on one waits.\n if (event.textInputFocused && editing.has(event.id)) return;\n presses.get(event.id)?.();\n }\n\n ngOnDestroy(): void {\n this.unsubscribe?.();\n }\n}\n"]}
|
package/dist/navigation-bar.js
CHANGED
|
@@ -83,10 +83,10 @@ export class NavigationBar {
|
|
|
83
83
|
this.window.apply();
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
87
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.
|
|
86
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NavigationBar, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
87
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.3.0", ngImport: i0, type: NavigationBar });
|
|
88
88
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NavigationBar, decorators: [{
|
|
90
90
|
type: Service
|
|
91
91
|
}], ctorParameters: () => [] });
|
|
92
92
|
/** The bar, as every app on one source claims it. */
|
package/dist/os-support.js
CHANGED
|
@@ -42,6 +42,7 @@ export const OS_SUPPORT = [
|
|
|
42
42
|
'ignored',
|
|
43
43
|
'ignored',
|
|
44
44
|
]),
|
|
45
|
+
row('`trafficLightPosition`', ['trafficLightPosition'], ['yes', 'ignored', 'ignored', 'ignored', 'ignored', 'ignored']),
|
|
45
46
|
row('`<menu-bar>`', ['MenuBar', 'MenuGroup', 'MenuItem', 'MenuSeparator', 'Menus'], [
|
|
46
47
|
'menu bar',
|
|
47
48
|
'menu bar on KDE Plasma, a menu button in the header bar elsewhere',
|
|
@@ -78,6 +79,7 @@ export const OS_SUPPORT = [
|
|
|
78
79
|
'list pane from 840dp, a stack below',
|
|
79
80
|
'two columns',
|
|
80
81
|
]),
|
|
82
|
+
row('`<visual-effect>`', ['VisualEffect'], ['NSVisualEffectView', 'plain view', 'plain view', 'plain view', 'plain view', 'plain view']),
|
|
81
83
|
row('`Processes`, `Processes.env`', ['Processes'], DESKTOP_ONLY, {
|
|
82
84
|
Processes: 'NgNativeProcesses',
|
|
83
85
|
}),
|
|
@@ -94,6 +96,7 @@ export const OS_SUPPORT = [
|
|
|
94
96
|
row('`<native-button>`', ['NativeButton'], ['AppKit button', 'GTK button', 'UIKit button', 'UIKit button', 'drawn', 'HTML button']),
|
|
95
97
|
row('`controlSize`', ['controlSize'], ['yes', 'ignored', '`<native-button>`', '`<native-button>`', 'ignored', 'ignored']),
|
|
96
98
|
row('`anchor` on `<modal>`', ['anchor'], ['popover', 'popover', 'popover', 'ignored', 'ignored', 'ignored']),
|
|
99
|
+
row('`tooltip` on a view', ['tooltip'], ['yes', 'yes', 'ignored', 'ignored', 'ignored', '`title`']),
|
|
97
100
|
row('`accessibilityLevel`, `aria-level`', ['accessibilityLevel'], ['macOS 26 and later', 'yes', 'ignored', 'ignored', 'ignored', 'yes']),
|
|
98
101
|
row('`<refresh-control>`', ['RefreshControl'], ['inert', 'inert', 'yes', 'yes', 'yes', 'inert']),
|
|
99
102
|
row('`<keyboard-dock>`, `<keyboard-avoiding-view>`', ['KeyboardDock', 'KeyboardAvoidingView'], ['plain view', 'plain view', 'yes', 'yes', 'yes', 'plain view']),
|
package/dist/os-support.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os-support.js","sourceRoot":"","sources":["../src/os-support.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4BH,MAA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,CAAC;IACD,OAAO,kBAAkB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC7C,CAAC","sourcesContent":["/**\n * What each desktop API and each macOS-only input does on each OS: the one source the support\n * table on the documentation site is drawn from, and that `os-support.test.ts` holds the code to.\n *\n * A cell is `yes`; `absent`, where `available()` is false and every call is inert; `ignored`, where\n * the input has no effect; `inert`, where an element draws nothing and calls nothing; or a few\n * words on what the OS does instead. It has no imports, so a build script can read it.\n */\n\n/** The OSes the table has a column for, iPadOS and iPhone apart. */\nexport type SupportOs = 'macos' | 'linux' | 'ipados' | 'iphone' | 'android' | 'web';\n\nexport interface OsSupportRow {\n /** The row's name in the table, as Markdown. */\n readonly feature: string;\n /**\n * What the row covers: exported classes and functions, inputs by name, and events as\n * `(dblclick)`. Every one exists.\n */\n readonly covers: readonly string[];\n /**\n * The services whose `available()` follows the row, each with the host module it is made from:\n * true where the row is not `absent` and the module is there, false where it is `absent`.\n */\n readonly services?: Readonly<Record<string, string>>;\n /**\n * Services with no host module of their own, whose `available()` follows the row: absent where the\n * row says `absent`, which `every-service.test.ts` checks call by call.\n */\n readonly inert?: readonly string[];\n /** The services have no `available()`, such as a view: where absent, the row says only that. */\n readonly withoutAvailable?: true;\n readonly on: Readonly<Record<SupportOs, string>>;\n}\n\nexport const SUPPORT_OSES: Readonly<Record<SupportOs, string>> = {\n macos: 'macOS',\n linux: 'Linux',\n ipados: 'iPadOS',\n iphone: 'iPhone',\n android: 'Android',\n web: 'Web host',\n};\n\n/** A row's cells, in the order of `SUPPORT_OSES`. */\ntype Cells = readonly [string, string, string, string, string, string];\n\nconst row = (\n feature: string,\n covers: readonly string[],\n [macos, linux, ipados, iphone, android, web]: Cells,\n services?: Readonly<Record<string, string>>,\n inert?: readonly string[],\n): OsSupportRow => ({\n feature,\n covers,\n on: { macos, linux, ipados, iphone, android, web },\n ...(services && { services }),\n ...(inert && { inert }),\n});\n\n/** On both desktop OSes, and nowhere else. */\nconst DESKTOP_ONLY = ['yes', 'yes', 'absent', 'absent', 'absent', 'absent'] as const;\n\n/**\n * An Expo-backed service whose `available()` is whether its module is there: the Expo module on\n * iPadOS, iPhone and Android, the desktop host's module on macOS and Linux, and nothing on the web,\n * where the Expo module is not written for it.\n */\nconst EXPO_MODULE = ['yes', 'yes', 'yes', 'yes', 'yes', 'absent'] as const;\n\n/** As `EXPO_MODULE`, where the Linux host has no source for the module, so it is absent there. */\nconst NOT_ON_LINUX = ['yes', 'absent', 'yes', 'yes', 'yes', 'absent'] as const;\n\nconst expoRow = (service: string, hostModule: string, cells: Cells = EXPO_MODULE): OsSupportRow =>\n row(`\\`${service}\\``, [], cells, { [service]: hostModule });\n\nexport const OS_SUPPORT: readonly OsSupportRow[] = [\n row(\n '`AppWindows.open`, `provideMainWindow`',\n ['AppWindows', 'CURRENT_WINDOW', 'provideMainWindow', 'provideRestorableWindows'],\n ['yes', 'yes', 'scenes, with `ios.multipleWindows`', 'absent', 'absent', 'absent'],\n { AppWindows: 'NgNativeWindows' },\n ),\n row(\n '`titleBar`, window size options',\n ['titleBar', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'resizable', 'fullScreen'],\n [\n 'yes',\n '`maxWidth` and `maxHeight` only as the window opens',\n 'ignored',\n 'ignored',\n 'ignored',\n 'ignored',\n ],\n ),\n row(\n '`<menu-bar>`',\n ['MenuBar', 'MenuGroup', 'MenuItem', 'MenuSeparator', 'Menus'],\n [\n 'menu bar',\n 'menu bar on KDE Plasma, a menu button in the header bar elsewhere',\n 'menu bar',\n 'inert',\n 'inert',\n 'inert',\n ],\n ),\n row(\n '`[shortcut]`, menu item shortcuts',\n ['Shortcut'],\n [\n 'yes',\n 'yes',\n 'yes',\n 'hardware keyboard',\n 'hardware keyboard, Keyboard Shortcuts helper',\n 'yes',\n ],\n ),\n row(\n '`[contextMenu]`',\n ['ContextMenu'],\n [\n 'yes',\n 'secondary click',\n 'long press or secondary click',\n 'long press',\n 'long press or right-click',\n 'inert',\n ],\n ),\n row(\n '`<tray-icon>`',\n ['TrayIcon', 'Tray'],\n ['yes', 'while a StatusNotifierWatcher runs', 'absent', 'absent', 'absent', 'absent'],\n { Tray: 'NgNativeTray' },\n ),\n row('`Dock`', ['Dock'], ['yes', 'absent', 'absent', 'absent', 'absent', 'absent'], {\n Dock: 'NgNativeDock',\n }),\n row(\n '`<split-view>`, `<sidebar>`',\n ['SplitView', 'Sidebar', 'SidebarSection', 'SidebarItem', 'SidebarItemPath'],\n [\n 'yes',\n 'AdwNavigationSplitView, a stack at compact widths',\n 'UISplitViewController, a stack at compact widths',\n 'stack root',\n 'list pane from 840dp, a stack below',\n 'two columns',\n ],\n ),\n row('`Processes`, `Processes.env`', ['Processes'], DESKTOP_ONLY, {\n Processes: 'NgNativeProcesses',\n }),\n row('`Shell`', ['Shell'], DESKTOP_ONLY, { Shell: 'NgNativeShell' }),\n row(\n '`FileSystem.paths.home`, `desktop`, `downloads`',\n ['home', 'desktop', 'downloads'],\n DESKTOP_ONLY,\n ),\n row('`UndoStack`', ['UndoStack'], ['yes', 'yes', 'yes', 'yes', 'absent', 'absent'], {\n UndoStack: 'NgNativeUndo',\n }),\n row('`Printing.print({ window })`, File > Print...', [], DESKTOP_ONLY),\n row(\n '`Updates.checkForAppUpdate()`, `appUpdateAvailable`',\n ['appUpdateAvailable'],\n ['`dmg` builds', 'absent', 'absent', 'absent', 'absent', 'absent'],\n ),\n row(\n 'Drag and drop: `(fileDrop)`, `[dragItem]`',\n ['FileDrop', 'DragItem', '(fileDrop)', '(fileDragEnter)', '(fileDragLeave)', 'dragItem'],\n ['yes', 'yes', 'yes', 'absent', 'absent', 'absent'],\n ),\n row(\n '`(mouseenter)`, `(mouseleave)`, `(mousemove)`, `(mouseover)`, `(mouseout)`',\n ['(mouseenter)', '(mouseleave)', '(mousemove)', '(mouseover)', '(mouseout)'],\n ['yes', 'yes', 'trackpad or mouse', 'ignored', 'mouse', 'yes'],\n ),\n row(\n '`(dblclick)`, `(contextmenu)`, `(wheel)`',\n ['(dblclick)', '(contextmenu)', '(wheel)'],\n ['yes', 'yes', 'ignored', 'ignored', 'ignored', 'ignored'],\n ),\n row(\n '`<native-button>`',\n ['NativeButton'],\n ['AppKit button', 'GTK button', 'UIKit button', 'UIKit button', 'drawn', 'HTML button'],\n ),\n row(\n '`controlSize`',\n ['controlSize'],\n ['yes', 'ignored', '`<native-button>`', '`<native-button>`', 'ignored', 'ignored'],\n ),\n row(\n '`anchor` on `<modal>`',\n ['anchor'],\n ['popover', 'popover', 'popover', 'ignored', 'ignored', 'ignored'],\n ),\n row(\n '`accessibilityLevel`, `aria-level`',\n ['accessibilityLevel'],\n ['macOS 26 and later', 'yes', 'ignored', 'ignored', 'ignored', 'yes'],\n ),\n row('`<refresh-control>`', ['RefreshControl'], ['inert', 'inert', 'yes', 'yes', 'yes', 'inert']),\n row(\n '`<keyboard-dock>`, `<keyboard-avoiding-view>`',\n ['KeyboardDock', 'KeyboardAvoidingView'],\n ['plain view', 'plain view', 'yes', 'yes', 'yes', 'plain view'],\n ),\n row(\n '`<input-accessory-view>`',\n ['InputAccessoryView'],\n ['plain view', 'plain view', 'yes', 'yes', 'plain view', 'docked at the bottom'],\n ),\n row(\n '`<expo-glass>`, `<expo-glass-container>`',\n [],\n ['yes', 'plain view', 'iOS 26 and later', 'iOS 26 and later', 'plain view', 'plain view'],\n ),\n row(\n 'Community `slider`, `picker`, `masked-view`',\n [],\n ['absent: `ui-slider`, `ui-picker`', 'absent', 'yes', 'yes', 'yes', 'plain view'],\n ),\n row(\n '`HardwareBack`, `NavigationBar`',\n ['HardwareBack', 'NavigationBar'],\n ['absent', 'absent', 'absent', 'absent', 'yes', 'absent'],\n undefined,\n ['HardwareBack', 'NavigationBar'],\n ),\n row(\n '`StatusBar`, `Keyboard`',\n ['StatusBar', 'Keyboard'],\n ['absent', 'absent', 'yes', 'yes', 'yes', 'absent'],\n undefined,\n ['StatusBar', 'Keyboard'],\n ),\n row('`Vibration`', ['Vibration'], ['absent', 'absent', 'yes', 'yes', 'yes', 'yes'], undefined, [\n 'Vibration',\n ]),\n row(\n '`BackgroundTask`, `Brightness`, `DeviceOrientation`',\n [],\n ['absent', 'absent', 'yes', 'yes', 'yes', 'absent'],\n undefined,\n ['BackgroundTask', 'Brightness', 'DeviceOrientation'],\n ),\n expoRow('AppInfo', 'NgNativeApplication', [\n 'yes',\n 'brand and manufacturer from the firmware, or null',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Battery', 'NgNativeBattery', [\n 'yes',\n 'no battery without UPower',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Browser', 'NgNativeWebBrowser', [\n 'yes',\n 'an auth session ends on the link back, which reaches an installed package',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Calendar', 'NgNativeCalendar', NOT_ON_LINUX),\n expoRow('Clipboard', 'NgNativeClipboard'),\n expoRow('Crypto', 'NgNativeCrypto', ['yes', 'no MD2 or MD4', 'yes', 'yes', 'yes', 'absent']),\n expoRow('DocumentPicker', 'NgNativeDocumentPicker'),\n expoRow('FileSystem', 'NgNativeFileSystem'),\n expoRow('Fonts', 'NgNativeFont'),\n expoRow('Haptics', 'NgNativeHaptics', NOT_ON_LINUX),\n expoRow('ImageEditor', 'NgNativeImageManipulator', [\n 'yes',\n 'WebP only where a WebP writer is installed',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('ImagePicker', 'NgNativeImagePicker', [\n 'yes',\n 'the library through the file chooser, the camera in a window of its own',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('KeepAwake', 'NgNativeKeepAwake'),\n expoRow('Locale', 'NgNativeLocalization'),\n expoRow('Location', 'NgNativeLocation', [\n 'yes',\n 'no geocoding; restricted without the Location portal',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('MediaLibrary', 'NgNativeMediaLibrary', NOT_ON_LINUX),\n expoRow('Network', 'NgNativeNetwork', [\n 'yes',\n 'type `OTHER` without NetworkManager',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Notifications', 'NgNativeNotifications', [\n 'yes',\n 'no push token',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Printing', 'NgNativePrint', ['yes', 'no HTML', 'yes', 'yes', 'yes', 'absent']),\n expoRow('SplashScreen', 'NgNativeSplashScreen'),\n expoRow('TextRecognition', 'NgNativeTextRecognition', [\n 'yes',\n 'absent',\n 'yes',\n 'yes',\n 'absent',\n 'absent',\n ]),\n expoRow('Updates', 'NgNativeUpdates', [\n 'yes',\n 'bundle updates when configured; no whole-app updater',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('AddressSearch', 'NgNativeAddressSearch', NOT_ON_LINUX),\n expoRow('AppleSignIn', 'NgNativeAppleAuthentication', [\n 'signed with the Sign in with Apple entitlement',\n 'absent',\n 'yes',\n 'yes',\n 'absent',\n 'absent',\n ]),\n expoRow('Biometrics', 'NgNativeLocalAuthentication', NOT_ON_LINUX),\n {\n ...expoRow('Camera', 'NgNativeCamera', [\n 'yes',\n 'through the Camera portal and PipeWire',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n withoutAvailable: true,\n },\n {\n ...expoRow('MapView', 'NgNativeMaps', [\n 'yes',\n 'absent',\n 'iPadOS 17 and later, marker taps from 18',\n 'iOS 17 and later, marker taps from 18',\n 'yes',\n 'absent',\n ]),\n withoutAvailable: true,\n },\n expoRow('LanguageModel', 'NgNativeLocalLlm', [\n 'macOS 26 and later, with Apple Intelligence on',\n 'absent',\n 'iPadOS 26 and later, with Apple Intelligence on',\n 'iOS 26 and later, with Apple Intelligence on',\n 'Gemini Nano, on the phones that ship it',\n 'absent',\n ]),\n expoRow('ScreenCapture', 'NgNativeScreenCapture', [\n '`prevent` and `allow`, no screenshot count',\n 'absent',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('StoreReview', 'NgNativeStoreReview', [\n 'yes',\n 'absent',\n 'yes',\n 'yes',\n 'with the Play Store',\n 'absent',\n ]),\n expoRow('Tracking', 'NgNativeTrackingTransparency', NOT_ON_LINUX),\n expoRow('Watch', 'WatchConnectivity', [\n 'absent',\n 'absent',\n 'no watch to pair',\n 'yes',\n 'absent',\n 'absent',\n ]),\n expoRow('Foldable', 'ExpoHinge', [\n 'absent',\n 'absent',\n 'when a hinge is reported',\n 'when a hinge is reported',\n 'when a hinge is reported',\n 'absent',\n ]),\n row(\n '`Accelerometer`, `Gyroscope`, `Magnetometer`, `DeviceMotion`, `Barometer`',\n [],\n ['absent', 'absent', 'yes', 'yes', 'yes', 'absent'],\n {\n Accelerometer: 'expo-sensors',\n Gyroscope: 'expo-sensors',\n Magnetometer: 'expo-sensors',\n DeviceMotion: 'expo-sensors',\n Barometer: 'expo-sensors',\n },\n ),\n row('`LightSensor`', [], ['absent', 'absent', 'absent', 'absent', 'yes', 'absent'], {\n LightSensor: 'expo-sensors',\n }),\n { ...row('`assets()`', [], EXPO_MODULE, { assets: 'NgNativeAsset' }), withoutAvailable: true },\n {\n ...row('`database()`', [], ['yes', 'yes', 'yes', 'yes', 'yes', 'yes'], {\n database: 'NgNativeSqlite',\n }),\n withoutAvailable: true,\n },\n {\n ...row(\n '`videoPlayer()`',\n [],\n ['yes', 'through GStreamer, H.264 only with a decoder installed', 'yes', 'yes', 'yes', 'yes'],\n { videoPlayer: 'NgNativeVideo' },\n ),\n withoutAvailable: true,\n },\n {\n ...row(\n '`audioPlayer()`, `audioRecorder()`',\n [],\n ['yes', 'through GStreamer', 'yes', 'yes', 'yes', 'yes'],\n {\n audioPlayer: 'NgNativeAudio',\n audioRecorder: 'NgNativeAudio',\n },\n ),\n withoutAvailable: true,\n },\n];\n\n/** The row a service's `available()` follows, or undefined where the table has none for it. */\nexport function supportRowOf(service: string): OsSupportRow | undefined {\n // Own keys only: `constructor` is on every object, and names no service.\n return OS_SUPPORT.find(\n (one) => (one.services && Object.hasOwn(one.services, service)) || one.inert?.includes(service),\n );\n}\n\n/**\n * One line for a service's documentation page, drawn from its row: where it is available, with\n * the row's words where it is not a plain `yes`, and where it is absent. The documentation site\n * writes it under `<!-- platforms: Service -->`, so the page cannot disagree with the table.\n */\nexport function platformsLine(service: string): string | undefined {\n const row = supportRowOf(service);\n if (!row) return undefined;\n const oses = Object.keys(SUPPORT_OSES) as SupportOs[];\n const present = oses\n .filter((os) => row.on[os] !== 'absent')\n .map((os) => (row.on[os] === 'yes' ? SUPPORT_OSES[os] : `${SUPPORT_OSES[os]} (${row.on[os]})`));\n const absent = oses.filter((os) => row.on[os] === 'absent').map((os) => SUPPORT_OSES[os]);\n const list = (names: readonly string[]) =>\n names.length < 2 ? names.join('') : `${names.slice(0, -1).join(', ')} and ${names.at(-1)}`;\n const parts = [];\n if (present.length) parts.push(`Available on ${list(present)}.`);\n if (absent.length) {\n parts.push(\n row.withoutAvailable\n ? `Absent on ${list(absent)}.`\n : `Absent on ${list(absent)}, where \\`available()\\` is false.`,\n );\n }\n return `**Platforms.** ${parts.join(' ')}`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"os-support.js","sourceRoot":"","sources":["../src/os-support.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4BH,MAAM,CAAC,MAAM,YAAY,GAAwC;IAC/D,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,UAAU;CAChB,CAAC;AAKF,MAAM,GAAG,GAAG,CACV,OAAe,EACf,MAAyB,EACzB,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAQ,EACnD,QAA2C,EAC3C,KAAyB,EACX,EAAE,CAAC,CAAC;IAClB,OAAO;IACP,MAAM;IACN,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MA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AK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC7C,CAAC","sourcesContent":["/**\n * What each desktop API and each macOS-only input does on each OS: the one source the support\n * table on the documentation site is drawn from, and that `os-support.test.ts` holds the code to.\n *\n * A cell is `yes`; `absent`, where `available()` is false and every call is inert; `ignored`, where\n * the input has no effect; `inert`, where an element draws nothing and calls nothing; or a few\n * words on what the OS does instead. It has no imports, so a build script can read it.\n */\n\n/** The OSes the table has a column for, iPadOS and iPhone apart. */\nexport type SupportOs = 'macos' | 'linux' | 'ipados' | 'iphone' | 'android' | 'web';\n\nexport interface OsSupportRow {\n /** The row's name in the table, as Markdown. */\n readonly feature: string;\n /**\n * What the row covers: exported classes and functions, inputs by name, and events as\n * `(dblclick)`. Every one exists.\n */\n readonly covers: readonly string[];\n /**\n * The services whose `available()` follows the row, each with the host module it is made from:\n * true where the row is not `absent` and the module is there, false where it is `absent`.\n */\n readonly services?: Readonly<Record<string, string>>;\n /**\n * Services with no host module of their own, whose `available()` follows the row: absent where the\n * row says `absent`, which `every-service.test.ts` checks call by call.\n */\n readonly inert?: readonly string[];\n /** The services have no `available()`, such as a view: where absent, the row says only that. */\n readonly withoutAvailable?: true;\n readonly on: Readonly<Record<SupportOs, string>>;\n}\n\nexport const SUPPORT_OSES: Readonly<Record<SupportOs, string>> = {\n macos: 'macOS',\n linux: 'Linux',\n ipados: 'iPadOS',\n iphone: 'iPhone',\n android: 'Android',\n web: 'Web host',\n};\n\n/** A row's cells, in the order of `SUPPORT_OSES`. */\ntype Cells = readonly [string, string, string, string, string, string];\n\nconst row = (\n feature: string,\n covers: readonly string[],\n [macos, linux, ipados, iphone, android, web]: Cells,\n services?: Readonly<Record<string, string>>,\n inert?: readonly string[],\n): OsSupportRow => ({\n feature,\n covers,\n on: { macos, linux, ipados, iphone, android, web },\n ...(services && { services }),\n ...(inert && { inert }),\n});\n\n/** On both desktop OSes, and nowhere else. */\nconst DESKTOP_ONLY = ['yes', 'yes', 'absent', 'absent', 'absent', 'absent'] as const;\n\n/**\n * An Expo-backed service whose `available()` is whether its module is there: the Expo module on\n * iPadOS, iPhone and Android, the desktop host's module on macOS and Linux, and nothing on the web,\n * where the Expo module is not written for it.\n */\nconst EXPO_MODULE = ['yes', 'yes', 'yes', 'yes', 'yes', 'absent'] as const;\n\n/** As `EXPO_MODULE`, where the Linux host has no source for the module, so it is absent there. */\nconst NOT_ON_LINUX = ['yes', 'absent', 'yes', 'yes', 'yes', 'absent'] as const;\n\nconst expoRow = (service: string, hostModule: string, cells: Cells = EXPO_MODULE): OsSupportRow =>\n row(`\\`${service}\\``, [], cells, { [service]: hostModule });\n\nexport const OS_SUPPORT: readonly OsSupportRow[] = [\n row(\n '`AppWindows.open`, `provideMainWindow`',\n ['AppWindows', 'CURRENT_WINDOW', 'provideMainWindow', 'provideRestorableWindows'],\n ['yes', 'yes', 'scenes, with `ios.multipleWindows`', 'absent', 'absent', 'absent'],\n { AppWindows: 'NgNativeWindows' },\n ),\n row(\n '`titleBar`, window size options',\n ['titleBar', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'resizable', 'fullScreen'],\n [\n 'yes',\n '`maxWidth` and `maxHeight` only as the window opens',\n 'ignored',\n 'ignored',\n 'ignored',\n 'ignored',\n ],\n ),\n row(\n '`trafficLightPosition`',\n ['trafficLightPosition'],\n ['yes', 'ignored', 'ignored', 'ignored', 'ignored', 'ignored'],\n ),\n row(\n '`<menu-bar>`',\n ['MenuBar', 'MenuGroup', 'MenuItem', 'MenuSeparator', 'Menus'],\n [\n 'menu bar',\n 'menu bar on KDE Plasma, a menu button in the header bar elsewhere',\n 'menu bar',\n 'inert',\n 'inert',\n 'inert',\n ],\n ),\n row(\n '`[shortcut]`, menu item shortcuts',\n ['Shortcut'],\n [\n 'yes',\n 'yes',\n 'yes',\n 'hardware keyboard',\n 'hardware keyboard, Keyboard Shortcuts helper',\n 'yes',\n ],\n ),\n row(\n '`[contextMenu]`',\n ['ContextMenu'],\n [\n 'yes',\n 'secondary click',\n 'long press or secondary click',\n 'long press',\n 'long press or right-click',\n 'inert',\n ],\n ),\n row(\n '`<tray-icon>`',\n ['TrayIcon', 'Tray'],\n ['yes', 'while a StatusNotifierWatcher runs', 'absent', 'absent', 'absent', 'absent'],\n { Tray: 'NgNativeTray' },\n ),\n row('`Dock`', ['Dock'], ['yes', 'absent', 'absent', 'absent', 'absent', 'absent'], {\n Dock: 'NgNativeDock',\n }),\n row(\n '`<split-view>`, `<sidebar>`',\n ['SplitView', 'Sidebar', 'SidebarSection', 'SidebarItem', 'SidebarItemPath'],\n [\n 'yes',\n 'AdwNavigationSplitView, a stack at compact widths',\n 'UISplitViewController, a stack at compact widths',\n 'stack root',\n 'list pane from 840dp, a stack below',\n 'two columns',\n ],\n ),\n row(\n '`<visual-effect>`',\n ['VisualEffect'],\n ['NSVisualEffectView', 'plain view', 'plain view', 'plain view', 'plain view', 'plain view'],\n ),\n row('`Processes`, `Processes.env`', ['Processes'], DESKTOP_ONLY, {\n Processes: 'NgNativeProcesses',\n }),\n row('`Shell`', ['Shell'], DESKTOP_ONLY, { Shell: 'NgNativeShell' }),\n row(\n '`FileSystem.paths.home`, `desktop`, `downloads`',\n ['home', 'desktop', 'downloads'],\n DESKTOP_ONLY,\n ),\n row('`UndoStack`', ['UndoStack'], ['yes', 'yes', 'yes', 'yes', 'absent', 'absent'], {\n UndoStack: 'NgNativeUndo',\n }),\n row('`Printing.print({ window })`, File > Print...', [], DESKTOP_ONLY),\n row(\n '`Updates.checkForAppUpdate()`, `appUpdateAvailable`',\n ['appUpdateAvailable'],\n ['`dmg` builds', 'absent', 'absent', 'absent', 'absent', 'absent'],\n ),\n row(\n 'Drag and drop: `(fileDrop)`, `[dragItem]`',\n ['FileDrop', 'DragItem', '(fileDrop)', '(fileDragEnter)', '(fileDragLeave)', 'dragItem'],\n ['yes', 'yes', 'yes', 'absent', 'absent', 'absent'],\n ),\n row(\n '`(mouseenter)`, `(mouseleave)`, `(mousemove)`, `(mouseover)`, `(mouseout)`',\n ['(mouseenter)', '(mouseleave)', '(mousemove)', '(mouseover)', '(mouseout)'],\n ['yes', 'yes', 'trackpad or mouse', 'ignored', 'mouse', 'yes'],\n ),\n row(\n '`(dblclick)`, `(contextmenu)`, `(wheel)`',\n ['(dblclick)', '(contextmenu)', '(wheel)'],\n ['yes', 'yes', 'ignored', 'ignored', 'ignored', 'ignored'],\n ),\n row(\n '`<native-button>`',\n ['NativeButton'],\n ['AppKit button', 'GTK button', 'UIKit button', 'UIKit button', 'drawn', 'HTML button'],\n ),\n row(\n '`controlSize`',\n ['controlSize'],\n ['yes', 'ignored', '`<native-button>`', '`<native-button>`', 'ignored', 'ignored'],\n ),\n row(\n '`anchor` on `<modal>`',\n ['anchor'],\n ['popover', 'popover', 'popover', 'ignored', 'ignored', 'ignored'],\n ),\n row(\n '`tooltip` on a view',\n ['tooltip'],\n ['yes', 'yes', 'ignored', 'ignored', 'ignored', '`title`'],\n ),\n row(\n '`accessibilityLevel`, `aria-level`',\n ['accessibilityLevel'],\n ['macOS 26 and later', 'yes', 'ignored', 'ignored', 'ignored', 'yes'],\n ),\n row('`<refresh-control>`', ['RefreshControl'], ['inert', 'inert', 'yes', 'yes', 'yes', 'inert']),\n row(\n '`<keyboard-dock>`, `<keyboard-avoiding-view>`',\n ['KeyboardDock', 'KeyboardAvoidingView'],\n ['plain view', 'plain view', 'yes', 'yes', 'yes', 'plain view'],\n ),\n row(\n '`<input-accessory-view>`',\n ['InputAccessoryView'],\n ['plain view', 'plain view', 'yes', 'yes', 'plain view', 'docked at the bottom'],\n ),\n row(\n '`<expo-glass>`, `<expo-glass-container>`',\n [],\n ['yes', 'plain view', 'iOS 26 and later', 'iOS 26 and later', 'plain view', 'plain view'],\n ),\n row(\n 'Community `slider`, `picker`, `masked-view`',\n [],\n ['absent: `ui-slider`, `ui-picker`', 'absent', 'yes', 'yes', 'yes', 'plain view'],\n ),\n row(\n '`HardwareBack`, `NavigationBar`',\n ['HardwareBack', 'NavigationBar'],\n ['absent', 'absent', 'absent', 'absent', 'yes', 'absent'],\n undefined,\n ['HardwareBack', 'NavigationBar'],\n ),\n row(\n '`StatusBar`, `Keyboard`',\n ['StatusBar', 'Keyboard'],\n ['absent', 'absent', 'yes', 'yes', 'yes', 'absent'],\n undefined,\n ['StatusBar', 'Keyboard'],\n ),\n row('`Vibration`', ['Vibration'], ['absent', 'absent', 'yes', 'yes', 'yes', 'yes'], undefined, [\n 'Vibration',\n ]),\n row(\n '`BackgroundTask`, `Brightness`, `DeviceOrientation`',\n [],\n ['absent', 'absent', 'yes', 'yes', 'yes', 'absent'],\n undefined,\n ['BackgroundTask', 'Brightness', 'DeviceOrientation'],\n ),\n expoRow('AppInfo', 'NgNativeApplication', [\n 'yes',\n 'brand and manufacturer from the firmware, or null',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Battery', 'NgNativeBattery', [\n 'yes',\n 'no battery without UPower',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Browser', 'NgNativeWebBrowser', [\n 'yes',\n 'an auth session ends on the link back, which reaches an installed package',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Calendar', 'NgNativeCalendar', NOT_ON_LINUX),\n expoRow('Clipboard', 'NgNativeClipboard'),\n expoRow('Crypto', 'NgNativeCrypto', ['yes', 'no MD2 or MD4', 'yes', 'yes', 'yes', 'absent']),\n expoRow('DocumentPicker', 'NgNativeDocumentPicker'),\n expoRow('FileSystem', 'NgNativeFileSystem'),\n expoRow('Fonts', 'NgNativeFont'),\n expoRow('Haptics', 'NgNativeHaptics', NOT_ON_LINUX),\n expoRow('ImageEditor', 'NgNativeImageManipulator', [\n 'yes',\n 'WebP only where a WebP writer is installed',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('ImagePicker', 'NgNativeImagePicker', [\n 'yes',\n 'the library through the file chooser, the camera in a window of its own',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('KeepAwake', 'NgNativeKeepAwake'),\n expoRow('Locale', 'NgNativeLocalization'),\n expoRow('Location', 'NgNativeLocation', [\n 'yes',\n 'no geocoding; restricted without the Location portal',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('MediaLibrary', 'NgNativeMediaLibrary', NOT_ON_LINUX),\n expoRow('Network', 'NgNativeNetwork', [\n 'yes',\n 'type `OTHER` without NetworkManager',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Notifications', 'NgNativeNotifications', [\n 'yes',\n 'no push token',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('Printing', 'NgNativePrint', ['yes', 'no HTML', 'yes', 'yes', 'yes', 'absent']),\n expoRow('SplashScreen', 'NgNativeSplashScreen'),\n expoRow('TextRecognition', 'NgNativeTextRecognition', [\n 'yes',\n 'absent',\n 'yes',\n 'yes',\n 'absent',\n 'absent',\n ]),\n expoRow('Updates', 'NgNativeUpdates', [\n 'yes',\n 'bundle updates when configured; no whole-app updater',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('AddressSearch', 'NgNativeAddressSearch', NOT_ON_LINUX),\n expoRow('AppleSignIn', 'NgNativeAppleAuthentication', [\n 'signed with the Sign in with Apple entitlement',\n 'absent',\n 'yes',\n 'yes',\n 'absent',\n 'absent',\n ]),\n expoRow('Biometrics', 'NgNativeLocalAuthentication', NOT_ON_LINUX),\n {\n ...expoRow('Camera', 'NgNativeCamera', [\n 'yes',\n 'through the Camera portal and PipeWire',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n withoutAvailable: true,\n },\n {\n ...expoRow('MapView', 'NgNativeMaps', [\n 'yes',\n 'absent',\n 'iPadOS 17 and later, marker taps from 18',\n 'iOS 17 and later, marker taps from 18',\n 'yes',\n 'absent',\n ]),\n withoutAvailable: true,\n },\n expoRow('LanguageModel', 'NgNativeLocalLlm', [\n 'macOS 26 and later, with Apple Intelligence on',\n 'absent',\n 'iPadOS 26 and later, with Apple Intelligence on',\n 'iOS 26 and later, with Apple Intelligence on',\n 'Gemini Nano, on the phones that ship it',\n 'absent',\n ]),\n expoRow('ScreenCapture', 'NgNativeScreenCapture', [\n '`prevent` and `allow`, no screenshot count',\n 'absent',\n 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('StoreReview', 'NgNativeStoreReview', [\n 'yes',\n 'absent',\n 'yes',\n 'yes',\n 'with the Play Store',\n 'absent',\n ]),\n expoRow('Tracking', 'NgNativeTrackingTransparency', NOT_ON_LINUX),\n expoRow('Watch', 'WatchConnectivity', [\n 'absent',\n 'absent',\n 'no watch to pair',\n 'yes',\n 'absent',\n 'absent',\n ]),\n expoRow('Foldable', 'ExpoHinge', [\n 'absent',\n 'absent',\n 'when a hinge is reported',\n 'when a hinge is reported',\n 'when a hinge is reported',\n 'absent',\n ]),\n row(\n '`Accelerometer`, `Gyroscope`, `Magnetometer`, `DeviceMotion`, `Barometer`',\n [],\n ['absent', 'absent', 'yes', 'yes', 'yes', 'absent'],\n {\n Accelerometer: 'expo-sensors',\n Gyroscope: 'expo-sensors',\n Magnetometer: 'expo-sensors',\n DeviceMotion: 'expo-sensors',\n Barometer: 'expo-sensors',\n },\n ),\n row('`LightSensor`', [], ['absent', 'absent', 'absent', 'absent', 'yes', 'absent'], {\n LightSensor: 'expo-sensors',\n }),\n { ...row('`assets()`', [], EXPO_MODULE, { assets: 'NgNativeAsset' }), withoutAvailable: true },\n {\n ...row('`database()`', [], ['yes', 'yes', 'yes', 'yes', 'yes', 'yes'], {\n database: 'NgNativeSqlite',\n }),\n withoutAvailable: true,\n },\n {\n ...row(\n '`videoPlayer()`',\n [],\n ['yes', 'through GStreamer, H.264 only with a decoder installed', 'yes', 'yes', 'yes', 'yes'],\n { videoPlayer: 'NgNativeVideo' },\n ),\n withoutAvailable: true,\n },\n {\n ...row(\n '`audioPlayer()`, `audioRecorder()`',\n [],\n ['yes', 'through GStreamer', 'yes', 'yes', 'yes', 'yes'],\n {\n audioPlayer: 'NgNativeAudio',\n audioRecorder: 'NgNativeAudio',\n },\n ),\n withoutAvailable: true,\n },\n];\n\n/** The row a service's `available()` follows, or undefined where the table has none for it. */\nexport function supportRowOf(service: string): OsSupportRow | undefined {\n // Own keys only: `constructor` is on every object, and names no service.\n return OS_SUPPORT.find(\n (one) => (one.services && Object.hasOwn(one.services, service)) || one.inert?.includes(service),\n );\n}\n\n/**\n * One line for a service's documentation page, drawn from its row: where it is available, with\n * the row's words where it is not a plain `yes`, and where it is absent. The documentation site\n * writes it under `<!-- platforms: Service -->`, so the page cannot disagree with the table.\n */\nexport function platformsLine(service: string): string | undefined {\n const row = supportRowOf(service);\n if (!row) return undefined;\n const oses = Object.keys(SUPPORT_OSES) as SupportOs[];\n const present = oses\n .filter((os) => row.on[os] !== 'absent')\n .map((os) => (row.on[os] === 'yes' ? SUPPORT_OSES[os] : `${SUPPORT_OSES[os]} (${row.on[os]})`));\n const absent = oses.filter((os) => row.on[os] === 'absent').map((os) => SUPPORT_OSES[os]);\n const list = (names: readonly string[]) =>\n names.length < 2 ? names.join('') : `${names.slice(0, -1).join(', ')} and ${names.at(-1)}`;\n const parts = [];\n if (present.length) parts.push(`Available on ${list(present)}.`);\n if (absent.length) {\n parts.push(\n row.withoutAvailable\n ? `Absent on ${list(absent)}.`\n : `Absent on ${list(absent)}, where \\`available()\\` is false.`,\n );\n }\n return `**Platforms.** ${parts.join(' ')}`;\n}\n"]}
|
package/dist/processes.js
CHANGED
|
@@ -171,10 +171,10 @@ export class Processes {
|
|
|
171
171
|
ngOnDestroy() {
|
|
172
172
|
this.unsubscribe?.();
|
|
173
173
|
}
|
|
174
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
175
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.
|
|
174
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Processes, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
175
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.3.0", ngImport: i0, type: Processes });
|
|
176
176
|
}
|
|
177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Processes, decorators: [{
|
|
178
178
|
type: Service
|
|
179
179
|
}] });
|
|
180
180
|
//# sourceMappingURL=processes.js.map
|
package/dist/safe-area.js
CHANGED
|
@@ -91,10 +91,10 @@ export class SafeArea {
|
|
|
91
91
|
this.trailingControls.set(previous?.[1].titlebarTrailing ?? 0);
|
|
92
92
|
return true;
|
|
93
93
|
}
|
|
94
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
95
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: SafeArea, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
95
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.3.0", ngImport: i0, type: SafeArea });
|
|
96
96
|
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: SafeArea, decorators: [{
|
|
98
98
|
type: Service
|
|
99
99
|
}] });
|
|
100
100
|
//# sourceMappingURL=safe-area.js.map
|
package/dist/screen.js
CHANGED
|
@@ -99,10 +99,10 @@ export class Screen {
|
|
|
99
99
|
constructor() {
|
|
100
100
|
inject(DestroyRef).onDestroy(this.source.subscribe((sizes) => this.sizes.set(sizes)));
|
|
101
101
|
}
|
|
102
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
103
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Screen, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
103
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.3.0", ngImport: i0, type: Screen });
|
|
104
104
|
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Screen, decorators: [{
|
|
106
106
|
type: Service
|
|
107
107
|
}], ctorParameters: () => [] });
|
|
108
108
|
//# sourceMappingURL=screen.js.map
|
package/dist/sharing.js
CHANGED
|
@@ -60,10 +60,10 @@ export class Sharing {
|
|
|
60
60
|
return false;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
64
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.
|
|
63
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Sharing, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
64
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.3.0", ngImport: i0, type: Sharing });
|
|
65
65
|
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Sharing, decorators: [{
|
|
67
67
|
type: Service
|
|
68
68
|
}] });
|
|
69
69
|
//# sourceMappingURL=sharing.js.map
|
package/dist/shell.js
CHANGED
|
@@ -64,10 +64,10 @@ export class Shell {
|
|
|
64
64
|
return false;
|
|
65
65
|
return (await this.native?.showItemInFolder(path)) ?? false;
|
|
66
66
|
}
|
|
67
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
68
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.
|
|
67
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Shell, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
68
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.3.0", ngImport: i0, type: Shell });
|
|
69
69
|
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: Shell, decorators: [{
|
|
71
71
|
type: Service
|
|
72
72
|
}] });
|
|
73
73
|
//# sourceMappingURL=shell.js.map
|