@wemap/core 14.7.3 → 14.8.0-beta.1

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,5 +1,6 @@
1
1
  import { BoundingBox } from '@wemap/geo';
2
2
  import { BuildingService } from './services/BuildingService';
3
+ import { WallService } from './services/WallService';
3
4
  import { PinpointManager } from './services/PinpointManager';
4
5
  import { GeocodingService } from './services/GeocodingService';
5
6
  import { SnippetParser } from './helpers/SnippetParser';
@@ -7,6 +8,23 @@ import { Building } from './types/indoor';
7
8
  import { GeocodingServiceOptions } from './types/geocoding';
8
9
  import { LivemapTagsConfig } from './types/tags';
9
10
  import { WemapTheme } from './theme';
11
+ /**
12
+ * Identity of the application using the SDK, sent to Wemap backends so usage
13
+ * can be attributed to it. `sdk` / `sdkVersion` are filled in by the SDK.
14
+ */
15
+ export interface ClientInfo {
16
+ /** Human-readable name of the app or site. Defaults to `document.title`. */
17
+ app?: string;
18
+ /**
19
+ * Stable key for the app. Defaults to `location.hostname`; set it explicitly
20
+ * when the hostname is not a good identifier (e.g. a white-label domain).
21
+ */
22
+ appId?: string;
23
+ /** The layer wrapping the SDK, when there is one (e.g. `'livemap'`). */
24
+ via?: string;
25
+ /** Version of that layer. */
26
+ viaVersion?: string;
27
+ }
10
28
  /**
11
29
  * Initialization options for the Core SDK
12
30
  */
@@ -22,6 +40,8 @@ export interface InitOptions {
22
40
  * keep their default. Not read from the livemap snippet — SDK-specific.
23
41
  */
24
42
  theme?: Partial<WemapTheme>;
43
+ /** Identity of the calling application, sent along with backend requests. */
44
+ client?: ClientInfo;
25
45
  }
26
46
  type Snippet = ReturnType<typeof SnippetParser.parse>;
27
47
  /** Indoor settings from the livemap snippet (`indoor.enable`, `indoor.minZoom`). */
@@ -58,6 +78,7 @@ export interface IndoorOptions {
58
78
  export declare class CoreConfig {
59
79
  private static snippet;
60
80
  private static theme;
81
+ private static client;
61
82
  private livemapService;
62
83
  private env;
63
84
  /**
@@ -158,6 +179,11 @@ export declare class CoreConfig {
158
179
  * override). Returns the defaults when the SDK has not been initialized.
159
180
  */
160
181
  static getTheme(): WemapTheme;
182
+ /**
183
+ * The application identity passed to `core.init` (empty when none was given).
184
+ * SDK packages merge it over their own defaults when calling backends.
185
+ */
186
+ static getClientInfo(): ClientInfo;
161
187
  /**
162
188
  * The resolved theme as CSS custom properties
163
189
  * (`{ '--wemap-color-primary': '#…', … }`). UI packages apply these to their
@@ -193,6 +219,18 @@ export declare class CoreConfig {
193
219
  * @returns A `BuildingService` bound to this livemap.
194
220
  */
195
221
  createBuildingService(): BuildingService;
222
+ /**
223
+ * Build a wall service for the initialized livemap.
224
+ *
225
+ * ```typescript
226
+ * await core.init({ emmid, token });
227
+ * const service = core.createWallService();
228
+ * const walls = await service.searchWalls(venueId);
229
+ * ```
230
+ *
231
+ * @returns A `WallService` bound to this livemap.
232
+ */
233
+ createWallService(): WallService;
196
234
  /**
197
235
  * Build a pinpoint manager bound to the initialized livemap.
198
236
  *
@@ -1 +1 @@
1
- {"version":3,"file":"CoreConfig.d.ts","sourceRoot":"","sources":["../../src/CoreConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,W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,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrD;;;;;;;;;;;;;;;OAeG;IACH,sBAAsB,IAAI,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC;IAMpE;;;;;;;;;;OAUG;IACH,qBAAqB,IAAI,eAAe;IAIxC;;;;;;;;;;OAUG;IACH,iBAAiB,IAAI,WAAW;IAIhC;;;;;;;;;;;;OAYG;IACH,qBAAqB,IAAI,eAAe;IAIxC;;;;;;;;;;;OAWG;IACH,sBAAsB,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,gBAAgB;CAG5E;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,YAAmB,CAAC"}
@@ -111,10 +111,12 @@ export declare class SnippetParser {
111
111
  };
112
112
  providers: {
113
113
  blacklist: any;
114
+ degradedWalkingDistanceMeters: any;
114
115
  gnssWifi: {
115
116
  discardPositionsAbove: any;
116
117
  enableHighAccuracy: any;
117
118
  };
119
+ noPositioningWalkingDistanceMeters: any;
118
120
  polestarkey: any;
119
121
  straightLineDetector: {
120
122
  stepsConsideredForStraightLine: any;
@@ -153,17 +155,21 @@ export declare class SnippetParser {
153
155
  whitelist: any;
154
156
  };
155
157
  visibleTags: any;
158
+ wallCrossing: {
159
+ enabled: any;
160
+ locationImpact: any;
161
+ };
156
162
  };
157
163
  readonly aroundme: boolean;
158
164
  readonly deepLinkingEnabled: any;
159
165
  readonly dragging: any;
160
166
  readonly emmid: number;
161
- readonly handleBearing: any;
162
167
  readonly indoor: {
163
168
  enable: any;
164
169
  enableInteraction: any;
165
170
  highlightColor: any;
166
171
  selectedColor: any;
172
+ hoveredColor: any;
167
173
  highlightEnabled: any;
168
174
  highlightOnSearch: any;
169
175
  limitOutdoorAtLevel: any;
@@ -1 +1 @@
1
- {"version":3,"file":"SnippetParser.d.ts","sourceRoot":"","sources":["../../../src/helpers/SnippetParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,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hC,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;IA2BnE,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;IAuBvF,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CtC"}
@@ -0,0 +1,26 @@
1
+ import { MultiPolygon, Polygon } from 'geojson';
2
+ /** A wall footprint of a venue, as served by `GET /geofeatures/search?indoor=wall`. */
3
+ export type IndoorWall = {
4
+ /** Numeric level (floor) the wall belongs to. */
5
+ level: number;
6
+ geometry: Polygon | MultiPolygon;
7
+ };
8
+ /**
9
+ * Fetches the indoor walls of a venue from the Wemap API.
10
+ *
11
+ * Do not instantiate this directly — retrieve a configured instance with
12
+ * `core.createWallService()`.
13
+ */
14
+ export declare class WallService {
15
+ private static PAGE_SIZE;
16
+ private readonly http;
17
+ private readonly emmid;
18
+ /**
19
+ * @param baseUrl - Base URL of the Wemap API (e.g. `https://api.getwemap.com/v3.0`).
20
+ * @param emmid - The livemap id whose walls to fetch.
21
+ */
22
+ constructor(baseUrl: string, emmid: string | number);
23
+ /** Every wall of a venue, across all of its buildings and levels. */
24
+ searchWalls(venue: number): Promise<IndoorWall[]>;
25
+ }
26
+ //# sourceMappingURL=WallService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WallService.d.ts","sourceRoot":"","sources":["../../../src/services/WallService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGrD,uFAAuF;AACvF,MAAM,MAAM,UAAU,GAAG;IACvB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,GAAG,YAAY,CAAC;CAClC,CAAC;AAOF;;;;;GAKG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAO;IAE/B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAa;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAE/B;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAKnD,qEAAqE;IAC/D,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;CA+BxD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wemap/core",
3
- "version": "14.7.3",
3
+ "version": "14.8.0-beta.1",
4
4
  "description": "Core configuration, livemap services and shared types for the Wemap SDK.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Wemap SAS",
@@ -36,7 +36,7 @@
36
36
  "dist"
37
37
  ],
38
38
  "dependencies": {
39
- "@wemap/geo": "14.7.3",
39
+ "@wemap/geo": "14.8.0-beta.1",
40
40
  "@types/geojson": "^7946.0.16"
41
41
  }
42
42
  }