@buerli.io/core 1.0.1 → 1.1.0-beta.8

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 (74) hide show
  1. package/README.md +19 -19
  2. package/build/cjs/geometry/ThreeGeometryCreator.js +320 -320
  3. package/build/cjs/geometry/index.js +17 -17
  4. package/build/cjs/graphic/filters.js +25 -25
  5. package/build/cjs/index.js +26 -26
  6. package/build/cjs/re-export.js +29 -29
  7. package/build/cjs/store/index.js +41 -37
  8. package/build/cjs/store/states/buerli.js +98 -98
  9. package/build/cjs/store/states/cad.js +47 -47
  10. package/build/cjs/store/states/drawing.js +49 -49
  11. package/build/cjs/store/states/geometry.js +157 -157
  12. package/build/cjs/store/states/graphic.js +115 -115
  13. package/build/cjs/store/states/interaction.js +55 -55
  14. package/build/cjs/store/states/message.js +32 -25
  15. package/build/cjs/store/states/plugin.js +115 -115
  16. package/build/cjs/store/states/selection.js +267 -267
  17. package/build/cjs/store/states/structure.js +250 -250
  18. package/build/cjs/store/store.js +9 -9
  19. package/build/cjs/store/subscribtion/selection.js +49 -49
  20. package/build/cjs/store/subscribtion/subscribeToDrawing.js +13 -13
  21. package/build/cjs/types/InteractionInfo.js +11 -11
  22. package/build/cjs/types/index.js +34 -34
  23. package/build/cjs/utils/Math.js +91 -91
  24. package/build/cjs/utils/Measure.js +576 -576
  25. package/build/cjs/utils/Timing.js +34 -34
  26. package/build/esm/geometry/ThreeGeometryCreator.js +291 -291
  27. package/build/esm/geometry/index.js +1 -1
  28. package/build/esm/graphic/filters.js +12 -12
  29. package/build/esm/index.js +10 -10
  30. package/build/esm/re-export.js +23 -23
  31. package/build/esm/store/index.js +29 -26
  32. package/build/esm/store/states/buerli.js +92 -92
  33. package/build/esm/store/states/cad.js +42 -42
  34. package/build/esm/store/states/drawing.js +45 -45
  35. package/build/esm/store/states/geometry.js +129 -129
  36. package/build/esm/store/states/graphic.js +110 -110
  37. package/build/esm/store/states/interaction.js +50 -50
  38. package/build/esm/store/states/message.js +28 -21
  39. package/build/esm/store/states/plugin.js +109 -109
  40. package/build/esm/store/states/selection.js +261 -261
  41. package/build/esm/store/states/structure.js +219 -219
  42. package/build/esm/store/store.js +3 -3
  43. package/build/esm/store/subscribtion/selection.js +44 -44
  44. package/build/esm/store/subscribtion/subscribeToDrawing.js +9 -9
  45. package/build/esm/types/InteractionInfo.js +6 -6
  46. package/build/esm/types/index.js +16 -16
  47. package/build/esm/utils/Math.js +65 -65
  48. package/build/esm/utils/Measure.js +550 -550
  49. package/build/esm/utils/Timing.js +31 -31
  50. package/build/types/geometry/ThreeGeometryCreator.d.ts +256 -256
  51. package/build/types/geometry/index.d.ts +1 -1
  52. package/build/types/graphic/filters.d.ts +11 -11
  53. package/build/types/index.d.ts +38 -38
  54. package/build/types/re-export.d.ts +70 -70
  55. package/build/types/store/index.d.ts +17 -16
  56. package/build/types/store/states/buerli.d.ts +41 -41
  57. package/build/types/store/states/cad.d.ts +56 -56
  58. package/build/types/store/states/drawing.d.ts +45 -45
  59. package/build/types/store/states/geometry.d.ts +64 -64
  60. package/build/types/store/states/graphic.d.ts +21 -21
  61. package/build/types/store/states/interaction.d.ts +34 -34
  62. package/build/types/store/states/message.d.ts +32 -30
  63. package/build/types/store/states/plugin.d.ts +53 -53
  64. package/build/types/store/states/selection.d.ts +69 -69
  65. package/build/types/store/states/structure.d.ts +47 -47
  66. package/build/types/store/store.d.ts +2 -2
  67. package/build/types/store/subscribtion/selection.d.ts +7 -7
  68. package/build/types/store/subscribtion/subscribeToDrawing.d.ts +4 -4
  69. package/build/types/types/InteractionInfo.d.ts +42 -42
  70. package/build/types/types/index.d.ts +7 -7
  71. package/build/types/utils/Math.d.ts +21 -21
  72. package/build/types/utils/Measure.d.ts +64 -64
  73. package/build/types/utils/Timing.d.ts +8 -8
  74. package/package.json +2 -2
@@ -1,38 +1,38 @@
1
- export * from './store';
2
- export * from './geometry';
3
- export * from './types';
4
- export * from './utils/Math';
5
- export * from './utils/Measure';
6
- export * from './utils/Timing';
7
- export * from './store/subscribtion/subscribeToDrawing';
8
- export * from './graphic/filters';
9
- export * from './re-export';
10
- /**
11
- * Because babel typescript tools can not handle the type definitions
12
- * in an other way, they have to be re-exported as you can see in this code region.
13
- *
14
- * Please have a look at https://github.com/awv-informatik/buerli/pull/129 for more information.
15
- */
16
- import { BuerliState as BS } from './store/states/buerli';
17
- export declare type BuerliState = BS;
18
- import { DrawingAPI as DrawingAPI1, DrawingID as DrawingID1, DrawingState as DrawingState1 } from './store/states/drawing';
19
- export declare type DrawingID = DrawingID1;
20
- export declare type DrawingState = DrawingState1;
21
- export declare type DrawingAPI = DrawingAPI1;
22
- import { GeometryConfig as GeometryConfig1, GeometryBounds as GeometryBounds1 } from './store/states/geometry';
23
- export declare type GeometryConfig = GeometryConfig1;
24
- export declare type GeometryBounds = GeometryBounds1;
25
- import { Plugin as Plugin1, PluginDescription as PluginDescription1, PluginID as PluginID1, PluginState as PluginState1 } from './store/states/plugin';
26
- export declare type Plugin = Plugin1;
27
- export declare type PluginDescription<InternalState = any> = PluginDescription1<InternalState>;
28
- export declare type PluginID = PluginID1;
29
- export declare type PluginState<InternalState extends Record<any, any> = any> = PluginState1<InternalState>;
30
- import { SeletedItemData, SelectedItem as SelectedItem1, SelectionFilter as SelectionFilter1, SelectionScope as SelectionScope1, Selector as Selector1, SelectorID as SelectorID1, CustomSelect as CustomSelect1 } from './store/states/selection';
31
- export declare type SelectedItem<T extends SeletedItemData<any> = any> = SelectedItem1<T>;
32
- export declare type SelectionFilter = SelectionFilter1;
33
- export declare type SelectionScope = SelectionScope1;
34
- export declare type Selector<T extends SeletedItemData<any> = any> = Selector1<T>;
35
- export declare type SelectorID = SelectorID1;
36
- export declare type CustomSelect = CustomSelect1;
37
- import { Message as Message1 } from './store/states/message';
38
- export declare type Message = Message1;
1
+ export * from './store';
2
+ export * from './geometry';
3
+ export * from './types';
4
+ export * from './utils/Math';
5
+ export * from './utils/Measure';
6
+ export * from './utils/Timing';
7
+ export * from './store/subscribtion/subscribeToDrawing';
8
+ export * from './graphic/filters';
9
+ export * from './re-export';
10
+ /**
11
+ * Because babel typescript tools can not handle the type definitions
12
+ * in an other way, they have to be re-exported as you can see in this code region.
13
+ *
14
+ * Please have a look at https://github.com/awv-informatik/buerli/pull/129 for more information.
15
+ */
16
+ import { BuerliState as BS } from './store/states/buerli';
17
+ export declare type BuerliState = BS;
18
+ import { DrawingAPI as DrawingAPI1, DrawingID as DrawingID1, DrawingState as DrawingState1 } from './store/states/drawing';
19
+ export declare type DrawingID = DrawingID1;
20
+ export declare type DrawingState = DrawingState1;
21
+ export declare type DrawingAPI = DrawingAPI1;
22
+ import { GeometryConfig as GeometryConfig1, GeometryBounds as GeometryBounds1 } from './store/states/geometry';
23
+ export declare type GeometryConfig = GeometryConfig1;
24
+ export declare type GeometryBounds = GeometryBounds1;
25
+ import { Plugin as Plugin1, PluginDescription as PluginDescription1, PluginID as PluginID1, PluginState as PluginState1 } from './store/states/plugin';
26
+ export declare type Plugin = Plugin1;
27
+ export declare type PluginDescription<InternalState = any> = PluginDescription1<InternalState>;
28
+ export declare type PluginID = PluginID1;
29
+ export declare type PluginState<InternalState extends Record<any, any> = any> = PluginState1<InternalState>;
30
+ import { SeletedItemData, SelectedItem as SelectedItem1, SelectionFilter as SelectionFilter1, SelectionScope as SelectionScope1, Selector as Selector1, SelectorID as SelectorID1, CustomSelect as CustomSelect1 } from './store/states/selection';
31
+ export declare type SelectedItem<T extends SeletedItemData<any> = any> = SelectedItem1<T>;
32
+ export declare type SelectionFilter = SelectionFilter1;
33
+ export declare type SelectionScope = SelectionScope1;
34
+ export declare type Selector<T extends SeletedItemData<any> = any> = Selector1<T>;
35
+ export declare type SelectorID = SelectorID1;
36
+ export declare type CustomSelect = CustomSelect1;
37
+ import { Message as Message1 } from './store/states/message';
38
+ export declare type Message = Message1;
@@ -1,70 +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, ScgPoint, ScgPointMem, ScgPointTypes, ScgRealMem, ScgStringMem, ScgStructure, ScgStructurePatchOp, 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, ScgPoint, ScgPointMem, ScgRealMem, ScgStringMem, ScgStructure, ScgStructurePatch, ScgStructurePatchOp, 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 = ScgStructurePatchOp;
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
+ 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, ScgPoint, ScgPointMem, ScgPointTypes, ScgRealMem, ScgStringMem, ScgStructure, ScgStructurePatchOp, 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, ScgPoint, ScgPointMem, ScgRealMem, ScgStringMem, ScgStructure, ScgStructurePatch, ScgStructurePatchOp, 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 = ScgStructurePatchOp;
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,16 +1,17 @@
1
- import { BuerliState } from './states/buerli';
2
- import { DrawingID, DrawingState } from './states/drawing';
3
- import { Message, MessageID } from './states/message';
4
- import { PluginID, PluginState } from './states/plugin';
5
- declare function getDrawing(id: DrawingID): DrawingState;
6
- /**
7
- * @returns PluginState or undefined if either drawing or plugin don't exist
8
- */
9
- declare function getPlugin(drawingId: DrawingID, pluginId: PluginID): PluginState;
10
- declare function init(options?: Partial<BuerliState['options']>): void;
11
- declare function showMessage(message: Message): MessageID;
12
- declare function updateMessage(id: MessageID, message: Message): void;
13
- export { BuerliMessageScope } from './states/message';
14
- export { BuerliScope, createGraphicItem } from './states/selection';
15
- export { api } from './store';
16
- export { getDrawing, getPlugin, init, showMessage, updateMessage };
1
+ import { BuerliState } from './states/buerli';
2
+ import { DrawingID, DrawingState } from './states/drawing';
3
+ import { Message, MessageID } from './states/message';
4
+ import { PluginID, PluginState } from './states/plugin';
5
+ declare function getDrawing(id: DrawingID): DrawingState;
6
+ /**
7
+ * @returns PluginState or undefined if either drawing or plugin don't exist
8
+ */
9
+ declare function getPlugin(drawingId: DrawingID, pluginId: PluginID): PluginState;
10
+ declare function init(options?: Partial<BuerliState['options']>): void;
11
+ declare function showMessage(message: Message): MessageID;
12
+ declare function updateMessage(id: MessageID, message: Message): void;
13
+ declare function closeMessage(id: MessageID): void;
14
+ export { BuerliMessageScope } from './states/message';
15
+ export { BuerliScope, createGraphicItem } from './states/selection';
16
+ export { api } from './store';
17
+ export { getDrawing, getPlugin, init, showMessage, updateMessage, closeMessage };
@@ -1,41 +1,41 @@
1
- import { StateCreator } from 'zustand';
2
- import { DrawingID, DrawingState } from './drawing';
3
- import { GeometryConfig } from './geometry';
4
- import { MessageState } from './message';
5
- import { PluginDef, PluginImpl } from './plugin';
6
- declare type GeneralApi = {
7
- init(options?: Partial<BuerliState['options']>): void;
8
- };
9
- declare type DrawingManagementApi = {
10
- createDrawing(name?: string): Promise<DrawingState>;
11
- removeDrawing(id: DrawingID): void;
12
- setActiveDrawing(id: DrawingID | null): void;
13
- };
14
- export declare type BuerliState = Readonly<{
15
- initDone: boolean;
16
- options: {
17
- elements: any;
18
- plugins: Record<string, PluginImpl>;
19
- globalPlugins: PluginDef[];
20
- theme: {
21
- primary: string;
22
- secondary: string;
23
- dark: string;
24
- highlightedGeom: string;
25
- hoveredGeom: string;
26
- };
27
- config: {
28
- geometry: GeometryConfig;
29
- };
30
- };
31
- drawing: {
32
- ids: DrawingID[];
33
- refs: Record<DrawingID, DrawingState>;
34
- active: DrawingID | null;
35
- };
36
- api: GeneralApi & DrawingManagementApi;
37
- }> & Readonly<MessageState>;
38
- export declare const createState: StateCreator<BuerliState, [], [], BuerliState>;
39
- export declare const generalApi: StateCreator<BuerliState, [], [], GeneralApi>;
40
- export declare const drawingManagementApi: StateCreator<BuerliState, [], [], DrawingManagementApi>;
41
- export {};
1
+ import { StateCreator } from 'zustand';
2
+ import { DrawingID, DrawingState } from './drawing';
3
+ import { GeometryConfig } from './geometry';
4
+ import { MessageState } from './message';
5
+ import { PluginDef, PluginImpl } from './plugin';
6
+ declare type GeneralApi = {
7
+ init(options?: Partial<BuerliState['options']>): void;
8
+ };
9
+ declare type DrawingManagementApi = {
10
+ createDrawing(name?: string): Promise<DrawingState>;
11
+ removeDrawing(id: DrawingID): void;
12
+ setActiveDrawing(id: DrawingID | null): void;
13
+ };
14
+ export declare type BuerliState = Readonly<{
15
+ initDone: boolean;
16
+ options: {
17
+ elements: any;
18
+ plugins: Record<string, PluginImpl>;
19
+ globalPlugins: PluginDef[];
20
+ theme: {
21
+ primary: string;
22
+ secondary: string;
23
+ dark: string;
24
+ highlightedGeom: string;
25
+ hoveredGeom: string;
26
+ };
27
+ config: {
28
+ geometry: GeometryConfig;
29
+ };
30
+ };
31
+ drawing: {
32
+ ids: DrawingID[];
33
+ refs: Record<DrawingID, DrawingState>;
34
+ active: DrawingID | null;
35
+ };
36
+ api: GeneralApi & DrawingManagementApi;
37
+ }> & Readonly<MessageState>;
38
+ export declare const createState: StateCreator<BuerliState, [], [], BuerliState>;
39
+ export declare const generalApi: StateCreator<BuerliState, [], [], GeneralApi>;
40
+ export declare const drawingManagementApi: StateCreator<BuerliState, [], [], DrawingManagementApi>;
41
+ export {};
@@ -1,56 +1,56 @@
1
- import { StoreApi } from 'zustand';
2
- import { BuerliState } from './buerli';
3
- import { DrawingState } from './drawing';
4
- declare type States = {
5
- current: number;
6
- stack: string[];
7
- captionMap: Record<string, {
8
- stateName: string;
9
- caption: string;
10
- undoable?: boolean;
11
- }>;
12
- };
13
- declare type Pending = {
14
- id: string;
15
- name: string;
16
- stamp: number;
17
- args?: any;
18
- promise?: Promise<any>;
19
- };
20
- export declare type CadData = {
21
- connection: {
22
- active: boolean;
23
- connected: boolean;
24
- };
25
- states: States;
26
- pending: Pending[];
27
- };
28
- export declare type CadApi = ReturnType<typeof cadApi>;
29
- export declare const cadData: () => CadData;
30
- export declare const cadApi: (set: StoreApi<DrawingState>['setState'], get: StoreApi<DrawingState>['getState'], buerliApi: StoreApi<BuerliState>) => {
31
- setStates: (current: number, stack: string[], captionMap: Record<string, {
32
- stateName: string;
33
- caption: string;
34
- undoable?: boolean;
35
- }>) => void;
36
- setCaptionMap: (captionMap: Record<string, {
37
- stateName: string;
38
- caption: string;
39
- undoable?: boolean;
40
- }>) => void;
41
- addPending: (name: string, options?: {
42
- args?: any;
43
- promise?: Promise<any>;
44
- }) => string;
45
- removePending: (id: string) => void;
46
- setConnected: (connected: boolean) => void;
47
- setActive: (active: boolean) => void;
48
- /**
49
- * Clears the pending requests list.
50
- *
51
- * **This method is designed for interal usage only, please do not use it in user code!**
52
- * **It will be removed in a future release!**
53
- */
54
- clearPending: () => void;
55
- };
56
- export {};
1
+ import { StoreApi } from 'zustand';
2
+ import { BuerliState } from './buerli';
3
+ import { DrawingState } from './drawing';
4
+ declare type States = {
5
+ current: number;
6
+ stack: string[];
7
+ captionMap: Record<string, {
8
+ stateName: string;
9
+ caption: string;
10
+ undoable?: boolean;
11
+ }>;
12
+ };
13
+ declare type Pending = {
14
+ id: string;
15
+ name: string;
16
+ stamp: number;
17
+ args?: any;
18
+ promise?: Promise<any>;
19
+ };
20
+ export declare type CadData = {
21
+ connection: {
22
+ active: boolean;
23
+ connected: boolean;
24
+ };
25
+ states: States;
26
+ pending: Pending[];
27
+ };
28
+ export declare type CadApi = ReturnType<typeof cadApi>;
29
+ export declare const cadData: () => CadData;
30
+ export declare const cadApi: (set: StoreApi<DrawingState>['setState'], get: StoreApi<DrawingState>['getState'], buerliApi: StoreApi<BuerliState>) => {
31
+ setStates: (current: number, stack: string[], captionMap: Record<string, {
32
+ stateName: string;
33
+ caption: string;
34
+ undoable?: boolean;
35
+ }>) => void;
36
+ setCaptionMap: (captionMap: Record<string, {
37
+ stateName: string;
38
+ caption: string;
39
+ undoable?: boolean;
40
+ }>) => void;
41
+ addPending: (name: string, options?: {
42
+ args?: any;
43
+ promise?: Promise<any>;
44
+ }) => string;
45
+ removePending: (id: string) => void;
46
+ setConnected: (connected: boolean) => void;
47
+ setActive: (active: boolean) => void;
48
+ /**
49
+ * Clears the pending requests list.
50
+ *
51
+ * **This method is designed for interal usage only, please do not use it in user code!**
52
+ * **It will be removed in a future release!**
53
+ */
54
+ clearPending: () => void;
55
+ };
56
+ export {};
@@ -1,45 +1,45 @@
1
- /**!
2
- * The Drawing manages all necessary data that belong to a model.
3
- *
4
- * On the one hand these are the structure and graphic data by which the
5
- * CAD model is defined, on the other hand it administers additional data
6
- * for the support with the client-sided development.
7
- *
8
- * @image /doc/assets/core/drawing.png
9
- */
10
- import { StoreApi } from 'zustand';
11
- import { BuerliState } from './buerli';
12
- import { CadApi, CadData } from './cad';
13
- import { GeometryApi, GeometryData } from './geometry';
14
- import { GraphicApi, GraphicData } from './graphic';
15
- import { InteractionApi, InteractionData } from './interaction';
16
- import { PluginApi, PluginData } from './plugin';
17
- import { SelectionApi, SelectionData } from './selection';
18
- import { StructureApi, StructureData } from './structure';
19
- export declare type DrawingID = string | number;
20
- export declare type DrawingAPI = {
21
- structure: StructureApi;
22
- selection: SelectionApi;
23
- interaction: InteractionApi;
24
- plugin: PluginApi;
25
- geometry: GeometryApi;
26
- graphic: GraphicApi;
27
- cad: CadApi;
28
- reset: () => void;
29
- };
30
- declare type StateData = {
31
- id: DrawingID;
32
- name: string;
33
- structure: StructureData;
34
- geometry: GeometryData;
35
- graphic: GraphicData;
36
- selection: SelectionData;
37
- interaction: InteractionData;
38
- plugin: PluginData;
39
- cad: CadData;
40
- };
41
- export declare type DrawingState = Readonly<StateData> & Readonly<{
42
- api: DrawingAPI;
43
- }>;
44
- export declare const createDrawingState: (set: StoreApi<DrawingState>['setState'], get: StoreApi<DrawingState>['getState'], buerliApi: StoreApi<BuerliState>, drawingNumber: number, name?: string) => DrawingState;
45
- export {};
1
+ /**!
2
+ * The Drawing manages all necessary data that belong to a model.
3
+ *
4
+ * On the one hand these are the structure and graphic data by which the
5
+ * CAD model is defined, on the other hand it administers additional data
6
+ * for the support with the client-sided development.
7
+ *
8
+ * @image /doc/assets/core/drawing.png
9
+ */
10
+ import { StoreApi } from 'zustand';
11
+ import { BuerliState } from './buerli';
12
+ import { CadApi, CadData } from './cad';
13
+ import { GeometryApi, GeometryData } from './geometry';
14
+ import { GraphicApi, GraphicData } from './graphic';
15
+ import { InteractionApi, InteractionData } from './interaction';
16
+ import { PluginApi, PluginData } from './plugin';
17
+ import { SelectionApi, SelectionData } from './selection';
18
+ import { StructureApi, StructureData } from './structure';
19
+ export declare type DrawingID = string | number;
20
+ export declare type DrawingAPI = {
21
+ structure: StructureApi;
22
+ selection: SelectionApi;
23
+ interaction: InteractionApi;
24
+ plugin: PluginApi;
25
+ geometry: GeometryApi;
26
+ graphic: GraphicApi;
27
+ cad: CadApi;
28
+ reset: () => void;
29
+ };
30
+ declare type StateData = {
31
+ id: DrawingID;
32
+ name: string;
33
+ structure: StructureData;
34
+ geometry: GeometryData;
35
+ graphic: GraphicData;
36
+ selection: SelectionData;
37
+ interaction: InteractionData;
38
+ plugin: PluginData;
39
+ cad: CadData;
40
+ };
41
+ export declare type DrawingState = Readonly<StateData> & Readonly<{
42
+ api: DrawingAPI;
43
+ }>;
44
+ export declare const createDrawingState: (set: StoreApi<DrawingState>['setState'], get: StoreApi<DrawingState>['getState'], buerliApi: StoreApi<BuerliState>, drawingNumber: number, name?: string) => DrawingState;
45
+ export {};