shiliu-cad-core 0.1.0 → 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 +16 -0
- package/dist/{app.35e35db98a.wasm → app.88085abfe6.wasm} +0 -0
- package/dist/app.88085abfe6.wasm.br +0 -0
- package/dist/{app.35e35db98a.wasm.br → app.88085abfe6.wasm.gz} +0 -0
- package/dist/index.html +1 -1
- package/dist/{mount.4cd159afdd.js → mount.eab9c297b8.js} +1 -1
- package/dist/nsgo.json +2 -2
- package/package.json +8 -27
- package/dist/app.35e35db98a.wasm.gz +0 -0
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
|
|
Binary file
|
|
Binary file
|
package/dist/index.html
CHANGED
|
@@ -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.
|
|
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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shiliu-cad-core",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
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
|
-
|
|
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
|
-
"
|
|
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
|
-
"
|
|
37
|
-
|
|
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
|