@archilogic/extension-sdk 0.8.0 → 0.9.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.
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +124 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @archilogic/extension-sdk
|
|
2
2
|
|
|
3
|
+
## 0.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 602b7a0: fix(extension-sdk): bump space-graph-sdk
|
|
8
|
+
|
|
9
|
+
## 0.9.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 986538d: feat(extension-sdk): add wayfinding methods
|
|
14
|
+
|
|
3
15
|
## 0.8.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -119,6 +119,19 @@ declare interface BaseFilter {
|
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
declare interface BaseFilter_2 {
|
|
123
|
+
id?: StringComparator_2;
|
|
124
|
+
type?: StringComparator_2;
|
|
125
|
+
name?: StringComparator_2 | NullComparator_2;
|
|
126
|
+
customId?: StringComparator_2 | NullComparator_2;
|
|
127
|
+
customAttributes?: Record<string, StringComparator_2 | NumberComparator_2 | BooleanComparator_2 | NullComparator_2>;
|
|
128
|
+
dimensions?: {
|
|
129
|
+
width?: NumberComparator_2;
|
|
130
|
+
length?: NumberComparator_2;
|
|
131
|
+
height?: NumberComparator_2;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
122
135
|
declare interface BaseSelect {
|
|
123
136
|
id?: boolean;
|
|
124
137
|
type?: boolean;
|
|
@@ -152,11 +165,31 @@ declare type BooleanComparator = boolean | {
|
|
|
152
165
|
neq: boolean;
|
|
153
166
|
};
|
|
154
167
|
|
|
168
|
+
declare type BooleanComparator_2 = boolean | {
|
|
169
|
+
eq: boolean;
|
|
170
|
+
} | {
|
|
171
|
+
neq: boolean;
|
|
172
|
+
};
|
|
173
|
+
|
|
155
174
|
declare interface BooleanField extends BaseField {
|
|
156
175
|
type: 'boolean';
|
|
157
176
|
default?: boolean;
|
|
158
177
|
}
|
|
159
178
|
|
|
179
|
+
declare interface BoundaryData {
|
|
180
|
+
profile: Vector2[];
|
|
181
|
+
segments: BoundarySegmentData[];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare interface BoundarySegmentData {
|
|
185
|
+
points: [Vector2, Vector2];
|
|
186
|
+
element: {
|
|
187
|
+
id: string;
|
|
188
|
+
type: string;
|
|
189
|
+
} | null;
|
|
190
|
+
adjacentSpaceId: string | null;
|
|
191
|
+
}
|
|
192
|
+
|
|
160
193
|
declare type BoundingBox3d = {
|
|
161
194
|
min: Vector3;
|
|
162
195
|
max: Vector3;
|
|
@@ -660,6 +693,20 @@ export declare interface ElementFilter extends BaseFilter {
|
|
|
660
693
|
isExternal?: BooleanComparator;
|
|
661
694
|
}
|
|
662
695
|
|
|
696
|
+
declare interface ElementFilter_2 extends BaseFilter_2 {
|
|
697
|
+
product?: ProductFilter_2;
|
|
698
|
+
category?: StringComparator_2;
|
|
699
|
+
subCategory?: StringComparator_2;
|
|
700
|
+
/** point query */
|
|
701
|
+
at?: Vector2;
|
|
702
|
+
/** 2d bounding box intersection */
|
|
703
|
+
within?: {
|
|
704
|
+
min: Vector2;
|
|
705
|
+
max: Vector2;
|
|
706
|
+
};
|
|
707
|
+
isExternal?: BooleanComparator_2;
|
|
708
|
+
}
|
|
709
|
+
|
|
663
710
|
declare type ElementQuery = {
|
|
664
711
|
select?: ElementSelect;
|
|
665
712
|
where?: ElementFilter;
|
|
@@ -1083,6 +1130,24 @@ export declare type HostApi = {
|
|
|
1083
1130
|
selectNodes: (args: {
|
|
1084
1131
|
nodeIds: string[];
|
|
1085
1132
|
}) => Promise<NodeResult[]>;
|
|
1133
|
+
getPath: (args: {
|
|
1134
|
+
start: Vector2;
|
|
1135
|
+
end: Vector2;
|
|
1136
|
+
}) => Promise<{
|
|
1137
|
+
path: Vector2[];
|
|
1138
|
+
distance: number;
|
|
1139
|
+
}>;
|
|
1140
|
+
findClosest: (args: {
|
|
1141
|
+
start: Vector2;
|
|
1142
|
+
where: ElementFilter | SpaceFilter;
|
|
1143
|
+
}) => Promise<{
|
|
1144
|
+
path: Vector2[];
|
|
1145
|
+
distance: number;
|
|
1146
|
+
target: {
|
|
1147
|
+
id?: string;
|
|
1148
|
+
position: Vector2;
|
|
1149
|
+
} | null;
|
|
1150
|
+
}>;
|
|
1086
1151
|
/**
|
|
1087
1152
|
* @example
|
|
1088
1153
|
* ```ts
|
|
@@ -1121,7 +1186,7 @@ declare type IndexRange = {
|
|
|
1121
1186
|
end: number;
|
|
1122
1187
|
};
|
|
1123
1188
|
|
|
1124
|
-
declare type KeepAsync = 'prompt' | 'confirm';
|
|
1189
|
+
declare type KeepAsync = 'prompt' | 'confirm' | 'findClosest' | 'getPath';
|
|
1125
1190
|
|
|
1126
1191
|
declare class Layout2dView extends LayoutViewBase {
|
|
1127
1192
|
type: Layout2dViewType;
|
|
@@ -2352,6 +2417,10 @@ declare type NullComparator = {
|
|
|
2352
2417
|
null: boolean;
|
|
2353
2418
|
};
|
|
2354
2419
|
|
|
2420
|
+
declare type NullComparator_2 = {
|
|
2421
|
+
null: boolean;
|
|
2422
|
+
};
|
|
2423
|
+
|
|
2355
2424
|
declare type NumberComparator = number | {
|
|
2356
2425
|
eq: number;
|
|
2357
2426
|
} | {
|
|
@@ -2370,6 +2439,24 @@ declare type NumberComparator = number | {
|
|
|
2370
2439
|
lte: number;
|
|
2371
2440
|
};
|
|
2372
2441
|
|
|
2442
|
+
declare type NumberComparator_2 = number | {
|
|
2443
|
+
eq: number;
|
|
2444
|
+
} | {
|
|
2445
|
+
neq: number;
|
|
2446
|
+
} | {
|
|
2447
|
+
in: number[];
|
|
2448
|
+
} | {
|
|
2449
|
+
nin: number[];
|
|
2450
|
+
} | {
|
|
2451
|
+
gt: number;
|
|
2452
|
+
} | {
|
|
2453
|
+
gte: number;
|
|
2454
|
+
} | {
|
|
2455
|
+
lt: number;
|
|
2456
|
+
} | {
|
|
2457
|
+
lte: number;
|
|
2458
|
+
};
|
|
2459
|
+
|
|
2373
2460
|
declare interface NumberField extends BaseField {
|
|
2374
2461
|
type: 'number';
|
|
2375
2462
|
min: number;
|
|
@@ -2565,6 +2652,12 @@ declare interface ProductFilter extends BaseFilter {
|
|
|
2565
2652
|
seatCapacity?: NumberComparator;
|
|
2566
2653
|
}
|
|
2567
2654
|
|
|
2655
|
+
declare interface ProductFilter_2 extends BaseFilter_2 {
|
|
2656
|
+
category?: StringComparator_2;
|
|
2657
|
+
subCategory?: StringComparator_2;
|
|
2658
|
+
seatCapacity?: NumberComparator_2;
|
|
2659
|
+
}
|
|
2660
|
+
|
|
2568
2661
|
declare class ProductRemove extends OperationBase {
|
|
2569
2662
|
type: typeof ProductRemoveTypeValue;
|
|
2570
2663
|
value: ProductRemoveValue;
|
|
@@ -2775,6 +2868,7 @@ export declare interface SpaceData extends BaseData {
|
|
|
2775
2868
|
seatCapacity: number;
|
|
2776
2869
|
area: number;
|
|
2777
2870
|
elements: ElementData[];
|
|
2871
|
+
boundaries: BoundaryData[];
|
|
2778
2872
|
}
|
|
2779
2873
|
|
|
2780
2874
|
export declare interface SpaceFilter extends BaseFilter {
|
|
@@ -2792,6 +2886,21 @@ export declare interface SpaceFilter extends BaseFilter {
|
|
|
2792
2886
|
};
|
|
2793
2887
|
}
|
|
2794
2888
|
|
|
2889
|
+
declare interface SpaceFilter_2 extends BaseFilter_2 {
|
|
2890
|
+
category?: StringComparator_2;
|
|
2891
|
+
subCategory?: StringComparator_2;
|
|
2892
|
+
seatCapacity?: NumberComparator_2;
|
|
2893
|
+
isExternal?: BooleanComparator_2;
|
|
2894
|
+
area?: NumberComparator_2;
|
|
2895
|
+
/** point query */
|
|
2896
|
+
at?: Vector2;
|
|
2897
|
+
/** 2d bounding box intersection */
|
|
2898
|
+
within?: {
|
|
2899
|
+
min: Vector2;
|
|
2900
|
+
max: Vector2;
|
|
2901
|
+
};
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2795
2904
|
declare class SpaceGraph {
|
|
2796
2905
|
spatialStructure: SpaceGraphSpatialStructure;
|
|
2797
2906
|
products: SpaceGraphProduct[];
|
|
@@ -3449,6 +3558,7 @@ export declare interface SpaceSelect extends BaseSelect {
|
|
|
3449
3558
|
area?: boolean;
|
|
3450
3559
|
seatCapacity?: boolean;
|
|
3451
3560
|
elements?: ElementQuery | boolean;
|
|
3561
|
+
boundaries?: boolean;
|
|
3452
3562
|
}
|
|
3453
3563
|
|
|
3454
3564
|
declare class SpaceUpdate extends OperationBase {
|
|
@@ -3640,10 +3750,22 @@ declare type StringComparator = string | {
|
|
|
3640
3750
|
contains: string;
|
|
3641
3751
|
};
|
|
3642
3752
|
|
|
3753
|
+
declare type StringComparator_2 = string | {
|
|
3754
|
+
eq: string;
|
|
3755
|
+
} | {
|
|
3756
|
+
neq: string;
|
|
3757
|
+
} | {
|
|
3758
|
+
in: string[];
|
|
3759
|
+
} | {
|
|
3760
|
+
nin: string[];
|
|
3761
|
+
} | {
|
|
3762
|
+
contains: string;
|
|
3763
|
+
};
|
|
3764
|
+
|
|
3643
3765
|
declare type StyleByKey = Record<string, ShapeStyle>;
|
|
3644
3766
|
|
|
3645
3767
|
declare type StyledFilter = {
|
|
3646
|
-
where:
|
|
3768
|
+
where: ElementFilter_2 | SpaceFilter_2;
|
|
3647
3769
|
style: ShapeStyle;
|
|
3648
3770
|
};
|
|
3649
3771
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archilogic/extension-sdk",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@archilogic/floor-plan-core": "^5.4.0",
|
|
39
|
-
"@archilogic/space-graph-sdk": "^0.
|
|
39
|
+
"@archilogic/space-graph-sdk": "^0.8.0",
|
|
40
40
|
"vite-plugin-static-copy": "^3.1.4"
|
|
41
41
|
},
|
|
42
42
|
"nx": {}
|