@pie-lib/graphing-solution-set 4.0.4-next.3 → 4.0.4-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +23 -0
- package/dist/autosize-input.d.ts +10 -0
- package/dist/autosize-input.js +66 -0
- package/dist/axis/arrow.d.ts +13 -0
- package/dist/axis/arrow.js +34 -0
- package/dist/axis/axes.d.ts +132 -0
- package/dist/axis/axes.js +214 -0
- package/dist/axis/index.d.ts +10 -0
- package/dist/bg.d.ts +51 -0
- package/dist/bg.js +44 -0
- package/dist/container/actions.d.ts +15 -0
- package/dist/container/actions.js +7 -0
- package/dist/container/index.d.ts +58 -0
- package/dist/container/index.js +48 -0
- package/dist/container/marks.d.ts +10 -0
- package/dist/container/marks.js +11 -0
- package/dist/container/middleware.d.ts +10 -0
- package/dist/container/middleware.js +4 -0
- package/dist/container/reducer.d.ts +14 -0
- package/dist/container/reducer.js +7 -0
- package/dist/coordinates-label.d.ts +50 -0
- package/dist/coordinates-label.js +46 -0
- package/dist/graph-with-controls.d.ts +85 -0
- package/dist/graph-with-controls.js +155 -0
- package/dist/graph.d.ts +119 -0
- package/dist/graph.js +221 -0
- package/dist/grid-setup.d.ts +27 -0
- package/dist/grid-setup.js +307 -0
- package/dist/grid.d.ts +43 -0
- package/dist/grid.js +59 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +6 -0
- package/dist/labels.d.ts +73 -0
- package/dist/labels.js +134 -0
- package/dist/mark-label.d.ts +50 -0
- package/dist/mark-label.js +84 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +101 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +63 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +44 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +21 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +15 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
- package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +50 -0
- package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +18 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +10 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +9 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +47 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +53 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +57 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +91 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +21 -0
- package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +32 -0
- package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +33 -0
- package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +32 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
- package/dist/node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js +28 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +10 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +15 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +8 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +15 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +19 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +18 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +19 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +10 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +20 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +20 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +37 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +509 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +108 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +31 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +45 -0
- package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +471 -0
- package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +49 -0
- package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +34 -0
- package/dist/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +185 -0
- package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +198 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +53 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +51 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +10 -0
- package/dist/toggle-bar.d.ts +40 -0
- package/dist/tool-menu.d.ts +21 -0
- package/dist/tool-menu.js +188 -0
- package/dist/tools/index.d.ts +17 -0
- package/dist/tools/index.js +12 -0
- package/dist/tools/line/component.d.ts +113 -0
- package/dist/tools/line/component.js +58 -0
- package/dist/tools/line/index.d.ts +13 -0
- package/dist/tools/line/index.js +6 -0
- package/dist/tools/polygon/component.d.ts +117 -0
- package/dist/tools/polygon/component.js +194 -0
- package/dist/tools/polygon/index.d.ts +19 -0
- package/dist/tools/polygon/index.js +55 -0
- package/dist/tools/polygon/line.d.ts +125 -0
- package/dist/tools/polygon/polygon.d.ts +122 -0
- package/dist/tools/polygon/polygon.js +62 -0
- package/dist/tools/shared/arrow-head.d.ts +43 -0
- package/dist/tools/shared/arrow-head.js +37 -0
- package/dist/tools/shared/line/index.d.ts +240 -0
- package/dist/tools/shared/line/index.js +320 -0
- package/dist/tools/shared/line/line-path.d.ts +57 -0
- package/dist/tools/shared/line/with-root-edge.d.ts +143 -0
- package/dist/tools/shared/point/arrow-point.d.ts +57 -0
- package/dist/tools/shared/point/arrow-point.js +47 -0
- package/dist/tools/shared/point/arrow.d.ts +46 -0
- package/dist/tools/shared/point/arrow.js +36 -0
- package/dist/tools/shared/point/base-point.d.ts +50 -0
- package/dist/tools/shared/point/base-point.js +88 -0
- package/dist/tools/shared/point/index.d.ts +217 -0
- package/dist/tools/shared/point/index.js +51 -0
- package/dist/tools/shared/styles.d.ts +24 -0
- package/dist/tools/shared/styles.js +17 -0
- package/dist/tools/shared/types.d.ts +15 -0
- package/dist/tools/shared/types.js +10 -0
- package/dist/undo-redo.d.ts +20 -0
- package/dist/undo-redo.js +33 -0
- package/dist/use-debounce.d.ts +9 -0
- package/dist/use-debounce.js +13 -0
- package/dist/utils.d.ts +58 -0
- package/dist/utils.js +72 -0
- package/package.json +46 -34
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -449
- package/LICENSE.md +0 -5
- package/lib/axis/arrow.js +0 -79
- package/lib/axis/arrow.js.map +0 -1
- package/lib/axis/axes.js +0 -327
- package/lib/axis/axes.js.map +0 -1
- package/lib/axis/index.js +0 -21
- package/lib/axis/index.js.map +0 -1
- package/lib/bg.js +0 -114
- package/lib/bg.js.map +0 -1
- package/lib/container/actions.js +0 -18
- package/lib/container/actions.js.map +0 -1
- package/lib/container/index.js +0 -120
- package/lib/container/index.js.map +0 -1
- package/lib/container/marks.js +0 -22
- package/lib/container/marks.js.map +0 -1
- package/lib/container/middleware.js +0 -19
- package/lib/container/middleware.js.map +0 -1
- package/lib/container/reducer.js +0 -18
- package/lib/container/reducer.js.map +0 -1
- package/lib/coordinates-label.js +0 -77
- package/lib/coordinates-label.js.map +0 -1
- package/lib/graph-with-controls.js +0 -297
- package/lib/graph-with-controls.js.map +0 -1
- package/lib/graph.js +0 -353
- package/lib/graph.js.map +0 -1
- package/lib/grid-setup.js +0 -414
- package/lib/grid-setup.js.map +0 -1
- package/lib/grid.js +0 -131
- package/lib/grid.js.map +0 -1
- package/lib/index.js +0 -40
- package/lib/index.js.map +0 -1
- package/lib/labels.js +0 -199
- package/lib/labels.js.map +0 -1
- package/lib/mark-label.js +0 -159
- package/lib/mark-label.js.map +0 -1
- package/lib/toggle-bar.js +0 -248
- package/lib/toggle-bar.js.map +0 -1
- package/lib/tool-menu.js +0 -218
- package/lib/tool-menu.js.map +0 -1
- package/lib/tools/index.js +0 -24
- package/lib/tools/index.js.map +0 -1
- package/lib/tools/line/component.js +0 -92
- package/lib/tools/line/component.js.map +0 -1
- package/lib/tools/line/index.js +0 -11
- package/lib/tools/line/index.js.map +0 -1
- package/lib/tools/polygon/component.js +0 -358
- package/lib/tools/polygon/component.js.map +0 -1
- package/lib/tools/polygon/index.js +0 -89
- package/lib/tools/polygon/index.js.map +0 -1
- package/lib/tools/polygon/line.js +0 -114
- package/lib/tools/polygon/line.js.map +0 -1
- package/lib/tools/polygon/polygon.js +0 -128
- package/lib/tools/polygon/polygon.js.map +0 -1
- package/lib/tools/shared/arrow-head.js +0 -62
- package/lib/tools/shared/arrow-head.js.map +0 -1
- package/lib/tools/shared/line/index.js +0 -539
- package/lib/tools/shared/line/index.js.map +0 -1
- package/lib/tools/shared/line/line-path.js +0 -121
- package/lib/tools/shared/line/line-path.js.map +0 -1
- package/lib/tools/shared/line/with-root-edge.js +0 -121
- package/lib/tools/shared/line/with-root-edge.js.map +0 -1
- package/lib/tools/shared/point/arrow-point.js +0 -86
- package/lib/tools/shared/point/arrow-point.js.map +0 -1
- package/lib/tools/shared/point/arrow.js +0 -70
- package/lib/tools/shared/point/arrow.js.map +0 -1
- package/lib/tools/shared/point/base-point.js +0 -137
- package/lib/tools/shared/point/base-point.js.map +0 -1
- package/lib/tools/shared/point/index.js +0 -80
- package/lib/tools/shared/point/index.js.map +0 -1
- package/lib/tools/shared/styles.js +0 -26
- package/lib/tools/shared/styles.js.map +0 -1
- package/lib/tools/shared/types.js +0 -15
- package/lib/tools/shared/types.js.map +0 -1
- package/lib/undo-redo.js +0 -67
- package/lib/undo-redo.js.map +0 -1
- package/lib/use-debounce.js +0 -25
- package/lib/use-debounce.js.map +0 -1
- package/lib/utils.js +0 -235
- package/lib/utils.js.map +0 -1
- package/src/__tests__/bg.test.jsx +0 -250
- package/src/__tests__/coordinates-label.test.jsx +0 -243
- package/src/__tests__/graph-with-controls.test.jsx +0 -184
- package/src/__tests__/graph.test.jsx +0 -93
- package/src/__tests__/grid-setup.test.jsx +0 -645
- package/src/__tests__/grid.test.jsx +0 -23
- package/src/__tests__/labels.test.jsx +0 -41
- package/src/__tests__/mark-label.test.jsx +0 -66
- package/src/__tests__/toggle-bar.test.jsx +0 -106
- package/src/__tests__/tool-menu.test.jsx +0 -453
- package/src/__tests__/undo-redo.test.jsx +0 -26
- package/src/__tests__/use-debounce.test.js +0 -21
- package/src/__tests__/utils.js +0 -41
- package/src/__tests__/utils.test.js +0 -105
- package/src/axis/__tests__/arrow.test.jsx +0 -43
- package/src/axis/__tests__/axes.test.jsx +0 -182
- package/src/axis/arrow.jsx +0 -57
- package/src/axis/axes.jsx +0 -284
- package/src/axis/index.js +0 -3
- package/src/bg.jsx +0 -96
- package/src/container/__tests__/actions.test.js +0 -105
- package/src/container/__tests__/index.test.jsx +0 -227
- package/src/container/__tests__/marks.test.js +0 -172
- package/src/container/__tests__/middleware.test.js +0 -235
- package/src/container/__tests__/reducer.test.js +0 -324
- package/src/container/actions.js +0 -8
- package/src/container/index.jsx +0 -85
- package/src/container/marks.js +0 -14
- package/src/container/middleware.js +0 -7
- package/src/container/reducer.js +0 -5
- package/src/coordinates-label.jsx +0 -62
- package/src/graph-with-controls.jsx +0 -242
- package/src/graph.jsx +0 -333
- package/src/grid-setup.jsx +0 -432
- package/src/grid.jsx +0 -133
- package/src/index.js +0 -7
- package/src/labels.jsx +0 -173
- package/src/mark-label.jsx +0 -125
- package/src/toggle-bar.jsx +0 -221
- package/src/tool-menu.jsx +0 -235
- package/src/tools/index.js +0 -8
- package/src/tools/line/__tests__/component.test.jsx +0 -37
- package/src/tools/line/component.jsx +0 -77
- package/src/tools/line/index.js +0 -4
- package/src/tools/polygon/__tests__/component.test.jsx +0 -487
- package/src/tools/polygon/__tests__/index.test.js +0 -65
- package/src/tools/polygon/__tests__/line.test.jsx +0 -23
- package/src/tools/polygon/__tests__/polygon.test.jsx +0 -44
- package/src/tools/polygon/component.jsx +0 -324
- package/src/tools/polygon/index.js +0 -52
- package/src/tools/polygon/line.jsx +0 -80
- package/src/tools/polygon/polygon.jsx +0 -93
- package/src/tools/shared/__tests__/arrow-head.test.jsx +0 -33
- package/src/tools/shared/arrow-head.jsx +0 -46
- package/src/tools/shared/line/__tests__/index.test.jsx +0 -553
- package/src/tools/shared/line/__tests__/line-path.test.jsx +0 -56
- package/src/tools/shared/line/__tests__/with-root-edge.test.jsx +0 -488
- package/src/tools/shared/line/index.jsx +0 -471
- package/src/tools/shared/line/line-path.jsx +0 -85
- package/src/tools/shared/line/with-root-edge.jsx +0 -97
- package/src/tools/shared/point/__tests__/arrow-point.test.jsx +0 -91
- package/src/tools/shared/point/__tests__/arrow.test.jsx +0 -469
- package/src/tools/shared/point/__tests__/base-point.test.jsx +0 -87
- package/src/tools/shared/point/arrow-point.jsx +0 -60
- package/src/tools/shared/point/arrow.jsx +0 -40
- package/src/tools/shared/point/base-point.jsx +0 -113
- package/src/tools/shared/point/index.jsx +0 -58
- package/src/tools/shared/styles.js +0 -20
- package/src/tools/shared/types.js +0 -8
- package/src/undo-redo.jsx +0 -37
- package/src/use-debounce.js +0 -13
- package/src/utils.js +0 -230
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/shared/line/with-root-edge.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 rootEdgeToFromToWrapper: (BaseComp: any) => {
|
|
12
|
+
(props: any): React.JSX.Element;
|
|
13
|
+
propTypes: {
|
|
14
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
mark: PropTypes.Requireable<object>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const rootEdgeComponent: (RootEdgeComp: any) => {
|
|
19
|
+
(props: any): React.JSX.Element;
|
|
20
|
+
propTypes: {
|
|
21
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
+
mark: PropTypes.Requireable<object>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const withRootEdge: (getPoints: any) => {
|
|
26
|
+
new (props: {}): {
|
|
27
|
+
onChangePoint: any;
|
|
28
|
+
dragComp: ({ from: draggedFrom, to: draggedTo }: {
|
|
29
|
+
from: any;
|
|
30
|
+
to: any;
|
|
31
|
+
}) => void;
|
|
32
|
+
dragFrom: any;
|
|
33
|
+
dragTo: any;
|
|
34
|
+
labelChange: any;
|
|
35
|
+
clickPoint: any;
|
|
36
|
+
input: {};
|
|
37
|
+
render(): React.JSX.Element;
|
|
38
|
+
context: unknown;
|
|
39
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
40
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
41
|
+
readonly props: Readonly<{}>;
|
|
42
|
+
state: Readonly<{}>;
|
|
43
|
+
refs: {
|
|
44
|
+
[key: string]: React.ReactInstance;
|
|
45
|
+
};
|
|
46
|
+
componentDidMount?(): void;
|
|
47
|
+
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
48
|
+
componentWillUnmount?(): void;
|
|
49
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
50
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
|
51
|
+
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
52
|
+
componentWillMount?(): void;
|
|
53
|
+
UNSAFE_componentWillMount?(): void;
|
|
54
|
+
componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
55
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
56
|
+
componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
57
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
58
|
+
};
|
|
59
|
+
new (props: {}, context: any): {
|
|
60
|
+
onChangePoint: any;
|
|
61
|
+
dragComp: ({ from: draggedFrom, to: draggedTo }: {
|
|
62
|
+
from: any;
|
|
63
|
+
to: any;
|
|
64
|
+
}) => void;
|
|
65
|
+
dragFrom: any;
|
|
66
|
+
dragTo: any;
|
|
67
|
+
labelChange: any;
|
|
68
|
+
clickPoint: any;
|
|
69
|
+
input: {};
|
|
70
|
+
render(): React.JSX.Element;
|
|
71
|
+
context: unknown;
|
|
72
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
73
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
74
|
+
readonly props: Readonly<{}>;
|
|
75
|
+
state: Readonly<{}>;
|
|
76
|
+
refs: {
|
|
77
|
+
[key: string]: React.ReactInstance;
|
|
78
|
+
};
|
|
79
|
+
componentDidMount?(): void;
|
|
80
|
+
shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
81
|
+
componentWillUnmount?(): void;
|
|
82
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
83
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
|
|
84
|
+
componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
85
|
+
componentWillMount?(): void;
|
|
86
|
+
UNSAFE_componentWillMount?(): void;
|
|
87
|
+
componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
88
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
|
|
89
|
+
componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
90
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
|
|
91
|
+
};
|
|
92
|
+
propTypes: {
|
|
93
|
+
coordinatesOnHover: PropTypes.Requireable<boolean>;
|
|
94
|
+
graphProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
95
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
96
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
97
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
98
|
+
}>>>;
|
|
99
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
100
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
101
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
102
|
+
}>>>;
|
|
103
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
104
|
+
min: PropTypes.Validator<number>;
|
|
105
|
+
max: PropTypes.Validator<number>;
|
|
106
|
+
step: PropTypes.Requireable<number>;
|
|
107
|
+
}>>>;
|
|
108
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
109
|
+
min: PropTypes.Validator<number>;
|
|
110
|
+
max: PropTypes.Validator<number>;
|
|
111
|
+
step: PropTypes.Requireable<number>;
|
|
112
|
+
}>>>;
|
|
113
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
114
|
+
width: PropTypes.Validator<number>;
|
|
115
|
+
height: PropTypes.Validator<number>;
|
|
116
|
+
}>>>;
|
|
117
|
+
}>>;
|
|
118
|
+
from: PropTypes.Requireable<PropTypes.InferProps<{
|
|
119
|
+
x: PropTypes.Validator<number>;
|
|
120
|
+
y: PropTypes.Validator<number>;
|
|
121
|
+
}>>;
|
|
122
|
+
to: PropTypes.Requireable<PropTypes.InferProps<{
|
|
123
|
+
x: PropTypes.Validator<number>;
|
|
124
|
+
y: PropTypes.Validator<number>;
|
|
125
|
+
}>>;
|
|
126
|
+
middle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
127
|
+
x: PropTypes.Validator<number>;
|
|
128
|
+
y: PropTypes.Validator<number>;
|
|
129
|
+
}>>;
|
|
130
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
131
|
+
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
132
|
+
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
133
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
134
|
+
correctness: PropTypes.Requireable<string>;
|
|
135
|
+
fill: PropTypes.Requireable<string>;
|
|
136
|
+
gssLineData: PropTypes.Requireable<object>;
|
|
137
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
138
|
+
labelNode: PropTypes.Requireable<object>;
|
|
139
|
+
labelModeEnabled: PropTypes.Requireable<boolean>;
|
|
140
|
+
changeMarkProps: PropTypes.Requireable<(...args: any[]) => any>;
|
|
141
|
+
};
|
|
142
|
+
contextType?: React.Context<any> | undefined;
|
|
143
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/shared/point/arrow-point.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 RawArrow extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
classes: PropTypes.Requireable<object>;
|
|
14
|
+
className: PropTypes.Requireable<string>;
|
|
15
|
+
correctness: PropTypes.Requireable<string>;
|
|
16
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
17
|
+
x: PropTypes.Requireable<number>;
|
|
18
|
+
y: PropTypes.Requireable<number>;
|
|
19
|
+
from: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
20
|
+
x: PropTypes.Requireable<number>;
|
|
21
|
+
y: PropTypes.Requireable<number>;
|
|
22
|
+
}>>>;
|
|
23
|
+
to: PropTypes.Requireable<PropTypes.InferProps<{
|
|
24
|
+
x: PropTypes.Requireable<number>;
|
|
25
|
+
y: PropTypes.Requireable<number>;
|
|
26
|
+
}>>;
|
|
27
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
28
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
29
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
30
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
|
+
}>>>;
|
|
32
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
33
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
34
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
35
|
+
}>>>;
|
|
36
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
37
|
+
min: PropTypes.Validator<number>;
|
|
38
|
+
max: PropTypes.Validator<number>;
|
|
39
|
+
step: PropTypes.Requireable<number>;
|
|
40
|
+
}>>>;
|
|
41
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
42
|
+
min: PropTypes.Validator<number>;
|
|
43
|
+
max: PropTypes.Validator<number>;
|
|
44
|
+
step: PropTypes.Requireable<number>;
|
|
45
|
+
}>>>;
|
|
46
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
47
|
+
width: PropTypes.Validator<number>;
|
|
48
|
+
height: PropTypes.Validator<number>;
|
|
49
|
+
}>>>;
|
|
50
|
+
}>>>;
|
|
51
|
+
};
|
|
52
|
+
static defaultProps: {
|
|
53
|
+
from: {};
|
|
54
|
+
to: {};
|
|
55
|
+
};
|
|
56
|
+
render(): React.JSX.Element;
|
|
57
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { arrowDimensions as e, getAngleDeg as t } from "../../../utils.js";
|
|
2
|
+
import n from "../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
3
|
+
import r from "react";
|
|
4
|
+
import i from "prop-types";
|
|
5
|
+
import { isEqual as a } from "@pie-element/shared-lodash";
|
|
6
|
+
import { types as o } from "@pie-lib/plot";
|
|
7
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
8
|
+
//#region src/tools/shared/point/arrow-point.tsx
|
|
9
|
+
var c = class extends r.Component {
|
|
10
|
+
static propTypes = {
|
|
11
|
+
classes: i.object,
|
|
12
|
+
className: i.string,
|
|
13
|
+
correctness: i.string,
|
|
14
|
+
disabled: i.bool,
|
|
15
|
+
x: i.number,
|
|
16
|
+
y: i.number,
|
|
17
|
+
from: i.shape({
|
|
18
|
+
x: i.number,
|
|
19
|
+
y: i.number
|
|
20
|
+
}).isRequired,
|
|
21
|
+
to: i.shape({
|
|
22
|
+
x: i.number,
|
|
23
|
+
y: i.number
|
|
24
|
+
}),
|
|
25
|
+
graphProps: o.GraphPropsType.isRequired
|
|
26
|
+
};
|
|
27
|
+
static defaultProps = {
|
|
28
|
+
from: {},
|
|
29
|
+
to: {}
|
|
30
|
+
};
|
|
31
|
+
render() {
|
|
32
|
+
let { classes: r, className: i, x: o, y: c, disabled: l, correctness: u, graphProps: d, from: f, to: p, ...m } = this.props, { scale: h } = d, g = t(f.x, f.y, p.x, p.y), _ = "";
|
|
33
|
+
return _ = a(f, p) ? "0,0 0,0 0,0" : `0,0 ${e.vector},${e.vector * 2}
|
|
34
|
+
-${e.vector},${e.vector * 2}`, /* @__PURE__ */ s("g", {
|
|
35
|
+
className: n(r.point, l && r.disabled, r[u], i),
|
|
36
|
+
...m,
|
|
37
|
+
children: /* @__PURE__ */ s("polygon", {
|
|
38
|
+
points: _,
|
|
39
|
+
transform: `
|
|
40
|
+
translate(${h.x(o)}, ${h.y(c)})
|
|
41
|
+
rotate(${g} 0 0)`
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { c as RawArrow };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/shared/point/arrow.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export default class Arrow extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
classes: PropTypes.Requireable<object>;
|
|
14
|
+
className: PropTypes.Requireable<string>;
|
|
15
|
+
correctness: PropTypes.Requireable<string>;
|
|
16
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
17
|
+
x: PropTypes.Validator<number>;
|
|
18
|
+
y: PropTypes.Validator<number>;
|
|
19
|
+
angle: PropTypes.Validator<number>;
|
|
20
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
21
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
22
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
}>>>;
|
|
25
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
26
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
27
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
28
|
+
}>>>;
|
|
29
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
30
|
+
min: PropTypes.Validator<number>;
|
|
31
|
+
max: PropTypes.Validator<number>;
|
|
32
|
+
step: PropTypes.Requireable<number>;
|
|
33
|
+
}>>>;
|
|
34
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
35
|
+
min: PropTypes.Validator<number>;
|
|
36
|
+
max: PropTypes.Validator<number>;
|
|
37
|
+
step: PropTypes.Requireable<number>;
|
|
38
|
+
}>>>;
|
|
39
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
40
|
+
width: PropTypes.Validator<number>;
|
|
41
|
+
height: PropTypes.Validator<number>;
|
|
42
|
+
}>>>;
|
|
43
|
+
}>>>;
|
|
44
|
+
};
|
|
45
|
+
render(): React.JSX.Element;
|
|
46
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { thinnerShapesNeeded as e } from "../../../utils.js";
|
|
2
|
+
import t from "../../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
3
|
+
import { ArrowHead as n } from "../arrow-head.js";
|
|
4
|
+
import r from "react";
|
|
5
|
+
import i from "prop-types";
|
|
6
|
+
import { types as a } from "@pie-lib/plot";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
+
//#region src/tools/shared/point/arrow.tsx
|
|
9
|
+
var s = class extends r.Component {
|
|
10
|
+
static propTypes = {
|
|
11
|
+
classes: i.object,
|
|
12
|
+
className: i.string,
|
|
13
|
+
correctness: i.string,
|
|
14
|
+
disabled: i.bool,
|
|
15
|
+
x: i.number.isRequired,
|
|
16
|
+
y: i.number.isRequired,
|
|
17
|
+
angle: i.number.isRequired,
|
|
18
|
+
graphProps: a.GraphPropsType.isRequired
|
|
19
|
+
};
|
|
20
|
+
render() {
|
|
21
|
+
let { classes: r, angle: i, className: a, x: s, y: c, disabled: l, correctness: u, graphProps: d, ...f } = this.props, p = e(d) ? 12 : 14, { scale: m } = d, h = m.x(s), g = m.y(c), _ = `rotate(${-i}, ${h},${g})`, v = `${h},${g}
|
|
22
|
+
${h - p},${g - p / 2}
|
|
23
|
+
${h - p}, ${g + p / 2}`;
|
|
24
|
+
return /* @__PURE__ */ o("g", {
|
|
25
|
+
className: t(r.point, l && r.disabled, r[u], a),
|
|
26
|
+
...f,
|
|
27
|
+
children: /* @__PURE__ */ o(n, {
|
|
28
|
+
size: p,
|
|
29
|
+
transform: _,
|
|
30
|
+
points: v
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { s as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/tools/shared/point/base-point.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 RawBp extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
className: PropTypes.Requireable<string>;
|
|
14
|
+
coordinatesOnHover: PropTypes.Requireable<boolean>;
|
|
15
|
+
correctness: PropTypes.Requireable<string>;
|
|
16
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
17
|
+
labelNode: PropTypes.Requireable<object>;
|
|
18
|
+
x: PropTypes.Requireable<number>;
|
|
19
|
+
y: PropTypes.Requireable<number>;
|
|
20
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
21
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
22
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
}>>>;
|
|
25
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
26
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
27
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
28
|
+
}>>>;
|
|
29
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
30
|
+
min: PropTypes.Validator<number>;
|
|
31
|
+
max: PropTypes.Validator<number>;
|
|
32
|
+
step: PropTypes.Requireable<number>;
|
|
33
|
+
}>>>;
|
|
34
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
35
|
+
min: PropTypes.Validator<number>;
|
|
36
|
+
max: PropTypes.Validator<number>;
|
|
37
|
+
step: PropTypes.Requireable<number>;
|
|
38
|
+
}>>>;
|
|
39
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
40
|
+
width: PropTypes.Validator<number>;
|
|
41
|
+
height: PropTypes.Validator<number>;
|
|
42
|
+
}>>>;
|
|
43
|
+
}>>>;
|
|
44
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
45
|
+
onTouchStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
|
+
onTouchEnd: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
+
};
|
|
48
|
+
constructor(props: any);
|
|
49
|
+
render(): React.JSX.Element;
|
|
50
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { thinnerShapesNeeded as e } from "../../../utils.js";
|
|
2
|
+
import { correct as t, disabled as n, incorrect as r, missing as i } from "../styles.js";
|
|
3
|
+
import a from "../../../coordinates-label.js";
|
|
4
|
+
import o from "react";
|
|
5
|
+
import s from "prop-types";
|
|
6
|
+
import { types as c } from "@pie-lib/plot";
|
|
7
|
+
import { styled as l } from "@mui/material/styles";
|
|
8
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
import { color as p } from "@pie-lib/render-ui";
|
|
10
|
+
import m from "react-dom";
|
|
11
|
+
//#region src/tools/shared/point/base-point.tsx
|
|
12
|
+
var h = l("g")(({ disabled: e, correctness: a }) => ({
|
|
13
|
+
cursor: "pointer",
|
|
14
|
+
"& circle": { fill: "currentColor" },
|
|
15
|
+
...e && {
|
|
16
|
+
...n("fill"),
|
|
17
|
+
...n("color")
|
|
18
|
+
},
|
|
19
|
+
...a === "correct" && {
|
|
20
|
+
...t("fill"),
|
|
21
|
+
...t("color")
|
|
22
|
+
},
|
|
23
|
+
...a === "incorrect" && {
|
|
24
|
+
...r("fill"),
|
|
25
|
+
...r("color")
|
|
26
|
+
},
|
|
27
|
+
...a === "missing" && {
|
|
28
|
+
...i("fill"),
|
|
29
|
+
...i("color")
|
|
30
|
+
}
|
|
31
|
+
})), g = class extends o.Component {
|
|
32
|
+
static propTypes = {
|
|
33
|
+
className: s.string,
|
|
34
|
+
coordinatesOnHover: s.bool,
|
|
35
|
+
correctness: s.string,
|
|
36
|
+
disabled: s.bool,
|
|
37
|
+
labelNode: s.object,
|
|
38
|
+
x: s.number,
|
|
39
|
+
y: s.number,
|
|
40
|
+
graphProps: c.GraphPropsType.isRequired,
|
|
41
|
+
onClick: s.func,
|
|
42
|
+
onTouchStart: s.func,
|
|
43
|
+
onTouchEnd: s.func
|
|
44
|
+
};
|
|
45
|
+
constructor(e) {
|
|
46
|
+
super(e), this.state = { showCoordinates: !1 };
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
let { className: t, coordinatesOnHover: n, x: r, y: i, disabled: o, correctness: s, graphProps: c, labelNode: l, style: g, onClick: _, onTouchStart: v, onTouchEnd: y, ...b } = this.props, { showCoordinates: x } = this.state, { scale: S } = c, C = e(c) ? 5 : 7;
|
|
50
|
+
return /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("circle", {
|
|
51
|
+
style: {
|
|
52
|
+
fill: "transparent",
|
|
53
|
+
cursor: "pointer",
|
|
54
|
+
pointerEvents: "all"
|
|
55
|
+
},
|
|
56
|
+
r: C * 3,
|
|
57
|
+
cx: S.x(r),
|
|
58
|
+
cy: S.y(i),
|
|
59
|
+
onMouseEnter: () => this.setState({ showCoordinates: !0 }),
|
|
60
|
+
onMouseLeave: () => this.setState({ showCoordinates: !1 }),
|
|
61
|
+
onTouchStart: v,
|
|
62
|
+
onTouchEnd: y,
|
|
63
|
+
onClick: _
|
|
64
|
+
}), /* @__PURE__ */ f(h, {
|
|
65
|
+
disabled: o,
|
|
66
|
+
correctness: s,
|
|
67
|
+
className: t,
|
|
68
|
+
onMouseEnter: () => this.setState({ showCoordinates: !0 }),
|
|
69
|
+
onMouseLeave: () => this.setState({ showCoordinates: !1 }),
|
|
70
|
+
children: [/* @__PURE__ */ d("circle", {
|
|
71
|
+
...b,
|
|
72
|
+
style: {
|
|
73
|
+
fill: p.defaults.BLACK,
|
|
74
|
+
cursor: "pointer"
|
|
75
|
+
},
|
|
76
|
+
r: C,
|
|
77
|
+
cx: S.x(r),
|
|
78
|
+
cy: S.y(i)
|
|
79
|
+
}), l && n && x && m.createPortal(/* @__PURE__ */ d(a, {
|
|
80
|
+
graphProps: c,
|
|
81
|
+
x: r,
|
|
82
|
+
y: i
|
|
83
|
+
}), l)]
|
|
84
|
+
})] });
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { g as RawBp };
|