@buerli.io/react-cad 0.0.23 → 0.0.24-beta.0
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/build/index.cjs.js +5 -5
- package/build/index.js +1 -1
- package/package.json +7 -5
package/build/index.cjs.js
CHANGED
|
@@ -27,7 +27,7 @@ var guid = require('uuid');
|
|
|
27
27
|
var shallow = require('zustand/shallow');
|
|
28
28
|
var threeStdlib = require('three-stdlib');
|
|
29
29
|
var SelectImpl = require('antd/lib/select');
|
|
30
|
-
var
|
|
30
|
+
var pathBrowserify = require('path-browserify');
|
|
31
31
|
var reactUid = require('react-uid');
|
|
32
32
|
var deepmerge = require('deepmerge');
|
|
33
33
|
var reactSortableHoc = require('react-sortable-hoc');
|
|
@@ -15737,10 +15737,10 @@ function RootImpl$1({
|
|
|
15737
15737
|
const reader = new FileReader();
|
|
15738
15738
|
|
|
15739
15739
|
reader.onload = async () => {
|
|
15740
|
-
const fileName =
|
|
15740
|
+
const fileName = pathBrowserify.basename(file.name);
|
|
15741
15741
|
resolve({
|
|
15742
15742
|
result: reader.result,
|
|
15743
|
-
type:
|
|
15743
|
+
type: pathBrowserify.extname(file.name).replace('.', ''),
|
|
15744
15744
|
name: fileName.substr(0, fileName.lastIndexOf('.')) || fileName
|
|
15745
15745
|
});
|
|
15746
15746
|
};
|
|
@@ -16346,7 +16346,7 @@ const ImportModel = ({
|
|
|
16346
16346
|
file,
|
|
16347
16347
|
content
|
|
16348
16348
|
}) => {
|
|
16349
|
-
const type =
|
|
16349
|
+
const type = pathBrowserify.extname(file.name).replace('.', '');
|
|
16350
16350
|
classcad.ccAPI.assemblyBuilder.loadProduct(drawingId, content, type, file.name).catch();
|
|
16351
16351
|
});
|
|
16352
16352
|
}, undefined, true);
|
|
@@ -16555,7 +16555,7 @@ const load = (file, singleDrawingApp) => {
|
|
|
16555
16555
|
if (drawingId) {
|
|
16556
16556
|
try {
|
|
16557
16557
|
core.api.getState().api.setActiveDrawing(drawingId);
|
|
16558
|
-
const type =
|
|
16558
|
+
const type = pathBrowserify.extname(file.name).replace('.', '');
|
|
16559
16559
|
await classcad.ccAPI.baseModeler.load(drawingId, result, type, file.name);
|
|
16560
16560
|
|
|
16561
16561
|
if (oldDrawingId && singleDrawingApp) {
|
package/build/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import guid from 'uuid';
|
|
|
24
24
|
import shallow from 'zustand/shallow';
|
|
25
25
|
import { Geometry } from 'three-stdlib';
|
|
26
26
|
import SelectImpl from 'antd/lib/select';
|
|
27
|
-
import { basename, extname } from 'path';
|
|
27
|
+
import { basename, extname } from 'path-browserify';
|
|
28
28
|
import { useUID } from 'react-uid';
|
|
29
29
|
import * as deepmerge from 'deepmerge';
|
|
30
30
|
import { SortableContainer, SortableElement } from 'react-sortable-hoc';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buerli.io/react-cad",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24-beta.0",
|
|
4
4
|
"description": "buerli CAD components",
|
|
5
5
|
"author": "AWV Informatik AG <info@awv-informatik.ch>",
|
|
6
6
|
"repository": {},
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@babel/preset-react": "^7.14.5",
|
|
48
48
|
"@babel/preset-typescript": "^7.10.4",
|
|
49
49
|
"@buerli.io/icons": "^1.0.9",
|
|
50
|
-
"@react-three/drei": "^
|
|
50
|
+
"@react-three/drei": "^8.1.0",
|
|
51
51
|
"@react-three/fiber": "^7.0.19",
|
|
52
52
|
"@rollup/plugin-babel": "^5.3.0",
|
|
53
53
|
"@rollup/plugin-image": "^2.1.0",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"@testing-library/react-hooks": "^3.4.2",
|
|
58
58
|
"@types/jest": "^26.0.8",
|
|
59
59
|
"@types/node": "^11.13.8",
|
|
60
|
+
"@types/path-browserify": "^1.0.0",
|
|
60
61
|
"@types/react": "^16.9.55",
|
|
61
62
|
"@types/styled-components": "^4.1.16",
|
|
62
63
|
"@types/three": "^0.130.0",
|
|
@@ -89,15 +90,16 @@
|
|
|
89
90
|
"typescript": "4.1.2"
|
|
90
91
|
},
|
|
91
92
|
"peerDependencies": {
|
|
92
|
-
"@react-three/drei": "
|
|
93
|
+
"@react-three/drei": "^8.1.0",
|
|
93
94
|
"@react-three/fiber": ">= 7.0.17",
|
|
94
95
|
"three": ">=0.129"
|
|
95
96
|
},
|
|
96
97
|
"dependencies": {
|
|
97
98
|
"@ant-design/compatible": "^1.0.8",
|
|
98
|
-
"@buerli.io/classcad": "0.0.
|
|
99
|
-
"@buerli.io/react": "0.0.
|
|
99
|
+
"@buerli.io/classcad": "0.0.36-beta.0",
|
|
100
|
+
"@buerli.io/react": "0.0.36-beta.0",
|
|
100
101
|
"antd": "^4.15.3",
|
|
102
|
+
"path-browserify": "^1.0.1",
|
|
101
103
|
"react": "^17.0.2",
|
|
102
104
|
"react-colorful": "^5.3.0",
|
|
103
105
|
"react-movable": "^2.3.0",
|