@eyeon/map 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/MapViewer.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/chunks/MapViewer.js +2656 -1290
- package/dist/chunks/MapViewer.js.map +1 -1
- package/dist/chunks/stacking.js +1496 -873
- package/dist/chunks/stacking.js.map +1 -1
- package/dist/chunks/wheelZoom.js +259 -0
- package/dist/chunks/wheelZoom.js.map +1 -0
- package/dist/core/assignment.d.ts +97 -0
- package/dist/core/assignment.d.ts.map +1 -0
- package/dist/core/color.d.ts +5 -0
- package/dist/core/color.d.ts.map +1 -0
- package/dist/core/entranceIcon.d.ts +12 -0
- package/dist/core/entranceIcon.d.ts.map +1 -0
- package/dist/core/filletPolygon.d.ts +10 -0
- package/dist/core/filletPolygon.d.ts.map +1 -0
- package/dist/core/hostChrome.d.ts +2 -4
- package/dist/core/hostChrome.d.ts.map +1 -1
- package/dist/core/import/index.d.ts +4 -0
- package/dist/core/import/index.d.ts.map +1 -1
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +160 -219
- package/dist/core/index.js.map +1 -1
- package/dist/core/labelAlign.d.ts +7 -0
- package/dist/core/labelAlign.d.ts.map +1 -0
- package/dist/core/layerStyles.d.ts +54 -5
- package/dist/core/layerStyles.d.ts.map +1 -1
- 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 +6 -4
- package/dist/core/publish/index.d.ts.map +1 -1
- package/dist/core/routing/graph-tools.d.ts +23 -1
- 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 +50 -3
- package/dist/core/stacking.d.ts.map +1 -1
- package/dist/core/types.d.ts +34 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/voids.d.ts +41 -0
- package/dist/core/voids.d.ts.map +1 -0
- package/dist/core/wheelZoom.d.ts +30 -0
- package/dist/core/wheelZoom.d.ts.map +1 -0
- package/dist/editor/FieldResetButton.d.ts +7 -0
- package/dist/editor/FieldResetButton.d.ts.map +1 -0
- package/dist/editor/MapEditor.d.ts +13 -3
- package/dist/editor/MapEditor.d.ts.map +1 -1
- package/dist/editor/canvas/EditorCanvas.d.ts +49 -7
- package/dist/editor/canvas/EditorCanvas.d.ts.map +1 -1
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts +8 -0
- package/dist/editor/canvas/OutdoorSvgUnderlay.d.ts.map +1 -0
- package/dist/editor/canvas/coords.d.ts +56 -3
- package/dist/editor/canvas/coords.d.ts.map +1 -1
- package/dist/editor/canvas/editorFill.d.ts +12 -0
- package/dist/editor/canvas/editorFill.d.ts.map +1 -0
- package/dist/editor/canvas/editorHover.d.ts +18 -0
- package/dist/editor/canvas/editorHover.d.ts.map +1 -0
- package/dist/editor/canvas/underlayHint.d.ts +13 -0
- package/dist/editor/canvas/underlayHint.d.ts.map +1 -0
- package/dist/editor/connectorAssignments.d.ts +125 -0
- package/dist/editor/connectorAssignments.d.ts.map +1 -0
- package/dist/editor/draftOps.d.ts +12 -1
- package/dist/editor/draftOps.d.ts.map +1 -1
- package/dist/editor/editorSectionReturn.d.ts +12 -0
- package/dist/editor/editorSectionReturn.d.ts.map +1 -0
- package/dist/editor/ellipseDraw.d.ts +12 -0
- package/dist/editor/ellipseDraw.d.ts.map +1 -0
- package/dist/editor/entranceIcon.d.ts +15 -0
- package/dist/editor/entranceIcon.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 +23 -3
- package/dist/editor/geometryEdit.d.ts.map +1 -1
- package/dist/editor/hexColor.d.ts +6 -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 +1038 -68
- package/dist/editor/index.d.ts +6 -4
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/index.js +8744 -2136
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/labelText.d.ts +25 -0
- package/dist/editor/labelText.d.ts.map +1 -0
- package/dist/editor/labels.d.ts +8 -0
- package/dist/editor/labels.d.ts.map +1 -1
- package/dist/editor/panels/AssignForm.d.ts +17 -0
- package/dist/editor/panels/AssignForm.d.ts.map +1 -0
- package/dist/editor/panels/AssignmentStyleFields.d.ts +14 -0
- package/dist/editor/panels/AssignmentStyleFields.d.ts.map +1 -0
- package/dist/editor/panels/BulkAssignForm.d.ts +11 -0
- package/dist/editor/panels/BulkAssignForm.d.ts.map +1 -0
- package/dist/editor/panels/CatalogKioskForm.d.ts +18 -0
- package/dist/editor/panels/CatalogKioskForm.d.ts.map +1 -0
- package/dist/editor/panels/ConnectorAssign.d.ts +16 -0
- package/dist/editor/panels/ConnectorAssign.d.ts.map +1 -0
- package/dist/editor/panels/CopyToLevelButton.d.ts +10 -0
- package/dist/editor/panels/CopyToLevelButton.d.ts.map +1 -0
- package/dist/editor/panels/EntranceIconForm.d.ts +11 -0
- package/dist/editor/panels/EntranceIconForm.d.ts.map +1 -0
- package/dist/editor/panels/FloorsPanel.d.ts +4 -0
- package/dist/editor/panels/FloorsPanel.d.ts.map +1 -1
- package/dist/editor/panels/ImportReviewPanel.d.ts.map +1 -1
- package/dist/editor/panels/Inspector.d.ts +24 -2
- package/dist/editor/panels/Inspector.d.ts.map +1 -1
- package/dist/editor/panels/LeftRail.d.ts +24 -11
- package/dist/editor/panels/LeftRail.d.ts.map +1 -1
- package/dist/editor/panels/PreviewOverlay.d.ts +9 -3
- package/dist/editor/panels/PreviewOverlay.d.ts.map +1 -1
- package/dist/editor/panels/TextLabelForm.d.ts +11 -0
- package/dist/editor/panels/TextLabelForm.d.ts.map +1 -0
- package/dist/editor/panels/formRows.d.ts +41 -0
- package/dist/editor/panels/formRows.d.ts.map +1 -0
- package/dist/editor/pathRings.d.ts +79 -0
- package/dist/editor/pathRings.d.ts.map +1 -0
- package/dist/editor/portalSurface.d.ts +37 -3
- package/dist/editor/portalSurface.d.ts.map +1 -1
- package/dist/editor/previewDocument.d.ts +2 -1
- package/dist/editor/previewDocument.d.ts.map +1 -1
- package/dist/editor/railAssignments.d.ts +29 -0
- package/dist/editor/railAssignments.d.ts.map +1 -0
- package/dist/editor/railKiosks.d.ts +27 -0
- package/dist/editor/railKiosks.d.ts.map +1 -0
- package/dist/editor/railListCopy.d.ts +31 -0
- package/dist/editor/railListCopy.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/shapeCopy.d.ts +40 -0
- package/dist/editor/shapeCopy.d.ts.map +1 -0
- package/dist/editor/shapeSelection.d.ts +6 -0
- package/dist/editor/shapeSelection.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 +46 -7
- package/dist/editor/tools.d.ts.map +1 -1
- package/dist/fonts/assets.d.ts +4 -0
- package/dist/fonts/mapFont.d.ts +5 -0
- package/dist/fonts/mapFont.d.ts.map +1 -0
- package/dist/fonts/mapFontUrl.d.ts +8 -0
- package/dist/fonts/mapFontUrl.d.ts.map +1 -0
- package/dist/specialIcons.d.ts +39 -0
- package/dist/specialIcons.d.ts.map +1 -0
- package/dist/test-maps/shops-at-south-town/BASE - Shops At South Town.ai +6326 -6407
- package/dist/test-maps/shops-at-south-town/LF - Shops At South Town.ai +458 -484
- package/dist/test-maps/shops-at-south-town/SVG/BASE - Shops At South Town.svg +6 -6
- package/dist/test-maps/shops-at-south-town/SVG/LF - Shops At South Town.svg +52 -52
- package/dist/test-maps/shops-at-south-town/SVG/UF - Shops At South Town.svg +74 -74
- package/dist/test-maps/shops-at-south-town/UF - Shops At South Town.ai +341 -436
- package/dist/ui/ModernSelect.d.ts +14 -0
- package/dist/ui/ModernSelect.d.ts.map +1 -0
- package/dist/ui/selectSearch.d.ts +12 -0
- package/dist/ui/selectSearch.d.ts.map +1 -0
- package/dist/viewer/MapViewer.d.ts +14 -1
- package/dist/viewer/MapViewer.d.ts.map +1 -1
- package/dist/viewer/camera.d.ts +85 -1
- package/dist/viewer/camera.d.ts.map +1 -1
- package/dist/viewer/components/CameraRig.d.ts +18 -1
- package/dist/viewer/components/CameraRig.d.ts.map +1 -1
- package/dist/viewer/components/LevelMeshes.d.ts +15 -4
- package/dist/viewer/components/LevelMeshes.d.ts.map +1 -1
- package/dist/viewer/components/MapScene.d.ts +10 -4
- package/dist/viewer/components/MapScene.d.ts.map +1 -1
- package/dist/viewer/components/OpeningWell.d.ts +7 -0
- package/dist/viewer/components/OpeningWell.d.ts.map +1 -0
- package/dist/viewer/components/RouteLine.d.ts.map +1 -1
- package/dist/viewer/components/SvgVectorLayer.d.ts +5 -3
- package/dist/viewer/components/SvgVectorLayer.d.ts.map +1 -1
- package/dist/viewer/components/openingGeometry.d.ts +7 -0
- package/dist/viewer/components/openingGeometry.d.ts.map +1 -0
- package/dist/viewer/index.css +251 -9
- package/dist/viewer/index.d.ts +1 -1
- package/dist/viewer/index.d.ts.map +1 -1
- package/dist/viewer/index.js +5 -5
- package/dist/viewer/pointer.d.ts +26 -0
- package/dist/viewer/pointer.d.ts.map +1 -0
- package/dist/viewer/ui/MapControls.d.ts +11 -3
- package/dist/viewer/ui/MapControls.d.ts.map +1 -1
- package/dist/viewer/ui/RuntimeChrome.d.ts.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ShapeKind } from '../../core';
|
|
2
|
+
import { EditorTool } from '../tools';
|
|
3
|
+
/** Stores and other assignable items — pointer + highlight, not the pan hand. */
|
|
4
|
+
export declare function isHoverHighlightShape(kind: ShapeKind): boolean;
|
|
5
|
+
export declare function editorSelectCursor(args: {
|
|
6
|
+
tool: EditorTool;
|
|
7
|
+
selected: boolean;
|
|
8
|
+
highlightable: boolean;
|
|
9
|
+
dragging?: boolean;
|
|
10
|
+
/** Wayfinding: + cursor — click places an orange store destination. */
|
|
11
|
+
wayfinding?: boolean;
|
|
12
|
+
/** Map text placed with the Text tool. */
|
|
13
|
+
textLabel?: boolean;
|
|
14
|
+
/** Entrance stamp placed with the Entrance tool. */
|
|
15
|
+
entranceIcon?: boolean;
|
|
16
|
+
}): 'pointer' | 'grab' | 'grabbing' | 'cell' | undefined;
|
|
17
|
+
export declare function editorHoverFillOpacity(kind: ShapeKind, base: number, hovered: boolean): number;
|
|
18
|
+
//# sourceMappingURL=editorHover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorHover.d.ts","sourceRoot":"","sources":["../../../src/editor/canvas/editorHover.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAoC,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7E,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAE9D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oDAAoD;IACpD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAgBvD;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,GACf,MAAM,CAGR"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ShapeKind } from '../../core';
|
|
2
|
+
/** Outdoor underlay items that look clickable on a floor. */
|
|
3
|
+
export declare function isUnderlayHintShape(kind: ShapeKind): boolean;
|
|
4
|
+
/** Text and entrance hit-boxes stay on Outdoor — do not ghost them onto building floors. */
|
|
5
|
+
export declare function isUnderlayDrawnShape(shape: {
|
|
6
|
+
kind: string;
|
|
7
|
+
label?: {
|
|
8
|
+
text?: string;
|
|
9
|
+
imageKey?: string | null;
|
|
10
|
+
} | null;
|
|
11
|
+
}): boolean;
|
|
12
|
+
export declare function underlaySwitchHint(kind: ShapeKind): string;
|
|
13
|
+
//# sourceMappingURL=underlayHint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"underlayHint.d.ts","sourceRoot":"","sources":["../../../src/editor/canvas/underlayHint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAI5C,6DAA6D;AAC7D,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAE5D;AAED,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CAC5D,GAAG,OAAO,CAEV;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAW1D"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { BatchOp, CmAnchor, CmConnector, CmLevel, CmRouteEdge, CmShape, ConnectorDirection, ConnectorKind, Vec2 } from '../core';
|
|
2
|
+
export type VerticalRailKind = 'escalator' | 'elevator';
|
|
3
|
+
export interface ParsedConnectorSource {
|
|
4
|
+
family: ConnectorKind;
|
|
5
|
+
group: string;
|
|
6
|
+
direction?: 'up' | 'down';
|
|
7
|
+
role?: 'start' | 'end';
|
|
8
|
+
}
|
|
9
|
+
/** Parse v1-style ids: `escalator-5-up-start`, `elevator-2`. */
|
|
10
|
+
export declare function parseConnectorSourceId(value: string | null | undefined): ParsedConnectorSource | null;
|
|
11
|
+
export declare function guessConnectorKind(shape: {
|
|
12
|
+
kind: string;
|
|
13
|
+
key: string;
|
|
14
|
+
sourceSvgId?: string | null;
|
|
15
|
+
}): ConnectorKind | null;
|
|
16
|
+
export declare function connectorIdForShape(shapeId: number, anchors: Array<Pick<CmAnchor, 'shapeId' | 'connectorId'>>): number | null;
|
|
17
|
+
export declare function connectorForShape(shapeId: number, anchors: Array<Pick<CmAnchor, 'shapeId' | 'connectorId'>>, connectors: CmConnector[]): CmConnector | null;
|
|
18
|
+
export declare function resolvedConnectorKind(shape: {
|
|
19
|
+
id: number;
|
|
20
|
+
kind: string;
|
|
21
|
+
key: string;
|
|
22
|
+
sourceSvgId?: string | null;
|
|
23
|
+
}, anchors: Array<Pick<CmAnchor, 'shapeId' | 'connectorId'>>, connectors: CmConnector[]): ConnectorKind | null;
|
|
24
|
+
export declare function railConnectorShapes<T extends {
|
|
25
|
+
id: number;
|
|
26
|
+
kind: string;
|
|
27
|
+
key: string;
|
|
28
|
+
sourceSvgId?: string | null;
|
|
29
|
+
orphanedAt?: string | null;
|
|
30
|
+
}>(shapes: T[], kind: VerticalRailKind, anchors: Array<Pick<CmAnchor, 'shapeId' | 'connectorId'>>, connectors: CmConnector[]): T[];
|
|
31
|
+
export declare function landingAnchor(shapeId: number, anchors: CmAnchor[]): CmAnchor | undefined;
|
|
32
|
+
export declare function shapeLandingPoint(shape: Pick<CmShape, 'geometry'>): Vec2;
|
|
33
|
+
export declare function inferTravelDirection(fromLevelIndex: number, toLevelIndex: number, hint?: 'up' | 'down'): ConnectorDirection;
|
|
34
|
+
export declare function defaultConnectorName(kind: VerticalRailKind, shapes: Array<{
|
|
35
|
+
key: string;
|
|
36
|
+
sourceSvgId?: string | null;
|
|
37
|
+
}>): string;
|
|
38
|
+
export declare function nearestWalkAnchor(anchors: CmAnchor[], levelId: number, point: Vec2, excludeIds?: ReadonlySet<number>): CmAnchor | null;
|
|
39
|
+
export declare function memberShapeIds(connectorId: number, anchors: Array<Pick<CmAnchor, 'shapeId' | 'connectorId'>>): number[];
|
|
40
|
+
export type ConnectorEdgeLike = Pick<CmRouteEdge, 'kind' | 'directed' | 'fromAnchorId' | 'toAnchorId'>;
|
|
41
|
+
export type ConnectorAnchorLike = Pick<CmAnchor, 'id' | 'shapeId' | 'connectorId'>;
|
|
42
|
+
export declare function partnerShapesForConnector<T extends {
|
|
43
|
+
id: number;
|
|
44
|
+
}>(shapeId: number, anchors: ConnectorAnchorLike[], connectors: CmConnector[], shapes: T[]): T[];
|
|
45
|
+
export declare function levelsWithLandings<T extends {
|
|
46
|
+
levelId: number;
|
|
47
|
+
}>(landings: T[], levels: CmLevel[]): CmLevel[];
|
|
48
|
+
export declare function escalatorDirectedEnds<T extends {
|
|
49
|
+
id: number;
|
|
50
|
+
}>(connectorId: number, anchors: ConnectorAnchorLike[], edges: ConnectorEdgeLike[], shapes: T[]): {
|
|
51
|
+
from: T;
|
|
52
|
+
to: T;
|
|
53
|
+
} | null;
|
|
54
|
+
export type EscalatorRideEnds<T extends {
|
|
55
|
+
id: number;
|
|
56
|
+
key: string;
|
|
57
|
+
levelId: number;
|
|
58
|
+
}> = {
|
|
59
|
+
connectorId: number;
|
|
60
|
+
from: T;
|
|
61
|
+
to: T;
|
|
62
|
+
};
|
|
63
|
+
export type EscalatorRideLandingLine = {
|
|
64
|
+
shapeId: number;
|
|
65
|
+
key: string;
|
|
66
|
+
levelName: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* One sidebar row per linked ride. Boarding is `from`, exit is `to`.
|
|
70
|
+
* Unlinked landings are omitted — they stay in the Unassigned list.
|
|
71
|
+
*/
|
|
72
|
+
export declare function groupEscalatorRides<T extends {
|
|
73
|
+
id: number;
|
|
74
|
+
key: string;
|
|
75
|
+
levelId: number;
|
|
76
|
+
}>(connectors: Array<Pick<CmConnector, 'id' | 'kind'>>, anchors: ConnectorAnchorLike[], edges: ConnectorEdgeLike[], shapes: T[]): EscalatorRideEnds<T>[];
|
|
77
|
+
/** Boarding on top, exit below — each with its floor name. */
|
|
78
|
+
export declare function escalatorRideLandingLines<T extends {
|
|
79
|
+
id: number;
|
|
80
|
+
key: string;
|
|
81
|
+
levelId: number;
|
|
82
|
+
}>(ride: EscalatorRideEnds<T>, levels: Array<{
|
|
83
|
+
id: number;
|
|
84
|
+
name: string;
|
|
85
|
+
}>): [EscalatorRideLandingLine, EscalatorRideLandingLine];
|
|
86
|
+
/** Assigned-list title: boarding → exit (escalator) or floor landings ↔ (elevator). */
|
|
87
|
+
export declare function connectorRideLabel(shape: {
|
|
88
|
+
id: number;
|
|
89
|
+
key: string;
|
|
90
|
+
levelId: number;
|
|
91
|
+
}, anchors: ConnectorAnchorLike[], edges: ConnectorEdgeLike[], connectors: CmConnector[], shapes: Array<{
|
|
92
|
+
id: number;
|
|
93
|
+
key: string;
|
|
94
|
+
levelId: number;
|
|
95
|
+
}>, levels?: Array<{
|
|
96
|
+
id: number;
|
|
97
|
+
name: string;
|
|
98
|
+
ordering?: number;
|
|
99
|
+
levelIndex?: number;
|
|
100
|
+
}>): string | null;
|
|
101
|
+
export interface ConnectorPlanContext {
|
|
102
|
+
mapId: number;
|
|
103
|
+
levels: CmLevel[];
|
|
104
|
+
shapes: CmShape[];
|
|
105
|
+
anchors: CmAnchor[];
|
|
106
|
+
edges: CmRouteEdge[];
|
|
107
|
+
connectors: CmConnector[];
|
|
108
|
+
allocId: () => number;
|
|
109
|
+
}
|
|
110
|
+
export declare function buildUnlinkConnectorOps(ctx: ConnectorPlanContext, connectorId: number): BatchOp[];
|
|
111
|
+
export declare function buildEscalatorLinkOps(ctx: ConnectorPlanContext, fromShape: CmShape, toShape: CmShape, options?: {
|
|
112
|
+
name?: string;
|
|
113
|
+
direction?: 'up' | 'down';
|
|
114
|
+
}): BatchOp[];
|
|
115
|
+
export declare function buildElevatorShaftOps(ctx: ConnectorPlanContext, memberShapes: CmShape[], options?: {
|
|
116
|
+
name?: string;
|
|
117
|
+
accessible?: boolean;
|
|
118
|
+
connectorId?: number;
|
|
119
|
+
}): BatchOp[];
|
|
120
|
+
export declare function suggestEscalatorPairs(shapes: CmShape[], levels: CmLevel[], anchors: Array<Pick<CmAnchor, 'shapeId' | 'connectorId'>>): Array<{
|
|
121
|
+
fromShapeId: number;
|
|
122
|
+
toShapeId: number;
|
|
123
|
+
label: string;
|
|
124
|
+
}>;
|
|
125
|
+
//# sourceMappingURL=connectorAssignments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectorAssignments.d.ts","sourceRoot":"","sources":["../../src/editor/connectorAssignments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,OAAO,EACP,WAAW,EACX,OAAO,EACP,kBAAkB,EAClB,aAAa,EACb,IAAI,EACL,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,UAAU,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;CACxB;AAcD,gEAAgE;AAChE,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC/B,qBAAqB,GAAG,I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E,CAAC;IACrB,UAAU,EAAE,WAAW,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,MAAM,CAAC;CACvB;AA+FD,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,oBAAoB,EACzB,WAAW,EAAE,MAAM,GAClB,OAAO,EAAE,CAEX;AAED,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,oBAAoB,EACzB,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;CAAE,GACrD,OAAO,EAAE,CA0DX;AAED,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,oBAAoB,EACzB,YAAY,EAAE,OAAO,EAAE,EACvB,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACtE,OAAO,EAAE,CAkEX;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,EAAE,EACjB,MAAM,EAAE,OAAO,EAAE,EACjB,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,GAAG,aAAa,CAAC,CAAC,GACxD,KAAK,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAkClE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BatchOp, CmAmenityCatalogItem, CmAnchor, CmBuilding, CmLevel, CmRouteEdge, CmShape, CmShapeAssignment, ThemeDefaults } from '../core';
|
|
1
|
+
import { BatchOp, CmAmenityCatalogItem, CmAnchor, CmBuilding, CmConnector, CmLevel, CmRouteEdge, CmShape, CmShapeAssignment, ThemeDefaults } from '../core';
|
|
2
2
|
export interface EditorDraftState {
|
|
3
3
|
mapId: number;
|
|
4
4
|
centerId: number;
|
|
@@ -9,11 +9,22 @@ export interface EditorDraftState {
|
|
|
9
9
|
assignments: CmShapeAssignment[];
|
|
10
10
|
anchors: CmAnchor[];
|
|
11
11
|
edges: CmRouteEdge[];
|
|
12
|
+
connectors: CmConnector[];
|
|
12
13
|
amenities: CmAmenityCatalogItem[];
|
|
13
14
|
baseSvgUrl?: string | null;
|
|
14
15
|
}
|
|
16
|
+
/** True when another live shape already uses this ID on the floor. */
|
|
17
|
+
export declare function shapeKeyTakenOnLevel(shapes: Array<{
|
|
18
|
+
id: number;
|
|
19
|
+
levelId: number;
|
|
20
|
+
key: string;
|
|
21
|
+
orphanedAt?: string | null;
|
|
22
|
+
}>, shapeId: number, levelId: number, key: string): boolean;
|
|
15
23
|
export declare function applyDraftOp(draft: EditorDraftState, op: BatchOp): EditorDraftState;
|
|
24
|
+
/** Drop a floor/outdoor level and every draft row that lived on it. */
|
|
25
|
+
export declare function omitLevelFromDraft(draft: EditorDraftState, levelId: number): EditorDraftState;
|
|
16
26
|
export declare function applyDraftOps(draft: EditorDraftState, ops: BatchOp[]): EditorDraftState;
|
|
17
27
|
/** Collapse repeated updates to the same entity so Save Changes sends one op each. */
|
|
18
28
|
export declare function coalesceDraftOp(ops: BatchOp[], op: BatchOp): BatchOp[];
|
|
29
|
+
export declare function orderBatchOpsForPersist(ops: BatchOp[]): BatchOp[];
|
|
19
30
|
//# sourceMappingURL=draftOps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draftOps.d.ts","sourceRoot":"","sources":["../../src/editor/draftOps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAEP,oBAAoB,EACpB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,EACX,OAAO,EACP,iBAAiB,EAEjB,aAAa,EACd,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"draftOps.d.ts","sourceRoot":"","sources":["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B,EACvB,GAAG,EAAE,OAAO,EAAE,GACb,gBAAgB,CAMlB;AAiBD,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,OAAO,GAAG,OAAO,EAAE,CAmEtE;AA0BD,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAQjE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type RestoredEditorSection = {
|
|
2
|
+
section: 'edit-map' | 'wayfinding';
|
|
3
|
+
levelId: number | null;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Keep Edit Map / Wayfinding open across an in-page remount (save).
|
|
7
|
+
* Memory only — a full page refresh returns to Map options.
|
|
8
|
+
*/
|
|
9
|
+
export declare function markEditorSection(mapId: number, restored: RestoredEditorSection): void;
|
|
10
|
+
export declare function peekEditorSection(mapId: number): RestoredEditorSection | null;
|
|
11
|
+
export declare function clearEditorSection(mapId: number): void;
|
|
12
|
+
//# sourceMappingURL=editorSectionReturn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editorSectionReturn.d.ts","sourceRoot":"","sources":["../../src/editor/editorSectionReturn.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,UAAU,GAAG,YAAY,CAAC;IACnC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAYF;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,qBAAqB,GAC9B,IAAI,CAQN;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CAG7E;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAGtD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ShapeGeometry, Vec2 } from '../core';
|
|
2
|
+
export interface EllipseBounds {
|
|
3
|
+
cx: number;
|
|
4
|
+
cy: number;
|
|
5
|
+
rx: number;
|
|
6
|
+
ry: number;
|
|
7
|
+
}
|
|
8
|
+
/** Drag from corner `from` to `to`. Shift / lockCircle keeps rx === ry. */
|
|
9
|
+
export declare function ellipseBoundsFromDrag(from: Vec2, to: Vec2, lockCircle?: boolean): EllipseBounds;
|
|
10
|
+
export declare function ellipsePathD(bounds: EllipseBounds): string;
|
|
11
|
+
export declare function ellipseGeometry(from: Vec2, to: Vec2, lockCircle?: boolean): ShapeGeometry;
|
|
12
|
+
//# sourceMappingURL=ellipseDraw.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ellipseDraw.d.ts","sourceRoot":"","sources":["../../src/editor/ellipseDraw.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAGnD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,IAAI,EACR,UAAU,UAAQ,GACjB,aAAa,CAoBf;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAK1D;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,IAAI,EACR,UAAU,UAAQ,GACjB,aAAa,CAIf"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ShapeGeometry, ShapeLabel, Vec2, DEFAULT_ENTRANCE_SIZE, ENTRANCE_ICON_ID, clampEntranceSize, isEntranceIcon } from '../core';
|
|
2
|
+
export { DEFAULT_ENTRANCE_SIZE, ENTRANCE_ICON_ID, clampEntranceSize, isEntranceIcon, };
|
|
3
|
+
export declare function isStampShape(shape: {
|
|
4
|
+
kind: string;
|
|
5
|
+
label?: {
|
|
6
|
+
text?: string;
|
|
7
|
+
imageKey?: string | null;
|
|
8
|
+
} | null;
|
|
9
|
+
}): boolean;
|
|
10
|
+
export declare function defaultEntranceLabel(size: number, color?: string): ShapeLabel;
|
|
11
|
+
export declare function entranceIconPolygon(center: Vec2, size: number): Vec2[];
|
|
12
|
+
export declare function entranceIconGeometry(center: Vec2, size: number): ShapeGeometry;
|
|
13
|
+
/** Keep the icon centred when Size changes. */
|
|
14
|
+
export declare function geometryForEntranceIcon(geometry: ShapeGeometry, size: number): ShapeGeometry;
|
|
15
|
+
//# sourceMappingURL=entranceIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entranceIcon.d.ts","sourceRoot":"","sources":["../../src/editor/entranceIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EAEjB,cAAc,EACf,MAAM,SAAS,CAAC;AAIjB,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,GACf,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CAC5D,GAAG,OAAO,CAEV;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAO7E;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,CAQtE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,aAAa,CAE9E;AAED,+CAA+C;AAC/C,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,MAAM,GACX,aAAa,CAEf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Remember to reopen the floors list after a remount (reload after add). */
|
|
2
|
+
export declare function markReturnToFloorsList(mapId: number): void;
|
|
3
|
+
export declare function consumeReturnToFloorsList(mapId: number): boolean;
|
|
4
|
+
export declare function clearReturnToFloorsList(mapId: number): void;
|
|
5
|
+
//# sourceMappingURL=floorsListReturn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floorsListReturn.d.ts","sourceRoot":"","sources":["../../src/editor/floorsListReturn.ts"],"names":[],"mappings":"AAYA,6EAA6E;AAC7E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAG1D;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAKhE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAG3D"}
|
|
@@ -3,12 +3,19 @@ import { ShapeGeometry, Vec2, geometryBBox } from '../core';
|
|
|
3
3
|
export declare function polygonsToPathD(polygons: Vec2[][]): string;
|
|
4
4
|
export declare function polygonsToGeometry(polygons: Vec2[][]): ShapeGeometry;
|
|
5
5
|
export declare function translateGeometry(geometry: ShapeGeometry, dx: number, dy: number): ShapeGeometry;
|
|
6
|
+
/** Slide one side: both endpoints (and that edge's handles) move together. */
|
|
7
|
+
export declare function translateEdge(geometry: ShapeGeometry, ringIndex: number, edgeIndex: number, delta: Vec2): ShapeGeometry;
|
|
6
8
|
export declare function moveVertex(geometry: ShapeGeometry, polygonIndex: number, vertexIndex: number, point: Vec2): ShapeGeometry;
|
|
9
|
+
export declare function moveHandle(geometry: ShapeGeometry, ringIndex: number, edgeIndex: number, handle: 1 | 2, point: Vec2): ShapeGeometry;
|
|
10
|
+
/** Drop both handles so the arch becomes a straight side. */
|
|
11
|
+
export declare function flattenCubicEdge(geometry: ShapeGeometry, ringIndex: number, edgeIndex: number): ShapeGeometry;
|
|
12
|
+
/** Pull a straight side into a cubic arch (or reshape a cubic from its chord). */
|
|
13
|
+
export declare function bendEdgeToCubic(geometry: ShapeGeometry, ringIndex: number, edgeIndex: number, pull: Vec2): ShapeGeometry;
|
|
7
14
|
/**
|
|
8
15
|
* Insert a vertex after `vertexIndex` on the given ring (before the next point).
|
|
9
16
|
*/
|
|
10
17
|
export declare function insertVertex(geometry: ShapeGeometry, polygonIndex: number, afterVertexIndex: number, point: Vec2): ShapeGeometry;
|
|
11
|
-
/** Remove a vertex; refuses to go below 3 points on a ring. */
|
|
18
|
+
/** Remove a vertex; refuses to go below 3 points on a closed ring. */
|
|
12
19
|
export declare function removeVertex(geometry: ShapeGeometry, polygonIndex: number, vertexIndex: number): ShapeGeometry;
|
|
13
20
|
export interface VertexHit {
|
|
14
21
|
polygonIndex: number;
|
|
@@ -16,19 +23,32 @@ export interface VertexHit {
|
|
|
16
23
|
point: Vec2;
|
|
17
24
|
distance: number;
|
|
18
25
|
}
|
|
19
|
-
/** Nearest
|
|
26
|
+
/** Nearest path anchor within `tolerance` world units, or null. */
|
|
20
27
|
export declare function hitTestVertex(geometry: ShapeGeometry, point: Vec2, tolerance: number): VertexHit | null;
|
|
28
|
+
export interface HandleHit {
|
|
29
|
+
ringIndex: number;
|
|
30
|
+
edgeIndex: number;
|
|
31
|
+
handle: 1 | 2;
|
|
32
|
+
point: Vec2;
|
|
33
|
+
distance: number;
|
|
34
|
+
}
|
|
35
|
+
export declare function hitTestHandle(geometry: ShapeGeometry, point: Vec2, tolerance: number): HandleHit | null;
|
|
21
36
|
export interface EdgeHit {
|
|
22
37
|
polygonIndex: number;
|
|
23
38
|
/** Insert after this vertex index. */
|
|
24
39
|
afterVertexIndex: number;
|
|
25
40
|
point: Vec2;
|
|
26
41
|
distance: number;
|
|
42
|
+
kind: 'line' | 'cubic';
|
|
27
43
|
}
|
|
28
|
-
/** Nearest edge midpoint
|
|
44
|
+
/** Nearest edge midpoint within tolerance for insert. */
|
|
29
45
|
export declare function hitTestEdgeMidpoint(geometry: ShapeGeometry, point: Vec2, tolerance: number): EdgeHit | null;
|
|
46
|
+
/** Nearest point on any edge (for dragging a line into an arch). */
|
|
47
|
+
export declare function hitTestEdge(geometry: ShapeGeometry, point: Vec2, tolerance: number): EdgeHit | null;
|
|
30
48
|
export declare function geometryWithBBox(geometry: ShapeGeometry): {
|
|
31
49
|
geometry: ShapeGeometry;
|
|
32
50
|
bbox: ReturnType<typeof geometryBBox>;
|
|
33
51
|
};
|
|
52
|
+
export { geometryToRings, edgeCount, edgeFrom, edgeTo, edgeToPathD, pointOnRingEdge, ringToPathD, } from './pathRings';
|
|
53
|
+
export type { PathRing, PathEdge } from './pathRings';
|
|
34
54
|
//# sourceMappingURL=geometryEdit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometryEdit.d.ts","sourceRoot":"","sources":["../../src/editor/geometryEdit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"geometryEdit.d.ts","sourceRoot":"","sources":["../../src/editor/geometryEdit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,YAAY,EAAsB,MAAM,SAAS,CAAC;AAqB3D,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,MAAM,CAY1D;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,aA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ACf,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { isTransparentColor, TRANSPARENT_COLOR } from '../core/color';
|
|
2
|
+
/** Normalize `#rgb` / `#rrggbb` (with or without `#`) for `<input type="color">`. */
|
|
3
|
+
export declare function normalizeHexColor(value: string): string | null;
|
|
4
|
+
export declare function hexColorInputValue(value: string): string;
|
|
5
|
+
export declare function sameHexColor(a: string, b: string): boolean;
|
|
6
|
+
//# sourceMappingURL=hexColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hexColor.d.ts","sourceRoot":"","sources":["../../src/editor/hexColor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEtE,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW9D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAO1D"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BatchOp } from '../core';
|
|
2
|
+
export declare const EDITOR_HISTORY_LIMIT = 100;
|
|
3
|
+
export type EditorHistorySnapshot = {
|
|
4
|
+
ops: BatchOp[];
|
|
5
|
+
nextTempId: number;
|
|
6
|
+
selectedShapeId: number | null;
|
|
7
|
+
selectedAnchorIds: number[];
|
|
8
|
+
};
|
|
9
|
+
export type EditorHistory = {
|
|
10
|
+
past: EditorHistorySnapshot[];
|
|
11
|
+
future: EditorHistorySnapshot[];
|
|
12
|
+
};
|
|
13
|
+
export declare function emptyEditorHistory(): EditorHistory;
|
|
14
|
+
export declare function cloneHistorySnapshot(snapshot: EditorHistorySnapshot): EditorHistorySnapshot;
|
|
15
|
+
export declare function pushEditorHistory(history: EditorHistory, current: EditorHistorySnapshot): EditorHistory;
|
|
16
|
+
export declare function undoEditorHistory(history: EditorHistory, current: EditorHistorySnapshot): {
|
|
17
|
+
history: EditorHistory;
|
|
18
|
+
restored: EditorHistorySnapshot;
|
|
19
|
+
} | null;
|
|
20
|
+
export declare function redoEditorHistory(history: EditorHistory, current: EditorHistorySnapshot): {
|
|
21
|
+
history: EditorHistory;
|
|
22
|
+
restored: EditorHistorySnapshot;
|
|
23
|
+
} | null;
|
|
24
|
+
export declare function isEditableTypingTarget(target: EventTarget | null): boolean;
|
|
25
|
+
type HotkeyEvent = Pick<KeyboardEvent, 'key' | 'metaKey' | 'ctrlKey' | 'shiftKey' | 'altKey'>;
|
|
26
|
+
/** Ctrl/Cmd+Z — Windows, Linux, and macOS undo. */
|
|
27
|
+
export declare function isEditorUndoHotkey(e: HotkeyEvent): boolean;
|
|
28
|
+
/** Ctrl/Cmd+Shift+Z or Ctrl/Cmd+Y — redo on every desktop OS. */
|
|
29
|
+
export declare function isEditorRedoHotkey(e: HotkeyEvent): boolean;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../src/editor/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,EAAE,OAAO,EAAE,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,qBAAqB,EAAE,CAAC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