@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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ShapeGeometry, ShapeLabel, Vec2, ViewBox } from '../core';
|
|
2
|
+
export declare const DEFAULT_LABEL_TEXT = "Text";
|
|
3
|
+
export declare function isTextLabel(shape: {
|
|
4
|
+
kind: string;
|
|
5
|
+
label?: {
|
|
6
|
+
text?: string;
|
|
7
|
+
} | null;
|
|
8
|
+
}): boolean;
|
|
9
|
+
export declare function defaultLabelSize(viewbox: ViewBox): number;
|
|
10
|
+
export declare function textLabelPolygon(origin: Vec2, text: string, size: number): Vec2[];
|
|
11
|
+
export declare function textLabelGeometry(origin: Vec2, text: string, size: number): ShapeGeometry;
|
|
12
|
+
export declare function defaultTextLabel(text: string, size: number, color?: string): ShapeLabel;
|
|
13
|
+
/** Keep the box anchored at the current bottom-left when the string changes. */
|
|
14
|
+
export declare function geometryForLabelText(geometry: ShapeGeometry, text: string, size: number): ShapeGeometry;
|
|
15
|
+
//# sourceMappingURL=labelText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelText.d.ts","sourceRoot":"","sources":["../../src/editor/labelText.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIxE,eAAO,MAAM,kBAAkB,SAAS,CAAC;AAEzC,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAClC,GAAG,OAAO,CAEV;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEzD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,CAUjF;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,IAAI,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,aAAa,CAEf;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAOvF;AAED,gFAAgF;AAChF,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,aAAa,CAGf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ShapeKind, UnitStatus } from '../core';
|
|
2
|
+
export declare const SHAPE_KIND_LABELS: Record<ShapeKind, string>;
|
|
3
|
+
export declare const UNIT_STATUS_LABELS: Record<UnitStatus, string>;
|
|
4
|
+
export declare function shapeKindLabel(kind: string): string;
|
|
5
|
+
//# sourceMappingURL=labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/editor/labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAkBvD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKzD,CAAC;AAEF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BatchOp, CmShape } from '../../core';
|
|
3
|
+
import { ConnectorPlanContext, VerticalRailKind } from '../connectorAssignments';
|
|
4
|
+
export interface ConnectorAssignProps {
|
|
5
|
+
shape: CmShape;
|
|
6
|
+
railKind: VerticalRailKind;
|
|
7
|
+
ctx: ConnectorPlanContext;
|
|
8
|
+
canEdit: boolean;
|
|
9
|
+
onApplyOps: (ops: BatchOp[]) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function ConnectorAssign({ shape, railKind, ctx, canEdit, onApplyOps, }: ConnectorAssignProps): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=ConnectorAssign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectorAssign.d.ts","sourceRoot":"","sources":["../../../src/editor/panels/ConnectorAssign.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAQL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,GAAG,EAAE,oBAAoB,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACtC;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,GAAG,EACH,OAAO,EACP,UAAU,GACX,EAAE,oBAAoB,qBAqNtB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CmBuilding, CmLevel } from '../../core';
|
|
3
|
+
export type CreateLevelInput = {
|
|
4
|
+
name: string;
|
|
5
|
+
kind: 'outdoor' | 'floor';
|
|
6
|
+
buildingId?: number | null;
|
|
7
|
+
file?: File;
|
|
8
|
+
onProgress?: (percent: number) => void;
|
|
9
|
+
};
|
|
10
|
+
export type UpdateLevelInput = {
|
|
11
|
+
levelId: number;
|
|
12
|
+
name?: string;
|
|
13
|
+
file?: File;
|
|
14
|
+
onProgress?: (percent: number) => void;
|
|
15
|
+
};
|
|
16
|
+
export type FloorsScreen = {
|
|
17
|
+
mode: 'list';
|
|
18
|
+
} | {
|
|
19
|
+
mode: 'add-base';
|
|
20
|
+
} | {
|
|
21
|
+
mode: 'add-floor';
|
|
22
|
+
} | {
|
|
23
|
+
mode: 'edit';
|
|
24
|
+
levelId: number;
|
|
25
|
+
};
|
|
26
|
+
export declare function floorsScreenTitle(screen: FloorsScreen, levels: Array<{
|
|
27
|
+
id: number;
|
|
28
|
+
kind: string;
|
|
29
|
+
}>): string;
|
|
30
|
+
/** Building floors only — Outdoor is a separate item and is not counted. */
|
|
31
|
+
export declare function visibleFloorCount(levels: Array<{
|
|
32
|
+
kind: string;
|
|
33
|
+
}>): number;
|
|
34
|
+
/** Insert `movedId` before or after `targetId`. Used by live floor reorder. */
|
|
35
|
+
export declare function placeLevelId(ids: number[], movedId: number, targetId: number, place: 'before' | 'after'): number[];
|
|
36
|
+
/** Move `movedId` to `toIndex` in the list with that id removed. */
|
|
37
|
+
export declare function moveLevelId(ids: number[], movedId: number, toIndex: number): number[];
|
|
38
|
+
/** Slot index from pointer Y. Uses the list box, not live row midpoints. */
|
|
39
|
+
export declare function insertIndexFromY(clientY: number, listTop: number, rowHeight: number, count: number): number;
|
|
40
|
+
/** Overlay Y for the drop line. Null when the item would stay put. */
|
|
41
|
+
export declare function dropLineTop(fromIndex: number, dropIndex: number, rowHeight: number, rowInnerHeight: number): number | null;
|
|
42
|
+
export interface FloorsPanelProps {
|
|
43
|
+
levels: CmLevel[];
|
|
44
|
+
buildings: CmBuilding[];
|
|
45
|
+
/** Shapes already imported per level — drives delete and re-import copy. */
|
|
46
|
+
levelShapeCounts?: Record<number, number>;
|
|
47
|
+
canFloors: boolean;
|
|
48
|
+
screen: FloorsScreen;
|
|
49
|
+
onScreenChange: (screen: FloorsScreen) => void;
|
|
50
|
+
onCreateLevel?: (input: CreateLevelInput) => Promise<number | void>;
|
|
51
|
+
onUpdateLevel?: (input: UpdateLevelInput) => Promise<void>;
|
|
52
|
+
onDeleteLevel?: (levelId: number) => Promise<void>;
|
|
53
|
+
onReorderLevels?: (orderedIds: number[]) => Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
export declare function deleteConfirmCopy(level: {
|
|
56
|
+
kind: string;
|
|
57
|
+
name: string;
|
|
58
|
+
}, shapeCount?: number): {
|
|
59
|
+
title: string;
|
|
60
|
+
body: string;
|
|
61
|
+
action: string;
|
|
62
|
+
};
|
|
63
|
+
export declare function FloorsPanel({ levels, buildings, levelShapeCounts, canFloors, screen, onScreenChange, onCreateLevel, onUpdateLevel, onDeleteLevel, onReorderLevels, }: FloorsPanelProps): React.JSX.Element;
|
|
64
|
+
//# sourceMappingURL=FloorsPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloorsPanel.d.ts","sourceRoot":"","sources":["../../../src/editor/panels/FloorsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAyB,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAElF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GAC1C,MAAM,CAQR;AAED,4EAA4E;AAC5E,wBAAg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AAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3D;AAsDD,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACrC,UAAU,SAAI;;;;EAYf;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,MAAM,EACN,cAAc,EACd,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,GAChB,EAAE,gBAAgB,qBAouBlB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ImportDiff } from '../../core';
|
|
3
|
+
export interface ImportReviewProps {
|
|
4
|
+
diff: ImportDiff;
|
|
5
|
+
viewBoxChanged?: boolean;
|
|
6
|
+
blockedMessage?: string | null;
|
|
7
|
+
busy?: boolean;
|
|
8
|
+
onApply: (payload: {
|
|
9
|
+
acceptAll: boolean;
|
|
10
|
+
remap: Array<{
|
|
11
|
+
fromShapeId: number;
|
|
12
|
+
toSourceSvgId: string;
|
|
13
|
+
}>;
|
|
14
|
+
}) => Promise<void> | void;
|
|
15
|
+
onCancel?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Outdoor (or floor) re-upload review — shows added / orphaned / locked / drifted
|
|
19
|
+
* buckets before apply. Host wires POST .../import + .../import/apply.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ImportReviewPanel({ diff, viewBoxChanged, blockedMessage, busy, onApply, onCancel, }: ImportReviewProps): React.JSX.Element;
|
|
22
|
+
//# sourceMappingURL=ImportReviewPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportReviewPanel.d.ts","sourceRoot":"","sources":["../../../src/editor/panels/ImportReviewPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,YAAY,CAAC;AAG7D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,CAAC,OAAO,EAAE;QACjB,SAAS,EAAE,OAAO,CAAC;QACnB,KAAK,EAAE,KAAK,CAAC;YAAE,WAAW,EAAE,MAAM,CAAC;YAAC,aAAa,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC9D,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAiBD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,cAAsB,EACtB,cAAc,EACd,IAAY,EACZ,OAAO,EACP,QAAQ,GACT,EAAE,iBAAiB,qBAuJnB"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CmAmenityCatalogItem, CmShape, CmShapeAssignment, ShapeKind } from '../../core';
|
|
2
|
+
import { CmAmenityCatalogItem, CmShape, CmShapeAssignment, ShapeKind, ShapeLabel } from '../../core';
|
|
3
3
|
export interface InspectorProps {
|
|
4
4
|
shape: CmShape | null;
|
|
5
5
|
assignment: CmShapeAssignment | null;
|
|
6
6
|
amenities: CmAmenityCatalogItem[];
|
|
7
|
+
/** Other shape keys on the same level — used for uniqueness validation. */
|
|
8
|
+
levelShapeKeys?: string[];
|
|
7
9
|
canEdit: boolean;
|
|
8
10
|
onRename: (key: string) => void;
|
|
9
11
|
onChangeKind: (kind: ShapeKind) => void;
|
|
12
|
+
onDelete?: () => void;
|
|
10
13
|
onSaveAssignment: (assignment: CmShapeAssignment) => void;
|
|
11
|
-
|
|
14
|
+
onUpdateLabel?: (label: ShapeLabel) => void;
|
|
12
15
|
}
|
|
13
|
-
export declare function Inspector({ shape, assignment, amenities, canEdit, onRename, onChangeKind, onSaveAssignment,
|
|
16
|
+
export declare function Inspector({ shape, assignment, amenities, levelShapeKeys, canEdit, onRename, onChangeKind, onDelete, onSaveAssignment, onUpdateLabel, }: InspectorProps): React.JSX.Element;
|
|
14
17
|
//# sourceMappingURL=Inspector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inspector.d.ts","sourceRoot":"","sources":["../../../src/editor/panels/Inspector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EACV,oBAAoB,EACpB,OAAO,EACP,iBAAiB,EACjB,SAAS,
|
|
1
|
+
{"version":3,"file":"Inspector.d.ts","sourceRoot":"","sources":["../../../src/editor/panels/Inspector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EACV,oBAAoB,EACpB,OAAO,EACP,iBAAiB,EACjB,SAAS,EACT,UAAU,EAEX,MAAM,YAAY,CAAC;AAOpB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACtB,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,2EAA2E;IAC3E,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,YAAY,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,gBAAgB,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CAC7C;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,UAAU,EACV,SAAS,EACT,cAAmB,EACnB,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,aAAa,GACd,EAAE,cAAc,qBAoPhB"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { CmAmenityCatalogItem, CmLevel, CmBuilding, ThemeDefaults } from '../../core';
|
|
3
|
-
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { CmAmenityCatalogItem, CmAnchor, CmConnector, CmLevel, CmBuilding, CmShapeAssignment, ThemeDefaults } from '../../core';
|
|
3
|
+
import { CreateLevelInput, UpdateLevelInput } from './FloorsPanel';
|
|
4
|
+
export type RailSection = 'floors' | 'stores' | 'amenities' | 'kiosks' | 'escalators' | 'elevators' | 'paths' | 'style' | 'selection' | 'unassigned' | 'edit-map' | 'wayfinding';
|
|
5
|
+
/** @deprecated Use RailSection */
|
|
6
|
+
export type RailTab = RailSection;
|
|
4
7
|
export interface LeftRailDraft {
|
|
5
8
|
buildings: CmBuilding[];
|
|
6
9
|
levels: CmLevel[];
|
|
@@ -9,28 +12,40 @@ export interface LeftRailDraft {
|
|
|
9
12
|
levelId: number;
|
|
10
13
|
key: string;
|
|
11
14
|
kind: string;
|
|
15
|
+
sourceSvgId?: string | null;
|
|
16
|
+
orphanedAt?: string | null;
|
|
12
17
|
}>;
|
|
13
|
-
anchors: Array<
|
|
14
|
-
id: number;
|
|
15
|
-
levelId: number;
|
|
16
|
-
}>;
|
|
18
|
+
anchors: Array<Pick<CmAnchor, 'id' | 'levelId' | 'shapeId' | 'connectorId'>>;
|
|
17
19
|
edges: Array<{
|
|
18
20
|
id: number;
|
|
19
21
|
}>;
|
|
22
|
+
connectors: CmConnector[];
|
|
20
23
|
amenities: CmAmenityCatalogItem[];
|
|
24
|
+
assignments: CmShapeAssignment[];
|
|
21
25
|
}
|
|
22
26
|
export interface LeftRailProps {
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
section: RailSection | null;
|
|
28
|
+
onSectionChange: (section: RailSection | null) => void;
|
|
25
29
|
draft: LeftRailDraft;
|
|
26
30
|
activeLevelId: number | null;
|
|
27
|
-
|
|
31
|
+
selectedShapeId: number | null;
|
|
32
|
+
onSelectShape: (id: number) => void;
|
|
28
33
|
canFloors: boolean;
|
|
29
34
|
canSettings: boolean;
|
|
30
35
|
onImportSvg?: (levelId: number, file: File) => Promise<void>;
|
|
36
|
+
onCreateLevel?: (input: CreateLevelInput) => Promise<number | void>;
|
|
37
|
+
onUpdateLevel?: (input: UpdateLevelInput) => Promise<void>;
|
|
38
|
+
onDeleteLevel?: (levelId: number) => Promise<void>;
|
|
39
|
+
onReorderLevels?: (orderedIds: number[]) => Promise<void>;
|
|
31
40
|
onAutoroute?: (levelId: number) => Promise<void>;
|
|
32
41
|
theme: ThemeDefaults;
|
|
33
42
|
onThemeChange: (partial: Partial<ThemeDefaults>) => void;
|
|
43
|
+
assignPanel: ReactNode;
|
|
44
|
+
/** Draw/tools UI for Edit Map (icons + inspector). */
|
|
45
|
+
editMapPanel?: ReactNode;
|
|
46
|
+
/** Route tools and path stats for Wayfinding. */
|
|
47
|
+
wayfindingPanel?: ReactNode;
|
|
48
|
+
footer?: ReactNode;
|
|
34
49
|
}
|
|
35
|
-
export declare function LeftRail({
|
|
50
|
+
export declare function LeftRail({ section, onSectionChange, draft, activeLevelId, selectedShapeId, onSelectShape, canFloors, canSettings, onCreateLevel, onUpdateLevel, onDeleteLevel, onReorderLevels, onAutoroute, theme, onThemeChange, assignPanel, editMapPanel, wayfindingPanel, footer, }: LeftRailProps): React.JSX.Element;
|
|
36
51
|
//# sourceMappingURL=LeftRail.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeftRail.d.ts","sourceRoot":"","sources":["../../../src/editor/panels/LeftRail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LeftRail.d.ts","sourceRoot":"","sources":["../../../src/editor/panels/LeftRail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,aAAa,EACnB,MAAM,YAAY,CAAC;AASpB,OAAO,EAIL,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,OAAO,GACP,OAAO,GACP,WAAW,GACX,YAAY,GACZ,UAAU,GACV,YAAY,CAAC;AAEjB,kCAAkC;AAClC,MAAM,MAAM,OAAO,GAAG,WAAW,CAAC;AAElC,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,MAAM,EAAE,KAAK,CAAC;QACZ,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B,CAAC,CAAC;IACH,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa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AAa,CAAC,KAAK,IAAI,CAAC;IACzD,WAAW,EAAE,SAAS,CAAC;IACvB,sDAAsD;IACtD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,iDAAiD;IACjD,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AA6UD,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EACP,eAAe,EACf,KAAK,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,SAAS,EACT,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,WAAW,EACX,KAAK,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,eAAe,EACf,MAAM,GACP,EAAE,aAAa,qBA8cf"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { PublishedDocument } from '../../core';
|
|
3
|
-
export declare function PreviewOverlay({ document }: {
|
|
2
|
+
import { MapViewerHost, PublishedDocument } from '../../core';
|
|
3
|
+
export declare function PreviewOverlay({ document, host, onSelectShape, activeLevelId, onActiveLevelChange, routeOnSelect, imageProxyUrl, }: {
|
|
4
4
|
document: PublishedDocument;
|
|
5
|
+
/** Assign mode hides search. Public preview can be added later as WEBSITE. */
|
|
6
|
+
host?: Extract<MapViewerHost, 'PORTAL_ASSIGN' | 'WEBSITE'>;
|
|
7
|
+
onSelectShape?: (shapeId: number) => void;
|
|
8
|
+
activeLevelId?: number | null;
|
|
9
|
+
onActiveLevelChange?: (levelId: number) => void;
|
|
10
|
+
/** Default true (public navigate). False when assigning in PORTAL. */
|
|
11
|
+
routeOnSelect?: boolean;
|
|
12
|
+
/** Without this the outdoor SVG is fetched cross-origin and CORS blocks it. */
|
|
13
|
+
imageProxyUrl?: string | null;
|
|
5
14
|
}): React.JSX.Element;
|
|
6
15
|
//# sourceMappingURL=PreviewOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewOverlay.d.ts","sourceRoot":"","sources":["../../../src/editor/panels/PreviewOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"PreviewOverlay.d.ts","sourceRoot":"","sources":["../../../src/editor/panels/PreviewOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGnE,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,IAAsB,EACtB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,aAAa,GACd,EAAE;IACD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE,eAAe,GAAG,SAAS,CAAC,CAAC;IAC3D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,sEAAsE;IACtE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,qBAiBA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ShapeGeometry, Vec2 } from '../core';
|
|
2
|
+
export type PathEdge = {
|
|
3
|
+
kind: 'line';
|
|
4
|
+
} | {
|
|
5
|
+
kind: 'cubic';
|
|
6
|
+
c1: Vec2;
|
|
7
|
+
c2: Vec2;
|
|
8
|
+
};
|
|
9
|
+
/** One closed or open subpath as corner anchors + one edge between each pair. */
|
|
10
|
+
export interface PathRing {
|
|
11
|
+
closed: boolean;
|
|
12
|
+
anchors: Vec2[];
|
|
13
|
+
/** `edges[i]` runs from `anchors[i]` to the next anchor (wraps when closed). */
|
|
14
|
+
edges: PathEdge[];
|
|
15
|
+
}
|
|
16
|
+
export declare function vecEq(a: Vec2, b: Vec2, eps?: number): boolean;
|
|
17
|
+
export declare function cloneVec(p: Vec2): Vec2;
|
|
18
|
+
export declare function addVec(a: Vec2, b: Vec2): Vec2;
|
|
19
|
+
export declare function subVec(a: Vec2, b: Vec2): Vec2;
|
|
20
|
+
export declare function scaleVec(a: Vec2, s: number): Vec2;
|
|
21
|
+
export declare function lerpVec(a: Vec2, b: Vec2, t: number): Vec2;
|
|
22
|
+
export declare function edgeCount(ring: PathRing): number;
|
|
23
|
+
export declare function edgeFrom(ring: PathRing, edgeIndex: number): Vec2;
|
|
24
|
+
export declare function edgeTo(ring: PathRing, edgeIndex: number): Vec2;
|
|
25
|
+
export declare function edgeToPathD(ring: PathRing, edgeIndex: number): string;
|
|
26
|
+
export declare function fmtCoord(n: number): string;
|
|
27
|
+
export declare function ringFromPolygon(poly: Vec2[], closed?: boolean): PathRing;
|
|
28
|
+
/**
|
|
29
|
+
* Quadratic (p0, q, p2) → cubic handles.
|
|
30
|
+
*/
|
|
31
|
+
export declare function quadraticToCubic(p0: Vec2, q: Vec2, p2: Vec2): {
|
|
32
|
+
c1: Vec2;
|
|
33
|
+
c2: Vec2;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Symmetric cubic that passes through `pull` at t = 0.5.
|
|
37
|
+
* Used when the user drags a straight side into an arch.
|
|
38
|
+
*/
|
|
39
|
+
export declare function cubicHandlesForPull(from: Vec2, to: Vec2, pull: Vec2): {
|
|
40
|
+
c1: Vec2;
|
|
41
|
+
c2: Vec2;
|
|
42
|
+
};
|
|
43
|
+
export declare function cubicPoint(p0: Vec2, c1: Vec2, c2: Vec2, p3: Vec2, t: number): Vec2;
|
|
44
|
+
export declare function splitCubic(p0: Vec2, c1: Vec2, c2: Vec2, p3: Vec2, t: number): {
|
|
45
|
+
left: {
|
|
46
|
+
c1: Vec2;
|
|
47
|
+
c2: Vec2;
|
|
48
|
+
to: Vec2;
|
|
49
|
+
};
|
|
50
|
+
right: {
|
|
51
|
+
c1: Vec2;
|
|
52
|
+
c2: Vec2;
|
|
53
|
+
to: Vec2;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Split an SVG elliptical arc into cubics (one per ≤90° sweep) so Edit Map
|
|
58
|
+
* can treat each arch as two anchors + two handles.
|
|
59
|
+
*/
|
|
60
|
+
export declare function ellipticalArcToCubics(p0: Vec2, rx: number, ry: number, xAxisRotationDeg: number, largeArc: boolean, sweep: boolean, p1: Vec2): Array<{
|
|
61
|
+
c1: Vec2;
|
|
62
|
+
c2: Vec2;
|
|
63
|
+
to: Vec2;
|
|
64
|
+
}>;
|
|
65
|
+
export declare function parsePathToRings(d: string): PathRing[];
|
|
66
|
+
export declare function ringToPathD(ring: PathRing): string;
|
|
67
|
+
export declare function ringsToGeometry(rings: PathRing[]): ShapeGeometry;
|
|
68
|
+
/** A cubic whose bulge is much longer than its chord is a leftover loop, not an arch. */
|
|
69
|
+
export declare function cubicIsRunaway(from: Vec2, c1: Vec2, c2: Vec2, to: Vec2): boolean;
|
|
70
|
+
export declare function collapseLineRunsToCubics(ring: PathRing): PathRing;
|
|
71
|
+
export declare function geometryToRings(geometry: ShapeGeometry): PathRing[];
|
|
72
|
+
/** Closest point on one ring edge — keeps the add-anchor preview on the line. */
|
|
73
|
+
export declare function pointOnRingEdge(ring: PathRing, edgeIndex: number, point: Vec2): Vec2;
|
|
74
|
+
export declare function nearestTOnCubic(point: Vec2, p0: Vec2, c1: Vec2, c2: Vec2, p3: Vec2): {
|
|
75
|
+
t: number;
|
|
76
|
+
point: Vec2;
|
|
77
|
+
distance: number;
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=pathRings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1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
2
|
+
import { RailSection } from './panels/LeftRail';
|
|
3
|
+
/** What occupies the PORTAL center pane (rail is always Map options). */
|
|
4
|
+
export type PortalCenterSurface = 'viewer' | 'editor';
|
|
5
|
+
/** Geometry canvas: Edit Map (shapes) or Wayfinding (routes). */
|
|
6
|
+
export declare function isEditorSection(section: RailSection | null): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* PORTAL default is MapViewer (assign on the real map, no editor grid).
|
|
9
|
+
* Edit Map and Wayfinding swap in EditorCanvas + grid. Non-PORTAL editor
|
|
10
|
+
* hosts stay on the geometry canvas.
|
|
11
|
+
*/
|
|
12
|
+
export declare function portalCenterSurface(host: MapEditorHost, section: RailSection | null): PortalCenterSurface;
|
|
13
|
+
/** Building floors only — Outdoor is not routed. */
|
|
14
|
+
export declare function wayfindingSelectableLevels<T extends StackLevel>(levels: T[]): T[];
|
|
15
|
+
/** Floors in admin list order, then Outdoor at the bottom. */
|
|
16
|
+
export declare function editMapSelectableLevels<T extends StackLevel>(levels: T[]): T[];
|
|
17
|
+
/** Lowest building floor (bottom of the Floors list). */
|
|
18
|
+
export declare function defaultEditorFloorId(levels: StackLevel[]): number | null;
|
|
19
|
+
/**
|
|
20
|
+
* Wayfinding always opens on the ground floor (bottom of the Floors list),
|
|
21
|
+
* not Outdoor or the floor last used in Edit Map.
|
|
22
|
+
*/
|
|
23
|
+
export declare function levelIdOnEnterWayfinding(levels: StackLevel[]): number | null;
|
|
24
|
+
/** Edit Map opens on the lowest building floor; Outdoor only if there are no floors. */
|
|
25
|
+
export declare function levelIdOnEnterEditMap(levels: StackLevel[]): number | null;
|
|
26
|
+
/** Top-right floor switcher: floors, then Outdoor. Same list in Edit Map and Wayfinding. */
|
|
27
|
+
export declare function editorFloorControlLevels<T extends StackLevel & {
|
|
28
|
+
name: string;
|
|
29
|
+
}>(_section: RailSection | null, levels: T[]): Array<{
|
|
30
|
+
id: number;
|
|
31
|
+
name: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** Outdoor can be viewed in Wayfinding but routes and drawing stay off. */
|
|
34
|
+
export declare function wayfindingOutdoorReadOnly(section: RailSection | null, level: {
|
|
35
|
+
kind?: string;
|
|
36
|
+
} | null | undefined): boolean;
|
|
37
|
+
//# sourceMappingURL=portalSurface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portalSurface.d.ts","sourceRoot":"","sources":["../../src/editor/portalSurface.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,UAAU,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,yEAAyE;AACzE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtD,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,aAAa,EACnB,OAAO,EAAE,WAAW,GAAG,IAAI,GAC1B,mBAAmB,CAGrB;AAED,oDAAoD;AACpD,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEjF;AAED,8DAA8D;AAC9D,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAG9E;AAED,yDAAyD;AACzD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,IAAI,CAExE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,IAAI,CAM5E;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,GAAG,IAAI,CAMzE;AAED,4FAA4F;AAC5F,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAC9E,QAAQ,EAAE,WAAW,GAAG,IAAI,EAC5B,MAAM,EAAE,CAAC,EAAE,GACV,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAKrC;AAED,2EAA2E;AAC3E,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,KAAK,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAET"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CmConnector, PublishedDocument } from '../core';
|
|
2
|
+
import { EditorDraftState } from './draftOps';
|
|
3
|
+
export declare function compileEditorPreview(draft: EditorDraftState, extras?: {
|
|
4
|
+
revisionId?: number;
|
|
5
|
+
revisionNumber?: number;
|
|
6
|
+
connectors?: CmConnector[];
|
|
7
|
+
publishedAt?: string;
|
|
8
|
+
}): PublishedDocument;
|
|
9
|
+
//# sourceMappingURL=previewDocument.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"previewDocument.d.ts","sourceRoot":"","sources":["../../src/editor/previewDocument.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,gBAAgB,EACvB,MAAM,CAAC,EAAE;IACP,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GACA,iBAAiB,CA6BnB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CmShapeAssignment } from '../core';
|
|
2
|
+
export declare const ASSIGNABLE_SHAPE_KINDS: readonly ["unit", "parking_zone", "amenity", "kiosk_screen"];
|
|
3
|
+
export type AssignableShapeKind = (typeof ASSIGNABLE_SHAPE_KINDS)[number];
|
|
4
|
+
export type AssignmentLike = Pick<CmShapeAssignment, 'shapeId' | 'targetType' | 'retailerId' | 'amenityId' | 'kioskId'>;
|
|
5
|
+
export type AssignableShape = {
|
|
6
|
+
id: number;
|
|
7
|
+
kind: string;
|
|
8
|
+
orphanedAt?: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare function isAssignableKind(kind: string): kind is AssignableShapeKind;
|
|
11
|
+
export declare function isRetailerAssigned(assignment: AssignmentLike | null | undefined): boolean;
|
|
12
|
+
export declare function isAmenityAssigned(assignment: AssignmentLike | null | undefined): boolean;
|
|
13
|
+
export declare function isKioskAssigned(assignment: AssignmentLike | null | undefined): boolean;
|
|
14
|
+
export declare function isPolygonAssigned(assignment: AssignmentLike | null | undefined): boolean;
|
|
15
|
+
export declare function assignmentByShapeId(assignments: AssignmentLike[]): Map<number, AssignmentLike>;
|
|
16
|
+
/** Assigned store / amenity polygons, and assignable polygons with no link. */
|
|
17
|
+
export declare function railAssignmentGroups<T extends AssignableShape>(shapes: T[], assignments: AssignmentLike[]): {
|
|
18
|
+
stores: T[];
|
|
19
|
+
amenities: T[];
|
|
20
|
+
unassigned: T[];
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=railAssignments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"railAssignments.d.ts","sourceRoot":"","sources":["../../src/editor/railAssignments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,sBAAsB,8DAKzB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBA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AP_PX = 28;
|
|
3
|
+
/**
|
|
4
|
+
* One pick radius (CSS pixels) for wayfinding: the anchor dot, the + on a
|
|
5
|
+
* route, and click-to-connect. On-route and off-route use the same circle.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WAYFINDING_ANCHOR_HIT_PX = 10;
|
|
8
|
+
export declare function showsWayfinding(tool: string, routeMode?: boolean): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* First empty Create Route click is a preview. A second click commits both
|
|
11
|
+
* ends. Leaving the tool drops the draft so a lone start is never kept.
|
|
12
|
+
*/
|
|
13
|
+
/** Esc and Undo share this: a lone preview start is local; anything else undoes. */
|
|
14
|
+
export declare function routeSessionUndoKind(session: {
|
|
15
|
+
routeDraftPoint: Vec2 | null;
|
|
16
|
+
storeLinkPreview: unknown;
|
|
17
|
+
}): 'clear-only' | 'clear-and-undo';
|
|
18
|
+
export declare function beginOrContinueRouteDraft(draft: Vec2 | null, world: Vec2): {
|
|
19
|
+
nextDraft: Vec2 | null;
|
|
20
|
+
start: Vec2 | null;
|
|
21
|
+
end: Vec2 | null;
|
|
22
|
+
};
|
|
23
|
+
/** Preview line from a started route/store-link to the cursor or snap. */
|
|
24
|
+
export declare function routeRubberBand(from: Vec2 | null | undefined, to: Vec2 | null | undefined): {
|
|
25
|
+
from: Vec2;
|
|
26
|
+
to: Vec2;
|
|
27
|
+
} | null;
|
|
28
|
+
export declare function isWayfindingShape(kind: ShapeKind): boolean;
|
|
29
|
+
/** Outdoor pad sites are not routed — helpers and store links stay indoor. */
|
|
30
|
+
export declare function wayfindingLinksShapes(level: {
|
|
31
|
+
kind?: string;
|
|
32
|
+
} | null | undefined): boolean;
|
|
33
|
+
export declare function anchorKindForShape(kind: ShapeKind): AnchorKind;
|
|
34
|
+
export declare function shapeRoutePoint(shape: Pick<CmShape, 'geometry'>): Vec2;
|
|
35
|
+
export declare function shapeRouteAnchor(shapeId: number, anchors: Array<Pick<CmAnchor, 'id' | 'shapeId'>>): Pick<CmAnchor, 'id' | 'shapeId'> | undefined;
|
|
36
|
+
export declare function anchorHasEdge(anchorId: number, edges: Array<Pick<CmRouteEdge, 'fromAnchorId' | 'toAnchorId'>>): boolean;
|
|
37
|
+
export declare function walkEdgeExists(edges: Array<Pick<CmRouteEdge, 'fromAnchorId' | 'toAnchorId'>>, a: number, b: number): boolean;
|
|
38
|
+
export type RouteSnapTarget = {
|
|
39
|
+
type: 'junction';
|
|
40
|
+
anchorId: number;
|
|
41
|
+
point: Vec2;
|
|
42
|
+
distance: number;
|
|
43
|
+
} | {
|
|
44
|
+
type: 'edge';
|
|
45
|
+
edgeId: number;
|
|
46
|
+
fromAnchorId: number;
|
|
47
|
+
toAnchorId: number;
|
|
48
|
+
point: Vec2;
|
|
49
|
+
distance: number;
|
|
50
|
+
};
|
|
51
|
+
/** The orange point we are linking from — not every destination on that store. */
|
|
52
|
+
export declare function storeLinkOriginIds(anchors: Array<Pick<CmAnchor, 'id' | 'shapeId' | 'x' | 'y'>>, preview: {
|
|
53
|
+
shapeId: number;
|
|
54
|
+
origin: Vec2;
|
|
55
|
+
} | null | undefined): Set<number>;
|
|
56
|
+
/**
|
|
57
|
+
* Nearest route point or edge within `maxDist` (same circular hit on and off
|
|
58
|
+
* the path). An existing anchor wins only when the cursor is inside that
|
|
59
|
+
* circle; otherwise a mid-edge hit stays a split so the + can sit close to
|
|
60
|
+
* a neighboring point.
|
|
61
|
+
*/
|
|
62
|
+
export declare function nearestRouteSnap(point: Vec2, anchors: CmAnchor[], edges: CmRouteEdge[], excludeIds: ReadonlySet<number>, maxDist: number): RouteSnapTarget | null;
|
|
63
|
+
export interface ConnectShapeToRouteInput {
|
|
64
|
+
shape: CmShape;
|
|
65
|
+
anchors: CmAnchor[];
|
|
66
|
+
edges: CmRouteEdge[];
|
|
67
|
+
mapId: number;
|
|
68
|
+
from: Vec2;
|
|
69
|
+
drop: Vec2;
|
|
70
|
+
maxDist: number;
|
|
71
|
+
allocId: () => number;
|
|
72
|
+
}
|
|
73
|
+
/** Create a store/amenity route point at the click. Another click elsewhere adds another. */
|
|
74
|
+
export declare function ensureShapeRouteAnchorOps(input: {
|
|
75
|
+
shape: CmShape;
|
|
76
|
+
anchors: CmAnchor[];
|
|
77
|
+
allocId: () => number;
|
|
78
|
+
point?: Vec2;
|
|
79
|
+
}): {
|
|
80
|
+
ops: BatchOp[];
|
|
81
|
+
anchorId: number;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Ensure the shape has a destination anchor, then hook it to the walking path
|
|
85
|
+
* at `drop` (existing junction or a split in a walk edge).
|
|
86
|
+
*/
|
|
87
|
+
export declare function connectShapeToRouteOps(input: ConnectShapeToRouteInput): BatchOp[];
|
|
88
|
+
export declare function linkRouteAnchorsOp(mapId: number, fromAnchorId: number, toAnchorId: number, edges: Array<Pick<CmRouteEdge, 'fromAnchorId' | 'toAnchorId'>>, allocId: () => number): BatchOp | null;
|
|
89
|
+
export declare function insertJunctionOnWalkEdgeOps(input: {
|
|
90
|
+
levelId: number;
|
|
91
|
+
mapId: number;
|
|
92
|
+
edge: CmRouteEdge;
|
|
93
|
+
point: Vec2;
|
|
94
|
+
allocId: () => number;
|
|
95
|
+
}): {
|
|
96
|
+
ops: BatchOp[];
|
|
97
|
+
junctionId: number;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Remove a route point. A 2-way corridor is healed so the path stays joined.
|
|
101
|
+
*/
|
|
102
|
+
export declare function deleteRouteAnchorOps(anchorId: number, mapId: number, edges: CmRouteEdge[], allocId: () => number): BatchOp[];
|
|
103
|
+
//# sourceMappingURL=routeStubs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routeStubs.d.ts","sourceRoot":"","sources":["../../src/editor/routeStubs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,OAAO,EACP,SAAS,EACT,IAAI,EACL,MAAM,SAAS,CAAC;AAUjB,eA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AE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CA6BzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,EAAE,MAAM,MAAM,GACpB,OAAO,EAAE,CA4BX"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Vec2 } from '../core';
|
|
2
|
+
/** Closest candidate within `tol` world units, or null. */
|
|
3
|
+
export declare function nearestSnapPoint(point: Vec2, candidates: Vec2[], tol: number): Vec2 | null;
|
|
4
|
+
export declare function sameSnapPoint(a: Vec2 | null, b: Vec2 | null, eps?: number): boolean;
|
|
5
|
+
//# sourceMappingURL=snapPoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapPoint.d.ts","sourceRoot":"","sources":["../../src/editor/snapPoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,IAAI,EACX,UAAU,EAAE,IAAI,EAAE,EAClB,GAAG,EAAE,MAAM,GACV,IAAI,GAAG,IAAI,CASb;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,SAAO,GAAG,OAAO,CAGjF"}
|