@pie-lib/graphing-solution-set 4.0.3-next.3 → 4.0.4-next.0

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 (332) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +23 -0
  2. package/dist/axis/arrow.d.ts +13 -0
  3. package/dist/axis/arrow.js +34 -0
  4. package/dist/axis/axes.d.ts +132 -0
  5. package/dist/axis/axes.js +214 -0
  6. package/dist/axis/index.d.ts +10 -0
  7. package/dist/bg.d.ts +51 -0
  8. package/dist/bg.js +44 -0
  9. package/dist/container/actions.d.ts +15 -0
  10. package/dist/container/actions.js +7 -0
  11. package/dist/container/index.d.ts +26 -0
  12. package/dist/container/index.js +50 -0
  13. package/dist/container/marks.d.ts +10 -0
  14. package/dist/container/marks.js +11 -0
  15. package/dist/container/middleware.d.ts +10 -0
  16. package/dist/container/middleware.js +4 -0
  17. package/dist/container/reducer.d.ts +12 -0
  18. package/dist/container/reducer.js +7 -0
  19. package/dist/coordinates-label.d.ts +50 -0
  20. package/dist/coordinates-label.js +46 -0
  21. package/dist/graph-with-controls.d.ts +85 -0
  22. package/dist/graph-with-controls.js +155 -0
  23. package/dist/graph.d.ts +119 -0
  24. package/dist/graph.js +221 -0
  25. package/dist/grid-setup.d.ts +27 -0
  26. package/dist/grid-setup.js +307 -0
  27. package/dist/grid.d.ts +43 -0
  28. package/dist/grid.js +59 -0
  29. package/dist/index.d.ts +14 -0
  30. package/dist/index.js +6 -0
  31. package/dist/labels.d.ts +73 -0
  32. package/dist/labels.js +134 -0
  33. package/dist/mark-label.d.ts +50 -0
  34. package/dist/mark-label.js +84 -0
  35. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +7 -0
  36. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
  37. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
  38. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +7 -0
  39. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +25 -0
  40. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
  41. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
  42. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
  43. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
  44. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
  45. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +100 -0
  46. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +61 -0
  47. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +42 -0
  48. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
  49. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
  50. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +21 -0
  51. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
  52. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
  53. package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +15 -0
  54. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +78 -0
  55. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +79 -0
  56. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +79 -0
  57. package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
  58. package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +49 -0
  59. package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +18 -0
  60. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +10 -0
  61. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +9 -0
  62. package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
  63. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +46 -0
  64. package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +52 -0
  65. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +57 -0
  66. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +91 -0
  67. package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +21 -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/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +68 -0
  71. package/dist/node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js +28 -0
  72. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +21 -0
  73. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +21 -0
  74. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +10 -0
  75. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +21 -0
  76. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +9 -0
  77. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +14 -0
  78. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +15 -0
  79. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +16 -0
  80. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +9 -0
  81. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +8 -0
  82. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +14 -0
  83. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +15 -0
  84. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +19 -0
  85. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +11 -0
  86. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +13 -0
  87. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +12 -0
  88. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +18 -0
  89. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +14 -0
  90. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +14 -0
  91. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +12 -0
  92. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +16 -0
  93. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +11 -0
  94. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +14 -0
  95. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +14 -0
  96. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +13 -0
  97. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +14 -0
  98. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +19 -0
  99. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +14 -0
  100. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +13 -0
  101. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +13 -0
  102. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +14 -0
  103. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +9 -0
  104. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +12 -0
  105. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +10 -0
  106. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +20 -0
  107. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +11 -0
  108. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +16 -0
  109. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +12 -0
  110. package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +20 -0
  111. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +37 -0
  112. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +509 -0
  113. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +108 -0
  114. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +31 -0
  115. package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +45 -0
  116. package/dist/node_modules/.bun/react-input-autosize@2.2.2_f4eacebf2041cd4f/node_modules/react-input-autosize/lib/AutosizeInput.js +216 -0
  117. package/dist/node_modules/.bun/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +82 -0
  118. package/dist/node_modules/.bun/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +62 -0
  119. package/dist/node_modules/.bun/react-is@16.13.1/node_modules/react-is/index.js +10 -0
  120. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/Context.js +5 -0
  121. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/Provider.js +47 -0
  122. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/connectAdvanced.js +95 -0
  123. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/connect.js +52 -0
  124. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/mapDispatchToProps.js +23 -0
  125. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/mapStateToProps.js +13 -0
  126. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/mergeProps.js +26 -0
  127. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/selectorFactory.js +41 -0
  128. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/verifySubselectors.js +11 -0
  129. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/wrapMapToProps.js +28 -0
  130. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/index.js +4 -0
  131. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/isPlainObject.js +10 -0
  132. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/shallowEqual.js +15 -0
  133. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/verifyPlainObject.js +8 -0
  134. package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/warning.js +9 -0
  135. package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +49 -0
  136. package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +34 -0
  137. package/dist/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +185 -0
  138. package/dist/node_modules/.bun/redux@4.2.1/node_modules/redux/es/redux.js +225 -0
  139. package/dist/toggle-bar.d.ts +40 -0
  140. package/dist/tool-menu.d.ts +21 -0
  141. package/dist/tool-menu.js +188 -0
  142. package/dist/tools/index.d.ts +17 -0
  143. package/dist/tools/index.js +12 -0
  144. package/dist/tools/line/component.d.ts +113 -0
  145. package/dist/tools/line/component.js +58 -0
  146. package/dist/tools/line/index.d.ts +13 -0
  147. package/dist/tools/line/index.js +6 -0
  148. package/dist/tools/polygon/component.d.ts +114 -0
  149. package/dist/tools/polygon/component.js +194 -0
  150. package/dist/tools/polygon/index.d.ts +19 -0
  151. package/dist/tools/polygon/index.js +55 -0
  152. package/dist/tools/polygon/line.d.ts +125 -0
  153. package/dist/tools/polygon/polygon.d.ts +122 -0
  154. package/dist/tools/polygon/polygon.js +62 -0
  155. package/dist/tools/shared/arrow-head.d.ts +43 -0
  156. package/dist/tools/shared/arrow-head.js +37 -0
  157. package/dist/tools/shared/line/index.d.ts +240 -0
  158. package/dist/tools/shared/line/index.js +320 -0
  159. package/dist/tools/shared/line/line-path.d.ts +57 -0
  160. package/dist/tools/shared/line/with-root-edge.d.ts +143 -0
  161. package/dist/tools/shared/point/arrow-point.d.ts +57 -0
  162. package/dist/tools/shared/point/arrow-point.js +47 -0
  163. package/dist/tools/shared/point/arrow.d.ts +46 -0
  164. package/dist/tools/shared/point/arrow.js +36 -0
  165. package/dist/tools/shared/point/base-point.d.ts +50 -0
  166. package/dist/tools/shared/point/base-point.js +88 -0
  167. package/dist/tools/shared/point/index.d.ts +217 -0
  168. package/dist/tools/shared/point/index.js +51 -0
  169. package/dist/tools/shared/styles.d.ts +24 -0
  170. package/dist/tools/shared/styles.js +17 -0
  171. package/dist/tools/shared/types.d.ts +15 -0
  172. package/dist/tools/shared/types.js +10 -0
  173. package/dist/undo-redo.d.ts +20 -0
  174. package/dist/undo-redo.js +33 -0
  175. package/dist/use-debounce.d.ts +9 -0
  176. package/dist/use-debounce.js +13 -0
  177. package/dist/utils.d.ts +58 -0
  178. package/dist/utils.js +72 -0
  179. package/package.json +36 -26
  180. package/CHANGELOG.json +0 -1
  181. package/CHANGELOG.md +0 -445
  182. package/LICENSE.md +0 -5
  183. package/lib/axis/arrow.js +0 -79
  184. package/lib/axis/arrow.js.map +0 -1
  185. package/lib/axis/axes.js +0 -327
  186. package/lib/axis/axes.js.map +0 -1
  187. package/lib/axis/index.js +0 -21
  188. package/lib/axis/index.js.map +0 -1
  189. package/lib/bg.js +0 -114
  190. package/lib/bg.js.map +0 -1
  191. package/lib/container/actions.js +0 -18
  192. package/lib/container/actions.js.map +0 -1
  193. package/lib/container/index.js +0 -120
  194. package/lib/container/index.js.map +0 -1
  195. package/lib/container/marks.js +0 -22
  196. package/lib/container/marks.js.map +0 -1
  197. package/lib/container/middleware.js +0 -19
  198. package/lib/container/middleware.js.map +0 -1
  199. package/lib/container/reducer.js +0 -18
  200. package/lib/container/reducer.js.map +0 -1
  201. package/lib/coordinates-label.js +0 -77
  202. package/lib/coordinates-label.js.map +0 -1
  203. package/lib/graph-with-controls.js +0 -297
  204. package/lib/graph-with-controls.js.map +0 -1
  205. package/lib/graph.js +0 -353
  206. package/lib/graph.js.map +0 -1
  207. package/lib/grid-setup.js +0 -414
  208. package/lib/grid-setup.js.map +0 -1
  209. package/lib/grid.js +0 -131
  210. package/lib/grid.js.map +0 -1
  211. package/lib/index.js +0 -40
  212. package/lib/index.js.map +0 -1
  213. package/lib/labels.js +0 -199
  214. package/lib/labels.js.map +0 -1
  215. package/lib/mark-label.js +0 -159
  216. package/lib/mark-label.js.map +0 -1
  217. package/lib/toggle-bar.js +0 -248
  218. package/lib/toggle-bar.js.map +0 -1
  219. package/lib/tool-menu.js +0 -218
  220. package/lib/tool-menu.js.map +0 -1
  221. package/lib/tools/index.js +0 -24
  222. package/lib/tools/index.js.map +0 -1
  223. package/lib/tools/line/component.js +0 -92
  224. package/lib/tools/line/component.js.map +0 -1
  225. package/lib/tools/line/index.js +0 -11
  226. package/lib/tools/line/index.js.map +0 -1
  227. package/lib/tools/polygon/component.js +0 -358
  228. package/lib/tools/polygon/component.js.map +0 -1
  229. package/lib/tools/polygon/index.js +0 -89
  230. package/lib/tools/polygon/index.js.map +0 -1
  231. package/lib/tools/polygon/line.js +0 -114
  232. package/lib/tools/polygon/line.js.map +0 -1
  233. package/lib/tools/polygon/polygon.js +0 -128
  234. package/lib/tools/polygon/polygon.js.map +0 -1
  235. package/lib/tools/shared/arrow-head.js +0 -62
  236. package/lib/tools/shared/arrow-head.js.map +0 -1
  237. package/lib/tools/shared/line/index.js +0 -539
  238. package/lib/tools/shared/line/index.js.map +0 -1
  239. package/lib/tools/shared/line/line-path.js +0 -121
  240. package/lib/tools/shared/line/line-path.js.map +0 -1
  241. package/lib/tools/shared/line/with-root-edge.js +0 -121
  242. package/lib/tools/shared/line/with-root-edge.js.map +0 -1
  243. package/lib/tools/shared/point/arrow-point.js +0 -86
  244. package/lib/tools/shared/point/arrow-point.js.map +0 -1
  245. package/lib/tools/shared/point/arrow.js +0 -70
  246. package/lib/tools/shared/point/arrow.js.map +0 -1
  247. package/lib/tools/shared/point/base-point.js +0 -137
  248. package/lib/tools/shared/point/base-point.js.map +0 -1
  249. package/lib/tools/shared/point/index.js +0 -80
  250. package/lib/tools/shared/point/index.js.map +0 -1
  251. package/lib/tools/shared/styles.js +0 -26
  252. package/lib/tools/shared/styles.js.map +0 -1
  253. package/lib/tools/shared/types.js +0 -15
  254. package/lib/tools/shared/types.js.map +0 -1
  255. package/lib/undo-redo.js +0 -67
  256. package/lib/undo-redo.js.map +0 -1
  257. package/lib/use-debounce.js +0 -25
  258. package/lib/use-debounce.js.map +0 -1
  259. package/lib/utils.js +0 -235
  260. package/lib/utils.js.map +0 -1
  261. package/src/__tests__/bg.test.jsx +0 -250
  262. package/src/__tests__/coordinates-label.test.jsx +0 -243
  263. package/src/__tests__/graph-with-controls.test.jsx +0 -184
  264. package/src/__tests__/graph.test.jsx +0 -93
  265. package/src/__tests__/grid-setup.test.jsx +0 -645
  266. package/src/__tests__/grid.test.jsx +0 -23
  267. package/src/__tests__/labels.test.jsx +0 -41
  268. package/src/__tests__/mark-label.test.jsx +0 -66
  269. package/src/__tests__/toggle-bar.test.jsx +0 -106
  270. package/src/__tests__/tool-menu.test.jsx +0 -453
  271. package/src/__tests__/undo-redo.test.jsx +0 -26
  272. package/src/__tests__/use-debounce.test.js +0 -21
  273. package/src/__tests__/utils.js +0 -41
  274. package/src/__tests__/utils.test.js +0 -105
  275. package/src/axis/__tests__/arrow.test.jsx +0 -43
  276. package/src/axis/__tests__/axes.test.jsx +0 -182
  277. package/src/axis/arrow.jsx +0 -57
  278. package/src/axis/axes.jsx +0 -284
  279. package/src/axis/index.js +0 -3
  280. package/src/bg.jsx +0 -96
  281. package/src/container/__tests__/actions.test.js +0 -105
  282. package/src/container/__tests__/index.test.jsx +0 -227
  283. package/src/container/__tests__/marks.test.js +0 -172
  284. package/src/container/__tests__/middleware.test.js +0 -235
  285. package/src/container/__tests__/reducer.test.js +0 -324
  286. package/src/container/actions.js +0 -8
  287. package/src/container/index.jsx +0 -85
  288. package/src/container/marks.js +0 -14
  289. package/src/container/middleware.js +0 -7
  290. package/src/container/reducer.js +0 -5
  291. package/src/coordinates-label.jsx +0 -62
  292. package/src/graph-with-controls.jsx +0 -242
  293. package/src/graph.jsx +0 -333
  294. package/src/grid-setup.jsx +0 -432
  295. package/src/grid.jsx +0 -133
  296. package/src/index.js +0 -7
  297. package/src/labels.jsx +0 -173
  298. package/src/mark-label.jsx +0 -125
  299. package/src/toggle-bar.jsx +0 -221
  300. package/src/tool-menu.jsx +0 -235
  301. package/src/tools/index.js +0 -8
  302. package/src/tools/line/__tests__/component.test.jsx +0 -37
  303. package/src/tools/line/component.jsx +0 -77
  304. package/src/tools/line/index.js +0 -4
  305. package/src/tools/polygon/__tests__/component.test.jsx +0 -487
  306. package/src/tools/polygon/__tests__/index.test.js +0 -65
  307. package/src/tools/polygon/__tests__/line.test.jsx +0 -23
  308. package/src/tools/polygon/__tests__/polygon.test.jsx +0 -44
  309. package/src/tools/polygon/component.jsx +0 -324
  310. package/src/tools/polygon/index.js +0 -52
  311. package/src/tools/polygon/line.jsx +0 -80
  312. package/src/tools/polygon/polygon.jsx +0 -93
  313. package/src/tools/shared/__tests__/arrow-head.test.jsx +0 -33
  314. package/src/tools/shared/arrow-head.jsx +0 -46
  315. package/src/tools/shared/line/__tests__/index.test.jsx +0 -553
  316. package/src/tools/shared/line/__tests__/line-path.test.jsx +0 -56
  317. package/src/tools/shared/line/__tests__/with-root-edge.test.jsx +0 -488
  318. package/src/tools/shared/line/index.jsx +0 -471
  319. package/src/tools/shared/line/line-path.jsx +0 -85
  320. package/src/tools/shared/line/with-root-edge.jsx +0 -97
  321. package/src/tools/shared/point/__tests__/arrow-point.test.jsx +0 -91
  322. package/src/tools/shared/point/__tests__/arrow.test.jsx +0 -469
  323. package/src/tools/shared/point/__tests__/base-point.test.jsx +0 -87
  324. package/src/tools/shared/point/arrow-point.jsx +0 -60
  325. package/src/tools/shared/point/arrow.jsx +0 -40
  326. package/src/tools/shared/point/base-point.jsx +0 -113
  327. package/src/tools/shared/point/index.jsx +0 -58
  328. package/src/tools/shared/styles.js +0 -20
  329. package/src/tools/shared/types.js +0 -8
  330. package/src/undo-redo.jsx +0 -37
  331. package/src/use-debounce.js +0 -13
  332. package/src/utils.js +0 -230
package/src/axis/index.js DELETED
@@ -1,3 +0,0 @@
1
- import Axes, { AxisPropTypes } from './axes';
2
-
3
- export { Axes, AxisPropTypes };
package/src/bg.jsx DELETED
@@ -1,96 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { pointer, select } from 'd3-selection';
4
- import { types, utils } from '@pie-lib/plot';
5
- import { getTickValues, thinnerShapesNeeded } from './utils';
6
-
7
- export default class Bg extends React.Component {
8
- static propTypes = {
9
- width: PropTypes.number.isRequired,
10
- height: PropTypes.number.isRequired,
11
- onClick: PropTypes.func.isRequired,
12
- graphProps: types.GraphPropsType.isRequired,
13
- };
14
-
15
- static defaultProps = {};
16
-
17
- componentDidMount() {
18
- const rect = select(this.rect);
19
-
20
- rect.on('click', (event) => this.onRectClick(rect, event));
21
- }
22
-
23
- shouldComponentUpdate(nextProps) {
24
- return (
25
- !utils.isDomainRangeEqual(this.props.graphProps, nextProps.graphProps) ||
26
- this.props.width !== nextProps.width ||
27
- this.props.height !== nextProps.height
28
- );
29
- }
30
-
31
- getRectPadding = () => {
32
- const { graphProps } = this.props;
33
-
34
- return thinnerShapesNeeded(graphProps) ? 6 : 10;
35
- };
36
-
37
- /**
38
- * Note: we use d3 click + pointer to give us domain values directly.
39
- * Saves us having to calculate them ourselves from a MouseEvent.
40
- */
41
- onRectClick = (rect, event) => {
42
- const { onClick, graphProps } = this.props;
43
- const { scale } = graphProps;
44
-
45
- const padding = this.getRectPadding();
46
- const coords = pointer(event, rect.node());
47
-
48
- // decrease the padding from coordinates to indicate the correct point clicked
49
- const x = scale.x.invert(coords[0] - padding);
50
- const y = scale.y.invert(coords[1] - padding);
51
-
52
- const rowTicks = getTickValues(graphProps.range);
53
- const columnTicks = getTickValues(graphProps.domain);
54
-
55
- const closest = (ticks, value) => {
56
- return (
57
- ticks.length &&
58
- ticks.reduce((prev, curr) => {
59
- const currentDistance = Math.abs(curr - value);
60
- const previousDistance = Math.abs(prev - value);
61
-
62
- return currentDistance <= previousDistance ? curr : prev;
63
- })
64
- );
65
- };
66
-
67
- let snapped = {};
68
-
69
- if (columnTicks.indexOf(x) >= 0 && rowTicks.indexOf(y) >= 0) {
70
- snapped.x = x;
71
- snapped.y = y;
72
- } else {
73
- snapped.x = closest(columnTicks, x);
74
- snapped.y = closest(rowTicks, y);
75
- }
76
-
77
- onClick(snapped);
78
- };
79
-
80
- render() {
81
- const { width, height } = this.props;
82
- const padding = this.getRectPadding();
83
-
84
- // expand the size of clickable area so a small area outside the edges of the grid lines to be clickable
85
- return (
86
- <rect
87
- ref={(rect) => (this.rect = rect)}
88
- transform={`translate(-${padding}, -${padding})`}
89
- fill="red"
90
- fillOpacity="0.0"
91
- width={width + padding * 2}
92
- height={height + padding * 2}
93
- />
94
- );
95
- }
96
- }
@@ -1,105 +0,0 @@
1
- import { addMark, changeMarks } from '../actions';
2
-
3
- describe('container actions', () => {
4
- describe('addMark', () => {
5
- it('creates ADD_MARK action', () => {
6
- const action = addMark();
7
- expect(action).toEqual({
8
- type: 'ADD_MARK',
9
- });
10
- });
11
-
12
- it('creates action without parameters', () => {
13
- const action = addMark();
14
- expect(action.type).toBe('ADD_MARK');
15
- expect(Object.keys(action)).toEqual(['type']);
16
- });
17
- });
18
-
19
- describe('changeMarks', () => {
20
- it('creates CHANGE_MARKS action with marks', () => {
21
- const marks = [{ id: 1, type: 'point' }];
22
- const action = changeMarks(marks);
23
-
24
- expect(action).toEqual({
25
- type: 'CHANGE_MARKS',
26
- marks,
27
- });
28
- });
29
-
30
- it('creates action with empty marks array', () => {
31
- const marks = [];
32
- const action = changeMarks(marks);
33
-
34
- expect(action).toEqual({
35
- type: 'CHANGE_MARKS',
36
- marks: [],
37
- });
38
- });
39
-
40
- it('creates action with multiple marks', () => {
41
- const marks = [
42
- { id: 1, type: 'point', x: 1, y: 2 },
43
- { id: 2, type: 'line', from: { x: 0, y: 0 }, to: { x: 5, y: 5 } },
44
- ];
45
- const action = changeMarks(marks);
46
-
47
- expect(action.marks).toEqual(marks);
48
- expect(action.marks.length).toBe(2);
49
- });
50
-
51
- it('creates action with null marks', () => {
52
- const marks = null;
53
- const action = changeMarks(marks);
54
-
55
- expect(action).toEqual({
56
- type: 'CHANGE_MARKS',
57
- marks: null,
58
- });
59
- });
60
-
61
- it('creates action with undefined marks', () => {
62
- const marks = undefined;
63
- const action = changeMarks(marks);
64
-
65
- expect(action).toEqual({
66
- type: 'CHANGE_MARKS',
67
- marks: undefined,
68
- });
69
- });
70
-
71
- it('preserves mark properties', () => {
72
- const marks = [
73
- {
74
- id: 1,
75
- type: 'point',
76
- x: 10,
77
- y: 20,
78
- label: 'A',
79
- correctness: { value: 'correct' },
80
- },
81
- ];
82
- const action = changeMarks(marks);
83
-
84
- expect(action.marks[0]).toEqual(marks[0]);
85
- expect(action.marks[0].correctness).toBeDefined();
86
- });
87
- });
88
-
89
- describe('action types', () => {
90
- it('has consistent action type strings', () => {
91
- const addMarkAction = addMark();
92
- const changeMarksAction = changeMarks([]);
93
-
94
- expect(typeof addMarkAction.type).toBe('string');
95
- expect(typeof changeMarksAction.type).toBe('string');
96
- });
97
-
98
- it('has unique action types', () => {
99
- const addMarkAction = addMark();
100
- const changeMarksAction = changeMarks([]);
101
-
102
- expect(addMarkAction.type).not.toBe(changeMarksAction.type);
103
- });
104
- });
105
- });
@@ -1,227 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@pie-lib/test-utils';
3
- import Root, { GraphContainer } from '../index';
4
-
5
- jest.mock('../../graph-with-controls', () => {
6
- return function GraphWithControls({ marks, onChangeMarks, onUndo, onRedo, onReset, disabled }) {
7
- return (
8
- <div data-testid="graph-with-controls">
9
- <div data-testid="marks-count">{marks?.length || 0}</div>
10
- {disabled && <div data-testid="disabled-indicator">Disabled</div>}
11
- <button data-testid="change-marks" onClick={() => onChangeMarks && onChangeMarks([{ id: 1 }])}>
12
- Change
13
- </button>
14
- <button data-testid="undo" onClick={onUndo}>
15
- Undo
16
- </button>
17
- <button data-testid="redo" onClick={onRedo}>
18
- Redo
19
- </button>
20
- <button data-testid="reset" onClick={onReset}>
21
- Reset
22
- </button>
23
- </div>
24
- );
25
- };
26
- });
27
-
28
- jest.mock('@pie-lib/drag', () => ({
29
- DragProvider: ({ children }) => <div data-testid="drag-provider">{children}</div>,
30
- }));
31
-
32
- describe('Container Root Component', () => {
33
- const defaultProps = {
34
- marks: [],
35
- onChangeMarks: jest.fn(),
36
- };
37
-
38
- const renderComponent = (props = {}) => {
39
- return render(<Root {...defaultProps} {...props} />);
40
- };
41
-
42
- describe('rendering', () => {
43
- it('renders without crashing', () => {
44
- const { container } = renderComponent();
45
- expect(container).toBeInTheDocument();
46
- });
47
-
48
- it('renders GraphWithControls', () => {
49
- const { getByTestId } = renderComponent();
50
- expect(getByTestId('graph-with-controls')).toBeInTheDocument();
51
- });
52
-
53
- it('renders with Provider when no correctness set', () => {
54
- const { container } = renderComponent({ marks: [{ id: 1, type: 'point' }] });
55
- expect(container.querySelector('[data-testid="graph-with-controls"]')).toBeInTheDocument();
56
- });
57
-
58
- it('renders directly when correctness is set', () => {
59
- const marks = [{ id: 1, type: 'point', correctness: { value: 'correct' } }];
60
- const { getByTestId } = renderComponent({ marks });
61
-
62
- expect(getByTestId('graph-with-controls')).toBeInTheDocument();
63
- expect(getByTestId('disabled-indicator')).toBeInTheDocument();
64
- });
65
-
66
- it('passes marks to GraphWithControls', () => {
67
- const marks = [{ id: 1 }, { id: 2 }];
68
- const { getByTestId } = renderComponent({ marks });
69
- expect(getByTestId('marks-count')).toHaveTextContent('2');
70
- });
71
- });
72
-
73
- describe('componentDidUpdate', () => {
74
- it('updates store when marks prop changes', () => {
75
- const onChangeMarks = jest.fn();
76
- const { rerender } = render(<Root marks={[]} onChangeMarks={onChangeMarks} />);
77
-
78
- const newMarks = [{ id: 1, type: 'point' }];
79
- rerender(<Root marks={newMarks} onChangeMarks={onChangeMarks} />);
80
-
81
- expect(onChangeMarks).not.toHaveBeenCalled();
82
- });
83
-
84
- it('does not update when marks are equal', () => {
85
- const marks = [{ id: 1, type: 'point' }];
86
- const onChangeMarks = jest.fn();
87
- const { rerender } = render(<Root marks={marks} onChangeMarks={onChangeMarks} />);
88
-
89
- onChangeMarks.mockClear();
90
-
91
- rerender(<Root marks={marks} onChangeMarks={onChangeMarks} />);
92
-
93
- expect(onChangeMarks).not.toHaveBeenCalled();
94
- });
95
-
96
- it('handles marks changing from empty to non-empty', () => {
97
- const onChangeMarks = jest.fn();
98
- const { rerender } = render(<Root marks={[]} onChangeMarks={onChangeMarks} />);
99
-
100
- const newMarks = [{ id: 1 }];
101
-
102
- expect(() => {
103
- rerender(<Root marks={newMarks} onChangeMarks={onChangeMarks} />);
104
- }).not.toThrow();
105
- });
106
-
107
- it('handles marks changing from non-empty to empty', () => {
108
- const onChangeMarks = jest.fn();
109
- const { rerender } = render(<Root marks={[{ id: 1 }]} onChangeMarks={onChangeMarks} />);
110
-
111
- expect(() => {
112
- rerender(<Root marks={[]} onChangeMarks={onChangeMarks} />);
113
- }).not.toThrow();
114
- });
115
- });
116
-
117
- describe('correctness handling', () => {
118
- it('disables when any mark has correctness', () => {
119
- const marks = [
120
- { id: 1, type: 'point' },
121
- { id: 2, type: 'point', correctness: { value: 'correct' } },
122
- ];
123
- const { getByTestId } = renderComponent({ marks });
124
-
125
- expect(getByTestId('disabled-indicator')).toBeInTheDocument();
126
- });
127
-
128
- it('renders without Provider when correctness is set', () => {
129
- const marks = [{ id: 1, correctness: { value: 'correct' } }];
130
- const { container } = renderComponent({ marks });
131
-
132
- expect(container.querySelector('[data-testid="graph-with-controls"]')).toBeInTheDocument();
133
- });
134
-
135
- it('does not disable when no correctness is set', () => {
136
- const marks = [
137
- { id: 1, type: 'point' },
138
- { id: 2, type: 'line' },
139
- ];
140
- const { queryByTestId } = renderComponent({ marks });
141
-
142
- expect(queryByTestId('disabled-indicator')).not.toBeInTheDocument();
143
- });
144
-
145
- it('handles correctness with different values', () => {
146
- const marks = [{ id: 1, correctness: { value: 'incorrect' } }];
147
- const { getByTestId } = renderComponent({ marks });
148
-
149
- expect(getByTestId('disabled-indicator')).toBeInTheDocument();
150
- });
151
-
152
- it('handles empty correctness object', () => {
153
- const marks = [{ id: 1, correctness: {} }];
154
- const { getByTestId } = renderComponent({ marks });
155
-
156
- expect(getByTestId('disabled-indicator')).toBeInTheDocument();
157
- });
158
- });
159
-
160
- describe('props forwarding', () => {
161
- it('forwards additional props to GraphWithControls', () => {
162
- const { container } = renderComponent({
163
- className: 'custom-class',
164
- size: { width: 500, height: 500 },
165
- });
166
-
167
- expect(container.querySelector('[data-testid="graph-with-controls"]')).toBeInTheDocument();
168
- });
169
-
170
- it('does not forward onChangeMarks and marks to GraphWithControls', () => {
171
- const { getByTestId } = renderComponent({
172
- marks: [{ id: 1 }],
173
- onChangeMarks: jest.fn(),
174
- otherProp: 'test',
175
- });
176
-
177
- expect(getByTestId('graph-with-controls')).toBeInTheDocument();
178
- });
179
- });
180
-
181
- describe('edge cases', () => {
182
- it('handles empty marks array', () => {
183
- const { container } = renderComponent({ marks: [] });
184
- expect(container).toBeInTheDocument();
185
- });
186
-
187
- it('handles marks with complex structure', () => {
188
- const marks = [
189
- {
190
- id: 1,
191
- type: 'line',
192
- from: { x: 0, y: 0 },
193
- to: { x: 10, y: 10 },
194
- label: 'Line A',
195
- correctness: { value: 'correct', label: 'Correct!' },
196
- },
197
- ];
198
- const { getByTestId } = renderComponent({ marks });
199
- expect(getByTestId('graph-with-controls')).toBeInTheDocument();
200
- });
201
-
202
- it('handles switching between correctness states', () => {
203
- const { rerender } = render(<Root marks={[{ id: 1 }]} onChangeMarks={jest.fn()} />);
204
-
205
- rerender(<Root marks={[{ id: 1, correctness: { value: 'correct' } }]} onChangeMarks={jest.fn()} />);
206
-
207
- rerender(<Root marks={[{ id: 1 }]} onChangeMarks={jest.fn()} />);
208
-
209
- expect(document.querySelector('[data-testid="graph-with-controls"]')).toBeInTheDocument();
210
- });
211
- });
212
- });
213
-
214
- describe('GraphContainer (connected component)', () => {
215
- it('is a connected component', () => {
216
- expect(GraphContainer).toBeDefined();
217
- expect(GraphContainer.displayName).toContain('Connect');
218
- });
219
-
220
- it('maps state to props', () => {
221
- expect(GraphContainer).toBeDefined();
222
- });
223
-
224
- it('maps dispatch to props', () => {
225
- expect(GraphContainer).toBeDefined();
226
- });
227
- });
@@ -1,172 +0,0 @@
1
- import marks from '../marks';
2
-
3
- describe('marks reducer', () => {
4
- describe('initial state', () => {
5
- it('returns empty array as initial state', () => {
6
- const state = marks(undefined, { type: 'INIT' });
7
- expect(state).toEqual([]);
8
- });
9
-
10
- it('handles no state parameter', () => {
11
- const state = marks(undefined, { type: 'UNKNOWN_ACTION' });
12
- expect(Array.isArray(state)).toBe(true);
13
- });
14
- });
15
-
16
- describe('CHANGE_MARKS action', () => {
17
- it('updates state with new marks', () => {
18
- const initialState = [];
19
- const newMarks = [{ id: 1, type: 'point' }];
20
- const action = { type: 'CHANGE_MARKS', marks: newMarks };
21
-
22
- const state = marks(initialState, action);
23
- expect(state).toEqual(newMarks);
24
- });
25
-
26
- it('replaces existing marks', () => {
27
- const initialState = [{ id: 1, type: 'point' }];
28
- const newMarks = [{ id: 2, type: 'line' }];
29
- const action = { type: 'CHANGE_MARKS', marks: newMarks };
30
-
31
- const state = marks(initialState, action);
32
- expect(state).toEqual(newMarks);
33
- expect(state.length).toBe(1);
34
- expect(state[0].id).toBe(2);
35
- });
36
-
37
- it('handles empty marks array', () => {
38
- const initialState = [{ id: 1, type: 'point' }];
39
- const action = { type: 'CHANGE_MARKS', marks: [] };
40
-
41
- const state = marks(initialState, action);
42
- expect(state).toEqual([]);
43
- });
44
-
45
- it('handles multiple marks', () => {
46
- const initialState = [];
47
- const newMarks = [
48
- { id: 1, type: 'point', x: 1, y: 2 },
49
- { id: 2, type: 'line', from: { x: 0, y: 0 }, to: { x: 5, y: 5 } },
50
- { id: 3, type: 'circle', center: { x: 3, y: 3 }, radius: 2 },
51
- ];
52
- const action = { type: 'CHANGE_MARKS', marks: newMarks };
53
-
54
- const state = marks(initialState, action);
55
- expect(state).toEqual(newMarks);
56
- expect(state.length).toBe(3);
57
- });
58
-
59
- it('throws error when marks is not an array', () => {
60
- const initialState = [];
61
- const action = { type: 'CHANGE_MARKS', marks: 'not an array' };
62
-
63
- expect(() => marks(initialState, action)).toThrow('marks must be an array');
64
- });
65
-
66
- it('throws error when marks is null', () => {
67
- const initialState = [];
68
- const action = { type: 'CHANGE_MARKS', marks: null };
69
-
70
- expect(() => marks(initialState, action)).toThrow('marks must be an array');
71
- });
72
-
73
- it('throws error when marks is undefined', () => {
74
- const initialState = [];
75
- const action = { type: 'CHANGE_MARKS', marks: undefined };
76
-
77
- expect(() => marks(initialState, action)).toThrow('marks must be an array');
78
- });
79
-
80
- it('throws error when marks is an object', () => {
81
- const initialState = [];
82
- const action = { type: 'CHANGE_MARKS', marks: { id: 1 } };
83
-
84
- expect(() => marks(initialState, action)).toThrow('marks must be an array');
85
- });
86
-
87
- it('throws error when marks is a number', () => {
88
- const initialState = [];
89
- const action = { type: 'CHANGE_MARKS', marks: 123 };
90
-
91
- expect(() => marks(initialState, action)).toThrow('marks must be an array');
92
- });
93
-
94
- it('preserves mark properties', () => {
95
- const initialState = [];
96
- const newMarks = [
97
- {
98
- id: 1,
99
- type: 'point',
100
- x: 10,
101
- y: 20,
102
- label: 'A',
103
- correctness: { value: 'correct' },
104
- editable: true,
105
- interactive: true,
106
- },
107
- ];
108
- const action = { type: 'CHANGE_MARKS', marks: newMarks };
109
-
110
- const state = marks(initialState, action);
111
- expect(state[0]).toEqual(newMarks[0]);
112
- expect(state[0].correctness).toBeDefined();
113
- expect(state[0].editable).toBe(true);
114
- });
115
- });
116
-
117
- describe('unknown actions', () => {
118
- it('returns current state for unknown action', () => {
119
- const initialState = [{ id: 1, type: 'point' }];
120
- const action = { type: 'UNKNOWN_ACTION' };
121
-
122
- const state = marks(initialState, action);
123
- expect(state).toBe(initialState);
124
- });
125
-
126
- it('returns current state for ADD_MARK action', () => {
127
- const initialState = [{ id: 1, type: 'point' }];
128
- const action = { type: 'ADD_MARK' };
129
-
130
- const state = marks(initialState, action);
131
- expect(state).toBe(initialState);
132
- });
133
-
134
- it('does not modify state for unknown actions', () => {
135
- const initialState = [{ id: 1, type: 'point' }];
136
- const action = { type: 'SOME_OTHER_ACTION', data: 'test' };
137
-
138
- const state = marks(initialState, action);
139
- expect(state).toEqual(initialState);
140
- });
141
- });
142
-
143
- describe('immutability', () => {
144
- it('does not mutate original state', () => {
145
- const initialState = [{ id: 1, type: 'point' }];
146
- const originalState = [...initialState];
147
- const newMarks = [{ id: 2, type: 'line' }];
148
- const action = { type: 'CHANGE_MARKS', marks: newMarks };
149
-
150
- marks(initialState, action);
151
- expect(initialState).toEqual(originalState);
152
- });
153
-
154
- it('returns new array reference for CHANGE_MARKS', () => {
155
- const initialState = [{ id: 1, type: 'point' }];
156
- const newMarks = [{ id: 1, type: 'point' }];
157
- const action = { type: 'CHANGE_MARKS', marks: newMarks };
158
-
159
- const state = marks(initialState, action);
160
- expect(state).not.toBe(initialState);
161
- expect(state).toBe(newMarks);
162
- });
163
-
164
- it('returns same reference for unknown actions', () => {
165
- const initialState = [{ id: 1, type: 'point' }];
166
- const action = { type: 'UNKNOWN_ACTION' };
167
-
168
- const state = marks(initialState, action);
169
- expect(state).toBe(initialState);
170
- });
171
- });
172
- });