@archilogic/extension-sdk 0.7.1 → 0.9.0
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 +142 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @archilogic/extension-sdk
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 986538d: feat(extension-sdk): add wayfinding methods
|
|
8
|
+
|
|
9
|
+
## 0.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- be74edc: feat(extension-sdk): update space-graph-sdk
|
|
14
|
+
|
|
3
15
|
## 0.7.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -109,9 +109,9 @@ declare interface BaseField {
|
|
|
109
109
|
declare interface BaseFilter {
|
|
110
110
|
id?: StringComparator;
|
|
111
111
|
type?: StringComparator;
|
|
112
|
-
name?: StringComparator;
|
|
113
|
-
customId?: StringComparator;
|
|
114
|
-
customAttributes?: Record<string, StringComparator | NumberComparator | BooleanComparator>;
|
|
112
|
+
name?: StringComparator | NullComparator;
|
|
113
|
+
customId?: StringComparator | NullComparator;
|
|
114
|
+
customAttributes?: Record<string, StringComparator | NumberComparator | BooleanComparator | NullComparator>;
|
|
115
115
|
dimensions?: {
|
|
116
116
|
width?: NumberComparator;
|
|
117
117
|
length?: NumberComparator;
|
|
@@ -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,6 +165,12 @@ 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;
|
|
@@ -633,6 +652,8 @@ export declare interface ElementData extends BaseData {
|
|
|
633
652
|
type: LayoutElementJson['type'];
|
|
634
653
|
isExternal: boolean;
|
|
635
654
|
parameters: LayoutElementJson['parameters'];
|
|
655
|
+
category: string;
|
|
656
|
+
subCategory: string;
|
|
636
657
|
product: ProductData;
|
|
637
658
|
/** local transform for nested elements like openings, windows */
|
|
638
659
|
localTransform: SimpleTransform3d;
|
|
@@ -646,9 +667,32 @@ export declare interface ElementData extends BaseData {
|
|
|
646
667
|
|
|
647
668
|
export declare interface ElementFilter extends BaseFilter {
|
|
648
669
|
product?: ProductFilter;
|
|
670
|
+
category?: StringComparator;
|
|
671
|
+
subCategory?: StringComparator;
|
|
672
|
+
/** point query */
|
|
673
|
+
at?: Vector2;
|
|
674
|
+
/** 2d bounding box intersection */
|
|
675
|
+
within?: {
|
|
676
|
+
min: Vector2;
|
|
677
|
+
max: Vector2;
|
|
678
|
+
};
|
|
649
679
|
isExternal?: BooleanComparator;
|
|
650
680
|
}
|
|
651
681
|
|
|
682
|
+
declare interface ElementFilter_2 extends BaseFilter_2 {
|
|
683
|
+
product?: ProductFilter_2;
|
|
684
|
+
category?: StringComparator_2;
|
|
685
|
+
subCategory?: StringComparator_2;
|
|
686
|
+
/** point query */
|
|
687
|
+
at?: Vector2;
|
|
688
|
+
/** 2d bounding box intersection */
|
|
689
|
+
within?: {
|
|
690
|
+
min: Vector2;
|
|
691
|
+
max: Vector2;
|
|
692
|
+
};
|
|
693
|
+
isExternal?: BooleanComparator_2;
|
|
694
|
+
}
|
|
695
|
+
|
|
652
696
|
declare type ElementQuery = {
|
|
653
697
|
select?: ElementSelect;
|
|
654
698
|
where?: ElementFilter;
|
|
@@ -670,6 +714,8 @@ declare const ElementRemoveTypeValue: "operation:elementRemove";
|
|
|
670
714
|
|
|
671
715
|
export declare interface ElementSelect extends BaseSelect {
|
|
672
716
|
product?: ProductSelect | boolean;
|
|
717
|
+
category?: boolean;
|
|
718
|
+
subCategory?: boolean;
|
|
673
719
|
isExternal?: boolean;
|
|
674
720
|
localBoundingBox?: boolean;
|
|
675
721
|
localTransform?: boolean;
|
|
@@ -777,6 +823,7 @@ export declare type FloorPlanTheme = {
|
|
|
777
823
|
};
|
|
778
824
|
byId?: StyleByKey;
|
|
779
825
|
byFilter?: ThemeStyles['byFilter'];
|
|
826
|
+
/* Excluded from this release type: byResolvedFilter */
|
|
780
827
|
byType?: ThemeStyles['byType'];
|
|
781
828
|
};
|
|
782
829
|
|
|
@@ -1069,6 +1116,24 @@ export declare type HostApi = {
|
|
|
1069
1116
|
selectNodes: (args: {
|
|
1070
1117
|
nodeIds: string[];
|
|
1071
1118
|
}) => Promise<NodeResult[]>;
|
|
1119
|
+
getPath: (args: {
|
|
1120
|
+
start: Vector2;
|
|
1121
|
+
end: Vector2;
|
|
1122
|
+
}) => Promise<{
|
|
1123
|
+
path: Vector2[];
|
|
1124
|
+
distance: number;
|
|
1125
|
+
}>;
|
|
1126
|
+
findClosest: (args: {
|
|
1127
|
+
start: Vector2;
|
|
1128
|
+
where: ElementFilter | SpaceFilter;
|
|
1129
|
+
}) => Promise<{
|
|
1130
|
+
path: Vector2[];
|
|
1131
|
+
distance: number;
|
|
1132
|
+
target: {
|
|
1133
|
+
id?: string;
|
|
1134
|
+
position: Vector2;
|
|
1135
|
+
} | null;
|
|
1136
|
+
}>;
|
|
1072
1137
|
/**
|
|
1073
1138
|
* @example
|
|
1074
1139
|
* ```ts
|
|
@@ -1107,7 +1172,7 @@ declare type IndexRange = {
|
|
|
1107
1172
|
end: number;
|
|
1108
1173
|
};
|
|
1109
1174
|
|
|
1110
|
-
declare type KeepAsync = 'prompt' | 'confirm';
|
|
1175
|
+
declare type KeepAsync = 'prompt' | 'confirm' | 'findClosest' | 'getPath';
|
|
1111
1176
|
|
|
1112
1177
|
declare class Layout2dView extends LayoutViewBase {
|
|
1113
1178
|
type: Layout2dViewType;
|
|
@@ -2334,12 +2399,40 @@ declare type NodesByType<NodeMap extends NodeTypeMap = {}> = {
|
|
|
2334
2399
|
|
|
2335
2400
|
declare type NodeTypeMap = Record<string, any>;
|
|
2336
2401
|
|
|
2402
|
+
declare type NullComparator = {
|
|
2403
|
+
null: boolean;
|
|
2404
|
+
};
|
|
2405
|
+
|
|
2406
|
+
declare type NullComparator_2 = {
|
|
2407
|
+
null: boolean;
|
|
2408
|
+
};
|
|
2409
|
+
|
|
2337
2410
|
declare type NumberComparator = number | {
|
|
2338
2411
|
eq: number;
|
|
2339
2412
|
} | {
|
|
2340
2413
|
neq: number;
|
|
2341
2414
|
} | {
|
|
2342
2415
|
in: number[];
|
|
2416
|
+
} | {
|
|
2417
|
+
nin: number[];
|
|
2418
|
+
} | {
|
|
2419
|
+
gt: number;
|
|
2420
|
+
} | {
|
|
2421
|
+
gte: number;
|
|
2422
|
+
} | {
|
|
2423
|
+
lt: number;
|
|
2424
|
+
} | {
|
|
2425
|
+
lte: number;
|
|
2426
|
+
};
|
|
2427
|
+
|
|
2428
|
+
declare type NumberComparator_2 = number | {
|
|
2429
|
+
eq: number;
|
|
2430
|
+
} | {
|
|
2431
|
+
neq: number;
|
|
2432
|
+
} | {
|
|
2433
|
+
in: number[];
|
|
2434
|
+
} | {
|
|
2435
|
+
nin: number[];
|
|
2343
2436
|
} | {
|
|
2344
2437
|
gt: number;
|
|
2345
2438
|
} | {
|
|
@@ -2545,6 +2638,12 @@ declare interface ProductFilter extends BaseFilter {
|
|
|
2545
2638
|
seatCapacity?: NumberComparator;
|
|
2546
2639
|
}
|
|
2547
2640
|
|
|
2641
|
+
declare interface ProductFilter_2 extends BaseFilter_2 {
|
|
2642
|
+
category?: StringComparator_2;
|
|
2643
|
+
subCategory?: StringComparator_2;
|
|
2644
|
+
seatCapacity?: NumberComparator_2;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2548
2647
|
declare class ProductRemove extends OperationBase {
|
|
2549
2648
|
type: typeof ProductRemoveTypeValue;
|
|
2550
2649
|
value: ProductRemoveValue;
|
|
@@ -2763,6 +2862,28 @@ export declare interface SpaceFilter extends BaseFilter {
|
|
|
2763
2862
|
seatCapacity?: NumberComparator;
|
|
2764
2863
|
isExternal?: BooleanComparator;
|
|
2765
2864
|
area?: NumberComparator;
|
|
2865
|
+
/** point query */
|
|
2866
|
+
at?: Vector2;
|
|
2867
|
+
/** 2d bounding box intersection */
|
|
2868
|
+
within?: {
|
|
2869
|
+
min: Vector2;
|
|
2870
|
+
max: Vector2;
|
|
2871
|
+
};
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
declare interface SpaceFilter_2 extends BaseFilter_2 {
|
|
2875
|
+
category?: StringComparator_2;
|
|
2876
|
+
subCategory?: StringComparator_2;
|
|
2877
|
+
seatCapacity?: NumberComparator_2;
|
|
2878
|
+
isExternal?: BooleanComparator_2;
|
|
2879
|
+
area?: NumberComparator_2;
|
|
2880
|
+
/** point query */
|
|
2881
|
+
at?: Vector2;
|
|
2882
|
+
/** 2d bounding box intersection */
|
|
2883
|
+
within?: {
|
|
2884
|
+
min: Vector2;
|
|
2885
|
+
max: Vector2;
|
|
2886
|
+
};
|
|
2766
2887
|
}
|
|
2767
2888
|
|
|
2768
2889
|
declare class SpaceGraph {
|
|
@@ -3607,12 +3728,28 @@ declare type StringComparator = string | {
|
|
|
3607
3728
|
neq: string;
|
|
3608
3729
|
} | {
|
|
3609
3730
|
in: string[];
|
|
3731
|
+
} | {
|
|
3732
|
+
nin: string[];
|
|
3733
|
+
} | {
|
|
3734
|
+
contains: string;
|
|
3735
|
+
};
|
|
3736
|
+
|
|
3737
|
+
declare type StringComparator_2 = string | {
|
|
3738
|
+
eq: string;
|
|
3739
|
+
} | {
|
|
3740
|
+
neq: string;
|
|
3741
|
+
} | {
|
|
3742
|
+
in: string[];
|
|
3743
|
+
} | {
|
|
3744
|
+
nin: string[];
|
|
3745
|
+
} | {
|
|
3746
|
+
contains: string;
|
|
3610
3747
|
};
|
|
3611
3748
|
|
|
3612
3749
|
declare type StyleByKey = Record<string, ShapeStyle>;
|
|
3613
3750
|
|
|
3614
3751
|
declare type StyledFilter = {
|
|
3615
|
-
where:
|
|
3752
|
+
where: ElementFilter_2 | SpaceFilter_2;
|
|
3616
3753
|
style: ShapeStyle;
|
|
3617
3754
|
};
|
|
3618
3755
|
|
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.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"tiny-emitter": "^2.1.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@archilogic/floor-plan-core": "^5.
|
|
39
|
-
"@archilogic/space-graph-sdk": "^0.
|
|
38
|
+
"@archilogic/floor-plan-core": "^5.4.0",
|
|
39
|
+
"@archilogic/space-graph-sdk": "^0.7.0",
|
|
40
40
|
"vite-plugin-static-copy": "^3.1.4"
|
|
41
41
|
},
|
|
42
42
|
"nx": {}
|