@antv/gpt-vis 0.5.14 → 1.0.0-beta.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 (542) hide show
  1. package/README.md +183 -114
  2. package/README.zh-CN.md +185 -112
  3. package/dist/cjs/gpt-vis/index.d.ts +108 -0
  4. package/dist/cjs/gpt-vis/index.js +173 -0
  5. package/dist/cjs/index.d.ts +44 -13
  6. package/dist/cjs/index.js +65 -35
  7. package/dist/cjs/syntax/index.d.ts +2 -0
  8. package/dist/cjs/{Text/mini-charts/hooks → syntax}/index.js +9 -7
  9. package/dist/cjs/syntax/parser.d.ts +67 -0
  10. package/dist/cjs/syntax/parser.js +235 -0
  11. package/dist/cjs/types/index.d.ts +33 -2
  12. package/dist/cjs/types/index.js +0 -6
  13. package/dist/cjs/util/theme.d.ts +21 -0
  14. package/dist/cjs/{theme.js → util/theme.js} +63 -14
  15. package/dist/cjs/vis/area/index.d.ts +60 -0
  16. package/dist/cjs/vis/area/index.js +151 -0
  17. package/dist/cjs/vis/bar/index.d.ts +60 -0
  18. package/dist/cjs/vis/bar/index.js +122 -0
  19. package/dist/cjs/vis/boxplot/index.d.ts +59 -0
  20. package/dist/cjs/vis/boxplot/index.js +106 -0
  21. package/dist/cjs/vis/column/index.d.ts +60 -0
  22. package/dist/cjs/vis/column/index.js +121 -0
  23. package/dist/cjs/vis/dual-axes/index.d.ts +64 -0
  24. package/dist/cjs/vis/dual-axes/index.js +147 -0
  25. package/dist/cjs/vis/funnel/index.d.ts +54 -0
  26. package/dist/cjs/vis/funnel/index.js +189 -0
  27. package/dist/cjs/vis/histogram/index.d.ts +47 -0
  28. package/dist/cjs/vis/histogram/index.js +112 -0
  29. package/dist/cjs/vis/line/index.d.ts +59 -0
  30. package/dist/cjs/vis/line/index.js +104 -0
  31. package/dist/cjs/vis/liquid/index.d.ts +44 -0
  32. package/dist/cjs/vis/liquid/index.js +87 -0
  33. package/dist/cjs/vis/pie/index.d.ts +55 -0
  34. package/dist/cjs/vis/pie/index.js +108 -0
  35. package/dist/cjs/vis/radar/index.d.ts +57 -0
  36. package/dist/cjs/vis/radar/index.js +152 -0
  37. package/dist/cjs/vis/sankey/index.d.ts +56 -0
  38. package/dist/cjs/vis/sankey/index.js +93 -0
  39. package/dist/cjs/vis/scatter/index.d.ts +54 -0
  40. package/dist/cjs/vis/scatter/index.js +94 -0
  41. package/dist/cjs/vis/summary/index.d.ts +41 -0
  42. package/dist/cjs/{Text/utils/getThemeColor.js → vis/summary/index.js} +33 -22
  43. package/dist/cjs/vis/table/index.d.ts +49 -0
  44. package/dist/cjs/vis/table/index.js +173 -0
  45. package/dist/cjs/vis/treemap/index.d.ts +68 -0
  46. package/dist/cjs/vis/treemap/index.js +105 -0
  47. package/dist/cjs/vis/venn/index.d.ts +54 -0
  48. package/dist/cjs/vis/venn/index.js +100 -0
  49. package/dist/cjs/vis/violin/index.d.ts +59 -0
  50. package/dist/cjs/vis/violin/index.js +155 -0
  51. package/dist/cjs/vis/waterfall/index.d.ts +67 -0
  52. package/dist/cjs/vis/waterfall/index.js +172 -0
  53. package/dist/cjs/vis/word-cloud/index.d.ts +53 -0
  54. package/dist/cjs/vis/word-cloud/index.js +89 -0
  55. package/dist/cjs/vis-wrapper/icons.d.ts +8 -0
  56. package/dist/cjs/vis-wrapper/icons.js +63 -0
  57. package/dist/cjs/vis-wrapper/index.d.ts +24 -0
  58. package/dist/cjs/vis-wrapper/index.js +231 -0
  59. package/dist/cjs/vis-wrapper/styles.d.ts +8 -0
  60. package/dist/cjs/vis-wrapper/styles.js +214 -0
  61. package/dist/esm/gpt-vis/index.d.ts +108 -0
  62. package/dist/esm/gpt-vis/index.js +224 -0
  63. package/dist/esm/index.d.ts +44 -13
  64. package/dist/esm/index.js +22 -15
  65. package/dist/esm/syntax/index.d.ts +2 -0
  66. package/dist/esm/syntax/index.js +1 -0
  67. package/dist/esm/syntax/parser.d.ts +67 -0
  68. package/dist/esm/syntax/parser.js +401 -0
  69. package/dist/esm/types/index.d.ts +33 -2
  70. package/dist/esm/types/index.js +0 -1
  71. package/dist/esm/util/theme.d.ts +21 -0
  72. package/dist/esm/util/theme.js +141 -0
  73. package/dist/esm/vis/area/index.d.ts +60 -0
  74. package/dist/esm/vis/area/index.js +230 -0
  75. package/dist/esm/vis/bar/index.d.ts +60 -0
  76. package/dist/esm/vis/bar/index.js +203 -0
  77. package/dist/esm/vis/boxplot/index.d.ts +59 -0
  78. package/dist/esm/vis/boxplot/index.js +164 -0
  79. package/dist/esm/vis/column/index.d.ts +60 -0
  80. package/dist/esm/vis/column/index.js +198 -0
  81. package/dist/esm/vis/dual-axes/index.d.ts +64 -0
  82. package/dist/esm/vis/dual-axes/index.js +234 -0
  83. package/dist/esm/vis/funnel/index.d.ts +54 -0
  84. package/dist/esm/vis/funnel/index.js +246 -0
  85. package/dist/esm/vis/histogram/index.d.ts +47 -0
  86. package/dist/esm/vis/histogram/index.js +148 -0
  87. package/dist/esm/vis/line/index.d.ts +59 -0
  88. package/dist/esm/vis/line/index.js +172 -0
  89. package/dist/esm/vis/liquid/index.d.ts +44 -0
  90. package/dist/esm/vis/liquid/index.js +130 -0
  91. package/dist/esm/vis/pie/index.d.ts +55 -0
  92. package/dist/esm/vis/pie/index.js +168 -0
  93. package/dist/esm/vis/radar/index.d.ts +57 -0
  94. package/dist/esm/vis/radar/index.js +222 -0
  95. package/dist/esm/vis/sankey/index.d.ts +56 -0
  96. package/dist/esm/vis/sankey/index.js +135 -0
  97. package/dist/esm/vis/scatter/index.d.ts +54 -0
  98. package/dist/esm/vis/scatter/index.js +158 -0
  99. package/dist/esm/vis/summary/index.d.ts +41 -0
  100. package/dist/esm/vis/summary/index.js +80 -0
  101. package/dist/esm/vis/table/index.d.ts +49 -0
  102. package/dist/esm/vis/table/index.js +160 -0
  103. package/dist/esm/vis/treemap/index.d.ts +68 -0
  104. package/dist/esm/vis/treemap/index.js +158 -0
  105. package/dist/esm/vis/venn/index.d.ts +54 -0
  106. package/dist/esm/vis/venn/index.js +142 -0
  107. package/dist/esm/vis/violin/index.d.ts +59 -0
  108. package/dist/esm/vis/violin/index.js +245 -0
  109. package/dist/esm/vis/waterfall/index.d.ts +67 -0
  110. package/dist/esm/vis/waterfall/index.js +245 -0
  111. package/dist/esm/vis/word-cloud/index.d.ts +53 -0
  112. package/dist/esm/vis/word-cloud/index.js +128 -0
  113. package/dist/esm/vis-wrapper/icons.d.ts +8 -0
  114. package/dist/esm/vis-wrapper/icons.js +29 -0
  115. package/dist/esm/vis-wrapper/index.d.ts +24 -0
  116. package/dist/esm/vis-wrapper/index.js +237 -0
  117. package/dist/esm/vis-wrapper/styles.d.ts +8 -0
  118. package/dist/esm/vis-wrapper/styles.js +21 -0
  119. package/dist/umd/index.min.js +1 -1
  120. package/package.json +26 -65
  121. package/src/gpt-vis/index.ts +283 -0
  122. package/src/index.ts +44 -0
  123. package/src/readme.md +37 -0
  124. package/src/syntax/index.ts +2 -0
  125. package/src/syntax/parser.ts +411 -0
  126. package/src/types/index.ts +29 -0
  127. package/src/util/theme.ts +167 -0
  128. package/src/vis/area/README.md +143 -0
  129. package/src/vis/area/index.ts +212 -0
  130. package/src/vis/bar/README.md +158 -0
  131. package/src/vis/bar/index.ts +186 -0
  132. package/src/vis/boxplot/README.md +168 -0
  133. package/src/vis/boxplot/index.ts +162 -0
  134. package/src/vis/column/README.md +158 -0
  135. package/src/vis/column/index.ts +185 -0
  136. package/src/vis/dual-axes/README.md +191 -0
  137. package/src/vis/dual-axes/index.ts +218 -0
  138. package/src/vis/funnel/README.md +143 -0
  139. package/src/vis/funnel/index.ts +238 -0
  140. package/src/vis/histogram/README.md +130 -0
  141. package/src/vis/histogram/index.ts +153 -0
  142. package/src/vis/line/README.md +138 -0
  143. package/src/vis/line/index.ts +159 -0
  144. package/src/vis/liquid/README.md +150 -0
  145. package/src/vis/liquid/index.ts +130 -0
  146. package/src/vis/pie/README.md +127 -0
  147. package/src/vis/pie/index.ts +163 -0
  148. package/src/vis/radar/README.md +184 -0
  149. package/src/vis/radar/index.ts +214 -0
  150. package/src/vis/sankey/README.md +144 -0
  151. package/src/vis/sankey/index.ts +144 -0
  152. package/src/vis/scatter/README.md +145 -0
  153. package/src/vis/scatter/index.ts +147 -0
  154. package/src/vis/summary/README.md +272 -0
  155. package/src/vis/summary/index.ts +91 -0
  156. package/src/vis/table/README.md +174 -0
  157. package/src/vis/table/index.ts +241 -0
  158. package/src/vis/treemap/README.md +199 -0
  159. package/src/vis/treemap/index.ts +167 -0
  160. package/src/vis/venn/README.md +153 -0
  161. package/src/vis/venn/index.ts +149 -0
  162. package/src/vis/violin/README.md +168 -0
  163. package/src/vis/violin/index.ts +216 -0
  164. package/src/vis/waterfall/README.md +178 -0
  165. package/src/vis/waterfall/index.ts +258 -0
  166. package/src/vis/word-cloud/README.md +137 -0
  167. package/src/vis/word-cloud/index.ts +137 -0
  168. package/src/vis-wrapper/README.md +159 -0
  169. package/src/vis-wrapper/icons.ts +35 -0
  170. package/src/vis-wrapper/index.ts +276 -0
  171. package/src/vis-wrapper/styles.ts +195 -0
  172. package/README.ja-JP.md +0 -164
  173. package/dist/cjs/Area/index.d.ts +0 -11
  174. package/dist/cjs/Area/index.js +0 -105
  175. package/dist/cjs/Bar/index.d.ts +0 -14
  176. package/dist/cjs/Bar/index.js +0 -101
  177. package/dist/cjs/Boxplot/index.d.ts +0 -11
  178. package/dist/cjs/Boxplot/index.js +0 -88
  179. package/dist/cjs/ChartCodeRender/Loading.d.ts +0 -6
  180. package/dist/cjs/ChartCodeRender/Loading.js +0 -54
  181. package/dist/cjs/ChartCodeRender/VisChart.d.ts +0 -19
  182. package/dist/cjs/ChartCodeRender/VisChart.js +0 -335
  183. package/dist/cjs/ChartCodeRender/icon.d.ts +0 -10
  184. package/dist/cjs/ChartCodeRender/icon.js +0 -162
  185. package/dist/cjs/ChartCodeRender/index.d.ts +0 -8
  186. package/dist/cjs/ChartCodeRender/index.js +0 -113
  187. package/dist/cjs/ChartCodeRender/styles.d.ts +0 -19
  188. package/dist/cjs/ChartCodeRender/styles.js +0 -232
  189. package/dist/cjs/ChartCodeRender/type.d.ts +0 -176
  190. package/dist/cjs/ChartCodeRender/type.js +0 -17
  191. package/dist/cjs/ChartCodeRender/utils.d.ts +0 -1
  192. package/dist/cjs/ChartCodeRender/utils.js +0 -51
  193. package/dist/cjs/Column/index.d.ts +0 -14
  194. package/dist/cjs/Column/index.js +0 -102
  195. package/dist/cjs/ConfigProvider/context.d.ts +0 -3
  196. package/dist/cjs/ConfigProvider/context.js +0 -41
  197. package/dist/cjs/ConfigProvider/hooks/index.d.ts +0 -1
  198. package/dist/cjs/ConfigProvider/hooks/index.js +0 -23
  199. package/dist/cjs/ConfigProvider/hooks/useConfig.d.ts +0 -13
  200. package/dist/cjs/ConfigProvider/hooks/useConfig.js +0 -109
  201. package/dist/cjs/ConfigProvider/index.d.ts +0 -7
  202. package/dist/cjs/ConfigProvider/index.js +0 -43
  203. package/dist/cjs/DualAxes/index.d.ts +0 -20
  204. package/dist/cjs/DualAxes/index.js +0 -84
  205. package/dist/cjs/DualAxes/util.d.ts +0 -9
  206. package/dist/cjs/DualAxes/util.js +0 -77
  207. package/dist/cjs/FishboneDiagram/index.d.ts +0 -7
  208. package/dist/cjs/FishboneDiagram/index.js +0 -66
  209. package/dist/cjs/FlowDiagram/helper.d.ts +0 -7
  210. package/dist/cjs/FlowDiagram/helper.js +0 -83
  211. package/dist/cjs/FlowDiagram/index.d.ts +0 -6
  212. package/dist/cjs/FlowDiagram/index.js +0 -107
  213. package/dist/cjs/Funnel/index.d.ts +0 -12
  214. package/dist/cjs/Funnel/index.js +0 -173
  215. package/dist/cjs/GPTVis/Lite.d.ts +0 -19
  216. package/dist/cjs/GPTVis/Lite.js +0 -81
  217. package/dist/cjs/GPTVis/hooks/useContext.d.ts +0 -8
  218. package/dist/cjs/GPTVis/hooks/useContext.js +0 -49
  219. package/dist/cjs/GPTVis/hooks/useEvent.d.ts +0 -1
  220. package/dist/cjs/GPTVis/hooks/useEvent.js +0 -33
  221. package/dist/cjs/GPTVis/index.d.ts +0 -6
  222. package/dist/cjs/GPTVis/index.js +0 -42
  223. package/dist/cjs/HeatMap/index.d.ts +0 -12
  224. package/dist/cjs/HeatMap/index.js +0 -67
  225. package/dist/cjs/Histogram/index.d.ts +0 -8
  226. package/dist/cjs/Histogram/index.js +0 -79
  227. package/dist/cjs/IndentedTree/index.d.ts +0 -7
  228. package/dist/cjs/IndentedTree/index.js +0 -78
  229. package/dist/cjs/Line/index.d.ts +0 -11
  230. package/dist/cjs/Line/index.js +0 -94
  231. package/dist/cjs/Liquid/index.d.ts +0 -11
  232. package/dist/cjs/Liquid/index.js +0 -85
  233. package/dist/cjs/Map/Component/MapView.d.ts +0 -3
  234. package/dist/cjs/Map/Component/MapView.js +0 -40
  235. package/dist/cjs/Map/Component/Marker.d.ts +0 -3
  236. package/dist/cjs/Map/Component/Marker.js +0 -53
  237. package/dist/cjs/Map/Component/Polyline.d.ts +0 -3
  238. package/dist/cjs/Map/Component/Polyline.js +0 -50
  239. package/dist/cjs/Map/Component/index.d.ts +0 -4
  240. package/dist/cjs/Map/Component/index.js +0 -45
  241. package/dist/cjs/Map/data.json +0 -305
  242. package/dist/cjs/Map/index.d.ts +0 -5
  243. package/dist/cjs/Map/index.js +0 -61
  244. package/dist/cjs/MindMap/index.d.ts +0 -7
  245. package/dist/cjs/MindMap/index.js +0 -75
  246. package/dist/cjs/NetworkGraph/index.d.ts +0 -6
  247. package/dist/cjs/NetworkGraph/index.js +0 -75
  248. package/dist/cjs/OrganizationChart/index.d.ts +0 -6
  249. package/dist/cjs/OrganizationChart/index.js +0 -95
  250. package/dist/cjs/PathMap/index.d.ts +0 -6
  251. package/dist/cjs/PathMap/index.js +0 -58
  252. package/dist/cjs/Pie/index.d.ts +0 -23
  253. package/dist/cjs/Pie/index.js +0 -94
  254. package/dist/cjs/PinMap/index.d.ts +0 -6
  255. package/dist/cjs/PinMap/index.js +0 -44
  256. package/dist/cjs/PinMap/maker.svg +0 -1
  257. package/dist/cjs/Radar/index.d.ts +0 -13
  258. package/dist/cjs/Radar/index.js +0 -153
  259. package/dist/cjs/Sankey/index.d.ts +0 -14
  260. package/dist/cjs/Sankey/index.js +0 -110
  261. package/dist/cjs/Scatter/index.d.ts +0 -13
  262. package/dist/cjs/Scatter/index.js +0 -103
  263. package/dist/cjs/Table/index.d.ts +0 -9
  264. package/dist/cjs/Table/index.js +0 -91
  265. package/dist/cjs/Text/VisText.d.ts +0 -4
  266. package/dist/cjs/Text/VisText.js +0 -82
  267. package/dist/cjs/Text/config.d.ts +0 -18
  268. package/dist/cjs/Text/config.js +0 -91
  269. package/dist/cjs/Text/custom-icons/index.d.ts +0 -3
  270. package/dist/cjs/Text/custom-icons/index.js +0 -66
  271. package/dist/cjs/Text/index.d.ts +0 -3
  272. package/dist/cjs/Text/index.js +0 -42
  273. package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
  274. package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.js +0 -65
  275. package/dist/cjs/Text/mini-charts/hooks/index.d.ts +0 -1
  276. package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
  277. package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.js +0 -65
  278. package/dist/cjs/Text/mini-charts/index.d.ts +0 -2
  279. package/dist/cjs/Text/mini-charts/index.js +0 -25
  280. package/dist/cjs/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
  281. package/dist/cjs/Text/mini-charts/line/SingleLineChart.js +0 -63
  282. package/dist/cjs/Text/mini-charts/line/index.d.ts +0 -1
  283. package/dist/cjs/Text/mini-charts/line/index.js +0 -29
  284. package/dist/cjs/Text/mini-charts/line/scaleLinear.d.ts +0 -4
  285. package/dist/cjs/Text/mini-charts/line/scaleLinear.js +0 -35
  286. package/dist/cjs/Text/mini-charts/line/useLineCompute.d.ts +0 -6
  287. package/dist/cjs/Text/mini-charts/line/useLineCompute.js +0 -103
  288. package/dist/cjs/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
  289. package/dist/cjs/Text/mini-charts/proportion/getArcPath.js +0 -51
  290. package/dist/cjs/Text/mini-charts/proportion/index.d.ts +0 -3
  291. package/dist/cjs/Text/mini-charts/proportion/index.js +0 -71
  292. package/dist/cjs/Text/theme.d.ts +0 -24
  293. package/dist/cjs/Text/theme.js +0 -52
  294. package/dist/cjs/Text/types.d.ts +0 -20
  295. package/dist/cjs/Text/types.js +0 -17
  296. package/dist/cjs/Text/utils/getThemeColor.d.ts +0 -11
  297. package/dist/cjs/Text/utils/index.d.ts +0 -2
  298. package/dist/cjs/Text/utils/index.js +0 -25
  299. package/dist/cjs/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
  300. package/dist/cjs/Text/utils/useAntdDarkAlgorithm.js +0 -40
  301. package/dist/cjs/Treemap/index.d.ts +0 -10
  302. package/dist/cjs/Treemap/index.js +0 -93
  303. package/dist/cjs/Venn/index.d.ts +0 -32
  304. package/dist/cjs/Venn/index.js +0 -87
  305. package/dist/cjs/Violin/index.d.ts +0 -10
  306. package/dist/cjs/Violin/index.js +0 -190
  307. package/dist/cjs/Waterfall/index.d.ts +0 -25
  308. package/dist/cjs/Waterfall/index.js +0 -184
  309. package/dist/cjs/WordCloud/index.d.ts +0 -9
  310. package/dist/cjs/WordCloud/index.js +0 -76
  311. package/dist/cjs/constants/index.d.ts +0 -2
  312. package/dist/cjs/constants/index.js +0 -35
  313. package/dist/cjs/export-map.browser.d.ts +0 -4
  314. package/dist/cjs/export-map.browser.js +0 -48
  315. package/dist/cjs/export-map.d.ts +0 -10
  316. package/dist/cjs/export-map.js +0 -41
  317. package/dist/cjs/export.d.ts +0 -74
  318. package/dist/cjs/export.js +0 -156
  319. package/dist/cjs/render.d.ts +0 -2
  320. package/dist/cjs/render.js +0 -67
  321. package/dist/cjs/theme.d.ts +0 -2
  322. package/dist/cjs/types/chart.d.ts +0 -87
  323. package/dist/cjs/types/chart.js +0 -60
  324. package/dist/cjs/types/config.d.ts +0 -25
  325. package/dist/cjs/types/config.js +0 -17
  326. package/dist/cjs/types/map.d.ts +0 -242
  327. package/dist/cjs/types/map.js +0 -17
  328. package/dist/cjs/utils/config.d.ts +0 -5
  329. package/dist/cjs/utils/config.js +0 -76
  330. package/dist/cjs/utils/graph.d.ts +0 -18
  331. package/dist/cjs/utils/graph.js +0 -64
  332. package/dist/cjs/utils/index.d.ts +0 -1
  333. package/dist/cjs/utils/index.js +0 -23
  334. package/dist/cjs/utils/map/context.d.ts +0 -3
  335. package/dist/cjs/utils/map/context.js +0 -45
  336. package/dist/cjs/utils/map/controls.d.ts +0 -0
  337. package/dist/cjs/utils/map/controls.js +0 -0
  338. package/dist/cjs/utils/map/index.d.ts +0 -6
  339. package/dist/cjs/utils/map/index.js +0 -33
  340. package/dist/cjs/utils/map/markers.d.ts +0 -2
  341. package/dist/cjs/utils/map/markers.js +0 -88
  342. package/dist/cjs/utils/map/polyline.d.ts +0 -2
  343. package/dist/cjs/utils/map/polyline.js +0 -52
  344. package/dist/cjs/utils/map/style.d.ts +0 -45
  345. package/dist/cjs/utils/map/style.js +0 -112
  346. package/dist/cjs/utils/map/util.d.ts +0 -1
  347. package/dist/cjs/utils/map/util.js +0 -38
  348. package/dist/cjs/utils/map/view.d.ts +0 -5
  349. package/dist/cjs/utils/map/view.js +0 -100
  350. package/dist/cjs/utils/palette.d.ts +0 -2
  351. package/dist/cjs/utils/palette.js +0 -54
  352. package/dist/cjs/utils/plot.d.ts +0 -5
  353. package/dist/cjs/utils/plot.js +0 -90
  354. package/dist/cjs/version.d.ts +0 -2
  355. package/dist/cjs/version.js +0 -25
  356. package/dist/esm/Area/index.d.ts +0 -11
  357. package/dist/esm/Area/index.js +0 -108
  358. package/dist/esm/Bar/index.d.ts +0 -14
  359. package/dist/esm/Bar/index.js +0 -92
  360. package/dist/esm/Boxplot/index.d.ts +0 -11
  361. package/dist/esm/Boxplot/index.js +0 -86
  362. package/dist/esm/ChartCodeRender/Loading.d.ts +0 -6
  363. package/dist/esm/ChartCodeRender/Loading.js +0 -21
  364. package/dist/esm/ChartCodeRender/VisChart.d.ts +0 -19
  365. package/dist/esm/ChartCodeRender/VisChart.js +0 -445
  366. package/dist/esm/ChartCodeRender/icon.d.ts +0 -10
  367. package/dist/esm/ChartCodeRender/icon.js +0 -103
  368. package/dist/esm/ChartCodeRender/index.d.ts +0 -8
  369. package/dist/esm/ChartCodeRender/index.js +0 -99
  370. package/dist/esm/ChartCodeRender/styles.d.ts +0 -19
  371. package/dist/esm/ChartCodeRender/styles.js +0 -61
  372. package/dist/esm/ChartCodeRender/type.d.ts +0 -176
  373. package/dist/esm/ChartCodeRender/type.js +0 -1
  374. package/dist/esm/ChartCodeRender/utils.d.ts +0 -1
  375. package/dist/esm/ChartCodeRender/utils.js +0 -37
  376. package/dist/esm/Column/index.d.ts +0 -14
  377. package/dist/esm/Column/index.js +0 -93
  378. package/dist/esm/ConfigProvider/context.d.ts +0 -3
  379. package/dist/esm/ConfigProvider/context.js +0 -3
  380. package/dist/esm/ConfigProvider/hooks/index.d.ts +0 -1
  381. package/dist/esm/ConfigProvider/hooks/index.js +0 -1
  382. package/dist/esm/ConfigProvider/hooks/useConfig.d.ts +0 -13
  383. package/dist/esm/ConfigProvider/hooks/useConfig.js +0 -71
  384. package/dist/esm/ConfigProvider/index.d.ts +0 -7
  385. package/dist/esm/ConfigProvider/index.js +0 -17
  386. package/dist/esm/DualAxes/index.d.ts +0 -20
  387. package/dist/esm/DualAxes/index.js +0 -77
  388. package/dist/esm/DualAxes/util.d.ts +0 -9
  389. package/dist/esm/DualAxes/util.js +0 -77
  390. package/dist/esm/FishboneDiagram/index.d.ts +0 -7
  391. package/dist/esm/FishboneDiagram/index.js +0 -43
  392. package/dist/esm/FlowDiagram/helper.d.ts +0 -7
  393. package/dist/esm/FlowDiagram/helper.js +0 -76
  394. package/dist/esm/FlowDiagram/index.d.ts +0 -6
  395. package/dist/esm/FlowDiagram/index.js +0 -72
  396. package/dist/esm/Funnel/index.d.ts +0 -12
  397. package/dist/esm/Funnel/index.js +0 -171
  398. package/dist/esm/GPTVis/Lite.d.ts +0 -19
  399. package/dist/esm/GPTVis/Lite.js +0 -57
  400. package/dist/esm/GPTVis/hooks/useContext.d.ts +0 -8
  401. package/dist/esm/GPTVis/hooks/useContext.js +0 -9
  402. package/dist/esm/GPTVis/hooks/useEvent.d.ts +0 -1
  403. package/dist/esm/GPTVis/hooks/useEvent.js +0 -6
  404. package/dist/esm/GPTVis/index.d.ts +0 -6
  405. package/dist/esm/GPTVis/index.js +0 -25
  406. package/dist/esm/HeatMap/index.d.ts +0 -12
  407. package/dist/esm/HeatMap/index.js +0 -45
  408. package/dist/esm/Histogram/index.d.ts +0 -8
  409. package/dist/esm/Histogram/index.js +0 -75
  410. package/dist/esm/IndentedTree/index.d.ts +0 -7
  411. package/dist/esm/IndentedTree/index.js +0 -68
  412. package/dist/esm/Line/index.d.ts +0 -11
  413. package/dist/esm/Line/index.js +0 -92
  414. package/dist/esm/Liquid/index.d.ts +0 -11
  415. package/dist/esm/Liquid/index.js +0 -100
  416. package/dist/esm/Map/Component/MapView.d.ts +0 -3
  417. package/dist/esm/Map/Component/MapView.js +0 -18
  418. package/dist/esm/Map/Component/Marker.d.ts +0 -3
  419. package/dist/esm/Map/Component/Marker.js +0 -40
  420. package/dist/esm/Map/Component/Polyline.d.ts +0 -3
  421. package/dist/esm/Map/Component/Polyline.js +0 -35
  422. package/dist/esm/Map/Component/index.d.ts +0 -4
  423. package/dist/esm/Map/Component/index.js +0 -4
  424. package/dist/esm/Map/data.json +0 -305
  425. package/dist/esm/Map/index.d.ts +0 -5
  426. package/dist/esm/Map/index.js +0 -50
  427. package/dist/esm/MindMap/index.d.ts +0 -7
  428. package/dist/esm/MindMap/index.js +0 -69
  429. package/dist/esm/NetworkGraph/index.d.ts +0 -6
  430. package/dist/esm/NetworkGraph/index.js +0 -64
  431. package/dist/esm/OrganizationChart/index.d.ts +0 -6
  432. package/dist/esm/OrganizationChart/index.js +0 -75
  433. package/dist/esm/PathMap/index.d.ts +0 -6
  434. package/dist/esm/PathMap/index.js +0 -41
  435. package/dist/esm/Pie/index.d.ts +0 -23
  436. package/dist/esm/Pie/index.js +0 -96
  437. package/dist/esm/PinMap/index.d.ts +0 -6
  438. package/dist/esm/PinMap/index.js +0 -22
  439. package/dist/esm/PinMap/maker.svg +0 -1
  440. package/dist/esm/Radar/index.d.ts +0 -13
  441. package/dist/esm/Radar/index.js +0 -150
  442. package/dist/esm/Sankey/index.d.ts +0 -14
  443. package/dist/esm/Sankey/index.js +0 -98
  444. package/dist/esm/Scatter/index.d.ts +0 -13
  445. package/dist/esm/Scatter/index.js +0 -95
  446. package/dist/esm/Table/index.d.ts +0 -9
  447. package/dist/esm/Table/index.js +0 -30
  448. package/dist/esm/Text/VisText.d.ts +0 -4
  449. package/dist/esm/Text/VisText.js +0 -55
  450. package/dist/esm/Text/config.d.ts +0 -18
  451. package/dist/esm/Text/config.js +0 -82
  452. package/dist/esm/Text/custom-icons/index.d.ts +0 -3
  453. package/dist/esm/Text/custom-icons/index.js +0 -37
  454. package/dist/esm/Text/index.d.ts +0 -3
  455. package/dist/esm/Text/index.js +0 -2
  456. package/dist/esm/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
  457. package/dist/esm/Text/mini-charts/hooks/getElementFontSize.js +0 -32
  458. package/dist/esm/Text/mini-charts/hooks/index.d.ts +0 -1
  459. package/dist/esm/Text/mini-charts/hooks/index.js +0 -1
  460. package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
  461. package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.js +0 -37
  462. package/dist/esm/Text/mini-charts/index.d.ts +0 -2
  463. package/dist/esm/Text/mini-charts/index.js +0 -2
  464. package/dist/esm/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
  465. package/dist/esm/Text/mini-charts/line/SingleLineChart.js +0 -62
  466. package/dist/esm/Text/mini-charts/line/index.d.ts +0 -1
  467. package/dist/esm/Text/mini-charts/line/index.js +0 -1
  468. package/dist/esm/Text/mini-charts/line/scaleLinear.d.ts +0 -4
  469. package/dist/esm/Text/mini-charts/line/scaleLinear.js +0 -19
  470. package/dist/esm/Text/mini-charts/line/useLineCompute.d.ts +0 -6
  471. package/dist/esm/Text/mini-charts/line/useLineCompute.js +0 -118
  472. package/dist/esm/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
  473. package/dist/esm/Text/mini-charts/proportion/getArcPath.js +0 -19
  474. package/dist/esm/Text/mini-charts/proportion/index.d.ts +0 -3
  475. package/dist/esm/Text/mini-charts/proportion/index.js +0 -64
  476. package/dist/esm/Text/theme.d.ts +0 -24
  477. package/dist/esm/Text/theme.js +0 -24
  478. package/dist/esm/Text/types.d.ts +0 -20
  479. package/dist/esm/Text/types.js +0 -1
  480. package/dist/esm/Text/utils/getThemeColor.d.ts +0 -11
  481. package/dist/esm/Text/utils/getThemeColor.js +0 -29
  482. package/dist/esm/Text/utils/index.d.ts +0 -2
  483. package/dist/esm/Text/utils/index.js +0 -2
  484. package/dist/esm/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
  485. package/dist/esm/Text/utils/useAntdDarkAlgorithm.js +0 -14
  486. package/dist/esm/Treemap/index.d.ts +0 -10
  487. package/dist/esm/Treemap/index.js +0 -88
  488. package/dist/esm/Venn/index.d.ts +0 -32
  489. package/dist/esm/Venn/index.js +0 -69
  490. package/dist/esm/Violin/index.d.ts +0 -10
  491. package/dist/esm/Violin/index.js +0 -199
  492. package/dist/esm/Waterfall/index.d.ts +0 -25
  493. package/dist/esm/Waterfall/index.js +0 -185
  494. package/dist/esm/WordCloud/index.d.ts +0 -9
  495. package/dist/esm/WordCloud/index.js +0 -59
  496. package/dist/esm/constants/index.d.ts +0 -2
  497. package/dist/esm/constants/index.js +0 -9
  498. package/dist/esm/export-map.browser.d.ts +0 -4
  499. package/dist/esm/export-map.browser.js +0 -5
  500. package/dist/esm/export-map.d.ts +0 -10
  501. package/dist/esm/export-map.js +0 -9
  502. package/dist/esm/export.d.ts +0 -74
  503. package/dist/esm/export.js +0 -50
  504. package/dist/esm/render.d.ts +0 -2
  505. package/dist/esm/render.js +0 -32
  506. package/dist/esm/theme.d.ts +0 -2
  507. package/dist/esm/theme.js +0 -103
  508. package/dist/esm/types/chart.d.ts +0 -87
  509. package/dist/esm/types/chart.js +0 -32
  510. package/dist/esm/types/config.d.ts +0 -25
  511. package/dist/esm/types/config.js +0 -1
  512. package/dist/esm/types/map.d.ts +0 -242
  513. package/dist/esm/types/map.js +0 -1
  514. package/dist/esm/utils/config.d.ts +0 -5
  515. package/dist/esm/utils/config.js +0 -53
  516. package/dist/esm/utils/graph.d.ts +0 -18
  517. package/dist/esm/utils/graph.js +0 -55
  518. package/dist/esm/utils/index.d.ts +0 -1
  519. package/dist/esm/utils/index.js +0 -1
  520. package/dist/esm/utils/map/context.d.ts +0 -3
  521. package/dist/esm/utils/map/context.js +0 -42
  522. package/dist/esm/utils/map/controls.d.ts +0 -0
  523. package/dist/esm/utils/map/controls.js +0 -0
  524. package/dist/esm/utils/map/index.d.ts +0 -6
  525. package/dist/esm/utils/map/index.js +0 -6
  526. package/dist/esm/utils/map/markers.d.ts +0 -2
  527. package/dist/esm/utils/map/markers.js +0 -69
  528. package/dist/esm/utils/map/polyline.d.ts +0 -2
  529. package/dist/esm/utils/map/polyline.js +0 -31
  530. package/dist/esm/utils/map/style.d.ts +0 -45
  531. package/dist/esm/utils/map/style.js +0 -80
  532. package/dist/esm/utils/map/util.d.ts +0 -1
  533. package/dist/esm/utils/map/util.js +0 -11
  534. package/dist/esm/utils/map/view.d.ts +0 -5
  535. package/dist/esm/utils/map/view.js +0 -83
  536. package/dist/esm/utils/palette.d.ts +0 -2
  537. package/dist/esm/utils/palette.js +0 -2
  538. package/dist/esm/utils/plot.d.ts +0 -5
  539. package/dist/esm/utils/plot.js +0 -86
  540. package/dist/esm/version.d.ts +0 -2
  541. package/dist/esm/version.js +0 -1
  542. package/dist/umd/436.async.js +0 -1
@@ -1,242 +0,0 @@
1
- type AsyncCall<T = {
2
- [k: string | number | symbol]: any;
3
- }, Success = any, Fail = any, Complete = any> = (params: T & {
4
- success: (params: Success) => void;
5
- fail: (params: Fail) => void;
6
- complete?: (params: Complete) => void;
7
- }) => void;
8
- /**
9
- * 地图组件上下文对象
10
- *
11
- * @see https://opendocs.alipay.com/mini/api/mapcontext
12
- */
13
- export interface MapContext {
14
- /**
15
- * 设置地图底图类型
16
- *
17
- * @see https://opendocs.alipay.com/mini/api/setmaptype
18
- */
19
- setMapType: AsyncCall<{
20
- mapType: 0 | 1 | 2 | 3 | 4;
21
- }>;
22
- /**
23
- * 平移缩放到指定区域
24
- *
25
- * @see https://opendocs.alipay.com/mini/api/includepoints
26
- */
27
- includePoints: AsyncCall<{
28
- points: Array<{
29
- longitude: number;
30
- latitude: number;
31
- }>;
32
- padding?: [number, number, number, number];
33
- }>;
34
- }
35
- export interface MapInstance {
36
- getContext: () => MapContext;
37
- }
38
- /**
39
- * 经纬度坐标点
40
- */
41
- export interface LngLat {
42
- longitude: number;
43
- latitude: number;
44
- }
45
- /**
46
- * 标记点
47
- *
48
- * 更多属性信息查看 @see https://opendocs.alipay.com/mini/component/map#markers
49
- */
50
- export interface Marker extends LngLat {
51
- id: string;
52
- iconPath?: string;
53
- width?: number;
54
- height?: number;
55
- alpha?: number;
56
- anchorX?: number;
57
- anchorY?: number;
58
- label?: {
59
- content?: string;
60
- color?: string;
61
- fontSize?: number;
62
- borderRadius?: number;
63
- bgColor?: string;
64
- padding?: number;
65
- };
66
- }
67
- /**
68
- * 折线
69
- *
70
- * 更多属性信息查看 @see https://opendocs.alipay.com/mini/component/map#polyline
71
- */
72
- export interface Polyline {
73
- points: LngLat[];
74
- width?: number;
75
- color?: string;
76
- dottedLine?: boolean;
77
- iconPath?: string;
78
- iconWidth?: number;
79
- colorList?: string[];
80
- }
81
- /**
82
- * 面
83
- *
84
- * @see https://opendocs.alipay.com/mini/component/map?pathHash=c9886630#polygon
85
- */
86
- export interface Polygon {
87
- points: LngLat[];
88
- color?: string;
89
- fillColor?: string;
90
- width?: number;
91
- }
92
- /**
93
- * @see https://opendocs.alipay.com/mini/component/map
94
- */
95
- export interface Map {
96
- id?: string;
97
- /**
98
- * @title 地图类型
99
- * @description 底图的样式
100
- *
101
- * - 0 标准地图
102
- * - 1 卫星地图
103
- * - 2 夜视地图
104
- * - 3 导航地图
105
- * - 4 公交地图
106
- */
107
- mapType?: 0 | 1 | 2 | 3 | 4 | string;
108
- /**
109
- * @title 展示实时定位点
110
- * @description 展示用户当前带箭头的实时定位点
111
- */
112
- showLocation?: boolean;
113
- /**
114
- * @title 中心纬度
115
- * @description
116
- */
117
- latitude?: number;
118
- /**
119
- * @title 中心经度
120
- * @description
121
- */
122
- longitude?: number;
123
- /**
124
- * @title 缩放级别
125
- * @description 取值范围为 5-18
126
- * @default "16"
127
- */
128
- scale?: number;
129
- /**
130
- * @title 倾斜角度
131
- * @description 范围 0 ~ 40 , 关于 z 轴的倾
132
- * @default "0"
133
- */
134
- skew?: number;
135
- /**
136
- * @title 顺时针旋转的角度
137
- * @description 范围 0 ~ 360
138
- * @default "0"
139
- */
140
- rotate?: number;
141
- /**
142
- * @title 视野范围
143
- * @description 视野将进行小范围延伸包含传入的坐标
144
- */
145
- includePoints?: LngLat[];
146
- /**
147
- * @title 视野边界
148
- * @description 视野在地图 padding 范围内展示
149
- */
150
- includePadding?: {
151
- left: number;
152
- right: number;
153
- top: number;
154
- bottom: number;
155
- };
156
- /**
157
- * @title 是否启用缩放
158
- * @description 缩放交互开关
159
- * @default true
160
- */
161
- enableZoom?: boolean;
162
- /**
163
- * @title 是否启用拖动
164
- * @description 拖动交互开关
165
- * @default true
166
- */
167
- enableScroll?: boolean;
168
- /**
169
- * @title 是否启用旋转
170
- * @description 旋转交互开关
171
- * @default true
172
- */
173
- enableRotate?: boolean;
174
- /**
175
- * @title 标记点
176
- * @description 可在地图上展示多个标记点
177
- */
178
- markers?: Marker[];
179
- /**
180
- * @title 折线
181
- * @description 可在地图上展示多个折线
182
- */
183
- polyline?: Polyline[];
184
- /**
185
- * @title 面
186
- * @description 可在地图上展示多个面
187
- */
188
- polygon?: Polygon[];
189
- /**
190
- * @title 地图视野变化事件
191
- * @description 拖动/旋转/缩放地图时触发
192
- */
193
- onRegionChange?: (event: {
194
- type: 'begin' | 'end';
195
- latitude: number;
196
- longitude: number;
197
- scale: number;
198
- skew: number;
199
- rotate: number;
200
- causedBy: 'update' | 'gesture';
201
- }) => void;
202
- /**
203
- * @title 地图点击事件
204
- * @description 点击地图时触发
205
- */
206
- onTap?: (event: {
207
- latitude: number;
208
- longitude: number;
209
- }) => void;
210
- /**
211
- * @title 标记点击事件
212
- * @description 点击标记及其标签时触发
213
- */
214
- onMarkerTap?: (event: {
215
- markerId: string;
216
- latitude: number;
217
- longitude: number;
218
- }) => void;
219
- /**
220
- * @title 地图初始化完成事件
221
- * @description 地图初始化完成即将开始渲染第一帧时触发
222
- */
223
- onInitComplete?: () => void;
224
- }
225
- export interface MarkerData extends Omit<Marker, 'id' | 'label'> {
226
- id?: string;
227
- label?: string | Marker['label'];
228
- }
229
- export interface PinMap extends Map {
230
- data?: MarkerData[];
231
- markerStyle?: Partial<Marker>;
232
- }
233
- export interface RouteData {
234
- markers?: MarkerData[];
235
- path?: Polyline;
236
- }
237
- export interface PathMap extends Map {
238
- data?: RouteData[];
239
- markerStyle?: Partial<Marker>;
240
- pathStyle?: Partial<Polyline>;
241
- }
242
- export {};
@@ -1,17 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
-
15
- // src/types/map.ts
16
- var map_exports = {};
17
- module.exports = __toCommonJS(map_exports);
@@ -1,5 +0,0 @@
1
- import type { GlobalConfig } from '../types';
2
- export declare const mergeGlobalConfig: (config: GlobalConfig) => GlobalConfig;
3
- export declare function mergeGraphOptions(...options: Record<string, any>[]): {
4
- [x: string]: any;
5
- };
@@ -1,76 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/utils/config.ts
20
- var config_exports = {};
21
- __export(config_exports, {
22
- mergeGlobalConfig: () => mergeGlobalConfig,
23
- mergeGraphOptions: () => mergeGraphOptions
24
- });
25
- module.exports = __toCommonJS(config_exports);
26
- var import_lodash = require("lodash");
27
- var import_constants = require("../constants");
28
- var mergeGlobalConfig = (config) => {
29
- const globalConfig = (0, import_lodash.mergeWith)({}, import_constants.DEFAULT_GLOBAL_CONFIG, config, (objValue) => {
30
- if (Array.isArray(objValue)) {
31
- return objValue;
32
- }
33
- });
34
- return globalConfig;
35
- };
36
- function mergeGraphFunctions(key, currValue, prevValue) {
37
- if (["plugins", "behaviors", "transforms"].includes(key)) {
38
- return (prev) => currValue(prev);
39
- } else {
40
- return function(datum) {
41
- const value = currValue.call(this, datum);
42
- if ((0, import_lodash.isPlainObject)(value))
43
- return mergeGraphOptions(prevValue, value);
44
- return value;
45
- };
46
- }
47
- }
48
- function mergeGraphOptions(...options) {
49
- if (options.length === 0)
50
- return {};
51
- const merged = { ...options[0] };
52
- for (let i = 1; i < options.length; i++) {
53
- const currentOptions = options[i];
54
- for (const key in currentOptions) {
55
- if (currentOptions.hasOwnProperty(key)) {
56
- const currValue = currentOptions[key];
57
- const prevValue = merged[key];
58
- if (["component", "data"].includes(key)) {
59
- merged[key] = currValue;
60
- } else if (typeof currValue === "function") {
61
- merged[key] = mergeGraphFunctions(key, currValue, prevValue);
62
- } else if ((0, import_lodash.isPlainObject)(currValue) && (0, import_lodash.isPlainObject)(prevValue)) {
63
- merged[key] = mergeGraphOptions(prevValue, currValue);
64
- } else {
65
- merged[key] = currValue;
66
- }
67
- }
68
- }
69
- }
70
- return merged;
71
- }
72
- // Annotate the CommonJS export names for ESM import in node:
73
- 0 && (module.exports = {
74
- mergeGlobalConfig,
75
- mergeGraphOptions
76
- });
@@ -1,18 +0,0 @@
1
- import { G6 } from '@ant-design/graphs';
2
- import type { GraphData, TreeGraphData } from '../types';
3
- export declare function visTreeData2GraphData(data: TreeGraphData): G6.GraphData;
4
- export declare function visGraphData2GraphData(data: GraphData): {
5
- nodes: {
6
- id: string;
7
- style: {
8
- labelText: string;
9
- };
10
- }[];
11
- edges: {
12
- source: string;
13
- target: string;
14
- style: {
15
- labelText: string | undefined;
16
- };
17
- }[];
18
- };
@@ -1,64 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/utils/graph.ts
20
- var graph_exports = {};
21
- __export(graph_exports, {
22
- visGraphData2GraphData: () => visGraphData2GraphData,
23
- visTreeData2GraphData: () => visTreeData2GraphData
24
- });
25
- module.exports = __toCommonJS(graph_exports);
26
- var import_graphs = require("@ant-design/graphs");
27
- var { treeToGraphData } = import_graphs.G6;
28
- function visTreeData2GraphData(data) {
29
- return treeToGraphData(data, {
30
- getNodeData: (datum, depth) => {
31
- datum.id = datum.name;
32
- datum.depth = depth;
33
- if (!datum.children)
34
- return datum;
35
- const { children, ...restDatum } = datum;
36
- return {
37
- ...restDatum,
38
- children: children.map((child) => child.name)
39
- };
40
- },
41
- getEdgeData: (source, target) => ({
42
- source: source.name,
43
- target: target.name
44
- })
45
- });
46
- }
47
- function visGraphData2GraphData(data) {
48
- return {
49
- nodes: data.nodes.map((node) => ({
50
- id: node.name,
51
- style: { labelText: node.name }
52
- })),
53
- edges: data.edges.map((edge) => ({
54
- source: edge.source,
55
- target: edge.target,
56
- style: { labelText: edge.name }
57
- }))
58
- };
59
- }
60
- // Annotate the CommonJS export names for ESM import in node:
61
- 0 && (module.exports = {
62
- visGraphData2GraphData,
63
- visTreeData2GraphData
64
- });
@@ -1 +0,0 @@
1
- export * from './map';
@@ -1,23 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/utils/index.ts
17
- var utils_exports = {};
18
- module.exports = __toCommonJS(utils_exports);
19
- __reExport(utils_exports, require("./map"), module.exports);
20
- // Annotate the CommonJS export names for ESM import in node:
21
- 0 && (module.exports = {
22
- ...require("./map")
23
- });
@@ -1,3 +0,0 @@
1
- import type { Scene } from '@antv/l7';
2
- import type { Map } from '../../types/map';
3
- export declare function setMapContext(props: Map, scene: Scene): Promise<void[]> | undefined;
@@ -1,45 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/utils/map/context.ts
20
- var context_exports = {};
21
- __export(context_exports, {
22
- setMapContext: () => setMapContext
23
- });
24
- module.exports = __toCommonJS(context_exports);
25
- var import_util = require("./util");
26
- function setMapContext(props, scene) {
27
- if (props.markers) {
28
- const icons = new Set(
29
- props.markers.filter((item) => item.iconPath !== void 0).map((item) => item.iconPath)
30
- );
31
- return Promise.all(
32
- Array.from(icons.values()).map(async (url) => {
33
- const id = (0, import_util.urlToMarkerId)(url);
34
- if (scene.hasImage(id)) {
35
- return;
36
- }
37
- return await scene.addImage(id, url);
38
- })
39
- );
40
- }
41
- }
42
- // Annotate the CommonJS export names for ESM import in node:
43
- 0 && (module.exports = {
44
- setMapContext
45
- });
File without changes
File without changes
@@ -1,6 +0,0 @@
1
- export * from './context';
2
- export * from './markers';
3
- export * from './polyline';
4
- export * from './style';
5
- export * from './util';
6
- export * from './view';
@@ -1,33 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/utils/map/index.ts
17
- var map_exports = {};
18
- module.exports = __toCommonJS(map_exports);
19
- __reExport(map_exports, require("./context"), module.exports);
20
- __reExport(map_exports, require("./markers"), module.exports);
21
- __reExport(map_exports, require("./polyline"), module.exports);
22
- __reExport(map_exports, require("./style"), module.exports);
23
- __reExport(map_exports, require("./util"), module.exports);
24
- __reExport(map_exports, require("./view"), module.exports);
25
- // Annotate the CommonJS export names for ESM import in node:
26
- 0 && (module.exports = {
27
- ...require("./context"),
28
- ...require("./markers"),
29
- ...require("./polyline"),
30
- ...require("./style"),
31
- ...require("./util"),
32
- ...require("./view")
33
- });
@@ -1,2 +0,0 @@
1
- import type { Marker as MarkerProps } from '../../types/map';
2
- export declare function setMarkers(data: MarkerProps[]): import("@antv/l7").ILayer[];
@@ -1,88 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/utils/map/markers.ts
20
- var markers_exports = {};
21
- __export(markers_exports, {
22
- setMarkers: () => setMarkers
23
- });
24
- module.exports = __toCommonJS(markers_exports);
25
- var import_l7 = require("@antv/l7");
26
- var import_lodash = require("lodash");
27
- var import_util = require("./util");
28
- function setMarkers(data) {
29
- const items = data.map((item) => {
30
- var _a, _b, _c;
31
- return {
32
- ...item,
33
- label: (0, import_lodash.isObject)(item.label) ? item.label.content : item.label,
34
- color: (_a = item.label) == null ? void 0 : _a.color,
35
- bgColor: (_b = item.label) == null ? void 0 : _b.bgColor,
36
- fontSize: (_c = item.label) == null ? void 0 : _c.fontSize,
37
- offsets: [item.anchorX || 0, item.anchorY || -1],
38
- iconPath: item.iconPath ? (0, import_util.urlToMarkerId)(item.iconPath) : void 0
39
- };
40
- });
41
- const icons = items.filter((item) => item.iconPath !== void 0);
42
- const texts = items.filter((item) => item.label !== void 0);
43
- const layers = [];
44
- if (texts.length > 0) {
45
- const offsets = texts[0].offsets;
46
- const fontSize = texts[0].fontSize || 10;
47
- const text = new import_l7.PointLayer({
48
- zIndex: 2
49
- }).source(texts, {
50
- parser: {
51
- type: "json",
52
- x: "longitude",
53
- y: "latitude"
54
- }
55
- }).shape("label", "text").size("fontSize").color("color").style({
56
- opacity: 1,
57
- textOffset: [offsets[0], -2 * offsets[1] * fontSize],
58
- fontWeight: 600,
59
- textAnchor: "center",
60
- stroke: texts[0].bgColor || "#ffffff",
61
- // 描边颜色
62
- strokeWidth: 2,
63
- // 描边宽度
64
- strokeOpacity: 1,
65
- padding: [10, 10]
66
- });
67
- layers.push(text);
68
- }
69
- if (icons.length !== 0) {
70
- const offsets = icons[0].offsets;
71
- const width = icons[0].width || 10;
72
- const iconLayer = new import_l7.PointLayer().source(icons, {
73
- parser: {
74
- type: "json",
75
- x: "longitude",
76
- y: "latitude"
77
- }
78
- }).shape("iconPath").size("width").style({
79
- offsets: [offsets[0], offsets[1] * width]
80
- });
81
- layers.push(iconLayer);
82
- }
83
- return layers;
84
- }
85
- // Annotate the CommonJS export names for ESM import in node:
86
- 0 && (module.exports = {
87
- setMarkers
88
- });
@@ -1,2 +0,0 @@
1
- import type { Polyline as PolylinePorps } from '../../types/map';
2
- export declare function setPolyline(data: PolylinePorps[]): import("@antv/l7").ILayer[];