@buerli.io/react-cad 0.5.0 → 0.6.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.
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare type PBContextProps = {
3
+ pluginBoundsRef: React.MutableRefObject<HTMLDivElement>;
4
+ };
5
+ export declare const PBContext: React.Context<PBContextProps>;
6
+ export declare const PluginBounds: React.FC<{
7
+ children?: React.ReactNode;
8
+ }>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { TooltipProps } from 'antd';
3
+ declare type PluginTooltipT = Omit<TooltipProps, 'color' | 'placement' | 'open' | 'align' | 'onOpenChange'>;
4
+ export declare const PluginTooltip: React.FC<PluginTooltipT>;
5
+ export {};
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { DrawingID, ObjectID } from '@buerli.io/core';
3
2
  import './colorPicker.css';
3
+ import { DrawingID, ObjectID } from '@buerli.io/core';
4
4
  export declare const ColorPicker: React.FC<{
5
5
  drawingId: DrawingID;
6
6
  solidId: ObjectID;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { DrawingID, ObjectID } from '@buerli.io/core';
3
2
  import 'antd/dist/antd.css';
3
+ import { DrawingID, ObjectID } from '@buerli.io/core';
4
4
  import { MenuItems } from '../common/Menu';
5
5
  export declare function useMenuItems(drawingId: DrawingID, featureId: ObjectID, isActive: boolean, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuItems;
@@ -1,14 +1,10 @@
1
1
  import React from 'react';
2
2
  import { DrawingID, ObjectID, PluginID } from '@buerli.io/core';
3
- export declare type TableDataT = {
4
- prodId: ObjectID;
5
- key: ObjectID;
6
- notCreated?: boolean;
7
- type?: 'asm' | 'part';
8
- }[];
9
- export declare const ProdTable: React.FC<{
3
+ export declare const ProdList: React.FC<{
10
4
  drawingId: DrawingID;
11
5
  pluginId: PluginID;
12
- data: TableDataT;
13
- setCreateMode?: React.Dispatch<React.SetStateAction<boolean>>;
6
+ prodIds: ObjectID[];
7
+ type: 'part' | 'asm';
8
+ createMode: boolean;
9
+ setCreateMode: React.Dispatch<React.SetStateAction<boolean>>;
14
10
  }>;
@@ -0,0 +1,5 @@
1
+ import { ObjectID } from '@buerli.io/core';
2
+ export declare type PMPluginState = {
3
+ product: ObjectID | null;
4
+ selected: ObjectID[];
5
+ };
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import 'antd/dist/antd.css';
3
3
  import { DrawingID, ObjectID, PluginID } from '@buerli.io/core';
4
4
  import { MenuItems } from '../../common/Menu';
5
- export declare function useMenuItems(drawingId: DrawingID, prodId: ObjectID, setEditName: React.Dispatch<React.SetStateAction<boolean>>, pluginId: PluginID): MenuItems;
5
+ export declare function useMenuItems(drawingId: DrawingID, pluginId: PluginID, prodId: ObjectID, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuItems;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { MemberParam } from '../../../../types';
3
2
  import { ExprMemToModify } from '@buerli.io/classcad';
3
+ import { MemberParam } from '../../../../types';
4
4
  export declare const ExpressionEditor: React.FC<{
5
5
  name: string;
6
6
  expression: string;
@@ -6,6 +6,7 @@ export declare const NumOrExpr: React.FC<{
6
6
  valOrExpr: number | string;
7
7
  onChange: any;
8
8
  defaults: number | string;
9
+ angle?: boolean;
9
10
  allowExpr?: boolean;
10
11
  prefix?: string;
11
12
  }>;
@@ -12,7 +12,9 @@ import { MemberParam } from '../../../types';
12
12
  * @param validation - Custom validation (used in useMateParam, useRefsParam. - these params has an array in userValue, so we need to apply validateF for each element from array).
13
13
  * @returns
14
14
  */
15
- export declare function useParam<T>(param: Omit<MemberParam<T>, 'serverValue' | 'validator' | 'setValidator'>, getServValue?: (x: T) => T, validation?: {
15
+ export declare function useParam<T>(param: Omit<MemberParam<T>, 'serverValue' | 'validator' | 'setValidator' | 'options'>, getServValue?: (x: T) => T, validation?: {
16
16
  validator: () => string[];
17
17
  setValidator: (...args: any[]) => void;
18
+ }, options?: {
19
+ [key: string]: any;
18
20
  }): MemberParam<T>;