@archilogic/extension-sdk 0.8.0 → 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 +6 -0
- package/dist/index.d.ts +108 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
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,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;
|
|
@@ -660,6 +679,20 @@ export declare interface ElementFilter extends BaseFilter {
|
|
|
660
679
|
isExternal?: BooleanComparator;
|
|
661
680
|
}
|
|
662
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
|
+
|
|
663
696
|
declare type ElementQuery = {
|
|
664
697
|
select?: ElementSelect;
|
|
665
698
|
where?: ElementFilter;
|
|
@@ -1083,6 +1116,24 @@ export declare type HostApi = {
|
|
|
1083
1116
|
selectNodes: (args: {
|
|
1084
1117
|
nodeIds: string[];
|
|
1085
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
|
+
}>;
|
|
1086
1137
|
/**
|
|
1087
1138
|
* @example
|
|
1088
1139
|
* ```ts
|
|
@@ -1121,7 +1172,7 @@ declare type IndexRange = {
|
|
|
1121
1172
|
end: number;
|
|
1122
1173
|
};
|
|
1123
1174
|
|
|
1124
|
-
declare type KeepAsync = 'prompt' | 'confirm';
|
|
1175
|
+
declare type KeepAsync = 'prompt' | 'confirm' | 'findClosest' | 'getPath';
|
|
1125
1176
|
|
|
1126
1177
|
declare class Layout2dView extends LayoutViewBase {
|
|
1127
1178
|
type: Layout2dViewType;
|
|
@@ -2352,6 +2403,10 @@ declare type NullComparator = {
|
|
|
2352
2403
|
null: boolean;
|
|
2353
2404
|
};
|
|
2354
2405
|
|
|
2406
|
+
declare type NullComparator_2 = {
|
|
2407
|
+
null: boolean;
|
|
2408
|
+
};
|
|
2409
|
+
|
|
2355
2410
|
declare type NumberComparator = number | {
|
|
2356
2411
|
eq: number;
|
|
2357
2412
|
} | {
|
|
@@ -2370,6 +2425,24 @@ declare type NumberComparator = number | {
|
|
|
2370
2425
|
lte: number;
|
|
2371
2426
|
};
|
|
2372
2427
|
|
|
2428
|
+
declare type NumberComparator_2 = number | {
|
|
2429
|
+
eq: number;
|
|
2430
|
+
} | {
|
|
2431
|
+
neq: number;
|
|
2432
|
+
} | {
|
|
2433
|
+
in: number[];
|
|
2434
|
+
} | {
|
|
2435
|
+
nin: number[];
|
|
2436
|
+
} | {
|
|
2437
|
+
gt: number;
|
|
2438
|
+
} | {
|
|
2439
|
+
gte: number;
|
|
2440
|
+
} | {
|
|
2441
|
+
lt: number;
|
|
2442
|
+
} | {
|
|
2443
|
+
lte: number;
|
|
2444
|
+
};
|
|
2445
|
+
|
|
2373
2446
|
declare interface NumberField extends BaseField {
|
|
2374
2447
|
type: 'number';
|
|
2375
2448
|
min: number;
|
|
@@ -2565,6 +2638,12 @@ declare interface ProductFilter extends BaseFilter {
|
|
|
2565
2638
|
seatCapacity?: NumberComparator;
|
|
2566
2639
|
}
|
|
2567
2640
|
|
|
2641
|
+
declare interface ProductFilter_2 extends BaseFilter_2 {
|
|
2642
|
+
category?: StringComparator_2;
|
|
2643
|
+
subCategory?: StringComparator_2;
|
|
2644
|
+
seatCapacity?: NumberComparator_2;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2568
2647
|
declare class ProductRemove extends OperationBase {
|
|
2569
2648
|
type: typeof ProductRemoveTypeValue;
|
|
2570
2649
|
value: ProductRemoveValue;
|
|
@@ -2792,6 +2871,21 @@ export declare interface SpaceFilter extends BaseFilter {
|
|
|
2792
2871
|
};
|
|
2793
2872
|
}
|
|
2794
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
|
+
};
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2795
2889
|
declare class SpaceGraph {
|
|
2796
2890
|
spatialStructure: SpaceGraphSpatialStructure;
|
|
2797
2891
|
products: SpaceGraphProduct[];
|
|
@@ -3640,10 +3734,22 @@ declare type StringComparator = string | {
|
|
|
3640
3734
|
contains: string;
|
|
3641
3735
|
};
|
|
3642
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;
|
|
3747
|
+
};
|
|
3748
|
+
|
|
3643
3749
|
declare type StyleByKey = Record<string, ShapeStyle>;
|
|
3644
3750
|
|
|
3645
3751
|
declare type StyledFilter = {
|
|
3646
|
-
where:
|
|
3752
|
+
where: ElementFilter_2 | SpaceFilter_2;
|
|
3647
3753
|
style: ShapeStyle;
|
|
3648
3754
|
};
|
|
3649
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
|
},
|
|
@@ -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.7.0",
|
|
40
40
|
"vite-plugin-static-copy": "^3.1.4"
|
|
41
41
|
},
|
|
42
42
|
"nx": {}
|