@mappedin/blue-dot 6.21.1-beta.0 → 6.23.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.
@@ -1,10 +1,12 @@
1
1
  export declare const Logger: {
2
2
  logState: import("@mappedin/mappedin-js").E_SDK_LOG_LEVEL;
3
+ debug(...args: any[]): void;
3
4
  log(...args: any[]): void;
5
+ info(...args: any[]): void;
4
6
  warn(...args: any[]): void;
5
7
  error(...args: any[]): void;
6
8
  assert(...args: any[]): void;
7
9
  time(label: string): void;
8
10
  timeEnd(label: string): void;
9
- setLevel(level: import("@mappedin/mappedin-js").E_SDK_LOG_LEVEL): void;
11
+ setLevel(level: import("@mappedin/mappedin-js").E_SDK_LOG_LEVEL | import("@mappedin/mappedin-js").TLogLevelName): void;
10
12
  };
@@ -1,6 +1,6 @@
1
1
  import type { BlueDotEventPayloads } from '../types';
2
2
  import { PubSub } from '@packages/internal/common/pubsub';
3
- import { BlueDotAction, BlueDotStatus } from './types';
3
+ import { BlueDotTransition, BlueDotStatus } from './types';
4
4
  /**
5
5
  * Handles BlueDot status transitions and timeout management.
6
6
  */
@@ -23,7 +23,7 @@ export declare class StatusManager extends PubSub<Pick<BlueDotEventPayloads, 'st
23
23
  * Transition to a new state based on an action.
24
24
  * @param action The action that triggers the transition
25
25
  */
26
- transitionTo(action: BlueDotAction): void;
26
+ transitionTo(action: BlueDotTransition): void;
27
27
  /**
28
28
  * Reset the timeout timer.
29
29
  * @param timeout Timeout duration in milliseconds
@@ -1,2 +1,13 @@
1
1
  export type BlueDotStatus = 'hidden' | 'active' | 'inactive' | 'disabled';
2
- export type BlueDotAction = 'timeout' | 'error' | 'position-update' | 'enable' | 'disable' | 'initialize';
2
+ /**
3
+ * State-machine input alphabet — the only values `StatusManager.transitionTo()`
4
+ * accepts and the only keys the transition table is defined over.
5
+ */
6
+ export type BlueDotTransition = 'timeout' | 'error' | 'position-update' | 'enable' | 'disable' | 'initialize';
7
+ /**
8
+ * Reason a `status-change` event fired. Either a state-machine {@link BlueDotTransition}
9
+ * or `'visibility-change'`, emitted when a visibility overlay flips the exposed status
10
+ * without a state-machine transition (e.g. floor visibility when `multiFloorView` is
11
+ * disabled). Read the event's `status` for the resulting value/direction.
12
+ */
13
+ export type BlueDotAction = BlueDotTransition | 'visibility-change';
package/lib/rn/types.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { Coordinate, Floor } from '@mappedin/mappedin-js';
2
2
  import type z from 'zod';
3
3
  import type { positionSchema } from './schemas';
4
4
  import type { PartialDeep } from 'type-fest';
5
- import { BlueDotAction, BlueDotStatus } from './status/types';
5
+ import { BlueDotAction, BlueDotStatus, BlueDotTransition } from './status/types';
6
6
  import { FollowMode } from './follow/types';
7
7
  import type { PositionAnchor } from './fusion/types';
8
8
  export type FollowCameraOptions = {
@@ -249,9 +249,18 @@ export type BlueDotPositionUpdate = {
249
249
  */
250
250
  heading?: GeolocationPosition['coords']['heading'] | 'device' | undefined;
251
251
  /**
252
- * Floor or floorId to override.
253
- * Set to `'device'` to reset to the device's floor level.
254
- * Set to `undefined` to disable floor level and show the BlueDot on all floors.
252
+ * Floor or floorId the Blue Dot is on.
253
+ *
254
+ * Set to `'device'` to reset to the device's floor level. Set to `undefined` to
255
+ * clear the floor so the Blue Dot is not associated with any floor.
256
+ *
257
+ * Floor visibility behavior depends on the map's `multiFloorView` option:
258
+ * - When `multiFloorView` is disabled, the Blue Dot is only shown while its floor
259
+ * is the visible floor. Changing the map to a different floor hides the Blue Dot
260
+ * (its `status` becomes `'hidden'`); returning to its floor shows it again. If no
261
+ * floor is set, the Blue Dot is shown on all floors.
262
+ * - When `multiFloorView` is enabled (the default), the Blue Dot is always shown
263
+ * regardless of the floor value.
255
264
  */
256
265
  floorOrFloorId?: Floor | string | 'device' | undefined;
257
266
  /**
@@ -265,7 +274,7 @@ export type BlueDotPositionUpdateWithFloor = Omit<BlueDotPositionUpdate, 'floorO
265
274
  export type ParsedBlueDotPosition = z.infer<typeof positionSchema>;
266
275
  export type BlueDotPositionProcessor = (current: BlueDotPositionUpdateWithFloor, incoming: BlueDotPositionUpdateWithFloor) => BlueDotPositionUpdateWithFloor | undefined;
267
276
  export type StateTransitions = {
268
- [Action in BlueDotAction]?: BlueDotStatus;
277
+ [Transition in BlueDotTransition]?: BlueDotStatus;
269
278
  };
270
279
  export type StateMachine = {
271
280
  [State in BlueDotStatus]: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/blue-dot",
3
- "version": "6.21.1-beta.0",
3
+ "version": "6.23.0-beta.0",
4
4
  "homepage": "https://developer.mappedin.com/",
5
5
  "private": false,
6
6
  "main": "lib/esm/index.js",
@@ -51,9 +51,9 @@
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": ">=16.8.0",
54
- "@mappedin/mappedin-js": "^6.21.1",
55
- "@mappedin/react-sdk": "^6.21.1",
56
- "@mappedin/react-native-sdk": "^6.21.1"
54
+ "@mappedin/mappedin-js": "^6.23.0",
55
+ "@mappedin/react-native-sdk": "^6.23.0",
56
+ "@mappedin/react-sdk": "^6.23.0"
57
57
  },
58
58
  "peerDependenciesMeta": {
59
59
  "@mappedin/react-native-sdk": {
@@ -1,2 +0,0 @@
1
- var l=Object.create;var L=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var p=e=>{throw TypeError(e)};var R=(e,o,t)=>o in e?L(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var E=(e,o)=>L(e,"name",{value:o,configurable:!0});var w=(e,o)=>()=>(e&&(o=e(e=0)),o);var y=(e,o)=>()=>(o||e((o={exports:{}}).exports,o),o.exports);var D=(e,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of S(o))!d.call(e,n)&&n!==t&&L(e,n,{get:()=>o[n],enumerable:!(r=u(o,n))||r.enumerable});return e};var $=(e,o,t)=>(t=e!=null?l(O(e)):{},D(o||!e||!e.__esModule?L(t,"default",{value:e,enumerable:!0}):t,e));var b=(e,o,t)=>R(e,typeof o!="symbol"?o+"":o,t),a=(e,o,t)=>o.has(e)||p("Cannot "+t);var N=(e,o,t)=>(a(e,o,"read from private field"),t?t.call(e):o.get(e)),I=(e,o,t)=>o.has(e)?p("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(e):o.set(e,t),m=(e,o,t,r)=>(a(e,o,"write to private field"),r?r.call(e,t):o.set(e,t),t),V=(e,o,t)=>(a(e,o,"access private method"),t);var h=(e,o,t,r)=>({set _(n){m(e,o,n,t)},get _(){return N(e,o,r)}});var c,i=w(()=>{c={env:{NODE_ENV:"production",npm_package_version:"6.21.1-beta.0"}}});i();i();var x="[MappedinJS]";function g(e="",{prefix:o=x}={}){let t=`${o}${e?`-${e}`:""}`,r=E((n,_)=>{if(typeof window<"u"&&window.rnDebug){let f=_.map(s=>s instanceof Error&&s.stack?`${s.message}
2
- ${s.stack}`:s);window.rnDebug(`${e} ${n}: ${f.join(" ")}`)}},"rnDebug");return{logState:c.env.NODE_ENV==="test"?3:0,log(...n){this.logState<=0&&(console.log(t,...n),r("log",n))},warn(...n){this.logState<=1&&(console.warn(t,...n),r("warn",n))},error(...n){this.logState<=2&&(console.error(t,...n),r("error",n))},assert(...n){console.assert(...n)},time(n){console.time(n)},timeEnd(n){console.timeEnd(n)},setLevel(n){0<=n&&n<=3&&(this.logState=n)}}}E(g,"createLogger");var k=g();var j=g("",{prefix:"[BlueDot]"});export{E as a,y as b,$ as c,b as d,N as e,I as f,m as g,V as h,h as i,i as j,j as k};