shiliu-cad-core 0.1.1 → 0.1.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/README.md CHANGED
@@ -73,3 +73,19 @@ go tool nsgo build -target web # 产出 dist/CAD-*-web/
73
73
  ## 许可
74
74
 
75
75
  Apache-2.0。DWG 解析基于 [go-cad](https://github.com/unitedrhino/go-cad)(Apache-2.0),UI 引擎为 [NSGo](https://github.com/nsgo-dev/nsgo)(Apache-2.0)。
76
+
77
+ ## 本地开发
78
+
79
+ ```bash
80
+ git clone <repo> && cd shiliu-cad-core
81
+ npm pack --dry-run # 看包内容
82
+ npm publish --access public
83
+ ```
84
+
85
+ 组件源码在 `../cad`(NSGo 工程):改完 `go tool nsgo build -target web`,
86
+ 把 `dist/CAD-*-web/` 同步进本包的 `dist/` 即可。
87
+
88
+ ## 版本
89
+
90
+ - `0.1.1` — 支持 URL 参数 `?doc=N` 指定默认图纸;线宽按背景分档;浅色主题细线
91
+ - `0.1.0` — 首个可用版本:DWG 解析、光栅渲染、缩放平移、拾取、删除撤销、主题、导出
Binary file
package/dist/index.html CHANGED
@@ -9,6 +9,6 @@
9
9
  <script src="wasm_exec.0c949f4996.js"></script>
10
10
  </head>
11
11
  <body>
12
- <script type="module" src="mount.8ead501957.js"></script>
12
+ <script type="module" src="mount.eab9c297b8.js"></script>
13
13
  </body>
14
14
  </html>
@@ -1,7 +1,7 @@
1
1
  // Written by nsgo: the page runs the app.
2
2
  import { mount } from "./nsgo.7172b2de4c.js";
3
3
  document.addEventListener("gesturestart", (e) => e.preventDefault());
4
- mount(null, null, { config: {"version":"0.1.0","release":true,"wasm":"app.d5b17e671a.wasm","wasmSize":29744999,"exec":"wasm_exec.0c949f4996.js","loader":"nsgo.7172b2de4c.js","resources":{"THIRD_PARTY_NOTICES.txt":"THIRD_PARTY_NOTICES.a985c91454.txt"}} }).catch((e) => {
4
+ mount(null, null, { config: {"version":"0.1.0","release":true,"wasm":"app.88085abfe6.wasm","wasmSize":27002670,"exec":"wasm_exec.0c949f4996.js","loader":"nsgo.7172b2de4c.js","resources":{"THIRD_PARTY_NOTICES.txt":"THIRD_PARTY_NOTICES.a985c91454.txt"}} }).catch((e) => {
5
5
  console.error(e);
6
6
  const message = document.createElement("pre");
7
7
  message.textContent = "The app could not be loaded: " + e.message;
package/dist/nsgo.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": "0.1.0",
3
3
  "release": true,
4
- "wasm": "app.d5b17e671a.wasm",
5
- "wasmSize": 29744999,
4
+ "wasm": "app.88085abfe6.wasm",
5
+ "wasmSize": 27002670,
6
6
  "exec": "wasm_exec.0c949f4996.js",
7
7
  "loader": "nsgo.7172b2de4c.js",
8
8
  "resources": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shiliu-cad-core",
3
- "version": "0.1.1",
4
- "description": "十六 CAD 核心组件:纯 WebAssembly 的 DWG 预览与编辑视图(解析/渲染/缩放平移/拾取/编辑/导出),可嵌入任意 Web 页面。",
3
+ "version": "0.1.2",
4
+ "description": "Embeddable CAD viewer core: DWG/DXF parsing and rendering compiled to WebAssembly with NSGo. Mount it into any container and get zoom, pan, pick, delete, undo, theme switching and PNG export.",
5
5
  "type": "module",
6
6
  "main": "./index.js",
7
7
  "module": "./index.js",
@@ -9,31 +9,12 @@
9
9
  ".": "./index.js",
10
10
  "./dist/*": "./dist/*"
11
11
  },
12
- "files": [
13
- "index.js",
14
- "dist",
15
- "README.md",
16
- "LICENSE"
17
- ],
18
- "keywords": [
19
- "cad",
20
- "dwg",
21
- "dxf",
22
- "nsgo",
23
- "wasm",
24
- "viewer",
25
- "drawing"
26
- ],
12
+ "files": ["index.js", "dist", "README.md", "LICENSE"],
13
+ "keywords": ["cad", "dwg", "dxf", "wasm", "webassembly", "nsgo", "viewer", "editor", "shiliu"],
27
14
  "license": "Apache-2.0",
28
- "engines": {
29
- "node": ">=18"
30
- },
31
- "repository": {
32
- "type": "git",
33
- "url": "git+https://github.com/jsnancy/shiliu-cad-core.git"
34
- },
15
+ "author": "jsnancy",
35
16
  "homepage": "https://github.com/jsnancy/shiliu-cad-core#readme",
36
- "bugs": {
37
- "url": "https://github.com/jsnancy/shiliu-cad-core/issues"
38
- }
17
+ "repository": { "type": "git", "url": "git+https://github.com/jsnancy/shiliu-cad-core.git" },
18
+ "bugs": { "url": "https://github.com/jsnancy/dsh-shiliu-cad-preview/issues" },
19
+ "engines": { "node": ">=18" }
39
20
  }
Binary file