@buerli.io/react-cad 0.6.0 → 0.7.1-beta.1
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/graphics/Outlines/OutlineEffect.d.ts +3 -0
- package/build/index.cjs.js +635 -452
- package/build/index.d.ts +3 -1
- package/build/index.js +638 -456
- package/build/plugins/Dimensions/graphics/DimGraphics.d.ts +1 -0
- package/build/plugins/Dimensions/graphics/primitives.d.ts +2 -1
- package/build/plugins/Sketch/View/graphics/hooks.d.ts +1 -1
- package/build/plugins/Sketch/View/handlers/Fillet.d.ts +1 -1
- package/build/plugins/Sketch/constants.d.ts +5 -0
- package/build/plugins/Sketch/description.d.ts +0 -1
- package/build/plugins/Sketch/index.d.ts +2 -2
- package/build/utils/getHighlightedColor.d.ts +1 -0
- package/build/utils/selection/scopes/treeObjInteraction.d.ts +37 -0
- package/package.json +3 -3
- package/build/utils/selection/scopes/treeObjSelection.d.ts +0 -27
|
@@ -5,13 +5,13 @@ export declare const mainColor = 4342338;
|
|
|
5
5
|
export declare const TextValue: React.FC<{
|
|
6
6
|
position: THREE.Vector3;
|
|
7
7
|
value: string;
|
|
8
|
-
onClick?: () => void;
|
|
9
8
|
backgroundColor?: number;
|
|
10
9
|
}>;
|
|
11
10
|
export declare const DimValue: React.FC<{
|
|
12
11
|
position: THREE.Vector3;
|
|
13
12
|
dimId: ObjectID;
|
|
14
13
|
backgroundColor?: number;
|
|
14
|
+
disableEvents?: boolean;
|
|
15
15
|
}>;
|
|
16
16
|
export declare const Line: React.FC<{
|
|
17
17
|
start: THREE.Vector3;
|
|
@@ -31,4 +31,5 @@ export declare const PositionHandler: React.FC<{
|
|
|
31
31
|
dimId: ObjectID;
|
|
32
32
|
setPosition: React.Dispatch<React.SetStateAction<THREE.Vector3>>;
|
|
33
33
|
position: THREE.Vector3;
|
|
34
|
+
disableEvents?: boolean;
|
|
34
35
|
}>;
|
|
@@ -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: Record<string, (e: import("@react-three/fiber").ThreeEvent<PointerEvent> & import("../../types").PointerEventsT) => void>;
|
|
33
33
|
color: number;
|
|
34
34
|
};
|
|
35
35
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DrawingID, PluginID } from '@buerli.io/core';
|
|
2
2
|
import { Handler } from '../../types';
|
|
3
|
-
export declare function Fillet(drawingId: DrawingID, pluginId: PluginID
|
|
3
|
+
export declare function Fillet(drawingId: DrawingID, pluginId: PluginID): Handler;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getHighlightedColor: (isGHovered: boolean, isGSelected: boolean, isSHovered: boolean, isSSelected: boolean) => "green" | "red" | "#3280ff" | "#8040c0" | undefined;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DrawingID, IStructureObject, ObjectID, SelectedItem } from '@buerli.io/core';
|
|
2
|
+
import { ThreeEvent } from '@react-three/fiber';
|
|
3
|
+
/**
|
|
4
|
+
* Implies the following data structure:
|
|
5
|
+
* data: {
|
|
6
|
+
* object: IStructureObject
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export declare const TreeObjScope = "TreeObjScope";
|
|
10
|
+
export declare const createTreeObjSelItem: (productId: ObjectID, object: IStructureObject) => SelectedItem;
|
|
11
|
+
export declare function useIsGHovered(drawingId: DrawingID, objId: ObjectID): boolean;
|
|
12
|
+
export declare function useIsGSelected(drawingId: DrawingID, objId: ObjectID): boolean;
|
|
13
|
+
export declare function useIsSHovered(drawingId: DrawingID, objId: ObjectID): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Returns true if object in tree is currently selected in active selection.
|
|
16
|
+
*
|
|
17
|
+
* This hook leads to re-rendering of each element uses it.
|
|
18
|
+
* It happens because it uses items of the active selection,
|
|
19
|
+
* and it's not possible to check if objId is selected inside of useDrawing selector
|
|
20
|
+
* because of performance reasone (it requires traversing through all of selectedItems).
|
|
21
|
+
*
|
|
22
|
+
* @param drawingId
|
|
23
|
+
* @param objId
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export declare function useIsSSelected(drawingId: DrawingID, objId: ObjectID): boolean;
|
|
27
|
+
export declare function useTreeObjInteraction(drawingId: DrawingID, objId: ObjectID): {
|
|
28
|
+
isGHovered: boolean;
|
|
29
|
+
isGSelected: boolean;
|
|
30
|
+
isSHovered: boolean;
|
|
31
|
+
isSSelected: boolean;
|
|
32
|
+
handlers: {
|
|
33
|
+
onClick: (e: MouseEvent | ThreeEvent<MouseEvent>) => void;
|
|
34
|
+
onPointerOut: (e: PointerEvent | ThreeEvent<PointerEvent>) => void;
|
|
35
|
+
onPointerOver: (e: PointerEvent | ThreeEvent<PointerEvent>) => void;
|
|
36
|
+
};
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buerli.io/react-cad",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1-beta.1",
|
|
4
4
|
"description": "buerli CAD components",
|
|
5
5
|
"author": "AWV Informatik AG <info@awv-informatik.ch>",
|
|
6
6
|
"repository": {},
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@ant-design/compatible": "^1.0.8",
|
|
94
|
-
"@buerli.io/classcad": "0.
|
|
95
|
-
"@buerli.io/react": "0.
|
|
94
|
+
"@buerli.io/classcad": "0.7.1-beta.2",
|
|
95
|
+
"@buerli.io/react": "0.7.1-beta.2",
|
|
96
96
|
"@react-three/postprocessing": "2.6.2",
|
|
97
97
|
"antd": "^4.23.4",
|
|
98
98
|
"path-browserify": "^1.0.1",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { DrawingID, IStructureObject, ObjectID, SelectedItem } from '@buerli.io/core';
|
|
2
|
-
/**
|
|
3
|
-
* Implies the following data structure:
|
|
4
|
-
* data: {
|
|
5
|
-
* object: IStructureObject
|
|
6
|
-
* }
|
|
7
|
-
*/
|
|
8
|
-
export declare const TreeObjScope = "TreeObjScope";
|
|
9
|
-
export declare const createTreeObjSelItem: (productId: ObjectID, object: IStructureObject) => SelectedItem;
|
|
10
|
-
/**
|
|
11
|
-
* Returns true if object in tree is currently selected in active selection.
|
|
12
|
-
*
|
|
13
|
-
* This hook leads to re-rendering of each element uses it.
|
|
14
|
-
* It happens because it uses items of the active selection,
|
|
15
|
-
* and it's not possible to check if objId is selected inside of useDrawing selector
|
|
16
|
-
* because of performance reasone (it requires traversing through all of selectedItems).
|
|
17
|
-
*
|
|
18
|
-
* @param drawingId
|
|
19
|
-
* @param objId
|
|
20
|
-
* @returns
|
|
21
|
-
*/
|
|
22
|
-
export declare function useIsSelected(drawingId: DrawingID, objId: ObjectID): boolean;
|
|
23
|
-
export declare function useTreeObjSelection(drawingId: DrawingID, objId: ObjectID): {
|
|
24
|
-
isHovered: boolean;
|
|
25
|
-
isSelected: boolean;
|
|
26
|
-
handlers: {};
|
|
27
|
-
};
|