@buerli.io/core 1.1.0 → 2.0.0-beta.20261016085358
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 +17 -7
- package/build/cjs/store/index.js +7 -7
- package/build/cjs/store/states/geometry.js +17 -7
- package/build/cjs/store/states/immutablePatch.js +165 -0
- package/build/cjs/store/states/plugin.js +2 -2
- package/build/cjs/store/states/structure.js +34 -22
- package/build/cjs/store/store.js +2 -5
- package/build/cjs/store/subscribtion/selection.js +3 -3
- package/build/cjs/store/subscribtion/subscribeToDrawing.js +1 -2
- package/build/cjs/utils/Math.js +17 -7
- package/build/cjs/utils/Measure.js +18 -9
- package/build/esm/store/states/immutablePatch.js +162 -0
- package/build/esm/store/states/structure.js +17 -12
- package/build/esm/store/store.js +2 -2
- package/build/esm/utils/Measure.js +0 -1
- package/build/types/geometry/ThreeGeometryCreator.d.ts +42 -42
- package/build/types/index.d.ts +17 -17
- package/build/types/re-export.d.ts +23 -23
- package/build/types/store/states/buerli.d.ts +3 -3
- package/build/types/store/states/cad.d.ts +5 -5
- package/build/types/store/states/drawing.d.ts +4 -4
- package/build/types/store/states/geometry.d.ts +6 -6
- package/build/types/store/states/graphic.d.ts +3 -3
- package/build/types/store/states/immutablePatch.d.ts +30 -0
- package/build/types/store/states/interaction.d.ts +3 -3
- package/build/types/store/states/message.d.ts +6 -6
- package/build/types/store/states/plugin.d.ts +10 -10
- package/build/types/store/states/selection.d.ts +13 -13
- package/build/types/store/states/structure.d.ts +10 -4
- package/build/types/store/store.d.ts +1 -1
- package/build/types/types/InteractionInfo.d.ts +3 -3
- package/build/types/utils/Measure.d.ts +8 -8
- package/build/types/utils/Timing.d.ts +1 -1
- package/package.json +17 -21
- package/vitest.config.mts +5 -0
|
@@ -4,18 +4,18 @@ import { ContainerGeometryT, GeometryElement } from '../../geometry/ThreeGeometr
|
|
|
4
4
|
import { GraphicID, ObjectID } from '../../re-export';
|
|
5
5
|
import { BuerliState } from './buerli';
|
|
6
6
|
import { DrawingState } from './drawing';
|
|
7
|
-
export
|
|
7
|
+
export type GeometryBounds = {
|
|
8
8
|
center: THREE.Vector3;
|
|
9
9
|
radius: number;
|
|
10
10
|
max: THREE.Vector3;
|
|
11
11
|
min: THREE.Vector3;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type ElementConfig = {
|
|
14
14
|
hidden?: boolean;
|
|
15
15
|
color?: any;
|
|
16
16
|
opacity?: number;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type GeometryConfig = {
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
meshes?: ElementConfig & {
|
|
21
21
|
wireframe?: boolean;
|
|
@@ -24,7 +24,7 @@ export declare type GeometryConfig = {
|
|
|
24
24
|
edges?: ElementConfig;
|
|
25
25
|
points?: ElementConfig;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type GeometryData = {
|
|
28
28
|
cache: Record<ObjectID, // The id of the CADEntity
|
|
29
29
|
// The id of the CADEntity
|
|
30
30
|
ContainerGeometryT & {
|
|
@@ -42,9 +42,9 @@ export declare type GeometryData = {
|
|
|
42
42
|
product: Record<ObjectID, GeometryConfig>;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type GeometryApi = ReturnType<typeof geometryApi>;
|
|
46
46
|
export declare const geometryData: () => GeometryData;
|
|
47
|
-
export declare const geometryApi: (set: StoreApi<DrawingState>[
|
|
47
|
+
export declare const geometryApi: (set: StoreApi<DrawingState>["setState"], get: StoreApi<DrawingState>["getState"], buerliApi: StoreApi<BuerliState>) => {
|
|
48
48
|
/**
|
|
49
49
|
* Updates the @see geometry.bounds depending on all products of the model.
|
|
50
50
|
* The update will only happen, if at least one solid of one product is available.
|
|
@@ -2,12 +2,12 @@ import { StoreApi } from 'zustand';
|
|
|
2
2
|
import { IGraphicContainer, IGraphicElement, IGraphicPackage, ObjectID } from '../../re-export';
|
|
3
3
|
import { BuerliState } from './buerli';
|
|
4
4
|
import { DrawingState } from './drawing';
|
|
5
|
-
export
|
|
5
|
+
export type GraphicData = {
|
|
6
6
|
containers: Record<number, IGraphicContainer>;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type GraphicApi = ReturnType<typeof graphicApi>;
|
|
9
9
|
export declare const graphicData: () => GraphicData;
|
|
10
|
-
export declare const graphicApi: (set: StoreApi<DrawingState>[
|
|
10
|
+
export declare const graphicApi: (set: StoreApi<DrawingState>["setState"], get: StoreApi<DrawingState>["getState"], buerliApi: StoreApi<BuerliState>) => {
|
|
11
11
|
addPackages: (packages: IGraphicPackage | IGraphicPackage[]) => void;
|
|
12
12
|
cleanupGraphicRecords: () => void;
|
|
13
13
|
filter: (cb: (elem: IGraphicElement) => boolean, options?: {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* applyPatchImmutable — RFC 6902 (JSON Patch) applied with structural sharing.
|
|
3
|
+
*
|
|
4
|
+
* Never mutates the input document. Copies exactly the containers on the path
|
|
5
|
+
* of each operation (copy-on-write); untouched siblings keep their identity,
|
|
6
|
+
* so store subscribers with reference-equality selectors only wake where
|
|
7
|
+
* something actually changed.
|
|
8
|
+
*
|
|
9
|
+
* The speed trick: a per-batch `cloned` set tracks containers that are already
|
|
10
|
+
* fresh copies owned by this batch — those are mutated in place. A batch of
|
|
11
|
+
* N ops therefore costs one shallow copy per DISTINCT touched container (plus
|
|
12
|
+
* the walk), not one copy chain per op. No full deep clone, ever.
|
|
13
|
+
*
|
|
14
|
+
* This replaces the previous two-library setup (jsonpatch for small blocks,
|
|
15
|
+
* fast-json-patch with a full deep clone for blocks > 100 ops): it is faster
|
|
16
|
+
* than either in its own domain AND keeps identities correct, so the 100-op
|
|
17
|
+
* threshold and its discontinuous identity behavior are gone.
|
|
18
|
+
*
|
|
19
|
+
* Supported ops: add, remove, replace, move, copy, test (the full RFC set;
|
|
20
|
+
* the engine's json::diff emits only add/remove/replace). Throws on invalid
|
|
21
|
+
* paths/ops — the caller decides how to recover, exactly like the previous
|
|
22
|
+
* jsonpatch behavior.
|
|
23
|
+
*/
|
|
24
|
+
export type JsonPatchOp = {
|
|
25
|
+
op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
|
|
26
|
+
path: string;
|
|
27
|
+
value?: unknown;
|
|
28
|
+
from?: string;
|
|
29
|
+
};
|
|
30
|
+
export declare function applyPatchImmutable<T>(doc: T, ops: JsonPatchOp[]): T;
|
|
@@ -2,13 +2,13 @@ import { StoreApi } from 'zustand';
|
|
|
2
2
|
import { InteractionInfo } from '../../types';
|
|
3
3
|
import { BuerliState } from './buerli';
|
|
4
4
|
import { DrawingState } from './drawing';
|
|
5
|
-
export
|
|
5
|
+
export type InteractionData = {
|
|
6
6
|
hovered?: InteractionInfo | null;
|
|
7
7
|
selected?: InteractionInfo[];
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type InteractionApi = ReturnType<typeof interactionApi>;
|
|
10
10
|
export declare const interactionData: () => InteractionData;
|
|
11
|
-
export declare const interactionApi: (set: StoreApi<DrawingState>[
|
|
11
|
+
export declare const interactionApi: (set: StoreApi<DrawingState>["setState"], get: StoreApi<DrawingState>["getState"], buerliApi: StoreApi<BuerliState>) => {
|
|
12
12
|
/**
|
|
13
13
|
* Sets the hovered item in the store to the given item.
|
|
14
14
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { StoreApi } from 'zustand';
|
|
2
2
|
import { BuerliState } from './buerli';
|
|
3
3
|
import { DrawingID } from './drawing';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type MessageScope = string | number;
|
|
5
|
+
export type MessageID = string;
|
|
6
6
|
export declare const BuerliMessageScope: MessageScope;
|
|
7
|
-
export
|
|
7
|
+
export type Message = {
|
|
8
8
|
text: string;
|
|
9
9
|
title?: string;
|
|
10
10
|
scope?: MessageScope;
|
|
@@ -14,7 +14,7 @@ export declare type Message = {
|
|
|
14
14
|
drawingId?: DrawingID;
|
|
15
15
|
duration?: number;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type MessageState = {
|
|
18
18
|
message: {
|
|
19
19
|
data: (Message & {
|
|
20
20
|
id: MessageID;
|
|
@@ -23,8 +23,8 @@ export declare type MessageState = {
|
|
|
23
23
|
api: ReturnType<typeof messageApi>;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
export declare const getInitialMessageState: (set: StoreApi<BuerliState>[
|
|
27
|
-
declare const messageApi: (set: StoreApi<BuerliState>[
|
|
26
|
+
export declare const getInitialMessageState: (set: StoreApi<BuerliState>["setState"], get: StoreApi<BuerliState>["getState"], api: StoreApi<BuerliState>) => MessageState;
|
|
27
|
+
declare const messageApi: (set: StoreApi<BuerliState>["setState"], get: StoreApi<BuerliState>["getState"], api: StoreApi<BuerliState>) => {
|
|
28
28
|
show(message: Message): MessageID;
|
|
29
29
|
update(id: MessageID, message: Message): void;
|
|
30
30
|
close(id: MessageID): void;
|
|
@@ -2,7 +2,7 @@ import { StoreApi } from 'zustand';
|
|
|
2
2
|
import { ObjectID } from '../../re-export';
|
|
3
3
|
import { BuerliState } from './buerli';
|
|
4
4
|
import { DrawingID, DrawingState } from './drawing';
|
|
5
|
-
export
|
|
5
|
+
export type PluginDescription<InternalState = any> = {
|
|
6
6
|
name: string;
|
|
7
7
|
version: string;
|
|
8
8
|
author: string;
|
|
@@ -11,7 +11,7 @@ export declare type PluginDescription<InternalState = any> = {
|
|
|
11
11
|
initialState?: ((drawingId: DrawingID, objectId: ObjectID) => InternalState) | InternalState;
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type StateData<InternalState extends Record<any, any>> = PluginDescription<InternalState> & {
|
|
15
15
|
id: PluginID;
|
|
16
16
|
Root: ((options?: any) => any) | null;
|
|
17
17
|
View: ((options?: any) => any) | null;
|
|
@@ -20,16 +20,16 @@ declare type StateData<InternalState extends Record<any, any>> = PluginDescripti
|
|
|
20
20
|
state: InternalState;
|
|
21
21
|
set: (sel: Partial<InternalState> | ((state: InternalState) => Partial<InternalState>)) => void;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type Plugin = {
|
|
24
24
|
Root?: ((options?: any) => any) | null;
|
|
25
25
|
View?: ((options?: any) => any) | null;
|
|
26
26
|
description: PluginDescription;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
28
|
+
export type PluginDef = Plugin | Promise<Plugin>;
|
|
29
|
+
export type PluginImpl = PluginDef | (() => Plugin) | (() => Promise<Plugin>);
|
|
30
|
+
export type PluginID = ObjectID | string;
|
|
31
|
+
export type PluginState<InternalState extends Record<any, any> = any> = Readonly<StateData<InternalState>>;
|
|
32
|
+
export type PluginData = {
|
|
33
33
|
/** Contains ids of feature-plugins */
|
|
34
34
|
feature: PluginID[];
|
|
35
35
|
/** Contains ids of global-plugins */
|
|
@@ -41,9 +41,9 @@ export declare type PluginData = {
|
|
|
41
41
|
};
|
|
42
42
|
visible: PluginID[];
|
|
43
43
|
};
|
|
44
|
-
export
|
|
44
|
+
export type PluginApi = ReturnType<typeof pluginApi>;
|
|
45
45
|
export declare const pluginData: () => PluginData;
|
|
46
|
-
export declare const pluginApi: (set: StoreApi<DrawingState>[
|
|
46
|
+
export declare const pluginApi: (set: StoreApi<DrawingState>["setState"], get: StoreApi<DrawingState>["getState"], buerliApi: StoreApi<BuerliState>) => {
|
|
47
47
|
setActiveFeature: (id: ObjectID | null) => void;
|
|
48
48
|
setVisiblePlugin: (id: PluginID, visible: boolean) => void;
|
|
49
49
|
setActiveGlobal: (id: PluginID, active: boolean) => void;
|
|
@@ -4,18 +4,18 @@ import { GeometryElement, ProductElement } from './../../geometry/ThreeGeometryC
|
|
|
4
4
|
import { BuerliState } from './buerli';
|
|
5
5
|
import { DrawingState } from './drawing';
|
|
6
6
|
export declare const BuerliScope = "ClassCAD";
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
7
|
+
export type SelectorID = string | number;
|
|
8
|
+
export type SeletedItemData<T> = Record<string, T>;
|
|
9
|
+
export type SelectionScope = string | number;
|
|
10
|
+
export type SelectedItem<T extends SeletedItemData<any> = any> = {
|
|
11
11
|
readonly id: any;
|
|
12
12
|
readonly scope: SelectionScope;
|
|
13
13
|
readonly data: T;
|
|
14
14
|
readonly label?: any;
|
|
15
15
|
readonly removeCondition?: (d: DrawingState) => boolean;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
export
|
|
17
|
+
export type SelectionFilter<T = any> = (scope: SelectionScope, data: T) => boolean;
|
|
18
|
+
export type CustomSelect = (selectorId: SelectorID, newItems: SelectedItem[], diff: SelectedItem[], options?: {
|
|
19
19
|
[key: string]: any;
|
|
20
20
|
}) => void;
|
|
21
21
|
/**
|
|
@@ -27,7 +27,7 @@ export declare type CustomSelect = (selectorId: SelectorID, newItems: SelectedIt
|
|
|
27
27
|
* @property {(selectorId: SelectorID, items: SelectedItem[]) => void} customSelect - if customSelect is provided, it overrides setting of new items in select(..) api method. In this case user is responsible to update selector.items via setItems.
|
|
28
28
|
* @property {(selectorId: SelectorID, items: SelectedItem[]) => void} customUnSelect - if customSelect is provided, it overrides setting of new items in unselect(..) api method. In this case user is responsible to update selector.items via setItems.
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export type Selector<T extends SeletedItemData<any> = any> = {
|
|
31
31
|
readonly isSelectable: SelectionFilter;
|
|
32
32
|
readonly items: Array<SelectedItem<T>>;
|
|
33
33
|
readonly hoveredItem: SelectedItem<T> | null;
|
|
@@ -35,22 +35,22 @@ export declare type Selector<T extends SeletedItemData<any> = any> = {
|
|
|
35
35
|
readonly customSelect?: CustomSelect;
|
|
36
36
|
readonly customUnSelect?: CustomSelect;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type SelectionData = {
|
|
39
39
|
readonly refs: Record<SelectorID, Selector>;
|
|
40
40
|
readonly active: SelectorID | null;
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export type SelectionApi = ReturnType<typeof selectionApi>;
|
|
43
43
|
export declare const selectionData: () => SelectionData;
|
|
44
|
-
export declare const selectionApi: (set: StoreApi<DrawingState>[
|
|
44
|
+
export declare const selectionApi: (set: StoreApi<DrawingState>["setState"], get: StoreApi<DrawingState>["getState"], buerliApi: StoreApi<BuerliState>) => {
|
|
45
45
|
unselectAll(selectorId?: SelectorID, options?: {
|
|
46
46
|
[key: string]: any;
|
|
47
|
-
}
|
|
47
|
+
}): void;
|
|
48
48
|
unselect(items: SelectedItem | SelectedItem[], selectorId?: SelectorID, options?: {
|
|
49
49
|
[key: string]: any;
|
|
50
|
-
}
|
|
50
|
+
}): void;
|
|
51
51
|
select(items: SelectedItem | SelectedItem[], selectorId?: SelectorID, options?: {
|
|
52
52
|
[key: string]: any;
|
|
53
|
-
}
|
|
53
|
+
}): void;
|
|
54
54
|
setHovered(item: SelectedItem | null, selectorId?: SelectorID): void;
|
|
55
55
|
activateSelector(selectorId: SelectorID | null): void;
|
|
56
56
|
createSelector(selectorId: SelectorID, filter: SelectionFilter, activate?: boolean, initialItems?: SelectedItem[], maxLen?: number, customSelect?: CustomSelect, customUnSelect?: CustomSelect): () => void;
|
|
@@ -3,16 +3,22 @@ import { StoreApi } from 'zustand';
|
|
|
3
3
|
import { GraphicID, IStructureObject, IStructurePatch, IStructureProtocol, IStructureTree, ObjectID } from '../../re-export';
|
|
4
4
|
import { BuerliState } from './buerli';
|
|
5
5
|
import { DrawingState } from './drawing';
|
|
6
|
-
export
|
|
6
|
+
export type StructureData = IStructureProtocol & {
|
|
7
7
|
products: ObjectID[];
|
|
8
8
|
visibleContainers: GraphicID[];
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type StructureApi = ReturnType<typeof structureApi>;
|
|
11
11
|
export declare const structureData: () => StructureData;
|
|
12
|
-
export declare const structureApi: (set: StoreApi<DrawingState>[
|
|
12
|
+
export declare const structureApi: (set: StoreApi<DrawingState>["setState"], get: StoreApi<DrawingState>["getState"], buerliApi: StoreApi<BuerliState>) => {
|
|
13
13
|
get: () => StructureData;
|
|
14
14
|
set: (structure: IStructureProtocol) => void;
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Applies structure patches to the tree. Returns `false` when a patch block
|
|
17
|
+
* failed to apply — the tree is then diverged from the server's baseline and
|
|
18
|
+
* stays diverged (patches are relative), so the caller should recover by
|
|
19
|
+
* re-fetching the full tree.
|
|
20
|
+
*/
|
|
21
|
+
applyPatches: (patches: IStructurePatch[]) => boolean;
|
|
16
22
|
filterTree: (tree: IStructureTree, filter: (obj: IStructureObject) => boolean) => IStructureObject[];
|
|
17
23
|
findTree: (tree: IStructureTree, filter: (obj: IStructureObject) => boolean) => IStructureObject | undefined;
|
|
18
24
|
collectUsedSolidIds: () => ObjectID[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BuerliState } from './states/buerli';
|
|
2
|
-
export declare const api: import("zustand
|
|
2
|
+
export declare const api: import("zustand").StoreApi<BuerliState>;
|
|
@@ -2,7 +2,7 @@ import { GraphicID, ObjectID } from '../re-export';
|
|
|
2
2
|
/**
|
|
3
3
|
* It contains general information that can be used to identify CCObjects as well as Brep Elements.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type InteractionInfo<T = any> = {
|
|
6
6
|
/**
|
|
7
7
|
* Unique identifier of the interaction info.
|
|
8
8
|
*/
|
|
@@ -38,5 +38,5 @@ export declare type InteractionInfo<T = any> = {
|
|
|
38
38
|
*/
|
|
39
39
|
userData?: T;
|
|
40
40
|
};
|
|
41
|
-
export declare const createInfo: (data: Omit<InteractionInfo,
|
|
42
|
-
export declare const createUniqueIdent: (data: Omit<InteractionInfo,
|
|
41
|
+
export declare const createInfo: (data: Omit<InteractionInfo, "uniqueIdent">) => InteractionInfo;
|
|
42
|
+
export declare const createUniqueIdent: (data: Omit<InteractionInfo, "uniqueIdent">) => string;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { ArcGeometry, LineGeometry, PlaneGeometry, PointGeometry, ProductElement } from './../geometry';
|
|
3
3
|
import { DrawingID } from './../store/states/drawing';
|
|
4
|
-
export
|
|
4
|
+
export type ValueMeasureData = {
|
|
5
5
|
value: number;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type LinearMeasureData = {
|
|
8
8
|
value: number;
|
|
9
9
|
start: THREE.Vector3;
|
|
10
10
|
end: THREE.Vector3;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type AngularMeasureData = {
|
|
13
13
|
value: number;
|
|
14
14
|
center: THREE.Vector3;
|
|
15
15
|
dir1: THREE.Vector3;
|
|
16
16
|
dir2: THREE.Vector3;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type PositionMeasureData = {
|
|
19
19
|
value: THREE.Vector3;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type VectorMeasureData = {
|
|
22
22
|
value: THREE.Vector3;
|
|
23
23
|
start: THREE.Vector3;
|
|
24
24
|
end: THREE.Vector3;
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
type MeasureData = LinearMeasureData | AngularMeasureData | PositionMeasureData | VectorMeasureData | ValueMeasureData;
|
|
27
27
|
export declare enum MeasureResultType {
|
|
28
28
|
NONE = "none",
|
|
29
29
|
VALUE = "value",
|
|
@@ -32,12 +32,12 @@ export declare enum MeasureResultType {
|
|
|
32
32
|
VECTOR = "vector",
|
|
33
33
|
POSITION = "position"
|
|
34
34
|
}
|
|
35
|
-
export
|
|
35
|
+
export type MeasureResult = {
|
|
36
36
|
description: string;
|
|
37
37
|
type: MeasureResultType;
|
|
38
38
|
measureData?: MeasureData;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
type Item = ProductElement;
|
|
41
41
|
export declare const Measure: {
|
|
42
42
|
transform(items: Item[], drawingId: DrawingID): Item[];
|
|
43
43
|
getInfo(objects: Item[], drawingId: DrawingID): MeasureResult[];
|
package/package.json
CHANGED
|
@@ -1,45 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buerli.io/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.20261016085358",
|
|
4
4
|
"description": "buerli state management",
|
|
5
5
|
"author": "AWV Informatik AG <info@awv-informatik.ch>",
|
|
6
6
|
"license": "ISC",
|
|
7
|
-
"repository": {
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/awv-informatik/buerli.git",
|
|
10
|
+
"directory": "packages/core"
|
|
11
|
+
},
|
|
8
12
|
"main": "build/cjs/index.js",
|
|
9
13
|
"module": "build/esm/index.js",
|
|
10
14
|
"types": "build/types/index.d.ts",
|
|
11
15
|
"sideEffects": false,
|
|
12
16
|
"scripts": {
|
|
13
|
-
"ver": "yarn version --no-commit-hooks --no-git-tag-version --new-version",
|
|
14
17
|
"prepack": "npm run clean && npm run build -- --sourceMap false && npm run build:cjs -- --sourceMap false",
|
|
15
18
|
"clean": "rimraf ./build* && rimraf ./coverage && rimraf tsconfig.tsbuildinfo",
|
|
16
19
|
"build": "tsc -v && tsc",
|
|
17
|
-
"build:cjs": "tsc --target es2017 --module commonjs --composite false --declaration false --declarationDir null --outDir ./build/cjs",
|
|
20
|
+
"build:cjs": "tsc --target es2017 --module commonjs --moduleResolution node10 --ignoreDeprecations 6.0 --composite false --declaration false --declarationDir null --outDir ./build/cjs",
|
|
18
21
|
"lint": "eslint \"./src/**/*.ts?(x)\"",
|
|
19
|
-
"test": "
|
|
20
|
-
"coverage": "npm run clean && npm run build && npm run jestLite -- --coverage",
|
|
22
|
+
"test": "vitest run",
|
|
21
23
|
"prettify": "prettier --write \"./{src,tests}/**/*.{js,jsx,ts,tsx,json}\""
|
|
22
24
|
},
|
|
23
25
|
"devDependencies": {
|
|
24
|
-
"@
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"jest": "^26.1.0",
|
|
31
|
-
"rimraf": "^2.6.3",
|
|
32
|
-
"three": "^0.165",
|
|
33
|
-
"typescript": "4.8.4"
|
|
26
|
+
"@types/three": "~0.184.1",
|
|
27
|
+
"rimraf": "^6.1.3",
|
|
28
|
+
"three": "~0.184.0",
|
|
29
|
+
"typescript": "~6.0.3",
|
|
30
|
+
"vite": "^8.3.4",
|
|
31
|
+
"vitest": "^5.0.4"
|
|
34
32
|
},
|
|
35
33
|
"dependencies": {
|
|
36
34
|
"@classcad/api-js": "https://awvstatic.com/classcad/download/release/21.2.0/js/classcad-api-js-21.2.0.tgz",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"uuid": "^9.0.0",
|
|
40
|
-
"zustand": "^4.1.4"
|
|
35
|
+
"uuid": "^11.1.1",
|
|
36
|
+
"zustand": "^5.0.15"
|
|
41
37
|
},
|
|
42
38
|
"peerDependencies": {
|
|
43
|
-
"three": ">=0.
|
|
39
|
+
"three": ">=0.170"
|
|
44
40
|
}
|
|
45
41
|
}
|