@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,23 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in e) t(r, i, {
|
|
5
|
+
get: e[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
}, c = (e, i, o, s) => {
|
|
10
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
11
|
+
get: ((e) => i[e]).bind(null, d),
|
|
12
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
13
|
+
});
|
|
14
|
+
return e;
|
|
15
|
+
}, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
|
|
16
|
+
value: n,
|
|
17
|
+
enumerable: !0
|
|
18
|
+
}) : a, n)), u = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
19
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
20
|
+
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { o as __commonJSMin, s as __exportAll, u as __require, l as __toESM };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AutosizeInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'> {
|
|
3
|
+
className?: string;
|
|
4
|
+
inputClassName?: string;
|
|
5
|
+
inputRef?: (node: HTMLInputElement | null) => void;
|
|
6
|
+
inputStyle?: React.CSSProperties;
|
|
7
|
+
minWidth?: number | string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare const AutosizeInput: React.ForwardRefExoticComponent<AutosizeInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import e, { useCallback as t, useLayoutEffect as n, useRef as r, useState as i } from "react";
|
|
2
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
3
|
+
//#region src/autosize-input.tsx
|
|
4
|
+
var s = (e) => {
|
|
5
|
+
let t = Number.parseFloat(e);
|
|
6
|
+
return Number.isFinite(t) ? t : 0;
|
|
7
|
+
}, c = (e, t) => {
|
|
8
|
+
let n = e ?? t;
|
|
9
|
+
return typeof n == "number" ? n : typeof n == "string" && n.endsWith("px") ? s(n) : 1;
|
|
10
|
+
}, l = e.forwardRef(({ className: e, inputClassName: l, inputRef: u, inputStyle: d, minWidth: f, placeholder: p, style: m, value: h, defaultValue: g, ..._ }, v) => {
|
|
11
|
+
let y = r(null), b = r(u), x = r(v), S = r(null), [C, w] = i(() => c(f, d?.minWidth));
|
|
12
|
+
b.current = u, x.current = v;
|
|
13
|
+
let T = t((e) => {
|
|
14
|
+
y.current = e, b.current?.(e);
|
|
15
|
+
let t = x.current;
|
|
16
|
+
typeof t == "function" ? t(e) : t && (t.current = e);
|
|
17
|
+
}, []);
|
|
18
|
+
return n(() => {
|
|
19
|
+
let e = y.current, t = S.current;
|
|
20
|
+
if (!e || !t) return;
|
|
21
|
+
let n = window.getComputedStyle(e);
|
|
22
|
+
t.style.font = n.font, t.style.letterSpacing = n.letterSpacing, t.style.textTransform = n.textTransform, t.textContent = String(h ?? g ?? p ?? "") || " ";
|
|
23
|
+
let r = s(n.paddingLeft) + s(n.paddingRight) + s(n.borderLeftWidth) + s(n.borderRightWidth), i = Math.ceil(t.getBoundingClientRect().width + 2), a = n.boxSizing === "border-box" ? i + r : i;
|
|
24
|
+
w(Math.max(c(f, d?.minWidth), a));
|
|
25
|
+
}, [
|
|
26
|
+
g,
|
|
27
|
+
l,
|
|
28
|
+
d,
|
|
29
|
+
f,
|
|
30
|
+
p,
|
|
31
|
+
h
|
|
32
|
+
]), /* @__PURE__ */ o("span", {
|
|
33
|
+
className: e,
|
|
34
|
+
style: {
|
|
35
|
+
display: "inline-block",
|
|
36
|
+
...m
|
|
37
|
+
},
|
|
38
|
+
children: [/* @__PURE__ */ a("input", {
|
|
39
|
+
..._,
|
|
40
|
+
ref: T,
|
|
41
|
+
className: l,
|
|
42
|
+
placeholder: p,
|
|
43
|
+
style: {
|
|
44
|
+
width: C,
|
|
45
|
+
...d
|
|
46
|
+
},
|
|
47
|
+
value: h,
|
|
48
|
+
defaultValue: g
|
|
49
|
+
}), /* @__PURE__ */ a("span", {
|
|
50
|
+
ref: S,
|
|
51
|
+
"aria-hidden": "true",
|
|
52
|
+
style: {
|
|
53
|
+
height: 0,
|
|
54
|
+
left: 0,
|
|
55
|
+
overflow: "hidden",
|
|
56
|
+
position: "absolute",
|
|
57
|
+
top: 0,
|
|
58
|
+
visibility: "hidden",
|
|
59
|
+
whiteSpace: "pre"
|
|
60
|
+
}
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
l.displayName = "AutosizeInput";
|
|
65
|
+
//#endregion
|
|
66
|
+
export { l as AutosizeInput };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing/src/axis/arrow.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export declare class Arrow extends React.Component {
|
|
11
|
+
render(): React.JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export default Arrow;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { types as n } from "@pie-lib/plot";
|
|
4
|
+
import { styled as r } from "@mui/material/styles";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/axis/arrow.tsx
|
|
7
|
+
var a = r("path")(({ theme: e }) => ({ fill: `var(--arrow-color, ${e.palette.common.black})` })), o = class extends e.Component {
|
|
8
|
+
render() {
|
|
9
|
+
let { x: e, y: t, className: n, scale: r } = this.props, o = this.props.direction || "left", s = r.x(e), c = r.y(t), l = "", u = (e, t, n) => `translate(${e}, ${t}) rotate(${n})`;
|
|
10
|
+
return o === "left" && (l = u(s - 15, c, 0)), o === "right" && (l = u(s + 15, c, 180)), o === "up" && (l = u(s, c - 15, 90)), o === "down" && (l = u(s, c + 15, 270)), /* @__PURE__ */ i(a, {
|
|
11
|
+
d: "m 0,0 8,-5 0,10 -8,-5",
|
|
12
|
+
transform: l,
|
|
13
|
+
className: n
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
o.propTypes = {
|
|
18
|
+
y: t.number,
|
|
19
|
+
x: t.number,
|
|
20
|
+
direction: t.oneOf([
|
|
21
|
+
"left",
|
|
22
|
+
"right",
|
|
23
|
+
"up",
|
|
24
|
+
"down"
|
|
25
|
+
]),
|
|
26
|
+
className: t.string,
|
|
27
|
+
scale: n.ScaleType.isRequired
|
|
28
|
+
}, o.defaultProps = {
|
|
29
|
+
y: 0,
|
|
30
|
+
x: 0,
|
|
31
|
+
direction: "left"
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { o as default };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing/src/axis/axes.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare const AxisPropTypes: {
|
|
12
|
+
includeArrows: PropTypes.Requireable<object>;
|
|
13
|
+
graphProps: PropTypes.Requireable<object>;
|
|
14
|
+
};
|
|
15
|
+
export declare const sharedValues: (firstNegativeX: any, firstNegativeY: any, distanceFromOriginToFirstNegativeX: any, distanceFromOriginToFirstNegativeY: any, deltaAllowance: any, dy: any) => any[];
|
|
16
|
+
export declare const firstNegativeValue: (interval: any) => any;
|
|
17
|
+
export declare class RawXAxis extends React.Component {
|
|
18
|
+
static propTypes: {
|
|
19
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
20
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
21
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
+
}>>>;
|
|
24
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
25
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
27
|
+
}>>>;
|
|
28
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
29
|
+
min: PropTypes.Validator<number>;
|
|
30
|
+
max: PropTypes.Validator<number>;
|
|
31
|
+
step: PropTypes.Requireable<number>;
|
|
32
|
+
}>>>;
|
|
33
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
34
|
+
min: PropTypes.Validator<number>;
|
|
35
|
+
max: PropTypes.Validator<number>;
|
|
36
|
+
step: PropTypes.Requireable<number>;
|
|
37
|
+
}>>>;
|
|
38
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
39
|
+
width: PropTypes.Validator<number>;
|
|
40
|
+
height: PropTypes.Validator<number>;
|
|
41
|
+
}>>>;
|
|
42
|
+
}>>>;
|
|
43
|
+
includeArrows: PropTypes.Requireable<object>;
|
|
44
|
+
};
|
|
45
|
+
static defaultProps: {
|
|
46
|
+
includeArrows: {
|
|
47
|
+
left: boolean;
|
|
48
|
+
right: boolean;
|
|
49
|
+
up: boolean;
|
|
50
|
+
down: boolean;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
render(): React.JSX.Element;
|
|
54
|
+
}
|
|
55
|
+
export declare class RawYAxis extends React.Component {
|
|
56
|
+
static propTypes: {
|
|
57
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
58
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
59
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
60
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
61
|
+
}>>>;
|
|
62
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
63
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
64
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
65
|
+
}>>>;
|
|
66
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
67
|
+
min: PropTypes.Validator<number>;
|
|
68
|
+
max: PropTypes.Validator<number>;
|
|
69
|
+
step: PropTypes.Requireable<number>;
|
|
70
|
+
}>>>;
|
|
71
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
72
|
+
min: PropTypes.Validator<number>;
|
|
73
|
+
max: PropTypes.Validator<number>;
|
|
74
|
+
step: PropTypes.Requireable<number>;
|
|
75
|
+
}>>>;
|
|
76
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
77
|
+
width: PropTypes.Validator<number>;
|
|
78
|
+
height: PropTypes.Validator<number>;
|
|
79
|
+
}>>>;
|
|
80
|
+
}>>>;
|
|
81
|
+
includeArrows: PropTypes.Requireable<object>;
|
|
82
|
+
};
|
|
83
|
+
static defaultProps: {
|
|
84
|
+
includeArrows: {
|
|
85
|
+
left: boolean;
|
|
86
|
+
right: boolean;
|
|
87
|
+
up: boolean;
|
|
88
|
+
down: boolean;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
render(): React.JSX.Element;
|
|
92
|
+
}
|
|
93
|
+
export default class Axes extends React.Component {
|
|
94
|
+
static propTypes: {
|
|
95
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
96
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
97
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
98
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
99
|
+
}>>>;
|
|
100
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
101
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
102
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
103
|
+
}>>>;
|
|
104
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
105
|
+
min: PropTypes.Validator<number>;
|
|
106
|
+
max: PropTypes.Validator<number>;
|
|
107
|
+
step: PropTypes.Requireable<number>;
|
|
108
|
+
}>>>;
|
|
109
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
110
|
+
min: PropTypes.Validator<number>;
|
|
111
|
+
max: PropTypes.Validator<number>;
|
|
112
|
+
step: PropTypes.Requireable<number>;
|
|
113
|
+
}>>>;
|
|
114
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
115
|
+
width: PropTypes.Validator<number>;
|
|
116
|
+
height: PropTypes.Validator<number>;
|
|
117
|
+
}>>>;
|
|
118
|
+
}>>>;
|
|
119
|
+
includeArrows: PropTypes.Requireable<object>;
|
|
120
|
+
};
|
|
121
|
+
static defaultProps: {
|
|
122
|
+
includeArrows: {
|
|
123
|
+
left: boolean;
|
|
124
|
+
right: boolean;
|
|
125
|
+
up: boolean;
|
|
126
|
+
down: boolean;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
xValues: any;
|
|
130
|
+
yValues: any;
|
|
131
|
+
render(): React.JSX.Element;
|
|
132
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js";
|
|
2
|
+
import t from "./arrow.js";
|
|
3
|
+
import { amountToIncreaseWidth as n, countWords as r, findLongestWord as i, getTickValues as a } from "../utils.js";
|
|
4
|
+
import o from "react";
|
|
5
|
+
import s from "prop-types";
|
|
6
|
+
import { types as c } from "@pie-lib/plot";
|
|
7
|
+
import { styled as l } from "@mui/material/styles";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
import * as f from "@pie-lib/render-ui";
|
|
10
|
+
import { Readable as p, color as m } from "@pie-lib/render-ui";
|
|
11
|
+
//#region src/axis/axes.tsx
|
|
12
|
+
function h(e) {
|
|
13
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
14
|
+
}
|
|
15
|
+
function g(e, t) {
|
|
16
|
+
return !e || h(e) ? e : h(e.default) ? e.default : t && h(e[t]) ? e[t] : t && h(e[t]?.default) ? e[t].default : e;
|
|
17
|
+
}
|
|
18
|
+
var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b = y && typeof y == "object" ? y : v, x = {
|
|
19
|
+
includeArrows: s.object,
|
|
20
|
+
graphProps: s.object
|
|
21
|
+
}, S = { includeArrows: {
|
|
22
|
+
left: !0,
|
|
23
|
+
right: !0,
|
|
24
|
+
up: !0,
|
|
25
|
+
down: !0
|
|
26
|
+
} }, C = l(t)(() => ({ fill: m.defaults.PRIMARY })), w = l("div")(({ theme: e, centered: t }) => ({
|
|
27
|
+
padding: 0,
|
|
28
|
+
margin: 0,
|
|
29
|
+
"* > *": {
|
|
30
|
+
margin: 0,
|
|
31
|
+
padding: 0
|
|
32
|
+
},
|
|
33
|
+
"& p": { margin: 0 },
|
|
34
|
+
fontSize: e.typography.fontSize,
|
|
35
|
+
...t && { textAlign: "center" }
|
|
36
|
+
})), T = l("g")(() => ({
|
|
37
|
+
"& .visx-axis-line": {
|
|
38
|
+
stroke: m.defaults.PRIMARY,
|
|
39
|
+
strokeWidth: 3
|
|
40
|
+
},
|
|
41
|
+
"& .visx-axis-tick": {
|
|
42
|
+
fill: m.defaults.PRIMARY,
|
|
43
|
+
"& line": { stroke: m.defaults.PRIMARY }
|
|
44
|
+
}
|
|
45
|
+
})), E = {
|
|
46
|
+
fontFamily: "Roboto",
|
|
47
|
+
fontSize: "14px",
|
|
48
|
+
cursor: "inherit"
|
|
49
|
+
}, D = (e, t, n, r, i, a) => {
|
|
50
|
+
let o = [];
|
|
51
|
+
return e === t && n - i < r && r < n + i && n - i < a && a < n + i && o.push(e), o;
|
|
52
|
+
}, O = (e) => (e || []).find((e) => e < 0), k = class extends o.Component {
|
|
53
|
+
static propTypes = {
|
|
54
|
+
...x,
|
|
55
|
+
graphProps: c.GraphPropsType.isRequired
|
|
56
|
+
};
|
|
57
|
+
static defaultProps = S;
|
|
58
|
+
render() {
|
|
59
|
+
let { includeArrows: t, graphProps: a, columnTicksValues: o, skipValues: s, distanceFromOriginToFirstNegativeY: c, dy: l } = this.props, { scale: f, domain: p, size: m, range: h } = a || {}, g = (e) => {
|
|
60
|
+
let t = s && s[0] === e ? c + 4 : l;
|
|
61
|
+
return {
|
|
62
|
+
...E,
|
|
63
|
+
textAnchor: "middle",
|
|
64
|
+
y: t,
|
|
65
|
+
dx: e === 0 ? -10 : 0,
|
|
66
|
+
dy: e === 0 ? -7 : 0
|
|
67
|
+
};
|
|
68
|
+
}, v = r(p.axisLabel), y = n(i(p.axisLabel)) + 2;
|
|
69
|
+
return /* @__PURE__ */ d(T, { children: [
|
|
70
|
+
/* @__PURE__ */ u(e, {
|
|
71
|
+
scale: f.x,
|
|
72
|
+
top: f.y(0),
|
|
73
|
+
left: 0,
|
|
74
|
+
label: p.label,
|
|
75
|
+
rangePadding: 8,
|
|
76
|
+
tickFormat: (e) => e,
|
|
77
|
+
tickLabelProps: g,
|
|
78
|
+
tickValues: o,
|
|
79
|
+
hideZero: !(p.labelStep || h.labelStep) && p.min <= 0
|
|
80
|
+
}),
|
|
81
|
+
t && t.left && /* @__PURE__ */ u(C, {
|
|
82
|
+
direction: "left",
|
|
83
|
+
x: p.min,
|
|
84
|
+
y: 0,
|
|
85
|
+
scale: f
|
|
86
|
+
}),
|
|
87
|
+
t && t.right && /* @__PURE__ */ u(C, {
|
|
88
|
+
direction: "right",
|
|
89
|
+
x: p.max,
|
|
90
|
+
y: 0,
|
|
91
|
+
scale: f
|
|
92
|
+
}),
|
|
93
|
+
p.axisLabel && /* @__PURE__ */ u("foreignObject", {
|
|
94
|
+
x: m.width + 17,
|
|
95
|
+
y: f.y(0) - 9,
|
|
96
|
+
width: y,
|
|
97
|
+
height: 20 * v,
|
|
98
|
+
children: /* @__PURE__ */ u(_, {
|
|
99
|
+
false: !0,
|
|
100
|
+
children: /* @__PURE__ */ u(w, { dangerouslySetInnerHTML: { __html: p.axisLabel } })
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
] });
|
|
104
|
+
}
|
|
105
|
+
}, A = class extends o.Component {
|
|
106
|
+
static propTypes = {
|
|
107
|
+
...x,
|
|
108
|
+
graphProps: c.GraphPropsType.isRequired
|
|
109
|
+
};
|
|
110
|
+
static defaultProps = S;
|
|
111
|
+
render() {
|
|
112
|
+
let { includeArrows: t, graphProps: r, skipValues: i, rowTickValues: a } = this.props, { scale: o, range: s, size: c } = r || {}, l = s.axisLabel ? n(s.axisLabel.length) : 0;
|
|
113
|
+
return /* @__PURE__ */ d(T, { children: [
|
|
114
|
+
/* @__PURE__ */ u(e, {
|
|
115
|
+
orientation: "left",
|
|
116
|
+
scale: o.y,
|
|
117
|
+
top: 0,
|
|
118
|
+
height: c.height,
|
|
119
|
+
left: o.x(0),
|
|
120
|
+
label: s.label,
|
|
121
|
+
labelProps: { "data-pie-readable": !1 },
|
|
122
|
+
rangePadding: 8,
|
|
123
|
+
tickLength: 10,
|
|
124
|
+
tickFormat: (e) => i && i.indexOf(e) >= 0 ? "" : e,
|
|
125
|
+
tickLabelProps: (e) => {
|
|
126
|
+
let t = e.toLocaleString().replace(/[.-]/g, "").length || 1;
|
|
127
|
+
return {
|
|
128
|
+
...E,
|
|
129
|
+
dy: 4,
|
|
130
|
+
dx: -10 - t * 9,
|
|
131
|
+
"data-pie-readable": !1
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
hideZero: !0,
|
|
135
|
+
tickTextAnchor: "bottom",
|
|
136
|
+
tickValues: a
|
|
137
|
+
}),
|
|
138
|
+
t && t.down && /* @__PURE__ */ u(C, {
|
|
139
|
+
direction: "down",
|
|
140
|
+
x: 0,
|
|
141
|
+
y: s.min,
|
|
142
|
+
scale: o
|
|
143
|
+
}),
|
|
144
|
+
t && t.up && /* @__PURE__ */ u(C, {
|
|
145
|
+
direction: "up",
|
|
146
|
+
x: 0,
|
|
147
|
+
y: s.max,
|
|
148
|
+
scale: o
|
|
149
|
+
}),
|
|
150
|
+
s.axisLabel && /* @__PURE__ */ u("foreignObject", {
|
|
151
|
+
x: o.x(0) - l / 2,
|
|
152
|
+
y: -33,
|
|
153
|
+
width: l,
|
|
154
|
+
height: "20",
|
|
155
|
+
children: /* @__PURE__ */ u(_, {
|
|
156
|
+
false: !0,
|
|
157
|
+
children: /* @__PURE__ */ u(w, {
|
|
158
|
+
centered: !0,
|
|
159
|
+
dangerouslySetInnerHTML: { __html: s.axisLabel }
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
] });
|
|
164
|
+
}
|
|
165
|
+
}, j = class extends o.Component {
|
|
166
|
+
static propTypes = {
|
|
167
|
+
...x,
|
|
168
|
+
graphProps: c.GraphPropsType.isRequired
|
|
169
|
+
};
|
|
170
|
+
static defaultProps = S;
|
|
171
|
+
xValues = () => {
|
|
172
|
+
let { graphProps: e } = this.props, { scale: t, domain: n } = e || {};
|
|
173
|
+
if (!n || !t) return;
|
|
174
|
+
let r = a({
|
|
175
|
+
...n,
|
|
176
|
+
step: n.labelStep
|
|
177
|
+
}), i = O(r);
|
|
178
|
+
return {
|
|
179
|
+
columnTicksValues: r,
|
|
180
|
+
firstNegativeX: i,
|
|
181
|
+
distanceFromOriginToFirstNegativeX: Math.abs(t.y(0) - t.y(i))
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
yValues = () => {
|
|
185
|
+
let { graphProps: e } = this.props, { scale: t, range: n } = e || {};
|
|
186
|
+
if (!n || !t) return;
|
|
187
|
+
let r = a({
|
|
188
|
+
...n,
|
|
189
|
+
step: n.labelStep
|
|
190
|
+
}), i = O(r);
|
|
191
|
+
return {
|
|
192
|
+
rowTickValues: r,
|
|
193
|
+
firstNegativeY: i,
|
|
194
|
+
distanceFromOriginToFirstNegativeY: Math.abs(t.x(0) - t.x(i))
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
render() {
|
|
198
|
+
let { graphProps: e } = this.props, { domain: t, range: n } = e || {}, { columnTicksValues: r, firstNegativeX: i, distanceFromOriginToFirstNegativeX: a } = this.xValues(), { rowTickValues: o, firstNegativeY: s, distanceFromOriginToFirstNegativeY: c } = this.yValues(), l = D(i, s, a, c, 6, 25);
|
|
199
|
+
return /* @__PURE__ */ d(T, { children: [n.min <= 0 ? /* @__PURE__ */ u(k, {
|
|
200
|
+
...this.props,
|
|
201
|
+
skipValues: l,
|
|
202
|
+
columnTicksValues: r,
|
|
203
|
+
distanceFromOriginToFirstNegativeY: c,
|
|
204
|
+
dy: 25
|
|
205
|
+
}) : null, t.min <= 0 ? /* @__PURE__ */ u(A, {
|
|
206
|
+
...this.props,
|
|
207
|
+
skipValues: l,
|
|
208
|
+
rowTickValues: o,
|
|
209
|
+
distanceFromOriginToFirstNegativeX: a
|
|
210
|
+
}) : null] });
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
//#endregion
|
|
214
|
+
export { x as AxisPropTypes, j as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing/src/axis/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import Axes, { AxisPropTypes } from './axes.js';
|
|
10
|
+
export { Axes, AxisPropTypes };
|
package/dist/bg.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing/src/bg.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export default class Bg extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
width: PropTypes.Validator<number>;
|
|
14
|
+
height: PropTypes.Validator<number>;
|
|
15
|
+
onClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
16
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
17
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
18
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
+
}>>>;
|
|
21
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
22
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
}>>>;
|
|
25
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
26
|
+
min: PropTypes.Validator<number>;
|
|
27
|
+
max: PropTypes.Validator<number>;
|
|
28
|
+
step: PropTypes.Requireable<number>;
|
|
29
|
+
}>>>;
|
|
30
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
31
|
+
min: PropTypes.Validator<number>;
|
|
32
|
+
max: PropTypes.Validator<number>;
|
|
33
|
+
step: PropTypes.Requireable<number>;
|
|
34
|
+
}>>>;
|
|
35
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
36
|
+
width: PropTypes.Validator<number>;
|
|
37
|
+
height: PropTypes.Validator<number>;
|
|
38
|
+
}>>>;
|
|
39
|
+
}>>>;
|
|
40
|
+
};
|
|
41
|
+
static defaultProps: {};
|
|
42
|
+
componentDidMount(): void;
|
|
43
|
+
shouldComponentUpdate(nextProps: any): boolean;
|
|
44
|
+
getRectPadding: any;
|
|
45
|
+
/**
|
|
46
|
+
* Note: we use d3 click + pointer to give us domain values directly.
|
|
47
|
+
* Saves us having to calculate them ourselves from a MouseEvent.
|
|
48
|
+
*/
|
|
49
|
+
onRectClick: any;
|
|
50
|
+
render(): React.JSX.Element;
|
|
51
|
+
}
|
package/dist/bg.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { getTickValues as e, thinnerShapesNeeded as t } from "./utils.js";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import r from "prop-types";
|
|
4
|
+
import { types as i, utils as a } from "@pie-lib/plot";
|
|
5
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
6
|
+
import { pointer as s, select as c } from "d3-selection";
|
|
7
|
+
//#region src/bg.tsx
|
|
8
|
+
var l = class extends n.Component {
|
|
9
|
+
static propTypes = {
|
|
10
|
+
width: r.number.isRequired,
|
|
11
|
+
height: r.number.isRequired,
|
|
12
|
+
onClick: r.func.isRequired,
|
|
13
|
+
graphProps: i.GraphPropsType.isRequired
|
|
14
|
+
};
|
|
15
|
+
static defaultProps = {};
|
|
16
|
+
componentDidMount() {
|
|
17
|
+
let e = c(this.rect);
|
|
18
|
+
e.on("click", (t) => this.onRectClick(e, t));
|
|
19
|
+
}
|
|
20
|
+
shouldComponentUpdate(e) {
|
|
21
|
+
return !a.isDomainRangeEqual(this.props.graphProps, e.graphProps) || this.props.width !== e.width || this.props.height !== e.height;
|
|
22
|
+
}
|
|
23
|
+
getRectPadding = () => {
|
|
24
|
+
let { graphProps: e } = this.props;
|
|
25
|
+
return t(e) ? 6 : 10;
|
|
26
|
+
};
|
|
27
|
+
onRectClick = (t, n) => {
|
|
28
|
+
let { onClick: r, graphProps: i } = this.props, { scale: a } = i, o = this.getRectPadding(), c = s(n, t.node()), l = a.x.invert(c[0] - o), u = a.y.invert(c[1] - o), d = e(i.range), f = e(i.domain), p = (e, t) => e.length && e.reduce((e, n) => Math.abs(n - t) <= Math.abs(e - t) ? n : e), m = {};
|
|
29
|
+
f.indexOf(l) >= 0 && d.indexOf(u) >= 0 ? (m.x = l, m.y = u) : (m.x = p(f, l), m.y = p(d, u)), r(m);
|
|
30
|
+
};
|
|
31
|
+
render() {
|
|
32
|
+
let { width: e, height: t } = this.props, n = this.getRectPadding();
|
|
33
|
+
return /* @__PURE__ */ o("rect", {
|
|
34
|
+
ref: (e) => this.rect = e,
|
|
35
|
+
transform: `translate(-${n}, -${n})`,
|
|
36
|
+
fill: "red",
|
|
37
|
+
fillOpacity: "0.0",
|
|
38
|
+
width: e + n * 2,
|
|
39
|
+
height: t + n * 2
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { l as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing/src/container/actions.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const addMark: () => {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const changeMarks: (marks: any) => {
|
|
13
|
+
type: string;
|
|
14
|
+
marks: any;
|
|
15
|
+
};
|