@buerli.io/core 0.4.1 → 0.5.0-beta.2
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.
- package/build/cjs/geometry/ThreeGeometryCreator.js +321 -0
- package/build/cjs/geometry/index.js +17 -0
- package/build/cjs/graphic/filters.js +25 -0
- package/build/cjs/index.js +25 -0
- package/build/cjs/store/index.js +37 -0
- package/build/cjs/store/states/buerli.js +98 -0
- package/build/cjs/store/states/cad.js +35 -0
- package/build/cjs/store/states/drawing.js +47 -0
- package/build/cjs/store/states/geometry.js +139 -0
- package/build/cjs/store/states/graphic.js +115 -0
- package/build/cjs/store/states/interaction.js +55 -0
- package/build/cjs/store/states/message.js +25 -0
- package/build/cjs/store/states/plugin.js +115 -0
- package/build/cjs/store/states/selection.js +258 -0
- package/build/cjs/store/states/structure.js +239 -0
- package/build/cjs/store/store.js +9 -0
- package/build/cjs/store/subscribtion/selection.js +46 -0
- package/build/cjs/store/subscribtion/subscribeToDrawing.js +13 -0
- package/build/cjs/types/IGraphicPackage.js +49 -0
- package/build/cjs/types/IStructurePatch.js +2 -0
- package/build/cjs/types/IStructureTree.js +27 -0
- package/build/cjs/types/InteractionInfo.js +11 -0
- package/build/cjs/types/index.js +20 -0
- package/build/cjs/utils/Math.js +91 -0
- package/build/cjs/utils/Measure.js +560 -0
- package/build/cjs/utils/Timing.js +34 -0
- package/build/{geometry → esm/geometry}/ThreeGeometryCreator.js +0 -0
- package/build/{geometry → esm/geometry}/index.js +0 -0
- package/build/{graphic → esm/graphic}/filters.js +0 -0
- package/build/{index.js → esm/index.js} +0 -0
- package/build/{store → esm/store}/index.js +0 -0
- package/build/{store → esm/store}/states/buerli.js +2 -2
- package/build/{store → esm/store}/states/cad.js +0 -0
- package/build/{store → esm/store}/states/drawing.js +0 -0
- package/build/{store → esm/store}/states/geometry.js +0 -0
- package/build/{store → esm/store}/states/graphic.js +0 -0
- package/build/{store → esm/store}/states/interaction.js +0 -0
- package/build/{store → esm/store}/states/message.js +0 -0
- package/build/{store → esm/store}/states/plugin.js +0 -0
- package/build/{store → esm/store}/states/selection.js +0 -0
- package/build/{store → esm/store}/states/structure.js +0 -0
- package/build/esm/store/store.js +3 -0
- package/build/{store → esm/store}/subscribtion/selection.js +0 -0
- package/build/esm/store/subscribtion/subscribeToDrawing.js +9 -0
- package/build/{types → esm/types}/IGraphicPackage.js +0 -0
- package/build/{types → esm/types}/IStructurePatch.js +0 -0
- package/build/{types → esm/types}/IStructureTree.js +0 -0
- package/build/{types → esm/types}/InteractionInfo.js +0 -0
- package/build/{types → esm/types}/index.js +0 -0
- package/build/{utils → esm/utils}/Math.js +0 -0
- package/build/{utils → esm/utils}/Measure.js +0 -0
- package/build/{utils → esm/utils}/Timing.js +0 -0
- package/build/{geometry → types/geometry}/ThreeGeometryCreator.d.ts +0 -0
- package/build/{geometry → types/geometry}/index.d.ts +0 -0
- package/build/{graphic → types/graphic}/filters.d.ts +0 -0
- package/build/types/index.d.ts +37 -4
- package/build/{store → types/store}/index.d.ts +2 -2
- package/build/types/store/states/buerli.d.ts +41 -0
- package/build/{store → types/store}/states/cad.d.ts +4 -4
- package/build/{store → types/store}/states/drawing.d.ts +3 -3
- package/build/{store → types/store}/states/geometry.d.ts +7 -7
- package/build/{store → types/store}/states/graphic.d.ts +6 -6
- package/build/{store → types/store}/states/interaction.d.ts +4 -4
- package/build/{store → types/store}/states/message.d.ts +3 -3
- package/build/{store → types/store}/states/plugin.d.ts +5 -5
- package/build/{store → types/store}/states/selection.d.ts +13 -13
- package/build/{store → types/store}/states/structure.d.ts +4 -4
- package/build/types/store/store.d.ts +2 -0
- package/build/types/store/subscribtion/selection.d.ts +7 -0
- package/build/types/store/subscribtion/subscribeToDrawing.d.ts +4 -0
- package/build/types/{IGraphicPackage.d.ts → types/IGraphicPackage.d.ts} +0 -0
- package/build/types/{IStructurePatch.d.ts → types/IStructurePatch.d.ts} +0 -0
- package/build/types/{IStructureTree.d.ts → types/IStructureTree.d.ts} +0 -0
- package/build/types/{InteractionInfo.d.ts → types/InteractionInfo.d.ts} +0 -0
- package/build/types/types/index.d.ts +4 -0
- package/build/{utils → types/utils}/Math.d.ts +0 -0
- package/build/{utils → types/utils}/Measure.d.ts +0 -0
- package/build/{utils → types/utils}/Timing.d.ts +0 -0
- package/package.json +11 -11
- package/build/index.d.ts +0 -38
- package/build/store/states/buerli.d.ts +0 -50
- package/build/store/store.d.ts +0 -5
- package/build/store/store.js +0 -8
- package/build/store/subscribtion/selection.d.ts +0 -6
- package/build/store/subscribtion/subscribeToDrawing.d.ts +0 -3
- package/build/store/subscribtion/subscribeToDrawing.js +0 -4
package/build/index.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
/**
|
|
10
|
-
* Because babel typescript tools can not handle the type definitions
|
|
11
|
-
* in an other way, they have to be re-exported as you can see in this code region.
|
|
12
|
-
*
|
|
13
|
-
* Please have a look at https://github.com/awv-informatik/buerli/pull/129 for more information.
|
|
14
|
-
*/
|
|
15
|
-
import { BuerliState as BS, BuerliOptions as BO } from './store/states/buerli';
|
|
16
|
-
export declare type BuerliState = BS;
|
|
17
|
-
export declare type BuerliOptions = BO;
|
|
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,50 +0,0 @@
|
|
|
1
|
-
import { GetState, SetState } from 'zustand';
|
|
2
|
-
import { BuerliStoreApi } from '../../store/store';
|
|
3
|
-
import { DrawingID, DrawingState } from './drawing';
|
|
4
|
-
import { GeometryConfig } from './geometry';
|
|
5
|
-
import { MessageState } from './message';
|
|
6
|
-
import { PluginDef, PluginImpl } from './plugin';
|
|
7
|
-
declare type StateData = {
|
|
8
|
-
initDone: boolean;
|
|
9
|
-
options: BuerliOptions;
|
|
10
|
-
drawing: {
|
|
11
|
-
ids: DrawingID[];
|
|
12
|
-
refs: Record<DrawingID, DrawingState>;
|
|
13
|
-
active: DrawingID | null;
|
|
14
|
-
};
|
|
15
|
-
} & MessageState;
|
|
16
|
-
export declare type BuerliOptions = {
|
|
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
|
-
declare type StateApi = ReturnType<typeof generalApi> & ReturnType<typeof drawingManagementApi>;
|
|
32
|
-
export declare type BuerliState = Readonly<StateData> & Readonly<{
|
|
33
|
-
api: StateApi;
|
|
34
|
-
}>;
|
|
35
|
-
export declare const createState: (set: SetState<BuerliState>, get: GetState<BuerliState>, buerliApi: BuerliStoreApi) => BuerliState;
|
|
36
|
-
declare const generalApi: (set: SetState<BuerliState>, get: GetState<BuerliState>, buerliApi: BuerliStoreApi) => {
|
|
37
|
-
/**
|
|
38
|
-
* This api method initializes state. Considering user can accidentally ommit some important like elements,
|
|
39
|
-
* there is a warning disaplying for these cases.
|
|
40
|
-
*
|
|
41
|
-
* @param options - options which will be set into state.options
|
|
42
|
-
*/
|
|
43
|
-
init(options?: Partial<BuerliOptions> | undefined): void;
|
|
44
|
-
};
|
|
45
|
-
declare const drawingManagementApi: (set: SetState<BuerliState>, get: GetState<BuerliState>, buerliApi: BuerliStoreApi) => {
|
|
46
|
-
createDrawing(name?: string | undefined): Promise<DrawingState>;
|
|
47
|
-
removeDrawing(id: DrawingID): void;
|
|
48
|
-
setActiveDrawing(id: DrawingID | null): void;
|
|
49
|
-
};
|
|
50
|
-
export {};
|
package/build/store/store.d.ts
DELETED
package/build/store/store.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import vanillaCreate from 'zustand/vanilla';
|
|
2
|
-
import { createState } from './states/buerli';
|
|
3
|
-
const store = (set, get, buerliApi) => createState(set, get, buerliApi);
|
|
4
|
-
const wnd = typeof window !== 'undefined' ? window : null;
|
|
5
|
-
const middleware = wnd ? wnd.BUERLI_MIDDLEWARE || (wnd.BUERLI_MIDDLEWARE = []) : [];
|
|
6
|
-
const buerliStore = middleware.reduceRight((acc, cur) => cur(acc), store);
|
|
7
|
-
const api = vanillaCreate(buerliStore);
|
|
8
|
-
export { api };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DrawingID } from '../../store/states/drawing';
|
|
2
|
-
import { BuerliStoreApi } from '../../store/store';
|
|
3
|
-
import { SelectedItem, SelectorID } from '../states/selection';
|
|
4
|
-
export declare const unsubs: Record<string, () => void>;
|
|
5
|
-
export declare function subscribeItems(buerliApi: BuerliStoreApi, drawingId: DrawingID, selectorId: SelectorID, items?: SelectedItem[]): void;
|
|
6
|
-
export declare function unsubscribeItems(buerliApi: BuerliStoreApi, drawingId: DrawingID, selectorId: SelectorID, items?: SelectedItem[]): void;
|