@buerli.io/react-cad 0.10.0 → 0.11.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.
Files changed (27) hide show
  1. package/build/components/UI/CAD/PluginsWindows.d.ts +11 -0
  2. package/build/components/UI/CAD/common/Img.d.ts +1 -0
  3. package/build/components/UI/editors/ColorEditor/ColorEditor.d.ts +9 -0
  4. package/build/components/UI/editors/ColorEditor/index.d.ts +2 -0
  5. package/build/components/UI/editors/ColorEditor/useColorParam.d.ts +9 -0
  6. package/build/components/UI/editors/ToleranceEditor/ToleranceEditor.d.ts +7 -0
  7. package/build/components/UI/editors/ToleranceEditor/index.d.ts +2 -0
  8. package/build/components/UI/editors/ToleranceEditor/useToleranceParam.d.ts +3 -0
  9. package/build/index.cjs.js +1991 -1490
  10. package/build/index.d.ts +3 -1
  11. package/build/index.js +1980 -1481
  12. package/build/plugins/AppearanceEditor/Root.d.ts +7 -0
  13. package/build/plugins/AppearanceEditor/index.d.ts +7 -0
  14. package/build/plugins/Dimensions/DimContext.d.ts +5 -3
  15. package/build/plugins/Dimensions/Root.d.ts +1 -1
  16. package/build/plugins/Dimensions/View.d.ts +3 -3
  17. package/build/plugins/Dimensions/graphics/DimensionSet.d.ts +8 -0
  18. package/build/plugins/Dimensions/index.d.ts +5 -4
  19. package/build/plugins/Dimensions/utils.d.ts +2 -0
  20. package/build/plugins/Sketch/types.d.ts +2 -0
  21. package/build/plugins/Sketch/utils/Interaction.d.ts +4 -3
  22. package/build/plugins/Sketch/utils/getConstrEntities.d.ts +2 -0
  23. package/build/plugins/Twist/Root.d.ts +6 -0
  24. package/build/plugins/Twist/index.d.ts +4 -0
  25. package/build/plugins/components/PluginForm.d.ts +2 -1
  26. package/package.json +6 -6
  27. package/build/components/UI/CAD/Solids/ColorPicker.d.ts +0 -7
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { PluginID, DrawingID } from '@buerli.io/core';
3
+ export declare function Root({ drawingId, pluginId }: {
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }): JSX.Element;
7
+ export default Root;
@@ -0,0 +1,7 @@
1
+ import { ObjectID, PluginDescription } from '@buerli.io/core';
2
+ import { Root } from './Root';
3
+ declare type InternalState = {
4
+ solidIds: ObjectID[];
5
+ };
6
+ declare const description: PluginDescription<InternalState>;
7
+ export { Root, description };
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import * as THREE from 'three';
3
- import { DrawingID, PluginID } from '@buerli.io/core';
4
- export declare const DimContext: React.Context<{
3
+ import { DrawingID } from '@buerli.io/core';
4
+ export declare const DimSetContext: React.Context<{
5
5
  globalToLocalM: THREE.Matrix4;
6
- pluginId: PluginID;
7
6
  drawingId: DrawingID;
8
7
  }>;
8
+ export declare const DimContext: React.Context<{
9
+ globalToLocalM: THREE.Matrix4;
10
+ }>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { DrawingID, PluginID } from '@buerli.io/core';
2
+ import { PluginID, DrawingID } from '@buerli.io/core';
3
3
  export declare const Root: React.FC<{
4
4
  drawingId: DrawingID;
5
5
  pluginId: PluginID;
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { DrawingID, PluginID } from '@buerli.io/core';
3
- export declare const View: React.FC<{
3
+ export declare function View({ drawingId, pluginId }: {
4
4
  drawingId: DrawingID;
5
5
  pluginId: PluginID;
6
- }>;
6
+ }): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { DrawingID, ObjectID } from '@buerli.io/core';
3
+ export declare const DimensionSet: React.FC<{
4
+ drawingId: DrawingID;
5
+ objectId: ObjectID;
6
+ applyTransform?: boolean;
7
+ allowDeletion?: boolean;
8
+ }>;
@@ -1,4 +1,5 @@
1
- import { Plugin as PluginT } from '@buerli.io/core';
2
- export { useDimensionSetId } from './utils';
3
- declare const Plugin: PluginT;
4
- export { Plugin };
1
+ import { PluginDescription } from '@buerli.io/core';
2
+ import { View } from './View';
3
+ import { Root } from './Root';
4
+ declare const description: PluginDescription;
5
+ export { Root, View, description };
@@ -1,3 +1,5 @@
1
1
  import { DrawingID, ObjectID, IStructureObject } from '@buerli.io/core';
2
2
  export declare function useDimensionSetId(drawingId: DrawingID, ownerId: ObjectID): ObjectID | undefined;
3
3
  export declare const isAngular: (dim: IStructureObject) => boolean;
4
+ export declare const isRadial: (dim: IStructureObject) => boolean;
5
+ export declare const isDiameter: (dim: IStructureObject) => boolean;
@@ -9,6 +9,7 @@ export declare type HighlightedConstraintsT = Array<{
9
9
  }>;
10
10
  export declare type SketchPState = {
11
11
  alwaysShowConstr: boolean;
12
+ showCoincidence: boolean;
12
13
  constraintsToGeometry: {
13
14
  [key: number]: ObjectID;
14
15
  };
@@ -24,6 +25,7 @@ export declare type SketchPState = {
24
25
  interaction: {
25
26
  cycle: number;
26
27
  objects: ObjectID[];
28
+ lastPos: THREE.Vector3 | undefined;
27
29
  };
28
30
  isDragged: boolean;
29
31
  scale: number;
@@ -1,5 +1,6 @@
1
+ import * as THREE from 'three';
1
2
  import { DrawingID, PluginID, ObjectID } from '@buerli.io/core';
2
- export declare const hover: (drawingId: DrawingID, pluginId: PluginID, hoveredId: ObjectID) => void;
3
- export declare const unhover: (drawingId: DrawingID, pluginId: PluginID, hoveredId: ObjectID) => void;
4
- export declare const select: (drawingId: DrawingID, selectedId: ObjectID) => void;
3
+ export declare const hover: (drawingId: DrawingID, pluginId: PluginID, objIds: ObjectID[], hoverPos?: THREE.Vector3) => void;
4
+ export declare const unhover: (drawingId: DrawingID, pluginId: PluginID, objId: ObjectID) => void;
5
+ export declare const select: (drawingId: DrawingID, pluginId: PluginID, selectedId: ObjectID) => void;
5
6
  export declare const tab: (drawingId: DrawingID, pluginId: PluginID) => void;
@@ -0,0 +1,2 @@
1
+ import { DrawingID, ObjectID } from '@buerli.io/core';
2
+ export declare const getConstrEntities: (drawingId: DrawingID, constrId: ObjectID) => number[];
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const Root: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1,4 @@
1
+ import { PluginDescription } from '@buerli.io/core';
2
+ import { Root } from './Root';
3
+ declare const description: PluginDescription;
4
+ export { Root, description };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { DrawingID } from '@buerli.io/core';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
3
  import { MemberParam } from '../../types';
4
4
  /**
5
5
  * @param drawingId - id of the drawing.
@@ -14,6 +14,7 @@ import { MemberParam } from '../../types';
14
14
  */
15
15
  export declare const PluginForm: React.FC<{
16
16
  drawingId: DrawingID;
17
+ pluginId: PluginID;
17
18
  update: () => Promise<void>;
18
19
  params: Record<string, MemberParam<any>>;
19
20
  children?: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buerli.io/react-cad",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "buerli CAD components",
5
5
  "author": "AWV Informatik AG <info@awv-informatik.ch>",
6
6
  "repository": {},
@@ -37,8 +37,8 @@
37
37
  "@babel/preset-env": "^7.15.0",
38
38
  "@babel/preset-react": "^7.14.5",
39
39
  "@babel/preset-typescript": "^7.10.4",
40
- "@buerli.io/icons": "^1.0.11",
41
- "@react-three/drei": "9.77.1",
40
+ "@buerli.io/icons": "^1.0.12",
41
+ "@react-three/drei": "9.92.3",
42
42
  "@react-three/fiber": "8.13.0",
43
43
  "@rollup/plugin-babel": "^5.3.0",
44
44
  "@rollup/plugin-image": "^2.1.0",
@@ -84,14 +84,14 @@
84
84
  "typescript": "4.8.4"
85
85
  },
86
86
  "peerDependencies": {
87
- "@react-three/drei": ">=9.77.1",
87
+ "@react-three/drei": ">=9.92.3",
88
88
  "@react-three/fiber": ">=8.13.0",
89
89
  "three": ">=0.153",
90
90
  "react": ">=18.0"
91
91
  },
92
92
  "dependencies": {
93
- "@buerli.io/classcad": "0.10.0",
94
- "@buerli.io/react": "0.10.0",
93
+ "@buerli.io/classcad": "0.11.0",
94
+ "@buerli.io/react": "0.11.0",
95
95
  "@dnd-kit/core": "^6.0.8",
96
96
  "@dnd-kit/modifiers": "^6.0.1",
97
97
  "@dnd-kit/sortable": "^7.0.2",
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import './colorPicker.css';
3
- import { DrawingID, ObjectID } from '@buerli.io/core';
4
- export declare const ColorPicker: React.FC<{
5
- drawingId: DrawingID;
6
- solidId: ObjectID;
7
- }>;