@buerli.io/react-cad 0.1.0 → 0.2.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 +22 -1
- package/build/components/UI/CAD/ListPlaceholder.d.ts +2 -0
- package/build/components/UI/CAD/ModelTree/AssemblyNode.d.ts +0 -1
- package/build/components/UI/CAD/ModelTree/FeatureList/Feature.d.ts +2 -2
- package/build/components/UI/CAD/SideBar.d.ts +1 -1
- package/build/components/UI/CAD/Solids/Solids.d.ts +2 -2
- package/build/components/UI/CAD/Solids/useVisibleSolids.d.ts +2 -0
- package/build/components/UI/CAD/ToolBar/useCommands.d.ts +1 -1
- package/build/components/UI/CAD/common/EntityName.d.ts +2 -3
- package/build/components/UI/CAD/common/primitives.d.ts +3 -1
- package/build/components/UI/CAD/hooks/index.d.ts +5 -4
- package/build/components/UI/CAD/hooks/useHasPending.d.ts +8 -0
- package/build/components/UI/CAD/hooks/useIsLoading.d.ts +8 -0
- package/build/components/UI/CAD/index.d.ts +1 -0
- package/build/components/UI/editors/BooleanEditor/BooleanEditor.d.ts +1 -0
- package/build/components/UI/editors/Wrapper.d.ts +1 -0
- package/build/components/graphics/HoveredConstraintDisplay.d.ts +2 -1
- package/build/components/utils/CompValidation/validators/DrawingValidator.d.ts +1 -1
- package/build/index.cjs.js +1831 -1090
- package/build/index.d.ts +4 -1
- package/build/index.js +1816 -1079
- package/build/plugins/Measure/Root.d.ts +1 -1
- package/build/plugins/Mirror/Root.d.ts +6 -0
- package/build/plugins/Mirror/index.d.ts +4 -0
- package/build/plugins/Sketch/Root/PlaneSelection.d.ts +7 -0
- package/build/plugins/Sketch/View/graphics/Merged/Arc.d.ts +2 -1
- package/build/plugins/Sketch/View/graphics/Merged/Circle.d.ts +1 -0
- package/build/plugins/Sketch/description.d.ts +1 -1
- package/build/plugins/SliceBySheet/Root.d.ts +6 -0
- package/build/plugins/SliceBySheet/index.d.ts +4 -0
- package/build/utils/selection/filters.d.ts +2 -0
- package/package.json +5 -5
- package/build/components/UI/CAD/hooks/useComponentInteraction.d.ts +0 -14
- package/build/components/utils/CompValidation/validators/ModelTreeValidator.d.ts +0 -11
- package/build/components/utils/CompValidation/validators/SideBarValidator.d.ts +0 -11
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
import { DrawingID } from '@buerli.io/core';
|
|
1
|
+
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
2
2
|
import 'antd/dist/antd.css';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
declare type ObjType = 'Feature' | 'AssemblyNode' | 'Solid' | 'Constraint';
|
|
5
|
+
export declare type InteractionInfo = {
|
|
6
|
+
objectId: ObjectID;
|
|
7
|
+
highlightedIds?: ObjectID[];
|
|
8
|
+
type: ObjType;
|
|
9
|
+
} | null;
|
|
10
|
+
export declare const InteractionContext: React.Context<{
|
|
11
|
+
hoveredId?: number | undefined;
|
|
12
|
+
selectedId?: number | undefined;
|
|
13
|
+
onHover?: ((objData: InteractionInfo) => void) | undefined;
|
|
14
|
+
onClick?: ((objData: InteractionInfo) => void) | undefined;
|
|
15
|
+
}>;
|
|
4
16
|
/**
|
|
5
17
|
* Component which provides convenient UI for working with models which is loaded to existing drawing.
|
|
6
18
|
* It includes ModelTree, Constraints and Solids components and toolbar for creating new features/3dconstraints
|
|
@@ -8,9 +20,18 @@ import React from 'react';
|
|
|
8
20
|
*
|
|
9
21
|
* @param drawingId - id of an existing drawing.
|
|
10
22
|
* @param Menu - you can pass custom file menu which will be shown at the left top corner.
|
|
23
|
+
* @param hoveredId - id of a currently hovered object.
|
|
24
|
+
* @param selectedId - id of a currently selected object.
|
|
25
|
+
* @param onHover - callback for hovering features / assembly nodes / solids / constraints.
|
|
26
|
+
* @param onClick - callback for clicking on assembly nodes / solids.
|
|
11
27
|
*/
|
|
12
28
|
export declare const Drawing: React.FC<{
|
|
13
29
|
drawingId: DrawingID;
|
|
14
30
|
Menu?: JSX.Element;
|
|
15
31
|
children?: React.ReactNode;
|
|
32
|
+
hoveredId?: ObjectID;
|
|
33
|
+
selectedId?: ObjectID;
|
|
34
|
+
onHover?: (objData: InteractionInfo) => void;
|
|
35
|
+
onClick?: (objData: InteractionInfo) => void;
|
|
16
36
|
}>;
|
|
37
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
2
|
-
import 'antd/dist/antd.css';
|
|
3
1
|
import React from 'react';
|
|
2
|
+
import 'antd/dist/antd.css';
|
|
3
|
+
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
4
4
|
export declare const Feature: React.FC<{
|
|
5
5
|
drawingId: DrawingID;
|
|
6
6
|
featureRefId: ObjectID;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DrawingID } from '@buerli.io/core';
|
|
3
3
|
/**
|
|
4
|
-
* Shows list of solids
|
|
4
|
+
* Shows list of solids available in the current application context.
|
|
5
5
|
*
|
|
6
|
-
* @param drawingId - id of a drawing
|
|
6
|
+
* @param drawingId - id of a drawing.
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
9
|
export declare const Solids: React.FC<{
|
|
@@ -4,4 +4,4 @@ export declare type Command = {
|
|
|
4
4
|
icon: any;
|
|
5
5
|
callback: () => Promise<any>;
|
|
6
6
|
};
|
|
7
|
-
export declare function useCommands(drawingId: DrawingID, curProductClass: string): Record<string, Command | Command[]>;
|
|
7
|
+
export declare function useCommands(drawingId: DrawingID, curProductClass: string | undefined): Record<string, Command | Command[]>;
|
|
@@ -2,9 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import 'antd/dist/antd.css';
|
|
3
3
|
export declare const EntityName: React.FC<{
|
|
4
4
|
name: string;
|
|
5
|
+
underlined?: boolean;
|
|
5
6
|
strong?: boolean;
|
|
6
7
|
disabled?: boolean;
|
|
7
|
-
onClick
|
|
8
|
-
onMouseEnter?: () => void;
|
|
9
|
-
onMouseLeave?: () => void;
|
|
8
|
+
onClick?: () => void;
|
|
10
9
|
}>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const FlexRow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export declare const FlexReverseRow: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const Link: import("styled-components").StyledComponent<"a", any, {
|
|
3
|
+
export declare const Link: import("styled-components").StyledComponent<"a", any, {
|
|
4
|
+
underlined?: boolean | undefined;
|
|
5
|
+
}, never>;
|
|
4
6
|
export declare const HoveredDiv: import("styled-components").StyledComponent<"div", any, {
|
|
5
7
|
hovered?: boolean | undefined;
|
|
6
8
|
bordered?: boolean | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export { useComponentInteraction } from './useComponentInteraction';
|
|
2
|
-
export { useRoot } from './useRoot';
|
|
3
|
-
export { useCurrentProduct } from './useCurrentProduct';
|
|
4
1
|
export { useCurrentNode } from './useCurrentNode';
|
|
5
|
-
export {
|
|
2
|
+
export { useCurrentProduct } from './useCurrentProduct';
|
|
3
|
+
export { EditMode, useEditMode } from './useEditMode';
|
|
4
|
+
export { useHasPending } from './useHasPending';
|
|
5
|
+
export { useIsLoading } from './useIsLoading';
|
|
6
6
|
export { useMenuItems } from './useMenuItems';
|
|
7
7
|
export { useObjectDetails } from './useObjectDetails';
|
|
8
8
|
export { useOperationSequence } from './useOperationSequence';
|
|
9
9
|
export { useRollbackBar } from './useRollbackBar';
|
|
10
|
+
export { useRoot } from './useRoot';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DrawingID } from '@buerli.io/core';
|
|
2
|
+
/**
|
|
3
|
+
* Check if ClassCAD is busy with one or multiple pending requests.
|
|
4
|
+
*
|
|
5
|
+
* @param drawingId The drawing id
|
|
6
|
+
* @returns true, if some requests are pending
|
|
7
|
+
*/
|
|
8
|
+
export declare const useHasPending: (drawingId: DrawingID) => boolean;
|
|
@@ -10,4 +10,5 @@ export { ViewOptionButtons } from './ViewOptionsBar/ViewOptionButtons';
|
|
|
10
10
|
export { ViewPlugButtons } from './ViewPlugButtons';
|
|
11
11
|
export { Menu } from './common/Menu';
|
|
12
12
|
export type { MenuItem, MenuItems } from './common/Menu';
|
|
13
|
+
export type { InteractionInfo } from './Drawing';
|
|
13
14
|
export * from './store/CADStore';
|