tg-map-vue3 3.0.8 → 3.1.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.
@@ -1,12 +1,24 @@
1
- import { type PropType, type Prop } from 'vue';
2
- import type { AbstractMap } from '../map/map/map';
3
- import { TgMapType } from '../map/map-factory';
4
1
  import { LatLng } from '../map/lat-lng';
5
- import { type InfoWindowMode, GestureHandlingOptions } from '../map/map/map-options';
2
+ import { TgMapType } from '../map/map-factory';
3
+ import type { AbstractMap } from '../map/map/map';
4
+ import { GestureHandlingOptions } from '../map/map/map-options';
5
+ import { BuildInMapTypeId, MapType } from '../map/map/map-type';
6
+ import { type StringEnumValue } from '../utils/mapped-types';
7
+ import { type EventEmits } from '../utils/vue-utils';
8
+ type TgMapEmits = {
9
+ load: AbstractMap;
10
+ error: unknown;
11
+ 'update:center': LatLng;
12
+ 'update:current-center': LatLng;
13
+ 'update:zoom': number;
14
+ 'update:map-type': MapType;
15
+ 'update:map-type-id': string;
16
+ 'update:last-center': LatLng;
17
+ };
6
18
  declare const _default: import("vue").DefineComponent<{
7
19
  /** type没做响应式, 但外部可以把type作为tg-map的key, 让type修改时完全重建tg-map */
8
20
  type: {
9
- type: PropType<TgMapType>;
21
+ type: import("vue").PropType<StringEnumValue<typeof TgMapType>>;
10
22
  default: TgMapType;
11
23
  };
12
24
  /**
@@ -18,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
18
30
  * @see AbstractMapEventMap.center-changed
19
31
  * */
20
32
  center: {
21
- type: PropType<LatLng>;
33
+ type: import("vue").PropType<LatLng>;
22
34
  required: true;
23
35
  };
24
36
  /**
@@ -27,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
27
39
  * @see center
28
40
  */
29
41
  centerSyncDelay: {
30
- type: PropType<number>;
42
+ type: import("vue").PropType<number>;
31
43
  default: number;
32
44
  };
33
45
  /**
@@ -35,55 +47,65 @@ declare const _default: import("vue").DefineComponent<{
35
47
  * @see center
36
48
  * */
37
49
  currentCenter: {
38
- type: PropType<LatLng>;
50
+ type: import("vue").PropType<LatLng>;
39
51
  };
40
52
  /**
41
53
  * 仅用于获取tg-map销毁时的最后的center的值
42
54
  * @see center
43
55
  */
44
56
  lastCenter: {
45
- type: PropType<LatLng>;
57
+ type: import("vue").PropType<LatLng>;
46
58
  };
47
59
  zoom: {
48
- type: PropType<number>;
60
+ type: import("vue").PropType<number>;
49
61
  required: true;
50
62
  };
51
63
  infoWindowMode: {
52
- type: PropType<InfoWindowMode>;
64
+ type: import("vue").PropType<"single" | "multi">;
65
+ };
66
+ gestureHandling: {
67
+ type: import("vue").PropType<StringEnumValue<typeof GestureHandlingOptions>>;
53
68
  };
54
- gestureHandling: Prop<"none" | GestureHandlingOptions | "auto" | "greedy" | "cooperative", "none" | GestureHandlingOptions | "auto" | "greedy" | "cooperative">;
55
69
  minZoom: {
56
- type: PropType<number>;
70
+ type: import("vue").PropType<number>;
57
71
  };
58
72
  maxZoom: {
59
- type: PropType<number>;
73
+ type: import("vue").PropType<number>;
60
74
  };
61
75
  mapStyle: {
62
- type: PropType<any>;
76
+ type: import("vue").PropType<any>;
63
77
  };
64
- /** 设置为除BuildInMapTypeId以外的值时, 无实际效果... */
65
78
  mapTypeId: {
66
- type: PropType<"normal" | "satellite" | "hybrid">;
79
+ type: import("vue").PropType<StringEnumValue<typeof BuildInMapTypeId>>;
67
80
  };
68
- /** 优先级比mapTypeId高 */
81
+ /** 地图类型对象, 优先级比mapTypeId高 */
69
82
  mapType: {
70
- type: PropType<any>;
71
- };
83
+ type: import("vue").PropType<any>;
84
+ };
85
+ onLoad: import("vue").Prop<import("../utils/vue-utils").EventCallback<AbstractMap>, import("../utils/vue-utils").EventCallback<AbstractMap>>;
86
+ 'onUpdate:center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
87
+ 'onUpdate:current-center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
88
+ 'onUpdate:last-center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
89
+ 'onUpdate:map-type': import("vue").Prop<import("../utils/vue-utils").EventCallback<MapType>, import("../utils/vue-utils").EventCallback<MapType>>;
90
+ 'onUpdate:map-type-id': import("vue").Prop<import("../utils/vue-utils").EventCallback<string>, import("../utils/vue-utils").EventCallback<string>>;
91
+ 'onUpdate:zoom': import("vue").Prop<import("../utils/vue-utils").EventCallback<number>, import("../utils/vue-utils").EventCallback<number>>;
92
+ onError: import("vue").Prop<import("../utils/vue-utils").EventCallback<unknown>, import("../utils/vue-utils").EventCallback<unknown>>;
72
93
  }, {
73
- attrs: {
94
+ attrs: import("vue").ComputedRef<{
74
95
  binds: Record<string, unknown>;
75
96
  listeners: Record<string, unknown>;
76
- };
97
+ listenerProps: Record<string, unknown>;
98
+ }>;
77
99
  centerSyncTimeoutId: number;
78
100
  }, {
79
101
  map: AbstractMap | undefined;
80
102
  isDestroyed: boolean;
81
103
  }, {
82
104
  propsJson(): string;
83
- }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
105
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, EventEmits<TgMapEmits>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
84
106
  /** type没做响应式, 但外部可以把type作为tg-map的key, 让type修改时完全重建tg-map */
85
107
  type: {
86
- type: PropType<TgMapType>;
108
+ type: import("vue").PropType<StringEnumValue<typeof TgMapType>>;
87
109
  default: TgMapType;
88
110
  };
89
111
  /**
@@ -95,7 +117,7 @@ declare const _default: import("vue").DefineComponent<{
95
117
  * @see AbstractMapEventMap.center-changed
96
118
  * */
97
119
  center: {
98
- type: PropType<LatLng>;
120
+ type: import("vue").PropType<LatLng>;
99
121
  required: true;
100
122
  };
101
123
  /**
@@ -104,7 +126,7 @@ declare const _default: import("vue").DefineComponent<{
104
126
  * @see center
105
127
  */
106
128
  centerSyncDelay: {
107
- type: PropType<number>;
129
+ type: import("vue").PropType<number>;
108
130
  default: number;
109
131
  };
110
132
  /**
@@ -112,42 +134,60 @@ declare const _default: import("vue").DefineComponent<{
112
134
  * @see center
113
135
  * */
114
136
  currentCenter: {
115
- type: PropType<LatLng>;
137
+ type: import("vue").PropType<LatLng>;
116
138
  };
117
139
  /**
118
140
  * 仅用于获取tg-map销毁时的最后的center的值
119
141
  * @see center
120
142
  */
121
143
  lastCenter: {
122
- type: PropType<LatLng>;
144
+ type: import("vue").PropType<LatLng>;
123
145
  };
124
146
  zoom: {
125
- type: PropType<number>;
147
+ type: import("vue").PropType<number>;
126
148
  required: true;
127
149
  };
128
150
  infoWindowMode: {
129
- type: PropType<InfoWindowMode>;
151
+ type: import("vue").PropType<"single" | "multi">;
152
+ };
153
+ gestureHandling: {
154
+ type: import("vue").PropType<StringEnumValue<typeof GestureHandlingOptions>>;
130
155
  };
131
- gestureHandling: Prop<"none" | GestureHandlingOptions | "auto" | "greedy" | "cooperative", "none" | GestureHandlingOptions | "auto" | "greedy" | "cooperative">;
132
156
  minZoom: {
133
- type: PropType<number>;
157
+ type: import("vue").PropType<number>;
134
158
  };
135
159
  maxZoom: {
136
- type: PropType<number>;
160
+ type: import("vue").PropType<number>;
137
161
  };
138
162
  mapStyle: {
139
- type: PropType<any>;
163
+ type: import("vue").PropType<any>;
140
164
  };
141
- /** 设置为除BuildInMapTypeId以外的值时, 无实际效果... */
142
165
  mapTypeId: {
143
- type: PropType<"normal" | "satellite" | "hybrid">;
166
+ type: import("vue").PropType<StringEnumValue<typeof BuildInMapTypeId>>;
144
167
  };
145
- /** 优先级比mapTypeId高 */
168
+ /** 地图类型对象, 优先级比mapTypeId高 */
146
169
  mapType: {
147
- type: PropType<any>;
148
- };
149
- }>>, {
150
- type: TgMapType;
170
+ type: import("vue").PropType<any>;
171
+ };
172
+ onLoad: import("vue").Prop<import("../utils/vue-utils").EventCallback<AbstractMap>, import("../utils/vue-utils").EventCallback<AbstractMap>>;
173
+ 'onUpdate:center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
174
+ 'onUpdate:current-center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
175
+ 'onUpdate:last-center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
176
+ 'onUpdate:map-type': import("vue").Prop<import("../utils/vue-utils").EventCallback<MapType>, import("../utils/vue-utils").EventCallback<MapType>>;
177
+ 'onUpdate:map-type-id': import("vue").Prop<import("../utils/vue-utils").EventCallback<string>, import("../utils/vue-utils").EventCallback<string>>;
178
+ 'onUpdate:zoom': import("vue").Prop<import("../utils/vue-utils").EventCallback<number>, import("../utils/vue-utils").EventCallback<number>>;
179
+ onError: import("vue").Prop<import("../utils/vue-utils").EventCallback<unknown>, import("../utils/vue-utils").EventCallback<unknown>>;
180
+ }>> & {
181
+ onLoad?: ((event: AbstractMap) => any) | undefined;
182
+ onError?: ((event: unknown) => any) | undefined;
183
+ "onUpdate:center"?: ((event: LatLng) => any) | undefined;
184
+ "onUpdate:current-center"?: ((event: LatLng) => any) | undefined;
185
+ "onUpdate:zoom"?: ((event: number) => any) | undefined;
186
+ "onUpdate:map-type"?: ((event: MapType) => any) | undefined;
187
+ "onUpdate:map-type-id"?: ((event: string) => any) | undefined;
188
+ "onUpdate:last-center"?: ((event: LatLng) => any) | undefined;
189
+ }, {
190
+ type: StringEnumValue<typeof TgMapType>;
151
191
  centerSyncDelay: number;
152
192
  }>;
153
193
  export default _default;
@@ -1,7 +1,8 @@
1
+ import { type StringEnumValue } from '../../utils/mapped-types';
1
2
  import { ControlPosition, CustomControl } from '../../map/map/controls/control';
2
3
  declare const _default: import("vue").DefineComponent<{
3
4
  position: {
4
- type: import("vue").PropType<ControlPosition>;
5
+ type: import("vue").PropType<StringEnumValue<typeof ControlPosition>>;
5
6
  default: ControlPosition;
6
7
  };
7
8
  }, {
@@ -10,10 +11,10 @@ declare const _default: import("vue").DefineComponent<{
10
11
  recreate(): void;
11
12
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
13
  position: {
13
- type: import("vue").PropType<ControlPosition>;
14
+ type: import("vue").PropType<StringEnumValue<typeof ControlPosition>>;
14
15
  default: ControlPosition;
15
16
  };
16
17
  }>>, {
17
- position: ControlPosition;
18
+ position: StringEnumValue<typeof ControlPosition>;
18
19
  }>;
19
20
  export default _default;
@@ -2,11 +2,11 @@ import { MapTypeControlType, type MapTypeControl } from '../../map/map/controls/
2
2
  import { ControlPosition } from '../../map/map/controls/control';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  position: {
5
- type: import("vue").PropType<ControlPosition>;
5
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>>;
6
6
  default: ControlPosition;
7
7
  };
8
8
  type: {
9
- type: import("vue").PropType<MapTypeControlType>;
9
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof MapTypeControlType>>;
10
10
  };
11
11
  mapTypes: {
12
12
  type: import("vue").PropType<import("../../map/map/map-type").MapType[]>;
@@ -17,16 +17,16 @@ declare const _default: import("vue").DefineComponent<{
17
17
  recreate(): void;
18
18
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
19
  position: {
20
- type: import("vue").PropType<ControlPosition>;
20
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>>;
21
21
  default: ControlPosition;
22
22
  };
23
23
  type: {
24
- type: import("vue").PropType<MapTypeControlType>;
24
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof MapTypeControlType>>;
25
25
  };
26
26
  mapTypes: {
27
27
  type: import("vue").PropType<import("../../map/map/map-type").MapType[]>;
28
28
  };
29
29
  }>>, {
30
- position: ControlPosition;
30
+ position: import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>;
31
31
  }>;
32
32
  export default _default;
@@ -2,7 +2,7 @@ import { ControlPosition } from '../../map/map/controls/control';
2
2
  import type { ScaleControl } from '../../map/map/controls/scale.control';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  position: {
5
- type: import("vue").PropType<ControlPosition>;
5
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>>;
6
6
  default: ControlPosition;
7
7
  };
8
8
  }, {
@@ -11,10 +11,10 @@ declare const _default: import("vue").DefineComponent<{
11
11
  recreate(): void;
12
12
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
13
  position: {
14
- type: import("vue").PropType<ControlPosition>;
14
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>>;
15
15
  default: ControlPosition;
16
16
  };
17
17
  }>>, {
18
- position: ControlPosition;
18
+ position: import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>;
19
19
  }>;
20
20
  export default _default;
@@ -2,7 +2,7 @@ import type { ZoomControl } from '../../map/map/controls/zoom.control';
2
2
  import { ControlPosition } from '../../map/map/controls/control';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  position: {
5
- type: import("vue").PropType<ControlPosition>;
5
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>>;
6
6
  default: ControlPosition;
7
7
  };
8
8
  }, {
@@ -11,10 +11,10 @@ declare const _default: import("vue").DefineComponent<{
11
11
  recreate(): void;
12
12
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
13
  position: {
14
- type: import("vue").PropType<ControlPosition>;
14
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>>;
15
15
  default: ControlPosition;
16
16
  };
17
17
  }>>, {
18
- position: ControlPosition;
18
+ position: import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>;
19
19
  }>;
20
20
  export default _default;
@@ -34,10 +34,11 @@ declare const _default: import("vue").DefineComponent<{
34
34
  type: import("vue").PropType<number>;
35
35
  };
36
36
  }, {
37
- attrs: {
37
+ attrs: import("vue").ComputedRef<{
38
38
  binds: Record<string, unknown>;
39
39
  listeners: Record<string, unknown>;
40
- };
40
+ listenerProps: Record<string, unknown>;
41
+ }>;
41
42
  overlay: CircleOverlay;
42
43
  }, unknown, {}, {}, import("vue").DefineComponent<{}, {}, {}, {}, {
43
44
  recreate(): void;
@@ -12,7 +12,7 @@ declare class SimpleElementOverlay extends ElementOverlay {
12
12
  }
13
13
  declare const TgElementOverlay: import("vue").DefineComponent<{
14
14
  mapPane: {
15
- type: import("vue").PropType<MapPane>;
15
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof MapPane>>;
16
16
  default: MapPane;
17
17
  };
18
18
  position: {
@@ -27,7 +27,7 @@ declare const TgElementOverlay: import("vue").DefineComponent<{
27
27
  recreate(): void;
28
28
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
29
29
  mapPane: {
30
- type: import("vue").PropType<MapPane>;
30
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof MapPane>>;
31
31
  default: MapPane;
32
32
  };
33
33
  position: {
@@ -35,7 +35,7 @@ declare const TgElementOverlay: import("vue").DefineComponent<{
35
35
  required: true;
36
36
  };
37
37
  }>>, {
38
- mapPane: MapPane;
38
+ mapPane: import("../../utils/mapped-types").StringEnumValue<typeof MapPane>;
39
39
  }>;
40
40
  type TgElementOverlay = InstanceType<typeof TgElementOverlay>;
41
41
  export default TgElementOverlay;
@@ -1,7 +1,11 @@
1
+ import { type EventEmits } from '../../utils/vue-utils';
1
2
  import { LatLng } from '../../map/lat-lng';
2
3
  import { type TgMarkerPublicInstance } from './TgMarker.vue';
3
4
  import type { InfoBoxOverlay, InfoBoxOptions } from '../../map/map/overlay/info-box';
4
5
  import type { MarkerOverlay } from '../../map/map/overlay/marker';
6
+ type TgInfoBoxEmits = {
7
+ 'update:show': boolean;
8
+ };
5
9
  declare const TgInfoBox: import("vue").DefineComponent<{
6
10
  show: {
7
11
  type: import("vue").PropType<boolean>;
@@ -22,11 +26,13 @@ declare const TgInfoBox: import("vue").DefineComponent<{
22
26
  zIndex: {
23
27
  type: import("vue").PropType<number>;
24
28
  };
29
+ 'onUpdate:show': import("vue").Prop<import("../../utils/vue-utils").EventCallback<boolean>, import("../../utils/vue-utils").EventCallback<boolean>>;
25
30
  }, {
26
- attrs: {
31
+ attrs: import("vue").ComputedRef<{
27
32
  binds: Record<string, unknown>;
28
33
  listeners: Record<string, unknown>;
29
- };
34
+ listenerProps: Record<string, unknown>;
35
+ }>;
30
36
  overlay: InfoBoxOverlay;
31
37
  }, unknown, {}, {
32
38
  getOptions(): InfoBoxOptions;
@@ -36,7 +42,7 @@ declare const TgInfoBox: import("vue").DefineComponent<{
36
42
  close(): void;
37
43
  }, import("vue").DefineComponent<{}, {}, {}, {}, {
38
44
  recreate(): void;
39
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
45
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, import("vue").ComponentOptionsMixin, EventEmits<TgInfoBoxEmits>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
40
46
  show: {
41
47
  type: import("vue").PropType<boolean>;
42
48
  required: true;
@@ -56,6 +62,9 @@ declare const TgInfoBox: import("vue").DefineComponent<{
56
62
  zIndex: {
57
63
  type: import("vue").PropType<number>;
58
64
  };
59
- }>>, {}>;
65
+ 'onUpdate:show': import("vue").Prop<import("../../utils/vue-utils").EventCallback<boolean>, import("../../utils/vue-utils").EventCallback<boolean>>;
66
+ }>> & {
67
+ "onUpdate:show"?: ((event: boolean) => any) | undefined;
68
+ }, {}>;
60
69
  type TgInfoBox = InstanceType<typeof TgInfoBox>;
61
70
  export default TgInfoBox;
@@ -19,10 +19,11 @@ declare const TgInfoWindow: import("vue").DefineComponent<{
19
19
  type: import("vue").PropType<boolean>;
20
20
  };
21
21
  }, {
22
- attrs: {
22
+ attrs: import("vue").ComputedRef<{
23
23
  binds: Record<string, unknown>;
24
24
  listeners: Record<string, unknown>;
25
- };
25
+ listenerProps: Record<string, unknown>;
26
+ }>;
26
27
  overlay: InfoWindowOverlay;
27
28
  }, unknown, {}, {
28
29
  content(): HTMLElement;
@@ -13,10 +13,11 @@ declare const TgLabel: import("vue").DefineComponent<{
13
13
  type: import("vue").PropType<number>;
14
14
  };
15
15
  }, {
16
- attrs: {
16
+ attrs: import("vue").ComputedRef<{
17
17
  binds: Record<string, unknown>;
18
18
  listeners: Record<string, unknown>;
19
- };
19
+ listenerProps: Record<string, unknown>;
20
+ }>;
20
21
  overlay: LabelOverlay;
21
22
  }, unknown, {}, {
22
23
  content(): HTMLElement;
@@ -34,10 +34,11 @@ declare const TgMarker: import("vue").DefineComponent<{
34
34
  type: import("vue").PropType<boolean>;
35
35
  };
36
36
  }, {
37
- attrs: {
37
+ attrs: import("vue").ComputedRef<{
38
38
  binds: Record<string, unknown>;
39
39
  listeners: Record<string, unknown>;
40
- };
40
+ listenerProps: Record<string, unknown>;
41
+ }>;
41
42
  marker: MarkerOverlay;
42
43
  label: ({
43
44
  $: import("vue").ComponentInternalInstance;
@@ -77,10 +78,11 @@ declare const TgMarker: import("vue").DefineComponent<{
77
78
  type: import("vue").PropType<number>;
78
79
  };
79
80
  }>>, {
80
- attrs: {
81
+ attrs: import("vue").ComputedRef<{
81
82
  binds: Record<string, unknown>;
82
83
  listeners: Record<string, unknown>;
83
- };
84
+ listenerProps: Record<string, unknown>;
85
+ }>;
84
86
  overlay: import("../../map/map/overlay/label").LabelOverlay;
85
87
  }, unknown, {}, {
86
88
  content(): HTMLElement;
@@ -120,10 +122,11 @@ declare const TgMarker: import("vue").DefineComponent<{
120
122
  type: import("vue").PropType<number>;
121
123
  };
122
124
  }>> & import("vue").ShallowUnwrapRef<{
123
- attrs: {
125
+ attrs: import("vue").ComputedRef<{
124
126
  binds: Record<string, unknown>;
125
127
  listeners: Record<string, unknown>;
126
- };
128
+ listenerProps: Record<string, unknown>;
129
+ }>;
127
130
  overlay: import("../../map/map/overlay/label").LabelOverlay;
128
131
  }> & {} & {
129
132
  recreate(): void;
@@ -31,10 +31,11 @@ declare const _default: import("vue").DefineComponent<{
31
31
  type: PropType<number>;
32
32
  };
33
33
  }, {
34
- attrs: {
34
+ attrs: import("vue").ComputedRef<{
35
35
  binds: Record<string, unknown>;
36
36
  listeners: Record<string, unknown>;
37
- };
37
+ listenerProps: Record<string, unknown>;
38
+ }>;
38
39
  polygon: PolygonOverlay;
39
40
  }, unknown, {}, {}, import("vue").DefineComponent<{}, {}, {}, {}, {
40
41
  recreate(): void;
@@ -25,10 +25,11 @@ declare const _default: import("vue").DefineComponent<{
25
25
  type: PropType<boolean>;
26
26
  };
27
27
  }, {
28
- attrs: {
28
+ attrs: import("vue").ComputedRef<{
29
29
  binds: Record<string, unknown>;
30
30
  listeners: Record<string, unknown>;
31
- };
31
+ listenerProps: Record<string, unknown>;
32
+ }>;
32
33
  polyline: PolylineOverlay;
33
34
  }, unknown, {}, {}, import("vue").DefineComponent<{}, {}, {}, {}, {
34
35
  recreate(): void;
@@ -1,6 +1,6 @@
1
1
  import { LatLng, LatLngBounds } from '../lat-lng';
2
2
  import { AbstractMap, type AbstractMapEventMap } from './map';
3
- import { MapOptions, GestureHandlingOptions, type MapStyle, type GestureHandlingOptionsLiteral } from './map-options';
3
+ import { MapOptions, GestureHandlingOptions, type MapStyle } from './map-options';
4
4
  import type { BaiduOverlay } from './overlay/overlay';
5
5
  import { BaiduMarkerClusterer, type MarkerClustererOptions } from './extra/marker-clusterer';
6
6
  import { BaiduPolyline } from './overlay/polyline';
@@ -23,7 +23,7 @@ export declare class BaiduMap extends AbstractMap {
23
23
  private baiduMapType2BIMT;
24
24
  private map;
25
25
  constructor(element: HTMLElement, mapOptions: MapOptions);
26
- setGestureHandling(gestureHandling?: GestureHandlingOptions | GestureHandlingOptionsLiteral): void;
26
+ setGestureHandling(gestureHandling?: GestureHandlingOptions): void;
27
27
  get innerMap(): BMap.Map;
28
28
  get coordType(): import("../lat-lng").CoordType;
29
29
  addEventListener<K extends keyof AbstractMapEventMap>(type: K, listener: (event: AbstractMapEventMap[K]) => void): void;
@@ -1,7 +1,8 @@
1
1
  /// <reference types="googlemaps" />
2
2
  import { LatLng } from '../lat-lng';
3
3
  import type { BuildInMapTypeId } from './map-type';
4
- export type InfoWindowMode = 'single' | 'multi';
4
+ export declare const InfoWindowModeValues: readonly ["single", "multi"];
5
+ export type InfoWindowMode = typeof InfoWindowModeValues[number];
5
6
  /**
6
7
  * 完全模仿google的模式, 合并如下配置:
7
8
  * - draggable
@@ -18,14 +19,13 @@ export declare enum GestureHandlingOptions {
18
19
  /** 合作, 按住ctrl或者双指才能缩放地图 */
19
20
  cooperative = "cooperative"
20
21
  }
21
- export type GestureHandlingOptionsLiteral = keyof typeof GestureHandlingOptions;
22
22
  export interface MapOptions {
23
23
  /** 中心点 */
24
24
  center: LatLng;
25
25
  /** 缩放等级, 必须是整数 */
26
26
  zoom: number;
27
27
  infoWindowMode?: InfoWindowMode;
28
- gestureHandling?: GestureHandlingOptions | GestureHandlingOptionsLiteral;
28
+ gestureHandling?: GestureHandlingOptions;
29
29
  minZoom?: number;
30
30
  maxZoom?: number;
31
31
  mapStyle?: MapStyle;
@@ -13,7 +13,6 @@ export declare enum BuildInMapTypeId {
13
13
  satellite = "satellite",
14
14
  hybrid = "hybrid"
15
15
  }
16
- export type BuildInMapTypeIdLiteral = keyof typeof BuildInMapTypeId;
17
16
  /**
18
17
  * 包括不兼容的地图类型
19
18
  * - 'terrain': google中为地形图, baidu中为三维图
@@ -49,6 +49,27 @@ export type KeysMatching<T, V> = {
49
49
  export type StringEnumLike = {
50
50
  [k: string]: string;
51
51
  };
52
+ /**
53
+ * String枚举的值, 包括`string`类型
54
+ * @see https://stackoverflow.com/questions/52393730/typescript-string-literal-union-type-from-enum
55
+ */
56
+ export type StringEnumValue<E extends StringEnumLike> = ValueOf<E> | `${ValueOf<E>}`;
57
+ /**
58
+ * 包装`T`中的部分枚举字段的值为{@link StringEnumValue}
59
+ *
60
+ * 会校验{@link EnumObjects}中的类型是否书写正确, 若写错, 会推断成`never`
61
+ * */
62
+ export type WrapStringEnumValue<T, EnumObjects extends {
63
+ [k in keyof T]?: StringEnumLike;
64
+ }> = {
65
+ [P in keyof T]: P extends keyof EnumObjects ? EnumObjects[P] extends StringEnumLike ? T[P] extends ValueOf<EnumObjects[P]> | undefined ? StringEnumValue<EnumObjects[P]> : never : never : T[P];
66
+ };
67
+ /** 取消包装`T`中的{@link StringEnumValue}字段 */
68
+ export declare function unwrapStringEnumValue<T extends object>(value: T): {
69
+ [K in keyof T]: T[K] extends StringEnumValue<infer Enum> ? StringEnumLike extends Enum ? T[K] : Enum[keyof Enum] : Exclude<T[K], undefined> extends StringEnumValue<infer Enum> ? StringEnumLike extends Enum ? T[K] : Enum[keyof Enum] | undefined : T[K];
70
+ };
71
+ export declare function unwrapStringEnumValue<E extends StringEnumLike>(value: StringEnumValue<E>, enumObject?: E): E[keyof E];
72
+ export declare function unwrapStringEnumValue<E extends StringEnumLike>(value: StringEnumValue<E> | undefined, enumObject?: E): E[keyof E] | undefined;
52
73
  /**
53
74
  * 非空的值
54
75
  * @see https://github.com/microsoft/TypeScript/issues/7648#issuecomment-541625573
@@ -2,7 +2,8 @@ import type { StringEnumLike } from './mapped-types';
2
2
  export declare namespace Strings {
3
3
  /**
4
4
  * 将string转换成字符枚举, 转换失败返回undefined
5
- * @see import('./vue-utils.ts').stringEnumProp 由于使用了Object.values(enumObject), 应该避免在enumObject上添加其他属性/方法
5
+ * @see {@link import('./vue-utils.ts').stringEnumProp} 由于使用了Object.values(enumObject), 应该避免在enumObject上添加其他属性/方法
6
+ * @deprecated 使用{@link import('./mapped-types.ts').unwrapStringEnumValue}替代
6
7
  */
7
8
  function toEnumOrNull<E extends StringEnumLike>(value: string | undefined, enumObject: E): E[keyof E] | undefined;
8
9
  function trimIndent(str: string): string;