@mapvx/web-js 1.2.1 → 1.2.3-dev.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.
- package/LICENSE.md +2 -2
- package/README.md +12 -9
- package/dist/cjs/assets/icons.js +6 -8
- package/dist/cjs/assets/icons.js.map +1 -1
- package/dist/cjs/controllers/routeController.js +19 -19
- package/dist/cjs/controllers/routeController.js.map +1 -1
- package/dist/cjs/domain/models/animation.js +2 -2
- package/dist/cjs/domain/models/categories.js +23 -10
- package/dist/cjs/domain/models/categories.js.map +1 -1
- package/dist/cjs/domain/models/mapConfig.js +10 -1
- package/dist/cjs/domain/models/mapConfig.js.map +1 -1
- package/dist/cjs/domain/models/marker.js +86 -80
- package/dist/cjs/domain/models/marker.js.map +1 -1
- package/dist/cjs/domain/models/routeConfiguration.js +3 -1
- package/dist/cjs/domain/models/routeConfiguration.js.map +1 -1
- package/dist/cjs/index.js +17 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/logger/logger.js +13 -8
- package/dist/cjs/logger/logger.js.map +1 -1
- package/dist/cjs/logger/rollbar.js +11 -6
- package/dist/cjs/logger/rollbar.js.map +1 -1
- package/dist/cjs/map/map.js +102 -26
- package/dist/cjs/map/map.js.map +1 -1
- package/dist/cjs/map/mapInteractionOptions.js +56 -0
- package/dist/cjs/map/mapInteractionOptions.js.map +1 -0
- package/dist/cjs/repository/repository.js +25 -26
- package/dist/cjs/repository/repository.js.map +1 -1
- package/dist/cjs/repository/requester.js +71 -91
- package/dist/cjs/repository/requester.js.map +1 -1
- package/dist/cjs/sdk.js +18 -1
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/cjs/utils/semaphore.js +143 -0
- package/dist/cjs/utils/semaphore.js.map +1 -0
- package/dist/es/assets/icons.d.ts +4 -4
- package/dist/es/assets/icons.d.ts.map +1 -1
- package/dist/es/assets/icons.js +6 -8
- package/dist/es/assets/icons.js.map +1 -1
- package/dist/es/controllers/routeController.d.ts.map +1 -1
- package/dist/es/controllers/routeController.js +19 -19
- package/dist/es/controllers/routeController.js.map +1 -1
- package/dist/es/domain/models/animation.d.ts +3 -3
- package/dist/es/domain/models/animation.js +2 -2
- package/dist/es/domain/models/categories.d.ts +34 -10
- package/dist/es/domain/models/categories.d.ts.map +1 -1
- package/dist/es/domain/models/categories.js +21 -9
- package/dist/es/domain/models/categories.js.map +1 -1
- package/dist/es/domain/models/configuration.d.ts +8 -0
- package/dist/es/domain/models/configuration.d.ts.map +1 -1
- package/dist/es/domain/models/mapConfig.d.ts +118 -3
- package/dist/es/domain/models/mapConfig.d.ts.map +1 -1
- package/dist/es/domain/models/mapConfig.js +9 -0
- package/dist/es/domain/models/mapConfig.js.map +1 -1
- package/dist/es/domain/models/marker.d.ts +8 -0
- package/dist/es/domain/models/marker.d.ts.map +1 -1
- package/dist/es/domain/models/marker.js +86 -80
- package/dist/es/domain/models/marker.js.map +1 -1
- package/dist/es/domain/models/routeConfiguration.d.ts +47 -0
- package/dist/es/domain/models/routeConfiguration.d.ts.map +1 -1
- package/dist/es/domain/models/routeConfiguration.js +3 -1
- package/dist/es/domain/models/routeConfiguration.js.map +1 -1
- package/dist/es/index.d.ts +13 -12
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +8 -6
- package/dist/es/index.js.map +1 -1
- package/dist/es/interfaces/routeCacheResponse.d.ts.map +1 -1
- package/dist/es/logger/logger.d.ts.map +1 -1
- package/dist/es/logger/logger.js +13 -8
- package/dist/es/logger/logger.js.map +1 -1
- package/dist/es/logger/rollbar.d.ts.map +1 -1
- package/dist/es/logger/rollbar.js +11 -6
- package/dist/es/logger/rollbar.js.map +1 -1
- package/dist/es/map/map.d.ts +79 -0
- package/dist/es/map/map.d.ts.map +1 -1
- package/dist/es/map/map.js +104 -28
- package/dist/es/map/map.js.map +1 -1
- package/dist/es/map/mapInteractionOptions.d.ts +37 -0
- package/dist/es/map/mapInteractionOptions.d.ts.map +1 -0
- package/dist/es/map/mapInteractionOptions.js +51 -0
- package/dist/es/map/mapInteractionOptions.js.map +1 -0
- package/dist/es/repository/repository.d.ts +0 -1
- package/dist/es/repository/repository.d.ts.map +1 -1
- package/dist/es/repository/repository.js +25 -26
- package/dist/es/repository/repository.js.map +1 -1
- package/dist/es/repository/requester.d.ts +12 -2
- package/dist/es/repository/requester.d.ts.map +1 -1
- package/dist/es/repository/requester.js +71 -91
- package/dist/es/repository/requester.js.map +1 -1
- package/dist/es/sdk.d.ts +2 -0
- package/dist/es/sdk.d.ts.map +1 -1
- package/dist/es/sdk.js +18 -1
- package/dist/es/sdk.js.map +1 -1
- package/dist/es/utils/semaphore.d.ts +70 -0
- package/dist/es/utils/semaphore.d.ts.map +1 -0
- package/dist/es/utils/semaphore.js +139 -0
- package/dist/es/utils/semaphore.js.map +1 -0
- package/dist/umd/index.js +1092 -643
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/styles.css +32 -14
- package/dist/umd/styles.css.map +1 -1
- package/package.json +63 -49
- package/dist/cjs/assets/route_animation_icon.svg +0 -15
- package/dist/cjs/assets/user-dot-icon.svg +0 -3
- package/dist/es/assets/route_animation_icon.svg +0 -15
- package/dist/es/assets/user-dot-icon.svg +0 -3
|
@@ -45,84 +45,88 @@ class MarkerUtils {
|
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
47
|
static createMarkerElement(marker) {
|
|
48
|
-
var _a, _b, _c, _d;
|
|
49
48
|
const markerContainer = document.createElement("div");
|
|
50
|
-
// Configure specific marker dimensions
|
|
51
|
-
const iconWidth = (_b = (_a = marker.iconProperties) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 40;
|
|
52
|
-
const iconHeight = (_d = (_c = marker.iconProperties) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 40;
|
|
53
|
-
// Apply base class
|
|
54
49
|
markerContainer.className = "mapvx-marker";
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
50
|
+
this.applyContainerLayout(markerContainer, marker);
|
|
51
|
+
for (const child of this.createMarkerChildren(marker)) {
|
|
52
|
+
markerContainer.appendChild(child);
|
|
53
|
+
}
|
|
54
|
+
return markerContainer;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Applies the marker container's own classes and box size from a config.
|
|
58
|
+
* Shared by {@link createMarkerElement} and {@link MarkerAttribute.updateIcon}
|
|
59
|
+
* so create and update stay in sync (single source of truth for which state
|
|
60
|
+
* classes exist and how the anchored box is sized). It is idempotent, so it
|
|
61
|
+
* also resets stale state when reused to update an existing element.
|
|
62
|
+
*
|
|
63
|
+
* @param container - The `.mapvx-marker` element to configure
|
|
64
|
+
* @param marker - Marker configuration
|
|
65
|
+
*/
|
|
66
|
+
static applyContainerLayout(container, marker) {
|
|
67
|
+
var _a, _b, _c, _d;
|
|
68
|
+
// Reset the state classes we own (no-op on a fresh element).
|
|
69
|
+
container.classList.remove("no-text", "interactive");
|
|
70
|
+
// The container box equals the icon box so the out-of-flow label never
|
|
71
|
+
// displaces the icon from the coordinate MapLibre anchors. A caller-
|
|
72
|
+
// provided `element` owns its own size, so we let the box size to it.
|
|
73
|
+
if (marker.element) {
|
|
74
|
+
container.style.width = "";
|
|
75
|
+
container.style.height = "";
|
|
73
76
|
}
|
|
74
77
|
else {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
const iconWidth = (_b = (_a = marker.iconProperties) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 40;
|
|
79
|
+
const iconHeight = (_d = (_c = marker.iconProperties) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 40;
|
|
80
|
+
container.style.width = `${iconWidth}px`;
|
|
81
|
+
container.style.height = `${iconHeight}px`;
|
|
79
82
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
if (!marker.text) {
|
|
84
|
+
container.classList.add("no-text");
|
|
85
|
+
}
|
|
86
|
+
// Only flag the marker interactive when it actually handles clicks: this
|
|
87
|
+
// flips the out-of-flow label's pointer-events to auto (see styles.css)
|
|
88
|
+
// so the label is hit-testable, while non-clickable labels stay
|
|
89
|
+
// click-through and never block the map.
|
|
90
|
+
if (marker.onClick) {
|
|
91
|
+
container.classList.add("interactive");
|
|
87
92
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Builds the in-order children for a marker container: the icon (or the
|
|
96
|
+
* caller-provided element) followed by the optional out-of-flow label. DOM
|
|
97
|
+
* order is irrelevant for placement — the .text-container position classes
|
|
98
|
+
* (top/bottom/left/right) lay the label out around the icon.
|
|
99
|
+
*
|
|
100
|
+
* @param marker - Marker configuration
|
|
101
|
+
* @returns The child elements to append to the container
|
|
102
|
+
*/
|
|
103
|
+
static createMarkerChildren(marker) {
|
|
104
|
+
var _a, _b, _c, _d;
|
|
105
|
+
const children = [];
|
|
106
|
+
if (marker.element) {
|
|
107
|
+
children.push(marker.element);
|
|
100
108
|
}
|
|
101
109
|
else {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
const iconWidth = (_b = (_a = marker.iconProperties) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 40;
|
|
111
|
+
const iconHeight = (_d = (_c = marker.iconProperties) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 40;
|
|
112
|
+
children.push(this.createIconElement(marker, iconWidth, iconHeight));
|
|
105
113
|
}
|
|
106
|
-
|
|
114
|
+
if (marker.text) {
|
|
115
|
+
children.push(this.buildTextContainer(marker));
|
|
116
|
+
}
|
|
117
|
+
return children;
|
|
107
118
|
}
|
|
108
119
|
/**
|
|
109
|
-
*
|
|
120
|
+
* Builds the positioned label container for a marker.
|
|
110
121
|
*
|
|
111
|
-
* @param
|
|
112
|
-
* @
|
|
113
|
-
* @param iconHeight - Height of the icon for positioning calculations
|
|
114
|
-
* @param iconWidth - Width of the icon for positioning calculations
|
|
115
|
-
* @returns Container element with properly positioned text
|
|
122
|
+
* @param marker - Marker configuration; `text` is assumed to be set
|
|
123
|
+
* @returns The `.text-container` element ready to append
|
|
116
124
|
*/
|
|
117
|
-
static
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const textContainer = this.createTextContainer(textElement, markerConfig.textPosition);
|
|
123
|
-
container.appendChild(textContainer);
|
|
124
|
-
}
|
|
125
|
-
return container;
|
|
125
|
+
static buildTextContainer(marker) {
|
|
126
|
+
const textElement = typeof marker.text === "string"
|
|
127
|
+
? this.createTextElement(marker.text, marker.textProperties)
|
|
128
|
+
: marker.text;
|
|
129
|
+
return this.createTextContainer(textElement, marker.textPosition);
|
|
126
130
|
}
|
|
127
131
|
/**
|
|
128
132
|
* Creates an icon element with proper styling.
|
|
@@ -155,7 +159,8 @@ class MarkerUtils {
|
|
|
155
159
|
}
|
|
156
160
|
/**
|
|
157
161
|
* Creates a text container with proper positioning using CSS classes.
|
|
158
|
-
*
|
|
162
|
+
* The container is absolutely positioned (out of flow) so the label
|
|
163
|
+
* never grows the marker's anchored box.
|
|
159
164
|
*
|
|
160
165
|
* @param textElement - The text element to contain
|
|
161
166
|
* @param textPosition - Desired position relative to the icon
|
|
@@ -277,6 +282,10 @@ export class MarkerAttribute extends Marker {
|
|
|
277
282
|
anchor: (_a = markerConfig.anchor) !== null && _a !== void 0 ? _a : "center",
|
|
278
283
|
offset: [0, 0],
|
|
279
284
|
});
|
|
285
|
+
// Route clicks through an instance-level handler so the latest onClick is
|
|
286
|
+
// always invoked, even after updateIcon replaces the marker content.
|
|
287
|
+
this._userOnClick = markerConfig.onClick;
|
|
288
|
+
this._element.addEventListener("click", () => { var _a; return (_a = this._userOnClick) === null || _a === void 0 ? void 0 : _a.call(this); });
|
|
280
289
|
this.setLngLat([markerConfig.coordinate.lng, markerConfig.coordinate.lat]);
|
|
281
290
|
this.setRotationAlignment((_b = markerConfig.rotationAlignment) !== null && _b !== void 0 ? _b : "viewport");
|
|
282
291
|
this.setPitchAlignment("viewport");
|
|
@@ -317,20 +326,17 @@ export class MarkerAttribute extends Marker {
|
|
|
317
326
|
* ```
|
|
318
327
|
*/
|
|
319
328
|
updateIcon(marker) {
|
|
320
|
-
var _a
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
this.setRotationAlignment((_b = marker.rotationAlignment) !== null && _b !== void 0 ? _b : "viewport");
|
|
329
|
+
var _a;
|
|
330
|
+
// Reconfigure the element MapLibre already holds in place, rather than
|
|
331
|
+
// building a throwaway element and grafting pieces of it. MapLibre owns the
|
|
332
|
+
// element's other classes and inline styles (transform, position), which
|
|
333
|
+
// must survive the update; we only reset our own classes/size and swap the
|
|
334
|
+
// children. Both create and update go through the same MarkerUtils helpers,
|
|
335
|
+
// so they cannot drift apart.
|
|
336
|
+
MarkerUtils.applyContainerLayout(this._element, marker);
|
|
337
|
+
this._element.replaceChildren(...MarkerUtils.createMarkerChildren(marker));
|
|
338
|
+
this._userOnClick = marker.onClick;
|
|
339
|
+
this.setRotationAlignment((_a = marker.rotationAlignment) !== null && _a !== void 0 ? _a : "viewport");
|
|
334
340
|
this.setPitchAlignment("viewport");
|
|
335
341
|
if (typeof marker.rotation === "number") {
|
|
336
342
|
this.setRotation(marker.rotation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marker.js","sourceRoot":"","sources":["../../../../src/domain/models/marker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiC,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAG1D;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8CAA8C;IAC9C,+CAAI,CAAA;IACJ,+CAA+C;IAC/C,iDAAK,CAAA;IACL,qCAAqC;IACrC,6CAAG,CAAA;IACH,qCAAqC;IACrC,mDAAM,CAAA;AACR,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;
|
|
1
|
+
{"version":3,"file":"marker.js","sourceRoot":"","sources":["../../../../src/domain/models/marker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiC,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAG1D;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,8CAA8C;IAC9C,+CAAI,CAAA;IACJ,+CAA+C;IAC/C,iDAAK,CAAA;IACL,qCAAqC;IACrC,6CAAG,CAAA;IACH,qCAAqC;IACrC,mDAAM,CAAA;AACR,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AA4LD;;;GAGG;AACH,MAAM,WAAW;IACf;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,mBAAmB,CAAC,MAAoB;QAC7C,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QACrD,eAAe,CAAC,SAAS,GAAG,cAAc,CAAA;QAC1C,IAAI,CAAC,oBAAoB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;QAClD,KAAK,MAAM,KAAK,IAAI,IAAI,C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AAO,CAAA;IACxB,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI;QACF,IAAI,CAAC,MAAM,EAAE,CAAA;IACf,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CAAC,GAAQ;QACX,IAAI,CAAC,GAAG;YAAE,OAAM;QAChB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACjB,CAAC;IAED;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,OAAkC,EAAE,GAAQ,EAAE,YAAqB,KAAK;QAClF,IAAI,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;YAC3D,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SACf;aAAM;YACL,IAAI,CAAC,IAAI,EAAE,CAAA;SACZ;IACH,CAAC;CACF"}
|
|
@@ -61,6 +61,13 @@ export interface GetRouteConfiguration {
|
|
|
61
61
|
* Default to `RELATIVE`.
|
|
62
62
|
*/
|
|
63
63
|
announceFormat?: AnnounceFormat;
|
|
64
|
+
/**
|
|
65
|
+
* The user's heading, in degrees clockwise from north (0–360), used as the
|
|
66
|
+
* reference direction when announcing turns (e.g. with `RELATIVE`
|
|
67
|
+
* {@link GetRouteConfiguration.announceFormat}).
|
|
68
|
+
* Default to `0`.
|
|
69
|
+
*/
|
|
70
|
+
userBearing?: number;
|
|
64
71
|
}
|
|
65
72
|
/**
|
|
66
73
|
* Class representing the configuration of a route.
|
|
@@ -73,6 +80,7 @@ export declare class InternalGetRouteConfiguration implements GetRouteConfigurat
|
|
|
73
80
|
language: string;
|
|
74
81
|
unitSystem: UnitSystem;
|
|
75
82
|
announceFormat: AnnounceFormat;
|
|
83
|
+
userBearing: number;
|
|
76
84
|
/**
|
|
77
85
|
* Create a new route configuration.
|
|
78
86
|
* @param initialLocation The initial location for the route.
|
|
@@ -81,6 +89,7 @@ export declare class InternalGetRouteConfiguration implements GetRouteConfigurat
|
|
|
81
89
|
* @param language The language for the instructions.
|
|
82
90
|
* @param unitSystem The unit system used for the distance.
|
|
83
91
|
* @param announceFormat The format used to announce directions in the instructions.
|
|
92
|
+
* @param userBearing The user's heading in degrees used as the reference direction for announcing turns.
|
|
84
93
|
*/
|
|
85
94
|
constructor(config: GetRouteConfiguration);
|
|
86
95
|
}
|
|
@@ -118,17 +127,55 @@ export declare class InternalDrawRouteConfiguration implements DrawRouteConfigur
|
|
|
118
127
|
/**
|
|
119
128
|
* Interface that represent a place with their id.
|
|
120
129
|
* @group Routes
|
|
130
|
+
* @example
|
|
131
|
+
* ```typescript
|
|
132
|
+
* // Resolve an internal alias that is reused across several malls by
|
|
133
|
+
* // pinning the building (and, optionally, the floor) it belongs to.
|
|
134
|
+
* const origin: IdLocation = {
|
|
135
|
+
* id: "store-204", // integrator alias, may repeat across buildings
|
|
136
|
+
* buildingId: "mall-santiago",
|
|
137
|
+
* floorId: "level-2", // takes precedence over `level`
|
|
138
|
+
* }
|
|
139
|
+
* ```
|
|
121
140
|
*/
|
|
122
141
|
export interface IdLocation {
|
|
123
142
|
/**
|
|
124
143
|
* The ID of the place.
|
|
144
|
+
*
|
|
145
|
+
* This can be an internal alias defined by the integrator. Because aliases are
|
|
146
|
+
* not guaranteed to be globally unique (the same alias may be reused across
|
|
147
|
+
* different buildings/venues), provide {@link IdLocation.buildingId} to
|
|
148
|
+
* disambiguate which building this place belongs to.
|
|
125
149
|
*/
|
|
126
150
|
id: string;
|
|
151
|
+
/**
|
|
152
|
+
* The ID of the building (parent venue) that contains the place referenced by {@link IdLocation.id}.
|
|
153
|
+
*
|
|
154
|
+
* Use this when {@link IdLocation.id} is an internal alias that may be repeated
|
|
155
|
+
* across multiple buildings (e.g. the same store alias present in several shopping
|
|
156
|
+
* malls). Providing the building ID resolves the alias to the correct venue.
|
|
157
|
+
*
|
|
158
|
+
* If omitted, the alias is resolved without building context, which may be
|
|
159
|
+
* ambiguous when the alias is shared by more than one building.
|
|
160
|
+
*/
|
|
161
|
+
buildingId?: string;
|
|
162
|
+
/**
|
|
163
|
+
* The ID of the floor (within {@link IdLocation.buildingId}) where the place is found.
|
|
164
|
+
*
|
|
165
|
+
* This is only necessary if the place represented by the ID exists on multiple floors.
|
|
166
|
+
* Takes precedence over {@link IdLocation.level} when both are provided.
|
|
167
|
+
* If both are omitted and the place ID represents a place found on multiple floors,
|
|
168
|
+
* the first floor where this place is present will be used.
|
|
169
|
+
*/
|
|
170
|
+
floorId?: string;
|
|
127
171
|
/**
|
|
128
172
|
* The level of the floor in the parent place where the place is found.
|
|
129
173
|
* This is only necessary if the place represented by the ID exists on multiple floors.
|
|
130
174
|
* If omitted and the place ID represents a place found on multiple floors,
|
|
131
175
|
* the first floor where this place is present will be used.
|
|
176
|
+
*
|
|
177
|
+
* Prefer {@link IdLocation.floorId} when you have the floor ID; `floorId` takes
|
|
178
|
+
* precedence over `level` when both are provided.
|
|
132
179
|
*/
|
|
133
180
|
level?: number;
|
|
134
181
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routeConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/domain/models/routeConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C;;;GAGG;AACH,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED;;;GAGG;AACH,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,eAAe,EAAE,aAAa,CAAA;IAE9B;;OAEG;IACH,aAAa,EAAE,aAAa,CAAA;IAE5B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"routeConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/domain/models/routeConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C;;;GAGG;AACH,oBAAY,cAAc;IACxB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED;;;GAGG;AACH,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,eAAe,EAAE,aAAa,CAAA;IAE9B;;OAEG;IACH,aAAa,EAAE,aAAa,CAAA;IAE5B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAE/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAA;IAE/B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD;;;GAGG;AACH,qBAAa,6BAA8B,YAAW,qBAAqB;IACzE,eAAe,EAAE,aAAa,CAAA;IAC9B,aAAa,EAAE,aAAa,CAAA;IAC5B,qBAAqB,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;IACtB,cAAc,EAAE,cAAc,CAAA;IAC9B,WAAW,EAAE,MAAM,CAAA;IAEnB;;;;;;;;;OASG;gBACS,MAAM,EAAE,qBAAqB;CAS1C;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB;AAED;;;GAGG;AACH,qBAAa,8BAA+B,YAAW,sBAAsB;IAC3E,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB;;;;OAIG;gBACS,MAAM,EAAE,sBAAsB;CAO3C;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;;;OAOG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,WAAW,CAAA"}
|
|
@@ -42,15 +42,17 @@ export class InternalGetRouteConfiguration {
|
|
|
42
42
|
* @param language The language for the instructions.
|
|
43
43
|
* @param unitSystem The unit system used for the distance.
|
|
44
44
|
* @param announceFormat The format used to announce directions in the instructions.
|
|
45
|
+
* @param userBearing The user's heading in degrees used as the reference direction for announcing turns.
|
|
45
46
|
*/
|
|
46
47
|
constructor(config) {
|
|
47
|
-
var _a, _b, _c, _d;
|
|
48
|
+
var _a, _b, _c, _d, _e;
|
|
48
49
|
this.initialLocation = config.initialLocation;
|
|
49
50
|
this.finalLocation = config.finalLocation;
|
|
50
51
|
this.preferAccessibleRoute = (_a = config.preferAccessibleRoute) !== null && _a !== void 0 ? _a : false;
|
|
51
52
|
this.language = (_b = config.language) !== null && _b !== void 0 ? _b : "en";
|
|
52
53
|
this.unitSystem = (_c = config.unitSystem) !== null && _c !== void 0 ? _c : UnitSystem.metric;
|
|
53
54
|
this.announceFormat = (_d = config.announceFormat) !== null && _d !== void 0 ? _d : AnnounceFormat.relative;
|
|
55
|
+
this.userBearing = (_e = config.userBearing) !== null && _e !== void 0 ? _e : 0;
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routeConfiguration.js","sourceRoot":"","sources":["../../../../src/domain/models/routeConfiguration.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,iCAAe,CAAA;IACf,uCAAqB,CAAA;AACvB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,6BAAe,CAAA;AACjB,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;AACrB,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;
|
|
1
|
+
{"version":3,"file":"routeConfiguration.js","sourceRoot":"","sources":["../../../../src/domain/models/routeConfiguration.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,uCAAqB,CAAA;IACrB,iCAAe,CAAA;IACf,uCAAqB,CAAA;AACvB,CAAC,EAJW,cAAc,KAAd,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SAAS;SACjB,CAAA;IACH,CAAC;CACF"}
|
package/dist/es/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type {
|
|
1
|
+
export type { CacheStats, ICache } from "./domain/ports/ICache";
|
|
2
|
+
export type { HttpRequestOptions, HttpResponse, IHttpClient } from "./domain/ports/IHttpClient";
|
|
3
3
|
export type { ILogger } from "./domain/ports/ILogger";
|
|
4
|
+
export { DEFAULT_CACHE_CONFIGS, DEFAULT_MAX_STORAGE_BYTES, } from "./infrastructure/cache/cacheConfig";
|
|
5
|
+
export type { CacheConfig, CacheManagerConfig, CacheType } from "./infrastructure/cache/cacheConfig";
|
|
6
|
+
export { CacheManager } from "./infrastructure/cache/CacheManager";
|
|
4
7
|
export { LRUCache } from "./infrastructure/cache/LRUCache";
|
|
5
8
|
export { PersistentCache } from "./infrastructure/cache/PersistentCache";
|
|
6
|
-
export { CacheManager } from "./infrastructure/cache/CacheManager";
|
|
7
|
-
export type { CacheConfig, CacheManagerConfig, CacheType } from "./infrastructure/cache/cacheConfig";
|
|
8
|
-
export { DEFAULT_CACHE_CONFIGS, DEFAULT_MAX_STORAGE_BYTES, } from "./infrastructure/cache/cacheConfig";
|
|
9
9
|
export { FetchHttpClient } from "./infrastructure/http/FetchHttpClient";
|
|
10
10
|
export { CountlyLogger } from "./infrastructure/logging/CountlyLogger";
|
|
11
11
|
export type { MapVXMap } from "./map/map";
|
|
@@ -16,19 +16,20 @@ export type { AnimationConfig, AnimationDrawingConfig, AnimationStatus, } from "
|
|
|
16
16
|
export { createRouteAnimationIconDataUrl } from "./assets/icons";
|
|
17
17
|
export type { RouteAnimationIconConfig } from "./assets/icons";
|
|
18
18
|
export { Banner } from "./domain/models/banner";
|
|
19
|
-
export { isBasicWithIcon, isBasicWithLogo } from "./domain/models/categories";
|
|
20
|
-
export type { BasicCategory, BasicWithIcon, BasicWithLogo, Category, InternalLinkCategory, NestedCategory, PhoneCategory, PlaceCategory, ProductCategory, TextCategory, UrlCategory, } from "./domain/models/categories";
|
|
21
|
-
export { circleRing,
|
|
19
|
+
export { isBasicWithIcon, isBasicWithImageUrl, isBasicWithLogo } from "./domain/models/categories";
|
|
20
|
+
export type { BasicCategory, BasicWithIcon, BasicWithImageUrl, BasicWithLogo, Category, InternalLinkCategory, NestedCategory, PhoneCategory, PlaceCategory, ProductCategory, TextCategory, UrlCategory, } from "./domain/models/categories";
|
|
21
|
+
export { CIRCLE_DEFAULTS, circleRing, isValidCircleConfig, MAPVX_BRAND_COLOR, } from "./domain/models/circle";
|
|
22
22
|
export type { CircleConfig, CircleRecord, CircleRenderOrder } from "./domain/models/circle";
|
|
23
23
|
export type { CityFilterOption, InstitutionCityFilterOption, ParentPlaceCityFilterOption, } from "./domain/models/cityFilterOption";
|
|
24
24
|
export type { Configuration } from "./domain/models/configuration";
|
|
25
25
|
export type { CssComponent, CssCustomization, CssDefinitions, CssElement, CssScreen, CssTheme, } from "./domain/models/cssCustomization";
|
|
26
|
-
export type { FitOptions, FloorUpdateOptions,
|
|
26
|
+
export type { BoundsOptions, FitOptions, FloorUpdateOptions, PaddingOptions, PaddingValue, ZoomOptions, } from "./domain/models/fitOptions";
|
|
27
27
|
export type { InnerFloor } from "./domain/models/innerFloors";
|
|
28
28
|
export { Institution } from "./domain/models/institution";
|
|
29
29
|
export type { LatLng, PositionCallback } from "./domain/models/latLng";
|
|
30
30
|
export type { MVXLocation } from "./domain/models/location";
|
|
31
31
|
export type { CameraAnimation, MapCamera } from "./domain/models/mapCamera";
|
|
32
|
+
export { DEFAULT_TILE_CACHE_CONFIG, MAPLIBRE_MAX_TILE_CACHE_HARD_CAP, } from "./domain/models/mapConfig";
|
|
32
33
|
export type { MapConfig, MapTileCacheConfig } from "./domain/models/mapConfig";
|
|
33
34
|
export { TextPosition } from "./domain/models/marker";
|
|
34
35
|
export type { MarkerConfig, TextProperties } from "./domain/models/marker";
|
|
@@ -45,10 +46,10 @@ export type { RealtimeSchedule, Schedule } from "./domain/models/transport";
|
|
|
45
46
|
export type { HealthResponse } from "./interfaces/healthResponse";
|
|
46
47
|
export type { InstitutionResponse } from "./interfaces/institutionResponse";
|
|
47
48
|
export type { PlaceResponse } from "./interfaces/placeResponse";
|
|
48
|
-
export { loadCustomization } from "./utils/update-css";
|
|
49
|
-
export { OpeningHoursHelper } from "./utils/opening-hours-helper";
|
|
50
49
|
export { isMapVxRequestHostname } from "./utils/mapvxHostname";
|
|
50
|
+
export { OpeningHoursHelper } from "./utils/opening-hours-helper";
|
|
51
51
|
export { injectPreconnects, MAPVX_DEFAULT_PRECONNECT_HOSTS } from "./utils/preconnect";
|
|
52
|
+
export { loadCustomization } from "./utils/update-css";
|
|
52
53
|
/**
|
|
53
54
|
* Function to load default styles
|
|
54
55
|
* @group Utils
|
|
@@ -58,5 +59,5 @@ export declare const loadStyles: () => void;
|
|
|
58
59
|
* Re-export MapLibre GL JS types for convenience
|
|
59
60
|
* @group Utils
|
|
60
61
|
*/
|
|
61
|
-
export type { Map as MapLibreMap, Marker as MapLibreMarker,
|
|
62
|
+
export type { LngLatBoundsLike, LngLatLike, MapEventType, MapLayerEventType, Map as MapLibreMap, Marker as MapLibreMarker, MapOptions, PointLike, PositionAnchor, StyleSpecification, } from "maplibre-gl";
|
|
62
63
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/es/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC/D,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC/F,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAGrD,OAA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,EAAE,MAAM,uBAAuB,CAAA;AAG3E,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAA;AACnG,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,UAAU,EACV,aAAa,GACd,MAAM,oCAAoC,CAAA;AAG3C,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAGvF,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAG3E,YAAY,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAC3E,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAA;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtD;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAO,IAW7B,CAAA;AAED;;;GAGG;AACH,YAAY,EACV,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,GAAG,IAAI,WAAW,EAClB,MAAM,IAAI,cAAc,EACxB,UAAU,EACV,SAAS,EACT,cAAc,EACd,kBAAkB,GACnB,MAAM,aAAa,CAAA"}
|
package/dist/es/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// ─── Infrastructure: Cache ───────────────────────────────────────────────────
|
|
2
|
+
export { DEFAULT_CACHE_CONFIGS, DEFAULT_MAX_STORAGE_BYTES, } from "./infrastructure/cache/cacheConfig";
|
|
3
|
+
export { CacheManager } from "./infrastructure/cache/CacheManager";
|
|
2
4
|
export { LRUCache } from "./infrastructure/cache/LRUCache";
|
|
3
5
|
export { PersistentCache } from "./infrastructure/cache/PersistentCache";
|
|
4
|
-
export { CacheManager } from "./infrastructure/cache/CacheManager";
|
|
5
|
-
export { DEFAULT_CACHE_CONFIGS, DEFAULT_MAX_STORAGE_BYTES, } from "./infrastructure/cache/cacheConfig";
|
|
6
6
|
// ─── Infrastructure: HTTP ────────────────────────────────────────────────────
|
|
7
7
|
export { FetchHttpClient } from "./infrastructure/http/FetchHttpClient";
|
|
8
8
|
// ─── Infrastructure: Logging ─────────────────────────────────────────────────
|
|
@@ -14,11 +14,13 @@ export { createRouteAnimationIconDataUrl } from "./assets/icons";
|
|
|
14
14
|
// ─── Domain Models: Banner ───────────────────────────────────────────────────
|
|
15
15
|
export { Banner } from "./domain/models/banner";
|
|
16
16
|
// ─── Domain Models: Categories ───────────────────────────────────────────────
|
|
17
|
-
export { isBasicWithIcon, isBasicWithLogo } from "./domain/models/categories";
|
|
17
|
+
export { isBasicWithIcon, isBasicWithImageUrl, isBasicWithLogo } from "./domain/models/categories";
|
|
18
18
|
// ─── Domain Models: Circle ───────────────────────────────────────────────────
|
|
19
|
-
export { circleRing,
|
|
19
|
+
export { CIRCLE_DEFAULTS, circleRing, isValidCircleConfig, MAPVX_BRAND_COLOR, } from "./domain/models/circle";
|
|
20
20
|
// ─── Domain Models: Institution ──────────────────────────────────────────────
|
|
21
21
|
export { Institution } from "./domain/models/institution";
|
|
22
|
+
// ─── Domain Models: Map Config ───────────────────────────────────────────────
|
|
23
|
+
export { DEFAULT_TILE_CACHE_CONFIG, MAPLIBRE_MAX_TILE_CACHE_HARD_CAP, } from "./domain/models/mapConfig";
|
|
22
24
|
// ─── Domain Models: Marker ───────────────────────────────────────────────────
|
|
23
25
|
export { TextPosition } from "./domain/models/marker";
|
|
24
26
|
// ─── Domain Models: Place ────────────────────────────────────────────────────
|
|
@@ -30,10 +32,10 @@ export { AnnounceFormat, TransportationMode, UnitSystem } from "./domain/models/
|
|
|
30
32
|
// ─── Domain Models: Transport ────────────────────────────────────────────────
|
|
31
33
|
export { MVXTransport } from "./domain/models/transport";
|
|
32
34
|
// ─── Utils ───────────────────────────────────────────────────────────────────
|
|
33
|
-
export { loadCustomization } from "./utils/update-css";
|
|
34
|
-
export { OpeningHoursHelper } from "./utils/opening-hours-helper";
|
|
35
35
|
export { isMapVxRequestHostname } from "./utils/mapvxHostname";
|
|
36
|
+
export { OpeningHoursHelper } from "./utils/opening-hours-helper";
|
|
36
37
|
export { injectPreconnects, MAPVX_DEFAULT_PRECONNECT_HOSTS } from "./utils/preconnect";
|
|
38
|
+
export { loadCustomization } from "./utils/update-css";
|
|
37
39
|
/**
|
|
38
40
|
* Function to load default styles
|
|
39
41
|
* @group Utils
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,gFAAgF;AAChF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,gFAAgF;AAChF,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAA;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAExE,gFAAgF;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AAEvE,gFAAgF;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAKtE,gFAAgF;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAarC,gFAAgF;AAChF,OAAO,EAAE,+BAA+B,EAAE,MAAM,gBAAgB,CAAA;AAGhE,gFAAgF;AAChF,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;IAC3C,IAAI,CAAC,GAAG,GAAG,YAAY,CAAA;IACvB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAA,CAAC,wBAAwB;IACnD,IAAI,CAAC,YAAY,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;IAC9C,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;AACjC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routeCacheResponse.d.ts","sourceRoot":"","sources":["../../../src/interfaces/routeCacheResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"routeCacheResponse.d.ts","sourceRoot":"","sources":["../../../src/interfaces/routeCacheResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEpD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE;QAAE,CAAC,eAAe,EAAE,MAAM,GAAG,aAAa,EAAE,CAAA;KAAE,CAAA;IACtD,gBAAgB,EAAE;QAAE,CAAC,eAAe,EAAE,MAAM,GAAG,aAAa,EAAE,CAAA;KAAE,CAAA;CACjE;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/logger/logger.ts"],"names":[],"mappings":"AACA,OAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/logger/logger.ts"],"names":[],"mappings":"AACA,OAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AA8BnD,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAa;IAErC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAE7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAQ;IAEhC,OAAO;WA8BO,WAAW,IAAI,MAAM;IAOnC,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAc5E,QAAQ,CAAC,GAAG,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI;IAMtC,UAAU,CAAC,GAAG,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI;IAMxC,QAAQ,CAAC,GAAG,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI;IAQtC,QAAQ,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE;CAG5B"}
|
package/dist/es/logger/logger.js
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import Countly from "countly-sdk-web";
|
|
2
2
|
import Rollbar from "rollbar";
|
|
3
3
|
import { _rollbarConfig } from "./rollbar";
|
|
4
|
+
// DEBUG, VERSION and COUNTLY_KEY are webpack DefinePlugin constants,
|
|
5
|
+
// substituted only in the UMD bundle. The tsc-built ES/CJS outputs keep them
|
|
6
|
+
// as bare globals, so reading them directly throws ReferenceError in
|
|
7
|
+
// consumers of those builds. The typeof guards make the lookup safe
|
|
8
|
+
// everywhere; the version placeholder is replaced with the package version
|
|
9
|
+
// by scripts/inject-build-defines.js. The Countly key falls back to the
|
|
10
|
+
// MapVX key when none is injected at build time.
|
|
11
|
+
const IS_DEBUG = typeof DEBUG !== "undefined" ? DEBUG : false;
|
|
12
|
+
const SDK_VERSION = typeof VERSION !== "undefined" ? VERSION : "1.2.3-dev.1";
|
|
13
|
+
const COUNTLY_API_KEY = typeof COUNTLY_KEY !== "undefined" && COUNTLY_KEY
|
|
14
|
+
? COUNTLY_KEY
|
|
15
|
+
: "f0c8d3b96d336e857a8628f49dd1baf7d7add0e9";
|
|
4
16
|
const countly = {
|
|
5
|
-
apiKey:
|
|
17
|
+
apiKey: COUNTLY_API_KEY,
|
|
6
18
|
url: "https://countly.lazarillo.app",
|
|
7
19
|
};
|
|
8
|
-
// DEBUG and VERSION are webpack DefinePlugin constants, substituted only in
|
|
9
|
-
// the UMD bundle. The tsc-built ES/CJS outputs keep them as bare globals, so
|
|
10
|
-
// reading them directly throws ReferenceError in consumers of those builds.
|
|
11
|
-
// The typeof guards make the lookup safe everywhere; the version placeholder
|
|
12
|
-
// is replaced with the package version by scripts/inject-build-defines.js.
|
|
13
|
-
const IS_DEBUG = typeof DEBUG !== "undefined" ? DEBUG : false;
|
|
14
|
-
const SDK_VERSION = typeof VERSION !== "undefined" ? VERSION : "1.2.1";
|
|
15
20
|
export class Logger {
|
|
16
21
|
constructor() {
|
|
17
22
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/logger/logger.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,iBAAiB,CAAA;AACrC,OAAO,OAA6B,MAAM,SAAS,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/logger/logger.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,iBAAiB,CAAA;AACrC,OAAO,OAA6B,MAAM,SAAS,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAU1C,qEAAqE;AACrE,6EAA6E;AAC7E,qEAAqE;AACrE,oEAAoE;AACpE,2EAA2E;AAC3E,wEAAwE;AACxE,iDAAiD;AACjD,MAAM,QAAQ,GAAY,OAAO,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;AACtE,MAAM,WAAW,GAAW,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAA;AACxF,MAAM,eAAe,GACnB,OAAO,WAAW,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iB,EAAE,iBAAyC;QACnE,IAAI,QAAQ,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAA;SAC1C;aAAM;YACL,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;gBAClB,WAAW;gBACX;oBACE,GAAG,EAAE,SAAS;oBACd,YAAY,EAAE,iBAAiB;iBAChC;aACF,CAAC,CAAA;SACH;IACH,CAAC;IAED,QAAQ,CAAC,GAAG,IAAmB;QAC7B,IAAI,QAAQ,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA;SACrB;IACH,CAAC;IAED,UAAU,CAAC,GAAG,IAAmB;QAC/B,IAAI,QAAQ,EAAE;YACZ,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;SACtB;IACH,CAAC;IAED,QAAQ,CAAC,GAAG,IAAmB;;QAC7B,IAAI,QAAQ,EAAE;YACZ,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAA;SACvB;aAAM;YACL,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,CAAC,GAAG,IAAI,CAAC,CAAA;SAC7B;IACH,CAAC;IAED,QAAQ,CAAC,GAAG,IAAe;QACzB,IAAI,QAAQ;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAA;IACpC,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollbar.d.ts","sourceRoot":"","sources":["../../../src/logger/rollbar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"rollbar.d.ts","sourceRoot":"","sources":["../../../src/logger/rollbar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAiBzD,eAAO,MAAM,cAAc,EAAE,aAkB5B,CAAA;AAED,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAE9E"}
|