@feltmaps/js-sdk 1.5.0-next.3 → 1.5.0-next.4
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/dist/client.cjs +1 -1
- package/dist/client.d.cts +61 -8
- package/dist/client.d.ts +61 -8
- package/dist/client.js +1 -1
- package/dist/handler.cjs +1 -1
- package/dist/handler.d.cts +102 -60
- package/dist/handler.d.ts +102 -60
- package/dist/handler.js +1 -1
- package/dist/{types-C1KBpQWi.d.cts → types-CPZlLnbg.d.cts} +46 -35
- package/dist/{types-C1KBpQWi.d.ts → types-CPZlLnbg.d.ts} +46 -35
- package/handler.d.ts +102 -60
- package/handler.js +1 -1
- package/package.json +1 -1
- package/{types-C1KBpQWi.d.ts → types-CPZlLnbg.d.ts} +46 -35
package/handler.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { z as zInfer, E as Element, G as Geometry, b as ElementGroup, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, M as MapInteractionEvent, L as Layer, j as LayerGroup, n as LegendItem, q as LayerFilters, s as Feature, i as LayerChangeCallbackParams, l as LayerGroupChangeCallbackParams, p as LegendItemChangeCallbackParams, ag as FilterTernary, t as EntityNode, T as ToolType, v as ToolSettingsMap, w as ToolSettingsChangeEvent, V as ViewportState, y as ViewportConstraints, aG as UnionToIntersection, aH as PromiseOrNot } from './types-
|
|
3
|
+
import { z as zInfer, E as Element, G as Geometry, b as ElementGroup, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, M as MapInteractionEvent, L as Layer, j as LayerGroup, n as LegendItem, q as LayerFilters, s as Feature, i as LayerChangeCallbackParams, l as LayerGroupChangeCallbackParams, p as LegendItemChangeCallbackParams, ag as FilterTernary, t as EntityNode, T as ToolType, v as ToolSettingsMap, w as ToolSettingsChangeEvent, V as ViewportState, y as ViewportConstraints, aG as UnionToIntersection, aH as PromiseOrNot } from './types-CPZlLnbg.js';
|
|
4
4
|
|
|
5
5
|
type Method<TRequest extends {
|
|
6
6
|
type: string;
|
|
@@ -13,6 +13,9 @@ type Listener<TOptions, TParams> = {
|
|
|
13
13
|
options: TOptions;
|
|
14
14
|
eventParams: TParams;
|
|
15
15
|
};
|
|
16
|
+
type ListenerNoOptions<TParams> = {
|
|
17
|
+
eventParams: TParams;
|
|
18
|
+
};
|
|
16
19
|
|
|
17
20
|
declare const GetElementMessage: z.ZodObject<{
|
|
18
21
|
type: z.ZodLiteral<"getElement">;
|
|
@@ -132,6 +135,29 @@ declare const OnElementChangeMessage: z.ZodObject<{
|
|
|
132
135
|
id: string;
|
|
133
136
|
eventName: "onElementChange";
|
|
134
137
|
}>;
|
|
138
|
+
declare const OnElementDeleteMessage: z.ZodObject<{
|
|
139
|
+
eventName: z.ZodLiteral<"onElementDelete">;
|
|
140
|
+
id: z.ZodString;
|
|
141
|
+
options: z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
id: string;
|
|
145
|
+
}, {
|
|
146
|
+
id: string;
|
|
147
|
+
}>;
|
|
148
|
+
}, "strict", z.ZodTypeAny, {
|
|
149
|
+
options: {
|
|
150
|
+
id: string;
|
|
151
|
+
};
|
|
152
|
+
id: string;
|
|
153
|
+
eventName: "onElementDelete";
|
|
154
|
+
}, {
|
|
155
|
+
options: {
|
|
156
|
+
id: string;
|
|
157
|
+
};
|
|
158
|
+
id: string;
|
|
159
|
+
eventName: "onElementDelete";
|
|
160
|
+
}>;
|
|
135
161
|
declare const OnElementGroupChangeMessage: z.ZodObject<{
|
|
136
162
|
eventName: z.ZodLiteral<"onElementGroupChange">;
|
|
137
163
|
id: z.ZodString;
|
|
@@ -346,6 +372,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
346
372
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
347
373
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
348
374
|
size: z.ZodOptional<z.ZodNumber>;
|
|
375
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
349
376
|
}, "id">, "strip", z.ZodTypeAny, {
|
|
350
377
|
type: "Marker";
|
|
351
378
|
coordinates: [number, number][][];
|
|
@@ -356,6 +383,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
356
383
|
attributes?: Record<string, unknown> | undefined;
|
|
357
384
|
opacity?: number | undefined;
|
|
358
385
|
size?: number | undefined;
|
|
386
|
+
zoom?: number | undefined;
|
|
359
387
|
}, {
|
|
360
388
|
type: "Marker";
|
|
361
389
|
coordinates: [number, number][][];
|
|
@@ -366,6 +394,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
366
394
|
attributes?: Record<string, unknown> | undefined;
|
|
367
395
|
opacity?: number | undefined;
|
|
368
396
|
size?: number | undefined;
|
|
397
|
+
zoom?: number | undefined;
|
|
369
398
|
}>, z.ZodObject<Omit<{
|
|
370
399
|
type: z.ZodLiteral<"Highlighter">;
|
|
371
400
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
@@ -399,7 +428,6 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
399
428
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">;
|
|
400
429
|
id: z.ZodOptional<z.ZodString>;
|
|
401
430
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
402
|
-
color: z.ZodOptional<z.ZodString>;
|
|
403
431
|
name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
404
432
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
405
433
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -410,7 +438,6 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
410
438
|
coordinates: [number, number][][];
|
|
411
439
|
imageUrl: string;
|
|
412
440
|
groupId?: string | null | undefined;
|
|
413
|
-
color?: string | undefined;
|
|
414
441
|
name?: string | null | undefined;
|
|
415
442
|
description?: string | null | undefined;
|
|
416
443
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -420,7 +447,6 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
420
447
|
coordinates: [number, number][][];
|
|
421
448
|
imageUrl: string;
|
|
422
449
|
groupId?: string | null | undefined;
|
|
423
|
-
color?: string | undefined;
|
|
424
450
|
name?: string | null | undefined;
|
|
425
451
|
description?: string | null | undefined;
|
|
426
452
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -434,6 +460,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
434
460
|
name: z.ZodOptional<z.ZodString>;
|
|
435
461
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
436
462
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
463
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
437
464
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
438
465
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
439
466
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
@@ -447,6 +474,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
447
474
|
color?: string | undefined;
|
|
448
475
|
description?: string | null | undefined;
|
|
449
476
|
attributes?: Record<string, unknown> | undefined;
|
|
477
|
+
zoom?: number | undefined;
|
|
450
478
|
position?: [number, number] | undefined;
|
|
451
479
|
rotation?: number | undefined;
|
|
452
480
|
scale?: number | undefined;
|
|
@@ -459,6 +487,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
459
487
|
color?: string | undefined;
|
|
460
488
|
description?: string | null | undefined;
|
|
461
489
|
attributes?: Record<string, unknown> | undefined;
|
|
490
|
+
zoom?: number | undefined;
|
|
462
491
|
position?: [number, number] | undefined;
|
|
463
492
|
rotation?: number | undefined;
|
|
464
493
|
scale?: number | undefined;
|
|
@@ -473,13 +502,14 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
473
502
|
name: z.ZodOptional<z.ZodString>;
|
|
474
503
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
475
504
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
505
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
476
506
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
477
507
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
478
508
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
479
509
|
text: z.ZodString;
|
|
480
510
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
481
511
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
482
|
-
|
|
512
|
+
widthScale: z.ZodOptional<z.ZodNumber>;
|
|
483
513
|
}, "id">, "coordinates" | "name">, "strip", z.ZodTypeAny, {
|
|
484
514
|
type: "Note";
|
|
485
515
|
text: string;
|
|
@@ -487,12 +517,13 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
487
517
|
color?: string | undefined;
|
|
488
518
|
description?: string | null | undefined;
|
|
489
519
|
attributes?: Record<string, unknown> | undefined;
|
|
520
|
+
zoom?: number | undefined;
|
|
490
521
|
position?: [number, number] | undefined;
|
|
491
522
|
rotation?: number | undefined;
|
|
492
523
|
scale?: number | undefined;
|
|
493
524
|
align?: "left" | "center" | "right" | undefined;
|
|
494
525
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
495
|
-
|
|
526
|
+
widthScale?: number | undefined;
|
|
496
527
|
}, {
|
|
497
528
|
type: "Note";
|
|
498
529
|
text: string;
|
|
@@ -500,12 +531,13 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
500
531
|
color?: string | undefined;
|
|
501
532
|
description?: string | null | undefined;
|
|
502
533
|
attributes?: Record<string, unknown> | undefined;
|
|
534
|
+
zoom?: number | undefined;
|
|
503
535
|
position?: [number, number] | undefined;
|
|
504
536
|
rotation?: number | undefined;
|
|
505
537
|
scale?: number | undefined;
|
|
506
538
|
align?: "left" | "center" | "right" | undefined;
|
|
507
539
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
508
|
-
|
|
540
|
+
widthScale?: number | undefined;
|
|
509
541
|
}>]>;
|
|
510
542
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
511
543
|
params: {
|
|
@@ -576,6 +608,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
576
608
|
attributes?: Record<string, unknown> | undefined;
|
|
577
609
|
opacity?: number | undefined;
|
|
578
610
|
size?: number | undefined;
|
|
611
|
+
zoom?: number | undefined;
|
|
579
612
|
} | {
|
|
580
613
|
type: "Highlighter";
|
|
581
614
|
coordinates: [number, number][][];
|
|
@@ -592,6 +625,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
592
625
|
color?: string | undefined;
|
|
593
626
|
description?: string | null | undefined;
|
|
594
627
|
attributes?: Record<string, unknown> | undefined;
|
|
628
|
+
zoom?: number | undefined;
|
|
595
629
|
position?: [number, number] | undefined;
|
|
596
630
|
rotation?: number | undefined;
|
|
597
631
|
scale?: number | undefined;
|
|
@@ -604,18 +638,18 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
604
638
|
color?: string | undefined;
|
|
605
639
|
description?: string | null | undefined;
|
|
606
640
|
attributes?: Record<string, unknown> | undefined;
|
|
641
|
+
zoom?: number | undefined;
|
|
607
642
|
position?: [number, number] | undefined;
|
|
608
643
|
rotation?: number | undefined;
|
|
609
644
|
scale?: number | undefined;
|
|
610
645
|
align?: "left" | "center" | "right" | undefined;
|
|
611
646
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
612
|
-
|
|
647
|
+
widthScale?: number | undefined;
|
|
613
648
|
} | {
|
|
614
649
|
type: "Image";
|
|
615
650
|
coordinates: [number, number][][];
|
|
616
651
|
imageUrl: string;
|
|
617
652
|
groupId?: string | null | undefined;
|
|
618
|
-
color?: string | undefined;
|
|
619
653
|
name?: string | null | undefined;
|
|
620
654
|
description?: string | null | undefined;
|
|
621
655
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -691,6 +725,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
691
725
|
attributes?: Record<string, unknown> | undefined;
|
|
692
726
|
opacity?: number | undefined;
|
|
693
727
|
size?: number | undefined;
|
|
728
|
+
zoom?: number | undefined;
|
|
694
729
|
} | {
|
|
695
730
|
type: "Highlighter";
|
|
696
731
|
coordinates: [number, number][][];
|
|
@@ -707,6 +742,7 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
707
742
|
color?: string | undefined;
|
|
708
743
|
description?: string | null | undefined;
|
|
709
744
|
attributes?: Record<string, unknown> | undefined;
|
|
745
|
+
zoom?: number | undefined;
|
|
710
746
|
position?: [number, number] | undefined;
|
|
711
747
|
rotation?: number | undefined;
|
|
712
748
|
scale?: number | undefined;
|
|
@@ -719,18 +755,18 @@ declare const CreateElementMessage: z.ZodObject<{
|
|
|
719
755
|
color?: string | undefined;
|
|
720
756
|
description?: string | null | undefined;
|
|
721
757
|
attributes?: Record<string, unknown> | undefined;
|
|
758
|
+
zoom?: number | undefined;
|
|
722
759
|
position?: [number, number] | undefined;
|
|
723
760
|
rotation?: number | undefined;
|
|
724
761
|
scale?: number | undefined;
|
|
725
762
|
align?: "left" | "center" | "right" | undefined;
|
|
726
763
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
727
|
-
|
|
764
|
+
widthScale?: number | undefined;
|
|
728
765
|
} | {
|
|
729
766
|
type: "Image";
|
|
730
767
|
coordinates: [number, number][][];
|
|
731
768
|
imageUrl: string;
|
|
732
769
|
groupId?: string | null | undefined;
|
|
733
|
-
color?: string | undefined;
|
|
734
770
|
name?: string | null | undefined;
|
|
735
771
|
description?: string | null | undefined;
|
|
736
772
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -937,6 +973,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
937
973
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
938
974
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
939
975
|
size: z.ZodOptional<z.ZodNumber>;
|
|
976
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
940
977
|
}, "strip", z.ZodTypeAny, {
|
|
941
978
|
type: "Marker";
|
|
942
979
|
id: string;
|
|
@@ -948,6 +985,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
948
985
|
attributes?: Record<string, unknown> | undefined;
|
|
949
986
|
opacity?: number | undefined;
|
|
950
987
|
size?: number | undefined;
|
|
988
|
+
zoom?: number | undefined;
|
|
951
989
|
}, {
|
|
952
990
|
type: "Marker";
|
|
953
991
|
id: string;
|
|
@@ -959,6 +997,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
959
997
|
attributes?: Record<string, unknown> | undefined;
|
|
960
998
|
opacity?: number | undefined;
|
|
961
999
|
size?: number | undefined;
|
|
1000
|
+
zoom?: number | undefined;
|
|
962
1001
|
}>, z.ZodObject<{
|
|
963
1002
|
type: z.ZodLiteral<"Highlighter">;
|
|
964
1003
|
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
@@ -989,7 +1028,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
989
1028
|
description?: string | null | undefined;
|
|
990
1029
|
attributes?: Record<string, unknown> | undefined;
|
|
991
1030
|
opacity?: number | undefined;
|
|
992
|
-
}>, z.ZodObject<{
|
|
1031
|
+
}>, z.ZodObject<Omit<{
|
|
993
1032
|
type: z.ZodLiteral<"Text">;
|
|
994
1033
|
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
995
1034
|
id: z.ZodString;
|
|
@@ -998,21 +1037,21 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
998
1037
|
name: z.ZodOptional<z.ZodString>;
|
|
999
1038
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1000
1039
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1040
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1001
1041
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1002
1042
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1003
1043
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
1004
1044
|
text: z.ZodOptional<z.ZodString>;
|
|
1005
1045
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1006
1046
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
1007
|
-
}, "strip", z.ZodTypeAny, {
|
|
1047
|
+
}, "coordinates" | "name">, "strip", z.ZodTypeAny, {
|
|
1008
1048
|
type: "Text";
|
|
1009
1049
|
id: string;
|
|
1010
|
-
coordinates?: [number, number][][] | undefined;
|
|
1011
1050
|
groupId?: string | null | undefined;
|
|
1012
1051
|
color?: string | undefined;
|
|
1013
|
-
name?: string | undefined;
|
|
1014
1052
|
description?: string | null | undefined;
|
|
1015
1053
|
attributes?: Record<string, unknown> | undefined;
|
|
1054
|
+
zoom?: number | undefined;
|
|
1016
1055
|
position?: [number, number] | undefined;
|
|
1017
1056
|
rotation?: number | undefined;
|
|
1018
1057
|
scale?: number | undefined;
|
|
@@ -1022,19 +1061,18 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1022
1061
|
}, {
|
|
1023
1062
|
type: "Text";
|
|
1024
1063
|
id: string;
|
|
1025
|
-
coordinates?: [number, number][][] | undefined;
|
|
1026
1064
|
groupId?: string | null | undefined;
|
|
1027
1065
|
color?: string | undefined;
|
|
1028
|
-
name?: string | undefined;
|
|
1029
1066
|
description?: string | null | undefined;
|
|
1030
1067
|
attributes?: Record<string, unknown> | undefined;
|
|
1068
|
+
zoom?: number | undefined;
|
|
1031
1069
|
position?: [number, number] | undefined;
|
|
1032
1070
|
rotation?: number | undefined;
|
|
1033
1071
|
scale?: number | undefined;
|
|
1034
1072
|
text?: string | undefined;
|
|
1035
1073
|
align?: "left" | "center" | "right" | undefined;
|
|
1036
1074
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1037
|
-
}>, z.ZodObject<{
|
|
1075
|
+
}>, z.ZodObject<Omit<{
|
|
1038
1076
|
type: z.ZodLiteral<"Note">;
|
|
1039
1077
|
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1040
1078
|
id: z.ZodString;
|
|
@@ -1043,51 +1081,49 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1043
1081
|
name: z.ZodOptional<z.ZodString>;
|
|
1044
1082
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1045
1083
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1084
|
+
zoom: z.ZodOptional<z.ZodNumber>;
|
|
1046
1085
|
position: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
1047
1086
|
rotation: z.ZodOptional<z.ZodNumber>;
|
|
1048
1087
|
scale: z.ZodOptional<z.ZodNumber>;
|
|
1049
1088
|
text: z.ZodOptional<z.ZodString>;
|
|
1050
1089
|
align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
|
|
1051
1090
|
style: z.ZodOptional<z.ZodEnum<["italic", "light", "regular", "caps"]>>;
|
|
1052
|
-
|
|
1053
|
-
}, "strip", z.ZodTypeAny, {
|
|
1091
|
+
widthScale: z.ZodOptional<z.ZodNumber>;
|
|
1092
|
+
}, "coordinates" | "name">, "strip", z.ZodTypeAny, {
|
|
1054
1093
|
type: "Note";
|
|
1055
1094
|
id: string;
|
|
1056
|
-
coordinates?: [number, number][][] | undefined;
|
|
1057
1095
|
groupId?: string | null | undefined;
|
|
1058
1096
|
color?: string | undefined;
|
|
1059
|
-
name?: string | undefined;
|
|
1060
1097
|
description?: string | null | undefined;
|
|
1061
1098
|
attributes?: Record<string, unknown> | undefined;
|
|
1099
|
+
zoom?: number | undefined;
|
|
1062
1100
|
position?: [number, number] | undefined;
|
|
1063
1101
|
rotation?: number | undefined;
|
|
1064
1102
|
scale?: number | undefined;
|
|
1065
1103
|
text?: string | undefined;
|
|
1066
1104
|
align?: "left" | "center" | "right" | undefined;
|
|
1067
1105
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1068
|
-
|
|
1106
|
+
widthScale?: number | undefined;
|
|
1069
1107
|
}, {
|
|
1070
1108
|
type: "Note";
|
|
1071
1109
|
id: string;
|
|
1072
|
-
coordinates?: [number, number][][] | undefined;
|
|
1073
1110
|
groupId?: string | null | undefined;
|
|
1074
1111
|
color?: string | undefined;
|
|
1075
|
-
name?: string | undefined;
|
|
1076
1112
|
description?: string | null | undefined;
|
|
1077
1113
|
attributes?: Record<string, unknown> | undefined;
|
|
1114
|
+
zoom?: number | undefined;
|
|
1078
1115
|
position?: [number, number] | undefined;
|
|
1079
1116
|
rotation?: number | undefined;
|
|
1080
1117
|
scale?: number | undefined;
|
|
1081
1118
|
text?: string | undefined;
|
|
1082
1119
|
align?: "left" | "center" | "right" | undefined;
|
|
1083
1120
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1084
|
-
|
|
1121
|
+
widthScale?: number | undefined;
|
|
1085
1122
|
}>, z.ZodObject<{
|
|
1086
1123
|
type: z.ZodLiteral<"Image">;
|
|
1087
1124
|
coordinates: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>, "many">, "many">>;
|
|
1088
1125
|
id: z.ZodString;
|
|
1089
1126
|
groupId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1090
|
-
color: z.ZodOptional<z.ZodString>;
|
|
1091
1127
|
name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1092
1128
|
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
1093
1129
|
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -1098,7 +1134,6 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1098
1134
|
id: string;
|
|
1099
1135
|
coordinates?: [number, number][][] | undefined;
|
|
1100
1136
|
groupId?: string | null | undefined;
|
|
1101
|
-
color?: string | undefined;
|
|
1102
1137
|
name?: string | null | undefined;
|
|
1103
1138
|
description?: string | null | undefined;
|
|
1104
1139
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -1109,7 +1144,6 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1109
1144
|
id: string;
|
|
1110
1145
|
coordinates?: [number, number][][] | undefined;
|
|
1111
1146
|
groupId?: string | null | undefined;
|
|
1112
|
-
color?: string | undefined;
|
|
1113
1147
|
name?: string | null | undefined;
|
|
1114
1148
|
description?: string | null | undefined;
|
|
1115
1149
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -1190,6 +1224,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1190
1224
|
attributes?: Record<string, unknown> | undefined;
|
|
1191
1225
|
opacity?: number | undefined;
|
|
1192
1226
|
size?: number | undefined;
|
|
1227
|
+
zoom?: number | undefined;
|
|
1193
1228
|
} | {
|
|
1194
1229
|
type: "Highlighter";
|
|
1195
1230
|
id: string;
|
|
@@ -1203,12 +1238,11 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1203
1238
|
} | {
|
|
1204
1239
|
type: "Text";
|
|
1205
1240
|
id: string;
|
|
1206
|
-
coordinates?: [number, number][][] | undefined;
|
|
1207
1241
|
groupId?: string | null | undefined;
|
|
1208
1242
|
color?: string | undefined;
|
|
1209
|
-
name?: string | undefined;
|
|
1210
1243
|
description?: string | null | undefined;
|
|
1211
1244
|
attributes?: Record<string, unknown> | undefined;
|
|
1245
|
+
zoom?: number | undefined;
|
|
1212
1246
|
position?: [number, number] | undefined;
|
|
1213
1247
|
rotation?: number | undefined;
|
|
1214
1248
|
scale?: number | undefined;
|
|
@@ -1218,25 +1252,23 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1218
1252
|
} | {
|
|
1219
1253
|
type: "Note";
|
|
1220
1254
|
id: string;
|
|
1221
|
-
coordinates?: [number, number][][] | undefined;
|
|
1222
1255
|
groupId?: string | null | undefined;
|
|
1223
1256
|
color?: string | undefined;
|
|
1224
|
-
name?: string | undefined;
|
|
1225
1257
|
description?: string | null | undefined;
|
|
1226
1258
|
attributes?: Record<string, unknown> | undefined;
|
|
1259
|
+
zoom?: number | undefined;
|
|
1227
1260
|
position?: [number, number] | undefined;
|
|
1228
1261
|
rotation?: number | undefined;
|
|
1229
1262
|
scale?: number | undefined;
|
|
1230
1263
|
text?: string | undefined;
|
|
1231
1264
|
align?: "left" | "center" | "right" | undefined;
|
|
1232
1265
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1233
|
-
|
|
1266
|
+
widthScale?: number | undefined;
|
|
1234
1267
|
} | {
|
|
1235
1268
|
type: "Image";
|
|
1236
1269
|
id: string;
|
|
1237
1270
|
coordinates?: [number, number][][] | undefined;
|
|
1238
1271
|
groupId?: string | null | undefined;
|
|
1239
|
-
color?: string | undefined;
|
|
1240
1272
|
name?: string | null | undefined;
|
|
1241
1273
|
description?: string | null | undefined;
|
|
1242
1274
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -1318,6 +1350,7 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1318
1350
|
attributes?: Record<string, unknown> | undefined;
|
|
1319
1351
|
opacity?: number | undefined;
|
|
1320
1352
|
size?: number | undefined;
|
|
1353
|
+
zoom?: number | undefined;
|
|
1321
1354
|
} | {
|
|
1322
1355
|
type: "Highlighter";
|
|
1323
1356
|
id: string;
|
|
@@ -1331,12 +1364,11 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1331
1364
|
} | {
|
|
1332
1365
|
type: "Text";
|
|
1333
1366
|
id: string;
|
|
1334
|
-
coordinates?: [number, number][][] | undefined;
|
|
1335
1367
|
groupId?: string | null | undefined;
|
|
1336
1368
|
color?: string | undefined;
|
|
1337
|
-
name?: string | undefined;
|
|
1338
1369
|
description?: string | null | undefined;
|
|
1339
1370
|
attributes?: Record<string, unknown> | undefined;
|
|
1371
|
+
zoom?: number | undefined;
|
|
1340
1372
|
position?: [number, number] | undefined;
|
|
1341
1373
|
rotation?: number | undefined;
|
|
1342
1374
|
scale?: number | undefined;
|
|
@@ -1346,25 +1378,23 @@ declare const UpdateElementMessage: z.ZodObject<{
|
|
|
1346
1378
|
} | {
|
|
1347
1379
|
type: "Note";
|
|
1348
1380
|
id: string;
|
|
1349
|
-
coordinates?: [number, number][][] | undefined;
|
|
1350
1381
|
groupId?: string | null | undefined;
|
|
1351
1382
|
color?: string | undefined;
|
|
1352
|
-
name?: string | undefined;
|
|
1353
1383
|
description?: string | null | undefined;
|
|
1354
1384
|
attributes?: Record<string, unknown> | undefined;
|
|
1385
|
+
zoom?: number | undefined;
|
|
1355
1386
|
position?: [number, number] | undefined;
|
|
1356
1387
|
rotation?: number | undefined;
|
|
1357
1388
|
scale?: number | undefined;
|
|
1358
1389
|
text?: string | undefined;
|
|
1359
1390
|
align?: "left" | "center" | "right" | undefined;
|
|
1360
1391
|
style?: "italic" | "light" | "regular" | "caps" | undefined;
|
|
1361
|
-
|
|
1392
|
+
widthScale?: number | undefined;
|
|
1362
1393
|
} | {
|
|
1363
1394
|
type: "Image";
|
|
1364
1395
|
id: string;
|
|
1365
1396
|
coordinates?: [number, number][][] | undefined;
|
|
1366
1397
|
groupId?: string | null | undefined;
|
|
1367
|
-
color?: string | undefined;
|
|
1368
1398
|
name?: string | null | undefined;
|
|
1369
1399
|
description?: string | null | undefined;
|
|
1370
1400
|
attributes?: Record<string, unknown> | undefined;
|
|
@@ -1391,21 +1421,23 @@ type ElementsSchema = {
|
|
|
1391
1421
|
getElementGroup: Method<zInfer<typeof GetGroupMessage$1>, ElementGroup | null>;
|
|
1392
1422
|
getElementGroups: Method<zInfer<typeof GetGroupsMessage$1>, Array<ElementGroup | null>>;
|
|
1393
1423
|
setElementGroupVisibility: Method<zInfer<typeof SetElementGroupVisibilityMessage>, void>;
|
|
1394
|
-
createElement: Method<zInfer<typeof CreateElementMessage>, Element
|
|
1395
|
-
updateElement: Method<zInfer<typeof UpdateElementMessage>, Element
|
|
1424
|
+
createElement: Method<zInfer<typeof CreateElementMessage>, Element>;
|
|
1425
|
+
updateElement: Method<zInfer<typeof UpdateElementMessage>, Element>;
|
|
1396
1426
|
deleteElement: Method<zInfer<typeof DeleteElementMessage>, void>;
|
|
1397
1427
|
};
|
|
1398
1428
|
listeners: {
|
|
1399
1429
|
onElementChange: Listener<zInfer<typeof OnElementChangeMessage.shape.options>, ElementChangeCallbackParams>;
|
|
1400
1430
|
onElementGroupChange: Listener<zInfer<typeof OnElementGroupChangeMessage.shape.options>, ElementGroupChangeCallbackParams>;
|
|
1431
|
+
onElementCreate: ListenerNoOptions<ElementChangeCallbackParams>;
|
|
1432
|
+
onElementDelete: Listener<zInfer<typeof OnElementDeleteMessage.shape.options>, void>;
|
|
1401
1433
|
};
|
|
1402
1434
|
};
|
|
1403
1435
|
|
|
1404
1436
|
type InteractionsSchema = {
|
|
1405
1437
|
methods: {};
|
|
1406
1438
|
listeners: {
|
|
1407
|
-
onPointerClick:
|
|
1408
|
-
onPointerMove:
|
|
1439
|
+
onPointerClick: ListenerNoOptions<MapInteractionEvent>;
|
|
1440
|
+
onPointerMove: ListenerNoOptions<MapInteractionEvent>;
|
|
1409
1441
|
};
|
|
1410
1442
|
};
|
|
1411
1443
|
|
|
@@ -2050,7 +2082,7 @@ type SelectionSchema = {
|
|
|
2050
2082
|
clearSelection: Method<zInfer<typeof ClearSelectionMessage>, void>;
|
|
2051
2083
|
};
|
|
2052
2084
|
listeners: {
|
|
2053
|
-
onSelectionChange:
|
|
2085
|
+
onSelectionChange: ListenerNoOptions<{
|
|
2054
2086
|
selection: Array<EntityNode>;
|
|
2055
2087
|
}>;
|
|
2056
2088
|
};
|
|
@@ -2398,8 +2430,8 @@ type ToolsSchema = {
|
|
|
2398
2430
|
getToolSettings: Method<zInfer<typeof GetToolSettingsMessage>, ToolSettingsMap[keyof ToolSettingsMap]>;
|
|
2399
2431
|
};
|
|
2400
2432
|
listeners: {
|
|
2401
|
-
onToolChange:
|
|
2402
|
-
onToolSettingsChange:
|
|
2433
|
+
onToolChange: ListenerNoOptions<ToolType | null>;
|
|
2434
|
+
onToolSettingsChange: ListenerNoOptions<ToolSettingsChangeEvent>;
|
|
2403
2435
|
};
|
|
2404
2436
|
};
|
|
2405
2437
|
|
|
@@ -2521,34 +2553,34 @@ declare const GotoViewportMessage: z.ZodObject<{
|
|
|
2521
2553
|
}>>;
|
|
2522
2554
|
zoom: z.ZodOptional<z.ZodNumber>;
|
|
2523
2555
|
}, "strip", z.ZodTypeAny, {
|
|
2556
|
+
zoom?: number | undefined;
|
|
2524
2557
|
center?: {
|
|
2525
2558
|
latitude: number;
|
|
2526
2559
|
longitude: number;
|
|
2527
2560
|
} | undefined;
|
|
2528
|
-
zoom?: number | undefined;
|
|
2529
2561
|
}, {
|
|
2562
|
+
zoom?: number | undefined;
|
|
2530
2563
|
center?: {
|
|
2531
2564
|
latitude: number;
|
|
2532
2565
|
longitude: number;
|
|
2533
2566
|
} | undefined;
|
|
2534
|
-
zoom?: number | undefined;
|
|
2535
2567
|
}>;
|
|
2536
2568
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
2537
2569
|
params: {
|
|
2570
|
+
zoom?: number | undefined;
|
|
2538
2571
|
center?: {
|
|
2539
2572
|
latitude: number;
|
|
2540
2573
|
longitude: number;
|
|
2541
2574
|
} | undefined;
|
|
2542
|
-
zoom?: number | undefined;
|
|
2543
2575
|
};
|
|
2544
2576
|
type: "setViewport";
|
|
2545
2577
|
}, {
|
|
2546
2578
|
params: {
|
|
2579
|
+
zoom?: number | undefined;
|
|
2547
2580
|
center?: {
|
|
2548
2581
|
latitude: number;
|
|
2549
2582
|
longitude: number;
|
|
2550
2583
|
} | undefined;
|
|
2551
|
-
zoom?: number | undefined;
|
|
2552
2584
|
};
|
|
2553
2585
|
type: "setViewport";
|
|
2554
2586
|
}>;
|
|
@@ -2621,9 +2653,9 @@ type ViewportSchema = {
|
|
|
2621
2653
|
fitViewportToBounds: Method<zInfer<typeof ViewportFitBoundsMessage>, void>;
|
|
2622
2654
|
};
|
|
2623
2655
|
listeners: {
|
|
2624
|
-
onViewportMove:
|
|
2625
|
-
onViewportMoveEnd:
|
|
2626
|
-
onMapIdle:
|
|
2656
|
+
onViewportMove: ListenerNoOptions<ViewportState>;
|
|
2657
|
+
onViewportMoveEnd: ListenerNoOptions<ViewportState>;
|
|
2658
|
+
onMapIdle: ListenerNoOptions<void>;
|
|
2627
2659
|
};
|
|
2628
2660
|
};
|
|
2629
2661
|
|
|
@@ -2654,10 +2686,16 @@ type ExtractMethodParams<T extends Record<string, AnyFunction | {
|
|
|
2654
2686
|
type ExtractListenerParams<T extends Record<string, {
|
|
2655
2687
|
options: any;
|
|
2656
2688
|
eventParams: any;
|
|
2689
|
+
} | {
|
|
2690
|
+
eventParams: any;
|
|
2657
2691
|
}>> = {
|
|
2658
|
-
[K in keyof T]: {
|
|
2692
|
+
[K in keyof T]: T[K] extends {
|
|
2693
|
+
options: any;
|
|
2694
|
+
} ? {
|
|
2659
2695
|
options: T[K]["options"];
|
|
2660
2696
|
eventParams: T[K]["eventParams"];
|
|
2697
|
+
} : {
|
|
2698
|
+
eventParams: T[K]["eventParams"];
|
|
2661
2699
|
};
|
|
2662
2700
|
};
|
|
2663
2701
|
type AnyFunction = (...args: any[]) => any;
|
|
@@ -2670,13 +2708,17 @@ type MethodHandlers<T> = {
|
|
|
2670
2708
|
};
|
|
2671
2709
|
type FeltMethodHandlers = MethodHandlers<ExtractMethodParams<MethodSpec>>;
|
|
2672
2710
|
type ListenerHandlers<T> = {
|
|
2673
|
-
[K in keyof T]: (args: {
|
|
2711
|
+
[K in keyof T]: (args: T[K] extends {
|
|
2712
|
+
options: any;
|
|
2713
|
+
} ? {
|
|
2714
|
+
handler: (event: T[K] extends {
|
|
2715
|
+
eventParams: any;
|
|
2716
|
+
} ? T[K]["eventParams"] : never) => void;
|
|
2717
|
+
options: T[K]["options"];
|
|
2718
|
+
} : {
|
|
2674
2719
|
handler: (event: T[K] extends {
|
|
2675
2720
|
eventParams: any;
|
|
2676
2721
|
} ? T[K]["eventParams"] : never) => void;
|
|
2677
|
-
options: T[K] extends {
|
|
2678
|
-
options: any;
|
|
2679
|
-
} ? T[K]["options"] : never;
|
|
2680
2722
|
}) => VoidFunction;
|
|
2681
2723
|
};
|
|
2682
2724
|
type FeltListenerHandlers = ListenerHandlers<ExtractListenerParams<ListenerSpec>>;
|