@pie-lib/charting 7.0.4-next.31 → 7.0.4-next.34

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 (272) hide show
  1. package/CHANGELOG.json +17 -0
  2. package/CHANGELOG.md +1116 -0
  3. package/LICENSE.md +5 -0
  4. package/lib/actions-button.js +145 -0
  5. package/lib/actions-button.js.map +1 -0
  6. package/lib/axes.js +643 -0
  7. package/lib/axes.js.map +1 -0
  8. package/lib/bars/bar.js +58 -0
  9. package/lib/bars/bar.js.map +1 -0
  10. package/lib/bars/common/bars.js +277 -0
  11. package/lib/bars/common/bars.js.map +1 -0
  12. package/lib/bars/common/correct-check-icon.js +54 -0
  13. package/lib/bars/common/correct-check-icon.js.map +1 -0
  14. package/lib/bars/histogram.js +59 -0
  15. package/lib/bars/histogram.js.map +1 -0
  16. package/lib/chart-setup.js +382 -0
  17. package/lib/chart-setup.js.map +1 -0
  18. package/lib/chart-type.js +80 -0
  19. package/lib/chart-type.js.map +1 -0
  20. package/lib/chart-types.js +22 -0
  21. package/lib/chart-types.js.map +1 -0
  22. package/lib/chart.js +384 -0
  23. package/lib/chart.js.map +1 -0
  24. package/lib/common/correctness-indicators.js +156 -0
  25. package/lib/common/correctness-indicators.js.map +1 -0
  26. package/lib/common/drag-handle.js +160 -0
  27. package/lib/common/drag-handle.js.map +1 -0
  28. package/lib/common/drag-icon.js +52 -0
  29. package/lib/common/drag-icon.js.map +1 -0
  30. package/lib/common/styles.js +22 -0
  31. package/lib/common/styles.js.map +1 -0
  32. package/lib/grid.js +112 -0
  33. package/lib/grid.js.map +1 -0
  34. package/lib/index.js +42 -0
  35. package/lib/index.js.map +1 -0
  36. package/lib/key-legend.js +87 -0
  37. package/lib/key-legend.js.map +1 -0
  38. package/lib/line/common/drag-handle.js +146 -0
  39. package/lib/line/common/drag-handle.js.map +1 -0
  40. package/lib/line/common/line.js +214 -0
  41. package/lib/line/common/line.js.map +1 -0
  42. package/lib/line/line-cross.js +214 -0
  43. package/lib/line/line-cross.js.map +1 -0
  44. package/lib/line/line-dot.js +158 -0
  45. package/lib/line/line-dot.js.map +1 -0
  46. package/lib/mark-label.js +237 -0
  47. package/lib/mark-label.js.map +1 -0
  48. package/lib/plot/common/plot.js +349 -0
  49. package/lib/plot/common/plot.js.map +1 -0
  50. package/lib/plot/dot.js +110 -0
  51. package/lib/plot/dot.js.map +1 -0
  52. package/lib/plot/line.js +140 -0
  53. package/lib/plot/line.js.map +1 -0
  54. package/lib/tool-menu.js +106 -0
  55. package/lib/tool-menu.js.map +1 -0
  56. package/lib/utils.js +189 -0
  57. package/lib/utils.js.map +1 -0
  58. package/package.json +28 -39
  59. package/src/__tests__/actions-button.test.jsx +280 -0
  60. package/src/__tests__/axes.test.jsx +667 -0
  61. package/src/__tests__/chart-setup.test.jsx +532 -0
  62. package/src/__tests__/chart-type.test.jsx +23 -0
  63. package/src/__tests__/chart.test.jsx +86 -0
  64. package/src/__tests__/grid.test.jsx +37 -0
  65. package/src/__tests__/key-legend.test.jsx +223 -0
  66. package/src/__tests__/mark-label.test.jsx +33 -0
  67. package/src/__tests__/tool-menu.test.jsx +522 -0
  68. package/src/__tests__/utils.js +36 -0
  69. package/src/__tests__/utils.test.js +100 -0
  70. package/src/actions-button.jsx +115 -0
  71. package/src/axes.jsx +594 -0
  72. package/src/bars/__tests__/bar.test.jsx +45 -0
  73. package/src/bars/__tests__/histogram.test.jsx +45 -0
  74. package/src/bars/__tests__/utils.js +30 -0
  75. package/src/bars/bar.js +28 -0
  76. package/src/bars/common/__tests__/bars.test.jsx +68 -0
  77. package/src/bars/common/__tests__/utils.js +30 -0
  78. package/src/bars/common/bars.jsx +249 -0
  79. package/src/bars/common/correct-check-icon.jsx +25 -0
  80. package/src/bars/histogram.js +28 -0
  81. package/src/chart-setup.jsx +356 -0
  82. package/src/chart-type.js +59 -0
  83. package/src/chart-types.js +8 -0
  84. package/src/chart.jsx +357 -0
  85. package/src/common/__tests__/correctness-indicators.test.jsx +720 -0
  86. package/src/common/__tests__/drag-handle.test.jsx +58 -0
  87. package/src/common/__tests__/utils.js +30 -0
  88. package/src/common/correctness-indicators.jsx +128 -0
  89. package/src/common/drag-handle.jsx +125 -0
  90. package/src/common/drag-icon.jsx +36 -0
  91. package/src/common/styles.js +19 -0
  92. package/src/grid.jsx +80 -0
  93. package/src/index.js +7 -0
  94. package/src/key-legend.jsx +77 -0
  95. package/src/line/__tests__/line-cross.test.jsx +463 -0
  96. package/src/line/__tests__/line-dot.test.jsx +41 -0
  97. package/src/line/__tests__/utils.js +36 -0
  98. package/src/line/common/__tests__/drag-handle.test.jsx +62 -0
  99. package/src/line/common/__tests__/line.test.jsx +79 -0
  100. package/src/line/common/__tests__/utils.js +30 -0
  101. package/src/line/common/drag-handle.jsx +114 -0
  102. package/src/line/common/line.jsx +171 -0
  103. package/src/line/line-cross.js +144 -0
  104. package/src/line/line-dot.js +111 -0
  105. package/src/mark-label.jsx +238 -0
  106. package/src/plot/__tests__/dot.test.jsx +344 -0
  107. package/src/plot/__tests__/line.test.jsx +375 -0
  108. package/src/plot/__tests__/utils.js +30 -0
  109. package/src/plot/common/__tests__/plot.test.jsx +69 -0
  110. package/src/plot/common/__tests__/utils.js +30 -0
  111. package/src/plot/common/plot.jsx +358 -0
  112. package/src/plot/dot.js +74 -0
  113. package/src/plot/line.js +98 -0
  114. package/src/tool-menu.jsx +85 -0
  115. package/src/utils.js +201 -0
  116. package/dist/_virtual/_rolldown/runtime.js +0 -23
  117. package/dist/actions-button.d.ts +0 -26
  118. package/dist/actions-button.js +0 -84
  119. package/dist/autosize-input.d.ts +0 -10
  120. package/dist/autosize-input.js +0 -66
  121. package/dist/axes.d.ts +0 -84
  122. package/dist/axes.js +0 -376
  123. package/dist/bars/bar.d.ts +0 -47
  124. package/dist/bars/bar.js +0 -27
  125. package/dist/bars/common/bars.d.ts +0 -98
  126. package/dist/bars/common/bars.js +0 -174
  127. package/dist/bars/common/correct-check-icon.d.ts +0 -18
  128. package/dist/bars/common/correct-check-icon.js +0 -50
  129. package/dist/bars/histogram.d.ts +0 -47
  130. package/dist/bars/histogram.js +0 -28
  131. package/dist/chart-setup.d.ts +0 -29
  132. package/dist/chart-setup.js +0 -231
  133. package/dist/chart-type.d.ts +0 -32
  134. package/dist/chart-type.js +0 -68
  135. package/dist/chart-types.d.ts +0 -41
  136. package/dist/chart-types.js +0 -17
  137. package/dist/chart.d.ts +0 -88
  138. package/dist/chart.js +0 -250
  139. package/dist/common/correctness-indicators.d.ts +0 -70
  140. package/dist/common/correctness-indicators.js +0 -106
  141. package/dist/common/drag-handle.d.ts +0 -129
  142. package/dist/common/drag-handle.js +0 -120
  143. package/dist/common/drag-icon.d.ts +0 -23
  144. package/dist/common/drag-icon.js +0 -45
  145. package/dist/common/styles.d.ts +0 -23
  146. package/dist/common/styles.js +0 -17
  147. package/dist/grid.d.ts +0 -45
  148. package/dist/grid.js +0 -56
  149. package/dist/index.d.ts +0 -14
  150. package/dist/index.js +0 -6
  151. package/dist/key-legend.d.ts +0 -19
  152. package/dist/key-legend.js +0 -46
  153. package/dist/line/common/drag-handle.d.ts +0 -120
  154. package/dist/line/common/drag-handle.js +0 -92
  155. package/dist/line/common/line.d.ts +0 -96
  156. package/dist/line/common/line.js +0 -114
  157. package/dist/line/line-cross.d.ts +0 -47
  158. package/dist/line/line-cross.js +0 -133
  159. package/dist/line/line-dot.d.ts +0 -47
  160. package/dist/line/line-dot.js +0 -101
  161. package/dist/mark-label.d.ts +0 -55
  162. package/dist/mark-label.js +0 -138
  163. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +0 -101
  164. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisBottom.js +0 -46
  165. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisLeft.js +0 -47
  166. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +0 -63
  167. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +0 -44
  168. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +0 -9
  169. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +0 -14
  170. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +0 -21
  171. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +0 -16
  172. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +0 -8
  173. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +0 -15
  174. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +0 -79
  175. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +0 -79
  176. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +0 -6
  177. package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +0 -50
  178. package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +0 -18
  179. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/align.js +0 -6
  180. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/base.js +0 -6
  181. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/clamp.js +0 -6
  182. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/constant.js +0 -6
  183. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/domain.js +0 -6
  184. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/exponent.js +0 -6
  185. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/interpolate.js +0 -10
  186. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/nice.js +0 -37
  187. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/padding.js +0 -6
  188. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/range.js +0 -6
  189. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/reverse.js +0 -9
  190. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/round.js +0 -7
  191. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/scaleOperator.js +0 -58
  192. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/unknown.js +0 -6
  193. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/operators/zero.js +0 -9
  194. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/band.js +0 -9
  195. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/scales/point.js +0 -9
  196. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +0 -10
  197. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/createColorInterpolator.js +0 -29
  198. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +0 -9
  199. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/isUtcScale.js +0 -7
  200. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +0 -6
  201. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Bar.js +0 -29
  202. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Circle.js +0 -29
  203. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +0 -47
  204. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js +0 -50
  205. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +0 -9
  206. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +0 -6
  207. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +0 -53
  208. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +0 -57
  209. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +0 -91
  210. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +0 -21
  211. package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-interpolate.js +0 -8
  212. package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-scale.js +0 -8
  213. package/dist/node_modules/.bun/@visx_vendor@3.12.0/node_modules/@visx/vendor/esm/d3-time.js +0 -8
  214. package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +0 -32
  215. package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +0 -33
  216. package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +0 -32
  217. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +0 -16
  218. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Hash.js +0 -21
  219. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_ListCache.js +0 -21
  220. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Map.js +0 -10
  221. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_MapCache.js +0 -21
  222. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Symbol.js +0 -9
  223. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +0 -14
  224. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +0 -15
  225. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +0 -16
  226. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_coreJsData.js +0 -9
  227. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +0 -8
  228. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getMapData.js +0 -14
  229. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getNative.js +0 -15
  230. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getRawTag.js +0 -19
  231. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getValue.js +0 -11
  232. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashClear.js +0 -13
  233. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashDelete.js +0 -12
  234. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashGet.js +0 -18
  235. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashHas.js +0 -14
  236. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashSet.js +0 -14
  237. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isKeyable.js +0 -12
  238. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isMasked.js +0 -16
  239. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +0 -11
  240. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +0 -14
  241. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +0 -14
  242. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +0 -13
  243. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +0 -14
  244. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +0 -19
  245. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +0 -14
  246. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +0 -13
  247. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +0 -13
  248. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +0 -14
  249. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +0 -9
  250. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_objectToString.js +0 -12
  251. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_root.js +0 -10
  252. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_toSource.js +0 -20
  253. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/eq.js +0 -11
  254. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/isFunction.js +0 -16
  255. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/isObject.js +0 -12
  256. package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/memoize.js +0 -20
  257. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +0 -37
  258. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +0 -509
  259. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +0 -108
  260. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +0 -31
  261. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +0 -45
  262. package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +0 -49
  263. package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +0 -34
  264. package/dist/plot/common/plot.d.ts +0 -103
  265. package/dist/plot/common/plot.js +0 -227
  266. package/dist/plot/dot.d.ts +0 -47
  267. package/dist/plot/dot.js +0 -62
  268. package/dist/plot/line.d.ts +0 -47
  269. package/dist/plot/line.js +0 -84
  270. package/dist/tool-menu.d.ts +0 -31
  271. package/dist/utils.d.ts +0 -39
  272. package/dist/utils.js +0 -101
@@ -1,49 +0,0 @@
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 };
@@ -1,34 +0,0 @@
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 };
@@ -1,103 +0,0 @@
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;
@@ -1,227 +0,0 @@
1
- import e from "../../node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/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 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 { color as d } from "@pie-lib/render-ui";
11
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
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 = c(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__ */ p("foreignObject", {
66
- x: e + t / 2 - _ / 2,
67
- y: s,
68
- width: _,
69
- height: _,
70
- children: /* @__PURE__ */ p(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__ */ p(o.Fragment, { children: /* @__PURE__ */ m("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__ */ p("rect", {
90
- x: k,
91
- y: b.y(E),
92
- width: D,
93
- height: A?.length ? j * A.length : 0,
94
- stroke: d.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(), d = S.height / C, g = (d > u ? u : d) * .8;
117
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(l, {
118
- index: a,
119
- pointDiameter: g + 10,
120
- barX: o,
121
- barWidth: u,
122
- pointHeight: d,
123
- label: r,
124
- value: n,
125
- scale: b,
126
- dottedOverline: !0
127
- }), this.renderCorrectnessIcon(o, u, e, h, b, d, g)] });
128
- }
129
- let a = [];
130
- for (let t = i; t < e; t++) a.push(t);
131
- return /* @__PURE__ */ m(f, { 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__ */ p(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: d.primaryDark(),
155
- isPlot: !0
156
- })
157
- ]
158
- }) });
159
- }
160
- })(({ theme: e }) => ({
161
- "& .dot": {
162
- fill: d.visualElementsColors.PLOT_FILL_COLOR,
163
- "&.correct": n("stroke"),
164
- "&.incorrect": r("stroke")
165
- },
166
- "& .dotColor": {
167
- fill: d.visualElementsColors.PLOT_FILL_COLOR,
168
- "&.correct": n("fill"),
169
- "&.incorrect": r("fill")
170
- },
171
- "& .line": {
172
- stroke: d.visualElementsColors.PLOT_FILL_COLOR,
173
- "&.correct": n("stroke"),
174
- "&.incorrect": r("stroke")
175
- },
176
- "& .correctIcon": { backgroundColor: d.correct() },
177
- "& .incorrectIcon": { backgroundColor: d.incorrectWithIcon() },
178
- "& .correctnessIcon": {
179
- borderRadius: e.spacing(2),
180
- color: d.defaults.WHITE,
181
- fontSize: "16px",
182
- width: "16px",
183
- height: "16px",
184
- padding: "2px",
185
- border: `1px solid ${d.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
- })), y = 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__ */ p(e, { children: (t || []).map((e, t) => /* @__PURE__ */ p(v, {
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 { y as default };
@@ -1,47 +0,0 @@
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;
package/dist/plot/dot.js DELETED
@@ -1,62 +0,0 @@
1
- import e from "../node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/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 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 { color as l } from "@pie-lib/render-ui";
10
- import { jsx as u } from "react/jsx-runtime";
11
- //#region src/plot/dot.tsx
12
- var d = s(e)(() => ({
13
- fill: l.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__ */ u(e, {
19
- cx: h,
20
- cy: g,
21
- r: m + 2,
22
- strokeDasharray: "4,4",
23
- stroke: l.defaults.BORDER_GRAY,
24
- fill: "none"
25
- }, `point-${s}-${c}-${n}`) : /* @__PURE__ */ u(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__ */ u(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 { m as default };
@@ -1,47 +0,0 @@
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;
package/dist/plot/line.js DELETED
@@ -1,84 +0,0 @@
1
- import e from "../node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
2
- import t from "../node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/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 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 { color as u } from "@pie-lib/render-ui";
11
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
12
- //#region src/plot/line.tsx
13
- var p = c(t)(() => ({
14
- stroke: u.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__ */ d("rect", {
20
- x: h - 2,
21
- y: g - r - 2,
22
- width: r + 4,
23
- height: r + 4,
24
- strokeDasharray: "4,4",
25
- stroke: u.defaults.BORDER_GRAY,
26
- fill: "none"
27
- }, `point-${s}-${c}-${n}`) : /* @__PURE__ */ f(e, { children: [/* @__PURE__ */ d(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__ */ d(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__ */ d(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 { g as default };
@@ -1,31 +0,0 @@
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;