@symbiote-native/sensors 0.2.1 → 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.
Files changed (65) hide show
  1. package/build/angular/services/accelerometer.service/index.js +7 -12
  2. package/build/angular/services/barometer.service/index.js +7 -12
  3. package/build/angular/services/device-motion.service/index.js +7 -12
  4. package/build/angular/services/gyroscope.service/index.js +7 -12
  5. package/build/angular/services/light-sensor.service/index.js +7 -12
  6. package/build/angular/services/magnetometer-uncalibrated.service/index.js +8 -12
  7. package/build/angular/services/magnetometer.service/index.js +7 -12
  8. package/build/angular/services/pedometer.service/index.js +6 -10
  9. package/build/core/device-motion.js +3 -4
  10. package/build/svelte/index.d.ts +16 -0
  11. package/build/svelte/index.js +14 -0
  12. package/build/svelte/runes/use-accelerometer.svelte.d.ts +4 -0
  13. package/build/svelte/runes/use-accelerometer.svelte.js +31 -0
  14. package/build/svelte/runes/use-barometer.svelte.d.ts +4 -0
  15. package/build/svelte/runes/use-barometer.svelte.js +22 -0
  16. package/build/svelte/runes/use-device-motion.svelte.d.ts +4 -0
  17. package/build/svelte/runes/use-device-motion.svelte.js +22 -0
  18. package/build/svelte/runes/use-gyroscope.svelte.d.ts +4 -0
  19. package/build/svelte/runes/use-gyroscope.svelte.js +22 -0
  20. package/build/svelte/runes/use-light-sensor.svelte.d.ts +4 -0
  21. package/build/svelte/runes/use-light-sensor.svelte.js +22 -0
  22. package/build/svelte/runes/use-magnetometer-uncalibrated.svelte.d.ts +4 -0
  23. package/build/svelte/runes/use-magnetometer-uncalibrated.svelte.js +22 -0
  24. package/build/svelte/runes/use-magnetometer.svelte.d.ts +4 -0
  25. package/build/svelte/runes/use-magnetometer.svelte.js +22 -0
  26. package/build/svelte/runes/use-pedometer.svelte.d.ts +4 -0
  27. package/build/svelte/runes/use-pedometer.svelte.js +20 -0
  28. package/build-ngc/angular/services/accelerometer.service/index.js +10 -15
  29. package/build-ngc/angular/services/accelerometer.service/index.js.map +1 -1
  30. package/build-ngc/angular/services/barometer.service/index.js +10 -15
  31. package/build-ngc/angular/services/barometer.service/index.js.map +1 -1
  32. package/build-ngc/angular/services/device-motion.service/index.js +10 -15
  33. package/build-ngc/angular/services/device-motion.service/index.js.map +1 -1
  34. package/build-ngc/angular/services/gyroscope.service/index.js +10 -15
  35. package/build-ngc/angular/services/gyroscope.service/index.js.map +1 -1
  36. package/build-ngc/angular/services/light-sensor.service/index.js +10 -15
  37. package/build-ngc/angular/services/light-sensor.service/index.js.map +1 -1
  38. package/build-ngc/angular/services/magnetometer-uncalibrated.service/index.js +11 -15
  39. package/build-ngc/angular/services/magnetometer-uncalibrated.service/index.js.map +1 -1
  40. package/build-ngc/angular/services/magnetometer.service/index.js +10 -15
  41. package/build-ngc/angular/services/magnetometer.service/index.js.map +1 -1
  42. package/build-ngc/angular/services/pedometer.service/index.js +9 -13
  43. package/build-ngc/angular/services/pedometer.service/index.js.map +1 -1
  44. package/build-ngc/core/device-motion.js +3 -4
  45. package/build-ngc/core/device-motion.js.map +1 -1
  46. package/package.json +26 -12
  47. package/src/angular/services/accelerometer.service/index.ts +7 -12
  48. package/src/angular/services/barometer.service/index.ts +7 -12
  49. package/src/angular/services/device-motion.service/index.ts +7 -12
  50. package/src/angular/services/gyroscope.service/index.ts +7 -12
  51. package/src/angular/services/light-sensor.service/index.ts +7 -12
  52. package/src/angular/services/magnetometer-uncalibrated.service/index.ts +8 -12
  53. package/src/angular/services/magnetometer.service/index.ts +7 -12
  54. package/src/angular/services/pedometer.service/index.ts +6 -10
  55. package/src/core/device-motion.ts +3 -4
  56. package/src/svelte/index.ts +29 -0
  57. package/src/svelte/runes/use-accelerometer.svelte.ts +36 -0
  58. package/src/svelte/runes/use-barometer.svelte.ts +27 -0
  59. package/src/svelte/runes/use-device-motion.svelte.ts +27 -0
  60. package/src/svelte/runes/use-gyroscope.svelte.ts +27 -0
  61. package/src/svelte/runes/use-light-sensor.svelte.ts +27 -0
  62. package/src/svelte/runes/use-magnetometer-uncalibrated.svelte.ts +31 -0
  63. package/src/svelte/runes/use-magnetometer.svelte.ts +27 -0
  64. package/src/svelte/runes/use-pedometer.svelte.ts +23 -0
  65. package/src/svelte/svelte-ambient.d.ts +6 -0
@@ -1,27 +1,22 @@
1
1
  import { effect, inject, Injectable, Injector, signal } from '@angular/core';
2
2
  import { Accelerometer } from '../../../core';
3
3
  import * as i0 from "@angular/core";
4
- // Angular twin of React's `useAccelerometer` hook and Vue's `useAccelerometer` composable.
5
- // Angular has no per-instance hook — state and lifecycle live in DI instead, so `connect()`
6
- // stands in for the hook's role: call it ONCE (typically from a component's field initializer,
7
- // inside an injection context).
4
+ // Angular twin of React's `useAccelerometer` hook / Vue's `useAccelerometer` composable.
5
+ // Angular has no per-instance hook, so `connect()` stands in: call it ONCE, inside an injection
6
+ // context (typically a component's field initializer).
8
7
  //
9
8
  // readonly measurement = inject(AccelerometerService).connect();
10
9
  // // template: {{ measurement()?.x }}
11
- //
12
- // Unlike HideAnimationService.connect(), there is no per-render config to re-sync — the
13
- // subscription doesn't depend on anything the caller's own signals could change between
14
- // renders — so a single effect() that subscribes once and cleans up once is enough; no
15
- // `updateConfig`-style effect that re-runs on every read is needed here.
16
10
  export class AccelerometerService {
17
- // Captured in the constructor (itself always run inside an injection context by Angular's
18
- // own DI) so `connect()` can create an `effect()` even when called from plain field-initializer
19
- // code that is not, on its own, an active injection context — mirrors HideAnimationService.
11
+ // Captured in the constructor (always an injection context) so `connect()` can build an
12
+ // `effect()` even when called from a field initializer that isn't one on its own.
20
13
  injector = inject(Injector);
21
14
  connect(updateIntervalMs) {
22
15
  const measurement = signal(null, /* @ts-ignore */
23
16
  ...(ngDevMode ? [{ debugName: "measurement" }] : /* istanbul ignore next */ []));
24
17
  effect(onCleanup => {
18
+ // updateIntervalMs applies once, at connect time — the effect has no reactive read to
19
+ // re-run on, so a later change is not picked up.
25
20
  if (updateIntervalMs !== undefined) {
26
21
  Accelerometer.setUpdateInterval(updateIntervalMs);
27
22
  }
@@ -30,10 +25,10 @@ export class AccelerometerService {
30
25
  }, { injector: this.injector });
31
26
  return measurement.asReadonly();
32
27
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccelerometerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccelerometerService, providedIn: 'root' });
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AccelerometerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AccelerometerService, providedIn: 'root' });
35
30
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AccelerometerService, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AccelerometerService, decorators: [{
37
32
  type: Injectable,
38
33
  args: [{ providedIn: 'root' }]
39
34
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/accelerometer.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAkC,MAAM,eAAe,CAAC;;AAE9E,2FAA2F;AAC3F,4FAA4F;AAC5F,+FAA+F;AAC/F,gCAAgC;AAChC,EAAE;AACF,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,wFAAwF;AACxF,wFAAwF;AACxF,uFAAuF;AACvF,yEAAyE;AAEzE,MAAM,OAAO,oBAAoB;IAC/B,0FAA0F;IAC1F,gGAAgG;IAChG,4FAA4F;IAC3E,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAAmC,IAAI;wFAAC,CAAC;QAEnE,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,aAAa,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YACpD,CAAC;YACD,MAAM,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC9E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGArBU,oBAAoB;2GAApB,oBAAoB,cADP,MAAM;;2FACnB,oBAAoB;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/accelerometer.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAkC,MAAM,eAAe,CAAC;;AAE9E,yFAAyF;AACzF,gGAAgG;AAChG,uDAAuD;AACvD,EAAE;AACF,mEAAmE;AACnE,wCAAwC;AAExC,MAAM,OAAO,oBAAoB;IAC/B,wFAAwF;IACxF,kFAAkF;IACjE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAAmC,IAAI;wFAAC,CAAC;QAEnE,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,sFAAsF;YACtF,iDAAiD;YACjD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,aAAa,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YACpD,CAAC;YACD,MAAM,YAAY,GAAG,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC9E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGAtBU,oBAAoB;2GAApB,oBAAoB,cADP,MAAM;;2FACnB,oBAAoB;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
@@ -1,27 +1,22 @@
1
1
  import { effect, inject, Injectable, Injector, signal } from '@angular/core';
2
2
  import { Barometer } from '../../../core';
3
3
  import * as i0 from "@angular/core";
4
- // Angular twin of React's `useBarometer` hook and Vue's `useBarometer` composable.
5
- // Angular has no per-instance hook — state and lifecycle live in DI instead, so `connect()`
6
- // stands in for the hook's role: call it ONCE (typically from a component's field initializer,
7
- // inside an injection context).
4
+ // Angular twin of React's `useBarometer` hook / Vue's `useBarometer` composable. Angular has no
5
+ // per-instance hook, so `connect()` stands in: call it ONCE, inside an injection context
6
+ // (typically a component's field initializer).
8
7
  //
9
8
  // readonly measurement = inject(BarometerService).connect();
10
9
  // // template: {{ measurement()?.pressure }}
11
- //
12
- // Unlike HideAnimationService.connect(), there is no per-render config to re-sync — the
13
- // subscription doesn't depend on anything the caller's own signals could change between
14
- // renders — so a single effect() that subscribes once and cleans up once is enough; no
15
- // `updateConfig`-style effect that re-runs on every read is needed here.
16
10
  export class BarometerService {
17
- // Captured in the constructor (itself always run inside an injection context by Angular's
18
- // own DI) so `connect()` can create an `effect()` even when called from plain field-initializer
19
- // code that is not, on its own, an active injection context — mirrors HideAnimationService.
11
+ // Captured in the constructor (always an injection context) so `connect()` can build an
12
+ // `effect()` even when called from a field initializer that isn't one on its own.
20
13
  injector = inject(Injector);
21
14
  connect(updateIntervalMs) {
22
15
  const measurement = signal(null, /* @ts-ignore */
23
16
  ...(ngDevMode ? [{ debugName: "measurement" }] : /* istanbul ignore next */ []));
24
17
  effect(onCleanup => {
18
+ // updateIntervalMs applies once, at connect time — the effect has no reactive read to
19
+ // re-run on, so a later change is not picked up.
25
20
  if (updateIntervalMs !== undefined) {
26
21
  Barometer.setUpdateInterval(updateIntervalMs);
27
22
  }
@@ -30,10 +25,10 @@ export class BarometerService {
30
25
  }, { injector: this.injector });
31
26
  return measurement.asReadonly();
32
27
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BarometerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BarometerService, providedIn: 'root' });
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BarometerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BarometerService, providedIn: 'root' });
35
30
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: BarometerService, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BarometerService, decorators: [{
37
32
  type: Injectable,
38
33
  args: [{ providedIn: 'root' }]
39
34
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/barometer.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,SAAS,EAA8B,MAAM,eAAe,CAAC;;AAEtE,mFAAmF;AACnF,4FAA4F;AAC5F,+FAA+F;AAC/F,gCAAgC;AAChC,EAAE;AACF,+DAA+D;AAC/D,+CAA+C;AAC/C,EAAE;AACF,wFAAwF;AACxF,wFAAwF;AACxF,uFAAuF;AACvF,yEAAyE;AAEzE,MAAM,OAAO,gBAAgB;IAC3B,0FAA0F;IAC1F,gGAAgG;IAChG,4FAA4F;IAC3E,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAA+B,IAAI;wFAAC,CAAC;QAE/D,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,SAAS,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YAChD,CAAC;YACD,MAAM,YAAY,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC1E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGArBU,gBAAgB;2GAAhB,gBAAgB,cADH,MAAM;;2FACnB,gBAAgB;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/barometer.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,SAAS,EAA8B,MAAM,eAAe,CAAC;;AAEtE,gGAAgG;AAChG,yFAAyF;AACzF,+CAA+C;AAC/C,EAAE;AACF,+DAA+D;AAC/D,+CAA+C;AAE/C,MAAM,OAAO,gBAAgB;IAC3B,wFAAwF;IACxF,kFAAkF;IACjE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAA+B,IAAI;wFAAC,CAAC;QAE/D,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,sFAAsF;YACtF,iDAAiD;YACjD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,SAAS,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YAChD,CAAC;YACD,MAAM,YAAY,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC1E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGAtBU,gBAAgB;2GAAhB,gBAAgB,cADH,MAAM;;2FACnB,gBAAgB;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
@@ -1,27 +1,22 @@
1
1
  import { effect, inject, Injectable, Injector, signal } from '@angular/core';
2
2
  import { DeviceMotion } from '../../../core';
3
3
  import * as i0 from "@angular/core";
4
- // Angular twin of React's `useDeviceMotion` hook and Vue's `useDeviceMotion` composable.
5
- // Angular has no per-instance hook — state and lifecycle live in DI instead, so `connect()`
6
- // stands in for the hook's role: call it ONCE (typically from a component's field initializer,
7
- // inside an injection context).
4
+ // Angular twin of React's `useDeviceMotion` hook / Vue's `useDeviceMotion` composable. Angular
5
+ // has no per-instance hook, so `connect()` stands in: call it ONCE, inside an injection context
6
+ // (typically a component's field initializer).
8
7
  //
9
8
  // readonly measurement = inject(DeviceMotionService).connect();
10
9
  // // template: {{ measurement()?.rotation?.alpha }}
11
- //
12
- // Unlike HideAnimationService.connect(), there is no per-render config to re-sync — the
13
- // subscription doesn't depend on anything the caller's own signals could change between
14
- // renders — so a single effect() that subscribes once and cleans up once is enough; no
15
- // `updateConfig`-style effect that re-runs on every read is needed here.
16
10
  export class DeviceMotionService {
17
- // Captured in the constructor (itself always run inside an injection context by Angular's
18
- // own DI) so `connect()` can create an `effect()` even when called from plain field-initializer
19
- // code that is not, on its own, an active injection context — mirrors HideAnimationService.
11
+ // Captured in the constructor (always an injection context) so `connect()` can build an
12
+ // `effect()` even when called from a field initializer that isn't one on its own.
20
13
  injector = inject(Injector);
21
14
  connect(updateIntervalMs) {
22
15
  const measurement = signal(null, /* @ts-ignore */
23
16
  ...(ngDevMode ? [{ debugName: "measurement" }] : /* istanbul ignore next */ []));
24
17
  effect(onCleanup => {
18
+ // updateIntervalMs applies once, at connect time — the effect has no reactive read to
19
+ // re-run on, so a later change is not picked up.
25
20
  if (updateIntervalMs !== undefined) {
26
21
  DeviceMotion.setUpdateInterval(updateIntervalMs);
27
22
  }
@@ -30,10 +25,10 @@ export class DeviceMotionService {
30
25
  }, { injector: this.injector });
31
26
  return measurement.asReadonly();
32
27
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DeviceMotionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DeviceMotionService, providedIn: 'root' });
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: DeviceMotionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: DeviceMotionService, providedIn: 'root' });
35
30
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: DeviceMotionService, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: DeviceMotionService, decorators: [{
37
32
  type: Injectable,
38
33
  args: [{ providedIn: 'root' }]
39
34
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/device-motion.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAiC,MAAM,eAAe,CAAC;;AAE5E,yFAAyF;AACzF,4FAA4F;AAC5F,+FAA+F;AAC/F,gCAAgC;AAChC,EAAE;AACF,kEAAkE;AAClE,sDAAsD;AACtD,EAAE;AACF,wFAAwF;AACxF,wFAAwF;AACxF,uFAAuF;AACvF,yEAAyE;AAEzE,MAAM,OAAO,mBAAmB;IAC9B,0FAA0F;IAC1F,gGAAgG;IAChG,4FAA4F;IAC3E,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAAkC,IAAI;wFAAC,CAAC;QAElE,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,YAAY,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YACnD,CAAC;YACD,MAAM,YAAY,GAAG,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGArBU,mBAAmB;2GAAnB,mBAAmB,cADN,MAAM;;2FACnB,mBAAmB;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/device-motion.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAiC,MAAM,eAAe,CAAC;;AAE5E,+FAA+F;AAC/F,gGAAgG;AAChG,+CAA+C;AAC/C,EAAE;AACF,kEAAkE;AAClE,sDAAsD;AAEtD,MAAM,OAAO,mBAAmB;IAC9B,wFAAwF;IACxF,kFAAkF;IACjE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAAkC,IAAI;wFAAC,CAAC;QAElE,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,sFAAsF;YACtF,iDAAiD;YACjD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,YAAY,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YACnD,CAAC;YACD,MAAM,YAAY,GAAG,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGAtBU,mBAAmB;2GAAnB,mBAAmB,cADN,MAAM;;2FACnB,mBAAmB;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
@@ -1,27 +1,22 @@
1
1
  import { effect, inject, Injectable, Injector, signal } from '@angular/core';
2
2
  import { Gyroscope } from '../../../core';
3
3
  import * as i0 from "@angular/core";
4
- // Angular twin of React's `useGyroscope` hook and Vue's `useGyroscope` composable.
5
- // Angular has no per-instance hook — state and lifecycle live in DI instead, so `connect()`
6
- // stands in for the hook's role: call it ONCE (typically from a component's field initializer,
7
- // inside an injection context).
4
+ // Angular twin of React's `useGyroscope` hook / Vue's `useGyroscope` composable. Angular has no
5
+ // per-instance hook, so `connect()` stands in: call it ONCE, inside an injection context
6
+ // (typically a component's field initializer).
8
7
  //
9
8
  // readonly measurement = inject(GyroscopeService).connect();
10
9
  // // template: {{ measurement()?.x }}
11
- //
12
- // Unlike HideAnimationService.connect(), there is no per-render config to re-sync — the
13
- // subscription doesn't depend on anything the caller's own signals could change between
14
- // renders — so a single effect() that subscribes once and cleans up once is enough; no
15
- // `updateConfig`-style effect that re-runs on every read is needed here.
16
10
  export class GyroscopeService {
17
- // Captured in the constructor (itself always run inside an injection context by Angular's
18
- // own DI) so `connect()` can create an `effect()` even when called from plain field-initializer
19
- // code that is not, on its own, an active injection context — mirrors HideAnimationService.
11
+ // Captured in the constructor (always an injection context) so `connect()` can build an
12
+ // `effect()` even when called from a field initializer that isn't one on its own.
20
13
  injector = inject(Injector);
21
14
  connect(updateIntervalMs) {
22
15
  const measurement = signal(null, /* @ts-ignore */
23
16
  ...(ngDevMode ? [{ debugName: "measurement" }] : /* istanbul ignore next */ []));
24
17
  effect(onCleanup => {
18
+ // updateIntervalMs applies once, at connect time — the effect has no reactive read to
19
+ // re-run on, so a later change is not picked up.
25
20
  if (updateIntervalMs !== undefined) {
26
21
  Gyroscope.setUpdateInterval(updateIntervalMs);
27
22
  }
@@ -30,10 +25,10 @@ export class GyroscopeService {
30
25
  }, { injector: this.injector });
31
26
  return measurement.asReadonly();
32
27
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: GyroscopeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: GyroscopeService, providedIn: 'root' });
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GyroscopeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GyroscopeService, providedIn: 'root' });
35
30
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: GyroscopeService, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GyroscopeService, decorators: [{
37
32
  type: Injectable,
38
33
  args: [{ providedIn: 'root' }]
39
34
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/gyroscope.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,SAAS,EAA8B,MAAM,eAAe,CAAC;;AAEtE,mFAAmF;AACnF,4FAA4F;AAC5F,+FAA+F;AAC/F,gCAAgC;AAChC,EAAE;AACF,+DAA+D;AAC/D,wCAAwC;AACxC,EAAE;AACF,wFAAwF;AACxF,wFAAwF;AACxF,uFAAuF;AACvF,yEAAyE;AAEzE,MAAM,OAAO,gBAAgB;IAC3B,0FAA0F;IAC1F,gGAAgG;IAChG,4FAA4F;IAC3E,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAA+B,IAAI;wFAAC,CAAC;QAE/D,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,SAAS,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YAChD,CAAC;YACD,MAAM,YAAY,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC1E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGArBU,gBAAgB;2GAAhB,gBAAgB,cADH,MAAM;;2FACnB,gBAAgB;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/gyroscope.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,SAAS,EAA8B,MAAM,eAAe,CAAC;;AAEtE,gGAAgG;AAChG,yFAAyF;AACzF,+CAA+C;AAC/C,EAAE;AACF,+DAA+D;AAC/D,wCAAwC;AAExC,MAAM,OAAO,gBAAgB;IAC3B,wFAAwF;IACxF,kFAAkF;IACjE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAA+B,IAAI;wFAAC,CAAC;QAE/D,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,sFAAsF;YACtF,iDAAiD;YACjD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,SAAS,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YAChD,CAAC;YACD,MAAM,YAAY,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC1E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGAtBU,gBAAgB;2GAAhB,gBAAgB,cADH,MAAM;;2FACnB,gBAAgB;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
@@ -1,27 +1,22 @@
1
1
  import { effect, inject, Injectable, Injector, signal } from '@angular/core';
2
2
  import { LightSensor } from '../../../core';
3
3
  import * as i0 from "@angular/core";
4
- // Angular twin of React's `useLightSensor` hook and Vue's `useLightSensor` composable.
5
- // Angular has no per-instance hook — state and lifecycle live in DI instead, so `connect()`
6
- // stands in for the hook's role: call it ONCE (typically from a component's field initializer,
7
- // inside an injection context).
4
+ // Angular twin of React's `useLightSensor` hook / Vue's `useLightSensor` composable. Angular
5
+ // has no per-instance hook, so `connect()` stands in: call it ONCE, inside an injection context
6
+ // (typically a component's field initializer).
8
7
  //
9
8
  // readonly measurement = inject(LightSensorService).connect();
10
9
  // // template: {{ measurement()?.illuminance }}
11
- //
12
- // Unlike HideAnimationService.connect(), there is no per-render config to re-sync — the
13
- // subscription doesn't depend on anything the caller's own signals could change between
14
- // renders — so a single effect() that subscribes once and cleans up once is enough; no
15
- // `updateConfig`-style effect that re-runs on every read is needed here.
16
10
  export class LightSensorService {
17
- // Captured in the constructor (itself always run inside an injection context by Angular's
18
- // own DI) so `connect()` can create an `effect()` even when called from plain field-initializer
19
- // code that is not, on its own, an active injection context — mirrors HideAnimationService.
11
+ // Captured in the constructor (always an injection context) so `connect()` can build an
12
+ // `effect()` even when called from a field initializer that isn't one on its own.
20
13
  injector = inject(Injector);
21
14
  connect(updateIntervalMs) {
22
15
  const measurement = signal(null, /* @ts-ignore */
23
16
  ...(ngDevMode ? [{ debugName: "measurement" }] : /* istanbul ignore next */ []));
24
17
  effect(onCleanup => {
18
+ // updateIntervalMs applies once, at connect time — the effect has no reactive read to
19
+ // re-run on, so a later change is not picked up.
25
20
  if (updateIntervalMs !== undefined) {
26
21
  LightSensor.setUpdateInterval(updateIntervalMs);
27
22
  }
@@ -30,10 +25,10 @@ export class LightSensorService {
30
25
  }, { injector: this.injector });
31
26
  return measurement.asReadonly();
32
27
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LightSensorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LightSensorService, providedIn: 'root' });
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LightSensorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LightSensorService, providedIn: 'root' });
35
30
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: LightSensorService, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LightSensorService, decorators: [{
37
32
  type: Injectable,
38
33
  args: [{ providedIn: 'root' }]
39
34
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/light-sensor.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAgC,MAAM,eAAe,CAAC;;AAE1E,uFAAuF;AACvF,4FAA4F;AAC5F,+FAA+F;AAC/F,gCAAgC;AAChC,EAAE;AACF,iEAAiE;AACjE,kDAAkD;AAClD,EAAE;AACF,wFAAwF;AACxF,wFAAwF;AACxF,uFAAuF;AACvF,yEAAyE;AAEzE,MAAM,OAAO,kBAAkB;IAC7B,0FAA0F;IAC1F,gGAAgG;IAChG,4FAA4F;IAC3E,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAAiC,IAAI;wFAAC,CAAC;QAEjE,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,WAAW,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YAClD,CAAC;YACD,MAAM,YAAY,GAAG,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGArBU,kBAAkB;2GAAlB,kBAAkB,cADL,MAAM;;2FACnB,kBAAkB;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/light-sensor.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAgC,MAAM,eAAe,CAAC;;AAE1E,6FAA6F;AAC7F,gGAAgG;AAChG,+CAA+C;AAC/C,EAAE;AACF,iEAAiE;AACjE,kDAAkD;AAElD,MAAM,OAAO,kBAAkB;IAC7B,wFAAwF;IACxF,kFAAkF;IACjE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAAiC,IAAI;wFAAC,CAAC;QAEjE,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,sFAAsF;YACtF,iDAAiD;YACjD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,WAAW,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YAClD,CAAC;YACD,MAAM,YAAY,GAAG,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGAtBU,kBAAkB;2GAAlB,kBAAkB,cADL,MAAM;;2FACnB,kBAAkB;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
@@ -1,27 +1,23 @@
1
1
  import { effect, inject, Injectable, Injector, signal } from '@angular/core';
2
2
  import { MagnetometerUncalibrated } from '../../../core';
3
3
  import * as i0 from "@angular/core";
4
- // Angular twin of React's `useMagnetometerUncalibrated` hook and Vue's
5
- // `useMagnetometerUncalibrated` composable. Angular has no per-instance hook — state and
6
- // lifecycle live in DI instead, so `connect()` stands in for the hook's role: call it ONCE
7
- // (typically from a component's field initializer, inside an injection context).
4
+ // Angular twin of React's `useMagnetometerUncalibrated` hook / Vue's
5
+ // `useMagnetometerUncalibrated` composable. Angular has no per-instance hook, so `connect()`
6
+ // stands in: call it ONCE, inside an injection context (typically a component's field
7
+ // initializer).
8
8
  //
9
9
  // readonly measurement = inject(MagnetometerUncalibratedService).connect();
10
10
  // // template: {{ measurement()?.x }}
11
- //
12
- // Unlike HideAnimationService.connect(), there is no per-render config to re-sync — the
13
- // subscription doesn't depend on anything the caller's own signals could change between
14
- // renders — so a single effect() that subscribes once and cleans up once is enough; no
15
- // `updateConfig`-style effect that re-runs on every read is needed here.
16
11
  export class MagnetometerUncalibratedService {
17
- // Captured in the constructor (itself always run inside an injection context by Angular's
18
- // own DI) so `connect()` can create an `effect()` even when called from plain field-initializer
19
- // code that is not, on its own, an active injection context — mirrors HideAnimationService.
12
+ // Captured in the constructor (always an injection context) so `connect()` can build an
13
+ // `effect()` even when called from a field initializer that isn't one on its own.
20
14
  injector = inject(Injector);
21
15
  connect(updateIntervalMs) {
22
16
  const measurement = signal(null, /* @ts-ignore */
23
17
  ...(ngDevMode ? [{ debugName: "measurement" }] : /* istanbul ignore next */ []));
24
18
  effect(onCleanup => {
19
+ // updateIntervalMs applies once, at connect time — the effect has no reactive read to
20
+ // re-run on, so a later change is not picked up.
25
21
  if (updateIntervalMs !== undefined) {
26
22
  MagnetometerUncalibrated.setUpdateInterval(updateIntervalMs);
27
23
  }
@@ -30,10 +26,10 @@ export class MagnetometerUncalibratedService {
30
26
  }, { injector: this.injector });
31
27
  return measurement.asReadonly();
32
28
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MagnetometerUncalibratedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MagnetometerUncalibratedService, providedIn: 'root' });
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MagnetometerUncalibratedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
30
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MagnetometerUncalibratedService, providedIn: 'root' });
35
31
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MagnetometerUncalibratedService, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MagnetometerUncalibratedService, decorators: [{
37
33
  type: Injectable,
38
34
  args: [{ providedIn: 'root' }]
39
35
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/magnetometer-uncalibrated.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAA6C,MAAM,eAAe,CAAC;;AAEpG,uEAAuE;AACvE,yFAAyF;AACzF,2FAA2F;AAC3F,iFAAiF;AACjF,EAAE;AACF,8EAA8E;AAC9E,wCAAwC;AACxC,EAAE;AACF,wFAAwF;AACxF,wFAAwF;AACxF,uFAAuF;AACvF,yEAAyE;AAEzE,MAAM,OAAO,+BAA+B;IAC1C,0FAA0F;IAC1F,gGAAgG;IAChG,4FAA4F;IAC3E,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAA8C,IAAI;wFAAC,CAAC;QAE9E,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,wBAAwB,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YAC/D,CAAC;YACD,MAAM,YAAY,GAAG,wBAAwB,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YACzF,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGArBU,+BAA+B;2GAA/B,+BAA+B,cADlB,MAAM;;2FACnB,+BAA+B;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/magnetometer-uncalibrated.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAA6C,MAAM,eAAe,CAAC;;AAEpG,qEAAqE;AACrE,6FAA6F;AAC7F,sFAAsF;AACtF,gBAAgB;AAChB,EAAE;AACF,8EAA8E;AAC9E,wCAAwC;AAExC,MAAM,OAAO,+BAA+B;IAC1C,wFAAwF;IACxF,kFAAkF;IACjE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAA8C,IAAI;wFAAC,CAAC;QAE9E,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,sFAAsF;YACtF,iDAAiD;YACjD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,wBAAwB,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YAC/D,CAAC;YACD,MAAM,YAAY,GAAG,wBAAwB,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YACzF,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGAtBU,+BAA+B;2GAA/B,+BAA+B,cADlB,MAAM;;2FACnB,+BAA+B;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
@@ -1,27 +1,22 @@
1
1
  import { effect, inject, Injectable, Injector, signal } from '@angular/core';
2
2
  import { Magnetometer } from '../../../core';
3
3
  import * as i0 from "@angular/core";
4
- // Angular twin of React's `useMagnetometer` hook and Vue's `useMagnetometer` composable.
5
- // Angular has no per-instance hook — state and lifecycle live in DI instead, so `connect()`
6
- // stands in for the hook's role: call it ONCE (typically from a component's field initializer,
7
- // inside an injection context).
4
+ // Angular twin of React's `useMagnetometer` hook / Vue's `useMagnetometer` composable. Angular
5
+ // has no per-instance hook, so `connect()` stands in: call it ONCE, inside an injection context
6
+ // (typically a component's field initializer).
8
7
  //
9
8
  // readonly measurement = inject(MagnetometerService).connect();
10
9
  // // template: {{ measurement()?.x }}
11
- //
12
- // Unlike HideAnimationService.connect(), there is no per-render config to re-sync — the
13
- // subscription doesn't depend on anything the caller's own signals could change between
14
- // renders — so a single effect() that subscribes once and cleans up once is enough; no
15
- // `updateConfig`-style effect that re-runs on every read is needed here.
16
10
  export class MagnetometerService {
17
- // Captured in the constructor (itself always run inside an injection context by Angular's
18
- // own DI) so `connect()` can create an `effect()` even when called from plain field-initializer
19
- // code that is not, on its own, an active injection context — mirrors HideAnimationService.
11
+ // Captured in the constructor (always an injection context) so `connect()` can build an
12
+ // `effect()` even when called from a field initializer that isn't one on its own.
20
13
  injector = inject(Injector);
21
14
  connect(updateIntervalMs) {
22
15
  const measurement = signal(null, /* @ts-ignore */
23
16
  ...(ngDevMode ? [{ debugName: "measurement" }] : /* istanbul ignore next */ []));
24
17
  effect(onCleanup => {
18
+ // updateIntervalMs applies once, at connect time — the effect has no reactive read to
19
+ // re-run on, so a later change is not picked up.
25
20
  if (updateIntervalMs !== undefined) {
26
21
  Magnetometer.setUpdateInterval(updateIntervalMs);
27
22
  }
@@ -30,10 +25,10 @@ export class MagnetometerService {
30
25
  }, { injector: this.injector });
31
26
  return measurement.asReadonly();
32
27
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MagnetometerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
34
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MagnetometerService, providedIn: 'root' });
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MagnetometerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MagnetometerService, providedIn: 'root' });
35
30
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MagnetometerService, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MagnetometerService, decorators: [{
37
32
  type: Injectable,
38
33
  args: [{ providedIn: 'root' }]
39
34
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/magnetometer.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAiC,MAAM,eAAe,CAAC;;AAE5E,yFAAyF;AACzF,4FAA4F;AAC5F,+FAA+F;AAC/F,gCAAgC;AAChC,EAAE;AACF,kEAAkE;AAClE,wCAAwC;AACxC,EAAE;AACF,wFAAwF;AACxF,wFAAwF;AACxF,uFAAuF;AACvF,yEAAyE;AAEzE,MAAM,OAAO,mBAAmB;IAC9B,0FAA0F;IAC1F,gGAAgG;IAChG,4FAA4F;IAC3E,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAAkC,IAAI;wFAAC,CAAC;QAElE,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,YAAY,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YACnD,CAAC;YACD,MAAM,YAAY,GAAG,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGArBU,mBAAmB;2GAAnB,mBAAmB,cADN,MAAM;;2FACnB,mBAAmB;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/magnetometer.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAiC,MAAM,eAAe,CAAC;;AAE5E,+FAA+F;AAC/F,gGAAgG;AAChG,+CAA+C;AAC/C,EAAE;AACF,kEAAkE;AAClE,wCAAwC;AAExC,MAAM,OAAO,mBAAmB;IAC9B,wFAAwF;IACxF,kFAAkF;IACjE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO,CAAC,gBAAyB;QAC/B,MAAM,WAAW,GAAG,MAAM,CAAkC,IAAI;wFAAC,CAAC;QAElE,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,sFAAsF;YACtF,iDAAiD;YACjD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,YAAY,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;YACnD,CAAC;YACD,MAAM,YAAY,GAAG,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7E,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,WAAW,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;uGAtBU,mBAAmB;2GAAnB,mBAAmB,cADN,MAAM;;2FACnB,mBAAmB;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
@@ -1,20 +1,16 @@
1
1
  import { effect, inject, Injectable, Injector, signal } from '@angular/core';
2
2
  import { watchStepCount } from '../../../core';
3
3
  import * as i0 from "@angular/core";
4
- // Angular twin of React's `usePedometer` hook and Vue's `usePedometer` composable. Angular has
5
- // no per-instance hook — state and lifecycle live in DI instead, so `connect()` stands in for
6
- // the hook's role: call it ONCE (typically from a component's field initializer, inside an
7
- // injection context).
4
+ // Angular twin of React's `usePedometer` hook / Vue's `usePedometer` composable. Angular has no
5
+ // per-instance hook, so `connect()` stands in: call it ONCE, inside an injection context
6
+ // (typically a component's field initializer). Pedometer has no setUpdateInterval, unlike the
7
+ // other sensor services, so there is no interval param here.
8
8
  //
9
9
  // readonly result = inject(PedometerService).connect();
10
10
  // // template: {{ result()?.steps }}
11
- //
12
- // Unlike AccelerometerService.connect(), there is no updateIntervalMs to apply — Pedometer has
13
- // no setUpdateInterval — so a single effect() that subscribes once and cleans up once is enough.
14
11
  export class PedometerService {
15
- // Captured in the constructor (itself always run inside an injection context by Angular's own
16
- // DI) so `connect()` can create an `effect()` even when called from plain field-initializer
17
- // code that is not, on its own, an active injection context — mirrors AccelerometerService.
12
+ // Captured in the constructor (always an injection context) so `connect()` can build an
13
+ // `effect()` even when called from a field initializer that isn't one on its own.
18
14
  injector = inject(Injector);
19
15
  connect() {
20
16
  const result = signal(null, /* @ts-ignore */
@@ -25,10 +21,10 @@ export class PedometerService {
25
21
  }, { injector: this.injector });
26
22
  return result.asReadonly();
27
23
  }
28
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PedometerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PedometerService, providedIn: 'root' });
24
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PedometerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
25
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PedometerService, providedIn: 'root' });
30
26
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PedometerService, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PedometerService, decorators: [{
32
28
  type: Injectable,
33
29
  args: [{ providedIn: 'root' }]
34
30
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/pedometer.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAyB,MAAM,eAAe,CAAC;;AAEtE,+FAA+F;AAC/F,8FAA8F;AAC9F,2FAA2F;AAC3F,sBAAsB;AACtB,EAAE;AACF,0DAA0D;AAC1D,uCAAuC;AACvC,EAAE;AACF,+FAA+F;AAC/F,iGAAiG;AAEjG,MAAM,OAAO,gBAAgB;IAC3B,8FAA8F;IAC9F,4FAA4F;IAC5F,4FAA4F;IAC3E,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO;QACL,MAAM,MAAM,GAAG,MAAM,CAA0B,IAAI;mFAAC,CAAC;QAErD,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC9D,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC;uGAlBU,gBAAgB;2GAAhB,gBAAgB,cADH,MAAM;;2FACnB,gBAAgB;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/angular/services/pedometer.service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAe,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAyB,MAAM,eAAe,CAAC;;AAEtE,gGAAgG;AAChG,yFAAyF;AACzF,8FAA8F;AAC9F,6DAA6D;AAC7D,EAAE;AACF,0DAA0D;AAC1D,uCAAuC;AAEvC,MAAM,OAAO,gBAAgB;IAC3B,wFAAwF;IACxF,kFAAkF;IACjE,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE7C,OAAO;QACL,MAAM,MAAM,GAAG,MAAM,CAA0B,IAAI;mFAAC,CAAC;QAErD,MAAM,CACJ,SAAS,CAAC,EAAE;YACV,MAAM,YAAY,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YAC9D,SAAS,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,CAAC,EACD,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAC5B,CAAC;QAEF,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;IAC7B,CAAC;uGAjBU,gBAAgB;2GAAhB,gBAAgB,cADH,MAAM;;2FACnB,gBAAgB;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE"}
@@ -10,13 +10,12 @@ export var DeviceMotionOrientation;
10
10
  })(DeviceMotionOrientation || (DeviceMotionOrientation = {}));
11
11
  export class DeviceMotionSensor extends DeviceSensor {
12
12
  // Standard gravitational acceleration for Earth (m/s^2), read off the native module rather
13
- // than hardcoded — mirrors upstream's dual exposure as both an instance property and the
14
- // standalone `gravity` export below.
13
+ // than hardcoded — mirrors upstream's dual exposure as an instance property and this
14
+ // standalone export.
15
15
  gravity = exponentDeviceMotion.Gravity;
16
16
  }
17
17
  const DEVICE_MOTION_DID_UPDATE_EVENT_NAME = 'deviceMotionDidUpdate';
18
18
  export const DeviceMotion = new DeviceMotionSensor(exponentDeviceMotion, DEVICE_MOTION_DID_UPDATE_EVENT_NAME);
19
- // Standalone export mirroring the instance property above, for callers that only need the
20
- // constant and not the full sensor singleton.
19
+ // Same value as `DeviceMotion.gravity`, for callers that only need the constant.
21
20
  export const gravity = exponentDeviceMotion.Gravity;
22
21
  //# sourceMappingURL=device-motion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"device-motion.js","sourceRoot":"","sources":["../../src/core/device-motion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAevE,+CAA+C;AAC/C,MAAM,CAAN,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,6EAAY,CAAA;IACZ,0FAAmB,CAAA;IACnB,mFAAgB,CAAA;IAChB,yFAAmB,CAAA;AACrB,CAAC,EALW,uBAAuB,KAAvB,uBAAuB,QAKlC;AAED,MAAM,OAAO,kBAAmB,SAAQ,YAAsC;IAC5E,2FAA2F;IAC3F,yFAAyF;IACzF,qCAAqC;IAC5B,OAAO,GAAW,oBAAoB,CAAC,OAAO,CAAC;CACzD;AAED,MAAM,mCAAmC,GAAG,uBAAuB,CAAC;AAEpE,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,kBAAkB,CAChD,oBAAoB,EACpB,mCAAmC,CACpC,CAAC;AAEF,0FAA0F;AAC1F,8CAA8C;AAC9C,MAAM,CAAC,MAAM,OAAO,GAAW,oBAAoB,CAAC,OAAO,CAAC"}
1
+ {"version":3,"file":"device-motion.js","sourceRoot":"","sources":["../../src/core/device-motion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAevE,+CAA+C;AAC/C,MAAM,CAAN,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,6EAAY,CAAA;IACZ,0FAAmB,CAAA;IACnB,mFAAgB,CAAA;IAChB,yFAAmB,CAAA;AACrB,CAAC,EALW,uBAAuB,KAAvB,uBAAuB,QAKlC;AAED,MAAM,OAAO,kBAAmB,SAAQ,YAAsC;IAC5E,2FAA2F;IAC3F,qFAAqF;IACrF,qBAAqB;IACZ,OAAO,GAAW,oBAAoB,CAAC,OAAO,CAAC;CACzD;AAED,MAAM,mCAAmC,GAAG,uBAAuB,CAAC;AAEpE,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,kBAAkB,CAChD,oBAAoB,EACpB,mCAAmC,CACpC,CAAC;AAEF,iFAAiF;AACjF,MAAM,CAAC,MAAM,OAAO,GAAW,oBAAoB,CAAC,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/sensors",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "expo-sensors wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters. Accelerometer, Barometer, DeviceMotion, Gyroscope, LightSensor, Magnetometer, MagnetometerUncalibrated, Pedometer.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -30,6 +30,10 @@
30
30
  "types": "./build/react/index.d.ts",
31
31
  "default": "./build/react/index.js"
32
32
  },
33
+ "./svelte": {
34
+ "types": "./build/svelte/index.d.ts",
35
+ "default": "./build/svelte/index.js"
36
+ },
33
37
  "./angular": {
34
38
  "types": "./build-ngc/angular/index.d.ts",
35
39
  "react-native": "./build-ngc/angular/index.js",
@@ -53,15 +57,17 @@
53
57
  "expo-modules-core": "57.0.5"
54
58
  },
55
59
  "peerDependencies": {
60
+ "@symbiote-native/angular": ">=0.6.2",
56
61
  "@symbiote-native/engine": ">=0.1.7",
62
+ "@symbiote-native/react": ">=0.2.8",
63
+ "@symbiote-native/svelte": ">=0.1.0",
64
+ "@symbiote-native/vue": ">=0.3.8",
57
65
  "@angular/core": ">=20",
58
66
  "@vue/runtime-core": "^3.5.13",
59
67
  "react": ">=19.0.0",
60
68
  "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"
69
+ "svelte": ">=5.56.0",
70
+ "vue": ">=3.5.0"
65
71
  },
66
72
  "peerDependenciesMeta": {
67
73
  "@symbiote-native/angular": {
@@ -70,6 +76,9 @@
70
76
  "@symbiote-native/react": {
71
77
  "optional": true
72
78
  },
79
+ "@symbiote-native/svelte": {
80
+ "optional": true
81
+ },
73
82
  "@symbiote-native/vue": {
74
83
  "optional": true
75
84
  },
@@ -82,24 +91,29 @@
82
91
  "react": {
83
92
  "optional": true
84
93
  },
94
+ "svelte": {
95
+ "optional": true
96
+ },
85
97
  "vue": {
86
98
  "optional": true
87
99
  }
88
100
  },
89
101
  "devDependencies": {
90
- "@angular/compiler": "^22",
91
- "@angular/compiler-cli": "^22",
92
- "@angular/core": "^22",
102
+ "@angular/compiler": "~22.0.8",
103
+ "@angular/compiler-cli": "~22.0.8",
104
+ "@angular/core": "~22.0.8",
93
105
  "@types/node": "^26.0.0",
94
106
  "@types/react": "^19.2.0",
95
107
  "@vue/runtime-core": "^3.5.13",
96
108
  "react": "19.2.3",
109
+ "svelte": "^5.56.0",
97
110
  "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",
111
+ "@symbiote-native/angular": "0.7.0",
112
+ "@symbiote-native/engine": "0.2.0",
113
+ "@symbiote-native/react": "0.3.0",
114
+ "@symbiote-native/svelte": "0.2.0",
101
115
  "@symbiote-native/test-utils": "0.1.6",
102
- "@symbiote-native/vue": "0.3.8"
116
+ "@symbiote-native/vue": "0.4.0"
103
117
  },
104
118
  "scripts": {
105
119
  "typecheck": "tsc --build",