@symbiote-native/device 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,12 +28,12 @@ Unlike a plain RN native module, `expo-device`'s native code is discovered by
28
28
  into the native host app **once**, covering this package and every other `expo-modules-core`
29
29
  package with zero further changes:
30
30
 
31
- | Platform | Touches |
32
- |---|---|
33
- | iOS | `ios/Podfile` — add `use_expo_modules!` |
34
- | iOS | `AppDelegate.swift` — Expo's runtime-bootstrap hook |
35
- | Android | `settings.gradle` / `app/build.gradle` — resolve and include the Expo Gradle projects |
36
- | Android | `MainApplication.kt` — Expo's bootstrap hook, plus a hand-written native-module name map (there's no `expo` meta-package here to auto-generate one) |
31
+ | Platform | Touches |
32
+ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
33
+ | iOS | `ios/Podfile` — add `use_expo_modules!` |
34
+ | iOS | `AppDelegate.swift` — Expo's runtime-bootstrap hook |
35
+ | Android | `settings.gradle` / `app/build.gradle` — resolve and include the Expo Gradle projects |
36
+ | Android | `MainApplication.kt` — Expo's bootstrap hook, plus a hand-written native-module name map (there's no `expo` meta-package here to auto-generate one) |
37
37
 
38
38
  Full mechanics live in the `symbiote-expo-native-module` project skill. Reference
39
39
  implementation: `examples/expo-react/ios/Podfile` and
@@ -53,13 +53,12 @@ src/core/ Eager constants (isDevice, brand, manufacturer, modelId, modelName
53
53
  isSideLoadingEnabledAsync / getPlatformFeaturesAsync / hasPlatformFeatureAsync,
54
54
  and the DeviceType enum. native-module.ts resolves the native module via
55
55
  expo-modules-core's requireNativeModule.
56
- src/react/ @symbiote-native/device/react — export * from '../core'
57
- src/vue/ @symbiote-native/device/vue — export * from '../core'
58
56
  src/angular/ @symbiote-native/device/angular — export * from '../core'
59
57
  ```
60
58
 
61
- No per-adapter lifecycle wrapper exists because there's nothing to subscribe to or clean up —
62
- each adapter entry is a single-file re-export.
59
+ `./react`, `./vue`, and `./svelte` are `exports`-map aliases straight onto `src/core/` — no
60
+ physical per-framework file, since there's nothing to subscribe to or clean up. `./angular` stays
61
+ a physical file/subpath since Angular ships through a separate `ngc`/AOT build (`build-ngc/`).
63
62
 
64
63
  ## Use it
65
64
 
@@ -93,8 +92,14 @@ function DeviceScreen() {
93
92
  <Text>{`${brand ?? 'unknown'} ${modelName ?? ''}`}</Text>
94
93
  <Text>{`${osName ?? 'unknown OS'} ${osVersion ?? ''}`}</Text>
95
94
  <Text>{deviceName ?? 'unnamed device'}</Text>
96
- <Text>{uptime === null ? 'checking uptime…' : `Uptime: ${uptime}ms`}</Text>
97
- <Text>{maxMemory === null ? 'checking memory…' : `Max memory: ${maxMemory} bytes`}</Text>
95
+ <Text>
96
+ {uptime === null ? 'checking uptime…' : `Uptime: ${uptime}ms`}
97
+ </Text>
98
+ <Text>
99
+ {maxMemory === null
100
+ ? 'checking memory…'
101
+ : `Max memory: ${maxMemory} bytes`}
102
+ </Text>
98
103
  </View>
99
104
  );
100
105
  }
@@ -131,8 +136,12 @@ onMounted(() => {
131
136
  <Text>{{ `${brand ?? 'unknown'} ${modelName ?? ''}` }}</Text>
132
137
  <Text>{{ `${osName ?? 'unknown OS'} ${osVersion ?? ''}` }}</Text>
133
138
  <Text>{{ deviceName ?? 'unnamed device' }}</Text>
134
- <Text>{{ uptime === null ? 'checking uptime…' : `Uptime: ${uptime}ms` }}</Text>
135
- <Text>{{ maxMemory === null ? 'checking memory…' : `Max memory: ${maxMemory} bytes` }}</Text>
139
+ <Text>{{
140
+ uptime === null ? 'checking uptime…' : `Uptime: ${uptime}ms`
141
+ }}</Text>
142
+ <Text>{{
143
+ maxMemory === null ? 'checking memory…' : `Max memory: ${maxMemory} bytes`
144
+ }}</Text>
136
145
  </View>
137
146
  </template>
138
147
  ```
@@ -161,8 +170,14 @@ import {
161
170
  <Text>{{ brand ?? 'unknown' }} {{ modelName ?? '' }}</Text>
162
171
  <Text>{{ osName ?? 'unknown OS' }} {{ osVersion ?? '' }}</Text>
163
172
  <Text>{{ deviceName ?? 'unnamed device' }}</Text>
164
- <Text>{{ uptime() === null ? 'checking uptime…' : 'Uptime: ' + uptime() + 'ms' }}</Text>
165
- <Text>{{ maxMemory() === null ? 'checking memory…' : 'Max memory: ' + maxMemory() + ' bytes' }}</Text>
173
+ <Text>{{
174
+ uptime() === null ? 'checking uptime…' : 'Uptime: ' + uptime() + 'ms'
175
+ }}</Text>
176
+ <Text>{{
177
+ maxMemory() === null
178
+ ? 'checking memory…'
179
+ : 'Max memory: ' + maxMemory() + ' bytes'
180
+ }}</Text>
166
181
  </View>
167
182
  `,
168
183
  })
@@ -145,7 +145,9 @@ export async function getMaxMemoryAsync() {
145
145
  throw new UnavailabilityError(NATIVE_MODULE_NAME, 'getMaxMemoryAsync');
146
146
  }
147
147
  const maxMemory = await expoDevice.getMaxMemoryAsync();
148
- return maxMemory === MAX_MEMORY_UNLIMITED_SENTINEL ? Number.MAX_SAFE_INTEGER : maxMemory;
148
+ return maxMemory === MAX_MEMORY_UNLIMITED_SENTINEL
149
+ ? Number.MAX_SAFE_INTEGER
150
+ : maxMemory;
149
151
  }
150
152
  /**
151
153
  * Checks whether the device has been rooted (Android) or jailbroken (iOS). This is a best-effort
@@ -145,7 +145,9 @@ export async function getMaxMemoryAsync() {
145
145
  throw new UnavailabilityError(NATIVE_MODULE_NAME, 'getMaxMemoryAsync');
146
146
  }
147
147
  const maxMemory = await expoDevice.getMaxMemoryAsync();
148
- return maxMemory === MAX_MEMORY_UNLIMITED_SENTINEL ? Number.MAX_SAFE_INTEGER : maxMemory;
148
+ return maxMemory === MAX_MEMORY_UNLIMITED_SENTINEL
149
+ ? Number.MAX_SAFE_INTEGER
150
+ : maxMemory;
149
151
  }
150
152
  /**
151
153
  * Checks whether the device has been rooted (Android) or jailbroken (iOS). This is a best-effort
@@ -1 +1 @@
1
- {"version":3,"file":"device.js","sourceRoot":"","sources":["../../src/core/device.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,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,UAAU,CAAC,wBAAwB,EAAE,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAAe;IAEf,IAAI,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,UAAU,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;AACrD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAsC7C,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAsB,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAsC7C,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAC3C,uBAAuB,CACxB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@symbiote-native/device",
3
- "version": "0.1.0",
4
- "description": "expo-device wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters. Device brand/model/OS constants, uptime, max-memory, root/jailbreak detection, side-loading detection, and platform-feature queries.",
3
+ "version": "0.3.0",
4
+ "description": "expo-device wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Device brand/model/OS constants, uptime, max-memory, root/jailbreak detection, side-loading detection, and platform-feature queries.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -23,12 +23,20 @@
23
23
  "default": "./build/core/index.js"
24
24
  },
25
25
  "./vue": {
26
- "types": "./build/vue/index.d.ts",
27
- "default": "./build/vue/index.js"
26
+ "types": "./build/core/index.d.ts",
27
+ "default": "./build/core/index.js"
28
28
  },
29
29
  "./react": {
30
- "types": "./build/react/index.d.ts",
31
- "default": "./build/react/index.js"
30
+ "types": "./build/core/index.d.ts",
31
+ "default": "./build/core/index.js"
32
+ },
33
+ "./svelte": {
34
+ "types": "./build/core/index.d.ts",
35
+ "default": "./build/core/index.js"
36
+ },
37
+ "./solid": {
38
+ "types": "./build/core/index.d.ts",
39
+ "default": "./build/core/index.js"
32
40
  },
33
41
  "./angular": {
34
42
  "types": "./build-ngc/angular/index.d.ts",
@@ -53,15 +61,19 @@
53
61
  "expo-modules-core": "57.0.5"
54
62
  },
55
63
  "peerDependencies": {
64
+ "@symbiote-native/angular": ">=0.6.2",
56
65
  "@symbiote-native/engine": ">=0.1.7",
66
+ "@symbiote-native/react": ">=0.2.8",
67
+ "@symbiote-native/solid": ">=0.0.1",
68
+ "@symbiote-native/svelte": ">=0.1.0",
69
+ "@symbiote-native/vue": ">=0.3.8",
57
70
  "@angular/core": ">=20",
58
71
  "@vue/runtime-core": "^3.5.13",
59
72
  "react": ">=19.0.0",
60
73
  "react-native": ">=0.86",
61
- "vue": ">=3.5.0",
62
- "@symbiote-native/angular": "0.6.2",
63
- "@symbiote-native/react": "0.2.8",
64
- "@symbiote-native/vue": "0.3.8"
74
+ "solid-js": ">=1.9.0",
75
+ "svelte": ">=5.56.0",
76
+ "vue": ">=3.5.0"
65
77
  },
66
78
  "peerDependenciesMeta": {
67
79
  "@symbiote-native/angular": {
@@ -70,6 +82,12 @@
70
82
  "@symbiote-native/react": {
71
83
  "optional": true
72
84
  },
85
+ "@symbiote-native/solid": {
86
+ "optional": true
87
+ },
88
+ "@symbiote-native/svelte": {
89
+ "optional": true
90
+ },
73
91
  "@symbiote-native/vue": {
74
92
  "optional": true
75
93
  },
@@ -82,24 +100,34 @@
82
100
  "react": {
83
101
  "optional": true
84
102
  },
103
+ "solid-js": {
104
+ "optional": true
105
+ },
106
+ "svelte": {
107
+ "optional": true
108
+ },
85
109
  "vue": {
86
110
  "optional": true
87
111
  }
88
112
  },
89
113
  "devDependencies": {
90
- "@angular/compiler": "^22",
91
- "@angular/compiler-cli": "^22",
92
- "@angular/core": "^22",
114
+ "@angular/compiler": "~22.0.8",
115
+ "@angular/compiler-cli": "~22.0.8",
116
+ "@angular/core": "~22.0.8",
93
117
  "@types/node": "^26.0.0",
94
118
  "@types/react": "^19.2.0",
95
119
  "@vue/runtime-core": "^3.5.13",
96
120
  "react": "19.2.3",
121
+ "solid-js": "^1.9.14",
122
+ "svelte": "^5.56.0",
97
123
  "typescript": "~6.0.0",
98
- "@symbiote-native/angular": "0.6.2",
99
- "@symbiote-native/engine": "0.1.7",
100
- "@symbiote-native/react": "0.2.8",
101
- "@symbiote-native/test-utils": "0.1.6",
102
- "@symbiote-native/vue": "0.3.8"
124
+ "@symbiote-native/angular": "0.8.0",
125
+ "@symbiote-native/engine": "0.3.0",
126
+ "@symbiote-native/react": "0.4.0",
127
+ "@symbiote-native/solid": "0.1.0",
128
+ "@symbiote-native/svelte": "0.3.0",
129
+ "@symbiote-native/test-utils": "0.2.0",
130
+ "@symbiote-native/vue": "0.5.0"
103
131
  },
104
132
  "scripts": {
105
133
  "typecheck": "tsc --build",
@@ -73,7 +73,8 @@ export const productName: string | null = expoDevice.productName ?? null;
73
73
  export const deviceType: DeviceType | null = expoDevice.deviceType ?? null;
74
74
 
75
75
  /** The device year class (https://github.com/facebook/device-year-class) of this device. */
76
- export const deviceYearClass: number | null = expoDevice.deviceYearClass ?? null;
76
+ export const deviceYearClass: number | null =
77
+ expoDevice.deviceYearClass ?? null;
77
78
 
78
79
  /**
79
80
  * The device's total memory, in bytes — the total memory accessible to the kernel, but not
@@ -110,19 +111,22 @@ export const osBuildId: string | null = expoDevice.osBuildId ?? null;
110
111
  * The internal build ID of the OS running on the device. On Android this corresponds to
111
112
  * `Build.ID`; on iOS it's the same value as {@link osBuildId}.
112
113
  */
113
- export const osInternalBuildId: string | null = expoDevice.osInternalBuildId ?? null;
114
+ export const osInternalBuildId: string | null =
115
+ expoDevice.osInternalBuildId ?? null;
114
116
 
115
117
  /**
116
118
  * A string that uniquely identifies the build of the currently running system OS.
117
119
  * @platform android
118
120
  */
119
- export const osBuildFingerprint: string | null = expoDevice.osBuildFingerprint ?? null;
121
+ export const osBuildFingerprint: string | null =
122
+ expoDevice.osBuildFingerprint ?? null;
120
123
 
121
124
  /**
122
125
  * The Android SDK version of the software currently running on this hardware device.
123
126
  * @platform android
124
127
  */
125
- export const platformApiLevel: number | null = expoDevice.platformApiLevel ?? null;
128
+ export const platformApiLevel: number | null =
129
+ expoDevice.platformApiLevel ?? null;
126
130
 
127
131
  /**
128
132
  * The human-readable name of the device, which may be set by the device's user. `null` if the
@@ -169,7 +173,9 @@ export async function getMaxMemoryAsync(): Promise<number> {
169
173
  throw new UnavailabilityError(NATIVE_MODULE_NAME, 'getMaxMemoryAsync');
170
174
  }
171
175
  const maxMemory = await expoDevice.getMaxMemoryAsync();
172
- return maxMemory === MAX_MEMORY_UNLIMITED_SENTINEL ? Number.MAX_SAFE_INTEGER : maxMemory;
176
+ return maxMemory === MAX_MEMORY_UNLIMITED_SENTINEL
177
+ ? Number.MAX_SAFE_INTEGER
178
+ : maxMemory;
173
179
  }
174
180
 
175
181
  /**
@@ -179,7 +185,10 @@ export async function getMaxMemoryAsync(): Promise<number> {
179
185
  */
180
186
  export async function isRootedExperimentalAsync(): Promise<boolean> {
181
187
  if (!expoDevice.isRootedExperimentalAsync) {
182
- throw new UnavailabilityError(NATIVE_MODULE_NAME, 'isRootedExperimentalAsync');
188
+ throw new UnavailabilityError(
189
+ NATIVE_MODULE_NAME,
190
+ 'isRootedExperimentalAsync',
191
+ );
183
192
  }
184
193
  return expoDevice.isRootedExperimentalAsync();
185
194
  }
@@ -192,7 +201,10 @@ export async function isRootedExperimentalAsync(): Promise<boolean> {
192
201
  */
193
202
  export async function isSideLoadingEnabledAsync(): Promise<boolean> {
194
203
  if (!expoDevice.isSideLoadingEnabledAsync) {
195
- throw new UnavailabilityError(NATIVE_MODULE_NAME, 'isSideLoadingEnabledAsync');
204
+ throw new UnavailabilityError(
205
+ NATIVE_MODULE_NAME,
206
+ 'isSideLoadingEnabledAsync',
207
+ );
196
208
  }
197
209
  return expoDevice.isSideLoadingEnabledAsync();
198
210
  }
@@ -214,7 +226,9 @@ export async function getPlatformFeaturesAsync(): Promise<string[]> {
214
226
  * when the native method is absent (e.g. on iOS), matching upstream.
215
227
  * @platform android
216
228
  */
217
- export async function hasPlatformFeatureAsync(feature: string): Promise<boolean> {
229
+ export async function hasPlatformFeatureAsync(
230
+ feature: string,
231
+ ): Promise<boolean> {
218
232
  if (!expoDevice.hasPlatformFeatureAsync) {
219
233
  return false;
220
234
  }
@@ -39,4 +39,6 @@ export type INativeDeviceModule = {
39
39
  hasPlatformFeatureAsync?(feature: string): Promise<boolean>;
40
40
  };
41
41
 
42
- export const expoDevice = requireNativeModule<INativeDeviceModule>(EXPO_DEVICE_MODULE_NAME);
42
+ export const expoDevice = requireNativeModule<INativeDeviceModule>(
43
+ EXPO_DEVICE_MODULE_NAME,
44
+ );
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -1,6 +0,0 @@
1
- // @symbiote-native/device/react: the React entry over the framework-agnostic core. Upstream
2
- // ships eager constants and free async functions, no per-instance state and no event stream
3
- // (unlike @symbiote-native/sensors) — there is nothing for a hook to wrap, so this is a plain
4
- // re-export, mirroring how @symbiote-native/local-auth's React entry passes its own free
5
- // functions through untouched.
6
- export * from '../core/index.js';
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -1,4 +0,0 @@
1
- // @symbiote-native/device/vue: the Vue entry over the framework-agnostic core. Same reasoning as
2
- // the React entry — no per-instance state or event stream to wire onto Vue's reactivity, so this
3
- // is a plain re-export.
4
- export * from '../core/index.js';
@@ -1,6 +0,0 @@
1
- // @symbiote-native/device/react: the React entry over the framework-agnostic core. Upstream
2
- // ships eager constants and free async functions, no per-instance state and no event stream
3
- // (unlike @symbiote-native/sensors) — there is nothing for a hook to wrap, so this is a plain
4
- // re-export, mirroring how @symbiote-native/local-auth's React entry passes its own free
5
- // functions through untouched.
6
- export * from '../core';
package/src/vue/index.ts DELETED
@@ -1,4 +0,0 @@
1
- // @symbiote-native/device/vue: the Vue entry over the framework-agnostic core. Same reasoning as
2
- // the React entry — no per-instance state or event stream to wire onto Vue's reactivity, so this
3
- // is a plain re-export.
4
- export * from '../core';