@buerli.io/react-cad 0.4.1 → 0.5.0-beta.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/build/components/UI/CAD/Messages/msgStore.d.ts +1 -1
- package/build/components/UI/CAD/ModelTree/ModelTreeHeader.d.ts +2 -1
- package/build/components/UI/CAD/ToolBar/ToolBar.d.ts +1 -0
- package/build/components/UI/CAD/common/LoadingScreen/LoadingScreen.d.ts +1 -0
- package/build/components/UI/CAD/common/NameEdit.d.ts +1 -0
- package/build/components/UI/CAD/common/SectionHeader.d.ts +3 -1
- package/build/components/UI/CAD/store/CADStore.d.ts +2 -3
- package/build/components/UI/editors/ExpressionEditor/ExpressionEditor.d.ts +3 -5
- package/build/components/UI/editors/ExpressionEditor/index.d.ts +0 -3
- package/build/components/UI/editors/ExpressionEditor/useExpressionsParam.d.ts +2 -2
- package/build/components/UI/editors/NumberEditor/NumOrExpr.d.ts +1 -1
- package/build/components/UI/editors/NumberEditor/NumberEditor.d.ts +1 -1
- package/build/components/UI/editors/RefsEditors/MateEditor.d.ts +2 -2
- package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +1 -0
- package/build/components/UI/editors/RefsEditors/RefsEditor.d.ts +1 -0
- package/build/components/UI/editors/RefsEditors/index.d.ts +1 -0
- package/build/components/UI/editors/RefsEditors/useMateParam.d.ts +7 -2
- package/build/components/UI/editors/RefsEditors/useModes.d.ts +7 -0
- package/build/components/UI/editors/Wrapper.d.ts +2 -0
- package/build/components/graphics/HUD.d.ts +3 -1
- package/build/components/graphics/utils/MatePathTransform.d.ts +1 -0
- package/build/components/utils/CompValidation/ErrorBoundary.d.ts +1 -0
- package/build/components/utils/CompValidation/validators/CSysDisplayValidator.d.ts +1 -0
- package/build/components/utils/CompValidation/validators/DrawingValidator.d.ts +1 -0
- package/build/components/utils/CompValidation/validators/ExpressionsValidator.d.ts +1 -0
- package/build/components/utils/CompValidation/validators/FPluginValidator.d.ts +1 -0
- package/build/components/utils/CompValidation/validators/FeatureListValidator.d.ts +1 -0
- package/build/components/utils/CompValidation/validators/ProductManagementValidator.d.ts +1 -0
- package/build/index.cjs.js +2624 -2851
- package/build/index.d.ts +2 -1
- package/build/index.js +2628 -2854
- package/build/plugins/HLConstraints/components/Limits.d.ts +1 -1
- package/build/plugins/HLConstraints/validators.d.ts +1 -1
- package/build/plugins/Sketch/Root/Constraints/constraintsHelpers.d.ts +17 -6
- package/build/plugins/Sketch/Root/CopyPatterns.d.ts +1 -3
- package/build/plugins/Sketch/Root/Handlers.d.ts +1 -0
- package/build/plugins/Sketch/Root/Regions.d.ts +2 -0
- package/build/plugins/Sketch/Root/SketchGroup.d.ts +8 -0
- package/build/plugins/Sketch/Root/useLayoutSize.d.ts +11 -0
- package/build/plugins/Sketch/View/graphics/Merged/Arc.d.ts +1 -1
- package/build/plugins/Sketch/View/graphics/Merged/MergedWrapper.d.ts +3 -1
- package/build/plugins/Sketch/View/graphics/MousePosition.d.ts +2 -0
- package/build/plugins/Sketch/View/graphics/hooks.d.ts +2 -2
- package/build/plugins/Sketch/View/graphics/scale.d.ts +1 -1
- package/build/plugins/Sketch/types.d.ts +1 -0
- package/build/utils/FileUtils.d.ts +2 -2
- package/build/utils/useRetainVisibility.d.ts +2 -0
- package/build/utils/useScale.d.ts +1 -1
- package/build/utils/validation.d.ts +1 -1
- package/package.json +26 -25
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
3
3
|
import { MemberParam } from '../../../types';
|
|
4
|
-
|
|
4
|
+
import { LimitsParam } from '@buerli.io/classcad';
|
|
5
5
|
export declare function useLimitsParam(drawingId: DrawingID, objId: ObjectID, memberName: string, options?: {
|
|
6
6
|
angle?: boolean;
|
|
7
7
|
forceNoLimits?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { LimitsParam } from '
|
|
1
|
+
import { LimitsParam } from '@buerli.io/classcad';
|
|
2
2
|
export declare function validateLimits(limits: LimitsParam, name: string): string[];
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { IStructureTree } from '@buerli.io/core';
|
|
1
|
+
import { IStructureObject, IStructureTree, ObjectID } from '@buerli.io/core';
|
|
2
|
+
declare type GeometryChecker = {
|
|
3
|
+
type: string;
|
|
4
|
+
check: (object: IStructureObject) => number | number[];
|
|
5
|
+
};
|
|
6
|
+
declare type ConstraintGeometryCombination = {
|
|
7
|
+
entityAdapter: (entities: ObjectID[]) => ObjectID[][];
|
|
8
|
+
input: GeometryChecker[];
|
|
9
|
+
};
|
|
10
|
+
declare function createHelper(type: string, name: string, ...constraintGeometryCombinations: ConstraintGeometryCombination[]): {
|
|
11
|
+
type: string;
|
|
12
|
+
name: string;
|
|
13
|
+
adapt(entities: ObjectID[], tree: IStructureTree): number[][] | undefined;
|
|
14
|
+
getTooltip(): string[];
|
|
15
|
+
};
|
|
2
16
|
export declare const constraintsHelpers: {
|
|
3
|
-
[key: string]:
|
|
4
|
-
type: string;
|
|
5
|
-
name: string;
|
|
6
|
-
adapt: (entities: number[], tree: IStructureTree) => number[][] | undefined;
|
|
7
|
-
};
|
|
17
|
+
[key: string]: ReturnType<typeof createHelper>;
|
|
8
18
|
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param ref reference to a div element; Its size will be used for calculations
|
|
5
|
+
* @returns object containing width, proposed side padding and margin for icons
|
|
6
|
+
*/
|
|
7
|
+
export declare const useLayoutSize: (ref: React.MutableRefObject<HTMLDivElement>) => {
|
|
8
|
+
width: number;
|
|
9
|
+
sidePadding: number;
|
|
10
|
+
iconMargin: number;
|
|
11
|
+
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import * as THREE from 'three';
|
|
3
3
|
import { DrawingID, PluginID } from '@buerli.io/core';
|
|
4
4
|
import { commonProps } from '../primitives';
|
|
5
|
-
export declare const useTubeRadius: (drawingId: DrawingID, pluginId: PluginID, scalePlus?: boolean
|
|
5
|
+
export declare const useTubeRadius: (drawingId: DrawingID, pluginId: PluginID, scalePlus?: boolean) => number;
|
|
6
6
|
export declare const Arc: React.FC<{
|
|
7
7
|
start: THREE.Vector3;
|
|
8
8
|
end: THREE.Vector3;
|
|
@@ -18,5 +18,7 @@ export declare const MeshContext: React.Context<{
|
|
|
18
18
|
* Merged component from drei takes globaly created meshes and then passes corresponding "mocked" components via function props (MockCylinder and MockSphere) to children.
|
|
19
19
|
* "mocked" components are used for saying drei where to draw instances.
|
|
20
20
|
*/
|
|
21
|
-
export declare const MergedWrapper: React.FC
|
|
21
|
+
export declare const MergedWrapper: React.FC<{
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}>;
|
|
22
24
|
export {};
|
|
@@ -19,7 +19,7 @@ export declare const getColor: (object: IStructureObject, objState: ObjState) =>
|
|
|
19
19
|
* @param objId
|
|
20
20
|
* @returns
|
|
21
21
|
*/
|
|
22
|
-
export declare const useSketchHandlers: (objId: ObjectID) => Record<string, (e:
|
|
22
|
+
export declare const useSketchHandlers: (objId: ObjectID) => Record<string, (e: import("@react-three/fiber").ThreeEvent<PointerEvent> & import("../../types").PointerEventsT) => void> | undefined;
|
|
23
23
|
export declare const useColor: (objId: ObjectID, gHovered: boolean) => number;
|
|
24
24
|
export declare const useUserData: (objId: ObjectID) => {
|
|
25
25
|
objId: number;
|
|
@@ -29,7 +29,7 @@ export declare const useUserData: (objId: ObjectID) => {
|
|
|
29
29
|
onHUD?: undefined;
|
|
30
30
|
};
|
|
31
31
|
export declare const useHandlersAndColor: (drawingId: DrawingID, objId: ObjectID) => {
|
|
32
|
-
handlers:
|
|
32
|
+
handlers: {};
|
|
33
33
|
color: number;
|
|
34
34
|
};
|
|
35
35
|
export {};
|
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import { DrawingID, PluginID } from '@buerli.io/core';
|
|
3
3
|
export declare function setScale(drawingId: DrawingID, pluginId: PluginID, newScale: number): void;
|
|
4
4
|
export declare function getScale(drawingId: DrawingID, pluginId: PluginID): number;
|
|
5
|
-
export declare function useScale(drawingId: DrawingID, pluginId: PluginID, getVector?: (sf: number) => [number, number, number]): React.
|
|
5
|
+
export declare function useScale<T extends THREE.Object3D>(drawingId: DrawingID, pluginId: PluginID, getVector?: (sf: number) => [number, number, number]): React.RefObject<T>;
|
|
@@ -13,6 +13,6 @@ export declare const FileUtils: {
|
|
|
13
13
|
loadFile: (onLoad: (files: {
|
|
14
14
|
file: File;
|
|
15
15
|
content: any;
|
|
16
|
-
}[]) => void, type?:
|
|
17
|
-
exportNode: (drawingId: DrawingID, objectId: ObjectID, type?: '
|
|
16
|
+
}[]) => void, type?: 'DataURL' | 'ArrayBuffer' | 'BinaryString' | 'Text', multiple?: boolean) => void;
|
|
17
|
+
exportNode: (drawingId: DrawingID, objectId: ObjectID, type?: 'ofb' | 'stp' | 'step' | 'stl') => Promise<void>;
|
|
18
18
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare function useScale(position: THREE.Vector3, getVector?: (sf: number) => [number, number, number]): React.
|
|
2
|
+
export declare function useScale<T extends THREE.Object3D>(position: THREE.Vector3, getVector?: (sf: number) => [number, number, number]): React.RefObject<T>;
|
|
@@ -9,4 +9,4 @@ export declare function acceptableRange(min: {
|
|
|
9
9
|
} | undefined, max: {
|
|
10
10
|
value: number;
|
|
11
11
|
isInclusive: boolean;
|
|
12
|
-
} | undefined): (numParam: APIParam<number>, paramName?: string
|
|
12
|
+
} | undefined): (numParam: APIParam<number>, paramName?: string) => string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buerli.io/react-cad",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0-beta.2",
|
|
4
4
|
"description": "buerli CAD components",
|
|
5
5
|
"author": "AWV Informatik AG <info@awv-informatik.ch>",
|
|
6
6
|
"repository": {},
|
|
@@ -41,26 +41,25 @@
|
|
|
41
41
|
},
|
|
42
42
|
"license": "ISC",
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@ant-design/icons": "^4.
|
|
44
|
+
"@ant-design/icons": "^4.7.0",
|
|
45
45
|
"@babel/plugin-transform-runtime": "^7.15.0",
|
|
46
46
|
"@babel/preset-env": "^7.15.0",
|
|
47
47
|
"@babel/preset-react": "^7.14.5",
|
|
48
48
|
"@babel/preset-typescript": "^7.10.4",
|
|
49
49
|
"@buerli.io/icons": "^1.0.10",
|
|
50
|
-
"@react-three/drei": "
|
|
51
|
-
"@react-three/fiber": "7.
|
|
50
|
+
"@react-three/drei": "9.34.1",
|
|
51
|
+
"@react-three/fiber": "8.7.1",
|
|
52
52
|
"@rollup/plugin-babel": "^5.3.0",
|
|
53
53
|
"@rollup/plugin-image": "^2.1.0",
|
|
54
54
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
55
55
|
"@testing-library/jest-dom": "^5.11.5",
|
|
56
|
-
"@testing-library/react": "^
|
|
57
|
-
"@
|
|
58
|
-
"@types/jest": "^26.0.8",
|
|
56
|
+
"@testing-library/react": "^13.4.0",
|
|
57
|
+
"@types/jest": "^29.1.2",
|
|
59
58
|
"@types/node": "^11.13.8",
|
|
60
59
|
"@types/path-browserify": "^1.0.0",
|
|
61
|
-
"@types/react": "
|
|
62
|
-
"@types/styled-components": "^
|
|
63
|
-
"@types/three": "^0.
|
|
60
|
+
"@types/react": "18.0.0",
|
|
61
|
+
"@types/styled-components": "^5.1.14",
|
|
62
|
+
"@types/three": "^0.143",
|
|
64
63
|
"@types/uuid": "^3.4.5",
|
|
65
64
|
"@typescript-eslint/eslint-plugin": "4.13.0",
|
|
66
65
|
"@typescript-eslint/parser": "4.13.0",
|
|
@@ -74,41 +73,43 @@
|
|
|
74
73
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
75
74
|
"husky": "4.3.7",
|
|
76
75
|
"immer": "^7.0.7",
|
|
77
|
-
"jest": "^
|
|
76
|
+
"jest": "^29.1.2",
|
|
77
|
+
"jest-environment-jsdom": "^29.1.2",
|
|
78
78
|
"lint-staged": "10.5.3",
|
|
79
79
|
"postcss": "^8.2.14",
|
|
80
80
|
"prettier": "^2.2.1",
|
|
81
|
-
"react": "
|
|
82
|
-
"react-dom": "
|
|
81
|
+
"react": "18.0.0",
|
|
82
|
+
"react-dom": "18.0.0",
|
|
83
83
|
"react-test-renderer": "^16.13.1",
|
|
84
84
|
"rimraf": "^2.6.3",
|
|
85
85
|
"rollup": "^2.56.2",
|
|
86
86
|
"rollup-plugin-postcss": "^4.0.1",
|
|
87
87
|
"rollup-plugin-size-snapshot": "^0.12.0",
|
|
88
88
|
"rollup-plugin-terser": "^7.0.2",
|
|
89
|
-
"three": "^0.
|
|
90
|
-
"typescript": "4.4
|
|
89
|
+
"three": "^0.143",
|
|
90
|
+
"typescript": "4.8.4"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
|
-
"@react-three/drei": ">=
|
|
94
|
-
"@react-three/fiber": ">=7.
|
|
95
|
-
"three": ">=0.
|
|
96
|
-
"react": ">=
|
|
93
|
+
"@react-three/drei": ">=9.34.1",
|
|
94
|
+
"@react-three/fiber": ">=8.7.1",
|
|
95
|
+
"three": ">=0.143",
|
|
96
|
+
"react": ">=18.0"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"@ant-design/compatible": "^1.0.8",
|
|
100
|
-
"@buerli.io/classcad": "0.
|
|
101
|
-
"@buerli.io/react": "0.
|
|
102
|
-
"@react-three/postprocessing": "2.
|
|
103
|
-
"antd": "
|
|
100
|
+
"@buerli.io/classcad": "0.5.0-beta.2",
|
|
101
|
+
"@buerli.io/react": "0.5.0-beta.2",
|
|
102
|
+
"@react-three/postprocessing": "2.6.2",
|
|
103
|
+
"antd": "^4.23.4",
|
|
104
104
|
"path-browserify": "^1.0.1",
|
|
105
|
+
"postprocessing": "6.28.5",
|
|
105
106
|
"react-colorful": "^5.3.0",
|
|
106
107
|
"react-movable": "^2.3.0",
|
|
107
108
|
"react-sortable-hoc": "^2.0.0",
|
|
108
109
|
"react-uid": "^2.3.1",
|
|
109
|
-
"styled-components": "^
|
|
110
|
+
"styled-components": "^5.3.1",
|
|
110
111
|
"three-rounded-box": "^0.1.1",
|
|
111
112
|
"uuid": "^3.3.2",
|
|
112
|
-
"zustand": "^
|
|
113
|
+
"zustand": "^4.1.4"
|
|
113
114
|
}
|
|
114
115
|
}
|