@eyeon/map 2.0.2 → 2.0.4

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 (183) hide show
  1. package/dist/assets/MapViewer.css +1 -1
  2. package/dist/assets/index.css +1 -1
  3. package/dist/chunks/MapViewer.js +2656 -1290
  4. package/dist/chunks/MapViewer.js.map +1 -1
  5. package/dist/chunks/stacking.js +1496 -873
  6. package/dist/chunks/stacking.js.map +1 -1
  7. package/dist/chunks/wheelZoom.js +259 -0
  8. package/dist/chunks/wheelZoom.js.map +1 -0
  9. package/dist/core/assignment.d.ts +97 -0
  10. package/dist/core/assignment.d.ts.map +1 -0
  11. package/dist/core/color.d.ts +5 -0
  12. package/dist/core/color.d.ts.map +1 -0
  13. package/dist/core/entranceIcon.d.ts +12 -0
  14. package/dist/core/entranceIcon.d.ts.map +1 -0
  15. package/dist/core/filletPolygon.d.ts +10 -0
  16. package/dist/core/filletPolygon.d.ts.map +1 -0
  17. package/dist/core/hostChrome.d.ts +2 -4
  18. package/dist/core/hostChrome.d.ts.map +1 -1
  19. package/dist/core/import/index.d.ts +4 -0
  20. package/dist/core/import/index.d.ts.map +1 -1
  21. package/dist/core/index.d.ts +9 -0
  22. package/dist/core/index.d.ts.map +1 -1
  23. package/dist/core/index.js +160 -219
  24. package/dist/core/index.js.map +1 -1
  25. package/dist/core/labelAlign.d.ts +7 -0
  26. package/dist/core/labelAlign.d.ts.map +1 -0
  27. package/dist/core/layerStyles.d.ts +54 -5
  28. package/dist/core/layerStyles.d.ts.map +1 -1
  29. package/dist/core/mediaUrl.d.ts +3 -0
  30. package/dist/core/mediaUrl.d.ts.map +1 -0
  31. package/dist/core/outdoorDecoration.d.ts +16 -0
  32. package/dist/core/outdoorDecoration.d.ts.map +1 -0
  33. package/dist/core/publish/index.d.ts +6 -4
  34. package/dist/core/publish/index.d.ts.map +1 -1
  35. package/dist/core/routing/graph-tools.d.ts +23 -1
  36. package/dist/core/routing/graph-tools.d.ts.map +1 -1
  37. package/dist/core/routing/pathfinding.d.ts.map +1 -1
  38. package/dist/core/stacking.d.ts +50 -3
  39. package/dist/core/stacking.d.ts.map +1 -1
  40. package/dist/core/types.d.ts +34 -2
  41. package/dist/core/types.d.ts.map +1 -1
  42. package/dist/core/voids.d.ts +41 -0
  43. package/dist/core/voids.d.ts.map +1 -0
  44. package/dist/core/wheelZoom.d.ts +30 -0
  45. package/dist/core/wheelZoom.d.ts.map +1 -0
  46. package/dist/editor/FieldResetButton.d.ts +7 -0
  47. package/dist/editor/FieldResetButton.d.ts.map +1 -0
  48. package/dist/editor/MapEditor.d.ts +13 -3
  49. package/dist/editor/MapEditor.d.ts.map +1 -1
  50. package/dist/editor/canvas/EditorCanvas.d.ts +49 -7
  51. package/dist/editor/canvas/EditorCanvas.d.ts.map +1 -1
  52. package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts +8 -0
  53. package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts.map +1 -0
  54. package/dist/editor/canvas/coords.d.ts +56 -3
  55. package/dist/editor/canvas/coords.d.ts.map +1 -1
  56. package/dist/editor/canvas/editorFill.d.ts +12 -0
  57. package/dist/editor/canvas/editorFill.d.ts.map +1 -0
  58. package/dist/editor/canvas/editorHover.d.ts +18 -0
  59. package/dist/editor/canvas/editorHover.d.ts.map +1 -0
  60. package/dist/editor/canvas/underlayHint.d.ts +13 -0
  61. package/dist/editor/canvas/underlayHint.d.ts.map +1 -0
  62. package/dist/editor/connectorAssignments.d.ts +125 -0
  63. package/dist/editor/connectorAssignments.d.ts.map +1 -0
  64. package/dist/editor/draftOps.d.ts +12 -1
  65. package/dist/editor/draftOps.d.ts.map +1 -1
  66. package/dist/editor/editorSectionReturn.d.ts +12 -0
  67. package/dist/editor/editorSectionReturn.d.ts.map +1 -0
  68. package/dist/editor/ellipseDraw.d.ts +12 -0
  69. package/dist/editor/ellipseDraw.d.ts.map +1 -0
  70. package/dist/editor/entranceIcon.d.ts +15 -0
  71. package/dist/editor/entranceIcon.d.ts.map +1 -0
  72. package/dist/editor/floorsListReturn.d.ts +5 -0
  73. package/dist/editor/floorsListReturn.d.ts.map +1 -0
  74. package/dist/editor/geometryEdit.d.ts +23 -3
  75. package/dist/editor/geometryEdit.d.ts.map +1 -1
  76. package/dist/editor/hexColor.d.ts +6 -0
  77. package/dist/editor/hexColor.d.ts.map +1 -0
  78. package/dist/editor/history.d.ts +31 -0
  79. package/dist/editor/history.d.ts.map +1 -0
  80. package/dist/editor/index.css +1038 -68
  81. package/dist/editor/index.d.ts +6 -4
  82. package/dist/editor/index.d.ts.map +1 -1
  83. package/dist/editor/index.js +8744 -2136
  84. package/dist/editor/index.js.map +1 -1
  85. package/dist/editor/labelText.d.ts +25 -0
  86. package/dist/editor/labelText.d.ts.map +1 -0
  87. package/dist/editor/labels.d.ts +8 -0
  88. package/dist/editor/labels.d.ts.map +1 -1
  89. package/dist/editor/panels/AssignForm.d.ts +17 -0
  90. package/dist/editor/panels/AssignForm.d.ts.map +1 -0
  91. package/dist/editor/panels/AssignmentStyleFields.d.ts +14 -0
  92. package/dist/editor/panels/AssignmentStyleFields.d.ts.map +1 -0
  93. package/dist/editor/panels/BulkAssignForm.d.ts +11 -0
  94. package/dist/editor/panels/BulkAssignForm.d.ts.map +1 -0
  95. package/dist/editor/panels/CatalogKioskForm.d.ts +18 -0
  96. package/dist/editor/panels/CatalogKioskForm.d.ts.map +1 -0
  97. package/dist/editor/panels/ConnectorAssign.d.ts +16 -0
  98. package/dist/editor/panels/ConnectorAssign.d.ts.map +1 -0
  99. package/dist/editor/panels/CopyToLevelButton.d.ts +10 -0
  100. package/dist/editor/panels/CopyToLevelButton.d.ts.map +1 -0
  101. package/dist/editor/panels/EntranceIconForm.d.ts +11 -0
  102. package/dist/editor/panels/EntranceIconForm.d.ts.map +1 -0
  103. package/dist/editor/panels/FloorsPanel.d.ts +4 -0
  104. package/dist/editor/panels/FloorsPanel.d.ts.map +1 -1
  105. package/dist/editor/panels/ImportReviewPanel.d.ts.map +1 -1
  106. package/dist/editor/panels/Inspector.d.ts +24 -2
  107. package/dist/editor/panels/Inspector.d.ts.map +1 -1
  108. package/dist/editor/panels/LeftRail.d.ts +24 -11
  109. package/dist/editor/panels/LeftRail.d.ts.map +1 -1
  110. package/dist/editor/panels/PreviewOverlay.d.ts +9 -3
  111. package/dist/editor/panels/PreviewOverlay.d.ts.map +1 -1
  112. package/dist/editor/panels/TextLabelForm.d.ts +11 -0
  113. package/dist/editor/panels/TextLabelForm.d.ts.map +1 -0
  114. package/dist/editor/panels/formRows.d.ts +41 -0
  115. package/dist/editor/panels/formRows.d.ts.map +1 -0
  116. package/dist/editor/pathRings.d.ts +79 -0
  117. package/dist/editor/pathRings.d.ts.map +1 -0
  118. package/dist/editor/portalSurface.d.ts +37 -3
  119. package/dist/editor/portalSurface.d.ts.map +1 -1
  120. package/dist/editor/previewDocument.d.ts +2 -1
  121. package/dist/editor/previewDocument.d.ts.map +1 -1
  122. package/dist/editor/railAssignments.d.ts +29 -0
  123. package/dist/editor/railAssignments.d.ts.map +1 -0
  124. package/dist/editor/railKiosks.d.ts +27 -0
  125. package/dist/editor/railKiosks.d.ts.map +1 -0
  126. package/dist/editor/railListCopy.d.ts +31 -0
  127. package/dist/editor/railListCopy.d.ts.map +1 -0
  128. package/dist/editor/routeStubs.d.ts +103 -0
  129. package/dist/editor/routeStubs.d.ts.map +1 -0
  130. package/dist/editor/shapeCopy.d.ts +40 -0
  131. package/dist/editor/shapeCopy.d.ts.map +1 -0
  132. package/dist/editor/shapeSelection.d.ts +6 -0
  133. package/dist/editor/shapeSelection.d.ts.map +1 -0
  134. package/dist/editor/snapPoint.d.ts +5 -0
  135. package/dist/editor/snapPoint.d.ts.map +1 -0
  136. package/dist/editor/splitJoin.d.ts +78 -0
  137. package/dist/editor/splitJoin.d.ts.map +1 -0
  138. package/dist/editor/tools.d.ts +46 -7
  139. package/dist/editor/tools.d.ts.map +1 -1
  140. package/dist/fonts/assets.d.ts +4 -0
  141. package/dist/fonts/mapFont.d.ts +5 -0
  142. package/dist/fonts/mapFont.d.ts.map +1 -0
  143. package/dist/fonts/mapFontUrl.d.ts +8 -0
  144. package/dist/fonts/mapFontUrl.d.ts.map +1 -0
  145. package/dist/specialIcons.d.ts +39 -0
  146. package/dist/specialIcons.d.ts.map +1 -0
  147. package/dist/test-maps/shops-at-south-town/BASE - Shops At South Town.ai +6326 -6407
  148. package/dist/test-maps/shops-at-south-town/LF - Shops At South Town.ai +458 -484
  149. package/dist/test-maps/shops-at-south-town/SVG/BASE - Shops At South Town.svg +6 -6
  150. package/dist/test-maps/shops-at-south-town/SVG/LF - Shops At South Town.svg +52 -52
  151. package/dist/test-maps/shops-at-south-town/SVG/UF - Shops At South Town.svg +74 -74
  152. package/dist/test-maps/shops-at-south-town/UF - Shops At South Town.ai +341 -436
  153. package/dist/ui/ModernSelect.d.ts +14 -0
  154. package/dist/ui/ModernSelect.d.ts.map +1 -0
  155. package/dist/ui/selectSearch.d.ts +12 -0
  156. package/dist/ui/selectSearch.d.ts.map +1 -0
  157. package/dist/viewer/MapViewer.d.ts +14 -1
  158. package/dist/viewer/MapViewer.d.ts.map +1 -1
  159. package/dist/viewer/camera.d.ts +85 -1
  160. package/dist/viewer/camera.d.ts.map +1 -1
  161. package/dist/viewer/components/CameraRig.d.ts +18 -1
  162. package/dist/viewer/components/CameraRig.d.ts.map +1 -1
  163. package/dist/viewer/components/LevelMeshes.d.ts +15 -4
  164. package/dist/viewer/components/LevelMeshes.d.ts.map +1 -1
  165. package/dist/viewer/components/MapScene.d.ts +10 -4
  166. package/dist/viewer/components/MapScene.d.ts.map +1 -1
  167. package/dist/viewer/components/OpeningWell.d.ts +7 -0
  168. package/dist/viewer/components/OpeningWell.d.ts.map +1 -0
  169. package/dist/viewer/components/RouteLine.d.ts.map +1 -1
  170. package/dist/viewer/components/SvgVectorLayer.d.ts +5 -3
  171. package/dist/viewer/components/SvgVectorLayer.d.ts.map +1 -1
  172. package/dist/viewer/components/openingGeometry.d.ts +7 -0
  173. package/dist/viewer/components/openingGeometry.d.ts.map +1 -0
  174. package/dist/viewer/index.css +251 -9
  175. package/dist/viewer/index.d.ts +1 -1
  176. package/dist/viewer/index.d.ts.map +1 -1
  177. package/dist/viewer/index.js +5 -5
  178. package/dist/viewer/pointer.d.ts +26 -0
  179. package/dist/viewer/pointer.d.ts.map +1 -0
  180. package/dist/viewer/ui/MapControls.d.ts +11 -3
  181. package/dist/viewer/ui/MapControls.d.ts.map +1 -1
  182. package/dist/viewer/ui/RuntimeChrome.d.ts.map +1 -1
  183. package/package.json +4 -2
@@ -1,223 +1,164 @@
1
- import { D as g, n as L, d as A, p as S, a as T } from "../chunks/stacking.js";
2
- import { b as F, F as O, I as R, c as N, e as B, f as $, S as G, g as Y, h as H, j as V, k as j, l as K, o as U, q as W, r as X, s as z, t as Q, u as q, w as J, x as Z, y as ee, z as ne, A as te, B as oe, C as se, E as ae, G as ie, H as re, J as de, K as ce, L as le, M as fe, N as ue, O as he, P as pe, Q as me, R as Ie, i as ye, T as xe, U as ge, V as Ae, m as Se, W as ve, X as Le, Y as Te, Z as we, _ as Ee, $ as be, a0 as Me, a1 as Pe, a2 as ke, a3 as De, a4 as _e, a5 as Ce, a6 as Fe, a7 as Oe, a8 as Re, a9 as Ne, aa as Be, ab as $e, ac as Ge, ad as Ye, v as He, ae as Ve } from "../chunks/stacking.js";
3
- function E(a, f, i, r = g) {
4
- const e = a.filter((n) => i.includes(n.id));
5
- if (e.length < 2) return null;
6
- const t = e.reduce((n, c) => c.id < n.id ? c : n), o = [];
7
- for (const n of e)
8
- n.id !== t.id && A(n, t) <= r && o.push(n.id);
9
- if (o.length === 0) return null;
10
- const d = new Set(o), h = [];
11
- for (const n of f) {
12
- let c = !1;
13
- if (d.has(n.fromAnchorId) && (n.fromAnchorId = t.id, c = !0), d.has(n.toAnchorId) && (n.toAnchorId = t.id, c = !0), n.fromAnchorId === n.toAnchorId) {
14
- h.push(n.id);
15
- continue;
16
- }
17
- c && h.push(n.id);
18
- }
19
- return {
20
- survivingAnchorId: t.id,
21
- removedAnchorIds: o,
22
- rewiredEdgeIds: h
23
- };
24
- }
25
- function b(a, f = g) {
26
- const i = [], r = /* @__PURE__ */ new Set();
27
- for (let e = 0; e < a.length; e++) {
28
- if (r.has(a[e].id)) continue;
29
- const t = [a[e].id];
30
- for (let o = e + 1; o < a.length; o++)
31
- r.has(a[o].id) || a[e].levelId === a[o].levelId && A(a[e], a[o]) <= f && (t.push(a[o].id), r.add(a[o].id));
32
- t.length > 1 && (r.add(a[e].id), i.push(t));
33
- }
34
- return i;
35
- }
36
- function M(a, f, i, r = g) {
37
- let e = null;
38
- for (const o of f) {
39
- const d = L(a, o);
40
- d && (!e || d.distance < e.distance) && (e = { point: d.point, distance: d.distance });
41
- }
42
- if (!e) return null;
43
- const t = i.find(
44
- (o) => o.levelId === a.levelId && A(o, e.point) <= r
45
- );
46
- return {
47
- unitAnchorId: a.id,
48
- junctionAnchor: t ? { x: t.x, y: t.y, existingId: t.id } : { x: e.point.x, y: e.point.y },
49
- edge: {
50
- fromAnchorId: a.id,
51
- toAnchorId: t == null ? void 0 : t.id
52
- }
53
- };
54
- }
55
- function P(a, f, i, r) {
56
- if (i.length === 0) return null;
57
- const e = i.flat();
58
- if (e.length === 0) return null;
59
- let t = 0, o = 0;
60
- for (const n of e)
61
- t += n.x, o += n.y;
62
- const d = { x: t / e.length, y: o / e.length }, h = S(d, i) ? d : e[0];
63
- return {
64
- id: r,
65
- levelId: f,
66
- shapeId: a,
67
- kind: "unit",
68
- x: h.x,
69
- y: h.y,
70
- connectorId: null
71
- };
72
- }
73
- function k(a, f, i = 20) {
74
- if (a.length === 0)
75
- return { anchors: [], edges: [] };
76
- let r = 1 / 0, e = 1 / 0, t = -1 / 0, o = -1 / 0;
77
- for (const s of a)
78
- for (const l of s)
79
- r = Math.min(r, l.x), e = Math.min(e, l.y), t = Math.max(t, l.x), o = Math.max(o, l.y);
80
- const d = Math.max(1, Math.ceil((t - r) / i)), h = Math.max(1, Math.ceil((o - e) / i)), n = [];
81
- for (let s = 0; s < h; s++)
82
- for (let l = 0; l < d; l++) {
83
- const I = r + (l + 0.5) * i, x = e + (s + 0.5) * i, y = { x: I, y: x };
84
- S(y, a) && (f.length > 0 && S(y, f) || n.push({ key: `${l},${s}`, x: I, y: x, col: l, row: s }));
85
- }
86
- const c = new Map(n.map((s) => [s.key, s])), p = n.map((s) => ({
87
- tempId: s.key,
88
- x: s.x,
89
- y: s.y,
90
- kind: "junction"
91
- })), u = [], m = /* @__PURE__ */ new Set();
92
- for (const s of n) {
93
- const l = [
94
- [s.col + 1, s.row],
95
- [s.col, s.row + 1]
96
- ];
97
- for (const [I, x] of l) {
98
- const y = `${I},${x}`;
99
- if (!c.has(y)) continue;
100
- const v = s.key < y ? `${s.key}|${y}` : `${y}|${s.key}`;
101
- m.has(v) || (m.add(v), u.push({ fromTempId: s.key, toTempId: y }));
102
- }
103
- }
104
- return { anchors: p, edges: u };
105
- }
106
- function D(a, f, i, r, e = g) {
107
- const t = [], o = [];
108
- let d = r;
109
- const h = (n, c) => {
110
- const p = t.find(
111
- (m) => A(m, { x: n, y: c }) <= e
112
- );
113
- if (p) return p.id;
114
- const u = d++;
115
- return t.push({
116
- id: u,
117
- levelId: f,
118
- shapeId: null,
119
- kind: "junction",
120
- x: n,
121
- y: c,
122
- connectorId: null
123
- }), u;
124
- };
125
- for (const n of a) {
126
- const c = T(n);
127
- for (const p of c)
128
- for (let u = 0; u < p.length - 1; u++) {
129
- const m = h(p[u].x, p[u].y), s = h(p[u + 1].x, p[u + 1].y);
130
- m === s || o.some(
131
- (I) => I.fromAnchorId === m && I.toAnchorId === s || I.fromAnchorId === s && I.toAnchorId === m
132
- ) || o.push({
133
- id: d++,
134
- mapId: i,
135
- fromAnchorId: m,
136
- toAnchorId: s,
137
- weight: null,
138
- directed: !1,
139
- accessible: !0,
140
- kind: "walk"
141
- });
142
- }
143
- }
144
- return { anchors: t, edges: o, nextId: d };
145
- }
1
+ import { A as e, C as o, D as r, a as i, b as n, c as t, d as l, E as S, F as p, I as m, e as d, f as E, g as A, L, M as g, h as b, O as c, i as I, j as _, R as u, S as T, k as y, l as h, m as O, T as N, W as v, n as R, o as P, p as D, q as F, r as C, s as f, t as B, u as x, v as G, w, x as M, y as K, z as H, B as V, G as Y, H as k, J as U, K as z, N as W, P as Z, Q as j, U as q, V as X, X as Q, Y as J, Z as $, _ as aa, $ as sa, a0 as ea, a1 as oa, a2 as ra, a3 as ia, a4 as na, a5 as ta, a6 as la, a7 as Sa, a8 as pa, a9 as ma, aa as da, ab as Ea, ac as Aa, ad as La, ae as ga, af as ba, ag as ca, ah as Ia, ai as _a, aj as ua, ak as Ta, al as ya, am as ha, an as Oa, ao as Na, ap as va, aq as Ra, ar as Pa, as as Da, at as Fa, au as Ca, av as fa, aw as Ba, ax as xa, ay as Ga, az as wa, aA as Ma, aB as Ka, aC as Ha, aD as Va, aE as Ya, aF as ka, aG as Ua, aH as za, aI as Wa, aJ as Za, aK as ja, aL as qa, aM as Xa, aN as Qa, aO as Ja, aP as $a, aQ as as, aR as ss, aS as es, aT as os, aU as rs, aV as is, aW as ns, aX as ts, aY as ls, aZ as Ss, a_ as ps, a$ as ms, b0 as ds, b1 as Es, b2 as As, b3 as Ls, b4 as gs, b5 as bs, b6 as cs, b7 as Is, b8 as _s, b9 as us, ba as Ts, bb as ys, bc as hs, bd as Os, be as Ns, bf as vs, bg as Rs, bh as Ps, bi as Ds, bj as Fs, bk as Cs, bl as fs, bm as Bs, bn as xs, bo as Gs, bp as ws, bq as Ms } from "../chunks/stacking.js";
2
+ import { W as Hs, a as Vs, b as Ys, c as ks, d as Us, e as zs, f as Ws, i as Zs, n as js, o as qs, r as Xs, u as Qs, w as Js, g as $s } from "../chunks/wheelZoom.js";
146
3
  export {
147
- F as DEFAULT_THEME,
148
- g as DEFAULT_WELD_TOLERANCE,
149
- O as FLOOR_CHANGE_PENALTY,
150
- R as IDENTITY_MATRIX,
151
- N as IMPORT_DRIFT_THRESHOLD,
152
- B as IMPORT_PERSISTED_KINDS,
153
- $ as INTERACTIVE_SHAPE_KINDS,
154
- G as STATIC_LAYER_STYLES,
155
- Y as angleFromWall,
156
- H as applyMatrix,
157
- V as approximateArc,
158
- j as approximateCubic,
159
- K as approximateQuadratic,
160
- M as autoConnectUnitAnchor,
4
+ e as ASSIGNMENT_LAYER_TYPES,
5
+ o as CONNECTOR_ICON_SIZE,
6
+ r as DEFAULT_ASSIGNMENT_SIZE,
7
+ i as DEFAULT_ENTRANCE_SIZE,
8
+ n as DEFAULT_LABEL_ALIGN,
9
+ t as DEFAULT_THEME,
10
+ l as DEFAULT_WELD_TOLERANCE,
11
+ S as ENTRANCE_ICON_ID,
12
+ p as FLOOR_CHANGE_PENALTY,
13
+ m as IDENTITY_MATRIX,
14
+ d as IMPORT_DRIFT_THRESHOLD,
15
+ E as IMPORT_PERSISTED_KINDS,
16
+ A as INTERACTIVE_SHAPE_KINDS,
17
+ L as LABEL_ALIGNS,
18
+ g as MAP_NO_FLOORS_MESSAGE,
19
+ b as MIN_ENTRANCE_SIZE,
20
+ c as OPENING_VOID_FILL,
21
+ I as OPENING_VOID_MARK,
22
+ _ as OPENING_VOID_STROKE,
23
+ u as RETAIL_LOGO_RENDER_SCALE,
24
+ T as SLAB_SHAPE_KINDS,
25
+ y as STATIC_LAYER_KEYS,
26
+ h as STATIC_LAYER_STYLES,
27
+ O as STATIC_LAYER_THEME_KEYS,
28
+ N as TRANSPARENT_COLOR,
29
+ v as WALKING_PATH_COLOR,
30
+ Hs as WHEEL_ZOOM_BASE,
31
+ Vs as WHEEL_ZOOM_SPEED,
32
+ R as amenityAssignedName,
33
+ P as angleFromWall,
34
+ D as applyBulkAssignPatch,
35
+ F as applyLevelTransform,
36
+ C as applyMatrix,
37
+ f as approximateArc,
38
+ B as approximateCubic,
39
+ x as approximateQuadratic,
40
+ G as assignNumberFromDraft,
41
+ w as assignmentDisplayText,
42
+ M as assignmentHasTarget,
43
+ K as assignmentOverlayImageUrl,
44
+ H as assignmentOverlayRenderSize,
45
+ V as assignmentOverlayVisible,
46
+ Y as assignmentSpecialIconId,
47
+ k as assignmentVisualPatch,
48
+ Ys as attachImportedRouteAnchors,
49
+ ks as autoConnectUnitAnchor,
161
50
  U as bboxOf,
162
- W as bboxUnion,
163
- X as boundsFromStackedLevels,
164
- k as buildAutoSkeleton,
165
- z as buildGeometryFromPaths,
166
- Q as centroid,
167
- q as classifyId,
168
- J as compareBuildingFloors,
169
- Z as compileDocument,
170
- ee as compileGraph,
171
- ne as defaultViewerLevelId,
172
- te as diffImport,
173
- A as distance,
174
- oe as expandBounds,
175
- se as findNearestAmenityPath,
176
- ae as findPath,
177
- b as findWeldCandidates,
178
- ie as flipY,
179
- re as floorSwitcherDisplayLevels,
180
- de as floorSwitcherLevels,
181
- ce as geometryBBox,
182
- le as geometryCentroid,
183
- D as importRoutePaths,
184
- fe as importSvg,
185
- ue as inlineSvgStyles,
186
- he as isGeometrySpaceStale,
187
- pe as isIdentityMatrix,
188
- me as isInteractiveGroupLabel,
189
- Ie as isLayerContainerLabel,
190
- ye as isMapViewerHost,
191
- xe as isNonInteractiveGroupLabel,
192
- ge as isOutdoorLevel,
193
- Ae as isStoreFolderLabel,
194
- Se as mapSurface,
195
- ve as mergePresentationStyle,
196
- Le as mergeTheme,
197
- Te as multiplyMatrix,
198
- L as nearestPointOnPolyline,
199
- we as normalizeGeometrySpace,
200
- Ee as normalizeLayerLabel,
201
- be as normalizeLayerName,
202
- Me as normalizePublishedDocument,
203
- Pe as parseSvgString,
204
- ke as parseTransform,
205
- De as parseViewBox,
206
- T as pathToPolygons,
207
- _e as pointInPolygon,
208
- S as pointInPolygons,
209
- Ce as projectOntoSegment,
210
- Fe as readPresentationStyle,
211
- Oe as resolveLayerStyle,
212
- Re as shouldShowFloorSwitcher,
213
- Ne as snapAngle,
214
- Be as tokenizePathData,
215
- $e as transformPathD,
216
- Ge as unionViewBox,
217
- P as unitAnchorFromShape,
218
- Ye as viewBoxToBounds,
219
- He as viewerChrome,
220
- Ve as viewerLevelStack,
221
- E as weldAnchors
51
+ z as bboxUnion,
52
+ W as boundsFromStackedLevels,
53
+ Us as buildAutoSkeleton,
54
+ Z as buildGeometryFromPaths,
55
+ j as bulkAssignFormState,
56
+ q as centroid,
57
+ X as clampEntranceSize,
58
+ Q as clampStoreRadius,
59
+ J as classifyId,
60
+ zs as collapseDuplicateRouteGraph,
61
+ $ as commitAssignNumberDraft,
62
+ aa as compareBuildingFloors,
63
+ sa as compileDocument,
64
+ ea as compileGraph,
65
+ oa as connectorIconLayout,
66
+ ra as defaultLayerTypeForKind,
67
+ ia as defaultTargetTypeForKind,
68
+ na as defaultViewerLevelId,
69
+ ta as diffImport,
70
+ la as distance,
71
+ Sa as emptyShapeAssignment,
72
+ pa as expandBounds,
73
+ ma as filletPolygon,
74
+ da as findNearestAmenityPath,
75
+ Ea as findPath,
76
+ Ws as findWeldCandidates,
77
+ Aa as flipY,
78
+ La as floorSwitcherDisplayLevels,
79
+ ga as floorSwitcherLevels,
80
+ ba as geometryBBox,
81
+ ca as geometryCentroid,
82
+ Ia as hasBuildingFloors,
83
+ _a as holeRingForOuter,
84
+ ua as holesOverlappingOuter,
85
+ Zs as importRoutePaths,
86
+ Ta as importSvg,
87
+ ya as inlineSvgStyles,
88
+ ha as isActiveVoidShape,
89
+ Oa as isAssignmentLayerType,
90
+ Na as isEntranceIcon,
91
+ va as isGeometrySpaceStale,
92
+ Ra as isIdentityMatrix,
93
+ Pa as isInteractiveGroupLabel,
94
+ Da as isLayerContainerLabel,
95
+ Fa as isMapViewerHost,
96
+ Ca as isNonInteractiveGroupLabel,
97
+ fa as isOutdoorLevel,
98
+ Ba as isRouteFolderLabel,
99
+ xa as isRoutePathLabel,
100
+ Ga as isSlabShapeKind,
101
+ wa as isStoreFolderLabel,
102
+ Ma as isTransparentColor,
103
+ Ka as isVoidKind,
104
+ Ha as kioskAssignedName,
105
+ Va as labelAlignX,
106
+ Ya as labelSvgTextAnchor,
107
+ ka as levelHasVoids,
108
+ Ua as mapSurface,
109
+ za as mergePresentationStyle,
110
+ Wa as mergeTheme,
111
+ Za as multiplyMatrix,
112
+ ja as nearestPointOnPolyline,
113
+ qa as nextLowerBuildingFloor,
114
+ js as nextZoomFromWheel,
115
+ Xa as normalizeGeometrySpace,
116
+ Qa as normalizeLabelAlign,
117
+ Ja as normalizeLayerLabel,
118
+ $a as normalizeLayerName,
119
+ as as normalizePublishedDocument,
120
+ qs as outdoorDecorationFromSvg,
121
+ ss as outdoorSvgSuppressIds,
122
+ es as parseKioskIdInput,
123
+ os as parseShapeAssignment,
124
+ rs as parseSvgString,
125
+ is as parseTransform,
126
+ ns as parseViewBox,
127
+ ts as pathToPolygons,
128
+ ls as pointInPolygon,
129
+ Ss as pointInPolygons,
130
+ ps as polygonBBox,
131
+ ms as polygonSignedArea,
132
+ ds as polygonsOverlap,
133
+ Es as projectOntoSegment,
134
+ As as publishedShapeLabel,
135
+ Ls as readPresentationStyle,
136
+ gs as resolveFetchUrl,
137
+ bs as resolveLayerStyle,
138
+ cs as resolveStaticLayerKey,
139
+ Is as resolvedAssignmentBgColor,
140
+ _s as resolvedAssignmentTextColor,
141
+ us as retailerOptionLabel,
142
+ Ts as revealedBuildingFloors,
143
+ ys as reversedRing,
144
+ Xs as routeAnchorKindForShape,
145
+ hs as sceneBoundsFromBBox,
146
+ Os as shouldShowFloorSwitcher,
147
+ Ns as snapAngle,
148
+ vs as staticLayerHouseColor,
149
+ Rs as staticLayerThemeDefaults,
150
+ Ps as svgIdsOwnedByShapes,
151
+ Ds as tokenizePathData,
152
+ Fs as transformPathD,
153
+ Cs as unionViewBox,
154
+ fs as uniqueClosedRing,
155
+ Qs as unitAnchorFromShape,
156
+ Bs as viewBoxToBounds,
157
+ xs as viewerChrome,
158
+ Gs as viewerLevelIdAfterShapeSelect,
159
+ ws as viewerLevelStack,
160
+ Ms as voidPolygonsOnLevel,
161
+ Js as weldAnchors,
162
+ $s as wheelDollyScale
222
163
  };
223
164
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/core/routing/graph-tools.ts"],"sourcesContent":["import type {\n AutoConnectResult,\n CmAnchor,\n CmRouteEdge,\n SkeletonSuggestion,\n Vec2,\n WeldResult,\n} from '../types';\nimport { DEFAULT_WELD_TOLERANCE } from '../types';\nimport {\n distance,\n nearestPointOnPolyline,\n pathToPolygons,\n pointInPolygons,\n} from '../geometry';\n\nexport interface AnchorLike {\n id: number;\n x: number;\n y: number;\n levelId: number;\n shapeId?: number | null;\n kind?: string;\n}\n\nexport interface EdgeLike {\n id: number;\n fromAnchorId: number;\n toAnchorId: number;\n}\n\n/**\n * Weld anchors within tolerance into the surviving (lowest id) anchor.\n * Rewires edges that referenced removed anchors.\n */\nexport function weldAnchors(\n anchors: AnchorLike[],\n edges: EdgeLike[],\n candidateIds: number[],\n tolerance = DEFAULT_WELD_TOLERANCE,\n): WeldResult | null {\n const candidates = anchors.filter((a) => candidateIds.includes(a.id));\n if (candidates.length < 2) return null;\n\n // Cluster by proximity from the first candidate's position centroid of group\n const surviving = candidates.reduce((min, a) => (a.id < min.id ? a : min));\n const removed: number[] = [];\n\n for (const a of candidates) {\n if (a.id === surviving.id) continue;\n if (distance(a, surviving) <= tolerance) {\n removed.push(a.id);\n }\n }\n\n if (removed.length === 0) return null;\n\n const removedSet = new Set(removed);\n const rewired: number[] = [];\n\n for (const edge of edges) {\n let changed = false;\n if (removedSet.has(edge.fromAnchorId)) {\n edge.fromAnchorId = surviving.id;\n changed = true;\n }\n if (removedSet.has(edge.toAnchorId)) {\n edge.toAnchorId = surviving.id;\n changed = true;\n }\n // Drop self-loops\n if (edge.fromAnchorId === edge.toAnchorId) {\n rewired.push(edge.id);\n continue;\n }\n if (changed) rewired.push(edge.id);\n }\n\n return {\n survivingAnchorId: surviving.id,\n removedAnchorIds: removed,\n rewiredEdgeIds: rewired,\n };\n}\n\n/**\n * Find all pairs of anchors within tolerance that should be welded.\n */\nexport function findWeldCandidates(\n anchors: AnchorLike[],\n tolerance = DEFAULT_WELD_TOLERANCE,\n): number[][] {\n const groups: number[][] = [];\n const used = new Set<number>();\n\n for (let i = 0; i < anchors.length; i++) {\n if (used.has(anchors[i].id)) continue;\n const group = [anchors[i].id];\n for (let j = i + 1; j < anchors.length; j++) {\n if (used.has(anchors[j].id)) continue;\n if (\n anchors[i].levelId === anchors[j].levelId &&\n distance(anchors[i], anchors[j]) <= tolerance\n ) {\n group.push(anchors[j].id);\n used.add(anchors[j].id);\n }\n }\n if (group.length > 1) {\n used.add(anchors[i].id);\n groups.push(group);\n }\n }\n return groups;\n}\n\n/**\n * Auto-connect a unit anchor to the nearest walkable segment via perpendicular projection.\n */\nexport function autoConnectUnitAnchor(\n unitAnchor: AnchorLike,\n walkablePolylines: Vec2[][],\n existingJunctions: AnchorLike[],\n weldTolerance = DEFAULT_WELD_TOLERANCE,\n): AutoConnectResult | null {\n let best: { point: Vec2; distance: number } | null = null;\n\n for (const line of walkablePolylines) {\n const hit = nearestPointOnPolyline(unitAnchor, line);\n if (hit && (!best || hit.distance < best.distance)) {\n best = { point: hit.point, distance: hit.distance };\n }\n }\n\n if (!best) return null;\n\n // Reuse existing junction if within weld tolerance\n const existing = existingJunctions.find(\n (j) =>\n j.levelId === unitAnchor.levelId &&\n distance(j, best!.point) <= weldTolerance,\n );\n\n return {\n unitAnchorId: unitAnchor.id,\n junctionAnchor: existing\n ? { x: existing.x, y: existing.y, existingId: existing.id }\n : { x: best.point.x, y: best.point.y },\n edge: {\n fromAnchorId: unitAnchor.id,\n toAnchorId: existing?.id,\n },\n };\n}\n\n/**\n * Place a unit anchor at the centroid of a shape's polygons, if the point lies inside.\n */\nexport function unitAnchorFromShape(\n shapeId: number,\n levelId: number,\n polygons: Vec2[][],\n tempId: number,\n): CmAnchor | null {\n if (polygons.length === 0) return null;\n const flat = polygons.flat();\n if (flat.length === 0) return null;\n\n let sx = 0;\n let sy = 0;\n for (const p of flat) {\n sx += p.x;\n sy += p.y;\n }\n const c = { x: sx / flat.length, y: sy / flat.length };\n\n // Prefer centroid if inside; otherwise use first polygon's average of extremes\n const point = pointInPolygons(c, polygons) ? c : flat[0];\n\n return {\n id: tempId,\n levelId,\n shapeId,\n kind: 'unit',\n x: point.x,\n y: point.y,\n connectorId: null,\n };\n}\n\n/**\n * Build a simple medial-axis-ish skeleton from walkable polygons minus voids.\n * This is a pragmatic approximation: sample a grid inside walkable, reject void cells,\n * connect adjacent free cells into a sparse graph, then prune to a polyline network.\n */\nexport function buildAutoSkeleton(\n walkablePolygons: Vec2[][],\n voidPolygons: Vec2[][],\n cellSize = 20,\n): SkeletonSuggestion {\n if (walkablePolygons.length === 0) {\n return { anchors: [], edges: [] };\n }\n\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n for (const poly of walkablePolygons) {\n for (const p of poly) {\n minX = Math.min(minX, p.x);\n minY = Math.min(minY, p.y);\n maxX = Math.max(maxX, p.x);\n maxY = Math.max(maxY, p.y);\n }\n }\n\n const cols = Math.max(1, Math.ceil((maxX - minX) / cellSize));\n const rows = Math.max(1, Math.ceil((maxY - minY) / cellSize));\n const free: Array<{ key: string; x: number; y: number; col: number; row: number }> = [];\n\n for (let row = 0; row < rows; row++) {\n for (let col = 0; col < cols; col++) {\n const x = minX + (col + 0.5) * cellSize;\n const y = minY + (row + 0.5) * cellSize;\n const pt = { x, y };\n if (!pointInPolygons(pt, walkablePolygons)) continue;\n if (voidPolygons.length > 0 && pointInPolygons(pt, voidPolygons)) continue;\n free.push({ key: `${col},${row}`, x, y, col, row });\n }\n }\n\n const byKey = new Map(free.map((c) => [c.key, c]));\n const anchors = free.map((c) => ({\n tempId: c.key,\n x: c.x,\n y: c.y,\n kind: 'junction' as const,\n }));\n\n const edges: Array<{ fromTempId: string; toTempId: string }> = [];\n const seen = new Set<string>();\n\n for (const cell of free) {\n const neighbors = [\n [cell.col + 1, cell.row],\n [cell.col, cell.row + 1],\n ];\n for (const [nc, nr] of neighbors) {\n const nk = `${nc},${nr}`;\n if (!byKey.has(nk)) continue;\n const edgeKey = cell.key < nk ? `${cell.key}|${nk}` : `${nk}|${cell.key}`;\n if (seen.has(edgeKey)) continue;\n seen.add(edgeKey);\n edges.push({ fromTempId: cell.key, toTempId: nk });\n }\n }\n\n return { anchors, edges };\n}\n\n/**\n * Convert route-path SVG line endpoints into welded anchors + edges.\n * This is the key converter step that repairs coincident-but-disconnected joins.\n *\n * Anchors land in raw SVG user space (Y down), the same space as shape\n * geometry. There is intentionally no viewbox-height flip here — mirroring\n * routes without mirroring shapes would silently desynchronise the two.\n */\nexport function importRoutePaths(\n pathDs: string[],\n levelId: number,\n mapId: number,\n startId: number,\n weldTolerance = DEFAULT_WELD_TOLERANCE,\n): { anchors: CmAnchor[]; edges: CmRouteEdge[]; nextId: number } {\n const anchors: CmAnchor[] = [];\n const edges: CmRouteEdge[] = [];\n let nextId = startId;\n\n const findOrCreate = (x: number, y: number): number => {\n const existing = anchors.find(\n (a) => distance(a, { x, y }) <= weldTolerance,\n );\n if (existing) return existing.id;\n const id = nextId++;\n anchors.push({\n id,\n levelId,\n shapeId: null,\n kind: 'junction',\n x,\n y,\n connectorId: null,\n });\n return id;\n };\n\n for (const d of pathDs) {\n const polys = pathToPolygons(d);\n for (const poly of polys) {\n for (let i = 0; i < poly.length - 1; i++) {\n const a = findOrCreate(poly[i].x, poly[i].y);\n const b = findOrCreate(poly[i + 1].x, poly[i + 1].y);\n if (a === b) continue;\n // Avoid duplicate edges\n const dup = edges.some(\n (e) =>\n (e.fromAnchorId === a && e.toAnchorId === b) ||\n (e.fromAnchorId === b && e.toAnchorId === a),\n );\n if (dup) continue;\n edges.push({\n id: nextId++,\n mapId,\n fromAnchorId: a,\n toAnchorId: b,\n weight: null,\n directed: false,\n accessible: true,\n kind: 'walk',\n });\n }\n }\n }\n\n return { anchors, edges, nextId };\n}\n"],"names":["weldAnchors","anchors","edges","candidateIds","tolerance","DEFAULT_WELD_TOLERANCE","candidates","a","surviving","min","removed","distance","removedSet","rewired","edge","changed","findWeldCandidates","groups","used","i","group","j","autoConnectUnitAnchor","unitAnchor","walkablePolylines","existingJunctions","weldTolerance","best","line","hit","nearestPointOnPolyline","existing","unitAnchorFromShape","shapeId","levelId","polygons","tempId","flat","sx","sy","p","c","point","pointInPolygons","buildAutoSkeleton","walkablePolygons","voidPolygons","cellSize","minX","minY","maxX","maxY","poly","cols","rows","free","row","col","x","y","pt","byKey","seen","cell","neighbors","nc","nr","nk","edgeKey","importRoutePaths","pathDs","mapId","startId","nextId","findOrCreate","id","d","polys","pathToPolygons","b","e"],"mappings":";;AAmCO,SAASA,EACdC,GACAC,GACAC,GACAC,IAAYC,GACO;AACnB,QAAMC,IAAaL,EAAQ,OAAO,CAACM,MAAMJ,EAAa,SAASI,EAAE,EAAE,CAAC;AACpE,MAAID,EAAW,SAAS,EAAG,QAAO;AAGlC,QAAME,IAAYF,EAAW,OAAO,CAACG,GAAKF,MAAOA,EAAE,KAAKE,EAAI,KAAKF,IAAIE,CAAI,GACnEC,IAAoB,CAAA;AAE1B,aAAWH,KAAKD;AACd,IAAIC,EAAE,OAAOC,EAAU,MACnBG,EAASJ,GAAGC,CAAS,KAAKJ,KAC5BM,EAAQ,KAAKH,EAAE,EAAE;AAIrB,MAAIG,EAAQ,WAAW,EAAG,QAAO;AAEjC,QAAME,IAAa,IAAI,IAAIF,CAAO,GAC5BG,IAAoB,CAAA;AAE1B,aAAWC,KAAQZ,GAAO;AACxB,QAAIa,IAAU;AAUd,QATIH,EAAW,IAAIE,EAAK,YAAY,MAClCA,EAAK,eAAeN,EAAU,IAC9BO,IAAU,KAERH,EAAW,IAAIE,EAAK,UAAU,MAChCA,EAAK,aAAaN,EAAU,IAC5BO,IAAU,KAGRD,EAAK,iBAAiBA,EAAK,YAAY;AACzC,MAAAD,EAAQ,KAAKC,EAAK,EAAE;AACpB;AAAA,IACF;AACA,IAAIC,KAASF,EAAQ,KAAKC,E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,CAAC8E,MACEA,EAAE,iBAAiBzE,KAAKyE,EAAE,eAAeD,KACzCC,EAAE,iBAAiBD,KAAKC,EAAE,eAAezE;AAAA,QAAA,KAG9CL,EAAM,KAAK;AAAA,UACT,IAAIuE;AAAA,UACJ,OAAAF;AAAA,UACA,cAAchE;AAAA,UACd,YAAYwE;AAAA,UACZ,QAAQ;AAAA,UACR,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,MAAM;AAAA,QAAA,CACP;AAAA,MACH;AAAA,EAEJ;AAEA,SAAO,EAAE,SAAA9E,GAAS,OAAAC,GAAO,QAAAuE,EAAA;AAC3B;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,7 @@
1
+ import { BBox, LabelAlign } from './types';
2
+ export declare const LABEL_ALIGNS: readonly ["left", "center", "right"];
3
+ export declare const DEFAULT_LABEL_ALIGN: LabelAlign;
4
+ export declare function normalizeLabelAlign(value: unknown): LabelAlign;
5
+ export declare function labelAlignX(box: BBox, align: LabelAlign): number;
6
+ export declare function labelSvgTextAnchor(align: LabelAlign): 'start' | 'middle' | 'end';
7
+ //# sourceMappingURL=labelAlign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labelAlign.d.ts","sourceRoot":"","sources":["../../src/core/labelAlign.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,YAAY,sCAAuC,CAAC;AACjE,eAAO,MAAM,mBAAmB,EAAE,UAAqB,CAAC;AAExD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,UAAU,CAE9D;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAIhE;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,GAChB,OAAO,GAAG,QAAQ,GAAG,KAAK,CAI5B"}
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Code-only static layer styling for recognized SVG layer-name prefixes.
3
- * Never loaded from or saved to portal / database theme settings — mirrors
4
- * v1 `staticMapLayerSettings` in `@eyeon/threejs-map`.
2
+ * House styles for recognized outdoor SVG layer-name prefixes.
3
+ * Defaults stay in this file (v1 `staticMapLayerSettings`). Settings may
4
+ * override the colors and persist them on the map theme; Reset restores these.
5
5
  */
6
6
  export interface StaticLayerStyle {
7
7
  fill?: string;
@@ -10,19 +10,68 @@ export interface StaticLayerStyle {
10
10
  renderOrder: number;
11
11
  extrudeHeight?: number;
12
12
  }
13
+ /**
14
+ * v1 walking-path has no portal setting — it keeps the SVG fill, and every
15
+ * published mall file uses this icy walkway color. v2 defaults to the same hex.
16
+ */
17
+ export declare const WALKING_PATH_COLOR = "#E9F7FC";
18
+ export declare const STATIC_LAYER_KEYS: readonly ["green-area", "water-area", "parking-lane", "parking-line", "parking-icon", "walking-path"];
19
+ export type StaticLayerKey = (typeof STATIC_LAYER_KEYS)[number];
20
+ /**
21
+ * Theme field that Settings uses to override a house layer.
22
+ * `parking-line` stays a house stroke only — it is not an assignable shape
23
+ * and is omitted from Settings.
24
+ */
25
+ export declare const STATIC_LAYER_THEME_KEYS: {
26
+ readonly 'green-area': "GREEN_AREA_COLOR";
27
+ readonly 'water-area': "WATER_COLOR";
28
+ readonly 'parking-lane': "PARKING_LANE_COLOR";
29
+ readonly 'parking-icon': "PARKING_ICON_COLOR";
30
+ readonly 'walking-path': "WALKABLE_COLOR";
31
+ };
32
+ export type StaticLayerThemeKey = (typeof STATIC_LAYER_THEME_KEYS)[keyof typeof STATIC_LAYER_THEME_KEYS];
13
33
  /**
14
34
  * Prefix → house style. Matching is normalized so `parking-lane`,
15
35
  * `parking_lane`, and `parking-lanes` all resolve to the same entry.
16
36
  */
17
- export declare const STATIC_LAYER_STYLES: Record<string, StaticLayerStyle>;
37
+ export declare const STATIC_LAYER_STYLES: Record<StaticLayerKey, StaticLayerStyle>;
38
+ /** Built-in fill/stroke for a reserved outdoor layer. */
39
+ export declare function staticLayerHouseColor(key: StaticLayerKey): string;
40
+ /** Theme defaults that match the code house colors. */
41
+ export declare function staticLayerThemeDefaults(): Record<StaticLayerThemeKey, string>;
18
42
  /** Collapse punctuation so `parking_lane_2` and `parking-lanes` compare as words. */
19
43
  export declare function normalizeLayerName(label: string): string;
44
+ export declare function resolveStaticLayerKey(layerName: string | null | undefined): StaticLayerKey | null;
20
45
  /**
21
46
  * Resolve a static house style from an SVG element / group id.
22
47
  * Returns null when the name is not a reserved decoration layer.
23
48
  *
49
+ * Optional `theme` overlays Settings colors on fill. Omit it to keep
50
+ * the code house colors.
51
+ *
24
52
  * Matches when the normalized name equals the key, starts with the key as a
25
53
  * word (`parking lane 2`), or is a simple plural (`parking lanes`).
26
54
  */
27
- export declare function resolveLayerStyle(layerName: string | null | undefined): StaticLayerStyle | null;
55
+ export declare function resolveLayerStyle(layerName: string | null | undefined, theme?: Partial<Record<string, string>> | null): StaticLayerStyle | null;
56
+ /**
57
+ * sourceSvgId values the live outdoor SVG should skip because `cm_shapes`
58
+ * already owns them. Static house layers stay in the SVG so walking-path
59
+ * (and parking / green) keep their colors even when an older import
60
+ * also persisted a walkable row.
61
+ */
62
+ export declare function svgIdsOwnedByShapes(shapes: Iterable<{
63
+ sourceSvgId?: string | null;
64
+ }>, options?: {
65
+ omitStaticLayers?: boolean;
66
+ }): Set<string>;
67
+ /**
68
+ * Outdoor SVG ids the default map must skip. Interactive / imported ids from
69
+ * every level are hidden so a combined base SVG cannot keep drawing another
70
+ * floor. House decoration layers (parking, walking-path, green) stay visible.
71
+ */
72
+ export declare function outdoorSvgSuppressIds(levels: Array<{
73
+ shapes: Iterable<{
74
+ sourceSvgId?: string | null;
75
+ }>;
76
+ }>): Set<string>;
28
77
  //# sourceMappingURL=layerStyles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layerStyles.d.ts","sourceRoot":"","sources":["../../src/core/layerStyles.ts"],"names":[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gBAAgB,CAgCxE,CAAC;AAEF,yDAAyD;AACzD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAGjE;AAED,uDAAuD;AACvD,wBAAgB,wBAAwB,IAAI,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAQ9E;AAED,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAWD,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,cAAc,GAAG,IAAI,CAUvB;AAsBD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,GAC7C,gBAAgB,GAAG,IAAI,CAIzB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,QAAQ,CAAC;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,EACjD,OAAO,CAAC,EAAE;IAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAAE,GACvC,GAAG,CAAC,MAAM,CAAC,CAUb;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,QAAQ,CAAC;QAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CACnD,CAAC,GACD,GAAG,CAAC,MAAM,CAAC,CAKb"}
@@ -0,0 +1,3 @@
1
+ /** Same contract as v1 `getMediaProxyUrl`: proxy base + encoded URL, no query key. */
2
+ export declare function resolveFetchUrl(url: string, imageProxyUrl?: string | null): string;
3
+ //# sourceMappingURL=mediaUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mediaUrl.d.ts","sourceRoot":"","sources":["../../src/core/mediaUrl.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAGlF"}
@@ -0,0 +1,16 @@
1
+ export interface OutdoorDecorationPath {
2
+ id: string;
3
+ d: string;
4
+ fill?: string;
5
+ stroke?: string;
6
+ strokeWidth?: number;
7
+ opacity?: number;
8
+ }
9
+ /**
10
+ * Paths the assign viewer draws from the live outdoor SVG: house-style
11
+ * decoration (green area, parking lanes, icons) and any other
12
+ * non-interactive art. Interactive / store folders stay out — those are
13
+ * `cm_shapes` rows.
14
+ */
15
+ export declare function outdoorDecorationFromSvg(svgText: string, suppressIds?: ReadonlySet<string>, theme?: Partial<Record<string, string>> | null): OutdoorDecorationPath[];
16
+ //# sourceMappingURL=outdoorDecoration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outdoorDecoration.d.ts","sourceRoot":"","sources":["../../src/core/outdoorDecoration.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,EACjC,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,GAC7C,qBAAqB,EAAE,CAyBzB"}
@@ -1,4 +1,4 @@
1
- import { CmAmenityCatalogItem, CmAnchor, CmBuilding, CmConnector, CmLevel, CmResponsiveOverride, CmRouteEdge, CmShape, CmShapeAssignment, PublishedDocument, ThemeDefaults, ViewBox } from '../types';
1
+ import { CmAmenityCatalogItem, CmAnchor, CmBuilding, CmConnector, CmLevel, CmResponsiveOverride, CmRouteEdge, CmShape, CmShapeAssignment, MapAssignRetailer, PublishedDocument, ThemeDefaults, ViewBox } from '../types';
2
2
  export interface PublishInput {
3
3
  revisionId: number;
4
4
  revisionNumber: number;
@@ -16,6 +16,8 @@ export interface PublishInput {
16
16
  connectors: CmConnector[];
17
17
  amenities: CmAmenityCatalogItem[];
18
18
  responsiveOverrides: CmResponsiveOverride[];
19
+ /** Center retailers — used to bake retail_logo URLs the way v1 looks them up at draw time. */
20
+ retailers?: MapAssignRetailer[];
19
21
  /** Resolve S3 key → CDN URL for level source SVGs. */
20
22
  resolveSvgUrl?: (key: string | null) => string | null;
21
23
  publishedAt?: string;
@@ -26,9 +28,9 @@ export interface PublishInput {
26
28
  */
27
29
  export declare function compileDocument(input: PublishInput): PublishedDocument;
28
30
  /**
29
- * Heal a document that was compiled before the Y-flip removal. Viewer hosts
30
- * load `cm_revisions` JSON as-is (they never re-run `compileDocument`), so
31
- * stale polygons would otherwise render upside down relative to the editor.
31
+ * Heal a document that was compiled before the Y-flip removal, and drop
32
+ * leftover store names on unassigned polygons. Viewer hosts load
33
+ * `cm_revisions` JSON as-is (they never re-run `compileDocument`).
32
34
  */
33
35
  export declare function normalizePublishedDocument(doc: PublishedDocument): PublishedDocument;
34
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/publish/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,WAAW,EACX,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,OAAO,EACR,MAAM,UAAU,CAAC;AAKlB,MAAM,WAAW,YAAY;IA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CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,UAAU,EAAE,WAAW,EAAE,CAAC;IAC1B,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,mBAAmB,EAAE,oBAAoB,EAAE,CAAC;IAC5C,8FAA8F;IAC9F,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAChC,sDAAsD;IACtD,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,GAAG,IAAI,CAAC;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,iBAAiB,CAuEtE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,iBAAiB,GACrB,iBAAiB,CAuBnB"}
@@ -1,4 +1,4 @@
1
- import { AutoConnectResult, CmAnchor, CmRouteEdge, SkeletonSuggestion, Vec2, WeldResult } from '../types';
1
+ import { AnchorKind, AutoConnectResult, CmAnchor, CmRouteEdge, ShapeGeometry, ShapeKind, SkeletonSuggestion, Vec2, WeldResult } from '../types';
2
2
  export interface AnchorLike {
3
3
  id: number;
4
4
  x: number;
@@ -21,6 +21,15 @@ export declare function weldAnchors(anchors: AnchorLike[], edges: EdgeLike[], ca
21
21
  * Find all pairs of anchors within tolerance that should be welded.
22
22
  */
23
23
  export declare function findWeldCandidates(anchors: AnchorLike[], tolerance?: number): number[][];
24
+ /**
25
+ * Merge coincident anchors and drop overlapping undirected edges.
26
+ * Two SVG imports of the same ROUTES layer stack a second copy on top of
27
+ * the first — dragging one junction then leaves the twin behind.
28
+ */
29
+ export declare function collapseDuplicateRouteGraph<A extends AnchorLike, E extends EdgeLike>(anchors: A[], edges: E[], tolerance?: number): {
30
+ anchors: A[];
31
+ edges: E[];
32
+ };
24
33
  /**
25
34
  * Auto-connect a unit anchor to the nearest walkable segment via perpendicular projection.
26
35
  */
@@ -48,4 +57,17 @@ export declare function importRoutePaths(pathDs: string[], levelId: number, mapI
48
57
  edges: CmRouteEdge[];
49
58
  nextId: number;
50
59
  };
60
+ export declare function routeAnchorKindForShape(kind: ShapeKind): AnchorKind;
61
+ export interface AttachableImportShape {
62
+ id: number;
63
+ kind: ShapeKind;
64
+ geometry: Pick<ShapeGeometry, 'polygons'>;
65
+ }
66
+ /**
67
+ * Same rule as v1 `assign_route_nodes_to_stores`: a route vertex that sits
68
+ * inside (or on) an interactive shape is that store / amenity / entrance's
69
+ * destination. Prefer a dedicated spur leaf; otherwise take the closest
70
+ * vertex. Corridor through-points keep `walk` edges so the path stays joined.
71
+ */
72
+ export declare function attachImportedRouteAnchors(anchors: CmAnchor[], edges: CmRouteEdge[], shapes: AttachableImportShape[], insideTolerance?: number): number;
51
73
  //# sourceMappingURL=graph-tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph-tools.d.ts","sourceRoot":"","sources":["../../../src/core/routing/graph-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,kBAAkB,EAClB,IAAI,EACJ,UAAU,EACX,MAAM,UAAU,CAAC;AASlB,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;I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C;IAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAAC,KAAK,EAAE,WAAW,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAoD/D"}
1
+ {"version":3,"file":"graph-tools.d.ts","sourceRoot":"","sources":["../../../src/core/routing/graph-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,IAAI,EACJ,UAAU,EACX,MAAM,UAAU,CAAC;AASlB,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,UAAU,EAAE,EACrB,KAAK,EAAE,QAAQ,EAAE,EACjB,YAAY,EAAE,MAAM,EAAE,EACtB,SAAS,SAAyB,GACjC,UAAU,GAAG,IAAI,CA2CnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,UAAU,EAAE,EACrB,SAAS,SAAyB,GACjC,MAAM,EAAE,EAAE,CAuBZ;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,CAAC,SAAS,UAAU,EACpB,CAAC,SAAS,QAAQ,EAElB,OAAO,EAAE,CAAC,EAAE,EACZ,KAAK,EAAE,CAAC,EAAE,EACV,SAAS,SAAyB,GACjC;IAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,EAAE,CA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