dxfview 0.0.4 → 0.0.5-beta

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 (27) hide show
  1. package/dist/dxfview.esm.min.js +3 -3
  2. package/dist/types/core/canvas/SelectionBoxDrawable.d.ts +27 -0
  3. package/dist/types/core/dxf/DxfLoader.d.ts +1 -1
  4. package/dist/types/core/dxf/DxfUtils.d.ts +1 -0
  5. package/dist/types/core/dxf/dxfom-text.d.ts +3 -1
  6. package/dist/types/core/dxf-parser/ParseHelpers.d.ts +1 -0
  7. package/dist/types/core/font/FontManager.d.ts +2 -0
  8. package/dist/types/core/geometry-offset/Offset.d.ts +2 -2
  9. package/dist/types/core/helpers/OSnapHelper.d.ts +65 -2
  10. package/dist/types/core/input/InputManager.d.ts +2 -0
  11. package/dist/types/core/license/PublicKey.d.ts +1 -1
  12. package/dist/types/core/utils/DecimalPrecisionUtils.d.ts +4 -0
  13. package/dist/types/core/utils/MergeUtils.d.ts +1 -1
  14. package/dist/types/core/utils/utf8OrGBK.d.ts +4 -0
  15. package/dist/types/core/viewers/DxfViewer.d.ts +321 -176
  16. package/dist/types/plugins/annotation/AnnotationPlugin.d.ts +144 -2
  17. package/dist/types/plugins/annotation/AutoDrawAnnotation.d.ts +3 -4
  18. package/dist/types/plugins/annotation/BaseAnnotation.d.ts +42 -3
  19. package/dist/types/plugins/annotation/BaseAnnotationDrawable.d.ts +52 -2
  20. package/dist/types/plugins/annotation/FreeDrawAnnotation.d.ts +48 -14
  21. package/dist/types/plugins/annotation/RectAnnotation.d.ts +37 -10
  22. package/dist/types/plugins/annotation/RectDrawable.d.ts +13 -2
  23. package/dist/types/plugins/annotation/freeDrawDrawable.d.ts +1 -0
  24. package/dist/types/plugins/annotation/type.d.ts +1 -0
  25. package/dist/types/plugins/divide/DividePlugin.d.ts +10 -2
  26. package/dist/types/plugins/divide/FrameAnnotation.d.ts +1 -0
  27. package/package.json +92 -90
@@ -1,3 +1,4 @@
1
+ import { FrameDrawable } from "./FrameDrawable";
1
2
  import type { DivideFrameInfo } from "./types";
2
3
  import type { BaseViewer } from "../../core/viewers";
3
4
  import { Plugin } from "../../core/viewers/Plugin";
@@ -172,10 +173,17 @@ export declare class DividePlugin extends Plugin {
172
173
  * @param title 图框标题
173
174
  * @param category 图框分类
174
175
  */
175
- createFrameWithInfo(drawable: any, title: string, category: string): void;
176
+ createFrameWithInfo(drawable: FrameDrawable, title: string, category: string): void;
176
177
  /**
177
178
  * 取消图框创建
178
179
  * @param drawable 要取消的绘制数据
179
180
  */
180
- cancelFrameCreation(drawable: any): void;
181
+ cancelFrameCreation(drawable?: FrameDrawable): void;
182
+ /**
183
+ * 从JSON数据恢复图框
184
+ * 根据保存的角点坐标重新创建图框
185
+ * @param framesData 图框数据数组
186
+ * @returns 成功恢复的图框数量
187
+ */
188
+ restoreFrames(framesData: DivideFrameInfo[]): number;
181
189
  }
@@ -138,5 +138,6 @@ export declare class FrameAnnotation extends Event<FrameAnnotationEvents> {
138
138
  * 完全按照 BaseAnnotation.ts 的实现
139
139
  */
140
140
  getIntersections: (e: EventInfo) => THREE.Intersection[];
141
+ private getMouseWorldPosition;
141
142
  }
142
143
  export {};
package/package.json CHANGED
@@ -1,90 +1,92 @@
1
- {
2
- "name": "dxfview",
3
- "version": "0.0.4",
4
- "homepage": "",
5
- "module": "dist/dxfview.esm.min.js",
6
- "main": "dist/dxfview.esm.min.js",
7
- "types": "dist/types/index.d.ts",
8
- "type": "module",
9
- "scripts": {
10
- "clean": "rimraf dist build",
11
- "build:release": "node --loader ts-node/esm esbuild.config.ts -mode=production",
12
- "build:prebuild": "node --loader ts-node/esm esbuild.config.ts -mode=prebuild",
13
- "build:datatype": "tsc && tsc-alias",
14
- "build": "npm run clean && npm run lint-fix && npm run build:datatype && npm run build:release",
15
- "build:dev": "npm run clean && npm run lint-fix && npm run build:prebuild",
16
- "build:dev:watch": "npm run clean && npm run lint-fix && npm run build:datatype && node --loader ts-node/esm esbuild.config.ts -mode=devwatch",
17
- "demo": "npm run build:dev && node demo/index.cjs",
18
- "start": "node --loader ts-node/esm esbuild.config.ts -mode=development",
19
- "lint": "eslint src --ext ts",
20
- "lint-fix": "npm run lint -- --fix",
21
- "docs": "typedoc src/export.doc.ts --excludePrivate --excludeProtected --excludeInternal --exclude src/pathes/*"
22
- },
23
- "files": [
24
- "/dist"
25
- ],
26
- "repository": {
27
- "type": "git"
28
- },
29
- "author": "dxfview",
30
- "license": "UNLICENSED",
31
- "dependencies": {
32
- "@noble/ed25519": "^2.0.0",
33
- "@noble/hashes": "^1.4.0",
34
- "@types/concaveman": "^1.1.3",
35
- "@types/lodash": "^4.14.165",
36
- "@types/resize-observer-browser": "^0.1.7",
37
- "2d-polygon-boolean": "^1.0.1",
38
- "2d-polygon-self-intersections": "^1.3.1",
39
- "camera-controls": "^1.37.4",
40
- "clipper-lib": "^6.4.2",
41
- "concaveman": "^1.2.1",
42
- "core-js": "^3.27.1",
43
- "disable-devtool": "^0.3.9",
44
- "i18next": "^21.6.0",
45
- "intl-pluralrules": "^1.3.1",
46
- "javascript-obfuscator": "^4.1.1",
47
- "js-base64": "^3.7.2",
48
- "jsbi": "^4.3.0",
49
- "lodash": "^4.17.20",
50
- "loglevel": "^1.8.0",
51
- "mitt": "^3.0.0",
52
- "opentype.js": "^1.3.4",
53
- "poly-extrude": "^0.2.0",
54
- "polybooljs": "^1.2.0",
55
- "polygon-clipping": "^0.15.3",
56
- "regenerator-runtime": "^0.13.11",
57
- "screenfull": "^6.0.0",
58
- "stream": "^0.0.2",
59
- "three": "^0.155.0",
60
- "three-mesh-bvh": "^0.5.21"
61
- },
62
- "devDependencies": {
63
- "@fal-works/esbuild-plugin-global-externals": "^2.1.2",
64
- "@types/eslint": "^8.21.1",
65
- "@types/node": "^18.11.19",
66
- "@types/resize-observer-browser": "^0.1.7",
67
- "@types/sha256": "^0.2.0",
68
- "@types/three": "^0.155.0",
69
- "@typescript-eslint/eslint-plugin": "^5.0.0",
70
- "@typescript-eslint/parser": "^5.47.1",
71
- "esbuild": "^0.16.17",
72
- "esbuild-plugin-inline-worker": "^0.1.1",
73
- "esbuild-plugin-sass": "^1.0.1",
74
- "eslint": "^8.15.0",
75
- "eslint-config-prettier": "^8.5.0",
76
- "eslint-import-resolver-typescript": "^3.5.2",
77
- "eslint-plugin-import": "2.26.0",
78
- "eslint-plugin-prettier": "^4.2.1",
79
- "express": "^4.17.1",
80
- "live-server": "^1.2.2",
81
- "prettier": "^2.5.1",
82
- "rimraf": "^3.0.2",
83
- "sha256": "^0.2.0",
84
- "terser": "^5.16.2",
85
- "ts-node": "^10.9.1",
86
- "tsc-alias": "^1.8.2",
87
- "typedoc": "^0.22.12",
88
- "typescript": "^4.5.2"
89
- }
90
- }
1
+ {
2
+ "name": "dxfview",
3
+ "version": "0.0.5-beta",
4
+ "homepage": "",
5
+ "module": "dist/dxfview.esm.min.js",
6
+ "main": "dist/dxfview.esm.min.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "type": "module",
9
+ "scripts": {
10
+ "clean": "rimraf dist build",
11
+ "build:release": "node --loader ts-node/esm esbuild.config.ts -mode=production",
12
+ "build:prebuild": "node --loader ts-node/esm esbuild.config.ts -mode=prebuild",
13
+ "build:datatype": "tsc && tsc-alias",
14
+ "build": "npm run clean && npm run lint-fix && npm run build:datatype && npm run build:release",
15
+ "build:dev": "npm run clean && npm run lint-fix && npm run build:prebuild",
16
+ "build:dev:watch": "npm run clean && npm run lint-fix && npm run build:datatype && node --loader ts-node/esm esbuild.config.ts -mode=devwatch",
17
+ "demo": "npm run build:dev && node demo/index.cjs",
18
+ "start": "node --loader ts-node/esm esbuild.config.ts -mode=development",
19
+ "lint": "eslint src --ext ts",
20
+ "lint-fix": "npm run lint -- --fix",
21
+ "docs": "typedoc src/export.doc.ts --excludePrivate --excludeProtected --excludeInternal --exclude src/pathes/*"
22
+ },
23
+ "files": [
24
+ "/dist"
25
+ ],
26
+ "repository": {
27
+ "type": "git"
28
+ },
29
+ "author": "dxfview",
30
+ "license": "UNLICENSED",
31
+ "dependencies": {
32
+ "@noble/ed25519": "^2.0.0",
33
+ "@noble/hashes": "^1.4.0",
34
+ "@types/concaveman": "^1.1.3",
35
+ "@types/lodash": "^4.14.165",
36
+ "@types/resize-observer-browser": "^0.1.7",
37
+ "2d-polygon-boolean": "^1.0.1",
38
+ "2d-polygon-self-intersections": "^1.3.1",
39
+ "camera-controls": "^1.37.4",
40
+ "clipper-lib": "^6.4.2",
41
+ "concaveman": "^1.2.1",
42
+ "core-js": "^3.27.1",
43
+ "disable-devtool": "^0.3.9",
44
+ "i18next": "^21.6.0",
45
+ "intl-pluralrules": "^1.3.1",
46
+ "javascript-obfuscator": "^4.1.1",
47
+ "js-base64": "^3.7.2",
48
+ "jsbi": "^4.3.0",
49
+ "lodash": "^4.17.20",
50
+ "loglevel": "^1.8.0",
51
+ "mitt": "^3.0.0",
52
+ "opentype.js": "^1.3.4",
53
+ "poly-extrude": "^0.2.0",
54
+ "polybooljs": "^1.2.0",
55
+ "polygon-clipping": "^0.15.3",
56
+ "regenerator-runtime": "^0.13.11",
57
+ "screenfull": "^6.0.0",
58
+ "stream": "^0.0.2",
59
+ "three-mesh-bvh": "^0.5.21"
60
+ },
61
+ "devDependencies": {
62
+ "@fal-works/esbuild-plugin-global-externals": "^2.1.2",
63
+ "@types/eslint": "^8.21.1",
64
+ "@types/node": "^18.11.19",
65
+ "@types/resize-observer-browser": "^0.1.7",
66
+ "@types/sha256": "^0.2.0",
67
+ "@types/three": "^0.155.0",
68
+ "@typescript-eslint/eslint-plugin": "^5.0.0",
69
+ "@typescript-eslint/parser": "^5.47.1",
70
+ "esbuild": "^0.16.17",
71
+ "esbuild-plugin-inline-worker": "^0.1.1",
72
+ "esbuild-plugin-sass": "^1.0.1",
73
+ "eslint": "^8.15.0",
74
+ "eslint-config-prettier": "^8.5.0",
75
+ "eslint-import-resolver-typescript": "^3.5.2",
76
+ "eslint-plugin-import": "2.26.0",
77
+ "eslint-plugin-prettier": "^4.2.1",
78
+ "express": "^4.17.1",
79
+ "live-server": "^1.2.2",
80
+ "prettier": "^2.5.1",
81
+ "rimraf": "^3.0.2",
82
+ "sha256": "^0.2.0",
83
+ "terser": "^5.16.2",
84
+ "ts-node": "^10.9.1",
85
+ "tsc-alias": "^1.8.2",
86
+ "typedoc": "^0.22.12",
87
+ "typescript": "^4.5.2"
88
+ },
89
+ "peerDependencies": {
90
+ "three": ">=0.155.0 <0.170.0"
91
+ }
92
+ }