@symbiote-native/cellular 0.3.0 → 1.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.
Files changed (2) hide show
  1. package/README.md +68 -4
  2. package/package.json +27 -15
package/README.md CHANGED
@@ -40,8 +40,8 @@ package with zero further changes:
40
40
 
41
41
  Full mechanics — the Podfile pieces that normally ship inside the `expo` package, the `expo`
42
42
  peer-dependency exclusion list, per-module permission strings — live in the
43
- `symbiote-expo-native-module` project skill. This wiring is already done for all four
44
- `examples/expo-*` canary apps (React, Vue SFC, Vue TSX, Angular).
43
+ `symbiote-expo-native-module` project skill. This wiring is already done for all six
44
+ `examples/expo-*` canary apps (React, Vue SFC, Vue TSX, Svelte, Solid, Angular).
45
45
 
46
46
  ## Shape
47
47
 
@@ -134,6 +134,69 @@ onMounted(() => {
134
134
  </template>
135
135
  ```
136
136
 
137
+ ```svelte
138
+ <!-- Svelte -->
139
+ <script lang="ts">
140
+ import {
141
+ CellularGeneration,
142
+ getCarrierNameAsync,
143
+ getCellularGenerationAsync,
144
+ usePermissions,
145
+ } from '@symbiote-native/cellular/svelte';
146
+
147
+ let generation = $state<CellularGeneration | null>(null);
148
+ let carrierName = $state<string | null>(null);
149
+ const permissions = usePermissions(); // boxed getter: permissions.status / .request()
150
+
151
+ Promise.all([getCellularGenerationAsync(), getCarrierNameAsync()]).then(
152
+ ([gen, carrier]) => {
153
+ generation = gen;
154
+ carrierName = carrier;
155
+ },
156
+ );
157
+ </script>
158
+
159
+ <Text>{generation === null ? 'checking…' : CellularGeneration[generation]}</Text>
160
+ <Text>{carrierName ?? 'checking…'}</Text>
161
+ <Text>{permissions.status === null ? 'checking…' : permissions.status.status}</Text>
162
+ <Button title="Request permission" onPress={() => permissions.request()} />
163
+ ```
164
+
165
+ ```tsx
166
+ // Solid
167
+ import { createSignal } from 'solid-js';
168
+ import {
169
+ CellularGeneration,
170
+ getCarrierNameAsync,
171
+ getCellularGenerationAsync,
172
+ } from '@symbiote-native/cellular';
173
+ import { createPermissions } from '@symbiote-native/cellular/solid';
174
+
175
+ function CellularScreen() {
176
+ const [generation, setGeneration] = createSignal<CellularGeneration | null>(null);
177
+ const [carrierName, setCarrierName] = createSignal<string | null>(null);
178
+ const { status, request: requestPermission } = createPermissions();
179
+
180
+ Promise.all([getCellularGenerationAsync(), getCarrierNameAsync()]).then(
181
+ ([gen, carrier]) => {
182
+ setGeneration(gen);
183
+ setCarrierName(carrier);
184
+ },
185
+ );
186
+
187
+ return (
188
+ <>
189
+ <Text>
190
+ {generation() === null ? 'checking…' : CellularGeneration[generation()!]}
191
+ </Text>
192
+ <Text>{carrierName() ?? 'checking…'}</Text>
193
+ <Text>{status() === null ? 'checking…' : status()!.status}</Text>
194
+ <Button title="Request permission" onPress={() => requestPermission()} />
195
+ </>
196
+ );
197
+ }
198
+ ```
199
+
137
200
  ```ts
138
201
  // Angular
139
202
  import { Component, inject, signal } from '@angular/core';
@@ -178,8 +241,9 @@ export class CellularScreen {
178
241
  ```
179
242
 
180
243
  Trimmed from the real demo screens — `examples/expo-react/screens/CellularScreen.tsx` and its
181
- Vue SFC, Vue TSX, and Angular twins (`examples/expo-vue-sfc/screens/CellularScreen.vue`,
182
- `examples/expo-vue-tsx/screens/CellularScreen.tsx`, `examples/expo-angular/src/screens/CellularScreen.ts`),
244
+ Vue SFC, Vue TSX, Svelte, Solid, and Angular twins (`examples/expo-vue-sfc/screens/CellularScreen.vue`,
245
+ `examples/expo-vue-tsx/screens/CellularScreen.tsx`, `examples/expo-svelte/screens/CellularScreen.svelte`,
246
+ `examples/expo-solid/screens/CellularScreen.tsx`, `examples/expo-angular/src/screens/CellularScreen.ts`),
183
247
  which also cover `allowsVoipAsync`/`getIsoCountryCodeAsync`/`getMobileCountryCodeAsync`/
184
248
  `getMobileNetworkCodeAsync` and gate the Android-only fields behind `Platform.OS === 'android'`.
185
249
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/cellular",
3
- "version": "0.3.0",
3
+ "version": "1.0.0",
4
4
  "description": "expo-cellular wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Cellular generation (2G/3G/4G/5G), carrier/SIM info on Android (ISO country code, carrier name, MCC/MNC), VoIP-support detection, and the permission get/request pair gating carrier info on Android.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -13,6 +13,18 @@
13
13
  "url": "https://github.com/OneEyed1366/symbiote-native/issues"
14
14
  },
15
15
  "author": "Andrey Prokopenko <psevdoproger@gmail.com>",
16
+ "keywords": [
17
+ "react-native",
18
+ "symbiote-native",
19
+ "expo-cellular",
20
+ "react",
21
+ "vue",
22
+ "svelte",
23
+ "solid",
24
+ "angular",
25
+ "carrier-info",
26
+ "cellular-generation"
27
+ ],
16
28
  "type": "module",
17
29
  "main": "./build/core/index.js",
18
30
  "module": "./build/core/index.js",
@@ -61,19 +73,19 @@
61
73
  "expo-modules-core": "57.0.5"
62
74
  },
63
75
  "peerDependencies": {
64
- "@symbiote-native/angular": ">=0.6.2",
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",
70
76
  "@angular/core": ">=20",
71
77
  "@vue/runtime-core": "^3.5.13",
72
78
  "react": ">=19.0.0",
73
79
  "react-native": ">=0.86",
74
80
  "solid-js": ">=1.9.0",
75
81
  "svelte": ">=5.56.0",
76
- "vue": ">=3.5.0"
82
+ "vue": ">=3.5.0",
83
+ "@symbiote-native/angular": "^1.0.0",
84
+ "@symbiote-native/engine": "^0.4.0",
85
+ "@symbiote-native/react": "^1.0.0",
86
+ "@symbiote-native/solid": "^1.0.0",
87
+ "@symbiote-native/svelte": "^1.0.0",
88
+ "@symbiote-native/vue": "^1.0.0"
77
89
  },
78
90
  "peerDependenciesMeta": {
79
91
  "@symbiote-native/angular": {
@@ -121,13 +133,13 @@
121
133
  "solid-js": "^1.9.14",
122
134
  "svelte": "^5.56.0",
123
135
  "typescript": "~6.0.0",
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"
136
+ "@symbiote-native/angular": "1.0.0",
137
+ "@symbiote-native/engine": "0.4.0",
138
+ "@symbiote-native/react": "1.0.0",
139
+ "@symbiote-native/solid": "1.0.0",
140
+ "@symbiote-native/svelte": "1.0.0",
141
+ "@symbiote-native/test-utils": "0.3.0",
142
+ "@symbiote-native/vue": "1.0.0"
131
143
  },
132
144
  "scripts": {
133
145
  "typecheck": "tsc --build",