@mappedin/react-sdk 6.0.1-beta.48 → 6.0.1-beta.49
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.
- package/lib/esm/{GLTFExporter-U7TU265Z.js → GLTFExporter-3DFFENGH.js} +1 -1
- package/lib/esm/{GLTFLoader-6MJPEGD7.js → GLTFLoader-LMGM5WIS.js} +1 -1
- package/lib/esm/{browser-CR4WWHP7.js → browser-3IFYTMA6.js} +1 -1
- package/lib/esm/{chunk-EIMXVMO4.js → chunk-DDMRROUJ.js} +1 -1
- package/lib/esm/{chunk-63UMH2J3.js → chunk-GSTLKYPH.js} +1 -1
- package/lib/esm/{chunk-B3CVW3UU.js → chunk-HILRB2WN.js} +1 -1
- package/lib/esm/chunk-KAPCGJLB.js +1 -0
- package/lib/esm/chunk-LSBQEE4P.js +1 -0
- package/lib/esm/{chunk-JMCXCPZD.js → chunk-U2BLDPFK.js} +1 -1
- package/lib/esm/index.d.ts +156 -105
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-U6M4QW4R.js → inspector-RUJ4OCW4.js} +1 -1
- package/lib/esm/{internal-ZUMRQSCJ.js → internal-KCZM4CS6.js} +1 -1
- package/lib/esm/{outdoor-context-v4-ME4STCCK.js → outdoor-context-v4-XMQP2LLE.js} +1 -1
- package/lib/esm/{text3d-DNZ77VLG.js → text3d-7F3YT2BT.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-7JZE7FSJ.js +0 -1
- package/lib/esm/chunk-Z5U7QCEH.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var h=Object.create,D=Object.freeze,v=Object.defineProperty,j=Object.defineProperties,l=Object.getOwnPropertyDescriptor,q=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,x=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var N=(e,n)=>(n=Symbol[e])?n:Symbol.for("Symbol."+e),k=e=>{throw TypeError(e)};var d=(e,n,a)=>n in e?v(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,C=(e,n)=>{for(var a in n||(n={}))g.call(n,a)&&d(e,a,n[a]);if(b)for(var a of b(n))O.call(n,a)&&d(e,a,n[a]);return e},F=(e,n)=>j(e,q(n)),G=(e,n)=>v(e,"name",{value:n,configurable:!0});var H=e=>typeof e=="symbol"?e:e+"",I=(e,n)=>{var a={};for(var o in e)g.call(e,o)&&n.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&b)for(var o of b(e))n.indexOf(o)<0&&O.call(e,o)&&(a[o]=e[o]);return a};var y=(e,n)=>()=>(e&&(n=e(e=0)),n);var J=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),K=(e,n)=>{for(var a in n)v(e,a,{get:n[a],enumerable:!0})},z=(e,n,a,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let p of w(n))!g.call(e,p)&&p!==a&&v(e,p,{get:()=>n[p],enumerable:!(o=l(n,p))||o.enumerable});return e};var L=(e,n,a)=>(a=e!=null?h(x(e)):{},z(n||!e||!e.__esModule?v(a,"default",{value:e,enumerable:!0}):a,e));var M=(e,n,a)=>d(e,typeof n!="symbol"?n+"":n,a),m=(e,n,a)=>n.has(e)||k("Cannot "+a);var P=(e,n,a)=>(m(e,n,"read from private field"),a?a.call(e):n.get(e)),Q=(e,n,a)=>n.has(e)?k("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),R=(e,n,a,o)=>(m(e,n,"write to private field"),o?o.call(e,a):n.set(e,a),a),S=(e,n,a)=>(m(e,n,"access private method"),a);var T=(e,n)=>D(v(e,"raw",{value:D(n||e.slice())}));var V=function(e,n){this[0]=e,this[1]=n},U=(e,n,a)=>{var o=(c,i,r,E)=>{try{var s=a[c](i),u=(i=s.value)instanceof V,f=s.done;Promise.resolve(u?i[0]:i).then(t=>u?o(c==="return"?c:"next",i[1]?{done:t.done,value:t.value}:t,r,E):r({value:t,done:f})).catch(t=>o("throw",t,r,E))}catch(t){E(t)}},p=c=>_[c]=i=>new Promise((r,E)=>o(c,i,r,E)),_={};return a=a.apply(e,n),_[N("asyncIterator")]=()=>_,p("next"),p("throw"),p("return"),_},W=e=>{var n=e[N("asyncIterator")],a=!1,o,p={};return n==null?(n=e[N("iterator")](),o=_=>p[_]=c=>n[_](c)):(n=n.call(e),o=_=>p[_]=c=>{if(a){if(a=!1,_==="throw")throw c;return c}return a=!0,{done:!1,value:new V(new Promise(i=>{var r=n[_](c);r instanceof Object||k("Object expected"),i(r)}),1)}}),p[N("iterator")]=()=>p,o("next"),"throw"in n?o("throw"):p.throw=_=>{throw _},"return"in n&&o("return"),p};var Z,B=y(()=>{Z={env:{NODE_ENV:"production",npm_package_version:"6.0.1-beta.
|
|
1
|
+
var h=Object.create,D=Object.freeze,v=Object.defineProperty,j=Object.defineProperties,l=Object.getOwnPropertyDescriptor,q=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,x=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var N=(e,n)=>(n=Symbol[e])?n:Symbol.for("Symbol."+e),k=e=>{throw TypeError(e)};var d=(e,n,a)=>n in e?v(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a,C=(e,n)=>{for(var a in n||(n={}))g.call(n,a)&&d(e,a,n[a]);if(b)for(var a of b(n))O.call(n,a)&&d(e,a,n[a]);return e},F=(e,n)=>j(e,q(n)),G=(e,n)=>v(e,"name",{value:n,configurable:!0});var H=e=>typeof e=="symbol"?e:e+"",I=(e,n)=>{var a={};for(var o in e)g.call(e,o)&&n.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&b)for(var o of b(e))n.indexOf(o)<0&&O.call(e,o)&&(a[o]=e[o]);return a};var y=(e,n)=>()=>(e&&(n=e(e=0)),n);var J=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),K=(e,n)=>{for(var a in n)v(e,a,{get:n[a],enumerable:!0})},z=(e,n,a,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let p of w(n))!g.call(e,p)&&p!==a&&v(e,p,{get:()=>n[p],enumerable:!(o=l(n,p))||o.enumerable});return e};var L=(e,n,a)=>(a=e!=null?h(x(e)):{},z(n||!e||!e.__esModule?v(a,"default",{value:e,enumerable:!0}):a,e));var M=(e,n,a)=>d(e,typeof n!="symbol"?n+"":n,a),m=(e,n,a)=>n.has(e)||k("Cannot "+a);var P=(e,n,a)=>(m(e,n,"read from private field"),a?a.call(e):n.get(e)),Q=(e,n,a)=>n.has(e)?k("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,a),R=(e,n,a,o)=>(m(e,n,"write to private field"),o?o.call(e,a):n.set(e,a),a),S=(e,n,a)=>(m(e,n,"access private method"),a);var T=(e,n)=>D(v(e,"raw",{value:D(n||e.slice())}));var V=function(e,n){this[0]=e,this[1]=n},U=(e,n,a)=>{var o=(c,i,r,E)=>{try{var s=a[c](i),u=(i=s.value)instanceof V,f=s.done;Promise.resolve(u?i[0]:i).then(t=>u?o(c==="return"?c:"next",i[1]?{done:t.done,value:t.value}:t,r,E):r({value:t,done:f})).catch(t=>o("throw",t,r,E))}catch(t){E(t)}},p=c=>_[c]=i=>new Promise((r,E)=>o(c,i,r,E)),_={};return a=a.apply(e,n),_[N("asyncIterator")]=()=>_,p("next"),p("throw"),p("return"),_},W=e=>{var n=e[N("asyncIterator")],a=!1,o,p={};return n==null?(n=e[N("iterator")](),o=_=>p[_]=c=>n[_](c)):(n=n.call(e),o=_=>p[_]=c=>{if(a){if(a=!1,_==="throw")throw c;return c}return a=!0,{done:!1,value:new V(new Promise(i=>{var r=n[_](c);r instanceof Object||k("Object expected"),i(r)}),1)}}),p[N("iterator")]=()=>p,o("next"),"throw"in n?o("throw"):p.throw=_=>{throw _},"return"in n&&o("return"),p};var Z,B=y(()=>{Z={env:{NODE_ENV:"production",npm_package_version:"6.0.1-beta.49"}}});export{C as a,F as b,G as c,H as d,I as e,J as f,K as g,L as h,M as i,P as j,Q as k,R as l,S as m,T as n,U as o,W as p,B as q,Z as r};
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -392,7 +392,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src' {
|
|
|
392
392
|
export type { TSpaceType } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
393
393
|
export { Coordinate, Annotation, Connection, Door, Floor, FloorStack, MapObject, PointOfInterest, Space, ImageMetaData, Hyperlink, EnterpriseLocation, EnterpriseCategory, EnterpriseVenue, LocationProfile, LocationCategory, Facade, Node, Area, type Places, } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
394
394
|
export { setWorkersUrl } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
395
|
-
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter,
|
|
395
|
+
export type { Camera, Models, Labels, BlueDot, Markers, Paths, Exporter, Style, Shapes, Outdoor, Images, StackedMaps, } from '@mappedin/react-sdk/mappedin-js/src/api-geojson';
|
|
396
|
+
export { Directions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/directions';
|
|
396
397
|
export type { SearchResult, SearchResultItem, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, SearchOptions, Search, Suggestion, MatchInfo, } from '@mappedin/react-sdk/mappedin-js/src/search';
|
|
397
398
|
export type { TFindNearestOptions, TFindNearestResult, TQueriables, Query } from '@mappedin/react-sdk/mappedin-js/src/query';
|
|
398
399
|
export type { Analytics, TAnalyticsUpdateState } from '@mappedin/react-sdk/mappedin-js/src/analytics';
|
|
@@ -753,6 +754,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data' {
|
|
|
753
754
|
*/
|
|
754
755
|
Search: Search;
|
|
755
756
|
Query: Query;
|
|
757
|
+
/**
|
|
758
|
+
* @internal
|
|
759
|
+
*/
|
|
760
|
+
internal: MapDataInternal;
|
|
756
761
|
/**
|
|
757
762
|
* Constructs a new instance of {@link MapData}.
|
|
758
763
|
*
|
|
@@ -2415,6 +2420,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2415
2420
|
* Height of the geometry element in meters.
|
|
2416
2421
|
*/
|
|
2417
2422
|
height: number;
|
|
2423
|
+
/**
|
|
2424
|
+
* The altitude of the geometry element in meters.
|
|
2425
|
+
*/
|
|
2426
|
+
altitude: number;
|
|
2418
2427
|
/**
|
|
2419
2428
|
* Texture to apply to the geometry element.
|
|
2420
2429
|
*/
|
|
@@ -2513,7 +2522,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2513
2522
|
/**
|
|
2514
2523
|
* The type for updating the state of map elements (colors, texts, etc.).
|
|
2515
2524
|
*/
|
|
2516
|
-
export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS | Door ? Partial<TDoorsState> : T extends Model ? Partial<UpdateModelState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Floor ? DeepPartial<TFloorState> : T extends Facade ? Partial<TFacadeState> : T extends Shape ? Partial<Omit<TShapeState, '
|
|
2525
|
+
export type TUpdateState<T> = T extends WALLS ? Partial<TWallsState> : T extends DOORS | Door ? Partial<TDoorsState> : T extends Model ? Partial<UpdateModelState> : T extends Marker ? Partial<TMarkerState> : T extends Label ? Partial<TLabelState> : T extends Space | MapObject ? Partial<TGeometryState> : T extends Floor ? DeepPartial<TFloorState> : T extends Facade ? Partial<TFacadeState> : T extends Shape ? Partial<Omit<TShapeState, 'type'>> : T extends Text3D ? UpdatableText3DState : T extends Path ? Partial<TPathState> : T extends PathSegment ? Partial<TPathState> : T extends string ? Record<string, any> : never;
|
|
2517
2526
|
export type TUpdateStates = Partial<Omit<TGeometryState, 'interactive' | 'hoverColor' | 'type'>> | Partial<TMarkerState> | Partial<TLabelState> | Partial<TGeometryState> | Partial<TPathState>;
|
|
2518
2527
|
export type TGetState<T> = T extends WALLS ? TWallsState | undefined : T extends DOORS ? TDoorsState | undefined : T extends Marker ? TMarkerState | undefined : T extends Shape ? TShapeState | undefined : T extends Model ? TModelState | undefined : T extends Label ? TLabelState | undefined : T extends Image ? TImageState | undefined : T extends Text3D ? Text3DState | undefined : T extends Space | MapObject ? TGeometryState | undefined : T extends Floor ? TFloorState | undefined : T extends Facade ? TFacadeState | undefined : T extends Path ? TPathState | undefined : T extends PathSegment ? TPathState | undefined : T extends string ? TLabelState | TGeometryState | TMarkerState | TModelState | TPathState | undefined : never;
|
|
2519
2528
|
/**
|
|
@@ -4100,6 +4109,62 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson' {
|
|
|
4100
4109
|
export { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
4101
4110
|
}
|
|
4102
4111
|
|
|
4112
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/directions' {
|
|
4113
|
+
import type { DirectionFeature, DirectionsCollection } from '@packages/internal/geojson-navigator';
|
|
4114
|
+
import type { Node, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
4115
|
+
import { Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
4116
|
+
import type { TDirectionInstruction, TNavigationTarget } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
4117
|
+
/**
|
|
4118
|
+
* Represents a set of directions between two points.
|
|
4119
|
+
*
|
|
4120
|
+
* Directions are used to represent the path between two points on the map,
|
|
4121
|
+
* as well as the instructions to follow the path.
|
|
4122
|
+
*/
|
|
4123
|
+
export class Directions {
|
|
4124
|
+
#private;
|
|
4125
|
+
/**
|
|
4126
|
+
* @internal
|
|
4127
|
+
*/
|
|
4128
|
+
constructor(directions: DirectionsCollection, mapData: MapDataInternal, from: TNavigationTarget[], to: TNavigationTarget[]);
|
|
4129
|
+
/**
|
|
4130
|
+
* @internal
|
|
4131
|
+
*/
|
|
4132
|
+
get path(): Node[];
|
|
4133
|
+
/**
|
|
4134
|
+
* The selected departure.
|
|
4135
|
+
*/
|
|
4136
|
+
get departure(): TNavigationTarget | undefined;
|
|
4137
|
+
/**
|
|
4138
|
+
* The selected destination.
|
|
4139
|
+
*/
|
|
4140
|
+
get destination(): TNavigationTarget | undefined;
|
|
4141
|
+
/**
|
|
4142
|
+
* All the coordinates ({@link Coordinate}) of the directions.
|
|
4143
|
+
*/
|
|
4144
|
+
get coordinates(): Coordinate[];
|
|
4145
|
+
/**
|
|
4146
|
+
* The total distance of the path in meters.
|
|
4147
|
+
*/
|
|
4148
|
+
get distance(): number;
|
|
4149
|
+
/**
|
|
4150
|
+
* The array of instructions ({@link TDirectionInstruction}).
|
|
4151
|
+
*/
|
|
4152
|
+
get instructions(): TDirectionInstruction[];
|
|
4153
|
+
/**
|
|
4154
|
+
* Serializes the directions to JSON.
|
|
4155
|
+
* All getter properties are evaluated and included in the serialized output.
|
|
4156
|
+
*
|
|
4157
|
+
* @returns An object representing the directions with all properties evaluated.
|
|
4158
|
+
*/
|
|
4159
|
+
toJSON(): {
|
|
4160
|
+
directions: DirectionFeature[];
|
|
4161
|
+
__type: string;
|
|
4162
|
+
from: TNavigationTarget[];
|
|
4163
|
+
to: TNavigationTarget[];
|
|
4164
|
+
};
|
|
4165
|
+
}
|
|
4166
|
+
}
|
|
4167
|
+
|
|
4103
4168
|
declare module '@mappedin/react-sdk/mappedin-js/src/search' {
|
|
4104
4169
|
export type { SearchResult, SearchResultItem, SearchOptions, Suggestion, SearchResultEnterpriseCategory, SearchResultEnterpriseLocations, SearchResultPlaces, MatchInfo, } from '@mappedin/react-sdk/mappedin-js/src/search/internal';
|
|
4105
4170
|
export type { SearchState } from '@mappedin/react-sdk/mappedin-js/src/search/external';
|
|
@@ -4149,104 +4214,7 @@ declare module '@mappedin/react-sdk/react-sdk/src' {
|
|
|
4149
4214
|
}
|
|
4150
4215
|
|
|
4151
4216
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions' {
|
|
4152
|
-
|
|
4153
|
-
import type { DirectionsCollection } from '@packages/internal/geojson-navigator';
|
|
4154
|
-
import { Navigator } from '@packages/internal/geojson-navigator';
|
|
4155
|
-
import { Connection, Coordinate, Node, type MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
4156
|
-
import type { TDirectionInstruction, TDirectionZone, TNavigationTarget } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
4157
|
-
/**
|
|
4158
|
-
* Represents a set of directions between two points.
|
|
4159
|
-
*
|
|
4160
|
-
* Directions are used to represent the path between two points on the map,
|
|
4161
|
-
* as well as the instructions to follow the path.
|
|
4162
|
-
*/
|
|
4163
|
-
export class Directions {
|
|
4164
|
-
#private;
|
|
4165
|
-
/**
|
|
4166
|
-
* @internal
|
|
4167
|
-
*/
|
|
4168
|
-
constructor(directions: DirectionsCollection, mapData: MapDataInternal, from: TNavigationTarget[], to: TNavigationTarget[]);
|
|
4169
|
-
/**
|
|
4170
|
-
* @internal
|
|
4171
|
-
*/
|
|
4172
|
-
get path(): Node[];
|
|
4173
|
-
/**
|
|
4174
|
-
* The selected departure.
|
|
4175
|
-
*/
|
|
4176
|
-
get departure(): TNavigationTarget;
|
|
4177
|
-
/**
|
|
4178
|
-
* The selected destination.
|
|
4179
|
-
*/
|
|
4180
|
-
get destination(): TNavigationTarget;
|
|
4181
|
-
/**
|
|
4182
|
-
* All the coordinates ({@link Coordinate}) of the directions.
|
|
4183
|
-
*/
|
|
4184
|
-
get coordinates(): Coordinate[];
|
|
4185
|
-
/**
|
|
4186
|
-
* The total distance of the path in meters.
|
|
4187
|
-
*/
|
|
4188
|
-
get distance(): number;
|
|
4189
|
-
/**
|
|
4190
|
-
* The array of instructions ({@link TDirectionInstruction}).
|
|
4191
|
-
*/
|
|
4192
|
-
get instructions(): TDirectionInstruction[];
|
|
4193
|
-
}
|
|
4194
|
-
export class DirectionsInternal {
|
|
4195
|
-
navigator: Navigator;
|
|
4196
|
-
/**
|
|
4197
|
-
* @hidden
|
|
4198
|
-
*/
|
|
4199
|
-
constructor({ nodes, geojsonCollection, connections, groupBy, multiplicativeDistanceWeightScaling, }: {
|
|
4200
|
-
nodes: ParsedMVF['node.geojson'];
|
|
4201
|
-
geojsonCollection: ParsedMVF['obstruction'] | ParsedMVF['space'];
|
|
4202
|
-
connections: ParsedMVF['connection.json'];
|
|
4203
|
-
groupBy?: string;
|
|
4204
|
-
multiplicativeDistanceWeightScaling?: boolean;
|
|
4205
|
-
});
|
|
4206
|
-
/**
|
|
4207
|
-
* Get directions between two navigation targets.
|
|
4208
|
-
*
|
|
4209
|
-
* @hidden
|
|
4210
|
-
* @param from
|
|
4211
|
-
* @param to
|
|
4212
|
-
* @param options
|
|
4213
|
-
* @param mapData
|
|
4214
|
-
*/
|
|
4215
|
-
getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
|
|
4216
|
-
accessible: boolean;
|
|
4217
|
-
smoothing: {
|
|
4218
|
-
enabled: boolean;
|
|
4219
|
-
radius: number;
|
|
4220
|
-
};
|
|
4221
|
-
zones: TDirectionZone[];
|
|
4222
|
-
excludedConnections: Connection[];
|
|
4223
|
-
connectionIdWeightMap: Record<string, number>;
|
|
4224
|
-
}, mapData: MapDataInternal) => Directions | undefined;
|
|
4225
|
-
/**
|
|
4226
|
-
* Get the node IDs that should be excluded from the navigation graph.
|
|
4227
|
-
*
|
|
4228
|
-
* @hidden
|
|
4229
|
-
* @param excludedConnections {Connection[]}
|
|
4230
|
-
*/
|
|
4231
|
-
getExcludedNodeIds: (excludedConnections: Connection[]) => string[];
|
|
4232
|
-
/**
|
|
4233
|
-
* Get the node IDs of connections that do not match the accessibility setting provided.
|
|
4234
|
-
* A disabled connection node is a connection node that acts as a regular node
|
|
4235
|
-
* (ie. the edges that would cause a floor change are ignored).
|
|
4236
|
-
*
|
|
4237
|
-
* @hidden
|
|
4238
|
-
* @param accessible {boolean}
|
|
4239
|
-
*/
|
|
4240
|
-
getDisabledConnectionNodeIds: (accessible: boolean) => string[];
|
|
4241
|
-
}
|
|
4242
|
-
/**
|
|
4243
|
-
* Get the nodes from the navigation target.
|
|
4244
|
-
*
|
|
4245
|
-
* @hidden
|
|
4246
|
-
* @param target
|
|
4247
|
-
* @param mapData
|
|
4248
|
-
*/
|
|
4249
|
-
export function getNodesFromTarget(target: TNavigationTarget, mapData: MapDataInternal): string[];
|
|
4217
|
+
export { Directions, DirectionsInternal, getNodesFromTarget } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/index';
|
|
4250
4218
|
}
|
|
4251
4219
|
|
|
4252
4220
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
|
|
@@ -7368,6 +7336,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/path' {
|
|
|
7368
7336
|
id: string | number;
|
|
7369
7337
|
coordinates: Coordinate[];
|
|
7370
7338
|
}[]);
|
|
7339
|
+
toJSON(): {
|
|
7340
|
+
__type: string;
|
|
7341
|
+
id: string;
|
|
7342
|
+
coordinates: Coordinate[];
|
|
7343
|
+
segments: PathSegment[];
|
|
7344
|
+
};
|
|
7371
7345
|
}
|
|
7372
7346
|
}
|
|
7373
7347
|
|
|
@@ -9235,6 +9209,10 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
9235
9209
|
* The render order of the geometry
|
|
9236
9210
|
*/
|
|
9237
9211
|
renderOrder?: number;
|
|
9212
|
+
/**
|
|
9213
|
+
* The altitude of the geometry element in meters.
|
|
9214
|
+
*/
|
|
9215
|
+
altitude: number;
|
|
9238
9216
|
};
|
|
9239
9217
|
export class MeshComponent {
|
|
9240
9218
|
#private;
|
|
@@ -9268,8 +9246,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/mesh' {
|
|
|
9268
9246
|
topColor: Color;
|
|
9269
9247
|
} | undefined;
|
|
9270
9248
|
position: Vector3;
|
|
9271
|
-
|
|
9272
|
-
set altitude(value: number);
|
|
9249
|
+
altitude: number;
|
|
9273
9250
|
get opacity(): number;
|
|
9274
9251
|
set opacity(value: number);
|
|
9275
9252
|
get texture(): string;
|
|
@@ -13131,6 +13108,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
|
|
|
13131
13108
|
export {};
|
|
13132
13109
|
}
|
|
13133
13110
|
|
|
13111
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/index' {
|
|
13112
|
+
export { Directions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/directions';
|
|
13113
|
+
export { DirectionsInternal } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/directions-internal';
|
|
13114
|
+
export { getNodesFromTarget } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/utils';
|
|
13115
|
+
}
|
|
13116
|
+
|
|
13134
13117
|
declare module '@mappedin/react-sdk/packages/common/types' {
|
|
13135
13118
|
type Primitive = string | number | boolean | null | undefined;
|
|
13136
13119
|
export type PartialExcept<T, K extends string> = {
|
|
@@ -14984,7 +14967,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
|
14984
14967
|
import type { EntranceCollection, LineString, Polygon, Point, SpaceProperties, ObstructionProperties, StyleCollection, PolygonStyle, LineStringStyle, Feature, ObstructionCollection, PointStyle } from '@mappedin/mvf-v2';
|
|
14985
14968
|
import type { PolygonFeatureProperties } from '@packages/internal/mvf-utils';
|
|
14986
14969
|
import type { BBox, FeatureCollection, MultiLineString } from 'geojson';
|
|
14987
|
-
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle, Position, EntityId, PathState } from '@mappedin/core-sdk';
|
|
14970
|
+
import type { LabelState, MarkerState, GeometryState, CollisionRankingTier, LineStyle, PaintStyle, Position, EntityId, PathState, GeometryGroupState } from '@mappedin/core-sdk';
|
|
14988
14971
|
import { type TGeometryState, type TLabelState, type TDirectionInstructionAction, type TShow3DMapOptions, type Label, type Marker, type Model, MapData } from '@mappedin/react-sdk/mappedin-js/src';
|
|
14989
14972
|
import type { IAnchorable, TDoorsState, TMarkerState, TWallsState } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
14990
14973
|
import type { Image, Path, Shape, Text3D } from '@mappedin/react-sdk/mappedin-js/src/map-view-objects';
|
|
@@ -15002,7 +14985,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils' {
|
|
|
15002
14985
|
export function translateMarkerStateToGeojsonCore(state: Partial<TMarkerState>, currentState: Partial<MarkerState>): Partial<MarkerState>;
|
|
15003
14986
|
export function translateDoorsStateToGeojsonCore(state: Partial<TDoorsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
15004
14987
|
export function translateWallsStateToGeojsonCore(state: Partial<TWallsState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
15005
|
-
export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>, currentState: Partial<GeometryState>): Partial<GeometryState>;
|
|
14988
|
+
export function translateSpaceStateToGeojsonCore(state: Partial<TGeometryState>, currentState: Partial<GeometryState>, parentState?: Partial<GeometryGroupState>): Partial<GeometryState>;
|
|
15006
14989
|
export function differenceBetweenAngles(a: number, b: number): number;
|
|
15007
14990
|
export function getRelativeBearing(relativeBearingAngle: number, threshold: number): TDirectionInstructionAction['bearing'];
|
|
15008
14991
|
export function convertCollisionRankingTeirToNumber(tier: CollisionRankingTier): number;
|
|
@@ -15056,6 +15039,75 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-stack-obje
|
|
|
15056
15039
|
}
|
|
15057
15040
|
}
|
|
15058
15041
|
|
|
15042
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/directions-internal' {
|
|
15043
|
+
import type { ParsedMVF } from '@mappedin/mvf-v2';
|
|
15044
|
+
import { Navigator } from '@packages/internal/geojson-navigator';
|
|
15045
|
+
import type { Connection, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
15046
|
+
import type { TDirectionZone, TNavigationTarget } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
15047
|
+
import { Directions } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/directions';
|
|
15048
|
+
export class DirectionsInternal {
|
|
15049
|
+
navigator: Navigator;
|
|
15050
|
+
/**
|
|
15051
|
+
* @hidden
|
|
15052
|
+
*/
|
|
15053
|
+
constructor({ nodes, geojsonCollection, connections, groupBy, multiplicativeDistanceWeightScaling, }: {
|
|
15054
|
+
nodes: ParsedMVF['node.geojson'];
|
|
15055
|
+
geojsonCollection: ParsedMVF['obstruction'] | ParsedMVF['space'];
|
|
15056
|
+
connections: ParsedMVF['connection.json'];
|
|
15057
|
+
groupBy?: string;
|
|
15058
|
+
multiplicativeDistanceWeightScaling?: boolean;
|
|
15059
|
+
});
|
|
15060
|
+
/**
|
|
15061
|
+
* Get directions between two navigation targets.
|
|
15062
|
+
*
|
|
15063
|
+
* @hidden
|
|
15064
|
+
* @param from
|
|
15065
|
+
* @param to
|
|
15066
|
+
* @param options
|
|
15067
|
+
* @param mapData
|
|
15068
|
+
*/
|
|
15069
|
+
getDirections: (from: TNavigationTarget[], to: TNavigationTarget[], options: {
|
|
15070
|
+
accessible: boolean;
|
|
15071
|
+
smoothing: {
|
|
15072
|
+
enabled: boolean;
|
|
15073
|
+
radius: number;
|
|
15074
|
+
};
|
|
15075
|
+
zones: TDirectionZone[];
|
|
15076
|
+
excludedConnections: Connection[];
|
|
15077
|
+
connectionIdWeightMap: Record<string, number>;
|
|
15078
|
+
}, mapData: MapDataInternal) => Directions | undefined;
|
|
15079
|
+
/**
|
|
15080
|
+
* Get the node IDs that should be excluded from the navigation graph.
|
|
15081
|
+
*
|
|
15082
|
+
* @hidden
|
|
15083
|
+
* @param excludedConnections {Connection[]}
|
|
15084
|
+
*/
|
|
15085
|
+
getExcludedNodeIds: (excludedConnections: Connection[]) => string[];
|
|
15086
|
+
/**
|
|
15087
|
+
* Get the node IDs of connections that do not match the accessibility setting provided.
|
|
15088
|
+
* A disabled connection node is a connection node that acts as a regular node
|
|
15089
|
+
* (ie. the edges that would cause a floor change are ignored).
|
|
15090
|
+
*
|
|
15091
|
+
* @hidden
|
|
15092
|
+
* @param accessible {boolean}
|
|
15093
|
+
*/
|
|
15094
|
+
getDisabledConnectionNodeIds: (accessible: boolean) => string[];
|
|
15095
|
+
}
|
|
15096
|
+
}
|
|
15097
|
+
|
|
15098
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions/utils' {
|
|
15099
|
+
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
15100
|
+
import type { TNavigationTarget } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
15101
|
+
/**
|
|
15102
|
+
* Get the nodes from the navigation target.
|
|
15103
|
+
*
|
|
15104
|
+
* @hidden
|
|
15105
|
+
* @param target
|
|
15106
|
+
* @param mapData
|
|
15107
|
+
*/
|
|
15108
|
+
export function getNodesFromTarget(target: TNavigationTarget, mapData: MapDataInternal): string[];
|
|
15109
|
+
}
|
|
15110
|
+
|
|
15059
15111
|
declare module '@mappedin/react-sdk/geojson/src/components/outline' {
|
|
15060
15112
|
import type { BufferAttribute, BufferGeometry } from 'three';
|
|
15061
15113
|
type Outline = {
|
|
@@ -15175,7 +15227,6 @@ declare module '@mappedin/react-sdk/geojson/src/systems/interactions/system' {
|
|
|
15175
15227
|
dirty3D: boolean;
|
|
15176
15228
|
get _hitBoxes(): {
|
|
15177
15229
|
entities: (Object3D | EntityMesh<Geometry3D> | EntityBatchedMesh)[];
|
|
15178
|
-
groups: GroupContainerObject3D[];
|
|
15179
15230
|
};
|
|
15180
15231
|
getMouseRayIntersects(): Intersection<Object3D<Object3DEventMap>>[];
|
|
15181
15232
|
destroy(): void;
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as D,l as O,m as R}from"./chunk-
|
|
1
|
+
import{k as D,l as O,m as R}from"./chunk-LSBQEE4P.js";import{d as g,q as C}from"./chunk-KAPCGJLB.js";import"./chunk-HILRB2WN.js";import"./chunk-DDMRROUJ.js";import"./chunk-GSTLKYPH.js";import{a as u,b as w,c as n,e as k,q as a}from"./chunk-U2BLDPFK.js";a();a();import J,{useCallback as K,useMemo as Q}from"react";import{useContext as j,useEffect as N,useRef as b,useState as W}from"react";import{createPortal as X}from"react-dom";a();import{createContext as Y,useContext as $}from"react";a();var S=class S extends Error{constructor(t){super("".concat(t," must be used within a MapView component."))}};n(S,"MapViewNullError");var m=S;var p=Y({mapData:void 0,mapView:void 0});function q(){let{mapData:e,mapView:t}=$(p);if(!e||!t)throw new m("useMap");return{mapData:e,mapView:t}}n(q,"useMap");a();import{useEffect as B}from"react";function s(e,t){B(()=>{t!=null&&typeof e=="function"&&e(t)},[e,t])}n(s,"useOnLoad");function H(e){let{mapView:t}=j(p),r=b(),[o,i]=W(null);return N(()=>{if(t==null)throw new m("Marker");return r.current=t.Markers.add(e.target,"",w(u({},e.options),{dynamicResize:!0})),i(r.current),()=>{t==null||r.current==null||t.Markers.remove(r.current)}},[t,e.target]),N(()=>{o&&(t==null||t.updateState(o,u({},e.options)))},[e.options]),s(e.onLoad,o),t==null||o==null?null:X(e.children,o.contentEl,o.id)}n(H,"Marker");function Z(e){let{mapView:t}=j(p),[r,o]=W(null),i=b(C()),f=b(e.target),c=K(l=>{var P;o(l),(P=e.onLoad)==null||P.call(e,l)},[e.onLoad]);N(()=>{if(t==null)throw new m("Marker");if(r&&r.target!==e.target){let{duration:l=300,easing:P="linear"}=e;t.Markers.animateTo(r,e.target,{duration:l,easing:P})}},[t,e.target,r]);let M=Q(()=>w(u({},e),{duration:void 0,easing:void 0}),[e.duration,e.easing]);return J.createElement(H,w(u({},M),{key:i.current,target:f.current,onLoad:c}))}n(Z,"AnimatedMarker");a();import{useContext as _,useEffect as I,useRef as ee,useState as te}from"react";function re(e){let{mapView:t}=_(p),r=ee(),[o,i]=te(void 0);return I(()=>{if(t==null)throw new m("Label");return r.current=t.Labels.add(e.target,e.text,e.options),i(r.current),()=>{t==null||r.current==null||t.Labels.remove(r.current)}},[t,e.target]),I(()=>{r.current&&(t==null||t.updateState(r.current,u({text:e.text},e.options)))},[e.text,e.options]),s(e.onLoad,o),null}n(re,"Label");a();import{useCallback as ae,useContext as oe,useEffect as ne}from"react";function ie(e,t){let{mapView:r}=oe(p),o=ae(i=>t(i),[t]);ne(()=>{if(r==null)throw new m("useEvent");return r.on(e,o),()=>{r!=null&&r.off(e,o)}},[r,e,t])}n(ie,"useEvent");a();import{useContext as pe,useEffect as me,useRef as ue,useState as se}from"react";function de(e){let{mapView:t}=pe(p),r=ue(),[o,i]=se(void 0);return me(()=>{if(t==null)throw new m("Path");let f=t.Paths.add(e.coordinate,e.options);return f.animation.then(()=>{var c;(c=e.onDrawComplete)==null||c.call(e)}),i(f),r.current=f,()=>{r.current&&t.Paths.remove(r.current)}},[t,e.coordinate,e.options]),s(e.onLoad,o),null}n(de,"Path");a();import L,{useCallback as le,useEffect as fe,useMemo as ce,useRef as z,useState as F}from"react";var Me={width:"100%",height:"100%",position:"relative"};function Pe(e){let V=e,{mapData:t,options:r,style:o,fallback:i,children:f}=V,c=k(V,["mapData","options","style","fallback","children"]),M=z(!1),[l,P]=F(void 0),[x,y]=F(!0),h=z(null),A=ce(()=>r,[]),E=le(()=>{if(t&&(h!=null&&h.current)){if(l)return;O(h.current,t,A).then(T=>{P(T)}).catch(T=>{g.error("Failed to render MapView",T)}).finally(()=>{y(!1)})}},[t,h.current,A]);return fe(()=>{M.current||(M.current=!0,E())},[E]),s(e.onLoad,l),L.createElement(p.Provider,{value:{mapData:t,mapView:l}},L.createElement("div",u({"data-testid":"mappedin-map",ref:h,style:u(u({},Me),o)},c)),x?L.createElement(L.Fragment,null,i):f)}n(Pe,"MapView");a();import{useContext as ye,useEffect as G,useState as he}from"react";function xe(e){let{mapView:t}=ye(p),[r,o]=he(!1);return G(()=>{if(t==null)throw new m("Navigation");return t.Navigation.draw(e.directions,e.options).then(()=>{var i;o(!0),(i=e.onDrawComplete)==null||i.call(e)}),()=>{t.Navigation.clear()}},[t,e.directions,e.options]),G(()=>{r!==!1&&typeof e.onLoad=="function"&&e.onLoad()},[e.onLoad,r]),null}n(xe,"Navigation");a();import{useContext as we,useEffect as ge,useRef as Le,useState as Te}from"react";function Se(e){let{mapView:t}=we(p),r=Le(),[o,i]=Te(void 0);return ge(()=>{if(t==null)throw new Error("MapView not initialized");return r.current=t.Shapes.add(e.geometry,e.style,e.floor),i(r.current),()=>{t==null||r.current==null||t.Shapes.remove(r.current)}},[t,e.geometry,e.style,e.floor]),s(e.onLoad,o),null}n(Se,"Shape");a();import{useContext as Ne,useEffect as U,useRef as be,useState as ve}from"react";function Ae(e){let{mapView:t}=Ne(p),r=be(),[o,i]=ve(void 0);return U(()=>{if(t==null)throw new m("Model");return r.current=t.Models.add(e.target,e.url,e.options),i(r.current),()=>{t==null||r.current==null||t.Models.remove(r.current)}},[t,e.url]),U(()=>{r.current&&(t==null||t.updateState(r.current,u({position:e.target},e.options)))},[e.options,e.target]),s(e.onLoad,o),null}n(Ae,"Model");a();import{useCallback as Ee,useEffect as Ve,useMemo as ke,useRef as Ce,useState as v}from"react";function De(e){let[t,r]=v(void 0),[o,i]=v(!0),[f,c]=v(void 0),M=Ce(0),l=ke(()=>e,[]),P=Ee(()=>{let x=++M.current;i(!0),c(void 0),D(l).then(y=>{M.current===x&&r(y)}).catch(y=>{M.current===x&&(g.error("Failed to fetch MapData",y),c(y))}).finally(()=>{M.current===x&&i(!1)})},[l]);return Ve(()=>{P()},[P]),{mapData:t,isLoading:o,error:f}}n(De,"useMapData");var tr=R;export{Z as AnimatedMarker,re as Label,Pe as MapView,H as Marker,Ae as Model,xe as Navigation,de as Path,Se as Shape,tr as default,ie as useEvent,q as useMap,De as useMapData};
|