@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,23 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), s = (e, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in e) t(r, i, {
|
|
5
|
+
get: e[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
}, c = (e, i, o, s) => {
|
|
10
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
11
|
+
get: ((e) => i[e]).bind(null, d),
|
|
12
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
13
|
+
});
|
|
14
|
+
return e;
|
|
15
|
+
}, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
|
|
16
|
+
value: n,
|
|
17
|
+
enumerable: !0
|
|
18
|
+
}) : a, n)), u = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
19
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
20
|
+
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
21
|
+
});
|
|
22
|
+
//#endregion
|
|
23
|
+
export { o as __commonJSMin, s as __exportAll, u as __require, l as __toESM };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/axis/arrow.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export declare class Arrow extends React.Component {
|
|
11
|
+
render(): JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export default Arrow;
|
|
14
|
+
//# sourceMappingURL=arrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../src/axis/arrow.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,qBAAa,KAAM,SAAQ,KAAK,CAAC,SAAS;IACxC,MAAM;CA6BP;AAgBD,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { types as n } from "@pie-lib/plot";
|
|
4
|
+
import { styled as r } from "@mui/material/styles";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/axis/arrow.tsx
|
|
7
|
+
var a = r("path")(({ theme: e }) => ({ fill: `var(--arrow-color, ${e.palette.common.black})` })), o = class extends e.Component {
|
|
8
|
+
render() {
|
|
9
|
+
let { x: e, y: t, className: n, scale: r } = this.props, o = this.props.direction || "left", s = r.x(e), c = r.y(t), l = "", u = (e, t, n) => `translate(${e}, ${t}) rotate(${n})`;
|
|
10
|
+
return o === "left" && (l = u(s - 15, c, 0)), o === "right" && (l = u(s + 15, c, 180)), o === "up" && (l = u(s, c - 15, 90)), o === "down" && (l = u(s, c + 15, 270)), /* @__PURE__ */ i(a, {
|
|
11
|
+
d: "m 0,0 8,-5 0,10 -8,-5",
|
|
12
|
+
transform: l,
|
|
13
|
+
className: n
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
o.propTypes = {
|
|
18
|
+
y: t.number,
|
|
19
|
+
x: t.number,
|
|
20
|
+
direction: t.oneOf([
|
|
21
|
+
"left",
|
|
22
|
+
"right",
|
|
23
|
+
"up",
|
|
24
|
+
"down"
|
|
25
|
+
]),
|
|
26
|
+
className: t.string,
|
|
27
|
+
scale: n.ScaleType.isRequired
|
|
28
|
+
}, o.defaultProps = {
|
|
29
|
+
y: 0,
|
|
30
|
+
x: 0,
|
|
31
|
+
direction: "left"
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { o as default };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/axis/axes.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare const AxisPropTypes: {
|
|
12
|
+
includeArrows: PropTypes.Requireable<object>;
|
|
13
|
+
graphProps: PropTypes.Requireable<object>;
|
|
14
|
+
};
|
|
15
|
+
export declare const sharedValues: (firstNegativeX: any, firstNegativeY: any, distanceFromOriginToFirstNegativeX: any, distanceFromOriginToFirstNegativeY: any, deltaAllowance: any, dy: any) => any[];
|
|
16
|
+
export declare const firstNegativeValue: (interval: any) => any;
|
|
17
|
+
export declare class RawXAxis extends React.Component {
|
|
18
|
+
static propTypes: {
|
|
19
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
20
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
21
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
+
}>>>;
|
|
24
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
25
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
27
|
+
}>>>;
|
|
28
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
29
|
+
min: PropTypes.Validator<number>;
|
|
30
|
+
max: PropTypes.Validator<number>;
|
|
31
|
+
step: PropTypes.Requireable<number>;
|
|
32
|
+
}>>>;
|
|
33
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
34
|
+
min: PropTypes.Validator<number>;
|
|
35
|
+
max: PropTypes.Validator<number>;
|
|
36
|
+
step: PropTypes.Requireable<number>;
|
|
37
|
+
}>>>;
|
|
38
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
39
|
+
width: PropTypes.Validator<number>;
|
|
40
|
+
height: PropTypes.Validator<number>;
|
|
41
|
+
}>>>;
|
|
42
|
+
}>>>;
|
|
43
|
+
includeArrows: PropTypes.Requireable<object>;
|
|
44
|
+
};
|
|
45
|
+
static defaultProps: {
|
|
46
|
+
includeArrows: {
|
|
47
|
+
left: boolean;
|
|
48
|
+
right: boolean;
|
|
49
|
+
up: boolean;
|
|
50
|
+
down: boolean;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
render(): JSX.Element;
|
|
54
|
+
}
|
|
55
|
+
export declare class RawYAxis extends React.Component {
|
|
56
|
+
static propTypes: {
|
|
57
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
58
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
59
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
60
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
61
|
+
}>>>;
|
|
62
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
63
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
64
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
65
|
+
}>>>;
|
|
66
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
67
|
+
min: PropTypes.Validator<number>;
|
|
68
|
+
max: PropTypes.Validator<number>;
|
|
69
|
+
step: PropTypes.Requireable<number>;
|
|
70
|
+
}>>>;
|
|
71
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
72
|
+
min: PropTypes.Validator<number>;
|
|
73
|
+
max: PropTypes.Validator<number>;
|
|
74
|
+
step: PropTypes.Requireable<number>;
|
|
75
|
+
}>>>;
|
|
76
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
77
|
+
width: PropTypes.Validator<number>;
|
|
78
|
+
height: PropTypes.Validator<number>;
|
|
79
|
+
}>>>;
|
|
80
|
+
}>>>;
|
|
81
|
+
includeArrows: PropTypes.Requireable<object>;
|
|
82
|
+
};
|
|
83
|
+
static defaultProps: {
|
|
84
|
+
includeArrows: {
|
|
85
|
+
left: boolean;
|
|
86
|
+
right: boolean;
|
|
87
|
+
up: boolean;
|
|
88
|
+
down: boolean;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
render(): JSX.Element;
|
|
92
|
+
}
|
|
93
|
+
export default class Axes extends React.Component {
|
|
94
|
+
static propTypes: {
|
|
95
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
96
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
97
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
98
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
99
|
+
}>>>;
|
|
100
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
101
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
102
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
103
|
+
}>>>;
|
|
104
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
105
|
+
min: PropTypes.Validator<number>;
|
|
106
|
+
max: PropTypes.Validator<number>;
|
|
107
|
+
step: PropTypes.Requireable<number>;
|
|
108
|
+
}>>>;
|
|
109
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
110
|
+
min: PropTypes.Validator<number>;
|
|
111
|
+
max: PropTypes.Validator<number>;
|
|
112
|
+
step: PropTypes.Requireable<number>;
|
|
113
|
+
}>>>;
|
|
114
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
115
|
+
width: PropTypes.Validator<number>;
|
|
116
|
+
height: PropTypes.Validator<number>;
|
|
117
|
+
}>>>;
|
|
118
|
+
}>>>;
|
|
119
|
+
includeArrows: PropTypes.Requireable<object>;
|
|
120
|
+
};
|
|
121
|
+
static defaultProps: {
|
|
122
|
+
includeArrows: {
|
|
123
|
+
left: boolean;
|
|
124
|
+
right: boolean;
|
|
125
|
+
up: boolean;
|
|
126
|
+
down: boolean;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
xValues: any;
|
|
130
|
+
yValues: any;
|
|
131
|
+
render(): JSX.Element;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=axes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axes.d.ts","sourceRoot":"","sources":["../../src/axis/axes.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAiCnC,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAgDF,eAAO,MAAM,YAAY,GACvB,mBAAc,EACd,mBAAc,EACd,uCAAkC,EAClC,uCAAkC,EAClC,mBAAc,EACd,OAAE,UAeH,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,aAAQ,QAAoD,CAAC;AAEhG,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS;IAC3C,MAAM,CAAC,SAAS;;;wCA/EE,GAAG;wCAED,GAAG;;;wCAOnB,GAAG;wCAIP,GAAC;;;;;;;;;;;;;;;;;;MAqEC;IACF,MAAM,CAAC,YAAY;;;;;;;MAAoB;IAEvC,MAAM;CA8CP;AAID,qBAAa,QAAS,SAAQ,KAAK,CAAC,SAAS;IAC3C,MAAM,CAAC,SAAS;;;wCAxIE,GAAG;wCAED,GAAG;;;wCAOnB,GAAG;wCAIP,GAAC;;;;;;;;;;;;;;;;;;MA8HC;IACF,MAAM,CAAC,YAAY;;;;;;;MAAoB;IAEvC,MAAM;CA+CP;AAID,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,KAAK,CAAC,SAAS;IAC/C,MAAM,CAAC,SAAS;;;wCAlME,GAAG;wCAED,GAAG;;;wCAOnB,GAAG;wCAIP,GAAC;;;;;;;;;;;;;;;;;;MAwLC;IACF,MAAM,CAAC,YAAY;;;;;;;MAAoB;IAEvC,OAAO,EAAE,GAAG,CAgBV;IAEF,OAAO,EAAE,GAAG,CAgBV;IAEF,MAAM;CAwCP"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js";
|
|
2
|
+
import t from "./arrow.js";
|
|
3
|
+
import { amountToIncreaseWidth as n, countWords as r, findLongestWord as i, getTickValues as a } from "../utils.js";
|
|
4
|
+
import o from "react";
|
|
5
|
+
import s from "prop-types";
|
|
6
|
+
import { types as c } from "@pie-lib/plot";
|
|
7
|
+
import { styled as l } from "@mui/material/styles";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
import * as f from "@pie-lib/render-ui";
|
|
10
|
+
import { Readable as p, color as m } from "@pie-lib/render-ui";
|
|
11
|
+
//#region src/axis/axes.tsx
|
|
12
|
+
function h(e) {
|
|
13
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
14
|
+
}
|
|
15
|
+
function g(e, t) {
|
|
16
|
+
return !e || h(e) ? e : h(e.default) ? e.default : t && h(e[t]) ? e[t] : t && h(e[t]?.default) ? e[t].default : e;
|
|
17
|
+
}
|
|
18
|
+
var _ = g(p, "Readable") || g(b.Readable, "Readable"), v = f, y = v.default, b = y && typeof y == "object" ? y : v, x = {
|
|
19
|
+
includeArrows: s.object,
|
|
20
|
+
graphProps: s.object
|
|
21
|
+
}, S = { includeArrows: {
|
|
22
|
+
left: !0,
|
|
23
|
+
right: !0,
|
|
24
|
+
up: !0,
|
|
25
|
+
down: !0
|
|
26
|
+
} }, C = l("g")(() => ({
|
|
27
|
+
"& .visx-axis-line": {
|
|
28
|
+
stroke: "#8a92c0",
|
|
29
|
+
strokeWidth: 4
|
|
30
|
+
},
|
|
31
|
+
"& .visx-axis-tick": {
|
|
32
|
+
fill: m.defaults.BLACK,
|
|
33
|
+
"& > line": { stroke: "#8a92c0" }
|
|
34
|
+
}
|
|
35
|
+
})), w = l("div")(({ theme: e, centered: t }) => ({
|
|
36
|
+
padding: 0,
|
|
37
|
+
margin: 0,
|
|
38
|
+
"* > *": {
|
|
39
|
+
margin: 0,
|
|
40
|
+
padding: 0
|
|
41
|
+
},
|
|
42
|
+
"& p": { margin: 0 },
|
|
43
|
+
fontSize: e.typography.fontSize,
|
|
44
|
+
...t && { textAlign: "center" }
|
|
45
|
+
})), T = l(t)({ fill: "#8a92c0" }), E = {
|
|
46
|
+
fontFamily: "Roboto",
|
|
47
|
+
fontSize: "14px",
|
|
48
|
+
cursor: "inherit"
|
|
49
|
+
}, D = (e, t, n, r, i, a) => {
|
|
50
|
+
let o = [];
|
|
51
|
+
return e === t && n - i < r && r < n + i && n - i < a && a < n + i && o.push(e), o;
|
|
52
|
+
}, O = (e) => (e || []).find((e) => e < 0), k = class extends o.Component {
|
|
53
|
+
static propTypes = {
|
|
54
|
+
...x,
|
|
55
|
+
graphProps: c.GraphPropsType.isRequired
|
|
56
|
+
};
|
|
57
|
+
static defaultProps = S;
|
|
58
|
+
render() {
|
|
59
|
+
let { includeArrows: t, graphProps: a, columnTicksValues: o, skipValues: s, distanceFromOriginToFirstNegativeY: c, dy: l } = this.props, { scale: f, domain: p, size: m, range: h } = a || {}, g = (e) => {
|
|
60
|
+
let t = s && s[0] === e ? c + 4 : l;
|
|
61
|
+
return {
|
|
62
|
+
...E,
|
|
63
|
+
textAnchor: "middle",
|
|
64
|
+
y: t,
|
|
65
|
+
dx: e === 0 ? -10 : 0,
|
|
66
|
+
dy: e === 0 ? -7 : 0
|
|
67
|
+
};
|
|
68
|
+
}, v = r(p.axisLabel), y = n(i(p.axisLabel)) + 2;
|
|
69
|
+
return /* @__PURE__ */ d(C, { children: [
|
|
70
|
+
/* @__PURE__ */ u(e, {
|
|
71
|
+
scale: f.x,
|
|
72
|
+
top: f.y(0),
|
|
73
|
+
left: 0,
|
|
74
|
+
label: p.label,
|
|
75
|
+
rangePadding: 8,
|
|
76
|
+
tickFormat: (e) => e,
|
|
77
|
+
tickLabelProps: g,
|
|
78
|
+
tickValues: o,
|
|
79
|
+
hideZero: !(p.labelStep || h.labelStep) && p.min <= 0
|
|
80
|
+
}),
|
|
81
|
+
t && t.left && /* @__PURE__ */ u(T, {
|
|
82
|
+
direction: "left",
|
|
83
|
+
x: p.min,
|
|
84
|
+
y: 0,
|
|
85
|
+
scale: f
|
|
86
|
+
}),
|
|
87
|
+
t && t.right && /* @__PURE__ */ u(T, {
|
|
88
|
+
direction: "right",
|
|
89
|
+
x: p.max,
|
|
90
|
+
y: 0,
|
|
91
|
+
scale: f
|
|
92
|
+
}),
|
|
93
|
+
p.axisLabel && /* @__PURE__ */ u("foreignObject", {
|
|
94
|
+
x: m.width + 17,
|
|
95
|
+
y: f.y(0) - 9,
|
|
96
|
+
width: y,
|
|
97
|
+
height: 20 * v,
|
|
98
|
+
children: /* @__PURE__ */ u(_, {
|
|
99
|
+
false: !0,
|
|
100
|
+
children: /* @__PURE__ */ u(w, { dangerouslySetInnerHTML: { __html: p.axisLabel } })
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
] });
|
|
104
|
+
}
|
|
105
|
+
}, A = class extends o.Component {
|
|
106
|
+
static propTypes = {
|
|
107
|
+
...x,
|
|
108
|
+
graphProps: c.GraphPropsType.isRequired
|
|
109
|
+
};
|
|
110
|
+
static defaultProps = S;
|
|
111
|
+
render() {
|
|
112
|
+
let { includeArrows: t, graphProps: r, skipValues: i, rowTickValues: a } = this.props, { scale: o, range: s, size: c } = r || {}, l = s.axisLabel ? n(s.axisLabel.length) : 0, f = (e) => i && i.indexOf(e) >= 0 ? "" : e;
|
|
113
|
+
return /* @__PURE__ */ d(C, { children: [
|
|
114
|
+
/* @__PURE__ */ u(e, {
|
|
115
|
+
orientation: "left",
|
|
116
|
+
scale: o.y,
|
|
117
|
+
top: 0,
|
|
118
|
+
height: c.height,
|
|
119
|
+
left: o.x(0),
|
|
120
|
+
label: s.label,
|
|
121
|
+
labelProps: { "data-pie-readable": !1 },
|
|
122
|
+
rangePadding: 8,
|
|
123
|
+
tickLength: 10,
|
|
124
|
+
tickFormat: f,
|
|
125
|
+
tickLabelProps: (e) => {
|
|
126
|
+
let t = e.toLocaleString().replace(/[.-]/g, "").length || 1;
|
|
127
|
+
return {
|
|
128
|
+
...E,
|
|
129
|
+
dy: 4,
|
|
130
|
+
dx: -10 - t * 9,
|
|
131
|
+
"data-pie-readable": !1
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
hideZero: !0,
|
|
135
|
+
tickTextAnchor: "bottom",
|
|
136
|
+
tickValues: a
|
|
137
|
+
}),
|
|
138
|
+
t && t.down && /* @__PURE__ */ u(T, {
|
|
139
|
+
direction: "down",
|
|
140
|
+
x: 0,
|
|
141
|
+
y: s.min,
|
|
142
|
+
scale: o
|
|
143
|
+
}),
|
|
144
|
+
t && t.up && /* @__PURE__ */ u(T, {
|
|
145
|
+
direction: "up",
|
|
146
|
+
x: 0,
|
|
147
|
+
y: s.max,
|
|
148
|
+
scale: o
|
|
149
|
+
}),
|
|
150
|
+
s.axisLabel && /* @__PURE__ */ u("foreignObject", {
|
|
151
|
+
x: o.x(0) - l / 2,
|
|
152
|
+
y: -33,
|
|
153
|
+
width: l,
|
|
154
|
+
height: "20",
|
|
155
|
+
children: /* @__PURE__ */ u(_, {
|
|
156
|
+
false: !0,
|
|
157
|
+
children: /* @__PURE__ */ u(w, {
|
|
158
|
+
centered: !0,
|
|
159
|
+
dangerouslySetInnerHTML: { __html: s.axisLabel }
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
] });
|
|
164
|
+
}
|
|
165
|
+
}, j = class extends o.Component {
|
|
166
|
+
static propTypes = {
|
|
167
|
+
...x,
|
|
168
|
+
graphProps: c.GraphPropsType.isRequired
|
|
169
|
+
};
|
|
170
|
+
static defaultProps = S;
|
|
171
|
+
xValues = () => {
|
|
172
|
+
let { graphProps: e } = this.props, { scale: t, domain: n } = e || {};
|
|
173
|
+
if (!n || !t) return;
|
|
174
|
+
let r = a({
|
|
175
|
+
...n,
|
|
176
|
+
step: n.labelStep
|
|
177
|
+
}), i = O(r);
|
|
178
|
+
return {
|
|
179
|
+
columnTicksValues: r,
|
|
180
|
+
firstNegativeX: i,
|
|
181
|
+
distanceFromOriginToFirstNegativeX: Math.abs(t.y(0) - t.y(i))
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
yValues = () => {
|
|
185
|
+
let { graphProps: e } = this.props, { scale: t, range: n } = e || {};
|
|
186
|
+
if (!n || !t) return;
|
|
187
|
+
let r = a({
|
|
188
|
+
...n,
|
|
189
|
+
step: n.labelStep
|
|
190
|
+
}), i = O(r);
|
|
191
|
+
return {
|
|
192
|
+
rowTickValues: r,
|
|
193
|
+
firstNegativeY: i,
|
|
194
|
+
distanceFromOriginToFirstNegativeY: Math.abs(t.x(0) - t.x(i))
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
render() {
|
|
198
|
+
let { graphProps: e } = this.props, { domain: t, range: n } = e || {}, { columnTicksValues: r, firstNegativeX: i, distanceFromOriginToFirstNegativeX: a } = this.xValues(), { rowTickValues: o, firstNegativeY: s, distanceFromOriginToFirstNegativeY: c } = this.yValues(), l = D(i, s, a, c, 6, 25);
|
|
199
|
+
return /* @__PURE__ */ d(C, { children: [n.min <= 0 ? /* @__PURE__ */ u(k, {
|
|
200
|
+
...this.props,
|
|
201
|
+
skipValues: l,
|
|
202
|
+
columnTicksValues: r,
|
|
203
|
+
distanceFromOriginToFirstNegativeY: c,
|
|
204
|
+
dy: 25
|
|
205
|
+
}) : null, t.min <= 0 ? /* @__PURE__ */ u(A, {
|
|
206
|
+
...this.props,
|
|
207
|
+
skipValues: l,
|
|
208
|
+
rowTickValues: o,
|
|
209
|
+
distanceFromOriginToFirstNegativeX: a
|
|
210
|
+
}) : null] });
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
//#endregion
|
|
214
|
+
export { x as AxisPropTypes, j as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/axis/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import Axes, { AxisPropTypes } from './axes.js';
|
|
10
|
+
export { Axes, AxisPropTypes };
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/axis/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,IAAI,EAAE,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/bg.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/bg.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export default class Bg extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
width: PropTypes.Validator<number>;
|
|
14
|
+
height: PropTypes.Validator<number>;
|
|
15
|
+
onClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
16
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
17
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
18
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
+
}>>>;
|
|
21
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
22
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
}>>>;
|
|
25
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
26
|
+
min: PropTypes.Validator<number>;
|
|
27
|
+
max: PropTypes.Validator<number>;
|
|
28
|
+
step: PropTypes.Requireable<number>;
|
|
29
|
+
}>>>;
|
|
30
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
31
|
+
min: PropTypes.Validator<number>;
|
|
32
|
+
max: PropTypes.Validator<number>;
|
|
33
|
+
step: PropTypes.Requireable<number>;
|
|
34
|
+
}>>>;
|
|
35
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
36
|
+
width: PropTypes.Validator<number>;
|
|
37
|
+
height: PropTypes.Validator<number>;
|
|
38
|
+
}>>>;
|
|
39
|
+
}>>>;
|
|
40
|
+
};
|
|
41
|
+
static defaultProps: {};
|
|
42
|
+
componentDidMount(): void;
|
|
43
|
+
shouldComponentUpdate(nextProps: any): boolean;
|
|
44
|
+
getRectPadding: any;
|
|
45
|
+
/**
|
|
46
|
+
* Note: we use d3 click + pointer to give us domain values directly.
|
|
47
|
+
* Saves us having to calculate them ourselves from a MouseEvent.
|
|
48
|
+
*/
|
|
49
|
+
onRectClick: any;
|
|
50
|
+
render(): JSX.Element;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=bg.d.ts.map
|
package/dist/bg.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bg.d.ts","sourceRoot":"","sources":["../src/bg.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,MAAM,CAAC,OAAO,OAAO,EAAG,SAAQ,KAAK,CAAC,SAAS;IAC7C,MAAM,CAAC,SAAS;;;;;;wCA4Cd,GAAH;wCACG,GAAA;;;wCAIe,GAAG;wCAET,GAAG;;;;;;;;;;;;;;;;;MA9CZ;IAEF,MAAM,CAAC,YAAY,KAAM;IAEzB,iBAAiB;IAMjB,qBAAqB,CAAC,SAAS,KAAA;IAQ/B,cAAc,EAAE,GAAG,CAIjB;IAEF;;;OAGG;IACH,WAAW,EAAE,GAAG,CAqCd;IAEF,MAAM;CAgBP"}
|
package/dist/bg.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { getTickValues as e, thinnerShapesNeeded as t } from "./utils.js";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import r from "prop-types";
|
|
4
|
+
import { types as i, utils as a } from "@pie-lib/plot";
|
|
5
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
6
|
+
import { pointer as s, select as c } from "d3-selection";
|
|
7
|
+
//#region src/bg.tsx
|
|
8
|
+
var l = class extends n.Component {
|
|
9
|
+
static propTypes = {
|
|
10
|
+
width: r.number.isRequired,
|
|
11
|
+
height: r.number.isRequired,
|
|
12
|
+
onClick: r.func.isRequired,
|
|
13
|
+
graphProps: i.GraphPropsType.isRequired
|
|
14
|
+
};
|
|
15
|
+
static defaultProps = {};
|
|
16
|
+
componentDidMount() {
|
|
17
|
+
let e = c(this.rect);
|
|
18
|
+
e.on("click", (t) => this.onRectClick(e, t));
|
|
19
|
+
}
|
|
20
|
+
shouldComponentUpdate(e) {
|
|
21
|
+
return !a.isDomainRangeEqual(this.props.graphProps, e.graphProps) || this.props.width !== e.width || this.props.height !== e.height;
|
|
22
|
+
}
|
|
23
|
+
getRectPadding = () => {
|
|
24
|
+
let { graphProps: e } = this.props;
|
|
25
|
+
return t(e) ? 6 : 10;
|
|
26
|
+
};
|
|
27
|
+
onRectClick = (t, n) => {
|
|
28
|
+
let { onClick: r, graphProps: i } = this.props, { scale: a } = i, o = this.getRectPadding(), c = s(n, t.node()), l = a.x.invert(c[0] - o), u = a.y.invert(c[1] - o), d = e(i.range), f = e(i.domain), p = (e, t) => e.length && e.reduce((e, n) => Math.abs(n - t) <= Math.abs(e - t) ? n : e), m = {};
|
|
29
|
+
f.indexOf(l) >= 0 && d.indexOf(u) >= 0 ? (m.x = l, m.y = u) : (m.x = p(f, l), m.y = p(d, u)), r(m);
|
|
30
|
+
};
|
|
31
|
+
render() {
|
|
32
|
+
let { width: e, height: t } = this.props, n = this.getRectPadding();
|
|
33
|
+
return /* @__PURE__ */ o("rect", {
|
|
34
|
+
ref: (e) => this.rect = e,
|
|
35
|
+
transform: `translate(-${n}, -${n})`,
|
|
36
|
+
fill: "red",
|
|
37
|
+
fillOpacity: "0.0",
|
|
38
|
+
width: e + n * 2,
|
|
39
|
+
height: t + n * 2
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { l as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/container/actions.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const addMark: () => {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const changeMarks: (marks: any) => {
|
|
13
|
+
type: string;
|
|
14
|
+
marks: any;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/container/actions.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,eAAO,MAAM,OAAO;;CAElB,CAAC;AAEH,eAAO,MAAM,WAAW,GAAI,UAAK;;;CAG/B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/container/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 GraphContainer: any;
|
|
12
|
+
/**
|
|
13
|
+
* The graph component entry point with undo/redo
|
|
14
|
+
* Redux is an implementation detail, hide it in the react component.
|
|
15
|
+
*/
|
|
16
|
+
declare class Root extends React.Component {
|
|
17
|
+
static propTypes: {
|
|
18
|
+
onChangeMarks: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
+
marks: PropTypes.Requireable<any[]>;
|
|
20
|
+
};
|
|
21
|
+
constructor(props: any);
|
|
22
|
+
componentDidUpdate(prevProps: any): void;
|
|
23
|
+
onStoreChange: any;
|
|
24
|
+
render(): JSX.Element;
|
|
25
|
+
}
|
|
26
|
+
export default Root;
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/container/index.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAiBnC,eAAO,MAAM,cAAc,KAAkE,CAAC;AAE9F;;;GAGG;AACH,cAAM,IAAK,SAAQ,KAAK,CAAC,SAAS;IAChC,MAAM,CAAC,SAAS;;;MAGd;gBAEU,KAAK,KAAA;IASjB,kBAAkB,CAAC,SAAS,KAAA;IAa5B,aAAa,EAAE,GAAG,CAShB;IAEF,MAAM;CAeP;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/components/Provider.js";
|
|
2
|
+
import { applyMiddleware as t, createStore as n } from "../node_modules/.bun/redux@4.2.1/node_modules/redux/es/redux.js";
|
|
3
|
+
import r from "../node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/connect/connect.js";
|
|
4
|
+
import "../node_modules/.bun/react-redux@6.0.1_926323a638b43722/node_modules/react-redux/es/index.js";
|
|
5
|
+
import { M as i } from "../node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js";
|
|
6
|
+
import a from "./reducer.js";
|
|
7
|
+
import { changeMarks as o } from "./actions.js";
|
|
8
|
+
import s from "../graph-with-controls.js";
|
|
9
|
+
import { getLastAction as c, lastActionMiddleware as l } from "./middleware.js";
|
|
10
|
+
import u from "react";
|
|
11
|
+
import d from "prop-types";
|
|
12
|
+
import { isEqual as f } from "lodash-es";
|
|
13
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
14
|
+
var m = r((e) => ({ marks: e.marks.present }), (e) => ({
|
|
15
|
+
onChangeMarks: (t) => e(o(t)),
|
|
16
|
+
onUndo: () => e(i.undo()),
|
|
17
|
+
onRedo: () => e(i.redo()),
|
|
18
|
+
onReset: () => e(o([]))
|
|
19
|
+
}))(s), h = class extends u.Component {
|
|
20
|
+
static propTypes = {
|
|
21
|
+
onChangeMarks: d.func,
|
|
22
|
+
marks: d.array
|
|
23
|
+
};
|
|
24
|
+
constructor(e) {
|
|
25
|
+
super(e), this.store = n(a(), { marks: e.marks }, t(l)), this.store.subscribe(this.onStoreChange);
|
|
26
|
+
}
|
|
27
|
+
componentDidUpdate(e) {
|
|
28
|
+
let { marks: t } = this.props;
|
|
29
|
+
f(this.store.getState().marks.present, t) || f(e.marks, t) || this.store.dispatch(o(t));
|
|
30
|
+
}
|
|
31
|
+
onStoreChange = () => {
|
|
32
|
+
let { marks: e, onChangeMarks: t } = this.props, n = this.store.getState(), r = c(), i = r.type.includes("UNDO") || r.type.includes("REDO");
|
|
33
|
+
f(n.marks.present, e) || t(n.marks.present, i);
|
|
34
|
+
};
|
|
35
|
+
render() {
|
|
36
|
+
let { onChangeMarks: t, marks: n, ...r } = this.props, i = n && n.find((e) => e.correctness);
|
|
37
|
+
return i ? /* @__PURE__ */ p(s, {
|
|
38
|
+
...r,
|
|
39
|
+
marks: n,
|
|
40
|
+
disabled: i
|
|
41
|
+
}) : /* @__PURE__ */ p(e, {
|
|
42
|
+
store: this.store,
|
|
43
|
+
children: /* @__PURE__ */ p(m, { ...r })
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { h as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/container/marks.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
|
+
declare const marks: (state: never[] | undefined, action: any) => any;
|
|
10
|
+
export default marks;
|
|
11
|
+
//# sourceMappingURL=marks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../src/container/marks.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,QAAA,MAAM,KAAK,GAAI,0BAAU,EAAE,WAAM,QAWhC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|