@antv/gpt-vis 0.6.1 → 1.0.0-beta.2

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 (524) hide show
  1. package/README.md +185 -114
  2. package/README.zh-CN.md +187 -112
  3. package/dist/cjs/gpt-vis/index.d.ts +115 -0
  4. package/dist/cjs/gpt-vis/index.js +196 -0
  5. package/dist/cjs/index.d.ts +57 -13
  6. package/dist/cjs/index.js +85 -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 +82 -0
  10. package/dist/cjs/syntax/parser.js +348 -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/container.d.ts +5 -0
  14. package/dist/cjs/{utils/map/util.js → util/container.js} +18 -13
  15. package/dist/cjs/util/theme.d.ts +26 -0
  16. package/dist/cjs/{theme.js → util/theme.js} +70 -14
  17. package/dist/cjs/vis/area/index.d.ts +60 -0
  18. package/dist/cjs/vis/area/index.js +152 -0
  19. package/dist/cjs/vis/bar/index.d.ts +60 -0
  20. package/dist/cjs/vis/bar/index.js +123 -0
  21. package/dist/cjs/vis/boxplot/index.d.ts +59 -0
  22. package/dist/cjs/vis/boxplot/index.js +111 -0
  23. package/dist/cjs/vis/column/index.d.ts +60 -0
  24. package/dist/cjs/vis/column/index.js +122 -0
  25. package/dist/cjs/vis/dual-axes/index.d.ts +64 -0
  26. package/dist/cjs/vis/dual-axes/index.js +148 -0
  27. package/dist/cjs/vis/fishbone-diagram/index.d.ts +35 -0
  28. package/dist/cjs/vis/fishbone-diagram/index.js +183 -0
  29. package/dist/cjs/vis/flow-diagram/index.d.ts +27 -0
  30. package/dist/cjs/vis/flow-diagram/index.js +271 -0
  31. package/dist/cjs/vis/funnel/index.d.ts +54 -0
  32. package/dist/cjs/vis/funnel/index.js +190 -0
  33. package/dist/cjs/vis/histogram/index.d.ts +47 -0
  34. package/dist/cjs/vis/histogram/index.js +108 -0
  35. package/dist/cjs/vis/indented-tree/index.d.ts +40 -0
  36. package/dist/cjs/vis/indented-tree/index.js +375 -0
  37. package/dist/cjs/vis/line/index.d.ts +59 -0
  38. package/dist/cjs/vis/line/index.js +105 -0
  39. package/dist/cjs/vis/liquid/index.d.ts +44 -0
  40. package/dist/cjs/vis/liquid/index.js +88 -0
  41. package/dist/cjs/vis/mindmap/index.d.ts +32 -0
  42. package/dist/cjs/vis/mindmap/index.js +214 -0
  43. package/dist/cjs/vis/network-graph/index.d.ts +59 -0
  44. package/dist/cjs/vis/network-graph/index.js +166 -0
  45. package/dist/cjs/vis/organization-chart/index.d.ts +64 -0
  46. package/dist/cjs/vis/organization-chart/index.js +191 -0
  47. package/dist/cjs/vis/pie/index.d.ts +55 -0
  48. package/dist/cjs/vis/pie/index.js +108 -0
  49. package/dist/cjs/vis/radar/index.d.ts +58 -0
  50. package/dist/cjs/vis/radar/index.js +153 -0
  51. package/dist/cjs/vis/sankey/index.d.ts +56 -0
  52. package/dist/cjs/vis/sankey/index.js +94 -0
  53. package/dist/cjs/vis/scatter/index.d.ts +54 -0
  54. package/dist/cjs/vis/scatter/index.js +95 -0
  55. package/dist/cjs/vis/summary/index.d.ts +41 -0
  56. package/dist/cjs/vis/summary/index.js +71 -0
  57. package/dist/cjs/vis/table/index.d.ts +50 -0
  58. package/dist/cjs/vis/table/index.js +209 -0
  59. package/dist/cjs/vis/treemap/index.d.ts +68 -0
  60. package/dist/cjs/vis/treemap/index.js +106 -0
  61. package/dist/cjs/vis/venn/index.d.ts +55 -0
  62. package/dist/cjs/vis/venn/index.js +115 -0
  63. package/dist/cjs/vis/violin/index.d.ts +59 -0
  64. package/dist/cjs/vis/violin/index.js +156 -0
  65. package/dist/cjs/vis/waterfall/index.d.ts +64 -0
  66. package/dist/cjs/vis/waterfall/index.js +195 -0
  67. package/dist/cjs/vis/word-cloud/index.d.ts +53 -0
  68. package/dist/cjs/vis/word-cloud/index.js +90 -0
  69. package/dist/cjs/vis-wrapper/icons.d.ts +8 -0
  70. package/dist/cjs/vis-wrapper/icons.js +63 -0
  71. package/dist/cjs/vis-wrapper/index.d.ts +25 -0
  72. package/dist/cjs/vis-wrapper/index.js +242 -0
  73. package/dist/cjs/vis-wrapper/styles.d.ts +8 -0
  74. package/dist/cjs/vis-wrapper/styles.js +221 -0
  75. package/dist/esm/gpt-vis/index.d.ts +115 -0
  76. package/dist/esm/gpt-vis/index.js +245 -0
  77. package/dist/esm/index.d.ts +57 -13
  78. package/dist/esm/index.js +28 -15
  79. package/dist/esm/syntax/index.d.ts +2 -0
  80. package/dist/esm/syntax/index.js +1 -0
  81. package/dist/esm/syntax/parser.d.ts +82 -0
  82. package/dist/esm/syntax/parser.js +559 -0
  83. package/dist/esm/types/index.d.ts +33 -2
  84. package/dist/esm/types/index.js +0 -1
  85. package/dist/esm/util/container.d.ts +5 -0
  86. package/dist/esm/util/container.js +20 -0
  87. package/dist/esm/util/theme.d.ts +26 -0
  88. package/dist/esm/util/theme.js +150 -0
  89. package/dist/esm/vis/area/index.d.ts +60 -0
  90. package/dist/esm/vis/area/index.js +231 -0
  91. package/dist/esm/vis/bar/index.d.ts +60 -0
  92. package/dist/esm/vis/bar/index.js +204 -0
  93. package/dist/esm/vis/boxplot/index.d.ts +59 -0
  94. package/dist/esm/vis/boxplot/index.js +177 -0
  95. package/dist/esm/vis/column/index.d.ts +60 -0
  96. package/dist/esm/vis/column/index.js +199 -0
  97. package/dist/esm/vis/dual-axes/index.d.ts +64 -0
  98. package/dist/esm/vis/dual-axes/index.js +235 -0
  99. package/dist/esm/vis/fishbone-diagram/index.d.ts +35 -0
  100. package/dist/esm/vis/fishbone-diagram/index.js +218 -0
  101. package/dist/esm/vis/flow-diagram/index.d.ts +27 -0
  102. package/dist/esm/vis/flow-diagram/index.js +342 -0
  103. package/dist/esm/vis/funnel/index.d.ts +54 -0
  104. package/dist/esm/vis/funnel/index.js +247 -0
  105. package/dist/esm/vis/histogram/index.d.ts +47 -0
  106. package/dist/esm/vis/histogram/index.js +147 -0
  107. package/dist/esm/vis/indented-tree/index.d.ts +40 -0
  108. package/dist/esm/vis/indented-tree/index.js +564 -0
  109. package/dist/esm/vis/line/index.d.ts +59 -0
  110. package/dist/esm/vis/line/index.js +173 -0
  111. package/dist/esm/vis/liquid/index.d.ts +44 -0
  112. package/dist/esm/vis/liquid/index.js +131 -0
  113. package/dist/esm/vis/mindmap/index.d.ts +32 -0
  114. package/dist/esm/vis/mindmap/index.js +315 -0
  115. package/dist/esm/vis/network-graph/index.d.ts +59 -0
  116. package/dist/esm/vis/network-graph/index.js +240 -0
  117. package/dist/esm/vis/organization-chart/index.d.ts +64 -0
  118. package/dist/esm/vis/organization-chart/index.js +269 -0
  119. package/dist/esm/vis/pie/index.d.ts +55 -0
  120. package/dist/esm/vis/pie/index.js +164 -0
  121. package/dist/esm/vis/radar/index.d.ts +58 -0
  122. package/dist/esm/vis/radar/index.js +238 -0
  123. package/dist/esm/vis/sankey/index.d.ts +56 -0
  124. package/dist/esm/vis/sankey/index.js +136 -0
  125. package/dist/esm/vis/scatter/index.d.ts +54 -0
  126. package/dist/esm/vis/scatter/index.js +159 -0
  127. package/dist/esm/vis/summary/index.d.ts +41 -0
  128. package/dist/esm/vis/summary/index.js +101 -0
  129. package/dist/esm/vis/table/index.d.ts +50 -0
  130. package/dist/esm/vis/table/index.js +167 -0
  131. package/dist/esm/vis/treemap/index.d.ts +68 -0
  132. package/dist/esm/vis/treemap/index.js +159 -0
  133. package/dist/esm/vis/venn/index.d.ts +55 -0
  134. package/dist/esm/vis/venn/index.js +167 -0
  135. package/dist/esm/vis/violin/index.d.ts +59 -0
  136. package/dist/esm/vis/violin/index.js +246 -0
  137. package/dist/esm/vis/waterfall/index.d.ts +64 -0
  138. package/dist/esm/vis/waterfall/index.js +263 -0
  139. package/dist/esm/vis/word-cloud/index.d.ts +53 -0
  140. package/dist/esm/vis/word-cloud/index.js +129 -0
  141. package/dist/esm/vis-wrapper/icons.d.ts +8 -0
  142. package/dist/esm/vis-wrapper/icons.js +29 -0
  143. package/dist/esm/vis-wrapper/index.d.ts +25 -0
  144. package/dist/esm/vis-wrapper/index.js +242 -0
  145. package/dist/esm/vis-wrapper/styles.d.ts +8 -0
  146. package/dist/esm/vis-wrapper/styles.js +21 -0
  147. package/dist/umd/index.min.js +1 -1
  148. package/package.json +18 -59
  149. package/README.ja-JP.md +0 -164
  150. package/dist/cjs/Area/index.d.ts +0 -11
  151. package/dist/cjs/Area/index.js +0 -105
  152. package/dist/cjs/Bar/index.d.ts +0 -14
  153. package/dist/cjs/Bar/index.js +0 -101
  154. package/dist/cjs/Boxplot/index.d.ts +0 -11
  155. package/dist/cjs/Boxplot/index.js +0 -88
  156. package/dist/cjs/ChartCodeRender/Loading.d.ts +0 -6
  157. package/dist/cjs/ChartCodeRender/Loading.js +0 -54
  158. package/dist/cjs/ChartCodeRender/VisChart.d.ts +0 -19
  159. package/dist/cjs/ChartCodeRender/VisChart.js +0 -338
  160. package/dist/cjs/ChartCodeRender/icon.d.ts +0 -10
  161. package/dist/cjs/ChartCodeRender/icon.js +0 -162
  162. package/dist/cjs/ChartCodeRender/index.d.ts +0 -8
  163. package/dist/cjs/ChartCodeRender/index.js +0 -113
  164. package/dist/cjs/ChartCodeRender/styles.d.ts +0 -19
  165. package/dist/cjs/ChartCodeRender/styles.js +0 -232
  166. package/dist/cjs/ChartCodeRender/type.d.ts +0 -176
  167. package/dist/cjs/ChartCodeRender/type.js +0 -17
  168. package/dist/cjs/ChartCodeRender/utils.d.ts +0 -1
  169. package/dist/cjs/ChartCodeRender/utils.js +0 -51
  170. package/dist/cjs/Column/index.d.ts +0 -14
  171. package/dist/cjs/Column/index.js +0 -102
  172. package/dist/cjs/ConfigProvider/context.d.ts +0 -3
  173. package/dist/cjs/ConfigProvider/context.js +0 -41
  174. package/dist/cjs/ConfigProvider/hooks/index.d.ts +0 -1
  175. package/dist/cjs/ConfigProvider/hooks/index.js +0 -23
  176. package/dist/cjs/ConfigProvider/hooks/useConfig.d.ts +0 -13
  177. package/dist/cjs/ConfigProvider/hooks/useConfig.js +0 -109
  178. package/dist/cjs/ConfigProvider/index.d.ts +0 -7
  179. package/dist/cjs/ConfigProvider/index.js +0 -43
  180. package/dist/cjs/DualAxes/index.d.ts +0 -20
  181. package/dist/cjs/DualAxes/index.js +0 -84
  182. package/dist/cjs/DualAxes/util.d.ts +0 -9
  183. package/dist/cjs/DualAxes/util.js +0 -77
  184. package/dist/cjs/FishboneDiagram/index.d.ts +0 -7
  185. package/dist/cjs/FishboneDiagram/index.js +0 -66
  186. package/dist/cjs/FlowDiagram/helper.d.ts +0 -7
  187. package/dist/cjs/FlowDiagram/helper.js +0 -83
  188. package/dist/cjs/FlowDiagram/index.d.ts +0 -6
  189. package/dist/cjs/FlowDiagram/index.js +0 -107
  190. package/dist/cjs/Funnel/index.d.ts +0 -12
  191. package/dist/cjs/Funnel/index.js +0 -173
  192. package/dist/cjs/GPTVis/Lite.d.ts +0 -19
  193. package/dist/cjs/GPTVis/Lite.js +0 -81
  194. package/dist/cjs/GPTVis/hooks/useContext.d.ts +0 -8
  195. package/dist/cjs/GPTVis/hooks/useContext.js +0 -49
  196. package/dist/cjs/GPTVis/hooks/useEvent.d.ts +0 -1
  197. package/dist/cjs/GPTVis/hooks/useEvent.js +0 -33
  198. package/dist/cjs/GPTVis/index.d.ts +0 -6
  199. package/dist/cjs/GPTVis/index.js +0 -42
  200. package/dist/cjs/HeatMap/index.d.ts +0 -12
  201. package/dist/cjs/HeatMap/index.js +0 -67
  202. package/dist/cjs/Histogram/index.d.ts +0 -8
  203. package/dist/cjs/Histogram/index.js +0 -79
  204. package/dist/cjs/IndentedTree/index.d.ts +0 -7
  205. package/dist/cjs/IndentedTree/index.js +0 -78
  206. package/dist/cjs/Line/index.d.ts +0 -11
  207. package/dist/cjs/Line/index.js +0 -94
  208. package/dist/cjs/Liquid/index.d.ts +0 -11
  209. package/dist/cjs/Liquid/index.js +0 -85
  210. package/dist/cjs/Map/Component/MapView.d.ts +0 -3
  211. package/dist/cjs/Map/Component/MapView.js +0 -40
  212. package/dist/cjs/Map/Component/Marker.d.ts +0 -3
  213. package/dist/cjs/Map/Component/Marker.js +0 -53
  214. package/dist/cjs/Map/Component/Polyline.d.ts +0 -3
  215. package/dist/cjs/Map/Component/Polyline.js +0 -50
  216. package/dist/cjs/Map/Component/index.d.ts +0 -4
  217. package/dist/cjs/Map/Component/index.js +0 -45
  218. package/dist/cjs/Map/data.json +0 -305
  219. package/dist/cjs/Map/index.d.ts +0 -5
  220. package/dist/cjs/Map/index.js +0 -61
  221. package/dist/cjs/MindMap/index.d.ts +0 -7
  222. package/dist/cjs/MindMap/index.js +0 -75
  223. package/dist/cjs/NetworkGraph/index.d.ts +0 -6
  224. package/dist/cjs/NetworkGraph/index.js +0 -75
  225. package/dist/cjs/OrganizationChart/index.d.ts +0 -6
  226. package/dist/cjs/OrganizationChart/index.js +0 -95
  227. package/dist/cjs/PathMap/index.d.ts +0 -6
  228. package/dist/cjs/PathMap/index.js +0 -58
  229. package/dist/cjs/Pie/index.d.ts +0 -23
  230. package/dist/cjs/Pie/index.js +0 -94
  231. package/dist/cjs/PinMap/index.d.ts +0 -6
  232. package/dist/cjs/PinMap/index.js +0 -44
  233. package/dist/cjs/PinMap/maker.svg +0 -1
  234. package/dist/cjs/Radar/index.d.ts +0 -13
  235. package/dist/cjs/Radar/index.js +0 -153
  236. package/dist/cjs/Sankey/index.d.ts +0 -14
  237. package/dist/cjs/Sankey/index.js +0 -110
  238. package/dist/cjs/Scatter/index.d.ts +0 -13
  239. package/dist/cjs/Scatter/index.js +0 -103
  240. package/dist/cjs/Spreadsheet/index.d.ts +0 -28
  241. package/dist/cjs/Spreadsheet/index.js +0 -113
  242. package/dist/cjs/Table/index.d.ts +0 -9
  243. package/dist/cjs/Table/index.js +0 -91
  244. package/dist/cjs/Text/VisText.d.ts +0 -4
  245. package/dist/cjs/Text/VisText.js +0 -82
  246. package/dist/cjs/Text/config.d.ts +0 -18
  247. package/dist/cjs/Text/config.js +0 -91
  248. package/dist/cjs/Text/custom-icons/index.d.ts +0 -3
  249. package/dist/cjs/Text/custom-icons/index.js +0 -66
  250. package/dist/cjs/Text/index.d.ts +0 -3
  251. package/dist/cjs/Text/index.js +0 -42
  252. package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
  253. package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.js +0 -65
  254. package/dist/cjs/Text/mini-charts/hooks/index.d.ts +0 -1
  255. package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
  256. package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.js +0 -65
  257. package/dist/cjs/Text/mini-charts/index.d.ts +0 -2
  258. package/dist/cjs/Text/mini-charts/index.js +0 -25
  259. package/dist/cjs/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
  260. package/dist/cjs/Text/mini-charts/line/SingleLineChart.js +0 -63
  261. package/dist/cjs/Text/mini-charts/line/index.d.ts +0 -1
  262. package/dist/cjs/Text/mini-charts/line/index.js +0 -29
  263. package/dist/cjs/Text/mini-charts/line/scaleLinear.d.ts +0 -4
  264. package/dist/cjs/Text/mini-charts/line/scaleLinear.js +0 -35
  265. package/dist/cjs/Text/mini-charts/line/useLineCompute.d.ts +0 -6
  266. package/dist/cjs/Text/mini-charts/line/useLineCompute.js +0 -103
  267. package/dist/cjs/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
  268. package/dist/cjs/Text/mini-charts/proportion/getArcPath.js +0 -51
  269. package/dist/cjs/Text/mini-charts/proportion/index.d.ts +0 -3
  270. package/dist/cjs/Text/mini-charts/proportion/index.js +0 -71
  271. package/dist/cjs/Text/theme.d.ts +0 -24
  272. package/dist/cjs/Text/theme.js +0 -52
  273. package/dist/cjs/Text/types.d.ts +0 -20
  274. package/dist/cjs/Text/types.js +0 -17
  275. package/dist/cjs/Text/utils/getThemeColor.d.ts +0 -11
  276. package/dist/cjs/Text/utils/getThemeColor.js +0 -46
  277. package/dist/cjs/Text/utils/index.d.ts +0 -2
  278. package/dist/cjs/Text/utils/index.js +0 -25
  279. package/dist/cjs/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
  280. package/dist/cjs/Text/utils/useAntdDarkAlgorithm.js +0 -40
  281. package/dist/cjs/Treemap/index.d.ts +0 -10
  282. package/dist/cjs/Treemap/index.js +0 -93
  283. package/dist/cjs/Venn/index.d.ts +0 -32
  284. package/dist/cjs/Venn/index.js +0 -87
  285. package/dist/cjs/Violin/index.d.ts +0 -10
  286. package/dist/cjs/Violin/index.js +0 -190
  287. package/dist/cjs/Waterfall/index.d.ts +0 -25
  288. package/dist/cjs/Waterfall/index.js +0 -184
  289. package/dist/cjs/WordCloud/index.d.ts +0 -9
  290. package/dist/cjs/WordCloud/index.js +0 -76
  291. package/dist/cjs/constants/index.d.ts +0 -2
  292. package/dist/cjs/constants/index.js +0 -35
  293. package/dist/cjs/export-map.browser.d.ts +0 -4
  294. package/dist/cjs/export-map.browser.js +0 -48
  295. package/dist/cjs/export-map.d.ts +0 -10
  296. package/dist/cjs/export-map.js +0 -41
  297. package/dist/cjs/export.d.ts +0 -76
  298. package/dist/cjs/export.js +0 -159
  299. package/dist/cjs/render.d.ts +0 -2
  300. package/dist/cjs/render.js +0 -67
  301. package/dist/cjs/theme.d.ts +0 -2
  302. package/dist/cjs/types/chart.d.ts +0 -88
  303. package/dist/cjs/types/chart.js +0 -61
  304. package/dist/cjs/types/config.d.ts +0 -25
  305. package/dist/cjs/types/config.js +0 -17
  306. package/dist/cjs/types/map.d.ts +0 -242
  307. package/dist/cjs/types/map.js +0 -17
  308. package/dist/cjs/utils/config.d.ts +0 -5
  309. package/dist/cjs/utils/config.js +0 -76
  310. package/dist/cjs/utils/graph.d.ts +0 -18
  311. package/dist/cjs/utils/graph.js +0 -64
  312. package/dist/cjs/utils/index.d.ts +0 -1
  313. package/dist/cjs/utils/index.js +0 -23
  314. package/dist/cjs/utils/map/context.d.ts +0 -3
  315. package/dist/cjs/utils/map/context.js +0 -45
  316. package/dist/cjs/utils/map/controls.d.ts +0 -0
  317. package/dist/cjs/utils/map/controls.js +0 -0
  318. package/dist/cjs/utils/map/index.d.ts +0 -6
  319. package/dist/cjs/utils/map/index.js +0 -33
  320. package/dist/cjs/utils/map/markers.d.ts +0 -2
  321. package/dist/cjs/utils/map/markers.js +0 -88
  322. package/dist/cjs/utils/map/polyline.d.ts +0 -2
  323. package/dist/cjs/utils/map/polyline.js +0 -52
  324. package/dist/cjs/utils/map/style.d.ts +0 -45
  325. package/dist/cjs/utils/map/style.js +0 -112
  326. package/dist/cjs/utils/map/util.d.ts +0 -1
  327. package/dist/cjs/utils/map/view.d.ts +0 -5
  328. package/dist/cjs/utils/map/view.js +0 -100
  329. package/dist/cjs/utils/palette.d.ts +0 -2
  330. package/dist/cjs/utils/palette.js +0 -54
  331. package/dist/cjs/utils/plot.d.ts +0 -5
  332. package/dist/cjs/utils/plot.js +0 -90
  333. package/dist/cjs/version.d.ts +0 -2
  334. package/dist/cjs/version.js +0 -25
  335. package/dist/esm/Area/index.d.ts +0 -11
  336. package/dist/esm/Area/index.js +0 -108
  337. package/dist/esm/Bar/index.d.ts +0 -14
  338. package/dist/esm/Bar/index.js +0 -92
  339. package/dist/esm/Boxplot/index.d.ts +0 -11
  340. package/dist/esm/Boxplot/index.js +0 -86
  341. package/dist/esm/ChartCodeRender/Loading.d.ts +0 -6
  342. package/dist/esm/ChartCodeRender/Loading.js +0 -21
  343. package/dist/esm/ChartCodeRender/VisChart.d.ts +0 -19
  344. package/dist/esm/ChartCodeRender/VisChart.js +0 -450
  345. package/dist/esm/ChartCodeRender/icon.d.ts +0 -10
  346. package/dist/esm/ChartCodeRender/icon.js +0 -103
  347. package/dist/esm/ChartCodeRender/index.d.ts +0 -8
  348. package/dist/esm/ChartCodeRender/index.js +0 -99
  349. package/dist/esm/ChartCodeRender/styles.d.ts +0 -19
  350. package/dist/esm/ChartCodeRender/styles.js +0 -61
  351. package/dist/esm/ChartCodeRender/type.d.ts +0 -176
  352. package/dist/esm/ChartCodeRender/type.js +0 -1
  353. package/dist/esm/ChartCodeRender/utils.d.ts +0 -1
  354. package/dist/esm/ChartCodeRender/utils.js +0 -37
  355. package/dist/esm/Column/index.d.ts +0 -14
  356. package/dist/esm/Column/index.js +0 -93
  357. package/dist/esm/ConfigProvider/context.d.ts +0 -3
  358. package/dist/esm/ConfigProvider/context.js +0 -3
  359. package/dist/esm/ConfigProvider/hooks/index.d.ts +0 -1
  360. package/dist/esm/ConfigProvider/hooks/index.js +0 -1
  361. package/dist/esm/ConfigProvider/hooks/useConfig.d.ts +0 -13
  362. package/dist/esm/ConfigProvider/hooks/useConfig.js +0 -71
  363. package/dist/esm/ConfigProvider/index.d.ts +0 -7
  364. package/dist/esm/ConfigProvider/index.js +0 -17
  365. package/dist/esm/DualAxes/index.d.ts +0 -20
  366. package/dist/esm/DualAxes/index.js +0 -77
  367. package/dist/esm/DualAxes/util.d.ts +0 -9
  368. package/dist/esm/DualAxes/util.js +0 -77
  369. package/dist/esm/FishboneDiagram/index.d.ts +0 -7
  370. package/dist/esm/FishboneDiagram/index.js +0 -43
  371. package/dist/esm/FlowDiagram/helper.d.ts +0 -7
  372. package/dist/esm/FlowDiagram/helper.js +0 -76
  373. package/dist/esm/FlowDiagram/index.d.ts +0 -6
  374. package/dist/esm/FlowDiagram/index.js +0 -72
  375. package/dist/esm/Funnel/index.d.ts +0 -12
  376. package/dist/esm/Funnel/index.js +0 -171
  377. package/dist/esm/GPTVis/Lite.d.ts +0 -19
  378. package/dist/esm/GPTVis/Lite.js +0 -57
  379. package/dist/esm/GPTVis/hooks/useContext.d.ts +0 -8
  380. package/dist/esm/GPTVis/hooks/useContext.js +0 -9
  381. package/dist/esm/GPTVis/hooks/useEvent.d.ts +0 -1
  382. package/dist/esm/GPTVis/hooks/useEvent.js +0 -6
  383. package/dist/esm/GPTVis/index.d.ts +0 -6
  384. package/dist/esm/GPTVis/index.js +0 -25
  385. package/dist/esm/HeatMap/index.d.ts +0 -12
  386. package/dist/esm/HeatMap/index.js +0 -45
  387. package/dist/esm/Histogram/index.d.ts +0 -8
  388. package/dist/esm/Histogram/index.js +0 -75
  389. package/dist/esm/IndentedTree/index.d.ts +0 -7
  390. package/dist/esm/IndentedTree/index.js +0 -68
  391. package/dist/esm/Line/index.d.ts +0 -11
  392. package/dist/esm/Line/index.js +0 -92
  393. package/dist/esm/Liquid/index.d.ts +0 -11
  394. package/dist/esm/Liquid/index.js +0 -100
  395. package/dist/esm/Map/Component/MapView.d.ts +0 -3
  396. package/dist/esm/Map/Component/MapView.js +0 -18
  397. package/dist/esm/Map/Component/Marker.d.ts +0 -3
  398. package/dist/esm/Map/Component/Marker.js +0 -40
  399. package/dist/esm/Map/Component/Polyline.d.ts +0 -3
  400. package/dist/esm/Map/Component/Polyline.js +0 -35
  401. package/dist/esm/Map/Component/index.d.ts +0 -4
  402. package/dist/esm/Map/Component/index.js +0 -4
  403. package/dist/esm/Map/data.json +0 -305
  404. package/dist/esm/Map/index.d.ts +0 -5
  405. package/dist/esm/Map/index.js +0 -50
  406. package/dist/esm/MindMap/index.d.ts +0 -7
  407. package/dist/esm/MindMap/index.js +0 -69
  408. package/dist/esm/NetworkGraph/index.d.ts +0 -6
  409. package/dist/esm/NetworkGraph/index.js +0 -64
  410. package/dist/esm/OrganizationChart/index.d.ts +0 -6
  411. package/dist/esm/OrganizationChart/index.js +0 -75
  412. package/dist/esm/PathMap/index.d.ts +0 -6
  413. package/dist/esm/PathMap/index.js +0 -41
  414. package/dist/esm/Pie/index.d.ts +0 -23
  415. package/dist/esm/Pie/index.js +0 -96
  416. package/dist/esm/PinMap/index.d.ts +0 -6
  417. package/dist/esm/PinMap/index.js +0 -22
  418. package/dist/esm/PinMap/maker.svg +0 -1
  419. package/dist/esm/Radar/index.d.ts +0 -13
  420. package/dist/esm/Radar/index.js +0 -150
  421. package/dist/esm/Sankey/index.d.ts +0 -14
  422. package/dist/esm/Sankey/index.js +0 -98
  423. package/dist/esm/Scatter/index.d.ts +0 -13
  424. package/dist/esm/Scatter/index.js +0 -95
  425. package/dist/esm/Spreadsheet/index.d.ts +0 -28
  426. package/dist/esm/Spreadsheet/index.js +0 -129
  427. package/dist/esm/Table/index.d.ts +0 -9
  428. package/dist/esm/Table/index.js +0 -30
  429. package/dist/esm/Text/VisText.d.ts +0 -4
  430. package/dist/esm/Text/VisText.js +0 -55
  431. package/dist/esm/Text/config.d.ts +0 -18
  432. package/dist/esm/Text/config.js +0 -82
  433. package/dist/esm/Text/custom-icons/index.d.ts +0 -3
  434. package/dist/esm/Text/custom-icons/index.js +0 -37
  435. package/dist/esm/Text/index.d.ts +0 -3
  436. package/dist/esm/Text/index.js +0 -2
  437. package/dist/esm/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
  438. package/dist/esm/Text/mini-charts/hooks/getElementFontSize.js +0 -32
  439. package/dist/esm/Text/mini-charts/hooks/index.d.ts +0 -1
  440. package/dist/esm/Text/mini-charts/hooks/index.js +0 -1
  441. package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
  442. package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.js +0 -37
  443. package/dist/esm/Text/mini-charts/index.d.ts +0 -2
  444. package/dist/esm/Text/mini-charts/index.js +0 -2
  445. package/dist/esm/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
  446. package/dist/esm/Text/mini-charts/line/SingleLineChart.js +0 -62
  447. package/dist/esm/Text/mini-charts/line/index.d.ts +0 -1
  448. package/dist/esm/Text/mini-charts/line/index.js +0 -1
  449. package/dist/esm/Text/mini-charts/line/scaleLinear.d.ts +0 -4
  450. package/dist/esm/Text/mini-charts/line/scaleLinear.js +0 -19
  451. package/dist/esm/Text/mini-charts/line/useLineCompute.d.ts +0 -6
  452. package/dist/esm/Text/mini-charts/line/useLineCompute.js +0 -118
  453. package/dist/esm/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
  454. package/dist/esm/Text/mini-charts/proportion/getArcPath.js +0 -19
  455. package/dist/esm/Text/mini-charts/proportion/index.d.ts +0 -3
  456. package/dist/esm/Text/mini-charts/proportion/index.js +0 -64
  457. package/dist/esm/Text/theme.d.ts +0 -24
  458. package/dist/esm/Text/theme.js +0 -24
  459. package/dist/esm/Text/types.d.ts +0 -20
  460. package/dist/esm/Text/types.js +0 -1
  461. package/dist/esm/Text/utils/getThemeColor.d.ts +0 -11
  462. package/dist/esm/Text/utils/getThemeColor.js +0 -29
  463. package/dist/esm/Text/utils/index.d.ts +0 -2
  464. package/dist/esm/Text/utils/index.js +0 -2
  465. package/dist/esm/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
  466. package/dist/esm/Text/utils/useAntdDarkAlgorithm.js +0 -14
  467. package/dist/esm/Treemap/index.d.ts +0 -10
  468. package/dist/esm/Treemap/index.js +0 -88
  469. package/dist/esm/Venn/index.d.ts +0 -32
  470. package/dist/esm/Venn/index.js +0 -69
  471. package/dist/esm/Violin/index.d.ts +0 -10
  472. package/dist/esm/Violin/index.js +0 -199
  473. package/dist/esm/Waterfall/index.d.ts +0 -25
  474. package/dist/esm/Waterfall/index.js +0 -185
  475. package/dist/esm/WordCloud/index.d.ts +0 -9
  476. package/dist/esm/WordCloud/index.js +0 -59
  477. package/dist/esm/constants/index.d.ts +0 -2
  478. package/dist/esm/constants/index.js +0 -9
  479. package/dist/esm/export-map.browser.d.ts +0 -4
  480. package/dist/esm/export-map.browser.js +0 -5
  481. package/dist/esm/export-map.d.ts +0 -10
  482. package/dist/esm/export-map.js +0 -9
  483. package/dist/esm/export.d.ts +0 -76
  484. package/dist/esm/export.js +0 -51
  485. package/dist/esm/render.d.ts +0 -2
  486. package/dist/esm/render.js +0 -32
  487. package/dist/esm/theme.d.ts +0 -2
  488. package/dist/esm/theme.js +0 -103
  489. package/dist/esm/types/chart.d.ts +0 -88
  490. package/dist/esm/types/chart.js +0 -33
  491. package/dist/esm/types/config.d.ts +0 -25
  492. package/dist/esm/types/config.js +0 -1
  493. package/dist/esm/types/map.d.ts +0 -242
  494. package/dist/esm/types/map.js +0 -1
  495. package/dist/esm/utils/config.d.ts +0 -5
  496. package/dist/esm/utils/config.js +0 -53
  497. package/dist/esm/utils/graph.d.ts +0 -18
  498. package/dist/esm/utils/graph.js +0 -55
  499. package/dist/esm/utils/index.d.ts +0 -1
  500. package/dist/esm/utils/index.js +0 -1
  501. package/dist/esm/utils/map/context.d.ts +0 -3
  502. package/dist/esm/utils/map/context.js +0 -42
  503. package/dist/esm/utils/map/controls.d.ts +0 -0
  504. package/dist/esm/utils/map/controls.js +0 -0
  505. package/dist/esm/utils/map/index.d.ts +0 -6
  506. package/dist/esm/utils/map/index.js +0 -6
  507. package/dist/esm/utils/map/markers.d.ts +0 -2
  508. package/dist/esm/utils/map/markers.js +0 -69
  509. package/dist/esm/utils/map/polyline.d.ts +0 -2
  510. package/dist/esm/utils/map/polyline.js +0 -31
  511. package/dist/esm/utils/map/style.d.ts +0 -45
  512. package/dist/esm/utils/map/style.js +0 -80
  513. package/dist/esm/utils/map/util.d.ts +0 -1
  514. package/dist/esm/utils/map/util.js +0 -11
  515. package/dist/esm/utils/map/view.d.ts +0 -5
  516. package/dist/esm/utils/map/view.js +0 -83
  517. package/dist/esm/utils/palette.d.ts +0 -2
  518. package/dist/esm/utils/palette.js +0 -2
  519. package/dist/esm/utils/plot.d.ts +0 -5
  520. package/dist/esm/utils/plot.js +0 -86
  521. package/dist/esm/version.d.ts +0 -2
  522. package/dist/esm/version.js +0 -1
  523. package/dist/umd/376.async.js +0 -1
  524. package/dist/umd/index.min.css +0 -1
@@ -0,0 +1,559 @@
1
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
+ /**
5
+ * GPT-Vis Syntax Parser
6
+ *
7
+ * Parses a markdown-like syntax for visualization configurations.
8
+ *
9
+ * Syntax rules:
10
+ * - `vis [chartType]` - Defines the chart type (required first line)
11
+ * - `data` - Starts a data array section
12
+ * - ` - key value` - Array item with key-value pairs
13
+ * - ` - value` - Simple array item (for flat arrays like histogram data)
14
+ * - ` - "value with spaces"` - Quoted string item; single or double quotes both supported.
15
+ * Quotes are required when the value contains spaces; optional otherwise.
16
+ * Quoted values are never coerced to numbers or booleans.
17
+ * - `key: value` or `key value` - Top-level key-value pair
18
+ * - `style` - Starts a style object section
19
+ * - `palette` inside `style` uses array syntax with dash-prefixed items
20
+ * - `children` - Nested array for hierarchical data (mind-map, treemap, etc.)
21
+ *
22
+ * @example
23
+ * ```
24
+ * vis pie
25
+ * data
26
+ * - category 分类一
27
+ * value 27
28
+ * - category 分类二
29
+ * value 25
30
+ * innerRadius: 0.6
31
+ * style
32
+ * backgroundColor #333
33
+ * palette
34
+ * - #ff5a5f
35
+ * - #1fb6ff
36
+ * - #13ce66
37
+ * ```
38
+ *
39
+ * @example Simple array (histogram)
40
+ * ```
41
+ * vis histogram
42
+ * data
43
+ * - 78
44
+ * - 88
45
+ * - 60
46
+ * binNumber 5
47
+ * ```
48
+ *
49
+ * @example Quoted string values (values containing spaces)
50
+ * ```
51
+ * vis dual-axes
52
+ * categories
53
+ * - "North America"
54
+ * - '东南 亚'
55
+ * - 欧洲
56
+ * ```
57
+ *
58
+ * @example Hierarchical data (mind-map)
59
+ * ```
60
+ * vis mind-map
61
+ * data
62
+ * - name 项目计划
63
+ * children
64
+ * - name 研究阶段
65
+ * children
66
+ * - name 市场调研
67
+ * - name 技术可行性分析
68
+ * - name 开发阶段
69
+ * ```
70
+ */
71
+
72
+ /**
73
+ * Parsed chart configuration result
74
+ */
75
+
76
+ // Known section names that contain arrays
77
+ var ARRAY_SECTIONS = new Set(['data', 'categories', 'series', 'children', 'nodes', 'edges']);
78
+
79
+ // Known section names that contain objects
80
+ var OBJECT_SECTIONS = new Set(['style']);
81
+
82
+ /**
83
+ * Try to parse a value as number, boolean, or keep as string
84
+ */
85
+ function isQuotedString(s) {
86
+ if (s.length < 2) return false;
87
+ var quote = s[0];
88
+ if (quote !== '"' && quote !== "'") return false;
89
+ return s.endsWith(quote) && s.indexOf(quote, 1) === s.length - 1;
90
+ }
91
+ function parseValue(value) {
92
+ // Trim the value
93
+ var trimmed = value.trim();
94
+
95
+ // Empty string
96
+ if (trimmed === '') {
97
+ return '';
98
+ }
99
+
100
+ // Quoted string — strip quotes and return as-is, skipping numeric/boolean coercion
101
+ if (isQuotedString(trimmed)) {
102
+ return trimmed.slice(1, -1);
103
+ }
104
+
105
+ // Boolean values
106
+ if (trimmed === 'true') return true;
107
+ if (trimmed === 'false') return false;
108
+
109
+ // Numeric values
110
+ var num = Number(trimmed);
111
+ if (!isNaN(num) && trimmed !== '') {
112
+ return num;
113
+ }
114
+ return trimmed;
115
+ }
116
+
117
+ /**
118
+ * Parse a key-value line (supports "key: value", "key=value" and "key value" formats)
119
+ * Supports Unicode characters (Chinese, Japanese, Korean, etc.) in key names
120
+ * Also supports special characters like parentheses, percent signs in key names
121
+ */
122
+ function parseKeyValue(raw) {
123
+ var text = raw.trim();
124
+ if (!text) return null;
125
+ var match = text.match(/^([^:\s=]+)\s*[:=]\s*(.*)$/);
126
+ if (match) {
127
+ return {
128
+ key: match[1],
129
+ value: match[2]
130
+ };
131
+ }
132
+ var matchSpace = text.match(/^([^\s]+)\s+(.*)$/);
133
+ if (matchSpace) {
134
+ return {
135
+ key: matchSpace[1],
136
+ value: matchSpace[2]
137
+ };
138
+ }
139
+ return {
140
+ key: text,
141
+ value: ''
142
+ };
143
+ }
144
+
145
+ /**
146
+ * Check if a value is a simple value (not a key-value pair)
147
+ * Simple values are: numbers, strings that don't look like key-value pairs
148
+ */
149
+ function isSimpleValue(line) {
150
+ var trimmed = line.trim();
151
+
152
+ // Quoted string is always a simple value, regardless of content
153
+ if (isQuotedString(trimmed)) {
154
+ return true;
155
+ }
156
+
157
+ // Check if it looks like a key-value pair
158
+ var hasKeyValue = parseKeyValue(trimmed);
159
+ if (hasKeyValue && hasKeyValue.value !== '') {
160
+ return false;
161
+ }
162
+
163
+ // It's a simple value (number, string without spaces matching key pattern)
164
+ return true;
165
+ }
166
+
167
+ /** Visual width of one tab for indent comparison (matches common 2-space nesting). */
168
+ var TAB_INDENT_WIDTH = 2;
169
+
170
+ /**
171
+ * Get the indentation level of a line (leading spaces + tabs; each tab counts as TAB_INDENT_WIDTH).
172
+ * This avoids treating a tab as "1 column" which breaks sibling vs child detection when users mix tabs and spaces.
173
+ */
174
+ function getIndentLevel(line) {
175
+ var match = line.match(/^([\t ]*)/);
176
+ if (!match) return 0;
177
+ var w = 0;
178
+ var _iterator = _createForOfIteratorHelper(match[1]),
179
+ _step;
180
+ try {
181
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
182
+ var ch = _step.value;
183
+ w += ch === '\t' ? TAB_INDENT_WIDTH : 1;
184
+ }
185
+ } catch (err) {
186
+ _iterator.e(err);
187
+ } finally {
188
+ _iterator.f();
189
+ }
190
+ return w;
191
+ }
192
+
193
+ /**
194
+ * Check if a line is an array item marker (starts with -)
195
+ */
196
+ function isArrayItemLine(line) {
197
+ return line.trim().startsWith('-');
198
+ }
199
+
200
+ /**
201
+ * Parse an array item line (removes the leading -)
202
+ */
203
+ function parseArrayItemLine(line) {
204
+ return line.trim().replace(/^-\s*/, '');
205
+ }
206
+
207
+ /**
208
+ * Check if a key is a known section name (data, style, etc.)
209
+ */
210
+ function isKnownSection(key) {
211
+ return ARRAY_SECTIONS.has(key) || OBJECT_SECTIONS.has(key);
212
+ }
213
+
214
+ /**
215
+ * Line information for parsing
216
+ */
217
+
218
+ /**
219
+ * Parse lines into line info array
220
+ */
221
+ function parseLines(syntax) {
222
+ var lines = syntax.split('\n');
223
+ var result = [];
224
+ for (var i = 0; i < lines.length; i++) {
225
+ var line = lines[i];
226
+ var trimmed = line.trim();
227
+
228
+ // Skip empty lines
229
+ if (trimmed === '') {
230
+ continue;
231
+ }
232
+ result.push({
233
+ line: line,
234
+ trimmed: trimmed,
235
+ indent: getIndentLevel(line),
236
+ lineNumber: i
237
+ });
238
+ }
239
+ return result;
240
+ }
241
+
242
+ /**
243
+ * Parse a single tree node object (for indented-tree / organization-chart root data).
244
+ * Handles key-value pairs and a nested `children` array.
245
+ */
246
+ function parseTreeNode(lines, startIndex, baseIndent) {
247
+ var node = {};
248
+ var i = startIndex;
249
+ while (i < lines.length) {
250
+ var _lines$i = lines[i],
251
+ trimmed = _lines$i.trimmed,
252
+ indent = _lines$i.indent;
253
+ if (indent <= baseIndent) break;
254
+ var kv = parseKeyValue(trimmed);
255
+ if (kv) {
256
+ if (kv.key === 'children' && kv.value === '') {
257
+ var _parseArraySection = parseArraySection(lines, i + 1, indent),
258
+ childItems = _parseArraySection.items,
259
+ nextIndex = _parseArraySection.nextIndex;
260
+ node.children = childItems;
261
+ i = nextIndex;
262
+ continue;
263
+ } else {
264
+ node[kv.key] = parseValue(kv.value);
265
+ }
266
+ }
267
+ i++;
268
+ }
269
+ return {
270
+ node: node,
271
+ nextIndex: i
272
+ };
273
+ }
274
+
275
+ /**
276
+ * Parse an array of items (data, children, etc.)
277
+ * Supports nested children arrays for hierarchical data
278
+ */
279
+ function parseArraySection(lines, startIndex, baseIndent) {
280
+ var items = [];
281
+ var currentItem = null;
282
+ var isSimpleArray = false;
283
+ var i = startIndex;
284
+ var firstItemIndent = -1;
285
+ while (i < lines.length) {
286
+ var _lines$i2 = lines[i],
287
+ trimmed = _lines$i2.trimmed,
288
+ indent = _lines$i2.indent;
289
+
290
+ // If we see something at base indent level or lower and it's not an array item,
291
+ // we're done with this section
292
+ if (indent <= baseIndent && !isArrayItemLine(trimmed)) {
293
+ break;
294
+ }
295
+
296
+ // If we see an array item strictly shallower than this `children` block, the list ends here
297
+ // (e.g. parent's next `- name` sibling). Use `<` not `<=`: when the first `-` bullet shares the
298
+ // same indent as the `children` keyword (common LLM/formatting), `<=` would break before any item.
299
+ if (isArrayItemLine(trimmed) && indent < baseIndent) {
300
+ break;
301
+ }
302
+
303
+ // Check if this is a new array item at our level
304
+ var isThisLevelItem = isArrayItemLine(trimmed) && (firstItemIndent === -1 || indent === firstItemIndent);
305
+
306
+ // Handle array item marker at our level
307
+ if (isThisLevelItem) {
308
+ // Set the first item indent if not yet set
309
+ if (firstItemIndent === -1) {
310
+ firstItemIndent = indent;
311
+ }
312
+
313
+ // Save previous item if exists
314
+ if (currentItem !== null && !isSimpleArray) {
315
+ items.push(currentItem);
316
+ }
317
+ var itemContent = parseArrayItemLine(trimmed);
318
+ if (itemContent) {
319
+ // Determine if this is a simple value or a key-value pair
320
+ if (isSimpleValue(itemContent)) {
321
+ // Simple value array (e.g., histogram data: [78, 88, 60])
322
+ isSimpleArray = true;
323
+ items.push(parseValue(itemContent));
324
+ currentItem = null;
325
+ } else {
326
+ // Object array with key-value pairs
327
+ currentItem = {};
328
+ var kv = parseKeyValue(itemContent);
329
+ if (kv) {
330
+ currentItem[kv.key] = parseValue(kv.value);
331
+ }
332
+ }
333
+ } else {
334
+ // Empty array item marker, start a new object
335
+ currentItem = {};
336
+ }
337
+ i++;
338
+ continue;
339
+ }
340
+
341
+ // Array item at a different indent than the first bullet in this section
342
+ if (isArrayItemLine(trimmed) && firstItemIndent !== -1 && indent !== firstItemIndent) {
343
+ // Shallower bullet (still inside this section): new sibling — recover from mixed indent
344
+ if (indent < firstItemIndent && indent > baseIndent && currentItem !== null && !isSimpleArray) {
345
+ items.push(currentItem);
346
+ var _itemContent = parseArrayItemLine(trimmed);
347
+ currentItem = {};
348
+ var _kv = parseKeyValue(_itemContent);
349
+ if (_kv) {
350
+ currentItem[_kv.key] = parseValue(_kv.value);
351
+ }
352
+ firstItemIndent = indent;
353
+ i++;
354
+ continue;
355
+ }
356
+ // Deeper bullet: treat as the next sibling (recover off-by-N indent). The old "implicit nested"
357
+ // branch merged these into currentItem.children and collapsed lists to a single branch — wrong
358
+ // for normal `children` blocks where bullets are only slightly deeper than the first.
359
+ if (indent > firstItemIndent && currentItem !== null && !isSimpleArray) {
360
+ items.push(currentItem);
361
+ var _itemContent2 = parseArrayItemLine(trimmed);
362
+ currentItem = {};
363
+ var _kv2 = parseKeyValue(_itemContent2);
364
+ if (_kv2) {
365
+ currentItem[_kv2.key] = parseValue(_kv2.value);
366
+ }
367
+ firstItemIndent = indent;
368
+ i++;
369
+ continue;
370
+ }
371
+ i++;
372
+ continue;
373
+ }
374
+
375
+ // Handle properties of current item (including nested children)
376
+ if (currentItem !== null && !isSimpleArray) {
377
+ var _kv3 = parseKeyValue(trimmed);
378
+ if (_kv3) {
379
+ // Check if this is a 'children' key (start of nested array)
380
+ if (_kv3.key === 'children' && _kv3.value === '') {
381
+ // Parse nested children array - the children start after this line
382
+ var _parseArraySection2 = parseArraySection(lines, i + 1, indent),
383
+ childItems = _parseArraySection2.items,
384
+ nextIndex = _parseArraySection2.nextIndex;
385
+ currentItem.children = childItems;
386
+ i = nextIndex;
387
+ continue;
388
+ }
389
+ // Same as children: dual-axes `series` items use `data` followed by `- n` lines (see site examples).
390
+ if (_kv3.key === 'data' && _kv3.value === '') {
391
+ var _parseArraySection3 = parseArraySection(lines, i + 1, indent),
392
+ nestedData = _parseArraySection3.items,
393
+ _nextIndex = _parseArraySection3.nextIndex;
394
+ currentItem.data = nestedData;
395
+ i = _nextIndex;
396
+ continue;
397
+ }
398
+ currentItem[_kv3.key] = parseValue(_kv3.value);
399
+ }
400
+ }
401
+ i++;
402
+ }
403
+
404
+ // Save last item if exists
405
+ if (currentItem !== null && !isSimpleArray) {
406
+ items.push(currentItem);
407
+ }
408
+ return {
409
+ items: items,
410
+ nextIndex: i
411
+ };
412
+ }
413
+
414
+ /**
415
+ * Parse the visualization syntax string into a configuration object
416
+ */
417
+ export function parse(syntax) {
418
+ var lines = parseLines(syntax);
419
+ var result = {
420
+ type: ''
421
+ };
422
+ var i = 0;
423
+ while (i < lines.length) {
424
+ var _lines$i3 = lines[i],
425
+ trimmed = _lines$i3.trimmed,
426
+ indent = _lines$i3.indent;
427
+
428
+ // Handle "vis [type]" declaration
429
+ if (trimmed.startsWith('vis ')) {
430
+ var chartType = trimmed.substring(4).trim();
431
+ result.type = chartType;
432
+ i++;
433
+ continue;
434
+ }
435
+
436
+ // Check for section headers (data, style, etc.) - single word, no indentation
437
+ var isSectionHeader = /^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(trimmed) && indent === 0 && isKnownSection(trimmed);
438
+ if (isSectionHeader) {
439
+ if (ARRAY_SECTIONS.has(trimmed)) {
440
+ // Check if the next non-empty indented line is a sub-section header (e.g. nodes/edges inside data)
441
+ var sectionName = trimmed;
442
+ var nextIndex = i + 1;
443
+ var hasSubSections = false;
444
+ if (nextIndex < lines.length && lines[nextIndex].indent > indent) {
445
+ var nextTrimmed = lines[nextIndex].trimmed;
446
+ hasSubSections = /^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(nextTrimmed) && !isArrayItemLine(nextTrimmed);
447
+ }
448
+ if (hasSubSections) {
449
+ // Parse as an object with named sub-arrays (e.g. data: { nodes: [], edges: [] })
450
+ var dataObj = {};
451
+ i++;
452
+ while (i < lines.length && lines[i].indent > indent) {
453
+ var subTrimmed = lines[i].trimmed;
454
+ var subIndent = lines[i].indent;
455
+ if (/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(subTrimmed) && !isArrayItemLine(subTrimmed)) {
456
+ var _parseArraySection4 = parseArraySection(lines, i + 1, subIndent),
457
+ subItems = _parseArraySection4.items,
458
+ subNext = _parseArraySection4.nextIndex;
459
+ dataObj[subTrimmed] = subItems;
460
+ i = subNext;
461
+ } else {
462
+ i++;
463
+ }
464
+ }
465
+ result[sectionName] = dataObj;
466
+ continue;
467
+ }
468
+
469
+ // Detect tree root object: first content is a key-value pair (not array item, not single-word section)
470
+ var isTreeRoot = false;
471
+ if (nextIndex < lines.length && lines[nextIndex].indent > indent) {
472
+ var firstTrimmed = lines[nextIndex].trimmed;
473
+ if (!isArrayItemLine(firstTrimmed) && !hasSubSections) {
474
+ isTreeRoot = true;
475
+ }
476
+ }
477
+ if (isTreeRoot) {
478
+ // Parse as a single tree root object (indented-tree / organization-chart data)
479
+ var _parseTreeNode = parseTreeNode(lines, i + 1, indent),
480
+ node = _parseTreeNode.node,
481
+ treeNext = _parseTreeNode.nextIndex;
482
+ result[sectionName] = node;
483
+ i = treeNext;
484
+ continue;
485
+ }
486
+
487
+ // Parse array section (standard behavior)
488
+ var _parseArraySection5 = parseArraySection(lines, i + 1, indent),
489
+ items = _parseArraySection5.items,
490
+ arrNext = _parseArraySection5.nextIndex;
491
+ if (items.length > 0) {
492
+ result[sectionName] = items;
493
+ }
494
+ i = arrNext;
495
+ continue;
496
+ } else if (OBJECT_SECTIONS.has(trimmed)) {
497
+ // Parse object section (style)
498
+ var _sectionName = trimmed;
499
+ var sectionObj = {};
500
+ result[_sectionName] = sectionObj;
501
+ var sectionIndent = indent;
502
+ i++;
503
+ while (i < lines.length) {
504
+ var _lines$i4 = lines[i],
505
+ innerTrimmed = _lines$i4.trimmed,
506
+ innerIndent = _lines$i4.indent;
507
+
508
+ // If indent goes back to section level or lower, we're done with this section
509
+ if (innerIndent <= sectionIndent) {
510
+ break;
511
+ }
512
+
513
+ // Check for array item lines (palette sub-array items)
514
+ if (isArrayItemLine(innerTrimmed)) {
515
+ i++;
516
+ continue;
517
+ }
518
+ var kv = parseKeyValue(innerTrimmed);
519
+ if (kv) {
520
+ // Check if this key is followed by dash-prefixed array items (e.g., palette)
521
+ if (kv.value === '' && i + 1 < lines.length) {
522
+ var nextLine = lines[i + 1];
523
+ if (nextLine.indent > innerIndent && isArrayItemLine(nextLine.trimmed)) {
524
+ var _parseArraySection6 = parseArraySection(lines, i + 1, innerIndent),
525
+ _items = _parseArraySection6.items,
526
+ _nextIndex2 = _parseArraySection6.nextIndex;
527
+ sectionObj[kv.key] = _items;
528
+ i = _nextIndex2;
529
+ continue;
530
+ }
531
+ }
532
+ sectionObj[kv.key] = parseValue(kv.value);
533
+ }
534
+ i++;
535
+ }
536
+ continue;
537
+ }
538
+ }
539
+
540
+ // Top-level key-value pair
541
+ if (indent === 0) {
542
+ var _kv4 = parseKeyValue(trimmed);
543
+ if (_kv4) {
544
+ result[_kv4.key] = parseValue(_kv4.value);
545
+ }
546
+ }
547
+ i++;
548
+ }
549
+ return result;
550
+ }
551
+
552
+ /**
553
+ * Check if a val is a valid visualization syntax
554
+ */
555
+ export function isVisSyntax(input) {
556
+ if (typeof input !== 'string') return false;
557
+ var trimmed = input.trim();
558
+ return trimmed.startsWith('vis ');
559
+ }
@@ -1,2 +1,33 @@
1
- export * from './chart';
2
- export type { GlobalConfig } from './config';
1
+ /**
2
+ * Common visualization options for all chart components.
3
+ * Defines the container and dimensions for rendering visualizations.
4
+ */
5
+ export interface VisualizationOptions {
6
+ container: string | HTMLElement;
7
+ width?: number;
8
+ height?: number;
9
+ theme?: 'default' | 'light' | 'dark' | 'academy';
10
+ wrapper?: boolean;
11
+ locale?: string;
12
+ }
13
+ /**
14
+ * Tree graph data structure
15
+ */
16
+ export interface TreeGraphData {
17
+ name: string;
18
+ description?: string;
19
+ children?: TreeGraphData[];
20
+ }
21
+ /**
22
+ * Network graph data structure
23
+ */
24
+ export interface GraphData {
25
+ nodes: {
26
+ name: string;
27
+ }[];
28
+ edges: {
29
+ source: string;
30
+ target: string;
31
+ name?: string;
32
+ }[];
33
+ }
@@ -1,2 +1 @@
1
- export * from "./chart";
2
1
  export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Resolve a container parameter to an HTMLElement.
3
+ * Supports CSS selectors (e.g., '#container', '.my-chart') and direct HTMLElement references.
4
+ */
5
+ export declare function resolveContainer(container: string | HTMLElement): HTMLElement;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Resolve a container parameter to an HTMLElement.
3
+ * Supports CSS selectors (e.g., '#container', '.my-chart') and direct HTMLElement references.
4
+ */
5
+ export function resolveContainer(container) {
6
+ if (typeof container === 'string') {
7
+ if (typeof document === 'undefined') {
8
+ // In a non-browser (SSR) environment, a string container cannot be resolved to a real HTMLElement.
9
+ // Throwing an error here prevents a ReferenceError from document.querySelector
10
+ // and clearly indicates that DOM resolution is not possible in this environment.
11
+ throw new Error("Container element \"".concat(container, "\" cannot be resolved in a non-browser environment."));
12
+ }
13
+ var el = document.querySelector(container);
14
+ if (!el) {
15
+ throw new Error("Container element \"".concat(container, "\" not found"));
16
+ }
17
+ return el;
18
+ }
19
+ return container;
20
+ }
@@ -0,0 +1,26 @@
1
+ export declare const DEFAULT_COLOR_PALETTE: string[];
2
+ export declare const ACADEMY_COLOR_PALETTE: string[];
3
+ export declare const THEME_MAP: Record<string, any>;
4
+ /**
5
+ * Get normalized theme name for G2.
6
+ * Converts 'default' to 'light' for G2 compatibility.
7
+ */
8
+ export declare const getTheme: (theme: string) => string;
9
+ /**
10
+ * Get theme object from THEME_MAP.
11
+ * This should be used for visualization components to properly support dark theme with multiple marks.
12
+ */
13
+ export declare const getThemeObject: (theme: string) => any;
14
+ /**
15
+ * Get theme color palette based on theme name.
16
+ */
17
+ export declare const getThemeColors: (theme: string) => string[];
18
+ /**
19
+ * Get background color based on theme.
20
+ */
21
+ export declare const getBackgroundColor: (theme: string) => string;
22
+ /**
23
+ * Normalize palette to always return an array.
24
+ * Handles the case where a single color is parsed as a string instead of an array.
25
+ */
26
+ export declare const normalizePalette: (palette: string | string[] | undefined, theme: string) => string[];