ts-maps 0.2.7 → 0.3.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.
Files changed (225) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +202 -141
  3. package/dist/core-map/assets/embedded-icons.d.ts +8 -0
  4. package/dist/core-map/control/AttributionControl.d.ts +12 -0
  5. package/dist/core-map/control/Control.d.ts +14 -0
  6. package/dist/core-map/control/LayersControl.d.ts +38 -0
  7. package/dist/core-map/control/ScaleControl.d.ts +14 -0
  8. package/dist/core-map/control/ZoomControl.d.ts +14 -0
  9. package/dist/core-map/control/index.d.ts +5 -0
  10. package/dist/core-map/core/Browser.d.ts +24 -0
  11. package/dist/core-map/core/Class.d.ts +12 -0
  12. package/dist/core-map/core/Events.d.ts +31 -0
  13. package/dist/core-map/core/Handler.d.ts +12 -0
  14. package/dist/core-map/core/Util.d.ts +24 -0
  15. package/dist/core-map/core/index.d.ts +7 -0
  16. package/dist/core-map/dom/Animation.d.ts +50 -0
  17. package/dist/core-map/dom/DomEvent.DoubleTap.d.ts +6 -0
  18. package/dist/core-map/dom/DomEvent.PointerEvents.d.ts +4 -0
  19. package/dist/core-map/dom/DomEvent.d.ts +15 -0
  20. package/dist/core-map/dom/DomUtil.d.ts +22 -0
  21. package/dist/core-map/dom/Draggable.d.ts +26 -0
  22. package/dist/core-map/dom/PosAnimation.d.ts +19 -0
  23. package/dist/core-map/dom/easing.d.ts +41 -0
  24. package/dist/core-map/dom/index.d.ts +8 -0
  25. package/dist/core-map/geo/LatLng.d.ts +18 -0
  26. package/dist/core-map/geo/LatLngBounds.d.ts +27 -0
  27. package/dist/core-map/geo/TerrainSource.d.ts +35 -0
  28. package/dist/core-map/geo/crs/CRS.d.ts +23 -0
  29. package/dist/core-map/geo/crs/EPSG3395.d.ts +7 -0
  30. package/dist/core-map/geo/crs/EPSG3857.d.ts +10 -0
  31. package/dist/core-map/geo/crs/EPSG4326.d.ts +7 -0
  32. package/dist/core-map/geo/crs/EarthCRS.d.ts +7 -0
  33. package/dist/core-map/geo/crs/SimpleCRS.d.ts +11 -0
  34. package/dist/core-map/geo/crs/index.d.ts +6 -0
  35. package/dist/core-map/geo/elevation.d.ts +23 -0
  36. package/dist/core-map/geo/index.d.ts +13 -0
  37. package/dist/core-map/geo/index.js +1204 -0
  38. package/dist/core-map/geo/projection/Projection.Globe.d.ts +30 -0
  39. package/dist/core-map/geo/projection/Projection.LonLat.d.ts +11 -0
  40. package/dist/core-map/geo/projection/Projection.Mercator.d.ts +6 -0
  41. package/dist/core-map/geo/projection/Projection.SphericalMercator.d.ts +6 -0
  42. package/dist/core-map/geo/projection/index.d.ts +5 -0
  43. package/dist/core-map/geo/terrainMesh.d.ts +21 -0
  44. package/dist/core-map/geometry/Bounds.d.ts +23 -0
  45. package/dist/core-map/geometry/LineUtil.d.ts +13 -0
  46. package/dist/core-map/geometry/Point.d.ts +35 -0
  47. package/dist/core-map/geometry/PolyUtil.d.ts +6 -0
  48. package/dist/core-map/geometry/RTree.d.ts +35 -0
  49. package/dist/core-map/geometry/Transformation.d.ts +12 -0
  50. package/dist/core-map/geometry/earcut.d.ts +17 -0
  51. package/dist/core-map/geometry/index.d.ts +10 -0
  52. package/dist/core-map/geometry/index.js +1586 -0
  53. package/dist/core-map/index.d.ts +59 -0
  54. package/dist/core-map/layer/BlanketOverlay.d.ts +24 -0
  55. package/dist/core-map/layer/DivOverlay.d.ts +40 -0
  56. package/dist/core-map/layer/FeatureGroup.d.ts +11 -0
  57. package/dist/core-map/layer/GeoJSON.d.ts +17 -0
  58. package/dist/core-map/layer/GeoJSONClusterSource.d.ts +54 -0
  59. package/dist/core-map/layer/HeatmapLayer.d.ts +40 -0
  60. package/dist/core-map/layer/ImageOverlay.d.ts +27 -0
  61. package/dist/core-map/layer/Layer.d.ts +18 -0
  62. package/dist/core-map/layer/LayerGroup.d.ts +16 -0
  63. package/dist/core-map/layer/Popup.d.ts +18 -0
  64. package/dist/core-map/layer/SVGOverlay.d.ts +4 -0
  65. package/dist/core-map/layer/Tooltip.d.ts +15 -0
  66. package/dist/core-map/layer/VideoOverlay.d.ts +4 -0
  67. package/dist/core-map/layer/index.d.ts +18 -0
  68. package/dist/core-map/layer/marker/DefaultIcon.d.ts +7 -0
  69. package/dist/core-map/layer/marker/DivIcon.d.ts +5 -0
  70. package/dist/core-map/layer/marker/Icon.d.ts +10 -0
  71. package/dist/core-map/layer/marker/Marker.Drag.d.ts +17 -0
  72. package/dist/core-map/layer/marker/Marker.d.ts +37 -0
  73. package/dist/core-map/layer/marker/index.d.ts +5 -0
  74. package/dist/core-map/layer/tile/GridLayer.d.ts +88 -0
  75. package/dist/core-map/layer/tile/RasterDEMLayer.d.ts +46 -0
  76. package/dist/core-map/layer/tile/TileLayer.d.ts +22 -0
  77. package/dist/core-map/layer/tile/VectorTileMapLayer.d.ts +145 -0
  78. package/dist/core-map/layer/tile/WMSTileLayer.d.ts +12 -0
  79. package/dist/core-map/layer/tile/index.d.ts +15 -0
  80. package/dist/core-map/layer/tile/urlTemplate.d.ts +17 -0
  81. package/dist/core-map/layer/vector/Canvas.d.ts +52 -0
  82. package/dist/core-map/layer/vector/Circle.d.ts +7 -0
  83. package/dist/core-map/layer/vector/CircleMarker.d.ts +22 -0
  84. package/dist/core-map/layer/vector/Path.d.ts +20 -0
  85. package/dist/core-map/layer/vector/Polygon.d.ts +13 -0
  86. package/dist/core-map/layer/vector/Polyline.d.ts +30 -0
  87. package/dist/core-map/layer/vector/Rectangle.d.ts +6 -0
  88. package/dist/core-map/layer/vector/Renderer.d.ts +12 -0
  89. package/dist/core-map/layer/vector/Renderer.getRenderer.d.ts +1 -0
  90. package/dist/core-map/layer/vector/SVG.d.ts +21 -0
  91. package/dist/core-map/layer/vector/index.d.ts +10 -0
  92. package/dist/core-map/map/Map.d.ts +353 -0
  93. package/dist/core-map/map/Style.d.ts +29 -0
  94. package/dist/core-map/map/handler/BoxZoomHandler.d.ts +23 -0
  95. package/dist/core-map/map/handler/DoubleClickZoomHandler.d.ts +6 -0
  96. package/dist/core-map/map/handler/DragHandler.d.ts +27 -0
  97. package/dist/core-map/map/handler/KeyboardHandler.d.ts +18 -0
  98. package/dist/core-map/map/handler/PinchZoomHandler.d.ts +20 -0
  99. package/dist/core-map/map/handler/ScrollWheelZoomHandler.d.ts +12 -0
  100. package/dist/core-map/map/handler/TapHoldHandler.d.ts +15 -0
  101. package/dist/core-map/map/handler/TwoFingerPitchHandler.d.ts +21 -0
  102. package/dist/core-map/map/handler/TwoFingerRotateHandler.d.ts +17 -0
  103. package/dist/core-map/map/index.d.ts +11 -0
  104. package/dist/core-map/mvt/VectorTile.d.ts +9 -0
  105. package/dist/core-map/mvt/VectorTileFeature.d.ts +59 -0
  106. package/dist/core-map/mvt/VectorTileLayer.d.ts +13 -0
  107. package/dist/core-map/proto/Pbf.d.ts +84 -0
  108. package/dist/core-map/renderer/webgl/GLContext.d.ts +22 -0
  109. package/dist/core-map/renderer/webgl/WebGLTileRenderer.d.ts +86 -0
  110. package/dist/core-map/renderer/webgl/index.d.ts +9 -0
  111. package/dist/core-map/renderer/webgl/mat4.d.ts +14 -0
  112. package/dist/core-map/services/index.d.ts +26 -0
  113. package/dist/core-map/services/index.js +1230 -0
  114. package/dist/core-map/services/providers/Google.d.ts +16 -0
  115. package/dist/core-map/services/providers/Mapbox.d.ts +26 -0
  116. package/dist/core-map/services/providers/Maptiler.d.ts +11 -0
  117. package/dist/core-map/services/providers/Nominatim.d.ts +11 -0
  118. package/dist/core-map/services/providers/OSRM.d.ts +20 -0
  119. package/dist/core-map/services/providers/Photon.d.ts +10 -0
  120. package/dist/core-map/services/providers/Valhalla.d.ts +20 -0
  121. package/dist/core-map/services/types.d.ts +84 -0
  122. package/dist/core-map/storage/TileCache.d.ts +40 -0
  123. package/dist/core-map/storage/cachedFetch.d.ts +13 -0
  124. package/dist/core-map/storage/defaultCache.d.ts +3 -0
  125. package/dist/core-map/storage/index.d.ts +13 -0
  126. package/dist/core-map/storage/index.js +283 -0
  127. package/dist/core-map/storage/offlineRegion.d.ts +26 -0
  128. package/dist/core-map/style-spec/diff.d.ts +17 -0
  129. package/dist/core-map/style-spec/expressions/Color.d.ts +16 -0
  130. package/dist/core-map/style-spec/expressions/compile.d.ts +4 -0
  131. package/dist/core-map/style-spec/expressions/errors.d.ts +8 -0
  132. package/dist/core-map/style-spec/expressions/index.d.ts +16 -0
  133. package/dist/core-map/style-spec/expressions/legacyFilter.d.ts +6 -0
  134. package/dist/core-map/style-spec/expressions/operators/conversion.d.ts +1 -0
  135. package/dist/core-map/style-spec/expressions/operators/interpolate.d.ts +14 -0
  136. package/dist/core-map/style-spec/expressions/operators/logical.d.ts +1 -0
  137. package/dist/core-map/style-spec/expressions/operators/lookup.d.ts +1 -0
  138. package/dist/core-map/style-spec/expressions/operators/math.d.ts +1 -0
  139. package/dist/core-map/style-spec/expressions/operators/string.d.ts +1 -0
  140. package/dist/core-map/style-spec/expressions/registry.d.ts +29 -0
  141. package/dist/core-map/style-spec/expressions/types.d.ts +48 -0
  142. package/dist/core-map/style-spec/expressions/validate.d.ts +13 -0
  143. package/dist/core-map/style-spec/index.d.ts +68 -0
  144. package/dist/core-map/style-spec/index.js +2529 -0
  145. package/dist/core-map/style-spec/schema.d.ts +381 -0
  146. package/dist/core-map/style-spec/types.d.ts +375 -0
  147. package/dist/core-map/style-spec/validate.d.ts +14 -0
  148. package/dist/core-map/symbols/CollisionIndex.d.ts +21 -0
  149. package/dist/core-map/symbols/GlyphAtlas.d.ts +38 -0
  150. package/dist/core-map/symbols/IconAtlas.d.ts +18 -0
  151. package/dist/core-map/symbols/index.d.ts +6 -0
  152. package/dist/core-map/symbols/index.js +501 -0
  153. package/dist/index.d.ts +2 -4
  154. package/dist/index.js +18414 -1857
  155. package/package.json +50 -58
  156. package/src/core-map/ts-maps.css +725 -0
  157. package/dist/components/base.d.ts +0 -17
  158. package/dist/components/concerns/interactable.d.ts +0 -1
  159. package/dist/components/line.d.ts +0 -29
  160. package/dist/components/marker.d.ts +0 -50
  161. package/dist/components/region.d.ts +0 -46
  162. package/dist/components/tooltip.d.ts +0 -22
  163. package/dist/core/apply-transform.d.ts +0 -7
  164. package/dist/core/coords-to-point.d.ts +0 -12
  165. package/dist/core/create-lines.d.ts +0 -2
  166. package/dist/core/create-markers.d.ts +0 -2
  167. package/dist/core/create-regions.d.ts +0 -2
  168. package/dist/core/create-series.d.ts +0 -3
  169. package/dist/core/get-inset-for-point.d.ts +0 -13
  170. package/dist/core/get-marker-position.d.ts +0 -6
  171. package/dist/core/index.d.ts +0 -1
  172. package/dist/core/reposition-labels.d.ts +0 -2
  173. package/dist/core/reposition-lines.d.ts +0 -2
  174. package/dist/core/reposition-markers.d.ts +0 -2
  175. package/dist/core/resize.d.ts +0 -3
  176. package/dist/core/set-focus.d.ts +0 -2
  177. package/dist/core/set-scale.d.ts +0 -2
  178. package/dist/core/setup-container-events.d.ts +0 -2
  179. package/dist/core/setup-container-touch-events.d.ts +0 -2
  180. package/dist/core/setup-element-events.d.ts +0 -2
  181. package/dist/core/setup-zoom-buttons.d.ts +0 -2
  182. package/dist/core/update-size.d.ts +0 -2
  183. package/dist/data-visualization.d.ts +0 -17
  184. package/dist/defaults/events.d.ts +0 -1
  185. package/dist/defaults/options.d.ts +0 -1
  186. package/dist/event-handler.d.ts +0 -1
  187. package/dist/legend.d.ts +0 -17
  188. package/dist/map.d.ts +0 -81
  189. package/dist/maps/brasil.d.ts +0 -2
  190. package/dist/maps/brasil.js +0 -7
  191. package/dist/maps/canada.d.ts +0 -2
  192. package/dist/maps/canada.js +0 -7
  193. package/dist/maps/iraq.d.ts +0 -2
  194. package/dist/maps/iraq.js +0 -84
  195. package/dist/maps/italy.d.ts +0 -2
  196. package/dist/maps/italy.js +0 -7
  197. package/dist/maps/russia.d.ts +0 -2
  198. package/dist/maps/russia.js +0 -366
  199. package/dist/maps/spain.d.ts +0 -2
  200. package/dist/maps/spain.js +0 -7
  201. package/dist/maps/us-aea-en.d.ts +0 -2
  202. package/dist/maps/us-aea-en.js +0 -7
  203. package/dist/maps/us-lcc-en.d.ts +0 -2
  204. package/dist/maps/us-lcc-en.js +0 -7
  205. package/dist/maps/us-merc-en.d.ts +0 -2
  206. package/dist/maps/us-merc-en.js +0 -7
  207. package/dist/maps/us-mill-en.d.ts +0 -2
  208. package/dist/maps/us-mill-en.js +0 -7
  209. package/dist/maps/world-merc.d.ts +0 -2
  210. package/dist/maps/world-merc.js +0 -7
  211. package/dist/maps/world.d.ts +0 -2
  212. package/dist/maps/world.js +0 -7
  213. package/dist/projection.d.ts +0 -1
  214. package/dist/scales/ordinal-scale.d.ts +0 -12
  215. package/dist/series.d.ts +0 -14
  216. package/dist/svg/base-element.d.ts +0 -19
  217. package/dist/svg/canvas-element.d.ts +0 -21
  218. package/dist/svg/image-element.d.ts +0 -12
  219. package/dist/svg/shape-element.d.ts +0 -19
  220. package/dist/svg/text-element.d.ts +0 -7
  221. package/dist/types.d.ts +0 -418
  222. package/dist/util/deep-merge.d.ts +0 -2
  223. package/dist/util/index.d.ts +0 -18
  224. package/dist/utils.d.ts +0 -87
  225. package/dist/vector-map.d.ts +0 -5
package/dist/types.d.ts DELETED
@@ -1,418 +0,0 @@
1
- import type { Tooltip } from './components/tooltip';
2
- import type { VectorMap } from 'ts-maps';
3
- export declare interface MapOptions {
4
- selector: string
5
- map: {
6
- name: string
7
- projection: 'mercator' | 'miller'
8
- [key: string]: any
9
- }
10
- backgroundColor?: string
11
- draggable?: boolean
12
- zoomButtons?: boolean
13
- zoomOnScroll?: boolean
14
- zoomOnScrollSpeed?: number
15
- zoomMax?: number
16
- zoomMin?: number
17
- zoomAnimate?: boolean
18
- showTooltip?: boolean
19
- zoomStep?: number
20
- bindTouchEvents?: boolean
21
- focusOn?: FocusOnOptions
22
- markers?: MarkerConfig[]
23
- series?: SeriesConfig
24
- regions?: string[]
25
- selectedRegions?: string[]
26
- selectedMarkers?: string[]
27
- regionsSelectable?: boolean
28
- regionsSelectableOne?: boolean
29
- markersSelectable?: boolean
30
- markersSelectableOne?: boolean
31
- regionStyle?: RegionStyle
32
- regionLabelStyle?: RegionLabelStyle
33
- markerStyle?: MarkerStyle
34
- markerLabelStyle?: MarkerLabelStyle
35
- lines?: {
36
- elements?: LineConfig[]
37
- style?: {
38
- stroke?: string
39
- strokeWidth?: number
40
- strokeLinecap?: string
41
- [key: string]: any
42
- }
43
- curvature?: number
44
- }
45
- visualizeData?: DataVisualizationOptions
46
- onLoaded?: () => void
47
- onViewportChange?: (scale: number, transX: number, transY: number) => void
48
- onRegionClick?: (event: MouseEvent, code: string) => void
49
- onRegionSelected?: (event: MouseEvent, code: string, isSelected: boolean, selectedRegions: string[]) => void
50
- onMarkerClick?: (event: MouseEvent, index: string) => void
51
- onMarkerSelected?: (event: MouseEvent, index: string, isSelected: boolean, selectedMarkers: string[]) => void
52
- onRegionTooltipShow?: (event: MouseEvent, tooltip: HTMLElement, code: string) => void
53
- onMarkerTooltipShow?: (event: MouseEvent, tooltip: HTMLElement, code: string) => void
54
- }
55
- export declare interface FocusOnOptions {
56
- region?: string
57
- regions?: string[]
58
- coords?: [number, number]
59
- x?: number
60
- y?: number
61
- scale?: number
62
- animate?: boolean
63
- }
64
- export declare interface MarkerConfig {
65
- name: string
66
- coords: [number, number]
67
- style?: {
68
- fill?: string
69
- stroke?: string
70
- strokeWidth?: number
71
- r?: number
72
- [key: string]: any
73
- }
74
- }
75
- export declare interface MarkerConstructorConfig {
76
- index: string
77
- map: MapInterface
78
- label?: {
79
- render?: (config: any, key: string) => string
80
- offsets?: ((key: string) => [number, number]) | Array<[number, number]>
81
- }
82
- labelsGroup?: SVGElement
83
- cx: number
84
- cy: number
85
- group?: SVGElement
86
- config: MarkerConfig
87
- isRecentlyCreated?: boolean
88
- }
89
- export declare interface MarkerStyle {
90
- initial: {
91
- fill?: string
92
- stroke?: string
93
- strokeWidth?: number
94
- r?: number
95
- image?: string
96
- [key: string]: any
97
- }
98
- hover?: {
99
- fill?: string
100
- stroke?: string
101
- strokeWidth?: number
102
- r?: number
103
- [key: string]: any
104
- }
105
- selected?: {
106
- fill?: string
107
- stroke?: string
108
- strokeWidth?: number
109
- r?: number
110
- [key: string]: any
111
- }
112
- selectedHover?: {
113
- fill?: string
114
- stroke?: string
115
- strokeWidth?: number
116
- r?: number
117
- [key: string]: any
118
- }
119
- }
120
- export declare interface LineConfig {
121
- from: string
122
- to: string
123
- style?: {
124
- stroke?: string
125
- strokeWidth?: number
126
- strokeLinecap?: string
127
- [key: string]: any
128
- }
129
- }
130
- export declare interface SeriesConfig {
131
- attribute: string
132
- scale?: string[]
133
- values?: Record<string, number>
134
- }
135
- export declare interface DataVisualizationOptions {
136
- scale: [string, string]
137
- values: Record<string, number | string>
138
- }
139
- /**
140
- * Type definitions for Italy map data
141
- */
142
- /**
143
- * Geographic coordinate point
144
- */
145
- export declare interface GeoPoint {
146
- x: number
147
- y: number
148
- }
149
- /**
150
- * Bounding box coordinates
151
- */
152
- export declare interface BBox {
153
- bbox: [GeoPoint, GeoPoint]
154
- }
155
- /**
156
- * Inset properties for the map
157
- */
158
- export declare interface Inset extends BBox {
159
- width: number
160
- top: number
161
- height: number
162
- left: number
163
- }
164
- /**
165
- * Region properties
166
- */
167
- export declare interface RegionMapData {
168
- path: string
169
- name: string
170
- }
171
- /**
172
- * Map of regions by their code
173
- */
174
- export declare interface RegionMap {
175
-
176
- }
177
- /**
178
- * Map data properties
179
- */
180
- export declare interface MapData {
181
- insets?: Inset[]
182
- paths: RegionMap
183
- height: number
184
- projection?: {
185
- type: string
186
- centralMeridian: number
187
- }
188
- width: number
189
- }
190
- export declare interface MapInterface {
191
- regions: Record<string, Region>
192
- scale: number
193
- transX: number
194
- transY: number
195
- container: HTMLElement
196
- canvas: SVGCanvasElement
197
- params: MapOptions & {
198
- labels?: {
199
- markers?: any
200
- regions?: any
201
- }
202
- series?: {
203
- markers?: SeriesConfig[]
204
- regions?: SeriesConfig[]
205
- }
206
- }
207
- series: {
208
- markers: any[]
209
- regions: any[]
210
- }
211
- mercator: {
212
- convert: (lat: number, lng: number) => { x: number, y: number } | false
213
- }
214
- miller: {
215
- convert: (lat: number, lng: number) => { x: number, y: number } | false
216
- }
217
- _width: number
218
- _height: number
219
- _defaultWidth: number
220
- _defaultHeight: number
221
- _baseScale: number
222
- _baseTransX: number
223
- _baseTransY: number
224
- _markers: Record<string, Marker>
225
- _lines?: Record<string, any>
226
- _linesGroup?: any
227
- _markersGroup?: any
228
- _markerLabelsGroup?: any
229
- _regionLabelsGroup?: any
230
- _mapData: MapData
231
- _tooltip?: Tooltip
232
- setBackgroundColor: (color: string) => void
233
- getSelectedRegions: () => string[]
234
- clearSelectedRegions: (regions?: string[] | undefined) => void
235
- setSelectedRegions: (regions: string[]) => void
236
- getSelectedMarkers: () => string[]
237
- clearSelectedMarkers: () => void
238
- setSelectedMarkers: (markers: string[]) => void
239
- addMarkers: (config: MarkerConfig | MarkerConfig[]) => void
240
- removeMarkers: (markers?: string[]) => void
241
- addLine: (from: string, to: string, style?: Record<string, string | number>) => void
242
- addLines: (config: LineConfig[]) => void
243
- removeLines: (lines: LineConfig[] | string[]) => void
244
- removeLine: (from: string, to: string) => void
245
- reset: () => void
246
- updateSize: () => void
247
- setFocus: (config: FocusOnOptions) => void
248
- getInsetForPoint: (x: number, y: number) => any
249
- getMarkerPosition: (config: MarkerConfig) => { x: number, y: number } | false
250
- coordsToPoint: (lat: number, lng: number) => { x: number, y: number } | false
251
- _repositionMarkers: () => void
252
- _repositionLines: () => void
253
- _repositionLabels: () => void
254
- _setScale: (scale: number, transX: number, transY: number, isDrag?: boolean, animate?: boolean) => void
255
- _applyTransform: () => void
256
- _emit: (eventName: string, args: any[]) => void
257
- }
258
- export declare interface Region {
259
- element: {
260
- shape: {
261
- style: {
262
- initial: Record<string, string | number>
263
- }
264
- getBBox: () => { x: number, y: number, width: number, height: number }
265
- }
266
- select: (state: boolean) => void
267
- isSelected: boolean
268
- setStyle: (property: string, value: string) => void
269
- updateLabelPosition: () => void
270
- }
271
- }
272
- export declare interface Marker {
273
- _uid: string
274
- config: MarkerConfig
275
- element: MarkerInstance
276
- }
277
- export declare interface Line {
278
- element: {
279
- remove: () => void
280
- }
281
- dispose: () => void
282
- getConfig: () => LineConfig
283
- setStyle: (style: Record<string, string | number>) => void
284
- }
285
- export declare interface EventRegistry {
286
-
287
- }
288
- export declare interface SVGCanvasElement {
289
- createGroup: (id: string) => SVGElement
290
- createPath: (config: Record<string, any>) => SVGElement
291
- createCircle: (config: Record<string, any>) => SVGElement
292
- createImage: (config: Record<string, any>) => SVGElement
293
- createText: (config: Record<string, any>) => SVGElement
294
- applyTransformParams: (scale: number, transX: number, transY: number) => void
295
- setSize: (width: number, height: number) => void
296
- }
297
- export declare interface LegendOptions {
298
- map: MapInterface
299
- series: any
300
- cssClass?: string
301
- title?: string
302
- labelRender?: (label: string) => string
303
- vertical?: boolean
304
- }
305
- export declare interface ScaleOptions {
306
- scale: Record<string, string>
307
- }
308
- export declare interface SeriesOptions {
309
- values?: Record<string, number | string>
310
- attribute?: string
311
- attributes?: Record<string, string>
312
- scale?: Record<string, string> | any
313
- legend?: LegendOptions
314
- }
315
- export declare interface RegionStyle {
316
- initial?: {
317
- fill?: string
318
- stroke?: string
319
- strokeWidth?: number
320
- [key: string]: any
321
- }
322
- hover?: {
323
- fill?: string
324
- stroke?: string
325
- strokeWidth?: number
326
- [key: string]: any
327
- }
328
- selected?: {
329
- fill?: string
330
- stroke?: string
331
- strokeWidth?: number
332
- [key: string]: any
333
- }
334
- selectedHover?: {
335
- fill?: string
336
- stroke?: string
337
- strokeWidth?: number
338
- [key: string]: any
339
- }
340
- }
341
- export declare interface RegionLabelStyle {
342
- initial?: {
343
- fontFamily?: string
344
- fontSize?: string | number
345
- fill?: string
346
- [key: string]: any
347
- }
348
- hover?: {
349
- fontFamily?: string
350
- fontSize?: string | number
351
- fill?: string
352
- [key: string]: any
353
- }
354
- selected?: {
355
- fontFamily?: string
356
- fontSize?: string | number
357
- fill?: string
358
- [key: string]: any
359
- }
360
- selectedHover?: {
361
- fontFamily?: string
362
- fontSize?: string | number
363
- fill?: string
364
- [key: string]: any
365
- }
366
- }
367
- export declare interface MarkerLabelStyle {
368
- initial?: {
369
- fontFamily?: string
370
- fontSize?: string | number
371
- fill?: string
372
- [key: string]: any
373
- }
374
- hover?: {
375
- fontFamily?: string
376
- fontSize?: string | number
377
- fill?: string
378
- [key: string]: any
379
- }
380
- selected?: {
381
- fontFamily?: string
382
- fontSize?: string | number
383
- fill?: string
384
- [key: string]: any
385
- }
386
- selectedHover?: {
387
- fontFamily?: string
388
- fontSize?: string | number
389
- fill?: string
390
- [key: string]: any
391
- }
392
- }
393
- export declare interface MarkerInstance {
394
- constructor: (config: MarkerConstructorConfig, style: MarkerStyle) => void
395
- select: (state: boolean) => void
396
- isSelected: boolean
397
- remove: () => void
398
- setStyle: (property: string, value: string | number) => void
399
- updateLabelPosition: () => void
400
- }
401
- export declare interface SeriesInstance {
402
- constructor: (
403
- config: SeriesConfig,
404
- elements: Record<string, any>,
405
- map: MapInterface
406
- ) => void
407
- setValues: (values: Record<string, number>) => void
408
- clear: () => void
409
- scale: string[]
410
- values: Record<string, number>
411
- attribute: string
412
- }
413
- // Add to window object if in browser environment
414
- declare namespace global {
415
- interface Window {
416
- VectorMap: typeof VectorMap
417
- }
418
- }
@@ -1,2 +0,0 @@
1
- declare type DeepMergeResult = Record<string | symbol, any>
2
- export default deepmerge;
@@ -1,18 +0,0 @@
1
- /**
2
- * --------------------------------------------------------------------------
3
- * Public Util Api
4
- * --------------------------------------------------------------------------
5
- */
6
- declare type ElementType = Element | null
7
- export {
8
- createElement,
9
- findElement,
10
- getElement,
11
- getLineUid,
12
- hyphenate,
13
- inherit,
14
- isImageUrl,
15
- keys,
16
- merge,
17
- removeElement,
18
- };
package/dist/utils.d.ts DELETED
@@ -1,87 +0,0 @@
1
- /**
2
- * Common utility functions for the ts-maps library
3
- */
4
- /**
5
- * Check if a value is undefined
6
- */
7
- export declare function isUndefined(value: any): boolean;
8
- /**
9
- * Check if a value is null
10
- */
11
- export declare function isNull(value: any): boolean;
12
- /**
13
- * Check if a value is null or undefined
14
- */
15
- export declare function isNullOrUndefined(value: any): boolean;
16
- /**
17
- * Check if a value is a string
18
- */
19
- export declare function isString(value: any): value is string;
20
- /**
21
- * Check if a value is a number
22
- */
23
- export declare function isNumber(value: any): value is number;
24
- /**
25
- * Check if a value is a function
26
- */
27
- export declare function isFunction(value: any): value is (...args: any[]) => any;
28
- /**
29
- * Check if a value is an object
30
- */
31
- export declare function isObject(value: any): value is object;
32
- /**
33
- * Check if a value is an array
34
- */
35
- export declare function isArray(value: any): value is any[];
36
- /**
37
- * Check if a value is a boolean
38
- */
39
- export declare function isBoolean(value: any): value is boolean;
40
- /**
41
- * Check if a value is a DOM element
42
- */
43
- export declare function isElement(value: any): value is Element;
44
- /**
45
- * Check if a value is a DOM node
46
- */
47
- export declare function isNode(value: any): value is Node;
48
- /**
49
- * Check if a value is a DOM event
50
- */
51
- export declare function isEvent(value: any): value is Event;
52
- /**
53
- * Check if a value is a RegExp
54
- */
55
- export declare function isRegExp(value: any): value is RegExp;
56
- /**
57
- * Check if a value is a Date
58
- */
59
- export declare function isDate(value: any): value is Date;
60
- /**
61
- * Check if a value is a Map
62
- */
63
- export declare function isMap(value: any): value is Map<any, any>;
64
- /**
65
- * Check if a value is a Set
66
- */
67
- export declare function isSet(value: any): value is Set<any>;
68
- /**
69
- * Check if a value is a Promise
70
- */
71
- export declare function isPromise(value: any): value is Promise<any>;
72
- /**
73
- * Check if a value is a Symbol
74
- */
75
- export declare function isSymbol(value: any): value is symbol;
76
- /**
77
- * Check if a value is a BigInt
78
- */
79
- export declare function isBigInt(value: any): value is bigint;
80
- /**
81
- * Check if a value is empty (null, undefined, empty string, empty array, empty object)
82
- */
83
- export declare function isEmpty(value: any): boolean;
84
- /**
85
- * Get the type of a value
86
- */
87
- export declare function getType(value: any): string;
@@ -1,5 +0,0 @@
1
- import type { MapOptions } from './types';
2
- export declare class VectorMap {
3
- constructor(options?: MapOptions);
4
- static addMap(name: string, map: any): void;
5
- }