@mlightcad/cad-viewer 1.0.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 (121) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +229 -0
  3. package/dist/app/app.d.ts +3 -0
  4. package/dist/app/app.d.ts.map +1 -0
  5. package/dist/app/index.d.ts +3 -0
  6. package/dist/app/index.d.ts.map +1 -0
  7. package/dist/app/store.d.ts +7 -0
  8. package/dist/app/store.d.ts.map +1 -0
  9. package/dist/command/AcApLayerStateCmd.d.ts +5 -0
  10. package/dist/command/AcApLayerStateCmd.d.ts.map +1 -0
  11. package/dist/command/AcApLogCmd.d.ts +12 -0
  12. package/dist/command/AcApLogCmd.d.ts.map +1 -0
  13. package/dist/command/AcApMissedDataCmd.d.ts +5 -0
  14. package/dist/command/AcApMissedDataCmd.d.ts.map +1 -0
  15. package/dist/command/AcApPointStyleCmd.d.ts +5 -0
  16. package/dist/command/AcApPointStyleCmd.d.ts.map +1 -0
  17. package/dist/command/index.d.ts +5 -0
  18. package/dist/command/index.d.ts.map +1 -0
  19. package/dist/component/MlCadViewer.vue.d.ts +33 -0
  20. package/dist/component/MlCadViewer.vue.d.ts.map +1 -0
  21. package/dist/component/common/MlBaseDialog.vue.d.ts +71 -0
  22. package/dist/component/common/MlBaseDialog.vue.d.ts.map +1 -0
  23. package/dist/component/common/MlFileReader.vue.d.ts +7 -0
  24. package/dist/component/common/MlFileReader.vue.d.ts.map +1 -0
  25. package/dist/component/common/MlToggleButton.vue.d.ts +75 -0
  26. package/dist/component/common/MlToggleButton.vue.d.ts.map +1 -0
  27. package/dist/component/common/index.d.ts +5 -0
  28. package/dist/component/common/index.d.ts.map +1 -0
  29. package/dist/component/dialog/MlPointStyleDlg.vue.d.ts +3 -0
  30. package/dist/component/dialog/MlPointStyleDlg.vue.d.ts.map +1 -0
  31. package/dist/component/dialog/MlReplacementDlg.vue.d.ts +3 -0
  32. package/dist/component/dialog/MlReplacementDlg.vue.d.ts.map +1 -0
  33. package/dist/component/dialog/index.d.ts +3 -0
  34. package/dist/component/dialog/index.d.ts.map +1 -0
  35. package/dist/component/index.d.ts +7 -0
  36. package/dist/component/index.d.ts.map +1 -0
  37. package/dist/component/layerManager/MlLayerList.vue.d.ts +22 -0
  38. package/dist/component/layerManager/MlLayerList.vue.d.ts.map +1 -0
  39. package/dist/component/layerManager/MlLayerManager.vue.d.ts +22 -0
  40. package/dist/component/layerManager/MlLayerManager.vue.d.ts.map +1 -0
  41. package/dist/component/layerManager/index.d.ts +2 -0
  42. package/dist/component/layerManager/index.d.ts.map +1 -0
  43. package/dist/component/layout/MlCommandLine.vue.d.ts +3 -0
  44. package/dist/component/layout/MlCommandLine.vue.d.ts.map +1 -0
  45. package/dist/component/layout/MlEntityInfo.vue.d.ts +3 -0
  46. package/dist/component/layout/MlEntityInfo.vue.d.ts.map +1 -0
  47. package/dist/component/layout/MlLanguageSelector.vue.d.ts +3 -0
  48. package/dist/component/layout/MlLanguageSelector.vue.d.ts.map +1 -0
  49. package/dist/component/layout/MlMainMenu.vue.d.ts +3 -0
  50. package/dist/component/layout/MlMainMenu.vue.d.ts.map +1 -0
  51. package/dist/component/layout/MlToolBars.vue.d.ts +3 -0
  52. package/dist/component/layout/MlToolBars.vue.d.ts.map +1 -0
  53. package/dist/component/layout/index.d.ts +6 -0
  54. package/dist/component/layout/index.d.ts.map +1 -0
  55. package/dist/component/statusBar/MlFullScreenButton.vue.d.ts +3 -0
  56. package/dist/component/statusBar/MlFullScreenButton.vue.d.ts.map +1 -0
  57. package/dist/component/statusBar/MlPointStyleButton.vue.d.ts +3 -0
  58. package/dist/component/statusBar/MlPointStyleButton.vue.d.ts.map +1 -0
  59. package/dist/component/statusBar/MlProgress.vue.d.ts +3 -0
  60. package/dist/component/statusBar/MlProgress.vue.d.ts.map +1 -0
  61. package/dist/component/statusBar/MlSettingButton.vue.d.ts +3 -0
  62. package/dist/component/statusBar/MlSettingButton.vue.d.ts.map +1 -0
  63. package/dist/component/statusBar/MlStatusBar.vue.d.ts +3 -0
  64. package/dist/component/statusBar/MlStatusBar.vue.d.ts.map +1 -0
  65. package/dist/component/statusBar/MlThemeButton.vue.d.ts +3 -0
  66. package/dist/component/statusBar/MlThemeButton.vue.d.ts.map +1 -0
  67. package/dist/component/statusBar/MlWarningButton.vue.d.ts +3 -0
  68. package/dist/component/statusBar/MlWarningButton.vue.d.ts.map +1 -0
  69. package/dist/component/statusBar/index.d.ts +2 -0
  70. package/dist/component/statusBar/index.d.ts.map +1 -0
  71. package/dist/composable/index.d.ts +10 -0
  72. package/dist/composable/index.d.ts.map +1 -0
  73. package/dist/composable/useCommands.d.ts +6 -0
  74. package/dist/composable/useCommands.d.ts.map +1 -0
  75. package/dist/composable/useCurrentPos.d.ts +7 -0
  76. package/dist/composable/useCurrentPos.d.ts.map +1 -0
  77. package/dist/composable/useDark.d.ts +3 -0
  78. package/dist/composable/useDark.d.ts.map +1 -0
  79. package/dist/composable/useDialogManager.d.ts +22 -0
  80. package/dist/composable/useDialogManager.d.ts.map +1 -0
  81. package/dist/composable/useFileTypes.d.ts +2 -0
  82. package/dist/composable/useFileTypes.d.ts.map +1 -0
  83. package/dist/composable/useLayers.d.ts +15 -0
  84. package/dist/composable/useLayers.d.ts.map +1 -0
  85. package/dist/composable/useLayouts.d.ts +10 -0
  86. package/dist/composable/useLayouts.d.ts.map +1 -0
  87. package/dist/composable/useMissedData.d.ts +11 -0
  88. package/dist/composable/useMissedData.d.ts.map +1 -0
  89. package/dist/composable/useSettings.d.ts +9 -0
  90. package/dist/composable/useSettings.d.ts.map +1 -0
  91. package/dist/composable/useSystemVars.d.ts +10 -0
  92. package/dist/composable/useSystemVars.d.ts.map +1 -0
  93. package/dist/index.css +1 -0
  94. package/dist/index.d.ts +6 -0
  95. package/dist/index.d.ts.map +1 -0
  96. package/dist/index.js +3102 -0
  97. package/dist/locale/en/command.d.ts +18 -0
  98. package/dist/locale/en/command.d.ts.map +1 -0
  99. package/dist/locale/en/dialog.d.ts +22 -0
  100. package/dist/locale/en/dialog.d.ts.map +1 -0
  101. package/dist/locale/en/entity.d.ts +167 -0
  102. package/dist/locale/en/entity.d.ts.map +1 -0
  103. package/dist/locale/en/main.d.ts +94 -0
  104. package/dist/locale/en/main.d.ts.map +1 -0
  105. package/dist/locale/i18n.d.ts +601 -0
  106. package/dist/locale/i18n.d.ts.map +1 -0
  107. package/dist/locale/index.d.ts +2 -0
  108. package/dist/locale/index.d.ts.map +1 -0
  109. package/dist/locale/zh/command.d.ts +18 -0
  110. package/dist/locale/zh/command.d.ts.map +1 -0
  111. package/dist/locale/zh/dialog.d.ts +22 -0
  112. package/dist/locale/zh/dialog.d.ts.map +1 -0
  113. package/dist/locale/zh/entity.d.ts +167 -0
  114. package/dist/locale/zh/entity.d.ts.map +1 -0
  115. package/dist/locale/zh/main.d.ts +94 -0
  116. package/dist/locale/zh/main.d.ts.map +1 -0
  117. package/dist/svg/index.d.ts +10 -0
  118. package/dist/svg/index.d.ts.map +1 -0
  119. package/dist/svg/pointstyle/index.d.ts +21 -0
  120. package/dist/svg/pointstyle/index.d.ts.map +1 -0
  121. package/package.json +66 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 mlight-lee
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 ADDED
@@ -0,0 +1,229 @@
1
+ # CAD Viewer Component
2
+
3
+ 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.
4
+
5
+ ## Key Features
6
+
7
+ - **High-performance** CAD editing and viewing with smooth 60+ FPS rendering
8
+ - **No backend required** - Files are parsed and processed entirely in the browser
9
+ - **Enhanced data security** - Files never leave your device, ensuring complete privacy
10
+ - **Easy integration** - No server setup or backend infrastructure needed for third-party integration
11
+ - Modern UI optimized for large CAD file handling
12
+ - State management for layers, entities, and settings
13
+ - Integration with optimized SVG and THREE.js renderers
14
+ - Dialogs, toolbars, and command line interface
15
+ - Vue 3 component for embedding high-performance CAD viewers in your own apps
16
+
17
+ ## Browser-Only Architecture
18
+
19
+ 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:
20
+
21
+ - **Zero server requirements** - Deploy the component anywhere with just static file hosting
22
+ - **Complete data privacy** - CAD files never leave the user's device
23
+ - **Instant integration** - No complex backend setup or API configuration needed
24
+ - **Offline capability** - Works without internet connectivity once loaded
25
+ - **Third-party friendly** - Easy to embed in any Vue 3 application without server-side concerns
26
+
27
+ ## Directory Structure (partial)
28
+
29
+ - `src/app/` – Application entry, store, and main logic
30
+ - `src/component/` – UI components (dialogs, toolbars, status bar, etc.)
31
+ - `src/composable/` – Vue composables for state and logic
32
+ - `src/locale/` – Internationalization files
33
+ - `src/style/` – Stylesheets
34
+ - `src/svg/` – SVG assets
35
+
36
+ ## Installation
37
+
38
+ ```bash
39
+ npm install @mlightcad/cad-viewer
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ Please refer to sub-package `cad-viewer-example` as one example.
45
+
46
+ ### Basic Usage
47
+
48
+ ```vue
49
+ <template>
50
+ <div>
51
+ <MlCADViewer />
52
+ </div>
53
+ </template>
54
+
55
+ <script setup lang="ts">
56
+ import 'uno.css'
57
+ import 'element-plus/dist/index.css'
58
+ import 'element-plus/dist/index.css'
59
+
60
+ import {
61
+ i18n,
62
+ initializeCadViewer,
63
+ MlCadViewer,
64
+ registerCommponents
65
+ } from '@mlightcad/cad-viewer'
66
+ import ElementPlus from 'element-plus'
67
+ import { createApp } from 'vue'
68
+
69
+ const initApp = () => {
70
+ initializeCadViewer('canvas')
71
+
72
+ const app = createApp(MlCadViewer)
73
+ app.use(i18n)
74
+ app.use(ElementPlus)
75
+ app.mount('#app')
76
+
77
+ registerCommponents()
78
+ }
79
+
80
+ initApp()
81
+ </script>
82
+ ```
83
+
84
+ ### Advanced Usage
85
+
86
+ By default, cad viewer registers DXF converter only and can view DXF file only. If you want to view DWG file, you need to register DWG converter. The following example code shows how to register DWG converter.
87
+
88
+ ```typescript
89
+ import {
90
+ AcDbDatabaseConverterManager,
91
+ AcDbFileType
92
+ } from '@mlightcad/data-model'
93
+ import { AcDbLibreDwgConverter } from '@mlightcad/libredwg-converter'
94
+
95
+
96
+ const registerConverters = async () => {
97
+ try {
98
+ const isDev = import.meta.env.DEV
99
+ if (!isDev) {
100
+ // Production mode - use dynamic import with explicit chunk name
101
+ const instance = await import(
102
+ /* webpackChunkName: "libredwg-web" */ '@mlightcad/libredwg-web'
103
+ )
104
+ const converter = new AcDbLibreDwgConverter(await instance.createModule())
105
+ AcDbDatabaseConverterManager.instance.register(
106
+ AcDbFileType.DWG,
107
+ converter
108
+ )
109
+ }
110
+ } catch (error) {
111
+ console.error('Failed to load libredwg-web: ', error)
112
+ }
113
+ }
114
+ ```
115
+
116
+ In order to make it work in Vite dev mode, you need to add the following code.
117
+
118
+ ```typescript
119
+ // This is for development mode only. In production mode, the library is bundled
120
+ window.addEventListener('libredwg-ready', event => {
121
+ // @ts-expect-error this is one custom event and you can get details in index.html
122
+ const instance = event.detail as LibreDwgEx
123
+ const converter = new AcDbLibreDwgConverter(instance)
124
+ AcDbDatabaseConverterManager.instance.register(AcDbFileType.DWG, converter)
125
+ })
126
+ ```
127
+
128
+ Copy `libredwg-web.js` to folder `public/assets` and update `index.html` by adding the following code.
129
+
130
+ ```html
131
+ <script type="module" defer>
132
+ if (import.meta.env.DEV) {
133
+ (async () => {
134
+ // Create a script element to load the module
135
+ const script = document.createElement("script");
136
+ script.type = "module";
137
+ script.src = "/assets/libredwg-web.js";
138
+ script.async = true;
139
+
140
+ script.onload = async () => {
141
+ // Import dynamically after script is loaded
142
+ const actualModule = await import(/* @vite-ignore */script.src);
143
+ const libredwg = await actualModule.createModule();
144
+ window.dispatchEvent(new CustomEvent("libredwg-ready", { detail: libredwg }));
145
+ };
146
+
147
+ document.body.appendChild(script);
148
+ })();
149
+ }
150
+ </script>
151
+ ```
152
+
153
+ ## Available Exports
154
+
155
+ ### Main Component
156
+
157
+ - `MlCADViewer` - The main CAD viewer component
158
+
159
+ ### Commands
160
+
161
+ - `AcApLayerStateCmd` - Layer state command
162
+ - `AcApLogCmd` - Log command
163
+ - `AcApMissedDataCmd` - Missed data command
164
+ - `AcApPointStyleCmd` - Point style command
165
+
166
+ ### Components
167
+
168
+ - `MlPointStyleDlg` - Point style dialog
169
+ - `MlReplacementDlg` - Replacement dialog
170
+ - Various layout and UI components
171
+
172
+ ### Composables
173
+
174
+ - `useCommands` - Command management
175
+ - `useCurrentPos` - Current position tracking
176
+ - `useDark` - Dark mode support
177
+ - `useDialogManager` - Dialog management
178
+ - `useFileTypes` - File type utilities
179
+ - `useLayers` - Layer management
180
+ - `useLayouts` - Layout management
181
+ - `useMissedData` - Missed data handling
182
+ - `useSettings` - Settings management
183
+ - `useSystemVars` - System variables
184
+
185
+ ### Locale
186
+
187
+ - `i18n` - Internationalization instance
188
+ - Language files for English and Chinese
189
+
190
+ ### Styles
191
+
192
+ - CSS and SCSS files for styling
193
+ - Dark mode support
194
+ - Element Plus integration
195
+
196
+ ## Dependencies
197
+
198
+ This component library requires the following peer dependencies:
199
+
200
+ - `vue` ^3.4.0
201
+ - `@mlightcad/data-model`
202
+ - `@mlightcad/libredwg-converter`
203
+ - `@mlightcad/libredwg-web`
204
+ - `@mlightcad/svg-renderer`
205
+ - `@mlightcad/three-renderer`
206
+ - `@mlightcad/cad-simple-viewer`
207
+ - `element-plus`
208
+ - `vue-i18n`
209
+ - And others as specified in package.json
210
+
211
+ ## Development
212
+
213
+ ```bash
214
+ # Install dependencies
215
+ pnpm install
216
+
217
+ # Start development server
218
+ pnpm dev
219
+
220
+ # Build the library
221
+ pnpm build
222
+
223
+ # Preview the build
224
+ pnpm preview
225
+ ```
226
+
227
+ ## License
228
+
229
+ MIT
@@ -0,0 +1,3 @@
1
+ export declare const initializeCadViewer: (elementId: string) => void;
2
+ export declare const registerCommponents: () => void;
3
+ //# 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;AAwD5B,eAAO,MAAM,mBAAmB,GAAI,WAAW,MAAM,SAGpD,CAAA;AAED,eAAO,MAAM,mBAAmB,YAG/B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './app';
2
+ export * from './store';
3
+ //# 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,SAAS,CAAA"}
@@ -0,0 +1,7 @@
1
+ export declare const store: {
2
+ fileName: string;
3
+ dialogs: {
4
+ layerManager: boolean;
5
+ };
6
+ };
7
+ //# 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;;;;;CAKhB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { AcApContext, AcEdCommand } from '@mlightcad/cad-simple-viewer';
2
+ export declare class AcApLayerStateCmd extends AcEdCommand {
3
+ execute(_context: AcApContext): void;
4
+ }
5
+ //# sourceMappingURL=AcApLayerStateCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApLayerStateCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApLayerStateCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAIvE,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,OAAO,CAAC,QAAQ,EAAE,WAAW;CAG9B"}
@@ -0,0 +1,12 @@
1
+ import { AcApContext, AcEdCommand } from '@mlightcad/cad-simple-viewer';
2
+ /**
3
+ * This is an internal command used to log some debug information in console.
4
+ * @internal
5
+ */
6
+ export declare class AcApLogCmd extends AcEdCommand {
7
+ execute(context: AcApContext): void;
8
+ private printSelectionSet;
9
+ private printStats;
10
+ private printPerformanceData;
11
+ }
12
+ //# sourceMappingURL=AcApLogCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApLogCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApLogCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EAEZ,MAAM,8BAA8B,CAAA;AAGrC;;;GAGG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC,OAAO,CAAC,OAAO,EAAE,WAAW;IAM5B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,UAAU;IAqDlB,OAAO,CAAC,oBAAoB;CAG7B"}
@@ -0,0 +1,5 @@
1
+ import { AcApContext, AcEdCommand } from '@mlightcad/cad-simple-viewer';
2
+ export declare class AcApMissedDataCmd extends AcEdCommand {
3
+ execute(_context: AcApContext): void;
4
+ }
5
+ //# sourceMappingURL=AcApMissedDataCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApMissedDataCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApMissedDataCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAIvE,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,OAAO,CAAC,QAAQ,EAAE,WAAW;CAI9B"}
@@ -0,0 +1,5 @@
1
+ import { AcApContext, AcEdCommand } from '@mlightcad/cad-simple-viewer';
2
+ export declare class AcApPointStyleCmd extends AcEdCommand {
3
+ execute(_context: AcApContext): void;
4
+ }
5
+ //# sourceMappingURL=AcApPointStyleCmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcApPointStyleCmd.d.ts","sourceRoot":"","sources":["../../src/command/AcApPointStyleCmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAIvE,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,OAAO,CAAC,QAAQ,EAAE,WAAW;CAI9B"}
@@ -0,0 +1,5 @@
1
+ export * from './AcApLayerStateCmd';
2
+ export * from './AcApLogCmd';
3
+ export * from './AcApMissedDataCmd';
4
+ export * from './AcApPointStyleCmd';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,33 @@
1
+ interface Props {
2
+ locale?: 'en' | 'zh' | 'default';
3
+ url?: string;
4
+ }
5
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
6
+ locale: string;
7
+ url: undefined;
8
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
9
+ locale: string;
10
+ url: undefined;
11
+ }>>> & Readonly<{}>, {
12
+ locale: "en" | "zh" | "default";
13
+ url: string;
14
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
15
+ export default _default;
16
+ type __VLS_WithDefaults<P, D> = {
17
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
18
+ default: D[K];
19
+ }> : P[K];
20
+ };
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToOption<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
30
+ type __VLS_PrettifyLocal<T> = {
31
+ [K in keyof T]: T[K];
32
+ } & {};
33
+ //# sourceMappingURL=MlCadViewer.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MlCadViewer.vue.d.ts","sourceRoot":"","sources":["../../src/component/MlCadViewer.vue"],"names":[],"mappings":"AA8LA,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;IAChC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;;;;;;;;YAFU,IAAI,GAAG,IAAI,GAAG,SAAS;SAC1B,MAAM;;AAgQd,wBAMG;AAEH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC9B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GAC5C,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AACF,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC;AACF,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -0,0 +1,71 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: any;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
11
+ title: {
12
+ type: StringConstructor;
13
+ required: true;
14
+ };
15
+ name: {
16
+ type: StringConstructor;
17
+ required: true;
18
+ };
19
+ modelValue: {
20
+ type: BooleanConstructor;
21
+ required: true;
22
+ };
23
+ width: {
24
+ type: (StringConstructor | NumberConstructor)[];
25
+ default: string;
26
+ };
27
+ props: {
28
+ type: ObjectConstructor;
29
+ default: () => {};
30
+ };
31
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
+ "update:modelValue": (...args: any[]) => void;
33
+ ok: (...args: any[]) => void;
34
+ cancel: (...args: any[]) => void;
35
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
36
+ title: {
37
+ type: StringConstructor;
38
+ required: true;
39
+ };
40
+ name: {
41
+ type: StringConstructor;
42
+ required: true;
43
+ };
44
+ modelValue: {
45
+ type: BooleanConstructor;
46
+ required: true;
47
+ };
48
+ width: {
49
+ type: (StringConstructor | NumberConstructor)[];
50
+ default: string;
51
+ };
52
+ props: {
53
+ type: ObjectConstructor;
54
+ default: () => {};
55
+ };
56
+ }>> & Readonly<{
57
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
58
+ onOk?: ((...args: any[]) => any) | undefined;
59
+ onCancel?: ((...args: any[]) => any) | undefined;
60
+ }>, {
61
+ props: Record<string, any>;
62
+ width: string | number;
63
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
64
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
65
+ export default _default;
66
+ type __VLS_WithTemplateSlots<T, S> = T & {
67
+ new (): {
68
+ $slots: S;
69
+ };
70
+ };
71
+ //# sourceMappingURL=MlBaseDialog.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MlBaseDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/component/common/MlBaseDialog.vue"],"names":[],"mappings":"AAoJA,iBAAS,cAAc;WAiHT,OAAO,IAA6B;;yBAVpB,GAAG;;;;EAehC;AAmCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EA4BnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,7 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
+ "file-read": (fileName: string, fileContent: string | ArrayBuffer) => void;
3
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
+ "onFile-read"?: ((fileName: string, fileContent: string | ArrayBuffer) => any) | undefined;
5
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
7
+ //# sourceMappingURL=MlFileReader.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MlFileReader.vue.d.ts","sourceRoot":"","sources":["../../../src/component/common/MlFileReader.vue"],"names":[],"mappings":"AAUA;;;;;;AAkMA,wBAMG"}
@@ -0,0 +1,75 @@
1
+ import { Component, DefineComponent } from 'vue';
2
+ type MlIconType = (() => DefineComponent) | Component;
3
+ /**
4
+ * Data to descibe toggle button
5
+ */
6
+ export interface MlToggleButtonData {
7
+ /**
8
+ * Icon used when button is 'on'
9
+ */
10
+ onIcon: MlIconType;
11
+ /**
12
+ * Icon used when button is 'off'.
13
+ */
14
+ offIcon: MlIconType;
15
+ /**
16
+ * Tooltip when button is 'on'
17
+ */
18
+ onTooltip: string;
19
+ /**
20
+ * Tooltip when button is 'off'
21
+ */
22
+ offTooltip: string;
23
+ }
24
+ /**
25
+ * Properties of MlToggleButton component
26
+ */
27
+ interface Props {
28
+ /**
29
+ * Button size
30
+ */
31
+ size?: number | string;
32
+ /**
33
+ * Data to descibe toggle button
34
+ */
35
+ data: MlToggleButtonData;
36
+ }
37
+ type __VLS_Props = Props;
38
+ declare const __VLS_defaults: {
39
+ modelValue: boolean;
40
+ };
41
+ type __VLS_PublicProps = {
42
+ modelValue?: typeof __VLS_defaults['modelValue'];
43
+ } & __VLS_Props;
44
+ declare const _default: DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
45
+ size: number;
46
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
47
+ click: (state: boolean) => void;
48
+ "update:modelValue": (value: boolean) => void;
49
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_PublicProps>, {
50
+ size: number;
51
+ }>>> & Readonly<{
52
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
53
+ onClick?: ((state: boolean) => any) | undefined;
54
+ }>, {
55
+ size: number | string;
56
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
57
+ export default _default;
58
+ type __VLS_WithDefaults<P, D> = {
59
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
60
+ default: D[K];
61
+ }> : P[K];
62
+ };
63
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
64
+ type __VLS_TypePropsToOption<T> = {
65
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
66
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
67
+ } : {
68
+ type: import('vue').PropType<T[K]>;
69
+ required: true;
70
+ };
71
+ };
72
+ type __VLS_PrettifyLocal<T> = {
73
+ [K in keyof T]: T[K];
74
+ } & {};
75
+ //# sourceMappingURL=MlToggleButton.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MlToggleButton.vue.d.ts","sourceRoot":"","sources":["../../../src/component/common/MlToggleButton.vue"],"names":[],"mappings":"AAKA;AAyFA,OAAO,EAAE,SAAS,EAAY,eAAe,EAAE,MAAM,KAAK,CAAA;AAE1D,KAAK,UAAU,GAAG,CAAC,MAAM,eAAe,CAAC,GAAG,SAAS,CAAA;AAErD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,UAAU,CAAA;IAClB;;OAEG;IACH,OAAO,EAAE,UAAU,CAAA;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,kBAAkB,CAAA;CACzB;AAUD,KAAK,WAAW,GAAG,KAAK,CAAC;AA2BzB,QAAA,MAAM,cAAc;;CAEnB,CAAC;AACF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;CAChD,GAAG,WAAW,CAAC;;;;;;;;;;;;UA/CP,MAAM,GAAG,MAAM;;AAkIxB,wBAUG;AAEH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC9B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GAC5C,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AACF,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC;AACF,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { default as MlBaseDialog } from './MlBaseDialog.vue';
2
+ export { default as MlDialogManager } from './MlDialogManager.vue';
3
+ export { default as MlFileReader } from './MlFileReader.vue';
4
+ export { default as MlToggleButton } from './MlToggleButton.vue';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=MlPointStyleDlg.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MlPointStyleDlg.vue.d.ts","sourceRoot":"","sources":["../../../src/component/dialog/MlPointStyleDlg.vue"],"names":[],"mappings":"AA2BA;;AAgVA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
3
+ //# sourceMappingURL=MlReplacementDlg.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MlReplacementDlg.vue.d.ts","sourceRoot":"","sources":["../../../src/component/dialog/MlReplacementDlg.vue"],"names":[],"mappings":"AA+FA;;AAmiBA,wBAKG"}
@@ -0,0 +1,3 @@
1
+ export { default as MlReplacementDlg } from './MlReplacementDlg.vue';
2
+ export { default as MlPointStyleDlg } from './MlPointStyleDlg.vue';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA"}
@@ -0,0 +1,7 @@
1
+ export * from './common';
2
+ export * from './dialog';
3
+ export * from './layerManager';
4
+ export * from './layout';
5
+ export * from './statusBar';
6
+ export { default as MlCadViewer } from './MlCadViewer.vue';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/component/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { AcApDocManager } from '@mlightcad/cad-simple-viewer';
2
+ /**
3
+ * Properties of MlLayerList component
4
+ */
5
+ interface Props {
6
+ /**
7
+ * Current drawing database
8
+ */
9
+ editor: AcApDocManager;
10
+ }
11
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToOption<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
22
+ //# sourceMappingURL=MlLayerList.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MlLayerList.vue.d.ts","sourceRoot":"","sources":["../../../src/component/layerManager/MlLayerList.vue"],"names":[],"mappings":"AA0CA;AA0GA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAS7D;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;CACvB;;AA+LD,wBAMG;AAEH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { AcApDocManager } from '@mlightcad/cad-simple-viewer';
2
+ /**
3
+ * Properties of MlLayerList component
4
+ */
5
+ interface Props {
6
+ /**
7
+ * Current editor
8
+ */
9
+ editor: AcApDocManager;
10
+ }
11
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
13
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
+ type __VLS_TypePropsToOption<T> = {
15
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
16
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
17
+ } : {
18
+ type: import('vue').PropType<T[K]>;
19
+ required: true;
20
+ };
21
+ };
22
+ //# sourceMappingURL=MlLayerManager.vue.d.ts.map