@buerli.io/core 0.13.1-beta.4 → 0.13.1-beta.5.apiversion

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 (36) hide show
  1. package/build/cjs/geometry/ThreeGeometryCreator.js +28 -28
  2. package/build/cjs/graphic/filters.js +11 -11
  3. package/build/cjs/index.js +1 -0
  4. package/build/cjs/re-export.js +29 -0
  5. package/build/cjs/store/states/selection.js +6 -6
  6. package/build/cjs/types/index.js +17 -3
  7. package/build/cjs/utils/Measure.js +56 -56
  8. package/build/esm/geometry/ThreeGeometryCreator.js +1 -1
  9. package/build/esm/graphic/filters.js +1 -1
  10. package/build/esm/index.js +1 -0
  11. package/build/esm/re-export.js +23 -0
  12. package/build/esm/store/states/selection.js +6 -6
  13. package/build/esm/store/states/structure.js +1 -1
  14. package/build/esm/types/index.js +15 -3
  15. package/build/esm/utils/Measure.js +1 -1
  16. package/build/types/geometry/ThreeGeometryCreator.d.ts +12 -12
  17. package/build/types/graphic/filters.d.ts +1 -1
  18. package/build/types/index.d.ts +1 -0
  19. package/build/types/re-export.d.ts +70 -0
  20. package/build/types/store/states/geometry.d.ts +1 -2
  21. package/build/types/store/states/graphic.d.ts +1 -2
  22. package/build/types/store/states/plugin.d.ts +1 -1
  23. package/build/types/store/states/selection.d.ts +13 -6
  24. package/build/types/store/states/structure.d.ts +1 -1
  25. package/build/types/types/InteractionInfo.d.ts +1 -2
  26. package/build/types/types/index.d.ts +6 -3
  27. package/package.json +4 -3
  28. package/build/cjs/types/IGraphicPackage.js +0 -46
  29. package/build/cjs/types/IStructurePatch.js +0 -2
  30. package/build/cjs/types/IStructureTree.js +0 -28
  31. package/build/esm/types/IGraphicPackage.js +0 -43
  32. package/build/esm/types/IStructurePatch.js +0 -1
  33. package/build/esm/types/IStructureTree.js +0 -24
  34. package/build/types/types/IGraphicPackage.d.ts +0 -160
  35. package/build/types/types/IStructurePatch.d.ts +0 -6
  36. package/build/types/types/IStructureTree.d.ts +0 -80
@@ -8,7 +8,7 @@ export const selectionData = () => ({
8
8
  active: null,
9
9
  });
10
10
  export const selectionApi = (set, get, buerliApi) => ({
11
- unselectAll(selectorId) {
11
+ unselectAll(selectorId, options) {
12
12
  const { selection, id: drawingId } = get();
13
13
  const selId = (selectorId || selection.active);
14
14
  if (selId) {
@@ -19,7 +19,7 @@ export const selectionApi = (set, get, buerliApi) => ({
19
19
  }
20
20
  unsubscribeItems(buerliApi, drawingId, selId, unselItems);
21
21
  if (selector.customUnSelect) {
22
- selector.customUnSelect(selId, [], unselItems);
22
+ selector.customUnSelect(selId, [], unselItems, options);
23
23
  }
24
24
  else {
25
25
  set(state => {
@@ -31,7 +31,7 @@ export const selectionApi = (set, get, buerliApi) => ({
31
31
  }
32
32
  }
33
33
  },
34
- unselect(items, selectorId) {
34
+ unselect(items, selectorId, options) {
35
35
  const { selection, id: drawingId } = get();
36
36
  const selId = (selectorId || selection.active);
37
37
  if (selId) {
@@ -45,7 +45,7 @@ export const selectionApi = (set, get, buerliApi) => ({
45
45
  const diff = selector.items.filter(item1 => {
46
46
  return newItems.find(item2 => item2.id === item1.id) === undefined;
47
47
  });
48
- selector.customUnSelect(selId, newItems, diff);
48
+ selector.customUnSelect(selId, newItems, diff, options);
49
49
  }
50
50
  else {
51
51
  set(state => {
@@ -57,7 +57,7 @@ export const selectionApi = (set, get, buerliApi) => ({
57
57
  this.setHovered(null, selId);
58
58
  }
59
59
  },
60
- select(items, selectorId) {
60
+ select(items, selectorId, options) {
61
61
  const { selection, api, id: drawingId } = get();
62
62
  const selId = (selectorId || selection.active);
63
63
  if (selId) {
@@ -95,7 +95,7 @@ export const selectionApi = (set, get, buerliApi) => ({
95
95
  const diff = result.filter(item1 => {
96
96
  return selector.items.find(item2 => item2.id === item1.id) === undefined;
97
97
  });
98
- selector.customSelect(selId, result, diff);
98
+ selector.customSelect(selId, result, diff, options);
99
99
  }
100
100
  else {
101
101
  // subscribe items which will be selected
@@ -1,7 +1,7 @@
1
1
  import fastpatch from 'fast-json-patch';
2
2
  import jsonpatch from 'jsonpatch';
3
3
  import * as THREE from 'three';
4
- import { DEFAULT_STRUCTURE_TREE, } from '../../types';
4
+ import { DEFAULT_STRUCTURE_TREE } from '../../types';
5
5
  import { MathUtils } from '../../utils/Math';
6
6
  ////////////////////////////////////////////////////
7
7
  // DATA
@@ -1,4 +1,16 @@
1
- export * from './IGraphicPackage';
1
+ import { NOID } from '../re-export';
2
2
  export * from './InteractionInfo';
3
- export * from './IStructurePatch';
4
- export * from './IStructureTree';
3
+ /**
4
+ * Defines the default structure tree.
5
+ * Should be used to initialize a new structure tree.
6
+ */
7
+ export const DEFAULT_STRUCTURE_TREE = () => {
8
+ return {
9
+ tree: {},
10
+ root: NOID,
11
+ currentProduct: NOID,
12
+ currentNode: NOID,
13
+ currentInstance: NOID,
14
+ testRoot: NOID,
15
+ };
16
+ };
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable max-lines */
2
2
  import * as THREE from 'three';
3
+ import { GraphicType } from '../re-export';
3
4
  import { getDrawing } from './../store';
4
- import { GraphicType } from './../types';
5
5
  export var MeasureResultType;
6
6
  (function (MeasureResultType) {
7
7
  MeasureResultType["NONE"] = "none";
@@ -1,5 +1,5 @@
1
1
  import * as THREE from 'three';
2
- import { GraphicID, GraphicType, IGraphicArc, IGraphicContainer, IGraphicEdge, IGraphicElement, IGraphicLine, IGraphicMesh, ObjectID } from './../types';
2
+ import { GraphicID, GraphicType, IGraphicArc, IGraphicContainer, IGraphicEdge, IGraphicElement, IGraphicLine, IGraphicMesh, ObjectID } from '../re-export';
3
3
  /**
4
4
  * Creates THREE geometry based on the data within a @see IGraphicContainer.
5
5
  */
@@ -15,7 +15,7 @@ export declare class ThreeGeometryCreator {
15
15
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
16
16
  };
17
17
  operationId: any;
18
- rawGraphic: IGraphicElement | null;
18
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
19
19
  };
20
20
  createGeometry(container: IGraphicContainer, color?: number[]): ContainerGeometryT;
21
21
  createSurface(mesh: IGraphicMesh, container: IGraphicContainer, color?: number[]): {
@@ -28,7 +28,7 @@ export declare class ThreeGeometryCreator {
28
28
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
29
29
  };
30
30
  operationId: any;
31
- rawGraphic: IGraphicElement | null;
31
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
32
32
  isValid: boolean;
33
33
  geometry: THREE.BufferGeometry<THREE.NormalBufferAttributes>;
34
34
  graphicId: number;
@@ -45,7 +45,7 @@ export declare class ThreeGeometryCreator {
45
45
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
46
46
  };
47
47
  operationId: any;
48
- rawGraphic: IGraphicElement | null;
48
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
49
49
  isValid: boolean;
50
50
  geometry: THREE.BufferGeometry<THREE.NormalBufferAttributes>;
51
51
  graphicId: number;
@@ -66,7 +66,7 @@ export declare class ThreeGeometryCreator {
66
66
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
67
67
  };
68
68
  operationId: any;
69
- rawGraphic: IGraphicElement | null;
69
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
70
70
  isValid: boolean;
71
71
  geometry: THREE.BufferGeometry<THREE.NormalBufferAttributes>;
72
72
  loops: number[][];
@@ -87,7 +87,7 @@ export declare class ThreeGeometryCreator {
87
87
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
88
88
  };
89
89
  operationId: any;
90
- rawGraphic: IGraphicElement | null;
90
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
91
91
  isValid: boolean;
92
92
  geometry: THREE.BufferGeometry<THREE.NormalBufferAttributes>;
93
93
  loops: number[][];
@@ -109,7 +109,7 @@ export declare class ThreeGeometryCreator {
109
109
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
110
110
  };
111
111
  operationId: any;
112
- rawGraphic: IGraphicElement | null;
112
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
113
113
  isValid: boolean;
114
114
  geometry: THREE.BufferGeometry<THREE.NormalBufferAttributes>;
115
115
  loops: number[][];
@@ -127,7 +127,7 @@ export declare class ThreeGeometryCreator {
127
127
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
128
128
  };
129
129
  operationId: any;
130
- rawGraphic: IGraphicElement | null;
130
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
131
131
  isValid: boolean;
132
132
  geometry: THREE.BufferGeometry<THREE.NormalBufferAttributes>;
133
133
  loops: number[][];
@@ -144,7 +144,7 @@ export declare class ThreeGeometryCreator {
144
144
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
145
145
  };
146
146
  operationId: any;
147
- rawGraphic: IGraphicElement | null;
147
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
148
148
  geometry: THREE.BufferGeometry<THREE.NormalBufferAttributes>;
149
149
  graphicId: number;
150
150
  type: GraphicType;
@@ -161,7 +161,7 @@ export declare class ThreeGeometryCreator {
161
161
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
162
162
  };
163
163
  operationId: any;
164
- rawGraphic: IGraphicElement | null;
164
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
165
165
  geometry: THREE.BufferGeometry<THREE.NormalBufferAttributes>;
166
166
  graphicId: number;
167
167
  type: GraphicType;
@@ -182,7 +182,7 @@ export declare class ThreeGeometryCreator {
182
182
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
183
183
  };
184
184
  operationId: any;
185
- rawGraphic: IGraphicElement | null;
185
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
186
186
  geometry: THREE.BufferGeometry<THREE.NormalBufferAttributes>;
187
187
  graphicId: number;
188
188
  type: GraphicType;
@@ -203,7 +203,7 @@ export declare class ThreeGeometryCreator {
203
203
  type: GraphicType.NONE | GraphicType.BREP | GraphicType.POLYBREP | GraphicType.CURVEARRAY;
204
204
  };
205
205
  operationId: any;
206
- rawGraphic: IGraphicElement | null;
206
+ rawGraphic: import("@classcad/api-js/build/types/scg/Scg").ScgGraphicElement | null;
207
207
  key: string;
208
208
  graphicId: number;
209
209
  type: GraphicType;
@@ -1,4 +1,4 @@
1
- import { GraphicType as GT } from '../types/IGraphicPackage';
1
+ import { GraphicType as GT } from '../re-export';
2
2
  export declare const lineFilter: (scope: string, data: GT) => boolean;
3
3
  export declare const edgeFilter: (scope: string, data: GT) => boolean;
4
4
  export declare const arcFilter: (scope: string, data: GT) => boolean;
@@ -6,6 +6,7 @@ export * from './utils/Measure';
6
6
  export * from './utils/Timing';
7
7
  export * from './store/subscribtion/subscribeToDrawing';
8
8
  export * from './graphic/filters';
9
+ export * from './re-export';
9
10
  /**
10
11
  * Because babel typescript tools can not handle the type definitions
11
12
  * in an other way, they have to be re-exported as you can see in this code region.
@@ -0,0 +1,70 @@
1
+ import { FacadeOptions, ScgArrayMem, ScgClassInheritance, ScgClassType, ScgContainerType, ScgCurveTypes, ScgEdgeTypes, ScgEntityTypes, ScgGraphicArc, ScgGraphicCone, ScgGraphicContainer, ScgGraphicCylinder, ScgGraphicEdge, ScgGraphicElement, ScgGraphicLine, ScgGraphicMesh, ScgGraphicPackage, ScgGraphicPlane, ScgGraphicSphere, ScgGraphicType, ScgIdMem, ScgMember, ScgMemberType, ScgMeshTypes, ScgObject, ScgPatch, ScgPoint, ScgPointMem, ScgPointTypes, ScgRealMem, ScgStringMem, ScgStructure, ScgTree } from '@classcad/api-js';
2
+ export { BooleanOperationType, ChamferType, DataType, ExtrusionType, FlipType, NOID, OrientationType, ReorientedType, SVGModusType, ViewType, WorkAxisType, WorkCoordSystemType, WorkPlaneType, WorkPointType, } from '@classcad/api-js';
3
+ export type { GraphicID, ObjectID, ObjectIdent, ScgArrayMem, ScgGraphicArc, ScgGraphicCone, ScgGraphicContainer, ScgGraphicCylinder, ScgGraphicEdge, ScgGraphicElement, ScgGraphicLine, ScgGraphicMesh, ScgGraphicPackage, ScgGraphicPlane, ScgGraphicSphere, ScgIdMem, ScgMember, ScgObject, ScgPatch, ScgPoint, ScgPointMem, ScgRealMem, ScgStringMem, ScgStructure, ScgTree, WorkGeomType, } from '@classcad/api-js';
4
+ export {
5
+ /** @deprecated */
6
+ ScgClassType as CCClasses,
7
+ /** @deprecated */
8
+ ScgClassInheritance as classMap,
9
+ /** @deprecated */
10
+ ScgContainerType as ContainerType,
11
+ /** @deprecated */
12
+ ScgCurveTypes as CurveTypes,
13
+ /** @deprecated */
14
+ ScgEdgeTypes as EdgeTypes,
15
+ /** @deprecated */
16
+ ScgEntityTypes as EntityTypes,
17
+ /** @deprecated */
18
+ ScgGraphicType as GraphicType,
19
+ /** @deprecated */
20
+ ScgMemberType as MemberType,
21
+ /** @deprecated */
22
+ ScgMeshTypes as MeshTypes,
23
+ /** @deprecated */
24
+ ScgPointTypes as PointTypes, };
25
+ /** @deprecated */
26
+ export declare type IStructureTree = ScgTree;
27
+ /** @deprecated */
28
+ export declare type IStructureProtocol = ScgStructure;
29
+ /** @deprecated */
30
+ export declare type IStructureObject = ScgObject;
31
+ /** @deprecated */
32
+ export declare type IStructureMember = ScgMember;
33
+ /** @deprecated */
34
+ export declare type IStructurePatch = ScgPatch;
35
+ /** @deprecated */
36
+ export declare type IGraphicPackage = ScgGraphicPackage;
37
+ /** @deprecated */
38
+ export declare type IGraphicElement = ScgGraphicElement;
39
+ /** @deprecated */
40
+ export declare type IGraphicContainer = ScgGraphicContainer;
41
+ /** @deprecated */
42
+ export declare type IGraphicArc = ScgGraphicArc;
43
+ /** @deprecated */
44
+ export declare type IGraphicCone = ScgGraphicCone;
45
+ /** @deprecated */
46
+ export declare type IGraphicCylinder = ScgGraphicCylinder;
47
+ /** @deprecated */
48
+ export declare type IGraphicEdge = ScgGraphicEdge;
49
+ /** @deprecated */
50
+ export declare type IGraphicLine = ScgGraphicLine;
51
+ /** @deprecated */
52
+ export declare type IGraphicMesh = ScgGraphicMesh;
53
+ /** @deprecated */
54
+ export declare type IGraphicPlane = ScgGraphicPlane;
55
+ /** @deprecated */
56
+ export declare type IGraphicSphere = ScgGraphicSphere;
57
+ /** @deprecated */
58
+ export declare type PointMemValue = ScgPoint;
59
+ /** @deprecated */
60
+ export declare type ArrayMem = ScgArrayMem;
61
+ /** @deprecated */
62
+ export declare type IdMem = ScgIdMem;
63
+ /** @deprecated */
64
+ export declare type PointMem = ScgPointMem;
65
+ /** @deprecated */
66
+ export declare type RealMem = ScgRealMem;
67
+ /** @deprecated */
68
+ export declare type StringMem = ScgStringMem;
69
+ /** @deprecated */
70
+ export declare type APIOptions = FacadeOptions;
@@ -1,8 +1,7 @@
1
1
  import * as THREE from 'three';
2
2
  import { StoreApi } from 'zustand';
3
3
  import { ContainerGeometryT, GeometryElement } from '../../geometry/ThreeGeometryCreator';
4
- import { ObjectID } from '../../types/IStructureTree';
5
- import { GraphicID } from '../../types/IGraphicPackage';
4
+ import { GraphicID, ObjectID } from '../../re-export';
6
5
  import { BuerliState } from './buerli';
7
6
  import { DrawingState } from './drawing';
8
7
  export declare type GeometryBounds = {
@@ -1,6 +1,5 @@
1
1
  import { StoreApi } from 'zustand';
2
- import { IGraphicContainer, IGraphicElement, IGraphicPackage } from '../../types/IGraphicPackage';
3
- import { ObjectID } from '../../types/IStructureTree';
2
+ import { IGraphicContainer, IGraphicElement, IGraphicPackage, ObjectID } from '../../re-export';
4
3
  import { BuerliState } from './buerli';
5
4
  import { DrawingState } from './drawing';
6
5
  export declare type GraphicData = {
@@ -1,5 +1,5 @@
1
1
  import { StoreApi } from 'zustand';
2
- import { ObjectID } from '../../types';
2
+ import { ObjectID } from '../../re-export';
3
3
  import { BuerliState } from './buerli';
4
4
  import { DrawingID, DrawingState } from './drawing';
5
5
  export declare type PluginDescription<InternalState = any> = {
@@ -1,6 +1,5 @@
1
1
  import { StoreApi } from 'zustand';
2
- import { GraphicID } from '../../types/IGraphicPackage';
3
- import { ObjectID } from '../../types/IStructureTree';
2
+ import { GraphicID, ObjectID } from '../../re-export';
4
3
  import { GeometryElement, ProductElement } from './../../geometry/ThreeGeometryCreator';
5
4
  import { BuerliState } from './buerli';
6
5
  import { DrawingState } from './drawing';
@@ -16,7 +15,9 @@ export declare type SelectedItem<T extends SeletedItemData<any> = any> = {
16
15
  readonly removeCondition?: (d: DrawingState) => boolean;
17
16
  };
18
17
  export declare type SelectionFilter<T = any> = (scope: SelectionScope, data: T) => boolean;
19
- export declare type CustomSelect = (selectorId: SelectorID, newItems: SelectedItem[], diff: SelectedItem[]) => void;
18
+ export declare type CustomSelect = (selectorId: SelectorID, newItems: SelectedItem[], diff: SelectedItem[], options?: {
19
+ [key: string]: any;
20
+ }) => void;
20
21
  /**
21
22
  * Type for selector.
22
23
  *
@@ -41,9 +42,15 @@ export declare type SelectionData = {
41
42
  export declare type SelectionApi = ReturnType<typeof selectionApi>;
42
43
  export declare const selectionData: () => SelectionData;
43
44
  export declare const selectionApi: (set: StoreApi<DrawingState>['setState'], get: StoreApi<DrawingState>['getState'], buerliApi: StoreApi<BuerliState>) => {
44
- unselectAll(selectorId?: SelectorID): void;
45
- unselect(items: SelectedItem | SelectedItem[], selectorId?: SelectorID): void;
46
- select(items: SelectedItem | SelectedItem[], selectorId?: SelectorID): void;
45
+ unselectAll(selectorId?: SelectorID, options?: {
46
+ [key: string]: any;
47
+ } | undefined): void;
48
+ unselect(items: SelectedItem | SelectedItem[], selectorId?: SelectorID, options?: {
49
+ [key: string]: any;
50
+ } | undefined): void;
51
+ select(items: SelectedItem | SelectedItem[], selectorId?: SelectorID, options?: {
52
+ [key: string]: any;
53
+ } | undefined): void;
47
54
  setHovered(item: SelectedItem | null, selectorId?: SelectorID): void;
48
55
  activateSelector(selectorId: SelectorID | null): void;
49
56
  createSelector(selectorId: SelectorID, filter: SelectionFilter, activate?: boolean, initialItems?: SelectedItem[], maxLen?: number, customSelect?: CustomSelect, customUnSelect?: CustomSelect): () => void;
@@ -1,6 +1,6 @@
1
1
  import * as THREE from 'three';
2
2
  import { StoreApi } from 'zustand';
3
- import { GraphicID, IStructureObject, IStructurePatch, IStructureProtocol, IStructureTree, ObjectID } from '../../types';
3
+ import { GraphicID, IStructureObject, IStructurePatch, IStructureProtocol, IStructureTree, ObjectID } from '../../re-export';
4
4
  import { BuerliState } from './buerli';
5
5
  import { DrawingState } from './drawing';
6
6
  export declare type StructureData = IStructureProtocol & {
@@ -1,5 +1,4 @@
1
- import { GraphicID } from './IGraphicPackage';
2
- import { ObjectID } from './IStructureTree';
1
+ import { GraphicID, ObjectID } from '../re-export';
3
2
  /**
4
3
  * It contains general information that can be used to identify CCObjects as well as Brep Elements.
5
4
  */
@@ -1,4 +1,7 @@
1
- export * from './IGraphicPackage';
1
+ import { ScgStructure } from '../re-export';
2
2
  export * from './InteractionInfo';
3
- export * from './IStructurePatch';
4
- export * from './IStructureTree';
3
+ /**
4
+ * Defines the default structure tree.
5
+ * Should be used to initialize a new structure tree.
6
+ */
7
+ export declare const DEFAULT_STRUCTURE_TREE: () => ScgStructure;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buerli.io/core",
3
- "version": "0.13.1-beta.4",
3
+ "version": "0.13.1-beta.5.apiversion",
4
4
  "description": "buerli state management",
5
5
  "author": "AWV Informatik AG <info@awv-informatik.ch>",
6
6
  "license": "ISC",
@@ -10,7 +10,7 @@
10
10
  "types": "build/types/index.d.ts",
11
11
  "sideEffects": false,
12
12
  "scripts": {
13
- "ver": "yarn version --no-commit-hooks --no-git-tag-version --new-version",
13
+ "ver": "npm version",
14
14
  "prepack": "npm run clean && npm run build -- --sourceMap false && npm run build:cjs -- --sourceMap false",
15
15
  "clean": "rimraf ./build* && rimraf ./coverage && rimraf tsconfig.tsbuildinfo",
16
16
  "build": "tsc -v && tsc",
@@ -21,9 +21,9 @@
21
21
  "prettify": "prettier --write \"./{src,tests}/**/*.{js,jsx,ts,tsx,json}\""
22
22
  },
23
23
  "devDependencies": {
24
+ "@types/three": "^0.152.1",
24
25
  "@babel/preset-env": "^7.10.4",
25
26
  "@babel/preset-typescript": "^7.10.4",
26
- "@types/three": "^0.152.1",
27
27
  "babel-jest": "^26.1.0",
28
28
  "babel-plugin-module-resolver": "^4.0.0",
29
29
  "babel-plugin-transform-class-properties": "^6.24.1",
@@ -33,6 +33,7 @@
33
33
  "typescript": "4.8.4"
34
34
  },
35
35
  "dependencies": {
36
+ "@classcad/api-js": "https://awvstatic.com/classcad/download/dev/17.1.3-dev.101/classcad-api-js-17.1.3-dev.101.tgz",
36
37
  "fast-json-patch": "^3.1.1",
37
38
  "jsonpatch": "^3.1.0",
38
39
  "uuid": "^9.0.0",
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PointTypes = exports.EntityTypes = exports.CurveTypes = exports.EdgeTypes = exports.MeshTypes = exports.ContainerType = exports.GraphicType = void 0;
4
- var GraphicType;
5
- (function (GraphicType) {
6
- // Primitives
7
- GraphicType["POINT"] = "point";
8
- GraphicType["LINE"] = "line";
9
- GraphicType["ARC"] = "arc";
10
- GraphicType["CIRCLE"] = "circle";
11
- GraphicType["PLANE"] = "plane";
12
- GraphicType["CYLINDER"] = "cylinder";
13
- GraphicType["CONE"] = "cone";
14
- GraphicType["SPHERE"] = "sphere";
15
- GraphicType["NURBSCURVE"] = "nurbsCurve";
16
- GraphicType["NURBSSURFACE"] = "nurbsSurface";
17
- // Entities
18
- GraphicType["NONE"] = "none";
19
- GraphicType["BREP"] = "brep";
20
- GraphicType["POLYBREP"] = "polyBrep";
21
- GraphicType["CURVEARRAY"] = "curveArray";
22
- // Curve array elements
23
- GraphicType["CURVELINE"] = "curveLine";
24
- GraphicType["CURVESPLINE"] = "curveSpline";
25
- GraphicType["CURVEARC"] = "curveArc";
26
- GraphicType["CURVECIRCLE"] = "curveCircle";
27
- GraphicType["CURVEPOINT"] = "curvePoint";
28
- // Custom type(s) (not defined by server protocol)
29
- GraphicType["LOOP"] = "loop";
30
- })(GraphicType = exports.GraphicType || (exports.GraphicType = {}));
31
- var ContainerType;
32
- (function (ContainerType) {
33
- ContainerType[ContainerType["NONE"] = 0] = "NONE";
34
- ContainerType[ContainerType["BREP"] = 1] = "BREP";
35
- ContainerType[ContainerType["CURVEARRAY"] = 2] = "CURVEARRAY";
36
- ContainerType[ContainerType["POLYBREP"] = 3] = "POLYBREP";
37
- // POINTARRAY = 4, // Not used at the moment
38
- // GRAPHIC = 5, // Not used at the moment
39
- // LIGHTWEIGHTBREP = 6, // Not used at the moment
40
- })(ContainerType = exports.ContainerType || (exports.ContainerType = {}));
41
- const G = GraphicType;
42
- exports.MeshTypes = [G.PLANE, G.CYLINDER, G.CONE, G.SPHERE, G.NURBSSURFACE];
43
- exports.EdgeTypes = [G.LINE, G.ARC, G.CIRCLE, G.NURBSCURVE];
44
- exports.CurveTypes = [G.CURVELINE, G.CURVESPLINE, G.CURVEARC, G.CURVECIRCLE];
45
- exports.EntityTypes = [G.BREP, G.POLYBREP, G.CURVEARRAY];
46
- exports.PointTypes = [G.POINT, G.CURVEPOINT];
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MemberType = exports.NOID = exports.DEFAULT_STRUCTURE_TREE = void 0;
4
- /**
5
- * Defines the default structure tree.
6
- * Should be used to initialize a new structure tree.
7
- */
8
- const DEFAULT_STRUCTURE_TREE = () => {
9
- return {
10
- tree: {},
11
- root: exports.NOID,
12
- currentProduct: exports.NOID,
13
- currentNode: exports.NOID,
14
- currentInstance: exports.NOID,
15
- testRoot: exports.NOID,
16
- };
17
- };
18
- exports.DEFAULT_STRUCTURE_TREE = DEFAULT_STRUCTURE_TREE;
19
- /** Zero is no Id in classcad, and no object will exist in the CCDatabase for Id === 0! */
20
- exports.NOID = 0;
21
- var MemberType;
22
- (function (MemberType) {
23
- MemberType["ARRAY"] = "array";
24
- MemberType["ID"] = "id";
25
- MemberType["POINT"] = "point";
26
- MemberType["REAL"] = "real";
27
- MemberType["STRING"] = "string";
28
- })(MemberType = exports.MemberType || (exports.MemberType = {}));
@@ -1,43 +0,0 @@
1
- export var GraphicType;
2
- (function (GraphicType) {
3
- // Primitives
4
- GraphicType["POINT"] = "point";
5
- GraphicType["LINE"] = "line";
6
- GraphicType["ARC"] = "arc";
7
- GraphicType["CIRCLE"] = "circle";
8
- GraphicType["PLANE"] = "plane";
9
- GraphicType["CYLINDER"] = "cylinder";
10
- GraphicType["CONE"] = "cone";
11
- GraphicType["SPHERE"] = "sphere";
12
- GraphicType["NURBSCURVE"] = "nurbsCurve";
13
- GraphicType["NURBSSURFACE"] = "nurbsSurface";
14
- // Entities
15
- GraphicType["NONE"] = "none";
16
- GraphicType["BREP"] = "brep";
17
- GraphicType["POLYBREP"] = "polyBrep";
18
- GraphicType["CURVEARRAY"] = "curveArray";
19
- // Curve array elements
20
- GraphicType["CURVELINE"] = "curveLine";
21
- GraphicType["CURVESPLINE"] = "curveSpline";
22
- GraphicType["CURVEARC"] = "curveArc";
23
- GraphicType["CURVECIRCLE"] = "curveCircle";
24
- GraphicType["CURVEPOINT"] = "curvePoint";
25
- // Custom type(s) (not defined by server protocol)
26
- GraphicType["LOOP"] = "loop";
27
- })(GraphicType || (GraphicType = {}));
28
- export var ContainerType;
29
- (function (ContainerType) {
30
- ContainerType[ContainerType["NONE"] = 0] = "NONE";
31
- ContainerType[ContainerType["BREP"] = 1] = "BREP";
32
- ContainerType[ContainerType["CURVEARRAY"] = 2] = "CURVEARRAY";
33
- ContainerType[ContainerType["POLYBREP"] = 3] = "POLYBREP";
34
- // POINTARRAY = 4, // Not used at the moment
35
- // GRAPHIC = 5, // Not used at the moment
36
- // LIGHTWEIGHTBREP = 6, // Not used at the moment
37
- })(ContainerType || (ContainerType = {}));
38
- const G = GraphicType;
39
- export const MeshTypes = [G.PLANE, G.CYLINDER, G.CONE, G.SPHERE, G.NURBSSURFACE];
40
- export const EdgeTypes = [G.LINE, G.ARC, G.CIRCLE, G.NURBSCURVE];
41
- export const CurveTypes = [G.CURVELINE, G.CURVESPLINE, G.CURVEARC, G.CURVECIRCLE];
42
- export const EntityTypes = [G.BREP, G.POLYBREP, G.CURVEARRAY];
43
- export const PointTypes = [G.POINT, G.CURVEPOINT];
@@ -1 +0,0 @@
1
- export {};
@@ -1,24 +0,0 @@
1
- /**
2
- * Defines the default structure tree.
3
- * Should be used to initialize a new structure tree.
4
- */
5
- export const DEFAULT_STRUCTURE_TREE = () => {
6
- return {
7
- tree: {},
8
- root: NOID,
9
- currentProduct: NOID,
10
- currentNode: NOID,
11
- currentInstance: NOID,
12
- testRoot: NOID,
13
- };
14
- };
15
- /** Zero is no Id in classcad, and no object will exist in the CCDatabase for Id === 0! */
16
- export const NOID = 0;
17
- export var MemberType;
18
- (function (MemberType) {
19
- MemberType["ARRAY"] = "array";
20
- MemberType["ID"] = "id";
21
- MemberType["POINT"] = "point";
22
- MemberType["REAL"] = "real";
23
- MemberType["STRING"] = "string";
24
- })(MemberType || (MemberType = {}));