@buerli.io/react-cad 0.13.1-beta.9 → 1.0.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.
Files changed (44) hide show
  1. package/build/components/UI/CAD/hooks/useObjectDetails.d.ts +2 -2
  2. package/build/components/UI/CAD/hooks/useRollbackBar.d.ts +3 -3
  3. package/build/components/UI/editors/BooleanEditor/BooleanEditor.d.ts +0 -7
  4. package/build/components/UI/editors/BooleanEditor/useBoolParam.d.ts +1 -3
  5. package/build/components/UI/editors/CSysEditor/CSysEditor.d.ts +3 -3
  6. package/build/components/UI/editors/CSysEditor/useCSysParam.d.ts +2 -2
  7. package/build/components/UI/editors/ExpressionEditor/ExpressionEditor.d.ts +4 -2
  8. package/build/components/UI/editors/ExpressionEditor/useExpressionsParam.d.ts +4 -2
  9. package/build/components/UI/editors/NumberEditor/NumberEditor.d.ts +1 -11
  10. package/build/components/UI/editors/NumberEditor/useNumParam.d.ts +1 -5
  11. package/build/components/UI/editors/PointEditor/PointEditor.d.ts +2 -10
  12. package/build/components/UI/editors/PointEditor/usePointParam.d.ts +3 -5
  13. package/build/components/UI/editors/RefsEditors/ChainFinder.d.ts +2 -2
  14. package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +2 -2
  15. package/build/components/UI/editors/RefsEditors/useMateParam.d.ts +3 -3
  16. package/build/components/UI/editors/RefsEditors/useSelectedItems.d.ts +2 -2
  17. package/build/components/UI/editors/TypeEditor/useTypeParam.d.ts +0 -2
  18. package/build/components/graphics/CSysDisplay.d.ts +5 -5
  19. package/build/components/graphics/SelectedMateObj.d.ts +2 -2
  20. package/build/components/graphics/utils/MatePathTransform.d.ts +1 -1
  21. package/build/components/graphics/utils/useCsysMatrix.d.ts +1 -1
  22. package/build/index.cjs.js +2498 -2824
  23. package/build/index.d.ts +2 -1
  24. package/build/index.js +2512 -2839
  25. package/build/plugins/Dimensions/utils.d.ts +4 -4
  26. package/build/plugins/HLConstraints/components/LimitedValue.d.ts +1 -1
  27. package/build/plugins/HLConstraints/components/Limits.d.ts +4 -1
  28. package/build/plugins/HLConstraints/validators.d.ts +1 -1
  29. package/build/plugins/Sketch/Root/Constraints/constraintsHelpers.d.ts +6 -4
  30. package/build/plugins/Sketch/Root/Constraints/utils.d.ts +3 -3
  31. package/build/plugins/Sketch/Root/CopyPatterns.d.ts +0 -5
  32. package/build/plugins/Sketch/View/graphics/hooks.d.ts +2 -2
  33. package/build/plugins/Sketch/View/handlers/filletHelpers.d.ts +18 -36
  34. package/build/plugins/Sketch/View/handlers/splitHelpers.d.ts +2 -2
  35. package/build/plugins/Sketch/types.d.ts +4 -2
  36. package/build/plugins/components/PluginForm.d.ts +1 -13
  37. package/build/utils/conversionUtils.d.ts +16 -0
  38. package/build/utils/helpers.d.ts +6 -6
  39. package/build/utils/selection/scopes/mateSelection.d.ts +10 -10
  40. package/build/utils/selection/scopes/treeObjInteraction.d.ts +3 -3
  41. package/build/utils/sketchUtils.d.ts +8 -8
  42. package/build/utils/useScale.d.ts +3 -1
  43. package/build/utils/validation.d.ts +3 -4
  44. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
- import { DrawingID, IStructureObject, ObjectID } from '@buerli.io/core';
1
+ import { DrawingID, ScgObject, ObjectID } from '@buerli.io/core';
2
2
  declare type ObjectDetails = {
3
- obj?: IStructureObject;
3
+ obj?: ScgObject;
4
4
  isPart?: boolean;
5
5
  isAssembly?: boolean;
6
6
  isAssemblyNode?: boolean;
@@ -1,7 +1,7 @@
1
- import { DrawingID, IStructureObject, ObjectID } from '@buerli.io/core';
1
+ import { DrawingID, ScgObject, ObjectID } from '@buerli.io/core';
2
2
  declare type RollbackBarInfo = {
3
- operationSequence?: IStructureObject;
4
- rollbackBar?: IStructureObject;
3
+ operationSequence?: ScgObject;
4
+ rollbackBar?: ScgObject;
5
5
  rollbackBarIndex: number;
6
6
  };
7
7
  export declare const useRollbackBar: (drawingId: DrawingID, partId: ObjectID) => RollbackBarInfo;
@@ -1,13 +1,6 @@
1
1
  import React from 'react';
2
2
  import { MemberParam } from '../../../../types';
3
- /** @deprecated */
4
3
  export declare const BooleanEditor: React.FC<{
5
- param: MemberParam<0 | 1>;
6
- inverted?: boolean;
7
- icon?: boolean | any[];
8
- caption?: string;
9
- }>;
10
- export declare const BooleanEditor_v1: React.FC<{
11
4
  param: MemberParam<boolean>;
12
5
  inverted?: boolean;
13
6
  icon?: boolean | any[];
@@ -1,5 +1,3 @@
1
1
  import { DrawingID, ObjectID } from '@buerli.io/core';
2
2
  import { MemberParam } from '../../../../types';
3
- /** @deprecated */
4
- export declare function useBoolParam(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<0 | 1>;
5
- export declare function useBoolParam_v1(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<boolean>;
3
+ export declare function useBoolParam(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<boolean>;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import { PointMemValue } from '@buerli.io/core';
2
+ import { ScgPoint } from '@buerli.io/core';
3
3
  import { CSysRows } from '.';
4
4
  import { MemberParam } from '../../../../types';
5
5
  export declare const CSysEditor: React.FC<{
6
- param: MemberParam<PointMemValue[]>;
6
+ param: MemberParam<ScgPoint[]>;
7
7
  csysRow: CSysRows;
8
8
  iconUrl?: string;
9
9
  caption?: string;
10
- validator?: (x: PointMemValue, pName?: string) => string[];
10
+ validator?: (x: ScgPoint, pName?: string) => string[];
11
11
  }>;
@@ -1,4 +1,4 @@
1
- import { DrawingID, ObjectID, PointMemValue } from '@buerli.io/core';
1
+ import { DrawingID, ObjectID, ScgPoint } from '@buerli.io/core';
2
2
  import { MemberParam } from '../../../../types';
3
3
  export declare enum CSysRows {
4
4
  Position = 0,
@@ -6,4 +6,4 @@ export declare enum CSysRows {
6
6
  YAxis = 2,
7
7
  ZAxis = 3
8
8
  }
9
- export declare function useCSysParam(drawingId: DrawingID, objId: ObjectID): MemberParam<PointMemValue[]>;
9
+ export declare function useCSysParam(drawingId: DrawingID, objId: ObjectID): MemberParam<ScgPoint[]>;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { DrawingID, ObjectID } from '@buerli.io/core';
3
- import { ExprMemToModify } from '@buerli.io/classcad';
4
3
  import { MemberParam } from '../../../../types';
5
4
  export declare const ExpressionEditor: React.FC<{
6
5
  drawingId: DrawingID;
@@ -8,7 +7,10 @@ export declare const ExpressionEditor: React.FC<{
8
7
  name: string;
9
8
  expression: string;
10
9
  value: number;
11
- editedExpressions: MemberParam<ExprMemToModify[]>;
10
+ editedExpressions: MemberParam<{
11
+ name: string;
12
+ value: string | number;
13
+ }[]>;
12
14
  rename: boolean;
13
15
  setRename: React.Dispatch<React.SetStateAction<boolean>>;
14
16
  }>;
@@ -1,3 +1,5 @@
1
- import { ExprMemToModify } from '@buerli.io/classcad';
2
1
  import { MemberParam } from '../../../../types';
3
- export declare function useEditedExpressionsParam(): MemberParam<ExprMemToModify[]>;
2
+ export declare function useEditedExpressionsParam(): MemberParam<{
3
+ name: string;
4
+ value: string | number;
5
+ }[]>;
@@ -1,17 +1,7 @@
1
1
  import React from 'react';
2
2
  import { DrawingID } from '@buerli.io/core';
3
- import { MemberParam, APIParam } from '../../../../types';
4
- /** @deprecated */
3
+ import { MemberParam } from '../../../../types';
5
4
  export declare const NumberEditor: React.FC<{
6
- param: MemberParam<APIParam<number>>;
7
- drawingId: DrawingID;
8
- iconUrl?: string;
9
- caption?: string;
10
- validator?: (numParam: APIParam<number>, pName?: string) => string[];
11
- allowExpr?: boolean;
12
- children?: React.ReactNode;
13
- }>;
14
- export declare const NumberEditor_v1: React.FC<{
15
5
  param: MemberParam<number | string>;
16
6
  drawingId: DrawingID;
17
7
  iconUrl?: string;
@@ -1,9 +1,5 @@
1
1
  import { DrawingID, ObjectID } from '@buerli.io/core';
2
- import { MemberParam, APIParam } from '../../../../types';
3
- /** @deprecated */
2
+ import { MemberParam } from '../../../../types';
4
3
  export declare function useNumParam(drawingId: DrawingID, objId: ObjectID, memberName: string, options?: {
5
4
  angle: boolean;
6
- }): MemberParam<APIParam<number>>;
7
- export declare function useNumParam_v1(drawingId: DrawingID, objId: ObjectID, memberName: string, options?: {
8
- angle: boolean;
9
5
  }): MemberParam<number | string>;
@@ -1,15 +1,7 @@
1
1
  import React from 'react';
2
- import { DrawingID, PointMemValue, ScgPoint } from '@buerli.io/core';
3
- import { MemberParam, APIParam } from '../../../../types';
4
- /** @deprecated */
2
+ import { DrawingID, ScgPoint } from '@buerli.io/core';
3
+ import { MemberParam } from '../../../../types';
5
4
  export declare const PointEditor: React.FC<{
6
- param: MemberParam<APIParam<PointMemValue>>;
7
- drawingId: DrawingID;
8
- iconUrl?: string;
9
- caption?: string;
10
- validator?: (x: APIParam<PointMemValue>, pName?: string) => string[];
11
- }>;
12
- export declare const PointEditor_v1: React.FC<{
13
5
  param: MemberParam<ScgPoint | string>;
14
6
  drawingId: DrawingID;
15
7
  iconUrl?: string;
@@ -1,7 +1,5 @@
1
- import { DrawingID, PointMemValue, ObjectID, ScgPoint } from '@buerli.io/core';
2
- import { MemberParam, APIParam } from '../../../../types';
3
- /** @deprecated */
1
+ import { DrawingID, ObjectID, ScgPoint } from '@buerli.io/core';
2
+ import { MemberParam } from '../../../../types';
4
3
  export declare function usePointParam(drawingId: DrawingID, objId: ObjectID, memberName: string, options?: {
5
4
  angle: boolean;
6
- }): MemberParam<APIParam<PointMemValue>>;
7
- export declare function usePointParam_v1(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<ScgPoint | string>;
5
+ }): MemberParam<ScgPoint | string>;
@@ -1,4 +1,4 @@
1
- import { DrawingID, IStructureObject } from '@buerli.io/core';
1
+ import { DrawingID, ScgObject } from '@buerli.io/core';
2
2
  export declare class ChainFinder {
3
3
  private tree;
4
4
  private drawingId;
@@ -10,5 +10,5 @@ export declare class ChainFinder {
10
10
  private findIncCurve;
11
11
  private findIncCurves;
12
12
  private getPointId;
13
- findChained(curve: IStructureObject): IStructureObject[];
13
+ findChained(curve: ScgObject): ScgObject[];
14
14
  }
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { DrawingID, IStructureTree, ObjectID, SelectorID, SelectedItem } from '@buerli.io/core';
2
+ import { DrawingID, ScgTree, ObjectID, SelectorID, SelectedItem } from '@buerli.io/core';
3
3
  import { MemberParam } from '../../../../types';
4
4
  import { SelectorsOrderT } from '../../../../utils/selection/useSelectorsOrder';
5
- export declare const isGeometry: (tree: IStructureTree, objId: ObjectID) => boolean;
5
+ export declare const isGeometry: (tree: ScgTree, objId: ObjectID) => boolean;
6
6
  export declare const getInteractionInfo: (drawingId: DrawingID, item: SelectedItem | null) => import("@buerli.io/core").InteractionInfo<any> | null;
7
7
  export declare const RefEditor: React.FC<{
8
8
  param: MemberParam<ObjectID[]> | MemberParam<ObjectID>;
@@ -2,9 +2,9 @@ import { DrawingID, ObjectID } from '@buerli.io/core';
2
2
  import { FlipType, ReorientedType } from '@buerli.io/classcad';
3
3
  import { MemberParam } from '../../../../types';
4
4
  export declare type MateParam = {
5
- matePath: ObjectID[] | undefined;
6
- wcsId: ObjectID | undefined;
5
+ path: ObjectID[] | undefined;
6
+ csys: ObjectID | undefined;
7
7
  flip: FlipType;
8
- reoriented: ReorientedType;
8
+ reorient: ReorientedType;
9
9
  };
10
10
  export declare function useMateParam(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<MateParam>;
@@ -1,5 +1,5 @@
1
- import { DrawingID, ObjectID, SelectedItem, IStructureTree } from '@buerli.io/core';
2
- export declare function getGraphicId(tree: IStructureTree, refOrObjId: ObjectID): {
1
+ import { DrawingID, ObjectID, SelectedItem, ScgTree } from '@buerli.io/core';
2
+ export declare function getGraphicId(tree: ScgTree, refOrObjId: ObjectID): {
3
3
  graphicId: number;
4
4
  isSolid: boolean;
5
5
  };
@@ -1,5 +1,3 @@
1
1
  import { DrawingID, ObjectID } from '@buerli.io/core';
2
2
  import { MemberParam } from '../../../../types';
3
- /** @deprecated */
4
3
  export declare function useTypeParam(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<number>;
5
- export declare function useTypeParam_v1(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<number>;
@@ -7,14 +7,14 @@ export declare type CustomCSys = {
7
7
  matrix: THREE.Matrix4;
8
8
  userData: {
9
9
  csysId: ObjectID;
10
- matePath: ObjectID[];
10
+ path: ObjectID[];
11
11
  };
12
12
  };
13
13
  export declare type CSysUserData = {
14
- matePath: ObjectID[];
14
+ path: ObjectID[];
15
15
  csysId: ObjectID;
16
16
  flip?: FlipType;
17
- reoriented?: ReorientedType;
17
+ reorient?: ReorientedType;
18
18
  isSelected?: boolean;
19
19
  isActive?: boolean;
20
20
  onHUD?: boolean;
@@ -37,8 +37,8 @@ export declare const CSysDisplayContext: React.Context<CSysDisplayContextProps>;
37
37
  export declare const CSysWrapper: React.FC<{
38
38
  drawingId: DrawingID;
39
39
  csys?: React.FC<CustomCSys>;
40
- onPointerMove?: (csysId_: ObjectID, matePath_: ObjectID[]) => void;
41
- onPointerOut?: (csysId_: ObjectID, matePath_: ObjectID[]) => void;
40
+ onPointerMove?: (csysId_: ObjectID, path_: ObjectID[]) => void;
41
+ onPointerOut?: (csysId_: ObjectID, path_: ObjectID[]) => void;
42
42
  userData: CSysUserData;
43
43
  }>;
44
44
  export declare const CSysDisplay: React.FC<{
@@ -4,9 +4,9 @@ import { FlipType, ReorientedType } from '@buerli.io/classcad';
4
4
  export declare const SelectedMateObj: React.FC<{
5
5
  drawingId: DrawingID;
6
6
  csysId: ObjectID;
7
- matePath: ObjectID[];
7
+ path: ObjectID[];
8
8
  flip: FlipType;
9
- reoriented: ReorientedType;
9
+ reorient: ReorientedType;
10
10
  color?: THREE.ColorRepresentation;
11
11
  opacity?: number;
12
12
  }>;
@@ -3,7 +3,7 @@ import * as THREE from 'three';
3
3
  import { DrawingID, ObjectID } from '@buerli.io/core';
4
4
  export declare const MatePathTransform: React.FC<{
5
5
  drawingId: DrawingID;
6
- matePath: ObjectID[];
6
+ path: ObjectID[];
7
7
  currentDepth?: number;
8
8
  matrix?: THREE.Matrix4;
9
9
  children?: React.ReactNode;
@@ -1,4 +1,4 @@
1
1
  import * as THREE from 'three';
2
2
  import { DrawingID, ObjectID } from '@buerli.io/core';
3
3
  import { FlipType, ReorientedType } from '@buerli.io/classcad';
4
- export declare const useCsysMatrix: (drawingId: DrawingID, csysId: ObjectID, flip: FlipType | undefined, reoriented: ReorientedType | undefined) => THREE.Matrix4;
4
+ export declare const useCsysMatrix: (drawingId: DrawingID, csysId: ObjectID, flip: FlipType | undefined, reorient: ReorientedType | undefined) => THREE.Matrix4;