@mlightcad/libredwg-converter 3.5.0 → 3.5.2
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 +21 -21
- package/README.md +52 -52
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,21 +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.
|
|
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
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
# @mlightcad/libredwg-converter
|
|
2
|
-
|
|
3
|
-
The `libredwg-converter` package provides a DWG file converter for the RealDWG-Web ecosystem, enabling reading and conversion of DWG files into the AutoCAD-like drawing database structure. It is based on the [LibreDWG](https://www.gnu.org/software/libredwg/) library compiled to WebAssembly.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
This package implements a DWG file converter compatible with the RealDWG-Web data model. It allows you to register DWG file support in your application and convert DWG files into the in-memory drawing database.
|
|
8
|
-
|
|
9
|
-
## Key Features
|
|
10
|
-
|
|
11
|
-
- **DWG File Support**: Read and convert DWG files to the drawing database
|
|
12
|
-
- **Integration**: Designed to work with the RealDWG-Web data model and converter manager
|
|
13
|
-
- **WebAssembly Powered**: Uses LibreDWG compiled to WASM for fast, browser-compatible parsing
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install @mlightcad/libredwg-converter
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
> **Peer dependencies:**
|
|
22
|
-
> - `@mlightcad/data-model`
|
|
23
|
-
> - `@mlightcad/libredwg-web`
|
|
24
|
-
|
|
25
|
-
## Usage Example
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
import { AcDbDatabaseConverterManager, AcDbFileType } from '@mlightcad/data-model';
|
|
29
|
-
import { AcDbLibreDwgConverter } from '@mlightcad/libredwg-converter';
|
|
30
|
-
|
|
31
|
-
// WASM module loading (async)
|
|
32
|
-
import('@mlightcad/libredwg-web/wasm/libredwg-web').then(libredwgModule => {
|
|
33
|
-
const dwgConverter = new AcDbLibreDwgConverter(libredwgModule);
|
|
34
|
-
AcDbDatabaseConverterManager.instance.register(AcDbFileType.DWG, dwgConverter);
|
|
35
|
-
});
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## API
|
|
39
|
-
|
|
40
|
-
- **AcDbLibreDwgConverter**: Main converter class for DWG files (extends `AcDbDatabaseConverter`)
|
|
41
|
-
|
|
42
|
-
## Dependencies
|
|
43
|
-
|
|
44
|
-
- **@mlightcad/data-model**: Drawing database and entity definitions
|
|
45
|
-
- **@mlightcad/libredwg-web**: WASM wrapper for LibreDWG
|
|
46
|
-
|
|
47
|
-
## API Documentation
|
|
48
|
-
|
|
49
|
-
For detailed API documentation, visit the [RealDWG-Web documentation](https://mlight-lee.github.io/realdwg-web/).
|
|
50
|
-
|
|
51
|
-
## Contributing
|
|
52
|
-
|
|
1
|
+
# @mlightcad/libredwg-converter
|
|
2
|
+
|
|
3
|
+
The `libredwg-converter` package provides a DWG file converter for the RealDWG-Web ecosystem, enabling reading and conversion of DWG files into the AutoCAD-like drawing database structure. It is based on the [LibreDWG](https://www.gnu.org/software/libredwg/) library compiled to WebAssembly.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This package implements a DWG file converter compatible with the RealDWG-Web data model. It allows you to register DWG file support in your application and convert DWG files into the in-memory drawing database.
|
|
8
|
+
|
|
9
|
+
## Key Features
|
|
10
|
+
|
|
11
|
+
- **DWG File Support**: Read and convert DWG files to the drawing database
|
|
12
|
+
- **Integration**: Designed to work with the RealDWG-Web data model and converter manager
|
|
13
|
+
- **WebAssembly Powered**: Uses LibreDWG compiled to WASM for fast, browser-compatible parsing
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @mlightcad/libredwg-converter
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
> **Peer dependencies:**
|
|
22
|
+
> - `@mlightcad/data-model`
|
|
23
|
+
> - `@mlightcad/libredwg-web`
|
|
24
|
+
|
|
25
|
+
## Usage Example
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import { AcDbDatabaseConverterManager, AcDbFileType } from '@mlightcad/data-model';
|
|
29
|
+
import { AcDbLibreDwgConverter } from '@mlightcad/libredwg-converter';
|
|
30
|
+
|
|
31
|
+
// WASM module loading (async)
|
|
32
|
+
import('@mlightcad/libredwg-web/wasm/libredwg-web').then(libredwgModule => {
|
|
33
|
+
const dwgConverter = new AcDbLibreDwgConverter(libredwgModule);
|
|
34
|
+
AcDbDatabaseConverterManager.instance.register(AcDbFileType.DWG, dwgConverter);
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## API
|
|
39
|
+
|
|
40
|
+
- **AcDbLibreDwgConverter**: Main converter class for DWG files (extends `AcDbDatabaseConverter`)
|
|
41
|
+
|
|
42
|
+
## Dependencies
|
|
43
|
+
|
|
44
|
+
- **@mlightcad/data-model**: Drawing database and entity definitions
|
|
45
|
+
- **@mlightcad/libredwg-web**: WASM wrapper for LibreDWG
|
|
46
|
+
|
|
47
|
+
## API Documentation
|
|
48
|
+
|
|
49
|
+
For detailed API documentation, visit the [RealDWG-Web documentation](https://mlight-lee.github.io/realdwg-web/).
|
|
50
|
+
|
|
51
|
+
## Contributing
|
|
52
|
+
|
|
53
53
|
This package is part of the RealDWG-Web monorepo. Please refer to the main project README for contribution guidelines.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/libredwg-converter",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"vite": "^5.2.10"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@mlightcad/data-model": "1.7.
|
|
42
|
+
"@mlightcad/data-model": "1.7.2"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"analyze": "pnpm run analyze:lib && pnpm run analyze:worker",
|