@mlightcad/cad-simple-viewer 1.5.5 → 1.5.7
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/LICENSE +1 -1
- package/README.md +69 -1
- package/dist/{index.js → cad-simple-viewer.js} +34247 -29923
- package/dist/cad-simple-viewer.umd.cjs +913 -0
- package/dist/dxf-parser-worker.js +2091 -0
- package/dist/libredwg-parser-worker.js +5388 -5122
- package/dist/mtext-renderer-worker.js +3061 -2858
- package/lib/app/AcApContext.d.ts.map +1 -1
- package/lib/app/AcApContext.js +15 -2
- package/lib/app/AcApContext.js.map +1 -1
- package/lib/app/AcApDocManager.d.ts +63 -0
- package/lib/app/AcApDocManager.d.ts.map +1 -1
- package/lib/app/AcApDocManager.js +195 -23
- package/lib/app/AcApDocManager.js.map +1 -1
- package/lib/app/AcApDocument.d.ts +81 -0
- package/lib/app/AcApDocument.d.ts.map +1 -1
- package/lib/app/AcApDocument.js +154 -0
- package/lib/app/AcApDocument.js.map +1 -1
- package/lib/app/AcApLayerSessionState.d.ts +15 -0
- package/lib/app/AcApLayerSessionState.d.ts.map +1 -0
- package/lib/app/AcApLayerSessionState.js +2 -0
- package/lib/app/AcApLayerSessionState.js.map +1 -0
- package/lib/app/AcApOpenFileDialog.d.ts +35 -0
- package/lib/app/AcApOpenFileDialog.d.ts.map +1 -0
- package/lib/app/AcApOpenFileDialog.js +192 -0
- package/lib/app/AcApOpenFileDialog.js.map +1 -0
- package/lib/app/AcApWebworkerReadiness.d.ts +18 -0
- package/lib/app/AcApWebworkerReadiness.d.ts.map +1 -0
- package/lib/app/AcApWebworkerReadiness.js +126 -0
- package/lib/app/AcApWebworkerReadiness.js.map +1 -0
- package/lib/app/AcDbOpenDatabaseOptions.d.ts +29 -0
- package/lib/app/AcDbOpenDatabaseOptions.d.ts.map +1 -1
- package/lib/app/AcDbOpenDatabaseOptions.js +10 -1
- package/lib/app/AcDbOpenDatabaseOptions.js.map +1 -1
- package/lib/app/index.d.ts +4 -0
- package/lib/app/index.d.ts.map +1 -1
- package/lib/app/index.js +3 -0
- package/lib/app/index.js.map +1 -1
- package/lib/command/AcApCacheFontCmd.d.ts +25 -0
- package/lib/command/AcApCacheFontCmd.d.ts.map +1 -0
- package/lib/command/AcApCacheFontCmd.js +142 -0
- package/lib/command/AcApCacheFontCmd.js.map +1 -0
- package/lib/command/AcApOpenCmd.d.ts +3 -22
- package/lib/command/AcApOpenCmd.d.ts.map +1 -1
- package/lib/command/AcApOpenCmd.js +3 -22
- package/lib/command/AcApOpenCmd.js.map +1 -1
- package/lib/command/AcApRedoCmd.d.ts +10 -0
- package/lib/command/AcApRedoCmd.d.ts.map +1 -0
- package/lib/command/AcApRedoCmd.js +85 -0
- package/lib/command/AcApRedoCmd.js.map +1 -0
- package/lib/command/AcApSysVarCmd.d.ts.map +1 -1
- package/lib/command/AcApSysVarCmd.js +5 -11
- package/lib/command/AcApSysVarCmd.js.map +1 -1
- package/lib/command/AcApUndoCmd.d.ts +10 -0
- package/lib/command/AcApUndoCmd.d.ts.map +1 -0
- package/lib/command/AcApUndoCmd.js +85 -0
- package/lib/command/AcApUndoCmd.js.map +1 -0
- package/lib/command/convert/AcApPngConvertor.d.ts +1 -1
- package/lib/command/convert/AcApPngConvertor.d.ts.map +1 -1
- package/lib/command/convert/AcApPngConvertor.js +5 -2
- package/lib/command/convert/AcApPngConvertor.js.map +1 -1
- package/lib/command/draw/AcApArcCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApArcCmd.js +2 -5
- package/lib/command/draw/AcApArcCmd.js.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApEllipseCmd.js +14 -9
- package/lib/command/draw/AcApEllipseCmd.js.map +1 -1
- package/lib/command/draw/AcApHatchCmd.d.ts +1 -1
- package/lib/command/draw/AcApLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApLineCmd.js +8 -2
- package/lib/command/draw/AcApLineCmd.js.map +1 -1
- package/lib/command/draw/AcApMLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApMLineCmd.js +4 -2
- package/lib/command/draw/AcApMLineCmd.js.map +1 -1
- package/lib/command/draw/AcApPolygonCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApPolygonCmd.js +2 -5
- package/lib/command/draw/AcApPolygonCmd.js.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApPolylineCmd.js +3 -0
- package/lib/command/draw/AcApPolylineCmd.js.map +1 -1
- package/lib/command/draw/AcApRectCmd.d.ts +6 -0
- package/lib/command/draw/AcApRectCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApRectCmd.js +12 -10
- package/lib/command/draw/AcApRectCmd.js.map +1 -1
- package/lib/command/draw/AcApSplineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApSplineCmd.js +2 -0
- package/lib/command/draw/AcApSplineCmd.js.map +1 -1
- package/lib/command/draw/AcApXLineCmd.d.ts.map +1 -1
- package/lib/command/draw/AcApXLineCmd.js +1 -1
- package/lib/command/draw/AcApXLineCmd.js.map +1 -1
- package/lib/command/index.d.ts +3 -0
- package/lib/command/index.d.ts.map +1 -1
- package/lib/command/index.js +3 -0
- package/lib/command/index.js.map +1 -1
- package/lib/command/layer/AcApLayerCmd.d.ts +3 -194
- package/lib/command/layer/AcApLayerCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCmd.js +64 -398
- package/lib/command/layer/AcApLayerCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.d.ts +2 -34
- package/lib/command/layer/AcApLayerCurCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerCurCmd.js +18 -77
- package/lib/command/layer/AcApLayerCurCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.d.ts +2 -32
- package/lib/command/layer/AcApLayerDelCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerDelCmd.js +26 -169
- package/lib/command/layer/AcApLayerDelCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts +2 -16
- package/lib/command/layer/AcApLayerFreezeCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerFreezeCmd.js +32 -54
- package/lib/command/layer/AcApLayerFreezeCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.d.ts +2 -31
- package/lib/command/layer/AcApLayerIsoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerIsoCmd.js +19 -198
- package/lib/command/layer/AcApLayerIsoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.d.ts +2 -40
- package/lib/command/layer/AcApLayerLockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerLockCmd.js +18 -65
- package/lib/command/layer/AcApLayerLockCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerMutationCmd.d.ts +13 -0
- package/lib/command/layer/AcApLayerMutationCmd.d.ts.map +1 -0
- package/lib/command/layer/AcApLayerMutationCmd.js +42 -0
- package/lib/command/layer/AcApLayerMutationCmd.js.map +1 -0
- package/lib/command/layer/AcApLayerOffCmd.d.ts +2 -9
- package/lib/command/layer/AcApLayerOffCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOffCmd.js +32 -43
- package/lib/command/layer/AcApLayerOffCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.d.ts +2 -22
- package/lib/command/layer/AcApLayerOnCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerOnCmd.js +8 -62
- package/lib/command/layer/AcApLayerOnCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.d.ts +2 -75
- package/lib/command/layer/AcApLayerPCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerPCmd.js +6 -165
- package/lib/command/layer/AcApLayerPCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.d.ts +2 -29
- package/lib/command/layer/AcApLayerThawCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerThawCmd.js +8 -74
- package/lib/command/layer/AcApLayerThawCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts +2 -44
- package/lib/command/layer/AcApLayerUnisoCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnisoCmd.js +10 -122
- package/lib/command/layer/AcApLayerUnisoCmd.js.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts +2 -40
- package/lib/command/layer/AcApLayerUnlockCmd.d.ts.map +1 -1
- package/lib/command/layer/AcApLayerUnlockCmd.js +18 -65
- package/lib/command/layer/AcApLayerUnlockCmd.js.map +1 -1
- package/lib/command/modify/AcApCopyCmd.d.ts +12 -0
- package/lib/command/modify/AcApCopyCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApCopyCmd.js +67 -177
- package/lib/command/modify/AcApCopyCmd.js.map +1 -1
- package/lib/command/modify/AcApCopyPreviewJig.d.ts +21 -0
- package/lib/command/modify/AcApCopyPreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApCopyPreviewJig.js +61 -0
- package/lib/command/modify/AcApCopyPreviewJig.js.map +1 -0
- package/lib/command/modify/AcApEraseCmd.d.ts +0 -6
- package/lib/command/modify/AcApEraseCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApEraseCmd.js +11 -38
- package/lib/command/modify/AcApEraseCmd.js.map +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.d.ts +0 -7
- package/lib/command/modify/AcApHideObjectsCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApHideObjectsCmd.js +1 -8
- package/lib/command/modify/AcApHideObjectsCmd.js.map +1 -1
- package/lib/command/modify/AcApMoveCmd.d.ts +0 -6
- package/lib/command/modify/AcApMoveCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApMoveCmd.js +26 -105
- package/lib/command/modify/AcApMoveCmd.js.map +1 -1
- package/lib/command/modify/AcApMovePreviewJig.d.ts +18 -0
- package/lib/command/modify/AcApMovePreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApMovePreviewJig.js +45 -0
- package/lib/command/modify/AcApMovePreviewJig.js.map +1 -0
- package/lib/command/modify/AcApOffsetCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApOffsetCmd.js +14 -37
- package/lib/command/modify/AcApOffsetCmd.js.map +1 -1
- package/lib/command/modify/AcApRotateCmd.d.ts +2 -2
- package/lib/command/modify/AcApRotateCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApRotateCmd.js +38 -204
- package/lib/command/modify/AcApRotateCmd.js.map +1 -1
- package/lib/command/modify/AcApRotatePreviewJig.d.ts +47 -0
- package/lib/command/modify/AcApRotatePreviewJig.d.ts.map +1 -0
- package/lib/command/modify/AcApRotatePreviewJig.js +97 -0
- package/lib/command/modify/AcApRotatePreviewJig.js.map +1 -0
- package/lib/command/modify/AcApUnisolateObjectsCmd.d.ts.map +1 -1
- package/lib/command/modify/AcApUnisolateObjectsCmd.js +3 -3
- package/lib/command/modify/AcApUnisolateObjectsCmd.js.map +1 -1
- package/lib/editor/command/AcEdCommand.d.ts +24 -0
- package/lib/editor/command/AcEdCommand.d.ts.map +1 -1
- package/lib/editor/command/AcEdCommand.js +71 -5
- package/lib/editor/command/AcEdCommand.js.map +1 -1
- package/lib/editor/global/AcEdUiColor.d.ts +13 -13
- package/lib/editor/global/AcEdUiColor.d.ts.map +1 -1
- package/lib/editor/global/AcEdUiColor.js +21 -20
- package/lib/editor/global/AcEdUiColor.js.map +1 -1
- package/lib/editor/global/eventBus.d.ts +16 -2
- package/lib/editor/global/eventBus.d.ts.map +1 -1
- package/lib/editor/global/eventBus.js.map +1 -1
- package/lib/editor/grip/AcEdGripAppearance.d.ts +18 -0
- package/lib/editor/grip/AcEdGripAppearance.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripAppearance.js +30 -0
- package/lib/editor/grip/AcEdGripAppearance.js.map +1 -0
- package/lib/editor/grip/AcEdGripEditSession.d.ts +29 -0
- package/lib/editor/grip/AcEdGripEditSession.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripEditSession.js +83 -0
- package/lib/editor/grip/AcEdGripEditSession.js.map +1 -0
- package/lib/editor/grip/AcEdGripHandle.d.ts +21 -0
- package/lib/editor/grip/AcEdGripHandle.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripHandle.js +62 -0
- package/lib/editor/grip/AcEdGripHandle.js.map +1 -0
- package/lib/editor/grip/AcEdGripManager.d.ts +171 -0
- package/lib/editor/grip/AcEdGripManager.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripManager.js +376 -0
- package/lib/editor/grip/AcEdGripManager.js.map +1 -0
- package/lib/editor/grip/AcEdGripPolicy.d.ts +6 -0
- package/lib/editor/grip/AcEdGripPolicy.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripPolicy.js +30 -0
- package/lib/editor/grip/AcEdGripPolicy.js.map +1 -0
- package/lib/editor/grip/AcEdGripPreviewJig.d.ts +21 -0
- package/lib/editor/grip/AcEdGripPreviewJig.d.ts.map +1 -0
- package/lib/editor/grip/AcEdGripPreviewJig.js +73 -0
- package/lib/editor/grip/AcEdGripPreviewJig.js.map +1 -0
- package/lib/editor/grip/index.d.ts +5 -0
- package/lib/editor/grip/index.d.ts.map +1 -0
- package/lib/editor/grip/index.js +5 -0
- package/lib/editor/grip/index.js.map +1 -0
- package/lib/editor/index.d.ts +1 -0
- package/lib/editor/index.d.ts.map +1 -1
- package/lib/editor/index.js +1 -0
- package/lib/editor/index.js.map +1 -1
- package/lib/editor/input/AcEdBatchPreview.d.ts +96 -0
- package/lib/editor/input/AcEdBatchPreview.d.ts.map +1 -0
- package/lib/editor/input/AcEdBatchPreview.js +125 -0
- package/lib/editor/input/AcEdBatchPreview.js.map +1 -0
- package/lib/editor/input/AcEdCursorManager.d.ts.map +1 -1
- package/lib/editor/input/AcEdCursorManager.js +2 -2
- package/lib/editor/input/AcEdCursorManager.js.map +1 -1
- package/lib/editor/input/AcEdOsnapResolver.d.ts +34 -0
- package/lib/editor/input/AcEdOsnapResolver.d.ts.map +1 -0
- package/lib/editor/input/AcEdOsnapResolver.js +117 -0
- package/lib/editor/input/AcEdOsnapResolver.js.map +1 -0
- package/lib/editor/input/AcEdPreviewJig.d.ts +1 -1
- package/lib/editor/input/AcEdPreviewJig.d.ts.map +1 -1
- package/lib/editor/input/AcEdPreviewJig.js +14 -0
- package/lib/editor/input/AcEdPreviewJig.js.map +1 -1
- package/lib/editor/input/AcEdSelectionPreviewJig.d.ts +109 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.d.ts.map +1 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.js +185 -0
- package/lib/editor/input/AcEdSelectionPreviewJig.js.map +1 -0
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdAngleHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdAngleHandler.js +6 -0
- package/lib/editor/input/handler/AcEdAngleHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdInputHandler.d.ts +20 -1
- package/lib/editor/input/handler/AcEdInputHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdKeywordHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdKeywordHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdKeywordHandler.js +3 -0
- package/lib/editor/input/handler/AcEdKeywordHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdNumericalHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdNumericalHandler.js +6 -0
- package/lib/editor/input/handler/AcEdNumericalHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdPointHandler.d.ts +17 -1
- package/lib/editor/input/handler/AcEdPointHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdPointHandler.js +89 -0
- package/lib/editor/input/handler/AcEdPointHandler.js.map +1 -1
- package/lib/editor/input/handler/AcEdStringHandler.d.ts +2 -1
- package/lib/editor/input/handler/AcEdStringHandler.d.ts.map +1 -1
- package/lib/editor/input/handler/AcEdStringHandler.js +3 -0
- package/lib/editor/input/handler/AcEdStringHandler.js.map +1 -1
- package/lib/editor/input/index.d.ts +3 -0
- package/lib/editor/input/index.d.ts.map +1 -1
- package/lib/editor/input/index.js +3 -0
- package/lib/editor/input/index.js.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts +7 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.d.ts.map +1 -1
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js +17 -0
- package/lib/editor/input/prompt/AcEdPromptAngleOptions.js.map +1 -1
- package/lib/editor/input/session/AcEdInputSession.d.ts +11 -1
- package/lib/editor/input/session/AcEdInputSession.d.ts.map +1 -1
- package/lib/editor/input/session/AcEdInputSession.js.map +1 -1
- package/lib/editor/input/session/AcEdPromptInputSession.d.ts +51 -0
- package/lib/editor/input/session/AcEdPromptInputSession.d.ts.map +1 -0
- package/lib/editor/input/session/AcEdPromptInputSession.js +109 -0
- package/lib/editor/input/session/AcEdPromptInputSession.js.map +1 -0
- package/lib/editor/input/session/index.d.ts +1 -0
- package/lib/editor/input/session/index.d.ts.map +1 -1
- package/lib/editor/input/session/index.js +1 -0
- package/lib/editor/input/session/index.js.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.d.ts +10 -0
- package/lib/editor/input/ui/AcEdCommandLine.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdCommandLine.js +67 -35
- package/lib/editor/input/ui/AcEdCommandLine.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts +0 -11
- package/lib/editor/input/ui/AcEdFloatingInput.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInput.js +9 -119
- package/lib/editor/input/ui/AcEdFloatingInput.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBox.js +10 -2
- package/lib/editor/input/ui/AcEdFloatingInputBox.js.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js +9 -4
- package/lib/editor/input/ui/AcEdFloatingInputBoxes.js.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.d.ts +26 -23
- package/lib/editor/input/ui/AcEdInputManager.d.ts.map +1 -1
- package/lib/editor/input/ui/AcEdInputManager.js +135 -83
- package/lib/editor/input/ui/AcEdInputManager.js.map +1 -1
- package/lib/editor/input/ui/AcEdMTextEditor.js +2 -2
- package/lib/editor/input/ui/AcEdMTextEditor.js.map +1 -1
- package/lib/editor/view/AcEdBaseView.d.ts +44 -2
- package/lib/editor/view/AcEdBaseView.d.ts.map +1 -1
- package/lib/editor/view/AcEdBaseView.js +26 -12
- package/lib/editor/view/AcEdBaseView.js.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts +28 -0
- package/lib/editor/view/AcEdSpatialQueryResult.d.ts.map +1 -1
- package/lib/editor/view/AcEdSpatialQueryResult.js +65 -1
- package/lib/editor/view/AcEdSpatialQueryResult.js.map +1 -1
- package/lib/i18n/AcApI18n.d.ts +42 -0
- package/lib/i18n/AcApI18n.d.ts.map +1 -1
- package/lib/i18n/AcApI18n.js +56 -4
- package/lib/i18n/AcApI18n.js.map +1 -1
- package/lib/i18n/en/command.d.ts +26 -0
- package/lib/i18n/en/command.d.ts.map +1 -1
- package/lib/i18n/en/command.js +26 -0
- package/lib/i18n/en/command.js.map +1 -1
- package/lib/i18n/en/jig.d.ts +26 -0
- package/lib/i18n/en/jig.d.ts.map +1 -1
- package/lib/i18n/en/jig.js +134 -108
- package/lib/i18n/en/jig.js.map +1 -1
- package/lib/i18n/en/main.d.ts +3 -0
- package/lib/i18n/en/main.d.ts.map +1 -1
- package/lib/i18n/en/main.js +4 -1
- package/lib/i18n/en/main.js.map +1 -1
- package/lib/i18n/zh/command.d.ts +26 -0
- package/lib/i18n/zh/command.d.ts.map +1 -1
- package/lib/i18n/zh/command.js +26 -0
- package/lib/i18n/zh/command.js.map +1 -1
- package/lib/i18n/zh/jig.d.ts +26 -0
- package/lib/i18n/zh/jig.d.ts.map +1 -1
- package/lib/i18n/zh/jig.js +134 -108
- package/lib/i18n/zh/jig.js.map +1 -1
- package/lib/i18n/zh/main.d.ts +3 -0
- package/lib/i18n/zh/main.d.ts.map +1 -1
- package/lib/i18n/zh/main.js +4 -1
- package/lib/i18n/zh/main.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/plugin/AcApLazyPluginRegistration.d.ts +3 -8
- package/lib/plugin/AcApLazyPluginRegistration.d.ts.map +1 -1
- package/lib/service/AcApEntitySelection.d.ts +42 -0
- package/lib/service/AcApEntitySelection.d.ts.map +1 -0
- package/lib/service/AcApEntitySelection.js +156 -0
- package/lib/service/AcApEntitySelection.js.map +1 -0
- package/lib/service/AcApEntityService.d.ts +115 -0
- package/lib/service/AcApEntityService.d.ts.map +1 -0
- package/lib/service/AcApEntityService.js +194 -0
- package/lib/service/AcApEntityService.js.map +1 -0
- package/lib/{command/layer → service}/AcApLayerIsoState.d.ts +6 -24
- package/lib/service/AcApLayerIsoState.d.ts.map +1 -0
- package/lib/service/AcApLayerIsoState.js +28 -0
- package/lib/service/AcApLayerIsoState.js.map +1 -0
- package/lib/service/AcApLayerService.d.ts +400 -0
- package/lib/service/AcApLayerService.d.ts.map +1 -0
- package/lib/service/AcApLayerService.js +1240 -0
- package/lib/service/AcApLayerService.js.map +1 -0
- package/lib/service/AcApLayerStore.d.ts +198 -0
- package/lib/service/AcApLayerStore.d.ts.map +1 -0
- package/lib/service/AcApLayerStore.js +335 -0
- package/lib/service/AcApLayerStore.js.map +1 -0
- package/lib/service/AcApServiceEdit.d.ts +18 -0
- package/lib/service/AcApServiceEdit.d.ts.map +1 -0
- package/lib/service/AcApServiceEdit.js +34 -0
- package/lib/service/AcApServiceEdit.js.map +1 -0
- package/lib/service/index.d.ts +16 -0
- package/lib/service/index.d.ts.map +1 -0
- package/lib/service/index.js +16 -0
- package/lib/service/index.js.map +1 -0
- package/lib/service/types.d.ts +116 -0
- package/lib/service/types.d.ts.map +1 -0
- package/lib/service/types.js +5 -0
- package/lib/service/types.js.map +1 -0
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts +22 -7
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js +58 -12
- package/lib/spatialIndex/AcTrHierarchicalSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts +2 -2
- package/lib/spatialIndex/AcTrLinearSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrLinearSpatialIndex.js +9 -3
- package/lib/spatialIndex/AcTrLinearSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts +2 -2
- package/lib/spatialIndex/AcTrRBushSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrRBushSpatialIndex.js +19 -5
- package/lib/spatialIndex/AcTrRBushSpatialIndex.js.map +1 -1
- package/lib/spatialIndex/AcTrSpatialIndex.d.ts +10 -1
- package/lib/spatialIndex/AcTrSpatialIndex.d.ts.map +1 -1
- package/lib/spatialIndex/AcTrSpatialIndex.js +7 -1
- package/lib/spatialIndex/AcTrSpatialIndex.js.map +1 -1
- package/lib/util/AcApDatabaseEdit.d.ts +11 -0
- package/lib/util/AcApDatabaseEdit.d.ts.map +1 -0
- package/lib/util/AcApDatabaseEdit.js +20 -0
- package/lib/util/AcApDatabaseEdit.js.map +1 -0
- package/lib/util/AcApFontUtil.d.ts +14 -2
- package/lib/util/AcApFontUtil.d.ts.map +1 -1
- package/lib/util/AcApFontUtil.js +18 -0
- package/lib/util/AcApFontUtil.js.map +1 -1
- package/lib/util/AcApGeTransform.d.ts +10 -0
- package/lib/util/AcApGeTransform.d.ts.map +1 -0
- package/lib/util/AcApGeTransform.js +15 -0
- package/lib/util/AcApGeTransform.js.map +1 -0
- package/lib/util/index.d.ts +2 -0
- package/lib/util/index.d.ts.map +1 -1
- package/lib/util/index.js +2 -0
- package/lib/util/index.js.map +1 -1
- package/lib/view/AcEdViewKeyHandler.d.ts +32 -0
- package/lib/view/AcEdViewKeyHandler.d.ts.map +1 -0
- package/lib/view/AcEdViewKeyHandler.js +101 -0
- package/lib/view/AcEdViewKeyHandler.js.map +1 -0
- package/lib/view/AcTrEntityDisplayController.d.ts +46 -0
- package/lib/view/AcTrEntityDisplayController.d.ts.map +1 -0
- package/lib/view/AcTrEntityDisplayController.js +114 -0
- package/lib/view/AcTrEntityDisplayController.js.map +1 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts +43 -0
- package/lib/view/AcTrGroupWcsBboxAssert.d.ts.map +1 -0
- package/lib/view/AcTrGroupWcsBboxAssert.js +84 -0
- package/lib/view/AcTrGroupWcsBboxAssert.js.map +1 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts +49 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.d.ts.map +1 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.js +138 -0
- package/lib/view/AcTrInheritedLayerMaterialMapper.js.map +1 -0
- package/lib/view/AcTrLayer.d.ts +33 -2
- package/lib/view/AcTrLayer.d.ts.map +1 -1
- package/lib/view/AcTrLayer.js +75 -2
- package/lib/view/AcTrLayer.js.map +1 -1
- package/lib/view/AcTrLayerAppearanceController.d.ts +55 -0
- package/lib/view/AcTrLayerAppearanceController.d.ts.map +1 -0
- package/lib/view/AcTrLayerAppearanceController.js +86 -0
- package/lib/view/AcTrLayerAppearanceController.js.map +1 -0
- package/lib/view/AcTrLayout.d.ts +37 -2
- package/lib/view/AcTrLayout.d.ts.map +1 -1
- package/lib/view/AcTrLayout.js +161 -15
- package/lib/view/AcTrLayout.js.map +1 -1
- package/lib/view/AcTrProgressiveOpenFitController.d.ts +64 -0
- package/lib/view/AcTrProgressiveOpenFitController.d.ts.map +1 -0
- package/lib/view/AcTrProgressiveOpenFitController.js +209 -0
- package/lib/view/AcTrProgressiveOpenFitController.js.map +1 -0
- package/lib/view/AcTrScene.d.ts +47 -1
- package/lib/view/AcTrScene.d.ts.map +1 -1
- package/lib/view/AcTrScene.js +78 -3
- package/lib/view/AcTrScene.js.map +1 -1
- package/lib/view/AcTrView2d.d.ts +118 -27
- package/lib/view/AcTrView2d.d.ts.map +1 -1
- package/lib/view/AcTrView2d.js +584 -362
- package/lib/view/AcTrView2d.js.map +1 -1
- package/lib/view/index.d.ts +3 -0
- package/lib/view/index.d.ts.map +1 -1
- package/lib/view/index.js +3 -0
- package/lib/view/index.js.map +1 -1
- package/package.json +13 -11
- package/dist/index.umd.cjs +0 -897
- package/lib/command/layer/AcApLayerIsoState.d.ts.map +0 -1
- package/lib/command/layer/AcApLayerIsoState.js +0 -53
- package/lib/command/layer/AcApLayerIsoState.js.map +0 -1
|
@@ -34,6 +34,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
34
34
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
+
import { AcApDocManager } from '../../app';
|
|
38
|
+
import { acapNotifyUndoStackChanged } from '../../util/AcApDatabaseEdit';
|
|
39
|
+
import { eventBus } from '../global/eventBus';
|
|
37
40
|
import { AcEdOpenMode } from '../view';
|
|
38
41
|
/**
|
|
39
42
|
* Abstract base class for all CAD commands.
|
|
@@ -88,6 +91,10 @@ var AcEdCommand = /** @class */ (function () {
|
|
|
88
91
|
function AcEdCommand() {
|
|
89
92
|
/** The minimum access mode required to execute this command */
|
|
90
93
|
this._mode = AcEdOpenMode.Read;
|
|
94
|
+
/**
|
|
95
|
+
* When false, this command does not create its own undo record.
|
|
96
|
+
*/
|
|
97
|
+
this.recordsUndoStack = true;
|
|
91
98
|
this._globalName = '';
|
|
92
99
|
this._localName = '';
|
|
93
100
|
this._userData = {};
|
|
@@ -250,25 +257,63 @@ var AcEdCommand = /** @class */ (function () {
|
|
|
250
257
|
*/
|
|
251
258
|
AcEdCommand.prototype.trigger = function (context) {
|
|
252
259
|
return __awaiter(this, void 0, void 0, function () {
|
|
260
|
+
var db, tm, recordUndo, undoTransactionActive, error_1;
|
|
253
261
|
return __generator(this, function (_a) {
|
|
254
262
|
switch (_a.label) {
|
|
255
263
|
case 0:
|
|
256
|
-
|
|
264
|
+
db = context.doc.database;
|
|
265
|
+
tm = db.transactionManager;
|
|
266
|
+
recordUndo = this.shouldRecordUndoStack(context);
|
|
267
|
+
undoTransactionActive = false;
|
|
268
|
+
if (recordUndo) {
|
|
269
|
+
tm.startUndoMark(this.globalName || this.localName);
|
|
270
|
+
tm.startTransaction();
|
|
271
|
+
undoTransactionActive = true;
|
|
272
|
+
}
|
|
273
|
+
_a.label = 1;
|
|
274
|
+
case 1:
|
|
275
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
257
276
|
this.onCommandWillStart(context);
|
|
258
277
|
context.view.editor.events.commandWillStart.dispatch({ command: this });
|
|
259
278
|
return [4 /*yield*/, this.execute(context)];
|
|
260
|
-
case 1:
|
|
261
|
-
_a.sent();
|
|
262
|
-
return [3 /*break*/, 3];
|
|
263
279
|
case 2:
|
|
280
|
+
_a.sent();
|
|
281
|
+
return [3 /*break*/, 5];
|
|
282
|
+
case 3:
|
|
283
|
+
error_1 = _a.sent();
|
|
284
|
+
if (undoTransactionActive && tm.hasTransaction()) {
|
|
285
|
+
tm.abortTransaction();
|
|
286
|
+
}
|
|
287
|
+
if (undoTransactionActive) {
|
|
288
|
+
tm.cancelUndoMark();
|
|
289
|
+
undoTransactionActive = false;
|
|
290
|
+
}
|
|
291
|
+
throw error_1;
|
|
292
|
+
case 4:
|
|
293
|
+
if (undoTransactionActive && tm.hasTransaction()) {
|
|
294
|
+
tm.commitTransaction();
|
|
295
|
+
tm.endUndoMark();
|
|
296
|
+
undoTransactionActive = false;
|
|
297
|
+
acapNotifyUndoStackChanged();
|
|
298
|
+
}
|
|
264
299
|
context.view.editor.events.commandEnded.dispatch({ command: this });
|
|
265
300
|
this.onCommandEnded(context);
|
|
266
301
|
return [7 /*endfinally*/];
|
|
267
|
-
case
|
|
302
|
+
case 5: return [2 /*return*/];
|
|
268
303
|
}
|
|
269
304
|
});
|
|
270
305
|
});
|
|
271
306
|
};
|
|
307
|
+
/**
|
|
308
|
+
* Returns true when this command should be wrapped in an undo mark.
|
|
309
|
+
*/
|
|
310
|
+
AcEdCommand.prototype.shouldRecordUndoStack = function (context) {
|
|
311
|
+
if (!this.recordsUndoStack) {
|
|
312
|
+
return false;
|
|
313
|
+
}
|
|
314
|
+
return (context.doc.openMode >= AcEdOpenMode.Review &&
|
|
315
|
+
this.mode >= AcEdOpenMode.Review);
|
|
316
|
+
};
|
|
272
317
|
/**
|
|
273
318
|
* Executes the command logic.
|
|
274
319
|
*
|
|
@@ -300,6 +345,27 @@ var AcEdCommand = /** @class */ (function () {
|
|
|
300
345
|
});
|
|
301
346
|
});
|
|
302
347
|
};
|
|
348
|
+
/**
|
|
349
|
+
* Displays a message in the command-line output.
|
|
350
|
+
*
|
|
351
|
+
* @param message - Message text to render
|
|
352
|
+
* @param type - Message severity controlling the rendered style
|
|
353
|
+
* @param msgKey - Optional localization key associated with the message
|
|
354
|
+
*/
|
|
355
|
+
AcEdCommand.prototype.showMessage = function (message, type, msgKey) {
|
|
356
|
+
if (type === void 0) { type = 'info'; }
|
|
357
|
+
AcApDocManager.instance.editor.showMessage(message, type, msgKey);
|
|
358
|
+
};
|
|
359
|
+
/**
|
|
360
|
+
* Sends a message to the UI module through the global event bus.
|
|
361
|
+
*
|
|
362
|
+
* @param message - Message text to display
|
|
363
|
+
* @param type - Message severity controlling the rendered style
|
|
364
|
+
*/
|
|
365
|
+
AcEdCommand.prototype.notify = function (message, type) {
|
|
366
|
+
if (type === void 0) { type = 'info'; }
|
|
367
|
+
eventBus.emit('message', { message: message, type: type });
|
|
368
|
+
};
|
|
303
369
|
return AcEdCommand;
|
|
304
370
|
}());
|
|
305
371
|
export { AcEdCommand };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdCommand.js","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AcEdCommand.js","sourceRoot":"","sources":["../../../src/editor/command/AcEdCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH;IAUE;;;;;OAKG;IACH;QAXA,+DAA+D;QACvD,UAAK,GAAiB,YAAY,CAAC,IAAI,CAAA;QAgH/C;;WAEG;QACH,qBAAgB,GAAG,IAAI,CAAA;QAxGrB,IAAI,CAAC,WAAW,GAAG,EAAE,CAAA;QACrB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAA;QACpB,IAAI,CAAC,SAAS,GAAG,EAAe,CAAA;IAClC,CAAC;IA+BD,sBAAI,iCAAQ;QA7BZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA4BG;aACH;YACE,OAAO,IAAI,CAAC,SAAS,CAAA;QACvB,CAAC;;;OAAA;IAUD,sBAAI,mCAAU;QARd;;;;;;;WAOG;aACH;YACE,OAAO,IAAI,CAAC,WAAW,CAAA;QACzB,CAAC;QAED;;;;WAIG;aACH,UAAe,KAAa;YAC1B,IAAI,CAAC,WAAW,GAA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,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IACnE,CAAC;IAED;;;;;OAKG;IACO,4BAAM,GAAhB,UAAiB,OAAe,EAAE,IAA8B;QAA9B,qBAAA,EAAA,aAA8B;QAC9D,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,OAAO,SAAA,EAAE,IAAI,MAAA,EAAE,CAAC,CAAA;IAC7C,CAAC;IACH,kBAAC;AAAD,CAAC,AAtRD,IAsRC"}
|
|
@@ -9,26 +9,26 @@
|
|
|
9
9
|
* - **UI colour theme** — `COLORTHEME` only affects viewer chrome, not
|
|
10
10
|
* canvas or ACI-7 rendering.
|
|
11
11
|
*
|
|
12
|
-
* Shared colour constants and luminance helpers
|
|
13
|
-
* `@mlightcad/
|
|
14
|
-
*
|
|
12
|
+
* Shared colour constants and luminance helpers are defined in
|
|
13
|
+
* `@mlightcad/graphic-interface` (`AcGiContext.ts`) and re-exported here
|
|
14
|
+
* for editor callers.
|
|
15
15
|
*/
|
|
16
|
-
export {
|
|
16
|
+
export { ACGI_DARK_THEME_FOREGROUND, ACGI_LIGHT_THEME_FOREGROUND, ACGI_MODEL_SPACE_BACKGROUND, ACGI_PAPER_SPACE_BACKGROUND, acgiContrastingForegroundColor, acgiForegroundColorForBackground, acgiIsLightBackground } from '@mlightcad/data-model';
|
|
17
17
|
import { AcCmColor, AcDbDatabase } from '@mlightcad/data-model';
|
|
18
18
|
/**
|
|
19
19
|
* Returns the UI chrome foreground colour that matches `COLORTHEME`.
|
|
20
20
|
*
|
|
21
21
|
* This maps the UI light/dark theme flag to shared constants. It does
|
|
22
22
|
* **not** drive ACI-7 drawing colours — use
|
|
23
|
-
* {@link
|
|
23
|
+
* {@link acgiForegroundColorForBackground} for canvas-linked inversion.
|
|
24
24
|
*
|
|
25
25
|
* @param isLightTheme - `true` when `COLORTHEME` indicates a light UI theme
|
|
26
26
|
* (value `1`); `false` for a dark UI theme (value `0`).
|
|
27
|
-
* @returns Packed RGB: {@link
|
|
28
|
-
* {@link
|
|
27
|
+
* @returns Packed RGB: {@link ACGI_LIGHT_THEME_FOREGROUND} for light UI,
|
|
28
|
+
* {@link ACGI_DARK_THEME_FOREGROUND} for dark UI.
|
|
29
29
|
*
|
|
30
30
|
* @see {@link isLightColorTheme} — normalises raw `COLORTHEME` sysvar values
|
|
31
|
-
* @see {@link
|
|
31
|
+
* @see {@link acgiForegroundColorForBackground} — ACI-7 inversion from layout bg
|
|
32
32
|
*/
|
|
33
33
|
export declare function foregroundColorFromColorTheme(isLightTheme: boolean): number;
|
|
34
34
|
/**
|
|
@@ -100,8 +100,8 @@ export declare function layoutBackgroundSysVar(isModelSpace: boolean): string;
|
|
|
100
100
|
*
|
|
101
101
|
* When the sysvar holds a concrete RGB colour (`color.RGB` is defined), that
|
|
102
102
|
* value is returned directly. Otherwise the AutoCAD defaults are used:
|
|
103
|
-
* {@link
|
|
104
|
-
* {@link
|
|
103
|
+
* {@link ACGI_MODEL_SPACE_BACKGROUND} (`0x000000`) for model space or
|
|
104
|
+
* {@link ACGI_PAPER_SPACE_BACKGROUND} (`0xffffff`) for paper space.
|
|
105
105
|
*
|
|
106
106
|
* @param color - Layout background colour from `MODELBKCOLOR` or
|
|
107
107
|
* `PAPERBKCOLOR`, or `undefined` when the sysvar is unset.
|
|
@@ -138,10 +138,10 @@ export declare function readLayoutBackgroundColor(database: AcDbDatabase, isMode
|
|
|
138
138
|
* Toggles a layout background colour between black and white.
|
|
139
139
|
*
|
|
140
140
|
* Inspects the current colour's perceived luminance via
|
|
141
|
-
* {@link
|
|
141
|
+
* {@link acgiIsLightBackground} and returns a new {@link AcCmColor} set to pure
|
|
142
142
|
* black (`RGB 0, 0, 0`) when the input is light, or pure white
|
|
143
143
|
* (`RGB 255, 255, 255`) when the input is dark. If the source colour has no
|
|
144
|
-
* RGB component, {@link
|
|
144
|
+
* RGB component, {@link ACGI_MODEL_SPACE_BACKGROUND} is used as the luminance
|
|
145
145
|
* reference.
|
|
146
146
|
*
|
|
147
147
|
* Used by {@link AcApSwitchBgCmd} to flip `MODELBKCOLOR` / `PAPERBKCOLOR`
|
|
@@ -165,7 +165,7 @@ export declare function toggleBlackWhiteBackgroundColor(color: AcCmColor): AcCmC
|
|
|
165
165
|
*
|
|
166
166
|
* Returns `'black'` on light backgrounds and `'white'` on dark backgrounds so
|
|
167
167
|
* the crosshair and other SVG/CSS cursors remain visible. The decision is
|
|
168
|
-
* delegated to {@link
|
|
168
|
+
* delegated to {@link acgiIsLightBackground}.
|
|
169
169
|
*
|
|
170
170
|
* @param backgroundColor - Current renderer clear colour as packed
|
|
171
171
|
* `0xRRGGBB` RGB.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdUiColor.d.ts","sourceRoot":"","sources":["../../../src/editor/global/AcEdUiColor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"AcEdUiColor.d.ts","sourceRoot":"","sources":["../../../src/editor/global/AcEdUiColor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAC9B,gCAAgC,EAChC,qBAAqB,EACtB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,SAAS,EAET,YAAY,EAOb,MAAM,uBAAuB,CAAA;AAE9B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,OAAO,GAAG,MAAM,CAE3E;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CASzD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAIpE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,OAAO,GAAG,MAAM,CAIpE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,GAAG,SAAS,EAC5B,YAAY,EAAE,OAAO,GACpB,MAAM,CAQR;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,YAAY,EACtB,YAAY,EAAE,OAAO,GACpB,MAAM,CAOR;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAS3E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,MAAM,GACtB,OAAO,GAAG,OAAO,CAEnB"}
|
|
@@ -9,30 +9,29 @@
|
|
|
9
9
|
* - **UI colour theme** — `COLORTHEME` only affects viewer chrome, not
|
|
10
10
|
* canvas or ACI-7 rendering.
|
|
11
11
|
*
|
|
12
|
-
* Shared colour constants and luminance helpers
|
|
13
|
-
* `@mlightcad/
|
|
14
|
-
*
|
|
12
|
+
* Shared colour constants and luminance helpers are defined in
|
|
13
|
+
* `@mlightcad/graphic-interface` (`AcGiContext.ts`) and re-exported here
|
|
14
|
+
* for editor callers.
|
|
15
15
|
*/
|
|
16
|
-
export {
|
|
17
|
-
import { AcCmColor, AcCmColorMethod, AcDbSystemVariables, AcDbSysVarManager } from '@mlightcad/data-model';
|
|
18
|
-
import { contrastingForegroundColor, isLightBackground, MODEL_SPACE_BACKGROUND, PAPER_SPACE_BACKGROUND } from '@mlightcad/three-renderer';
|
|
16
|
+
export { ACGI_DARK_THEME_FOREGROUND, ACGI_LIGHT_THEME_FOREGROUND, ACGI_MODEL_SPACE_BACKGROUND, ACGI_PAPER_SPACE_BACKGROUND, acgiContrastingForegroundColor, acgiForegroundColorForBackground, acgiIsLightBackground } from '@mlightcad/data-model';
|
|
17
|
+
import { AcCmColor, AcCmColorMethod, AcDbSystemVariables, AcDbSysVarManager, ACGI_MODEL_SPACE_BACKGROUND, ACGI_PAPER_SPACE_BACKGROUND, acgiContrastingForegroundColor, acgiIsLightBackground } from '@mlightcad/data-model';
|
|
19
18
|
/**
|
|
20
19
|
* Returns the UI chrome foreground colour that matches `COLORTHEME`.
|
|
21
20
|
*
|
|
22
21
|
* This maps the UI light/dark theme flag to shared constants. It does
|
|
23
22
|
* **not** drive ACI-7 drawing colours — use
|
|
24
|
-
* {@link
|
|
23
|
+
* {@link acgiForegroundColorForBackground} for canvas-linked inversion.
|
|
25
24
|
*
|
|
26
25
|
* @param isLightTheme - `true` when `COLORTHEME` indicates a light UI theme
|
|
27
26
|
* (value `1`); `false` for a dark UI theme (value `0`).
|
|
28
|
-
* @returns Packed RGB: {@link
|
|
29
|
-
* {@link
|
|
27
|
+
* @returns Packed RGB: {@link ACGI_LIGHT_THEME_FOREGROUND} for light UI,
|
|
28
|
+
* {@link ACGI_DARK_THEME_FOREGROUND} for dark UI.
|
|
30
29
|
*
|
|
31
30
|
* @see {@link isLightColorTheme} — normalises raw `COLORTHEME` sysvar values
|
|
32
|
-
* @see {@link
|
|
31
|
+
* @see {@link acgiForegroundColorForBackground} — ACI-7 inversion from layout bg
|
|
33
32
|
*/
|
|
34
33
|
export function foregroundColorFromColorTheme(isLightTheme) {
|
|
35
|
-
return
|
|
34
|
+
return acgiContrastingForegroundColor(isLightTheme);
|
|
36
35
|
}
|
|
37
36
|
/**
|
|
38
37
|
* Normalises a raw `COLORTHEME` system-variable value to a boolean light UI
|
|
@@ -118,8 +117,8 @@ export function layoutBackgroundSysVar(isModelSpace) {
|
|
|
118
117
|
*
|
|
119
118
|
* When the sysvar holds a concrete RGB colour (`color.RGB` is defined), that
|
|
120
119
|
* value is returned directly. Otherwise the AutoCAD defaults are used:
|
|
121
|
-
* {@link
|
|
122
|
-
* {@link
|
|
120
|
+
* {@link ACGI_MODEL_SPACE_BACKGROUND} (`0x000000`) for model space or
|
|
121
|
+
* {@link ACGI_PAPER_SPACE_BACKGROUND} (`0xffffff`) for paper space.
|
|
123
122
|
*
|
|
124
123
|
* @param color - Layout background colour from `MODELBKCOLOR` or
|
|
125
124
|
* `PAPERBKCOLOR`, or `undefined` when the sysvar is unset.
|
|
@@ -134,7 +133,9 @@ export function canvasBackgroundFromColor(color, isModelSpace) {
|
|
|
134
133
|
if (rgb != null) {
|
|
135
134
|
return rgb;
|
|
136
135
|
}
|
|
137
|
-
return isModelSpace
|
|
136
|
+
return isModelSpace
|
|
137
|
+
? ACGI_MODEL_SPACE_BACKGROUND
|
|
138
|
+
: ACGI_PAPER_SPACE_BACKGROUND;
|
|
138
139
|
}
|
|
139
140
|
/**
|
|
140
141
|
* Reads the layout background colour from the database for the given space.
|
|
@@ -166,10 +167,10 @@ export function readLayoutBackgroundColor(database, isModelSpace) {
|
|
|
166
167
|
* Toggles a layout background colour between black and white.
|
|
167
168
|
*
|
|
168
169
|
* Inspects the current colour's perceived luminance via
|
|
169
|
-
* {@link
|
|
170
|
+
* {@link acgiIsLightBackground} and returns a new {@link AcCmColor} set to pure
|
|
170
171
|
* black (`RGB 0, 0, 0`) when the input is light, or pure white
|
|
171
172
|
* (`RGB 255, 255, 255`) when the input is dark. If the source colour has no
|
|
172
|
-
* RGB component, {@link
|
|
173
|
+
* RGB component, {@link ACGI_MODEL_SPACE_BACKGROUND} is used as the luminance
|
|
173
174
|
* reference.
|
|
174
175
|
*
|
|
175
176
|
* Used by {@link AcApSwitchBgCmd} to flip `MODELBKCOLOR` / `PAPERBKCOLOR`
|
|
@@ -189,9 +190,9 @@ export function readLayoutBackgroundColor(database, isModelSpace) {
|
|
|
189
190
|
*/
|
|
190
191
|
export function toggleBlackWhiteBackgroundColor(color) {
|
|
191
192
|
var _a;
|
|
192
|
-
var rgb = (_a = color.RGB) !== null && _a !== void 0 ? _a :
|
|
193
|
+
var rgb = (_a = color.RGB) !== null && _a !== void 0 ? _a : ACGI_MODEL_SPACE_BACKGROUND;
|
|
193
194
|
var next = new AcCmColor(AcCmColorMethod.ByColor);
|
|
194
|
-
if (
|
|
195
|
+
if (acgiIsLightBackground(rgb)) {
|
|
195
196
|
next.setRGB(0, 0, 0);
|
|
196
197
|
}
|
|
197
198
|
else {
|
|
@@ -204,7 +205,7 @@ export function toggleBlackWhiteBackgroundColor(color) {
|
|
|
204
205
|
*
|
|
205
206
|
* Returns `'black'` on light backgrounds and `'white'` on dark backgrounds so
|
|
206
207
|
* the crosshair and other SVG/CSS cursors remain visible. The decision is
|
|
207
|
-
* delegated to {@link
|
|
208
|
+
* delegated to {@link acgiIsLightBackground}.
|
|
208
209
|
*
|
|
209
210
|
* @param backgroundColor - Current renderer clear colour as packed
|
|
210
211
|
* `0xRRGGBB` RGB.
|
|
@@ -219,6 +220,6 @@ export function toggleBlackWhiteBackgroundColor(color) {
|
|
|
219
220
|
* @see {@link AcEdCursorManager.syncCursorBackground}
|
|
220
221
|
*/
|
|
221
222
|
export function cursorColorForBackground(backgroundColor) {
|
|
222
|
-
return
|
|
223
|
+
return acgiIsLightBackground(backgroundColor) ? 'black' : 'white';
|
|
223
224
|
}
|
|
224
225
|
//# sourceMappingURL=AcEdUiColor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcEdUiColor.js","sourceRoot":"","sources":["../../../src/editor/global/AcEdUiColor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"AcEdUiColor.js","sourceRoot":"","sources":["../../../src/editor/global/AcEdUiColor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAC9B,gCAAgC,EAChC,qBAAqB,EACtB,MAAM,uBAAuB,CA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2
2
|
import { type Emitter } from 'mitt';
|
|
3
3
|
import { AcEdMessageType } from '../input/ui/AcEdMessageType';
|
|
4
|
+
import { AcEdOpenMode } from '../view/AcEdOpenMode';
|
|
4
5
|
export interface AcEdFontNotLoadedInfo {
|
|
5
6
|
/** Font name */
|
|
6
7
|
fontName: string;
|
|
@@ -14,15 +15,26 @@ export interface AcEdFontNotLoadedInfo {
|
|
|
14
15
|
* type safety for event emission and listening throughout the application.
|
|
15
16
|
*
|
|
16
17
|
* ## Event Categories
|
|
17
|
-
* - **File Operations**: `open-file`, `open-file-progress`, `failed-to-open-file`
|
|
18
|
+
* - **File Operations**: `open-file`, `open-local-file-started`, `open-file-progress`, `failed-to-open-file`, `cache-font`, `font-file-selected`
|
|
18
19
|
* - **Palette Control**: `close-layer-manager`
|
|
19
20
|
* - **Font Management**: `fonts-not-loaded`, `failed-to-get-avaiable-fonts`, `font-not-found`
|
|
20
21
|
* - **Missing Resources**: `missed-data-changed`
|
|
21
22
|
* - **User Messages**: `message`
|
|
22
23
|
*/
|
|
23
24
|
export type AcEdEvents = {
|
|
24
|
-
/** Emitted to request opening a file dialog */
|
|
25
|
+
/** Emitted to request opening a file dialog (handled by {@link acapInstallOpenFileDialog}) */
|
|
25
26
|
'open-file': {};
|
|
27
|
+
/** Emitted when a local file is about to be opened through the built-in OPEN dialog */
|
|
28
|
+
'open-local-file-started': {
|
|
29
|
+
/** Requested document access mode for the pending open operation */
|
|
30
|
+
mode: AcEdOpenMode;
|
|
31
|
+
};
|
|
32
|
+
/** Emitted to request opening a font file dialog for IndexedDB caching */
|
|
33
|
+
'cache-font': {};
|
|
34
|
+
/** Emitted when the user selects a font file in the cache-font dialog */
|
|
35
|
+
'font-file-selected': {
|
|
36
|
+
file?: File;
|
|
37
|
+
};
|
|
26
38
|
/** Emitted to request closing the layer properties manager */
|
|
27
39
|
'close-layer-manager': {};
|
|
28
40
|
/** Emitted during file opening to report progress */
|
|
@@ -61,6 +73,8 @@ export type AcEdEvents = {
|
|
|
61
73
|
};
|
|
62
74
|
/** Emitted after missing resource caches change and UI state should refresh */
|
|
63
75
|
'missed-data-changed': {};
|
|
76
|
+
/** Emitted after the active document undo/redo stack changes */
|
|
77
|
+
'undo-stack-changed': {};
|
|
64
78
|
};
|
|
65
79
|
/**
|
|
66
80
|
* Global event bus for application-wide communication.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventBus.d.ts","sourceRoot":"","sources":["../../../src/editor/global/eventBus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAa,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"eventBus.d.ts","sourceRoot":"","sources":["../../../src/editor/global/eventBus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAa,EAAE,KAAK,OAAO,EAAE,MAAM,MAAM,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,MAAM,WAAW,qBAAqB;IACpC,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,8FAA8F;IAC9F,WAAW,EAAE,EAAE,CAAA;IACf,uFAAuF;IACvF,yBAAyB,EAAE;QACzB,oEAAoE;QACpE,IAAI,EAAE,YAAY,CAAA;KACnB,CAAA;IACD,0EAA0E;IAC1E,YAAY,EAAE,EAAE,CAAA;IAChB,yEAAyE;IACzE,oBAAoB,EAAE;QACpB,IAAI,CAAC,EAAE,IAAI,CAAA;KACZ,CAAA;IACD,8DAA8D;IAC9D,qBAAqB,EAAE,EAAE,CAAA;IACzB,qDAAqD;IACrD,oBAAoB,EAAE,sBAAsB,CAAA;IAC5C,+CAA+C;IAC/C,OAAO,EAAE;QACP,kCAAkC;QAClC,OAAO,EAAE,MAAM,CAAA;QACf,uCAAuC;QACvC,IAAI,EAAE,eAAe,CAAA;KACtB,CAAA;IACD,kEAAkE;IAClE,iBAAiB,EAAE;QACjB,KAAK,EAAE,MAAM,EAAE,CAAA;KAChB,CAAA;IACD,4CAA4C;IAC5C,kBAAkB,EAAE;QAClB,KAAK,EAAE,qBAAqB,EAAE,CAAA;KAC/B,CAAA;IACD,gEAAgE;IAChE,8BAA8B,EAAE;QAC9B,kEAAkE;QAClE,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,wCAAwC;IACxC,qBAAqB,EAAE;QACrB,gDAAgD;QAChD,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,gDAAgD;IAChD,gBAAgB,EAAE;QAChB,+BAA+B;QAC/B,QAAQ,EAAE,MAAM,CAAA;QAChB,gDAAgD;QAChD,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,+EAA+E;IAC/E,qBAAqB,EAAE,EAAE,CAAA;IACzB,gEAAgE;IAChE,oBAAoB,EAAE,EAAE,CAAA;CACzB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAsB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventBus.js","sourceRoot":"","sources":["../../../src/editor/global/eventBus.ts"],"names":[],"mappings":"AACA,OAAO,IAAsB,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"eventBus.js","sourceRoot":"","sources":["../../../src/editor/global/eventBus.ts"],"names":[],"mappings":"AACA,OAAO,IAAsB,MAAM,MAAM,CAAA;AAiFzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,CAAC,IAAM,QAAQ,GAAwB,IAAI,EAAc,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AcDbDatabase } from '@mlightcad/data-model';
|
|
2
|
+
/** Visual appearance of grip handles derived from grip system variables. */
|
|
3
|
+
export interface AcEdGripAppearance {
|
|
4
|
+
/** Grip square edge length in CSS pixels (`GRIPSIZE`). */
|
|
5
|
+
size: number;
|
|
6
|
+
/** CSS color for unheated grips (`GRIPCOLOR`). */
|
|
7
|
+
colorCss: string;
|
|
8
|
+
/** CSS color for hot / hovered grips (`GRIPHOT`). */
|
|
9
|
+
hotColorCss: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Reads grip appearance from `GRIPSIZE`, `GRIPCOLOR`, and `GRIPHOT`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function readGripAppearance(database: AcDbDatabase): AcEdGripAppearance;
|
|
15
|
+
/** Sysvar names that affect grip handle appearance or visibility. */
|
|
16
|
+
export declare const GRIP_APPEARANCE_SYSVARS: Set<string>;
|
|
17
|
+
export declare function isGripAppearanceSysVar(name: string): boolean;
|
|
18
|
+
//# sourceMappingURL=AcEdGripAppearance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdGripAppearance.d.ts","sourceRoot":"","sources":["../../../src/editor/grip/AcEdGripAppearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAGb,MAAM,uBAAuB,CAAA;AAE9B,4EAA4E;AAC5E,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAA;IACZ,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAA;IAChB,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAA;CACpB;AAOD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,kBAAkB,CAiB7E;AAED,qEAAqE;AACrE,eAAO,MAAM,uBAAuB,aAIlC,CAAA;AAEF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AcCmColor, AcCmColorMethod, AcDbSystemVariables, AcDbSysVarManager } from '@mlightcad/data-model';
|
|
2
|
+
function aciIndexToCss(index) {
|
|
3
|
+
var _a;
|
|
4
|
+
var color = new AcCmColor(AcCmColorMethod.ByACI, index);
|
|
5
|
+
return (_a = color.cssColor) !== null && _a !== void 0 ? _a : "rgb(".concat(color.red, ", ").concat(color.green, ", ").concat(color.blue, ")");
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Reads grip appearance from `GRIPSIZE`, `GRIPCOLOR`, and `GRIPHOT`.
|
|
9
|
+
*/
|
|
10
|
+
export function readGripAppearance(database) {
|
|
11
|
+
var manager = AcDbSysVarManager.instance();
|
|
12
|
+
var size = manager.getVar(AcDbSystemVariables.GRIPSIZE, database);
|
|
13
|
+
var gripColor = manager.getVar(AcDbSystemVariables.GRIPCOLOR, database);
|
|
14
|
+
var gripHot = manager.getVar(AcDbSystemVariables.GRIPHOT, database);
|
|
15
|
+
return {
|
|
16
|
+
size: size,
|
|
17
|
+
colorCss: aciIndexToCss(gripColor),
|
|
18
|
+
hotColorCss: aciIndexToCss(gripHot)
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Sysvar names that affect grip handle appearance or visibility. */
|
|
22
|
+
export var GRIP_APPEARANCE_SYSVARS = new Set([
|
|
23
|
+
AcDbSystemVariables.GRIPSIZE.toLowerCase(),
|
|
24
|
+
AcDbSystemVariables.GRIPCOLOR.toLowerCase(),
|
|
25
|
+
AcDbSystemVariables.GRIPHOT.toLowerCase()
|
|
26
|
+
]);
|
|
27
|
+
export function isGripAppearanceSysVar(name) {
|
|
28
|
+
return GRIP_APPEARANCE_SYSVARS.has(name.toLowerCase());
|
|
29
|
+
}
|
|
30
|
+
//# source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AAE;CAC1C,CAAC,CAAA;AAEF,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,OAAO,uBAAuB,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAA;AACxD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AcDbEntity, AcDbObjectId, AcGePoint3dLike } from '@mlightcad/data-model';
|
|
2
|
+
import { AcEdBaseView } from '../view/AcEdBaseView';
|
|
3
|
+
export interface AcEdGripEditTarget {
|
|
4
|
+
entityId: AcDbObjectId;
|
|
5
|
+
gripIndex: number;
|
|
6
|
+
gripBaseWcs: AcGePoint3dLike;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Handles an in-progress grip drag: preview on move, commit or cancel on end.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AcEdGripEditSession {
|
|
12
|
+
private readonly _view;
|
|
13
|
+
private readonly _entity;
|
|
14
|
+
private readonly _target;
|
|
15
|
+
private readonly _jig;
|
|
16
|
+
private readonly _onEnd;
|
|
17
|
+
private readonly _osnapMarkerManager;
|
|
18
|
+
private _boundMouseMove;
|
|
19
|
+
private _boundMouseUp;
|
|
20
|
+
private _boundKeyDown;
|
|
21
|
+
constructor(view: AcEdBaseView, entity: AcDbEntity, target: AcEdGripEditTarget, onEnd: () => void);
|
|
22
|
+
onMouseMove(e: MouseEvent): void;
|
|
23
|
+
private onMouseUp;
|
|
24
|
+
private onKeyDown;
|
|
25
|
+
cancel(): void;
|
|
26
|
+
private finish;
|
|
27
|
+
private resolveWcs;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=AcEdGripEditSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdGripEditSession.d.ts","sourceRoot":"","sources":["../../../src/editor/grip/AcEdGripEditSession.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAK9B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGnD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,YAAY,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,eAAe,CAAA;CAC7B;AAED;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAoB;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAmB;IAEvD,OAAO,CAAC,eAAe,CAAyC;IAChE,OAAO,CAAC,aAAa,CAAuC;IAC5D,OAAO,CAAC,aAAa,CAA0C;gBAG7D,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,MAAM,IAAI;IAmBnB,WAAW,CAAC,CAAC,EAAE,UAAU;IAMzB,OAAO,CAAC,SAAS;IAajB,OAAO,CAAC,SAAS;IAMjB,MAAM;IAIN,OAAO,CAAC,MAAM;IASd,OAAO,CAAC,UAAU;CAwBnB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { acapRunDatabaseEdit } from '../../util/AcApDatabaseEdit';
|
|
2
|
+
import { AcEdOsnapResolver } from '../input/AcEdOsnapResolver';
|
|
3
|
+
import { AcEdMarkerManager } from '../input/marker';
|
|
4
|
+
import { AcEdGripPreviewJig } from './AcEdGripPreviewJig';
|
|
5
|
+
/**
|
|
6
|
+
* Handles an in-progress grip drag: preview on move, commit or cancel on end.
|
|
7
|
+
*/
|
|
8
|
+
var AcEdGripEditSession = /** @class */ (function () {
|
|
9
|
+
function AcEdGripEditSession(view, entity, target, onEnd) {
|
|
10
|
+
var _this = this;
|
|
11
|
+
this._boundMouseMove = function (e) { return _this.onMouseMove(e); };
|
|
12
|
+
this._boundMouseUp = function (e) { return _this.onMouseUp(e); };
|
|
13
|
+
this._boundKeyDown = function (e) { return _this.onKeyDown(e); };
|
|
14
|
+
this._view = view;
|
|
15
|
+
this._entity = entity;
|
|
16
|
+
this._target = target;
|
|
17
|
+
this._onEnd = onEnd;
|
|
18
|
+
this._osnapMarkerManager = new AcEdMarkerManager(view);
|
|
19
|
+
this._jig = new AcEdGripPreviewJig(view, entity, target.gripIndex, target.gripBaseWcs);
|
|
20
|
+
document.addEventListener('mousemove', this._boundMouseMove);
|
|
21
|
+
document.addEventListener('mouseup', this._boundMouseUp);
|
|
22
|
+
document.addEventListener('keydown', this._boundKeyDown);
|
|
23
|
+
}
|
|
24
|
+
AcEdGripEditSession.prototype.onMouseMove = function (e) {
|
|
25
|
+
var wcs = this.resolveWcs(e);
|
|
26
|
+
this._jig.update(wcs);
|
|
27
|
+
this._jig.render();
|
|
28
|
+
};
|
|
29
|
+
AcEdGripEditSession.prototype.onMouseUp = function (e) {
|
|
30
|
+
var _this = this;
|
|
31
|
+
if (e.button !== 0)
|
|
32
|
+
return;
|
|
33
|
+
var wcs = this.resolveWcs(e);
|
|
34
|
+
var offset = this._jig.computeOffset(wcs);
|
|
35
|
+
var db = this._entity.database;
|
|
36
|
+
acapRunDatabaseEdit(db, 'Grip Edit', function () {
|
|
37
|
+
var entity = db.openEntityForWrite(_this._entity);
|
|
38
|
+
if (!entity)
|
|
39
|
+
return;
|
|
40
|
+
entity.subMoveGripPointsAt([_this._target.gripIndex], offset);
|
|
41
|
+
});
|
|
42
|
+
this.finish();
|
|
43
|
+
};
|
|
44
|
+
AcEdGripEditSession.prototype.onKeyDown = function (e) {
|
|
45
|
+
if (e.key !== 'Escape')
|
|
46
|
+
return;
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
this.cancel();
|
|
49
|
+
};
|
|
50
|
+
AcEdGripEditSession.prototype.cancel = function () {
|
|
51
|
+
this.finish();
|
|
52
|
+
};
|
|
53
|
+
AcEdGripEditSession.prototype.finish = function () {
|
|
54
|
+
this._jig.end();
|
|
55
|
+
this._osnapMarkerManager.clear();
|
|
56
|
+
document.removeEventListener('mousemove', this._boundMouseMove);
|
|
57
|
+
document.removeEventListener('mouseup', this._boundMouseUp);
|
|
58
|
+
document.removeEventListener('keydown', this._boundKeyDown);
|
|
59
|
+
this._onEnd();
|
|
60
|
+
};
|
|
61
|
+
AcEdGripEditSession.prototype.resolveWcs = function (e) {
|
|
62
|
+
var _a;
|
|
63
|
+
var canvasPos = this._view.viewportToCanvas({
|
|
64
|
+
x: e.clientX,
|
|
65
|
+
y: e.clientY
|
|
66
|
+
});
|
|
67
|
+
var wcs = this._view.screenToWorld(canvasPos);
|
|
68
|
+
var cursorWcs = { x: wcs.x, y: wcs.y, z: 0 };
|
|
69
|
+
this._osnapMarkerManager.hideMarker();
|
|
70
|
+
var snapPoint = this._view.osnapResolver.resolve({
|
|
71
|
+
cursorWcs: cursorWcs,
|
|
72
|
+
lastPoint: this._target.gripBaseWcs
|
|
73
|
+
});
|
|
74
|
+
if (snapPoint) {
|
|
75
|
+
this._osnapMarkerManager.showMarker(snapPoint, AcEdOsnapResolver.osnapModeToMarkerType(snapPoint.type));
|
|
76
|
+
return { x: snapPoint.x, y: snapPoint.y, z: (_a = snapPoint.z) !== null && _a !== void 0 ? _a : 0 };
|
|
77
|
+
}
|
|
78
|
+
return cursorWcs;
|
|
79
|
+
};
|
|
80
|
+
return AcEdGripEditSession;
|
|
81
|
+
}());
|
|
82
|
+
export { AcEdGripEditSession };
|
|
83
|
+
//# sourceMappingURL=AcEdGripEditSession.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdGripEditSession.js","sourceRoot":"","sources":["../../../src/editor/grip/AcEdGripEditSession.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO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ike } from '@mlightcad/data-model';
|
|
2
|
+
import { AcEdGripAppearance } from './AcEdGripAppearance';
|
|
3
|
+
/** Visual state of a grip handle. */
|
|
4
|
+
export type AcEdGripHandleState = 'normal' | 'hover' | 'hot';
|
|
5
|
+
/**
|
|
6
|
+
* Interactive DOM grip square rendered in container-local screen coordinates.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AcEdGripHandle {
|
|
9
|
+
private readonly _host;
|
|
10
|
+
private readonly _el;
|
|
11
|
+
private _state;
|
|
12
|
+
constructor(_host: HTMLElement, appearance: AcEdGripAppearance);
|
|
13
|
+
get element(): HTMLElement;
|
|
14
|
+
get state(): AcEdGripHandleState;
|
|
15
|
+
setState(state: AcEdGripHandleState): void;
|
|
16
|
+
setPosition(pos: AcGePoint2dLike): void;
|
|
17
|
+
applyAppearance(appearance: AcEdGripAppearance): void;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
private static injectCSS;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=AcEdGripHandle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdGripHandle.d.ts","sourceRoot":"","sources":["../../../src/editor/grip/AcEdGripHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,qCAAqC;AACrC,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;AAE5D;;GAEG;AACH,qBAAa,cAAc;IAKvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;IACjC,OAAO,CAAC,MAAM,CAAgC;gBAG3B,KAAK,EAAE,WAAW,EACnC,UAAU,EAAE,kBAAkB;IAehC,IAAI,OAAO,IAAI,WAAW,CAEzB;IAED,IAAI,KAAK,IAAI,mBAAmB,CAE/B;IAED,QAAQ,CAAC,KAAK,EAAE,mBAAmB;IAMnC,WAAW,CAAC,GAAG,EAAE,eAAe;IAKhC,eAAe,CAAC,UAAU,EAAE,kBAAkB;IAO9C,OAAO;IAIP,OAAO,CAAC,MAAM,CAAC,SAAS;CA0BzB"}
|