@ng-native/device 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accessibility.d.ts +5 -3
- package/dist/accessibility.js +5 -0
- package/dist/accessibility.js.map +1 -1
- package/dist/desktop-options.d.ts +5 -0
- package/dist/desktop-options.js +6 -1
- package/dist/desktop-options.js.map +1 -1
- package/dist/dialogs.js +4 -2
- package/dist/dialogs.js.map +1 -1
- package/dist/dock.d.ts +2 -0
- package/dist/dock.js +4 -1
- package/dist/dock.js.map +1 -1
- package/dist/menu-model.d.ts +11 -9
- package/dist/menu-model.js +72 -9
- package/dist/menu-model.js.map +1 -1
- package/dist/menus.js +2 -2
- package/dist/menus.js.map +1 -1
- package/dist/os-support.d.ts +1 -1
- package/dist/os-support.js +188 -62
- package/dist/os-support.js.map +1 -1
- package/dist/os-version.d.ts +3 -1
- package/dist/os-version.js +3 -1
- package/dist/os-version.js.map +1 -1
- package/dist/os.d.ts +5 -3
- package/dist/os.js +5 -3
- package/dist/os.js.map +1 -1
- package/dist/processes.d.ts +2 -0
- package/dist/processes.js +4 -1
- package/dist/processes.js.map +1 -1
- package/dist/safe-area.d.ts +12 -3
- package/dist/safe-area.js +16 -4
- package/dist/safe-area.js.map +1 -1
- package/dist/sharing.js +4 -3
- package/dist/sharing.js.map +1 -1
- package/dist/spawn-rules.js +8 -0
- package/dist/spawn-rules.js.map +1 -1
- package/dist/tray.d.ts +6 -3
- package/dist/tray.js +8 -4
- package/dist/tray.js.map +1 -1
- package/dist/vibration.d.ts +1 -1
- package/dist/vibration.js +3 -3
- package/dist/vibration.js.map +1 -1
- package/dist/window-restore.js +1 -1
- package/dist/window-restore.js.map +1 -1
- package/package.json +2 -2
package/dist/os-support.js
CHANGED
|
@@ -8,106 +8,221 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export const SUPPORT_OSES = {
|
|
10
10
|
macos: 'macOS',
|
|
11
|
+
linux: 'Linux',
|
|
11
12
|
ipados: 'iPadOS',
|
|
12
13
|
iphone: 'iPhone',
|
|
13
14
|
android: 'Android',
|
|
14
15
|
web: 'Web host',
|
|
15
16
|
};
|
|
16
|
-
const row = (feature, covers, [macos, ipados, iphone, android, web], services, inert) => ({
|
|
17
|
+
const row = (feature, covers, [macos, linux, ipados, iphone, android, web], services, inert) => ({
|
|
17
18
|
feature,
|
|
18
19
|
covers,
|
|
19
|
-
on: { macos, ipados, iphone, android, web },
|
|
20
|
+
on: { macos, linux, ipados, iphone, android, web },
|
|
20
21
|
...(services && { services }),
|
|
21
22
|
...(inert && { inert }),
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
/** On both desktop OSes, and nowhere else. */
|
|
25
|
+
const DESKTOP_ONLY = ['yes', 'yes', 'absent', 'absent', 'absent', 'absent'];
|
|
24
26
|
/**
|
|
25
27
|
* An Expo-backed service whose `available()` is whether its module is there: the Expo module on
|
|
26
|
-
* iPadOS, iPhone and Android, the desktop host's module on macOS, and nothing on the web,
|
|
27
|
-
* the Expo module is not written for it.
|
|
28
|
+
* iPadOS, iPhone and Android, the desktop host's module on macOS and Linux, and nothing on the web,
|
|
29
|
+
* where the Expo module is not written for it.
|
|
28
30
|
*/
|
|
29
|
-
const EXPO_MODULE = ['yes', 'yes', 'yes', 'yes', 'absent'];
|
|
31
|
+
const EXPO_MODULE = ['yes', 'yes', 'yes', 'yes', 'yes', 'absent'];
|
|
32
|
+
/** As `EXPO_MODULE`, where the Linux host has no source for the module, so it is absent there. */
|
|
33
|
+
const NOT_ON_LINUX = ['yes', 'absent', 'yes', 'yes', 'yes', 'absent'];
|
|
30
34
|
const expoRow = (service, hostModule, cells = EXPO_MODULE) => row(`\`${service}\``, [], cells, { [service]: hostModule });
|
|
31
35
|
export const OS_SUPPORT = [
|
|
32
|
-
row('`AppWindows.open`, `provideMainWindow`', ['AppWindows', 'CURRENT_WINDOW', 'provideMainWindow', 'provideRestorableWindows'], ['yes', 'scenes, with `ios.multipleWindows`', 'absent', 'absent', 'absent'], { AppWindows: 'NgNativeWindows' }),
|
|
33
|
-
row('`titleBar`, window size options', ['titleBar', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'resizable', 'fullScreen'], [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
row('`AppWindows.open`, `provideMainWindow`', ['AppWindows', 'CURRENT_WINDOW', 'provideMainWindow', 'provideRestorableWindows'], ['yes', 'yes', 'scenes, with `ios.multipleWindows`', 'absent', 'absent', 'absent'], { AppWindows: 'NgNativeWindows' }),
|
|
37
|
+
row('`titleBar`, window size options', ['titleBar', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'resizable', 'fullScreen'], [
|
|
38
|
+
'yes',
|
|
39
|
+
'`maxWidth` and `maxHeight` only as the window opens',
|
|
40
|
+
'ignored',
|
|
41
|
+
'ignored',
|
|
42
|
+
'ignored',
|
|
43
|
+
'ignored',
|
|
44
|
+
]),
|
|
45
|
+
row('`<menu-bar>`', ['MenuBar', 'MenuGroup', 'MenuItem', 'MenuSeparator', 'Menus'], [
|
|
46
|
+
'menu bar',
|
|
47
|
+
'menu bar on KDE Plasma, a menu button in the header bar elsewhere',
|
|
48
|
+
'menu bar',
|
|
49
|
+
'inert',
|
|
50
|
+
'inert',
|
|
51
|
+
'inert',
|
|
52
|
+
]),
|
|
53
|
+
row('`[shortcut]`, menu item shortcuts', ['Shortcut'], [
|
|
54
|
+
'yes',
|
|
55
|
+
'yes',
|
|
56
|
+
'yes',
|
|
57
|
+
'hardware keyboard',
|
|
58
|
+
'hardware keyboard, Keyboard Shortcuts helper',
|
|
59
|
+
'yes',
|
|
60
|
+
]),
|
|
61
|
+
row('`[contextMenu]`', ['ContextMenu'], [
|
|
62
|
+
'yes',
|
|
63
|
+
'secondary click',
|
|
64
|
+
'long press or secondary click',
|
|
65
|
+
'long press',
|
|
66
|
+
'long press or right-click',
|
|
67
|
+
'inert',
|
|
68
|
+
]),
|
|
69
|
+
row('`<tray-icon>`', ['TrayIcon', 'Tray'], ['yes', 'while a StatusNotifierWatcher runs', 'absent', 'absent', 'absent', 'absent'], { Tray: 'NgNativeTray' }),
|
|
70
|
+
row('`Dock`', ['Dock'], ['yes', 'absent', 'absent', 'absent', 'absent', 'absent'], {
|
|
39
71
|
Dock: 'NgNativeDock',
|
|
40
72
|
}),
|
|
41
73
|
row('`<split-view>`, `<sidebar>`', ['SplitView', 'Sidebar', 'SidebarSection', 'SidebarItem', 'SidebarItemPath'], [
|
|
42
74
|
'yes',
|
|
75
|
+
'AdwNavigationSplitView, a stack at compact widths',
|
|
43
76
|
'UISplitViewController, a stack at compact widths',
|
|
44
77
|
'stack root',
|
|
45
78
|
'list pane from 840dp, a stack below',
|
|
46
79
|
'two columns',
|
|
47
80
|
]),
|
|
48
|
-
row('`Processes`, `Processes.env`', ['Processes'],
|
|
81
|
+
row('`Processes`, `Processes.env`', ['Processes'], DESKTOP_ONLY, {
|
|
49
82
|
Processes: 'NgNativeProcesses',
|
|
50
83
|
}),
|
|
51
|
-
row('`Shell`', ['Shell'],
|
|
52
|
-
row('`FileSystem.paths.home`, `desktop`, `downloads`', ['home', 'desktop', 'downloads'],
|
|
53
|
-
row('`UndoStack`', ['UndoStack'], ['yes', 'yes', 'yes', 'absent', 'absent'], {
|
|
84
|
+
row('`Shell`', ['Shell'], DESKTOP_ONLY, { Shell: 'NgNativeShell' }),
|
|
85
|
+
row('`FileSystem.paths.home`, `desktop`, `downloads`', ['home', 'desktop', 'downloads'], DESKTOP_ONLY),
|
|
86
|
+
row('`UndoStack`', ['UndoStack'], ['yes', 'yes', 'yes', 'yes', 'absent', 'absent'], {
|
|
54
87
|
UndoStack: 'NgNativeUndo',
|
|
55
88
|
}),
|
|
56
|
-
row('`Printing.print({ window })`, File > Print...', [],
|
|
57
|
-
row('`Updates.checkForAppUpdate()`, `appUpdateAvailable`', ['appUpdateAvailable'], ['`dmg` builds', 'absent', 'absent', 'absent', 'absent']),
|
|
58
|
-
row('Drag and drop: `(fileDrop)`, `[dragItem]`', ['FileDrop', 'DragItem', '(fileDrop)', '(fileDragEnter)', '(fileDragLeave)', 'dragItem'], ['yes', 'yes', 'absent', 'absent', 'absent']),
|
|
59
|
-
row('`(mouseenter)`, `(mouseleave)`, `(mousemove)`, `(mouseover)`, `(mouseout)`', ['(mouseenter)', '(mouseleave)', '(mousemove)', '(mouseover)', '(mouseout)'], ['yes', 'trackpad or mouse', 'ignored', 'mouse', 'yes']),
|
|
60
|
-
row('`(dblclick)`, `(contextmenu)`, `(wheel)`', ['(dblclick)', '(contextmenu)', '(wheel)'], ['yes', 'ignored', 'ignored', 'ignored', 'ignored']),
|
|
61
|
-
row('`<native-button>`', ['NativeButton'], ['AppKit button', 'UIKit button', 'UIKit button', 'drawn', 'HTML button']),
|
|
62
|
-
row('`controlSize`', ['controlSize'], ['yes', '`<native-button>`', '`<native-button>`', 'ignored', 'ignored']),
|
|
63
|
-
row('`anchor` on `<modal>`', ['anchor'], ['popover', 'popover', 'ignored', 'ignored', 'ignored']),
|
|
64
|
-
row('`accessibilityLevel`, `aria-level`', ['accessibilityLevel'], ['macOS 26 and later', 'ignored', 'ignored', 'ignored', 'yes']),
|
|
65
|
-
row('`<refresh-control>`', ['RefreshControl'], ['inert', 'yes', 'yes', 'yes', 'inert']),
|
|
66
|
-
row('`<keyboard-dock>`, `<keyboard-avoiding-view>`', ['KeyboardDock', 'KeyboardAvoidingView'], ['plain view', 'yes', 'yes', 'yes', 'plain view']),
|
|
67
|
-
row('`<input-accessory-view>`', ['InputAccessoryView'], ['plain view', 'yes', 'yes', 'plain view', 'docked at the bottom']),
|
|
68
|
-
row('`<expo-glass>`, `<expo-glass-container>`', [], ['yes', 'iOS 26 and later', 'iOS 26 and later', 'plain view', 'plain view']),
|
|
69
|
-
row('Community `slider`, `picker`, `masked-view`', [], ['absent: `ui-slider`, `ui-picker`', 'yes', 'yes', 'yes', 'plain view']),
|
|
70
|
-
row('`HardwareBack`, `NavigationBar`', ['HardwareBack', 'NavigationBar'], ['absent', 'absent', 'absent', 'yes', 'absent'], undefined, ['HardwareBack', 'NavigationBar']),
|
|
71
|
-
row('`StatusBar`, `Keyboard`', ['StatusBar', 'Keyboard'], ['absent', 'yes', 'yes', 'yes', 'absent'], undefined, ['StatusBar', 'Keyboard']),
|
|
72
|
-
row('`Vibration`', ['Vibration'], ['absent', 'yes', 'yes', 'yes', 'yes'], undefined, [
|
|
89
|
+
row('`Printing.print({ window })`, File > Print...', [], DESKTOP_ONLY),
|
|
90
|
+
row('`Updates.checkForAppUpdate()`, `appUpdateAvailable`', ['appUpdateAvailable'], ['`dmg` builds', 'absent', 'absent', 'absent', 'absent', 'absent']),
|
|
91
|
+
row('Drag and drop: `(fileDrop)`, `[dragItem]`', ['FileDrop', 'DragItem', '(fileDrop)', '(fileDragEnter)', '(fileDragLeave)', 'dragItem'], ['yes', 'yes', 'yes', 'absent', 'absent', 'absent']),
|
|
92
|
+
row('`(mouseenter)`, `(mouseleave)`, `(mousemove)`, `(mouseover)`, `(mouseout)`', ['(mouseenter)', '(mouseleave)', '(mousemove)', '(mouseover)', '(mouseout)'], ['yes', 'yes', 'trackpad or mouse', 'ignored', 'mouse', 'yes']),
|
|
93
|
+
row('`(dblclick)`, `(contextmenu)`, `(wheel)`', ['(dblclick)', '(contextmenu)', '(wheel)'], ['yes', 'yes', 'ignored', 'ignored', 'ignored', 'ignored']),
|
|
94
|
+
row('`<native-button>`', ['NativeButton'], ['AppKit button', 'GTK button', 'UIKit button', 'UIKit button', 'drawn', 'HTML button']),
|
|
95
|
+
row('`controlSize`', ['controlSize'], ['yes', 'ignored', '`<native-button>`', '`<native-button>`', 'ignored', 'ignored']),
|
|
96
|
+
row('`anchor` on `<modal>`', ['anchor'], ['popover', 'popover', 'popover', 'ignored', 'ignored', 'ignored']),
|
|
97
|
+
row('`accessibilityLevel`, `aria-level`', ['accessibilityLevel'], ['macOS 26 and later', 'yes', 'ignored', 'ignored', 'ignored', 'yes']),
|
|
98
|
+
row('`<refresh-control>`', ['RefreshControl'], ['inert', 'inert', 'yes', 'yes', 'yes', 'inert']),
|
|
99
|
+
row('`<keyboard-dock>`, `<keyboard-avoiding-view>`', ['KeyboardDock', 'KeyboardAvoidingView'], ['plain view', 'plain view', 'yes', 'yes', 'yes', 'plain view']),
|
|
100
|
+
row('`<input-accessory-view>`', ['InputAccessoryView'], ['plain view', 'plain view', 'yes', 'yes', 'plain view', 'docked at the bottom']),
|
|
101
|
+
row('`<expo-glass>`, `<expo-glass-container>`', [], ['yes', 'plain view', 'iOS 26 and later', 'iOS 26 and later', 'plain view', 'plain view']),
|
|
102
|
+
row('Community `slider`, `picker`, `masked-view`', [], ['absent: `ui-slider`, `ui-picker`', 'absent', 'yes', 'yes', 'yes', 'plain view']),
|
|
103
|
+
row('`HardwareBack`, `NavigationBar`', ['HardwareBack', 'NavigationBar'], ['absent', 'absent', 'absent', 'absent', 'yes', 'absent'], undefined, ['HardwareBack', 'NavigationBar']),
|
|
104
|
+
row('`StatusBar`, `Keyboard`', ['StatusBar', 'Keyboard'], ['absent', 'absent', 'yes', 'yes', 'yes', 'absent'], undefined, ['StatusBar', 'Keyboard']),
|
|
105
|
+
row('`Vibration`', ['Vibration'], ['absent', 'absent', 'yes', 'yes', 'yes', 'yes'], undefined, [
|
|
73
106
|
'Vibration',
|
|
74
107
|
]),
|
|
75
|
-
row('`BackgroundTask`, `Brightness`, `DeviceOrientation`', [], ['absent', 'yes', 'yes', 'yes', 'absent'], undefined, ['BackgroundTask', 'Brightness', 'DeviceOrientation']),
|
|
76
|
-
expoRow('AppInfo', 'NgNativeApplication'
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
108
|
+
row('`BackgroundTask`, `Brightness`, `DeviceOrientation`', [], ['absent', 'absent', 'yes', 'yes', 'yes', 'absent'], undefined, ['BackgroundTask', 'Brightness', 'DeviceOrientation']),
|
|
109
|
+
expoRow('AppInfo', 'NgNativeApplication', [
|
|
110
|
+
'yes',
|
|
111
|
+
'brand and manufacturer from the firmware, or null',
|
|
112
|
+
'yes',
|
|
113
|
+
'yes',
|
|
114
|
+
'yes',
|
|
115
|
+
'absent',
|
|
116
|
+
]),
|
|
117
|
+
expoRow('Battery', 'NgNativeBattery', [
|
|
118
|
+
'yes',
|
|
119
|
+
'no battery without UPower',
|
|
120
|
+
'yes',
|
|
121
|
+
'yes',
|
|
122
|
+
'yes',
|
|
123
|
+
'absent',
|
|
124
|
+
]),
|
|
125
|
+
expoRow('Browser', 'NgNativeWebBrowser', [
|
|
126
|
+
'yes',
|
|
127
|
+
'an auth session ends on the link back, which reaches an installed package',
|
|
128
|
+
'yes',
|
|
129
|
+
'yes',
|
|
130
|
+
'yes',
|
|
131
|
+
'absent',
|
|
132
|
+
]),
|
|
133
|
+
expoRow('Calendar', 'NgNativeCalendar', NOT_ON_LINUX),
|
|
80
134
|
expoRow('Clipboard', 'NgNativeClipboard'),
|
|
81
|
-
expoRow('Crypto', 'NgNativeCrypto'),
|
|
135
|
+
expoRow('Crypto', 'NgNativeCrypto', ['yes', 'no MD2 or MD4', 'yes', 'yes', 'yes', 'absent']),
|
|
82
136
|
expoRow('DocumentPicker', 'NgNativeDocumentPicker'),
|
|
83
137
|
expoRow('FileSystem', 'NgNativeFileSystem'),
|
|
84
138
|
expoRow('Fonts', 'NgNativeFont'),
|
|
85
|
-
expoRow('Haptics', 'NgNativeHaptics'),
|
|
86
|
-
expoRow('ImageEditor', 'NgNativeImageManipulator'
|
|
87
|
-
|
|
139
|
+
expoRow('Haptics', 'NgNativeHaptics', NOT_ON_LINUX),
|
|
140
|
+
expoRow('ImageEditor', 'NgNativeImageManipulator', [
|
|
141
|
+
'yes',
|
|
142
|
+
'WebP only where a WebP writer is installed',
|
|
143
|
+
'yes',
|
|
144
|
+
'yes',
|
|
145
|
+
'yes',
|
|
146
|
+
'absent',
|
|
147
|
+
]),
|
|
148
|
+
expoRow('ImagePicker', 'NgNativeImagePicker', [
|
|
149
|
+
'yes',
|
|
150
|
+
'the library through the file chooser, the camera in a window of its own',
|
|
151
|
+
'yes',
|
|
152
|
+
'yes',
|
|
153
|
+
'yes',
|
|
154
|
+
'absent',
|
|
155
|
+
]),
|
|
88
156
|
expoRow('KeepAwake', 'NgNativeKeepAwake'),
|
|
89
157
|
expoRow('Locale', 'NgNativeLocalization'),
|
|
90
|
-
expoRow('Location', 'NgNativeLocation'
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
158
|
+
expoRow('Location', 'NgNativeLocation', [
|
|
159
|
+
'yes',
|
|
160
|
+
'no geocoding; restricted without the Location portal',
|
|
161
|
+
'yes',
|
|
162
|
+
'yes',
|
|
163
|
+
'yes',
|
|
164
|
+
'absent',
|
|
165
|
+
]),
|
|
166
|
+
expoRow('MediaLibrary', 'NgNativeMediaLibrary', NOT_ON_LINUX),
|
|
167
|
+
expoRow('Network', 'NgNativeNetwork', [
|
|
168
|
+
'yes',
|
|
169
|
+
'type `OTHER` without NetworkManager',
|
|
170
|
+
'yes',
|
|
171
|
+
'yes',
|
|
172
|
+
'yes',
|
|
173
|
+
'absent',
|
|
174
|
+
]),
|
|
175
|
+
expoRow('Notifications', 'NgNativeNotifications', [
|
|
176
|
+
'yes',
|
|
177
|
+
'no push token',
|
|
178
|
+
'yes',
|
|
179
|
+
'yes',
|
|
180
|
+
'yes',
|
|
181
|
+
'absent',
|
|
182
|
+
]),
|
|
183
|
+
expoRow('Printing', 'NgNativePrint', ['yes', 'no HTML', 'yes', 'yes', 'yes', 'absent']),
|
|
95
184
|
expoRow('SplashScreen', 'NgNativeSplashScreen'),
|
|
96
|
-
expoRow('TextRecognition', 'NgNativeTextRecognition', [
|
|
97
|
-
|
|
98
|
-
|
|
185
|
+
expoRow('TextRecognition', 'NgNativeTextRecognition', [
|
|
186
|
+
'yes',
|
|
187
|
+
'absent',
|
|
188
|
+
'yes',
|
|
189
|
+
'yes',
|
|
190
|
+
'absent',
|
|
191
|
+
'absent',
|
|
192
|
+
]),
|
|
193
|
+
expoRow('Updates', 'NgNativeUpdates', [
|
|
194
|
+
'yes',
|
|
195
|
+
'bundle updates when configured; no whole-app updater',
|
|
196
|
+
'yes',
|
|
197
|
+
'yes',
|
|
198
|
+
'yes',
|
|
199
|
+
'absent',
|
|
200
|
+
]),
|
|
201
|
+
expoRow('AddressSearch', 'NgNativeAddressSearch', NOT_ON_LINUX),
|
|
99
202
|
expoRow('AppleSignIn', 'NgNativeAppleAuthentication', [
|
|
100
203
|
'signed with the Sign in with Apple entitlement',
|
|
204
|
+
'absent',
|
|
101
205
|
'yes',
|
|
102
206
|
'yes',
|
|
103
207
|
'absent',
|
|
104
208
|
'absent',
|
|
105
209
|
]),
|
|
106
|
-
expoRow('Biometrics', 'NgNativeLocalAuthentication'),
|
|
107
|
-
{
|
|
210
|
+
expoRow('Biometrics', 'NgNativeLocalAuthentication', NOT_ON_LINUX),
|
|
211
|
+
{
|
|
212
|
+
...expoRow('Camera', 'NgNativeCamera', [
|
|
213
|
+
'yes',
|
|
214
|
+
'through the Camera portal and PipeWire',
|
|
215
|
+
'yes',
|
|
216
|
+
'yes',
|
|
217
|
+
'yes',
|
|
218
|
+
'absent',
|
|
219
|
+
]),
|
|
220
|
+
withoutAvailable: true,
|
|
221
|
+
},
|
|
108
222
|
{
|
|
109
223
|
...expoRow('MapView', 'NgNativeMaps', [
|
|
110
224
|
'yes',
|
|
225
|
+
'absent',
|
|
111
226
|
'iPadOS 17 and later, marker taps from 18',
|
|
112
227
|
'iOS 17 and later, marker taps from 18',
|
|
113
228
|
'yes',
|
|
@@ -117,6 +232,7 @@ export const OS_SUPPORT = [
|
|
|
117
232
|
},
|
|
118
233
|
expoRow('LanguageModel', 'NgNativeLocalLlm', [
|
|
119
234
|
'macOS 26 and later, with Apple Intelligence on',
|
|
235
|
+
'absent',
|
|
120
236
|
'iPadOS 26 and later, with Apple Intelligence on',
|
|
121
237
|
'iOS 26 and later, with Apple Intelligence on',
|
|
122
238
|
'Gemini Nano, on the phones that ship it',
|
|
@@ -124,6 +240,7 @@ export const OS_SUPPORT = [
|
|
|
124
240
|
]),
|
|
125
241
|
expoRow('ScreenCapture', 'NgNativeScreenCapture', [
|
|
126
242
|
'`prevent` and `allow`, no screenshot count',
|
|
243
|
+
'absent',
|
|
127
244
|
'yes',
|
|
128
245
|
'yes',
|
|
129
246
|
'yes',
|
|
@@ -131,43 +248,52 @@ export const OS_SUPPORT = [
|
|
|
131
248
|
]),
|
|
132
249
|
expoRow('StoreReview', 'NgNativeStoreReview', [
|
|
133
250
|
'yes',
|
|
251
|
+
'absent',
|
|
134
252
|
'yes',
|
|
135
253
|
'yes',
|
|
136
254
|
'with the Play Store',
|
|
137
255
|
'absent',
|
|
138
256
|
]),
|
|
139
|
-
expoRow('Tracking', 'NgNativeTrackingTransparency'),
|
|
140
|
-
expoRow('Watch', 'WatchConnectivity', [
|
|
257
|
+
expoRow('Tracking', 'NgNativeTrackingTransparency', NOT_ON_LINUX),
|
|
258
|
+
expoRow('Watch', 'WatchConnectivity', [
|
|
259
|
+
'absent',
|
|
260
|
+
'absent',
|
|
261
|
+
'no watch to pair',
|
|
262
|
+
'yes',
|
|
263
|
+
'absent',
|
|
264
|
+
'absent',
|
|
265
|
+
]),
|
|
141
266
|
expoRow('Foldable', 'ExpoHinge', [
|
|
267
|
+
'absent',
|
|
142
268
|
'absent',
|
|
143
269
|
'when a hinge is reported',
|
|
144
270
|
'when a hinge is reported',
|
|
145
271
|
'when a hinge is reported',
|
|
146
272
|
'absent',
|
|
147
273
|
]),
|
|
148
|
-
row('`Accelerometer`, `Gyroscope`, `Magnetometer`, `DeviceMotion`, `Barometer`', [], ['absent', 'yes', 'yes', 'yes', 'absent'], {
|
|
274
|
+
row('`Accelerometer`, `Gyroscope`, `Magnetometer`, `DeviceMotion`, `Barometer`', [], ['absent', 'absent', 'yes', 'yes', 'yes', 'absent'], {
|
|
149
275
|
Accelerometer: 'expo-sensors',
|
|
150
276
|
Gyroscope: 'expo-sensors',
|
|
151
277
|
Magnetometer: 'expo-sensors',
|
|
152
278
|
DeviceMotion: 'expo-sensors',
|
|
153
279
|
Barometer: 'expo-sensors',
|
|
154
280
|
}),
|
|
155
|
-
row('`LightSensor`', [], ['absent', 'absent', 'absent', 'yes', 'absent'], {
|
|
281
|
+
row('`LightSensor`', [], ['absent', 'absent', 'absent', 'absent', 'yes', 'absent'], {
|
|
156
282
|
LightSensor: 'expo-sensors',
|
|
157
283
|
}),
|
|
158
284
|
{ ...row('`assets()`', [], EXPO_MODULE, { assets: 'NgNativeAsset' }), withoutAvailable: true },
|
|
159
285
|
{
|
|
160
|
-
...row('`database()`', [], ['yes', 'yes', 'yes', 'yes', 'yes'
|
|
286
|
+
...row('`database()`', [], ['yes', 'yes', 'yes', 'yes', 'yes', 'yes'], {
|
|
287
|
+
database: 'NgNativeSqlite',
|
|
288
|
+
}),
|
|
161
289
|
withoutAvailable: true,
|
|
162
290
|
},
|
|
163
291
|
{
|
|
164
|
-
...row('`videoPlayer()`', [], ['yes', 'yes', 'yes', 'yes', 'yes'], {
|
|
165
|
-
videoPlayer: 'NgNativeVideo',
|
|
166
|
-
}),
|
|
292
|
+
...row('`videoPlayer()`', [], ['yes', 'through GStreamer, H.264 only with a decoder installed', 'yes', 'yes', 'yes', 'yes'], { videoPlayer: 'NgNativeVideo' }),
|
|
167
293
|
withoutAvailable: true,
|
|
168
294
|
},
|
|
169
295
|
{
|
|
170
|
-
...row('`audioPlayer()`, `audioRecorder()`', [], ['yes', 'yes', 'yes', 'yes', 'yes'], {
|
|
296
|
+
...row('`audioPlayer()`, `audioRecorder()`', [], ['yes', 'through GStreamer', 'yes', 'yes', 'yes', 'yes'], {
|
|
171
297
|
audioPlayer: 'NgNativeAudio',
|
|
172
298
|
audioRecorder: 'NgNativeAudio',
|
|
173
299
|
}),
|
package/dist/os-support.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os-support.js","sourceRoot":"","sources":["../src/os-support.ts"],"names":[],"mappings":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AAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7F,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,IAAI,OAAO,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjE,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,KAAK,CAAC,IAAI,CACR,GAAG,CAAC,gBAAgB;YAClB,CAAC,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,GAAG;YAC9B,CAAC,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,mCAAmC,CACjE,CAAC;IACJ,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' | '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 ipados: 'iPadOS',\n iphone: 'iPhone',\n android: 'Android',\n web: 'Web host',\n};\n\nconst row = (\n feature: string,\n covers: readonly string[],\n [macos, ipados, iphone, android, web]: readonly [string, string, string, string, string],\n services?: Readonly<Record<string, string>>,\n inert?: readonly string[],\n): OsSupportRow => ({\n feature,\n covers,\n on: { macos, ipados, iphone, android, web },\n ...(services && { services }),\n ...(inert && { inert }),\n});\n\nconst MAC_ONLY = ['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 nothing on the web, where\n * the Expo module is not written for it.\n */\nconst EXPO_MODULE = ['yes', 'yes', 'yes', 'yes', 'absent'] as const;\n\nconst expoRow = (\n service: string,\n hostModule: string,\n cells: readonly [string, string, string, string, string] = EXPO_MODULE,\n): OsSupportRow => 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', '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 ['yes', 'ignored', 'ignored', 'ignored', 'ignored'],\n ),\n row(\n '`<menu-bar>`',\n ['MenuBar', 'MenuGroup', 'MenuItem', 'MenuSeparator', 'Menus'],\n ['menu bar', 'menu bar', 'inert', 'inert', 'inert'],\n ),\n row(\n '`[shortcut]`, menu item shortcuts',\n ['Shortcut'],\n ['yes', 'yes', 'hardware keyboard', 'hardware keyboard, Keyboard Shortcuts helper', 'yes'],\n ),\n row(\n '`[contextMenu]`',\n ['ContextMenu'],\n ['yes', 'long press or secondary click', 'long press', 'long press or right-click', 'inert'],\n ),\n row('`<tray-icon>`, `Dock`', ['TrayIcon', 'Tray', 'Dock'], MAC_ONLY, {\n Tray: 'NgNativeTray',\n Dock: 'NgNativeDock',\n }),\n row(\n '`<split-view>`, `<sidebar>`',\n ['SplitView', 'Sidebar', 'SidebarSection', 'SidebarItem', 'SidebarItemPath'],\n [\n 'yes',\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'], MAC_ONLY, {\n Processes: 'NgNativeProcesses',\n }),\n row('`Shell`', ['Shell'], MAC_ONLY, { Shell: 'NgNativeShell' }),\n row(\n '`FileSystem.paths.home`, `desktop`, `downloads`',\n ['home', 'desktop', 'downloads'],\n MAC_ONLY,\n ),\n row('`UndoStack`', ['UndoStack'], ['yes', 'yes', 'yes', 'absent', 'absent'], {\n UndoStack: 'NgNativeUndo',\n }),\n row('`Printing.print({ window })`, File > Print...', [], MAC_ONLY),\n row(\n '`Updates.checkForAppUpdate()`, `appUpdateAvailable`',\n ['appUpdateAvailable'],\n ['`dmg` builds', 'absent', 'absent', 'absent', 'absent'],\n ),\n row(\n 'Drag and drop: `(fileDrop)`, `[dragItem]`',\n ['FileDrop', 'DragItem', '(fileDrop)', '(fileDragEnter)', '(fileDragLeave)', 'dragItem'],\n ['yes', 'yes', 'absent', 'absent', 'absent'],\n ),\n row(\n '`(mouseenter)`, `(mouseleave)`, `(mousemove)`, `(mouseover)`, `(mouseout)`',\n ['(mouseenter)', '(mouseleave)', '(mousemove)', '(mouseover)', '(mouseout)'],\n ['yes', 'trackpad or mouse', 'ignored', 'mouse', 'yes'],\n ),\n row(\n '`(dblclick)`, `(contextmenu)`, `(wheel)`',\n ['(dblclick)', '(contextmenu)', '(wheel)'],\n ['yes', 'ignored', 'ignored', 'ignored', 'ignored'],\n ),\n row(\n '`<native-button>`',\n ['NativeButton'],\n ['AppKit button', 'UIKit button', 'UIKit button', 'drawn', 'HTML button'],\n ),\n row(\n '`controlSize`',\n ['controlSize'],\n ['yes', '`<native-button>`', '`<native-button>`', 'ignored', 'ignored'],\n ),\n row('`anchor` on `<modal>`', ['anchor'], ['popover', 'popover', 'ignored', 'ignored', 'ignored']),\n row(\n '`accessibilityLevel`, `aria-level`',\n ['accessibilityLevel'],\n ['macOS 26 and later', 'ignored', 'ignored', 'ignored', 'yes'],\n ),\n row('`<refresh-control>`', ['RefreshControl'], ['inert', 'yes', 'yes', 'yes', 'inert']),\n row(\n '`<keyboard-dock>`, `<keyboard-avoiding-view>`',\n ['KeyboardDock', 'KeyboardAvoidingView'],\n ['plain view', 'yes', 'yes', 'yes', 'plain view'],\n ),\n row(\n '`<input-accessory-view>`',\n ['InputAccessoryView'],\n ['plain view', 'yes', 'yes', 'plain view', 'docked at the bottom'],\n ),\n row(\n '`<expo-glass>`, `<expo-glass-container>`',\n [],\n ['yes', '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`', 'yes', 'yes', 'yes', 'plain view'],\n ),\n row(\n '`HardwareBack`, `NavigationBar`',\n ['HardwareBack', 'NavigationBar'],\n ['absent', 'absent', 'absent', 'yes', 'absent'],\n undefined,\n ['HardwareBack', 'NavigationBar'],\n ),\n row(\n '`StatusBar`, `Keyboard`',\n ['StatusBar', 'Keyboard'],\n ['absent', 'yes', 'yes', 'yes', 'absent'],\n undefined,\n ['StatusBar', 'Keyboard'],\n ),\n row('`Vibration`', ['Vibration'], ['absent', 'yes', 'yes', 'yes', 'yes'], undefined, [\n 'Vibration',\n ]),\n row(\n '`BackgroundTask`, `Brightness`, `DeviceOrientation`',\n [],\n ['absent', 'yes', 'yes', 'yes', 'absent'],\n undefined,\n ['BackgroundTask', 'Brightness', 'DeviceOrientation'],\n ),\n expoRow('AppInfo', 'NgNativeApplication'),\n expoRow('Battery', 'NgNativeBattery'),\n expoRow('Browser', 'NgNativeWebBrowser'),\n expoRow('Calendar', 'NgNativeCalendar'),\n expoRow('Clipboard', 'NgNativeClipboard'),\n expoRow('Crypto', 'NgNativeCrypto'),\n expoRow('DocumentPicker', 'NgNativeDocumentPicker'),\n expoRow('FileSystem', 'NgNativeFileSystem'),\n expoRow('Fonts', 'NgNativeFont'),\n expoRow('Haptics', 'NgNativeHaptics'),\n expoRow('ImageEditor', 'NgNativeImageManipulator'),\n expoRow('ImagePicker', 'NgNativeImagePicker'),\n expoRow('KeepAwake', 'NgNativeKeepAwake'),\n expoRow('Locale', 'NgNativeLocalization'),\n expoRow('Location', 'NgNativeLocation'),\n expoRow('MediaLibrary', 'NgNativeMediaLibrary'),\n expoRow('Network', 'NgNativeNetwork'),\n expoRow('Notifications', 'NgNativeNotifications'),\n expoRow('Printing', 'NgNativePrint'),\n expoRow('SplashScreen', 'NgNativeSplashScreen'),\n expoRow('TextRecognition', 'NgNativeTextRecognition', ['yes', 'yes', 'yes', 'absent', 'absent']),\n expoRow('Updates', 'NgNativeUpdates'),\n expoRow('AddressSearch', 'NgNativeAddressSearch'),\n expoRow('AppleSignIn', 'NgNativeAppleAuthentication', [\n 'signed with the Sign in with Apple entitlement',\n 'yes',\n 'yes',\n 'absent',\n 'absent',\n ]),\n expoRow('Biometrics', 'NgNativeLocalAuthentication'),\n { ...expoRow('Camera', 'NgNativeCamera'), withoutAvailable: true },\n {\n ...expoRow('MapView', 'NgNativeMaps', [\n 'yes',\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 '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 'yes',\n 'yes',\n 'yes',\n 'absent',\n ]),\n expoRow('StoreReview', 'NgNativeStoreReview', [\n 'yes',\n 'yes',\n 'yes',\n 'with the Play Store',\n 'absent',\n ]),\n expoRow('Tracking', 'NgNativeTrackingTransparency'),\n expoRow('Watch', 'WatchConnectivity', ['absent', 'no watch to pair', 'yes', 'absent', 'absent']),\n expoRow('Foldable', 'ExpoHinge', [\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', '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', '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'], { database: 'NgNativeSqlite' }),\n withoutAvailable: true,\n },\n {\n ...row('`videoPlayer()`', [], ['yes', 'yes', 'yes', 'yes', 'yes'], {\n videoPlayer: 'NgNativeVideo',\n }),\n withoutAvailable: true,\n },\n {\n ...row('`audioPlayer()`, `audioRecorder()`', [], ['yes', 'yes', 'yes', 'yes', 'yes'], {\n audioPlayer: 'NgNativeAudio',\n audioRecorder: 'NgNativeAudio',\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,Q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CAAC,CAAC;IAClG,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1F,MAAM,IAAI,GAAG,CAAC,KAAwB,EAAE,EAAE,CACxC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7F,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,IAAI,OAAO,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACjE,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,KAAK,CAAC,IAAI,CACR,GAAG,CAAC,gBAAgB;YAClB,CAAC,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,GAAG;YAC9B,CAAC,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,mCAAmC,CACjE,CAAC;IACJ,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"]}
|
package/dist/os-version.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
/**
|
|
3
3
|
* The major version of the operating system the app runs on: 26 on iOS 26.5, and the API level
|
|
4
|
-
* on Android.
|
|
4
|
+
* on Android. On Linux it is the distribution's, the major of its os-release `VERSION_ID`: 24 on
|
|
5
|
+
* Ubuntu 24.04, 9 on AlmaLinux 9.4, and null on a rolling release such as Arch, which has none.
|
|
6
|
+
* Null where there is none to ask, the web and a test in Node.
|
|
5
7
|
*
|
|
6
8
|
* For a default that follows what the platform draws in that version, where nothing native says
|
|
7
9
|
* which it is. A test provides the version it wants.
|
package/dist/os-version.js
CHANGED
|
@@ -2,7 +2,9 @@ import { InjectionToken } from '@angular/core';
|
|
|
2
2
|
import { reactNative } from "./react-native.js";
|
|
3
3
|
/**
|
|
4
4
|
* The major version of the operating system the app runs on: 26 on iOS 26.5, and the API level
|
|
5
|
-
* on Android.
|
|
5
|
+
* on Android. On Linux it is the distribution's, the major of its os-release `VERSION_ID`: 24 on
|
|
6
|
+
* Ubuntu 24.04, 9 on AlmaLinux 9.4, and null on a rolling release such as Arch, which has none.
|
|
7
|
+
* Null where there is none to ask, the web and a test in Node.
|
|
6
8
|
*
|
|
7
9
|
* For a default that follows what the platform draws in that version, where nothing native says
|
|
8
10
|
* which it is. A test provides the version it wants.
|
package/dist/os-version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os-version.js","sourceRoot":"","sources":["../src/os-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"os-version.js","sourceRoot":"","sources":["../src/os-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,cAAc,CAAgB,0BAA0B,EAAE;IACtF,OAAO,EAAE,GAAG,EAAE;QACZ,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7E,OAAO,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;IAChD,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { reactNative } from './react-native.ts';\n\n/**\n * The major version of the operating system the app runs on: 26 on iOS 26.5, and the API level\n * on Android. On Linux it is the distribution's, the major of its os-release `VERSION_ID`: 24 on\n * Ubuntu 24.04, 9 on AlmaLinux 9.4, and null on a rolling release such as Arch, which has none.\n * Null where there is none to ask, the web and a test in Node.\n *\n * For a default that follows what the platform draws in that version, where nothing native says\n * which it is. A test provides the version it wants.\n */\nexport const OS_VERSION = new InjectionToken<number | null>('angular-native.osVersion', {\n factory: () => {\n const version = Number.parseInt(String(reactNative()?.Platform.Version), 10);\n return Number.isNaN(version) ? null : version;\n },\n});\n"]}
|
package/dist/os.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { InjectionToken } from '@angular/core';
|
|
|
4
4
|
* OS types and checks derive from (`OS`, `ShortcutOs`, `TestOs`, `ModulePlatform`), so a new OS is
|
|
5
5
|
* one entry here.
|
|
6
6
|
*/
|
|
7
|
-
export declare const OS_NAMES: readonly ["ios", "android", "macos", "web"];
|
|
7
|
+
export declare const OS_NAMES: readonly ["ios", "android", "macos", "linux", "web"];
|
|
8
8
|
/** One of `OS_NAMES`: what the `OS` token answers. */
|
|
9
9
|
export type OsName = (typeof OS_NAMES)[number];
|
|
10
10
|
/** Whether `os` is one of `OS_NAMES`. */
|
|
@@ -18,7 +18,7 @@ export declare const isOsName: (os: unknown) => os is OsName;
|
|
|
18
18
|
* on Android and the macOS major on a Mac: a check for iOS 26 needs both, or it matches macOS 26
|
|
19
19
|
* too. A test provides the OS it wants.
|
|
20
20
|
*/
|
|
21
|
-
export declare const OS: InjectionToken<"ios" | "android" | "macos" | "web">;
|
|
21
|
+
export declare const OS: InjectionToken<"ios" | "android" | "macos" | "linux" | "web">;
|
|
22
22
|
/**
|
|
23
23
|
* The OS as React Native, or off a device the engine, reports it: what `OS` answers unprovided.
|
|
24
24
|
* Throws on an OS not in `OS_NAMES`, which no check in the packages was written for: read as iOS,
|
|
@@ -32,8 +32,10 @@ export declare function platformOs(): OsName;
|
|
|
32
32
|
export declare const injectOs: () => OsName;
|
|
33
33
|
/** Whether `os` is a phone and tablet OS, with a status bar and a software keyboard. */
|
|
34
34
|
export declare const isPhoneOs: (os: string) => boolean;
|
|
35
|
+
/** Whether `os` is a desktop OS, served by the desktop host: macOS or Linux. */
|
|
36
|
+
export declare const isDesktopOs: (os: string) => boolean;
|
|
35
37
|
/**
|
|
36
|
-
* Whether the app runs on a desktop OS: macOS
|
|
38
|
+
* Whether the app runs on a desktop OS: macOS or Linux. Worked out from `OS`, so the two cannot
|
|
37
39
|
* disagree, and a test that provides `OS` gets the answer that goes with it.
|
|
38
40
|
*/
|
|
39
41
|
export declare const DESKTOP: InjectionToken<boolean>;
|
package/dist/os.js
CHANGED
|
@@ -6,7 +6,7 @@ import { reactNative } from "./react-native.js";
|
|
|
6
6
|
* OS types and checks derive from (`OS`, `ShortcutOs`, `TestOs`, `ModulePlatform`), so a new OS is
|
|
7
7
|
* one entry here.
|
|
8
8
|
*/
|
|
9
|
-
export const OS_NAMES = ['ios', 'android', 'macos', 'web'];
|
|
9
|
+
export const OS_NAMES = ['ios', 'android', 'macos', 'linux', 'web'];
|
|
10
10
|
/** Whether `os` is one of `OS_NAMES`. */
|
|
11
11
|
export const isOsName = (os) => OS_NAMES.includes(os);
|
|
12
12
|
/**
|
|
@@ -40,12 +40,14 @@ export function platformOs() {
|
|
|
40
40
|
export const injectOs = () => inject(OS, { optional: true }) ?? platformOs();
|
|
41
41
|
/** Whether `os` is a phone and tablet OS, with a status bar and a software keyboard. */
|
|
42
42
|
export const isPhoneOs = (os) => os === 'ios' || os === 'android';
|
|
43
|
+
/** Whether `os` is a desktop OS, served by the desktop host: macOS or Linux. */
|
|
44
|
+
export const isDesktopOs = (os) => os === 'macos' || os === 'linux';
|
|
43
45
|
/**
|
|
44
|
-
* Whether the app runs on a desktop OS: macOS
|
|
46
|
+
* Whether the app runs on a desktop OS: macOS or Linux. Worked out from `OS`, so the two cannot
|
|
45
47
|
* disagree, and a test that provides `OS` gets the answer that goes with it.
|
|
46
48
|
*/
|
|
47
49
|
export const DESKTOP = new InjectionToken('angular-native.desktop', {
|
|
48
|
-
factory: () => inject(OS)
|
|
50
|
+
factory: () => isDesktopOs(inject(OS)),
|
|
49
51
|
});
|
|
50
52
|
/**
|
|
51
53
|
* Whether the app runs on one of Apple's OSes: iOS (iPadOS included) or macOS. For a check that
|
package/dist/os.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"os.js","sourceRoot":"","sources":["../src/os.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,m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AE,CAAC,IAAI,UAAU,EAAE,CAAC;AAErF,wFAAwF;AACxF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAU,EAAW,EAAE,CAAC,EAAE,KAAK,KAAK,IAAI,EAAE,KAAK,SAAS,CAAC;AAEnF,gFAAgF;AAChF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAU,EAAW,EAAE,CAAC,EAAE,KAAK,OAAO,IAAI,EAAE,KAAK,OAAO,CAAC;AAErF;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,cAAc,CAAU,wBAAwB,EAAE;IAC3E,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;CACvC,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,cAAc,CAAU,sBAAsB,EAAE;IACvE,OAAO,EAAE,GAAG,EAAE;QACZ,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;QACtB,OAAO,EAAE,KAAK,KAAK,IAAI,EAAE,KAAK,OAAO,CAAC;IACxC,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { InjectionToken, inject } from '@angular/core';\nimport { nativePlatform } from '@ng-native/fabric';\nimport { reactNative } from './react-native.ts';\n\n/**\n * Every OS Angular Native runs on, as `Platform.OS` and the `OS` token name it. The one list the\n * OS types and checks derive from (`OS`, `ShortcutOs`, `TestOs`, `ModulePlatform`), so a new OS is\n * one entry here.\n */\nexport const OS_NAMES = ['ios', 'android', 'macos', 'linux', 'web'] as const;\n\n/** One of `OS_NAMES`: what the `OS` token answers. */\nexport type OsName = (typeof OS_NAMES)[number];\n\n/** Whether `os` is one of `OS_NAMES`. */\nexport const isOsName = (os: unknown): os is OsName =>\n (OS_NAMES as readonly unknown[]).includes(os);\n\n/**\n * The operating system the app runs on: `Platform.OS` on a device, `'macos'` on a Mac, and `'web'`\n * in the web host, which provides it. Off a device, in a test in Node, it is the platform the engine\n * renders as, iOS unless `registerPlatformComponents` said otherwise.\n *\n * For a feature that depends on the platform, beside `OS_VERSION`, whose number is the API level\n * on Android and the macOS major on a Mac: a check for iOS 26 needs both, or it matches macOS 26\n * too. A test provides the OS it wants.\n */\nexport const OS = new InjectionToken<OsName>('angular-native.os', {\n factory: platformOs,\n});\n\n/**\n * The OS as React Native, or off a device the engine, reports it: what `OS` answers unprovided.\n * Throws on an OS not in `OS_NAMES`, which no check in the packages was written for: read as iOS,\n * as it once was, it would take iOS's shortcuts, sources and layout with no sign of why.\n */\nexport function platformOs(): OsName {\n const os = reactNative()?.Platform?.OS ?? nativePlatform();\n if (isOsName(os)) return os;\n throw new Error(\n `[angular-native] The platform reports the OS '${os}', which Angular Native does not run on. ` +\n `It runs on ${OS_NAMES.join(', ')}.`,\n );\n}\n\n/**\n * The `OS` a service is made under: the one provided, or, in an injector with no root to make it\n * in, the platform's own.\n */\nexport const injectOs = (): OsName => inject(OS, { optional: true }) ?? platformOs();\n\n/** Whether `os` is a phone and tablet OS, with a status bar and a software keyboard. */\nexport const isPhoneOs = (os: string): boolean => os === 'ios' || os === 'android';\n\n/** Whether `os` is a desktop OS, served by the desktop host: macOS or Linux. */\nexport const isDesktopOs = (os: string): boolean => os === 'macos' || os === 'linux';\n\n/**\n * Whether the app runs on a desktop OS: macOS or Linux. Worked out from `OS`, so the two cannot\n * disagree, and a test that provides `OS` gets the answer that goes with it.\n */\nexport const DESKTOP = new InjectionToken<boolean>('angular-native.desktop', {\n factory: () => isDesktopOs(inject(OS)),\n});\n\n/**\n * Whether the app runs on one of Apple's OSes: iOS (iPadOS included) or macOS. For a check that\n * Apple's OSes share, written as `inject(APPLE)` rather than `OS === 'ios'`, which a Mac fails.\n * Worked out from `OS`, as `DESKTOP` is.\n */\nexport const APPLE = new InjectionToken<boolean>('angular-native.apple', {\n factory: () => {\n const os = inject(OS);\n return os === 'ios' || os === 'macos';\n },\n});\n"]}
|