@pie-lib/graphing 4.1.0-beta.7 → 5.0.0-next.36

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 (505) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +20 -0
  2. package/dist/autosize-input.d.ts +10 -0
  3. package/dist/autosize-input.js +66 -0
  4. package/dist/axis/arrow.d.ts +13 -0
  5. package/dist/axis/arrow.js +34 -0
  6. package/dist/axis/axes.d.ts +132 -0
  7. package/dist/axis/axes.js +214 -0
  8. package/dist/axis/index.d.ts +10 -0
  9. package/dist/bg.d.ts +51 -0
  10. package/dist/bg.js +44 -0
  11. package/dist/container/actions.d.ts +15 -0
  12. package/dist/container/actions.js +7 -0
  13. package/dist/container/index.d.ts +58 -0
  14. package/dist/container/index.js +48 -0
  15. package/dist/container/marks.d.ts +10 -0
  16. package/dist/container/marks.js +11 -0
  17. package/dist/container/middleware.d.ts +10 -0
  18. package/dist/container/middleware.js +4 -0
  19. package/dist/container/reducer.d.ts +14 -0
  20. package/dist/container/reducer.js +7 -0
  21. package/dist/coordinates-label.d.ts +50 -0
  22. package/dist/coordinates-label.js +46 -0
  23. package/dist/graph-with-controls.d.ts +88 -0
  24. package/dist/graph-with-controls.js +156 -0
  25. package/dist/graph.d.ts +126 -0
  26. package/dist/graph.js +209 -0
  27. package/dist/grid-setup.d.ts +27 -0
  28. package/dist/grid-setup.js +307 -0
  29. package/dist/grid.d.ts +43 -0
  30. package/dist/grid.js +59 -0
  31. package/dist/index.d.ts +15 -0
  32. package/dist/index.js +7 -0
  33. package/dist/key-legend.d.ts +21 -0
  34. package/dist/key-legend.js +231 -0
  35. package/dist/label-svg-icon.d.ts +18 -0
  36. package/dist/label-svg-icon.js +42 -0
  37. package/dist/labels.d.ts +37 -0
  38. package/dist/labels.js +152 -0
  39. package/dist/mark-label.d.ts +60 -0
  40. package/dist/mark-label.js +222 -0
  41. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Axis.js +67 -0
  42. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +66 -0
  43. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/axis/Ticks.js +39 -0
  44. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
  45. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
  46. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +13 -0
  47. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
  48. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
  49. package/dist/node_modules/.bun/@visx_axis@4.0.0_d84c32d47042070f/node_modules/@visx/axis/esm/utils/getTickPosition.js +14 -0
  50. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/Grid.js +43 -0
  51. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridColumns.js +46 -0
  52. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/grids/GridRows.js +46 -0
  53. package/dist/node_modules/.bun/@visx_grid@4.0.0_d84c32d47042070f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
  54. package/dist/node_modules/.bun/@visx_group@4.0.0_d84c32d47042070f/node_modules/@visx/group/esm/Group.js +17 -0
  55. package/dist/node_modules/.bun/@visx_point@4.0.0/node_modules/@visx/point/esm/Point.js +20 -0
  56. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +10 -0
  57. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/getTicks.js +7 -0
  58. package/dist/node_modules/.bun/@visx_scale@4.0.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
  59. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/Line.js +27 -0
  60. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/shapes/LinePath.js +24 -0
  61. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +9 -0
  62. package/dist/node_modules/.bun/@visx_shape@4.0.0_d84c32d47042070f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +6 -0
  63. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/Text.js +27 -0
  64. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/hooks/useText.js +68 -0
  65. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/getStringWidth.js +19 -0
  66. package/dist/node_modules/.bun/@visx_text@4.0.0_d84c32d47042070f/node_modules/@visx/text/esm/util/memoize.js +13 -0
  67. package/dist/node_modules/.bun/@visx_vendor@4.0.0/node_modules/@visx/vendor/esm/d3-shape.js +8 -0
  68. package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +32 -0
  69. package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +33 -0
  70. package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +32 -0
  71. package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
  72. package/dist/node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js +28 -0
  73. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +37 -0
  74. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +509 -0
  75. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +108 -0
  76. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +31 -0
  77. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +45 -0
  78. package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +49 -0
  79. package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +34 -0
  80. package/dist/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +185 -0
  81. package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +198 -0
  82. package/dist/toggle-bar.d.ts +40 -0
  83. package/dist/toggle-bar.js +155 -0
  84. package/dist/tool-menu.d.ts +29 -0
  85. package/dist/tool-menu.js +41 -0
  86. package/dist/tools/absolute/component.d.ts +16 -0
  87. package/dist/tools/absolute/component.js +15 -0
  88. package/dist/tools/absolute/index.d.ts +20 -0
  89. package/dist/tools/absolute/index.js +32 -0
  90. package/dist/tools/circle/bg-circle.d.ts +116 -0
  91. package/dist/tools/circle/bg-circle.js +72 -0
  92. package/dist/tools/circle/component.d.ts +88 -0
  93. package/dist/tools/circle/component.js +208 -0
  94. package/dist/tools/circle/index.d.ts +20 -0
  95. package/dist/tools/circle/index.js +22 -0
  96. package/dist/tools/exponential/component.d.ts +16 -0
  97. package/dist/tools/exponential/component.js +14 -0
  98. package/dist/tools/exponential/index.d.ts +20 -0
  99. package/dist/tools/exponential/index.js +32 -0
  100. package/dist/tools/index.d.ts +27 -0
  101. package/dist/tools/index.js +55 -0
  102. package/dist/tools/line/component.d.ts +124 -0
  103. package/dist/tools/line/component.js +72 -0
  104. package/dist/tools/line/index.d.ts +13 -0
  105. package/dist/tools/line/index.js +6 -0
  106. package/dist/tools/parabola/component.d.ts +16 -0
  107. package/dist/tools/parabola/component.js +14 -0
  108. package/dist/tools/parabola/index.d.ts +20 -0
  109. package/dist/tools/parabola/index.js +32 -0
  110. package/dist/tools/point/component.d.ts +52 -0
  111. package/dist/tools/point/component.js +91 -0
  112. package/dist/tools/point/index.d.ts +15 -0
  113. package/dist/tools/point/index.js +13 -0
  114. package/dist/tools/polygon/component.d.ts +125 -0
  115. package/dist/tools/polygon/component.js +271 -0
  116. package/dist/tools/polygon/index.d.ts +19 -0
  117. package/dist/tools/polygon/index.js +55 -0
  118. package/dist/tools/polygon/line.d.ts +125 -0
  119. package/dist/tools/polygon/line.js +63 -0
  120. package/dist/tools/polygon/polygon.d.ts +122 -0
  121. package/dist/tools/polygon/polygon.js +74 -0
  122. package/dist/tools/ray/component.d.ts +101 -0
  123. package/dist/tools/ray/component.js +71 -0
  124. package/dist/tools/ray/index.d.ts +13 -0
  125. package/dist/tools/ray/index.js +6 -0
  126. package/dist/tools/segment/component.d.ts +100 -0
  127. package/dist/tools/segment/component.js +52 -0
  128. package/dist/tools/segment/index.d.ts +13 -0
  129. package/dist/tools/segment/index.js +6 -0
  130. package/dist/tools/shared/arrow-head.d.ts +51 -0
  131. package/dist/tools/shared/arrow-head.js +63 -0
  132. package/dist/tools/shared/icons/CorrectSVG.d.ts +26 -0
  133. package/dist/tools/shared/icons/CorrectSVG.js +29 -0
  134. package/dist/tools/shared/icons/IncorrectSVG.d.ts +26 -0
  135. package/dist/tools/shared/icons/IncorrectSVG.js +27 -0
  136. package/dist/tools/shared/icons/MissingSVG.d.ts +26 -0
  137. package/dist/tools/shared/icons/MissingSVG.js +28 -0
  138. package/dist/tools/shared/line/index.d.ts +251 -0
  139. package/dist/tools/shared/line/index.js +332 -0
  140. package/dist/tools/shared/line/line-path.d.ts +57 -0
  141. package/dist/tools/shared/line/line-path.js +71 -0
  142. package/dist/tools/shared/line/with-root-edge.d.ts +148 -0
  143. package/dist/tools/shared/line/with-root-edge.js +73 -0
  144. package/dist/tools/shared/point/arrow-point.d.ts +56 -0
  145. package/dist/tools/shared/point/arrow-point.js +41 -0
  146. package/dist/tools/shared/point/arrow.d.ts +45 -0
  147. package/dist/tools/shared/point/arrow.js +35 -0
  148. package/dist/tools/shared/point/base-point.d.ts +52 -0
  149. package/dist/tools/shared/point/base-point.js +103 -0
  150. package/dist/tools/shared/point/index.d.ts +216 -0
  151. package/dist/tools/shared/point/index.js +45 -0
  152. package/dist/tools/shared/styles.d.ts +29 -0
  153. package/dist/tools/shared/styles.js +20 -0
  154. package/dist/tools/shared/types.d.ts +21 -0
  155. package/dist/tools/shared/types.js +11 -0
  156. package/dist/tools/sine/component.d.ts +16 -0
  157. package/dist/tools/sine/component.js +22 -0
  158. package/dist/tools/sine/index.d.ts +20 -0
  159. package/dist/tools/sine/index.js +32 -0
  160. package/dist/tools/vector/component.d.ts +100 -0
  161. package/dist/tools/vector/component.js +44 -0
  162. package/dist/tools/vector/index.d.ts +13 -0
  163. package/dist/tools/vector/index.js +6 -0
  164. package/dist/undo-redo.d.ts +22 -0
  165. package/dist/undo-redo.js +47 -0
  166. package/dist/use-debounce.d.ts +9 -0
  167. package/dist/use-debounce.js +13 -0
  168. package/dist/utils.d.ts +61 -0
  169. package/dist/utils.js +75 -0
  170. package/package.json +51 -41
  171. package/CHANGELOG.json +0 -1
  172. package/CHANGELOG.md +0 -1469
  173. package/lib/__tests__/bg.test.js +0 -282
  174. package/lib/__tests__/bg.test.js.map +0 -1
  175. package/lib/__tests__/coordinates-label.test.js +0 -276
  176. package/lib/__tests__/coordinates-label.test.js.map +0 -1
  177. package/lib/__tests__/graph-with-controls.test.js +0 -275
  178. package/lib/__tests__/graph-with-controls.test.js.map +0 -1
  179. package/lib/__tests__/graph.test.js +0 -927
  180. package/lib/__tests__/graph.test.js.map +0 -1
  181. package/lib/__tests__/grid-setup.test.js +0 -729
  182. package/lib/__tests__/grid-setup.test.js.map +0 -1
  183. package/lib/__tests__/grid.test.js +0 -29
  184. package/lib/__tests__/grid.test.js.map +0 -1
  185. package/lib/__tests__/key-legend.test.js +0 -321
  186. package/lib/__tests__/key-legend.test.js.map +0 -1
  187. package/lib/__tests__/label-svg-icon.test.js +0 -373
  188. package/lib/__tests__/label-svg-icon.test.js.map +0 -1
  189. package/lib/__tests__/labels.test.js +0 -61
  190. package/lib/__tests__/labels.test.js.map +0 -1
  191. package/lib/__tests__/mark-label.test.js +0 -133
  192. package/lib/__tests__/mark-label.test.js.map +0 -1
  193. package/lib/__tests__/toggle-bar.test.js +0 -197
  194. package/lib/__tests__/toggle-bar.test.js.map +0 -1
  195. package/lib/__tests__/tool-menu.test.js +0 -151
  196. package/lib/__tests__/tool-menu.test.js.map +0 -1
  197. package/lib/__tests__/undo-redo.test.js +0 -31
  198. package/lib/__tests__/undo-redo.test.js.map +0 -1
  199. package/lib/__tests__/use-debounce.test.js +0 -24
  200. package/lib/__tests__/use-debounce.test.js.map +0 -1
  201. package/lib/__tests__/utils.js +0 -70
  202. package/lib/__tests__/utils.js.map +0 -1
  203. package/lib/__tests__/utils.test.js +0 -123
  204. package/lib/__tests__/utils.test.js.map +0 -1
  205. package/lib/axis/__tests__/arrow.test.js +0 -60
  206. package/lib/axis/__tests__/arrow.test.js.map +0 -1
  207. package/lib/axis/__tests__/axes.test.js +0 -195
  208. package/lib/axis/__tests__/axes.test.js.map +0 -1
  209. package/lib/axis/arrow.js +0 -79
  210. package/lib/axis/arrow.js.map +0 -1
  211. package/lib/axis/axes.js +0 -329
  212. package/lib/axis/axes.js.map +0 -1
  213. package/lib/axis/index.js +0 -21
  214. package/lib/axis/index.js.map +0 -1
  215. package/lib/bg.js +0 -114
  216. package/lib/bg.js.map +0 -1
  217. package/lib/container/__tests__/actions.test.js +0 -108
  218. package/lib/container/__tests__/actions.test.js.map +0 -1
  219. package/lib/container/__tests__/index.test.js +0 -503
  220. package/lib/container/__tests__/index.test.js.map +0 -1
  221. package/lib/container/__tests__/marks.test.js +0 -259
  222. package/lib/container/__tests__/marks.test.js.map +0 -1
  223. package/lib/container/__tests__/middleware.test.js +0 -244
  224. package/lib/container/__tests__/middleware.test.js.map +0 -1
  225. package/lib/container/__tests__/reducer.test.js +0 -450
  226. package/lib/container/__tests__/reducer.test.js.map +0 -1
  227. package/lib/container/actions.js +0 -18
  228. package/lib/container/actions.js.map +0 -1
  229. package/lib/container/index.js +0 -127
  230. package/lib/container/index.js.map +0 -1
  231. package/lib/container/marks.js +0 -22
  232. package/lib/container/marks.js.map +0 -1
  233. package/lib/container/middleware.js +0 -19
  234. package/lib/container/middleware.js.map +0 -1
  235. package/lib/container/reducer.js +0 -18
  236. package/lib/container/reducer.js.map +0 -1
  237. package/lib/coordinates-label.js +0 -79
  238. package/lib/coordinates-label.js.map +0 -1
  239. package/lib/graph-with-controls.js +0 -294
  240. package/lib/graph-with-controls.js.map +0 -1
  241. package/lib/graph.js +0 -327
  242. package/lib/graph.js.map +0 -1
  243. package/lib/grid-setup.js +0 -414
  244. package/lib/grid-setup.js.map +0 -1
  245. package/lib/grid.js +0 -131
  246. package/lib/grid.js.map +0 -1
  247. package/lib/index.js +0 -47
  248. package/lib/index.js.map +0 -1
  249. package/lib/key-legend.js +0 -201
  250. package/lib/key-legend.js.map +0 -1
  251. package/lib/label-svg-icon.js +0 -50
  252. package/lib/label-svg-icon.js.map +0 -1
  253. package/lib/labels.js +0 -243
  254. package/lib/labels.js.map +0 -1
  255. package/lib/mark-label.js +0 -285
  256. package/lib/mark-label.js.map +0 -1
  257. package/lib/toggle-bar.js +0 -252
  258. package/lib/toggle-bar.js.map +0 -1
  259. package/lib/tool-menu.js +0 -78
  260. package/lib/tool-menu.js.map +0 -1
  261. package/lib/tools/absolute/__tests__/component.test.js +0 -65
  262. package/lib/tools/absolute/__tests__/component.test.js.map +0 -1
  263. package/lib/tools/absolute/component.js +0 -29
  264. package/lib/tools/absolute/component.js.map +0 -1
  265. package/lib/tools/absolute/index.js +0 -50
  266. package/lib/tools/absolute/index.js.map +0 -1
  267. package/lib/tools/circle/__tests__/bg-circle.test.js +0 -33
  268. package/lib/tools/circle/__tests__/bg-circle.test.js.map +0 -1
  269. package/lib/tools/circle/__tests__/component.test.js +0 -615
  270. package/lib/tools/circle/__tests__/component.test.js.map +0 -1
  271. package/lib/tools/circle/__tests__/index.test.js +0 -576
  272. package/lib/tools/circle/__tests__/index.test.js.map +0 -1
  273. package/lib/tools/circle/bg-circle.js +0 -123
  274. package/lib/tools/circle/bg-circle.js.map +0 -1
  275. package/lib/tools/circle/component.js +0 -321
  276. package/lib/tools/circle/component.js.map +0 -1
  277. package/lib/tools/circle/index.js +0 -41
  278. package/lib/tools/circle/index.js.map +0 -1
  279. package/lib/tools/exponential/__tests__/component.test.js +0 -64
  280. package/lib/tools/exponential/__tests__/component.test.js.map +0 -1
  281. package/lib/tools/exponential/__tests__/index.test.js +0 -828
  282. package/lib/tools/exponential/__tests__/index.test.js.map +0 -1
  283. package/lib/tools/exponential/component.js +0 -28
  284. package/lib/tools/exponential/component.js.map +0 -1
  285. package/lib/tools/exponential/index.js +0 -56
  286. package/lib/tools/exponential/index.js.map +0 -1
  287. package/lib/tools/index.js +0 -86
  288. package/lib/tools/index.js.map +0 -1
  289. package/lib/tools/line/__tests__/component.test.js +0 -45
  290. package/lib/tools/line/__tests__/component.test.js.map +0 -1
  291. package/lib/tools/line/component.js +0 -97
  292. package/lib/tools/line/component.js.map +0 -1
  293. package/lib/tools/line/index.js +0 -11
  294. package/lib/tools/line/index.js.map +0 -1
  295. package/lib/tools/parabola/__tests__/component.test.js +0 -64
  296. package/lib/tools/parabola/__tests__/component.test.js.map +0 -1
  297. package/lib/tools/parabola/__tests__/index.test.js +0 -564
  298. package/lib/tools/parabola/__tests__/index.test.js.map +0 -1
  299. package/lib/tools/parabola/component.js +0 -28
  300. package/lib/tools/parabola/component.js.map +0 -1
  301. package/lib/tools/parabola/index.js +0 -50
  302. package/lib/tools/parabola/index.js.map +0 -1
  303. package/lib/tools/point/__tests__/component.test.js +0 -434
  304. package/lib/tools/point/__tests__/component.test.js.map +0 -1
  305. package/lib/tools/point/__tests__/index.test.js +0 -262
  306. package/lib/tools/point/__tests__/index.test.js.map +0 -1
  307. package/lib/tools/point/component.js +0 -148
  308. package/lib/tools/point/component.js.map +0 -1
  309. package/lib/tools/point/index.js +0 -24
  310. package/lib/tools/point/index.js.map +0 -1
  311. package/lib/tools/polygon/__tests__/component.test.js +0 -485
  312. package/lib/tools/polygon/__tests__/component.test.js.map +0 -1
  313. package/lib/tools/polygon/__tests__/index.test.js +0 -303
  314. package/lib/tools/polygon/__tests__/index.test.js.map +0 -1
  315. package/lib/tools/polygon/__tests__/line.test.js +0 -50
  316. package/lib/tools/polygon/__tests__/line.test.js.map +0 -1
  317. package/lib/tools/polygon/__tests__/polygon.test.js +0 -85
  318. package/lib/tools/polygon/__tests__/polygon.test.js.map +0 -1
  319. package/lib/tools/polygon/component.js +0 -437
  320. package/lib/tools/polygon/component.js.map +0 -1
  321. package/lib/tools/polygon/index.js +0 -89
  322. package/lib/tools/polygon/index.js.map +0 -1
  323. package/lib/tools/polygon/line.js +0 -112
  324. package/lib/tools/polygon/line.js.map +0 -1
  325. package/lib/tools/polygon/polygon.js +0 -130
  326. package/lib/tools/polygon/polygon.js.map +0 -1
  327. package/lib/tools/ray/__tests__/component.test.js +0 -35
  328. package/lib/tools/ray/__tests__/component.test.js.map +0 -1
  329. package/lib/tools/ray/component.js +0 -95
  330. package/lib/tools/ray/component.js.map +0 -1
  331. package/lib/tools/ray/index.js +0 -11
  332. package/lib/tools/ray/index.js.map +0 -1
  333. package/lib/tools/segment/__tests__/component.test.js +0 -35
  334. package/lib/tools/segment/__tests__/component.test.js.map +0 -1
  335. package/lib/tools/segment/component.js +0 -71
  336. package/lib/tools/segment/component.js.map +0 -1
  337. package/lib/tools/segment/index.js +0 -11
  338. package/lib/tools/segment/index.js.map +0 -1
  339. package/lib/tools/shared/__tests__/arrow-head.test.js +0 -45
  340. package/lib/tools/shared/__tests__/arrow-head.test.js.map +0 -1
  341. package/lib/tools/shared/arrow-head.js +0 -111
  342. package/lib/tools/shared/arrow-head.js.map +0 -1
  343. package/lib/tools/shared/icons/CorrectSVG.js +0 -40
  344. package/lib/tools/shared/icons/CorrectSVG.js.map +0 -1
  345. package/lib/tools/shared/icons/IncorrectSVG.js +0 -40
  346. package/lib/tools/shared/icons/IncorrectSVG.js.map +0 -1
  347. package/lib/tools/shared/icons/MissingSVG.js +0 -39
  348. package/lib/tools/shared/icons/MissingSVG.js.map +0 -1
  349. package/lib/tools/shared/line/__tests__/index.test.js +0 -124
  350. package/lib/tools/shared/line/__tests__/index.test.js.map +0 -1
  351. package/lib/tools/shared/line/__tests__/line-path.test.js +0 -62
  352. package/lib/tools/shared/line/__tests__/line-path.test.js.map +0 -1
  353. package/lib/tools/shared/line/__tests__/with-root-edge.test.js +0 -90
  354. package/lib/tools/shared/line/__tests__/with-root-edge.test.js.map +0 -1
  355. package/lib/tools/shared/line/index.js +0 -550
  356. package/lib/tools/shared/line/index.js.map +0 -1
  357. package/lib/tools/shared/line/line-path.js +0 -118
  358. package/lib/tools/shared/line/line-path.js.map +0 -1
  359. package/lib/tools/shared/line/with-root-edge.js +0 -121
  360. package/lib/tools/shared/line/with-root-edge.js.map +0 -1
  361. package/lib/tools/shared/point/__tests__/arrow-point.test.js +0 -127
  362. package/lib/tools/shared/point/__tests__/arrow-point.test.js.map +0 -1
  363. package/lib/tools/shared/point/__tests__/base-point.test.js +0 -122
  364. package/lib/tools/shared/point/__tests__/base-point.test.js.map +0 -1
  365. package/lib/tools/shared/point/arrow-point.js +0 -72
  366. package/lib/tools/shared/point/arrow-point.js.map +0 -1
  367. package/lib/tools/shared/point/arrow.js +0 -67
  368. package/lib/tools/shared/point/arrow.js.map +0 -1
  369. package/lib/tools/shared/point/base-point.js +0 -157
  370. package/lib/tools/shared/point/base-point.js.map +0 -1
  371. package/lib/tools/shared/point/index.js +0 -68
  372. package/lib/tools/shared/point/index.js.map +0 -1
  373. package/lib/tools/shared/styles.js +0 -33
  374. package/lib/tools/shared/styles.js.map +0 -1
  375. package/lib/tools/shared/types.js +0 -16
  376. package/lib/tools/shared/types.js.map +0 -1
  377. package/lib/tools/sine/__tests__/component.test.js +0 -72
  378. package/lib/tools/sine/__tests__/component.test.js.map +0 -1
  379. package/lib/tools/sine/component.js +0 -40
  380. package/lib/tools/sine/component.js.map +0 -1
  381. package/lib/tools/sine/index.js +0 -50
  382. package/lib/tools/sine/index.js.map +0 -1
  383. package/lib/tools/vector/__tests__/component.test.js +0 -32
  384. package/lib/tools/vector/__tests__/component.test.js.map +0 -1
  385. package/lib/tools/vector/component.js +0 -68
  386. package/lib/tools/vector/component.js.map +0 -1
  387. package/lib/tools/vector/index.js +0 -11
  388. package/lib/tools/vector/index.js.map +0 -1
  389. package/lib/undo-redo.js +0 -86
  390. package/lib/undo-redo.js.map +0 -1
  391. package/lib/use-debounce.js +0 -25
  392. package/lib/use-debounce.js.map +0 -1
  393. package/lib/utils.js +0 -229
  394. package/lib/utils.js.map +0 -1
  395. package/src/__tests__/bg.test.jsx +0 -250
  396. package/src/__tests__/coordinates-label.test.jsx +0 -243
  397. package/src/__tests__/graph-with-controls.test.jsx +0 -198
  398. package/src/__tests__/graph.test.jsx +0 -721
  399. package/src/__tests__/grid-setup.test.jsx +0 -645
  400. package/src/__tests__/grid.test.jsx +0 -22
  401. package/src/__tests__/key-legend.test.jsx +0 -260
  402. package/src/__tests__/label-svg-icon.test.jsx +0 -278
  403. package/src/__tests__/labels.test.jsx +0 -55
  404. package/src/__tests__/mark-label.test.jsx +0 -63
  405. package/src/__tests__/toggle-bar.test.jsx +0 -146
  406. package/src/__tests__/tool-menu.test.jsx +0 -115
  407. package/src/__tests__/undo-redo.test.jsx +0 -24
  408. package/src/__tests__/use-debounce.test.js +0 -21
  409. package/src/__tests__/utils.js +0 -41
  410. package/src/__tests__/utils.test.js +0 -105
  411. package/src/axis/__tests__/arrow.test.jsx +0 -38
  412. package/src/axis/__tests__/axes.test.jsx +0 -216
  413. package/src/axis/arrow.jsx +0 -57
  414. package/src/axis/axes.jsx +0 -285
  415. package/src/axis/index.js +0 -3
  416. package/src/bg.jsx +0 -96
  417. package/src/container/__tests__/actions.test.js +0 -105
  418. package/src/container/__tests__/index.test.jsx +0 -319
  419. package/src/container/__tests__/marks.test.js +0 -172
  420. package/src/container/__tests__/middleware.test.js +0 -235
  421. package/src/container/__tests__/reducer.test.js +0 -324
  422. package/src/container/actions.js +0 -8
  423. package/src/container/index.jsx +0 -91
  424. package/src/container/marks.js +0 -14
  425. package/src/container/middleware.js +0 -7
  426. package/src/container/reducer.js +0 -5
  427. package/src/coordinates-label.jsx +0 -63
  428. package/src/graph-with-controls.jsx +0 -239
  429. package/src/graph.jsx +0 -303
  430. package/src/grid-setup.jsx +0 -432
  431. package/src/grid.jsx +0 -133
  432. package/src/index.js +0 -7
  433. package/src/key-legend.jsx +0 -142
  434. package/src/label-svg-icon.jsx +0 -39
  435. package/src/labels.jsx +0 -207
  436. package/src/mark-label.jsx +0 -244
  437. package/src/toggle-bar.jsx +0 -224
  438. package/src/tool-menu.jsx +0 -49
  439. package/src/tools/absolute/__tests__/component.test.jsx +0 -53
  440. package/src/tools/absolute/component.jsx +0 -23
  441. package/src/tools/absolute/index.js +0 -31
  442. package/src/tools/circle/__tests__/bg-circle.test.jsx +0 -26
  443. package/src/tools/circle/__tests__/component.test.jsx +0 -494
  444. package/src/tools/circle/__tests__/index.test.js +0 -480
  445. package/src/tools/circle/bg-circle.jsx +0 -81
  446. package/src/tools/circle/component.jsx +0 -264
  447. package/src/tools/circle/index.js +0 -25
  448. package/src/tools/exponential/__tests__/component.test.jsx +0 -53
  449. package/src/tools/exponential/__tests__/index.test.js +0 -729
  450. package/src/tools/exponential/component.jsx +0 -23
  451. package/src/tools/exponential/index.js +0 -39
  452. package/src/tools/index.js +0 -48
  453. package/src/tools/line/__tests__/component.test.jsx +0 -37
  454. package/src/tools/line/component.jsx +0 -93
  455. package/src/tools/line/index.js +0 -4
  456. package/src/tools/parabola/__tests__/component.test.jsx +0 -48
  457. package/src/tools/parabola/__tests__/index.test.js +0 -470
  458. package/src/tools/parabola/component.jsx +0 -23
  459. package/src/tools/parabola/index.js +0 -31
  460. package/src/tools/point/__tests__/component.test.jsx +0 -349
  461. package/src/tools/point/__tests__/index.test.js +0 -241
  462. package/src/tools/point/component.jsx +0 -126
  463. package/src/tools/point/index.js +0 -11
  464. package/src/tools/polygon/__tests__/component.test.jsx +0 -471
  465. package/src/tools/polygon/__tests__/index.test.js +0 -294
  466. package/src/tools/polygon/__tests__/line.test.jsx +0 -35
  467. package/src/tools/polygon/__tests__/polygon.test.jsx +0 -61
  468. package/src/tools/polygon/component.jsx +0 -409
  469. package/src/tools/polygon/index.js +0 -52
  470. package/src/tools/polygon/line.jsx +0 -74
  471. package/src/tools/polygon/polygon.jsx +0 -110
  472. package/src/tools/ray/__tests__/component.test.jsx +0 -29
  473. package/src/tools/ray/component.jsx +0 -92
  474. package/src/tools/ray/index.js +0 -4
  475. package/src/tools/segment/__tests__/component.test.jsx +0 -28
  476. package/src/tools/segment/component.jsx +0 -65
  477. package/src/tools/segment/index.js +0 -4
  478. package/src/tools/shared/__tests__/arrow-head.test.jsx +0 -31
  479. package/src/tools/shared/arrow-head.jsx +0 -102
  480. package/src/tools/shared/icons/CorrectSVG.jsx +0 -32
  481. package/src/tools/shared/icons/IncorrectSVG.jsx +0 -30
  482. package/src/tools/shared/icons/MissingSVG.jsx +0 -31
  483. package/src/tools/shared/line/__tests__/index.test.jsx +0 -109
  484. package/src/tools/shared/line/__tests__/line-path.test.jsx +0 -53
  485. package/src/tools/shared/line/__tests__/with-root-edge.test.jsx +0 -73
  486. package/src/tools/shared/line/index.jsx +0 -487
  487. package/src/tools/shared/line/line-path.jsx +0 -80
  488. package/src/tools/shared/line/with-root-edge.jsx +0 -97
  489. package/src/tools/shared/point/__tests__/arrow-point.test.jsx +0 -91
  490. package/src/tools/shared/point/__tests__/base-point.test.jsx +0 -87
  491. package/src/tools/shared/point/arrow-point.jsx +0 -46
  492. package/src/tools/shared/point/arrow.jsx +0 -37
  493. package/src/tools/shared/point/base-point.jsx +0 -121
  494. package/src/tools/shared/point/index.jsx +0 -54
  495. package/src/tools/shared/styles.js +0 -27
  496. package/src/tools/shared/types.js +0 -10
  497. package/src/tools/sine/__tests__/component.test.jsx +0 -51
  498. package/src/tools/sine/component.jsx +0 -32
  499. package/src/tools/sine/index.js +0 -33
  500. package/src/tools/vector/__tests__/component.test.jsx +0 -25
  501. package/src/tools/vector/component.jsx +0 -56
  502. package/src/tools/vector/index.js +0 -4
  503. package/src/undo-redo.jsx +0 -45
  504. package/src/use-debounce.js +0 -13
  505. package/src/utils.js +0 -224
@@ -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,185 @@
1
+ //#region ../../../node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.mjs
2
+ var e = {
3
+ UNDO: "@@redux-undo/UNDO",
4
+ REDO: "@@redux-undo/REDO",
5
+ JUMP_TO_FUTURE: "@@redux-undo/JUMP_TO_FUTURE",
6
+ JUMP_TO_PAST: "@@redux-undo/JUMP_TO_PAST",
7
+ JUMP: "@@redux-undo/JUMP",
8
+ CLEAR_HISTORY: "@@redux-undo/CLEAR_HISTORY"
9
+ }, t = {
10
+ undo() {
11
+ return { type: e.UNDO };
12
+ },
13
+ redo() {
14
+ return { type: e.REDO };
15
+ },
16
+ jumpToFuture(t) {
17
+ return {
18
+ type: e.JUMP_TO_FUTURE,
19
+ index: t
20
+ };
21
+ },
22
+ jumpToPast(t) {
23
+ return {
24
+ type: e.JUMP_TO_PAST,
25
+ index: t
26
+ };
27
+ },
28
+ jump(t) {
29
+ return {
30
+ type: e.JUMP,
31
+ index: t
32
+ };
33
+ },
34
+ clearHistory() {
35
+ return { type: e.CLEAR_HISTORY };
36
+ }
37
+ };
38
+ function n(e, t = []) {
39
+ return Array.isArray(e) ? e : typeof e == "string" ? [e] : t;
40
+ }
41
+ function r(e) {
42
+ return typeof e.present < "u" && typeof e.future < "u" && typeof e.past < "u" && Array.isArray(e.future) && Array.isArray(e.past);
43
+ }
44
+ function i(e, t, n, r = null) {
45
+ return {
46
+ past: e,
47
+ present: t,
48
+ future: n,
49
+ group: r,
50
+ _latestUnfiltered: t,
51
+ index: e.length,
52
+ limit: e.length + n.length + 1
53
+ };
54
+ }
55
+ var a, o, s = {
56
+ prevState: "#9E9E9E",
57
+ action: "#03A9F4",
58
+ nextState: "#4CAF50"
59
+ };
60
+ function c() {
61
+ o = {
62
+ header: [],
63
+ prev: [],
64
+ action: [],
65
+ next: [],
66
+ msgs: []
67
+ };
68
+ }
69
+ function l() {
70
+ let { header: e, prev: t, next: n, action: r, msgs: i } = o;
71
+ console.group ? (console.groupCollapsed(...e), console.log(...t), console.log(...r), console.log(...n), console.log(...i), console.groupEnd()) : (console.log(...e), console.log(...t), console.log(...r), console.log(...n), console.log(...i));
72
+ }
73
+ function u(e, t, n) {
74
+ return [
75
+ `%c${e}`,
76
+ `color: ${t}; font-weight: bold`,
77
+ n
78
+ ];
79
+ }
80
+ function d(e, t) {
81
+ c(), a && (console.group ? (o.header = [
82
+ "%credux-undo",
83
+ "font-style: italic",
84
+ "action",
85
+ e.type
86
+ ], o.action = u("action", s.action, e), o.prev = u("prev history", s.prevState, t)) : (o.header = ["redux-undo action", e.type], o.action = ["action", e], o.prev = ["prev history", t]));
87
+ }
88
+ function f(e) {
89
+ a && (console.group ? o.next = u("next history", s.nextState, e) : o.next = ["next history", e], l());
90
+ }
91
+ function p(...e) {
92
+ a && (o.msgs = o.msgs.concat([...e, "\n"]));
93
+ }
94
+ function m(e) {
95
+ a = e;
96
+ }
97
+ function h(e, t) {
98
+ let n = i([], e, []);
99
+ return t && (n._latestUnfiltered = null), n;
100
+ }
101
+ function g(e, t, n, r) {
102
+ let a = e.past.length + 1;
103
+ p("inserting", t), p("new free: ", n - a);
104
+ let { past: o, _latestUnfiltered: s } = e, c = n && n <= a, l = o.slice(+!!c);
105
+ return i(s == null ? l : [...l, s], t, [], r);
106
+ }
107
+ function _(e, t) {
108
+ if (t < 0 || t >= e.future.length) return e;
109
+ let { past: n, future: r, _latestUnfiltered: a } = e, o = [
110
+ ...n,
111
+ a,
112
+ ...r.slice(0, t)
113
+ ], s = r[t];
114
+ return i(o, s, r.slice(t + 1));
115
+ }
116
+ function v(e, t) {
117
+ if (t < 0 || t >= e.past.length) return e;
118
+ let { past: n, future: r, _latestUnfiltered: a } = e, o = n.slice(0, t), s = [
119
+ ...n.slice(t + 1),
120
+ a,
121
+ ...r
122
+ ], c = n[t];
123
+ return i(o, c, s);
124
+ }
125
+ function y(e, t) {
126
+ return t > 0 ? _(e, t - 1) : t < 0 ? v(e, e.past.length + t) : e;
127
+ }
128
+ function b(e, t) {
129
+ return t.indexOf(e) > -1 ? e : !e;
130
+ }
131
+ function x(t, a = {}) {
132
+ m(a.debug);
133
+ let o = {
134
+ limit: void 0,
135
+ filter: () => !0,
136
+ groupBy: () => null,
137
+ undoType: e.UNDO,
138
+ redoType: e.REDO,
139
+ jumpToPastType: e.JUMP_TO_PAST,
140
+ jumpToFutureType: e.JUMP_TO_FUTURE,
141
+ jumpType: e.JUMP,
142
+ neverSkipReducer: !1,
143
+ ignoreInitialState: !1,
144
+ syncFilter: !1,
145
+ ...a,
146
+ initTypes: n(a.initTypes, ["@@redux-undo/INIT"]),
147
+ clearHistoryType: n(a.clearHistoryType, [e.CLEAR_HISTORY])
148
+ }, s = o.neverSkipReducer ? (e, n, ...r) => ({
149
+ ...e,
150
+ present: t(e.present, n, ...r)
151
+ }) : (e) => e, c;
152
+ return (e = c, n = {}, ...a) => {
153
+ d(n, e);
154
+ let l = e;
155
+ if (!c) {
156
+ if (p("history is uninitialized"), e === void 0) return l = h(t(e, { type: "@@redux-undo/CREATE_HISTORY" }, ...a), o.ignoreInitialState), p("do not set initialState on probe actions"), f(l), l;
157
+ r(e) ? (l = c = o.ignoreInitialState ? e : i(e.past, e.present, e.future), p("initialHistory initialized: initialState is a history", c)) : (l = c = h(e, o.ignoreInitialState), p("initialHistory initialized: initialState is not a history", c));
158
+ }
159
+ let u;
160
+ switch (n.type) {
161
+ case void 0: return l;
162
+ case o.undoType: return u = y(l, -1), p("perform undo"), f(u), s(u, n, ...a);
163
+ case o.redoType: return u = y(l, 1), p("perform redo"), f(u), s(u, n, ...a);
164
+ case o.jumpToPastType: return u = v(l, n.index), p(`perform jumpToPast to ${n.index}`), f(u), s(u, n, ...a);
165
+ case o.jumpToFutureType: return u = _(l, n.index), p(`perform jumpToFuture to ${n.index}`), f(u), s(u, n, ...a);
166
+ case o.jumpType: return u = y(l, n.index), p(`perform jump to ${n.index}`), f(u), s(u, n, ...a);
167
+ case b(n.type, o.clearHistoryType): return u = h(l.present, o.ignoreInitialState), p("perform clearHistory"), f(u), s(u, n, ...a);
168
+ default:
169
+ if (u = t(l.present, n, ...a), o.initTypes.some((e) => e === n.type)) return p("reset history due to init action"), f(c), c;
170
+ if (l._latestUnfiltered === u) return l;
171
+ if (typeof o.filter == "function" && !o.filter(n, u, l)) {
172
+ let e = i(l.past, u, l.future, l.group);
173
+ return o.syncFilter || (e._latestUnfiltered = l._latestUnfiltered), p("filter ignored action, not storing it in past"), f(e), e;
174
+ }
175
+ let e = o.groupBy(n, u, l);
176
+ if (e != null && e === l.group) {
177
+ let e = i(l.past, u, l.future, l.group);
178
+ return p("groupBy grouped the action with the previous action"), f(e), e;
179
+ }
180
+ return l = g(l, u, o.limit, e), p("inserted new state into history"), f(l), l;
181
+ }
182
+ };
183
+ }
184
+ //#endregion
185
+ export { t as ActionCreators, e as ActionTypes, x as default, r as isHistory, i as newHistory, n as parseActions };
@@ -0,0 +1,198 @@
1
+ //#region ../../../node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.mjs
2
+ function e(e) {
3
+ return `Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
4
+ }
5
+ var t = typeof Symbol == "function" && Symbol.observable || "@@observable", n = () => Math.random().toString(36).substring(7).split("").join("."), r = {
6
+ INIT: `@@redux/INIT${/* @__PURE__ */ n()}`,
7
+ REPLACE: `@@redux/REPLACE${/* @__PURE__ */ n()}`,
8
+ PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${n()}`
9
+ };
10
+ function i(e) {
11
+ if (typeof e != "object" || !e) return !1;
12
+ let t = e;
13
+ for (; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
14
+ return Object.getPrototypeOf(e) === t || Object.getPrototypeOf(e) === null;
15
+ }
16
+ function a(e) {
17
+ if (e === void 0) return "undefined";
18
+ if (e === null) return "null";
19
+ let t = typeof e;
20
+ switch (t) {
21
+ case "boolean":
22
+ case "string":
23
+ case "number":
24
+ case "symbol":
25
+ case "function": return t;
26
+ }
27
+ if (Array.isArray(e)) return "array";
28
+ if (c(e)) return "date";
29
+ if (s(e)) return "error";
30
+ let n = o(e);
31
+ switch (n) {
32
+ case "Symbol":
33
+ case "Promise":
34
+ case "WeakMap":
35
+ case "WeakSet":
36
+ case "Map":
37
+ case "Set": return n;
38
+ }
39
+ return Object.prototype.toString.call(e).slice(8, -1).toLowerCase().replace(/\s/g, "");
40
+ }
41
+ function o(e) {
42
+ return typeof e.constructor == "function" ? e.constructor.name : null;
43
+ }
44
+ function s(e) {
45
+ return e instanceof Error || typeof e.message == "string" && e.constructor && typeof e.constructor.stackTraceLimit == "number";
46
+ }
47
+ function c(e) {
48
+ return e instanceof Date || typeof e.toDateString == "function" && typeof e.getDate == "function" && typeof e.setDate == "function";
49
+ }
50
+ function l(e) {
51
+ let t = typeof e;
52
+ return process.env.NODE_ENV !== "production" && (t = a(e)), t;
53
+ }
54
+ function u(n, a, o) {
55
+ if (typeof n != "function") throw Error(process.env.NODE_ENV === "production" ? e(2) : `Expected the root reducer to be a function. Instead, received: '${l(n)}'`);
56
+ if (typeof a == "function" && typeof o == "function" || typeof o == "function" && typeof arguments[3] == "function") throw Error(process.env.NODE_ENV === "production" ? e(0) : "It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");
57
+ if (typeof a == "function" && o === void 0 && (o = a, a = void 0), o !== void 0) {
58
+ if (typeof o != "function") throw Error(process.env.NODE_ENV === "production" ? e(1) : `Expected the enhancer to be a function. Instead, received: '${l(o)}'`);
59
+ return o(u)(n, a);
60
+ }
61
+ let s = n, c = a, d = /* @__PURE__ */ new Map(), f = d, p = 0, m = !1;
62
+ function h() {
63
+ f === d && (f = /* @__PURE__ */ new Map(), d.forEach((e, t) => {
64
+ f.set(t, e);
65
+ }));
66
+ }
67
+ function g() {
68
+ if (m) throw Error(process.env.NODE_ENV === "production" ? e(3) : "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
69
+ return c;
70
+ }
71
+ function _(t) {
72
+ if (typeof t != "function") throw Error(process.env.NODE_ENV === "production" ? e(4) : `Expected the listener to be a function. Instead, received: '${l(t)}'`);
73
+ if (m) throw Error(process.env.NODE_ENV === "production" ? e(5) : "You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");
74
+ let n = !0;
75
+ h();
76
+ let r = p++;
77
+ return f.set(r, t), function() {
78
+ if (n) {
79
+ if (m) throw Error(process.env.NODE_ENV === "production" ? e(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
80
+ n = !1, h(), f.delete(r), d = null;
81
+ }
82
+ };
83
+ }
84
+ function v(t) {
85
+ if (!i(t)) throw Error(process.env.NODE_ENV === "production" ? e(7) : `Actions must be plain objects. Instead, the actual type was: '${l(t)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);
86
+ if (t.type === void 0) throw Error(process.env.NODE_ENV === "production" ? e(8) : "Actions may not have an undefined \"type\" property. You may have misspelled an action type string constant.");
87
+ if (typeof t.type != "string") throw Error(process.env.NODE_ENV === "production" ? e(17) : `Action "type" property must be a string. Instead, the actual type was: '${l(t.type)}'. Value was: '${t.type}' (stringified)`);
88
+ if (m) throw Error(process.env.NODE_ENV === "production" ? e(9) : "Reducers may not dispatch actions.");
89
+ try {
90
+ m = !0, c = s(c, t);
91
+ } finally {
92
+ m = !1;
93
+ }
94
+ return (d = f).forEach((e) => {
95
+ e();
96
+ }), t;
97
+ }
98
+ function y(t) {
99
+ if (typeof t != "function") throw Error(process.env.NODE_ENV === "production" ? e(10) : `Expected the nextReducer to be a function. Instead, received: '${l(t)}`);
100
+ s = t, v({ type: r.REPLACE });
101
+ }
102
+ function b() {
103
+ let n = _;
104
+ return {
105
+ subscribe(t) {
106
+ if (typeof t != "object" || !t) throw Error(process.env.NODE_ENV === "production" ? e(11) : `Expected the observer to be an object. Instead, received: '${l(t)}'`);
107
+ function r() {
108
+ let e = t;
109
+ e.next && e.next(g());
110
+ }
111
+ return r(), { unsubscribe: n(r) };
112
+ },
113
+ [t]() {
114
+ return this;
115
+ }
116
+ };
117
+ }
118
+ return v({ type: r.INIT }), {
119
+ dispatch: v,
120
+ subscribe: _,
121
+ getState: g,
122
+ replaceReducer: y,
123
+ [t]: b
124
+ };
125
+ }
126
+ function d(e) {
127
+ typeof console < "u" && typeof console.error == "function" && console.error(e);
128
+ try {
129
+ throw Error(e);
130
+ } catch {}
131
+ }
132
+ function f(e, t, n, a) {
133
+ let o = Object.keys(t), s = n && n.type === r.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
134
+ if (o.length === 0) return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
135
+ if (!i(e)) return `The ${s} has unexpected type of "${l(e)}". Expected argument to be an object with the following keys: "${o.join("\", \"")}"`;
136
+ let c = Object.keys(e).filter((e) => !t.hasOwnProperty(e) && !a[e]);
137
+ if (c.forEach((e) => {
138
+ a[e] = !0;
139
+ }), !(n && n.type === r.REPLACE) && c.length > 0) return `Unexpected ${c.length > 1 ? "keys" : "key"} "${c.join("\", \"")}" found in ${s}. Expected to find one of the known reducer keys instead: "${o.join("\", \"")}". Unexpected keys will be ignored.`;
140
+ }
141
+ function p(t) {
142
+ Object.keys(t).forEach((n) => {
143
+ let i = t[n];
144
+ if (i(void 0, { type: r.INIT }) === void 0) throw Error(process.env.NODE_ENV === "production" ? e(12) : `The slice reducer for key "${n}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);
145
+ if (i(void 0, { type: r.PROBE_UNKNOWN_ACTION() }) === void 0) throw Error(process.env.NODE_ENV === "production" ? e(13) : `The slice reducer for key "${n}" returned undefined when probed with a random type. Don't try to handle '${r.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`);
146
+ });
147
+ }
148
+ function m(t) {
149
+ let n = Object.keys(t), r = {};
150
+ for (let e = 0; e < n.length; e++) {
151
+ let i = n[e];
152
+ process.env.NODE_ENV !== "production" && t[i] === void 0 && d(`No reducer provided for key "${i}"`), typeof t[i] == "function" && (r[i] = t[i]);
153
+ }
154
+ let i = Object.keys(r), a;
155
+ process.env.NODE_ENV !== "production" && (a = {});
156
+ let o;
157
+ try {
158
+ p(r);
159
+ } catch (e) {
160
+ o = e;
161
+ }
162
+ return function(t = {}, n) {
163
+ if (o) throw o;
164
+ if (process.env.NODE_ENV !== "production") {
165
+ let e = f(t, r, n, a);
166
+ e && d(e);
167
+ }
168
+ let s = !1, c = {};
169
+ for (let a = 0; a < i.length; a++) {
170
+ let o = i[a], l = r[o], u = t[o], d = l(u, n);
171
+ if (d === void 0) {
172
+ let t = n && n.type;
173
+ throw Error(process.env.NODE_ENV === "production" ? e(14) : `When called with an action of type ${t ? `"${String(t)}"` : "(unknown type)"}, the slice reducer for key "${o}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`);
174
+ }
175
+ c[o] = d, s ||= d !== u;
176
+ }
177
+ return s ||= i.length !== Object.keys(t).length, s ? c : t;
178
+ };
179
+ }
180
+ function h(...e) {
181
+ return e.length === 0 ? (e) => e : e.length === 1 ? e[0] : e.reduce((e, t) => (...n) => e(t(...n)));
182
+ }
183
+ function g(...t) {
184
+ return (n) => (r, i) => {
185
+ let a = n(r, i), o = () => {
186
+ throw Error(process.env.NODE_ENV === "production" ? e(15) : "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");
187
+ }, s = {
188
+ getState: a.getState,
189
+ dispatch: (e, ...t) => o(e, ...t)
190
+ };
191
+ return o = h(...t.map((e) => e(s)))(a.dispatch), {
192
+ ...a,
193
+ dispatch: o
194
+ };
195
+ };
196
+ }
197
+ //#endregion
198
+ export { r as __DO_NOT_USE__ActionTypes, g as applyMiddleware, m as combineReducers, h as compose, u as createStore, i as isPlainObject };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/graphing/src/toggle-bar.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
+ disabledClassName: PropTypes.Requireable<string>;
17
+ selected: PropTypes.Requireable<boolean>;
18
+ value: PropTypes.Requireable<string>;
19
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
20
+ language: PropTypes.Requireable<string>;
21
+ };
22
+ };
23
+ export declare class ToggleBar extends React.Component {
24
+ static propTypes: {
25
+ className: PropTypes.Requireable<string>;
26
+ options: PropTypes.Requireable<(string | null | undefined)[]>;
27
+ selectedToolType: PropTypes.Requireable<string>;
28
+ disabled: PropTypes.Requireable<boolean>;
29
+ draggableTools: PropTypes.Requireable<boolean>;
30
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
31
+ onChangeToolsOrder: PropTypes.Requireable<(...args: any[]) => any>;
32
+ language: PropTypes.Requireable<string>;
33
+ };
34
+ static defaultProps: {};
35
+ select: (e: any) => any;
36
+ moveTool: any;
37
+ handleDragEnd: any;
38
+ render(): React.JSX.Element;
39
+ }
40
+ export default ToggleBar;
@@ -0,0 +1,155 @@
1
+ import { allTools as e } from "./tools/index.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ import { styled as i } from "@mui/material/styles";
6
+ import { color as a } from "@pie-lib/render-ui";
7
+ import o from "@mui/material/Button";
8
+ import { DragProvider as s } from "@pie-lib/drag";
9
+ import { useDraggable as c, useDroppable as l } from "@dnd-kit/core";
10
+ import { CSS as u } from "@dnd-kit/utilities";
11
+ import { arrayMove as d } from "@dnd-kit/sortable";
12
+ import f from "@pie-lib/translator";
13
+ //#region src/toggle-bar.tsx
14
+ var { translator: p } = f, m = i(o, { shouldForwardProp: (e) => !["selected"].includes(e) })(({ selected: e, disabled: t }) => ({
15
+ color: a.text(),
16
+ backgroundColor: a.background(),
17
+ border: `1px solid ${a.buttonBorder()}`,
18
+ "&:hover": { backgroundColor: a.buttonHoverBg() },
19
+ ...e && { border: `1px solid ${a.secondary()}` },
20
+ ...!e && { "& span": { color: a.primary() } },
21
+ ...t && {
22
+ "& span": { color: a.primary() },
23
+ backgroundColor: a.disabled()
24
+ }
25
+ })), h = (e) => {
26
+ let { disabled: t, className: n, selected: i, value: a, onClick: o, language: s } = e, c = a.toLowerCase();
27
+ return /* @__PURE__ */ r(m, {
28
+ size: "small",
29
+ disabled: t,
30
+ className: n,
31
+ selected: i,
32
+ value: a,
33
+ variant: "outlined",
34
+ onClick: (e) => o({
35
+ ...e,
36
+ buttonValue: a
37
+ }),
38
+ children: p.t(`graphing.${c}`, { lng: s })
39
+ }, a);
40
+ };
41
+ h.propTypes = {
42
+ disabled: n.bool,
43
+ className: n.string,
44
+ disabledClassName: n.string,
45
+ selected: n.bool,
46
+ value: n.string,
47
+ onClick: n.func,
48
+ language: n.string
49
+ };
50
+ var g = i("div")(() => ({
51
+ display: "flex",
52
+ flexWrap: "wrap"
53
+ })), _ = i(h)(({ theme: e }) => ({
54
+ marginRight: e.spacing(.5),
55
+ marginBottom: e.spacing(.5),
56
+ color: a.text()
57
+ })), v = i("div")({ position: "relative" }), y = class extends t.Component {
58
+ static propTypes = {
59
+ className: n.string,
60
+ options: n.arrayOf(n.string),
61
+ selectedToolType: n.string,
62
+ disabled: n.bool,
63
+ draggableTools: n.bool,
64
+ onChange: n.func,
65
+ onChangeToolsOrder: n.func,
66
+ language: n.string
67
+ };
68
+ static defaultProps = {};
69
+ select = (e) => this.props.onChange(e.buttonValue || e.target.textContent);
70
+ moveTool = (e, t) => {
71
+ let { options: n, onChangeToolsOrder: r } = this.props;
72
+ r(d(n, e, t));
73
+ };
74
+ handleDragEnd = (e) => {
75
+ let { active: t, over: n } = e;
76
+ if (!n || !t) return;
77
+ let r = t.data.current, i = n.data.current;
78
+ if (r?.type === "tool" && i?.type === "tool") {
79
+ let e = r.index, t = i.index;
80
+ e !== t && this.moveTool(e, t);
81
+ }
82
+ };
83
+ render() {
84
+ let { className: n, disabled: i, options: a, selectedToolType: o, draggableTools: c, language: l } = this.props;
85
+ return /* @__PURE__ */ r(s, {
86
+ onDragEnd: this.handleDragEnd,
87
+ children: /* @__PURE__ */ r(g, {
88
+ className: n,
89
+ children: (a || []).map((n, a) => {
90
+ if ((e || []).includes(n)) {
91
+ let e = n === o, s = t.createRef();
92
+ return /* @__PURE__ */ r(b, {
93
+ index: a,
94
+ value: n,
95
+ draggable: c,
96
+ moveTool: this.moveTool,
97
+ toolRef: s,
98
+ children: /* @__PURE__ */ r(_, {
99
+ disabled: i,
100
+ disableRipple: !0,
101
+ onClick: this.select,
102
+ value: n,
103
+ selected: e,
104
+ language: l
105
+ })
106
+ }, n);
107
+ }
108
+ })
109
+ })
110
+ });
111
+ }
112
+ };
113
+ function b({ children: e, index: t, draggable: n, toolRef: i, value: a }) {
114
+ let { attributes: o, listeners: s, setNodeRef: d, transform: f, transition: p, isDragging: m } = c({
115
+ id: `tool-${a}-${t}`,
116
+ disabled: !n,
117
+ data: {
118
+ type: "tool",
119
+ index: t,
120
+ value: a
121
+ }
122
+ }), { setNodeRef: h } = l({
123
+ id: `drop-tool-${a}-${t}`,
124
+ data: {
125
+ type: "tool",
126
+ index: t,
127
+ accepts: ["tool"]
128
+ }
129
+ });
130
+ return /* @__PURE__ */ r(v, {
131
+ ref: (e) => {
132
+ d(e), h(e), i?.current && (i.current = e);
133
+ },
134
+ style: {
135
+ transform: u.Transform.toString(f),
136
+ transition: p,
137
+ opacity: m ? .5 : 1
138
+ },
139
+ children: /* @__PURE__ */ r("div", {
140
+ ...o,
141
+ ...s,
142
+ children: e
143
+ })
144
+ });
145
+ }
146
+ b.propTypes = {
147
+ children: n.node,
148
+ index: n.number,
149
+ draggable: n.bool,
150
+ moveTool: n.func,
151
+ toolRef: n.object,
152
+ value: n.string
153
+ };
154
+ //#endregion
155
+ export { h as MiniButton, y as ToggleBar, y as default };