@symbiote-native/sensors 1.0.0 → 3.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 +13 -8
  2. package/package.json +14 -14
package/README.md CHANGED
@@ -17,6 +17,10 @@ project never depends on) — every sensor's logic is hand-ported into this pack
17
17
  npm install @symbiote-native/sensors
18
18
  ```
19
19
 
20
+ Scaffolding or extending a SymbioteNative app? `npx @symbiote-native/cli new --sensors` (or
21
+ `add --sensors` in an existing app) installs and wires this for you — see
22
+ [`@symbiote-native/cli`](../cli).
23
+
20
24
  Depends on `expo-sensors` and `expo-modules-core` directly (regular dependencies, pinned to exact
21
25
  versions — never a caret range, since this package's `core/` is hand-ported against one specific
22
26
  native API shape and a newer resolve could silently drift the two apart). Never install
@@ -77,10 +81,10 @@ import { useAccelerometer } from '@symbiote-native/sensors/react';
77
81
  function SensorsScreen() {
78
82
  const accelerometer = useAccelerometer();
79
83
  return (
80
- <Text>
84
+ <text>
81
85
  {accelerometer &&
82
86
  `x ${accelerometer.x} · y ${accelerometer.y} · z ${accelerometer.z}`}
83
- </Text>
87
+ </text>
84
88
  );
85
89
  }
86
90
  ```
@@ -93,10 +97,10 @@ import { useAccelerometer } from '@symbiote-native/sensors/vue';
93
97
  const accelerometer = useAccelerometer();
94
98
  </script>
95
99
  <template>
96
- <Text>{{
100
+ <text>{{
97
101
  accelerometer &&
98
102
  `x ${accelerometer.x} · y ${accelerometer.y} · z ${accelerometer.z}`
99
- }}</Text>
103
+ }}</text>
100
104
  </template>
101
105
  ```
102
106
 
@@ -109,11 +113,11 @@ import { createAccelerometer } from '@symbiote-native/sensors/solid';
109
113
  function SensorsScreen() {
110
114
  const accelerometer = createAccelerometer();
111
115
  return (
112
- <Text>
116
+ <text>
113
117
  <Show when={accelerometer()}>
114
118
  {reading => `x ${reading().x} · y ${reading().y} · z ${reading().z}`}
115
119
  </Show>
116
- </Text>
120
+ </text>
117
121
  );
118
122
  }
119
123
  ```
@@ -129,9 +133,10 @@ export class SensorsScreen {
129
133
  }
130
134
  ```
131
135
 
132
- The examples above mirror the real canary demo screens —
136
+ The examples above mirror the real canary demo screens, which exist for all six Expo canaries —
133
137
  `examples/expo-react/screens/SensorsScreen.tsx`, `examples/expo-vue-sfc/screens/SensorsScreen.vue`,
134
- `examples/expo-vue-tsx/screens/SensorsScreen.tsx`, `examples/expo-angular/src/screens/SensorsScreen.ts`.
138
+ `examples/expo-vue-tsx/screens/SensorsScreen.tsx`, `examples/expo-svelte/screens/SensorsScreen.svelte`,
139
+ `examples/expo-solid/screens/SensorsScreen.tsx`, `examples/expo-angular/src/screens/SensorsScreen.ts`.
135
140
 
136
141
  Every hook/composable/rune/primitive/`connect()` takes an optional `updateIntervalMs` and returns
137
142
  `null` until the first native reading arrives — check `isAvailableAsync()` separately if you need
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/sensors",
3
- "version": "1.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "expo-sensors wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Accelerometer, Barometer, DeviceMotion, Gyroscope, LightSensor, Magnetometer, MagnetometerUncalibrated, Pedometer.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -81,12 +81,12 @@
81
81
  "svelte": ">=5.56.0",
82
82
  "solid-js": ">=1.9.0",
83
83
  "vue": ">=3.5.0",
84
- "@symbiote-native/angular": "^1.0.0",
85
- "@symbiote-native/engine": "^0.4.0",
86
- "@symbiote-native/react": "^1.0.0",
87
- "@symbiote-native/solid": "^1.0.0",
88
- "@symbiote-native/svelte": "^1.0.0",
89
- "@symbiote-native/vue": "^1.0.0"
84
+ "@symbiote-native/angular": "^3.0.0",
85
+ "@symbiote-native/engine": "^1.0.0",
86
+ "@symbiote-native/react": "^3.0.0",
87
+ "@symbiote-native/solid": "^3.0.0",
88
+ "@symbiote-native/svelte": "^3.0.0",
89
+ "@symbiote-native/vue": "^3.0.0"
90
90
  },
91
91
  "peerDependenciesMeta": {
92
92
  "@symbiote-native/angular": {
@@ -134,13 +134,13 @@
134
134
  "solid-js": "^1.9.14",
135
135
  "svelte": "^5.56.0",
136
136
  "typescript": "~6.0.0",
137
- "@symbiote-native/angular": "1.0.0",
138
- "@symbiote-native/engine": "0.4.0",
139
- "@symbiote-native/react": "1.0.0",
140
- "@symbiote-native/solid": "1.0.0",
141
- "@symbiote-native/svelte": "1.0.0",
142
- "@symbiote-native/test-utils": "0.3.0",
143
- "@symbiote-native/vue": "1.0.0"
137
+ "@symbiote-native/angular": "3.0.0",
138
+ "@symbiote-native/engine": "1.0.0",
139
+ "@symbiote-native/react": "3.0.0",
140
+ "@symbiote-native/solid": "3.0.0",
141
+ "@symbiote-native/svelte": "3.0.0",
142
+ "@symbiote-native/test-utils": "0.3.1",
143
+ "@symbiote-native/vue": "3.0.0"
144
144
  },
145
145
  "scripts": {
146
146
  "typecheck": "tsc --build",