@pie-lib/charting 7.1.0-beta.7 → 8.0.0-next.35

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 (293) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +20 -0
  2. package/dist/actions-button.d.ts +26 -0
  3. package/dist/actions-button.js +84 -0
  4. package/dist/autosize-input.d.ts +10 -0
  5. package/dist/autosize-input.js +66 -0
  6. package/dist/axes.d.ts +84 -0
  7. package/dist/axes.js +376 -0
  8. package/dist/bars/bar.d.ts +47 -0
  9. package/dist/bars/bar.js +27 -0
  10. package/dist/bars/common/bars.d.ts +98 -0
  11. package/dist/bars/common/bars.js +174 -0
  12. package/dist/bars/common/correct-check-icon.d.ts +18 -0
  13. package/dist/bars/common/correct-check-icon.js +50 -0
  14. package/dist/bars/histogram.d.ts +47 -0
  15. package/dist/bars/histogram.js +28 -0
  16. package/dist/chart-setup.d.ts +29 -0
  17. package/dist/chart-setup.js +231 -0
  18. package/dist/chart-type.d.ts +32 -0
  19. package/dist/chart-type.js +68 -0
  20. package/dist/chart-types.d.ts +41 -0
  21. package/dist/chart-types.js +17 -0
  22. package/dist/chart.d.ts +88 -0
  23. package/dist/chart.js +250 -0
  24. package/dist/common/correctness-indicators.d.ts +70 -0
  25. package/dist/common/correctness-indicators.js +106 -0
  26. package/dist/common/drag-handle.d.ts +129 -0
  27. package/dist/common/drag-handle.js +120 -0
  28. package/dist/common/drag-icon.d.ts +23 -0
  29. package/dist/common/drag-icon.js +45 -0
  30. package/dist/common/styles.d.ts +23 -0
  31. package/dist/common/styles.js +17 -0
  32. package/dist/grid.d.ts +45 -0
  33. package/dist/grid.js +56 -0
  34. package/dist/index.d.ts +14 -0
  35. package/dist/index.js +6 -0
  36. package/dist/key-legend.d.ts +19 -0
  37. package/dist/key-legend.js +46 -0
  38. package/dist/line/common/drag-handle.d.ts +120 -0
  39. package/dist/line/common/drag-handle.js +92 -0
  40. package/dist/line/common/line.d.ts +96 -0
  41. package/dist/line/common/line.js +114 -0
  42. package/dist/line/line-cross.d.ts +47 -0
  43. package/dist/line/line-cross.js +133 -0
  44. package/dist/line/line-dot.d.ts +47 -0
  45. package/dist/line/line-dot.js +101 -0
  46. package/dist/mark-label.d.ts +55 -0
  47. package/dist/mark-label.js +138 -0
  48. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Axis.js +67 -0
  49. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisBottom.js +29 -0
  50. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisLeft.js +30 -0
  51. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +66 -0
  52. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Ticks.js +39 -0
  53. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
  54. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
  55. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +13 -0
  56. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
  57. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
  58. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickPosition.js +14 -0
  59. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridColumns.js +46 -0
  60. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridRows.js +46 -0
  61. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
  62. package/dist/node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js +17 -0
  63. package/dist/node_modules/.bun/@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js +20 -0
  64. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/align.js +6 -0
  65. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/base.js +6 -0
  66. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/clamp.js +6 -0
  67. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/constant.js +6 -0
  68. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/domain.js +6 -0
  69. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/exponent.js +6 -0
  70. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/interpolate.js +10 -0
  71. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/nice.js +37 -0
  72. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/padding.js +6 -0
  73. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/range.js +6 -0
  74. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/reverse.js +9 -0
  75. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/round.js +7 -0
  76. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/scaleOperator.js +56 -0
  77. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/unknown.js +6 -0
  78. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/operators/zero.js +9 -0
  79. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/scales/band.js +9 -0
  80. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/scales/point.js +9 -0
  81. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +10 -0
  82. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/createColorInterpolator.js +29 -0
  83. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js +7 -0
  84. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/isUtcScale.js +7 -0
  85. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
  86. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Bar.js +15 -0
  87. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Circle.js +15 -0
  88. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js +27 -0
  89. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/LinePath.js +24 -0
  90. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +9 -0
  91. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +6 -0
  92. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/Text.js +27 -0
  93. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js +68 -0
  94. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/getStringWidth.js +19 -0
  95. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/memoize.js +13 -0
  96. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-interpolate.js +8 -0
  97. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-scale.js +8 -0
  98. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-shape.js +8 -0
  99. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-time.js +8 -0
  100. package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +32 -0
  101. package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +33 -0
  102. package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +32 -0
  103. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
  104. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +37 -0
  105. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +509 -0
  106. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +108 -0
  107. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +31 -0
  108. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +45 -0
  109. package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +49 -0
  110. package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +34 -0
  111. package/dist/plot/common/plot.d.ts +103 -0
  112. package/dist/plot/common/plot.js +227 -0
  113. package/dist/plot/dot.d.ts +47 -0
  114. package/dist/plot/dot.js +62 -0
  115. package/dist/plot/line.d.ts +47 -0
  116. package/dist/plot/line.js +84 -0
  117. package/dist/tool-menu.d.ts +31 -0
  118. package/dist/utils.d.ts +39 -0
  119. package/dist/utils.js +101 -0
  120. package/package.json +45 -36
  121. package/CHANGELOG.json +0 -17
  122. package/CHANGELOG.md +0 -1116
  123. package/lib/__tests__/actions-button.test.js +0 -332
  124. package/lib/__tests__/actions-button.test.js.map +0 -1
  125. package/lib/__tests__/axes.test.js +0 -746
  126. package/lib/__tests__/axes.test.js.map +0 -1
  127. package/lib/__tests__/chart-setup.test.js +0 -796
  128. package/lib/__tests__/chart-setup.test.js.map +0 -1
  129. package/lib/__tests__/chart-type.test.js +0 -25
  130. package/lib/__tests__/chart-type.test.js.map +0 -1
  131. package/lib/__tests__/chart.test.js +0 -103
  132. package/lib/__tests__/chart.test.js.map +0 -1
  133. package/lib/__tests__/grid.test.js +0 -39
  134. package/lib/__tests__/grid.test.js.map +0 -1
  135. package/lib/__tests__/key-legend.test.js +0 -235
  136. package/lib/__tests__/key-legend.test.js.map +0 -1
  137. package/lib/__tests__/mark-label.test.js +0 -46
  138. package/lib/__tests__/mark-label.test.js.map +0 -1
  139. package/lib/__tests__/tool-menu.test.js +0 -627
  140. package/lib/__tests__/tool-menu.test.js.map +0 -1
  141. package/lib/__tests__/utils.js +0 -56
  142. package/lib/__tests__/utils.js.map +0 -1
  143. package/lib/__tests__/utils.test.js +0 -186
  144. package/lib/__tests__/utils.test.js.map +0 -1
  145. package/lib/actions-button.js +0 -145
  146. package/lib/actions-button.js.map +0 -1
  147. package/lib/axes.js +0 -643
  148. package/lib/axes.js.map +0 -1
  149. package/lib/bars/__tests__/bar.test.js +0 -53
  150. package/lib/bars/__tests__/bar.test.js.map +0 -1
  151. package/lib/bars/__tests__/histogram.test.js +0 -53
  152. package/lib/bars/__tests__/histogram.test.js.map +0 -1
  153. package/lib/bars/__tests__/utils.js +0 -50
  154. package/lib/bars/__tests__/utils.js.map +0 -1
  155. package/lib/bars/bar.js +0 -58
  156. package/lib/bars/bar.js.map +0 -1
  157. package/lib/bars/common/__tests__/bars.test.js +0 -76
  158. package/lib/bars/common/__tests__/bars.test.js.map +0 -1
  159. package/lib/bars/common/__tests__/utils.js +0 -50
  160. package/lib/bars/common/__tests__/utils.js.map +0 -1
  161. package/lib/bars/common/bars.js +0 -277
  162. package/lib/bars/common/bars.js.map +0 -1
  163. package/lib/bars/common/correct-check-icon.js +0 -54
  164. package/lib/bars/common/correct-check-icon.js.map +0 -1
  165. package/lib/bars/histogram.js +0 -59
  166. package/lib/bars/histogram.js.map +0 -1
  167. package/lib/chart-setup.js +0 -382
  168. package/lib/chart-setup.js.map +0 -1
  169. package/lib/chart-type.js +0 -80
  170. package/lib/chart-type.js.map +0 -1
  171. package/lib/chart-types.js +0 -22
  172. package/lib/chart-types.js.map +0 -1
  173. package/lib/chart.js +0 -384
  174. package/lib/chart.js.map +0 -1
  175. package/lib/common/__tests__/correctness-indicators.test.js +0 -887
  176. package/lib/common/__tests__/correctness-indicators.test.js.map +0 -1
  177. package/lib/common/__tests__/drag-handle.test.js +0 -73
  178. package/lib/common/__tests__/drag-handle.test.js.map +0 -1
  179. package/lib/common/__tests__/utils.js +0 -50
  180. package/lib/common/__tests__/utils.js.map +0 -1
  181. package/lib/common/correctness-indicators.js +0 -156
  182. package/lib/common/correctness-indicators.js.map +0 -1
  183. package/lib/common/drag-handle.js +0 -160
  184. package/lib/common/drag-handle.js.map +0 -1
  185. package/lib/common/drag-icon.js +0 -52
  186. package/lib/common/drag-icon.js.map +0 -1
  187. package/lib/common/styles.js +0 -22
  188. package/lib/common/styles.js.map +0 -1
  189. package/lib/grid.js +0 -112
  190. package/lib/grid.js.map +0 -1
  191. package/lib/index.js +0 -42
  192. package/lib/index.js.map +0 -1
  193. package/lib/key-legend.js +0 -87
  194. package/lib/key-legend.js.map +0 -1
  195. package/lib/line/__tests__/line-cross.test.js +0 -617
  196. package/lib/line/__tests__/line-cross.test.js.map +0 -1
  197. package/lib/line/__tests__/line-dot.test.js +0 -47
  198. package/lib/line/__tests__/line-dot.test.js.map +0 -1
  199. package/lib/line/__tests__/utils.js +0 -56
  200. package/lib/line/__tests__/utils.js.map +0 -1
  201. package/lib/line/common/__tests__/drag-handle.test.js +0 -73
  202. package/lib/line/common/__tests__/drag-handle.test.js.map +0 -1
  203. package/lib/line/common/__tests__/line.test.js +0 -92
  204. package/lib/line/common/__tests__/line.test.js.map +0 -1
  205. package/lib/line/common/__tests__/utils.js +0 -50
  206. package/lib/line/common/__tests__/utils.js.map +0 -1
  207. package/lib/line/common/drag-handle.js +0 -146
  208. package/lib/line/common/drag-handle.js.map +0 -1
  209. package/lib/line/common/line.js +0 -214
  210. package/lib/line/common/line.js.map +0 -1
  211. package/lib/line/line-cross.js +0 -214
  212. package/lib/line/line-cross.js.map +0 -1
  213. package/lib/line/line-dot.js +0 -158
  214. package/lib/line/line-dot.js.map +0 -1
  215. package/lib/mark-label.js +0 -237
  216. package/lib/mark-label.js.map +0 -1
  217. package/lib/plot/__tests__/dot.test.js +0 -513
  218. package/lib/plot/__tests__/dot.test.js.map +0 -1
  219. package/lib/plot/__tests__/line.test.js +0 -566
  220. package/lib/plot/__tests__/line.test.js.map +0 -1
  221. package/lib/plot/__tests__/utils.js +0 -50
  222. package/lib/plot/__tests__/utils.js.map +0 -1
  223. package/lib/plot/common/__tests__/plot.test.js +0 -79
  224. package/lib/plot/common/__tests__/plot.test.js.map +0 -1
  225. package/lib/plot/common/__tests__/utils.js +0 -50
  226. package/lib/plot/common/__tests__/utils.js.map +0 -1
  227. package/lib/plot/common/plot.js +0 -349
  228. package/lib/plot/common/plot.js.map +0 -1
  229. package/lib/plot/dot.js +0 -110
  230. package/lib/plot/dot.js.map +0 -1
  231. package/lib/plot/line.js +0 -140
  232. package/lib/plot/line.js.map +0 -1
  233. package/lib/tool-menu.js +0 -106
  234. package/lib/tool-menu.js.map +0 -1
  235. package/lib/utils.js +0 -189
  236. package/lib/utils.js.map +0 -1
  237. package/src/__tests__/actions-button.test.jsx +0 -280
  238. package/src/__tests__/axes.test.jsx +0 -667
  239. package/src/__tests__/chart-setup.test.jsx +0 -532
  240. package/src/__tests__/chart-type.test.jsx +0 -23
  241. package/src/__tests__/chart.test.jsx +0 -86
  242. package/src/__tests__/grid.test.jsx +0 -37
  243. package/src/__tests__/key-legend.test.jsx +0 -223
  244. package/src/__tests__/mark-label.test.jsx +0 -33
  245. package/src/__tests__/tool-menu.test.jsx +0 -522
  246. package/src/__tests__/utils.js +0 -36
  247. package/src/__tests__/utils.test.js +0 -100
  248. package/src/actions-button.jsx +0 -115
  249. package/src/axes.jsx +0 -594
  250. package/src/bars/__tests__/bar.test.jsx +0 -45
  251. package/src/bars/__tests__/histogram.test.jsx +0 -45
  252. package/src/bars/__tests__/utils.js +0 -30
  253. package/src/bars/bar.js +0 -28
  254. package/src/bars/common/__tests__/bars.test.jsx +0 -68
  255. package/src/bars/common/__tests__/utils.js +0 -30
  256. package/src/bars/common/bars.jsx +0 -249
  257. package/src/bars/common/correct-check-icon.jsx +0 -25
  258. package/src/bars/histogram.js +0 -28
  259. package/src/chart-setup.jsx +0 -356
  260. package/src/chart-type.js +0 -59
  261. package/src/chart-types.js +0 -8
  262. package/src/chart.jsx +0 -357
  263. package/src/common/__tests__/correctness-indicators.test.jsx +0 -720
  264. package/src/common/__tests__/drag-handle.test.jsx +0 -58
  265. package/src/common/__tests__/utils.js +0 -30
  266. package/src/common/correctness-indicators.jsx +0 -128
  267. package/src/common/drag-handle.jsx +0 -125
  268. package/src/common/drag-icon.jsx +0 -36
  269. package/src/common/styles.js +0 -19
  270. package/src/grid.jsx +0 -80
  271. package/src/index.js +0 -7
  272. package/src/key-legend.jsx +0 -77
  273. package/src/line/__tests__/line-cross.test.jsx +0 -463
  274. package/src/line/__tests__/line-dot.test.jsx +0 -41
  275. package/src/line/__tests__/utils.js +0 -36
  276. package/src/line/common/__tests__/drag-handle.test.jsx +0 -62
  277. package/src/line/common/__tests__/line.test.jsx +0 -79
  278. package/src/line/common/__tests__/utils.js +0 -30
  279. package/src/line/common/drag-handle.jsx +0 -114
  280. package/src/line/common/line.jsx +0 -171
  281. package/src/line/line-cross.js +0 -144
  282. package/src/line/line-dot.js +0 -111
  283. package/src/mark-label.jsx +0 -238
  284. package/src/plot/__tests__/dot.test.jsx +0 -344
  285. package/src/plot/__tests__/line.test.jsx +0 -375
  286. package/src/plot/__tests__/utils.js +0 -30
  287. package/src/plot/common/__tests__/plot.test.jsx +0 -69
  288. package/src/plot/common/__tests__/utils.js +0 -30
  289. package/src/plot/common/plot.jsx +0 -358
  290. package/src/plot/dot.js +0 -74
  291. package/src/plot/line.js +0 -98
  292. package/src/tool-menu.jsx +0 -85
  293. package/src/utils.js +0 -201
@@ -0,0 +1,49 @@
1
+ import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_balanced_match as t } from "../../../balanced-match@0.4.2/node_modules/balanced-match/index.js";
3
+ import { require_reduce_function_call as n } from "../../../reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js";
4
+ import { require_formula_evaluator as r } from "../../../math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js";
5
+ //#region ../../../node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js
6
+ var i = /* @__PURE__ */ e(((e, i) => {
7
+ var a = t(), o = n(), s = r(), c = 100, l = /(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g, u;
8
+ i.exports = d;
9
+ function d(e, t) {
10
+ u = 0, t = 10 ** (t === void 0 ? 5 : t), e = e.replace(/\n+/g, " ");
11
+ function n(e, n, i) {
12
+ if (u++ > c) throw u = 0, Error("Call stack overflow for " + i);
13
+ if (e === "") throw Error(n + "(): '" + i + "' must contain a non-whitespace string");
14
+ e = r(e, i);
15
+ var a = f(e);
16
+ if (a.length > 1 || e.indexOf("var(") > -1) return n + "(" + e + ")";
17
+ var o = a[0] || "";
18
+ o === "%" && (e = e.replace(/\b[0-9\.]+%/g, function(e) {
19
+ return parseFloat(e.slice(0, -1)) * .01;
20
+ }));
21
+ var l = e.replace(new RegExp(o, "gi"), ""), d;
22
+ try {
23
+ d = s.eval(l);
24
+ } catch {
25
+ return n + "(" + e + ")";
26
+ }
27
+ return o === "%" && (d *= 100), (n.length || o === "%") && (d = Math.round(d * t) / t), d += o, d;
28
+ }
29
+ function r(e, t) {
30
+ e = e.replace(/((?:\-[a-z]+\-)?calc)/g, "");
31
+ for (var r = "", i = e, o; o = l.exec(i);) {
32
+ o[0].index > 0 && (r += i.substring(0, o[0].index));
33
+ var s = a("(", ")", i.substring([0].index));
34
+ if (s.body === "") throw Error("'" + e + "' must contain a non-whitespace string");
35
+ var c = n(s.body, "", t);
36
+ r += s.pre + c, i = s.post;
37
+ }
38
+ return r + i;
39
+ }
40
+ return o(e, /((?:\-[a-z]+\-)?calc)\(/, n);
41
+ }
42
+ function f(e) {
43
+ for (var t = [], n = [], r = /[\.0-9]([%a-z]+)/gi, i = r.exec(e); i;) !i || !i[1] || (n.indexOf(i[1].toLowerCase()) === -1 && (t.push(i[1]), n.push(i[1].toLowerCase())), i = r.exec(e));
44
+ return t;
45
+ }
46
+ }));
47
+ //#endregion
48
+ export default i();
49
+ export { i as require_reduce_css_calc };
@@ -0,0 +1,34 @@
1
+ import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_balanced_match as t } from "../../../balanced-match@1.0.2/node_modules/balanced-match/index.js";
3
+ //#region ../../../node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js
4
+ var n = /* @__PURE__ */ e(((e, n) => {
5
+ var r = t();
6
+ n.exports = i;
7
+ function i(e, t, n) {
8
+ var r = e;
9
+ return a(e, t).reduce(function(e, i) {
10
+ return e.replace(i.functionIdentifier + "(" + i.matches.body + ")", o(i.matches.body, i.functionIdentifier, n, r, t));
11
+ }, e);
12
+ }
13
+ function a(e, t) {
14
+ var n = [], i = typeof t == "string" ? RegExp("\\b(" + t + ")\\(") : t;
15
+ do {
16
+ var a = i.exec(e);
17
+ if (!a) return n;
18
+ if (a[1] === void 0) throw Error("Missing the first couple of parenthesis to get the function identifier in " + t);
19
+ var o = a[1], s = a.index, c = r("(", ")", e.substring(s));
20
+ if (!c || c.start !== a[0].length - 1) throw SyntaxError(o + "(): missing closing ')' in the value '" + e + "'");
21
+ n.push({
22
+ matches: c,
23
+ functionIdentifier: o
24
+ }), e = c.post;
25
+ } while (i.test(e));
26
+ return n;
27
+ }
28
+ function o(e, t, n, r, a) {
29
+ return n(i(e, a, n), t, r);
30
+ }
31
+ }));
32
+ //#endregion
33
+ export default n();
34
+ export { n as require_reduce_function_call };
@@ -0,0 +1,103 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/charting/src/plot/common/plot.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class RawPlot extends React.Component {
12
+ static propTypes: {
13
+ onChangeCategory: PropTypes.Requireable<(...args: any[]) => any>;
14
+ value: PropTypes.Requireable<number>;
15
+ label: PropTypes.Requireable<string>;
16
+ xBand: PropTypes.Requireable<(...args: any[]) => any>;
17
+ index: PropTypes.Validator<number>;
18
+ graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
19
+ scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
20
+ x: PropTypes.Validator<(...args: any[]) => any>;
21
+ y: PropTypes.Validator<(...args: any[]) => any>;
22
+ }>>>;
23
+ snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
24
+ x: PropTypes.Validator<(...args: any[]) => any>;
25
+ y: PropTypes.Validator<(...args: any[]) => any>;
26
+ }>>>;
27
+ domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
28
+ min: PropTypes.Validator<number>;
29
+ max: PropTypes.Validator<number>;
30
+ step: PropTypes.Requireable<number>;
31
+ }>>>;
32
+ range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
33
+ min: PropTypes.Validator<number>;
34
+ max: PropTypes.Validator<number>;
35
+ step: PropTypes.Requireable<number>;
36
+ }>>>;
37
+ size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
38
+ width: PropTypes.Validator<number>;
39
+ height: PropTypes.Validator<number>;
40
+ }>>>;
41
+ }>>>;
42
+ CustomBarElement: PropTypes.Requireable<(...args: any[]) => any>;
43
+ interactive: PropTypes.Requireable<boolean>;
44
+ correctness: PropTypes.Requireable<PropTypes.InferProps<{
45
+ value: PropTypes.Requireable<string>;
46
+ label: PropTypes.Requireable<string>;
47
+ }>>;
48
+ defineChart: PropTypes.Requireable<boolean>;
49
+ correctData: PropTypes.Requireable<(PropTypes.InferProps<{
50
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
51
+ label: PropTypes.Requireable<string>;
52
+ }> | null | undefined)[]>;
53
+ className: PropTypes.Requireable<string>;
54
+ };
55
+ constructor(props: any);
56
+ handleMouseEnter: any;
57
+ handleMouseLeave: any;
58
+ setDragValue: (dragValue: any) => void;
59
+ dragStop: any;
60
+ dragValue: any;
61
+ renderCorrectnessIcon: any;
62
+ render(): React.JSX.Element;
63
+ }
64
+ export declare class Plot extends React.Component {
65
+ static propTypes: {
66
+ data: PropTypes.Requireable<any[]>;
67
+ onChangeCategory: PropTypes.Requireable<(...args: any[]) => any>;
68
+ xBand: PropTypes.Requireable<(...args: any[]) => any>;
69
+ graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
70
+ scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
71
+ x: PropTypes.Validator<(...args: any[]) => any>;
72
+ y: PropTypes.Validator<(...args: any[]) => any>;
73
+ }>>>;
74
+ snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
75
+ x: PropTypes.Validator<(...args: any[]) => any>;
76
+ y: PropTypes.Validator<(...args: any[]) => any>;
77
+ }>>>;
78
+ domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
79
+ min: PropTypes.Validator<number>;
80
+ max: PropTypes.Validator<number>;
81
+ step: PropTypes.Requireable<number>;
82
+ }>>>;
83
+ range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
84
+ min: PropTypes.Validator<number>;
85
+ max: PropTypes.Validator<number>;
86
+ step: PropTypes.Requireable<number>;
87
+ }>>>;
88
+ size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
89
+ width: PropTypes.Validator<number>;
90
+ height: PropTypes.Validator<number>;
91
+ }>>>;
92
+ }>>>;
93
+ defineChart: PropTypes.Requireable<boolean>;
94
+ CustomBarElement: PropTypes.Requireable<(...args: any[]) => any>;
95
+ correctData: PropTypes.Requireable<(PropTypes.InferProps<{
96
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
97
+ label: PropTypes.Requireable<string>;
98
+ }> | null | undefined)[]>;
99
+ className: PropTypes.Requireable<string>;
100
+ };
101
+ render(): React.JSX.Element;
102
+ }
103
+ export default Plot;
@@ -0,0 +1,227 @@
1
+ import e from "../../node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js";
2
+ import { bandKey as t } from "../../utils.js";
3
+ import { correct as n, incorrect as r } from "../../common/styles.js";
4
+ import { D as i, DragHandle as a } from "../../common/drag-handle.js";
5
+ import o from "react";
6
+ import s from "prop-types";
7
+ import { styled as c } from "@mui/material/styles";
8
+ import l from "debug";
9
+ import { types as u } from "@pie-lib/plot";
10
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
11
+ import { color as m } from "@pie-lib/render-ui";
12
+ import h from "@mui/icons-material/Check";
13
+ //#region src/plot/common/plot.tsx
14
+ var g = l("pie-lib:chart:bars"), _ = 16, v = class extends o.Component {
15
+ static propTypes = {
16
+ onChangeCategory: s.func,
17
+ value: s.number,
18
+ label: s.string,
19
+ xBand: s.func,
20
+ index: s.number.isRequired,
21
+ graphProps: u.GraphPropsType.isRequired,
22
+ CustomBarElement: s.func,
23
+ interactive: s.bool,
24
+ correctness: s.shape({
25
+ value: s.string,
26
+ label: s.string
27
+ }),
28
+ defineChart: s.bool,
29
+ correctData: s.arrayOf(s.shape({
30
+ value: s.oneOfType([s.string, s.number]),
31
+ label: s.string
32
+ })),
33
+ className: s.string
34
+ };
35
+ constructor(e) {
36
+ super(e), this.state = {
37
+ dragValue: void 0,
38
+ isHovered: !1
39
+ };
40
+ }
41
+ handleMouseEnter = () => {
42
+ this.setState({ isHovered: !0 });
43
+ };
44
+ handleMouseLeave = () => {
45
+ this.setState({ isHovered: !1 });
46
+ };
47
+ setDragValue = (e) => this.setState({ dragValue: e });
48
+ dragStop = () => {
49
+ let { label: e, onChangeCategory: t } = this.props, { dragValue: n } = this.state;
50
+ g("[dragStop]", n), n !== void 0 && t({
51
+ label: e,
52
+ value: n
53
+ }), this.setDragValue(void 0);
54
+ };
55
+ dragValue = (e, t) => {
56
+ g("[dragValue] next:", t), this.setDragValue(t);
57
+ };
58
+ renderCorrectnessIcon = (e, t, n, r, i, a, o) => {
59
+ let s;
60
+ if (n === 0) s = i.y(0) - _ / 2;
61
+ else {
62
+ let e = n - 1;
63
+ s = i.y(e) - (a - o) / 2 - o / 2 - _ / 2;
64
+ }
65
+ return /* @__PURE__ */ f("foreignObject", {
66
+ x: e + t / 2 - _ / 2,
67
+ y: s,
68
+ width: _,
69
+ height: _,
70
+ children: /* @__PURE__ */ f(h, {
71
+ className: "correctnessIcon correctIcon smallIcon",
72
+ title: r.label
73
+ })
74
+ });
75
+ };
76
+ render() {
77
+ let { graphProps: e, value: n, label: r, xBand: s, index: c, CustomBarElement: l, interactive: u, correctness: h, defineChart: _, correctData: v, className: y } = this.props, { scale: b, range: x, size: S } = e, { max: C } = x || {}, { dragValue: w, isHovered: T } = this.state, E = Number.isFinite(w) ? w : n, D = s.bandwidth(), O = b.y(x.max - E), k = s(t({ label: r }, c));
78
+ g("label:", r, "barX:", k, "v: ", E, "barHeight:", O, "barWidth: ", D);
79
+ let A = [];
80
+ for (let e = 0; e < E; e++) A.push(e);
81
+ let j = S.height / C, M = (j > D ? D : j) * .8, N = u ? i : a, P = u && !h;
82
+ return /* @__PURE__ */ f(o.Fragment, { children: /* @__PURE__ */ p("g", {
83
+ className: y,
84
+ onMouseEnter: this.handleMouseEnter,
85
+ onMouseLeave: this.handleMouseLeave,
86
+ onTouchStart: this.handleMouseEnter,
87
+ onTouchEnd: this.handleMouseLeave,
88
+ children: [
89
+ T && P && /* @__PURE__ */ f("rect", {
90
+ x: k,
91
+ y: b.y(E),
92
+ width: D,
93
+ height: A?.length ? j * A.length : 0,
94
+ stroke: m.defaults.BORDER_GRAY,
95
+ strokeWidth: "4px",
96
+ fill: "transparent"
97
+ }),
98
+ A.map((e) => l({
99
+ index: e,
100
+ pointDiameter: M,
101
+ barX: k,
102
+ barWidth: D,
103
+ pointHeight: j,
104
+ label: r,
105
+ value: n,
106
+ scale: b
107
+ })),
108
+ h && h.value === "incorrect" && (() => {
109
+ let e = parseFloat(v[c] && v[c].value);
110
+ if (isNaN(e)) return null;
111
+ let i = E;
112
+ if (e === 0) return this.renderCorrectnessIcon(k, D, e, h, b, j, M);
113
+ if (i > e) {
114
+ let i = [];
115
+ for (let t = 0; t < e; t++) i.push(t);
116
+ let a = i[i.length - 1], o = s(t({ label: r }, c)), u = s.bandwidth(), m = S.height / C, g = (m > u ? u : m) * .8;
117
+ return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(l, {
118
+ index: a,
119
+ pointDiameter: g + 10,
120
+ barX: o,
121
+ barWidth: u,
122
+ pointHeight: m,
123
+ label: r,
124
+ value: n,
125
+ scale: b,
126
+ dottedOverline: !0
127
+ }), this.renderCorrectnessIcon(o, u, e, h, b, m, g)] });
128
+ }
129
+ let a = [];
130
+ for (let t = i; t < e; t++) a.push(t);
131
+ return /* @__PURE__ */ p(d, { children: [a.map((e) => l({
132
+ index: e,
133
+ pointDiameter: M,
134
+ barX: k,
135
+ barWidth: D,
136
+ pointHeight: j,
137
+ label: r,
138
+ value: n,
139
+ scale: b,
140
+ dottedOverline: !0
141
+ })), this.renderCorrectnessIcon(k, D, e, h, b, j, M)] });
142
+ })(),
143
+ /* @__PURE__ */ f(N, {
144
+ x: k,
145
+ y: E,
146
+ interactive: u,
147
+ width: D,
148
+ onDrag: (e) => this.dragValue(n, e),
149
+ onDragStop: this.dragStop,
150
+ graphProps: e,
151
+ correctness: h,
152
+ isHovered: T,
153
+ defineChart: _,
154
+ color: m.primaryDark(),
155
+ isPlot: !0
156
+ })
157
+ ]
158
+ }) });
159
+ }
160
+ }, y = c(v)(({ theme: e }) => ({
161
+ "& .dot": {
162
+ fill: m.visualElementsColors.PLOT_FILL_COLOR,
163
+ "&.correct": n("stroke"),
164
+ "&.incorrect": r("stroke")
165
+ },
166
+ "& .dotColor": {
167
+ fill: m.visualElementsColors.PLOT_FILL_COLOR,
168
+ "&.correct": n("fill"),
169
+ "&.incorrect": r("fill")
170
+ },
171
+ "& .line": {
172
+ stroke: m.visualElementsColors.PLOT_FILL_COLOR,
173
+ "&.correct": n("stroke"),
174
+ "&.incorrect": r("stroke")
175
+ },
176
+ "& .correctIcon": { backgroundColor: m.correct() },
177
+ "& .incorrectIcon": { backgroundColor: m.incorrectWithIcon() },
178
+ "& .correctnessIcon": {
179
+ borderRadius: e.spacing(2),
180
+ color: m.defaults.WHITE,
181
+ fontSize: "16px",
182
+ width: "16px",
183
+ height: "16px",
184
+ padding: "2px",
185
+ border: `1px solid ${m.defaults.WHITE}`,
186
+ stroke: "initial",
187
+ boxSizing: "unset",
188
+ display: "block"
189
+ },
190
+ "& .smallIcon": {
191
+ fontSize: "10px",
192
+ width: "10px",
193
+ height: "10px"
194
+ }
195
+ })), b = class extends o.Component {
196
+ static propTypes = {
197
+ data: s.array,
198
+ onChangeCategory: s.func,
199
+ xBand: s.func,
200
+ graphProps: u.GraphPropsType.isRequired,
201
+ defineChart: s.bool,
202
+ CustomBarElement: s.func,
203
+ correctData: s.arrayOf(s.shape({
204
+ value: s.oneOfType([s.string, s.number]),
205
+ label: s.string
206
+ })),
207
+ className: s.string
208
+ };
209
+ render() {
210
+ let { data: t, graphProps: n, xBand: r, CustomBarElement: i, onChangeCategory: a, defineChart: o, correctData: s } = this.props;
211
+ return /* @__PURE__ */ f(e, { children: (t || []).map((e, t) => /* @__PURE__ */ f(y, {
212
+ value: e.value,
213
+ label: e.label,
214
+ interactive: o || e.interactive,
215
+ defineChart: o,
216
+ xBand: r,
217
+ index: t,
218
+ onChangeCategory: (e) => a(t, e),
219
+ graphProps: n,
220
+ CustomBarElement: i,
221
+ correctness: e.correctness,
222
+ correctData: s
223
+ }, `bar-${e.label}-${e.value}-${t}`)) });
224
+ }
225
+ };
226
+ //#endregion
227
+ export { b as Plot, b as default, v as RawPlot };
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/charting/src/plot/dot.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class DotPlot extends React.Component {
12
+ static propTypes: {
13
+ data: PropTypes.Requireable<any[]>;
14
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
15
+ graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
16
+ scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
17
+ x: PropTypes.Validator<(...args: any[]) => any>;
18
+ y: PropTypes.Validator<(...args: any[]) => any>;
19
+ }>>>;
20
+ snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
21
+ x: PropTypes.Validator<(...args: any[]) => any>;
22
+ y: PropTypes.Validator<(...args: any[]) => any>;
23
+ }>>>;
24
+ domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
25
+ min: PropTypes.Validator<number>;
26
+ max: PropTypes.Validator<number>;
27
+ step: PropTypes.Requireable<number>;
28
+ }>>>;
29
+ range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
30
+ min: PropTypes.Validator<number>;
31
+ max: PropTypes.Validator<number>;
32
+ step: PropTypes.Requireable<number>;
33
+ }>>>;
34
+ size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
35
+ width: PropTypes.Validator<number>;
36
+ height: PropTypes.Validator<number>;
37
+ }>>>;
38
+ }>>>;
39
+ };
40
+ render(): React.JSX.Element;
41
+ }
42
+ declare const _default: () => {
43
+ type: string;
44
+ Component: typeof DotPlot;
45
+ name: string;
46
+ };
47
+ export default _default;
@@ -0,0 +1,62 @@
1
+ import e from "../node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Circle.js";
2
+ import { dataToXBand as t } from "../utils.js";
3
+ import { correct as n, incorrect as r } from "../common/styles.js";
4
+ import { Plot as i } from "./common/plot.js";
5
+ import a from "react";
6
+ import o from "prop-types";
7
+ import { styled as s } from "@mui/material/styles";
8
+ import { types as c } from "@pie-lib/plot";
9
+ import { jsx as l } from "react/jsx-runtime";
10
+ import { color as u } from "@pie-lib/render-ui";
11
+ //#region src/plot/dot.tsx
12
+ var d = s(e)(() => ({
13
+ fill: u.visualElementsColors.PLOT_FILL_COLOR,
14
+ "&.correct": n("stroke"),
15
+ "&.incorrect": r("stroke")
16
+ })), f = (t) => {
17
+ let { index: n, pointDiameter: r, barX: i, barWidth: a, pointHeight: o, label: s, value: c, scale: f, dottedOverline: p } = t, m = r / 2, h = i + (a - r) / 2 + m, g = f.y(n) - (o - r) / 2 - m;
18
+ return p ? /* @__PURE__ */ l(e, {
19
+ cx: h,
20
+ cy: g,
21
+ r: m + 2,
22
+ strokeDasharray: "4,4",
23
+ stroke: u.defaults.BORDER_GRAY,
24
+ fill: "none"
25
+ }, `point-${s}-${c}-${n}`) : /* @__PURE__ */ l(d, {
26
+ cx: h,
27
+ cy: g,
28
+ r: m
29
+ }, `point-${s}-${c}-${n}`);
30
+ };
31
+ f.propTypes = {
32
+ index: o.number,
33
+ pointDiameter: o.number,
34
+ barX: o.number,
35
+ barWidth: o.number,
36
+ pointHeight: o.number,
37
+ value: o.number,
38
+ label: o.string,
39
+ scale: o.object,
40
+ dottedOverline: o.bool
41
+ };
42
+ var p = class extends a.Component {
43
+ static propTypes = {
44
+ data: o.array,
45
+ onChange: o.func,
46
+ graphProps: c.GraphPropsType.isRequired
47
+ };
48
+ render() {
49
+ let e = this.props, { data: n, graphProps: r } = e, { scale: a = {}, size: o = {} } = r || {}, s = t(a.x, n, o.width, "dotPlot");
50
+ return /* @__PURE__ */ l(i, {
51
+ ...e,
52
+ xBand: s,
53
+ CustomBarElement: f
54
+ });
55
+ }
56
+ }, m = () => ({
57
+ type: "dotPlot",
58
+ Component: p,
59
+ name: "Dot Plot"
60
+ });
61
+ //#endregion
62
+ export { p as DotPlot, m as default };
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/charting/src/plot/line.js
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class LinePlot extends React.Component {
12
+ static propTypes: {
13
+ data: PropTypes.Requireable<any[]>;
14
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
15
+ graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
16
+ scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
17
+ x: PropTypes.Validator<(...args: any[]) => any>;
18
+ y: PropTypes.Validator<(...args: any[]) => any>;
19
+ }>>>;
20
+ snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
21
+ x: PropTypes.Validator<(...args: any[]) => any>;
22
+ y: PropTypes.Validator<(...args: any[]) => any>;
23
+ }>>>;
24
+ domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
25
+ min: PropTypes.Validator<number>;
26
+ max: PropTypes.Validator<number>;
27
+ step: PropTypes.Requireable<number>;
28
+ }>>>;
29
+ range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
30
+ min: PropTypes.Validator<number>;
31
+ max: PropTypes.Validator<number>;
32
+ step: PropTypes.Requireable<number>;
33
+ }>>>;
34
+ size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
35
+ width: PropTypes.Validator<number>;
36
+ height: PropTypes.Validator<number>;
37
+ }>>>;
38
+ }>>>;
39
+ };
40
+ render(): React.JSX.Element;
41
+ }
42
+ declare const _default: () => {
43
+ type: string;
44
+ Component: typeof LinePlot;
45
+ name: string;
46
+ };
47
+ export default _default;
@@ -0,0 +1,84 @@
1
+ import e from "../node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js";
2
+ import t from "../node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/LinePath.js";
3
+ import { dataToXBand as n } from "../utils.js";
4
+ import { correct as r, incorrect as i } from "../common/styles.js";
5
+ import { Plot as a } from "./common/plot.js";
6
+ import o from "react";
7
+ import s from "prop-types";
8
+ import { styled as c } from "@mui/material/styles";
9
+ import { types as l } from "@pie-lib/plot";
10
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
11
+ import { color as f } from "@pie-lib/render-ui";
12
+ //#region src/plot/line.tsx
13
+ var p = c(t)(() => ({
14
+ stroke: f.visualElementsColors.PLOT_FILL_COLOR,
15
+ "&.correct": r("stroke"),
16
+ "&.incorrect": i("stroke")
17
+ })), m = (t) => {
18
+ let { index: n, pointDiameter: r, barX: i, barWidth: a, pointHeight: o, label: s, value: c, scale: l, dottedOverline: m } = t, h = i + (a - r) / 2, g = l.y(n) - (o - r) / 2;
19
+ return m ? /* @__PURE__ */ u("rect", {
20
+ x: h - 2,
21
+ y: g - r - 2,
22
+ width: r + 4,
23
+ height: r + 4,
24
+ strokeDasharray: "4,4",
25
+ stroke: f.defaults.BORDER_GRAY,
26
+ fill: "none"
27
+ }, `point-${s}-${c}-${n}`) : /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u(p, {
28
+ data: [{
29
+ x: h,
30
+ y: g
31
+ }, {
32
+ x: h + r,
33
+ y: g - r
34
+ }],
35
+ className: "line",
36
+ x: (e) => e.x,
37
+ y: (e) => e.y,
38
+ strokeWidth: r / 5
39
+ }, `point-${s}-${c}-${n}-1`), /* @__PURE__ */ u(p, {
40
+ data: [{
41
+ x: h,
42
+ y: g - r
43
+ }, {
44
+ x: h + r,
45
+ y: g
46
+ }],
47
+ x: (e) => e.x,
48
+ y: (e) => e.y,
49
+ strokeWidth: r / 5,
50
+ className: "line"
51
+ }, `point-${s}-${c}-${n}-2`)] });
52
+ };
53
+ m.propTypes = {
54
+ index: s.number,
55
+ pointDiameter: s.number,
56
+ barX: s.number,
57
+ barWidth: s.number,
58
+ pointHeight: s.number,
59
+ value: s.number,
60
+ label: s.string,
61
+ scale: s.object,
62
+ dottedOverline: s.bool
63
+ };
64
+ var h = class extends o.Component {
65
+ static propTypes = {
66
+ data: s.array,
67
+ onChange: s.func,
68
+ graphProps: l.GraphPropsType.isRequired
69
+ };
70
+ render() {
71
+ let e = this.props, { data: t, graphProps: r } = e, { scale: i = {}, size: o = {} } = r || {}, s = n(i.x, t, o.width, "linePlot");
72
+ return /* @__PURE__ */ u(a, {
73
+ ...e,
74
+ xBand: s,
75
+ CustomBarElement: m
76
+ });
77
+ }
78
+ }, g = () => ({
79
+ type: "linePlot",
80
+ Component: h,
81
+ name: "Line Plot"
82
+ });
83
+ //#endregion
84
+ export { h as LinePlot, g as default };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/charting/src/tool-menu.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare const MiniButton: {
12
+ (props: any): React.JSX.Element;
13
+ propTypes: {
14
+ disabled: PropTypes.Requireable<boolean>;
15
+ className: PropTypes.Requireable<string>;
16
+ selected: PropTypes.Requireable<boolean>;
17
+ value: PropTypes.Requireable<string>;
18
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
19
+ };
20
+ };
21
+ export declare class ToolMenu extends React.Component {
22
+ static propTypes: {
23
+ className: PropTypes.Requireable<string>;
24
+ addCategory: PropTypes.Requireable<(...args: any[]) => any>;
25
+ disabled: PropTypes.Requireable<boolean>;
26
+ language: PropTypes.Requireable<string>;
27
+ };
28
+ static defaultProps: {};
29
+ render(): React.JSX.Element;
30
+ }
31
+ export default ToolMenu;