one 2.0.0-beta.60.1 → 2.0.0-beta.65.1

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.
@@ -1,75 +1,3 @@
1
- var TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/;
2
- var SCHEME = /^[a-z][a-z0-9+.-]*$/i;
3
- var VERSION = /^\d+\.\d+\.\d+/;
4
- var BUILD_NUMBER = /^[A-Za-z0-9.]+$/;
5
- var REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z][A-Za-z0-9-]*)+$/;
6
- var DEPLOYMENT_TARGET = /^\d+\.\d+$/;
7
- var HEX_COLOR = /^#[\da-f]{6}$/i;
8
- function fail(message) {
9
- throw new Error(`[one] invalid native.app: ${message}`);
10
- }
11
- function validateNativeApp(manifest) {
12
- if (!manifest || typeof manifest !== "object") fail("manifest must be an object");
13
- if (!manifest.name || typeof manifest.name !== "string") fail("name is required");
14
- if (!TARGET_NAME.test(manifest.name)) {
15
- fail(`name "${manifest.name}" must start with a letter and contain only letters, digits, and underscore`);
16
- }
17
- var schemes = manifest.scheme === void 0 ? [] : Array.isArray(manifest.scheme) ? manifest.scheme : [manifest.scheme];
18
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
19
- try {
20
- for (var _iterator = schemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
21
- var scheme = _step.value;
22
- if (typeof scheme !== "string" || !SCHEME.test(scheme)) {
23
- fail(`scheme "${scheme}" must be a valid uri scheme`);
24
- }
25
- }
26
- } catch (err) {
27
- _didIteratorError = true;
28
- _iteratorError = err;
29
- } finally {
30
- try {
31
- if (!_iteratorNormalCompletion && _iterator.return != null) {
32
- _iterator.return();
33
- }
34
- } finally {
35
- if (_didIteratorError) {
36
- throw _iteratorError;
37
- }
38
- }
39
- }
40
- if (manifest.version !== void 0 && !VERSION.test(manifest.version)) {
41
- fail(`version "${manifest.version}" must start with major.minor.patch`);
42
- }
43
- if (manifest.icon !== void 0 && (!manifest.icon.source || !HEX_COLOR.test(manifest.icon.backgroundColor))) {
44
- fail("icon requires source and a six-digit hex backgroundColor");
45
- }
46
- if (manifest.splash !== void 0 && (!manifest.splash.source || !HEX_COLOR.test(manifest.splash.backgroundColor) || manifest.splash.width !== void 0 && (!Number.isFinite(manifest.splash.width) || manifest.splash.width < 1 || manifest.splash.width > 288))) {
47
- fail("splash requires source, a six-digit hex backgroundColor, and width from 1 to 288");
48
- }
49
- if (manifest.ios !== void 0) {
50
- if (!manifest.ios.bundleId || !REVERSE_DNS.test(manifest.ios.bundleId)) {
51
- fail(`ios.bundleId "${manifest.ios.bundleId}" must be reverse-dns`);
52
- }
53
- if (manifest.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(manifest.ios.deploymentTarget)) {
54
- fail(`ios.deploymentTarget "${manifest.ios.deploymentTarget}" must look like "17.0"`);
55
- }
56
- if (manifest.ios.buildNumber !== void 0 && !BUILD_NUMBER.test(manifest.ios.buildNumber)) {
57
- fail(`ios.buildNumber "${manifest.ios.buildNumber}" must contain only letters, digits, and dots`);
58
- }
59
- }
60
- if (manifest.android !== void 0) {
61
- if (!manifest.android.applicationId || !REVERSE_DNS.test(manifest.android.applicationId)) {
62
- fail(`android.applicationId "${manifest.android.applicationId}" must be reverse-dns`);
63
- }
64
- if (manifest.android.minSdk !== void 0 && (!Number.isInteger(manifest.android.minSdk) || manifest.android.minSdk < 21 || manifest.android.minSdk > 36)) {
65
- fail(`android.minSdk "${manifest.android.minSdk}" must be an integer from 21 to 36`);
66
- }
67
- if (manifest.android.versionCode !== void 0 && (!Number.isInteger(manifest.android.versionCode) || manifest.android.versionCode < 1)) {
68
- fail(`android.versionCode "${manifest.android.versionCode}" must be a positive integer`);
69
- }
70
- }
71
- return manifest;
72
- }
1
+ import { validateNativeApp } from "@vxrn/utils/nativeAppManifest";
73
2
 
74
- export { validateNativeApp };
75
- //# sourceMappingURL=appManifest.native.js.map
3
+ export { validateNativeApp };
package/dist/esm/one.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { AppInfo, Browser, Clipboard, Color, Compose, Haptics, MenuAction, Network, SplitView, Swift, TextInput, ToolbarHost, ToolbarItem, UI, ZoomTransitionAlignmentRectDetector, ZoomTransitionEnabler, ZoomTransitionSource, useNativeState, useNetworkState } from "@vxrn/native";
1
+ import { AppInfo, Browser, Clipboard, Color, Compose, Haptics, ImagePicker, MenuAction, Network, SplitView, Swift, TextInput, ToolbarHost, ToolbarItem, UI, ZoomTransitionAlignmentRectDetector, ZoomTransitionEnabler, ZoomTransitionSource, useNativeState, useNetworkState } from "@vxrn/native";
2
2
  import { SafeAreaProvider, SafeAreaView, initialWindowMetrics, useSafeAreaFrame, useSafeAreaInsets } from "@vxrn/safe-area";
3
3
 
4
4
  function currentPlatform() {
@@ -42,6 +42,7 @@ const One = Object.freeze({
42
42
  Clipboard,
43
43
  Network,
44
44
  Browser,
45
+ ImagePicker,
45
46
  useNetworkState
46
47
  });
47
48
 
@@ -1 +1 @@
1
- {"version":3,"file":"one.js","names":["UI","NativeUI","NativeClipboard","NativeNetwork","NativeBrowser"],"sources":["esm/one.js"],"sourcesContent":["import {\n Browser as NativeBrowser,\n Clipboard as NativeClipboard,\n AppInfo,\n Color,\n Compose,\n Haptics,\n MenuAction,\n Network as NativeNetwork,\n SplitView,\n Swift,\n TextInput,\n ToolbarHost,\n ToolbarItem,\n UI as NativeUI,\n ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler,\n ZoomTransitionSource,\n useNativeState,\n useNetworkState\n} from \"@vxrn/native\";\nimport {\n SafeAreaProvider,\n SafeAreaView,\n initialWindowMetrics,\n useSafeAreaFrame,\n useSafeAreaInsets\n} from \"@vxrn/safe-area\";\nfunction currentPlatform() {\n const defined = Reflect.get(globalThis, \"__ONE_PLATFORM__\") ?? (typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0);\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nconst iOS = Object.freeze({\n ...Swift,\n Color: Color.ios,\n MenuAction,\n SplitView,\n ToolbarHost,\n ToolbarItem,\n ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler,\n ZoomTransitionSource\n});\nconst Android = Object.freeze({\n ...Compose\n});\nconst SafeArea = Object.freeze({\n Provider: SafeAreaProvider,\n View: SafeAreaView,\n initialMetrics: initialWindowMetrics,\n useFrame: useSafeAreaFrame,\n useInsets: useSafeAreaInsets\n});\nconst UI = Object.freeze({\n ...NativeUI,\n SafeArea,\n Haptics,\n TextInput,\n useNativeState\n});\nconst One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo,\n iOS,\n Android,\n UI,\n Clipboard: NativeClipboard,\n Network: NativeNetwork,\n Browser: NativeBrowser,\n useNetworkState\n});\nexport {\n One\n};\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;;AA4BA,SAAS,kBAAkB;CACzB,MAAM,UAAU,QAAQ,IAAI,YAAY,kBAAkB,MAAM,OAAO,YAAY,cAAc,QAAQ,IAAI,eAAe,KAAK;CACjI,OAAO,YAAY,SAAS,YAAY,aAAa,YAAY,QAAQ,UAAU;AACrF;AACA,MAAM,MAAM,OAAO,OAAO;CACxB,GAAG;CACH,OAAO,MAAM;CACb;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,MAAM,UAAU,OAAO,OAAO,EAC5B,GAAG,QACL,CAAC;AACD,MAAM,WAAW,OAAO,OAAO;CAC7B,UAAU;CACV,MAAM;CACN,gBAAgB;CAChB,UAAU;CACV,WAAW;AACb,CAAC;AACD,MAAMA,OAAK,OAAO,OAAO;CACvB,GAAGC;CACH;CACA;CACA;CACA;AACF,CAAC;AACD,MAAM,MAAM,OAAO,OAAO;CACxB,IAAI,WAAW;EACb,OAAO,gBAAgB;CACzB;CACA;CACA;CACA;CACA;CACWC;CACFC;CACAC;CACT;AACF,CAAC"}
1
+ {"version":3,"file":"one.js","names":["UI","NativeUI","NativeClipboard","NativeNetwork","NativeBrowser"],"sources":["esm/one.js"],"sourcesContent":["import {\n Browser as NativeBrowser,\n Clipboard as NativeClipboard,\n AppInfo,\n Color,\n Compose,\n Haptics,\n ImagePicker,\n MenuAction,\n Network as NativeNetwork,\n SplitView,\n Swift,\n TextInput,\n ToolbarHost,\n ToolbarItem,\n UI as NativeUI,\n ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler,\n ZoomTransitionSource,\n useNativeState,\n useNetworkState\n} from \"@vxrn/native\";\nimport {\n SafeAreaProvider,\n SafeAreaView,\n initialWindowMetrics,\n useSafeAreaFrame,\n useSafeAreaInsets\n} from \"@vxrn/safe-area\";\nfunction currentPlatform() {\n const defined = Reflect.get(globalThis, \"__ONE_PLATFORM__\") ?? (typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0);\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nconst iOS = Object.freeze({\n ...Swift,\n Color: Color.ios,\n MenuAction,\n SplitView,\n ToolbarHost,\n ToolbarItem,\n ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler,\n ZoomTransitionSource\n});\nconst Android = Object.freeze({\n ...Compose\n});\nconst SafeArea = Object.freeze({\n Provider: SafeAreaProvider,\n View: SafeAreaView,\n initialMetrics: initialWindowMetrics,\n useFrame: useSafeAreaFrame,\n useInsets: useSafeAreaInsets\n});\nconst UI = Object.freeze({\n ...NativeUI,\n SafeArea,\n Haptics,\n TextInput,\n useNativeState\n});\nconst One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo,\n iOS,\n Android,\n UI,\n Clipboard: NativeClipboard,\n Network: NativeNetwork,\n Browser: NativeBrowser,\n ImagePicker,\n useNetworkState\n});\nexport {\n One\n};\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;;AA6BA,SAAS,kBAAkB;CACzB,MAAM,UAAU,QAAQ,IAAI,YAAY,kBAAkB,MAAM,OAAO,YAAY,cAAc,QAAQ,IAAI,eAAe,KAAK;CACjI,OAAO,YAAY,SAAS,YAAY,aAAa,YAAY,QAAQ,UAAU;AACrF;AACA,MAAM,MAAM,OAAO,OAAO;CACxB,GAAG;CACH,OAAO,MAAM;CACb;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,MAAM,UAAU,OAAO,OAAO,EAC5B,GAAG,QACL,CAAC;AACD,MAAM,WAAW,OAAO,OAAO;CAC7B,UAAU;CACV,MAAM;CACN,gBAAgB;CAChB,UAAU;CACV,WAAW;AACb,CAAC;AACD,MAAMA,OAAK,OAAO,OAAO;CACvB,GAAGC;CACH;CACA;CACA;CACA;AACF,CAAC;AACD,MAAM,MAAM,OAAO,OAAO;CACxB,IAAI,WAAW;EACb,OAAO,gBAAgB;CACzB;CACA;CACA;CACA;CACA;CACWC;CACFC;CACAC;CACT;CACA;AACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AppInfo, Browser, Clipboard, Color, Compose, Haptics, MenuAction, Network, SplitView, Swift, TextInput, ToolbarHost, ToolbarItem, UI, ZoomTransitionAlignmentRectDetector, ZoomTransitionEnabler, ZoomTransitionSource, useNativeState, useNetworkState } from "@vxrn/native";
1
+ import { AppInfo, Browser, Clipboard, Color, Compose, Haptics, ImagePicker, MenuAction, Network, SplitView, Swift, TextInput, ToolbarHost, ToolbarItem, UI, ZoomTransitionAlignmentRectDetector, ZoomTransitionEnabler, ZoomTransitionSource, useNativeState, useNetworkState } from "@vxrn/native";
2
2
  import { SafeAreaProvider, SafeAreaView, initialWindowMetrics, useSafeAreaFrame, useSafeAreaInsets } from "@vxrn/safe-area";
3
3
 
4
4
  function currentPlatform() {
@@ -43,6 +43,7 @@ var One = Object.freeze({
43
43
  Clipboard,
44
44
  Network,
45
45
  Browser,
46
+ ImagePicker,
46
47
  useNetworkState
47
48
  });
48
49
 
@@ -1 +1 @@
1
- {"version":3,"file":"one.native.js","names":["UI","NativeUI","NativeClipboard","NativeNetwork","NativeBrowser"],"sources":["esm/one.native.js"],"sourcesContent":["import { Browser as NativeBrowser, Clipboard as NativeClipboard, AppInfo, Color, Compose, Haptics, MenuAction, Network as NativeNetwork, SplitView, Swift, TextInput, ToolbarHost, ToolbarItem, UI as NativeUI, ZoomTransitionAlignmentRectDetector, ZoomTransitionEnabler, ZoomTransitionSource, useNativeState, useNetworkState } from \"@vxrn/native\";\nimport { SafeAreaProvider, SafeAreaView, initialWindowMetrics, useSafeAreaFrame, useSafeAreaInsets } from \"@vxrn/safe-area\";\nfunction currentPlatform() {\n var _Reflect_get;\n var defined = (_Reflect_get = Reflect.get(globalThis, \"__ONE_PLATFORM__\")) !== null && _Reflect_get !== void 0 ? _Reflect_get : typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0;\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nvar iOS = Object.freeze({\n ...Swift,\n Color: Color.ios,\n MenuAction,\n SplitView,\n ToolbarHost,\n ToolbarItem,\n ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler,\n ZoomTransitionSource\n});\nvar Android = Object.freeze({\n ...Compose\n});\nvar SafeArea = Object.freeze({\n Provider: SafeAreaProvider,\n View: SafeAreaView,\n initialMetrics: initialWindowMetrics,\n useFrame: useSafeAreaFrame,\n useInsets: useSafeAreaInsets\n});\nvar UI = Object.freeze({\n ...NativeUI,\n SafeArea,\n Haptics,\n TextInput,\n useNativeState\n});\nvar One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo,\n iOS,\n Android,\n UI,\n Clipboard: NativeClipboard,\n Network: NativeNetwork,\n Browser: NativeBrowser,\n useNetworkState\n});\nexport {\n One\n};\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;;AAEA,SAAS,kBAAkB;CACzB,IAAI;CACJ,IAAI,WAAW,eAAe,QAAQ,IAAI,YAAY,kBAAkB,OAAO,QAAQ,iBAAiB,KAAK,IAAI,eAAe,OAAO,YAAY,cAAc,QAAQ,IAAI,eAAe,KAAK;CACjM,OAAO,YAAY,SAAS,YAAY,aAAa,YAAY,QAAQ,UAAU;AACrF;AACA,IAAI,MAAM,OAAO,OAAO;CACtB,GAAG;CACH,OAAO,MAAM;CACb;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,IAAI,UAAU,OAAO,OAAO,EAC1B,GAAG,QACL,CAAC;AACD,IAAI,WAAW,OAAO,OAAO;CAC3B,UAAU;CACV,MAAM;CACN,gBAAgB;CAChB,UAAU;CACV,WAAW;AACb,CAAC;AACD,IAAIA,OAAK,OAAO,OAAO;CACrB,GAAGC;CACH;CACA;CACA;CACA;AACF,CAAC;AACD,IAAI,MAAM,OAAO,OAAO;CACtB,IAAI,WAAW;EACb,OAAO,gBAAgB;CACzB;CACA;CACA;CACA;CACA;CACWC;CACFC;CACAC;CACT;AACF,CAAC"}
1
+ {"version":3,"file":"one.native.js","names":["UI","NativeUI","NativeClipboard","NativeNetwork","NativeBrowser"],"sources":["esm/one.native.js"],"sourcesContent":["import { Browser as NativeBrowser, Clipboard as NativeClipboard, AppInfo, Color, Compose, Haptics, ImagePicker, MenuAction, Network as NativeNetwork, SplitView, Swift, TextInput, ToolbarHost, ToolbarItem, UI as NativeUI, ZoomTransitionAlignmentRectDetector, ZoomTransitionEnabler, ZoomTransitionSource, useNativeState, useNetworkState } from \"@vxrn/native\";\nimport { SafeAreaProvider, SafeAreaView, initialWindowMetrics, useSafeAreaFrame, useSafeAreaInsets } from \"@vxrn/safe-area\";\nfunction currentPlatform() {\n var _Reflect_get;\n var defined = (_Reflect_get = Reflect.get(globalThis, \"__ONE_PLATFORM__\")) !== null && _Reflect_get !== void 0 ? _Reflect_get : typeof process !== \"undefined\" ? process.env.ONE_PLATFORM : void 0;\n return defined === \"ios\" || defined === \"android\" || defined === \"rnx\" ? defined : \"web\";\n}\nvar iOS = Object.freeze({\n ...Swift,\n Color: Color.ios,\n MenuAction,\n SplitView,\n ToolbarHost,\n ToolbarItem,\n ZoomTransitionAlignmentRectDetector,\n ZoomTransitionEnabler,\n ZoomTransitionSource\n});\nvar Android = Object.freeze({\n ...Compose\n});\nvar SafeArea = Object.freeze({\n Provider: SafeAreaProvider,\n View: SafeAreaView,\n initialMetrics: initialWindowMetrics,\n useFrame: useSafeAreaFrame,\n useInsets: useSafeAreaInsets\n});\nvar UI = Object.freeze({\n ...NativeUI,\n SafeArea,\n Haptics,\n TextInput,\n useNativeState\n});\nvar One = Object.freeze({\n get platform() {\n return currentPlatform();\n },\n AppInfo,\n iOS,\n Android,\n UI,\n Clipboard: NativeClipboard,\n Network: NativeNetwork,\n Browser: NativeBrowser,\n ImagePicker,\n useNetworkState\n});\nexport {\n One\n};\n//# sourceMappingURL=one.js.map\n"],"mappings":";;;;AAEA,SAAS,kBAAkB;CACzB,IAAI;CACJ,IAAI,WAAW,eAAe,QAAQ,IAAI,YAAY,kBAAkB,OAAO,QAAQ,iBAAiB,KAAK,IAAI,eAAe,OAAO,YAAY,cAAc,QAAQ,IAAI,eAAe,KAAK;CACjM,OAAO,YAAY,SAAS,YAAY,aAAa,YAAY,QAAQ,UAAU;AACrF;AACA,IAAI,MAAM,OAAO,OAAO;CACtB,GAAG;CACH,OAAO,MAAM;CACb;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AACD,IAAI,UAAU,OAAO,OAAO,EAC1B,GAAG,QACL,CAAC;AACD,IAAI,WAAW,OAAO,OAAO;CAC3B,UAAU;CACV,MAAM;CACN,gBAAgB;CAChB,UAAU;CACV,WAAW;AACb,CAAC;AACD,IAAIA,OAAK,OAAO,OAAO;CACrB,GAAGC;CACH;CACA;CACA;CACA;AACF,CAAC;AACD,IAAI,MAAM,OAAO,OAAO;CACtB,IAAI,WAAW;EACb,OAAO,gBAAgB;CACzB;CACA;CACA;CACA;CACA;CACWC;CACFC;CACAC;CACT;CACA;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "one",
3
- "version": "2.0.0-beta.60.1",
3
+ "version": "2.0.0-beta.65.1",
4
4
  "license": "BSD-3-Clause",
5
5
  "sideEffects": [
6
6
  "setup.mjs",
@@ -190,20 +190,20 @@
190
190
  "@react-navigation/routers": "~8.0.0-alpha.17",
191
191
  "@cloudflare/vite-plugin": "^1.33.1",
192
192
  "@ungap/structured-clone": "^1.2.0",
193
- "@vxrn/color-scheme": "2.0.0-beta.60.1",
194
- "@vxrn/compiler": "2.0.0-beta.60.1",
195
- "@vxrn/native": "2.0.0-beta.60.1",
196
- "@vxrn/resolve": "2.0.0-beta.60.1",
197
- "@vxrn/safe-area": "2.0.0-beta.60.1",
198
- "@vxrn/tslib-lite": "2.0.0-beta.60.1",
199
- "@vxrn/use-isomorphic-layout-effect": "2.0.0-beta.60.1",
200
- "@vxrn/utils": "2.0.0-beta.60.1",
201
- "@vxrn/vite-plugin-metro": "2.0.0-beta.60.1",
193
+ "@vxrn/color-scheme": "2.0.0-beta.65.1",
194
+ "@vxrn/compiler": "2.0.0-beta.65.1",
195
+ "@vxrn/native": "2.0.0-beta.65.1",
196
+ "@vxrn/resolve": "2.0.0-beta.65.1",
197
+ "@vxrn/safe-area": "2.0.0-beta.65.1",
198
+ "@vxrn/tslib-lite": "2.0.0-beta.65.1",
199
+ "@vxrn/use-isomorphic-layout-effect": "2.0.0-beta.65.1",
200
+ "@vxrn/utils": "2.0.0-beta.65.1",
201
+ "@vxrn/vite-plugin-metro": "2.0.0-beta.65.1",
202
202
  "babel-dead-code-elimination": "1.0.10",
203
203
  "babel-plugin-module-resolver": "^5.0.2",
204
204
  "citty": "^0.1.6",
205
205
  "core-js": "^3.38.1",
206
- "create-vxrn": "2.0.0-beta.60.1",
206
+ "create-vxrn": "2.0.0-beta.65.1",
207
207
  "escape-string-regexp": "^5.0.0",
208
208
  "fast-deep-equal": "^3.1.3",
209
209
  "fast-glob": "^3.3.3",
@@ -222,7 +222,7 @@
222
222
  "tsconfig-paths": "^4",
223
223
  "use-latest-callback": "^0.2.3",
224
224
  "vite": "^8.2.2",
225
- "vxrn": "2.0.0-beta.60.1",
225
+ "vxrn": "2.0.0-beta.65.1",
226
226
  "web-streams-polyfill": "^4.3.0",
227
227
  "ws": "^8.21.0",
228
228
  "xxhashjs": "^0.2.2"
package/src/Root.tsx CHANGED
@@ -102,8 +102,13 @@ export function Root(props: RootProps) {
102
102
  routeOptions,
103
103
  globalThis['__vxrnVersion']
104
104
  )
105
- const location =
106
- typeof window !== 'undefined' && window.location
105
+ // native starts with no location: a cold deep link wins through the
106
+ // async Linking.getInitialURL instead of a '/' initial state that would
107
+ // override it. a launch with no link still resolves '/' from the same
108
+ // getter, so home is unchanged.
109
+ const location = isNative
110
+ ? undefined
111
+ : typeof window !== 'undefined' && window.location
107
112
  ? new URL(path || window.location.href || '/', window.location.href)
108
113
  : getCachedSSRLocation(path || '/')
109
114
 
@@ -1,85 +1,26 @@
1
1
  import { describe, expect, test } from 'vitest'
2
2
  import { validateNativeApp } from './appManifest'
3
3
 
4
- describe('native.app manifest', () => {
5
- test('accepts a valid manifest', () => {
4
+ // smoke for the one/native re-export; the full cases live beside the
5
+ // canonical definition in @vxrn/utils.
6
+ describe('native.app manifest re-export', () => {
7
+ test('validates through the shared definition', () => {
6
8
  expect(() =>
7
9
  validateNativeApp({
8
10
  name: 'MyApp',
9
- displayName: 'My App',
10
- scheme: 'myapp',
11
- version: '1.0.0',
11
+ imagePicker: { camera: 'Take profile photos.' },
12
12
  ios: { bundleId: 'dev.one.myapp', buildNumber: '42' },
13
13
  android: { applicationId: 'dev.one.myapp', versionCode: 42 },
14
14
  })
15
15
  ).not.toThrow()
16
- })
17
-
18
- test('rejects invalid version, buildNumber, and versionCode', () => {
19
- const base = {
20
- name: 'MyApp',
21
- ios: { bundleId: 'dev.one.myapp', buildNumber: '42' },
22
- android: { applicationId: 'dev.one.myapp', versionCode: 42 },
23
- }
24
- expect(() => validateNativeApp({ ...base, version: '1.0' })).toThrow(/version/)
25
- expect(() =>
26
- validateNativeApp({
27
- ...base,
28
- ios: { bundleId: 'dev.one.myapp', buildNumber: '1 2' },
29
- })
30
- ).toThrow(/buildNumber/)
31
- expect(() =>
32
- validateNativeApp({
33
- ...base,
34
- ios: { bundleId: 'dev.one.myapp', buildNumber: '' },
35
- })
36
- ).toThrow(/buildNumber/)
37
- expect(() =>
38
- validateNativeApp({
39
- ...base,
40
- android: { applicationId: 'dev.one.myapp', versionCode: 0 },
41
- })
42
- ).toThrow(/versionCode/)
43
- expect(() =>
44
- validateNativeApp({
45
- ...base,
46
- android: { applicationId: 'dev.one.myapp', versionCode: 1.5 },
47
- })
48
- ).toThrow(/versionCode/)
49
- })
50
-
51
- test('rejects missing platform ids and invalid target names', () => {
52
- expect(() => validateNativeApp({} as any)).toThrow()
53
- expect(() => validateNativeApp({ name: 'my-app' } as any)).toThrow()
54
- expect(() =>
55
- validateNativeApp({ name: 'MyApp', ios: { bundleId: 'not-an-id' } } as any)
56
- ).toThrow()
57
- expect(() =>
58
- validateNativeApp({ name: 'MyApp', android: { applicationId: '' } } as any)
59
- ).toThrow()
60
- expect(() =>
61
- validateNativeApp({
62
- name: 'MyApp',
63
- icon: { source: '', backgroundColor: '#000000' },
64
- ios: { bundleId: 'dev.one.myapp' },
65
- android: { applicationId: 'dev.one.myapp' },
66
- })
67
- ).toThrow(/icon/)
68
- expect(() =>
69
- validateNativeApp({
70
- name: 'MyApp',
71
- splash: { source: './splash.png', backgroundColor: 'black' },
72
- ios: { bundleId: 'dev.one.myapp' },
73
- android: { applicationId: 'dev.one.myapp' },
74
- })
75
- ).toThrow(/splash/)
16
+ expect(() => validateNativeApp({} as any)).toThrow(/name/)
76
17
  expect(() =>
77
18
  validateNativeApp({
78
19
  name: 'MyApp',
79
- splash: { source: './splash.png', backgroundColor: '#000000', width: 0.99 },
20
+ imagePicker: { camera: '' },
80
21
  ios: { bundleId: 'dev.one.myapp' },
81
22
  android: { applicationId: 'dev.one.myapp' },
82
23
  })
83
- ).toThrow(/splash/)
24
+ ).toThrow(/imagePicker\.camera/)
84
25
  })
85
26
  })
@@ -1,141 +1,6 @@
1
- // typed native.app manifest inside the existing one vite options.
2
- // name is the native target and appregistry key.
3
-
4
- export interface NativeAppManifest {
5
- name: string
6
- displayName?: string
7
- scheme?: string | string[]
8
- version?: string
9
- icon?: {
10
- source: string
11
- backgroundColor: string
12
- }
13
- splash?: {
14
- source: string
15
- backgroundColor: string
16
- width?: number
17
- }
18
- ios?: {
19
- bundleId: string
20
- buildNumber?: string
21
- tablet?: boolean
22
- deploymentTarget?: string
23
- screensGamma?: boolean
24
- useFrameworks?: 'static' | 'dynamic'
25
- ccache?: boolean
26
- usesNonExemptEncryption?: boolean
27
- }
28
- android?: {
29
- applicationId: string
30
- versionCode?: number
31
- minSdk?: number
32
- adaptiveIcon?: {
33
- foreground?: string
34
- background?: string
35
- }
36
- }
37
- }
38
-
39
- const TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/
40
- const SCHEME = /^[a-z][a-z0-9+.-]*$/i
41
- const VERSION = /^\d+\.\d+\.\d+/
42
- const BUILD_NUMBER = /^[A-Za-z0-9.]+$/
43
- const REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\.[A-Za-z][A-Za-z0-9-]*)+$/
44
- const DEPLOYMENT_TARGET = /^\d+\.\d+$/
45
- const HEX_COLOR = /^#[\da-f]{6}$/i
46
-
47
- function fail(message: string): never {
48
- throw new Error(`[one] invalid native.app: ${message}`)
49
- }
50
-
51
- export function validateNativeApp(manifest: NativeAppManifest): NativeAppManifest {
52
- if (!manifest || typeof manifest !== 'object') fail('manifest must be an object')
53
- if (!manifest.name || typeof manifest.name !== 'string') fail('name is required')
54
- if (!TARGET_NAME.test(manifest.name)) {
55
- fail(
56
- `name "${manifest.name}" must start with a letter and contain only letters, digits, and underscore`
57
- )
58
- }
59
- const schemes =
60
- manifest.scheme === undefined
61
- ? []
62
- : Array.isArray(manifest.scheme)
63
- ? manifest.scheme
64
- : [manifest.scheme]
65
- for (const scheme of schemes) {
66
- if (typeof scheme !== 'string' || !SCHEME.test(scheme)) {
67
- fail(`scheme "${scheme}" must be a valid uri scheme`)
68
- }
69
- }
70
- if (manifest.version !== undefined && !VERSION.test(manifest.version)) {
71
- fail(`version "${manifest.version}" must start with major.minor.patch`)
72
- }
73
- if (
74
- manifest.icon !== undefined &&
75
- (!manifest.icon.source || !HEX_COLOR.test(manifest.icon.backgroundColor))
76
- ) {
77
- fail('icon requires source and a six-digit hex backgroundColor')
78
- }
79
- if (
80
- manifest.splash !== undefined &&
81
- (!manifest.splash.source ||
82
- !HEX_COLOR.test(manifest.splash.backgroundColor) ||
83
- (manifest.splash.width !== undefined &&
84
- (!Number.isFinite(manifest.splash.width) ||
85
- manifest.splash.width < 1 ||
86
- manifest.splash.width > 288)))
87
- ) {
88
- fail(
89
- 'splash requires source, a six-digit hex backgroundColor, and width from 1 to 288'
90
- )
91
- }
92
- if (manifest.ios !== undefined) {
93
- if (!manifest.ios.bundleId || !REVERSE_DNS.test(manifest.ios.bundleId)) {
94
- fail(`ios.bundleId "${manifest.ios.bundleId}" must be reverse-dns`)
95
- }
96
- if (
97
- manifest.ios.deploymentTarget !== undefined &&
98
- !DEPLOYMENT_TARGET.test(manifest.ios.deploymentTarget)
99
- ) {
100
- fail(
101
- `ios.deploymentTarget "${manifest.ios.deploymentTarget}" must look like "17.0"`
102
- )
103
- }
104
- if (
105
- manifest.ios.buildNumber !== undefined &&
106
- !BUILD_NUMBER.test(manifest.ios.buildNumber)
107
- ) {
108
- fail(
109
- `ios.buildNumber "${manifest.ios.buildNumber}" must contain only letters, digits, and dots`
110
- )
111
- }
112
- }
113
- if (manifest.android !== undefined) {
114
- if (
115
- !manifest.android.applicationId ||
116
- !REVERSE_DNS.test(manifest.android.applicationId)
117
- ) {
118
- fail(
119
- `android.applicationId "${manifest.android.applicationId}" must be reverse-dns`
120
- )
121
- }
122
- if (
123
- manifest.android.minSdk !== undefined &&
124
- (!Number.isInteger(manifest.android.minSdk) ||
125
- manifest.android.minSdk < 21 ||
126
- manifest.android.minSdk > 36)
127
- ) {
128
- fail(`android.minSdk "${manifest.android.minSdk}" must be an integer from 21 to 36`)
129
- }
130
- if (
131
- manifest.android.versionCode !== undefined &&
132
- (!Number.isInteger(manifest.android.versionCode) ||
133
- manifest.android.versionCode < 1)
134
- ) {
135
- fail(
136
- `android.versionCode "${manifest.android.versionCode}" must be a positive integer`
137
- )
138
- }
139
- }
140
- return manifest
141
- }
1
+ // the native.app manifest lives in @vxrn/utils so one/native (which cannot
2
+ // see vxrn) and vxrn prebuild (which consumes it) share one definition.
3
+ export {
4
+ validateNativeApp,
5
+ type NativeAppManifest,
6
+ } from '@vxrn/utils/nativeAppManifest'
package/src/one.ts CHANGED
@@ -8,6 +8,7 @@ import {
8
8
  Color,
9
9
  Compose,
10
10
  Haptics,
11
+ ImagePicker,
11
12
  MenuAction,
12
13
  Network as NativeNetwork,
13
14
  SplitView,
@@ -70,6 +71,7 @@ export type OneAPI = {
70
71
  readonly Clipboard: typeof NativeClipboard
71
72
  readonly Network: typeof NativeNetwork
72
73
  readonly Browser: typeof NativeBrowser
74
+ readonly ImagePicker: typeof ImagePicker
73
75
  readonly useNetworkState: typeof useNetworkState
74
76
  }
75
77
 
@@ -123,5 +125,6 @@ export const One: OneAPI = Object.freeze({
123
125
  Clipboard: NativeClipboard,
124
126
  Network: NativeNetwork,
125
127
  Browser: NativeBrowser,
128
+ ImagePicker,
126
129
  useNetworkState,
127
130
  })
@@ -0,0 +1,41 @@
1
+ import { describe, expect, it } from 'vitest'
2
+ import { getMockContext } from '../testing-utils'
3
+ import { getLinkingConfig } from './getLinkingConfig'
4
+ import { getRoutes } from './getRoutes'
5
+ import { getResolvedLinking, resetLinking, setupLinking } from './linkingConfig'
6
+
7
+ describe('setupLinking', () => {
8
+ const routes = () => getRoutes(getMockContext(['_layout.tsx', 'index.tsx']))!
9
+
10
+ it('keeps the base getInitialURL and returns no state without a location', () => {
11
+ resetLinking()
12
+ const initialState = setupLinking(routes(), undefined)
13
+
14
+ // native starts with no location: no baked-in state overrides linking,
15
+ // and the platform getInitialURL (Linking.getInitialURL on native) stays
16
+ // wired so a cold deep link resolves through it.
17
+ expect(initialState).toBeUndefined()
18
+ expect(getResolvedLinking()?.getInitialURL).toBe(
19
+ getLinkingConfig(routes(), true).getInitialURL
20
+ )
21
+ })
22
+
23
+ it('overrides getInitialURL and derives state from a location', () => {
24
+ resetLinking()
25
+ const initialState = setupLinking(routes(), new URL('http://localhost/'))
26
+
27
+ expect(initialState).toBeDefined()
28
+ expect(getResolvedLinking()?.getInitialURL?.()).toBe('http://localhost/')
29
+ })
30
+
31
+ it('does not leak a location override into a later location-less setup', () => {
32
+ resetLinking()
33
+ setupLinking(routes(), new URL('http://localhost/'))
34
+ resetLinking()
35
+ setupLinking(routes(), undefined)
36
+
37
+ expect(getResolvedLinking()?.getInitialURL).toBe(
38
+ getLinkingConfig(routes(), true).getInitialURL
39
+ )
40
+ })
41
+ })
@@ -1 +1 @@
1
- {"version":3,"file":"Root.d.ts","sourceRoot":"","sources":["../src/Root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AAG1F,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAA;AAMd,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAOzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAMlD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAcvC,KAAK,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG;IAC7C,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,E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7C,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,mBAAmB,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,GAAG,CAAC,YAAY,CAAA;IAC/B,KAAK,CAAC,EAAE,GAAG,CAAC,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAC3B,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,GAAG,CAAC,YAAY,CAAA;IACzB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,OAAO,CAAC,EAAE,iBAAiB,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAA;IACpD,wBAAwB,CAAC,EAAE,wBAAwB,GAAG;QACpD,KAAK,CAAC,EAAE;YACN,IAAI,EAAE,OAAO,CAAA;YACb,MAAM,EAAE;gBACN,OAAO,EAAE,MAAM,CAAA;gBACf,UAAU,EAAE,MAAM,CAAA;gBAClB,IAAI,EAAE,MAAM,CAAA;gBACZ,IAAI,EAAE,MAAM,CAAA;gBACZ,MAAM,EAAE,MAAM,CAAA;gBACd,YAAY,EAAE,MAAM,CAAA;aACrB,CAAA;SACF,CAAA;KACF,CAAA;CACF,CAAA;AAQD,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,kDAqKpC"}
@@ -1,36 +1,2 @@
1
- export interface NativeAppManifest {
2
- name: string;
3
- displayName?: string;
4
- scheme?: string | string[];
5
- version?: string;
6
- icon?: {
7
- source: string;
8
- backgroundColor: string;
9
- };
10
- splash?: {
11
- source: string;
12
- backgroundColor: string;
13
- width?: number;
14
- };
15
- ios?: {
16
- bundleId: string;
17
- buildNumber?: string;
18
- tablet?: boolean;
19
- deploymentTarget?: string;
20
- screensGamma?: boolean;
21
- useFrameworks?: 'static' | 'dynamic';
22
- ccache?: boolean;
23
- usesNonExemptEncryption?: boolean;
24
- };
25
- android?: {
26
- applicationId: string;
27
- versionCode?: number;
28
- minSdk?: number;
29
- adaptiveIcon?: {
30
- foreground?: string;
31
- background?: string;
32
- };
33
- };
34
- }
35
- export declare function validateNativeApp(manifest: NativeAppManifest): NativeAppManifest;
1
+ export { validateNativeApp, type NativeAppManifest, } from '@vxrn/utils/nativeAppManifest';
36
2
  //# sourceMappingURL=appManifest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appManifest.d.ts","sourceRoot":"","sources":["../../src/native/appManifest.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE;QACL,MAAM,EAAE,MAAM,CAAA;QACd,eAAe,EAAE,MAAM,CAAA;KACxB,CAAA;IACD,MAAM,CAAC,EAAE;QACP,MAAM,EAAE,MAAM,CAAA;QACd,eAAe,EAAE,MAAM,CAAA;QACvB,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,GAAG,CAAC,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAA;QAChB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,YAAY,CAAC,EAAE,OAAO,CAAA;QACtB,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;QACpC,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,uBAAuB,CAAC,EAAE,OAAO,CAAA;KAClC,CAAA;IACD,OAAO,CAAC,EAAE;QACR,aAAa,EAAE,MAAM,CAAA;QACrB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,YAAY,CAAC,EAAE;YACb,UAAU,CAAC,EAAE,MAAM,CAAA;YACnB,UAAU,CAAC,EAAE,MAAM,CAAA;SACpB,CAAA;KACF,CAAA;CACF;AAcD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,iBAAiB,CA0FhF"}
1
+ {"version":3,"file":"appManifest.d.ts","sourceRoot":"","sources":["../../src/native/appManifest.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,KAAK,iBAAiB,GACvB,MAAM,+BAA+B,CAAA"}
package/types/one.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Browser as NativeBrowser, Clipboard as NativeClipboard, AppInfo, Compose, Haptics, MenuAction, Network as NativeNetwork, SplitView, Swift, TextInput, ToolbarHost, ToolbarItem, UI as NativeUI, ZoomTransitionAlignmentRectDetector, ZoomTransitionEnabler, ZoomTransitionSource, type ColorType, useNativeState, useNetworkState } from '@vxrn/native';
1
+ import { Browser as NativeBrowser, Clipboard as NativeClipboard, AppInfo, Compose, Haptics, ImagePicker, MenuAction, Network as NativeNetwork, SplitView, Swift, TextInput, ToolbarHost, ToolbarItem, UI as NativeUI, ZoomTransitionAlignmentRectDetector, ZoomTransitionEnabler, ZoomTransitionSource, type ColorType, useNativeState, useNetworkState } from '@vxrn/native';
2
2
  import { SafeAreaProvider, SafeAreaView, initialWindowMetrics, useSafeAreaFrame, useSafeAreaInsets } from '@vxrn/safe-area';
3
3
  export type OnePlatform = 'web' | 'ios' | 'android' | 'rnx';
4
4
  export type OneIOS = typeof Swift & {
@@ -34,6 +34,7 @@ export type OneAPI = {
34
34
  readonly Clipboard: typeof NativeClipboard;
35
35
  readonly Network: typeof NativeNetwork;
36
36
  readonly Browser: typeof NativeBrowser;
37
+ readonly ImagePicker: typeof ImagePicker;
37
38
  readonly useNetworkState: typeof useNetworkState;
38
39
  };
39
40
  export declare const One: OneA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AK,GAAG,OAAO,QAAQ,GAAG;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAA;IACxC,QAAQ,CAAC,OAAO,EAAE,OAAO,OAAO,CAAA;IAChC,QAAQ,CAAC,SAAS,EAAE,OAAO,SAAS,CAAA;IACpC,QAAQ,CAAC,cAAc,EAAE,OAAO,cAAc,CAAA;CAC/C,CAAA;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAA;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,OAAO,CAAA;IAChC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC9B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAA;IACtC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,OAAO,eAAe,CAAA;IAC1C,QAAQ,CAAC,OAAO,EAAE,OAAO,aAAa,CAAA;IACtC,QAAQ,CAAC,OAAO,EAAE,OAAO,aAAa,CAAA;IACtC,QAAQ,CAAC,WAAW,EAAE,OAAO,WAAW,CAAA;IACxC,QAAQ,CAAC,eAAe,EAAE,OAAO,eAAe,CAAA;CACjD,CAAA;AAyCD,eAAO,MAAM,GAAG,EAAE,MAahB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"appManifest.js","names":[],"sources":["esm/native/appManifest.js"],"sourcesContent":["const TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/;\nconst SCHEME = /^[a-z][a-z0-9+.-]*$/i;\nconst VERSION = /^\\d+\\.\\d+\\.\\d+/;\nconst BUILD_NUMBER = /^[A-Za-z0-9.]+$/;\nconst REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\\.[A-Za-z][A-Za-z0-9-]*)+$/;\nconst DEPLOYMENT_TARGET = /^\\d+\\.\\d+$/;\nconst HEX_COLOR = /^#[\\da-f]{6}$/i;\nfunction fail(message) {\n throw new Error(`[one] invalid native.app: ${message}`);\n}\nfunction validateNativeApp(manifest) {\n if (!manifest || typeof manifest !== \"object\") fail(\"manifest must be an object\");\n if (!manifest.name || typeof manifest.name !== \"string\") fail(\"name is required\");\n if (!TARGET_NAME.test(manifest.name)) {\n fail(\n `name \"${manifest.name}\" must start with a letter and contain only letters, digits, and underscore`\n );\n }\n const schemes = manifest.scheme === void 0 ? [] : Array.isArray(manifest.scheme) ? manifest.scheme : [manifest.scheme];\n for (const scheme of schemes) {\n if (typeof scheme !== \"string\" || !SCHEME.test(scheme)) {\n fail(`scheme \"${scheme}\" must be a valid uri scheme`);\n }\n }\n if (manifest.version !== void 0 && !VERSION.test(manifest.version)) {\n fail(`version \"${manifest.version}\" must start with major.minor.patch`);\n }\n if (manifest.icon !== void 0 && (!manifest.icon.source || !HEX_COLOR.test(manifest.icon.backgroundColor))) {\n fail(\"icon requires source and a six-digit hex backgroundColor\");\n }\n if (manifest.splash !== void 0 && (!manifest.splash.source || !HEX_COLOR.test(manifest.splash.backgroundColor) || manifest.splash.width !== void 0 && (!Number.isFinite(manifest.splash.width) || manifest.splash.width < 1 || manifest.splash.width > 288))) {\n fail(\n \"splash requires source, a six-digit hex backgroundColor, and width from 1 to 288\"\n );\n }\n if (manifest.ios !== void 0) {\n if (!manifest.ios.bundleId || !REVERSE_DNS.test(manifest.ios.bundleId)) {\n fail(`ios.bundleId \"${manifest.ios.bundleId}\" must be reverse-dns`);\n }\n if (manifest.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(manifest.ios.deploymentTarget)) {\n fail(\n `ios.deploymentTarget \"${manifest.ios.deploymentTarget}\" must look like \"17.0\"`\n );\n }\n if (manifest.ios.buildNumber !== void 0 && !BUILD_NUMBER.test(manifest.ios.buildNumber)) {\n fail(\n `ios.buildNumber \"${manifest.ios.buildNumber}\" must contain only letters, digits, and dots`\n );\n }\n }\n if (manifest.android !== void 0) {\n if (!manifest.android.applicationId || !REVERSE_DNS.test(manifest.android.applicationId)) {\n fail(\n `android.applicationId \"${manifest.android.applicationId}\" must be reverse-dns`\n );\n }\n if (manifest.android.minSdk !== void 0 && (!Number.isInteger(manifest.android.minSdk) || manifest.android.minSdk < 21 || manifest.android.minSdk > 36)) {\n fail(`android.minSdk \"${manifest.android.minSdk}\" must be an integer from 21 to 36`);\n }\n if (manifest.android.versionCode !== void 0 && (!Number.isInteger(manifest.android.versionCode) || manifest.android.versionCode < 1)) {\n fail(\n `android.versionCode \"${manifest.android.versionCode}\" must be a positive integer`\n );\n }\n }\n return manifest;\n}\nexport {\n validateNativeApp\n};\n//# sourceMappingURL=appManifest.js.map\n"],"mappings":";AAAA,MAAM,cAAc;AACpB,MAAM,SAAS;AACf,MAAM,UAAU;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,oBAAoB;AAC1B,MAAM,YAAY;AAClB,SAAS,KAAK,SAAS;CACrB,MAAM,IAAI,MAAM,6BAA6B,SAAS;AACxD;AACA,SAAS,kBAAkB,UAAU;CACnC,IAAI,CAAC,YAAY,OAAO,aAAa,UAAU,KAAK,4BAA4B;CAChF,IAAI,CAAC,SAAS,QAAQ,OAAO,SAAS,SAAS,UAAU,KAAK,kBAAkB;CAChF,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,GAAG;EACpC,KACE,SAAS,SAAS,KAAK,4EACzB;CACF;CACA,MAAM,UAAU,SAAS,WAAW,KAAK,IAAI,CAAC,IAAI,MAAM,QAAQ,SAAS,MAAM,IAAI,SAAS,SAAS,CAAC,SAAS,MAAM;CACrH,KAAK,MAAM,UAAU,SAAS;EAC5B,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,KAAK,MAAM,GAAG;GACtD,KAAK,WAAW,OAAO,6BAA6B;EACtD;CACF;CACA,IAAI,SAAS,YAAY,KAAK,KAAK,CAAC,QAAQ,KAAK,SAAS,OAAO,GAAG;EAClE,KAAK,YAAY,SAAS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Q,gBAAgB,KAAK,MAAM,CAAC,OAAO,UAAU,SAAS,QAAQ,WAAW,KAAK,SAAS,QAAQ,cAAc,IAAI;GACpI,KACE,wBAAwB,SAAS,QAAQ,YAAY,6BACvD;EACF;CACF;CACA,OAAO;AACT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"appManifest.native.js","names":[],"sources":["esm/native/appManifest.native.js"],"sourcesContent":["var TARGET_NAME = /^[A-Za-z][A-Za-z0-9_]*$/;\nvar SCHEME = /^[a-z][a-z0-9+.-]*$/i;\nvar VERSION = /^\\d+\\.\\d+\\.\\d+/;\nvar BUILD_NUMBER = /^[A-Za-z0-9.]+$/;\nvar REVERSE_DNS = /^[A-Za-z][A-Za-z0-9-]*(\\.[A-Za-z][A-Za-z0-9-]*)+$/;\nvar DEPLOYMENT_TARGET = /^\\d+\\.\\d+$/;\nvar HEX_COLOR = /^#[\\da-f]{6}$/i;\nfunction fail(message) {\n throw new Error(`[one] invalid native.app: ${message}`);\n}\nfunction validateNativeApp(manifest) {\n if (!manifest || typeof manifest !== \"object\") fail(\"manifest must be an object\");\n if (!manifest.name || typeof manifest.name !== \"string\") fail(\"name is required\");\n if (!TARGET_NAME.test(manifest.name)) {\n fail(`name \"${manifest.name}\" must start with a letter and contain only letters, digits, and underscore`);\n }\n var schemes = manifest.scheme === void 0 ? [] : Array.isArray(manifest.scheme) ? manifest.scheme : [\n manifest.scheme\n ];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = schemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var scheme = _step.value;\n if (typeof scheme !== \"string\" || !SCHEME.test(scheme)) {\n fail(`scheme \"${scheme}\" must be a valid uri scheme`);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (manifest.version !== void 0 && !VERSION.test(manifest.version)) {\n fail(`version \"${manifest.version}\" must start with major.minor.patch`);\n }\n if (manifest.icon !== void 0 && (!manifest.icon.source || !HEX_COLOR.test(manifest.icon.backgroundColor))) {\n fail(\"icon requires source and a six-digit hex backgroundColor\");\n }\n if (manifest.splash !== void 0 && (!manifest.splash.source || !HEX_COLOR.test(manifest.splash.backgroundColor) || manifest.splash.width !== void 0 && (!Number.isFinite(manifest.splash.width) || manifest.splash.width < 1 || manifest.splash.width > 288))) {\n fail(\"splash requires source, a six-digit hex backgroundColor, and width from 1 to 288\");\n }\n if (manifest.ios !== void 0) {\n if (!manifest.ios.bundleId || !REVERSE_DNS.test(manifest.ios.bundleId)) {\n fail(`ios.bundleId \"${manifest.ios.bundleId}\" must be reverse-dns`);\n }\n if (manifest.ios.deploymentTarget !== void 0 && !DEPLOYMENT_TARGET.test(manifest.ios.deploymentTarget)) {\n fail(`ios.deploymentTarget \"${manifest.ios.deploymentTarget}\" must look like \"17.0\"`);\n }\n if (manifest.ios.buildNumber !== void 0 && !BUILD_NUMBER.test(manifest.ios.buildNumber)) {\n fail(`ios.buildNumber \"${manifest.ios.buildNumber}\" must contain only letters, digits, and dots`);\n }\n }\n if (manifest.android !== void 0) {\n if (!manifest.android.applicationId || !REVERSE_DNS.test(manifest.android.applicationId)) {\n fail(`android.applicationId \"${manifest.android.applicationId}\" must be reverse-dns`);\n }\n if (manifest.android.minSdk !== void 0 && (!Number.isInteger(manifest.android.minSdk) || manifest.android.minSdk < 21 || manifest.android.minSdk > 36)) {\n fail(`android.minSdk \"${manifest.android.minSdk}\" must be an integer from 21 to 36`);\n }\n if (manifest.android.versionCode !== void 0 && (!Number.isInteger(manifest.android.versionCode) || manifest.android.versionCode < 1)) {\n fail(`android.versionCode \"${manifest.android.versionCode}\" must be a positive integer`);\n }\n }\n return manifest;\n}\nexport {\n validateNativeApp\n};\n//# sourceMappingURL=appManifest.js.map\n"],"m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