@eyeon/map 2.0.1 → 2.0.3
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/README.md +18 -1
- package/dist/assets/MapViewer.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/chunks/MapViewer.js +1988 -358
- package/dist/chunks/MapViewer.js.map +1 -1
- package/dist/chunks/graph-tools.js +202 -109
- package/dist/chunks/graph-tools.js.map +1 -1
- package/dist/chunks/stacking.js +1426 -0
- package/dist/chunks/stacking.js.map +1 -0
- package/dist/core/filletPolygon.d.ts +10 -0
- package/dist/core/filletPolygon.d.ts.map +1 -0
- package/dist/core/geometry/index.d.ts +41 -4
- package/dist/core/geometry/index.d.ts.map +1 -1
- package/dist/core/hostChrome.d.ts +20 -0
- package/dist/core/hostChrome.d.ts.map +1 -0
- package/dist/core/import/index.d.ts +52 -3
- package/dist/core/import/index.d.ts.map +1 -1
- package/dist/core/import/svgStyle.d.ts +21 -0
- package/dist/core/import/svgStyle.d.ts.map +1 -0
- package/dist/core/import/svgTransform.d.ts +49 -0
- package/dist/core/import/svgTransform.d.ts.map +1 -0
- package/dist/core/index.d.ts +6 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +89 -279
- package/dist/core/index.js.map +1 -1
- package/dist/core/layerStyles.d.ts +44 -0
- package/dist/core/layerStyles.d.ts.map +1 -0
- package/dist/core/mediaUrl.d.ts +3 -0
- package/dist/core/mediaUrl.d.ts.map +1 -0
- package/dist/core/outdoorDecoration.d.ts +16 -0
- package/dist/core/outdoorDecoration.d.ts.map +1 -0
- package/dist/core/publish/index.d.ts +8 -2
- package/dist/core/publish/index.d.ts.map +1 -1
- package/dist/core/routing/graph-tools.d.ts +28 -2
- package/dist/core/routing/graph-tools.d.ts.map +1 -1
- package/dist/core/routing/pathfinding.d.ts.map +1 -1
- package/dist/core/stacking.d.ts +61 -0
- package/dist/core/stacking.d.ts.map +1 -0
- package/dist/core/types.d.ts +31 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/editor/MapEditor.d.ts +28 -16
- package/dist/editor/MapEditor.d.ts.map +1 -1
- package/dist/editor/canvas/EditorCanvas.d.ts +56 -6
- package/dist/editor/canvas/EditorCanvas.d.ts.map +1 -1
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts +7 -0
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts.map +1 -0
- package/dist/editor/canvas/coords.d.ts +51 -0
- package/dist/editor/canvas/coords.d.ts.map +1 -0
- package/dist/editor/canvas/editorFill.d.ts +10 -0
- package/dist/editor/canvas/editorFill.d.ts.map +1 -0
- package/dist/editor/canvas/editorHover.d.ts +14 -0
- package/dist/editor/canvas/editorHover.d.ts.map +1 -0
- package/dist/editor/canvas/underlayHint.d.ts +5 -0
- package/dist/editor/canvas/underlayHint.d.ts.map +1 -0
- package/dist/editor/connectorAssignments.d.ts +64 -0
- package/dist/editor/connectorAssignments.d.ts.map +1 -0
- package/dist/editor/draftOps.d.ts +22 -0
- package/dist/editor/draftOps.d.ts.map +1 -0
- package/dist/editor/editorSectionReturn.d.ts +12 -0
- package/dist/editor/editorSectionReturn.d.ts.map +1 -0
- package/dist/editor/floorsListReturn.d.ts +5 -0
- package/dist/editor/floorsListReturn.d.ts.map +1 -0
- package/dist/editor/geometryEdit.d.ts +54 -0
- package/dist/editor/geometryEdit.d.ts.map +1 -0
- package/dist/editor/hexColor.d.ts +4 -0
- package/dist/editor/hexColor.d.ts.map +1 -0
- package/dist/editor/history.d.ts +31 -0
- package/dist/editor/history.d.ts.map +1 -0
- package/dist/editor/index.css +1497 -143
- package/dist/editor/index.d.ts +9 -3
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/index.js +6377 -601
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/labelText.d.ts +15 -0
- package/dist/editor/labelText.d.ts.map +1 -0
- package/dist/editor/labels.d.ts +5 -0
- package/dist/editor/labels.d.ts.map +1 -0
- package/dist/editor/panels/ConnectorAssign.d.ts +12 -0
- package/dist/editor/panels/ConnectorAssign.d.ts.map +1 -0
- package/dist/editor/panels/FloorsPanel.d.ts +64 -0
- package/dist/editor/panels/FloorsPanel.d.ts.map +1 -0
- package/dist/editor/panels/ImportReviewPanel.d.ts +22 -0
- package/dist/editor/panels/ImportReviewPanel.d.ts.map +1 -0
- package/dist/editor/panels/Inspector.d.ts +6 -3
- package/dist/editor/panels/Inspector.d.ts.map +1 -1
- package/dist/editor/panels/LeftRail.d.ts +26 -11
- package/dist/editor/panels/LeftRail.d.ts.map +1 -1
- package/dist/editor/panels/PreviewOverlay.d.ts +11 -2
- package/dist/editor/panels/PreviewOverlay.d.ts.map +1 -1
- package/dist/editor/pathRings.d.ts +79 -0
- package/dist/editor/pathRings.d.ts.map +1 -0
- package/dist/editor/portalSurface.d.ts +37 -0
- package/dist/editor/portalSurface.d.ts.map +1 -0
- package/dist/editor/previewDocument.d.ts +9 -0
- package/dist/editor/previewDocument.d.ts.map +1 -0
- package/dist/editor/railAssignments.d.ts +22 -0
- package/dist/editor/railAssignments.d.ts.map +1 -0
- package/dist/editor/routeStubs.d.ts +103 -0
- package/dist/editor/routeStubs.d.ts.map +1 -0
- package/dist/editor/snapPoint.d.ts +5 -0
- package/dist/editor/snapPoint.d.ts.map +1 -0
- package/dist/editor/splitJoin.d.ts +78 -0
- package/dist/editor/splitJoin.d.ts.map +1 -0
- package/dist/editor/tools.d.ts +49 -0
- package/dist/editor/tools.d.ts.map +1 -0
- package/dist/test-maps/shops-at-south-town/BASE - Shops At South Town.ai +26703 -28
- package/dist/test-maps/shops-at-south-town/LF - Shops At South Town.ai +4459 -0
- package/dist/test-maps/shops-at-south-town/SVG/BASE - Shops At South Town.svg +567 -0
- package/dist/test-maps/shops-at-south-town/SVG/LF - Shops At South Town.svg +238 -0
- package/dist/test-maps/shops-at-south-town/SVG/UF - Shops At South Town.svg +276 -0
- package/dist/test-maps/shops-at-south-town/UF - Shops At South Town.ai +4131 -1
- package/dist/ui/ModernSelect.d.ts +14 -0
- package/dist/ui/ModernSelect.d.ts.map +1 -0
- package/dist/ui/selectSearch.d.ts +9 -0
- package/dist/ui/selectSearch.d.ts.map +1 -0
- package/dist/viewer/MapViewer.d.ts +14 -3
- package/dist/viewer/MapViewer.d.ts.map +1 -1
- package/dist/viewer/camera.d.ts +37 -0
- package/dist/viewer/camera.d.ts.map +1 -0
- package/dist/viewer/components/CameraRig.d.ts +18 -0
- package/dist/viewer/components/CameraRig.d.ts.map +1 -0
- package/dist/viewer/components/LevelMeshes.d.ts +6 -1
- package/dist/viewer/components/LevelMeshes.d.ts.map +1 -1
- package/dist/viewer/components/MapScene.d.ts +6 -1
- package/dist/viewer/components/MapScene.d.ts.map +1 -1
- package/dist/viewer/components/SvgVectorLayer.d.ts +18 -0
- package/dist/viewer/components/SvgVectorLayer.d.ts.map +1 -0
- package/dist/viewer/index.css +236 -37
- package/dist/viewer/index.d.ts +4 -0
- package/dist/viewer/index.d.ts.map +1 -1
- package/dist/viewer/index.js +9 -4
- package/dist/viewer/index.js.map +1 -1
- package/dist/viewer/ui/MapControls.d.ts +22 -0
- package/dist/viewer/ui/MapControls.d.ts.map +1 -0
- package/dist/viewer/ui/RuntimeChrome.d.ts +3 -3
- package/dist/viewer/ui/RuntimeChrome.d.ts.map +1 -1
- package/package.json +7 -3
- package/dist/chunks/pathfinding.js +0 -343
- package/dist/chunks/pathfinding.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/import/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EAEJ,UAAU,EAEV,YAAY,EACZ,aAAa,EACb,SAAS,EACT,UAAU,EACV,OAAO,EACR,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/import/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EAEJ,UAAU,EAEV,YAAY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,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,kBAAkB,EAAE,EAC9B,QAAQ,EAAE,gBAAgB,EAAE,EAC5B,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAO,GACxC,UAAU,CAmEZ;AAED,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,cAAc,EACd,KAAK,QAAQ,GACd,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline CSS class rules from `<style>` tags as SVG presentation attributes.
|
|
3
|
+
* Works in Node (no DOM) so the SVG importer can resolve fills/strokes.
|
|
4
|
+
* Mirrors v1 `inlineSvgStyles` behaviour for class→attribute mapping.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Rewrite SVG text so class-based fills/strokes become presentation attributes.
|
|
8
|
+
* Safe to call in Node — pure string rewrite, no DOMParser.
|
|
9
|
+
*/
|
|
10
|
+
export declare function inlineSvgStyles(svgText: string): string;
|
|
11
|
+
export interface SvgPresentationStyle {
|
|
12
|
+
fill?: string;
|
|
13
|
+
stroke?: string;
|
|
14
|
+
strokeWidth?: number;
|
|
15
|
+
opacity?: number;
|
|
16
|
+
}
|
|
17
|
+
/** Read presentation attributes from an attribute string. */
|
|
18
|
+
export declare function readPresentationStyle(attrs: string): SvgPresentationStyle;
|
|
19
|
+
/** Merge child over parent — child wins when set. */
|
|
20
|
+
export declare function mergePresentationStyle(parent: SvgPresentationStyle, child: SvgPresentationStyle): SvgPresentationStyle;
|
|
21
|
+
//# sourceMappingURL=svgStyle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svgStyle.d.ts","sourceRoot":"","sources":["../../../src/core/import/svgStyle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqDH;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmCvD;AAED,MAAM,WAAW,oBAAoB;IACnC,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,6DAA6D;AAC7D,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAkBzE;AAED,qDAAqD;AACrD,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,oBAAoB,GAC1B,oBAAoB,CAOtB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Vec2 } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 2D affine matrix in SVG order:
|
|
4
|
+
*
|
|
5
|
+
* ```
|
|
6
|
+
* | a c e |
|
|
7
|
+
* | b d f |
|
|
8
|
+
* | 0 0 1 |
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export interface Matrix2D {
|
|
12
|
+
a: number;
|
|
13
|
+
b: number;
|
|
14
|
+
c: number;
|
|
15
|
+
d: number;
|
|
16
|
+
e: number;
|
|
17
|
+
f: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const IDENTITY_MATRIX: Matrix2D;
|
|
20
|
+
/**
|
|
21
|
+
* Matrix product `outer × inner`: the returned matrix applies `inner` first,
|
|
22
|
+
* then `outer`. SVG composes `transform="A B"` the same way — the rightmost
|
|
23
|
+
* transform is applied to the geometry first, and an ancestor `<g>` transform
|
|
24
|
+
* is the outer one relative to its descendants.
|
|
25
|
+
*/
|
|
26
|
+
export declare function multiplyMatrix(outer: Matrix2D, inner: Matrix2D): Matrix2D;
|
|
27
|
+
export declare function applyMatrix(m: Matrix2D, p: Vec2): Vec2;
|
|
28
|
+
export declare function isIdentityMatrix(m: Matrix2D, epsilon?: number): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Parse an SVG `transform` attribute into a single affine matrix.
|
|
31
|
+
* Unknown functions are skipped. Returns identity for empty / unparseable input.
|
|
32
|
+
*/
|
|
33
|
+
export declare function parseTransform(raw: string | null | undefined): Matrix2D;
|
|
34
|
+
/**
|
|
35
|
+
* Bake an affine matrix into a path `d` string, emitting absolute commands.
|
|
36
|
+
*
|
|
37
|
+
* Flattening a bezier commutes with an affine map (control points transform
|
|
38
|
+
* independently, sampling parameters do not change), so
|
|
39
|
+
* `pathToPolygons(transformPathD(d, m))` equals `pathToPolygons(d)` mapped
|
|
40
|
+
* through `m`. That is what keeps `geometry.paths[].d` and `geometry.polygons`
|
|
41
|
+
* in the same coordinate space.
|
|
42
|
+
*
|
|
43
|
+
* Arcs commute exactly under a similarity (translate / rotate / uniform scale /
|
|
44
|
+
* mirror), which covers Illustrator output. A shear or non-uniform scale maps
|
|
45
|
+
* the same curve but reparameterises it, so individual sample points may shift
|
|
46
|
+
* along the outline even though the outline itself is right.
|
|
47
|
+
*/
|
|
48
|
+
export declare function transformPathD(d: string, m: Matrix2D): string;
|
|
49
|
+
//# sourceMappingURL=svgTransform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svgTransform.d.ts","sourceRoot":"","sources":["../../../src/core/import/svgTransform.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGrC;;;;;;;;GAQG;AACH,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,eAAO,MAAM,eAAe,EAAE,QAAiD,CAAC;AAEhF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,GAAG,QAAQ,CASzE;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAKtD;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,SAAO,GAAG,OAAO,CASrE;AAmDD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,CAmBvE;AA+CD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CA8J7D"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export * from './types';
|
|
2
|
+
export * from './hostChrome';
|
|
3
|
+
export * from './layerStyles';
|
|
4
|
+
export * from './mediaUrl';
|
|
5
|
+
export * from './outdoorDecoration';
|
|
2
6
|
export * from './geometry';
|
|
7
|
+
export * from './filletPolygon';
|
|
3
8
|
export * from './import';
|
|
4
9
|
export * from './routing/graph-tools';
|
|
5
10
|
export * from './routing/pathfinding';
|
|
6
11
|
export * from './publish';
|
|
12
|
+
export * from './stacking';
|
|
7
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,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,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -1,282 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as re, b as ae, f as ce, i as de, u as le, w as pe } from "../chunks/graph-tools.js";
|
|
4
|
-
const P = [
|
|
5
|
-
{ prefix: "walkable", kind: "walkable" },
|
|
6
|
-
{ prefix: "void", kind: "void" },
|
|
7
|
-
{ prefix: "unit", kind: "unit" },
|
|
8
|
-
{ prefix: "store", kind: "unit" },
|
|
9
|
-
// v1 compatibility
|
|
10
|
-
{ prefix: "wall", kind: "wall" },
|
|
11
|
-
{ prefix: "boundary", kind: "boundary" },
|
|
12
|
-
{ prefix: "outer-wall", kind: "wall" },
|
|
13
|
-
{ prefix: "amenity-", kind: "amenity" },
|
|
14
|
-
{ prefix: "kiosk-", kind: "kiosk_screen" },
|
|
15
|
-
{ prefix: "escalator-", kind: "connector" },
|
|
16
|
-
{ prefix: "elevator-", kind: "connector" },
|
|
17
|
-
{ prefix: "stairs-", kind: "connector" },
|
|
18
|
-
{ prefix: "entrance-", kind: "entrance" },
|
|
19
|
-
{ prefix: "zone-", kind: "zone" },
|
|
20
|
-
{ prefix: "label-", kind: "label" },
|
|
21
|
-
{ prefix: "floorplate", kind: "floorplate" },
|
|
22
|
-
{ prefix: "base", kind: "floorplate" },
|
|
23
|
-
{ prefix: "decor", kind: "decor" },
|
|
24
|
-
{ prefix: "special-shape", kind: "decor" },
|
|
25
|
-
{ prefix: "overlay", kind: "decor" }
|
|
26
|
-
], $ = [
|
|
27
|
-
{ prefix: "parking-zone", kind: "parking_zone" },
|
|
28
|
-
{ prefix: "parking-lane", kind: "parking_zone" },
|
|
29
|
-
{ prefix: "parking-line", kind: "decor" },
|
|
30
|
-
{ prefix: "parking-icon", kind: "parking_icon" },
|
|
31
|
-
{ prefix: "green-area", kind: "green_area" },
|
|
32
|
-
{ prefix: "water", kind: "water" },
|
|
33
|
-
{ prefix: "decor", kind: "decor" },
|
|
34
|
-
{ prefix: "entrance-", kind: "entrance" },
|
|
35
|
-
{ prefix: "unit", kind: "unit" },
|
|
36
|
-
{ prefix: "store", kind: "unit" },
|
|
37
|
-
{ prefix: "interactive-", kind: "unit" },
|
|
38
|
-
{ prefix: "walkable", kind: "walkable" },
|
|
39
|
-
{ prefix: "amenity-", kind: "amenity" }
|
|
40
|
-
], A = "route-path";
|
|
41
|
-
function L(n, t = "floor") {
|
|
42
|
-
const o = n.toLowerCase(), a = t === "base" ? $ : P;
|
|
43
|
-
for (const { prefix: l, kind: p } of a)
|
|
44
|
-
if (o === l || o.startsWith(l))
|
|
45
|
-
return { kind: p, guessed: !1 };
|
|
46
|
-
return o.startsWith("interactive") ? { kind: "unit", guessed: !0 } : { kind: null, guessed: !1 };
|
|
47
|
-
}
|
|
48
|
-
function v(n) {
|
|
49
|
-
const t = n.trim().split(/[\s,]+/).map(Number);
|
|
50
|
-
if (t.length < 4) return "";
|
|
51
|
-
let o = `M ${t[0]} ${t[1]}`;
|
|
52
|
-
for (let a = 2; a < t.length; a += 2)
|
|
53
|
-
o += ` L ${t[a]} ${t[a + 1]}`;
|
|
54
|
-
return o += " Z", o;
|
|
55
|
-
}
|
|
56
|
-
function _(n, t, o, a) {
|
|
57
|
-
return `M ${n} ${t} L ${o} ${a}`;
|
|
58
|
-
}
|
|
59
|
-
function C(n) {
|
|
60
|
-
const t = n.match(/viewBox\s*=\s*["']([^"']+)["']/i), o = y(t == null ? void 0 : t[1]), a = [], l = [], p = /<(path|polygon|polyline|line|rect|g)\b([^>]*)(?:\/>|>([\s\S]*?)<\/\1>)/gi;
|
|
61
|
-
let i;
|
|
62
|
-
for (; (i = p.exec(n)) !== null; ) {
|
|
63
|
-
const e = i[1].toLowerCase(), c = i[2] ?? "", k = c.match(/\bid\s*=\s*["']([^"']+)["']/i);
|
|
64
|
-
if (!k) continue;
|
|
65
|
-
const f = k[1], g = /\bdata-interactive\s*=\s*["']?(true|1|yes)/i.test(c);
|
|
66
|
-
if (f.toLowerCase().startsWith(A)) {
|
|
67
|
-
const s = c.match(/\bd\s*=\s*["']([^"']+)["']/i);
|
|
68
|
-
s && l.push(s[1]);
|
|
69
|
-
const r = c.match(/\bpoints\s*=\s*["']([^"']+)["']/i);
|
|
70
|
-
r && l.push(v(r[1]).replace(/ Z$/, ""));
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
const d = { id: f, tag: e, interactive: g };
|
|
74
|
-
if (e === "path") {
|
|
75
|
-
const s = c.match(/\bd\s*=\s*["']([^"']+)["']/i);
|
|
76
|
-
s && (d.d = s[1]);
|
|
77
|
-
} else if (e === "polygon" || e === "polyline") {
|
|
78
|
-
const s = c.match(/\bpoints\s*=\s*["']([^"']+)["']/i);
|
|
79
|
-
s && (d.d = v(s[1]));
|
|
80
|
-
} else if (e === "line") {
|
|
81
|
-
const s = (r) => {
|
|
82
|
-
const u = c.match(new RegExp(`\\b${r}\\s*=\\s*["']?(-?[\\d.]+)`, "i"));
|
|
83
|
-
return u ? Number(u[1]) : 0;
|
|
84
|
-
};
|
|
85
|
-
d.d = _(s("x1"), s("y1"), s("x2"), s("y2"));
|
|
86
|
-
} else if (e === "rect") {
|
|
87
|
-
const s = (b) => {
|
|
88
|
-
const m = c.match(new RegExp(`\\b${b}\\s*=\\s*["']?(-?[\\d.]+)`, "i"));
|
|
89
|
-
return m ? Number(m[1]) : 0;
|
|
90
|
-
}, r = s("x"), u = s("y"), h = s("width"), x = s("height");
|
|
91
|
-
d.d = `M ${r} ${u} L ${r + h} ${u} L ${r + h} ${u + x} L ${r} ${u + x} Z`;
|
|
92
|
-
} else if (e === "g") {
|
|
93
|
-
const s = i[3] ?? "", r = [], u = /<(path|polygon|polyline|line|rect)\b([^>]*)\/?>/gi;
|
|
94
|
-
let h;
|
|
95
|
-
for (; (h = u.exec(s)) !== null; ) {
|
|
96
|
-
const x = h[1].toLowerCase(), b = h[2] ?? "";
|
|
97
|
-
if (x === "path") {
|
|
98
|
-
const m = b.match(/\bd\s*=\s*["']([^"']+)["']/i);
|
|
99
|
-
m && r.push(m[1]);
|
|
100
|
-
} else if (x === "polygon" || x === "polyline") {
|
|
101
|
-
const m = b.match(/\bpoints\s*=\s*["']([^"']+)["']/i);
|
|
102
|
-
m && r.push(v(m[1]));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
r.length > 0 && (d.d = r.join(" "));
|
|
106
|
-
}
|
|
107
|
-
(d.d || e === "g") && a.push(d);
|
|
108
|
-
}
|
|
109
|
-
return { viewbox: o, elements: a, routePathDs: l };
|
|
110
|
-
}
|
|
111
|
-
function N(n) {
|
|
112
|
-
return n.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 80);
|
|
113
|
-
}
|
|
114
|
-
function O(n, t = "floor") {
|
|
115
|
-
const o = C(n), a = [], l = [], p = [], i = [], e = [];
|
|
116
|
-
let c = 0, k = 0, f = 0;
|
|
117
|
-
for (const g of o.elements) {
|
|
118
|
-
let { kind: d, guessed: s } = L(g.id, t);
|
|
119
|
-
g.interactive && !d && (d = "unit", s = !0);
|
|
120
|
-
const r = {
|
|
121
|
-
sourceSvgId: g.id,
|
|
122
|
-
kind: d,
|
|
123
|
-
guessed: s
|
|
124
|
-
};
|
|
125
|
-
if (!d) {
|
|
126
|
-
l.push(g.id), r.message = "No matching prefix; skipped", a.push(r);
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
if (!g.d) {
|
|
130
|
-
i.push(`Element ${g.id} has no drawable geometry`);
|
|
131
|
-
continue;
|
|
132
|
-
}
|
|
133
|
-
s && (p.push(r), r.message = "Guessed kind from interactive/fallback rule"), a.push(r), d === "walkable" && c++, d === "void" && k++, d === "unit" && f++;
|
|
134
|
-
const u = w([g.d], o.viewbox, !0), h = I(u);
|
|
135
|
-
e.push({
|
|
136
|
-
key: N(g.id),
|
|
137
|
-
kind: d,
|
|
138
|
-
geometry: u,
|
|
139
|
-
bbox: h,
|
|
140
|
-
sourceSvgId: g.id,
|
|
141
|
-
style: {}
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
return t === "floor" && c === 0 && i.push(
|
|
145
|
-
"No walkable layer found — auto-skeleton will be unavailable for this level"
|
|
146
|
-
), {
|
|
147
|
-
report: {
|
|
148
|
-
classified: a,
|
|
149
|
-
unrecognized: l,
|
|
150
|
-
guessed: p,
|
|
151
|
-
walkableCount: c,
|
|
152
|
-
voidCount: k,
|
|
153
|
-
unitCount: f,
|
|
154
|
-
warnings: i
|
|
155
|
-
},
|
|
156
|
-
shapes: e,
|
|
157
|
-
viewbox: o.viewbox,
|
|
158
|
-
routePathDs: o.routePathDs
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
function T(n, t, o) {
|
|
162
|
-
const a = new Map(
|
|
163
|
-
t.filter((i) => i.sourceSvgId).map((i) => [i.sourceSvgId, i])
|
|
164
|
-
), l = /* @__PURE__ */ new Set(), p = [];
|
|
165
|
-
for (const i of n) {
|
|
166
|
-
const e = a.get(i.sourceSvgId);
|
|
167
|
-
l.add(i.sourceSvgId), e ? e.kind !== i.kind ? p.push({
|
|
168
|
-
sourceSvgId: i.sourceSvgId,
|
|
169
|
-
change: "kind_changed",
|
|
170
|
-
existingShapeId: e.id,
|
|
171
|
-
existingKind: e.kind,
|
|
172
|
-
newKind: i.kind,
|
|
173
|
-
preserve: { key: e.key, assignment: !0, anchors: !0 }
|
|
174
|
-
}) : p.push({
|
|
175
|
-
sourceSvgId: i.sourceSvgId,
|
|
176
|
-
change: "unchanged",
|
|
177
|
-
existingShapeId: e.id,
|
|
178
|
-
existingKind: e.kind,
|
|
179
|
-
newKind: i.kind,
|
|
180
|
-
preserve: { key: e.key, assignment: !0, anchors: !0 }
|
|
181
|
-
}) : p.push({
|
|
182
|
-
sourceSvgId: i.sourceSvgId,
|
|
183
|
-
change: "added",
|
|
184
|
-
newKind: i.kind
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
for (const i of t)
|
|
188
|
-
i.sourceSvgId && !l.has(i.sourceSvgId) && p.push({
|
|
189
|
-
sourceSvgId: i.sourceSvgId,
|
|
190
|
-
change: "removed",
|
|
191
|
-
existingShapeId: i.id,
|
|
192
|
-
existingKind: i.kind
|
|
193
|
-
});
|
|
194
|
-
return {
|
|
195
|
-
items: p,
|
|
196
|
-
shapes: n,
|
|
197
|
-
viewbox: o
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
function F(n) {
|
|
201
|
-
const t = { ...S, ...n.theme }, o = new Map(
|
|
202
|
-
n.assignments.map((e) => [e.shapeId, e])
|
|
203
|
-
), a = n.resolveSvgUrl ?? ((e) => e), l = n.levels.filter((e) => e.isActive).sort((e, c) => e.ordering - c.ordering).map((e) => {
|
|
204
|
-
const c = n.shapes.filter((f) => f.levelId === e.id).map((f) => ({
|
|
205
|
-
...f,
|
|
206
|
-
assignment: o.get(f.id) ?? null
|
|
207
|
-
})), k = n.anchors.filter((f) => f.levelId === e.id);
|
|
208
|
-
return {
|
|
209
|
-
id: e.id,
|
|
210
|
-
buildingId: e.buildingId,
|
|
211
|
-
kind: e.kind,
|
|
212
|
-
name: e.name,
|
|
213
|
-
levelIndex: e.levelIndex,
|
|
214
|
-
ordering: e.ordering,
|
|
215
|
-
sourceSvgUrl: a(e.sourceSvgKey),
|
|
216
|
-
viewbox: e.sourceViewbox,
|
|
217
|
-
transform: e.transform,
|
|
218
|
-
shapes: c,
|
|
219
|
-
anchors: k
|
|
220
|
-
};
|
|
221
|
-
}), { nodes: p, edges: i } = E(
|
|
222
|
-
n.anchors,
|
|
223
|
-
n.edges,
|
|
224
|
-
n.connectors
|
|
225
|
-
);
|
|
226
|
-
return {
|
|
227
|
-
version: 2,
|
|
228
|
-
revisionId: n.revisionId,
|
|
229
|
-
revisionNumber: n.revisionNumber,
|
|
230
|
-
centerId: n.centerId,
|
|
231
|
-
mapId: n.mapId,
|
|
232
|
-
theme: t,
|
|
233
|
-
baseSvgUrl: n.baseSvgUrl,
|
|
234
|
-
baseViewbox: n.baseViewbox,
|
|
235
|
-
buildings: n.buildings,
|
|
236
|
-
levels: l,
|
|
237
|
-
connectors: n.connectors,
|
|
238
|
-
amenities: n.amenities.filter((e) => e.isActive),
|
|
239
|
-
graph: { nodes: p, edges: i },
|
|
240
|
-
responsiveOverrides: n.responsiveOverrides,
|
|
241
|
-
publishedAt: n.publishedAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
242
|
-
};
|
|
243
|
-
}
|
|
1
|
+
import { D as s, a as o, F as r, I as t, b as i, c as n, d as l, S as p, W as m, e as d, f as c, g as S, h as u, i as h, j as L, k as y, l as I, m as T, n as P, o as A, p as g, q as f, r as b, s as v, t as E, u as R, v as D, w as _, x, y as F, z as w, A as O, B as C, C as N, E as B, G, H as M, J as H, K as k, L as z, M as U, N as V, O as Y, P as K, Q as W, R as j, T as q, U as Q, V as X, X as J, Y as Z, Z as $, _ as aa, $ as ea, a0 as sa, a1 as oa, a2 as ra, a3 as ta, a4 as ia, a5 as na, a6 as la, a7 as pa, a8 as ma, a9 as da, aa as ca, ab as Sa, ac as ua, ad as ha, ae as La, af as ya, ag as Ia, ah as Ta, ai as Pa, aj as Aa, ak as ga, al as fa, am as ba } from "../chunks/stacking.js";
|
|
2
|
+
import { a as Ea, b as Ra, c as Da, d as _a, f as xa, i as Fa, o as wa, r as Oa, u as Ca, w as Na } from "../chunks/graph-tools.js";
|
|
244
3
|
export {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
4
|
+
s as DEFAULT_THEME,
|
|
5
|
+
o as DEFAULT_WELD_TOLERANCE,
|
|
6
|
+
r as FLOOR_CHANGE_PENALTY,
|
|
7
|
+
t as IDENTITY_MATRIX,
|
|
8
|
+
i as IMPORT_DRIFT_THRESHOLD,
|
|
9
|
+
n as IMPORT_PERSISTED_KINDS,
|
|
10
|
+
l as INTERACTIVE_SHAPE_KINDS,
|
|
11
|
+
p as STATIC_LAYER_STYLES,
|
|
12
|
+
m as WALKING_PATH_COLOR,
|
|
13
|
+
d as angleFromWall,
|
|
14
|
+
c as applyMatrix,
|
|
15
|
+
S as approximateArc,
|
|
16
|
+
u as approximateCubic,
|
|
17
|
+
h as approximateQuadratic,
|
|
18
|
+
Ea as attachImportedRouteAnchors,
|
|
19
|
+
Ra as autoConnectUnitAnchor,
|
|
20
|
+
L as bboxOf,
|
|
21
|
+
y as bboxUnion,
|
|
22
|
+
I as boundsFromStackedLevels,
|
|
23
|
+
Da as buildAutoSkeleton,
|
|
24
|
+
T as buildGeometryFromPaths,
|
|
25
|
+
P as centroid,
|
|
26
|
+
A as clampStoreRadius,
|
|
27
|
+
g as classifyId,
|
|
28
|
+
_a as collapseDuplicateRouteGraph,
|
|
29
|
+
f as compareBuildingFloors,
|
|
30
|
+
b as compileDocument,
|
|
31
|
+
v as compileGraph,
|
|
32
|
+
E as defaultViewerLevelId,
|
|
33
|
+
R as diffImport,
|
|
34
|
+
D as distance,
|
|
35
|
+
_ as expandBounds,
|
|
36
|
+
x as filletPolygon,
|
|
37
|
+
F as findNearestAmenityPath,
|
|
38
|
+
w as findPath,
|
|
39
|
+
xa as findWeldCandidates,
|
|
40
|
+
O as flipY,
|
|
41
|
+
C as floorSwitcherDisplayLevels,
|
|
42
|
+
N as floorSwitcherLevels,
|
|
43
|
+
B as geometryBBox,
|
|
44
|
+
G as geometryCentroid,
|
|
45
|
+
Fa as importRoutePaths,
|
|
46
|
+
M as importSvg,
|
|
47
|
+
H as inlineSvgStyles,
|
|
48
|
+
k as isGeometrySpaceStale,
|
|
49
|
+
z as isIdentityMatrix,
|
|
50
|
+
U as isInteractiveGroupLabel,
|
|
51
|
+
V as isLayerContainerLabel,
|
|
52
|
+
Y as isMapViewerHost,
|
|
53
|
+
K as isNonInteractiveGroupLabel,
|
|
54
|
+
W as isOutdoorLevel,
|
|
55
|
+
j as isRouteFolderLabel,
|
|
56
|
+
q as isRoutePathLabel,
|
|
57
|
+
Q as isStoreFolderLabel,
|
|
58
|
+
X as mapSurface,
|
|
59
|
+
J as mergePresentationStyle,
|
|
60
|
+
Z as mergeTheme,
|
|
61
|
+
$ as multiplyMatrix,
|
|
62
|
+
aa as nearestPointOnPolyline,
|
|
63
|
+
ea as normalizeGeometrySpace,
|
|
64
|
+
sa as normalizeLayerLabel,
|
|
65
|
+
oa as normalizeLayerName,
|
|
66
|
+
ra as normalizePublishedDocument,
|
|
67
|
+
wa as outdoorDecorationFromSvg,
|
|
68
|
+
ta as parseSvgString,
|
|
69
|
+
ia as parseTransform,
|
|
70
|
+
na as parseViewBox,
|
|
71
|
+
la as pathToPolygons,
|
|
72
|
+
pa as pointInPolygon,
|
|
73
|
+
ma as pointInPolygons,
|
|
74
|
+
da as projectOntoSegment,
|
|
75
|
+
ca as readPresentationStyle,
|
|
76
|
+
Sa as resolveFetchUrl,
|
|
77
|
+
ua as resolveLayerStyle,
|
|
78
|
+
Oa as routeAnchorKindForShape,
|
|
79
|
+
ha as shouldShowFloorSwitcher,
|
|
80
|
+
La as snapAngle,
|
|
81
|
+
ya as svgIdsOwnedByShapes,
|
|
82
|
+
Ia as tokenizePathData,
|
|
83
|
+
Ta as transformPathD,
|
|
84
|
+
Pa as unionViewBox,
|
|
85
|
+
Aa as uniqueClosedRing,
|
|
86
|
+
Ca as unitAnchorFromShape,
|
|
87
|
+
ga as viewBoxToBounds,
|
|
88
|
+
fa as viewerChrome,
|
|
89
|
+
ba as viewerLevelStack,
|
|
90
|
+
Na as weldAnchors
|
|
281
91
|
};
|
|
282
92
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/core/import/index.ts","../../src/core/publish/index.ts"],"sourcesContent":["import type {\n BBox,\n ImportClassification,\n ImportDiff,\n ImportDiffItem,\n ImportReport,\n ShapeGeometry,\n ShapeKind,\n ShapeStyle,\n ViewBox,\n} from '../types';\nimport {\n buildGeometryFromPaths,\n geometryBBox,\n parseViewBox,\n} from '../geometry';\n\n/** Prefix → shape kind for floor SVGs. */\nconst FLOOR_PREFIXES: Array<{ prefix: string; kind: ShapeKind }> = [\n { prefix: 'walkable', kind: 'walkable' },\n { prefix: 'void', kind: 'void' },\n { prefix: 'unit', kind: 'unit' },\n { prefix: 'store', kind: 'unit' }, // v1 compatibility\n { prefix: 'wall', kind: 'wall' },\n { prefix: 'boundary', kind: 'boundary' },\n { prefix: 'outer-wall', kind: 'wall' },\n { prefix: 'amenity-', kind: 'amenity' },\n { prefix: 'kiosk-', kind: 'kiosk_screen' },\n { prefix: 'escalator-', kind: 'connector' },\n { prefix: 'elevator-', kind: 'connector' },\n { prefix: 'stairs-', kind: 'connector' },\n { prefix: 'entrance-', kind: 'entrance' },\n { prefix: 'zone-', kind: 'zone' },\n { prefix: 'label-', kind: 'label' },\n { prefix: 'floorplate', kind: 'floorplate' },\n { prefix: 'base', kind: 'floorplate' },\n { prefix: 'decor', kind: 'decor' },\n { prefix: 'special-shape', kind: 'decor' },\n { prefix: 'overlay', kind: 'decor' },\n];\n\n/** Prefix → shape kind for outdoor / base layer. */\nconst BASE_PREFIXES: Array<{ prefix: string; kind: ShapeKind }> = [\n { prefix: 'parking-zone', kind: 'parking_zone' },\n { prefix: 'parking-lane', kind: 'parking_zone' },\n { prefix: 'parking-line', kind: 'decor' },\n { prefix: 'parking-icon', kind: 'parking_icon' },\n { prefix: 'green-area', kind: 'green_area' },\n { prefix: 'water', kind: 'water' },\n { prefix: 'decor', kind: 'decor' },\n { prefix: 'entrance-', kind: 'entrance' },\n { prefix: 'unit', kind: 'unit' },\n { prefix: 'store', kind: 'unit' },\n { prefix: 'interactive-', kind: 'unit' },\n { prefix: 'walkable', kind: 'walkable' },\n { prefix: 'amenity-', kind: 'amenity' },\n];\n\n/** v1 route-path lines are imported as route geometry, not shapes. */\nconst ROUTE_PATH_PREFIX = 'route-path';\n\nexport interface RawSvgElement {\n id: string;\n tag: string;\n d?: string;\n points?: string;\n x1?: number;\n y1?: number;\n x2?: number;\n y2?: number;\n interactive?: boolean;\n}\n\nexport interface ParsedSvg {\n viewbox: ViewBox | null;\n elements: RawSvgElement[];\n routePathDs: string[];\n}\n\nexport function classifyId(\n id: string,\n mode: 'floor' | 'base' = 'floor',\n): { kind: ShapeKind | null; guessed: boolean } {\n const lower = id.toLowerCase();\n const table = mode === 'base' ? BASE_PREFIXES : FLOOR_PREFIXES;\n for (const { prefix, kind } of table) {\n if (lower === prefix || lower.startsWith(prefix)) {\n return { kind, guessed: false };\n }\n }\n // interactive-* or data-interactive attribute handled by caller\n if (lower.startsWith('interactive')) {\n return { kind: 'unit', guessed: true };\n }\n return { kind: null, guessed: false };\n}\n\nfunction pointsToPath(points: string): string {\n const nums = points.trim().split(/[\\s,]+/).map(Number);\n if (nums.length < 4) return '';\n let d = `M ${nums[0]} ${nums[1]}`;\n for (let i = 2; i < nums.length; i += 2) {\n d += ` L ${nums[i]} ${nums[i + 1]}`;\n }\n d += ' Z';\n return d;\n}\n\nfunction lineToPath(x1: number, y1: number, x2: number, y2: number): string {\n return `M ${x1} ${y1} L ${x2} ${y2}`;\n}\n\n/**\n * Lightweight SVG string parser — no DOM required (works in Node).\n * Extracts elements with id attributes and path-like geometry.\n */\nexport function parseSvgString(svg: string): ParsedSvg {\n const viewboxMatch = svg.match(/viewBox\\s*=\\s*[\"']([^\"']+)[\"']/i);\n const viewbox = parseViewBox(viewboxMatch?.[1]);\n\n const elements: RawSvgElement[] = [];\n const routePathDs: string[] = [];\n\n // Match tagged elements that may carry an id\n const tagRe =\n /<(path|polygon|polyline|line|rect|g)\\b([^>]*)(?:\\/>|>([\\s\\S]*?)<\\/\\1>)/gi;\n let match: RegExpExecArray | null;\n while ((match = tagRe.exec(svg)) !== null) {\n const tag = match[1].toLowerCase();\n const attrs = match[2] ?? '';\n const idMatch = attrs.match(/\\bid\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (!idMatch) continue;\n const id = idMatch[1];\n const interactive = /\\bdata-interactive\\s*=\\s*[\"']?(true|1|yes)/i.test(attrs);\n\n if (id.toLowerCase().startsWith(ROUTE_PATH_PREFIX)) {\n const dMatch = attrs.match(/\\bd\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (dMatch) routePathDs.push(dMatch[1]);\n const pointsMatch = attrs.match(/\\bpoints\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (pointsMatch) routePathDs.push(pointsToPath(pointsMatch[1]).replace(/ Z$/, ''));\n continue;\n }\n\n const el: RawSvgElement = { id, tag, interactive };\n\n if (tag === 'path') {\n const dMatch = attrs.match(/\\bd\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (dMatch) el.d = dMatch[1];\n } else if (tag === 'polygon' || tag === 'polyline') {\n const pointsMatch = attrs.match(/\\bpoints\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (pointsMatch) el.d = pointsToPath(pointsMatch[1]);\n } else if (tag === 'line') {\n const num = (name: string) => {\n const m = attrs.match(new RegExp(`\\\\b${name}\\\\s*=\\\\s*[\"']?(-?[\\\\d.]+)`, 'i'));\n return m ? Number(m[1]) : 0;\n };\n el.d = lineToPath(num('x1'), num('y1'), num('x2'), num('y2'));\n } else if (tag === 'rect') {\n const num = (name: string) => {\n const m = attrs.match(new RegExp(`\\\\b${name}\\\\s*=\\\\s*[\"']?(-?[\\\\d.]+)`, 'i'));\n return m ? Number(m[1]) : 0;\n };\n const x = num('x');\n const y = num('y');\n const w = num('width');\n const h = num('height');\n el.d = `M ${x} ${y} L ${x + w} ${y} L ${x + w} ${y + h} L ${x} ${y + h} Z`;\n } else if (tag === 'g') {\n // Collect child paths under this group id\n const inner = match[3] ?? '';\n const childPaths: string[] = [];\n const childRe = /<(path|polygon|polyline|line|rect)\\b([^>]*)\\/?>/gi;\n let cm: RegExpExecArray | null;\n while ((cm = childRe.exec(inner)) !== null) {\n const ctag = cm[1].toLowerCase();\n const cattrs = cm[2] ?? '';\n if (ctag === 'path') {\n const dm = cattrs.match(/\\bd\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (dm) childPaths.push(dm[1]);\n } else if (ctag === 'polygon' || ctag === 'polyline') {\n const pm = cattrs.match(/\\bpoints\\s*=\\s*[\"']([^\"']+)[\"']/i);\n if (pm) childPaths.push(pointsToPath(pm[1]));\n }\n }\n if (childPaths.length > 0) {\n el.d = childPaths.join(' ');\n }\n }\n\n if (el.d || tag === 'g') {\n elements.push(el);\n }\n }\n\n return { viewbox, elements, routePathDs };\n}\n\nexport interface ImportedShapeDraft {\n key: string;\n kind: ShapeKind;\n geometry: ShapeGeometry;\n bbox: BBox;\n sourceSvgId: string;\n style: ShapeStyle;\n}\n\nfunction slugKey(id: string): string {\n return id\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-|-$/g, '')\n .slice(0, 80);\n}\n\nexport function importSvg(\n svg: string,\n mode: 'floor' | 'base' = 'floor',\n): { report: ImportReport; shapes: ImportedShapeDraft[]; viewbox: ViewBox | null; routePathDs: string[] } {\n const parsed = parseSvgString(svg);\n const classified: ImportClassification[] = [];\n const unrecognized: string[] = [];\n const guessed: ImportClassification[] = [];\n const warnings: string[] = [];\n const shapes: ImportedShapeDraft[] = [];\n\n let walkableCount = 0;\n let voidCount = 0;\n let unitCount = 0;\n\n for (const el of parsed.elements) {\n let { kind, guessed: isGuessed } = classifyId(el.id, mode);\n if (el.interactive && !kind) {\n kind = 'unit';\n isGuessed = true;\n }\n\n const entry: ImportClassification = {\n sourceSvgId: el.id,\n kind,\n guessed: isGuessed,\n };\n\n if (!kind) {\n unrecognized.push(el.id);\n entry.message = 'No matching prefix; skipped';\n classified.push(entry);\n continue;\n }\n\n if (!el.d) {\n warnings.push(`Element ${el.id} has no drawable geometry`);\n continue;\n }\n\n if (isGuessed) {\n guessed.push(entry);\n entry.message = 'Guessed kind from interactive/fallback rule';\n }\n classified.push(entry);\n\n if (kind === 'walkable') walkableCount++;\n if (kind === 'void') voidCount++;\n if (kind === 'unit') unitCount++;\n\n const geometry = buildGeometryFromPaths([el.d], parsed.viewbox, true);\n const bbox = geometryBBox(geometry);\n\n shapes.push({\n key: slugKey(el.id),\n kind,\n geometry,\n bbox,\n sourceSvgId: el.id,\n style: {},\n });\n }\n\n if (mode === 'floor' && walkableCount === 0) {\n warnings.push(\n 'No walkable layer found — auto-skeleton will be unavailable for this level',\n );\n }\n\n return {\n report: {\n classified,\n unrecognized,\n guessed,\n walkableCount,\n voidCount,\n unitCount,\n warnings,\n },\n shapes,\n viewbox: parsed.viewbox,\n routePathDs: parsed.routePathDs,\n };\n}\n\nexport interface ExistingShapeRef {\n id: number;\n sourceSvgId: string | null;\n kind: ShapeKind;\n key: string;\n}\n\n/**\n * Diff newly imported shapes against existing level shapes by source_svg_id.\n */\nexport function diffImport(\n imported: ImportedShapeDraft[],\n existing: ExistingShapeRef[],\n viewbox: ViewBox | null,\n): ImportDiff {\n const existingBySource = new Map(\n existing\n .filter((e) => e.sourceSvgId)\n .map((e) => [e.sourceSvgId as string, e]),\n );\n const seen = new Set<string>();\n const items: ImportDiffItem[] = [];\n\n for (const shape of imported) {\n const prev = existingBySource.get(shape.sourceSvgId);\n seen.add(shape.sourceSvgId);\n if (!prev) {\n items.push({\n sourceSvgId: shape.sourceSvgId,\n change: 'added',\n newKind: shape.kind,\n });\n } else if (prev.kind !== shape.kind) {\n items.push({\n sourceSvgId: shape.sourceSvgId,\n change: 'kind_changed',\n existingShapeId: prev.id,\n existingKind: prev.kind,\n newKind: shape.kind,\n preserve: { key: prev.key, assignment: true, anchors: true },\n });\n } else {\n items.push({\n sourceSvgId: shape.sourceSvgId,\n change: 'unchanged',\n existingShapeId: prev.id,\n existingKind: prev.kind,\n newKind: shape.kind,\n preserve: { key: prev.key, assignment: true, anchors: true },\n });\n }\n }\n\n for (const prev of existing) {\n if (prev.sourceSvgId && !seen.has(prev.sourceSvgId)) {\n items.push({\n sourceSvgId: prev.sourceSvgId,\n change: 'removed',\n existingShapeId: prev.id,\n existingKind: prev.kind,\n });\n }\n }\n\n return {\n items,\n shapes: imported,\n viewbox,\n };\n}\n","import type {\n CmAmenityCatalogItem,\n CmAnchor,\n CmBuilding,\n CmConnector,\n CmLevel,\n CmResponsiveOverride,\n CmRouteEdge,\n CmShape,\n CmShapeAssignment,\n PublishedDocument,\n ThemeDefaults,\n ViewBox,\n} from '../types';\nimport { DEFAULT_THEME } from '../types';\nimport { compileGraph } from '../routing/pathfinding';\n\nexport interface PublishInput {\n revisionId: number;\n revisionNumber: number;\n centerId: number;\n mapId: number;\n theme: Partial<ThemeDefaults>;\n baseSvgUrl: string | null;\n baseViewbox: ViewBox | null;\n buildings: CmBuilding[];\n levels: CmLevel[];\n shapes: CmShape[];\n assignments: CmShapeAssignment[];\n anchors: CmAnchor[];\n edges: CmRouteEdge[];\n connectors: CmConnector[];\n amenities: CmAmenityCatalogItem[];\n responsiveOverrides: CmResponsiveOverride[];\n /** Resolve S3 key → CDN URL for level source SVGs. */\n resolveSvgUrl?: (key: string | null) => string | null;\n publishedAt?: string;\n}\n\n/**\n * Compile draft rows into an immutable published document.\n * Used by both the admin publish endpoint and the draft preview (?draft=1).\n */\nexport function compileDocument(input: PublishInput): PublishedDocument {\n const theme: ThemeDefaults = { ...DEFAULT_THEME, ...input.theme };\n const assignmentByShape = new Map(\n input.assignments.map((a) => [a.shapeId, a]),\n );\n const resolve = input.resolveSvgUrl ?? ((k: string | null) => k);\n\n const levels = input.levels\n .filter((l) => l.isActive)\n .sort((a, b) => a.ordering - b.ordering)\n .map((level) => {\n const levelShapes = input.shapes\n .filter((s) => s.levelId === level.id)\n .map((s) => ({\n ...s,\n assignment: assignmentByShape.get(s.id) ?? null,\n }));\n const levelAnchors = input.anchors.filter((a) => a.levelId === level.id);\n return {\n id: level.id,\n buildingId: level.buildingId,\n kind: level.kind,\n name: level.name,\n levelIndex: level.levelIndex,\n ordering: level.ordering,\n sourceSvgUrl: resolve(level.sourceSvgKey),\n viewbox: level.sourceViewbox,\n transform: level.transform,\n shapes: levelShapes,\n anchors: levelAnchors,\n };\n });\n\n const { nodes, edges } = compileGraph(\n input.anchors,\n input.edges,\n input.connectors,\n );\n\n return {\n version: 2,\n revisionId: input.revisionId,\n revisionNumber: input.revisionNumber,\n centerId: input.centerId,\n mapId: input.mapId,\n theme,\n baseSvgUrl: input.baseSvgUrl,\n baseViewbox: input.baseViewbox,\n buildings: input.buildings,\n levels,\n connectors: input.connectors,\n amenities: input.amenities.filter((a) => a.isActive),\n graph: { nodes, edges },\n responsiveOverrides: input.responsiveOverrides,\n publishedAt: input.publishedAt ?? new Date().toISOString(),\n };\n}\n"],"names":["FLOOR_PREFIXES","BASE_PREFIXES","ROUTE_PATH_PREFIX","classifyId","id","mode","lower","table","prefix","kind","pointsToPath","points","nums","d","i","lineToPath","x1","y1","x2","y2","parseSvgString","svg","viewboxMatch","viewbox","parseViewBox","elements","routePathDs","tagRe","match","tag","attrs","idMatch","interactive","dMatch","pointsMatch","el","num","name","m","x","y","w","h","inner","childPaths","childRe","cm","ctag","cattrs","dm","pm","slugKey","importSvg","parsed","classified","unrecognized","guessed","warnings","shapes","walkableCount","voidCount","unitCount","isGuessed","entry","geometry","buildGeometryFromPaths","bbox","geometryBBox","diffImport","imported","existing","existingBySource","e","seen","items","shape","prev","compileDocument","input","theme","DEFAULT_THEME","assignmentByShape","a","resolve","k","levels","l","b","level","levelShapes","s","levelAnchors","nodes","edges","compileGraph"],"mappings":";;;AAkBA,MAAMA,IAA6D;AAAA,EACjE,EAAE,QAAQ,YAAY,MAAM,WAAA;AAAA,EAC5B,EAAE,QAAQ,QAAQ,MAAM,OAAA;AAAA,EACxB,EAAE,QAAQ,QAAQ,MAAM,OAAA;AAAA,EACxB,EAAE,QAAQ,SAAS,MAAM,OAAA;AAAA;AAAA,EACzB,EAAE,QAAQ,QAAQ,MAAM,OAAA;AAAA,EACxB,EAAE,QAAQ,YAAY,MAAM,WAAA;AAAA,EAC5B,EAAE,QAAQ,cAAc,MAAM,OAAA;AAAA,EAC9B,EAAE,QAAQ,YAAY,MAAM,UAAA;AAAA,EAC5B,EAAE,QAAQ,UAAU,MAAM,eAAA;AAAA,EAC1B,EAAE,QAAQ,cAAc,MAAM,YAAA;AAAA,EAC9B,EAAE,QAAQ,aAAa,MAAM,YAAA;AAAA,EAC7B,EAAE,QAAQ,WAAW,MAAM,YAAA;AAAA,EAC3B,EAAE,QAAQ,aAAa,MAAM,WAAA;AAAA,EAC7B,EAAE,QAAQ,SAAS,MAAM,OAAA;AAAA,EACzB,EAAE,QAAQ,UAAU,MAAM,QAAA;AAAA,EAC1B,EAAE,QAAQ,cAAc,MAAM,aAAA;AAAA,EAC9B,EAAE,QAAQ,QAAQ,MAAM,aAAA;AAAA,EACxB,EAAE,QAAQ,SAAS,MAAM,QAAA;AAAA,EACzB,EAAE,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
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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`.
|
|
5
|
+
*/
|
|
6
|
+
export interface StaticLayerStyle {
|
|
7
|
+
fill?: string;
|
|
8
|
+
stroke?: string;
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
renderOrder: number;
|
|
11
|
+
extrudeHeight?: number;
|
|
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 locks the same hex.
|
|
16
|
+
*/
|
|
17
|
+
export declare const WALKING_PATH_COLOR = "#E9F7FC";
|
|
18
|
+
/**
|
|
19
|
+
* Prefix → house style. Matching is normalized so `parking-lane`,
|
|
20
|
+
* `parking_lane`, and `parking-lanes` all resolve to the same entry.
|
|
21
|
+
*/
|
|
22
|
+
export declare const STATIC_LAYER_STYLES: Record<string, StaticLayerStyle>;
|
|
23
|
+
/** Collapse punctuation so `parking_lane_2` and `parking-lanes` compare as words. */
|
|
24
|
+
export declare function normalizeLayerName(label: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve a static house style from an SVG element / group id.
|
|
27
|
+
* Returns null when the name is not a reserved decoration layer.
|
|
28
|
+
*
|
|
29
|
+
* Matches when the normalized name equals the key, starts with the key as a
|
|
30
|
+
* word (`parking lane 2`), or is a simple plural (`parking lanes`).
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveLayerStyle(layerName: string | null | undefined): StaticLayerStyle | null;
|
|
33
|
+
/**
|
|
34
|
+
* sourceSvgId values the live outdoor SVG should skip because `cm_shapes`
|
|
35
|
+
* already owns them. Static house layers stay in the SVG so walking-path
|
|
36
|
+
* (and parking / green) keep their code colors even when an older import
|
|
37
|
+
* also persisted a walkable row.
|
|
38
|
+
*/
|
|
39
|
+
export declare function svgIdsOwnedByShapes(shapes: Iterable<{
|
|
40
|
+
sourceSvgId?: string | null;
|
|
41
|
+
}>, options?: {
|
|
42
|
+
omitStaticLayers?: boolean;
|
|
43
|
+
}): Set<string>;
|
|
44
|
+
//# sourceMappingURL=layerStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerStyles.d.ts","sourceRoot":"","sources":["../../src/core/layerStyles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAgChE,CAAC;AAEF,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMxD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,gBAAgB,GAAG,IAAI,CAgB/F;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"}
|
|
@@ -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>): 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,GAChC,qBAAqB,EAAE,CAyBzB"}
|
|
@@ -21,8 +21,14 @@ export interface PublishInput {
|
|
|
21
21
|
publishedAt?: string;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Compile
|
|
25
|
-
* Used by
|
|
24
|
+
* Compile live cm_* rows into the current production document.
|
|
25
|
+
* Used by Save Changes (overwrite-in-place) and draft preview (?draft=1).
|
|
26
26
|
*/
|
|
27
27
|
export declare function compileDocument(input: PublishInput): PublishedDocument;
|
|
28
|
+
/**
|
|
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.
|
|
32
|
+
*/
|
|
33
|
+
export declare function normalizePublishedDocument(doc: PublishedDocument): PublishedDocument;
|
|
28
34
|
//# 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;
|
|
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;IAC3B,UAAU,EAAE,MAAM,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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