@eyeon/map 2.0.36 → 2.0.41

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.
Files changed (54) hide show
  1. package/dist/assets/MapViewer.css +1 -1
  2. package/dist/assets/index.css +1 -1
  3. package/dist/basemap/GoogleBasemap.d.ts +18 -0
  4. package/dist/basemap/GoogleBasemap.d.ts.map +1 -0
  5. package/dist/basemap/SurroundingsPanel.d.ts +14 -0
  6. package/dist/basemap/SurroundingsPanel.d.ts.map +1 -0
  7. package/dist/basemap/googleMaps.d.ts +98 -0
  8. package/dist/basemap/googleMaps.d.ts.map +1 -0
  9. package/dist/chunks/MapViewer.js +3163 -2536
  10. package/dist/chunks/MapViewer.js.map +1 -1
  11. package/dist/chunks/responsive.js +1400 -1266
  12. package/dist/chunks/responsive.js.map +1 -1
  13. package/dist/chunks/wheelZoom.js +28 -28
  14. package/dist/core/georeference.d.ts +19 -0
  15. package/dist/core/georeference.d.ts.map +1 -0
  16. package/dist/core/hostChrome.d.ts +7 -4
  17. package/dist/core/hostChrome.d.ts.map +1 -1
  18. package/dist/core/index.d.ts +1 -0
  19. package/dist/core/index.d.ts.map +1 -1
  20. package/dist/core/index.js +189 -178
  21. package/dist/core/publish/index.d.ts +2 -0
  22. package/dist/core/publish/index.d.ts.map +1 -1
  23. package/dist/core/types.d.ts +20 -4
  24. package/dist/core/types.d.ts.map +1 -1
  25. package/dist/core/websiteModal.d.ts +47 -1
  26. package/dist/core/websiteModal.d.ts.map +1 -1
  27. package/dist/editor/MapEditor.d.ts +7 -1
  28. package/dist/editor/MapEditor.d.ts.map +1 -1
  29. package/dist/editor/draftOps.d.ts +2 -1
  30. package/dist/editor/draftOps.d.ts.map +1 -1
  31. package/dist/editor/index.css +695 -152
  32. package/dist/editor/index.js +5083 -4675
  33. package/dist/editor/index.js.map +1 -1
  34. package/dist/editor/panels/LeftRail.d.ts +5 -2
  35. package/dist/editor/panels/LeftRail.d.ts.map +1 -1
  36. package/dist/editor/panels/PreviewOverlay.d.ts +8 -2
  37. package/dist/editor/panels/PreviewOverlay.d.ts.map +1 -1
  38. package/dist/editor/previewDocument.d.ts.map +1 -1
  39. package/dist/viewer/MapViewer.d.ts +13 -0
  40. package/dist/viewer/MapViewer.d.ts.map +1 -1
  41. package/dist/viewer/camera.d.ts +21 -0
  42. package/dist/viewer/camera.d.ts.map +1 -1
  43. package/dist/viewer/components/CameraRig.d.ts +8 -1
  44. package/dist/viewer/components/CameraRig.d.ts.map +1 -1
  45. package/dist/viewer/components/MapScene.d.ts +6 -1
  46. package/dist/viewer/components/MapScene.d.ts.map +1 -1
  47. package/dist/viewer/index.css +541 -151
  48. package/dist/viewer/index.js +1 -1
  49. package/dist/viewer/ui/MapControls.d.ts.map +1 -1
  50. package/dist/viewer/ui/WebsiteSidebar.d.ts +35 -0
  51. package/dist/viewer/ui/WebsiteSidebar.d.ts.map +1 -0
  52. package/package.json +1 -1
  53. package/dist/viewer/ui/WebsiteInfoModal.d.ts +0 -11
  54. package/dist/viewer/ui/WebsiteInfoModal.d.ts.map +0 -1
@@ -1,10 +1,10 @@
1
- import { bG as S, b8 as w, b6 as M, b1 as L, ba as _, bV as O, aT as T, B as $, ci as F, d as y, bs as b, at as k, bL as x, bJ as N, k as W } from "./responsive.js";
2
- function U(e, d, r) {
1
+ import { bI as S, b9 as w, b7 as M, b2 as L, bb as _, bX as N, aT as O, B as T, cl as $, d as y, bt as v, at as k, bN as x, bL as F, k as W } from "./responsive.js";
2
+ function V(e, d, r) {
3
3
  var i, o, u, a;
4
4
  const c = S(e), t = [];
5
5
  for (const n of c.elements) {
6
6
  if (!n.d || n.interactive || d != null && d.has(n.id) || /^parking[-_]?lines?(?:[-_]|$)/i.test(n.id) || n.id.toLowerCase().startsWith("route-path") || w(n.id) || M(n.id) || L(n.id) || _(n.id)) continue;
7
- const f = O(n.id, r), I = (f == null ? void 0 : f.fill) ?? (T(n.id) ? $(r) : (i = n.style) == null ? void 0 : i.fill), l = (f == null ? void 0 : f.stroke) ?? ((o = n.style) == null ? void 0 : o.stroke), m = (f == null ? void 0 : f.strokeWidth) ?? ((u = n.style) == null ? void 0 : u.strokeWidth);
7
+ const f = N(n.id, r), I = (f == null ? void 0 : f.fill) ?? (O(n.id) ? T(r) : (i = n.style) == null ? void 0 : i.fill), l = (f == null ? void 0 : f.stroke) ?? ((o = n.style) == null ? void 0 : o.stroke), m = (f == null ? void 0 : f.strokeWidth) ?? ((u = n.style) == null ? void 0 : u.strokeWidth);
8
8
  t.push({
9
9
  id: n.id,
10
10
  d: n.d,
@@ -14,7 +14,7 @@ function U(e, d, r) {
14
14
  opacity: (a = n.style) == null ? void 0 : a.opacity
15
15
  });
16
16
  }
17
- return F(t, (n) => n.id);
17
+ return $(t, (n) => n.id);
18
18
  }
19
19
  function P(e, d, r, c = y) {
20
20
  const t = e.filter((n) => r.includes(n.id));
@@ -64,10 +64,10 @@ function R(e, d, r = y) {
64
64
  }
65
65
  return { anchors: o, edges: a };
66
66
  }
67
- function Y(e, d, r, c = y) {
67
+ function X(e, d, r, c = y) {
68
68
  let t = null;
69
69
  for (const o of d) {
70
- const u = b(e, o);
70
+ const u = v(e, o);
71
71
  u && (!t || u.distance < t.distance) && (t = { point: u.point, distance: u.distance });
72
72
  }
73
73
  if (!t) return null;
@@ -83,7 +83,7 @@ function Y(e, d, r, c = y) {
83
83
  }
84
84
  };
85
85
  }
86
- function X(e, d, r, c) {
86
+ function Y(e, d, r, c) {
87
87
  if (r.length === 0) return null;
88
88
  const t = r.flat();
89
89
  if (t.length === 0) return null;
@@ -128,13 +128,13 @@ function q(e, d, r = 20) {
128
128
  for (const [p, g] of h) {
129
129
  const A = `${p},${g}`;
130
130
  if (!f.has(A)) continue;
131
- const v = s.key < A ? `${s.key}|${A}` : `${A}|${s.key}`;
132
- m.has(v) || (m.add(v), l.push({ fromTempId: s.key, toTempId: A }));
131
+ const b = s.key < A ? `${s.key}|${A}` : `${A}|${s.key}`;
132
+ m.has(b) || (m.add(b), l.push({ fromTempId: s.key, toTempId: A }));
133
133
  }
134
134
  }
135
135
  return { anchors: I, edges: l };
136
136
  }
137
- function J(e, d, r, c, t = y) {
137
+ function Z(e, d, r, c, t = y) {
138
138
  const i = [], o = [];
139
139
  let u = c;
140
140
  const a = (f, I) => {
@@ -154,7 +154,7 @@ function J(e, d, r, c, t = y) {
154
154
  }), m;
155
155
  };
156
156
  for (const f of e) {
157
- const I = N(f);
157
+ const I = F(f);
158
158
  for (const l of I)
159
159
  for (let m = 0; m < l.length - 1; m++) {
160
160
  const s = a(l[m].x, l[m].y), h = a(l[m + 1].x, l[m + 1].y);
@@ -181,35 +181,35 @@ function C(e) {
181
181
  function K(e) {
182
182
  return e === "entrance" ? "entrance_link" : "unit_link";
183
183
  }
184
- function G(e, d, r) {
184
+ function H(e, d, r) {
185
185
  if (x(e, d)) return "inside";
186
186
  for (const c of d) {
187
187
  if (c.length < 2) continue;
188
- const t = [...c, c[0]], i = b(e, t);
188
+ const t = [...c, c[0]], i = v(e, t);
189
189
  if (i && i.distance <= r) return "near";
190
190
  }
191
191
  return null;
192
192
  }
193
- function H(e, d, r) {
193
+ function j(e, d, r) {
194
194
  let c = null;
195
195
  for (const t of d) {
196
196
  if (!W.includes(t.kind)) continue;
197
197
  const i = t.geometry.polygons ?? [];
198
198
  if (i.length === 0) continue;
199
- const o = G(e, i, r);
199
+ const o = H(e, i, r);
200
200
  if (o === "inside") return t;
201
201
  o === "near" && c == null && (c = t);
202
202
  }
203
203
  return c;
204
204
  }
205
- function Z(e, d, r, c = y * 3) {
205
+ function J(e, d, r, c = y * 3) {
206
206
  const t = /* @__PURE__ */ new Map();
207
207
  for (const o of d)
208
208
  t.set(o.fromAnchorId, (t.get(o.fromAnchorId) ?? 0) + 1), t.set(o.toAnchorId, (t.get(o.toAnchorId) ?? 0) + 1);
209
209
  let i = 0;
210
210
  for (const o of e) {
211
211
  if (o.shapeId != null) continue;
212
- const u = H(o, r, c);
212
+ const u = j(o, r, c);
213
213
  if (!u || (o.shapeId = u.id, o.kind = C(u.kind), i += 1, (t.get(o.id) ?? 0) > 1)) continue;
214
214
  const a = K(o.kind);
215
215
  for (const n of d)
@@ -217,29 +217,29 @@ function Z(e, d, r, c = y * 3) {
217
217
  }
218
218
  return i;
219
219
  }
220
- const V = 0.95, E = 1;
221
- function j(e = E) {
222
- return Math.pow(V, e);
220
+ const B = 0.95, E = 1;
221
+ function G(e = E) {
222
+ return Math.pow(B, e);
223
223
  }
224
224
  function Q(e, d, r) {
225
225
  if (d === 0) return e;
226
- const c = j((r == null ? void 0 : r.zoomSpeed) ?? E), t = d < 0 ? e / c : e * c, i = (r == null ? void 0 : r.min) ?? Number.NEGATIVE_INFINITY, o = (r == null ? void 0 : r.max) ?? Number.POSITIVE_INFINITY;
226
+ const c = G((r == null ? void 0 : r.zoomSpeed) ?? E), t = d < 0 ? e / c : e * c, i = (r == null ? void 0 : r.min) ?? Number.NEGATIVE_INFINITY, o = (r == null ? void 0 : r.max) ?? Number.POSITIVE_INFINITY;
227
227
  return Math.min(o, Math.max(i, t));
228
228
  }
229
229
  export {
230
- V as W,
230
+ B as W,
231
231
  E as a,
232
- Z as b,
233
- Y as c,
232
+ J as b,
233
+ X as c,
234
234
  q as d,
235
235
  R as e,
236
236
  D as f,
237
- j as g,
238
- J as i,
237
+ G as g,
238
+ Z as i,
239
239
  Q as n,
240
- U as o,
240
+ V as o,
241
241
  C as r,
242
- X as u,
242
+ Y as u,
243
243
  P as w
244
244
  };
245
245
  //# sourceMappingURL=wheelZoom.js.map
@@ -0,0 +1,19 @@
1
+ /** Saved Google map camera. The API key is never stored here. */
2
+ export interface MapGeoreference {
3
+ lat: number;
4
+ lng: number;
5
+ zoom: number;
6
+ heading: number;
7
+ /**
8
+ * Building camera when this Google view was aligned.
9
+ * Other maps use it so pan and zoom stay locked to the building.
10
+ */
11
+ anchorZoom?: number;
12
+ anchorX?: number;
13
+ anchorY?: number;
14
+ }
15
+ export declare function parseMapGeoreference(value: unknown): MapGeoreference | null;
16
+ export declare function sameMapGeoreference(a: MapGeoreference, b: MapGeoreference): boolean;
17
+ /** Opening Surroundings on the default country view is not a saved alignment. */
18
+ export declare function isDefaultMapGeoreference(value: MapGeoreference): boolean;
19
+ //# sourceMappingURL=georeference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"georeference.d.ts","sourceRoot":"","sources":["../../src/core/georeference.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AASD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CA6B3E;AAuBD,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,eAAe,EAClB,CAAC,EAAE,eAAe,GACjB,OAAO,CAET;AAED,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAExE"}
@@ -2,9 +2,10 @@ import { MapHost, MapViewerHost } from './types';
2
2
  /** Which library surface a host should mount. `PORTAL` is the staff editor. */
3
3
  export declare function mapSurface(host: MapHost): 'editor' | 'viewer';
4
4
  /**
5
- * Viewer chrome. Public website (`WEBSITE` / v1 WP_SITE) is floors + zoom/
6
- * reset plus the store/amenity Map IT modal and hover name pop-outs — no
7
- * search or amenity strip. DISPLAY_APP adds kiosk origin and hover names.
5
+ * Viewer chrome. Public website (`WEBSITE`) is floors + zoom/reset, hover
6
+ * names, and the left search / amenity / Map IT sidebar. DISPLAY_APP adds
7
+ * kiosk origin and hover names. `search` / `amenities` are the older
8
+ * directory strip (`RuntimeChrome`), which the website sidebar replaces.
8
9
  */
9
10
  export interface ViewerChrome {
10
11
  search: boolean;
@@ -13,8 +14,10 @@ export interface ViewerChrome {
13
14
  zoomReset: boolean;
14
15
  kioskOrigin: boolean;
15
16
  fetchDraft: boolean;
16
- /** v1 WEBSITE RetailerInfoModal — click a store/amenity, then Map IT. */
17
+ /** v1 WEBSITE RetailerInfoModal. The website sidebar replaces this. */
17
18
  storeModal: boolean;
19
+ /** Left search, amenity grid, destination card, and route endpoints. */
20
+ sidebar: boolean;
18
21
  /** Store / amenity name pop-out on pointer hover (v1 storeName tooltip). */
19
22
  hoverTooltip: boolean;
20
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hostChrome.d.ts","sourceRoot":"","sources":["../../src/core/hostChrome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEtD,+EAA+E;AAC/E,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAE7D;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,yEAAyE;IACzE,UAAU,EAAE,OAAO,CAAC;IACpB,4EAA4E;IAC5E,YAAY,EAAE,OAAO,CAAC;CACvB;AA0BD,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,YAAY,CAE9D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAElE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,aAAa,CAEpE;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO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1
1
  export * from './types';
2
+ export * from './georeference';
2
3
  export * from './entranceIcon';
3
4
  export * from './color';
4
5
  export * from './labelAlign';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,e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