@mlightcad/cad-editor 0.0.0-stage → 1.8.0-preview.0

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.
Files changed (399) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +424 -2
  3. package/dist/app/app.d.ts +31 -0
  4. package/dist/app/app.d.ts.map +1 -0
  5. package/dist/app/cadViewerNotificationCenter.d.ts +20 -0
  6. package/dist/app/cadViewerNotificationCenter.d.ts.map +1 -0
  7. package/dist/app/index.d.ts +5 -0
  8. package/dist/app/index.d.ts.map +1 -0
  9. package/dist/app/register.d.ts +27 -0
  10. package/dist/app/register.d.ts.map +1 -0
  11. package/dist/app/store.d.ts +16 -0
  12. package/dist/app/store.d.ts.map +1 -0
  13. package/dist/cad-editor.css +1 -0
  14. package/dist/cad-editor.d.ts +5 -0
  15. package/dist/cad-editor.js +39767 -0
  16. package/dist/command/AcApAttDefCmd.d.ts +12 -0
  17. package/dist/command/AcApAttDefCmd.d.ts.map +1 -0
  18. package/dist/command/AcApAttEditCmd.d.ts +14 -0
  19. package/dist/command/AcApAttEditCmd.d.ts.map +1 -0
  20. package/dist/command/AcApCountListCmd.d.ts +12 -0
  21. package/dist/command/AcApCountListCmd.d.ts.map +1 -0
  22. package/dist/command/AcApDimStyleCmd.d.ts +8 -0
  23. package/dist/command/AcApDimStyleCmd.d.ts.map +1 -0
  24. package/dist/command/AcApDrawingUnitsCmd.d.ts +5 -0
  25. package/dist/command/AcApDrawingUnitsCmd.d.ts.map +1 -0
  26. package/dist/command/AcApExportHtmlDlgCmd.d.ts +11 -0
  27. package/dist/command/AcApExportHtmlDlgCmd.d.ts.map +1 -0
  28. package/dist/command/AcApExportPdfDlgCmd.d.ts +11 -0
  29. package/dist/command/AcApExportPdfDlgCmd.d.ts.map +1 -0
  30. package/dist/command/AcApFindCmd.d.ts +33 -0
  31. package/dist/command/AcApFindCmd.d.ts.map +1 -0
  32. package/dist/command/AcApHatchRibbonCmd.d.ts +74 -0
  33. package/dist/command/AcApHatchRibbonCmd.d.ts.map +1 -0
  34. package/dist/command/AcApInsertPaletteCmd.d.ts +13 -0
  35. package/dist/command/AcApInsertPaletteCmd.d.ts.map +1 -0
  36. package/dist/command/AcApLayerStateCmd.d.ts +5 -0
  37. package/dist/command/AcApLayerStateCmd.d.ts.map +1 -0
  38. package/dist/command/AcApMarkupPanelCmd.d.ts +8 -0
  39. package/dist/command/AcApMarkupPanelCmd.d.ts.map +1 -0
  40. package/dist/command/AcApMeasurementPanelCmd.d.ts +8 -0
  41. package/dist/command/AcApMeasurementPanelCmd.d.ts.map +1 -0
  42. package/dist/command/AcApMemCmd.d.ts +11 -0
  43. package/dist/command/AcApMemCmd.d.ts.map +1 -0
  44. package/dist/command/AcApMissedDataCmd.d.ts +8 -0
  45. package/dist/command/AcApMissedDataCmd.d.ts.map +1 -0
  46. package/dist/command/AcApOpenPerfCmd.d.ts +11 -0
  47. package/dist/command/AcApOpenPerfCmd.d.ts.map +1 -0
  48. package/dist/command/AcApPointStyleCmd.d.ts +5 -0
  49. package/dist/command/AcApPointStyleCmd.d.ts.map +1 -0
  50. package/dist/command/AcApPropertiesCmd.d.ts +5 -0
  51. package/dist/command/AcApPropertiesCmd.d.ts.map +1 -0
  52. package/dist/command/AcApQSelectCmd.d.ts +10 -0
  53. package/dist/command/AcApQSelectCmd.d.ts.map +1 -0
  54. package/dist/command/AcApTextStyleCmd.d.ts +9 -0
  55. package/dist/command/AcApTextStyleCmd.d.ts.map +1 -0
  56. package/dist/command/AcApXrefCmd.d.ts +8 -0
  57. package/dist/command/AcApXrefCmd.d.ts.map +1 -0
  58. package/dist/command/index.d.ts +22 -0
  59. package/dist/command/index.d.ts.map +1 -0
  60. package/dist/component/MlCadViewer.vue.d.ts +164 -0
  61. package/dist/component/MlCadViewer.vue.d.ts.map +1 -0
  62. package/dist/component/common/MlBaseDialog.vue.d.ts +108 -0
  63. package/dist/component/common/MlBaseDialog.vue.d.ts.map +1 -0
  64. package/dist/component/common/MlBaseInputNumber.vue.d.ts +35 -0
  65. package/dist/component/common/MlBaseInputNumber.vue.d.ts.map +1 -0
  66. package/dist/component/common/MlBlockInsertGallery.vue.d.ts +39 -0
  67. package/dist/component/common/MlBlockInsertGallery.vue.d.ts.map +1 -0
  68. package/dist/component/common/MlColorDropdown.vue.d.ts +28 -0
  69. package/dist/component/common/MlColorDropdown.vue.d.ts.map +1 -0
  70. package/dist/component/common/MlColorIndexPicker.vue.d.ts +20 -0
  71. package/dist/component/common/MlColorIndexPicker.vue.d.ts.map +1 -0
  72. package/dist/component/common/MlColorPickerDropdown.vue.d.ts +70 -0
  73. package/dist/component/common/MlColorPickerDropdown.vue.d.ts.map +1 -0
  74. package/dist/component/common/MlColorPickerTabs.vue.d.ts +43 -0
  75. package/dist/component/common/MlColorPickerTabs.vue.d.ts.map +1 -0
  76. package/dist/component/common/MlDialogManager.vue.d.ts +7 -0
  77. package/dist/component/common/MlDialogManager.vue.d.ts.map +1 -0
  78. package/dist/component/common/MlFieldsetGroup.vue.d.ts +47 -0
  79. package/dist/component/common/MlFieldsetGroup.vue.d.ts.map +1 -0
  80. package/dist/component/common/MlFontFileReader.vue.d.ts +4 -0
  81. package/dist/component/common/MlFontFileReader.vue.d.ts.map +1 -0
  82. package/dist/component/common/MlHatchPatternDropdown.vue.d.ts +67 -0
  83. package/dist/component/common/MlHatchPatternDropdown.vue.d.ts.map +1 -0
  84. package/dist/component/common/MlHatchPatternPanel.vue.d.ts +57 -0
  85. package/dist/component/common/MlHatchPatternPanel.vue.d.ts.map +1 -0
  86. package/dist/component/common/MlLayerSelect.vue.d.ts +46 -0
  87. package/dist/component/common/MlLayerSelect.vue.d.ts.map +1 -0
  88. package/dist/component/common/MlLayerTable.d.ts +7 -0
  89. package/dist/component/common/MlLayerTable.d.ts.map +1 -0
  90. package/dist/component/common/MlLayerTable.vue.d.ts +91 -0
  91. package/dist/component/common/MlLayerTable.vue.d.ts.map +1 -0
  92. package/dist/component/common/MlLineTypeSelect.vue.d.ts +40 -0
  93. package/dist/component/common/MlLineTypeSelect.vue.d.ts.map +1 -0
  94. package/dist/component/common/MlLineWeightSelect.vue.d.ts +54 -0
  95. package/dist/component/common/MlLineWeightSelect.vue.d.ts.map +1 -0
  96. package/dist/component/common/MlSysVarToggleButton.vue.d.ts +47 -0
  97. package/dist/component/common/MlSysVarToggleButton.vue.d.ts.map +1 -0
  98. package/dist/component/common/MlToggleButton.vue.d.ts +86 -0
  99. package/dist/component/common/MlToggleButton.vue.d.ts.map +1 -0
  100. package/dist/component/common/createMlColorIndexPickerToolbarFactory.d.ts +7 -0
  101. package/dist/component/common/createMlColorIndexPickerToolbarFactory.d.ts.map +1 -0
  102. package/dist/component/common/hatchPatternPreview.d.ts +36 -0
  103. package/dist/component/common/hatchPatternPreview.d.ts.map +1 -0
  104. package/dist/component/common/index.d.ts +21 -0
  105. package/dist/component/common/index.d.ts.map +1 -0
  106. package/dist/component/common/lineTypeOptions.d.ts +60 -0
  107. package/dist/component/common/lineTypeOptions.d.ts.map +1 -0
  108. package/dist/component/dialog/MlAttDefDlg.vue.d.ts +19 -0
  109. package/dist/component/dialog/MlAttDefDlg.vue.d.ts.map +1 -0
  110. package/dist/component/dialog/MlAttEditDlg.vue.d.ts +19 -0
  111. package/dist/component/dialog/MlAttEditDlg.vue.d.ts.map +1 -0
  112. package/dist/component/dialog/MlCharacterMapDialog.vue.d.ts +86 -0
  113. package/dist/component/dialog/MlCharacterMapDialog.vue.d.ts.map +1 -0
  114. package/dist/component/dialog/MlColorPickerDlg.vue.d.ts +47 -0
  115. package/dist/component/dialog/MlColorPickerDlg.vue.d.ts.map +1 -0
  116. package/dist/component/dialog/MlDimStyleDlg.vue.d.ts +19 -0
  117. package/dist/component/dialog/MlDimStyleDlg.vue.d.ts.map +1 -0
  118. package/dist/component/dialog/MlDimStylePreview.vue.d.ts +34 -0
  119. package/dist/component/dialog/MlDimStylePreview.vue.d.ts.map +1 -0
  120. package/dist/component/dialog/MlDrawingUnitsDlg.vue.d.ts +19 -0
  121. package/dist/component/dialog/MlDrawingUnitsDlg.vue.d.ts.map +1 -0
  122. package/dist/component/dialog/MlExportHtmlDlg.vue.d.ts +83 -0
  123. package/dist/component/dialog/MlExportHtmlDlg.vue.d.ts.map +1 -0
  124. package/dist/component/dialog/MlExportPdfDlg.vue.d.ts +58 -0
  125. package/dist/component/dialog/MlExportPdfDlg.vue.d.ts.map +1 -0
  126. package/dist/component/dialog/MlPointStyleDlg.vue.d.ts +4 -0
  127. package/dist/component/dialog/MlPointStyleDlg.vue.d.ts.map +1 -0
  128. package/dist/component/dialog/MlQuickSelectDlg.vue.d.ts +4 -0
  129. package/dist/component/dialog/MlQuickSelectDlg.vue.d.ts.map +1 -0
  130. package/dist/component/dialog/MlTextStyleDlg.vue.d.ts +19 -0
  131. package/dist/component/dialog/MlTextStyleDlg.vue.d.ts.map +1 -0
  132. package/dist/component/dialog/charMapTtfCodepoints.d.ts +25 -0
  133. package/dist/component/dialog/charMapTtfCodepoints.d.ts.map +1 -0
  134. package/dist/component/dialog/dimStylePreview.d.ts +62 -0
  135. package/dist/component/dialog/dimStylePreview.d.ts.map +1 -0
  136. package/dist/component/dialog/index.d.ts +11 -0
  137. package/dist/component/dialog/index.d.ts.map +1 -0
  138. package/dist/component/index.d.ts +9 -0
  139. package/dist/component/index.d.ts.map +1 -0
  140. package/dist/component/layout/MlEntityInfo.vue.d.ts +4 -0
  141. package/dist/component/layout/MlEntityInfo.vue.d.ts.map +1 -0
  142. package/dist/component/layout/MlToolBars.vue.d.ts +4 -0
  143. package/dist/component/layout/MlToolBars.vue.d.ts.map +1 -0
  144. package/dist/component/layout/index.d.ts +3 -0
  145. package/dist/component/layout/index.d.ts.map +1 -0
  146. package/dist/component/notification/MlNotificationCenter.vue.d.ts +20 -0
  147. package/dist/component/notification/MlNotificationCenter.vue.d.ts.map +1 -0
  148. package/dist/component/notification/MlNotificationGroup.vue.d.ts +49 -0
  149. package/dist/component/notification/MlNotificationGroup.vue.d.ts.map +1 -0
  150. package/dist/component/notification/MlNotificationItem.vue.d.ts +22 -0
  151. package/dist/component/notification/MlNotificationItem.vue.d.ts.map +1 -0
  152. package/dist/component/notification/index.d.ts +4 -0
  153. package/dist/component/notification/index.d.ts.map +1 -0
  154. package/dist/component/palette/MlBlocksPalette.vue.d.ts +4 -0
  155. package/dist/component/palette/MlBlocksPalette.vue.d.ts.map +1 -0
  156. package/dist/component/palette/MlCadScriptPanel.vue.d.ts +4 -0
  157. package/dist/component/palette/MlCadScriptPanel.vue.d.ts.map +1 -0
  158. package/dist/component/palette/MlCountList.vue.d.ts +4 -0
  159. package/dist/component/palette/MlCountList.vue.d.ts.map +1 -0
  160. package/dist/component/palette/MlDesignReviewPalette.vue.d.ts +4 -0
  161. package/dist/component/palette/MlDesignReviewPalette.vue.d.ts.map +1 -0
  162. package/dist/component/palette/MlEntityProperties.vue.d.ts +35 -0
  163. package/dist/component/palette/MlEntityProperties.vue.d.ts.map +1 -0
  164. package/dist/component/palette/MlExternalReferences.vue.d.ts +4 -0
  165. package/dist/component/palette/MlExternalReferences.vue.d.ts.map +1 -0
  166. package/dist/component/palette/MlFindPalette.vue.d.ts +4 -0
  167. package/dist/component/palette/MlFindPalette.vue.d.ts.map +1 -0
  168. package/dist/component/palette/MlLayerList.vue.d.ts +23 -0
  169. package/dist/component/palette/MlLayerList.vue.d.ts.map +1 -0
  170. package/dist/component/palette/MlMeasurementPalette.vue.d.ts +4 -0
  171. package/dist/component/palette/MlMeasurementPalette.vue.d.ts.map +1 -0
  172. package/dist/component/palette/MlMemoryProfile.vue.d.ts +4 -0
  173. package/dist/component/palette/MlMemoryProfile.vue.d.ts.map +1 -0
  174. package/dist/component/palette/MlMissingResources.vue.d.ts +4 -0
  175. package/dist/component/palette/MlMissingResources.vue.d.ts.map +1 -0
  176. package/dist/component/palette/MlOpenFileProfile.vue.d.ts +4 -0
  177. package/dist/component/palette/MlOpenFileProfile.vue.d.ts.map +1 -0
  178. package/dist/component/palette/MlPaletteManager.vue.d.ts +22 -0
  179. package/dist/component/palette/MlPaletteManager.vue.d.ts.map +1 -0
  180. package/dist/component/palette/index.d.ts +10 -0
  181. package/dist/component/palette/index.d.ts.map +1 -0
  182. package/dist/component/ribbon/MlRibbonCommands.vue.d.ts +32 -0
  183. package/dist/component/ribbon/MlRibbonCommands.vue.d.ts.map +1 -0
  184. package/dist/component/ribbon/MlRibbonFileName.vue.d.ts +15 -0
  185. package/dist/component/ribbon/MlRibbonFileName.vue.d.ts.map +1 -0
  186. package/dist/component/ribbon/MlRibbonFontSelect.vue.d.ts +56 -0
  187. package/dist/component/ribbon/MlRibbonFontSelect.vue.d.ts.map +1 -0
  188. package/dist/component/ribbon/MlRibbonHatchColorRow2.vue.d.ts +19 -0
  189. package/dist/component/ribbon/MlRibbonHatchColorRow2.vue.d.ts.map +1 -0
  190. package/dist/component/ribbon/MlRibbonHatchColorRow3.vue.d.ts +20 -0
  191. package/dist/component/ribbon/MlRibbonHatchColorRow3.vue.d.ts.map +1 -0
  192. package/dist/component/ribbon/MlRibbonHatchPatternButton.vue.d.ts +78 -0
  193. package/dist/component/ribbon/MlRibbonHatchPatternButton.vue.d.ts.map +1 -0
  194. package/dist/component/ribbon/MlRibbonLanguageSelector.vue.d.ts +36 -0
  195. package/dist/component/ribbon/MlRibbonLanguageSelector.vue.d.ts.map +1 -0
  196. package/dist/component/ribbon/MlRibbonMTextHeightSelect.vue.d.ts +51 -0
  197. package/dist/component/ribbon/MlRibbonMTextHeightSelect.vue.d.ts.map +1 -0
  198. package/dist/component/ribbon/MlRibbonMeasurementUnitsPanel.vue.d.ts +37 -0
  199. package/dist/component/ribbon/MlRibbonMeasurementUnitsPanel.vue.d.ts.map +1 -0
  200. package/dist/component/ribbon/MlRibbonPropertyColorDropdown.vue.d.ts +32 -0
  201. package/dist/component/ribbon/MlRibbonPropertyColorDropdown.vue.d.ts.map +1 -0
  202. package/dist/component/ribbon/MlRibbonPropertyField.vue.d.ts +58 -0
  203. package/dist/component/ribbon/MlRibbonPropertyField.vue.d.ts.map +1 -0
  204. package/dist/component/ribbon/MlRibbonPropertyLineTypeSelect.vue.d.ts +30 -0
  205. package/dist/component/ribbon/MlRibbonPropertyLineTypeSelect.vue.d.ts.map +1 -0
  206. package/dist/component/ribbon/MlRibbonPropertyLineWeightSelect.vue.d.ts +32 -0
  207. package/dist/component/ribbon/MlRibbonPropertyLineWeightSelect.vue.d.ts.map +1 -0
  208. package/dist/component/ribbon/MlRibbonTextHeightButton.vue.d.ts +73 -0
  209. package/dist/component/ribbon/MlRibbonTextHeightButton.vue.d.ts.map +1 -0
  210. package/dist/component/ribbon/index.d.ts +9 -0
  211. package/dist/component/ribbon/index.d.ts.map +1 -0
  212. package/dist/component/ribbon/overlaySelectionKind.d.ts +30 -0
  213. package/dist/component/ribbon/overlaySelectionKind.d.ts.map +1 -0
  214. package/dist/component/ribbon/useHatchContextualRibbon.d.ts +45 -0
  215. package/dist/component/ribbon/useHatchContextualRibbon.d.ts.map +1 -0
  216. package/dist/component/ribbon/useMTextContextualRibbon.d.ts +47 -0
  217. package/dist/component/ribbon/useMTextContextualRibbon.d.ts.map +1 -0
  218. package/dist/component/statusBar/MlAnnoAllVisibleButton.vue.d.ts +4 -0
  219. package/dist/component/statusBar/MlAnnoAllVisibleButton.vue.d.ts.map +1 -0
  220. package/dist/component/statusBar/MlCannoScaleButton.vue.d.ts +4 -0
  221. package/dist/component/statusBar/MlCannoScaleButton.vue.d.ts.map +1 -0
  222. package/dist/component/statusBar/MlFullScreenButton.vue.d.ts +4 -0
  223. package/dist/component/statusBar/MlFullScreenButton.vue.d.ts.map +1 -0
  224. package/dist/component/statusBar/MlLayoutTabs.vue.d.ts +17 -0
  225. package/dist/component/statusBar/MlLayoutTabs.vue.d.ts.map +1 -0
  226. package/dist/component/statusBar/MlNotificationButton.vue.d.ts +8 -0
  227. package/dist/component/statusBar/MlNotificationButton.vue.d.ts.map +1 -0
  228. package/dist/component/statusBar/MlOsnapButton.vue.d.ts +4 -0
  229. package/dist/component/statusBar/MlOsnapButton.vue.d.ts.map +1 -0
  230. package/dist/component/statusBar/MlPointStyleButton.vue.d.ts +4 -0
  231. package/dist/component/statusBar/MlPointStyleButton.vue.d.ts.map +1 -0
  232. package/dist/component/statusBar/MlPolarTrackingButton.vue.d.ts +4 -0
  233. package/dist/component/statusBar/MlPolarTrackingButton.vue.d.ts.map +1 -0
  234. package/dist/component/statusBar/MlProgress.vue.d.ts +4 -0
  235. package/dist/component/statusBar/MlProgress.vue.d.ts.map +1 -0
  236. package/dist/component/statusBar/MlSettingButton.vue.d.ts +4 -0
  237. package/dist/component/statusBar/MlSettingButton.vue.d.ts.map +1 -0
  238. package/dist/component/statusBar/MlStatusBar.vue.d.ts +20 -0
  239. package/dist/component/statusBar/MlStatusBar.vue.d.ts.map +1 -0
  240. package/dist/component/statusBar/MlThemeButton.vue.d.ts +16 -0
  241. package/dist/component/statusBar/MlThemeButton.vue.d.ts.map +1 -0
  242. package/dist/component/statusBar/MlWarningButton.vue.d.ts +4 -0
  243. package/dist/component/statusBar/MlWarningButton.vue.d.ts.map +1 -0
  244. package/dist/component/statusBar/index.d.ts +3 -0
  245. package/dist/component/statusBar/index.d.ts.map +1 -0
  246. package/dist/component/statusBar/polarTrackingMenu.d.ts +10 -0
  247. package/dist/component/statusBar/polarTrackingMenu.d.ts.map +1 -0
  248. package/dist/composable/index.d.ts +33 -0
  249. package/dist/composable/index.d.ts.map +1 -0
  250. package/dist/composable/markComponentConfigRaw.d.ts +2 -0
  251. package/dist/composable/markComponentConfigRaw.d.ts.map +1 -0
  252. package/dist/composable/openMissingResourcesPalette.d.ts +11 -0
  253. package/dist/composable/openMissingResourcesPalette.d.ts.map +1 -0
  254. package/dist/composable/useAttEdit.d.ts +50 -0
  255. package/dist/composable/useAttEdit.d.ts.map +1 -0
  256. package/dist/composable/useCommands.d.ts +9 -0
  257. package/dist/composable/useCommands.d.ts.map +1 -0
  258. package/dist/composable/useCountList.d.ts +50 -0
  259. package/dist/composable/useCountList.d.ts.map +1 -0
  260. package/dist/composable/useCurrentPos.d.ts +7 -0
  261. package/dist/composable/useCurrentPos.d.ts.map +1 -0
  262. package/dist/composable/useDark.d.ts +6 -0
  263. package/dist/composable/useDark.d.ts.map +1 -0
  264. package/dist/composable/useDataSources.d.ts +13 -0
  265. package/dist/composable/useDataSources.d.ts.map +1 -0
  266. package/dist/composable/useDialogManager.d.ts +22 -0
  267. package/dist/composable/useDialogManager.d.ts.map +1 -0
  268. package/dist/composable/useDocument.d.ts +93 -0
  269. package/dist/composable/useDocument.d.ts.map +1 -0
  270. package/dist/composable/useFileTypes.d.ts +2 -0
  271. package/dist/composable/useFileTypes.d.ts.map +1 -0
  272. package/dist/composable/useFind.d.ts +47 -0
  273. package/dist/composable/useFind.d.ts.map +1 -0
  274. package/dist/composable/useHover.d.ts +72 -0
  275. package/dist/composable/useHover.d.ts.map +1 -0
  276. package/dist/composable/useInsertableBlocks.d.ts +43 -0
  277. package/dist/composable/useInsertableBlocks.d.ts.map +1 -0
  278. package/dist/composable/useIsMobile.d.ts +6 -0
  279. package/dist/composable/useIsMobile.d.ts.map +1 -0
  280. package/dist/composable/useLayerFilters.d.ts +45 -0
  281. package/dist/composable/useLayerFilters.d.ts.map +1 -0
  282. package/dist/composable/useLayers.d.ts +104 -0
  283. package/dist/composable/useLayers.d.ts.map +1 -0
  284. package/dist/composable/useLayouts.d.ts +10 -0
  285. package/dist/composable/useLayouts.d.ts.map +1 -0
  286. package/dist/composable/useLocale.d.ts +227 -0
  287. package/dist/composable/useLocale.d.ts.map +1 -0
  288. package/dist/composable/useMarkup.d.ts +301 -0
  289. package/dist/composable/useMarkup.d.ts.map +1 -0
  290. package/dist/composable/useMeasurement.d.ts +149 -0
  291. package/dist/composable/useMeasurement.d.ts.map +1 -0
  292. package/dist/composable/useMemoryProfile.d.ts +586 -0
  293. package/dist/composable/useMemoryProfile.d.ts.map +1 -0
  294. package/dist/composable/useMissedData.d.ts +59 -0
  295. package/dist/composable/useMissedData.d.ts.map +1 -0
  296. package/dist/composable/useNotificationCenter.d.ts +43 -0
  297. package/dist/composable/useNotificationCenter.d.ts.map +1 -0
  298. package/dist/composable/useOpenFileProfile.d.ts +236 -0
  299. package/dist/composable/useOpenFileProfile.d.ts.map +1 -0
  300. package/dist/composable/useQuickSelect.d.ts +85 -0
  301. package/dist/composable/useQuickSelect.d.ts.map +1 -0
  302. package/dist/composable/useRibbonContextualTab.d.ts +19 -0
  303. package/dist/composable/useRibbonContextualTab.d.ts.map +1 -0
  304. package/dist/composable/useSelectionSet.d.ts +6 -0
  305. package/dist/composable/useSelectionSet.d.ts.map +1 -0
  306. package/dist/composable/useSettings.d.ts +17 -0
  307. package/dist/composable/useSettings.d.ts.map +1 -0
  308. package/dist/composable/useSystemVars.d.ts +48 -0
  309. package/dist/composable/useSystemVars.d.ts.map +1 -0
  310. package/dist/composable/useTextStyle.d.ts +133 -0
  311. package/dist/composable/useTextStyle.d.ts.map +1 -0
  312. package/dist/composable/useUndoRedo.d.ts +20 -0
  313. package/dist/composable/useUndoRedo.d.ts.map +1 -0
  314. package/dist/composable/useViewerRect.d.ts +72 -0
  315. package/dist/composable/useViewerRect.d.ts.map +1 -0
  316. package/dist/index.d.ts.map +1 -0
  317. package/dist/locale/ar/command.d.ts +49 -0
  318. package/dist/locale/ar/command.d.ts.map +1 -0
  319. package/dist/locale/ar/dialog.d.ts +564 -0
  320. package/dist/locale/ar/dialog.d.ts.map +1 -0
  321. package/dist/locale/ar/entity.d.ts +590 -0
  322. package/dist/locale/ar/entity.d.ts.map +1 -0
  323. package/dist/locale/ar/main.d.ts +1080 -0
  324. package/dist/locale/ar/main.d.ts.map +1 -0
  325. package/dist/locale/cs/command.d.ts +49 -0
  326. package/dist/locale/cs/command.d.ts.map +1 -0
  327. package/dist/locale/cs/dialog.d.ts +564 -0
  328. package/dist/locale/cs/dialog.d.ts.map +1 -0
  329. package/dist/locale/cs/entity.d.ts +590 -0
  330. package/dist/locale/cs/entity.d.ts.map +1 -0
  331. package/dist/locale/cs/main.d.ts +1076 -0
  332. package/dist/locale/cs/main.d.ts.map +1 -0
  333. package/dist/locale/en/command.d.ts +49 -0
  334. package/dist/locale/en/command.d.ts.map +1 -0
  335. package/dist/locale/en/dialog.d.ts +564 -0
  336. package/dist/locale/en/dialog.d.ts.map +1 -0
  337. package/dist/locale/en/entity.d.ts +590 -0
  338. package/dist/locale/en/entity.d.ts.map +1 -0
  339. package/dist/locale/en/main.d.ts +1080 -0
  340. package/dist/locale/en/main.d.ts.map +1 -0
  341. package/dist/locale/i18n.d.ts +11 -0
  342. package/dist/locale/i18n.d.ts.map +1 -0
  343. package/dist/locale/index.d.ts +3 -0
  344. package/dist/locale/index.d.ts.map +1 -0
  345. package/dist/locale/pluralRules.d.ts +14 -0
  346. package/dist/locale/pluralRules.d.ts.map +1 -0
  347. package/dist/locale/tr/command.d.ts +49 -0
  348. package/dist/locale/tr/command.d.ts.map +1 -0
  349. package/dist/locale/tr/dialog.d.ts +564 -0
  350. package/dist/locale/tr/dialog.d.ts.map +1 -0
  351. package/dist/locale/tr/entity.d.ts +590 -0
  352. package/dist/locale/tr/entity.d.ts.map +1 -0
  353. package/dist/locale/tr/main.d.ts +1076 -0
  354. package/dist/locale/tr/main.d.ts.map +1 -0
  355. package/dist/locale/types.d.ts +3 -0
  356. package/dist/locale/types.d.ts.map +1 -0
  357. package/dist/locale/zh/command.d.ts +49 -0
  358. package/dist/locale/zh/command.d.ts.map +1 -0
  359. package/dist/locale/zh/dialog.d.ts +564 -0
  360. package/dist/locale/zh/dialog.d.ts.map +1 -0
  361. package/dist/locale/zh/entity.d.ts +590 -0
  362. package/dist/locale/zh/entity.d.ts.map +1 -0
  363. package/dist/locale/zh/main.d.ts +1080 -0
  364. package/dist/locale/zh/main.d.ts.map +1 -0
  365. package/dist/svg/acapSvgIcon.d.ts +9 -0
  366. package/dist/svg/acapSvgIcon.d.ts.map +1 -0
  367. package/dist/svg/arc/index.d.ts +11 -0
  368. package/dist/svg/arc/index.d.ts.map +1 -0
  369. package/dist/svg/circle/index.d.ts +7 -0
  370. package/dist/svg/circle/index.d.ts.map +1 -0
  371. package/dist/svg/dimension/index.d.ts +11 -0
  372. package/dist/svg/dimension/index.d.ts.map +1 -0
  373. package/dist/svg/ellipse/index.d.ts +3 -0
  374. package/dist/svg/ellipse/index.d.ts.map +1 -0
  375. package/dist/svg/hatch/index.d.ts +3 -0
  376. package/dist/svg/hatch/index.d.ts.map +1 -0
  377. package/dist/svg/index.d.ts +44 -0
  378. package/dist/svg/index.d.ts.map +1 -0
  379. package/dist/svg/layer/index.d.ts +21 -0
  380. package/dist/svg/layer/index.d.ts.map +1 -0
  381. package/dist/svg/mlightcad.d.ts +10 -0
  382. package/dist/svg/mlightcad.d.ts.map +1 -0
  383. package/dist/svg/mtext/index.d.ts +5 -0
  384. package/dist/svg/mtext/index.d.ts.map +1 -0
  385. package/dist/svg/pointstyle/index.d.ts +21 -0
  386. package/dist/svg/pointstyle/index.d.ts.map +1 -0
  387. package/dist/svg/spline/index.d.ts +2 -0
  388. package/dist/svg/spline/index.d.ts.map +1 -0
  389. package/dist/svg/toolbarIcons.d.ts +37 -0
  390. package/dist/svg/toolbarIcons.d.ts.map +1 -0
  391. package/dist/util/analyzeUnsupportedDrawing.d.ts +6 -0
  392. package/dist/util/analyzeUnsupportedDrawing.d.ts.map +1 -0
  393. package/dist/util/drawingUnitPrecision.d.ts +18 -0
  394. package/dist/util/drawingUnitPrecision.d.ts.map +1 -0
  395. package/dist/util/formatUnsupportedEntitiesMessage.d.ts +22 -0
  396. package/dist/util/formatUnsupportedEntitiesMessage.d.ts.map +1 -0
  397. package/dist/util/openFileErrorMessage.d.ts +18 -0
  398. package/dist/util/openFileErrorMessage.d.ts.map +1 -0
  399. package/package.json +135 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mlightcad
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,425 @@
1
- # Temporary Holding Version
1
+ # CAD Viewer Component
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![npm version](https://img.shields.io/npm/v/@mlightcad/cad-editor.svg)](https://www.npmjs.com/package/@mlightcad/cad-editor)
5
+
6
+ CAD Viewer is a **high-performance** Vue 3 component for viewing and editing CAD files (DXF, DWG) **entirely in the browser without requiring any backend server**. It provides a modern user interface, state management, and seamless integration with optimized rendering engines for smooth browser-based CAD workflows with exceptional performance.
7
+
8
+ ## Key Features
9
+
10
+ - **High-performance** CAD editing and viewing with smooth 60+ FPS rendering
11
+ - **No backend required** - Files are parsed and processed entirely in the browser
12
+ - **Enhanced data security** - Files never leave your device, ensuring complete privacy
13
+ - **Local file support** - Load DWG/DXF files directly from your computer via file dialog or drag & drop
14
+ - **Remote file support** - Load CAD files from URLs automatically
15
+ - **Easy integration** - No server setup or backend infrastructure needed for third-party integration
16
+ - **Customizable UI** - Control visibility of toolbars, command line, coordinates, and performance stats
17
+ - **Customizable Resources** - Set custom base URLs for fonts, templates, and example files
18
+ - Modern UI optimized for large CAD file handling
19
+ - State management for layers, entities, and settings
20
+ - Integration with optimized SVG and THREE.js renderers
21
+ - Dialogs, toolbars, and command line interface
22
+ - Vue 3 component for embedding high-performance CAD viewers in your own apps
23
+
24
+ ## When Should You Choose cad-editor?
25
+
26
+ Use `cad-editor` if you want a **ready-to-use Vue 3 component** for viewing and editing CAD files with a modern UI, dialogs, toolbars, and state management. This package is ideal if:
27
+
28
+ - You want to quickly embed a high-performance CAD viewer/editor into your Vue application with minimal setup.
29
+ - You need support for both local file loading (from user's computer) and remote file loading (from URLs).
30
+ - You need a solution that handles file loading, rendering, layer/entity management, and user interactions out of the box.
31
+ - You want seamless integration with optimized SVG and THREE.js renderers, internationalization, and theming.
32
+ - You do **not** want to build your own UI from scratch.
33
+
34
+ **Recommended for:** Most web applications, dashboards, or platforms that need to display CAD files with a polished user interface.
35
+
36
+ ## Browser-Only Architecture
37
+
38
+ This Vue 3 component operates entirely in the browser with **no backend dependencies**. DWG/DXF files are parsed and processed locally using WebAssembly and JavaScript, providing:
39
+
40
+ - **Zero server requirements** - Deploy the component anywhere with just static file hosting
41
+ - **Complete data privacy** - CAD files never leave the user's device, whether loaded locally or from URLs
42
+ - **Local file support** - Users can load files directly from their computer using the built-in file dialog
43
+ - **Remote file support** - Automatically load files from URLs when provided
44
+ - **Instant integration** - No complex backend setup or API configuration needed
45
+ - **Offline capability** - Works without internet connectivity once loaded
46
+ - **Third-party friendly** - Easy to embed in any Vue 3 application without server-side concerns
47
+
48
+ ## File Loading Methods
49
+
50
+ The MlCadViewer component supports multiple ways to load CAD files:
51
+
52
+ ### 1. Local File Loading
53
+ Users can load files directly from their computer:
54
+ - **File Dialog**: Click the File menu on the ribbon and select "Open" to browse and select local DWG/DXF files
55
+ - **Drag & Drop**: Drag and drop CAD files directly onto the viewer (if implemented in your application)
56
+ - **File Input**: Use the built-in file reader component for programmatic file selection
57
+ - **Component Prop**: Pass a File object directly to the `localFile` prop for automatic loading
58
+
59
+ #### Example: Using localFile prop with file input
60
+ ```vue
61
+ <template>
62
+ <div>
63
+ <input
64
+ type="file"
65
+ accept=".dwg,.dxf"
66
+ @change="handleFileSelect"
67
+ />
68
+ <MlCadViewer
69
+ :local-file="selectedFile"
70
+ />
71
+ </div>
72
+ </template>
73
+
74
+ <script setup lang="ts">
75
+ import { ref } from 'vue'
76
+ import { MlCadViewer } from '@mlightcad/cad-editor'
77
+
78
+ const selectedFile = ref<File | undefined>()
79
+
80
+ const handleFileSelect = (event: Event) => {
81
+ const target = event.target as HTMLInputElement
82
+ selectedFile.value = target.files?.[0]
83
+ }
84
+ </script>
85
+ ```
86
+
87
+ ### 2. Remote File Loading
88
+ Automatically load files from URLs:
89
+ - **URL Prop**: Provide a `url` prop to automatically load a file when the component mounts
90
+ - **Dynamic Loading**: Change the `url` prop to load different files without remounting the component
91
+
92
+ ### 3. Supported File Formats
93
+ - **DWG files**: Binary AutoCAD drawing format (read as ArrayBuffer)
94
+ - **DXF files**: ASCII/binary AutoCAD drawing exchange format (read as text)
95
+
96
+ ## Directory Structure (partial)
97
+
98
+ - `src/app/` – Application entry, store, and main logic
99
+ - `src/component/` – UI components (dialogs, toolbars, status bar, etc.)
100
+ - `src/composable/` – Vue composables for state and logic
101
+ - `src/locale/` – Internationalization files
102
+ - `src/style/` – Stylesheets
103
+ - `src/svg/` – SVG assets
104
+
105
+ ## Installation
106
+
107
+ ```bash
108
+ npm install @mlightcad/cad-editor
109
+ ```
110
+
111
+ ## Usage
112
+
113
+ Please refer to sub-package `cad-editor-demo` as one example.
114
+
115
+ ### Basic Usage
116
+
117
+ Firstly, add the following dependencies into your package.json.
118
+
119
+ - @element-plus/icons-vue
120
+ - @mlightcad/cad-simple-viewer
121
+ - @mlightcad/cad-editor
122
+ - @mlightcad/data-model
123
+ - @vueuse/core
124
+ - element-plus
125
+ - vue
126
+ - vue-i18n
127
+
128
+ Then create one vue component as follows.
129
+
130
+ ```vue
131
+ <template>
132
+ <div>
133
+ <!-- For local file loading (users can open files via menu) -->
134
+ <MlCADViewer :background="0x808080" />
135
+
136
+ <!-- For remote file loading (automatically loads from URL) -->
137
+ <!-- <MlCADViewer
138
+ :background="0x808080"
139
+ :url="'https://example.com/drawing.dwg'"
140
+ /> -->
141
+
142
+ <!-- For local file loading (automatically loads from File object) -->
143
+ <!-- <MlCADViewer
144
+ :background="0x808080"
145
+ :local-file="selectedFile"
146
+ /> -->
147
+
148
+ <!-- With custom base URL for fonts and templates -->
149
+ <!-- <MlCADViewer
150
+ :background="0x808080"
151
+ :base-url="'https://my-cdn.com/cad-data/'"
152
+ /> -->
153
+ </div>
154
+ </template>
155
+
156
+ <script setup lang="ts">
157
+ import 'uno.css'
158
+ import 'element-plus/dist/index.css'
159
+ import 'element-plus/dist/index.css'
160
+
161
+ import {
162
+ i18n,
163
+ MlCadViewer
164
+ } from '@mlightcad/cad-editor'
165
+ import ElementPlus from 'element-plus'
166
+ import { createApp } from 'vue'
167
+
168
+ const initApp = () => {
169
+ const app = createApp(MlCadViewer)
170
+ app.use(i18n)
171
+ app.use(ElementPlus)
172
+ app.mount('#app')
173
+ }
174
+
175
+ initApp()
176
+ </script>
177
+ ```
178
+
179
+ ## MlCadViewer Component
180
+
181
+ The `MlCadViewer` is the main Vue 3 component that provides a complete CAD viewing and editing interface. It includes toolbars, layer management, command line, status bar, and various dialogs for a full-featured CAD experience.
182
+
183
+ ### Component Properties
184
+
185
+ The `MlCadViewer` component accepts the following props:
186
+
187
+ | Property | Type | Default | Description |
188
+ |----------|------|---------|-------------|
189
+ | `locale` | `'en' \| 'zh' \| 'default'` | `'default'` | Sets the language for the component interface. Use `'en'` for English, `'zh'` for Chinese, or `'default'` to use the browser's default language. |
190
+ | `url` | `string` | `undefined` | Optional URL to automatically load a CAD file when the component mounts. The file will be fetched and opened automatically. **Note**: If not provided, users can still load local files using the ribbon File menu "Open" option. |
191
+ | `localFile` | `File` | `undefined` | Optional local File object to automatically load a CAD file when the component mounts. The file will be read and opened automatically. **Note**: This takes precedence over the `url` prop if both are provided. |
192
+ | `background` | `number` | `undefined` | Background color as 24-bit hexadecimal RGB (e.g., `0x000000` for black, `0x808080` for gray). |
193
+ | `baseUrl` | `string` | `undefined` | Base URL for loading fonts, templates, and example files. This URL is used by the CAD viewer to load resources like fonts and drawing templates. **Note**: If not provided, uses the default URL. |
194
+ | `useMainThreadDraw` | `boolean` | `false` | Optional flag whether to use main thread or webwork to render drawing. The true value means using main thread to render drawing. This approach take less memory and take longer time to show rendering results. The false value means using web worker to render drawing. This approach take more memory and take shorter time to show rendering results. |
195
+ | `theme` | `'light' \| 'dark'` | `'dark'` | Initial UI theme of the CAD viewer. On mount, this prop initializes the `COLORTHEME` system variable in the active database (`0 = dark`, `1 = light`). After that, the viewer theme is driven by `COLORTHEME`, so runtime changes from the status bar theme button or direct system-variable updates stay synchronized across `cad-editor` and `cad-simple-viewer`. |
196
+ | `mode` | `AcEdOpenMode` | `'AcEdOpenMode.Write'` | Access mode for opening CAD files. `'AcEdOpenMode.Read'` means read-only access. `'AcEdOpenMode.Review'` means review access, compatible with read. `'AcEdOpenMode.Write'` means full read/write access, compatible with review and read. |
197
+ ### UI Settings
198
+
199
+ The `MlCadViewer` reads its UI visibility from the global `AcApSettingManager` (provided by `@mlightcad/cad-simple-viewer`). Configure these flags anywhere before rendering the viewer to customize the UI.
200
+
201
+ Settings resolve in three layers (later wins): built-in defaults, user preferences in `localStorage`, and session overrides. Only user preferences are persisted. Use `{ persist: false }` for host layout (for example hide the command line on mobile) so the change does not leak into other products or later visits on the same origin.
202
+
203
+ | Setting | Type | Default | Description |
204
+ |---------|------|---------|-------------|
205
+ | `isShowToolbar` | `boolean` | `true` | Controls toolbar visibility |
206
+ | `isShowCommandLine` | `boolean` | `true` | Controls command line visibility |
207
+ | `isShowCoordinate` | `boolean` | `true` | Controls coordinate display visibility |
208
+ | `isShowEntityInfo` | `boolean` | `false` | Controls entity info card visibility |
209
+ | `isShowLanguageSelector` | `boolean` | `true` | Controls language selector visibility |
210
+ | `isShowRibbon` | `boolean` | `true` | Controls ribbon visibility |
211
+ | `isShowStats` | `boolean` | `false` | Controls performance statistics display |
212
+
213
+ #### Example (recommended)
214
+ ```vue
215
+ <template>
216
+ <!-- Local file loading - users can open files via the ribbon File menu -->
217
+ <MlCadViewer locale="en" />
218
+
219
+ <!-- Remote file loading - automatically loads from URL -->
220
+ <!-- <MlCadViewer
221
+ locale="en"
222
+ :url="'https://example.com/drawing.dwg'"
223
+ /> -->
224
+
225
+ <!-- Local file loading - automatically loads from File object -->
226
+ <!-- <MlCadViewer
227
+ locale="en"
228
+ :local-file="selectedFile"
229
+ /> -->
230
+
231
+ <!-- Custom baseUrl for fonts and templates -->
232
+ <!-- <MlCadViewer
233
+ locale="en"
234
+ :base-url="'https://my-cdn.com/cad-data/'"
235
+ /> -->
236
+ </template>
237
+
238
+ <script setup lang="ts">
239
+ import { MlCadViewer } from '@mlightcad/cad-editor'
240
+ import { AcApSettingManager } from '@mlightcad/cad-simple-viewer'
241
+
242
+ // Optional: isolate this product's preferences on a shared origin
243
+ AcApSettingManager.configure({
244
+ storageKey: 'mlightcad.settings.cad-editor'
245
+ })
246
+
247
+ // Host layout before mount — session only (does not write localStorage)
248
+ AcApSettingManager.instance.apply(
249
+ {
250
+ isShowCommandLine: false
251
+ // isShowToolbar: false,
252
+ // isShowStats: true,
253
+ // isShowCoordinate: false,
254
+ // isShowEntityInfo: false
255
+ },
256
+ { persist: false }
257
+ )
258
+ </script>
259
+ ```
260
+
261
+ #### Notes
262
+
263
+ - Settings are global and immediately reflected by `MlCadViewer`.
264
+ - You can change them at runtime using the same `AcApSettingManager.instance` reference.
265
+ - Property setters (for example `isShowToolbar = false`) and the in-app settings menu persist user preferences by default.
266
+ - On the same origin, give each product its own `storageKey` via `AcApSettingManager.configure` so preferences do not cross-contaminate. Call `configure` before the first settings read/write.
267
+
268
+ ### Base URL Configuration
269
+
270
+ The `baseUrl` property allows you to customize where the CAD viewer loads fonts, templates, and example files from. This is particularly useful for:
271
+
272
+ - **Self-hosted resources**: Host your own fonts and templates on your CDN or server
273
+ - **Corporate environments**: Use internal servers for CAD resources
274
+ - **Offline deployments**: Serve resources from local file systems
275
+ - **Custom branding**: Use your own templates and fonts
276
+
277
+ #### Default Behavior
278
+ If no `baseUrl` is provided, the viewer uses the default URL: `https://cdn.jsdelivr.net/gh/mlightcad/cad-data`
279
+
280
+ #### Resource Structure
281
+ When using a custom `baseUrl`, ensure your server has the following structure:
282
+ ```
283
+ your-base-url/
284
+ ├── fonts/ # Font files for text rendering
285
+ ├── templates/ # Drawing templates (e.g., acadiso.dxf)
286
+ └── examples/ # Example CAD files
287
+ ```
288
+
289
+ #### Example: Custom Base URL
290
+ ```vue
291
+ <template>
292
+ <MlCadViewer
293
+ :base-url="'https://my-company.com/cad-resources/'"
294
+ :url="'https://my-company.com/drawings/project.dwg'"
295
+ />
296
+ </template>
297
+ ```
298
+
299
+ This configuration will:
300
+ - Load fonts from `https://my-company.com/cad-resources/fonts/`
301
+ - Load templates from `https://my-company.com/cad-resources/templates/`
302
+ - Use the custom base URL for any "Quick New" operations
303
+
304
+ ### Component Features
305
+
306
+ The `MlCadViewer` component includes:
307
+
308
+ - **Ribbon** - File operations (including local file opening), CAD commands, and settings
309
+ - **Toolbars** - Drawing tools, zoom controls, and selection tools
310
+ - **Layer Manager** - Layer visibility and property management
311
+ - **Find** - Text search across all layouts of the drawing (see [Find (text search)](#find-text-search))
312
+ - **Command Line** - AutoCAD-style command input
313
+ - **Status Bar** - Current position, zoom level, and system status
314
+ - **Dialog Manager** - Modal dialogs for various operations
315
+ - **File Reader** - Local file loading via file dialog and drag-and-drop support
316
+ - **Entity Info** - Detailed information about selected entities
317
+ - **Language Selector** - UI language switching
318
+ - **Theme Support** - Dark/light mode driven by the `COLORTHEME` system variable
319
+
320
+ ### Find (text search)
321
+
322
+ Open the **Find** palette from the ribbon (Home → Utilities → Find; it moves under the "…" overflow on narrow windows) or with the `find` command. It is a tab of the same palette as Layers / Properties.
323
+
324
+ - **Scope - whole drawing by default.** A search covers model space **and every paper-space layout** of the open drawing, in layout-tab order. Check **Current layout only** to restrict it to the layout that is currently shown (the scope is also applied when you toggle it after a search).
325
+ - **What is searched:** `TEXT`, `MTEXT` (formatting codes removed), the attribute values (`ATTRIB`) of every `INSERT`, and text found _inside_ drawn content: `TEXT` / `MTEXT` / `ATTRIB` and **constant** `ATTDEF` values in the block definition of every `INSERT` (nested, anonymous and dynamic blocks included, up to 8 levels deep), `DIMENSION` text (the text of its dimension block when that block has a match, otherwise its override text), `MULTILEADER` contents and `ACAD_TABLE` cells (from the table block, otherwise the cell strings). A hit inside a block, dimension or table selects the top-level entity (the `INSERT`, `DIMENSION` or table) and zooms to the matched text; a block inserted several times is listed once per insertion. `DIMENSION`, `MULTILEADER` and `ACAD_TABLE` entities are searched as top-level entities only: they are not visited inside block definitions, so such an entity nested in a block is not found. Case-, accent- and width-insensitive by default (`instalacao` finds `Instalação`); **Match case** makes it exact. Hidden entities, invisible attributes and entities on off/frozen layers are skipped; at most 500 results are listed (a notice says when the list was truncated).
326
+ - **Results** show the layout name, the matched text, the type (Text / MText / Attribute + block / tag), the layer and `(x, y)`.
327
+ - **Navigation:** the Find button and the first Enter both search and jump to the first hit; further Enter / Shift+Enter (or clicking a result) steps through the list, switching layout when needed, zooming to the text and selecting its entity (attributes select their `INSERT`). The search never runs while typing.
328
+ - **Same engine as `@mlightcad/cad-simple-ui-plugin`:** both UIs use `@mlightcad/cad-simple-viewer/find` (`acapFindText`) and `acapNavigateToFindHit`, so results and navigation are identical.
329
+ - **Client-side only:** the search is a synchronous pass over the drawing already loaded in the browser. There is no backend, index or upload, so the static-hosting deployment described in [Browser-Only Architecture](#browser-only-architecture) is unchanged.
330
+
331
+ Limitations: text produced by fields (only the stored text is searched) and xref content are not searched; non-constant `ATTDEF` templates (never drawn inside a block) and `ATTDEF`s loose in a layout are not searched; a `DIMENSION` whose block has no matching text can still match its stored override text even if the block does not display it; only entities present in the loaded database are searched (what the DXF/DWG parser attaches to each layout); no regex / whole-word / replace; selecting a paper-space hit does not populate the Properties palette (it only inspects model-space entities).
332
+
333
+ Known follow-ups: the search is one synchronous pass over the whole drawing and runs on the UI thread (it has not been benchmarked on large drawings; moving it to chunks or a worker is a possible follow-up); the real-drawing end-to-end check (`e2e/tests/find-b11l1.spec.ts`) is opt-in via `B11L1_DWG` and is skipped in the default CI run, which exercises the committed fixtures only.
334
+
335
+ ### Event Handling
336
+
337
+ The component automatically handles various events:
338
+
339
+ - **File Loading** - Supports local file loading (via file dialog), drag-and-drop, and URL-based file loading
340
+ - **Error Messages** - Displays user-friendly error messages for failed operations
341
+ - **Font Loading** - Handles missing fonts with appropriate notifications
342
+ - **System Messages** - Shows status updates and operation feedback
343
+
344
+ ### Advanced Usage
345
+
346
+ Please refer to [readme of cad-simple-viewer](../cad-simple-viewer/README.md) to learn the following advanced usage.
347
+
348
+ - Register DWG converter to display drawings in DWG format
349
+ - Define your own font loader to load fonts from your own server
350
+ - Create drawing or modify drawing
351
+
352
+ ## Available Exports
353
+
354
+ ### Main Component
355
+
356
+ - `MlCADViewer` - The main CAD viewer component
357
+
358
+ ### Commands
359
+
360
+ - `AcApFindCmd` - Opens the Find palette
361
+ - `AcApLayerStateCmd` - Layer state command
362
+ - `AcApLogCmd` - Log command
363
+ - `AcApMissedDataCmd` - Missed data command
364
+ - `AcApPointStyleCmd` - Point style command
365
+
366
+ ### Components
367
+
368
+ - `MlPointStyleDlg` - Point style dialog
369
+ - Various layout and UI components
370
+
371
+ ### Composables
372
+
373
+ - `useCommands` - Command management
374
+ - `useCurrentPos` - Current position tracking
375
+ - `useDark` - Reactive dark-mode state backed by the `COLORTHEME` system variable
376
+ - `useDialogManager` - Dialog management
377
+ - `useFileTypes` - File type utilities
378
+ - `useFind` - State and actions of the Find palette (whole-drawing / current-layout search, navigation)
379
+ - `useLayers` - Layer management
380
+ - `useLayouts` - Layout management
381
+ - `useMissedData` - Missed data handling
382
+ - `useSettings` - Settings management
383
+ - `useSystemVars` - System variables
384
+
385
+ ### Theme Synchronization
386
+
387
+ The viewer UI theme is synchronized through the `COLORTHEME` system variable managed by `AcDbSysVarManager`.
388
+
389
+ - `COLORTHEME = 0` means dark theme.
390
+ - `COLORTHEME = 1` means light theme.
391
+ - The `theme` prop provides the initial value when `MlCadViewer` mounts.
392
+ - Clicking the status bar theme button updates `COLORTHEME`.
393
+ - Any runtime change to `COLORTHEME` is reflected automatically in viewer UI and MTEXT-related UI.
394
+ - The exported `useDark` composable is still available, but it now wraps `COLORTHEME` instead of maintaining an isolated local dark-mode state.
395
+
396
+ ### Locale
397
+
398
+ - `i18n` - Internationalization instance
399
+ - Language files for English and Chinese
400
+
401
+ ### Styles
402
+
403
+ - CSS and SCSS files for styling
404
+ - Dark mode support
405
+ - Element Plus integration
406
+
407
+ ## Development
408
+
409
+ ```bash
410
+ # Install dependencies
411
+ pnpm install
412
+
413
+ # Start development server
414
+ pnpm dev
415
+
416
+ # Build the library
417
+ pnpm build
418
+
419
+ # Preview the build
420
+ pnpm preview
421
+ ```
422
+
423
+ ## License
424
+
425
+ MIT
@@ -0,0 +1,31 @@
1
+ import { AcApDocManagerOptions } from '@mlightcad/cad-simple-viewer';
2
+ /** Options for {@link initializeCadViewer}. */
3
+ export type InitializeCadViewerOptions = AcApDocManagerOptions & {
4
+ /**
5
+ * URL of `viewer-runtime.iife.js` for HTML export (`chtml`).
6
+ * Forwarded to `@mlightcad/cad-html-plugin` — not required to open DXF/DWG.
7
+ * @default './assets/viewer-runtime.iife.js'
8
+ */
9
+ htmlViewerRuntimeUrl?: string | URL;
10
+ /**
11
+ * When set, loads `@mlightcad/cad-onedrive-plugin` if installed and registers
12
+ * the OneDrive data source for Open menus.
13
+ */
14
+ onedrive?: {
15
+ clientId: string;
16
+ tenantId?: string;
17
+ redirectUri?: string;
18
+ };
19
+ /**
20
+ * When set, loads `@mlightcad/cad-google-drive-plugin` if installed and
21
+ * registers the Google Drive data source for Open menus.
22
+ */
23
+ googledrive?: {
24
+ clientId: string;
25
+ apiKey: string;
26
+ /** Numeric Google Cloud project number (Picker `setAppId`). */
27
+ appId: string;
28
+ };
29
+ };
30
+ export declare const initializeCadViewer: (options?: InitializeCadViewerOptions) => void;
31
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/app/app.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AACpC,OAAO,oBAAoB,CAAA;AAC3B,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAEL,qBAAqB,EACtB,MAAM,8BAA8B,CAAA;AAWrC,+CAA+C;AAC/C,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,GAAG;IAC/D;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CAAA;IACD;;;OAGG;IACH,WAAW,CAAC,EAAE;QACZ,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,+DAA+D;QAC/D,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA;AAED,eAAO,MAAM,mBAAmB,GAC9B,UAAS,0BAA+B,SA+CzC,CAAA"}
@@ -0,0 +1,20 @@
1
+ import { AcApNotificationCenter } from '@mlightcad/cad-simple-viewer';
2
+ /**
3
+ * Adapts the Vue {@link useNotificationCenter} singleton to the
4
+ * {@link AcApNotificationCenter} contract used by cad-simple-viewer.
5
+ *
6
+ * Calling {@link registerCadViewerNotificationCenter} replaces the built-in DOM
7
+ * notification UI so font / unsupported-entity alerts appear in the Vue panel.
8
+ *
9
+ * @returns A center adapter that forwards into the Vue notification store.
10
+ */
11
+ export declare function createCadViewerNotificationCenterAdapter(): AcApNotificationCenter;
12
+ /**
13
+ * Registers the Vue notification center as the active host override.
14
+ */
15
+ export declare function registerCadViewerNotificationCenter(): void;
16
+ /**
17
+ * Restores the built-in cad-simple-viewer notification center.
18
+ */
19
+ export declare function unregisterCadViewerNotificationCenter(): void;
20
+ //# sourceMappingURL=cadViewerNotificationCenter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cadViewerNotificationCenter.d.ts","sourceRoot":"","sources":["../../src/app/cadViewerNotificationCenter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,8BAA8B,CAAA;AAIrC;;;;;;;;GAQG;AACH,wBAAgB,wCAAwC,IAAI,sBAAsB,CA4GjF;AAED;;GAEG;AACH,wBAAgB,mCAAmC,SAElD;AAED;;GAEG;AACH,wBAAgB,qCAAqC,SAEpD"}
@@ -0,0 +1,5 @@
1
+ export * from './app';
2
+ export * from './cadViewerNotificationCenter';
3
+ export * from './register';
4
+ export * from './store';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,+BAA+B,CAAA;AAC7C,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { AcApHtmlPluginOptions } from '@mlightcad/cad-html-plugin/register';
2
+ export declare const registerCmds: () => void;
3
+ export declare const registerDialogs: () => void;
4
+ export declare const registerMTextColorPicker: () => void;
5
+ /**
6
+ * Options for {@link registerLazyPlugins}.
7
+ */
8
+ export interface RegisterLazyPluginsOptions {
9
+ /** Options passed to {@link registerLazyHtmlPlugin} (HTML export only). */
10
+ htmlPlugin?: AcApHtmlPluginOptions;
11
+ }
12
+ /**
13
+ * Registers lazy plugins that load on first use of their trigger commands.
14
+ *
15
+ * Currently registers the PDF plugin (`-cpdf`, `ipdf`), the HTML export
16
+ * plugin (`-chtml`), the SVG export plugin (`csvg`), and optionally the CAD
17
+ * Agent plugin (`agent`) when `@mlightcad/cad-agent-plugin` is installed, and the
18
+ * script console (`cadscript`) when `@mlightcad/cad-script-plugin` is installed.
19
+ * When {@link AcApDocManager.disableExport} is true, HTML/SVG export plugins
20
+ * are skipped and the PDF plugin only exposes `ipdf`. Host UI commands
21
+ * `chtml` / `cpdf` open export dialogs and load the plugins on confirm.
22
+ * Safe to call multiple times; registration runs once per application lifetime.
23
+ *
24
+ * @param options - Optional HTML plugin settings such as `viewerRuntimeUrl`
25
+ */
26
+ export declare const registerLazyPlugins: (options?: RegisterLazyPluginsOptions) => void;
27
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/app/register.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,qCAAqC,CAAA;AAmD5C,eAAO,MAAM,YAAY,YAgJxB,CAAA;AAGD,eAAO,MAAM,eAAe,YAqD3B,CAAA;AAGD,eAAO,MAAM,wBAAwB,YAOpC,CAAA;AAkED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,2EAA2E;IAC3E,UAAU,CAAC,EAAE,qBAAqB,CAAA;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAS,0BAA+B,SAwBzC,CAAA"}
@@ -0,0 +1,16 @@
1
+ export declare const store: {
2
+ dialogs: {
3
+ layerManager: boolean;
4
+ activePaletteTab: string;
5
+ activeMissingResourceTab: "font" | "xref";
6
+ openFileProfileTabVisible: boolean;
7
+ findFocusTick: number;
8
+ };
9
+ features: {
10
+ agentPlugin: boolean;
11
+ scriptPlugin: boolean;
12
+ };
13
+ memoryProfileTick: number;
14
+ openFileProfileTick: number;
15
+ };
16
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/app/store.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;kCAKsB,MAAM,GAAG,MAAM;;;;;;;;;;CAwBrD,CAAA"}