@symbiote-native/device 1.0.0 → 2.0.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 +51 -55
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -66,7 +66,6 @@ src/angular/ @symbiote-native/device/angular — export * from '../core'
|
|
|
66
66
|
```tsx
|
|
67
67
|
// React
|
|
68
68
|
import { useEffect, useState } from 'react';
|
|
69
|
-
import { Text, View } from '@symbiote-native/react';
|
|
70
69
|
import {
|
|
71
70
|
brand,
|
|
72
71
|
deviceName,
|
|
@@ -88,20 +87,20 @@ function DeviceScreen() {
|
|
|
88
87
|
}, []);
|
|
89
88
|
|
|
90
89
|
return (
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
<
|
|
95
|
-
<
|
|
96
|
-
<
|
|
90
|
+
<view>
|
|
91
|
+
<text>{isDevice ? 'Real device' : 'Simulator/emulator'}</text>
|
|
92
|
+
<text>{`${brand ?? 'unknown'} ${modelName ?? ''}`}</text>
|
|
93
|
+
<text>{`${osName ?? 'unknown OS'} ${osVersion ?? ''}`}</text>
|
|
94
|
+
<text>{deviceName ?? 'unnamed device'}</text>
|
|
95
|
+
<text>
|
|
97
96
|
{uptime === null ? 'checking uptime…' : `Uptime: ${uptime}ms`}
|
|
98
|
-
</
|
|
99
|
-
<
|
|
97
|
+
</text>
|
|
98
|
+
<text>
|
|
100
99
|
{maxMemory === null
|
|
101
100
|
? 'checking memory…'
|
|
102
101
|
: `Max memory: ${maxMemory} bytes`}
|
|
103
|
-
</
|
|
104
|
-
</
|
|
102
|
+
</text>
|
|
103
|
+
</view>
|
|
105
104
|
);
|
|
106
105
|
}
|
|
107
106
|
```
|
|
@@ -110,7 +109,6 @@ function DeviceScreen() {
|
|
|
110
109
|
<!-- Vue -->
|
|
111
110
|
<script setup lang="ts">
|
|
112
111
|
import { onMounted, ref } from 'vue';
|
|
113
|
-
import { Text, View } from '@symbiote-native/vue';
|
|
114
112
|
import {
|
|
115
113
|
brand,
|
|
116
114
|
deviceName,
|
|
@@ -132,25 +130,24 @@ onMounted(() => {
|
|
|
132
130
|
</script>
|
|
133
131
|
|
|
134
132
|
<template>
|
|
135
|
-
<
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
<
|
|
139
|
-
<
|
|
140
|
-
<
|
|
133
|
+
<view>
|
|
134
|
+
<text>{{ isDevice ? 'Real device' : 'Simulator/emulator' }}</text>
|
|
135
|
+
<text>{{ `${brand ?? 'unknown'} ${modelName ?? ''}` }}</text>
|
|
136
|
+
<text>{{ `${osName ?? 'unknown OS'} ${osVersion ?? ''}` }}</text>
|
|
137
|
+
<text>{{ deviceName ?? 'unnamed device' }}</text>
|
|
138
|
+
<text>{{
|
|
141
139
|
uptime === null ? 'checking uptime…' : `Uptime: ${uptime}ms`
|
|
142
|
-
}}</
|
|
143
|
-
<
|
|
140
|
+
}}</text>
|
|
141
|
+
<text>{{
|
|
144
142
|
maxMemory === null ? 'checking memory…' : `Max memory: ${maxMemory} bytes`
|
|
145
|
-
}}</
|
|
146
|
-
</
|
|
143
|
+
}}</text>
|
|
144
|
+
</view>
|
|
147
145
|
</template>
|
|
148
146
|
```
|
|
149
147
|
|
|
150
148
|
```svelte
|
|
151
149
|
<!-- Svelte -->
|
|
152
150
|
<script lang="ts">
|
|
153
|
-
import { Text, View } from '@symbiote-native/svelte';
|
|
154
151
|
import {
|
|
155
152
|
brand,
|
|
156
153
|
deviceName,
|
|
@@ -171,23 +168,22 @@ onMounted(() => {
|
|
|
171
168
|
});
|
|
172
169
|
</script>
|
|
173
170
|
|
|
174
|
-
<
|
|
175
|
-
<
|
|
176
|
-
<
|
|
177
|
-
<
|
|
178
|
-
<
|
|
179
|
-
<
|
|
180
|
-
<
|
|
171
|
+
<view>
|
|
172
|
+
<text>{isDevice ? 'Real device' : 'Simulator/emulator'}</text>
|
|
173
|
+
<text>{`${brand ?? 'unknown'} ${modelName ?? ''}`}</text>
|
|
174
|
+
<text>{`${osName ?? 'unknown OS'} ${osVersion ?? ''}`}</text>
|
|
175
|
+
<text>{deviceName ?? 'unnamed device'}</text>
|
|
176
|
+
<text>{uptime === null ? 'checking uptime…' : `Uptime: ${uptime}ms`}</text>
|
|
177
|
+
<text>
|
|
181
178
|
{maxMemory === null ? 'checking memory…' : `Max memory: ${maxMemory} bytes`}
|
|
182
|
-
</
|
|
183
|
-
</
|
|
179
|
+
</text>
|
|
180
|
+
</view>
|
|
184
181
|
```
|
|
185
182
|
|
|
186
183
|
```tsx
|
|
187
184
|
// Solid — a component body runs once, so the two async values need a signal; the eager
|
|
188
185
|
// constants (brand, modelName, ...) are plain reads with nothing to subscribe to.
|
|
189
186
|
import { createSignal, onMount } from 'solid-js';
|
|
190
|
-
import { Text, View } from '@symbiote-native/solid';
|
|
191
187
|
import {
|
|
192
188
|
brand,
|
|
193
189
|
deviceName,
|
|
@@ -209,20 +205,20 @@ function DeviceScreen() {
|
|
|
209
205
|
});
|
|
210
206
|
|
|
211
207
|
return (
|
|
212
|
-
<
|
|
213
|
-
<
|
|
214
|
-
<
|
|
215
|
-
<
|
|
216
|
-
<
|
|
217
|
-
<
|
|
208
|
+
<view>
|
|
209
|
+
<text>{isDevice ? 'Real device' : 'Simulator/emulator'}</text>
|
|
210
|
+
<text>{`${brand ?? 'unknown'} ${modelName ?? ''}`}</text>
|
|
211
|
+
<text>{`${osName ?? 'unknown OS'} ${osVersion ?? ''}`}</text>
|
|
212
|
+
<text>{deviceName ?? 'unnamed device'}</text>
|
|
213
|
+
<text>
|
|
218
214
|
{uptime() === null ? 'checking uptime…' : `Uptime: ${uptime()}ms`}
|
|
219
|
-
</
|
|
220
|
-
<
|
|
215
|
+
</text>
|
|
216
|
+
<text>
|
|
221
217
|
{maxMemory() === null
|
|
222
218
|
? 'checking memory…'
|
|
223
219
|
: `Max memory: ${maxMemory()} bytes`}
|
|
224
|
-
</
|
|
225
|
-
</
|
|
220
|
+
</text>
|
|
221
|
+
</view>
|
|
226
222
|
);
|
|
227
223
|
}
|
|
228
224
|
```
|
|
@@ -230,7 +226,7 @@ function DeviceScreen() {
|
|
|
230
226
|
```ts
|
|
231
227
|
// Angular
|
|
232
228
|
import { Component, signal } from '@angular/core';
|
|
233
|
-
import {
|
|
229
|
+
import { SYMBIOTE_ELEMENTS } from '@symbiote-native/angular';
|
|
234
230
|
import {
|
|
235
231
|
brand,
|
|
236
232
|
deviceName,
|
|
@@ -244,22 +240,22 @@ import {
|
|
|
244
240
|
|
|
245
241
|
@Component({
|
|
246
242
|
standalone: true,
|
|
247
|
-
imports: [
|
|
243
|
+
imports: [SYMBIOTE_ELEMENTS],
|
|
248
244
|
template: `
|
|
249
|
-
<
|
|
250
|
-
<
|
|
251
|
-
<
|
|
252
|
-
<
|
|
253
|
-
<
|
|
254
|
-
<
|
|
245
|
+
<view>
|
|
246
|
+
<text>{{ isDevice ? 'Real device' : 'Simulator/emulator' }}</text>
|
|
247
|
+
<text>{{ brand ?? 'unknown' }} {{ modelName ?? '' }}</text>
|
|
248
|
+
<text>{{ osName ?? 'unknown OS' }} {{ osVersion ?? '' }}</text>
|
|
249
|
+
<text>{{ deviceName ?? 'unnamed device' }}</text>
|
|
250
|
+
<text>{{
|
|
255
251
|
uptime() === null ? 'checking uptime…' : 'Uptime: ' + uptime() + 'ms'
|
|
256
|
-
}}</
|
|
257
|
-
<
|
|
252
|
+
}}</text>
|
|
253
|
+
<text>{{
|
|
258
254
|
maxMemory() === null
|
|
259
255
|
? 'checking memory…'
|
|
260
256
|
: 'Max memory: ' + maxMemory() + ' bytes'
|
|
261
|
-
}}</
|
|
262
|
-
</
|
|
257
|
+
}}</text>
|
|
258
|
+
</view>
|
|
263
259
|
`,
|
|
264
260
|
})
|
|
265
261
|
export class DeviceScreen {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/device",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
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": {
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
"solid-js": ">=1.9.0",
|
|
81
81
|
"svelte": ">=5.56.0",
|
|
82
82
|
"vue": ">=3.5.0",
|
|
83
|
-
"@symbiote-native/angular": "^
|
|
84
|
-
"@symbiote-native/engine": "^0.
|
|
85
|
-
"@symbiote-native/react": "^
|
|
86
|
-
"@symbiote-native/solid": "^
|
|
87
|
-
"@symbiote-native/svelte": "^
|
|
88
|
-
"@symbiote-native/vue": "^
|
|
83
|
+
"@symbiote-native/angular": "^2.0.0",
|
|
84
|
+
"@symbiote-native/engine": "^0.5.0",
|
|
85
|
+
"@symbiote-native/react": "^2.0.0",
|
|
86
|
+
"@symbiote-native/solid": "^2.0.0",
|
|
87
|
+
"@symbiote-native/svelte": "^2.0.0",
|
|
88
|
+
"@symbiote-native/vue": "^2.0.0"
|
|
89
89
|
},
|
|
90
90
|
"peerDependenciesMeta": {
|
|
91
91
|
"@symbiote-native/angular": {
|
|
@@ -133,13 +133,13 @@
|
|
|
133
133
|
"solid-js": "^1.9.14",
|
|
134
134
|
"svelte": "^5.56.0",
|
|
135
135
|
"typescript": "~6.0.0",
|
|
136
|
-
"@symbiote-native/angular": "
|
|
137
|
-
"@symbiote-native/engine": "0.
|
|
138
|
-
"@symbiote-native/react": "
|
|
139
|
-
"@symbiote-native/solid": "
|
|
140
|
-
"@symbiote-native/svelte": "
|
|
136
|
+
"@symbiote-native/angular": "2.0.0",
|
|
137
|
+
"@symbiote-native/engine": "0.5.0",
|
|
138
|
+
"@symbiote-native/react": "2.0.0",
|
|
139
|
+
"@symbiote-native/solid": "2.0.0",
|
|
140
|
+
"@symbiote-native/svelte": "2.0.0",
|
|
141
141
|
"@symbiote-native/test-utils": "0.3.0",
|
|
142
|
-
"@symbiote-native/vue": "
|
|
142
|
+
"@symbiote-native/vue": "2.0.0"
|
|
143
143
|
},
|
|
144
144
|
"scripts": {
|
|
145
145
|
"typecheck": "tsc --build",
|