@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,29 +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/Text/mini-charts/line/index.ts
20
- var line_exports = {};
21
- __export(line_exports, {
22
- SingleLineChart: () => import_SingleLineChart.SingleLineChart
23
- });
24
- module.exports = __toCommonJS(line_exports);
25
- var import_SingleLineChart = require("./SingleLineChart");
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
28
- SingleLineChart
29
- });
@@ -1,4 +0,0 @@
1
- export type Domain = [number, number];
2
- export type Range = [number, number];
3
- export type Scale = (n: number) => number;
4
- export declare const scaleLinear: (domain: Domain, range: Range) => Scale;
@@ -1,35 +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/Text/mini-charts/line/scaleLinear.ts
20
- var scaleLinear_exports = {};
21
- __export(scaleLinear_exports, {
22
- scaleLinear: () => scaleLinear
23
- });
24
- module.exports = __toCommonJS(scaleLinear_exports);
25
- var scaleLinear = (domain, range) => (n) => {
26
- const [d1, d2] = domain;
27
- const [r1, r2] = range;
28
- if (r1 === r2)
29
- return (d2 - d1) / 2;
30
- return n / (r2 - r1) * (d2 - d1);
31
- };
32
- // Annotate the CommonJS export names for ESM import in node:
33
- 0 && (module.exports = {
34
- scaleLinear
35
- });
@@ -1,6 +0,0 @@
1
- export declare const useLineCompute: (size: number, data: undefined | number[]) => {
2
- width: number;
3
- height: number;
4
- linePath: string | null;
5
- polygonPath: string | null;
6
- };
@@ -1,103 +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/Text/mini-charts/line/useLineCompute.ts
20
- var useLineCompute_exports = {};
21
- __export(useLineCompute_exports, {
22
- useLineCompute: () => useLineCompute
23
- });
24
- module.exports = __toCommonJS(useLineCompute_exports);
25
- var import_react = require("react");
26
- var import_theme = require("../../theme");
27
- var import_scaleLinear = require("./scaleLinear");
28
- var SCALE_ADJUST = 2;
29
- var Line = class {
30
- constructor(size, data) {
31
- this.data = [];
32
- this.size = import_theme.TEXT_THEME.fontSizeBase;
33
- this.height = this.size;
34
- this.width = this.getWidth();
35
- this.points = [];
36
- this.size = size;
37
- if (data) {
38
- this.data = data;
39
- this.compute();
40
- }
41
- }
42
- getWidth() {
43
- var _a;
44
- return Math.max(this.size * 2, ((_a = this.data) == null ? void 0 : _a.length) * 2);
45
- }
46
- compute() {
47
- var _a;
48
- if (!this.data)
49
- return;
50
- this.height = this.size;
51
- this.width = this.getWidth();
52
- this.xScale = (0, import_scaleLinear.scaleLinear)([0, this.width], [0, ((_a = this.data) == null ? void 0 : _a.length) - 1]);
53
- const [min, max] = [Math.min(...this.data), Math.max(...this.data)];
54
- this.yScale = (0, import_scaleLinear.scaleLinear)([SCALE_ADJUST, this.height - SCALE_ADJUST], [min, max]);
55
- this.points = this.data.map((item, index) => [
56
- this.xScale(index),
57
- this.height - this.yScale(item)
58
- ]);
59
- }
60
- getLinePath() {
61
- var _a;
62
- if (!((_a = this.data) == null ? void 0 : _a.length) || !this.xScale || !this.yScale)
63
- return null;
64
- const path = this.points.reduce((prev, [x, y], index) => {
65
- if (index === 0)
66
- return `M${x} ${y}`;
67
- return `${prev} L ${x} ${y}`;
68
- }, "");
69
- return path;
70
- }
71
- getPolygonPath() {
72
- var _a;
73
- if (!((_a = this.data) == null ? void 0 : _a.length) || !this.xScale || !this.yScale)
74
- return null;
75
- const polygonPoints = [...this.points];
76
- const last = this.points[this.points.length - 1];
77
- polygonPoints.push([last[0], this.height]);
78
- polygonPoints.push([0, this.height]);
79
- const startPoint = this.points[0];
80
- polygonPoints.push(startPoint);
81
- const path = polygonPoints.reduce((prev, [x, y]) => `${prev} ${x},${y}`, "");
82
- return path;
83
- }
84
- getContainer() {
85
- return [this.width, this.height];
86
- }
87
- };
88
- var useLineCompute = (size, data) => {
89
- const [line, setLine] = (0, import_react.useState)(new Line(size, data));
90
- (0, import_react.useEffect)(() => {
91
- setLine(new Line(size, data));
92
- }, [size, data]);
93
- return {
94
- width: line.getContainer()[0],
95
- height: line.getContainer()[1],
96
- linePath: line.getLinePath(),
97
- polygonPath: line.getPolygonPath()
98
- };
99
- };
100
- // Annotate the CommonJS export names for ESM import in node:
101
- 0 && (module.exports = {
102
- useLineCompute
103
- });
@@ -1 +0,0 @@
1
- export declare function getArcPath(size: number, data: number): string;
@@ -1,51 +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/Text/mini-charts/proportion/getArcPath.ts
20
- var getArcPath_exports = {};
21
- __export(getArcPath_exports, {
22
- getArcPath: () => getArcPath
23
- });
24
- module.exports = __toCommonJS(getArcPath_exports);
25
- function normalizeProportion(data) {
26
- if (typeof data !== "number")
27
- return 0;
28
- if (data > 1)
29
- return 1;
30
- if (data < 0)
31
- return 0;
32
- return data;
33
- }
34
- function getArcPath(size, data) {
35
- const cx = size / 2;
36
- const cy = size / 2;
37
- const r = size / 2;
38
- const angle = normalizeProportion(data) * 2 * Math.PI;
39
- const dx = cx + r * Math.sin(angle);
40
- const dy = cy - r * Math.cos(angle);
41
- const path = `
42
- M${cx} ${0}
43
- A ${cx} ${cy} 0 ${angle > Math.PI ? 1 : 0} 1 ${dx} ${dy}
44
- L ${cx} ${cy} Z
45
- `;
46
- return path;
47
- }
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- getArcPath
51
- });
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { VisTextProps } from '../../types';
3
- export declare const ProportionChart: React.FC<VisTextProps>;
@@ -1,71 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/Text/mini-charts/proportion/index.tsx
30
- var proportion_exports = {};
31
- __export(proportion_exports, {
32
- ProportionChart: () => ProportionChart
33
- });
34
- module.exports = __toCommonJS(proportion_exports);
35
- var import_lodash = require("lodash");
36
- var import_react = __toESM(require("react"));
37
- var import_theme = require("../../theme");
38
- var import_useSvgWrapper = require("../hooks/useSvgWrapper");
39
- var import_getArcPath = require("./getArcPath");
40
- function getProportionNumber(children, origin) {
41
- var _a;
42
- let result;
43
- const originNumber = (0, import_lodash.toNumber)(origin);
44
- if (!(0, import_lodash.isNaN)(originNumber)) {
45
- result = originNumber;
46
- } else {
47
- let text;
48
- if ((0, import_lodash.isString)(children)) {
49
- text = children;
50
- } else if (Array.isArray(children) && (0, import_lodash.isString)(children[0])) {
51
- text = children[0];
52
- }
53
- if ((_a = text == null ? void 0 : text.endsWith) == null ? void 0 : _a.call(text, "%")) {
54
- const percentageStr = text == null ? void 0 : text.replace(/%$/, "");
55
- const proportionNumber = (0, import_lodash.toNumber)(percentageStr);
56
- if (!(0, import_lodash.isNaN)(proportionNumber))
57
- result = proportionNumber / 100;
58
- }
59
- }
60
- return result;
61
- }
62
- var ProportionChart = ({ origin, children }) => {
63
- const data = (0, import_react.useMemo)(() => getProportionNumber(children, origin), [children, origin]);
64
- const [Svg, fontSize] = (0, import_useSvgWrapper.useSvgWrapper)();
65
- const r = fontSize / 2;
66
- return data && /* @__PURE__ */ import_react.default.createElement(Svg, { width: fontSize, height: fontSize }, /* @__PURE__ */ import_react.default.createElement("circle", { cx: r, cy: r, r, fill: import_theme.TEXT_THEME.chart.proportionShadowColor }), data >= 1 ? /* @__PURE__ */ import_react.default.createElement("circle", { cx: r, cy: r, r, fill: import_theme.TEXT_THEME.chart.proportionFillColor }) : /* @__PURE__ */ import_react.default.createElement("path", { d: (0, import_getArcPath.getArcPath)(fontSize, data), fill: import_theme.TEXT_THEME.chart.proportionFillColor }));
67
- };
68
- // Annotate the CommonJS export names for ESM import in node:
69
- 0 && (module.exports = {
70
- ProportionChart
71
- });
@@ -1,24 +0,0 @@
1
- export declare const TEXT_THEME: {
2
- fontSizeBase: number;
3
- chart: {
4
- proportionShadowColor: string;
5
- proportionFillColor: string;
6
- lineStrokeColor: string;
7
- };
8
- light: {
9
- primaryColor: string;
10
- default88Color: string;
11
- default65Color: string;
12
- posColor: string;
13
- negColor: string;
14
- conclusionColor: string;
15
- };
16
- dark: {
17
- primaryColor: string;
18
- default88Color: string;
19
- default65Color: string;
20
- posColor: string;
21
- negColor: string;
22
- conclusionColor: string;
23
- };
24
- };
@@ -1,52 +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/Text/theme.ts
20
- var theme_exports = {};
21
- __export(theme_exports, {
22
- TEXT_THEME: () => TEXT_THEME
23
- });
24
- module.exports = __toCommonJS(theme_exports);
25
- var TEXT_THEME = {
26
- fontSizeBase: 14,
27
- chart: {
28
- proportionShadowColor: "#CDDDFD",
29
- proportionFillColor: "#3471F9",
30
- lineStrokeColor: "#5B8FF9"
31
- },
32
- light: {
33
- primaryColor: "#1677FF",
34
- default88Color: "rgba(0, 0, 0, 0.88)",
35
- default65Color: "rgba(0, 0, 0, 0.65)",
36
- posColor: "#FA541C",
37
- negColor: "#13A8A8",
38
- conclusionColor: "#1F0352"
39
- },
40
- dark: {
41
- primaryColor: "#4B91FF",
42
- default88Color: "rgba(255, 255, 255, 0.88)",
43
- default65Color: "rgba(255, 255, 255, 0.65)",
44
- posColor: "#FA541C",
45
- negColor: "#13A8A8",
46
- conclusionColor: "#D8C3F3"
47
- }
48
- };
49
- // Annotate the CommonJS export names for ESM import in node:
50
- 0 && (module.exports = {
51
- TEXT_THEME
52
- });
@@ -1,20 +0,0 @@
1
- import type { CSSProperties, PropsWithChildren } from 'react';
2
- import type { TextEntityType } from './config';
3
- /**
4
- * the props for the Text
5
- */
6
- export type VisTextProps = PropsWithChildren<{
7
- style?: CSSProperties;
8
- className?: string;
9
- children: string;
10
- /** 类型,包括内置的类型,以及 string 用于用户自行扩展 */
11
- type?: TextEntityType;
12
- /**
13
- * 原始数值
14
- * 用于传递各种情况的原始数据值,比如:
15
- * 1. metric_value: 未经过格式化的指标值,原始数据;eg 1.234
16
- * 2. proportion: 百分比,eg 0.37
17
- * 3. trend_desc: 趋势值,eg [1, 2, 6, 18, 24, 48]
18
- */
19
- origin?: any;
20
- }>;
@@ -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/Text/types.ts
16
- var types_exports = {};
17
- module.exports = __toCommonJS(types_exports);
@@ -1,11 +0,0 @@
1
- /**
2
- * 自动适配暗黑模式
3
- * @params type 类型
4
- * @params color 当前颜色
5
- * @params theme 当前主题
6
- */
7
- export declare const getThemeColor: ({ type, color, theme, }: {
8
- type?: string | undefined;
9
- color: string | undefined;
10
- theme: 'dark' | 'light';
11
- }) => string | undefined;
@@ -1,2 +0,0 @@
1
- export * from './getThemeColor';
2
- export * from './useAntdDarkAlgorithm';
@@ -1,25 +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/Text/utils/index.ts
17
- var utils_exports = {};
18
- module.exports = __toCommonJS(utils_exports);
19
- __reExport(utils_exports, require("./getThemeColor"), module.exports);
20
- __reExport(utils_exports, require("./useAntdDarkAlgorithm"), module.exports);
21
- // Annotate the CommonJS export names for ESM import in node:
22
- 0 && (module.exports = {
23
- ...require("./getThemeColor"),
24
- ...require("./useAntdDarkAlgorithm")
25
- });
@@ -1,2 +0,0 @@
1
- /** 判断是否运用了 antd dark algorithm */
2
- export declare const useAntdDarkAlgorithm: () => boolean;
@@ -1,40 +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/Text/utils/useAntdDarkAlgorithm.ts
20
- var useAntdDarkAlgorithm_exports = {};
21
- __export(useAntdDarkAlgorithm_exports, {
22
- useAntdDarkAlgorithm: () => useAntdDarkAlgorithm
23
- });
24
- module.exports = __toCommonJS(useAntdDarkAlgorithm_exports);
25
- var import_antd = require("antd");
26
- var import_lodash = require("lodash");
27
- var import_react = require("react");
28
- var useAntdDarkAlgorithm = () => {
29
- var _a, _b;
30
- const darkAlgorithm = (_a = import_antd.theme) == null ? void 0 : _a.darkAlgorithm;
31
- const config = (0, import_react.useContext)(import_antd.ConfigProvider.ConfigContext);
32
- const currentAlgorithm = (_b = config.theme) == null ? void 0 : _b.algorithm;
33
- if ((0, import_lodash.isArray)(currentAlgorithm) && currentAlgorithm.includes(darkAlgorithm))
34
- return true;
35
- return !!darkAlgorithm && currentAlgorithm === darkAlgorithm;
36
- };
37
- // Annotate the CommonJS export names for ESM import in node:
38
- 0 && (module.exports = {
39
- useAntdDarkAlgorithm
40
- });
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { BasePlotProps, Style, Theme } from '../types';
3
- type TreeNode = {
4
- name: string;
5
- value: number;
6
- children?: TreeNode[];
7
- };
8
- export type TreemapProps = BasePlotProps<TreeNode> & Theme & Style;
9
- declare const Treemap: (props: TreemapProps) => React.JSX.Element;
10
- export default Treemap;
@@ -1,93 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/Treemap/index.tsx
30
- var Treemap_exports = {};
31
- __export(Treemap_exports, {
32
- default: () => Treemap_default
33
- });
34
- module.exports = __toCommonJS(Treemap_exports);
35
- var import_plots = require("@ant-design/plots");
36
- var import_react = __toESM(require("react"));
37
- var import_hooks = require("../ConfigProvider/hooks");
38
- var import_theme = require("../theme");
39
- var defaultConfig = (props) => {
40
- const { valueField = "value", style = {} } = props;
41
- const { backgroundColor, palette } = style;
42
- const hasPalette = !!(palette == null ? void 0 : palette[0]);
43
- let paletteConfig = { color: void 0 };
44
- if (hasPalette) {
45
- paletteConfig = {
46
- color: {
47
- range: palette
48
- }
49
- };
50
- }
51
- return {
52
- legend: false,
53
- layout: {
54
- tile: "treemapBinary",
55
- paddingInner: 3
56
- },
57
- valueField,
58
- tooltip: {
59
- items: [
60
- (d) => {
61
- var _a;
62
- return {
63
- name: (_a = d.data) == null ? void 0 : _a.name,
64
- value: d[valueField]
65
- };
66
- }
67
- ]
68
- },
69
- style: { fillOpacity: 0.8, labelFontSize: 12 },
70
- ...backgroundColor ? { viewStyle: { viewFill: backgroundColor } } : { viewStyle: void 0 },
71
- scale: {
72
- ...paletteConfig
73
- }
74
- };
75
- };
76
- var transform = (data) => {
77
- return {
78
- name: "root",
79
- children: data
80
- };
81
- };
82
- var Treemap = (props) => {
83
- const themeConfig = import_theme.THEME_MAP[props.theme ?? "default"];
84
- const config = (0, import_hooks.usePlotConfig)("Treemap", defaultConfig, {
85
- ...props,
86
- theme: themeConfig
87
- });
88
- const { data, ...others } = config;
89
- const transformData = (0, import_react.useMemo)(() => transform(data), [data]);
90
- console.log("treemap config:", config, props);
91
- return /* @__PURE__ */ import_react.default.createElement(import_plots.Treemap, { ...others, data: transformData });
92
- };
93
- var Treemap_default = Treemap;
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import type { BasePlotProps, Style, Theme } from '../types';
3
- type VennDatum = {
4
- /**
5
- * Label for the venn chart segment.
6
- * This should be a string that describes the segment.
7
- * For example, "A", "B", or "A ∩ B" for intersections.
8
- * It is used to identify the segment in the chart.
9
- */
10
- label?: string;
11
- /**
12
- * Value for the venn chart segment.
13
- * This should be a number that represents the size or count of the segment.
14
- * For example, if the segment represents a set of items, this could be the number of items in that set.
15
- * It is used to determine the size of the segment in the chart.
16
- * For intersections, this value should represent the count of items that belong to the intersection of sets.
17
- * For example, if "A ∩ B" represents the intersection of sets A and B, this value should be the count of items that are in both sets.
18
- */
19
- value: number;
20
- /**
21
- * Sets that the segment belongs to.
22
- * This should be an array of strings representing the sets that the segment is part of.
23
- * For example, if the segment represents items that belong to both set A and set B, this could be ['A', 'B'].
24
- * It is used to determine how the segment is displayed in the venn chart.
25
- * For intersections, this array should include the sets that contribute to the intersection.
26
- * For example, if "A ∩ B" represents the intersection of sets A and B, this array should be ['A', 'B'].
27
- */
28
- sets: string[] | number[];
29
- };
30
- export type VennProps = BasePlotProps<VennDatum> & Theme & Style;
31
- declare const Venn: (props: VennProps) => React.JSX.Element;
32
- export default Venn;