@pie-lib/graphing 4.0.5-next.29 → 4.0.5-next.30
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.
- package/dist/_virtual/_rolldown/runtime.js +23 -0
- package/dist/autosize-input.d.ts +10 -0
- package/dist/autosize-input.js +66 -0
- package/dist/axis/arrow.d.ts +13 -0
- package/dist/axis/arrow.js +34 -0
- package/dist/axis/axes.d.ts +132 -0
- package/dist/axis/axes.js +214 -0
- package/dist/axis/index.d.ts +10 -0
- package/dist/bg.d.ts +51 -0
- package/dist/bg.js +44 -0
- package/dist/container/actions.d.ts +15 -0
- package/dist/container/actions.js +7 -0
- package/dist/container/index.d.ts +58 -0
- package/dist/container/index.js +48 -0
- package/dist/container/marks.d.ts +10 -0
- package/dist/container/marks.js +11 -0
- package/dist/container/middleware.d.ts +10 -0
- package/dist/container/middleware.js +4 -0
- package/dist/container/reducer.d.ts +14 -0
- package/dist/container/reducer.js +7 -0
- package/dist/coordinates-label.d.ts +50 -0
- package/dist/coordinates-label.js +46 -0
- package/dist/graph-with-controls.d.ts +88 -0
- package/dist/graph-with-controls.js +154 -0
- package/dist/graph.d.ts +126 -0
- package/dist/graph.js +209 -0
- package/dist/grid-setup.d.ts +27 -0
- package/dist/grid-setup.js +307 -0
- package/dist/grid.d.ts +43 -0
- package/dist/grid.js +59 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +7 -0
- package/dist/key-legend.d.ts +21 -0
- package/dist/key-legend.js +231 -0
- package/dist/label-svg-icon.d.ts +18 -0
- package/dist/label-svg-icon.js +42 -0
- package/dist/labels.d.ts +37 -0
- package/dist/labels.js +152 -0
- package/dist/mark-label.d.ts +58 -0
- package/dist/mark-label.js +171 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +101 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +63 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +44 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +21 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +15 -0
- package/dist/node_modules/.bun/@visx_curve@3.12.0/node_modules/@visx/curve/esm/index.js +2 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
- package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +50 -0
- package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +18 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +10 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +9 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +47 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/LinePath.js +50 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/D3ShapeFactories.js +9 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/util/setNumberOrNumberAccessor.js +6 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +53 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +57 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +91 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +21 -0
- package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +32 -0
- package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +33 -0
- package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +32 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
- package/dist/node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js +28 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +10 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +15 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +8 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +15 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +19 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +18 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +19 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +10 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +20 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +20 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +37 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +509 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +108 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +31 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +45 -0
- package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +471 -0
- package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +49 -0
- package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +34 -0
- package/dist/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +185 -0
- package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +198 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +53 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +51 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +10 -0
- package/dist/toggle-bar.d.ts +40 -0
- package/dist/toggle-bar.js +155 -0
- package/dist/tool-menu.d.ts +29 -0
- package/dist/tool-menu.js +41 -0
- package/dist/tools/absolute/component.d.ts +16 -0
- package/dist/tools/absolute/component.js +15 -0
- package/dist/tools/absolute/index.d.ts +20 -0
- package/dist/tools/absolute/index.js +32 -0
- package/dist/tools/circle/bg-circle.d.ts +116 -0
- package/dist/tools/circle/bg-circle.js +72 -0
- package/dist/tools/circle/component.d.ts +83 -0
- package/dist/tools/circle/component.js +195 -0
- package/dist/tools/circle/index.d.ts +20 -0
- package/dist/tools/circle/index.js +22 -0
- package/dist/tools/exponential/component.d.ts +16 -0
- package/dist/tools/exponential/component.js +14 -0
- package/dist/tools/exponential/index.d.ts +20 -0
- package/dist/tools/exponential/index.js +32 -0
- package/dist/tools/index.d.ts +27 -0
- package/dist/tools/index.js +55 -0
- package/dist/tools/line/component.d.ts +124 -0
- package/dist/tools/line/component.js +72 -0
- package/dist/tools/line/index.d.ts +13 -0
- package/dist/tools/line/index.js +6 -0
- package/dist/tools/parabola/component.d.ts +16 -0
- package/dist/tools/parabola/component.js +14 -0
- package/dist/tools/parabola/index.d.ts +20 -0
- package/dist/tools/parabola/index.js +32 -0
- package/dist/tools/point/component.d.ts +50 -0
- package/dist/tools/point/component.js +85 -0
- package/dist/tools/point/index.d.ts +15 -0
- package/dist/tools/point/index.js +13 -0
- package/dist/tools/polygon/component.d.ts +120 -0
- package/dist/tools/polygon/component.js +262 -0
- package/dist/tools/polygon/index.d.ts +19 -0
- package/dist/tools/polygon/index.js +55 -0
- package/dist/tools/polygon/line.d.ts +125 -0
- package/dist/tools/polygon/line.js +63 -0
- package/dist/tools/polygon/polygon.d.ts +122 -0
- package/dist/tools/polygon/polygon.js +74 -0
- package/dist/tools/ray/component.d.ts +101 -0
- package/dist/tools/ray/component.js +71 -0
- package/dist/tools/ray/index.d.ts +13 -0
- package/dist/tools/ray/index.js +6 -0
- package/dist/tools/segment/component.d.ts +100 -0
- package/dist/tools/segment/component.js +52 -0
- package/dist/tools/segment/index.d.ts +13 -0
- package/dist/tools/segment/index.js +6 -0
- package/dist/tools/shared/arrow-head.d.ts +51 -0
- package/dist/tools/shared/arrow-head.js +63 -0
- package/dist/tools/shared/icons/CorrectSVG.d.ts +26 -0
- package/dist/tools/shared/icons/CorrectSVG.js +29 -0
- package/dist/tools/shared/icons/IncorrectSVG.d.ts +26 -0
- package/dist/tools/shared/icons/IncorrectSVG.js +27 -0
- package/dist/tools/shared/icons/MissingSVG.d.ts +26 -0
- package/dist/tools/shared/icons/MissingSVG.js +28 -0
- package/dist/tools/shared/line/index.d.ts +245 -0
- package/dist/tools/shared/line/index.js +319 -0
- package/dist/tools/shared/line/line-path.d.ts +57 -0
- package/dist/tools/shared/line/line-path.js +71 -0
- package/dist/tools/shared/line/with-root-edge.d.ts +142 -0
- package/dist/tools/shared/line/with-root-edge.js +73 -0
- package/dist/tools/shared/point/arrow-point.d.ts +56 -0
- package/dist/tools/shared/point/arrow-point.js +41 -0
- package/dist/tools/shared/point/arrow.d.ts +45 -0
- package/dist/tools/shared/point/arrow.js +35 -0
- package/dist/tools/shared/point/base-point.d.ts +52 -0
- package/dist/tools/shared/point/base-point.js +103 -0
- package/dist/tools/shared/point/index.d.ts +216 -0
- package/dist/tools/shared/point/index.js +45 -0
- package/dist/tools/shared/styles.d.ts +29 -0
- package/dist/tools/shared/styles.js +20 -0
- package/dist/tools/shared/types.d.ts +21 -0
- package/dist/tools/shared/types.js +11 -0
- package/dist/tools/sine/component.d.ts +16 -0
- package/dist/tools/sine/component.js +22 -0
- package/dist/tools/sine/index.d.ts +20 -0
- package/dist/tools/sine/index.js +32 -0
- package/dist/tools/vector/component.d.ts +100 -0
- package/dist/tools/vector/component.js +44 -0
- package/dist/tools/vector/index.d.ts +13 -0
- package/dist/tools/vector/index.js +6 -0
- package/dist/undo-redo.d.ts +22 -0
- package/dist/undo-redo.js +47 -0
- package/dist/use-debounce.d.ts +9 -0
- package/dist/use-debounce.js +13 -0
- package/dist/utils.d.ts +61 -0
- package/dist/utils.js +75 -0
- package/package.json +45 -33
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -1469
- package/LICENSE.md +0 -5
- package/lib/axis/arrow.js +0 -79
- package/lib/axis/arrow.js.map +0 -1
- package/lib/axis/axes.js +0 -329
- package/lib/axis/axes.js.map +0 -1
- package/lib/axis/index.js +0 -21
- package/lib/axis/index.js.map +0 -1
- package/lib/bg.js +0 -114
- package/lib/bg.js.map +0 -1
- package/lib/container/actions.js +0 -18
- package/lib/container/actions.js.map +0 -1
- package/lib/container/index.js +0 -127
- package/lib/container/index.js.map +0 -1
- package/lib/container/marks.js +0 -22
- package/lib/container/marks.js.map +0 -1
- package/lib/container/middleware.js +0 -19
- package/lib/container/middleware.js.map +0 -1
- package/lib/container/reducer.js +0 -18
- package/lib/container/reducer.js.map +0 -1
- package/lib/coordinates-label.js +0 -79
- package/lib/coordinates-label.js.map +0 -1
- package/lib/graph-with-controls.js +0 -294
- package/lib/graph-with-controls.js.map +0 -1
- package/lib/graph.js +0 -327
- package/lib/graph.js.map +0 -1
- package/lib/grid-setup.js +0 -414
- package/lib/grid-setup.js.map +0 -1
- package/lib/grid.js +0 -131
- package/lib/grid.js.map +0 -1
- package/lib/index.js +0 -47
- package/lib/index.js.map +0 -1
- package/lib/key-legend.js +0 -201
- package/lib/key-legend.js.map +0 -1
- package/lib/label-svg-icon.js +0 -50
- package/lib/label-svg-icon.js.map +0 -1
- package/lib/labels.js +0 -243
- package/lib/labels.js.map +0 -1
- package/lib/mark-label.js +0 -285
- package/lib/mark-label.js.map +0 -1
- package/lib/toggle-bar.js +0 -252
- package/lib/toggle-bar.js.map +0 -1
- package/lib/tool-menu.js +0 -78
- package/lib/tool-menu.js.map +0 -1
- package/lib/tools/absolute/component.js +0 -29
- package/lib/tools/absolute/component.js.map +0 -1
- package/lib/tools/absolute/index.js +0 -50
- package/lib/tools/absolute/index.js.map +0 -1
- package/lib/tools/circle/bg-circle.js +0 -123
- package/lib/tools/circle/bg-circle.js.map +0 -1
- package/lib/tools/circle/component.js +0 -321
- package/lib/tools/circle/component.js.map +0 -1
- package/lib/tools/circle/index.js +0 -41
- package/lib/tools/circle/index.js.map +0 -1
- package/lib/tools/exponential/component.js +0 -28
- package/lib/tools/exponential/component.js.map +0 -1
- package/lib/tools/exponential/index.js +0 -56
- package/lib/tools/exponential/index.js.map +0 -1
- package/lib/tools/index.js +0 -86
- package/lib/tools/index.js.map +0 -1
- package/lib/tools/line/component.js +0 -97
- package/lib/tools/line/component.js.map +0 -1
- package/lib/tools/line/index.js +0 -11
- package/lib/tools/line/index.js.map +0 -1
- package/lib/tools/parabola/component.js +0 -28
- package/lib/tools/parabola/component.js.map +0 -1
- package/lib/tools/parabola/index.js +0 -50
- package/lib/tools/parabola/index.js.map +0 -1
- package/lib/tools/point/component.js +0 -148
- package/lib/tools/point/component.js.map +0 -1
- package/lib/tools/point/index.js +0 -24
- package/lib/tools/point/index.js.map +0 -1
- package/lib/tools/polygon/component.js +0 -437
- package/lib/tools/polygon/component.js.map +0 -1
- package/lib/tools/polygon/index.js +0 -89
- package/lib/tools/polygon/index.js.map +0 -1
- package/lib/tools/polygon/line.js +0 -112
- package/lib/tools/polygon/line.js.map +0 -1
- package/lib/tools/polygon/polygon.js +0 -130
- package/lib/tools/polygon/polygon.js.map +0 -1
- package/lib/tools/ray/component.js +0 -95
- package/lib/tools/ray/component.js.map +0 -1
- package/lib/tools/ray/index.js +0 -11
- package/lib/tools/ray/index.js.map +0 -1
- package/lib/tools/segment/component.js +0 -71
- package/lib/tools/segment/component.js.map +0 -1
- package/lib/tools/segment/index.js +0 -11
- package/lib/tools/segment/index.js.map +0 -1
- package/lib/tools/shared/arrow-head.js +0 -111
- package/lib/tools/shared/arrow-head.js.map +0 -1
- package/lib/tools/shared/icons/CorrectSVG.js +0 -40
- package/lib/tools/shared/icons/CorrectSVG.js.map +0 -1
- package/lib/tools/shared/icons/IncorrectSVG.js +0 -40
- package/lib/tools/shared/icons/IncorrectSVG.js.map +0 -1
- package/lib/tools/shared/icons/MissingSVG.js +0 -39
- package/lib/tools/shared/icons/MissingSVG.js.map +0 -1
- package/lib/tools/shared/line/index.js +0 -550
- package/lib/tools/shared/line/index.js.map +0 -1
- package/lib/tools/shared/line/line-path.js +0 -118
- package/lib/tools/shared/line/line-path.js.map +0 -1
- package/lib/tools/shared/line/with-root-edge.js +0 -121
- package/lib/tools/shared/line/with-root-edge.js.map +0 -1
- package/lib/tools/shared/point/arrow-point.js +0 -72
- package/lib/tools/shared/point/arrow-point.js.map +0 -1
- package/lib/tools/shared/point/arrow.js +0 -67
- package/lib/tools/shared/point/arrow.js.map +0 -1
- package/lib/tools/shared/point/base-point.js +0 -157
- package/lib/tools/shared/point/base-point.js.map +0 -1
- package/lib/tools/shared/point/index.js +0 -68
- package/lib/tools/shared/point/index.js.map +0 -1
- package/lib/tools/shared/styles.js +0 -33
- package/lib/tools/shared/styles.js.map +0 -1
- package/lib/tools/shared/types.js +0 -16
- package/lib/tools/shared/types.js.map +0 -1
- package/lib/tools/sine/component.js +0 -40
- package/lib/tools/sine/component.js.map +0 -1
- package/lib/tools/sine/index.js +0 -50
- package/lib/tools/sine/index.js.map +0 -1
- package/lib/tools/vector/component.js +0 -68
- package/lib/tools/vector/component.js.map +0 -1
- package/lib/tools/vector/index.js +0 -11
- package/lib/tools/vector/index.js.map +0 -1
- package/lib/undo-redo.js +0 -86
- package/lib/undo-redo.js.map +0 -1
- package/lib/use-debounce.js +0 -25
- package/lib/use-debounce.js.map +0 -1
- package/lib/utils.js +0 -229
- package/lib/utils.js.map +0 -1
- package/src/__tests__/bg.test.jsx +0 -250
- package/src/__tests__/coordinates-label.test.jsx +0 -243
- package/src/__tests__/graph-with-controls.test.jsx +0 -198
- package/src/__tests__/graph.test.jsx +0 -721
- package/src/__tests__/grid-setup.test.jsx +0 -645
- package/src/__tests__/grid.test.jsx +0 -22
- package/src/__tests__/key-legend.test.jsx +0 -260
- package/src/__tests__/label-svg-icon.test.jsx +0 -278
- package/src/__tests__/labels.test.jsx +0 -55
- package/src/__tests__/mark-label.test.jsx +0 -63
- package/src/__tests__/toggle-bar.test.jsx +0 -146
- package/src/__tests__/tool-menu.test.jsx +0 -115
- package/src/__tests__/undo-redo.test.jsx +0 -24
- package/src/__tests__/use-debounce.test.js +0 -21
- package/src/__tests__/utils.js +0 -41
- package/src/__tests__/utils.test.js +0 -105
- package/src/axis/__tests__/arrow.test.jsx +0 -38
- package/src/axis/__tests__/axes.test.jsx +0 -216
- package/src/axis/arrow.jsx +0 -57
- package/src/axis/axes.jsx +0 -285
- package/src/axis/index.js +0 -3
- package/src/bg.jsx +0 -96
- package/src/container/__tests__/actions.test.js +0 -105
- package/src/container/__tests__/index.test.jsx +0 -319
- package/src/container/__tests__/marks.test.js +0 -172
- package/src/container/__tests__/middleware.test.js +0 -235
- package/src/container/__tests__/reducer.test.js +0 -324
- package/src/container/actions.js +0 -8
- package/src/container/index.jsx +0 -91
- package/src/container/marks.js +0 -14
- package/src/container/middleware.js +0 -7
- package/src/container/reducer.js +0 -5
- package/src/coordinates-label.jsx +0 -63
- package/src/graph-with-controls.jsx +0 -239
- package/src/graph.jsx +0 -303
- package/src/grid-setup.jsx +0 -432
- package/src/grid.jsx +0 -133
- package/src/index.js +0 -7
- package/src/key-legend.jsx +0 -142
- package/src/label-svg-icon.jsx +0 -39
- package/src/labels.jsx +0 -207
- package/src/mark-label.jsx +0 -244
- package/src/toggle-bar.jsx +0 -224
- package/src/tool-menu.jsx +0 -49
- package/src/tools/absolute/__tests__/component.test.jsx +0 -53
- package/src/tools/absolute/component.jsx +0 -23
- package/src/tools/absolute/index.js +0 -31
- package/src/tools/circle/__tests__/bg-circle.test.jsx +0 -26
- package/src/tools/circle/__tests__/component.test.jsx +0 -494
- package/src/tools/circle/__tests__/index.test.js +0 -480
- package/src/tools/circle/bg-circle.jsx +0 -81
- package/src/tools/circle/component.jsx +0 -264
- package/src/tools/circle/index.js +0 -25
- package/src/tools/exponential/__tests__/component.test.jsx +0 -53
- package/src/tools/exponential/__tests__/index.test.js +0 -729
- package/src/tools/exponential/component.jsx +0 -23
- package/src/tools/exponential/index.js +0 -39
- package/src/tools/index.js +0 -48
- package/src/tools/line/__tests__/component.test.jsx +0 -37
- package/src/tools/line/component.jsx +0 -93
- package/src/tools/line/index.js +0 -4
- package/src/tools/parabola/__tests__/component.test.jsx +0 -48
- package/src/tools/parabola/__tests__/index.test.js +0 -470
- package/src/tools/parabola/component.jsx +0 -23
- package/src/tools/parabola/index.js +0 -31
- package/src/tools/point/__tests__/component.test.jsx +0 -349
- package/src/tools/point/__tests__/index.test.js +0 -241
- package/src/tools/point/component.jsx +0 -126
- package/src/tools/point/index.js +0 -11
- package/src/tools/polygon/__tests__/component.test.jsx +0 -471
- package/src/tools/polygon/__tests__/index.test.js +0 -294
- package/src/tools/polygon/__tests__/line.test.jsx +0 -35
- package/src/tools/polygon/__tests__/polygon.test.jsx +0 -61
- package/src/tools/polygon/component.jsx +0 -409
- package/src/tools/polygon/index.js +0 -52
- package/src/tools/polygon/line.jsx +0 -74
- package/src/tools/polygon/polygon.jsx +0 -110
- package/src/tools/ray/__tests__/component.test.jsx +0 -29
- package/src/tools/ray/component.jsx +0 -92
- package/src/tools/ray/index.js +0 -4
- package/src/tools/segment/__tests__/component.test.jsx +0 -28
- package/src/tools/segment/component.jsx +0 -65
- package/src/tools/segment/index.js +0 -4
- package/src/tools/shared/__tests__/arrow-head.test.jsx +0 -31
- package/src/tools/shared/arrow-head.jsx +0 -102
- package/src/tools/shared/icons/CorrectSVG.jsx +0 -32
- package/src/tools/shared/icons/IncorrectSVG.jsx +0 -30
- package/src/tools/shared/icons/MissingSVG.jsx +0 -31
- package/src/tools/shared/line/__tests__/index.test.jsx +0 -109
- package/src/tools/shared/line/__tests__/line-path.test.jsx +0 -53
- package/src/tools/shared/line/__tests__/with-root-edge.test.jsx +0 -73
- package/src/tools/shared/line/index.jsx +0 -487
- package/src/tools/shared/line/line-path.jsx +0 -80
- package/src/tools/shared/line/with-root-edge.jsx +0 -97
- package/src/tools/shared/point/__tests__/arrow-point.test.jsx +0 -91
- package/src/tools/shared/point/__tests__/base-point.test.jsx +0 -87
- package/src/tools/shared/point/arrow-point.jsx +0 -46
- package/src/tools/shared/point/arrow.jsx +0 -37
- package/src/tools/shared/point/base-point.jsx +0 -121
- package/src/tools/shared/point/index.jsx +0 -54
- package/src/tools/shared/styles.js +0 -27
- package/src/tools/shared/types.js +0 -10
- package/src/tools/sine/__tests__/component.test.jsx +0 -51
- package/src/tools/sine/component.jsx +0 -32
- package/src/tools/sine/index.js +0 -33
- package/src/tools/vector/__tests__/component.test.jsx +0 -25
- package/src/tools/vector/component.jsx +0 -56
- package/src/tools/vector/index.js +0 -4
- package/src/undo-redo.jsx +0 -45
- package/src/use-debounce.js +0 -13
- package/src/utils.js +0 -224
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { AutosizeInput as e } from "./autosize-input.js";
|
|
2
|
+
import { useDebounce as t } from "./use-debounce.js";
|
|
3
|
+
import n from "./label-svg-icon.js";
|
|
4
|
+
import { useCallback as r, useEffect as i, useState as a } from "react";
|
|
5
|
+
import o from "prop-types";
|
|
6
|
+
import { types as s } from "@pie-lib/plot";
|
|
7
|
+
import { styled as c, useTheme as l } from "@mui/material/styles";
|
|
8
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
import { color as p } from "@pie-lib/render-ui";
|
|
10
|
+
//#region src/mark-label.tsx
|
|
11
|
+
var m = c("div")(({ theme: e }) => ({
|
|
12
|
+
float: "right",
|
|
13
|
+
padding: e.spacing(.5),
|
|
14
|
+
borderRadius: "4px",
|
|
15
|
+
fontSize: "10px",
|
|
16
|
+
backgroundColor: p.defaults.WHITE,
|
|
17
|
+
color: p.defaults.CORRECT_WITH_ICON,
|
|
18
|
+
border: `solid 1px ${p.defaults.CORRECT_WITH_ICON}`
|
|
19
|
+
})), h = c("div")(({ theme: e }) => ({
|
|
20
|
+
float: "right",
|
|
21
|
+
padding: e.spacing(.5),
|
|
22
|
+
borderRadius: "4px",
|
|
23
|
+
fontSize: "10px",
|
|
24
|
+
backgroundColor: p.defaults.WHITE,
|
|
25
|
+
color: p.defaults.INCORRECT_WITH_ICON,
|
|
26
|
+
border: `solid 1px ${p.defaults.INCORRECT_WITH_ICON}`
|
|
27
|
+
})), g = c("div")(({ theme: e }) => ({
|
|
28
|
+
float: "right",
|
|
29
|
+
padding: e.spacing(.5),
|
|
30
|
+
borderRadius: "4px",
|
|
31
|
+
fontSize: "10px",
|
|
32
|
+
backgroundColor: p.defaults.WHITE,
|
|
33
|
+
color: p.defaults.MISSING_WITH_ICON,
|
|
34
|
+
border: `solid 1px ${p.defaults.MISSING_WITH_ICON}`,
|
|
35
|
+
fontWeight: "bold"
|
|
36
|
+
})), _ = c("div")(() => ({
|
|
37
|
+
float: "right",
|
|
38
|
+
padding: 0,
|
|
39
|
+
borderRadius: "4px",
|
|
40
|
+
fontSize: "10px",
|
|
41
|
+
backgroundColor: p.defaults.WHITE,
|
|
42
|
+
color: p.defaults.INCORRECT_WITH_ICON,
|
|
43
|
+
fontWeight: "bold"
|
|
44
|
+
})), v = (e, t, n) => ({
|
|
45
|
+
float: "right",
|
|
46
|
+
padding: e.spacing(.5),
|
|
47
|
+
fontFamily: e.typography.fontFamily,
|
|
48
|
+
fontSize: "10px",
|
|
49
|
+
border: t ? `solid 1px ${p.defaults.PRIMARY_DARK}` : n ? `solid 1px ${p.disabled()}` : `solid 1px ${p.defaults.SECONDARY}`,
|
|
50
|
+
borderRadius: "3px",
|
|
51
|
+
color: n ? p.disabled() : p.defaults.PRIMARY_DARK,
|
|
52
|
+
backgroundColor: p.defaults.WHITE,
|
|
53
|
+
WebkitOpacity: t ? "1" : void 0,
|
|
54
|
+
WebkitTextFillColor: n ? p.disabled() : void 0
|
|
55
|
+
}), y = () => ({
|
|
56
|
+
padding: "0",
|
|
57
|
+
border: "none",
|
|
58
|
+
color: "inherit",
|
|
59
|
+
fontWeight: "bold"
|
|
60
|
+
}), b = (e, t, n = {
|
|
61
|
+
width: 0,
|
|
62
|
+
height: 0
|
|
63
|
+
}) => {
|
|
64
|
+
let { scale: r, domain: i, range: a } = e, o = r.x(t.x) + n.width + 5, s = r.y(t.y) + n.height + 5, c = o >= r.x(i.max) ? "left" : "right";
|
|
65
|
+
return `${s >= r.y(a.min) ? "top" : "bottom"}-${c}`;
|
|
66
|
+
}, x = (e, t, n = {
|
|
67
|
+
width: 0,
|
|
68
|
+
height: 0
|
|
69
|
+
}, r) => {
|
|
70
|
+
let { scale: i } = e;
|
|
71
|
+
switch (r) {
|
|
72
|
+
case "bottom-right": return {
|
|
73
|
+
left: i.x(t.x) + 5,
|
|
74
|
+
top: i.y(t.y) + 5
|
|
75
|
+
};
|
|
76
|
+
case "bottom-left": return {
|
|
77
|
+
left: i.x(t.x) - 5 - n.width,
|
|
78
|
+
top: i.y(t.y) + 5
|
|
79
|
+
};
|
|
80
|
+
case "top-left": return {
|
|
81
|
+
left: i.x(t.x) - 5 - n.width,
|
|
82
|
+
top: i.y(t.y) - 5 - n.height
|
|
83
|
+
};
|
|
84
|
+
case "top-right": return {
|
|
85
|
+
left: i.x(t.x) + 5,
|
|
86
|
+
top: i.y(t.y) - 5 - n.height
|
|
87
|
+
};
|
|
88
|
+
default: return {};
|
|
89
|
+
}
|
|
90
|
+
}, S = ({ _ref: t, externalInputRef: n, label: r, disabled: i, inputStyle: a, onChange: o, onBlur: s }) => /* @__PURE__ */ d(e, {
|
|
91
|
+
inputRef: (e) => {
|
|
92
|
+
t(e), n(e);
|
|
93
|
+
},
|
|
94
|
+
disabled: i,
|
|
95
|
+
inputStyle: a,
|
|
96
|
+
value: r,
|
|
97
|
+
onChange: o,
|
|
98
|
+
onBlur: s
|
|
99
|
+
});
|
|
100
|
+
S.propTypes = {
|
|
101
|
+
_ref: o.func,
|
|
102
|
+
externalInputRef: o.func,
|
|
103
|
+
label: o.string,
|
|
104
|
+
disabled: o.bool,
|
|
105
|
+
inputStyle: o.object,
|
|
106
|
+
onChange: o.func,
|
|
107
|
+
onBlur: o.func
|
|
108
|
+
};
|
|
109
|
+
var C = (e) => {
|
|
110
|
+
let [o, s] = a(null), c = r((e) => s(e)), p = l(), { mark: C, graphProps: w, disabled: T, inputRef: E } = e, [D, O] = a(C.label), { correctness: k, correctnesslabel: A, correctlabel: j } = C, M = (e) => O(e.target.value), N = r(() => {
|
|
111
|
+
D === "" && e.onChange("");
|
|
112
|
+
}, [D, e.onChange]), P = t(D, 200);
|
|
113
|
+
i(() => {
|
|
114
|
+
O(C.label);
|
|
115
|
+
}, [C.label]), i(() => {
|
|
116
|
+
typeof P == "string" && P !== C.label && e.onChange(P);
|
|
117
|
+
}, [P]);
|
|
118
|
+
let F = o ? o.getBoundingClientRect() : {
|
|
119
|
+
width: 0,
|
|
120
|
+
height: 0
|
|
121
|
+
}, I = x(w, C, F, b(w, C, F)), L = {
|
|
122
|
+
position: "fixed",
|
|
123
|
+
pointerEvents: "auto",
|
|
124
|
+
display: "flex",
|
|
125
|
+
alignItems: "center",
|
|
126
|
+
gap: "3px",
|
|
127
|
+
...I
|
|
128
|
+
}, R = {
|
|
129
|
+
...L,
|
|
130
|
+
top: I.top + 25
|
|
131
|
+
}, z = T || C.disabled, B = (e, t) => /* @__PURE__ */ d(S, {
|
|
132
|
+
_ref: c,
|
|
133
|
+
externalInputRef: E,
|
|
134
|
+
label: t,
|
|
135
|
+
disabled: z,
|
|
136
|
+
inputStyle: e,
|
|
137
|
+
onChange: M,
|
|
138
|
+
onBlur: N
|
|
139
|
+
}), V = y();
|
|
140
|
+
return k === "correct" && A === "correct" && j ? /* @__PURE__ */ f(m, {
|
|
141
|
+
style: L,
|
|
142
|
+
children: [/* @__PURE__ */ d(n, { type: "correct" }), B(V, j)]
|
|
143
|
+
}) : k === "correct" && A === "correct" && !j ? null : k === "correct" && A === "incorrect" ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f(h, {
|
|
144
|
+
style: L,
|
|
145
|
+
children: [/* @__PURE__ */ d(n, { type: "incorrect" }), D === "" ? /* @__PURE__ */ d(n, {
|
|
146
|
+
type: "empty",
|
|
147
|
+
style: { marginLeft: "3px" }
|
|
148
|
+
}) : B(V, D)]
|
|
149
|
+
}), /* @__PURE__ */ d(g, {
|
|
150
|
+
style: R,
|
|
151
|
+
children: B(V, j)
|
|
152
|
+
})] }) : k === "missing" ? /* @__PURE__ */ d(g, {
|
|
153
|
+
style: L,
|
|
154
|
+
children: B(V, D)
|
|
155
|
+
}) : k === "incorrect" ? /* @__PURE__ */ d(_, {
|
|
156
|
+
style: L,
|
|
157
|
+
children: B(V, D)
|
|
158
|
+
}) : /* @__PURE__ */ d("div", {
|
|
159
|
+
style: L,
|
|
160
|
+
children: B(v(p, T, C.disabled), D)
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
C.propTypes = {
|
|
164
|
+
disabled: o.bool,
|
|
165
|
+
onChange: o.func,
|
|
166
|
+
graphProps: s.GraphPropsType,
|
|
167
|
+
inputRef: o.func,
|
|
168
|
+
mark: o.object
|
|
169
|
+
};
|
|
170
|
+
//#endregion
|
|
171
|
+
export { C as default };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
+
import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
4
|
+
import r from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js";
|
|
5
|
+
import i from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js";
|
|
6
|
+
import a from "../constants/orientation.js";
|
|
7
|
+
import o from "./AxisRenderer.js";
|
|
8
|
+
import s from "../utils/getTickPosition.js";
|
|
9
|
+
import c from "../utils/getTickFormatter.js";
|
|
10
|
+
import l from "../utils/createPoint.js";
|
|
11
|
+
import u from "../utils/getAxisRangePaddingConfig.js";
|
|
12
|
+
import d from "react";
|
|
13
|
+
import "prop-types";
|
|
14
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js
|
|
15
|
+
var f = /* @__PURE__ */ e(t()), p = [
|
|
16
|
+
"children",
|
|
17
|
+
"axisClassName",
|
|
18
|
+
"hideAxisLine",
|
|
19
|
+
"hideTicks",
|
|
20
|
+
"hideZero",
|
|
21
|
+
"innerRef",
|
|
22
|
+
"left",
|
|
23
|
+
"numTicks",
|
|
24
|
+
"orientation",
|
|
25
|
+
"rangePadding",
|
|
26
|
+
"scale",
|
|
27
|
+
"tickFormat",
|
|
28
|
+
"tickLength",
|
|
29
|
+
"tickValues",
|
|
30
|
+
"top"
|
|
31
|
+
];
|
|
32
|
+
function m() {
|
|
33
|
+
return m = Object.assign ? Object.assign.bind() : function(e) {
|
|
34
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
35
|
+
var n = arguments[t];
|
|
36
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
37
|
+
}
|
|
38
|
+
return e;
|
|
39
|
+
}, m.apply(this, arguments);
|
|
40
|
+
}
|
|
41
|
+
function h(e, t) {
|
|
42
|
+
if (e == null) return {};
|
|
43
|
+
var n = {}, r = Object.keys(e), i, a;
|
|
44
|
+
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
45
|
+
return n;
|
|
46
|
+
}
|
|
47
|
+
function g(e) {
|
|
48
|
+
var t = e.children, g = t === void 0 ? o : t, _ = e.axisClassName, v = e.hideAxisLine, y = v === void 0 ? !1 : v, b = e.hideTicks, x = b === void 0 ? !1 : b, S = e.hideZero, C = S === void 0 ? !1 : S, w = e.innerRef, T = e.left, E = T === void 0 ? 0 : T, D = e.numTicks, O = D === void 0 ? 10 : D, k = e.orientation, A = k === void 0 ? a.bottom : k, j = e.rangePadding, M = j === void 0 ? 0 : j, N = e.scale, P = e.tickFormat, F = e.tickLength, I = F === void 0 ? 8 : F, L = e.tickValues, R = e.top, z = R === void 0 ? 0 : R, B = h(e, p), V = P ?? c(N), H = A === a.left, U = A === a.top, W = U || A === a.bottom, G = s(N), K = H || U ? -1 : 1, q = N.range(), J = u(M), Y = l({
|
|
49
|
+
x: Number(q[0]) + .5 - J.start,
|
|
50
|
+
y: 0
|
|
51
|
+
}, W), X = l({
|
|
52
|
+
x: Number(q[q.length - 1]) + .5 + J.end,
|
|
53
|
+
y: 0
|
|
54
|
+
}, W), Z = (L ?? i(N, O)).filter(function(e) {
|
|
55
|
+
return !C || e !== 0 && e !== "0";
|
|
56
|
+
}).map(function(e, t) {
|
|
57
|
+
return {
|
|
58
|
+
value: e,
|
|
59
|
+
index: t
|
|
60
|
+
};
|
|
61
|
+
}), Q = Z.map(function(e) {
|
|
62
|
+
var t = e.value, n = e.index, i = r(G(t));
|
|
63
|
+
return {
|
|
64
|
+
value: t,
|
|
65
|
+
index: n,
|
|
66
|
+
from: l({
|
|
67
|
+
x: i,
|
|
68
|
+
y: 0
|
|
69
|
+
}, W),
|
|
70
|
+
to: l({
|
|
71
|
+
x: i,
|
|
72
|
+
y: I * K
|
|
73
|
+
}, W),
|
|
74
|
+
formattedValue: V(t, n, Z)
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
return /*#__PURE__*/ d.createElement(n, {
|
|
78
|
+
className: (0, f.default)("visx-axis", _),
|
|
79
|
+
innerRef: w,
|
|
80
|
+
top: z,
|
|
81
|
+
left: E
|
|
82
|
+
}, g(m({}, B, {
|
|
83
|
+
axisFromPoint: Y,
|
|
84
|
+
axisToPoint: X,
|
|
85
|
+
hideAxisLine: y,
|
|
86
|
+
hideTicks: x,
|
|
87
|
+
hideZero: C,
|
|
88
|
+
horizontal: W,
|
|
89
|
+
numTicks: O,
|
|
90
|
+
orientation: A,
|
|
91
|
+
rangePadding: M,
|
|
92
|
+
scale: N,
|
|
93
|
+
tickFormat: V,
|
|
94
|
+
tickLength: I,
|
|
95
|
+
tickPosition: G,
|
|
96
|
+
tickSign: K,
|
|
97
|
+
ticks: Q
|
|
98
|
+
})));
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
export { g as default };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
+
import n from "../../../../../../@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js";
|
|
4
|
+
import r from "../../../../../../@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js";
|
|
5
|
+
import i from "../constants/orientation.js";
|
|
6
|
+
import a from "../utils/getLabelTransform.js";
|
|
7
|
+
import o from "./Ticks.js";
|
|
8
|
+
import s from "react";
|
|
9
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js
|
|
10
|
+
var c = /* @__PURE__ */ e(t());
|
|
11
|
+
function l() {
|
|
12
|
+
return l = Object.assign ? Object.assign.bind() : function(e) {
|
|
13
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
14
|
+
var n = arguments[t];
|
|
15
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
16
|
+
}
|
|
17
|
+
return e;
|
|
18
|
+
}, l.apply(this, arguments);
|
|
19
|
+
}
|
|
20
|
+
var u = {
|
|
21
|
+
textAnchor: "middle",
|
|
22
|
+
fontFamily: "Arial",
|
|
23
|
+
fontSize: 10,
|
|
24
|
+
fill: "#222"
|
|
25
|
+
};
|
|
26
|
+
function d(e) {
|
|
27
|
+
var t = e.axisFromPoint, d = e.axisLineClassName, f = e.axisToPoint, p = e.hideAxisLine, m = e.hideTicks, h = e.horizontal, g = e.label, _ = g === void 0 ? "" : g, v = e.labelClassName, y = e.labelOffset, b = y === void 0 ? 14 : y, x = e.labelProps, S = e.orientation, C = S === void 0 ? i.bottom : S, w = e.scale, T = e.stroke, E = T === void 0 ? "#222" : T, D = e.strokeDasharray, O = e.strokeWidth, k = O === void 0 ? 1 : O, A = e.tickClassName, j = e.tickComponent, M = e.tickLineProps, N = e.tickLabelProps, P = e.tickLength, F = P === void 0 ? 8 : P, I = e.tickStroke, L = I === void 0 ? "#222" : I, R = e.tickTransform, z = e.ticks, B = e.ticksComponent, V = B === void 0 ? o : B, H = l({}, u, x), U = l({}, u, typeof N == "object" ? N : null), W = z.map(function(e) {
|
|
28
|
+
var t = e.value, n = e.index;
|
|
29
|
+
return typeof N == "function" ? N(t, n, z) : U;
|
|
30
|
+
}), G = Math.max.apply(Math, [10].concat(W.map(function(e) {
|
|
31
|
+
return typeof e.fontSize == "number" ? e.fontSize : 0;
|
|
32
|
+
})));
|
|
33
|
+
return /*#__PURE__*/ s.createElement(s.Fragment, null, V({
|
|
34
|
+
hideTicks: m,
|
|
35
|
+
horizontal: h,
|
|
36
|
+
orientation: C,
|
|
37
|
+
scale: w,
|
|
38
|
+
tickClassName: A,
|
|
39
|
+
tickComponent: j,
|
|
40
|
+
tickLabelProps: W,
|
|
41
|
+
tickStroke: L,
|
|
42
|
+
tickTransform: R,
|
|
43
|
+
ticks: z,
|
|
44
|
+
strokeWidth: k,
|
|
45
|
+
tickLineProps: M
|
|
46
|
+
}), !p && /*#__PURE__*/ s.createElement(n, {
|
|
47
|
+
className: (0, c.default)("visx-axis-line", d),
|
|
48
|
+
from: t,
|
|
49
|
+
to: f,
|
|
50
|
+
stroke: E,
|
|
51
|
+
strokeWidth: k,
|
|
52
|
+
strokeDasharray: D
|
|
53
|
+
}), _ && /*#__PURE__*/ s.createElement(r, l({ className: (0, c.default)("visx-axis-label", v) }, a({
|
|
54
|
+
labelOffset: b,
|
|
55
|
+
labelProps: H,
|
|
56
|
+
orientation: C,
|
|
57
|
+
range: w.range(),
|
|
58
|
+
tickLabelFontSize: G,
|
|
59
|
+
tickLength: F
|
|
60
|
+
}), H), _));
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { d as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
+
import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
4
|
+
import r from "../../../../../../@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js";
|
|
5
|
+
import i from "../../../../../../@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js";
|
|
6
|
+
import a from "../constants/orientation.js";
|
|
7
|
+
import o from "react";
|
|
8
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js
|
|
9
|
+
var s = /* @__PURE__ */ e(t());
|
|
10
|
+
function c() {
|
|
11
|
+
return c = Object.assign ? Object.assign.bind() : function(e) {
|
|
12
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
13
|
+
var n = arguments[t];
|
|
14
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
17
|
+
}, c.apply(this, arguments);
|
|
18
|
+
}
|
|
19
|
+
function l(e) {
|
|
20
|
+
var t = e.hideTicks, l = e.horizontal, u = e.orientation, d = e.tickClassName, f = e.tickComponent, p = e.tickLabelProps, m = e.tickStroke, h = m === void 0 ? "#222" : m, g = e.tickTransform, _ = e.ticks, v = e.strokeWidth, y = e.tickLineProps;
|
|
21
|
+
return _.map(function(e) {
|
|
22
|
+
var m = e.value, _ = e.index, b = e.from, x = e.to, S = e.formattedValue, C = p[_] ?? {}, w = Math.max(10, typeof C.fontSize == "number" && C.fontSize || 0), T = x.y + (l && u !== a.top ? w : 0);
|
|
23
|
+
return /*#__PURE__*/ o.createElement(n, {
|
|
24
|
+
key: "visx-tick-" + m + "-" + _,
|
|
25
|
+
className: (0, s.default)("visx-axis-tick", d),
|
|
26
|
+
transform: g
|
|
27
|
+
}, !t && /*#__PURE__*/ o.createElement(r, c({
|
|
28
|
+
from: b,
|
|
29
|
+
to: x,
|
|
30
|
+
stroke: h,
|
|
31
|
+
strokeWidth: v,
|
|
32
|
+
strokeLinecap: "square"
|
|
33
|
+
}, y)), f ? f(c({}, C, {
|
|
34
|
+
x: x.x,
|
|
35
|
+
y: T,
|
|
36
|
+
formattedValue: S
|
|
37
|
+
})) : /*#__PURE__*/ o.createElement(i, c({
|
|
38
|
+
x: x.x,
|
|
39
|
+
y: T
|
|
40
|
+
}, C), S));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { l as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Point as e } from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
var r = t.x, i = t.y;
|
|
5
|
+
return new e(n ? {
|
|
6
|
+
x: r,
|
|
7
|
+
y: i
|
|
8
|
+
} : {
|
|
9
|
+
x: i,
|
|
10
|
+
y: r
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { t as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js
|
|
2
|
+
function e() {
|
|
3
|
+
return e = Object.assign ? Object.assign.bind() : function(e) {
|
|
4
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
5
|
+
var n = arguments[t];
|
|
6
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
7
|
+
}
|
|
8
|
+
return e;
|
|
9
|
+
}, e.apply(this, arguments);
|
|
10
|
+
}
|
|
11
|
+
function t(t) {
|
|
12
|
+
return t === void 0 && (t = 0), typeof t == "number" ? {
|
|
13
|
+
start: t,
|
|
14
|
+
end: t
|
|
15
|
+
} : e({
|
|
16
|
+
start: 0,
|
|
17
|
+
end: 0
|
|
18
|
+
}, t);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { t as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from "../constants/orientation.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js
|
|
3
|
+
function t(t) {
|
|
4
|
+
var n = t.labelOffset, r = t.labelProps, i = t.orientation, a = t.range, o = t.tickLabelFontSize, s = t.tickLength, c = i === e.left || i === e.top ? -1 : 1, l, u, d;
|
|
5
|
+
if (i === e.top || i === e.bottom) {
|
|
6
|
+
var f = i === e.bottom && typeof r.fontSize == "number" ? r.fontSize : 0;
|
|
7
|
+
l = (Number(a[0]) + Number(a[a.length - 1])) / 2, u = c * (s + n + o + f);
|
|
8
|
+
} else l = c * ((Number(a[0]) + Number(a[a.length - 1])) / 2), u = -(s + n), d = "rotate(" + c * 90 + ")";
|
|
9
|
+
return {
|
|
10
|
+
x: l,
|
|
11
|
+
y: u,
|
|
12
|
+
transform: d
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js
|
|
3
|
+
function t(t) {
|
|
4
|
+
var n = t;
|
|
5
|
+
return "tickFormat" in n ? n.tickFormat() : e;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
t === void 0 && (t = "center");
|
|
4
|
+
var n = e;
|
|
5
|
+
if (t !== "start" && "bandwidth" in n) {
|
|
6
|
+
var r = n.bandwidth();
|
|
7
|
+
return t === "center" && (r /= 2), n.round() && (r = Math.round(r)), function(e) {
|
|
8
|
+
var t = n(e);
|
|
9
|
+
return typeof t == "number" ? t + r : t;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return e;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { e as default };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
+
import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
4
|
+
import r from "./GridRows.js";
|
|
5
|
+
import i from "./GridColumns.js";
|
|
6
|
+
import a from "react";
|
|
7
|
+
import o from "prop-types";
|
|
8
|
+
//#region ../../../node_modules/.bun/@visx+grid@3.12.0+f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js
|
|
9
|
+
var s = /* @__PURE__ */ e(t()), c = [
|
|
10
|
+
"top",
|
|
11
|
+
"left",
|
|
12
|
+
"xScale",
|
|
13
|
+
"yScale",
|
|
14
|
+
"width",
|
|
15
|
+
"height",
|
|
16
|
+
"className",
|
|
17
|
+
"stroke",
|
|
18
|
+
"strokeWidth",
|
|
19
|
+
"strokeDasharray",
|
|
20
|
+
"numTicksRows",
|
|
21
|
+
"numTicksColumns",
|
|
22
|
+
"rowLineStyle",
|
|
23
|
+
"columnLineStyle",
|
|
24
|
+
"xOffset",
|
|
25
|
+
"yOffset",
|
|
26
|
+
"rowTickValues",
|
|
27
|
+
"columnTickValues"
|
|
28
|
+
];
|
|
29
|
+
function l() {
|
|
30
|
+
return l = Object.assign ? Object.assign.bind() : function(e) {
|
|
31
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
32
|
+
var n = arguments[t];
|
|
33
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
34
|
+
}
|
|
35
|
+
return e;
|
|
36
|
+
}, l.apply(this, arguments);
|
|
37
|
+
}
|
|
38
|
+
function u(e, t) {
|
|
39
|
+
if (e == null) return {};
|
|
40
|
+
var n = {}, r = Object.keys(e), i, a;
|
|
41
|
+
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
42
|
+
return n;
|
|
43
|
+
}
|
|
44
|
+
function d(e) {
|
|
45
|
+
var t = e.top, o = e.left, d = e.xScale, f = e.yScale, p = e.width, m = e.height, h = e.className, g = e.stroke, _ = e.strokeWidth, v = e.strokeDasharray, y = e.numTicksRows, b = e.numTicksColumns, x = e.rowLineStyle, S = e.columnLineStyle, C = e.xOffset, w = e.yOffset, T = e.rowTickValues, E = e.columnTickValues, D = u(e, c);
|
|
46
|
+
return /*#__PURE__*/ a.createElement(n, {
|
|
47
|
+
className: (0, s.default)("visx-grid", h),
|
|
48
|
+
top: t,
|
|
49
|
+
left: o
|
|
50
|
+
}, /*#__PURE__*/ a.createElement(r, l({
|
|
51
|
+
className: h,
|
|
52
|
+
scale: f,
|
|
53
|
+
width: p,
|
|
54
|
+
stroke: g,
|
|
55
|
+
strokeWidth: _,
|
|
56
|
+
strokeDasharray: v,
|
|
57
|
+
numTicks: y,
|
|
58
|
+
lineStyle: x,
|
|
59
|
+
offset: w,
|
|
60
|
+
tickValues: T
|
|
61
|
+
}, D)), /*#__PURE__*/ a.createElement(i, l({
|
|
62
|
+
className: h,
|
|
63
|
+
scale: d,
|
|
64
|
+
height: m,
|
|
65
|
+
stroke: g,
|
|
66
|
+
strokeWidth: _,
|
|
67
|
+
strokeDasharray: v,
|
|
68
|
+
numTicks: b,
|
|
69
|
+
lineStyle: S,
|
|
70
|
+
offset: C,
|
|
71
|
+
tickValues: E
|
|
72
|
+
}, D)));
|
|
73
|
+
}
|
|
74
|
+
d.propTypes = {
|
|
75
|
+
rowTickValues: o.array,
|
|
76
|
+
columnTickValues: o.array
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { d as default };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
+
import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
4
|
+
import r from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js";
|
|
5
|
+
import i from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js";
|
|
6
|
+
import { Point as a } from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
|
|
7
|
+
import { require_Line as o } from "../../../../../../@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js";
|
|
8
|
+
import s from "../utils/getScaleBandwidth.js";
|
|
9
|
+
import c from "react";
|
|
10
|
+
import l from "prop-types";
|
|
11
|
+
//#region ../../../node_modules/.bun/@visx+grid@3.12.0+f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js
|
|
12
|
+
var u = /* @__PURE__ */ e(t()), d = /* @__PURE__ */ e(o()), f = [
|
|
13
|
+
"top",
|
|
14
|
+
"left",
|
|
15
|
+
"scale",
|
|
16
|
+
"height",
|
|
17
|
+
"stroke",
|
|
18
|
+
"strokeWidth",
|
|
19
|
+
"strokeDasharray",
|
|
20
|
+
"className",
|
|
21
|
+
"numTicks",
|
|
22
|
+
"lineStyle",
|
|
23
|
+
"offset",
|
|
24
|
+
"tickValues",
|
|
25
|
+
"children"
|
|
26
|
+
];
|
|
27
|
+
function p() {
|
|
28
|
+
return p = Object.assign ? Object.assign.bind() : function(e) {
|
|
29
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
30
|
+
var n = arguments[t];
|
|
31
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
32
|
+
}
|
|
33
|
+
return e;
|
|
34
|
+
}, p.apply(this, arguments);
|
|
35
|
+
}
|
|
36
|
+
function m(e, t) {
|
|
37
|
+
if (e == null) return {};
|
|
38
|
+
var n = {}, r = Object.keys(e), i, a;
|
|
39
|
+
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
40
|
+
return n;
|
|
41
|
+
}
|
|
42
|
+
function h(e) {
|
|
43
|
+
var t = e.top, o = t === void 0 ? 0 : t, l = e.left, h = l === void 0 ? 0 : l, g = e.scale, _ = e.height, v = e.stroke, y = v === void 0 ? "#eaf0f6" : v, b = e.strokeWidth, x = b === void 0 ? 1 : b, S = e.strokeDasharray, C = e.className, w = e.numTicks, T = w === void 0 ? 10 : w, E = e.lineStyle, D = e.offset, O = e.tickValues, k = e.children, A = m(e, f), j = O ?? i(g, T), M = (D ?? 0) + s(g) / 2, N = j.map(function(e, t) {
|
|
44
|
+
var n = (r(g(e)) ?? 0) + M;
|
|
45
|
+
return {
|
|
46
|
+
index: t,
|
|
47
|
+
from: new a({
|
|
48
|
+
x: n,
|
|
49
|
+
y: 0
|
|
50
|
+
}),
|
|
51
|
+
to: new a({
|
|
52
|
+
x: n,
|
|
53
|
+
y: _
|
|
54
|
+
})
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
return /*#__PURE__*/ c.createElement(n, {
|
|
58
|
+
className: (0, u.default)("visx-columns", C),
|
|
59
|
+
top: o,
|
|
60
|
+
left: h
|
|
61
|
+
}, k ? k({ lines: N }) : N.map(function(e) {
|
|
62
|
+
var t = e.from, n = e.to, r = e.index;
|
|
63
|
+
return /*#__PURE__*/ c.createElement(d.default, p({
|
|
64
|
+
key: "column-line-" + r,
|
|
65
|
+
from: t,
|
|
66
|
+
to: n,
|
|
67
|
+
stroke: y,
|
|
68
|
+
strokeWidth: x,
|
|
69
|
+
strokeDasharray: S,
|
|
70
|
+
style: E
|
|
71
|
+
}, A));
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
h.propTypes = {
|
|
75
|
+
tickValues: l.array,
|
|
76
|
+
height: l.number.isRequired
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { h as default };
|