@pie-lib/graphing-solution-set 4.0.4-next.30 → 4.0.4-next.34
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 +34 -46
- 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/autosize-input.d.ts +0 -10
- package/dist/autosize-input.js +0 -66
- 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 -58
- package/dist/container/index.js +0 -48
- 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 -14
- 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/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +0 -101
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +0 -63
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +0 -44
- 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 -79
- 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 -50
- 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 -47
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +0 -53
- 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/classnames@2.5.1/node_modules/classnames/index.js +0 -32
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +0 -16
- 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-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +0 -471
- 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@5.0.1/node_modules/redux/dist/redux.js +0 -198
- 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 +0 -53
- 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 +0 -51
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +0 -10
- 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 -117
- 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
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/shared/point/index.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 BasePoint: {
|
|
12
|
-
new (props: any): {
|
|
13
|
-
grid: any;
|
|
14
|
-
onStart: any;
|
|
15
|
-
position: any;
|
|
16
|
-
tiny: any;
|
|
17
|
-
getScaledBounds: any;
|
|
18
|
-
getClientPoint: any;
|
|
19
|
-
skipDragOutsideOfBounds: any;
|
|
20
|
-
onDrag: any;
|
|
21
|
-
getDelta: any;
|
|
22
|
-
applyDelta: any;
|
|
23
|
-
onStop: any;
|
|
24
|
-
render(): React.JSX.Element;
|
|
25
|
-
context: unknown;
|
|
26
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
27
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
28
|
-
readonly props: Readonly<{}>;
|
|
29
|
-
state: Readonly<{}>;
|
|
30
|
-
refs: {
|
|
31
|
-
[key: string]: React.ReactInstance;
|
|
32
|
-
};
|
|
33
|
-
componentDidMount?(): void;
|
|
34
|
-
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
35
|
-
componentWillUnmount?(): void;
|
|
36
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
37
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
|
38
|
-
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
39
|
-
componentWillMount?(): void;
|
|
40
|
-
UNSAFE_componentWillMount?(): void;
|
|
41
|
-
componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
42
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
43
|
-
componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
44
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
45
|
-
};
|
|
46
|
-
propTypes: {
|
|
47
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
48
|
-
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
49
|
-
onDrag: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
|
-
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
|
-
onMove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
|
-
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
54
|
-
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
55
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
56
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
57
|
-
}>>>;
|
|
58
|
-
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
59
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
60
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
61
|
-
}>>>;
|
|
62
|
-
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
63
|
-
min: PropTypes.Validator<number>;
|
|
64
|
-
max: PropTypes.Validator<number>;
|
|
65
|
-
step: PropTypes.Requireable<number>;
|
|
66
|
-
}>>>;
|
|
67
|
-
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
68
|
-
min: PropTypes.Validator<number>;
|
|
69
|
-
max: PropTypes.Validator<number>;
|
|
70
|
-
step: PropTypes.Requireable<number>;
|
|
71
|
-
}>>>;
|
|
72
|
-
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
73
|
-
width: PropTypes.Validator<number>;
|
|
74
|
-
height: PropTypes.Validator<number>;
|
|
75
|
-
}>>>;
|
|
76
|
-
}>>>;
|
|
77
|
-
};
|
|
78
|
-
contextType?: React.Context<any> | undefined;
|
|
79
|
-
};
|
|
80
|
-
export declare const ArrowPoint: {
|
|
81
|
-
new (props: any): {
|
|
82
|
-
grid: any;
|
|
83
|
-
onStart: any;
|
|
84
|
-
position: any;
|
|
85
|
-
tiny: any;
|
|
86
|
-
getScaledBounds: any;
|
|
87
|
-
getClientPoint: any;
|
|
88
|
-
skipDragOutsideOfBounds: any;
|
|
89
|
-
onDrag: any;
|
|
90
|
-
getDelta: any;
|
|
91
|
-
applyDelta: any;
|
|
92
|
-
onStop: any;
|
|
93
|
-
render(): React.JSX.Element;
|
|
94
|
-
context: unknown;
|
|
95
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
96
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
97
|
-
readonly props: Readonly<{}>;
|
|
98
|
-
state: Readonly<{}>;
|
|
99
|
-
refs: {
|
|
100
|
-
[key: string]: React.ReactInstance;
|
|
101
|
-
};
|
|
102
|
-
componentDidMount?(): void;
|
|
103
|
-
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
104
|
-
componentWillUnmount?(): void;
|
|
105
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
106
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
|
107
|
-
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
108
|
-
componentWillMount?(): void;
|
|
109
|
-
UNSAFE_componentWillMount?(): void;
|
|
110
|
-
componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
111
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
112
|
-
componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
113
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
114
|
-
};
|
|
115
|
-
propTypes: {
|
|
116
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
117
|
-
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
|
-
onDrag: PropTypes.Requireable<(...args: any[]) => any>;
|
|
119
|
-
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
120
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
121
|
-
onMove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
122
|
-
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
123
|
-
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
124
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
125
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
126
|
-
}>>>;
|
|
127
|
-
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
128
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
129
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
130
|
-
}>>>;
|
|
131
|
-
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
132
|
-
min: PropTypes.Validator<number>;
|
|
133
|
-
max: PropTypes.Validator<number>;
|
|
134
|
-
step: PropTypes.Requireable<number>;
|
|
135
|
-
}>>>;
|
|
136
|
-
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
137
|
-
min: PropTypes.Validator<number>;
|
|
138
|
-
max: PropTypes.Validator<number>;
|
|
139
|
-
step: PropTypes.Requireable<number>;
|
|
140
|
-
}>>>;
|
|
141
|
-
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
142
|
-
width: PropTypes.Validator<number>;
|
|
143
|
-
height: PropTypes.Validator<number>;
|
|
144
|
-
}>>>;
|
|
145
|
-
}>>>;
|
|
146
|
-
};
|
|
147
|
-
contextType?: React.Context<any> | undefined;
|
|
148
|
-
};
|
|
149
|
-
export declare const Arrow: {
|
|
150
|
-
new (props: any): {
|
|
151
|
-
grid: any;
|
|
152
|
-
onStart: any;
|
|
153
|
-
position: any;
|
|
154
|
-
tiny: any;
|
|
155
|
-
getScaledBounds: any;
|
|
156
|
-
getClientPoint: any;
|
|
157
|
-
skipDragOutsideOfBounds: any;
|
|
158
|
-
onDrag: any;
|
|
159
|
-
getDelta: any;
|
|
160
|
-
applyDelta: any;
|
|
161
|
-
onStop: any;
|
|
162
|
-
render(): React.JSX.Element;
|
|
163
|
-
context: unknown;
|
|
164
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
165
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
166
|
-
readonly props: Readonly<{}>;
|
|
167
|
-
state: Readonly<{}>;
|
|
168
|
-
refs: {
|
|
169
|
-
[key: string]: React.ReactInstance;
|
|
170
|
-
};
|
|
171
|
-
componentDidMount?(): void;
|
|
172
|
-
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
173
|
-
componentWillUnmount?(): void;
|
|
174
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
175
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
|
176
|
-
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
177
|
-
componentWillMount?(): void;
|
|
178
|
-
UNSAFE_componentWillMount?(): void;
|
|
179
|
-
componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
180
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
181
|
-
componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
182
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
183
|
-
};
|
|
184
|
-
propTypes: {
|
|
185
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
186
|
-
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
187
|
-
onDrag: PropTypes.Requireable<(...args: any[]) => any>;
|
|
188
|
-
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
189
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
190
|
-
onMove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
191
|
-
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
192
|
-
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
193
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
194
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
195
|
-
}>>>;
|
|
196
|
-
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
197
|
-
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
198
|
-
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
199
|
-
}>>>;
|
|
200
|
-
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
201
|
-
min: PropTypes.Validator<number>;
|
|
202
|
-
max: PropTypes.Validator<number>;
|
|
203
|
-
step: PropTypes.Requireable<number>;
|
|
204
|
-
}>>>;
|
|
205
|
-
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
206
|
-
min: PropTypes.Validator<number>;
|
|
207
|
-
max: PropTypes.Validator<number>;
|
|
208
|
-
step: PropTypes.Requireable<number>;
|
|
209
|
-
}>>>;
|
|
210
|
-
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
211
|
-
width: PropTypes.Validator<number>;
|
|
212
|
-
height: PropTypes.Validator<number>;
|
|
213
|
-
}>>>;
|
|
214
|
-
}>>>;
|
|
215
|
-
};
|
|
216
|
-
contextType?: React.Context<any> | undefined;
|
|
217
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { bounds as e, point as t } from "../../../utils.js";
|
|
2
|
-
import { correct as n, disabled as r, incorrect as i, missing as a } from "../styles.js";
|
|
3
|
-
import { RawBp as o } from "./base-point.js";
|
|
4
|
-
import { RawArrow as s } from "./arrow-point.js";
|
|
5
|
-
import c from "./arrow.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import l from "prop-types";
|
|
8
|
-
import { gridDraggable as u } from "@pie-lib/plot";
|
|
9
|
-
import { styled as d } from "@mui/material/styles";
|
|
10
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
11
|
-
import { color as p } from "@pie-lib/render-ui";
|
|
12
|
-
//#region src/tools/shared/point/index.tsx
|
|
13
|
-
var m = {
|
|
14
|
-
bounds: (t, { domain: n, range: r }) => {
|
|
15
|
-
let { x: i, y: a } = t;
|
|
16
|
-
return e({
|
|
17
|
-
left: i,
|
|
18
|
-
top: a,
|
|
19
|
-
bottom: a,
|
|
20
|
-
right: i
|
|
21
|
-
}, n, r);
|
|
22
|
-
},
|
|
23
|
-
anchorPoint: (e) => {
|
|
24
|
-
let { x: t, y: n } = e;
|
|
25
|
-
return {
|
|
26
|
-
x: t,
|
|
27
|
-
y: n
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
fromDelta: (e, n) => t(e).add(t(n))
|
|
31
|
-
}, h = d("g", { shouldForwardProp: (e) => !["disabled", "correctness"].includes(e) })(({ disabled: e, correctness: t }) => ({ "& circle, & polygon": {
|
|
32
|
-
cursor: "pointer",
|
|
33
|
-
fill: p.defaults.SECONDARY,
|
|
34
|
-
...e && r(),
|
|
35
|
-
...t === "correct" && n(),
|
|
36
|
-
...t === "incorrect" && i(),
|
|
37
|
-
...t === "missing" && a()
|
|
38
|
-
} })), g = (e) => {
|
|
39
|
-
let t = (t) => /* @__PURE__ */ f(h, {
|
|
40
|
-
disabled: t.disabled,
|
|
41
|
-
correctness: t.correctness,
|
|
42
|
-
children: /* @__PURE__ */ f(e, { ...t })
|
|
43
|
-
});
|
|
44
|
-
return t.displayName = `withStyledWrapper(${e.displayName || e.name || "Component"})`, t.propTypes = {
|
|
45
|
-
disabled: l.bool,
|
|
46
|
-
correctness: l.string
|
|
47
|
-
}, t;
|
|
48
|
-
}, _ = u(m)(g(o));
|
|
49
|
-
u(m)(g(s)), u(m)(g(c));
|
|
50
|
-
//#endregion
|
|
51
|
-
export { _ as BasePoint };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/shared/styles.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 disabled: (key?: string) => {
|
|
10
|
-
[x: string]: any;
|
|
11
|
-
pointerEvents: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const correct: (key?: string) => {
|
|
14
|
-
[x: string]: any;
|
|
15
|
-
pointerEvents: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const incorrect: (key?: string) => {
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
pointerEvents: string;
|
|
20
|
-
};
|
|
21
|
-
export declare const missing: (key?: string) => {
|
|
22
|
-
[x: string]: any;
|
|
23
|
-
pointerEvents: string;
|
|
24
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { color as e } from "@pie-lib/render-ui";
|
|
2
|
-
//#region src/tools/shared/styles.ts
|
|
3
|
-
var t = (t = "fill") => ({
|
|
4
|
-
[t]: e.disabled(),
|
|
5
|
-
pointerEvents: "none"
|
|
6
|
-
}), n = (t = "fill") => ({
|
|
7
|
-
[t]: e.correct(),
|
|
8
|
-
pointerEvents: "none"
|
|
9
|
-
}), r = (t = "fill") => ({
|
|
10
|
-
[t]: e.incorrect(),
|
|
11
|
-
pointerEvents: "none"
|
|
12
|
-
}), i = (t = "fill") => ({
|
|
13
|
-
[t]: e.missing(),
|
|
14
|
-
pointerEvents: "none"
|
|
15
|
-
});
|
|
16
|
-
//#endregion
|
|
17
|
-
export { n as correct, t as disabled, r as incorrect, i as missing };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/shared/types.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 PropTypes from 'prop-types';
|
|
10
|
-
export declare const ToolPropTypeFields: {
|
|
11
|
-
mark: PropTypes.Requireable<any>;
|
|
12
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
|
-
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
-
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
};
|
package/dist/undo-redo.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/undo-redo.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 UndoRedo extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
className: PropTypes.Requireable<string>;
|
|
14
|
-
onReset: PropTypes.Validator<(...args: any[]) => any>;
|
|
15
|
-
language: PropTypes.Requireable<string>;
|
|
16
|
-
};
|
|
17
|
-
static defaultProps: {};
|
|
18
|
-
render(): React.JSX.Element;
|
|
19
|
-
}
|
|
20
|
-
export default UndoRedo;
|
package/dist/undo-redo.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import e from "react";
|
|
2
|
-
import t from "prop-types";
|
|
3
|
-
import { styled as n } from "@mui/material/styles";
|
|
4
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
-
import { color as i } from "@pie-lib/render-ui";
|
|
6
|
-
import a from "@mui/material/Button";
|
|
7
|
-
import o from "@pie-lib/translator";
|
|
8
|
-
//#region src/undo-redo.tsx
|
|
9
|
-
var { translator: s } = o, c = n(a)(({ theme: e }) => ({
|
|
10
|
-
color: i.text(),
|
|
11
|
-
fontWeight: "bold",
|
|
12
|
-
marginBottom: e.spacing(.5),
|
|
13
|
-
"&:not(:last-of-type)": { marginRight: e.spacing(.5) }
|
|
14
|
-
})), l = class extends e.Component {
|
|
15
|
-
static propTypes = {
|
|
16
|
-
className: t.string,
|
|
17
|
-
onReset: t.func.isRequired,
|
|
18
|
-
language: t.string
|
|
19
|
-
};
|
|
20
|
-
static defaultProps = {};
|
|
21
|
-
render() {
|
|
22
|
-
let { className: e, onReset: t = !1, language: n } = this.props;
|
|
23
|
-
return /* @__PURE__ */ r("div", {
|
|
24
|
-
className: e,
|
|
25
|
-
children: /* @__PURE__ */ r(c, {
|
|
26
|
-
onClick: () => t(),
|
|
27
|
-
children: s.t("graphing.reset", { lng: n })
|
|
28
|
-
})
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
33
|
-
export { l as default };
|
package/dist/use-debounce.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/use-debounce.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 useDebounce: (value: any, delay: any) => any;
|
package/dist/use-debounce.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useEffect as e, useState as t } from "react";
|
|
2
|
-
//#region src/use-debounce.ts
|
|
3
|
-
var n = (n, r) => {
|
|
4
|
-
let [i, a] = t(n);
|
|
5
|
-
return e(() => {
|
|
6
|
-
let e = setTimeout(() => {
|
|
7
|
-
a(n);
|
|
8
|
-
}, r);
|
|
9
|
-
return () => clearTimeout(e);
|
|
10
|
-
}, [n]), i;
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { n as useDebounce };
|
package/dist/utils.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-lib/packages/graphing-solution-set/src/utils.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 bounds: (area: any, domain: any, range: any) => {
|
|
10
|
-
left: number;
|
|
11
|
-
right: number;
|
|
12
|
-
top: number;
|
|
13
|
-
bottom: number;
|
|
14
|
-
};
|
|
15
|
-
export declare const point: (o: any) => import("@mapbox/point-geometry").default;
|
|
16
|
-
export declare const getAngleDeg: () => number;
|
|
17
|
-
export declare const arrowDimensions: () => number;
|
|
18
|
-
export declare const getTickValues: (prop: any) => number[];
|
|
19
|
-
export declare const countWords: (label: any) => any;
|
|
20
|
-
export declare const findLongestWord: (label: any) => any;
|
|
21
|
-
export declare const amountToIncreaseWidth: (longestWord: any) => number;
|
|
22
|
-
export declare const polygonToArea: (points: any) => unknown;
|
|
23
|
-
export declare const lineToArea: (from: any, to: any) => {
|
|
24
|
-
left: number;
|
|
25
|
-
top: number;
|
|
26
|
-
bottom: number;
|
|
27
|
-
right: number;
|
|
28
|
-
};
|
|
29
|
-
export declare const pointsToArea: (a: any, b: any) => {
|
|
30
|
-
left: number;
|
|
31
|
-
top: number;
|
|
32
|
-
bottom: number;
|
|
33
|
-
right: number;
|
|
34
|
-
};
|
|
35
|
-
export declare const getRightestPoints: (points: any) => {
|
|
36
|
-
a: any;
|
|
37
|
-
b: any;
|
|
38
|
-
};
|
|
39
|
-
export declare const getMiddleOfTwoPoints: (a: any, b: any) => {
|
|
40
|
-
x: number;
|
|
41
|
-
y: number;
|
|
42
|
-
};
|
|
43
|
-
export declare const roundNumber: (number: any) => number;
|
|
44
|
-
export declare const sameAxes: (p1: any, p2: any) => any;
|
|
45
|
-
export declare const equalPoints: (p1: any, p2: any) => any;
|
|
46
|
-
export declare const thinnerShapesNeeded: (graphProps: any) => boolean;
|
|
47
|
-
export declare const getAdjustedGraphLimits: (graphProps: any) => {
|
|
48
|
-
domain: {
|
|
49
|
-
min: number;
|
|
50
|
-
max: any;
|
|
51
|
-
};
|
|
52
|
-
range: {
|
|
53
|
-
min: number;
|
|
54
|
-
max: any;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
export declare const isDuplicatedMark: (mark: any, marks: any, oldMark: any) => boolean;
|
|
58
|
-
export declare const areArraysOfObjectsEqual: (array1: any, array2: any) => boolean;
|
package/dist/utils.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_browser as e } from "./node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js";
|
|
3
|
-
import { cloneDeep as t, head as n, isEmpty as r, isEqual as i, tail as a } from "@pie-element/shared-lodash";
|
|
4
|
-
import { utils as o } from "@pie-lib/plot";
|
|
5
|
-
e();
|
|
6
|
-
var s = o.bounds, c = o.point, l = () => 0, u = () => 0, d = (e) => {
|
|
7
|
-
let t = [], n = 0;
|
|
8
|
-
for (; n >= e.min && t.indexOf(n) < 0;) t.push(n), n = Math.round((n - e.step) * 1e4) / 1e4;
|
|
9
|
-
for (n = Math.round(e.step * 1e4) / 1e4; n <= e.max && t.indexOf(n) < 0;) t.push(n), n = Math.round((n + e.step) * 1e4) / 1e4;
|
|
10
|
-
return t ? t.filter((t) => t >= e.min && t <= e.max) : [];
|
|
11
|
-
}, f = (e) => e == null || r(e) ? 1 : e.split(" ").length, p = (e) => (e || "").replace(/<[^>]+>/g, "").split(" ").sort((e, t) => t.length - e.length)[0].length, m = (e) => e ? e * 10 : 0, h = (e) => {
|
|
12
|
-
let t = n(e), r = {
|
|
13
|
-
left: t.x,
|
|
14
|
-
top: t.y,
|
|
15
|
-
bottom: t.y,
|
|
16
|
-
right: t.x
|
|
17
|
-
};
|
|
18
|
-
return a(e).reduce((e, t) => (e.left = Math.min(e.left, t.x), e.top = Math.max(e.top, t.y), e.bottom = Math.min(e.bottom, t.y), e.right = Math.max(e.right, t.x), e), r);
|
|
19
|
-
}, g = (e) => {
|
|
20
|
-
let n = t(e);
|
|
21
|
-
return n.sort((e, t) => t.x - e.x), {
|
|
22
|
-
a: n[0],
|
|
23
|
-
b: n[1]
|
|
24
|
-
};
|
|
25
|
-
}, _ = (e, t) => ({
|
|
26
|
-
x: (e.x + t.x) / 2,
|
|
27
|
-
y: (e.y + t.y) / 2
|
|
28
|
-
}), v = (e) => parseFloat(e.toFixed(4)), y = (e, t) => e && t && (v(e.x) === v(t.x) || v(e.y) === v(t.y)), b = (e, t) => e && t && i({
|
|
29
|
-
x: v(e.x),
|
|
30
|
-
y: v(e.y)
|
|
31
|
-
}, {
|
|
32
|
-
x: v(t.x),
|
|
33
|
-
y: v(t.y)
|
|
34
|
-
}), x = (e, t) => {
|
|
35
|
-
let { min: n, max: r, step: i } = e;
|
|
36
|
-
return t / ((r - n) / i);
|
|
37
|
-
}, S = (e) => {
|
|
38
|
-
let { domain: t, range: n, size: { width: r, height: i } } = e;
|
|
39
|
-
return x(t, r) < 14 || x(n, i) < 14;
|
|
40
|
-
}, C = (e) => {
|
|
41
|
-
let { domain: t, range: n, size: { width: r, height: i } } = e, a = x(t, r), o = x(n, i), s = t.step / (a / 15), c = n.step / (o / 15);
|
|
42
|
-
return {
|
|
43
|
-
domain: {
|
|
44
|
-
min: t.min - s,
|
|
45
|
-
max: t.max + s
|
|
46
|
-
},
|
|
47
|
-
range: {
|
|
48
|
-
min: n.min - c,
|
|
49
|
-
max: n.max + c
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
}, w = (e) => (e || []).sort((e, t) => e.x - t.x || e.y - t.y), T = (e, t, n) => (e.x - t.x) * (n.y - t.y) === (n.x - t.x) * (e.y - t.y), E = (e, t) => T(e.from, t.from, t.to) && T(e.to, t.from, t.to), D = (e, n, r) => {
|
|
53
|
-
let { type: a, building: o } = e;
|
|
54
|
-
if (o) return !1;
|
|
55
|
-
let s = (n || []).filter((e) => e.type === a && !e.building), c = s.findIndex((e) => i(e, r));
|
|
56
|
-
return c !== -1 && s.splice(c, 1), !!s.find((n) => {
|
|
57
|
-
if (a === "line") {
|
|
58
|
-
let { from: t, to: r } = e;
|
|
59
|
-
return b(t, n.from) && b(r, n.to) || b(t, n.to) && b(r, n.from) || a === "line" && E(n, e);
|
|
60
|
-
} else if (a === "polygon") return i(w(t(e.points)), w(t(n.points)));
|
|
61
|
-
});
|
|
62
|
-
}, O = (e, t) => {
|
|
63
|
-
if (e.length !== t.length) return !1;
|
|
64
|
-
for (let n = 0; n < e.length; n++) {
|
|
65
|
-
let r = e[n], i = t[n];
|
|
66
|
-
if (Object.keys(r).length !== Object.keys(i).length) return !1;
|
|
67
|
-
for (let e in r) if (r[e] !== i[e]) return !1;
|
|
68
|
-
}
|
|
69
|
-
return !0;
|
|
70
|
-
};
|
|
71
|
-
//#endregion
|
|
72
|
-
export { m as amountToIncreaseWidth, O as areArraysOfObjectsEqual, u as arrowDimensions, s as bounds, f as countWords, b as equalPoints, p as findLongestWord, C as getAdjustedGraphLimits, l as getAngleDeg, _ as getMiddleOfTwoPoints, g as getRightestPoints, d as getTickValues, D as isDuplicatedMark, c as point, h as polygonToArea, v as roundNumber, y as sameAxes, S as thinnerShapesNeeded };
|