@pie-lib/graphing-solution-set 4.0.4-next.0 → 4.0.4-next.104
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/CHANGELOG.json +1 -0
- package/CHANGELOG.md +449 -0
- package/LICENSE.md +5 -0
- package/lib/axis/arrow.js +79 -0
- package/lib/axis/arrow.js.map +1 -0
- package/lib/axis/axes.js +327 -0
- package/lib/axis/axes.js.map +1 -0
- package/lib/axis/index.js +21 -0
- package/lib/axis/index.js.map +1 -0
- package/lib/bg.js +114 -0
- package/lib/bg.js.map +1 -0
- package/lib/container/actions.js +18 -0
- package/lib/container/actions.js.map +1 -0
- package/lib/container/index.js +129 -0
- package/lib/container/index.js.map +1 -0
- package/lib/container/marks.js +22 -0
- package/lib/container/marks.js.map +1 -0
- package/lib/container/middleware.js +19 -0
- package/lib/container/middleware.js.map +1 -0
- package/lib/container/reducer.js +18 -0
- package/lib/container/reducer.js.map +1 -0
- package/lib/coordinates-label.js +77 -0
- package/lib/coordinates-label.js.map +1 -0
- package/lib/graph-with-controls.js +297 -0
- package/lib/graph-with-controls.js.map +1 -0
- package/lib/graph.js +353 -0
- package/lib/graph.js.map +1 -0
- package/lib/grid-setup.js +414 -0
- package/lib/grid-setup.js.map +1 -0
- package/lib/grid.js +131 -0
- package/lib/grid.js.map +1 -0
- package/lib/index.js +40 -0
- package/lib/index.js.map +1 -0
- package/lib/labels.js +199 -0
- package/lib/labels.js.map +1 -0
- package/lib/mark-label.js +159 -0
- package/lib/mark-label.js.map +1 -0
- package/lib/toggle-bar.js +248 -0
- package/lib/toggle-bar.js.map +1 -0
- package/lib/tool-menu.js +218 -0
- package/lib/tool-menu.js.map +1 -0
- package/lib/tools/index.js +24 -0
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/line/component.js +92 -0
- package/lib/tools/line/component.js.map +1 -0
- package/lib/tools/line/index.js +11 -0
- package/lib/tools/line/index.js.map +1 -0
- package/lib/tools/polygon/component.js +358 -0
- package/lib/tools/polygon/component.js.map +1 -0
- package/lib/tools/polygon/index.js +89 -0
- package/lib/tools/polygon/index.js.map +1 -0
- package/lib/tools/polygon/line.js +114 -0
- package/lib/tools/polygon/line.js.map +1 -0
- package/lib/tools/polygon/polygon.js +128 -0
- package/lib/tools/polygon/polygon.js.map +1 -0
- package/lib/tools/shared/arrow-head.js +62 -0
- package/lib/tools/shared/arrow-head.js.map +1 -0
- package/lib/tools/shared/line/index.js +539 -0
- package/lib/tools/shared/line/index.js.map +1 -0
- package/lib/tools/shared/line/line-path.js +121 -0
- package/lib/tools/shared/line/line-path.js.map +1 -0
- package/lib/tools/shared/line/with-root-edge.js +121 -0
- package/lib/tools/shared/line/with-root-edge.js.map +1 -0
- package/lib/tools/shared/point/arrow-point.js +86 -0
- package/lib/tools/shared/point/arrow-point.js.map +1 -0
- package/lib/tools/shared/point/arrow.js +70 -0
- package/lib/tools/shared/point/arrow.js.map +1 -0
- package/lib/tools/shared/point/base-point.js +137 -0
- package/lib/tools/shared/point/base-point.js.map +1 -0
- package/lib/tools/shared/point/index.js +80 -0
- package/lib/tools/shared/point/index.js.map +1 -0
- package/lib/tools/shared/styles.js +26 -0
- package/lib/tools/shared/styles.js.map +1 -0
- package/lib/tools/shared/types.js +15 -0
- package/lib/tools/shared/types.js.map +1 -0
- package/lib/undo-redo.js +67 -0
- package/lib/undo-redo.js.map +1 -0
- package/lib/use-debounce.js +25 -0
- package/lib/use-debounce.js.map +1 -0
- package/lib/utils.js +235 -0
- package/lib/utils.js.map +1 -0
- package/package.json +27 -37
- package/src/__tests__/bg.test.jsx +250 -0
- package/src/__tests__/coordinates-label.test.jsx +243 -0
- package/src/__tests__/graph-with-controls.test.jsx +184 -0
- package/src/__tests__/graph.test.jsx +93 -0
- package/src/__tests__/grid-setup.test.jsx +645 -0
- package/src/__tests__/grid.test.jsx +23 -0
- package/src/__tests__/labels.test.jsx +41 -0
- package/src/__tests__/mark-label.test.jsx +66 -0
- package/src/__tests__/toggle-bar.test.jsx +106 -0
- package/src/__tests__/tool-menu.test.jsx +453 -0
- package/src/__tests__/undo-redo.test.jsx +26 -0
- package/src/__tests__/use-debounce.test.js +21 -0
- package/src/__tests__/utils.js +41 -0
- package/src/__tests__/utils.test.js +105 -0
- package/src/axis/__tests__/arrow.test.jsx +43 -0
- package/src/axis/__tests__/axes.test.jsx +182 -0
- package/src/axis/arrow.jsx +57 -0
- package/src/axis/axes.jsx +284 -0
- package/src/axis/index.js +3 -0
- package/src/bg.jsx +96 -0
- package/src/container/__tests__/actions.test.js +105 -0
- package/src/container/__tests__/index.test.jsx +227 -0
- package/src/container/__tests__/marks.test.js +172 -0
- package/src/container/__tests__/middleware.test.js +235 -0
- package/src/container/__tests__/reducer.test.js +324 -0
- package/src/container/actions.js +8 -0
- package/src/container/index.jsx +93 -0
- package/src/container/marks.js +14 -0
- package/src/container/middleware.js +7 -0
- package/src/container/reducer.js +5 -0
- package/src/coordinates-label.jsx +62 -0
- package/src/graph-with-controls.jsx +242 -0
- package/src/graph.jsx +333 -0
- package/src/grid-setup.jsx +432 -0
- package/src/grid.jsx +133 -0
- package/src/index.js +7 -0
- package/src/labels.jsx +173 -0
- package/src/mark-label.jsx +125 -0
- package/src/toggle-bar.jsx +221 -0
- package/src/tool-menu.jsx +235 -0
- package/src/tools/index.js +8 -0
- package/src/tools/line/__tests__/component.test.jsx +37 -0
- package/src/tools/line/component.jsx +77 -0
- package/src/tools/line/index.js +4 -0
- package/src/tools/polygon/__tests__/component.test.jsx +487 -0
- package/src/tools/polygon/__tests__/index.test.js +65 -0
- package/src/tools/polygon/__tests__/line.test.jsx +23 -0
- package/src/tools/polygon/__tests__/polygon.test.jsx +44 -0
- package/src/tools/polygon/component.jsx +324 -0
- package/src/tools/polygon/index.js +52 -0
- package/src/tools/polygon/line.jsx +80 -0
- package/src/tools/polygon/polygon.jsx +93 -0
- package/src/tools/shared/__tests__/arrow-head.test.jsx +33 -0
- package/src/tools/shared/arrow-head.jsx +46 -0
- package/src/tools/shared/line/__tests__/index.test.jsx +553 -0
- package/src/tools/shared/line/__tests__/line-path.test.jsx +56 -0
- package/src/tools/shared/line/__tests__/with-root-edge.test.jsx +488 -0
- package/src/tools/shared/line/index.jsx +471 -0
- package/src/tools/shared/line/line-path.jsx +85 -0
- package/src/tools/shared/line/with-root-edge.jsx +97 -0
- package/src/tools/shared/point/__tests__/arrow-point.test.jsx +91 -0
- package/src/tools/shared/point/__tests__/arrow.test.jsx +469 -0
- package/src/tools/shared/point/__tests__/base-point.test.jsx +87 -0
- package/src/tools/shared/point/arrow-point.jsx +60 -0
- package/src/tools/shared/point/arrow.jsx +40 -0
- package/src/tools/shared/point/base-point.jsx +113 -0
- package/src/tools/shared/point/index.jsx +58 -0
- package/src/tools/shared/styles.js +20 -0
- package/src/tools/shared/types.js +8 -0
- package/src/undo-redo.jsx +37 -0
- package/src/use-debounce.js +13 -0
- package/src/utils.js +230 -0
- package/dist/_virtual/_rolldown/runtime.js +0 -23
- package/dist/axis/arrow.d.ts +0 -13
- package/dist/axis/arrow.js +0 -34
- package/dist/axis/axes.d.ts +0 -132
- package/dist/axis/axes.js +0 -214
- package/dist/axis/index.d.ts +0 -10
- package/dist/bg.d.ts +0 -51
- package/dist/bg.js +0 -44
- package/dist/container/actions.d.ts +0 -15
- package/dist/container/actions.js +0 -7
- package/dist/container/index.d.ts +0 -26
- package/dist/container/index.js +0 -50
- package/dist/container/marks.d.ts +0 -10
- package/dist/container/marks.js +0 -11
- package/dist/container/middleware.d.ts +0 -10
- package/dist/container/middleware.js +0 -4
- package/dist/container/reducer.d.ts +0 -12
- package/dist/container/reducer.js +0 -7
- package/dist/coordinates-label.d.ts +0 -50
- package/dist/coordinates-label.js +0 -46
- package/dist/graph-with-controls.d.ts +0 -85
- package/dist/graph-with-controls.js +0 -155
- package/dist/graph.d.ts +0 -119
- package/dist/graph.js +0 -221
- package/dist/grid-setup.d.ts +0 -27
- package/dist/grid-setup.js +0 -307
- package/dist/grid.d.ts +0 -43
- package/dist/grid.js +0 -59
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -6
- package/dist/labels.d.ts +0 -73
- package/dist/labels.js +0 -134
- package/dist/mark-label.d.ts +0 -50
- package/dist/mark-label.js +0 -84
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -7
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -12
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js +0 -12
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -7
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -25
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -12
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -14
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -9
- package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -11
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +0 -100
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +0 -61
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +0 -42
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +0 -9
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +0 -14
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +0 -21
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +0 -16
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +0 -8
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +0 -15
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +0 -78
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +0 -79
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +0 -79
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +0 -6
- package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +0 -49
- package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +0 -18
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +0 -10
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +0 -9
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +0 -6
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +0 -46
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +0 -52
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +0 -57
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +0 -91
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +0 -21
- package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +0 -32
- package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +0 -33
- package/dist/node_modules/.bun/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +0 -68
- package/dist/node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js +0 -28
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +0 -10
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +0 -21
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +0 -15
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +0 -8
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +0 -15
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +0 -19
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +0 -18
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +0 -19
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +0 -13
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +0 -14
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +0 -9
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +0 -10
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +0 -20
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +0 -11
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +0 -16
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +0 -12
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +0 -20
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +0 -37
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +0 -509
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +0 -108
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +0 -31
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +0 -45
- package/dist/node_modules/.bun/react-input-autosize@2.2.2_f4eacebf2041cd4f/node_modules/react-input-autosize/lib/AutosizeInput.js +0 -216
- package/dist/node_modules/.bun/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +0 -82
- package/dist/node_modules/.bun/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +0 -62
- package/dist/node_modules/.bun/react-is@16.13.1/node_modules/react-is/index.js +0 -10
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/Context.js +0 -5
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/Provider.js +0 -47
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/connectAdvanced.js +0 -95
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/connect.js +0 -52
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/mapDispatchToProps.js +0 -23
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/mapStateToProps.js +0 -13
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/mergeProps.js +0 -26
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/selectorFactory.js +0 -41
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/verifySubselectors.js +0 -11
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/wrapMapToProps.js +0 -28
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/index.js +0 -4
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/isPlainObject.js +0 -10
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/shallowEqual.js +0 -15
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/verifyPlainObject.js +0 -8
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/warning.js +0 -9
- package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +0 -49
- package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +0 -34
- package/dist/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +0 -185
- package/dist/node_modules/.bun/redux@4.2.1/node_modules/redux/es/redux.js +0 -225
- package/dist/toggle-bar.d.ts +0 -40
- package/dist/tool-menu.d.ts +0 -21
- package/dist/tool-menu.js +0 -188
- package/dist/tools/index.d.ts +0 -17
- package/dist/tools/index.js +0 -12
- package/dist/tools/line/component.d.ts +0 -113
- package/dist/tools/line/component.js +0 -58
- package/dist/tools/line/index.d.ts +0 -13
- package/dist/tools/line/index.js +0 -6
- package/dist/tools/polygon/component.d.ts +0 -114
- package/dist/tools/polygon/component.js +0 -194
- package/dist/tools/polygon/index.d.ts +0 -19
- package/dist/tools/polygon/index.js +0 -55
- package/dist/tools/polygon/line.d.ts +0 -125
- package/dist/tools/polygon/polygon.d.ts +0 -122
- package/dist/tools/polygon/polygon.js +0 -62
- package/dist/tools/shared/arrow-head.d.ts +0 -43
- package/dist/tools/shared/arrow-head.js +0 -37
- package/dist/tools/shared/line/index.d.ts +0 -240
- package/dist/tools/shared/line/index.js +0 -320
- package/dist/tools/shared/line/line-path.d.ts +0 -57
- package/dist/tools/shared/line/with-root-edge.d.ts +0 -143
- package/dist/tools/shared/point/arrow-point.d.ts +0 -57
- package/dist/tools/shared/point/arrow-point.js +0 -47
- package/dist/tools/shared/point/arrow.d.ts +0 -46
- package/dist/tools/shared/point/arrow.js +0 -36
- package/dist/tools/shared/point/base-point.d.ts +0 -50
- package/dist/tools/shared/point/base-point.js +0 -88
- package/dist/tools/shared/point/index.d.ts +0 -217
- package/dist/tools/shared/point/index.js +0 -51
- package/dist/tools/shared/styles.d.ts +0 -24
- package/dist/tools/shared/styles.js +0 -17
- package/dist/tools/shared/types.d.ts +0 -15
- package/dist/tools/shared/types.js +0 -10
- package/dist/undo-redo.d.ts +0 -20
- package/dist/undo-redo.js +0 -33
- package/dist/use-debounce.d.ts +0 -9
- package/dist/use-debounce.js +0 -13
- package/dist/utils.d.ts +0 -58
- package/dist/utils.js +0 -72
package/dist/grid-setup.js
DELETED
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import e from "prop-types";
|
|
3
|
-
import { styled as t } from "@mui/material/styles";
|
|
4
|
-
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
import * as a from "@pie-lib/render-ui";
|
|
6
|
-
import { InputContainer as o, color as s } from "@pie-lib/render-ui";
|
|
7
|
-
import c from "@pie-lib/editable-html-tip-tap";
|
|
8
|
-
import { Accordion as l, AccordionDetails as u, AccordionSummary as d, Typography as f } from "@mui/material";
|
|
9
|
-
import p from "@mui/icons-material/ExpandMore";
|
|
10
|
-
import { NumberTextFieldCustom as m, Toggle as h } from "@pie-lib/config-ui";
|
|
11
|
-
//#region src/grid-setup.tsx
|
|
12
|
-
function g(e) {
|
|
13
|
-
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
14
|
-
}
|
|
15
|
-
function _(e, t) {
|
|
16
|
-
return !e || g(e) ? e : g(e.default) ? e.default : t && g(e[t]) ? e[t] : t && g(e[t]?.default) ? e[t].default : e;
|
|
17
|
-
}
|
|
18
|
-
var v = _(o, "InputContainer") || _(x.InputContainer, "InputContainer"), y = a, b = y.default, x = b && typeof b == "object" ? b : y, S = t("div")(() => ({ width: "450px" })), C = t("div")(() => ({
|
|
19
|
-
display: "flex",
|
|
20
|
-
flexDirection: "column",
|
|
21
|
-
width: "100%"
|
|
22
|
-
})), w = t("div")(() => ({
|
|
23
|
-
display: "flex",
|
|
24
|
-
flexDirection: "column",
|
|
25
|
-
alignItems: "center"
|
|
26
|
-
})), T = t("div")(() => ({
|
|
27
|
-
display: "flex",
|
|
28
|
-
justifyContent: "space-around",
|
|
29
|
-
alignItems: "center"
|
|
30
|
-
})), E = t("div")(({ theme: e }) => ({
|
|
31
|
-
width: "130px",
|
|
32
|
-
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
33
|
-
})), D = t("div")(({ theme: e }) => ({
|
|
34
|
-
width: "160px",
|
|
35
|
-
margin: `${e.spacing(1)} ${e.spacing(.5)}`,
|
|
36
|
-
"& .MuiFormControl-root": { width: "100%" }
|
|
37
|
-
})), O = t("div")(({ theme: e }) => ({
|
|
38
|
-
width: "230px",
|
|
39
|
-
margin: `${e.spacing(1)} ${e.spacing(.5)}`,
|
|
40
|
-
"& .MuiFormControl-root": { width: "100%" }
|
|
41
|
-
})), k = t(f)(({ theme: e }) => ({
|
|
42
|
-
fontStyle: "italic",
|
|
43
|
-
margin: `${e.spacing(1)} 0`
|
|
44
|
-
})), A = t("div")(() => ({
|
|
45
|
-
display: "flex",
|
|
46
|
-
justifyContent: "space-between",
|
|
47
|
-
alignItems: "center"
|
|
48
|
-
})), j = t(f)(() => ({ color: s.disabled() })), M = t("div")(({ theme: e }) => ({ paddingTop: e.spacing(2) })), N = (e) => {
|
|
49
|
-
let { disabled: t, displayedFields: n, labelValue: a, labelValues: o, gridValue: s, gridValues: c, onChange: l } = e, { labelStep: u = {}, step: d = {} } = n;
|
|
50
|
-
return /* @__PURE__ */ i(w, { children: [d && d.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {
|
|
51
|
-
label: d.label || "",
|
|
52
|
-
value: s,
|
|
53
|
-
customValues: c,
|
|
54
|
-
variant: "outlined",
|
|
55
|
-
disabled: t,
|
|
56
|
-
onChange: (e, t) => l("step", t)
|
|
57
|
-
}) }), u && u.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {
|
|
58
|
-
label: u.label || "",
|
|
59
|
-
value: a,
|
|
60
|
-
customValues: o,
|
|
61
|
-
variant: "outlined",
|
|
62
|
-
disabled: t,
|
|
63
|
-
onChange: (e, t) => l("labelStep", t)
|
|
64
|
-
}) })] });
|
|
65
|
-
};
|
|
66
|
-
N.propTypes = {
|
|
67
|
-
disabled: e.bool,
|
|
68
|
-
displayedFields: e.object,
|
|
69
|
-
labelValue: e.number,
|
|
70
|
-
labelValues: e.array,
|
|
71
|
-
gridValue: e.number,
|
|
72
|
-
gridValues: e.array,
|
|
73
|
-
onChange: e.func
|
|
74
|
-
};
|
|
75
|
-
var P = (e) => {
|
|
76
|
-
let { disabled: t, displayedFields: n, displayHeader: a, label: o, maxValue: s, minValue: l, onChange: u, type: d } = e, { axisLabel: p = {}, min: h = {}, max: g = {} } = n;
|
|
77
|
-
return /* @__PURE__ */ i(w, { children: [
|
|
78
|
-
a && /* @__PURE__ */ i(f, {
|
|
79
|
-
variant: "subtitle2",
|
|
80
|
-
children: [/* @__PURE__ */ r("i", { children: d === "domain" ? "x" : "y" }), "-axis"]
|
|
81
|
-
}),
|
|
82
|
-
h && h.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {
|
|
83
|
-
label: h.label || "",
|
|
84
|
-
value: l,
|
|
85
|
-
min: -1e4,
|
|
86
|
-
max: s - .05,
|
|
87
|
-
variant: "outlined",
|
|
88
|
-
disabled: t,
|
|
89
|
-
onChange: (e, t) => u("min", t)
|
|
90
|
-
}) }),
|
|
91
|
-
g && g.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {
|
|
92
|
-
label: g.label || "",
|
|
93
|
-
value: s,
|
|
94
|
-
min: l + .05,
|
|
95
|
-
max: 1e4,
|
|
96
|
-
variant: "outlined",
|
|
97
|
-
disabled: t,
|
|
98
|
-
onChange: (e, t) => u("max", t)
|
|
99
|
-
}) }),
|
|
100
|
-
p && p.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(v, {
|
|
101
|
-
label: p.label || "",
|
|
102
|
-
children: /* @__PURE__ */ r(M, { children: /* @__PURE__ */ r(c, {
|
|
103
|
-
onChange: (e) => u("axisLabel", e),
|
|
104
|
-
markup: o || "",
|
|
105
|
-
charactersLimit: 5,
|
|
106
|
-
onKeyDown: (e) => e.key === "Enter",
|
|
107
|
-
activePlugins: [
|
|
108
|
-
"bold",
|
|
109
|
-
"italic",
|
|
110
|
-
"underline",
|
|
111
|
-
"strikethrough"
|
|
112
|
-
]
|
|
113
|
-
}) })
|
|
114
|
-
}) })
|
|
115
|
-
] });
|
|
116
|
-
};
|
|
117
|
-
P.propTypes = {
|
|
118
|
-
disabled: e.bool,
|
|
119
|
-
displayedFields: e.object,
|
|
120
|
-
displayHeader: e.bool,
|
|
121
|
-
label: e.string,
|
|
122
|
-
maxValue: e.number,
|
|
123
|
-
minValue: e.number,
|
|
124
|
-
type: e.string,
|
|
125
|
-
onChange: e.func
|
|
126
|
-
};
|
|
127
|
-
var F = (e) => {
|
|
128
|
-
let { domain: t, displayedFields: a = {}, gridValues: o = {}, includeAxes: s, labelValues: c = {}, onChange: g, onChangeView: _, range: v, size: y, sizeConstraints: b, standardGrid: x } = e, D = {
|
|
129
|
-
min: 2,
|
|
130
|
-
max: 41
|
|
131
|
-
}, { axisLabel: M = {}, dimensionsEnabled: F, includeAxesEnabled: I, labelStep: L = {}, min: R = {}, max: z = {}, standardGridEnabled: B, step: V = {} } = a || {}, H = R.enabled || z.enabled || M.enabled || V.enabled || L.enabled, U = {
|
|
132
|
-
step: V,
|
|
133
|
-
labelStep: L
|
|
134
|
-
}, W = {
|
|
135
|
-
min: R,
|
|
136
|
-
max: z,
|
|
137
|
-
axisLabel: M
|
|
138
|
-
}, G = (e) => {
|
|
139
|
-
let n = (e) => {
|
|
140
|
-
let n = e === "domain" ? t : v;
|
|
141
|
-
return {
|
|
142
|
-
min: 1,
|
|
143
|
-
max: n.max < D.min || n.max > D.max ? 16 : n.max,
|
|
144
|
-
step: 1,
|
|
145
|
-
labelStep: 0
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
g({
|
|
149
|
-
includeAxes: e,
|
|
150
|
-
range: {
|
|
151
|
-
...v,
|
|
152
|
-
...e ? { labelStep: 1 } : n("range")
|
|
153
|
-
},
|
|
154
|
-
domain: {
|
|
155
|
-
...t,
|
|
156
|
-
...e ? { labelStep: 1 } : n("domain")
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}, K = (e) => {
|
|
160
|
-
g({
|
|
161
|
-
standardGrid: e,
|
|
162
|
-
range: {
|
|
163
|
-
...t,
|
|
164
|
-
axisLabel: v.axisLabel
|
|
165
|
-
},
|
|
166
|
-
graph: {
|
|
167
|
-
...y,
|
|
168
|
-
height: y.width
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}, q = (e, t) => {
|
|
172
|
-
let n = {
|
|
173
|
-
...y,
|
|
174
|
-
[e]: t
|
|
175
|
-
};
|
|
176
|
-
x && (n.height = t), g({ graph: n });
|
|
177
|
-
}, J = (e, n) => {
|
|
178
|
-
t[e] = n, x && e !== "axisLabel" && (v[e] = n), g({
|
|
179
|
-
domain: t,
|
|
180
|
-
range: v
|
|
181
|
-
});
|
|
182
|
-
}, Y = (e, t) => {
|
|
183
|
-
v[e] = t, g({ range: v });
|
|
184
|
-
}, X = /* @__PURE__ */ i(n, { children: [
|
|
185
|
-
/* @__PURE__ */ i(T, { children: [/* @__PURE__ */ r(P, {
|
|
186
|
-
displayedFields: W,
|
|
187
|
-
displayHeader: H,
|
|
188
|
-
type: "domain",
|
|
189
|
-
minValue: t.min,
|
|
190
|
-
maxValue: t.max,
|
|
191
|
-
label: t.axisLabel,
|
|
192
|
-
includeAxes: s,
|
|
193
|
-
onChange: J
|
|
194
|
-
}), /* @__PURE__ */ r(P, {
|
|
195
|
-
displayedFields: W,
|
|
196
|
-
displayHeader: H,
|
|
197
|
-
type: "range",
|
|
198
|
-
minValue: v.min,
|
|
199
|
-
maxValue: v.max,
|
|
200
|
-
label: v.axisLabel,
|
|
201
|
-
disabled: x,
|
|
202
|
-
includeAxes: s,
|
|
203
|
-
onChange: Y
|
|
204
|
-
})] }),
|
|
205
|
-
(R.enabled || z.enabled) && /* @__PURE__ */ r(k, { children: "If you want the axis to be visible, use a zero or negative Min Value, and a positive Max Value" }),
|
|
206
|
-
(V.enabled || L.enabled) && /* @__PURE__ */ i(T, { children: [/* @__PURE__ */ r(N, {
|
|
207
|
-
displayedFields: U,
|
|
208
|
-
gridValue: t.step,
|
|
209
|
-
labelValue: t.labelStep,
|
|
210
|
-
gridValues: o.domain || [],
|
|
211
|
-
labelValues: c.domain || [],
|
|
212
|
-
onChange: J
|
|
213
|
-
}), /* @__PURE__ */ r(N, {
|
|
214
|
-
disabled: x,
|
|
215
|
-
displayedFields: U,
|
|
216
|
-
gridValue: v.step,
|
|
217
|
-
labelValue: v.labelStep,
|
|
218
|
-
gridValues: o.range || [],
|
|
219
|
-
labelValues: c.range || [],
|
|
220
|
-
onChange: Y
|
|
221
|
-
})] }),
|
|
222
|
-
L.enabled && /* @__PURE__ */ r(k, { children: "For unnumbered gridlines, enter a label interval of 0" })
|
|
223
|
-
] }), Z = z.enabled ? /* @__PURE__ */ i(w, { children: [/* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(m, {
|
|
224
|
-
label: "Number of Vertical Gridlines",
|
|
225
|
-
value: t.max,
|
|
226
|
-
min: !s && D.min,
|
|
227
|
-
max: !s && D.max,
|
|
228
|
-
variant: "outlined",
|
|
229
|
-
onChange: (e, t) => J("max", t)
|
|
230
|
-
}) }), /* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(m, {
|
|
231
|
-
label: "Number of Horizontal Gridlines",
|
|
232
|
-
value: v.max,
|
|
233
|
-
min: !s && D.min,
|
|
234
|
-
max: !s && D.max,
|
|
235
|
-
variant: "outlined",
|
|
236
|
-
disabled: x,
|
|
237
|
-
onChange: (e, t) => Y("max", t)
|
|
238
|
-
}) })] }) : null;
|
|
239
|
-
return /* @__PURE__ */ r(S, { children: /* @__PURE__ */ i(l, {
|
|
240
|
-
onChange: _,
|
|
241
|
-
TransitionProps: { timeout: {
|
|
242
|
-
enter: 225,
|
|
243
|
-
exit: 195
|
|
244
|
-
} },
|
|
245
|
-
children: [/* @__PURE__ */ r(d, {
|
|
246
|
-
expandIcon: /* @__PURE__ */ r(p, {}),
|
|
247
|
-
children: /* @__PURE__ */ r(f, {
|
|
248
|
-
variant: "subtitle1",
|
|
249
|
-
children: "Customize Grid Setup"
|
|
250
|
-
})
|
|
251
|
-
}), /* @__PURE__ */ r(u, { children: /* @__PURE__ */ i(C, { children: [
|
|
252
|
-
I && /* @__PURE__ */ r(h, {
|
|
253
|
-
label: "Include axes and labels?",
|
|
254
|
-
toggle: G,
|
|
255
|
-
checked: s
|
|
256
|
-
}),
|
|
257
|
-
B && /* @__PURE__ */ r(h, {
|
|
258
|
-
label: "Constrain to standard coordinate grid?",
|
|
259
|
-
toggle: K,
|
|
260
|
-
checked: x
|
|
261
|
-
}),
|
|
262
|
-
s ? X : Z,
|
|
263
|
-
F && /* @__PURE__ */ i(A, { children: [
|
|
264
|
-
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r(f, { children: "Dimensions(px)" }), /* @__PURE__ */ i(j, { children: [
|
|
265
|
-
"Min ",
|
|
266
|
-
b.min,
|
|
267
|
-
", Max ",
|
|
268
|
-
b.max
|
|
269
|
-
] })] }),
|
|
270
|
-
/* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(m, {
|
|
271
|
-
label: "Width",
|
|
272
|
-
value: y.width,
|
|
273
|
-
min: b.min,
|
|
274
|
-
max: b.max,
|
|
275
|
-
step: b.step,
|
|
276
|
-
variant: "outlined",
|
|
277
|
-
onChange: (e, t) => q("width", t)
|
|
278
|
-
}) }),
|
|
279
|
-
/* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(m, {
|
|
280
|
-
label: "Height",
|
|
281
|
-
value: y.height,
|
|
282
|
-
min: b.min,
|
|
283
|
-
max: b.max,
|
|
284
|
-
step: b.step,
|
|
285
|
-
variant: "outlined",
|
|
286
|
-
disabled: x,
|
|
287
|
-
onChange: (e, t) => q("height", t)
|
|
288
|
-
}) })
|
|
289
|
-
] })
|
|
290
|
-
] }) })]
|
|
291
|
-
}) });
|
|
292
|
-
};
|
|
293
|
-
F.propTypes = {
|
|
294
|
-
domain: e.object,
|
|
295
|
-
displayedFields: e.object,
|
|
296
|
-
gridValues: e.object,
|
|
297
|
-
includeAxes: e.bool,
|
|
298
|
-
labelValues: e.object,
|
|
299
|
-
onChange: e.func,
|
|
300
|
-
onChangeView: e.func,
|
|
301
|
-
range: e.object,
|
|
302
|
-
size: e.object,
|
|
303
|
-
sizeConstraints: e.object,
|
|
304
|
-
standardGrid: e.bool
|
|
305
|
-
};
|
|
306
|
-
//#endregion
|
|
307
|
-
export { F as default };
|
package/dist/grid.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/grid.jsx
|
|
3
|
-
* @auto-generated
|
|
4
|
-
*
|
|
5
|
-
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
-
* Manual edits will be overwritten on next sync.
|
|
7
|
-
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
export declare class Grid extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
14
|
-
disabledAdditionalGrid: PropTypes.Requireable<boolean>;
|
|
15
|
-
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
16
|
-
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
17
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
-
}>>>;
|
|
20
|
-
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
21
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
-
}>>>;
|
|
24
|
-
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
25
|
-
min: PropTypes.Validator<number>;
|
|
26
|
-
max: PropTypes.Validator<number>;
|
|
27
|
-
step: PropTypes.Requireable<number>;
|
|
28
|
-
}>>>;
|
|
29
|
-
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
30
|
-
min: PropTypes.Validator<number>;
|
|
31
|
-
max: PropTypes.Validator<number>;
|
|
32
|
-
step: PropTypes.Requireable<number>;
|
|
33
|
-
}>>>;
|
|
34
|
-
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
35
|
-
width: PropTypes.Validator<number>;
|
|
36
|
-
height: PropTypes.Validator<number>;
|
|
37
|
-
}>>>;
|
|
38
|
-
}>>>;
|
|
39
|
-
};
|
|
40
|
-
getAdditionalGridProps: any;
|
|
41
|
-
render(): React.JSX.Element;
|
|
42
|
-
}
|
|
43
|
-
export default Grid;
|
package/dist/grid.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { getTickValues as e } from "./utils.js";
|
|
2
|
-
import t from "./node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js";
|
|
3
|
-
import n from "./node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js";
|
|
4
|
-
import r from "./node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js";
|
|
5
|
-
import i from "react";
|
|
6
|
-
import a from "prop-types";
|
|
7
|
-
import { types as o } from "@pie-lib/plot";
|
|
8
|
-
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
-
//#region src/grid.tsx
|
|
10
|
-
var u = class extends i.Component {
|
|
11
|
-
static propTypes = {
|
|
12
|
-
disabled: a.bool,
|
|
13
|
-
disabledAdditionalGrid: a.bool,
|
|
14
|
-
graphProps: o.GraphPropsType.isRequired
|
|
15
|
-
};
|
|
16
|
-
getAdditionalGridProps = (t, n) => {
|
|
17
|
-
let { graphProps: { scale: r, size: { width: i, height: a }, domain: o, range: s } } = this.props, c = e({
|
|
18
|
-
...s,
|
|
19
|
-
step: s.labelStep
|
|
20
|
-
}).filter((e) => t.includes(e)), l = e({
|
|
21
|
-
...o,
|
|
22
|
-
step: o.labelStep
|
|
23
|
-
}).filter((e) => n.includes(e)), u = c.length && Math.min(...c).toString().replace(/[.-]/g, "").length || 1, d = c.length && Math.max(...c).toString().replace(/[.-]/g, "").length || 1, f = Math.max(u, d) * 9 + 22, p = r.x(0), m = r.y(0), h = `${p - f} ${f} ${i}`, g = `${m} 28 ${a}`, _ = o.labelStep > 0 && s.labelStep > 0 && c && l && c.length > 1 && l.length > 1 && (c.length !== t.length || l.length !== n.length), v = l.filter((e) => e >= 0 || p - r.x(e) > f);
|
|
24
|
-
return {
|
|
25
|
-
rowTickLabelValues: c.filter((e) => e >= 0 || r.y(e) - m > 28),
|
|
26
|
-
columnTickLabelValues: v,
|
|
27
|
-
rowStrokeDasharray: h,
|
|
28
|
-
columnStrokeDasharray: g,
|
|
29
|
-
displayAdditionalGrid: _
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
render() {
|
|
33
|
-
let { graphProps: i } = this.props, { scale: a, size: { height: o, width: u }, domain: d, range: f } = i, p = e(f), m = e(d), { rowTickLabelValues: h, columnTickLabelValues: g, rowStrokeDasharray: _, columnStrokeDasharray: v, displayAdditionalGrid: y } = this.getAdditionalGridProps(p, m), b = d.labelStep * 2 === d.step || f.labelStep * 2 === f.step ? "#9FA8DA" : "#7985CB";
|
|
34
|
-
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(r, {
|
|
35
|
-
innerRef: (e) => this.grid = e,
|
|
36
|
-
xScale: a.x,
|
|
37
|
-
yScale: a.y,
|
|
38
|
-
width: u,
|
|
39
|
-
height: o,
|
|
40
|
-
stroke: "#D3D3D3",
|
|
41
|
-
rowTickValues: p,
|
|
42
|
-
columnTickValues: m
|
|
43
|
-
}), y && /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(t, {
|
|
44
|
-
scale: a.y,
|
|
45
|
-
width: u,
|
|
46
|
-
tickValues: h,
|
|
47
|
-
stroke: b,
|
|
48
|
-
strokeDasharray: _
|
|
49
|
-
}), /* @__PURE__ */ c(n, {
|
|
50
|
-
scale: a.x,
|
|
51
|
-
height: o,
|
|
52
|
-
tickValues: g,
|
|
53
|
-
stroke: b,
|
|
54
|
-
strokeDasharray: v
|
|
55
|
-
})] })] });
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
//#endregion
|
|
59
|
-
export { u as default };
|
package/dist/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/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 Graph from './graph.js';
|
|
10
|
-
import GraphContainer from './container/index.js';
|
|
11
|
-
import GridSetup from './grid-setup.js';
|
|
12
|
-
import * as tools from './tools/index.js';
|
|
13
|
-
import ToolMenu from './tool-menu.js';
|
|
14
|
-
export { Graph, GraphContainer, GridSetup, ToolMenu, tools };
|
package/dist/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import e from "./graph.js";
|
|
2
|
-
import t from "./tool-menu.js";
|
|
3
|
-
import { tools_exports as n } from "./tools/index.js";
|
|
4
|
-
import r from "./container/index.js";
|
|
5
|
-
import i from "./grid-setup.js";
|
|
6
|
-
export { e as Graph, r as GraphContainer, i as GridSetup, t as ToolMenu, n as tools };
|
package/dist/labels.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/labels.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 getTransform: (side: any, width: any, height: any) => string | undefined;
|
|
12
|
-
declare class RawLabel extends React.Component {
|
|
13
|
-
static propTypes: {
|
|
14
|
-
text: PropTypes.Requireable<string>;
|
|
15
|
-
side: PropTypes.Requireable<string>;
|
|
16
|
-
disabledLabel: PropTypes.Requireable<boolean>;
|
|
17
|
-
placeholder: PropTypes.Requireable<string>;
|
|
18
|
-
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
19
|
-
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
20
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
-
}>>>;
|
|
23
|
-
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
24
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
-
}>>>;
|
|
27
|
-
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
28
|
-
min: PropTypes.Validator<number>;
|
|
29
|
-
max: PropTypes.Validator<number>;
|
|
30
|
-
step: PropTypes.Requireable<number>;
|
|
31
|
-
}>>>;
|
|
32
|
-
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
33
|
-
min: PropTypes.Validator<number>;
|
|
34
|
-
max: PropTypes.Validator<number>;
|
|
35
|
-
step: PropTypes.Requireable<number>;
|
|
36
|
-
}>>>;
|
|
37
|
-
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
38
|
-
width: PropTypes.Validator<number>;
|
|
39
|
-
height: PropTypes.Validator<number>;
|
|
40
|
-
}>>>;
|
|
41
|
-
}>>>;
|
|
42
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
-
mathMlOptions: PropTypes.Requireable<object>;
|
|
44
|
-
};
|
|
45
|
-
static defaultProps: {
|
|
46
|
-
onChange: () => void;
|
|
47
|
-
};
|
|
48
|
-
render(): React.JSX.Element;
|
|
49
|
-
}
|
|
50
|
-
export declare const LabelType: {
|
|
51
|
-
left: PropTypes.Requireable<string>;
|
|
52
|
-
top: PropTypes.Requireable<string>;
|
|
53
|
-
bottom: PropTypes.Requireable<string>;
|
|
54
|
-
right: PropTypes.Requireable<string>;
|
|
55
|
-
};
|
|
56
|
-
export declare class Labels extends React.Component {
|
|
57
|
-
static propTypes: {
|
|
58
|
-
disabledLabels: PropTypes.Requireable<boolean>;
|
|
59
|
-
placeholders: PropTypes.Requireable<object>;
|
|
60
|
-
value: PropTypes.Requireable<PropTypes.InferProps<{
|
|
61
|
-
left: PropTypes.Requireable<string>;
|
|
62
|
-
top: PropTypes.Requireable<string>;
|
|
63
|
-
bottom: PropTypes.Requireable<string>;
|
|
64
|
-
right: PropTypes.Requireable<string>;
|
|
65
|
-
}>>;
|
|
66
|
-
graphProps: PropTypes.Requireable<object>;
|
|
67
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
|
-
mathMlOptions: PropTypes.Requireable<object>;
|
|
69
|
-
};
|
|
70
|
-
onChangeLabel: any;
|
|
71
|
-
render(): React.JSX.Element;
|
|
72
|
-
}
|
|
73
|
-
export default RawLabel;
|
package/dist/labels.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import e from "react";
|
|
2
|
-
import t from "prop-types";
|
|
3
|
-
import { types as n } from "@pie-lib/plot";
|
|
4
|
-
import r from "classnames";
|
|
5
|
-
import { styled as i } from "@mui/material/styles";
|
|
6
|
-
import { Fragment as a, jsx as o } from "react/jsx-runtime";
|
|
7
|
-
import * as s from "@pie-lib/render-ui";
|
|
8
|
-
import { Readable as c, color as l } from "@pie-lib/render-ui";
|
|
9
|
-
import u from "@pie-lib/editable-html-tip-tap";
|
|
10
|
-
//#region src/labels.tsx
|
|
11
|
-
function d(e) {
|
|
12
|
-
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
13
|
-
}
|
|
14
|
-
function f(e, t) {
|
|
15
|
-
return !e || d(e) ? e : d(e.default) ? e.default : t && d(e[t]) ? e[t] : t && d(e[t]?.default) ? e[t].default : e;
|
|
16
|
-
}
|
|
17
|
-
var p = f(c, "Readable") || f(g.Readable, "Readable"), m = s, h = m.default, g = h && typeof h == "object" ? h : m, _ = {
|
|
18
|
-
left: -90,
|
|
19
|
-
top: 0,
|
|
20
|
-
bottom: 0,
|
|
21
|
-
right: 90
|
|
22
|
-
}, v = (e, t, n) => {
|
|
23
|
-
let r = (e, t, n) => `translate(${e}, ${t}), rotate(${n})`;
|
|
24
|
-
if (e === "left") return r(-20, n / 2, _[e]);
|
|
25
|
-
if (e === "right") return r(t + 30, n / 2, _[e]);
|
|
26
|
-
if (e === "top") return r(t / 2, -20, _[e]);
|
|
27
|
-
if (e === "bottom") return r(t / 2, n + 30, _[e]);
|
|
28
|
-
}, y = (e, t) => {
|
|
29
|
-
switch (e) {
|
|
30
|
-
case "left":
|
|
31
|
-
case "top": return -t;
|
|
32
|
-
case "right": return -t - 10;
|
|
33
|
-
default: return -t + 10;
|
|
34
|
-
}
|
|
35
|
-
}, b = "Label", x = {
|
|
36
|
-
label: `${b}-label`,
|
|
37
|
-
axisLabel: `${b}-axisLabel`,
|
|
38
|
-
disabledAxisLabel: `${b}-disabledAxisLabel`,
|
|
39
|
-
bottomLabel: `${b}-bottomLabel`
|
|
40
|
-
}, S = i("div")(({ theme: e }) => ({
|
|
41
|
-
[`& .${x.label}`]: { fill: l.defaults.SECONDARY },
|
|
42
|
-
[`& .${x.axisLabel}`]: {
|
|
43
|
-
fontSize: e.typography.fontSize - 2,
|
|
44
|
-
textAlign: "center",
|
|
45
|
-
padding: "0 4px"
|
|
46
|
-
},
|
|
47
|
-
[`& .${x.disabledAxisLabel}`]: { pointerEvents: "none" },
|
|
48
|
-
[`& .${x.bottomLabel}`]: { marginTop: "44px" }
|
|
49
|
-
})), C = class extends e.Component {
|
|
50
|
-
static propTypes = {
|
|
51
|
-
text: t.string,
|
|
52
|
-
side: t.string,
|
|
53
|
-
disabledLabel: t.bool,
|
|
54
|
-
placeholder: t.string,
|
|
55
|
-
graphProps: n.GraphPropsType.isRequired,
|
|
56
|
-
onChange: t.func,
|
|
57
|
-
mathMlOptions: t.object
|
|
58
|
-
};
|
|
59
|
-
static defaultProps = { onChange: () => {} };
|
|
60
|
-
render() {
|
|
61
|
-
let { disabledLabel: e, placeholder: t, text: n, side: i, graphProps: a, onChange: s, mathMlOptions: c = {} } = this.props, { size: l, domain: d, range: f } = a, m = (l.height || 500) + (f.padding || 0) * 2, h = (l.width || 500) + (d.padding || 0) * 2, g = v(i, h, m), _ = i === "left" || i === "right" ? m : h, b = y(i, 36), C = i === "bottom" ? 58 : 54, w = [
|
|
62
|
-
"bold",
|
|
63
|
-
"italic",
|
|
64
|
-
"underline",
|
|
65
|
-
"strikethrough",
|
|
66
|
-
"math"
|
|
67
|
-
];
|
|
68
|
-
return /* @__PURE__ */ o(S, { children: /* @__PURE__ */ o("foreignObject", {
|
|
69
|
-
x: -(_ / 2),
|
|
70
|
-
y: b,
|
|
71
|
-
width: _,
|
|
72
|
-
height: C,
|
|
73
|
-
transform: g,
|
|
74
|
-
textAnchor: "middle",
|
|
75
|
-
children: /* @__PURE__ */ o(p, { children: /* @__PURE__ */ o(u, {
|
|
76
|
-
className: r({
|
|
77
|
-
[x.bottomLabel]: i === "bottom",
|
|
78
|
-
[x.disabledAxisLabel]: e
|
|
79
|
-
}, x.axisLabel),
|
|
80
|
-
markup: n || "",
|
|
81
|
-
onChange: s,
|
|
82
|
-
placeholder: !e && t,
|
|
83
|
-
toolbarOpts: {
|
|
84
|
-
position: i === "bottom" ? "top" : "bottom",
|
|
85
|
-
noPadding: !0,
|
|
86
|
-
noBorder: !0
|
|
87
|
-
},
|
|
88
|
-
activePlugins: w,
|
|
89
|
-
mathMlOptions: c
|
|
90
|
-
}) })
|
|
91
|
-
}) });
|
|
92
|
-
}
|
|
93
|
-
}, w = {
|
|
94
|
-
left: t.string,
|
|
95
|
-
top: t.string,
|
|
96
|
-
bottom: t.string,
|
|
97
|
-
right: t.string
|
|
98
|
-
};
|
|
99
|
-
(class extends e.Component {
|
|
100
|
-
static propTypes = {
|
|
101
|
-
disabledLabels: t.bool,
|
|
102
|
-
placeholders: t.object,
|
|
103
|
-
value: t.shape(w),
|
|
104
|
-
graphProps: t.object,
|
|
105
|
-
onChange: t.func,
|
|
106
|
-
mathMlOptions: t.object
|
|
107
|
-
};
|
|
108
|
-
onChangeLabel = (e, t) => {
|
|
109
|
-
let { value: n, onChange: r } = this.props;
|
|
110
|
-
r({
|
|
111
|
-
...n,
|
|
112
|
-
[t]: e
|
|
113
|
-
});
|
|
114
|
-
};
|
|
115
|
-
render() {
|
|
116
|
-
let { disabledLabels: e, placeholders: t = {}, value: n = {}, graphProps: r, mathMlOptions: i = {} } = this.props;
|
|
117
|
-
return /* @__PURE__ */ o(a, { children: [
|
|
118
|
-
"left",
|
|
119
|
-
"top",
|
|
120
|
-
"bottom",
|
|
121
|
-
"right"
|
|
122
|
-
].map((a) => /* @__PURE__ */ o(C, {
|
|
123
|
-
side: a,
|
|
124
|
-
text: n[a],
|
|
125
|
-
disabledLabel: e,
|
|
126
|
-
placeholder: t[a],
|
|
127
|
-
graphProps: r,
|
|
128
|
-
onChange: (e) => this.onChangeLabel(e, a),
|
|
129
|
-
mathMlOptions: i
|
|
130
|
-
}, a)) });
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
//#endregion
|
|
134
|
-
export { w as LabelType };
|
package/dist/mark-label.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/mark-label.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 position: (graphProps: any, mark: any, rect: any) => string;
|
|
12
|
-
export declare const coordinates: (graphProps: any, mark: any, rect: any, position: any) => {
|
|
13
|
-
left: any;
|
|
14
|
-
top: any;
|
|
15
|
-
} | undefined;
|
|
16
|
-
export declare const MarkLabel: {
|
|
17
|
-
(props: any): React.JSX.Element;
|
|
18
|
-
propTypes: {
|
|
19
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
20
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
-
graphProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
|
-
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
23
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
-
}>>>;
|
|
26
|
-
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
27
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
28
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
29
|
-
}>>>;
|
|
30
|
-
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
31
|
-
min: PropTypes.Validator<number>;
|
|
32
|
-
max: PropTypes.Validator<number>;
|
|
33
|
-
step: PropTypes.Requireable<number>;
|
|
34
|
-
}>>>;
|
|
35
|
-
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
36
|
-
min: PropTypes.Validator<number>;
|
|
37
|
-
max: PropTypes.Validator<number>;
|
|
38
|
-
step: PropTypes.Requireable<number>;
|
|
39
|
-
}>>>;
|
|
40
|
-
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
41
|
-
width: PropTypes.Validator<number>;
|
|
42
|
-
height: PropTypes.Validator<number>;
|
|
43
|
-
}>>>;
|
|
44
|
-
}>>;
|
|
45
|
-
inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
|
-
mark: PropTypes.Requireable<object>;
|
|
47
|
-
theme: PropTypes.Requireable<object>;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export default MarkLabel;
|