vue-chrts 2.0.0 → 2.1.0-beta-3

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 (165) hide show
  1. package/dist/components/AreaChart/AreaChart.js +141 -112
  2. package/dist/components/AreaChart/types.d.ts +33 -1
  3. package/dist/components/BarChart/BarChart.js +76 -65
  4. package/dist/components/BarChart/types.d.ts +9 -1
  5. package/dist/components/BubbleChart/BubbleChart.js +55 -45
  6. package/dist/components/BubbleChart/types.d.ts +9 -1
  7. package/dist/components/DagreGraph/DagreGraph.js +171 -0
  8. package/dist/components/DagreGraph/DagreGraph.vue.d.ts +33 -0
  9. package/dist/components/DagreGraph/DagreGraph2.js +4 -0
  10. package/dist/components/DagreGraph/types.d.ts +253 -0
  11. package/dist/components/DonutChart/DonutChart.js +69 -59
  12. package/dist/components/DonutChart/types.d.ts +14 -2
  13. package/dist/components/DualChart/DualChart.js +216 -0
  14. package/dist/components/DualChart/DualChart.vue.d.ts +21 -0
  15. package/dist/components/DualChart/DualChart2.js +4 -0
  16. package/dist/components/DualChart/types.d.ts +195 -0
  17. package/dist/components/GanttChart/GanttChart.js +58 -48
  18. package/dist/components/GanttChart/types.d.ts +9 -1
  19. package/dist/components/LineChart/LineChart.js +17 -9
  20. package/dist/components/Maps/DottedMap/DottedMap.js +170 -0
  21. package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +52 -0
  22. package/dist/components/Maps/DottedMap/DottedMap2.js +4 -0
  23. package/dist/components/Maps/DottedMap/MapLegend.vue.d.ts +6 -0
  24. package/dist/components/Maps/DottedMap/MapZoomControls.js +44 -0
  25. package/dist/components/Maps/DottedMap/MapZoomControls.vue.d.ts +13 -0
  26. package/dist/components/Maps/DottedMap/MapZoomControls2.js +4 -0
  27. package/dist/components/Maps/DottedMap/core.js +122 -0
  28. package/dist/components/Maps/DottedMap/core.vue.d.ts +36 -0
  29. package/dist/components/Maps/DottedMap/core2.js +4 -0
  30. package/dist/components/Maps/DottedMap/mapUtils.d.ts +49 -0
  31. package/dist/components/Maps/DottedMap/mapUtils.js +130 -0
  32. package/dist/components/Maps/DottedMap/pins.d.ts +9 -0
  33. package/dist/components/Maps/DottedMap/pins.js +58 -0
  34. package/dist/components/Maps/DottedMap/regions.d.ts +4 -0
  35. package/dist/components/Maps/DottedMap/regions.js +66 -0
  36. package/dist/components/Maps/DottedMap/types.d.ts +127 -0
  37. package/dist/components/Maps/DottedMap/useMapPanZoom.d.ts +22 -0
  38. package/dist/components/Maps/DottedMap/useMapPanZoom.js +41 -0
  39. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +170 -0
  40. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +30 -0
  41. package/dist/components/Maps/TopoJSONMap/TopoJSONMap2.js +4 -0
  42. package/dist/components/Maps/TopoJSONMap/data.d.ts +13 -0
  43. package/dist/components/Maps/TopoJSONMap/types.d.ts +40 -0
  44. package/dist/components/Maps/types.d.ts +48 -0
  45. package/dist/components/SankeyChart/SankeyChart.js +133 -0
  46. package/dist/components/SankeyChart/SankeyChart.vue.d.ts +22 -0
  47. package/dist/components/SankeyChart/SankeyChart2.js +4 -0
  48. package/dist/components/SankeyChart/types.d.ts +116 -0
  49. package/dist/components/Tooltip.js +32 -27
  50. package/dist/data/countries.geo.json.js +9 -0
  51. package/dist/index.d.ts +8 -2
  52. package/dist/index.js +25 -12
  53. package/dist/node_modules/.pnpm/@turf_boolean-point-in-polygon@7.3.1/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +28 -0
  54. package/dist/node_modules/.pnpm/@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js +20 -0
  55. package/dist/node_modules/.pnpm/mgrs@1.0.0/node_modules/mgrs/mgrs.js +222 -0
  56. package/dist/node_modules/.pnpm/point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js +25 -0
  57. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Point.js +24 -0
  58. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Proj.js +46 -0
  59. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/adjust_axis.js +31 -0
  60. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/checkSanity.js +15 -0
  61. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lat.js +8 -0
  62. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lon.js +8 -0
  63. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_zone.js +13 -0
  64. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinhy.js +9 -0
  65. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinz.js +6 -0
  66. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens.js +8 -0
  67. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens_cmplx.js +10 -0
  68. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/cosh.js +7 -0
  69. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e0fn.js +6 -0
  70. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e1fn.js +6 -0
  71. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e2fn.js +6 -0
  72. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e3fn.js +6 -0
  73. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gN.js +7 -0
  74. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gatg.js +8 -0
  75. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/hypot.js +8 -0
  76. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/imlfn.js +11 -0
  77. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/iqsfnz.js +13 -0
  78. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/log1py.js +7 -0
  79. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/mlfn.js +6 -0
  80. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/msfnz.js +7 -0
  81. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/phi2z.js +10 -0
  82. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_enfn.js +10 -0
  83. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_inv_mlfn.js +14 -0
  84. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_mlfn.js +6 -0
  85. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/qsfnz.js +7 -0
  86. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sign.js +6 -0
  87. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sinh.js +7 -0
  88. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/srat.js +6 -0
  89. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/toPoint.js +10 -0
  90. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/tsfnz.js +8 -0
  91. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/vincenty.js +33 -0
  92. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Datum.js +1278 -0
  93. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Ellipsoid.js +226 -0
  94. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/PrimeMeridian.js +17 -0
  95. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/units.js +25 -0
  96. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/values.js +22 -0
  97. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/core.js +65 -0
  98. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum.js +8 -0
  99. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datumUtils.js +82 -0
  100. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum_transform.js +94 -0
  101. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/defs.js +39 -0
  102. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/deriveConstants.js +30 -0
  103. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/extend.js +12 -0
  104. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/global.js +9 -0
  105. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/index.js +25 -0
  106. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/match.js +11 -0
  107. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/nadgrid.js +128 -0
  108. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/parseCode.js +47 -0
  109. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projString.js +119 -0
  110. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aea.js +43 -0
  111. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aeqd.js +36 -0
  112. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/bonne.js +55 -0
  113. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cass.js +52 -0
  114. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cea.js +36 -0
  115. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqc.js +27 -0
  116. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqdc.js +48 -0
  117. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqearth.js +30 -0
  118. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/etmerc.js +54 -0
  119. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gauss.js +27 -0
  120. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geocent.js +26 -0
  121. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geos.js +49 -0
  122. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gnom.js +28 -0
  123. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/krovak.js +31 -0
  124. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/laea.js +134 -0
  125. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/lcc.js +61 -0
  126. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/longlat.js +19 -0
  127. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/merc.js +49 -0
  128. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/mill.js +26 -0
  129. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/moll.js +37 -0
  130. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/nzmg.js +48 -0
  131. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ob_tran.js +173 -0
  132. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/omerc.js +58 -0
  133. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ortho.js +28 -0
  134. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/poly.js +68 -0
  135. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/qsc.js +67 -0
  136. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/robin.js +104 -0
  137. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sinu.js +47 -0
  138. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/somerc.js +34 -0
  139. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/stere.js +46 -0
  140. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sterea.js +33 -0
  141. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tmerc.js +60 -0
  142. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tpers.js +110 -0
  143. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/utm.js +22 -0
  144. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/vandg.js +34 -0
  145. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections.js +34 -0
  146. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/transform.js +49 -0
  147. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/projs.js +38 -0
  148. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +23 -0
  149. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/util.js +30 -0
  150. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2015.js +9 -0
  151. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2019.js +20 -0
  152. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilderBase.js +171 -0
  153. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/buildPROJJSON.js +11 -0
  154. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/detectWKTVersion.js +7 -0
  155. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/index.js +104 -0
  156. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/parser.js +117 -0
  157. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/process.js +89 -0
  158. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/transformPROJJSON.js +73 -0
  159. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/util.js +12 -0
  160. package/dist/types.d.ts +21 -1
  161. package/dist/utils/geoJsonToGrid.d.ts +14 -0
  162. package/dist/utils/index.d.ts +1 -0
  163. package/dist/utils.d.ts +3 -0
  164. package/dist/utils.js +35 -31
  165. package/package.json +15 -9
@@ -0,0 +1,7 @@
1
+ function i(n) {
2
+ const e = n.toUpperCase();
3
+ return e.includes("PROJCRS") || e.includes("GEOGCRS") || e.includes("BOUNDCRS") || e.includes("VERTCRS") || e.includes("LENGTHUNIT") || e.includes("ANGLEUNIT") || e.includes("SCALEUNIT") ? "WKT2" : (e.includes("PROJCS") || e.includes("GEOGCS") || e.includes("LOCAL_CS") || e.includes("VERT_CS") || e.includes("UNIT"), "WKT1");
4
+ }
5
+ export {
6
+ i as detectWKTVersion
7
+ };
@@ -0,0 +1,104 @@
1
+ import { buildPROJJSON as g } from "./buildPROJJSON.js";
2
+ import { detectWKTVersion as c } from "./detectWKTVersion.js";
3
+ import O from "./parser.js";
4
+ import { sExpr as p } from "./process.js";
5
+ import { transformPROJJSON as _ } from "./transformPROJJSON.js";
6
+ import { d2r as t, applyProjectionDefaults as T } from "./util.js";
7
+ var S = [
8
+ "PROJECTEDCRS",
9
+ "PROJCRS",
10
+ "GEOGCS",
11
+ "GEOCCS",
12
+ "PROJCS",
13
+ "LOCAL_CS",
14
+ "GEODCRS",
15
+ "GEODETICCRS",
16
+ "GEODETICDATUM",
17
+ "ENGCRS",
18
+ "ENGINEERINGCRS"
19
+ ];
20
+ function E(e, n) {
21
+ var a = n[0], o = n[1];
22
+ !(a in e) && o in e && (e[a] = e[o], n.length === 3 && (e[a] = n[2](e[a])));
23
+ }
24
+ function s(e) {
25
+ for (var n = Object.keys(e), a = 0, o = n.length; a < o; ++a) {
26
+ var l = n[a];
27
+ S.indexOf(l) !== -1 && I(e[l]), typeof e[l] == "object" && s(e[l]);
28
+ }
29
+ }
30
+ function I(e) {
31
+ if (e.AUTHORITY) {
32
+ var n = Object.keys(e.AUTHORITY)[0];
33
+ n && n in e.AUTHORITY && (e.title = n + ":" + e.AUTHORITY[n]);
34
+ }
35
+ if (e.type === "GEOGCS" ? e.projName = "longlat" : e.type === "LOCAL_CS" ? (e.projName = "identity", e.local = !0) : typeof e.PROJECTION == "object" ? e.projName = Object.keys(e.PROJECTION)[0] : e.projName = e.PROJECTION, e.AXIS) {
36
+ for (var a = "", o = 0, l = e.AXIS.length; o < l; ++o) {
37
+ var r = [e.AXIS[o][0].toLowerCase(), e.AXIS[o][1].toLowerCase()];
38
+ r[0].indexOf("north") !== -1 || (r[0] === "y" || r[0] === "lat") && r[1] === "north" ? a += "n" : r[0].indexOf("south") !== -1 || (r[0] === "y" || r[0] === "lat") && r[1] === "south" ? a += "s" : r[0].indexOf("east") !== -1 || (r[0] === "x" || r[0] === "lon") && r[1] === "east" ? a += "e" : (r[0].indexOf("west") !== -1 || (r[0] === "x" || r[0] === "lon") && r[1] === "west") && (a += "w");
39
+ }
40
+ a.length === 2 && (a += "u"), a.length === 3 && (e.axis = a);
41
+ }
42
+ e.UNIT && (e.units = e.UNIT.name.toLowerCase(), e.units === "metre" && (e.units = "meter"), e.UNIT.convert && (e.type === "GEOGCS" ? e.DATUM && e.DATUM.SPHEROID && (e.to_meter = e.UNIT.convert * e.DATUM.SPHEROID.a) : e.to_meter = e.UNIT.convert));
43
+ var i = e.GEOGCS;
44
+ e.type === "GEOGCS" && (i = e), i && (i.DATUM ? e.datumCode = i.DATUM.name.toLowerCase() : e.datumCode = i.name.toLowerCase(), e.datumCode.slice(0, 2) === "d_" && (e.datumCode = e.datumCode.slice(2)), e.datumCode === "new_zealand_1949" && (e.datumCode = "nzgd49"), (e.datumCode === "wgs_1984" || e.datumCode === "world_geodetic_system_1984") && (e.PROJECTION === "Mercator_Auxiliary_Sphere" && (e.sphere = !0), e.datumCode = "wgs84"), e.datumCode === "belge_1972" && (e.datumCode = "rnb72"), i.DATUM && i.DATUM.SPHEROID && (e.ellps = i.DATUM.SPHEROID.name.replace("_19", "").replace(/[Cc]larke\_18/, "clrk"), e.ellps.toLowerCase().slice(0, 13) === "international" && (e.ellps = "intl"), e.a = i.DATUM.SPHEROID.a, e.rf = parseFloat(i.DATUM.SPHEROID.rf, 10)), i.DATUM && i.DATUM.TOWGS84 && (e.datum_params = i.DATUM.TOWGS84), ~e.datumCode.indexOf("osgb_1936") && (e.datumCode = "osgb36"), ~e.datumCode.indexOf("osni_1952") && (e.datumCode = "osni52"), (~e.datumCode.indexOf("tm65") || ~e.datumCode.indexOf("geodetic_datum_of_1965")) && (e.datumCode = "ire65"), e.datumCode === "ch1903+" && (e.datumCode = "ch1903"), ~e.datumCode.indexOf("israel") && (e.datumCode = "isr93")), e.b && !isFinite(e.b) && (e.b = e.a), e.rectified_grid_angle && (e.rectified_grid_angle = t(e.rectified_grid_angle));
45
+ function f(d) {
46
+ var C = e.to_meter || 1;
47
+ return d * C;
48
+ }
49
+ var u = function(d) {
50
+ return E(e, d);
51
+ }, m = [
52
+ ["standard_parallel_1", "Standard_Parallel_1"],
53
+ ["standard_parallel_1", "Latitude of 1st standard parallel"],
54
+ ["standard_parallel_2", "Standard_Parallel_2"],
55
+ ["standard_parallel_2", "Latitude of 2nd standard parallel"],
56
+ ["false_easting", "False_Easting"],
57
+ ["false_easting", "False easting"],
58
+ ["false-easting", "Easting at false origin"],
59
+ ["false_northing", "False_Northing"],
60
+ ["false_northing", "False northing"],
61
+ ["false_northing", "Northing at false origin"],
62
+ ["central_meridian", "Central_Meridian"],
63
+ ["central_meridian", "Longitude of natural origin"],
64
+ ["central_meridian", "Longitude of false origin"],
65
+ ["latitude_of_origin", "Latitude_Of_Origin"],
66
+ ["latitude_of_origin", "Central_Parallel"],
67
+ ["latitude_of_origin", "Latitude of natural origin"],
68
+ ["latitude_of_origin", "Latitude of false origin"],
69
+ ["scale_factor", "Scale_Factor"],
70
+ ["k0", "scale_factor"],
71
+ ["latitude_of_center", "Latitude_Of_Center"],
72
+ ["latitude_of_center", "Latitude_of_center"],
73
+ ["lat0", "latitude_of_center", t],
74
+ ["longitude_of_center", "Longitude_Of_Center"],
75
+ ["longitude_of_center", "Longitude_of_center"],
76
+ ["longc", "longitude_of_center", t],
77
+ ["x0", "false_easting", f],
78
+ ["y0", "false_northing", f],
79
+ ["long0", "central_meridian", t],
80
+ ["lat0", "latitude_of_origin", t],
81
+ ["lat0", "standard_parallel_1", t],
82
+ ["lat1", "standard_parallel_1", t],
83
+ ["lat2", "standard_parallel_2", t],
84
+ ["azimuth", "Azimuth"],
85
+ ["alpha", "azimuth", t],
86
+ ["srsCode", "name"]
87
+ ];
88
+ m.forEach(u), T(e);
89
+ }
90
+ function v(e) {
91
+ if (typeof e == "object")
92
+ return _(e);
93
+ const n = c(e);
94
+ var a = O(e);
95
+ if (n === "WKT2") {
96
+ const r = g(a);
97
+ return _(r);
98
+ }
99
+ var o = a[0], l = {};
100
+ return p(a, l), s(l), l[o];
101
+ }
102
+ export {
103
+ v as default
104
+ };
@@ -0,0 +1,117 @@
1
+ var i = 1, o = 2, u = 3, s = 4, a = 5, h = -1, d = /\s/, f = /[A-Za-z]/, p = /[A-Za-z84_]/, n = /[,\]]/, l = /[\d\.E\-\+]/;
2
+ function e(t) {
3
+ if (typeof t != "string")
4
+ throw new Error("not a string");
5
+ this.text = t.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = i;
6
+ }
7
+ e.prototype.readCharicter = function() {
8
+ var t = this.text[this.place++];
9
+ if (this.state !== s)
10
+ for (; d.test(t); ) {
11
+ if (this.place >= this.text.length)
12
+ return;
13
+ t = this.text[this.place++];
14
+ }
15
+ switch (this.state) {
16
+ case i:
17
+ return this.neutral(t);
18
+ case o:
19
+ return this.keyword(t);
20
+ case s:
21
+ return this.quoted(t);
22
+ case a:
23
+ return this.afterquote(t);
24
+ case u:
25
+ return this.number(t);
26
+ case h:
27
+ return;
28
+ }
29
+ };
30
+ e.prototype.afterquote = function(t) {
31
+ if (t === '"') {
32
+ this.word += '"', this.state = s;
33
+ return;
34
+ }
35
+ if (n.test(t)) {
36
+ this.word = this.word.trim(), this.afterItem(t);
37
+ return;
38
+ }
39
+ throw new Error(`havn't handled "` + t + '" in afterquote yet, index ' + this.place);
40
+ };
41
+ e.prototype.afterItem = function(t) {
42
+ if (t === ",") {
43
+ this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = i;
44
+ return;
45
+ }
46
+ if (t === "]") {
47
+ this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = i, this.currentObject = this.stack.pop(), this.currentObject || (this.state = h);
48
+ return;
49
+ }
50
+ };
51
+ e.prototype.number = function(t) {
52
+ if (l.test(t)) {
53
+ this.word += t;
54
+ return;
55
+ }
56
+ if (n.test(t)) {
57
+ this.word = parseFloat(this.word), this.afterItem(t);
58
+ return;
59
+ }
60
+ throw new Error(`havn't handled "` + t + '" in number yet, index ' + this.place);
61
+ };
62
+ e.prototype.quoted = function(t) {
63
+ if (t === '"') {
64
+ this.state = a;
65
+ return;
66
+ }
67
+ this.word += t;
68
+ };
69
+ e.prototype.keyword = function(t) {
70
+ if (p.test(t)) {
71
+ this.word += t;
72
+ return;
73
+ }
74
+ if (t === "[") {
75
+ var r = [];
76
+ r.push(this.word), this.level++, this.root === null ? this.root = r : this.currentObject.push(r), this.stack.push(this.currentObject), this.currentObject = r, this.state = i;
77
+ return;
78
+ }
79
+ if (n.test(t)) {
80
+ this.afterItem(t);
81
+ return;
82
+ }
83
+ throw new Error(`havn't handled "` + t + '" in keyword yet, index ' + this.place);
84
+ };
85
+ e.prototype.neutral = function(t) {
86
+ if (f.test(t)) {
87
+ this.word = t, this.state = o;
88
+ return;
89
+ }
90
+ if (t === '"') {
91
+ this.word = "", this.state = s;
92
+ return;
93
+ }
94
+ if (l.test(t)) {
95
+ this.word = t, this.state = u;
96
+ return;
97
+ }
98
+ if (n.test(t)) {
99
+ this.afterItem(t);
100
+ return;
101
+ }
102
+ throw new Error(`havn't handled "` + t + '" in neutral yet, index ' + this.place);
103
+ };
104
+ e.prototype.output = function() {
105
+ for (; this.place < this.text.length; )
106
+ this.readCharicter();
107
+ if (this.state === h)
108
+ return this.root;
109
+ throw new Error('unable to parse string "' + this.text + '". State is ' + this.state);
110
+ };
111
+ function w(t) {
112
+ var r = new e(t);
113
+ return r.output();
114
+ }
115
+ export {
116
+ w as default
117
+ };
@@ -0,0 +1,89 @@
1
+ function c(r, a, e) {
2
+ Array.isArray(a) && (e.unshift(a), a = null);
3
+ var s = a ? {} : r, i = e.reduce(function(n, E) {
4
+ return t(E, n), n;
5
+ }, s);
6
+ a && (r[a] = i);
7
+ }
8
+ function t(r, a) {
9
+ if (!Array.isArray(r)) {
10
+ a[r] = !0;
11
+ return;
12
+ }
13
+ var e = r.shift();
14
+ if (e === "PARAMETER" && (e = r.shift()), r.length === 1) {
15
+ if (Array.isArray(r[0])) {
16
+ a[e] = {}, t(r[0], a[e]);
17
+ return;
18
+ }
19
+ a[e] = r[0];
20
+ return;
21
+ }
22
+ if (!r.length) {
23
+ a[e] = !0;
24
+ return;
25
+ }
26
+ if (e === "TOWGS84") {
27
+ a[e] = r;
28
+ return;
29
+ }
30
+ if (e === "AXIS") {
31
+ e in a || (a[e] = []), a[e].push(r);
32
+ return;
33
+ }
34
+ Array.isArray(e) || (a[e] = {});
35
+ var s;
36
+ switch (e) {
37
+ case "UNIT":
38
+ case "PRIMEM":
39
+ case "VERT_DATUM":
40
+ a[e] = {
41
+ name: r[0].toLowerCase(),
42
+ convert: r[1]
43
+ }, r.length === 3 && t(r[2], a[e]);
44
+ return;
45
+ case "SPHEROID":
46
+ case "ELLIPSOID":
47
+ a[e] = {
48
+ name: r[0],
49
+ a: r[1],
50
+ rf: r[2]
51
+ }, r.length === 4 && t(r[3], a[e]);
52
+ return;
53
+ case "EDATUM":
54
+ case "ENGINEERINGDATUM":
55
+ case "LOCAL_DATUM":
56
+ case "DATUM":
57
+ case "VERT_CS":
58
+ case "VERTCRS":
59
+ case "VERTICALCRS":
60
+ r[0] = ["name", r[0]], c(a, e, r);
61
+ return;
62
+ case "COMPD_CS":
63
+ case "COMPOUNDCRS":
64
+ case "FITTED_CS":
65
+ // the followings are the crs defined in
66
+ // https://github.com/proj4js/proj4js/blob/1da4ed0b865d0fcb51c136090569210cdcc9019e/lib/parseCode.js#L11
67
+ case "PROJECTEDCRS":
68
+ case "PROJCRS":
69
+ case "GEOGCS":
70
+ case "GEOCCS":
71
+ case "PROJCS":
72
+ case "LOCAL_CS":
73
+ case "GEODCRS":
74
+ case "GEODETICCRS":
75
+ case "GEODETICDATUM":
76
+ case "ENGCRS":
77
+ case "ENGINEERINGCRS":
78
+ r[0] = ["name", r[0]], c(a, e, r), a[e].type = e;
79
+ return;
80
+ default:
81
+ for (s = -1; ++s < r.length; )
82
+ if (!Array.isArray(r[s]))
83
+ return t(r, a[e]);
84
+ return c(a, e, r);
85
+ }
86
+ }
87
+ export {
88
+ t as sExpr
89
+ };
@@ -0,0 +1,73 @@
1
+ import { applyProjectionDefaults as m } from "./util.js";
2
+ function d(a) {
3
+ let i = { units: null, to_meter: void 0 };
4
+ return typeof a == "string" ? (i.units = a.toLowerCase(), i.units === "metre" && (i.units = "meter"), i.units === "meter" && (i.to_meter = 1)) : a && a.name && (i.units = a.name.toLowerCase(), i.units === "metre" && (i.units = "meter"), i.to_meter = a.conversion_factor), i;
5
+ }
6
+ function f(a) {
7
+ return typeof a == "object" ? a.value * a.unit.conversion_factor : a;
8
+ }
9
+ function r(a, i) {
10
+ a.ellipsoid.radius ? (i.a = a.ellipsoid.radius, i.rf = 0) : (i.a = f(a.ellipsoid.semi_major_axis), a.ellipsoid.inverse_flattening !== void 0 ? i.rf = a.ellipsoid.inverse_flattening : a.ellipsoid.semi_major_axis !== void 0 && a.ellipsoid.semi_minor_axis !== void 0 && (i.rf = i.a / (i.a - f(a.ellipsoid.semi_minor_axis))));
11
+ }
12
+ function c(a, i = {}) {
13
+ return !a || typeof a != "object" ? a : a.type === "BoundCRS" ? (c(a.source_crs, i), a.transformation && (a.transformation.method && a.transformation.method.name === "NTv2" ? i.nadgrids = a.transformation.parameters[0].value : i.datum_params = a.transformation.parameters.map((_) => _.value)), i) : (Object.keys(a).forEach((_) => {
14
+ const n = a[_];
15
+ if (n !== null)
16
+ switch (_) {
17
+ case "name":
18
+ if (i.srsCode)
19
+ break;
20
+ i.name = n, i.srsCode = n;
21
+ break;
22
+ case "type":
23
+ n === "GeographicCRS" ? i.projName = "longlat" : n === "ProjectedCRS" && a.conversion && a.conversion.method && (i.projName = a.conversion.method.name);
24
+ break;
25
+ case "datum":
26
+ case "datum_ensemble":
27
+ n.ellipsoid && (i.ellps = n.ellipsoid.name, r(n, i)), n.prime_meridian && (i.from_greenwich = n.prime_meridian.longitude * Math.PI / 180);
28
+ break;
29
+ case "ellipsoid":
30
+ i.ellps = n.name, r(n, i);
31
+ break;
32
+ case "prime_meridian":
33
+ i.long0 = (n.longitude || 0) * Math.PI / 180;
34
+ break;
35
+ case "coordinate_system":
36
+ if (n.axis) {
37
+ if (i.axis = n.axis.map((o) => {
38
+ const e = o.direction;
39
+ if (e === "east") return "e";
40
+ if (e === "north") return "n";
41
+ if (e === "west") return "w";
42
+ if (e === "south") return "s";
43
+ throw new Error(`Unknown axis direction: ${e}`);
44
+ }).join("") + "u", n.unit) {
45
+ const { units: o, to_meter: e } = d(n.unit);
46
+ i.units = o, i.to_meter = e;
47
+ } else if (n.axis[0] && n.axis[0].unit) {
48
+ const { units: o, to_meter: e } = d(n.axis[0].unit);
49
+ i.units = o, i.to_meter = e;
50
+ }
51
+ }
52
+ break;
53
+ case "id":
54
+ n.authority && n.code && (i.title = n.authority + ":" + n.code);
55
+ break;
56
+ case "conversion":
57
+ n.method && n.method.name && (i.projName = n.method.name), n.parameters && n.parameters.forEach((o) => {
58
+ const e = o.name.toLowerCase().replace(/\s+/g, "_"), t = o.value;
59
+ o.unit && o.unit.conversion_factor ? i[e] = t * o.unit.conversion_factor : o.unit === "degree" ? i[e] = t * Math.PI / 180 : i[e] = t;
60
+ });
61
+ break;
62
+ case "unit":
63
+ n.name && (i.units = n.name.toLowerCase(), i.units === "metre" && (i.units = "meter")), n.conversion_factor && (i.to_meter = n.conversion_factor);
64
+ break;
65
+ case "base_crs":
66
+ c(n, i), i.datumCode = n.id ? n.id.authority + "_" + n.id.code : n.name;
67
+ break;
68
+ }
69
+ }), i.latitude_of_false_origin !== void 0 && (i.lat0 = i.latitude_of_false_origin), i.longitude_of_false_origin !== void 0 && (i.long0 = i.longitude_of_false_origin), i.latitude_of_standard_parallel !== void 0 && (i.lat0 = i.latitude_of_standard_parallel, i.lat1 = i.latitude_of_standard_parallel), i.latitude_of_1st_standard_parallel !== void 0 && (i.lat1 = i.latitude_of_1st_standard_parallel), i.latitude_of_2nd_standard_parallel !== void 0 && (i.lat2 = i.latitude_of_2nd_standard_parallel), i.latitude_of_projection_centre !== void 0 && (i.lat0 = i.latitude_of_projection_centre), i.longitude_of_projection_centre !== void 0 && (i.longc = i.longitude_of_projection_centre), i.easting_at_false_origin !== void 0 && (i.x0 = i.easting_at_false_origin), i.northing_at_false_origin !== void 0 && (i.y0 = i.northing_at_false_origin), i.latitude_of_natural_origin !== void 0 && (i.lat0 = i.latitude_of_natural_origin), i.longitude_of_natural_origin !== void 0 && (i.long0 = i.longitude_of_natural_origin), i.longitude_of_origin !== void 0 && (i.long0 = i.longitude_of_origin), i.false_easting !== void 0 && (i.x0 = i.false_easting), i.easting_at_projection_centre && (i.x0 = i.easting_at_projection_centre), i.false_northing !== void 0 && (i.y0 = i.false_northing), i.northing_at_projection_centre && (i.y0 = i.northing_at_projection_centre), i.standard_parallel_1 !== void 0 && (i.lat1 = i.standard_parallel_1), i.standard_parallel_2 !== void 0 && (i.lat2 = i.standard_parallel_2), i.scale_factor_at_natural_origin !== void 0 && (i.k0 = i.scale_factor_at_natural_origin), i.scale_factor_at_projection_centre !== void 0 && (i.k0 = i.scale_factor_at_projection_centre), i.scale_factor_on_pseudo_standard_parallel !== void 0 && (i.k0 = i.scale_factor_on_pseudo_standard_parallel), i.azimuth !== void 0 && (i.alpha = i.azimuth), i.azimuth_at_projection_centre !== void 0 && (i.alpha = i.azimuth_at_projection_centre), i.angle_from_rectified_to_skew_grid && (i.rectified_grid_angle = i.angle_from_rectified_to_skew_grid), m(i), i);
70
+ }
71
+ export {
72
+ c as transformPROJJSON
73
+ };
@@ -0,0 +1,12 @@
1
+ var r = 0.017453292519943295;
2
+ function l(a) {
3
+ return a * r;
4
+ }
5
+ function o(a) {
6
+ const e = (a.projName || "").toLowerCase().replace(/_/g, " ");
7
+ !a.long0 && a.longc && (e === "albers conic equal area" || e === "lambert azimuthal equal area") && (a.long0 = a.longc), !a.lat_ts && a.lat1 && (e === "stereographic south pole" || e === "polar stereographic (variant b)") ? (a.lat0 = l(a.lat1 > 0 ? 90 : -90), a.lat_ts = a.lat1, delete a.lat1) : !a.lat_ts && a.lat0 && (e === "polar stereographic" || e === "polar stereographic (variant a)") && (a.lat_ts = a.lat0, a.lat0 = l(a.lat0 > 0 ? 90 : -90), delete a.lat1);
8
+ }
9
+ export {
10
+ o as applyProjectionDefaults,
11
+ l as d2r
12
+ };
package/dist/types.d.ts CHANGED
@@ -4,6 +4,8 @@ import { LineChartProps } from './components/LineChart/types';
4
4
  import { DonutChartProps, DonutType } from './components/DonutChart/types';
5
5
  import { BubbleChartProps } from './components/BubbleChart/types';
6
6
  import { GanttChartProps } from './components/GanttChart/types';
7
+ import { DagreGraphProps, GraphNodeDatum, GraphLinkDatum, GraphData, DagreLayoutSettings, DagreRankDir, DagreAlign, DagreRanker, NodeShape, LinkArrowPosition } from './components/DagreGraph/types';
8
+ import { SankeyChartProps } from './components/SankeyChart/types';
7
9
  declare enum LegendPosition {
8
10
  TopLeft = "top-left",
9
11
  TopCenter = "top-center",
@@ -44,7 +46,7 @@ declare enum Orientation {
44
46
  Horizontal = "horizontal",
45
47
  Vertical = "vertical"
46
48
  }
47
- export { LegendPosition, CurveType, Orientation, DonutType, type AreaChartProps, type BarChartProps, type LineChartProps, type DonutChartProps, type BulletLegendItemInterface, type BubbleChartProps, type GanttChartProps, };
49
+ export { LegendPosition, CurveType, Orientation, DonutType, type AreaChartProps, type BarChartProps, type LineChartProps, type DonutChartProps, type BulletLegendItemInterface, type BubbleChartProps, type GanttChartProps, type DagreGraphProps, type GraphNodeDatum, type GraphLinkDatum, type GraphData, type DagreLayoutSettings, type DagreRankDir, type DagreAlign, type DagreRanker, type NodeShape, type LinkArrowPosition, type SankeyChartProps, };
48
50
  export type axisFormatter = ((tick: number, i?: number, ticks?: number[]) => string) | ((tick: Date, i?: number, ticks?: Date[]) => string);
49
51
  export interface AxisConfig {
50
52
  tickLine?: boolean;
@@ -61,6 +63,10 @@ export interface AxisConfig {
61
63
  minMaxTicksOnly?: boolean;
62
64
  minMaxTicksOnlyShowGridLines?: boolean;
63
65
  tickValues?: readonly number[] | readonly Date[];
66
+ /**
67
+ * Animation duration in milliseconds.
68
+ */
69
+ duration?: number;
64
70
  }
65
71
  export type MarkerConfig = {
66
72
  id: string;
@@ -79,3 +85,17 @@ export interface CrosshairConfig {
79
85
  strokeColor?: string;
80
86
  strokeWidth?: number;
81
87
  }
88
+ export interface TooltipConfig {
89
+ /**
90
+ * Hide delay in milliseconds. Default: undefined
91
+ */
92
+ hideDelay?: number;
93
+ /**
94
+ * Show delay in milliseconds. Default: undefined
95
+ */
96
+ showDelay?: number;
97
+ /**
98
+ * If `true`, the tooltip will follow the cursor.
99
+ */
100
+ followCursor?: boolean;
101
+ }
@@ -0,0 +1,14 @@
1
+ export interface GridPoint {
2
+ x: number;
3
+ y: number;
4
+ lat: number;
5
+ lng: number;
6
+ }
7
+ /**
8
+ * Convert a GeoJSON to a grid of points for visualization
9
+ * @param geoJson - The GeoJSON FeatureCollection
10
+ * @param gridSize - Number of rows in the grid (width will be calculated to maintain aspect ratio)
11
+ * @param gridType - Type of grid: 'square' or 'hex'
12
+ * @returns Array of points with x, y, lat, lng coordinates
13
+ */
14
+ export declare function geoJsonToGrid(geoJson: any, gridSize?: number, gridType?: 'square' | 'hex'): GridPoint[];
@@ -0,0 +1 @@
1
+ export * from './geoJsonToGrid';
package/dist/utils.d.ts CHANGED
@@ -3,6 +3,9 @@ export declare function getDistributedIndices(length: number, numTicks: number):
3
3
  export declare function getFirstPropertyValue(obj: unknown): undefined;
4
4
  export declare const markerShape: (type: string, size: number, strokeWidth: number, color: string, strokeColor: string) => string;
5
5
  export declare function createMarkers(markerConfig: MarkerConfig): string;
6
+ export declare function createScopedMarkers(markerConfig: MarkerConfig, scopeId: string, options?: {
7
+ includeLegacy?: boolean;
8
+ }): string;
6
9
  export declare const flattenData: (data: any[], xAxis: string) => {
7
10
  month: any;
8
11
  }[];
package/dist/utils.js CHANGED
@@ -1,50 +1,54 @@
1
- function p(t) {
2
- if (t && Object.keys(t).length > 0) {
3
- const e = Object.keys(t)[0];
4
- return t[e];
1
+ function i(e) {
2
+ if (e && Object.keys(e).length > 0) {
3
+ const r = Object.keys(e)[0];
4
+ return e[r];
5
5
  }
6
6
  }
7
- const o = (t, e, r, n, $) => {
8
- switch (t) {
7
+ const s = (e, r, t, a, $) => {
8
+ switch (e) {
9
9
  case "circle":
10
- return `<circle cx="${e / 2}" cy="${e / 2}" r="${(e - r) / 2}" stroke-width="${r}" stroke="${$}" fill="${n}" />`;
10
+ return `<circle cx="${r / 2}" cy="${r / 2}" r="${(r - t) / 2}" stroke-width="${t}" stroke="${$}" fill="${a}" />`;
11
11
  case "square":
12
- return `<rect x="${r / 2}" y="${r / 2}" width="${e - r}" height="${e - r}" stroke-width="${r}" stroke="${$}" fill="${n}" />`;
12
+ return `<rect x="${t / 2}" y="${t / 2}" width="${r - t}" height="${r - t}" stroke-width="${t}" stroke="${$}" fill="${a}" />`;
13
13
  case "triangle":
14
- return `<polygon points="${e / 2},${r / 2} ${e - r / 2},${e - r / 2} ${r / 2},${e - r / 2}" stroke-width="${r}" stroke="${$}" fill="${n}" />`;
14
+ return `<polygon points="${r / 2},${t / 2} ${r - t / 2},${r - t / 2} ${t / 2},${r - t / 2}" stroke-width="${t}" stroke="${$}" fill="${a}" />`;
15
15
  case "diamond":
16
- return `<polygon points="${e / 2},${r / 2} ${e - r / 2},${e / 2} ${e / 2},${e - r / 2} ${r / 2},${e / 2}" stroke-width="${r}" stroke="${$}" fill="${n}" />`;
16
+ return `<polygon points="${r / 2},${t / 2} ${r - t / 2},${r / 2} ${r / 2},${r - t / 2} ${t / 2},${r / 2}" stroke-width="${t}" stroke="${$}" fill="${a}" />`;
17
17
  default:
18
18
  return "";
19
19
  }
20
20
  };
21
- function m(t) {
22
- return Object.entries(t.config).map(([e, r]) => {
23
- const n = r.type || "circle", $ = r.size || 10, c = r.strokeWidth || 2, a = r.color || "#000", l = r.strokeColor || r.color || "#000";
24
- return `<marker id="${t.id}-${e}" viewBox="0 0 ${$} ${$}" refX="${$ / 2}" refY="${$ / 2}" markerWidth="${$ / 2}" markerHeight="${$ / 2}">
25
- ${o(n, $, c, a, l)}
26
- </marker>`;
21
+ function f(e, r, t) {
22
+ const a = ($, n) => {
23
+ const o = n.type || "circle", c = n.size || 10, l = n.strokeWidth || 2, u = n.color || "#000", p = n.strokeColor || n.color || "#000";
24
+ return `<marker id="${$}" viewBox="0 0 ${c} ${c}" refX="${c / 2}" refY="${c / 2}" markerWidth="${c / 2}" markerHeight="${c / 2}" orient="auto">
25
+ ${s(o, c, l, u, p)}
26
+ </marker>`;
27
+ };
28
+ return Object.entries(e.config).flatMap(([$, n]) => {
29
+ const o = `${e.id}--${r}--${$}`, c = [a(o, n)];
30
+ return c.push(a(`${e.id}-${$}`, n)), c;
27
31
  }).join(`
28
32
  `);
29
33
  }
30
- function u(t) {
31
- return t.charAt(0).toUpperCase() + t.slice(1);
34
+ function m(e) {
35
+ return e.charAt(0).toUpperCase() + e.slice(1);
32
36
  }
33
- const f = (t, e) => {
34
- const r = Object.keys(t[0]).filter(($) => $ !== e), n = Object.keys(t[0][r[0]]);
35
- return t.map(($) => ({
37
+ const y = (e, r) => {
38
+ const t = Object.keys(e[0]).filter(($) => $ !== r), a = Object.keys(e[0][t[0]]);
39
+ return e.map(($) => ({
36
40
  month: $.month,
37
- ...r.flatMap(
38
- (c) => n.map((a) => ({
39
- [`${c}${u(a)}`]: $[c][a]
41
+ ...t.flatMap(
42
+ (n) => a.map((o) => ({
43
+ [`${n}${m(o)}`]: $[n][o]
40
44
  }))
41
- ).reduce((c, a) => ({ ...c, ...a }), {})
45
+ ).reduce((n, o) => ({ ...n, ...o }), {})
42
46
  }));
43
- }, y = (t) => Intl.DateTimeFormat().format(t);
47
+ }, w = (e) => Intl.DateTimeFormat().format(e);
44
48
  export {
45
- m as createMarkers,
46
- y as dateFormatter,
47
- f as flattenData,
48
- p as getFirstPropertyValue,
49
- o as markerShape
49
+ f as createScopedMarkers,
50
+ w as dateFormatter,
51
+ y as flattenData,
52
+ i as getFirstPropertyValue,
53
+ s as markerShape
50
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-chrts",
3
- "version": "2.0.0",
3
+ "version": "2.1.0-beta-3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -14,19 +14,15 @@
14
14
  "require": "./dist/index.umd.cjs"
15
15
  }
16
16
  },
17
- "scripts": {
18
- "dev": "vite",
19
- "build": "vue-tsc -b && vite build",
20
- "preview": "vite preview",
21
- "release": "commit-and-tag-version"
22
- },
23
17
  "peerDependencies": {
24
18
  "vue": "^3.5.13"
25
19
  },
26
20
  "devDependencies": {
27
21
  "@tailwindcss/vite": "^4.0.15",
28
22
  "@tanstack/vue-table": "^8.21.2",
23
+ "@types/d3-geo": "^3.1.0",
29
24
  "@types/node": "^22.13.11",
25
+ "@types/proj4": "^2.19.0",
30
26
  "@types/rollup": "^0.54.0",
31
27
  "@unovis/ts": "^1.6.2",
32
28
  "@unovis/vue": "^1.6.2",
@@ -34,6 +30,8 @@
34
30
  "@vue/tsconfig": "^0.7.0",
35
31
  "@vueuse/core": "^13.0.0",
36
32
  "commit-and-tag-version": "^12.5.1",
33
+ "d3-geo": "^3.1.1",
34
+ "proj4": "^2.20.2",
37
35
  "rollup": "^4.46.2",
38
36
  "tailwindcss": "^4.0.15",
39
37
  "typescript": "~5.7.2",
@@ -42,5 +40,13 @@
42
40
  "vue-router": "^4.5.0",
43
41
  "vue-tsc": "^2.2.4"
44
42
  },
45
- "packageManager": "pnpm@8.15.4+sha256.cea6d0bdf2de3a0549582da3983c70c92ffc577ff4410cbf190817ddc35137c2"
46
- }
43
+ "dependencies": {
44
+ "@turf/boolean-point-in-polygon": "^7.3.1"
45
+ },
46
+ "scripts": {
47
+ "dev": "vite",
48
+ "build": "vue-tsc -b && vite build",
49
+ "preview": "vite preview",
50
+ "release": "pnpm run build && commit-and-tag-version && pnpm publish"
51
+ }
52
+ }