@buerli.io/react-cad 0.4.1 → 0.5.0-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 (43) hide show
  1. package/build/components/UI/CAD/Messages/msgStore.d.ts +1 -1
  2. package/build/components/UI/CAD/common/LoadingScreen/LoadingScreen.d.ts +1 -0
  3. package/build/components/UI/CAD/common/SectionHeader.d.ts +3 -1
  4. package/build/components/UI/CAD/store/CADStore.d.ts +2 -3
  5. package/build/components/UI/editors/ExpressionEditor/ExpressionEditor.d.ts +3 -5
  6. package/build/components/UI/editors/ExpressionEditor/index.d.ts +0 -3
  7. package/build/components/UI/editors/ExpressionEditor/useExpressionsParam.d.ts +2 -2
  8. package/build/components/UI/editors/NumberEditor/NumOrExpr.d.ts +1 -1
  9. package/build/components/UI/editors/NumberEditor/NumberEditor.d.ts +1 -1
  10. package/build/components/UI/editors/RefsEditors/MateEditor.d.ts +2 -2
  11. package/build/components/UI/editors/RefsEditors/RefEditor.d.ts +1 -0
  12. package/build/components/UI/editors/RefsEditors/RefsEditor.d.ts +1 -0
  13. package/build/components/UI/editors/RefsEditors/useMateParam.d.ts +7 -2
  14. package/build/components/UI/editors/Wrapper.d.ts +2 -0
  15. package/build/components/graphics/HUD.d.ts +3 -1
  16. package/build/components/graphics/utils/MatePathTransform.d.ts +1 -0
  17. package/build/components/utils/CompValidation/ErrorBoundary.d.ts +1 -0
  18. package/build/components/utils/CompValidation/validators/CSysDisplayValidator.d.ts +1 -0
  19. package/build/components/utils/CompValidation/validators/DrawingValidator.d.ts +1 -0
  20. package/build/components/utils/CompValidation/validators/ExpressionsValidator.d.ts +1 -0
  21. package/build/components/utils/CompValidation/validators/FPluginValidator.d.ts +1 -0
  22. package/build/components/utils/CompValidation/validators/FeatureListValidator.d.ts +1 -0
  23. package/build/components/utils/CompValidation/validators/ProductManagementValidator.d.ts +1 -0
  24. package/build/index.cjs.js +2037 -2598
  25. package/build/index.d.ts +2 -1
  26. package/build/index.js +2040 -2600
  27. package/build/plugins/HLConstraints/components/Limits.d.ts +1 -1
  28. package/build/plugins/HLConstraints/validators.d.ts +1 -1
  29. package/build/plugins/Sketch/Root/Constraints/constraintsHelpers.d.ts +17 -6
  30. package/build/plugins/Sketch/Root/CopyPatterns.d.ts +1 -3
  31. package/build/plugins/Sketch/Root/SketchGroup.d.ts +8 -0
  32. package/build/plugins/Sketch/Root/useLayoutSize.d.ts +11 -0
  33. package/build/plugins/Sketch/View/graphics/Merged/Arc.d.ts +1 -1
  34. package/build/plugins/Sketch/View/graphics/Merged/MergedWrapper.d.ts +3 -1
  35. package/build/plugins/Sketch/View/graphics/MousePosition.d.ts +2 -0
  36. package/build/plugins/Sketch/View/graphics/hooks.d.ts +2 -2
  37. package/build/plugins/Sketch/View/graphics/scale.d.ts +1 -1
  38. package/build/plugins/Sketch/types.d.ts +1 -0
  39. package/build/utils/FileUtils.d.ts +2 -2
  40. package/build/utils/useRetainVisibility.d.ts +2 -0
  41. package/build/utils/useScale.d.ts +1 -1
  42. package/build/utils/validation.d.ts +1 -1
  43. package/package.json +26 -25
@@ -13,5 +13,5 @@ declare function createApi(set: SetState<StoreT>): {
13
13
  deleteMsg: (msgId: string) => void;
14
14
  setShown: () => void;
15
15
  };
16
- export declare const useMsgStore: import("zustand").UseStore<StoreT>;
16
+ export declare const useMsgStore: import("zustand").UseBoundStore<import("zustand").StoreApi<StoreT>>;
17
17
  export {};
@@ -2,4 +2,5 @@ import React from 'react';
2
2
  export declare const LoadingScreen: React.FC<{
3
3
  isLoading?: boolean;
4
4
  style?: React.CSSProperties;
5
+ children?: React.ReactNode;
5
6
  }>;
@@ -1,2 +1,4 @@
1
1
  import React from 'react';
2
- export declare const SectionHeader: React.FC;
2
+ export declare const SectionHeader: React.FC<{
3
+ children?: React.ReactNode;
4
+ }>;
@@ -1,5 +1,4 @@
1
1
  import { ObjectID } from '@buerli.io/core';
2
- import { GetState } from 'zustand';
3
2
  import { appApi } from './CADActions';
4
3
  export declare type CADStateT = {
5
4
  assemblyTree: {
@@ -15,6 +14,6 @@ declare const CADApi: import("zustand").StoreApi<CADStateT>;
15
14
  /**
16
15
  * We need separate store for CAD components. It might contain auxiliary information like stack of current products or camera api.
17
16
  */
18
- declare const useCADStore: import("zustand").UseStore<CADStateT>;
19
- declare const getCADState: GetState<CADStateT>;
17
+ declare const useCADStore: import("zustand").UseBoundStore<import("zustand").StoreApi<CADStateT>>;
18
+ declare const getCADState: () => CADStateT;
20
19
  export { useCADStore, CADApi, getCADState };
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
- import { MemberType, PointMemValue } from '@buerli.io/core';
3
2
  import { MemberParam } from '../../../../types';
4
- import { EditedExpression } from '.';
3
+ import { ExprMemToModify } from '@buerli.io/classcad';
5
4
  export declare const ExpressionEditor: React.FC<{
6
5
  name: string;
7
6
  expression: string;
8
- value: string | number | PointMemValue;
9
- type: MemberType;
10
- editedExpressions: MemberParam<EditedExpression[]>;
7
+ value: number;
8
+ editedExpressions: MemberParam<ExprMemToModify[]>;
11
9
  deleted: boolean;
12
10
  }>;
@@ -1,5 +1,2 @@
1
1
  export * from './ExpressionEditor';
2
2
  export * from './useExpressionsParam';
3
- import { PointMemValue } from '@buerli.io/core';
4
- import { APIParam } from '../../../../types';
5
- export declare type EditedExpression = [string, APIParam<number | PointMemValue | string>];
@@ -1,4 +1,4 @@
1
1
  import { MemberParam } from '../../../../types';
2
- import { EditedExpression } from '.';
3
- export declare function useEditedExpressionsParam(): MemberParam<EditedExpression[]>;
2
+ import { ExprMemToModify } from '@buerli.io/classcad';
3
+ export declare function useEditedExpressionsParam(): MemberParam<ExprMemToModify[]>;
4
4
  export declare function useDeletedExpressionsParam(): MemberParam<string[]>;
@@ -4,7 +4,7 @@ export declare const NumOrExpr: React.FC<{
4
4
  drawingId: DrawingID;
5
5
  valOrExpr: number | string;
6
6
  onChange: any;
7
- onUpdate?: any;
8
7
  defaults: number | string;
9
8
  allowExpr?: boolean;
9
+ prefix?: string;
10
10
  }>;
@@ -5,7 +5,7 @@ export declare const NumberEditor: React.FC<{
5
5
  param: MemberParam<APIParam<number>>;
6
6
  drawingId: DrawingID;
7
7
  caption?: string;
8
- onUpdate?: any;
9
8
  validator?: (numParam: APIParam<number>, pName?: string) => string[];
10
9
  allowExpr?: boolean;
10
+ children?: React.ReactNode;
11
11
  }>;
@@ -1,10 +1,10 @@
1
1
  import { DrawingID, ObjectID } from '@buerli.io/core';
2
2
  import React from 'react';
3
3
  import { MemberParam } from '../../../../types';
4
- import { Mate } from './useMateParam';
5
4
  import { SelectorsOrderT } from '../../../../utils/selection/useSelectorsOrder';
5
+ import { MateParam } from './useMateParam';
6
6
  export declare const MateEditor: React.FC<{
7
- param: MemberParam<Mate>;
7
+ param: MemberParam<MateParam>;
8
8
  drawingId: DrawingID;
9
9
  caption?: string;
10
10
  selectorsOrder?: SelectorsOrderT;
@@ -13,6 +13,7 @@ export declare const RefEditor: React.FC<{
13
13
  idxOfRef?: number;
14
14
  selectorsOrder?: SelectorsOrderT;
15
15
  validator?: (ref: ObjectID, pName?: string) => string[];
16
+ children?: React.ReactNode;
16
17
  }>;
17
18
  export declare const GrItemRestorer: React.FC<{
18
19
  drawingId: DrawingID;
@@ -11,4 +11,5 @@ export declare const RefsEditor: React.FC<{
11
11
  selectorsOrder?: SelectorsOrderT;
12
12
  maxLen?: number;
13
13
  sketchLines?: boolean;
14
+ children?: React.ReactNode;
14
15
  }>;
@@ -1,5 +1,10 @@
1
1
  import { DrawingID, ObjectID } from '@buerli.io/core';
2
2
  import { FlipType, ReorientedType } from '@buerli.io/classcad';
3
3
  import { MemberParam } from '../../../../types';
4
- export declare type Mate = [ObjectID[] | undefined, ObjectID | undefined, FlipType, ReorientedType];
5
- export declare function useMateParam(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<Mate>;
4
+ export declare type MateParam = {
5
+ matePath: ObjectID[] | undefined;
6
+ wcsId: ObjectID | undefined;
7
+ flip: FlipType;
8
+ reoriented: ReorientedType;
9
+ };
10
+ export declare function useMateParam(drawingId: DrawingID, objId: ObjectID, memberName: string): MemberParam<MateParam>;
@@ -3,4 +3,6 @@ export declare const Wrapper: React.FC<{
3
3
  highlighted?: boolean;
4
4
  minor?: boolean;
5
5
  caption: string | undefined;
6
+ contentWidth?: number;
7
+ children?: React.ReactNode;
6
8
  }>;
@@ -1,2 +1,4 @@
1
1
  import React from 'react';
2
- export declare const HUD: React.FC;
2
+ export declare const HUD: React.FC<{
3
+ children?: React.ReactNode;
4
+ }>;
@@ -6,4 +6,5 @@ export declare const MatePathTransform: React.FC<{
6
6
  matePath: ObjectID[];
7
7
  currentDepth?: number;
8
8
  matrix?: THREE.Matrix4;
9
+ children?: React.ReactNode;
9
10
  }>;
@@ -9,6 +9,7 @@ declare type State = {
9
9
  declare type Props = {
10
10
  showHtml?: boolean;
11
11
  warnings?: Warnings;
12
+ children?: React.ReactNode;
12
13
  };
13
14
  /**
14
15
  * Wrapper for components which are exported from package.
@@ -8,4 +8,5 @@ import { DrawingID } from '@buerli.io/core';
8
8
  */
9
9
  export declare const CSysDisplayValidator: React.FC<{
10
10
  drawingId: DrawingID;
11
+ children?: React.ReactNode;
11
12
  }>;
@@ -8,4 +8,5 @@ import { DrawingID } from '@buerli.io/core';
8
8
  */
9
9
  export declare const DrawingValidator: React.FC<{
10
10
  drawingId: DrawingID;
11
+ children?: React.ReactNode;
11
12
  }>;
@@ -8,4 +8,5 @@ import { DrawingID } from '@buerli.io/core';
8
8
  */
9
9
  export declare const ExpressionsValidator: React.FC<{
10
10
  drawingId: DrawingID;
11
+ children?: React.ReactNode;
11
12
  }>;
@@ -12,4 +12,5 @@ export declare const FtPluginValidator: React.FC<{
12
12
  drawingId: DrawingID;
13
13
  pluginId: PluginID;
14
14
  inCanvas?: boolean;
15
+ children?: React.ReactNode;
15
16
  }>;
@@ -8,4 +8,5 @@ import { DrawingID } from '@buerli.io/core';
8
8
  */
9
9
  export declare const FeatureListValidator: React.FC<{
10
10
  drawingId: DrawingID;
11
+ children?: React.ReactNode;
11
12
  }>;
@@ -10,4 +10,5 @@ export declare const ProductManagementValidator: React.FC<{
10
10
  drawingId: DrawingID;
11
11
  pluginId: PluginID;
12
12
  inCanvas?: boolean;
13
+ children?: React.ReactNode;
13
14
  }>;