@buerli.io/react-cad 0.2.1-beta.1 → 0.3.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/components/UI/CAD/Drawing.d.ts +1 -22
- package/build/components/UI/CAD/ViewOptionsBar/useOptionCommands.d.ts +1 -0
- package/build/components/UI/CAD/index.d.ts +0 -1
- package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +1 -0
- package/build/components/graphics/CSysDisplay.d.ts +1 -0
- package/build/components/graphics/HoveredConstraintDisplay.d.ts +1 -2
- package/build/components/graphics/Outlines/IDPass.d.ts +11 -0
- package/build/components/graphics/Outlines/Outline.d.ts +25 -0
- package/build/components/graphics/Outlines/OutlineEffect.d.ts +32 -0
- package/build/components/graphics/Outlines/OutlineMaterial.d.ts +7 -0
- package/build/components/graphics/SelectedMateObj.d.ts +12 -0
- package/build/components/graphics/WorkAxisObj.d.ts +10 -0
- package/build/components/graphics/WorkCoordSystemObj.d.ts +10 -0
- package/build/components/graphics/WorkPlaneObj.d.ts +10 -0
- package/build/components/graphics/WorkPointObj.d.ts +10 -0
- package/build/components/graphics/graphics.d.ts +7 -7
- package/build/components/graphics/utils/MatePathTransform.d.ts +9 -0
- package/build/components/graphics/utils/useCsysMatrix.d.ts +4 -0
- package/build/components/utils/CompValidation/ErrorBoundary.d.ts +1 -1
- package/build/index.cjs.js +1351 -679
- package/build/index.d.ts +9 -1
- package/build/index.js +1304 -639
- package/build/plugins/BoundingBoxInfo/Root.d.ts +1 -0
- package/build/plugins/BoundingBoxInfo/View.d.ts +1 -0
- package/build/plugins/Dimensions/index.d.ts +6 -6
- package/build/plugins/Sketch/View/graphics/hooks.d.ts +4 -0
- package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +0 -1
- package/build/utils/getMateRefIds.d.ts +2 -0
- package/build/utils/helpers.d.ts +3 -3
- package/build/utils/selection/filters.d.ts +0 -10
- package/package.json +15 -14
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ObjectID } from '@buerli.io/core';
|
|
2
|
+
import { PluginDescription, ObjectID } from '@buerli.io/core';
|
|
3
3
|
export { useDimensionSetId } from './utils';
|
|
4
4
|
export declare type DimensionsPState = {
|
|
5
5
|
selected: ObjectID[];
|
|
6
6
|
};
|
|
7
7
|
declare const Plugin: {
|
|
8
8
|
Root: import("react").FC<{
|
|
9
|
-
drawingId:
|
|
10
|
-
pluginId:
|
|
9
|
+
drawingId: import("@buerli.io/core/build/store/states/drawing").DrawingID;
|
|
10
|
+
pluginId: import("@buerli.io/core/build/store/states/plugin").PluginID;
|
|
11
11
|
}>;
|
|
12
12
|
View: import("react").FC<{
|
|
13
|
-
drawingId:
|
|
14
|
-
pluginId:
|
|
13
|
+
drawingId: import("@buerli.io/core/build/store/states/drawing").DrawingID;
|
|
14
|
+
pluginId: import("@buerli.io/core/build/store/states/plugin").PluginID;
|
|
15
15
|
}>;
|
|
16
|
-
description:
|
|
16
|
+
description: PluginDescription<any>;
|
|
17
17
|
};
|
|
18
18
|
export { Plugin };
|
|
@@ -23,6 +23,10 @@ export declare const useSketchHandlers: (objId: ObjectID) => Record<string, (e:
|
|
|
23
23
|
export declare const useColor: (objId: ObjectID, gHovered: boolean) => number;
|
|
24
24
|
export declare const useUserData: (objId: ObjectID) => {
|
|
25
25
|
objId: number;
|
|
26
|
+
onHUD: true;
|
|
27
|
+
} | {
|
|
28
|
+
objId: number;
|
|
29
|
+
onHUD?: undefined;
|
|
26
30
|
};
|
|
27
31
|
export declare const useHandlersAndColor: (drawingId: DrawingID, objId: ObjectID) => {
|
|
28
32
|
handlers: Record<string, (e: PointerEvent & import("@react-three/fiber/dist/declarations/src/core/events").IntesectionEvent<PointerEvent> & import("../../types").PointerEventsT) => void>;
|
package/build/utils/helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CCClasses } from '@buerli.io/classcad';
|
|
2
|
-
import { DrawingID, GeometryElement, GraphicID, IStructureObject, IStructureTree, MemberType, ObjectID, PointMem, PointMemValue, SelectedItem } from '@buerli.io/core';
|
|
2
|
+
import { DrawingID, GeometryElement, GraphicID, IStructureObject, IStructureTree, MemberType, ObjectID, PointMem, PointMemValue, SelectedItem, ContainerGeometryT } from '@buerli.io/core';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
4
|
export declare function membersValues(drawingId: DrawingID, ccObjId: DrawingID): any;
|
|
5
5
|
export declare function addMembers(drawingId: DrawingID, ccObjId: DrawingID): {
|
|
@@ -10,7 +10,7 @@ export declare function addMembers(drawingId: DrawingID, ccObjId: DrawingID): {
|
|
|
10
10
|
export declare function useGlobalToLocalMatrix(drawingId: DrawingID, objId: ObjectID | undefined): THREE.Matrix4;
|
|
11
11
|
export declare function getGlobalToLocalMatrix(drawingId: DrawingID, objId: ObjectID): THREE.Matrix4;
|
|
12
12
|
export declare function setReference(index: number, state: any, set: any): (selected: SelectedItem[]) => void;
|
|
13
|
-
export declare function convertToVector(point: PointMem): THREE.Vector3;
|
|
13
|
+
export declare function convertToVector(point: PointMem | undefined): THREE.Vector3;
|
|
14
14
|
export declare function convertToArray(point: PointMem): number[];
|
|
15
15
|
export declare function linesIntersection(point1: THREE.Vector3, dir1: THREE.Vector3, point2: THREE.Vector3, dir2: THREE.Vector3): THREE.Vector3 | null;
|
|
16
16
|
export declare const angleVecVec: (a: THREE.Vector3, b: THREE.Vector3) => number;
|
|
@@ -24,7 +24,7 @@ export declare const radiansToDegrees: (radians: number) => number;
|
|
|
24
24
|
export declare const getPointOnPlane: (unprojectedPoint: THREE.Vector3, camera: THREE.Camera, globalToLocalM: THREE.Matrix4) => THREE.Vector3;
|
|
25
25
|
export declare const closestAngle: (value: number, to: number) => number;
|
|
26
26
|
export declare const stringifyValue: (value: string | number | PointMemValue, type: MemberType) => string;
|
|
27
|
-
export declare function findObject(drawingId: DrawingID, id: GraphicID | ObjectID, unrollRefs?: boolean): IStructureObject | GeometryElement | undefined;
|
|
27
|
+
export declare function findObject(drawingId: DrawingID, id: GraphicID | ObjectID, unrollRefs?: boolean): IStructureObject | ContainerGeometryT | GeometryElement | undefined;
|
|
28
28
|
export declare function round(value: number, digits: number): number;
|
|
29
29
|
export declare function rgbToHex(color: {
|
|
30
30
|
r: number;
|
|
@@ -2,16 +2,6 @@ export declare const ccPointFilter: (scope: any, data: any) => boolean;
|
|
|
2
2
|
export declare const ccLineFilter: (scope: any, data: any) => boolean;
|
|
3
3
|
export declare const ccArcFilter: (scope: any, data: any) => boolean;
|
|
4
4
|
export declare const ccCircleFilter: (scope: any, data: any) => boolean;
|
|
5
|
-
export declare const lineFilter: (scope: any, data: any) => boolean;
|
|
6
|
-
export declare const lineSegmentsFilter: (scope: any, data: any) => boolean;
|
|
7
|
-
export declare const arcFilter: (scope: any, data: any) => boolean;
|
|
8
|
-
export declare const circleFilter: (scope: any, data: any) => boolean;
|
|
9
|
-
export declare const arcCircleFilter: (scope: any, data: any) => boolean;
|
|
10
|
-
export declare const pointFilter: (scope: any, data: any) => boolean;
|
|
11
|
-
export declare const meshFilter: (scope: any, data: any) => boolean;
|
|
12
|
-
export declare const planeFilter: (scope: any, data: any) => boolean;
|
|
13
|
-
export declare const loopFilter: (scope: any, data: any) => boolean;
|
|
14
|
-
export declare const solidFilter: (scope: any, data: any) => boolean;
|
|
15
5
|
export declare const axisFilter: (scope: any, data: any) => boolean;
|
|
16
6
|
export declare const workPointFilter: (scope: any, data: any) => boolean;
|
|
17
7
|
export declare const workPlaneFilter: (scope: any, data: any) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buerli.io/react-cad",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "buerli CAD components",
|
|
5
5
|
"author": "AWV Informatik AG <info@awv-informatik.ch>",
|
|
6
6
|
"repository": {},
|
|
@@ -47,8 +47,8 @@
|
|
|
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": "
|
|
51
|
-
"@react-three/fiber": "
|
|
50
|
+
"@react-three/drei": "8.16.6",
|
|
51
|
+
"@react-three/fiber": "7.0.19",
|
|
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",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@types/jest": "^26.0.8",
|
|
59
59
|
"@types/node": "^11.13.8",
|
|
60
60
|
"@types/path-browserify": "^1.0.0",
|
|
61
|
-
"@types/react": "
|
|
61
|
+
"@types/react": "17.0.19",
|
|
62
62
|
"@types/styled-components": "^4.1.16",
|
|
63
63
|
"@types/three": "^0.137",
|
|
64
64
|
"@types/uuid": "^3.4.5",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"lint-staged": "10.5.3",
|
|
79
79
|
"postcss": "^8.2.14",
|
|
80
80
|
"prettier": "^2.2.1",
|
|
81
|
-
"react
|
|
82
|
-
"react-
|
|
81
|
+
"react": "17.0.2",
|
|
82
|
+
"react-dom": "17.0.2",
|
|
83
83
|
"react-test-renderer": "^16.13.1",
|
|
84
84
|
"rimraf": "^2.6.3",
|
|
85
85
|
"rollup": "^2.56.2",
|
|
@@ -87,20 +87,21 @@
|
|
|
87
87
|
"rollup-plugin-size-snapshot": "^0.12.0",
|
|
88
88
|
"rollup-plugin-terser": "^7.0.2",
|
|
89
89
|
"three": "^0.138",
|
|
90
|
-
"typescript": "4.
|
|
90
|
+
"typescript": "4.4.3"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
|
-
"@react-three/drei": "
|
|
94
|
-
"@react-three/fiber": ">=
|
|
95
|
-
"three": ">=0.138"
|
|
93
|
+
"@react-three/drei": ">=8.16.6",
|
|
94
|
+
"@react-three/fiber": ">=7.0.17",
|
|
95
|
+
"three": ">=0.138",
|
|
96
|
+
"react": ">=17.0"
|
|
96
97
|
},
|
|
97
98
|
"dependencies": {
|
|
98
99
|
"@ant-design/compatible": "^1.0.8",
|
|
99
|
-
"@buerli.io/classcad": "0.
|
|
100
|
-
"@buerli.io/react": "0.
|
|
101
|
-
"
|
|
100
|
+
"@buerli.io/classcad": "0.3.0",
|
|
101
|
+
"@buerli.io/react": "0.3.0",
|
|
102
|
+
"@react-three/postprocessing": "2.3.1",
|
|
103
|
+
"antd": ">=4.15.3 <4.17",
|
|
102
104
|
"path-browserify": "^1.0.1",
|
|
103
|
-
"react": "^17.0.2",
|
|
104
105
|
"react-colorful": "^5.3.0",
|
|
105
106
|
"react-movable": "^2.3.0",
|
|
106
107
|
"react-sortable-hoc": "^2.0.0",
|