@mappedin/blue-dot 6.18.0-beta.0 → 6.19.0-beta.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.
@@ -1217,6 +1217,15 @@ type FollowCameraOptions = {
1217
1217
  easing?: 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
1218
1218
  };
1219
1219
  type BlueDotEventPayloads = {
1220
+ /**
1221
+ * Emitted on every animation frame while the Blue Dot model is moving.
1222
+ * Unlike `position-update` (which fires only on raw sensor input, typically ~1Hz),
1223
+ * this fires at the display refresh rate during tweened movement, making it
1224
+ * suitable for smooth path-tracking visualizations.
1225
+ */
1226
+ 'dot-position-update': {
1227
+ position: Coordinate;
1228
+ };
1220
1229
  /**
1221
1230
  * Emitted when the Blue Dot's position is updated either from the device's geolocation API or by calling {@link BlueDot.update}.
1222
1231
  * see {@link BlueDot.watchDevicePosition} for more details.
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{a as t,b as e,c as s,d as n}from"./chunk-IPNIME5I.js";import{m as o}from"./chunk-QFCRWBSD.js";o();export{t as BaseSensor,n as BlueDot,e as ManualSensor,s as SensorRegistry};
1
+ import{a as t,b as e,c as s,d as n}from"./chunk-IJA5ETXF.js";import{j as o}from"./chunk-T4TSXXQK.js";o();export{t as BaseSensor,n as BlueDot,e as ManualSensor,s as SensorRegistry};
@@ -1217,6 +1217,15 @@ type FollowCameraOptions = {
1217
1217
  easing?: 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
1218
1218
  };
1219
1219
  type BlueDotEventPayloads = {
1220
+ /**
1221
+ * Emitted on every animation frame while the Blue Dot model is moving.
1222
+ * Unlike `position-update` (which fires only on raw sensor input, typically ~1Hz),
1223
+ * this fires at the display refresh rate during tweened movement, making it
1224
+ * suitable for smooth path-tracking visualizations.
1225
+ */
1226
+ 'dot-position-update': {
1227
+ position: Coordinate;
1228
+ };
1220
1229
  /**
1221
1230
  * Emitted when the Blue Dot's position is updated either from the device's geolocation API or by calling {@link BlueDot.update}.
1222
1231
  * see {@link BlueDot.watchDevicePosition} for more details.
@@ -1 +1 @@
1
- import{d as f}from"../chunk-IPNIME5I.js";import{c as n,m as u}from"../chunk-QFCRWBSD.js";u();u();import{useCallback as c,useState as p}from"react";import{useMap as D,useMapViewExtension as m}from"@mappedin/react-sdk";function B(){let[,t]=p({});return c(()=>t({}),[])}n(B,"useForceUpdate");function l(){let{mapView:t}=D(),o=B(),{register:r}=m("blue-dot",{onRegister:n(()=>{let e=new f(t);return e.on("position-update",o),e.on("status-change",o),e.on("follow-change",o),e.on("error",o),e},"onRegister"),onDeregister:n(e=>{e.off("position-update",o),e.off("status-change",o),e.off("follow-change",o),e.off("error",o),e.destroy()},"onDeregister")}),s=r();if(!s)throw new Error("BlueDot failed to initialize.");return s}n(l,"useBlueDot");u();import{useCallback as d,useEffect as E,useRef as g}from"react";function w(t,o){let r=l(),s=g(o);s.current=o;let e=d(i=>{s.current(i)},[]);E(()=>{if(r!=null)return r.on(t,e),()=>{r!=null&&r.off(t,e)}},[r,t,e])}n(w,"useBlueDotEvent");export{l as useBlueDot,w as useBlueDotEvent};
1
+ import{d as f}from"../chunk-IJA5ETXF.js";import{a as n,j as u}from"../chunk-T4TSXXQK.js";u();u();import{useCallback as c,useState as p}from"react";import{useMap as D,useMapViewExtension as m}from"@mappedin/react-sdk";function B(){let[,t]=p({});return c(()=>t({}),[])}n(B,"useForceUpdate");function l(){let{mapView:t}=D(),o=B(),{register:r}=m("blue-dot",{onRegister:n(()=>{let e=new f(t);return e.on("position-update",o),e.on("status-change",o),e.on("follow-change",o),e.on("error",o),e},"onRegister"),onDeregister:n(e=>{e.off("position-update",o),e.off("status-change",o),e.off("follow-change",o),e.off("error",o),e.destroy()},"onDeregister")}),s=r();if(!s)throw new Error("BlueDot failed to initialize.");return s}n(l,"useBlueDot");u();import{useCallback as d,useEffect as E,useRef as g}from"react";function w(t,o){let r=l(),s=g(o);s.current=o;let e=d(i=>{s.current(i)},[]);E(()=>{if(r!=null)return r.on(t,e),()=>{r?.off(t,e)}},[r,t,e])}n(w,"useBlueDotEvent");export{l as useBlueDot,w as useBlueDotEvent};