@pie-lib/graphing-solution-set 0.1.0
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/axis/arrow.d.ts +14 -0
- package/dist/axis/arrow.d.ts.map +1 -0
- package/dist/axis/arrow.js +34 -0
- package/dist/axis/axes.d.ts +133 -0
- package/dist/axis/axes.d.ts.map +1 -0
- package/dist/axis/axes.js +214 -0
- package/dist/axis/index.d.ts +11 -0
- package/dist/axis/index.d.ts.map +1 -0
- package/dist/bg.d.ts +52 -0
- package/dist/bg.d.ts.map +1 -0
- package/dist/bg.js +44 -0
- package/dist/container/actions.d.ts +16 -0
- package/dist/container/actions.d.ts.map +1 -0
- package/dist/container/actions.js +7 -0
- package/dist/container/index.d.ts +27 -0
- package/dist/container/index.d.ts.map +1 -0
- package/dist/container/index.js +48 -0
- package/dist/container/marks.d.ts +11 -0
- package/dist/container/marks.d.ts.map +1 -0
- package/dist/container/marks.js +11 -0
- package/dist/container/middleware.d.ts +11 -0
- package/dist/container/middleware.d.ts.map +1 -0
- package/dist/container/middleware.js +4 -0
- package/dist/container/reducer.d.ts +13 -0
- package/dist/container/reducer.d.ts.map +1 -0
- package/dist/container/reducer.js +7 -0
- package/dist/coordinates-label.d.ts +50 -0
- package/dist/coordinates-label.d.ts.map +1 -0
- package/dist/coordinates-label.js +46 -0
- package/dist/graph-with-controls.d.ts +86 -0
- package/dist/graph-with-controls.d.ts.map +1 -0
- package/dist/graph-with-controls.js +155 -0
- package/dist/graph.d.ts +120 -0
- package/dist/graph.d.ts.map +1 -0
- package/dist/graph.js +221 -0
- package/dist/grid-setup.d.ts +27 -0
- package/dist/grid-setup.d.ts.map +1 -0
- package/dist/grid-setup.js +307 -0
- package/dist/grid.d.ts +44 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +59 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/labels.d.ts +74 -0
- package/dist/labels.d.ts.map +1 -0
- package/dist/labels.js +134 -0
- package/dist/mark-label.d.ts +50 -0
- package/dist/mark-label.d.ts.map +1 -0
- package/dist/mark-label.js +84 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +7 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +7 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +25 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
- package/dist/node_modules/.bun/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +100 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +61 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +42 -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 +78 -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 +49 -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 +46 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +52 -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/hoist-non-react-statics@3.3.2/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +68 -0
- package/dist/node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js +28 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Hash.js +21 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_ListCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Map.js +10 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_MapCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Symbol.js +9 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js +14 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseGetTag.js +15 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseIsNative.js +16 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_coreJsData.js +9 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_freeGlobal.js +8 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getMapData.js +14 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getNative.js +15 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getRawTag.js +19 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getValue.js +11 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashClear.js +13 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashDelete.js +12 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashGet.js +18 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashHas.js +14 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hashSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isKeyable.js +12 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isMasked.js +16 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheClear.js +11 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheGet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_listCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js +19 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js +13 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_nativeCreate.js +9 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_objectToString.js +12 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_root.js +10 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/_toSource.js +20 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/eq.js +11 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/isFunction.js +16 -0
- package/dist/node_modules/.bun/lodash@4.17.21/node_modules/lodash/isObject.js +12 -0
- package/dist/node_modules/.bun/lodash@4.17.21/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-input-autosize@2.2.2_f4eacebf2041cd4f/node_modules/react-input-autosize/lib/AutosizeInput.js +216 -0
- package/dist/node_modules/.bun/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +82 -0
- package/dist/node_modules/.bun/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +62 -0
- package/dist/node_modules/.bun/react-is@16.13.1/node_modules/react-is/index.js +10 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/Context.js +5 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/Provider.js +47 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/connectAdvanced.js +95 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/connect.js +52 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/mapDispatchToProps.js +23 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/mapStateToProps.js +13 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/mergeProps.js +26 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/selectorFactory.js +41 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/verifySubselectors.js +11 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/wrapMapToProps.js +28 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/index.js +4 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/isPlainObject.js +10 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/shallowEqual.js +15 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/verifyPlainObject.js +8 -0
- package/dist/node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/utils/warning.js +9 -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@4.2.1/node_modules/redux/es/redux.js +225 -0
- package/dist/toggle-bar.d.ts +41 -0
- package/dist/toggle-bar.d.ts.map +1 -0
- package/dist/tool-menu.d.ts +22 -0
- package/dist/tool-menu.d.ts.map +1 -0
- package/dist/tool-menu.js +188 -0
- package/dist/tools/index.d.ts +18 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +12 -0
- package/dist/tools/line/component.d.ts +92 -0
- package/dist/tools/line/component.d.ts.map +1 -0
- package/dist/tools/line/component.js +58 -0
- package/dist/tools/line/index.d.ts +14 -0
- package/dist/tools/line/index.d.ts.map +1 -0
- package/dist/tools/line/index.js +6 -0
- package/dist/tools/polygon/component.d.ts +115 -0
- package/dist/tools/polygon/component.d.ts.map +1 -0
- package/dist/tools/polygon/component.js +194 -0
- package/dist/tools/polygon/index.d.ts +20 -0
- package/dist/tools/polygon/index.d.ts.map +1 -0
- package/dist/tools/polygon/index.js +55 -0
- package/dist/tools/polygon/line.d.ts +105 -0
- package/dist/tools/polygon/line.d.ts.map +1 -0
- package/dist/tools/polygon/polygon.d.ts +102 -0
- package/dist/tools/polygon/polygon.d.ts.map +1 -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.d.ts.map +1 -0
- package/dist/tools/shared/arrow-head.js +37 -0
- package/dist/tools/shared/line/index.d.ts +165 -0
- package/dist/tools/shared/line/index.d.ts.map +1 -0
- package/dist/tools/shared/line/index.js +320 -0
- package/dist/tools/shared/line/line-path.d.ts +58 -0
- package/dist/tools/shared/line/line-path.d.ts.map +1 -0
- package/dist/tools/shared/line/with-root-edge.d.ts +89 -0
- package/dist/tools/shared/line/with-root-edge.d.ts.map +1 -0
- package/dist/tools/shared/point/arrow-point.d.ts +58 -0
- package/dist/tools/shared/point/arrow-point.d.ts.map +1 -0
- package/dist/tools/shared/point/arrow-point.js +47 -0
- package/dist/tools/shared/point/arrow.d.ts +47 -0
- package/dist/tools/shared/point/arrow.d.ts.map +1 -0
- package/dist/tools/shared/point/arrow.js +36 -0
- package/dist/tools/shared/point/base-point.d.ts +51 -0
- package/dist/tools/shared/point/base-point.d.ts.map +1 -0
- package/dist/tools/shared/point/base-point.js +88 -0
- package/dist/tools/shared/point/index.d.ts +154 -0
- package/dist/tools/shared/point/index.d.ts.map +1 -0
- package/dist/tools/shared/point/index.js +51 -0
- package/dist/tools/shared/styles.d.ts +25 -0
- package/dist/tools/shared/styles.d.ts.map +1 -0
- package/dist/tools/shared/styles.js +17 -0
- package/dist/tools/shared/types.d.ts +16 -0
- package/dist/tools/shared/types.d.ts.map +1 -0
- package/dist/tools/shared/types.js +10 -0
- package/dist/undo-redo.d.ts +21 -0
- package/dist/undo-redo.d.ts.map +1 -0
- package/dist/undo-redo.js +33 -0
- package/dist/use-debounce.d.ts +10 -0
- package/dist/use-debounce.d.ts.map +1 -0
- package/dist/use-debounce.js +13 -0
- package/dist/utils.d.ts +59 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +72 -0
- package/package.json +64 -0
- package/src/axis/arrow.tsx +67 -0
- package/src/axis/axes.tsx +321 -0
- package/src/axis/index.ts +13 -0
- package/src/bg.tsx +106 -0
- package/src/container/actions.ts +18 -0
- package/src/container/index.tsx +95 -0
- package/src/container/marks.ts +24 -0
- package/src/container/middleware.ts +17 -0
- package/src/container/reducer.ts +15 -0
- package/src/coordinates-label.tsx +72 -0
- package/src/graph-with-controls.tsx +252 -0
- package/src/graph.tsx +343 -0
- package/src/grid-setup.tsx +470 -0
- package/src/grid.tsx +143 -0
- package/src/index.ts +17 -0
- package/src/labels.tsx +211 -0
- package/src/mark-label.tsx +135 -0
- package/src/toggle-bar.tsx +231 -0
- package/src/tool-menu.tsx +245 -0
- package/src/tools/index.ts +18 -0
- package/src/tools/line/component.tsx +87 -0
- package/src/tools/line/index.ts +14 -0
- package/src/tools/polygon/component.tsx +334 -0
- package/src/tools/polygon/index.ts +62 -0
- package/src/tools/polygon/line.tsx +90 -0
- package/src/tools/polygon/polygon.tsx +103 -0
- package/src/tools/shared/arrow-head.tsx +56 -0
- package/src/tools/shared/line/index.tsx +481 -0
- package/src/tools/shared/line/line-path.tsx +95 -0
- package/src/tools/shared/line/with-root-edge.tsx +107 -0
- package/src/tools/shared/point/arrow-point.tsx +70 -0
- package/src/tools/shared/point/arrow.tsx +50 -0
- package/src/tools/shared/point/base-point.tsx +123 -0
- package/src/tools/shared/point/index.tsx +68 -0
- package/src/tools/shared/styles.ts +30 -0
- package/src/tools/shared/types.ts +18 -0
- package/src/undo-redo.tsx +47 -0
- package/src/use-debounce.ts +23 -0
- package/src/utils.ts +240 -0
|
@@ -0,0 +1,58 @@
|
|
|
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(): JSX.Element;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=arrow-point.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow-point.d.ts","sourceRoot":"","sources":["../../../../src/tools/shared/point/arrow-point.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAMnC,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS;IAC3C,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;wCAyCuF,GAAG;wCAEpF,GACvB;;;wCAKG,GAAC;wCAGyC,GAAG;;;;;;;;;;;;;;;;;MApC7C;IAEF,MAAM,CAAC,YAAY;;;MAGjB;IAEF,MAAM;CA4BP"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { arrowDimensions as e, getAngleDeg as t } from "../../../utils.js";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import r from "prop-types";
|
|
4
|
+
import { isEqual as i } from "lodash-es";
|
|
5
|
+
import { types as a } from "@pie-lib/plot";
|
|
6
|
+
import o from "classnames";
|
|
7
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
8
|
+
//#region src/tools/shared/point/arrow-point.tsx
|
|
9
|
+
var c = class extends n.Component {
|
|
10
|
+
static propTypes = {
|
|
11
|
+
classes: r.object,
|
|
12
|
+
className: r.string,
|
|
13
|
+
correctness: r.string,
|
|
14
|
+
disabled: r.bool,
|
|
15
|
+
x: r.number,
|
|
16
|
+
y: r.number,
|
|
17
|
+
from: r.shape({
|
|
18
|
+
x: r.number,
|
|
19
|
+
y: r.number
|
|
20
|
+
}).isRequired,
|
|
21
|
+
to: r.shape({
|
|
22
|
+
x: r.number,
|
|
23
|
+
y: r.number
|
|
24
|
+
}),
|
|
25
|
+
graphProps: a.GraphPropsType.isRequired
|
|
26
|
+
};
|
|
27
|
+
static defaultProps = {
|
|
28
|
+
from: {},
|
|
29
|
+
to: {}
|
|
30
|
+
};
|
|
31
|
+
render() {
|
|
32
|
+
let { classes: n, className: r, x: a, 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 _ = i(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: o(n.point, l && n.disabled, n[u], r),
|
|
36
|
+
...m,
|
|
37
|
+
children: /* @__PURE__ */ s("polygon", {
|
|
38
|
+
points: _,
|
|
39
|
+
transform: `
|
|
40
|
+
translate(${h.x(a)}, ${h.y(c)})
|
|
41
|
+
rotate(${g} 0 0)`
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { c as RawArrow };
|
|
@@ -0,0 +1,47 @@
|
|
|
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(): JSX.Element;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=arrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../../../src/tools/shared/point/arrow.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAMnC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,KAAK,CAAC,SAAS;IAChD,MAAM,CAAC,SAAS;;;;;;;;;;wCAgC+K,GAAG;wCAAsD,GAAG;;;wCAAiI,GAAG;wCAAsD,GAAG;;;;;;;;;;;;;;;;;MAvBtb;IAEF,MAAM;CAoBP"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { thinnerShapesNeeded as e } from "../../../utils.js";
|
|
2
|
+
import { ArrowHead as t } from "../arrow-head.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import r from "prop-types";
|
|
5
|
+
import { types as i } from "@pie-lib/plot";
|
|
6
|
+
import a from "classnames";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
+
//#region src/tools/shared/point/arrow.tsx
|
|
9
|
+
var s = class extends n.Component {
|
|
10
|
+
static propTypes = {
|
|
11
|
+
classes: r.object,
|
|
12
|
+
className: r.string,
|
|
13
|
+
correctness: r.string,
|
|
14
|
+
disabled: r.bool,
|
|
15
|
+
x: r.number.isRequired,
|
|
16
|
+
y: r.number.isRequired,
|
|
17
|
+
angle: r.number.isRequired,
|
|
18
|
+
graphProps: i.GraphPropsType.isRequired
|
|
19
|
+
};
|
|
20
|
+
render() {
|
|
21
|
+
let { classes: n, angle: r, className: i, 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(${-r}, ${h},${g})`, v = `${h},${g}
|
|
22
|
+
${h - p},${g - p / 2}
|
|
23
|
+
${h - p}, ${g + p / 2}`;
|
|
24
|
+
return /* @__PURE__ */ o("g", {
|
|
25
|
+
className: a(n.point, l && n.disabled, n[u], i),
|
|
26
|
+
...f,
|
|
27
|
+
children: /* @__PURE__ */ o(t, {
|
|
28
|
+
size: p,
|
|
29
|
+
transform: _,
|
|
30
|
+
points: v
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { s as default };
|
|
@@ -0,0 +1,51 @@
|
|
|
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(): JSX.Element;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=base-point.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-point.d.ts","sourceRoot":"","sources":["../../../../src/tools/shared/point/base-point.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAgCnC,qBAAa,KAAM,SAAQ,KAAK,CAAC,SAAS;IACxC,MAAM,CAAC,SAAS;;;;;;;;;;wCAqBP,GAAG;wCAIP,GAAG;;;wCAKe,GAAG;wCAEtB,GAAA;;;;;;;;;;;;;;;;;;;;MApBF;gBAEU,KAAK,KAAA;IAKjB,MAAM;CA2DP"}
|
|
@@ -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 };
|
|
@@ -0,0 +1,154 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
10
|
+
export declare const BasePoint: {
|
|
11
|
+
new (props: any): {
|
|
12
|
+
grid: any;
|
|
13
|
+
onStart: any;
|
|
14
|
+
position: any;
|
|
15
|
+
tiny: any;
|
|
16
|
+
getScaledBounds: any;
|
|
17
|
+
getClientPoint: any;
|
|
18
|
+
skipDragOutsideOfBounds: any;
|
|
19
|
+
onDrag: any;
|
|
20
|
+
getDelta: any;
|
|
21
|
+
applyDelta: any;
|
|
22
|
+
onStop: any;
|
|
23
|
+
render(): JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
propTypes: {
|
|
26
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
27
|
+
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
+
onDrag: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
+
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
|
+
onMove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
33
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
34
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
35
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
36
|
+
}>>>;
|
|
37
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
38
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
39
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
40
|
+
}>>>;
|
|
41
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
42
|
+
min: PropTypes.Validator<number>;
|
|
43
|
+
max: PropTypes.Validator<number>;
|
|
44
|
+
step: PropTypes.Requireable<number>;
|
|
45
|
+
}>>>;
|
|
46
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
47
|
+
min: PropTypes.Validator<number>;
|
|
48
|
+
max: PropTypes.Validator<number>;
|
|
49
|
+
step: PropTypes.Requireable<number>;
|
|
50
|
+
}>>>;
|
|
51
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
52
|
+
width: PropTypes.Validator<number>;
|
|
53
|
+
height: PropTypes.Validator<number>;
|
|
54
|
+
}>>>;
|
|
55
|
+
}>>>;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const ArrowPoint: {
|
|
59
|
+
new (props: any): {
|
|
60
|
+
grid: any;
|
|
61
|
+
onStart: any;
|
|
62
|
+
position: any;
|
|
63
|
+
tiny: any;
|
|
64
|
+
getScaledBounds: any;
|
|
65
|
+
getClientPoint: any;
|
|
66
|
+
skipDragOutsideOfBounds: any;
|
|
67
|
+
onDrag: any;
|
|
68
|
+
getDelta: any;
|
|
69
|
+
applyDelta: any;
|
|
70
|
+
onStop: any;
|
|
71
|
+
render(): JSX.Element;
|
|
72
|
+
};
|
|
73
|
+
propTypes: {
|
|
74
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
75
|
+
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
76
|
+
onDrag: PropTypes.Requireable<(...args: any[]) => any>;
|
|
77
|
+
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
78
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
79
|
+
onMove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
80
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
81
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
82
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
83
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
84
|
+
}>>>;
|
|
85
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
86
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
87
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
88
|
+
}>>>;
|
|
89
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
90
|
+
min: PropTypes.Validator<number>;
|
|
91
|
+
max: PropTypes.Validator<number>;
|
|
92
|
+
step: PropTypes.Requireable<number>;
|
|
93
|
+
}>>>;
|
|
94
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
95
|
+
min: PropTypes.Validator<number>;
|
|
96
|
+
max: PropTypes.Validator<number>;
|
|
97
|
+
step: PropTypes.Requireable<number>;
|
|
98
|
+
}>>>;
|
|
99
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
100
|
+
width: PropTypes.Validator<number>;
|
|
101
|
+
height: PropTypes.Validator<number>;
|
|
102
|
+
}>>>;
|
|
103
|
+
}>>>;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export declare const Arrow: {
|
|
107
|
+
new (props: any): {
|
|
108
|
+
grid: any;
|
|
109
|
+
onStart: any;
|
|
110
|
+
position: any;
|
|
111
|
+
tiny: any;
|
|
112
|
+
getScaledBounds: any;
|
|
113
|
+
getClientPoint: any;
|
|
114
|
+
skipDragOutsideOfBounds: any;
|
|
115
|
+
onDrag: any;
|
|
116
|
+
getDelta: any;
|
|
117
|
+
applyDelta: any;
|
|
118
|
+
onStop: any;
|
|
119
|
+
render(): JSX.Element;
|
|
120
|
+
};
|
|
121
|
+
propTypes: {
|
|
122
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
123
|
+
onDragStart: PropTypes.Requireable<(...args: any[]) => any>;
|
|
124
|
+
onDrag: PropTypes.Requireable<(...args: any[]) => any>;
|
|
125
|
+
onDragStop: PropTypes.Requireable<(...args: any[]) => any>;
|
|
126
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
127
|
+
onMove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
128
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
129
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
130
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
131
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
132
|
+
}>>>;
|
|
133
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
134
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
135
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
136
|
+
}>>>;
|
|
137
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
138
|
+
min: PropTypes.Validator<number>;
|
|
139
|
+
max: PropTypes.Validator<number>;
|
|
140
|
+
step: PropTypes.Requireable<number>;
|
|
141
|
+
}>>>;
|
|
142
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
143
|
+
min: PropTypes.Validator<number>;
|
|
144
|
+
max: PropTypes.Validator<number>;
|
|
145
|
+
step: PropTypes.Requireable<number>;
|
|
146
|
+
}>>>;
|
|
147
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
148
|
+
width: PropTypes.Validator<number>;
|
|
149
|
+
height: PropTypes.Validator<number>;
|
|
150
|
+
}>>>;
|
|
151
|
+
}>>>;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/shared/point/index.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAGH,OAAO,SAAS,MAAM,YAAY,CAAC;AAsDnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;4CApBoB,GAAG;uCAEzC,GAAG;2CAIK,GAAG;wCACY,GAAG;uCACW,GAAG;;;wCAI2D,GAAG;wCAC3E,GAAG;;;wCAOD,GAAG;wCACV,GAAG;;;;;;;;;;;;;;;;;;CADyC,CAAC;AACvE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;4CArBmB,GAAG;uCAEzC,GAAG;2CAIK,GAAG;wCACY,GAAG;uCACW,GAAG;;;wCAI2D,GAAG;wCAC3E,GAAG;;;wCAOD,GAAG;wCACV,GAAG;;;;;;;;;;;;;;;;;;CAA6C,CAAC;AAC3E,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;4CAtBwB,GAAG;uCAEzC,GAAG;2CAIK,GAAG;wCACY,GAAG;uCACW,GAAG;;;wCAI2D,GAAG;wCAC3E,GAAG;;;wCAOD,GAAG;wCACV,GAAG;;;;;;;;;;;;;;;;;;CACyC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 };
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
};
|
|
25
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/tools/shared/styles.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAIH,eAAO,MAAM,QAAQ,GAAI,YAAY;;;CAGnC,CAAC;AAEH,eAAO,MAAM,OAAO,GAAI,YAAY;;;CAGlC,CAAC;AACH,eAAO,MAAM,SAAS,GAAI,YAAY;;;CAGpC,CAAC;AAEH,eAAO,MAAM,OAAO,GAAI,YAAY;;;CAGlC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 };
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
};
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tools/shared/types.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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(): JSX.Element;
|
|
19
|
+
}
|
|
20
|
+
export default UndoRedo;
|
|
21
|
+
//# sourceMappingURL=undo-redo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undo-redo.d.ts","sourceRoot":"","sources":["../src/undo-redo.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAiBnC,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS;IAC3C,MAAM,CAAC,SAAS;;;;MAId;IACF,MAAM,CAAC,YAAY,KAAM;IAEzB,MAAM;CAQP;AAED,eAAe,QAAQ,CAAC"}
|