@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
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/** Returns whether one axis-aligned box lies fully inside another. */
|
|
2
|
+
export function isSpatialBoxFullyInside(item, box) {
|
|
3
|
+
return (item.minX >= box.minX &&
|
|
4
|
+
item.maxX <= box.maxX &&
|
|
5
|
+
item.minY >= box.minY &&
|
|
6
|
+
item.maxY <= box.maxY);
|
|
7
|
+
}
|
|
2
8
|
//# sourceMappingURL=AcTrSpatialIndex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcTrSpatialIndex.js","sourceRoot":"","sources":["../../src/spatialIndex/AcTrSpatialIndex.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"AcTrSpatialIndex.js","sourceRoot":"","sources":["../../src/spatialIndex/AcTrSpatialIndex.ts"],"names":[],"mappings":"AAmBA,sEAAsE;AACtE,MAAM,UAAU,uBAAuB,CACrC,IAA0B,EAC1B,GAAyB;IAEzB,OAAO,CACL,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI;QACrB,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI;QACrB,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI;QACrB,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CACtB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AcDbDatabase } from '@mlightcad/data-model';
|
|
2
|
+
/**
|
|
3
|
+
* Notifies UI listeners that undo/redo availability may have changed.
|
|
4
|
+
*/
|
|
5
|
+
export declare function acapNotifyUndoStackChanged(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Application-layer shortcut for {@link AcDbDatabase.runDatabaseEdit} that also
|
|
8
|
+
* notifies UI listeners when a new undo mark is created.
|
|
9
|
+
*/
|
|
10
|
+
export declare function acapRunDatabaseEdit(db: AcDbDatabase, label: string, fn: () => void): void;
|
|
11
|
+
//# sourceMappingURL=AcApDatabaseEdit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApDatabaseEdit.d.ts","sourceRoot":"","sources":["../../src/util/AcApDatabaseEdit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAIpD;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,MAAM,IAAI,GACb,IAAI,CAMN"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { eventBus } from '../editor/global/eventBus';
|
|
2
|
+
/**
|
|
3
|
+
* Notifies UI listeners that undo/redo availability may have changed.
|
|
4
|
+
*/
|
|
5
|
+
export function acapNotifyUndoStackChanged() {
|
|
6
|
+
eventBus.emit('undo-stack-changed', {});
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Application-layer shortcut for {@link AcDbDatabase.runDatabaseEdit} that also
|
|
10
|
+
* notifies UI listeners when a new undo mark is created.
|
|
11
|
+
*/
|
|
12
|
+
export function acapRunDatabaseEdit(db, label, fn) {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
var wasRecording = (_b = (_a = db.isUndoRecording) === null || _a === void 0 ? void 0 : _a.call(db)) !== null && _b !== void 0 ? _b : false;
|
|
15
|
+
db.runDatabaseEdit(label, fn);
|
|
16
|
+
if (!wasRecording) {
|
|
17
|
+
acapNotifyUndoStackChanged();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=AcApDatabaseEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApDatabaseEdit.js","sourceRoot":"","sources":["../../src/util/AcApDatabaseEdit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAEpD;;GAEG;AACH,MAAM,UAAU,0BAA0B;IACxC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;AACzC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,EAAgB,EAChB,KAAa,EACb,EAAc;;IAEd,IAAM,YAAY,GAAG,MAAA,MAAA,EAAE,CAAC,eAAe,kDAAI,mCAAI,KAAK,CAAA;IACpD,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IAC7B,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,0BAA0B,EAAE,CAAA;IAC9B,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type FontInfo, type FontType, type ShxFontData, ShxParserFont } from '@mlightcad/mtext-renderer';
|
|
2
|
-
export type { FontInfo, FontType, ShxFontData } from '@mlightcad/mtext-renderer';
|
|
1
|
+
import { type FontInfo, type FontLoadStatus, type FontType, type ShxFontData, ShxParserFont } from '@mlightcad/mtext-renderer';
|
|
2
|
+
export type { FontInfo, FontLoadStatus, FontType, ShxFontData } from '@mlightcad/mtext-renderer';
|
|
3
3
|
export { ShxParserFont } from '@mlightcad/mtext-renderer';
|
|
4
4
|
/**
|
|
5
5
|
* Font helpers for MTEXT and UI (character map, ribbon): wraps the shared
|
|
@@ -75,5 +75,17 @@ export declare class AcApFontUtil {
|
|
|
75
75
|
* loaded. Delegates to {@link AcApDocManager.loadFonts}.
|
|
76
76
|
*/
|
|
77
77
|
static ensureDrawingFontLoaded(fontName: string): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Parses a user-uploaded font file, registers it for rendering, and stores it
|
|
80
|
+
* in IndexedDB when font caching is enabled.
|
|
81
|
+
*
|
|
82
|
+
* Supported formats: `.shx`, `.ttf`, `.otf`, `.woff`.
|
|
83
|
+
*
|
|
84
|
+
* @param data - Font file contents or a browser `File` selected by the user
|
|
85
|
+
* @param fileName - Font file name when `data` is an `ArrayBuffer`
|
|
86
|
+
* @param aliases - Optional alias names (e.g. missed drawing font names)
|
|
87
|
+
* @param encoding - Optional character encoding for SHX bigfonts
|
|
88
|
+
*/
|
|
89
|
+
static cacheFont(data: ArrayBuffer | File, fileName?: string, aliases?: string[], encoding?: string): Promise<FontLoadStatus>;
|
|
78
90
|
}
|
|
79
91
|
//# sourceMappingURL=AcApFontUtil.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApFontUtil.d.ts","sourceRoot":"","sources":["../../src/util/AcApFontUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"AcApFontUtil.d.ts","sourceRoot":"","sources":["../../src/util/AcApFontUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,cAAc,EAEnB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,aAAa,EACd,MAAM,2BAA2B,CAAA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var AcApFontUtil = /** @class */ (function () {
|
|
|
167
167
|
});
|
|
168
168
|
});
|
|
169
169
|
};
|
|
170
|
+
/**
|
|
171
|
+
* Parses a user-uploaded font file, registers it for rendering, and stores it
|
|
172
|
+
* in IndexedDB when font caching is enabled.
|
|
173
|
+
*
|
|
174
|
+
* Supported formats: `.shx`, `.ttf`, `.otf`, `.woff`.
|
|
175
|
+
*
|
|
176
|
+
* @param data - Font file contents or a browser `File` selected by the user
|
|
177
|
+
* @param fileName - Font file name when `data` is an `ArrayBuffer`
|
|
178
|
+
* @param aliases - Optional alias names (e.g. missed drawing font names)
|
|
179
|
+
* @param encoding - Optional character encoding for SHX bigfonts
|
|
180
|
+
*/
|
|
181
|
+
AcApFontUtil.cacheFont = function (data, fileName, aliases, encoding) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
183
|
+
return __generator(this, function (_a) {
|
|
184
|
+
return [2 /*return*/, FontManager.instance.cacheFont(data, fileName, aliases, encoding)];
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
};
|
|
170
188
|
return AcApFontUtil;
|
|
171
189
|
}());
|
|
172
190
|
export { AcApFontUtil };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcApFontUtil.js","sourceRoot":"","sources":["../../src/util/AcApFontUtil.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AcApFontUtil.js","sourceRoot":"","sources":["../../src/util/AcApFontUtil.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAGL,WAAW,EAGX,aAAa,EACd,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAQtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD;;;;;;;;GAQG;AACH;IAAA;IAgIA,CAAC;IA/H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,sBAAS,GAAtB,UACE,IAAwB,EACxB,QAAiB,EACjB,OAAkB,EAClB,QAAiB;;;gBAEjB,sBAAO,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAA;;;KACzE;IACH,mBAAC;AAAD,CAAC,AAhID,IAgIC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AcGeMatrix3d, AcGePoint3dLike } from '@mlightcad/data-model';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a world-space rotation matrix around a given base point.
|
|
4
|
+
*
|
|
5
|
+
* @param basePoint - Rotation origin.
|
|
6
|
+
* @param angleRad - Rotation angle in radians.
|
|
7
|
+
* @returns Composite transform that rotates around `basePoint`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createRotationMatrix(basePoint: AcGePoint3dLike, angleRad: number): AcGeMatrix3d;
|
|
10
|
+
//# sourceMappingURL=AcApGeTransform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApGeTransform.d.ts","sourceRoot":"","sources":["../../src/util/AcApGeTransform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAErE;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,MAAM,gBAYjB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AcGeMatrix3d } from '@mlightcad/data-model';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a world-space rotation matrix around a given base point.
|
|
4
|
+
*
|
|
5
|
+
* @param basePoint - Rotation origin.
|
|
6
|
+
* @param angleRad - Rotation angle in radians.
|
|
7
|
+
* @returns Composite transform that rotates around `basePoint`.
|
|
8
|
+
*/
|
|
9
|
+
export function createRotationMatrix(basePoint, angleRad) {
|
|
10
|
+
return new AcGeMatrix3d()
|
|
11
|
+
.makeTranslation(basePoint.x, basePoint.y, basePoint.z)
|
|
12
|
+
.multiply(new AcGeMatrix3d().makeRotationZ(angleRad))
|
|
13
|
+
.multiply(new AcGeMatrix3d().makeTranslation(-basePoint.x, -basePoint.y, -basePoint.z));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=AcApGeTransform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcApGeTransform.js","sourceRoot":"","sources":["../../src/util/AcApGeTransform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAmB,MAAM,uBAAuB,CAAA;AAErE;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,SAA0B,EAC1B,QAAgB;IAEhB,OAAO,IAAI,YAAY,EAAE;SACtB,eAAe,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;SACtD,QAAQ,CAAC,IAAI,YAAY,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;SACpD,QAAQ,CACP,IAAI,YAAY,EAAE,CAAC,eAAe,CAChC,CAAC,SAAS,CAAC,CAAC,EACZ,CAAC,SAAS,CAAC,CAAC,EACZ,CAAC,SAAS,CAAC,CAAC,CACb,CACF,CAAA;AACL,CAAC"}
|
package/lib/util/index.d.ts
CHANGED
package/lib/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mCAAmC,CAAA;AACjD,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mCAAmC,CAAA;AACjD,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
|
package/lib/util/index.js
CHANGED
package/lib/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mCAAmC,CAAA;AACjD,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mCAAmC,CAAA;AACjD,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AcTrView2d } from './AcTrView2d';
|
|
2
|
+
/**
|
|
3
|
+
* Document-level undo/redo shortcut resolved from a keyboard event.
|
|
4
|
+
*
|
|
5
|
+
* - Windows: Ctrl+Z (undo), Ctrl+Y (redo)
|
|
6
|
+
* - macOS: Cmd+Z (undo), Shift+Cmd+Z (redo)
|
|
7
|
+
*
|
|
8
|
+
* Ctrl/Cmd+Shift+Z is also accepted as redo on Windows for convenience.
|
|
9
|
+
*/
|
|
10
|
+
export type AcEdUndoRedoShortcut = 'undo' | 'redo';
|
|
11
|
+
/**
|
|
12
|
+
* Handles global keyboard shortcuts for a CAD view.
|
|
13
|
+
*
|
|
14
|
+
* Shortcuts are suppressed while the user is typing in editable fields, during
|
|
15
|
+
* IME composition, while a command is acquiring input, or while MText is being
|
|
16
|
+
* edited inline.
|
|
17
|
+
*/
|
|
18
|
+
export declare class AcEdViewKeyHandler {
|
|
19
|
+
private readonly view;
|
|
20
|
+
private static readonly COMMAND_LINE_INPUT_CLASS;
|
|
21
|
+
constructor(view: AcTrView2d);
|
|
22
|
+
/**
|
|
23
|
+
* Handles a document `keydown` event for global view shortcuts.
|
|
24
|
+
*
|
|
25
|
+
* @returns `true` when the event was consumed and default action prevented.
|
|
26
|
+
*/
|
|
27
|
+
handleKeyDown(e: KeyboardEvent): boolean;
|
|
28
|
+
private resolveUndoRedoShortcut;
|
|
29
|
+
private shouldIgnoreEditableTargetShortcut;
|
|
30
|
+
private shouldHandleUndoRedoShortcut;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=AcEdViewKeyHandler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdViewKeyHandler.d.ts","sourceRoot":"","sources":["../../src/view/AcEdViewKeyHandler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,CAAA;AAElD;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAGjB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAgB;gBAEnC,IAAI,EAAE,UAAU;IAE7C;;;;OAIG;IACH,aAAa,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO;IA0CxC,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,kCAAkC;IAmB1C,OAAO,CAAC,4BAA4B;CA4BrC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { AcApDocManager } from '../app';
|
|
2
|
+
import { AcEdMTextEditor } from '../editor/input/ui/AcEdMTextEditor';
|
|
3
|
+
/**
|
|
4
|
+
* Handles global keyboard shortcuts for a CAD view.
|
|
5
|
+
*
|
|
6
|
+
* Shortcuts are suppressed while the user is typing in editable fields, during
|
|
7
|
+
* IME composition, while a command is acquiring input, or while MText is being
|
|
8
|
+
* edited inline.
|
|
9
|
+
*/
|
|
10
|
+
var AcEdViewKeyHandler = /** @class */ (function () {
|
|
11
|
+
function AcEdViewKeyHandler(view) {
|
|
12
|
+
this.view = view;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Handles a document `keydown` event for global view shortcuts.
|
|
16
|
+
*
|
|
17
|
+
* @returns `true` when the event was consumed and default action prevented.
|
|
18
|
+
*/
|
|
19
|
+
AcEdViewKeyHandler.prototype.handleKeyDown = function (e) {
|
|
20
|
+
var undoRedoShortcut = this.resolveUndoRedoShortcut(e);
|
|
21
|
+
var ignoreEditableTarget = this.shouldIgnoreEditableTargetShortcut(e);
|
|
22
|
+
if (ignoreEditableTarget && !undoRedoShortcut) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if (undoRedoShortcut) {
|
|
26
|
+
if (!this.shouldHandleUndoRedoShortcut(e) ||
|
|
27
|
+
AcEdMTextEditor.getActiveInputBox() ||
|
|
28
|
+
this.view.editor.isActive) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
AcApDocManager.instance.sendStringToExecute(undoRedoShortcut);
|
|
32
|
+
e.preventDefault();
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
switch (e.code) {
|
|
36
|
+
case 'Escape':
|
|
37
|
+
this.view.selectionSet.clear();
|
|
38
|
+
return false;
|
|
39
|
+
case 'Delete':
|
|
40
|
+
case 'Backspace':
|
|
41
|
+
// Only dispatch erase when no command is currently active.
|
|
42
|
+
// Dispatching erase mid-command (e.g. while LINE awaits the next
|
|
43
|
+
// point) corrupts the active command's input pipeline because
|
|
44
|
+
// sendStringToExecute clears scripted inputs unconditionally.
|
|
45
|
+
if (!this.view.editor.isActive) {
|
|
46
|
+
AcApDocManager.instance.sendStringToExecute('erase');
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
};
|
|
52
|
+
AcEdViewKeyHandler.prototype.resolveUndoRedoShortcut = function (e) {
|
|
53
|
+
if (!e.ctrlKey && !e.metaKey) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
if (e.code === 'KeyY') {
|
|
57
|
+
return 'redo';
|
|
58
|
+
}
|
|
59
|
+
if (e.code === 'KeyZ') {
|
|
60
|
+
return e.shiftKey ? 'redo' : 'undo';
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
};
|
|
64
|
+
AcEdViewKeyHandler.prototype.shouldIgnoreEditableTargetShortcut = function (e) {
|
|
65
|
+
if (e.isComposing || e.keyCode === 229) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
var target = e.target;
|
|
69
|
+
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'TEXTAREA') {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
if (target === null || target === void 0 ? void 0 : target.isContentEditable) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
return (target === null || target === void 0 ? void 0 : target.tagName) === 'INPUT';
|
|
76
|
+
};
|
|
77
|
+
AcEdViewKeyHandler.prototype.shouldHandleUndoRedoShortcut = function (e) {
|
|
78
|
+
if (e.isComposing || e.keyCode === 229) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
var target = e.target;
|
|
82
|
+
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'TEXTAREA') {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
if (target === null || target === void 0 ? void 0 : target.isContentEditable) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'INPUT') {
|
|
89
|
+
var input = target;
|
|
90
|
+
if (input.classList.contains(AcEdViewKeyHandler.COMMAND_LINE_INPUT_CLASS)) {
|
|
91
|
+
return input.value.trim() === '' && !input.readOnly;
|
|
92
|
+
}
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
};
|
|
97
|
+
AcEdViewKeyHandler.COMMAND_LINE_INPUT_CLASS = 'ml-cli-text';
|
|
98
|
+
return AcEdViewKeyHandler;
|
|
99
|
+
}());
|
|
100
|
+
export { AcEdViewKeyHandler };
|
|
101
|
+
//# sourceMappingURL=AcEdViewKeyHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcEdViewKeyHandler.js","sourceRoot":"","sources":["../../src/view/AcEdViewKeyHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAapE;;;;;;GAMG;AACH;IAGE,4BAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD;;;;OAIG;IACH,0CAAa,GAAb,UAAc,CAAgB;QAC5B,IAAM,gBAAgB,GAAG,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAA;QACxD,IAAM,oBAAoB,GAAG,IAAI,CAAC,kCAAkC,CAAC,CAAC,CAAC,CAAA;QAEvE,IAAI,oBAAoB,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC9C,OAAO,KAAK,CAAA;QACd,CAAC;QAED,IAAI,gBAAgB,EAAE,CAAC;YACrB,IACE,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,CAAC;gBACrC,eAAe,CAAC,iBAAiB,EAAE;gBACnC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EACzB,CAAC;gBACD,OAAO,KAAK,CAAA;YACd,CAAC;YAED,cAAc,CAAC,QAAQ,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;YAC7D,CAAC,CAAC,cAAc,EAAE,CAAA;YAClB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,QAAQ,CAAC,CAAC,I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,CAAE,iBAAiB,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAA;QACb,CAAC;QAED,OAAO,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,MAAK,OAAO,CAAA;IACpC,CAAC;IAEO,yDAA4B,GAApC,UACE,CAA4D;QAE5D,IAAI,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,OAAO,KAAK,GAAG,EAAE,CAAC;YACvC,OAAO,KAAK,CAAA;QACd,CAAC;QAED,IAAM,MAAM,GAAG,CAAC,CAAC,MAA4B,CAAA;QAC7C,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,MAAK,UAAU,EAAE,CAAC;YACnC,OAAO,KAAK,CAAA;QACd,CAAC;QAED,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,iBAAiB,EAAE,CAAC;YAC9B,OAAO,KAAK,CAAA;QACd,CAAC;QAED,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,MAAK,OAAO,EAAE,CAAC;YAChC,IAAM,KAAK,GAAG,MAA0B,CAAA;YACxC,IACE,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,EACrE,CAAC;gBACD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA;YACrD,CAAC;YACD,OAAO,KAAK,CAAA;QACd,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAnHuB,2CAAwB,GAAG,aAAa,CAAA;IAoHlE,yBAAC;CAAA,AArHD,IAqHC;SArHY,kBAAkB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AcDbBlockTableRecord, AcDbEntity, AcDbLayerTableRecordAttrs, AcDbObjectId } from '@mlightcad/data-model';
|
|
2
|
+
import { AcEdLayerInfo } from '../editor';
|
|
3
|
+
type AcTrEntityDisplayCandidate = Pick<AcDbEntity, 'visibility' | 'layer'>;
|
|
4
|
+
/**
|
|
5
|
+
* Resolves whether database entities should be converted into scene geometry.
|
|
6
|
+
*
|
|
7
|
+
* Entity-level {@link AcDbEntity.visibility} only reflects per-entity hide state
|
|
8
|
+
* (DXF code 60). Layer off/frozen state is tracked separately on the layer table
|
|
9
|
+
* so off-layer content can be skipped at open time and converted later when the
|
|
10
|
+
* layer becomes visible again.
|
|
11
|
+
*
|
|
12
|
+
* The host view ({@link AcTrView2d}) supplies layer metadata and performs batch
|
|
13
|
+
* conversion through its existing entity pipeline.
|
|
14
|
+
*/
|
|
15
|
+
export declare class AcTrEntityDisplayController {
|
|
16
|
+
private readonly getLayerInfo;
|
|
17
|
+
constructor(getLayerInfo: (layerName: string) => AcEdLayerInfo | undefined);
|
|
18
|
+
/**
|
|
19
|
+
* Returns true when an entity should be converted into scene geometry now.
|
|
20
|
+
*/
|
|
21
|
+
shouldConvert(entity: AcTrEntityDisplayCandidate): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Returns true when an entity should be converted for offline export.
|
|
24
|
+
*
|
|
25
|
+
* Export snapshots carry layer on/off state separately; geometry for off layers
|
|
26
|
+
* must still be present so the HTML layer panel can toggle visibility.
|
|
27
|
+
*/
|
|
28
|
+
shouldConvertForExport(entity: AcTrEntityDisplayCandidate, includeInvisibleLayers?: boolean): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Returns true when a layer visibility change may have made entities drawable.
|
|
31
|
+
*/
|
|
32
|
+
layerVisibilityMayHaveChanged(changes: Partial<AcDbLayerTableRecordAttrs>): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Collects entities on the given layer that were skipped while the layer was
|
|
35
|
+
* off/frozen and therefore are not yet present in the scene.
|
|
36
|
+
*/
|
|
37
|
+
collectMissingEntitiesOnLayer(layerName: string, blockTableRecord: AcDbBlockTableRecord, hasEntity: (objectId: AcDbObjectId) => boolean): AcDbEntity[];
|
|
38
|
+
/**
|
|
39
|
+
* Collects drawable entities missing from the scene across an entire layout,
|
|
40
|
+
* including entities on off/frozen layers skipped during interactive viewing.
|
|
41
|
+
*/
|
|
42
|
+
collectMissingEntitiesForExport(blockTableRecord: AcDbBlockTableRecord, hasEntity: (objectId: AcDbObjectId) => boolean, includeInvisibleLayers?: boolean): AcDbEntity[];
|
|
43
|
+
private collectMissingEntities;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=AcTrEntityDisplayController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcTrEntityDisplayController.d.ts","sourceRoot":"","sources":["../../src/view/AcTrEntityDisplayController.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,yBAAyB,EACzB,YAAY,EACb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAGzC,KAAK,0BAA0B,GAAG,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,OAAO,CAAC,CAAA;AAE1E;;;;;;;;;;GAUG;AACH,qBAAa,2BAA2B;IAEpC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,CAC7B,SAAS,EAAE,MAAM,KACd,aAAa,GAAG,SAAS;IAGhC;;OAEG;IACH,aAAa,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO;IAa1D;;;;;OAKG;IACH,sBAAsB,CACpB,MAAM,EAAE,0BAA0B,EAClC,sBAAsB,UAAO,GAC5B,OAAO;IAiBV;;OAEG;IACH,6BAA6B,CAC3B,OAAO,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAC1C,OAAO;IAIV;;;OAGG;IACH,6BAA6B,CAC3B,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,oBAAoB,EACtC,SAAS,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,GAC7C,UAAU,EAAE;IAQf;;;OAGG;IACH,+BAA+B,CAC7B,gBAAgB,EAAE,oBAAoB,EACtC,SAAS,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,EAC9C,sBAAsB,UAAO,GAC5B,UAAU,EAAE;IAMf,OAAO,CAAC,sBAAsB;CAkB/B"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
var __values = (this && this.__values) || function(o) {
|
|
2
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
3
|
+
if (m) return m.call(o);
|
|
4
|
+
if (o && typeof o.length === "number") return {
|
|
5
|
+
next: function () {
|
|
6
|
+
if (o && i >= o.length) o = void 0;
|
|
7
|
+
return { value: o && o[i++], done: !o };
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
11
|
+
};
|
|
12
|
+
import { AcTrLayer } from './AcTrLayer';
|
|
13
|
+
/**
|
|
14
|
+
* Resolves whether database entities should be converted into scene geometry.
|
|
15
|
+
*
|
|
16
|
+
* Entity-level {@link AcDbEntity.visibility} only reflects per-entity hide state
|
|
17
|
+
* (DXF code 60). Layer off/frozen state is tracked separately on the layer table
|
|
18
|
+
* so off-layer content can be skipped at open time and converted later when the
|
|
19
|
+
* layer becomes visible again.
|
|
20
|
+
*
|
|
21
|
+
* The host view ({@link AcTrView2d}) supplies layer metadata and performs batch
|
|
22
|
+
* conversion through its existing entity pipeline.
|
|
23
|
+
*/
|
|
24
|
+
var AcTrEntityDisplayController = /** @class */ (function () {
|
|
25
|
+
function AcTrEntityDisplayController(getLayerInfo) {
|
|
26
|
+
this.getLayerInfo = getLayerInfo;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns true when an entity should be converted into scene geometry now.
|
|
30
|
+
*/
|
|
31
|
+
AcTrEntityDisplayController.prototype.shouldConvert = function (entity) {
|
|
32
|
+
if (!entity.visibility) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
var layer = this.getLayerInfo(entity.layer);
|
|
36
|
+
if (!layer) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
return AcTrLayer.isLayerVisible(layer);
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Returns true when an entity should be converted for offline export.
|
|
43
|
+
*
|
|
44
|
+
* Export snapshots carry layer on/off state separately; geometry for off layers
|
|
45
|
+
* must still be present so the HTML layer panel can toggle visibility.
|
|
46
|
+
*/
|
|
47
|
+
AcTrEntityDisplayController.prototype.shouldConvertForExport = function (entity, includeInvisibleLayers) {
|
|
48
|
+
if (includeInvisibleLayers === void 0) { includeInvisibleLayers = true; }
|
|
49
|
+
if (!entity.visibility) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
if (includeInvisibleLayers) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
var layer = this.getLayerInfo(entity.layer);
|
|
56
|
+
if (!layer) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
return AcTrLayer.isLayerVisible(layer);
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Returns true when a layer visibility change may have made entities drawable.
|
|
63
|
+
*/
|
|
64
|
+
AcTrEntityDisplayController.prototype.layerVisibilityMayHaveChanged = function (changes) {
|
|
65
|
+
return changes.isOff !== undefined || changes.standardFlags !== undefined;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Collects entities on the given layer that were skipped while the layer was
|
|
69
|
+
* off/frozen and therefore are not yet present in the scene.
|
|
70
|
+
*/
|
|
71
|
+
AcTrEntityDisplayController.prototype.collectMissingEntitiesOnLayer = function (layerName, blockTableRecord, hasEntity) {
|
|
72
|
+
var _this = this;
|
|
73
|
+
return this.collectMissingEntities(blockTableRecord, hasEntity, function (entity) { return entity.layer === layerName && _this.shouldConvert(entity); });
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Collects drawable entities missing from the scene across an entire layout,
|
|
77
|
+
* including entities on off/frozen layers skipped during interactive viewing.
|
|
78
|
+
*/
|
|
79
|
+
AcTrEntityDisplayController.prototype.collectMissingEntitiesForExport = function (blockTableRecord, hasEntity, includeInvisibleLayers) {
|
|
80
|
+
var _this = this;
|
|
81
|
+
if (includeInvisibleLayers === void 0) { includeInvisibleLayers = true; }
|
|
82
|
+
return this.collectMissingEntities(blockTableRecord, hasEntity, function (entity) {
|
|
83
|
+
return _this.shouldConvertForExport(entity, includeInvisibleLayers);
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
AcTrEntityDisplayController.prototype.collectMissingEntities = function (blockTableRecord, hasEntity, includeEntity) {
|
|
87
|
+
var e_1, _a;
|
|
88
|
+
var pending = [];
|
|
89
|
+
var iterator = blockTableRecord.newIterator();
|
|
90
|
+
try {
|
|
91
|
+
for (var iterator_1 = __values(iterator), iterator_1_1 = iterator_1.next(); !iterator_1_1.done; iterator_1_1 = iterator_1.next()) {
|
|
92
|
+
var entity = iterator_1_1.value;
|
|
93
|
+
if (!includeEntity(entity)) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (hasEntity(entity.objectId)) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
pending.push(entity);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
103
|
+
finally {
|
|
104
|
+
try {
|
|
105
|
+
if (iterator_1_1 && !iterator_1_1.done && (_a = iterator_1.return)) _a.call(iterator_1);
|
|
106
|
+
}
|
|
107
|
+
finally { if (e_1) throw e_1.error; }
|
|
108
|
+
}
|
|
109
|
+
return pending;
|
|
110
|
+
};
|
|
111
|
+
return AcTrEntityDisplayController;
|
|
112
|
+
}());
|
|
113
|
+
export { AcTrEntityDisplayController };
|
|
114
|
+
//# sourceMappingURL=AcTrEntityDisplayController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcTrEntityDisplayController.js","sourceRoot":"","sources":["../../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wcsChildBoxes: ReadonlyArray<{
|
|
6
|
+
minX: number;
|
|
7
|
+
minY: number;
|
|
8
|
+
maxX: number;
|
|
9
|
+
maxY: number;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Tests whether a 2D axis-aligned box has finite extents.
|
|
14
|
+
*
|
|
15
|
+
* Deferred MText/Shape geometry can seed `±Infinity` placeholders in
|
|
16
|
+
* {@link AcTrGroup.wcsChildBoxes}; those entries must be skipped when unioning
|
|
17
|
+
* bounds for spatial indexing.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isFiniteSpatialBBox(box: {
|
|
20
|
+
minX: number;
|
|
21
|
+
minY: number;
|
|
22
|
+
maxX: number;
|
|
23
|
+
maxY: number;
|
|
24
|
+
}): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Unions per-child WCS boxes into one axis-aligned WCS box.
|
|
27
|
+
*
|
|
28
|
+
* Non-finite child boxes are skipped, matching
|
|
29
|
+
* {@link AcTrGroup.syncWcsBboxFromChildBoxes}.
|
|
30
|
+
*/
|
|
31
|
+
export declare function unionGroupWcsChildBoxes(group: AcTrGroupWcsBboxLike): THREE.Box3;
|
|
32
|
+
/**
|
|
33
|
+
* Verifies that a block group's aggregate {@link AcTrGroup.wcsBbox} matches the
|
|
34
|
+
* union of its per-child {@link AcTrGroup.wcsChildBoxes}.
|
|
35
|
+
*
|
|
36
|
+
* Called from {@link AcTrView2d.handleGroup} in non-production builds. After
|
|
37
|
+
* {@link AcDbRenderingCache.draw} applies the INSERT transform via
|
|
38
|
+
* `applyMatrix`, both fields must stay in sync for spatial indexing.
|
|
39
|
+
*/
|
|
40
|
+
export declare function assertGroupWcsBboxesConsistent(group: AcTrGroupWcsBboxLike): void;
|
|
41
|
+
/** @internal Narrow helper for handleGroup dev checks. */
|
|
42
|
+
export declare function assertAcTrGroupWcsBboxesConsistent(group: AcTrGroup): void;
|
|
43
|
+
//# sourceMappingURL=AcTrGroupWcsBboxAssert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcTrGroupWcsBboxAssert.d.ts","sourceRoot":"","sources":["../../src/view/AcTrGroupWcsBboxAssert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAA;IACnB,aAAa,EAAE,aAAa,CAAC;QAC3B,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACb,CAAC,CAAA;CACH;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,OAAO,CAOV;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,oBAAoB,GAC1B,KAAK,CAAC,IAAI,CAcZ;AAED;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,oBAAoB,GAC1B,IAAI,CAsBN;AAED,0DAA0D;AAC1D,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAEzE"}
|