@buerli.io/react-cad 0.11.0 → 0.13.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/ModelTree/AssemblyNode.d.ts +3 -0
- package/build/components/UI/CAD/common/Collapse.d.ts +8 -0
- package/build/components/UI/CAD/common/ContextMenu.d.ts +4 -2
- package/build/components/UI/CAD/common/primitives.d.ts +1 -0
- package/build/components/UI/CAD/hooks/index.d.ts +1 -0
- package/build/components/UI/CAD/hooks/useGlobalMateInfo.d.ts +6 -0
- package/build/components/UI/CAD/store/CADActions.d.ts +1 -0
- package/build/components/UI/CAD/store/CADStore.d.ts +8 -1
- package/build/components/graphics/CSysDisplay.d.ts +19 -2
- package/build/components/graphics/CompositeCurveObj.d.ts +11 -0
- package/build/index.cjs.js +10298 -8509
- package/build/index.d.ts +10 -3
- package/build/index.js +10258 -8479
- package/build/plugins/CompositeCurve/Root.d.ts +6 -0
- package/build/plugins/CompositeCurve/View.d.ts +6 -0
- package/build/plugins/CompositeCurve/index.d.ts +5 -0
- package/build/plugins/Extrusion/View.d.ts +6 -0
- package/build/plugins/Extrusion/index.d.ts +7 -1
- package/build/plugins/HLConstraints/CircularPattern/Root.d.ts +6 -0
- package/build/plugins/HLConstraints/CircularPattern/View.d.ts +6 -0
- package/build/plugins/HLConstraints/CircularPattern/index.d.ts +5 -0
- package/build/plugins/HLConstraints/Gear/Root.d.ts +6 -0
- package/build/plugins/HLConstraints/Gear/View.d.ts +6 -0
- package/build/plugins/HLConstraints/Gear/index.d.ts +5 -0
- package/build/plugins/HLConstraints/Group/Root.d.ts +6 -0
- package/build/plugins/HLConstraints/Group/index.d.ts +4 -0
- package/build/plugins/HLConstraints/LinearPattern/Root.d.ts +6 -0
- package/build/plugins/HLConstraints/LinearPattern/View.d.ts +6 -0
- package/build/plugins/HLConstraints/LinearPattern/index.d.ts +5 -0
- package/build/plugins/HLConstraints/Spherical/Root.d.ts +6 -0
- package/build/plugins/HLConstraints/Spherical/View.d.ts +6 -0
- package/build/plugins/HLConstraints/Spherical/index.d.ts +5 -0
- package/build/plugins/HLConstraints/components/CSysDisplayWrapper.d.ts +7 -0
- package/build/plugins/HLConstraints/components/HLConstrIcon.d.ts +7 -0
- package/build/plugins/HLConstraints/components/LimitedValue.d.ts +1 -1
- package/build/plugins/HLConstraints/components/Limits.d.ts +6 -0
- package/build/plugins/Sketch/View/graphics/IconGroups.d.ts +7 -0
- package/build/plugins/Sketch/View/graphics/Regions.d.ts +5 -0
- package/build/plugins/Sketch/View/graphics/hooks.d.ts +1 -5
- package/build/plugins/Sketch/View/handlers/HandlersConstructors.d.ts +2 -0
- package/build/plugins/Sketch/View/handlers/SSelect.d.ts +3 -0
- package/build/plugins/Sketch/description.d.ts +0 -2
- package/build/plugins/Sketch/types.d.ts +8 -7
- package/build/plugins/Sketch/utils/getEntities.d.ts +2 -0
- package/build/plugins/Sketch/utils/useSketchRegions.d.ts +2 -0
- package/build/plugins/Twist/View.d.ts +6 -0
- package/build/plugins/Twist/index.d.ts +7 -1
- package/build/utils/helpers.d.ts +2 -0
- package/build/utils/mateUtils.d.ts +4 -0
- package/build/utils/selection/filters.d.ts +2 -0
- package/package.json +6 -6
- package/build/plugins/Sketch/utils/getConstrEntities.d.ts +0 -2
|
@@ -11,9 +11,11 @@ export declare type MenuInfo<T = void> = T extends void ? MenuInfoBase : MenuInf
|
|
|
11
11
|
};
|
|
12
12
|
declare type MenuItemElement = Omit<MenuItemType, 'onClick'> & {
|
|
13
13
|
onClick?: (menuInfo: MenuInfo<any>) => void;
|
|
14
|
+
onMouseEnter?: (menuInfo: MenuInfo<any>) => void;
|
|
15
|
+
onMouseLeave?: (menuInfo: MenuInfo<any>) => void;
|
|
14
16
|
};
|
|
15
17
|
declare type SubMenuElement = Omit<SubMenuType, 'onClick' | 'children'> & {
|
|
16
|
-
children: MenuElement[];
|
|
18
|
+
children: MenuElement[] | ((menuInfo: MenuInfo<any>) => MenuElement[]);
|
|
17
19
|
onClick?: (menuInfo: MenuInfo<any>) => void;
|
|
18
20
|
};
|
|
19
21
|
declare type MenuItemGroupElement = Omit<MenuItemGroupType, 'children'> & {
|
|
@@ -22,7 +24,7 @@ declare type MenuItemGroupElement = Omit<MenuItemGroupType, 'children'> & {
|
|
|
22
24
|
export declare type MenuElement = MenuItemElement | SubMenuElement | MenuItemGroupElement | MenuDividerType | null;
|
|
23
25
|
declare type ContextMenuProps = {
|
|
24
26
|
items: MenuElement[];
|
|
25
|
-
menuInfo: MenuInfo<any
|
|
27
|
+
menuInfo: MenuInfo<any>;
|
|
26
28
|
caption: string;
|
|
27
29
|
icon?: JSX.Element;
|
|
28
30
|
onHide?: () => void;
|
|
@@ -6,4 +6,5 @@ export declare const Link: import("styled-components").StyledComponent<"a", any,
|
|
|
6
6
|
export declare const HoveredDiv: import("styled-components").StyledComponent<"div", any, {
|
|
7
7
|
hovered?: boolean | undefined;
|
|
8
8
|
bordered?: boolean | undefined;
|
|
9
|
+
blocked?: boolean | undefined;
|
|
9
10
|
}, never>;
|
|
@@ -3,6 +3,7 @@ export { useContextMenuItems } from './useContextMenuItems';
|
|
|
3
3
|
export { useCurrentInstance } from './useCurrentInstance';
|
|
4
4
|
export { useCurrentProduct } from './useCurrentProduct';
|
|
5
5
|
export { EditMode, useEditMode } from './useEditMode';
|
|
6
|
+
export { useGlobalMateInfo } from './useGlobalMateInfo';
|
|
6
7
|
export { useHasPending } from './useHasPending';
|
|
7
8
|
export { useIsLoading } from './useIsLoading';
|
|
8
9
|
export { useIsSketchActive } from './useIsSketchActive';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DrawingID, ObjectID, SelectedItem } from '@buerli.io/core';
|
|
2
|
+
export declare const useGlobalMateInfo: (drawingId: DrawingID, instances?: ObjectID[], includeSelected?: boolean) => {
|
|
3
|
+
selItems: SelectedItem<any>[];
|
|
4
|
+
activeSelItems: SelectedItem<any>[];
|
|
5
|
+
activeRigidsets: number[];
|
|
6
|
+
};
|
|
@@ -6,6 +6,7 @@ export declare const appApi: (set: SetState<CADStateT>, get: GetState<CADStateT>
|
|
|
6
6
|
startProdEditing: (drawingId: DrawingID, objId: ObjectID) => void;
|
|
7
7
|
goBack: (drawingId: DrawingID) => void;
|
|
8
8
|
clearProdStack: () => void;
|
|
9
|
+
setVisible: (instanceIds: ObjectID[], objIdsArr: ObjectID[][], value: boolean) => void;
|
|
9
10
|
};
|
|
10
11
|
blankDiv: {
|
|
11
12
|
show: (callback: () => void) => void;
|
|
@@ -3,6 +3,9 @@ import { appApi } from './CADActions';
|
|
|
3
3
|
export declare type CADStateT = {
|
|
4
4
|
assemblyTree: {
|
|
5
5
|
prodStack: ObjectID[];
|
|
6
|
+
visibleMap: {
|
|
7
|
+
[key: ObjectID]: ObjectID[];
|
|
8
|
+
};
|
|
6
9
|
};
|
|
7
10
|
blankDiv: {
|
|
8
11
|
isActive: boolean;
|
|
@@ -15,5 +18,9 @@ declare const CADApi: import("zustand").StoreApi<CADStateT>;
|
|
|
15
18
|
* We need separate store for CAD components. It might contain auxiliary information like stack of current products or camera api.
|
|
16
19
|
*/
|
|
17
20
|
declare const useCADStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CADStateT>>;
|
|
21
|
+
declare const useVisibleMap: () => {
|
|
22
|
+
[key: number]: number[];
|
|
23
|
+
};
|
|
24
|
+
declare const useIsVisible: (instanceId: ObjectID, objectId: ObjectID) => boolean;
|
|
18
25
|
declare const getCADState: () => CADStateT;
|
|
19
|
-
export { useCADStore, CADApi, getCADState };
|
|
26
|
+
export { useCADStore, useVisibleMap, useIsVisible, CADApi, getCADState };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import * as THREE from 'three';
|
|
3
|
-
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
3
|
+
import { DrawingID, ObjectID, SelectedItem } from '@buerli.io/core';
|
|
4
4
|
import { FlipType, ReorientedType } from '@buerli.io/classcad';
|
|
5
5
|
export declare type CustomCSys = {
|
|
6
6
|
drawingId: DrawingID;
|
|
@@ -19,6 +19,21 @@ export declare type CSysUserData = {
|
|
|
19
19
|
isActive?: boolean;
|
|
20
20
|
onHUD?: boolean;
|
|
21
21
|
};
|
|
22
|
+
export declare enum CSysDisplayMode {
|
|
23
|
+
DisplayAll = 0,
|
|
24
|
+
DisplayHovered = 1,
|
|
25
|
+
DisplayVisible = 2
|
|
26
|
+
}
|
|
27
|
+
export declare type CSysDisplayContextProps = {
|
|
28
|
+
drawingId: DrawingID;
|
|
29
|
+
displayMode: CSysDisplayMode;
|
|
30
|
+
includeSelected: boolean;
|
|
31
|
+
selItems: SelectedItem<any>[];
|
|
32
|
+
activeSelItems: SelectedItem<any>[];
|
|
33
|
+
activeRigidsets: ObjectID[];
|
|
34
|
+
csysComponent: React.FC<CustomCSys> | undefined;
|
|
35
|
+
};
|
|
36
|
+
export declare const CSysDisplayContext: React.Context<CSysDisplayContextProps>;
|
|
22
37
|
export declare const CSysWrapper: React.FC<{
|
|
23
38
|
drawingId: DrawingID;
|
|
24
39
|
csys?: React.FC<CustomCSys>;
|
|
@@ -29,5 +44,7 @@ export declare const CSysWrapper: React.FC<{
|
|
|
29
44
|
export declare const CSysDisplay: React.FC<{
|
|
30
45
|
drawingId: DrawingID;
|
|
31
46
|
csys?: React.FC<CustomCSys>;
|
|
32
|
-
|
|
47
|
+
displayMode?: CSysDisplayMode;
|
|
48
|
+
instances?: ObjectID[];
|
|
49
|
+
includeSelected?: boolean;
|
|
33
50
|
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
export declare const CompositeCurveObj: React.FC<{
|
|
5
|
+
drawingId: DrawingID;
|
|
6
|
+
objectId: ObjectID;
|
|
7
|
+
color?: THREE.ColorRepresentation;
|
|
8
|
+
lineWidth?: number;
|
|
9
|
+
userData?: any;
|
|
10
|
+
handlers?: any;
|
|
11
|
+
}>;
|