@buerli.io/react-cad 0.13.1-beta.2 → 0.13.1-beta.4

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.
Files changed (26) hide show
  1. package/build/components/UI/CAD/ToolBar/AssemblyModeCmds.d.ts +2 -2
  2. package/build/components/UI/CAD/ToolBar/PartModeCmds.d.ts +2 -2
  3. package/build/components/UI/CAD/ToolBar/useCommands.d.ts +5 -2
  4. package/build/components/UI/CAD/common/MultiSelect.d.ts +12 -0
  5. package/build/components/UI/CAD/hooks/useContextMenuItems.d.ts +1 -1
  6. package/build/components/UI/CAD/plugins/ProductManagement/types.d.ts +0 -1
  7. package/build/components/UI/editors/CSysEditor/CSysEditor.d.ts +1 -0
  8. package/build/components/UI/editors/NumberEditor/NumberEditor.d.ts +1 -0
  9. package/build/components/UI/editors/PointEditor/PointEditor.d.ts +1 -0
  10. package/build/components/UI/editors/RefsEditors/MateEditor.d.ts +1 -0
  11. package/build/components/UI/editors/RefsEditors/MateOrientationEditor.d.ts +9 -0
  12. package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +1 -0
  13. package/build/components/UI/editors/RefsEditors/RefsEditor.d.ts +1 -0
  14. package/build/components/UI/editors/TypeWrapper.d.ts +5 -0
  15. package/build/components/UI/editors/Wrapper.d.ts +2 -1
  16. package/build/index.cjs.js +2516 -1557
  17. package/build/index.js +2525 -1566
  18. package/build/plugins/HLConstraints/components/Limits.d.ts +2 -0
  19. package/build/plugins/Sketch/Root/SketchGroup.d.ts +1 -0
  20. package/build/plugins/Sketch/View/graphics/hooks.d.ts +2 -0
  21. package/build/plugins/Sketch/View/handlers/hoverHelpers.d.ts +3 -0
  22. package/build/plugins/Sketch/types.d.ts +3 -0
  23. package/build/plugins/Sketch/utils/OverdefinedStateManager.d.ts +6 -0
  24. package/build/utils/getHighlightedColor.d.ts +1 -1
  25. package/build/utils/helpers.d.ts +1 -0
  26. package/package.json +4 -4
@@ -1,3 +1,3 @@
1
1
  import { DrawingID, ObjectID } from '@buerli.io/core';
2
- import { Command } from './useCommands';
3
- export declare const AssemblyModeCmds: (drawingId: DrawingID, rootId: ObjectID) => Record<string, Command | Command[]>;
2
+ import { ToolBarCommand, ToolBarDivider } from './useCommands';
3
+ export declare const AssemblyModeCmds: (drawingId: DrawingID, rootId: ObjectID) => (ToolBarCommand | ToolBarCommand[] | ToolBarDivider)[];
@@ -1,3 +1,3 @@
1
1
  import { DrawingID, ObjectID } from '@buerli.io/core';
2
- import { Command } from './useCommands';
3
- export declare const PartModeCmds: (drawingId: DrawingID, rootId: ObjectID) => Record<string, Command | Command[]>;
2
+ import { ToolBarCommand, ToolBarDivider } from './useCommands';
3
+ export declare const PartModeCmds: (drawingId: DrawingID, rootId: ObjectID) => (ToolBarCommand | ToolBarCommand[] | ToolBarDivider)[];
@@ -1,7 +1,10 @@
1
1
  import { DrawingID } from '@buerli.io/core';
2
- export declare type Command = {
2
+ export declare type ToolBarCommand = {
3
3
  label: string;
4
4
  icon: any;
5
5
  callback: () => Promise<any>;
6
6
  };
7
- export declare function useCommands(drawingId: DrawingID, curProductClass: string | undefined): Record<string, Command | Command[]>;
7
+ export declare type ToolBarDivider = {
8
+ type: 'divider';
9
+ };
10
+ export declare function useCommands(drawingId: DrawingID, curProductClass: string | undefined): (ToolBarCommand | ToolBarDivider | ToolBarCommand[])[];
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { ObjectID, DrawingID, InteractionInfo } from '@buerli.io/core';
3
+ export declare const MultiSelectContext: React.Context<{
4
+ setLastSelected: (objId: ObjectID, overwrite?: boolean) => void;
5
+ multiSelect: (objId: ObjectID) => void;
6
+ }>;
7
+ export declare const MultiSelect: React.FC<{
8
+ children: React.ReactNode;
9
+ drawingId: DrawingID;
10
+ items: ObjectID[];
11
+ createInfo: (objId: ObjectID) => InteractionInfo;
12
+ }>;
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import 'antd/dist/antd.css';
3
3
  import { DrawingID } from '@buerli.io/core';
4
4
  import { MenuElement } from '../common/ContextMenu';
5
- export declare function useContextMenuItems(drawingId: DrawingID, isActive: boolean, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuElement[];
5
+ export declare function useContextMenuItems(drawingId: DrawingID, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuElement[];
@@ -1,5 +1,4 @@
1
1
  import { ObjectID } from '@buerli.io/core';
2
2
  export declare type PMPluginState = {
3
3
  product: ObjectID | null;
4
- selected: ObjectID[];
5
4
  };
@@ -5,6 +5,7 @@ import { MemberParam } from '../../../../types';
5
5
  export declare const CSysEditor: React.FC<{
6
6
  param: MemberParam<PointMemValue[]>;
7
7
  csysRow: CSysRows;
8
+ iconUrl?: string;
8
9
  caption?: string;
9
10
  validator?: (x: PointMemValue, pName?: string) => string[];
10
11
  }>;
@@ -4,6 +4,7 @@ import { MemberParam, APIParam } from '../../../../types';
4
4
  export declare const NumberEditor: React.FC<{
5
5
  param: MemberParam<APIParam<number>>;
6
6
  drawingId: DrawingID;
7
+ iconUrl?: string;
7
8
  caption?: string;
8
9
  validator?: (numParam: APIParam<number>, pName?: string) => string[];
9
10
  allowExpr?: boolean;
@@ -4,6 +4,7 @@ import { MemberParam, APIParam } from '../../../../types';
4
4
  export declare const PointEditor: React.FC<{
5
5
  param: MemberParam<APIParam<PointMemValue>>;
6
6
  drawingId: DrawingID;
7
+ iconUrl?: string;
7
8
  caption?: string;
8
9
  validator?: (x: APIParam<PointMemValue>, pName?: string) => string[];
9
10
  }>;
@@ -6,6 +6,7 @@ import { MateParam } from './useMateParam';
6
6
  export declare const MateEditor: React.FC<{
7
7
  param: MemberParam<MateParam>;
8
8
  drawingId: DrawingID;
9
+ iconUrl?: string;
9
10
  caption?: string;
10
11
  selectorsOrder?: SelectorsOrderT;
11
12
  validator?: (ref: ObjectID | undefined, pName?: string) => string[];
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { DrawingID, SelectorID } from '@buerli.io/core';
3
+ import { MemberParam } from '../../../../types';
4
+ import { MateParam } from './useMateParam';
5
+ export declare const MateOrientationEditor: React.FC<{
6
+ param: MemberParam<MateParam>;
7
+ drawingId: DrawingID;
8
+ selectorId: SelectorID | undefined;
9
+ }>;
@@ -9,6 +9,7 @@ export declare const RefEditor: React.FC<{
9
9
  drawingId: DrawingID;
10
10
  filter: any;
11
11
  customIdPicker?: (data: any) => ObjectID;
12
+ iconUrl?: string;
12
13
  caption?: string;
13
14
  idxOfRef?: number;
14
15
  selectorsOrder?: SelectorsOrderT;
@@ -7,6 +7,7 @@ export declare const RefsEditor: React.FC<{
7
7
  drawingId: DrawingID;
8
8
  filter: any;
9
9
  customIdPicker?: (data: any) => ObjectID;
10
+ iconUrl?: string;
10
11
  caption?: string;
11
12
  selectorsOrder?: SelectorsOrderT;
12
13
  maxLen?: number;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const TypeWrapper: React.FC<{
3
+ justifyEnd?: boolean;
4
+ children?: React.ReactNode;
5
+ }>;
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  export declare const Wrapper: React.FC<{
3
3
  highlighted?: boolean;
4
4
  minor?: boolean;
5
- caption: string | undefined;
5
+ caption?: string;
6
+ iconUrl?: string;
6
7
  contentWidth?: number;
7
8
  children?: React.ReactNode;
8
9
  }>;