@fusedashlabs/widgets 0.3.1 → 0.4.1

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 (409) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +1 -1
  3. package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts +2 -0
  4. package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts.map +1 -1
  5. package/dist/components/chart-renderer/element/ui9000-chart-renderer.js +23 -2
  6. package/dist/components/chart-renderer/element/ui9000-chart-renderer.js.map +1 -1
  7. package/dist/components/chart-renderer/lib/registry.d.ts.map +1 -1
  8. package/dist/components/chart-renderer/lib/registry.js +20 -5
  9. package/dist/components/chart-renderer/lib/registry.js.map +1 -1
  10. package/dist/components/chart-renderer/lib/types.d.ts +5 -0
  11. package/dist/components/chart-renderer/lib/types.d.ts.map +1 -1
  12. package/dist/components/donut-chart/element/ui9000-donut-chart.js +1 -1
  13. package/dist/components/donut-chart/element/ui9000-donut-chart.js.map +1 -1
  14. package/dist/components/kpi-widget/element/styles.d.ts.map +1 -1
  15. package/dist/components/kpi-widget/element/styles.js +268 -5
  16. package/dist/components/kpi-widget/element/styles.js.map +1 -1
  17. package/dist/components/kpi-widget/element/ui9000-kpi-widget.d.ts +10 -1
  18. package/dist/components/kpi-widget/element/ui9000-kpi-widget.d.ts.map +1 -1
  19. package/dist/components/kpi-widget/element/ui9000-kpi-widget.js +154 -27
  20. package/dist/components/kpi-widget/element/ui9000-kpi-widget.js.map +1 -1
  21. package/dist/components/kpi-widget/index.d.ts +1 -1
  22. package/dist/components/kpi-widget/index.d.ts.map +1 -1
  23. package/dist/components/kpi-widget/index.js +7 -4
  24. package/dist/components/kpi-widget/lib/extract.d.ts +5 -1
  25. package/dist/components/kpi-widget/lib/extract.d.ts.map +1 -1
  26. package/dist/components/kpi-widget/lib/extract.js +110 -34
  27. package/dist/components/kpi-widget/lib/extract.js.map +1 -1
  28. package/dist/components/kpi-widget/lib/format.d.ts +5 -0
  29. package/dist/components/kpi-widget/lib/format.d.ts.map +1 -1
  30. package/dist/components/kpi-widget/lib/format.js +10 -1
  31. package/dist/components/kpi-widget/lib/format.js.map +1 -1
  32. package/dist/components/kpi-widget/lib/grid.d.ts +5 -0
  33. package/dist/components/kpi-widget/lib/grid.d.ts.map +1 -1
  34. package/dist/components/kpi-widget/lib/grid.js +18 -0
  35. package/dist/components/kpi-widget/lib/grid.js.map +1 -1
  36. package/dist/components/kpi-widget/lib/index.d.ts +5 -5
  37. package/dist/components/kpi-widget/lib/index.d.ts.map +1 -1
  38. package/dist/components/kpi-widget/lib/normalize.d.ts +2 -0
  39. package/dist/components/kpi-widget/lib/normalize.d.ts.map +1 -1
  40. package/dist/components/kpi-widget/lib/normalize.js +73 -12
  41. package/dist/components/kpi-widget/lib/normalize.js.map +1 -1
  42. package/dist/components/kpi-widget/lib/types.d.ts +41 -0
  43. package/dist/components/kpi-widget/lib/types.d.ts.map +1 -1
  44. package/dist/components/kpi-widget/metadata.json.d.ts +1 -1
  45. package/dist/components/kpi-widget/metadata.json.js +1 -1
  46. package/dist/components/lollipop/element/styles.d.ts.map +1 -1
  47. package/dist/components/lollipop/element/styles.js +19 -1
  48. package/dist/components/lollipop/element/styles.js.map +1 -1
  49. package/dist/components/lollipop/element/ui9000-lollipop.d.ts +6 -1
  50. package/dist/components/lollipop/element/ui9000-lollipop.d.ts.map +1 -1
  51. package/dist/components/lollipop/element/ui9000-lollipop.js +68 -7
  52. package/dist/components/lollipop/element/ui9000-lollipop.js.map +1 -1
  53. package/dist/components/lollipop/index.d.ts +1 -1
  54. package/dist/components/lollipop/index.d.ts.map +1 -1
  55. package/dist/components/lollipop/index.js +2 -0
  56. package/dist/components/lollipop/index.js.map +1 -1
  57. package/dist/components/lollipop/lib/domain.d.ts +16 -1
  58. package/dist/components/lollipop/lib/domain.d.ts.map +1 -1
  59. package/dist/components/lollipop/lib/domain.js +56 -1
  60. package/dist/components/lollipop/lib/domain.js.map +1 -1
  61. package/dist/components/lollipop/lib/index.d.ts +3 -2
  62. package/dist/components/lollipop/lib/index.d.ts.map +1 -1
  63. package/dist/components/lollipop/lib/layout.d.ts +16 -0
  64. package/dist/components/lollipop/lib/layout.d.ts.map +1 -0
  65. package/dist/components/lollipop/lib/layout.js +16 -0
  66. package/dist/components/lollipop/lib/layout.js.map +1 -0
  67. package/dist/components/lollipop/lib/types.d.ts +5 -0
  68. package/dist/components/lollipop/lib/types.d.ts.map +1 -1
  69. package/dist/components/lollipop/metadata.json.d.ts +10 -0
  70. package/dist/components/lollipop/metadata.json.js +4 -1
  71. package/dist/components/lollipop/metadata.json.js.map +1 -1
  72. package/dist/components/lollipop/render/draw.d.ts +8 -1
  73. package/dist/components/lollipop/render/draw.d.ts.map +1 -1
  74. package/dist/components/lollipop/render/draw.js +155 -84
  75. package/dist/components/lollipop/render/draw.js.map +1 -1
  76. package/dist/components/map-chart/element/styles.d.ts +2 -0
  77. package/dist/components/map-chart/element/styles.d.ts.map +1 -0
  78. package/dist/components/map-chart/element/styles.js +372 -0
  79. package/dist/components/map-chart/element/styles.js.map +1 -0
  80. package/dist/components/map-chart/element/ui9000-map-chart.d.ts +54 -0
  81. package/dist/components/map-chart/element/ui9000-map-chart.d.ts.map +1 -0
  82. package/dist/components/map-chart/element/ui9000-map-chart.js +539 -0
  83. package/dist/components/map-chart/element/ui9000-map-chart.js.map +1 -0
  84. package/dist/components/map-chart/index.d.ts +5 -0
  85. package/dist/components/map-chart/index.d.ts.map +1 -0
  86. package/dist/components/map-chart/index.js +29 -0
  87. package/dist/components/map-chart/index.js.map +1 -0
  88. package/dist/components/map-chart/lib/constants.d.ts +34 -0
  89. package/dist/components/map-chart/lib/constants.d.ts.map +1 -0
  90. package/dist/components/map-chart/lib/constants.js +122 -0
  91. package/dist/components/map-chart/lib/constants.js.map +1 -0
  92. package/dist/components/map-chart/lib/domain.d.ts +12 -0
  93. package/dist/components/map-chart/lib/domain.d.ts.map +1 -0
  94. package/dist/components/map-chart/lib/domain.js +105 -0
  95. package/dist/components/map-chart/lib/domain.js.map +1 -0
  96. package/dist/components/map-chart/lib/format.d.ts +8 -0
  97. package/dist/components/map-chart/lib/format.d.ts.map +1 -0
  98. package/dist/components/map-chart/lib/format.js +45 -0
  99. package/dist/components/map-chart/lib/format.js.map +1 -0
  100. package/dist/components/map-chart/lib/geo-index.d.ts +7 -0
  101. package/dist/components/map-chart/lib/geo-index.d.ts.map +1 -0
  102. package/dist/components/map-chart/lib/geo-index.js +200 -0
  103. package/dist/components/map-chart/lib/geo-index.js.map +1 -0
  104. package/dist/components/map-chart/lib/geojson.d.ts +5 -0
  105. package/dist/components/map-chart/lib/geojson.d.ts.map +1 -0
  106. package/dist/components/map-chart/lib/geojson.js +47 -0
  107. package/dist/components/map-chart/lib/geojson.js.map +1 -0
  108. package/dist/components/map-chart/lib/index.d.ts +13 -0
  109. package/dist/components/map-chart/lib/index.d.ts.map +1 -0
  110. package/dist/components/map-chart/lib/join.d.ts +7 -0
  111. package/dist/components/map-chart/lib/join.d.ts.map +1 -0
  112. package/dist/components/map-chart/lib/join.js +156 -0
  113. package/dist/components/map-chart/lib/join.js.map +1 -0
  114. package/dist/components/map-chart/lib/legend.d.ts +45 -0
  115. package/dist/components/map-chart/lib/legend.d.ts.map +1 -0
  116. package/dist/components/map-chart/lib/legend.js +108 -0
  117. package/dist/components/map-chart/lib/legend.js.map +1 -0
  118. package/dist/components/map-chart/lib/normalize.d.ts +3 -0
  119. package/dist/components/map-chart/lib/normalize.d.ts.map +1 -0
  120. package/dist/components/map-chart/lib/normalize.js +177 -0
  121. package/dist/components/map-chart/lib/normalize.js.map +1 -0
  122. package/dist/components/map-chart/lib/pmtiles.d.ts +41 -0
  123. package/dist/components/map-chart/lib/pmtiles.d.ts.map +1 -0
  124. package/dist/components/map-chart/lib/pmtiles.js +112 -0
  125. package/dist/components/map-chart/lib/pmtiles.js.map +1 -0
  126. package/dist/components/map-chart/lib/types.d.ts +128 -0
  127. package/dist/components/map-chart/lib/types.d.ts.map +1 -0
  128. package/dist/components/map-chart/metadata.json.d.ts +83 -0
  129. package/dist/components/map-chart/metadata.json.js +42 -0
  130. package/dist/components/map-chart/metadata.json.js.map +1 -0
  131. package/dist/components/map-chart/render/draw.d.ts +24 -0
  132. package/dist/components/map-chart/render/draw.d.ts.map +1 -0
  133. package/dist/components/map-chart/render/draw.js +456 -0
  134. package/dist/components/map-chart/render/draw.js.map +1 -0
  135. package/dist/components/map-chart/render/index.d.ts +2 -0
  136. package/dist/components/map-chart/render/index.d.ts.map +1 -0
  137. package/dist/components/matrix-chart/element/styles.d.ts +2 -0
  138. package/dist/components/matrix-chart/element/styles.d.ts.map +1 -0
  139. package/dist/components/matrix-chart/element/styles.js +97 -0
  140. package/dist/components/matrix-chart/element/styles.js.map +1 -0
  141. package/dist/components/matrix-chart/element/ui9000-matrix-chart.d.ts +39 -0
  142. package/dist/components/matrix-chart/element/ui9000-matrix-chart.d.ts.map +1 -0
  143. package/dist/components/matrix-chart/element/ui9000-matrix-chart.js +238 -0
  144. package/dist/components/matrix-chart/element/ui9000-matrix-chart.js.map +1 -0
  145. package/dist/components/matrix-chart/index.d.ts +5 -0
  146. package/dist/components/matrix-chart/index.d.ts.map +1 -0
  147. package/dist/components/matrix-chart/index.js +20 -0
  148. package/dist/components/matrix-chart/lib/domain.d.ts +7 -0
  149. package/dist/components/matrix-chart/lib/domain.d.ts.map +1 -0
  150. package/dist/components/matrix-chart/lib/domain.js +58 -0
  151. package/dist/components/matrix-chart/lib/domain.js.map +1 -0
  152. package/dist/components/matrix-chart/lib/format.d.ts +5 -0
  153. package/dist/components/matrix-chart/lib/format.d.ts.map +1 -0
  154. package/dist/components/matrix-chart/lib/format.js +16 -0
  155. package/dist/components/matrix-chart/lib/format.js.map +1 -0
  156. package/dist/components/matrix-chart/lib/index.d.ts +5 -0
  157. package/dist/components/matrix-chart/lib/index.d.ts.map +1 -0
  158. package/dist/components/matrix-chart/lib/normalize.d.ts +5 -0
  159. package/dist/components/matrix-chart/lib/normalize.d.ts.map +1 -0
  160. package/dist/components/matrix-chart/lib/normalize.js +165 -0
  161. package/dist/components/matrix-chart/lib/normalize.js.map +1 -0
  162. package/dist/components/matrix-chart/lib/types.d.ts +33 -0
  163. package/dist/components/matrix-chart/lib/types.d.ts.map +1 -0
  164. package/dist/components/matrix-chart/metadata.json.d.ts +110 -0
  165. package/dist/components/matrix-chart/metadata.json.js +42 -0
  166. package/dist/components/matrix-chart/metadata.json.js.map +1 -0
  167. package/dist/components/matrix-chart/render/draw.d.ts +63 -0
  168. package/dist/components/matrix-chart/render/draw.d.ts.map +1 -0
  169. package/dist/components/matrix-chart/render/draw.js +225 -0
  170. package/dist/components/matrix-chart/render/draw.js.map +1 -0
  171. package/dist/components/matrix-chart/render/index.d.ts +2 -0
  172. package/dist/components/matrix-chart/render/index.d.ts.map +1 -0
  173. package/dist/components/network-graph/element/styles.d.ts.map +1 -1
  174. package/dist/components/network-graph/element/styles.js +177 -57
  175. package/dist/components/network-graph/element/styles.js.map +1 -1
  176. package/dist/components/network-graph/element/ui9000-network-graph.d.ts +4 -0
  177. package/dist/components/network-graph/element/ui9000-network-graph.d.ts.map +1 -1
  178. package/dist/components/network-graph/element/ui9000-network-graph.js +116 -39
  179. package/dist/components/network-graph/element/ui9000-network-graph.js.map +1 -1
  180. package/dist/components/network-graph/lib/domain.d.ts +2 -2
  181. package/dist/components/network-graph/lib/domain.js.map +1 -1
  182. package/dist/components/network-graph/lib/index.d.ts +1 -0
  183. package/dist/components/network-graph/lib/index.d.ts.map +1 -1
  184. package/dist/components/network-graph/lib/legend.d.ts +15 -0
  185. package/dist/components/network-graph/lib/legend.d.ts.map +1 -0
  186. package/dist/components/network-graph/lib/legend.js +35 -0
  187. package/dist/components/network-graph/lib/legend.js.map +1 -0
  188. package/dist/components/network-graph/render/draw.d.ts +4 -1
  189. package/dist/components/network-graph/render/draw.d.ts.map +1 -1
  190. package/dist/components/network-graph/render/draw.js +34 -9
  191. package/dist/components/network-graph/render/draw.js.map +1 -1
  192. package/dist/components/partial-dependence-chart/element/styles.d.ts +2 -0
  193. package/dist/components/partial-dependence-chart/element/styles.d.ts.map +1 -0
  194. package/dist/components/partial-dependence-chart/element/styles.js +48 -0
  195. package/dist/components/partial-dependence-chart/element/styles.js.map +1 -0
  196. package/dist/components/partial-dependence-chart/element/ui9000-partial-dependence-chart.d.ts +30 -0
  197. package/dist/components/partial-dependence-chart/element/ui9000-partial-dependence-chart.d.ts.map +1 -0
  198. package/dist/components/partial-dependence-chart/element/ui9000-partial-dependence-chart.js +163 -0
  199. package/dist/components/partial-dependence-chart/element/ui9000-partial-dependence-chart.js.map +1 -0
  200. package/dist/components/partial-dependence-chart/index.d.ts +5 -0
  201. package/dist/components/partial-dependence-chart/index.d.ts.map +1 -0
  202. package/dist/components/partial-dependence-chart/index.js +18 -0
  203. package/dist/components/partial-dependence-chart/index.js.map +1 -0
  204. package/dist/components/partial-dependence-chart/lib/domain.d.ts +6 -0
  205. package/dist/components/partial-dependence-chart/lib/domain.d.ts.map +1 -0
  206. package/dist/components/partial-dependence-chart/lib/domain.js +16 -0
  207. package/dist/components/partial-dependence-chart/lib/domain.js.map +1 -0
  208. package/dist/components/partial-dependence-chart/lib/index.d.ts +5 -0
  209. package/dist/components/partial-dependence-chart/lib/index.d.ts.map +1 -0
  210. package/dist/components/partial-dependence-chart/lib/normalize.d.ts +4 -0
  211. package/dist/components/partial-dependence-chart/lib/normalize.d.ts.map +1 -0
  212. package/dist/components/partial-dependence-chart/lib/normalize.js +167 -0
  213. package/dist/components/partial-dependence-chart/lib/normalize.js.map +1 -0
  214. package/dist/components/partial-dependence-chart/lib/series.d.ts +15 -0
  215. package/dist/components/partial-dependence-chart/lib/series.d.ts.map +1 -0
  216. package/dist/components/partial-dependence-chart/lib/series.js +63 -0
  217. package/dist/components/partial-dependence-chart/lib/series.js.map +1 -0
  218. package/dist/components/partial-dependence-chart/lib/types.d.ts +50 -0
  219. package/dist/components/partial-dependence-chart/lib/types.d.ts.map +1 -0
  220. package/dist/components/partial-dependence-chart/metadata.json.d.ts +80 -0
  221. package/dist/components/partial-dependence-chart/metadata.json.js +42 -0
  222. package/dist/components/partial-dependence-chart/metadata.json.js.map +1 -0
  223. package/dist/components/partial-dependence-chart/render/draw.d.ts +34 -0
  224. package/dist/components/partial-dependence-chart/render/draw.d.ts.map +1 -0
  225. package/dist/components/partial-dependence-chart/render/draw.js +95 -0
  226. package/dist/components/partial-dependence-chart/render/draw.js.map +1 -0
  227. package/dist/components/partial-dependence-chart/render/index.d.ts +2 -0
  228. package/dist/components/partial-dependence-chart/render/index.d.ts.map +1 -0
  229. package/dist/components/pie-chart/element/styles.d.ts.map +1 -1
  230. package/dist/components/pie-chart/element/styles.js +34 -1
  231. package/dist/components/pie-chart/element/styles.js.map +1 -1
  232. package/dist/components/pie-chart/element/ui9000-pie-chart.d.ts +0 -2
  233. package/dist/components/pie-chart/element/ui9000-pie-chart.d.ts.map +1 -1
  234. package/dist/components/pie-chart/element/ui9000-pie-chart.js +2 -8
  235. package/dist/components/pie-chart/element/ui9000-pie-chart.js.map +1 -1
  236. package/dist/components/pie-chart/metadata.json.d.ts +1 -7
  237. package/dist/components/pie-chart/metadata.json.js +2 -2
  238. package/dist/components/polar-area-chart/element/styles.d.ts +1 -1
  239. package/dist/components/polar-area-chart/element/styles.d.ts.map +1 -1
  240. package/dist/components/{donut-group-chart → polar-area-chart}/element/styles.js +9 -27
  241. package/dist/components/polar-area-chart/element/styles.js.map +1 -0
  242. package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.d.ts.map +1 -1
  243. package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.js +4 -3
  244. package/dist/components/polar-area-chart/element/ui9000-polar-area-chart.js.map +1 -1
  245. package/dist/components/polar-area-chart/index.d.ts +1 -1
  246. package/dist/components/polar-area-chart/index.d.ts.map +1 -1
  247. package/dist/components/polar-area-chart/index.js +2 -1
  248. package/dist/components/polar-area-chart/lib/domain.d.ts +8 -0
  249. package/dist/components/polar-area-chart/lib/domain.d.ts.map +1 -1
  250. package/dist/components/polar-area-chart/lib/domain.js +20 -0
  251. package/dist/components/polar-area-chart/lib/domain.js.map +1 -1
  252. package/dist/components/polar-area-chart/lib/index.d.ts +1 -1
  253. package/dist/components/polar-area-chart/lib/index.d.ts.map +1 -1
  254. package/dist/components/polar-area-chart/lib/normalize.d.ts.map +1 -1
  255. package/dist/components/polar-area-chart/lib/normalize.js +72 -6
  256. package/dist/components/polar-area-chart/lib/normalize.js.map +1 -1
  257. package/dist/components/polar-area-chart/lib/types.d.ts +6 -1
  258. package/dist/components/polar-area-chart/lib/types.d.ts.map +1 -1
  259. package/dist/components/polar-area-chart/metadata.json.d.ts +1 -1
  260. package/dist/components/polar-area-chart/metadata.json.js +1 -1
  261. package/dist/components/polar-area-chart/render/draw.d.ts.map +1 -1
  262. package/dist/components/polar-area-chart/render/draw.js +2 -2
  263. package/dist/components/polar-area-chart/render/draw.js.map +1 -1
  264. package/dist/components/punchcard-chart/metadata.json.d.ts +1 -1
  265. package/dist/components/punchcard-chart/metadata.json.js +1 -1
  266. package/dist/components/sankey-chart/element/styles.d.ts.map +1 -1
  267. package/dist/components/sankey-chart/element/styles.js +7 -27
  268. package/dist/components/sankey-chart/element/styles.js.map +1 -1
  269. package/dist/components/sankey-chart/element/ui9000-sankey-chart.d.ts +5 -5
  270. package/dist/components/sankey-chart/element/ui9000-sankey-chart.d.ts.map +1 -1
  271. package/dist/components/sankey-chart/element/ui9000-sankey-chart.js +37 -35
  272. package/dist/components/sankey-chart/element/ui9000-sankey-chart.js.map +1 -1
  273. package/dist/components/treemap-chart/element/styles.d.ts +2 -0
  274. package/dist/components/treemap-chart/element/styles.d.ts.map +1 -0
  275. package/dist/components/treemap-chart/element/styles.js +141 -0
  276. package/dist/components/treemap-chart/element/styles.js.map +1 -0
  277. package/dist/components/treemap-chart/element/ui9000-treemap-chart.d.ts +35 -0
  278. package/dist/components/treemap-chart/element/ui9000-treemap-chart.d.ts.map +1 -0
  279. package/dist/components/treemap-chart/element/ui9000-treemap-chart.js +177 -0
  280. package/dist/components/treemap-chart/element/ui9000-treemap-chart.js.map +1 -0
  281. package/dist/components/treemap-chart/index.d.ts +5 -0
  282. package/dist/components/treemap-chart/index.d.ts.map +1 -0
  283. package/dist/components/treemap-chart/index.js +22 -0
  284. package/dist/components/treemap-chart/index.js.map +1 -0
  285. package/dist/components/treemap-chart/lib/color.d.ts +25 -0
  286. package/dist/components/treemap-chart/lib/color.d.ts.map +1 -0
  287. package/dist/components/treemap-chart/lib/color.js +67 -0
  288. package/dist/components/treemap-chart/lib/color.js.map +1 -0
  289. package/dist/components/treemap-chart/lib/format.d.ts +7 -0
  290. package/dist/components/treemap-chart/lib/format.d.ts.map +1 -0
  291. package/dist/components/treemap-chart/lib/format.js +9 -0
  292. package/dist/components/treemap-chart/lib/format.js.map +1 -0
  293. package/dist/components/treemap-chart/lib/index.d.ts +6 -0
  294. package/dist/components/treemap-chart/lib/index.d.ts.map +1 -0
  295. package/dist/components/treemap-chart/lib/layout.d.ts +18 -0
  296. package/dist/components/treemap-chart/lib/layout.d.ts.map +1 -0
  297. package/dist/components/treemap-chart/lib/layout.js +31 -0
  298. package/dist/components/treemap-chart/lib/layout.js.map +1 -0
  299. package/dist/components/treemap-chart/lib/normalize.d.ts +4 -0
  300. package/dist/components/treemap-chart/lib/normalize.d.ts.map +1 -0
  301. package/dist/components/treemap-chart/lib/normalize.js +182 -0
  302. package/dist/components/treemap-chart/lib/normalize.js.map +1 -0
  303. package/dist/components/treemap-chart/lib/types.d.ts +63 -0
  304. package/dist/components/treemap-chart/lib/types.d.ts.map +1 -0
  305. package/dist/components/treemap-chart/metadata.json.d.ts +126 -0
  306. package/dist/components/treemap-chart/metadata.json.js +45 -0
  307. package/dist/components/treemap-chart/render/draw.d.ts +24 -0
  308. package/dist/components/treemap-chart/render/draw.d.ts.map +1 -0
  309. package/dist/components/treemap-chart/render/draw.js +124 -0
  310. package/dist/components/treemap-chart/render/draw.js.map +1 -0
  311. package/dist/components/treemap-chart/render/index.d.ts +2 -0
  312. package/dist/components/treemap-chart/render/index.d.ts.map +1 -0
  313. package/dist/element/chart-legend-render.d.ts +5 -0
  314. package/dist/element/chart-legend-render.d.ts.map +1 -1
  315. package/dist/element/chart-legend-render.js +19 -1
  316. package/dist/element/chart-legend-render.js.map +1 -1
  317. package/dist/element/chart-shell-styles.d.ts.map +1 -1
  318. package/dist/element/chart-shell-styles.js +35 -0
  319. package/dist/element/chart-shell-styles.js.map +1 -1
  320. package/dist/index.d.ts +11 -5
  321. package/dist/index.d.ts.map +1 -1
  322. package/dist/index.js +91 -42
  323. package/dist/index.js.map +1 -1
  324. package/dist/lazy/index.d.ts +5 -2
  325. package/dist/lazy/index.d.ts.map +1 -1
  326. package/dist/lazy/index.js +32 -8
  327. package/dist/lazy/index.js.map +1 -1
  328. package/dist/lazy/map-chart.d.ts +4 -0
  329. package/dist/lazy/map-chart.d.ts.map +1 -0
  330. package/dist/lazy/map-chart.js +5 -0
  331. package/dist/lazy/map-chart.js.map +1 -0
  332. package/dist/lazy/matrix-chart.d.ts +4 -0
  333. package/dist/lazy/matrix-chart.d.ts.map +1 -0
  334. package/dist/lazy/matrix-chart.js +5 -0
  335. package/dist/lazy/matrix-chart.js.map +1 -0
  336. package/dist/lazy/partial-dependence-chart.d.ts +4 -0
  337. package/dist/lazy/partial-dependence-chart.d.ts.map +1 -0
  338. package/dist/lazy/partial-dependence-chart.js +5 -0
  339. package/dist/lazy/partial-dependence-chart.js.map +1 -0
  340. package/dist/lazy/treemap-chart.d.ts +4 -0
  341. package/dist/lazy/treemap-chart.d.ts.map +1 -0
  342. package/dist/lazy/treemap-chart.js +5 -0
  343. package/dist/lazy/treemap-chart.js.map +1 -0
  344. package/dist/utils/axis-units.d.ts +15 -0
  345. package/dist/utils/axis-units.d.ts.map +1 -0
  346. package/dist/utils/axis-units.js +27 -0
  347. package/dist/utils/axis-units.js.map +1 -0
  348. package/dist/utils/chart-helpers.d.ts +6 -6
  349. package/dist/utils/chart-helpers.d.ts.map +1 -1
  350. package/dist/utils/chart-helpers.js +31 -15
  351. package/dist/utils/chart-helpers.js.map +1 -1
  352. package/dist/utils/format-text.d.ts +5 -0
  353. package/dist/utils/format-text.d.ts.map +1 -1
  354. package/dist/utils/format-text.js +7 -0
  355. package/dist/utils/format-text.js.map +1 -1
  356. package/dist/utils/fuse-palette.d.ts +12 -0
  357. package/dist/utils/fuse-palette.d.ts.map +1 -1
  358. package/dist/utils/fuse-palette.js +23 -1
  359. package/dist/utils/fuse-palette.js.map +1 -1
  360. package/dist/utils/fuse-widget.d.ts +13 -4
  361. package/dist/utils/fuse-widget.d.ts.map +1 -1
  362. package/dist/utils/fuse-widget.js.map +1 -1
  363. package/dist/utils/fusedash-visual.d.ts +77 -52
  364. package/dist/utils/fusedash-visual.d.ts.map +1 -1
  365. package/dist/utils/fusedash-visual.js +55 -29
  366. package/dist/utils/fusedash-visual.js.map +1 -1
  367. package/package.json +48 -12
  368. package/dist/components/donut-group-chart/element/styles.d.ts +0 -2
  369. package/dist/components/donut-group-chart/element/styles.d.ts.map +0 -1
  370. package/dist/components/donut-group-chart/element/styles.js.map +0 -1
  371. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.d.ts +0 -34
  372. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.d.ts.map +0 -1
  373. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.js +0 -169
  374. package/dist/components/donut-group-chart/element/ui9000-donut-group-chart.js.map +0 -1
  375. package/dist/components/donut-group-chart/index.d.ts +0 -5
  376. package/dist/components/donut-group-chart/index.d.ts.map +0 -1
  377. package/dist/components/donut-group-chart/index.js +0 -23
  378. package/dist/components/donut-group-chart/lib/domain.d.ts +0 -39
  379. package/dist/components/donut-group-chart/lib/domain.d.ts.map +0 -1
  380. package/dist/components/donut-group-chart/lib/domain.js +0 -51
  381. package/dist/components/donut-group-chart/lib/domain.js.map +0 -1
  382. package/dist/components/donut-group-chart/lib/format.d.ts +0 -7
  383. package/dist/components/donut-group-chart/lib/format.d.ts.map +0 -1
  384. package/dist/components/donut-group-chart/lib/format.js +0 -21
  385. package/dist/components/donut-group-chart/lib/format.js.map +0 -1
  386. package/dist/components/donut-group-chart/lib/index.d.ts +0 -5
  387. package/dist/components/donut-group-chart/lib/index.d.ts.map +0 -1
  388. package/dist/components/donut-group-chart/lib/normalize.d.ts +0 -14
  389. package/dist/components/donut-group-chart/lib/normalize.d.ts.map +0 -1
  390. package/dist/components/donut-group-chart/lib/normalize.js +0 -98
  391. package/dist/components/donut-group-chart/lib/normalize.js.map +0 -1
  392. package/dist/components/donut-group-chart/lib/types.d.ts +0 -49
  393. package/dist/components/donut-group-chart/lib/types.d.ts.map +0 -1
  394. package/dist/components/donut-group-chart/metadata.json.d.ts +0 -113
  395. package/dist/components/donut-group-chart/metadata.json.js +0 -45
  396. package/dist/components/donut-group-chart/render/draw.d.ts +0 -44
  397. package/dist/components/donut-group-chart/render/draw.d.ts.map +0 -1
  398. package/dist/components/donut-group-chart/render/draw.js +0 -194
  399. package/dist/components/donut-group-chart/render/draw.js.map +0 -1
  400. package/dist/components/donut-group-chart/render/index.d.ts +0 -2
  401. package/dist/components/donut-group-chart/render/index.d.ts.map +0 -1
  402. package/dist/components/donut-group-chart/tests/fixtures.d.ts +0 -33
  403. package/dist/components/donut-group-chart/tests/fixtures.d.ts.map +0 -1
  404. package/dist/lazy/donut-group-chart.d.ts +0 -4
  405. package/dist/lazy/donut-group-chart.d.ts.map +0 -1
  406. package/dist/lazy/donut-group-chart.js +0 -5
  407. package/dist/lazy/donut-group-chart.js.map +0 -1
  408. /package/dist/components/{donut-group-chart → matrix-chart}/index.js.map +0 -0
  409. /package/dist/components/{donut-group-chart → treemap-chart}/metadata.json.js.map +0 -0
@@ -0,0 +1,34 @@
1
+ export type MapVisualisation = 'choropleth' | 'bubbles' | 'spike' | 'markers';
2
+ export type MapAdminType = 'city' | 'county' | 'state' | 'country' | 'province' | 'region';
3
+ export interface RegionKeys {
4
+ name: string;
5
+ id: string;
6
+ code: string;
7
+ county: string;
8
+ state: string;
9
+ country: string;
10
+ }
11
+ export declare const MAP_ADMIN_TYPES: MapAdminType[];
12
+ export declare const SANITIZE_KEY_PATTERN: RegExp;
13
+ export declare const SANITIZE_ID_PATTERN: RegExp;
14
+ export declare const sanitizeKey: (key: string) => string;
15
+ export declare const sanitizeId: (id: string) => string;
16
+ /** Vendored from client MapBox/constants.ts — keep in lockstep with mcp-ui geojsonKeys. */
17
+ export declare const GEOJSON_KEYS: Record<MapAdminType, RegionKeys>;
18
+ export declare const MAX_COLOR_RANGE = 7;
19
+ export declare const DEFAULT_SPIKE_SIZES: number[];
20
+ export declare const DEFAULT_BUBBLES_RADIUS: number[];
21
+ export declare const SPIKE_HEIGHTS: number[];
22
+ export declare const BUBBLE_RADIUS_STEPS: number[];
23
+ export declare const FALLBACK_FILL = "#DADAE1";
24
+ export declare const UNMATCHED_FILL = "rgba(72, 70, 91, 0.15)";
25
+ export declare const MAX_SPIKES = 200;
26
+ export declare const LAYER_ORDER: Record<MapVisualisation, number>;
27
+ export declare const MAP_STYLES: {
28
+ readonly light: "mapbox://styles/andyk1987/cm1kvt8ib00ie01pi1lty0ey4";
29
+ readonly dark: "mapbox://styles/flc-designers/cm7j7z28n00ov01ryahkd2jqj";
30
+ readonly terrain: "mapbox://styles/andyk1987/clnefgdzy01ze01qne2766ihi";
31
+ };
32
+ export declare const MAPBOX_CSS_HREF = "https://api.mapbox.com/mapbox-gl-js/v3.29.0/mapbox-gl.css";
33
+ export declare const COUNTRY_SYNONYMS: Record<string, string[]>;
34
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/map-chart/lib/constants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9E,MAAM,M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2
+ "city",
3
+ "county",
4
+ "state",
5
+ "province",
6
+ "region",
7
+ "country"
8
+ ];
9
+ const SANITIZE_KEY_PATTERN = /[^a-zA-Z0-9]/g;
10
+ const sanitizeKey = (key) => key.replace(SANITIZE_KEY_PATTERN, "_");
11
+ const GEOJSON_KEYS = {
12
+ city: {
13
+ name: "NAME_2",
14
+ code: "GID_0",
15
+ id: "GID_2",
16
+ county: "NAME_2",
17
+ state: "NAME_1",
18
+ country: "COUNTRY"
19
+ },
20
+ region: {
21
+ name: "name",
22
+ code: "iso_3166_2",
23
+ id: "iso_3166_2",
24
+ county: "name",
25
+ state: "name",
26
+ country: "admin"
27
+ },
28
+ county: {
29
+ name: "NAME_2",
30
+ code: "GID_0",
31
+ id: "GID_2",
32
+ county: "NAME_2",
33
+ state: "NAME_1",
34
+ country: "COUNTRY"
35
+ },
36
+ state: {
37
+ name: "NAME_1",
38
+ code: "GID_0",
39
+ id: "GID_1",
40
+ county: "NAME_2",
41
+ state: "NAME_1",
42
+ country: "COUNTRY"
43
+ },
44
+ country: {
45
+ name: "name",
46
+ code: "name",
47
+ id: "iso_a3",
48
+ county: "NAME_2",
49
+ state: "NAME_1",
50
+ country: "COUNTRY"
51
+ },
52
+ province: {
53
+ name: "name",
54
+ code: "iso_3166_2",
55
+ id: "iso_3166_2",
56
+ county: "name",
57
+ state: "name",
58
+ country: "admin"
59
+ }
60
+ };
61
+ const MAX_COLOR_RANGE = 7;
62
+ const DEFAULT_SPIKE_SIZES = [8, 12, 16, 22, 28, 34, 42, 54];
63
+ const DEFAULT_BUBBLES_RADIUS = [10, 15, 20, 25, 30, 35, 40, 45];
64
+ const SPIKE_HEIGHTS = [15, 25, 35, 40, 55, 70, 85, 100];
65
+ const BUBBLE_RADIUS_STEPS = [10, 15, 20, 25, 30, 35, 40];
66
+ const FALLBACK_FILL = "#DADAE1";
67
+ const UNMATCHED_FILL = "rgba(72, 70, 91, 0.15)";
68
+ const MAX_SPIKES = 200;
69
+ const LAYER_ORDER = {
70
+ choropleth: 0,
71
+ bubbles: 1,
72
+ spike: 2,
73
+ markers: 3
74
+ };
75
+ const MAP_STYLES = {
76
+ light: "mapbox://styles/andyk1987/cm1kvt8ib00ie01pi1lty0ey4",
77
+ dark: "mapbox://styles/flc-designers/cm7j7z28n00ov01ryahkd2jqj",
78
+ terrain: "mapbox://styles/andyk1987/clnefgdzy01ze01qne2766ihi"
79
+ };
80
+ const MAPBOX_CSS_HREF = "https://api.mapbox.com/mapbox-gl-js/v3.29.0/mapbox-gl.css";
81
+ const COUNTRY_SYNONYMS = {
82
+ "United States of America": ["United States", "USA", "US"],
83
+ "United Republic of Tanzania": ["Tanzania"],
84
+ "Hong Kong S.A.R.": ["Hong Kong"],
85
+ "Ivory Coast": ["Côte d'Ivoire", "Cote d'Ivoire"],
86
+ "Cape Verde": ["Cabo Verde"],
87
+ "Republic of the Congo": ["Congo", "Congo-Brazzaville"],
88
+ "Democratic Republic of the Congo": ["DR Congo", "DRC", "Congo (Kinshasa)"],
89
+ "West Bank": ["Palestine", "State of Palestine"],
90
+ "Caribbean Netherlands": ["Netherlands"],
91
+ "The Bahamas": ["Bahamas"],
92
+ "Republic of Serbia": ["Serbia"],
93
+ Macedonia: ["North Macedonia"],
94
+ "East Timor": ["Timor-Leste", "Timor Leste"],
95
+ "Federated States of Micronesia": ["Micronesia"],
96
+ "Guinea Bissau": ["Guinea-Bissau"],
97
+ Swaziland: ["Eswatini"],
98
+ "Czech Republic": ["Czechia"],
99
+ "South Korea": ["Korea, Rep.", "Republic of Korea"],
100
+ "North Korea": ["Korea, North", "DPRK"],
101
+ Burma: ["Myanmar"],
102
+ "United Kingdom": ["UK", "Great Britain"]
103
+ };
104
+ export {
105
+ BUBBLE_RADIUS_STEPS,
106
+ COUNTRY_SYNONYMS,
107
+ DEFAULT_BUBBLES_RADIUS,
108
+ DEFAULT_SPIKE_SIZES,
109
+ FALLBACK_FILL,
110
+ GEOJSON_KEYS,
111
+ LAYER_ORDER,
112
+ MAPBOX_CSS_HREF,
113
+ MAP_ADMIN_TYPES,
114
+ MAP_STYLES,
115
+ MAX_COLOR_RANGE,
116
+ MAX_SPIKES,
117
+ SANITIZE_KEY_PATTERN,
118
+ SPIKE_HEIGHTS,
119
+ UNMATCHED_FILL,
120
+ sanitizeKey
121
+ };
122
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/components/map-chart/lib/constants.ts"],"sourcesContent":["export type MapVisualisation = 'choropleth' | 'bubbles' | 'spike' | 'markers';\n\nexport type MapAdminType = 'city' | 'county' | 'state' | 'country' | 'province' | 'region';\n\nexport interface RegionKeys {\n name: string;\n id: string;\n code: string;\n county: string;\n state: string;\n country: string;\n}\n\nexport const MAP_ADMIN_TYPES: MapAdminType[] = [\n 'city',\n 'county',\n 'state',\n 'province',\n 'region',\n 'country',\n];\n\nexport const SANITIZE_KEY_PATTERN = /[^a-zA-Z0-9]/g;\nexport const SANITIZE_ID_PATTERN = /[^a-zA-Z0-9_-]/g;\n\nexport const sanitizeKey = (key: string): string => key.replace(SANITIZE_KEY_PATTERN, '_');\n\nexport const sanitizeId = (id: string): string => id.replace(SANITIZE_ID_PATTERN, '_');\n\n/** Vendored from client MapBox/constants.ts — keep in lockstep with mcp-ui geojsonKeys. */\nexport const GEOJSON_KEYS: Record<MapAdminType, RegionKeys> = {\n city: {\n name: 'NAME_2',\n code: 'GID_0',\n id: 'GID_2',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n region: {\n name: 'name',\n code: 'iso_3166_2',\n id: 'iso_3166_2',\n county: 'name',\n state: 'name',\n country: 'admin',\n },\n county: {\n name: 'NAME_2',\n code: 'GID_0',\n id: 'GID_2',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n state: {\n name: 'NAME_1',\n code: 'GID_0',\n id: 'GID_1',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n country: {\n name: 'name',\n code: 'name',\n id: 'iso_a3',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n province: {\n name: 'name',\n code: 'iso_3166_2',\n id: 'iso_3166_2',\n county: 'name',\n state: 'name',\n country: 'admin',\n },\n};\n\nexport const MAX_COLOR_RANGE = 7;\nexport const DEFAULT_SPIKE_SIZES = [8, 12, 16, 22, 28, 34, 42, 54];\nexport const DEFAULT_BUBBLES_RADIUS = [10, 15, 20, 25, 30, 35, 40, 45];\nexport const SPIKE_HEIGHTS = [15, 25, 35, 40, 55, 70, 85, 100];\nexport const BUBBLE_RADIUS_STEPS = [10, 15, 20, 25, 30, 35, 40];\nexport const FALLBACK_FILL = '#DADAE1';\nexport const UNMATCHED_FILL = 'rgba(72, 70, 91, 0.15)';\nexport const MAX_SPIKES = 200;\n\nexport const LAYER_ORDER: Record<MapVisualisation, number> = {\n choropleth: 0,\n bubbles: 1,\n spike: 2,\n markers: 3,\n};\n\nexport const MAP_STYLES = {\n light: 'mapbox://styles/andyk1987/cm1kvt8ib00ie01pi1lty0ey4',\n dark: 'mapbox://styles/flc-designers/cm7j7z28n00ov01ryahkd2jqj',\n terrain: 'mapbox://styles/andyk1987/clnefgdzy01ze01qne2766ihi',\n} as const;\n\nexport const MAPBOX_CSS_HREF = 'https://api.mapbox.com/mapbox-gl-js/v3.29.0/mapbox-gl.css';\n\nexport const COUNTRY_SYNONYMS: Record<string, string[]> = {\n 'United States of America': ['United States', 'USA', 'US'],\n 'United Republic of Tanzania': ['Tanzania'],\n 'Hong Kong S.A.R.': ['Hong Kong'],\n 'Ivory Coast': [\"Côte d'Ivoire\", \"Cote d'Ivoire\"],\n 'Cape Verde': ['Cabo Verde'],\n 'Republic of the Congo': ['Congo', 'Congo-Brazzaville'],\n 'Democratic Republic of the Congo': ['DR Congo', 'DRC', 'Congo (Kinshasa)'],\n 'West Bank': ['Palestine', 'State of Palestine'],\n 'Caribbean Netherlands': ['Netherlands'],\n 'The Bahamas': ['Bahamas'],\n 'Republic of Serbia': ['Serbia'],\n Macedonia: ['North Macedonia'],\n 'East Timor': ['Timor-Leste', 'Timor Leste'],\n 'Federated States of Micronesia': ['Micronesia'],\n 'Guinea Bissau': ['Guinea-Bissau'],\n Swaziland: ['Eswatini'],\n 'Czech Republic': ['Czechia'],\n 'South Korea': ['Korea, Rep.', 'Republic of Korea'],\n 'North Korea': ['Korea, North', 'DPRK'],\n Burma: ['Myanmar'],\n 'United Kingdom': ['UK', 'Great Britain'],\n};\n"],"names":[],"mappings":"AAaO,MAAM,kBAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,uBAAuB;AAG7B,MAAM,cAAc,CAAC,QAAwB,IAAI,QAAQ,sBAAsB,GAAG;AAKlF,MAAM,eAAiD;AAAA,EAC5D,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAAA,EAEX,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAAA,EAEX,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAAA,EAEX,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAAA,EAEX,SAAS;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAAA,EAEX,UAAU;AAAA,IACR,MAAM;AAAA,IACN,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EACjC,WAAW,CAAC,UAAU;AAAA,EACtB,kBAAkB,CAAC,SAAS;AAAA,EAC5B,eAAe,CAAC,eAAe,mBAAmB;AAAA,EAClD,eAAe,CAAC,gBAAgB,MAAM;AAAA,EACtC,OAAO,CAAC,SAAS;AAAA,EACjB,kBAAkB,CAAC,MAAM,eAAe;AAC1C;"}
@@ -0,0 +1,12 @@
1
+ import { ColorRange, GeoJsonFeature, MapRow } from './types.js';
2
+ export declare function valuesOfRows(rows: MapRow[], valueKey: string): number[];
3
+ export declare function generateColorRanges(values: number[], colors?: string[]): ColorRange[];
4
+ export declare function rangesFromPaletteStops(stops: number[], colors: string[]): ColorRange[];
5
+ export declare function colorForValue(value: number, ranges: ColorRange[]): string;
6
+ export declare function featureBBox(feature: GeoJsonFeature): [number, number, number, number] | null;
7
+ export declare function featureCenter(feature: GeoJsonFeature): {
8
+ lng: number;
9
+ lat: number;
10
+ } | null;
11
+ export declare function collectionBBox(features: GeoJsonFeature[]): [number, number, number, number] | null;
12
+ //# sourceMappingURL=domain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../../src/components/map-chart/lib/domain.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAErE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAMvE;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EAAE,EAChB,MAAM,GAAE,MAAM,EAAsB,GACnC,UAAU,EAAE,CAgBd;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,CAUtF;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAQzE;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CA0B5F;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI1F;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,cAAc,EAAE,GACzB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAgBzC"}
@@ -0,0 +1,105 @@
1
+ import { SEQUENTIAL_1, generateBreakPoints } from "../../../utils/fuse-palette.js";
2
+ import { SPIKE_HEIGHTS, DEFAULT_SPIKE_SIZES, DEFAULT_BUBBLES_RADIUS, MAX_COLOR_RANGE, FALLBACK_FILL } from "./constants.js";
3
+ import { numericValue } from "./format.js";
4
+ function valuesOfRows(rows, valueKey) {
5
+ const values = [];
6
+ for (const row of rows) {
7
+ values.push(numericValue(row[valueKey]));
8
+ }
9
+ return values;
10
+ }
11
+ function generateColorRanges(values, colors = [...SEQUENTIAL_1]) {
12
+ if (!colors.length || !values.length) return [];
13
+ const sortedValues = [...new Set(values)].sort((a, b) => a - b);
14
+ const steps = generateBreakPoints(sortedValues, MAX_COLOR_RANGE);
15
+ if (!steps.length) return [];
16
+ return steps.map((start, index) => {
17
+ const end = index === steps.length - 1 ? start * 3 : steps[index + 1] ?? start;
18
+ return {
19
+ start: Number(start),
20
+ end: Number(end),
21
+ color: colors[index] ?? colors[colors.length - 1] ?? SEQUENTIAL_1[0],
22
+ radius: DEFAULT_BUBBLES_RADIUS[index] ?? 0,
23
+ height: SPIKE_HEIGHTS[index] ?? DEFAULT_SPIKE_SIZES[index] ?? 0
24
+ };
25
+ });
26
+ }
27
+ function rangesFromPaletteStops(stops, colors) {
28
+ if (stops.length < 2 || !colors.length) return [];
29
+ const sorted = [...stops].sort((a, b) => a - b);
30
+ return sorted.slice(0, -1).map((start, idx) => ({
31
+ start,
32
+ end: sorted[idx + 1] ?? start,
33
+ color: colors[idx % colors.length],
34
+ radius: DEFAULT_BUBBLES_RADIUS[idx] ?? 0,
35
+ height: DEFAULT_SPIKE_SIZES[idx] ?? 0
36
+ }));
37
+ }
38
+ function colorForValue(value, ranges) {
39
+ if (!ranges.length) return FALLBACK_FILL;
40
+ if (value < 0) return FALLBACK_FILL;
41
+ if (value === 0) return ranges[0].color;
42
+ const last = ranges[ranges.length - 1];
43
+ if (value > last.end) return last.color;
44
+ const hit = ranges.find((range) => value >= range.start && value <= range.end);
45
+ return (hit == null ? void 0 : hit.color) ?? ranges[0].color;
46
+ }
47
+ function featureBBox(feature) {
48
+ var _a;
49
+ const coords = [];
50
+ const walk = (value) => {
51
+ if (!Array.isArray(value)) return;
52
+ if (typeof value[0] === "number" && typeof value[1] === "number") {
53
+ coords.push(value);
54
+ return;
55
+ }
56
+ for (const item of value) walk(item);
57
+ };
58
+ walk((_a = feature.geometry) == null ? void 0 : _a.coordinates);
59
+ if (!coords.length) return null;
60
+ let minLng = Infinity;
61
+ let minLat = Infinity;
62
+ let maxLng = -Infinity;
63
+ let maxLat = -Infinity;
64
+ for (const [lng, lat] of coords) {
65
+ if (!Number.isFinite(lng) || !Number.isFinite(lat)) continue;
66
+ minLng = Math.min(minLng, lng);
67
+ minLat = Math.min(minLat, lat);
68
+ maxLng = Math.max(maxLng, lng);
69
+ maxLat = Math.max(maxLat, lat);
70
+ }
71
+ if (!Number.isFinite(minLng)) return null;
72
+ return [minLng, minLat, maxLng, maxLat];
73
+ }
74
+ function featureCenter(feature) {
75
+ const box = featureBBox(feature);
76
+ if (!box) return null;
77
+ return { lng: (box[0] + box[2]) / 2, lat: (box[1] + box[3]) / 2 };
78
+ }
79
+ function collectionBBox(features) {
80
+ let minLng = Infinity;
81
+ let minLat = Infinity;
82
+ let maxLng = -Infinity;
83
+ let maxLat = -Infinity;
84
+ let any = false;
85
+ for (const feature of features) {
86
+ const box = featureBBox(feature);
87
+ if (!box) continue;
88
+ any = true;
89
+ minLng = Math.min(minLng, box[0]);
90
+ minLat = Math.min(minLat, box[1]);
91
+ maxLng = Math.max(maxLng, box[2]);
92
+ maxLat = Math.max(maxLat, box[3]);
93
+ }
94
+ return any ? [minLng, minLat, maxLng, maxLat] : null;
95
+ }
96
+ export {
97
+ collectionBBox,
98
+ colorForValue,
99
+ featureBBox,
100
+ featureCenter,
101
+ generateColorRanges,
102
+ rangesFromPaletteStops,
103
+ valuesOfRows
104
+ };
105
+ //# sourceMappingURL=domain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain.js","sources":["../../../../src/components/map-chart/lib/domain.ts"],"sourcesContent":["import { generateBreakPoints, SEQUENTIAL_1 } from '../../../utils/fuse-palette.js';\n\nimport {\n DEFAULT_BUBBLES_RADIUS,\n DEFAULT_SPIKE_SIZES,\n FALLBACK_FILL,\n MAX_COLOR_RANGE,\n SPIKE_HEIGHTS,\n} from './constants.js';\nimport { numericValue } from './format.js';\nimport type { ColorRange, GeoJsonFeature, MapRow } from './types.js';\n\nexport function valuesOfRows(rows: MapRow[], valueKey: string): number[] {\n const values: number[] = [];\n for (const row of rows) {\n values.push(numericValue(row[valueKey]));\n }\n return values;\n}\n\nexport function generateColorRanges(\n values: number[],\n colors: string[] = [...SEQUENTIAL_1],\n): ColorRange[] {\n if (!colors.length || !values.length) return [];\n const sortedValues = [...new Set(values)].sort((a, b) => a - b);\n const steps = generateBreakPoints(sortedValues, MAX_COLOR_RANGE);\n if (!steps.length) return [];\n\n return steps.map((start, index) => {\n const end = index === steps.length - 1 ? start * 3 : (steps[index + 1] ?? start);\n return {\n start: Number(start),\n end: Number(end),\n color: colors[index] ?? colors[colors.length - 1] ?? SEQUENTIAL_1[0],\n radius: DEFAULT_BUBBLES_RADIUS[index] ?? 0,\n height: SPIKE_HEIGHTS[index] ?? DEFAULT_SPIKE_SIZES[index] ?? 0,\n };\n });\n}\n\nexport function rangesFromPaletteStops(stops: number[], colors: string[]): ColorRange[] {\n if (stops.length < 2 || !colors.length) return [];\n const sorted = [...stops].sort((a, b) => a - b);\n return sorted.slice(0, -1).map((start, idx) => ({\n start,\n end: sorted[idx + 1] ?? start,\n color: colors[idx % colors.length],\n radius: DEFAULT_BUBBLES_RADIUS[idx] ?? 0,\n height: DEFAULT_SPIKE_SIZES[idx] ?? 0,\n }));\n}\n\nexport function colorForValue(value: number, ranges: ColorRange[]): string {\n if (!ranges.length) return FALLBACK_FILL;\n if (value < 0) return FALLBACK_FILL;\n if (value === 0) return ranges[0].color;\n const last = ranges[ranges.length - 1];\n if (value > last.end) return last.color;\n const hit = ranges.find((range) => value >= range.start && value <= range.end);\n return hit?.color ?? ranges[0].color;\n}\n\nexport function featureBBox(feature: GeoJsonFeature): [number, number, number, number] | null {\n const coords: number[][] = [];\n const walk = (value: unknown): void => {\n if (!Array.isArray(value)) return;\n if (typeof value[0] === 'number' && typeof value[1] === 'number') {\n coords.push(value as number[]);\n return;\n }\n for (const item of value) walk(item);\n };\n walk(feature.geometry?.coordinates);\n if (!coords.length) return null;\n\n let minLng = Infinity;\n let minLat = Infinity;\n let maxLng = -Infinity;\n let maxLat = -Infinity;\n for (const [lng, lat] of coords) {\n if (!Number.isFinite(lng) || !Number.isFinite(lat)) continue;\n minLng = Math.min(minLng, lng);\n minLat = Math.min(minLat, lat);\n maxLng = Math.max(maxLng, lng);\n maxLat = Math.max(maxLat, lat);\n }\n if (!Number.isFinite(minLng)) return null;\n return [minLng, minLat, maxLng, maxLat];\n}\n\nexport function featureCenter(feature: GeoJsonFeature): { lng: number; lat: number } | null {\n const box = featureBBox(feature);\n if (!box) return null;\n return { lng: (box[0] + box[2]) / 2, lat: (box[1] + box[3]) / 2 };\n}\n\nexport function collectionBBox(\n features: GeoJsonFeature[],\n): [number, number, number, number] | null {\n let minLng = Infinity;\n let minLat = Infinity;\n let maxLng = -Infinity;\n let maxLat = -Infinity;\n let any = false;\n for (const feature of features) {\n const box = featureBBox(feature);\n if (!box) continue;\n any = true;\n minLng = Math.min(minLng, box[0]);\n minLat = Math.min(minLat, box[1]);\n maxLng = Math.max(maxLng, box[2]);\n maxLat = Math.max(maxLat, box[3]);\n }\n return any ? [minLng, minLat, maxLng, maxLat] : null;\n}\n"],"names":[],"mappings":";;;AAYO,SAAS,aAAa,MAAgB,UAA4B;AACvE,QAAM,SAAmB,CAAA;AACzB,aAAW,OAAO,MAAM;AACtB,WAAO,KAAK,aAAa,IAAI,QAAQ,CAAC,CAAC;AAAA,EACzC;AACA,SAAO;AACT;AAEO,SAAS,oBACd,QACA,SAAmB,CAAC,GAAG,YAAY,GACrB;AACd,MAAI,CAAC,OAAO,UAAU,CAAC,OAAO,eAAe,CAAA;AAC7C,QAAM,eAAe,CAAC,GAAG,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,IAAI,CAAC;AAC9D,QAAM,QAAQ,oBAAoB,cAAc,eAAe;AAC/D,MAAI,CAAC,MAAM,OAAQ,QAAO,CAAA;AAE1B,SAAO,MAAM,IAAI,CAAC,OAAO,UAAU;AACjC,UAAM,MAAM,UAAU,MAAM,SAAS,IAAI,QAAQ,IAAK,MAAM,QAAQ,CAAC,KAAK;AAC1E,WAAO;AAAA,MACL,OAAO,OAAO,KAAK;AAAA,MACnB,KAAK,OAAO,GAAG;AAAA,MACf,OAAO,OAAO,KAAK,KAAK,OAAO,OAAO,SAAS,CAAC,KAAK,aAAa,CAAC;AAAA,MACnE,QAAQ,uBAAuB,KAAK,KAAK;AAAA,MACzC,QAAQ,cAAc,KAAK,KAAK,oBAAoB,KAAK,KAAK;AAAA,IAAA;AAAA,EAElE,CAAC;AACH;AAEO,SAAS,uBAAuB,OAAiB,QAAgC;AACtF,MAAI,MAAM,SAAS,KAAK,CAAC,OAAO,eAAe,CAAA;AAC/C,QAAM,SAAS,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,I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;AAC7B,aAAS,KAAK,IAAI,QAAQ,GAAG;AAC7B,aAAS,KAAK,IAAI,QAAQ,GAAG;AAC7B,aAAS,KAAK,IAAI,QAAQ,GAAG;AAAA,EAC/B;AACA,MAAI,CAAC,OAAO,SAAS,MAAM,EAAG,QAAO;AACrC,SAAO,CAAC,QAAQ,QAAQ,QAAQ,MAAM;AACxC;AAEO,SAAS,cAAc,SAA8D;AAC1F,QAAM,MAAM,YAAY,OAAO;AAC/B,MAAI,CAAC,IAAK,QAAO;AACjB,SAAO,EAAE,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,EAAA;AAChE;AAEO,SAAS,eACd,UACyC;AACzC,MAAI,SAAS;AACb,MAAI,SAAS;AACb,MAAI,SAAS;AACb,MAAI,SAAS;AACb,MAAI,MAAM;AACV,aAAW,WAAW,UAAU;AAC9B,UAAM,MAAM,YAAY,OAAO;AAC/B,QAAI,CAAC,IAAK;AACV,UAAM;AACN,aAAS,KAAK,IAAI,QAAQ,IAAI,CAAC,CAAC;AAChC,aAAS,KAAK,IAAI,QAAQ,IAAI,CAAC,CAAC;AAChC,aAAS,KAAK,IAAI,QAAQ,IAAI,CAAC,CAAC;AAChC,aAAS,KAAK,IAAI,QAAQ,IAAI,CAAC,CAAC;AAAA,EAClC;AACA,SAAO,MAAM,CAAC,QAAQ,QAAQ,QAAQ,MAAM,IAAI;AAClD;"}
@@ -0,0 +1,8 @@
1
+ import { ColorRange } from './types.js';
2
+ export declare function hexToRgba(hex: string, alpha?: number): string;
3
+ /** Mirrors client `darkenColor` — blend hex toward black (amount 0–1). */
4
+ export declare function darkenColor(hex: string, amount: number): string;
5
+ export declare function formatMapValue(value: number): string;
6
+ export declare function formatRangeLabel(range: ColorRange): string;
7
+ export declare function numericValue(raw: unknown): number;
8
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/components/map-chart/lib/format.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,MAAM,CAcxD;AAED,0EAA0E;AAC1E,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAgB/D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAE1D;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAQjD"}
@@ -0,0 +1,45 @@
1
+ import { formatCompactNumber } from "../../../utils/fusedash-visual.js";
2
+ import { FALLBACK_FILL } from "./constants.js";
3
+ function hexToRgba(hex, alpha = 1) {
4
+ let clean = hex.replace("#", "").trim();
5
+ if (clean.length === 3) {
6
+ clean = clean.split("").map((c) => c + c).join("");
7
+ }
8
+ if (clean.length === 8) clean = clean.slice(0, 6);
9
+ if (!/^[0-9A-Fa-f]{6}$/.test(clean)) return hex.startsWith("rgb") ? hex : FALLBACK_FILL;
10
+ const r = parseInt(clean.slice(0, 2), 16);
11
+ const g = parseInt(clean.slice(2, 4), 16);
12
+ const b = parseInt(clean.slice(4, 6), 16);
13
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
14
+ }
15
+ function darkenColor(hex, amount) {
16
+ let clean = hex.replace("#", "");
17
+ if (clean.length === 3) {
18
+ clean = clean.split("").map((c) => c + c).join("");
19
+ }
20
+ if (!/^[0-9A-Fa-f]{6}$/.test(clean)) return hex;
21
+ const t = Math.max(0, Math.min(1, amount));
22
+ const r = Math.round(parseInt(clean.slice(0, 2), 16) * (1 - t));
23
+ const g = Math.round(parseInt(clean.slice(2, 4), 16) * (1 - t));
24
+ const b = Math.round(parseInt(clean.slice(4, 6), 16) * (1 - t));
25
+ return `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b.toString(16).padStart(2, "0")}`;
26
+ }
27
+ function formatMapValue(value) {
28
+ return formatCompactNumber(value);
29
+ }
30
+ function numericValue(raw) {
31
+ if (typeof raw === "number" && Number.isFinite(raw)) return raw;
32
+ if (typeof raw === "string") {
33
+ const n2 = parseFloat(raw);
34
+ return Number.isFinite(n2) ? n2 : 0;
35
+ }
36
+ const n = Number(raw ?? 0);
37
+ return Number.isFinite(n) ? n : 0;
38
+ }
39
+ export {
40
+ darkenColor,
41
+ formatMapValue,
42
+ hexToRgba,
43
+ numericValue
44
+ };
45
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sources":["../../../../src/components/map-chart/lib/format.ts"],"sourcesContent":["import { formatCompactNumber } from '../../../utils/fusedash-visual.js';\n\nimport { FALLBACK_FILL } from './constants.js';\nimport type { ColorRange } from './types.js';\n\nexport function hexToRgba(hex: string, alpha = 1): string {\n let clean = hex.replace('#', '').trim();\n if (clean.length === 3) {\n clean = clean\n .split('')\n .map((c) => c + c)\n .join('');\n }\n if (clean.length === 8) clean = clean.slice(0, 6);\n if (!/^[0-9A-Fa-f]{6}$/.test(clean)) return hex.startsWith('rgb') ? hex : FALLBACK_FILL;\n const r = parseInt(clean.slice(0, 2), 16);\n const g = parseInt(clean.slice(2, 4), 16);\n const b = parseInt(clean.slice(4, 6), 16);\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n}\n\n/** Mirrors client `darkenColor` — blend hex toward black (amount 0–1). */\nexport function darkenColor(hex: string, amount: number): string {\n let clean = hex.replace('#', '');\n if (clean.length === 3) {\n clean = clean\n .split('')\n .map((c) => c + c)\n .join('');\n }\n if (!/^[0-9A-Fa-f]{6}$/.test(clean)) return hex;\n const t = Math.max(0, Math.min(1, amount));\n const r = Math.round(parseInt(clean.slice(0, 2), 16) * (1 - t));\n const g = Math.round(parseInt(clean.slice(2, 4), 16) * (1 - t));\n const b = Math.round(parseInt(clean.slice(4, 6), 16) * (1 - t));\n return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b\n .toString(16)\n .padStart(2, '0')}`;\n}\n\nexport function formatMapValue(value: number): string {\n return formatCompactNumber(value);\n}\n\nexport function formatRangeLabel(range: ColorRange): string {\n return `${formatCompactNumber(range.start)}–${formatCompactNumber(range.end)}`;\n}\n\nexport function numericValue(raw: unknown): number {\n if (typeof raw === 'number' && Number.isFinite(raw)) return raw;\n if (typeof raw === 'string') {\n const n = parseFloat(raw);\n return Number.isFinite(n) ? n : 0;\n }\n const n = Number(raw ?? 0);\n return Number.isFinite(n) ? n : 0;\n}\n"],"names":["n"],"mappings":";;AAKO,SAAS,UAAU,KAAa,QAAQ,GAAW;AACxD,MAAI,QAAQ,IAAI,QAAQ,KAAK,EAAE,EAAE,KAAA;AACjC,MAAI,MAAM,WAAW,GAAG;AACtB,YAAQ,MACL,MAAM,EAAE,EACR,IAAI,CAAC,MAAM,IAAI,CAAC,EAChB,KAAK,EAAE;AAAA,EACZ;AACA,MAAI,MAAM,WAAW,WAAW,MAAM,MAAM,GAAG,CAAC;AAChD,MAAI,CAAC,mBAAmB,KAAK,KAAK,UAAU,IAAI,WAAW,KAAK,IAAI,MAAM;AAC1E,QAAM,IAAI,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE;AACxC,QAAM,IAAI,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE;AACxC,QAAM,IAAI,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE;AACxC,SAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK;AACxC;AAGO,SAAS,YAAY,KAAa,QAAwB;AAC/D,MAAI,QAAQ,IAAI,QAAQ,KAAK,EAAE;AAC/B,MAAI,MAAM,WAAW,GAAG;AACtB,YAAQ,MACL,MAAM,EAAE,EACR,IAAI,CAAC,MAAM,IAAI,CAAC,EAChB,KAAK,EAAE;AAAA,EACZ;AACA,MAAI,CAAC,mBAAmB,KAAK,KAAK,EAAG,QAAO;AAC5C,QAAM,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,MAAM,CAAC;AACzC,QAAM,IAAI,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE;AAC9D,QAAM,IAAI,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE;AAC9D,QAAM,IAAI,KAAK,MAAM,SAAS,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,KAAK,IAAI,EAAE;AAC9D,SAAO,IAAI,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,GAAG,EAC5E,SAAS,EAAE,EACX,SAAS,GAAG,GAAG,CAAC;AACrB;AAEO,SAAS,eAAe,OAAuB;AACpD,SAAO,oBAAoB,KAAK;AAClC;AAMO,SAAS,aAAa,KAAsB;AACjD,MAAI,OAAO,QAAQ,YAAY,OAAO,SAAS,GAAG,EAAG,QAAO;AAC5D,MAAI,OAAO,QAAQ,UAAU;AAC3B,UAAMA,KAAI,WAAW,GAAG;AACxB,WAAO,OAAO,SAASA,EAAC,IAAIA,KAAI;AAAA,EAClC;AACA,QAAM,IAAI,OAAO,OAAO,CAAC;AACzB,SAAO,OAAO,SAAS,CAAC,IAAI,IAAI;AAClC;"}
@@ -0,0 +1,7 @@
1
+ import { FeaturesIndex, GeoJsonFeature } from './types.js';
2
+ export declare function inferMapTypeFromKeyNames(dataKeys: string[]): string | undefined;
3
+ export declare function normalizeDataValue(dataValue: string, mapType: string): string;
4
+ export declare function getRegionIdFromFeatureProperties(featureProperties: Record<string, unknown> | null | undefined, mapType?: string): string | undefined;
5
+ export declare function createFeaturesIndex(features: GeoJsonFeature[], mapType: string): FeaturesIndex;
6
+ export declare function getRegionId(dataValue: string, mapType: string, index: FeaturesIndex): string | undefined;
7
+ //# sourceMappingURL=geo-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-index.d.ts","sourceRoot":"","sources":["../../../../src/components/map-chart/lib/geo-index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAWhE,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAO/E;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CA+B7E;AAED,wBAAgB,gCAAgC,CAC9C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EAC7D,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,GAAG,SAAS,CAapB;AAwDD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,CAwG9F;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAoBxG"}
@@ -0,0 +1,200 @@
1
+ import { COUNTRY_SYNONYMS, GEOJSON_KEYS, MAP_ADMIN_TYPES } from "./constants.js";
2
+ const CITY_NAME_VARIATIONS = {
3
+ kyiv: "kiev",
4
+ peking: "beijing",
5
+ bombay: "mumbai",
6
+ calcutta: "kolkata",
7
+ madras: "chennai",
8
+ saigon: "hochiminh"
9
+ };
10
+ function inferMapTypeFromKeyNames(dataKeys) {
11
+ for (const key of dataKeys ?? []) {
12
+ const name = String(key).toLowerCase();
13
+ const found = MAP_ADMIN_TYPES.find((type) => name.includes(type));
14
+ if (found) return found;
15
+ }
16
+ return void 0;
17
+ }
18
+ function normalizeDataValue(dataValue, mapType) {
19
+ if (!dataValue) return "";
20
+ let normalized = dataValue.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
21
+ normalized = normalized.replace(/\bst\.?\s+/g, "saint ");
22
+ if (mapType !== "city") {
23
+ normalized = normalized.replace(/['’´`.-]/g, " ");
24
+ }
25
+ if (mapType === "city") {
26
+ normalized = normalized.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[''`´]/g, "").replace(/[-_]/g, "");
27
+ for (const [from, to] of Object.entries(CITY_NAME_VARIATIONS)) {
28
+ normalized = normalized.replace(new RegExp(`\\b${from}\\b`, "g"), to);
29
+ }
30
+ }
31
+ if (mapType === "country") return normalized;
32
+ const parts = normalized.replace(/ /g, "").split(",");
33
+ if (mapType === "county") {
34
+ return parts.map((item) => item.replace("county", "")).join(",");
35
+ }
36
+ return parts.join(",");
37
+ }
38
+ function getRegionIdFromFeatureProperties(featureProperties, mapType) {
39
+ if (!featureProperties || !mapType) return void 0;
40
+ const keys = GEOJSON_KEYS[mapType];
41
+ if (!keys) return void 0;
42
+ if (mapType === "country") {
43
+ const iso = featureProperties[keys.id];
44
+ if (iso === "-99") return String(featureProperties.adm0_a3 ?? iso);
45
+ return iso != null ? String(iso) : void 0;
46
+ }
47
+ const id = featureProperties[keys.id];
48
+ return id != null && String(id) !== "" ? String(id) : void 0;
49
+ }
50
+ function getDataValueFromFeature(feature, mapType) {
51
+ const props = feature.properties;
52
+ if (!props) return void 0;
53
+ const keys = GEOJSON_KEYS[mapType];
54
+ if (!keys) return void 0;
55
+ const getProp = (field) => {
56
+ const value = props[keys[field]];
57
+ return typeof value === "string" && value ? value : void 0;
58
+ };
59
+ const buildComposite = (parts, fallbackKey) => {
60
+ const values = parts.map(getProp);
61
+ return values.every((v) => v) ? values.join(",") : getProp(fallbackKey);
62
+ };
63
+ switch (mapType) {
64
+ case "city": {
65
+ const country = getProp("country");
66
+ const state = getProp("state");
67
+ const name = getProp("name");
68
+ if (country && state && name) return `${country},${state},${name}`;
69
+ if (country && name) return `${country},${name}`;
70
+ return name;
71
+ }
72
+ case "county":
73
+ return buildComposite(["country", "state", "county"], "county");
74
+ case "state":
75
+ case "province":
76
+ return buildComposite(["country", "state"], "state");
77
+ case "country":
78
+ case "region":
79
+ return getProp("name");
80
+ default:
81
+ return void 0;
82
+ }
83
+ }
84
+ function indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType) {
85
+ const lower = alias.toLowerCase();
86
+ if (!byDataValue.has(lower)) byDataValue.set(lower, regionId);
87
+ const normalized = normalizeDataValue(alias, mapType);
88
+ if (!byNormalizedValue.has(normalized)) byNormalizedValue.set(normalized, regionId);
89
+ }
90
+ function createFeaturesIndex(features, mapType) {
91
+ const byId = /* @__PURE__ */ new Map();
92
+ const byDataValue = /* @__PURE__ */ new Map();
93
+ const byNormalizedValue = /* @__PURE__ */ new Map();
94
+ if (!features.length || !mapType) return { byId, byDataValue, byNormalizedValue };
95
+ const ambiguousTwoPartKeys = /* @__PURE__ */ new Set();
96
+ for (const feature of features) {
97
+ const regionId = getRegionIdFromFeatureProperties(feature.properties, mapType);
98
+ if (!regionId) continue;
99
+ byId.set(regionId, feature);
100
+ const dataValue = getDataValueFromFeature(feature, mapType);
101
+ if (!dataValue) continue;
102
+ const normalized = normalizeDataValue(dataValue, mapType);
103
+ byDataValue.set(dataValue.toLowerCase(), regionId);
104
+ byNormalizedValue.set(normalized, regionId);
105
+ const props = feature.properties;
106
+ if (!props) continue;
107
+ if (mapType === "city") {
108
+ const country = props.COUNTRY;
109
+ const state = props.NAME_1;
110
+ const cityName = props.NAME_2;
111
+ if (typeof country === "string" && typeof cityName === "string") {
112
+ const twoPart = normalizeDataValue(`${country},${cityName}`, mapType);
113
+ const existing = byNormalizedValue.get(twoPart);
114
+ if (existing && existing !== regionId) ambiguousTwoPartKeys.add(twoPart);
115
+ else byNormalizedValue.set(twoPart, regionId);
116
+ }
117
+ if (typeof country === "string" && typeof state === "string" && typeof cityName === "string" && state !== cityName) {
118
+ const stateFormat = normalizeDataValue(`${country},${state}`, mapType);
119
+ if (!byNormalizedValue.has(stateFormat)) byNormalizedValue.set(stateFormat, regionId);
120
+ }
121
+ }
122
+ if (mapType === "county") {
123
+ const country = props.COUNTRY;
124
+ const countyName = props.NAME_2;
125
+ if (typeof country === "string" && typeof countyName === "string") {
126
+ for (const countryForm of [country, ...COUNTRY_SYNONYMS[country] ?? []]) {
127
+ const twoPart = normalizeDataValue(`${countryForm},${countyName}`, mapType);
128
+ const existing = byNormalizedValue.get(twoPart);
129
+ if (existing && existing !== regionId) ambiguousTwoPartKeys.add(twoPart);
130
+ else byNormalizedValue.set(twoPart, regionId);
131
+ }
132
+ }
133
+ }
134
+ if (mapType === "region" || mapType === "province") {
135
+ const country = props.admin;
136
+ const regionName = props.name;
137
+ const unitNames = [regionName, props.name_en, ...String(props.aliases ?? "").split("|")].filter(
138
+ (n) => typeof n === "string" && n.length > 0
139
+ );
140
+ const countryForms = typeof country === "string" ? [country, ...COUNTRY_SYNONYMS[country] ?? []] : [];
141
+ for (const countryForm of countryForms) {
142
+ for (const unitName of unitNames) {
143
+ const composite = normalizeDataValue(`${countryForm},${unitName}`, mapType);
144
+ if (!byNormalizedValue.has(composite)) byNormalizedValue.set(composite, regionId);
145
+ }
146
+ }
147
+ for (const alias of [props.name_en, ...String(props.aliases ?? "").split("|")]) {
148
+ if (typeof alias !== "string" || !alias || alias === regionName) continue;
149
+ indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType);
150
+ }
151
+ }
152
+ if (mapType === "state" || mapType === "province") {
153
+ const keys = GEOJSON_KEYS[mapType];
154
+ const bareName = props[keys.state] ?? props[keys.name];
155
+ if (typeof bareName === "string" && bareName) {
156
+ indexAlias(byDataValue, byNormalizedValue, bareName, regionId, mapType);
157
+ }
158
+ }
159
+ if (mapType === "country") {
160
+ const aliases = [
161
+ props.name_long,
162
+ props.formal_en,
163
+ props.brk_name,
164
+ props.admin,
165
+ props.geounit,
166
+ ...String(props.aliases ?? "").split("|")
167
+ ];
168
+ for (const alias of aliases) {
169
+ if (typeof alias === "string" && alias && alias !== dataValue) {
170
+ indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType);
171
+ }
172
+ }
173
+ }
174
+ }
175
+ for (const key of ambiguousTwoPartKeys) byNormalizedValue.delete(key);
176
+ return { byId, byDataValue, byNormalizedValue };
177
+ }
178
+ function getRegionId(dataValue, mapType, index) {
179
+ var _a;
180
+ if (!dataValue || !mapType) return void 0;
181
+ const direct = index.byDataValue.get(dataValue.toLowerCase());
182
+ if (direct) return direct;
183
+ const normalized = index.byNormalizedValue.get(normalizeDataValue(dataValue, mapType));
184
+ if (normalized) return normalized;
185
+ if ((mapType === "region" || mapType === "province" || mapType === "county") && dataValue.includes(",")) {
186
+ const lastPart = (_a = dataValue.split(",").at(-1)) == null ? void 0 : _a.trim();
187
+ if (lastPart) {
188
+ return index.byDataValue.get(lastPart.toLowerCase()) ?? index.byNormalizedValue.get(normalizeDataValue(lastPart, mapType));
189
+ }
190
+ }
191
+ return void 0;
192
+ }
193
+ export {
194
+ createFeaturesIndex,
195
+ getRegionId,
196
+ getRegionIdFromFeatureProperties,
197
+ inferMapTypeFromKeyNames,
198
+ normalizeDataValue
199
+ };
200
+ //# sourceMappingURL=geo-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-index.js","sources":["../../../../src/components/map-chart/lib/geo-index.ts"],"sourcesContent":["import { COUNTRY_SYNONYMS, GEOJSON_KEYS, MAP_ADMIN_TYPES, type MapAdminType } from './constants.js';\nimport type { FeaturesIndex, GeoJsonFeature } from './types.js';\n\nconst CITY_NAME_VARIATIONS: Record<string, string> = {\n kyiv: 'kiev',\n peking: 'beijing',\n bombay: 'mumbai',\n calcutta: 'kolkata',\n madras: 'chennai',\n saigon: 'hochiminh',\n};\n\nexport function inferMapTypeFromKeyNames(dataKeys: string[]): string | undefined {\n for (const key of dataKeys ?? []) {\n const name = String(key).toLowerCase();\n const found = MAP_ADMIN_TYPES.find((type) => name.includes(type));\n if (found) return found;\n }\n return undefined;\n}\n\nexport function normalizeDataValue(dataValue: string, mapType: string): string {\n if (!dataValue) return '';\n\n let normalized = dataValue\n .toLowerCase()\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '');\n\n normalized = normalized.replace(/\\bst\\.?\\s+/g, 'saint ');\n if (mapType !== 'city') {\n normalized = normalized.replace(/['’´`.-]/g, ' ');\n }\n\n if (mapType === 'city') {\n normalized = normalized\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[''`´]/g, '')\n .replace(/[-_]/g, '');\n for (const [from, to] of Object.entries(CITY_NAME_VARIATIONS)) {\n normalized = normalized.replace(new RegExp(`\\\\b${from}\\\\b`, 'g'), to);\n }\n }\n\n if (mapType === 'country') return normalized;\n\n const parts = normalized.replace(/ /g, '').split(',');\n if (mapType === 'county') {\n return parts.map((item) => item.replace('county', '')).join(',');\n }\n return parts.join(',');\n}\n\nexport function getRegionIdFromFeatureProperties(\n featureProperties: Record<string, unknown> | null | undefined,\n mapType?: string,\n): string | undefined {\n if (!featureProperties || !mapType) return undefined;\n const keys = GEOJSON_KEYS[mapType as MapAdminType];\n if (!keys) return undefined;\n\n if (mapType === 'country') {\n const iso = featureProperties[keys.id];\n if (iso === '-99') return String(featureProperties.adm0_a3 ?? iso);\n return iso != null ? String(iso) : undefined;\n }\n\n const id = featureProperties[keys.id];\n return id != null && String(id) !== '' ? String(id) : undefined;\n}\n\nfunction getDataValueFromFeature(feature: GeoJsonFeature, mapType: string): string | undefined {\n const props = feature.properties;\n if (!props) return undefined;\n const keys = GEOJSON_KEYS[mapType as MapAdminType];\n if (!keys) return undefined;\n\n const getProp = (field: keyof typeof keys): string | undefined => {\n const value = props[keys[field]];\n return typeof value === 'string' && value ? value : undefined;\n };\n\n const buildComposite = (\n parts: Array<keyof typeof keys>,\n fallbackKey: keyof typeof keys,\n ): string | undefined => {\n const values = parts.map(getProp);\n return values.every((v) => v) ? values.join(',') : getProp(fallbackKey);\n };\n\n switch (mapType) {\n case 'city': {\n const country = getProp('country');\n const state = getProp('state');\n const name = getProp('name');\n if (country && state && name) return `${country},${state},${name}`;\n if (country && name) return `${country},${name}`;\n return name;\n }\n case 'county':\n return buildComposite(['country', 'state', 'county'], 'county');\n case 'state':\n case 'province':\n return buildComposite(['country', 'state'], 'state');\n case 'country':\n case 'region':\n return getProp('name');\n default:\n return undefined;\n }\n}\n\nfunction indexAlias(\n byDataValue: Map<string, string>,\n byNormalizedValue: Map<string, string>,\n alias: string,\n regionId: string,\n mapType: string,\n): void {\n const lower = alias.toLowerCase();\n if (!byDataValue.has(lower)) byDataValue.set(lower, regionId);\n const normalized = normalizeDataValue(alias, mapType);\n if (!byNormalizedValue.has(normalized)) byNormalizedValue.set(normalized, regionId);\n}\n\nexport function createFeaturesIndex(features: GeoJsonFeature[], mapType: string): FeaturesIndex {\n const byId = new Map<string, GeoJsonFeature>();\n const byDataValue = new Map<string, string>();\n const byNormalizedValue = new Map<string, string>();\n if (!features.length || !mapType) return { byId, byDataValue, byNormalizedValue };\n\n const ambiguousTwoPartKeys = new Set<string>();\n\n for (const feature of features) {\n const regionId = getRegionIdFromFeatureProperties(feature.properties, mapType);\n if (!regionId) continue;\n byId.set(regionId, feature);\n\n const dataValue = getDataValueFromFeature(feature, mapType);\n if (!dataValue) continue;\n\n const normalized = normalizeDataValue(dataValue, mapType);\n byDataValue.set(dataValue.toLowerCase(), regionId);\n byNormalizedValue.set(normalized, regionId);\n\n const props = feature.properties;\n if (!props) continue;\n\n if (mapType === 'city') {\n const country = props.COUNTRY;\n const state = props.NAME_1;\n const cityName = props.NAME_2;\n if (typeof country === 'string' && typeof cityName === 'string') {\n const twoPart = normalizeDataValue(`${country},${cityName}`, mapType);\n const existing = byNormalizedValue.get(twoPart);\n if (existing && existing !== regionId) ambiguousTwoPartKeys.add(twoPart);\n else byNormalizedValue.set(twoPart, regionId);\n }\n if (\n typeof country === 'string' &&\n typeof state === 'string' &&\n typeof cityName === 'string' &&\n state !== cityName\n ) {\n const stateFormat = normalizeDataValue(`${country},${state}`, mapType);\n if (!byNormalizedValue.has(stateFormat)) byNormalizedValue.set(stateFormat, regionId);\n }\n }\n\n if (mapType === 'county') {\n const country = props.COUNTRY;\n const countyName = props.NAME_2;\n if (typeof country === 'string' && typeof countyName === 'string') {\n for (const countryForm of [country, ...(COUNTRY_SYNONYMS[country] ?? [])]) {\n const twoPart = normalizeDataValue(`${countryForm},${countyName}`, mapType);\n const existing = byNormalizedValue.get(twoPart);\n if (existing && existing !== regionId) ambiguousTwoPartKeys.add(twoPart);\n else byNormalizedValue.set(twoPart, regionId);\n }\n }\n }\n\n if (mapType === 'region' || mapType === 'province') {\n const country = props.admin;\n const regionName = props.name;\n const unitNames = [regionName, props.name_en, ...String(props.aliases ?? '').split('|')].filter(\n (n): n is string => typeof n === 'string' && n.length > 0,\n );\n const countryForms =\n typeof country === 'string' ? [country, ...(COUNTRY_SYNONYMS[country] ?? [])] : [];\n for (const countryForm of countryForms) {\n for (const unitName of unitNames) {\n const composite = normalizeDataValue(`${countryForm},${unitName}`, mapType);\n if (!byNormalizedValue.has(composite)) byNormalizedValue.set(composite, regionId);\n }\n }\n for (const alias of [props.name_en, ...String(props.aliases ?? '').split('|')]) {\n if (typeof alias !== 'string' || !alias || alias === regionName) continue;\n indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType);\n }\n }\n\n if (mapType === 'state' || mapType === 'province') {\n const keys = GEOJSON_KEYS[mapType];\n const bareName = props[keys.state] ?? props[keys.name];\n if (typeof bareName === 'string' && bareName) {\n indexAlias(byDataValue, byNormalizedValue, bareName, regionId, mapType);\n }\n }\n\n if (mapType === 'country') {\n const aliases = [\n props.name_long,\n props.formal_en,\n props.brk_name,\n props.admin,\n props.geounit,\n ...String(props.aliases ?? '').split('|'),\n ];\n for (const alias of aliases) {\n if (typeof alias === 'string' && alias && alias !== dataValue) {\n indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType);\n }\n }\n }\n }\n\n for (const key of ambiguousTwoPartKeys) byNormalizedValue.delete(key);\n return { byId, byDataValue, byNormalizedValue };\n}\n\nexport function getRegionId(dataValue: string, mapType: string, index: FeaturesIndex): string | undefined {\n if (!dataValue || !mapType) return undefined;\n const direct = index.byDataValue.get(dataValue.toLowerCase());\n if (direct) return direct;\n const normalized = index.byNormalizedValue.get(normalizeDataValue(dataValue, mapType));\n if (normalized) return normalized;\n\n if (\n (mapType === 'region' || mapType === 'province' || mapType === 'county') &&\n dataValue.includes(',')\n ) {\n const lastPart = dataValue.split(',').at(-1)?.trim();\n if (lastPart) {\n return (\n index.byDataValue.get(lastPart.toLowerCase()) ??\n index.byNormalizedValue.get(normalizeDataValue(lastPart, mapType))\n );\n }\n }\n return undefined;\n}\n"],"names":[],"mappings":";AAGA,MAAM,uBAA+C;AAAA,EACnD,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AACV;AAEO,SAAS,yBAAyB,UAAwC;AAC/E,aAAW,OAAO,YAAY,IAAI;AAChC,UAAM,OAAO,OAAO,GAAG,EAAE,YAAA;AACzB,UAAM,QAAQ,gBAAgB,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC;AAChE,QAAI,MAAO,QAAO;AAAA,EACpB;AACA,SAAO;AACT;AAEO,SAAS,mBAAmB,WAAmB,SAAyB;AAC7E,MAAI,CAAC,UAAW,QAAO;AAEvB,MAAI,aAAa,UACd,cACA,UAAU,KAAK,EACf,QAAQ,oBAAoB,EAAE;AAEjC,eAAa,WAAW,QAAQ,eAAe,QAAQ;AACvD,MAAI,YAAY,QAAQ;AACtB,iBAAa,WAAW,QAAQ,aAAa,GAAG;AAAA,EAClD;AAEA,MAAI,YAAY,QAAQ;AACtB,iBAAa,WACV,UAAU,KAAK,EACf,QAAQ,oBAAoB,EAAE,EAC9B,QAAQ,WAAW,EAAE,EACrB,QAAQ,SAAS,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SAAS;AAC3B,YAAI,OAAO,UAAU,YAAY,SAAS,UAAU,WAAW;AAC7D,qBAAW,aAAa,mBAAmB,OAAO,UAAU,OAAO;AAAA,QACrE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,aAAW,OAAO,qBAAsB,mBAAkB,OAAO,GAAG;AACpE,SAAO,EAAE,MAAM,aAAa,kBAAA;AAC9B;AAEO,SAAS,YAAY,WAAmB,SAAiB,OAA0C;;AACxG,MAAI,CAAC,aAAa,CAAC,QAAS,QAAO;AACnC,QAAM,SAAS,MAAM,YAAY,IAAI,UAAU,aAAa;AAC5D,MAAI,OAAQ,QAAO;AACnB,QAAM,aAAa,MAAM,kBAAkB,IAAI,mBAAmB,WAAW,OAAO,CAAC;AACrF,MAAI,WAAY,QAAO;AAEvB,OACG,YAAY,YAAY,YAAY,cAAc,YAAY,aAC/D,UAAU,SAAS,GAAG,GACtB;AACA,UAAM,YAAW,eAAU,MAAM,GAAG,EAAE,GAAG,EAAE,MAA1B,mBAA6B;AAC9C,QAAI,UAAU;AACZ,aACE,MAAM,YAAY,IAAI,SAAS,YAAA,CAAa,KAC5C,MAAM,kBAAkB,IAAI,mBAAmB,UAAU,OAAO,CAAC;AAAA,IAErE;AAAA,EACF;AACA,SAAO;AACT;"}
@@ -0,0 +1,5 @@
1
+ import { GeoJsonFeatureCollection } from './types.js';
2
+ export declare function isFeatureCollection(value: unknown): value is GeoJsonFeatureCollection;
3
+ export declare function fetchMapGeoJson(mapType: string, baseUrl?: string): Promise<GeoJsonFeatureCollection | null>;
4
+ export declare function geoJsonFileName(mapType: string): string;
5
+ //# sourceMappingURL=geojson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geojson.d.ts","sourceRoot":"","sources":["../../../../src/components/map-chart/lib/geojson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAI3D,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,wBAAwB,CAIrF;AAED,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAmB1C;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAevD"}