@bimdata/viewer 2.0.0-beta.7 → 2.0.0-beta.71
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/dist/bimdata-viewer.esm.min.js +70 -78
- package/package.json +42 -43
- package/types/api.d.ts +19 -19
- package/types/local-context.d.ts +20 -3
- package/types/plugins.d.ts +4 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bimdata/viewer",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.71",
|
|
5
5
|
"description": "A customizable BIM viewer.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"bim",
|
|
@@ -20,9 +20,8 @@
|
|
|
20
20
|
"last 2 chrome version",
|
|
21
21
|
"last 2 firefox version"
|
|
22
22
|
],
|
|
23
|
-
"main": "dist/bimdata-viewer.min.js",
|
|
23
|
+
"main": "dist/bimdata-viewer.esm.min.js",
|
|
24
24
|
"module": "dist/bimdata-viewer.esm.min.js",
|
|
25
|
-
"unpkg": "dist/bimdata-viewer.min.js",
|
|
26
25
|
"scripts": {
|
|
27
26
|
"build": "vite build && npm exec terser -- -c -m --module dist/bimdata-viewer.js > dist/bimdata-viewer.esm.min.js && rm dist/bimdata-viewer.js",
|
|
28
27
|
"cy:run": "cypress run",
|
|
@@ -49,61 +48,61 @@
|
|
|
49
48
|
"index.d.ts"
|
|
50
49
|
],
|
|
51
50
|
"devDependencies": {
|
|
52
|
-
"@babel/preset-env": "^7.
|
|
51
|
+
"@babel/preset-env": "^7.22.20",
|
|
53
52
|
"@bimdata/2d-engine": "2.4.0",
|
|
54
53
|
"@bimdata/areas-next": "0.1.13",
|
|
55
|
-
"@bimdata/bcf-components": "
|
|
56
|
-
"@bimdata/building-maker": "
|
|
57
|
-
"@bimdata/
|
|
58
|
-
"@bimdata/design-system": "2.
|
|
59
|
-
"@bimdata/typescript-fetch-api-client": "9.
|
|
54
|
+
"@bimdata/bcf-components": "6.1.0",
|
|
55
|
+
"@bimdata/building-maker": "3.0.3",
|
|
56
|
+
"@bimdata/components": "1.3.1",
|
|
57
|
+
"@bimdata/design-system": "2.1.0-rc.7",
|
|
58
|
+
"@bimdata/typescript-fetch-api-client": "9.16.0",
|
|
60
59
|
"@rollup/plugin-alias": "5.0.0",
|
|
61
60
|
"@rollup/plugin-babel": "^6.0.3",
|
|
62
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
61
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
|
63
62
|
"@rollup/plugin-image": "^3.0.2",
|
|
63
|
+
"@rollup/plugin-replace": "^5.0.2",
|
|
64
64
|
"@semantic-release/changelog": "^6.0.3",
|
|
65
|
-
"@semantic-release/commit-analyzer": "^
|
|
65
|
+
"@semantic-release/commit-analyzer": "^11.0.0",
|
|
66
66
|
"@semantic-release/git": "^10.0.1",
|
|
67
|
-
"@semantic-release/github": "^
|
|
68
|
-
"@semantic-release/npm": "^
|
|
69
|
-
"@semantic-release/release-notes-generator": "^
|
|
70
|
-
"@vitejs/plugin-vue": "4.
|
|
71
|
-
"@vue/vue3-jest": "29.2.
|
|
72
|
-
"@xeokit/xeokit-sdk": "git+https://git@github.com/Amoki/xeokit-sdk.git#
|
|
67
|
+
"@semantic-release/github": "^9.2.1",
|
|
68
|
+
"@semantic-release/npm": "^11.0.0",
|
|
69
|
+
"@semantic-release/release-notes-generator": "^12.0.0",
|
|
70
|
+
"@vitejs/plugin-vue": "4.3.4",
|
|
71
|
+
"@vue/vue3-jest": "29.2.6",
|
|
72
|
+
"@xeokit/xeokit-sdk": "git+https://git@github.com/Amoki/xeokit-sdk.git#369bb4876e529995cd4c192bc7fda5e957f9634f",
|
|
73
73
|
"async": "^3.2.4",
|
|
74
|
-
"autoprefixer": "^10.4.
|
|
74
|
+
"autoprefixer": "^10.4.16",
|
|
75
75
|
"babel-core": "^7.0.0-bridge.0",
|
|
76
|
-
"babel-jest": "^29.
|
|
77
|
-
"conventional-changelog-eslint": "^
|
|
78
|
-
"cypress": "
|
|
79
|
-
"eslint": "^8.
|
|
80
|
-
"eslint-config-prettier": "^
|
|
81
|
-
"eslint-plugin-cypress": "^2.
|
|
82
|
-
"eslint-plugin-jest": "^27.2
|
|
83
|
-
"eslint-plugin-prettier": "^
|
|
84
|
-
"eslint-plugin-vue": "^9.
|
|
76
|
+
"babel-jest": "^29.7.0",
|
|
77
|
+
"conventional-changelog-eslint": "^5.0.0",
|
|
78
|
+
"cypress": "13.3.0",
|
|
79
|
+
"eslint": "^8.50.0",
|
|
80
|
+
"eslint-config-prettier": "^9.0.0",
|
|
81
|
+
"eslint-plugin-cypress": "^2.15.1",
|
|
82
|
+
"eslint-plugin-jest": "^27.4.2",
|
|
83
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
84
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
85
85
|
"form-data": "^4.0.0",
|
|
86
86
|
"html2canvas": "1.4.1",
|
|
87
87
|
"http-server": "^14.1.1",
|
|
88
|
-
"jest": "^29.
|
|
89
|
-
"jest-environment-jsdom": "^29.
|
|
90
|
-
"jest-extended": "^
|
|
88
|
+
"jest": "^29.7.0",
|
|
89
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
90
|
+
"jest-extended": "^4.0.1",
|
|
91
91
|
"jspdf": "^2.5.1",
|
|
92
92
|
"lodash": "^4.17.21",
|
|
93
|
-
"node-fetch": "^3.3.
|
|
94
|
-
"postcss": "^8.4.
|
|
95
|
-
"prettier": "^
|
|
93
|
+
"node-fetch": "^3.3.2",
|
|
94
|
+
"postcss": "^8.4.31",
|
|
95
|
+
"prettier": "^3.0.3",
|
|
96
96
|
"querystring": "^0.2.0",
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"vite": "
|
|
104
|
-
"vite-plugin-css-injected-by-js": "3.1.1",
|
|
97
|
+
"sass": "^1.68.0",
|
|
98
|
+
"semantic-release": "^22.0.5",
|
|
99
|
+
"sinon": "^16.0.0",
|
|
100
|
+
"start-server-and-test": "2.0.1",
|
|
101
|
+
"terser": "^5.20.0",
|
|
102
|
+
"vite": "4.4.9",
|
|
103
|
+
"vite-plugin-css-injected-by-js": "3.3.0",
|
|
105
104
|
"vue": "3.3.4",
|
|
106
|
-
"vue-eslint-parser": "^9.3.
|
|
107
|
-
"vue-i18n": "^9.
|
|
105
|
+
"vue-eslint-parser": "^9.3.1",
|
|
106
|
+
"vue-i18n": "^9.5.0"
|
|
108
107
|
}
|
|
109
108
|
}
|
package/types/api.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ declare namespace BDV {
|
|
|
57
57
|
model: StateModel;
|
|
58
58
|
parent: StateObject;
|
|
59
59
|
children: ApiObject[];
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
/** @deprecated use `model` instead */
|
|
62
62
|
ifc: StateModel;
|
|
63
63
|
}
|
|
@@ -77,25 +77,25 @@ declare namespace BDV {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
interface Permissions {
|
|
80
|
-
hasAdminPermission: boolean
|
|
81
|
-
hasBcfReadPermission: boolean
|
|
82
|
-
hasBcfWritePermission: boolean
|
|
83
|
-
hasDocReadPermission: boolean
|
|
84
|
-
hasDocWritePermission: boolean
|
|
85
|
-
hasModelReadPermission: boolean
|
|
86
|
-
hasModelWritePermission: boolean
|
|
87
|
-
hasReadPermission: boolean
|
|
88
|
-
hasWritePermission: boolean
|
|
89
|
-
userRole: string
|
|
80
|
+
hasAdminPermission: boolean;
|
|
81
|
+
hasBcfReadPermission: boolean;
|
|
82
|
+
hasBcfWritePermission: boolean;
|
|
83
|
+
hasDocReadPermission: boolean;
|
|
84
|
+
hasDocWritePermission: boolean;
|
|
85
|
+
hasModelReadPermission: boolean;
|
|
86
|
+
hasModelWritePermission: boolean;
|
|
87
|
+
hasReadPermission: boolean;
|
|
88
|
+
hasWritePermission: boolean;
|
|
89
|
+
userRole: string;
|
|
90
90
|
tokenScopes: {
|
|
91
|
-
bcf?: string[]
|
|
92
|
-
model?: string[]
|
|
93
|
-
document?: string[]
|
|
94
|
-
}
|
|
91
|
+
bcf?: string[];
|
|
92
|
+
model?: string[];
|
|
93
|
+
document?: string[];
|
|
94
|
+
};
|
|
95
95
|
usableScopes: {
|
|
96
|
-
bcf?: string[]
|
|
97
|
-
model?: string[]
|
|
98
|
-
document?: string[]
|
|
99
|
-
}
|
|
96
|
+
bcf?: string[];
|
|
97
|
+
model?: string[];
|
|
98
|
+
document?: string[];
|
|
99
|
+
};
|
|
100
100
|
}
|
|
101
101
|
}
|
package/types/local-context.d.ts
CHANGED
|
@@ -2,17 +2,31 @@ declare namespace BDV {
|
|
|
2
2
|
interface LocalContext {
|
|
3
3
|
hub: EventHandler<LocalContextEvents>;
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
id: number;
|
|
6
6
|
el: Element;
|
|
7
7
|
width: number;
|
|
8
8
|
height: number;
|
|
9
|
+
resolution: number;
|
|
9
10
|
|
|
11
|
+
// Local state
|
|
12
|
+
loadedModels: StateModel[];
|
|
13
|
+
loadedModelIds: number[];
|
|
14
|
+
loadingModelIds: number[];
|
|
15
|
+
modelTypes: string[];
|
|
16
|
+
multiModel: boolean;
|
|
17
|
+
loadModels(ids: number[]): Promise<boolean>;
|
|
18
|
+
unloadModels(ids: number[]): boolean;
|
|
19
|
+
toggleModel(id: number): Promise<boolean>;
|
|
20
|
+
|
|
21
|
+
// Window
|
|
22
|
+
loadWindow(windowName: string): void;
|
|
23
|
+
window: Window;
|
|
24
|
+
|
|
25
|
+
// Plugin
|
|
10
26
|
/** @deprecated */
|
|
11
27
|
getPlugin(name: string): Plugin;
|
|
12
28
|
plugins: Map<string, Plugin>;
|
|
13
29
|
|
|
14
|
-
// ---
|
|
15
|
-
|
|
16
30
|
loading: boolean;
|
|
17
31
|
loadingProcessStart(): void;
|
|
18
32
|
loadingProcessEnd(): void;
|
|
@@ -27,6 +41,9 @@ declare namespace BDV {
|
|
|
27
41
|
}
|
|
28
42
|
|
|
29
43
|
type LocalContextEvents = {
|
|
44
|
+
"models-loaded": { models: StateModel[] };
|
|
45
|
+
"models-unloaded": { models: StateModel[] };
|
|
46
|
+
"models-loading": { ids: number[] };
|
|
30
47
|
"3d-model-loaded": {
|
|
31
48
|
model: StateModel;
|
|
32
49
|
plugin: ViewerIfc3D.Plugin;
|
package/types/plugins.d.ts
CHANGED
|
@@ -42,16 +42,16 @@ declare namespace BDV {
|
|
|
42
42
|
loadModels: (models: StateModel[]) => Promise<void>;
|
|
43
43
|
unloadModels: (models: StateModel[]) => Promise<void>;
|
|
44
44
|
|
|
45
|
-
getViewpoint: () => void | Promise<void>;
|
|
45
|
+
getViewpoint: (options: any) => void | Promise<void>;
|
|
46
46
|
setViewpoint: (viewpoint: any, options?: any) => void | Promise<void>;
|
|
47
47
|
|
|
48
48
|
annotationMode: boolean;
|
|
49
49
|
startAnnotationMode: (callback: AnnotationCallback) => void;
|
|
50
50
|
stopAnnotationMode: () => void;
|
|
51
51
|
|
|
52
|
-
fitView: (
|
|
53
|
-
showUI: () => void;
|
|
54
|
-
hideUI: (options
|
|
52
|
+
fitView: (options?: any) => void;
|
|
53
|
+
showUI: (options?: any) => void;
|
|
54
|
+
hideUI: (options?: { exceptions: string[] }) => Promise<void>;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
interface PluginManager {
|