@mlightcad/libredwg-converter 3.7.0 → 3.7.1

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 (3) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +59 -56
  3. package/package.json +3 -3
package/LICENSE CHANGED
@@ -1,21 +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.
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,56 +1,59 @@
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
- DWG parsing is provided through a dedicated Web Worker bundle (`libredwg-parser-worker.js`). **This converter is intended for Web Worker use only.** That restriction is not because parsing cannot run on the main thread in principle; it is a deliberate licensing choice. LibreDWG and its WebAssembly wrapper are copyleft (GPL), and loading them in a separate worker bundle helps keep that parser code apart from the main MIT-licensed application so license obligations are easier to manage.
10
-
11
- ## Key Features
12
-
13
- - **DWG File Support**: Read and convert DWG files to the drawing database
14
- - **Integration**: Designed to work with the RealDWG-Web data model and converter manager
15
- - **WebAssembly Powered**: Uses LibreDWG compiled to WASM, loaded in a Web Worker for license isolation
16
-
17
- ## Installation
18
-
19
- ```bash
20
- npm install @mlightcad/libredwg-converter
21
- ```
22
-
23
- > **Peer dependencies:**
24
- > - `@mlightcad/data-model`
25
-
26
- ## Usage Example
27
-
28
- ```typescript
29
- import { AcDbDatabaseConverterManager, AcDbFileType } from '@mlightcad/data-model';
30
- import { AcDbLibreDwgConverter } from '@mlightcad/libredwg-converter';
31
-
32
- const dwgConverter = new AcDbLibreDwgConverter({
33
- useWorker: true,
34
- parserWorkerUrl: './assets/libredwg-parser-worker.js'
35
- });
36
- AcDbDatabaseConverterManager.instance.register(AcDbFileType.DWG, dwgConverter);
37
- ```
38
-
39
- Deploy `libredwg-parser-worker.js` from this package's `dist/` folder to a public URL accessible by your application.
40
-
41
- ## API
42
-
43
- - **AcDbLibreDwgConverter**: Main converter class for DWG files (extends `AcDbDatabaseConverter`)
44
-
45
- ## Dependencies
46
-
47
- - **@mlightcad/data-model**: Drawing database and entity definitions
48
- - **@mlightcad/libredwg-web**: WASM wrapper for LibreDWG, loaded in the worker bundle by design for license isolation
49
-
50
- ## API Documentation
51
-
52
- For detailed API documentation, visit the [RealDWG-Web documentation](https://mlight-lee.github.io/realdwg-web/).
53
-
54
- ## Contributing
55
-
56
- This package is part of the RealDWG-Web monorepo. Please refer to the main project README for contribution guidelines.
1
+ # @mlightcad/libredwg-converter
2
+
3
+ [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
4
+ [![npm version](https://img.shields.io/npm/v/@mlightcad/libredwg-converter.svg)](https://www.npmjs.com/package/@mlightcad/libredwg-converter)
5
+
6
+ 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.
7
+
8
+ ## Overview
9
+
10
+ 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.
11
+
12
+ DWG parsing is provided through a dedicated Web Worker bundle (`libredwg-parser-worker.js`). **This converter is intended for Web Worker use only.** That restriction is not because parsing cannot run on the main thread in principle; it is a deliberate licensing choice. LibreDWG and its WebAssembly wrapper are copyleft (GPL), and loading them in a separate worker bundle helps keep that parser code apart from the main MIT-licensed application so license obligations are easier to manage.
13
+
14
+ ## Key Features
15
+
16
+ - **DWG File Support**: Read and convert DWG files to the drawing database
17
+ - **Integration**: Designed to work with the RealDWG-Web data model and converter manager
18
+ - **WebAssembly Powered**: Uses LibreDWG compiled to WASM, loaded in a Web Worker for license isolation
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ npm install @mlightcad/libredwg-converter
24
+ ```
25
+
26
+ > **Peer dependencies:**
27
+ > - `@mlightcad/data-model`
28
+
29
+ ## Usage Example
30
+
31
+ ```typescript
32
+ import { AcDbDatabaseConverterManager, AcDbFileType } from '@mlightcad/data-model';
33
+ import { AcDbLibreDwgConverter } from '@mlightcad/libredwg-converter';
34
+
35
+ const dwgConverter = new AcDbLibreDwgConverter({
36
+ useWorker: true,
37
+ parserWorkerUrl: './assets/libredwg-parser-worker.js'
38
+ });
39
+ AcDbDatabaseConverterManager.instance.register(AcDbFileType.DWG, dwgConverter);
40
+ ```
41
+
42
+ Deploy `libredwg-parser-worker.js` from this package's `dist/` folder to a public URL accessible by your application.
43
+
44
+ ## API
45
+
46
+ - **AcDbLibreDwgConverter**: Main converter class for DWG files (extends `AcDbDatabaseConverter`)
47
+
48
+ ## Dependencies
49
+
50
+ - **@mlightcad/data-model**: Drawing database and entity definitions
51
+ - **@mlightcad/libredwg-web**: WASM wrapper for LibreDWG, loaded in the worker bundle by design for license isolation
52
+
53
+ ## API Documentation
54
+
55
+ For detailed API documentation, visit the [RealDWG-Web documentation](https://mlight-lee.github.io/realdwg-web/).
56
+
57
+ ## Contributing
58
+
59
+ 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.7.0",
3
+ "version": "3.7.1",
4
4
  "license": "GPL-3.0",
5
5
  "type": "module",
6
6
  "repository": {
@@ -39,10 +39,10 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "vite": "^5.2.10",
42
- "@mlightcad/data-model": "1.9.0"
42
+ "@mlightcad/data-model": "1.9.1"
43
43
  },
44
44
  "peerDependencies": {
45
- "@mlightcad/data-model": "1.9.0"
45
+ "@mlightcad/data-model": "1.9.1"
46
46
  },
47
47
  "scripts": {
48
48
  "analyze": "pnpm run analyze:lib && pnpm run analyze:worker",