@buerli.io/react-cad 0.3.0-beta.0 → 0.4.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.
@@ -1,18 +1,7 @@
1
- /// <reference types="react" />
2
- import { PluginDescription, ObjectID } from '@buerli.io/core';
1
+ import { ObjectID, Plugin as PluginT } from '@buerli.io/core';
3
2
  export { useDimensionSetId } from './utils';
4
3
  export declare type DimensionsPState = {
5
4
  selected: ObjectID[];
6
5
  };
7
- declare const Plugin: {
8
- Root: import("react").FC<{
9
- drawingId: import("@buerli.io/core/build/store/states/drawing").DrawingID;
10
- pluginId: import("@buerli.io/core/build/store/states/plugin").PluginID;
11
- }>;
12
- View: import("react").FC<{
13
- drawingId: import("@buerli.io/core/build/store/states/drawing").DrawingID;
14
- pluginId: import("@buerli.io/core/build/store/states/plugin").PluginID;
15
- }>;
16
- description: PluginDescription<any>;
17
- };
6
+ declare const Plugin: PluginT;
18
7
  export { Plugin };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DrawingID, PluginID } from '@buerli.io/core';
3
+ export declare const Digits: React.FC<{
4
+ drawingId: DrawingID;
5
+ pluginId: PluginID;
6
+ }>;
@@ -0,0 +1 @@
1
+ export declare const defaultNumberOfDigits = 3;
@@ -3,16 +3,19 @@ import * as THREE from 'three';
3
3
  export declare const Distance: React.FC<{
4
4
  p1: THREE.Vector3;
5
5
  p2: THREE.Vector3;
6
- result: string | number;
6
+ result: number;
7
+ digits?: number;
7
8
  }>;
8
9
  export declare const Angle: React.FC<{
9
10
  center: THREE.Vector3;
10
11
  dir1: THREE.Vector3;
11
12
  dir2: THREE.Vector3;
12
- result: string | number;
13
+ result: number;
14
+ digits?: number;
13
15
  }>;
14
16
  export declare const Position: React.FC<{
15
17
  pos: THREE.Vector3;
18
+ radius?: number;
16
19
  result?: string;
17
20
  }>;
18
21
  export declare const Vector: React.FC<{
@@ -1,8 +1,9 @@
1
- import { PluginDescription, MeasureResult } from '@buerli.io/core';
1
+ import { MeasureResult, PluginDescription } from '@buerli.io/core';
2
2
  import { Root } from './Root';
3
3
  import { View } from './View';
4
4
  declare type InternalState = {
5
5
  measuredItems: MeasureResult[];
6
+ digits: number;
6
7
  };
7
8
  declare const description: PluginDescription<InternalState>;
8
9
  export { Root, View, description };
@@ -0,0 +1 @@
1
+ export declare const vectorToString: (point: THREE.Vector3, digits: number) => string;
@@ -3,8 +3,6 @@ export declare const constraintsHelpers: {
3
3
  [key: string]: {
4
4
  type: string;
5
5
  name: string;
6
- isParametric: boolean;
7
- isCommutative: boolean;
8
6
  adapt: (entities: number[], tree: IStructureTree) => number[][] | undefined;
9
7
  };
10
8
  };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const Position: React.FC;
@@ -23,6 +23,10 @@ export declare type SketchPState = {
23
23
  selected: ObjectID[];
24
24
  hovered: ObjectID;
25
25
  highlighted: ObjectID[];
26
+ interaction: {
27
+ cycle: number;
28
+ objects: ObjectID[];
29
+ };
26
30
  isDragged: boolean;
27
31
  scale: number;
28
32
  step: number;
@@ -2,3 +2,4 @@ import { DrawingID, PluginID, ObjectID } from '@buerli.io/core';
2
2
  export declare const hover: (drawingId: DrawingID, pluginId: PluginID, hoveredId: ObjectID) => void;
3
3
  export declare const unhover: (drawingId: DrawingID, pluginId: PluginID, hoveredId: ObjectID) => void;
4
4
  export declare const select: (drawingId: DrawingID, pluginId: PluginID, selectedId: ObjectID) => void;
5
+ export declare const tab: (drawingId: DrawingID, pluginId: PluginID) => void;
@@ -0,0 +1,2 @@
1
+ import { IStructureObject } from '@buerli.io/core';
2
+ export declare function getGeometryPriority(object: IStructureObject): 1 | 2 | 3 | 4 | -1 | 5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buerli.io/react-cad",
3
- "version": "0.3.0-beta.0",
3
+ "version": "0.4.1",
4
4
  "description": "buerli CAD components",
5
5
  "author": "AWV Informatik AG <info@awv-informatik.ch>",
6
6
  "repository": {},
@@ -46,7 +46,7 @@
46
46
  "@babel/preset-env": "^7.15.0",
47
47
  "@babel/preset-react": "^7.14.5",
48
48
  "@babel/preset-typescript": "^7.10.4",
49
- "@buerli.io/icons": "^1.0.9",
49
+ "@buerli.io/icons": "^1.0.10",
50
50
  "@react-three/drei": "8.16.6",
51
51
  "@react-three/fiber": "7.0.19",
52
52
  "@rollup/plugin-babel": "^5.3.0",
@@ -97,8 +97,8 @@
97
97
  },
98
98
  "dependencies": {
99
99
  "@ant-design/compatible": "^1.0.8",
100
- "@buerli.io/classcad": "0.3.0-beta.0",
101
- "@buerli.io/react": "0.3.0-beta.0",
100
+ "@buerli.io/classcad": "0.4.1",
101
+ "@buerli.io/react": "0.4.1",
102
102
  "@react-three/postprocessing": "2.3.1",
103
103
  "antd": ">=4.15.3 <4.17",
104
104
  "path-browserify": "^1.0.1",