@pie-lib/graphing-solution-set 4.0.4-next.29 → 4.0.4-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +23 -0
- package/dist/autosize-input.d.ts +10 -0
- package/dist/autosize-input.js +66 -0
- package/dist/axis/arrow.d.ts +13 -0
- package/dist/axis/arrow.js +34 -0
- package/dist/axis/axes.d.ts +132 -0
- package/dist/axis/axes.js +214 -0
- package/dist/axis/index.d.ts +10 -0
- package/dist/bg.d.ts +51 -0
- package/dist/bg.js +44 -0
- package/dist/container/actions.d.ts +15 -0
- package/dist/container/actions.js +7 -0
- package/dist/container/index.d.ts +58 -0
- package/dist/container/index.js +48 -0
- package/dist/container/marks.d.ts +10 -0
- package/dist/container/marks.js +11 -0
- package/dist/container/middleware.d.ts +10 -0
- package/dist/container/middleware.js +4 -0
- package/dist/container/reducer.d.ts +14 -0
- package/dist/container/reducer.js +7 -0
- package/dist/coordinates-label.d.ts +50 -0
- package/dist/coordinates-label.js +46 -0
- package/dist/graph-with-controls.d.ts +85 -0
- package/dist/graph-with-controls.js +155 -0
- package/dist/graph.d.ts +119 -0
- package/dist/graph.js +221 -0
- package/dist/grid-setup.d.ts +27 -0
- package/dist/grid-setup.js +307 -0
- package/dist/grid.d.ts +43 -0
- package/dist/grid.js +59 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +6 -0
- package/dist/labels.d.ts +73 -0
- package/dist/labels.js +134 -0
- package/dist/mark-label.d.ts +50 -0
- package/dist/mark-label.js +84 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js +101 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js +63 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js +44 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/constants/orientation.js +9 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js +14 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js +21 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js +16 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js +8 -0
- package/dist/node_modules/.bun/@visx_axis@3.12.0_f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js +15 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/Grid.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridColumns.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/grids/GridRows.js +79 -0
- package/dist/node_modules/.bun/@visx_grid@3.12.0_f4eacebf2041cd4f/node_modules/@visx/grid/esm/utils/getScaleBandwidth.js +6 -0
- package/dist/node_modules/.bun/@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js +50 -0
- package/dist/node_modules/.bun/@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js +18 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js +10 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js +9 -0
- package/dist/node_modules/.bun/@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js +6 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js +47 -0
- package/dist/node_modules/.bun/@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/lib/shapes/Line.js +53 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js +57 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/hooks/useText.js +91 -0
- package/dist/node_modules/.bun/@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/util/getStringWidth.js +21 -0
- package/dist/node_modules/.bun/balanced-match@0.4.2/node_modules/balanced-match/index.js +32 -0
- package/dist/node_modules/.bun/balanced-match@1.0.2/node_modules/balanced-match/index.js +33 -0
- package/dist/node_modules/.bun/classnames@2.5.1/node_modules/classnames/index.js +32 -0
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
- package/dist/node_modules/.bun/invariant@2.2.4/node_modules/invariant/browser.js +28 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Hash.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_ListCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Map.js +10 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_MapCache.js +21 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_Symbol.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_assocIndexOf.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseGetTag.js +15 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_baseIsNative.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_coreJsData.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_freeGlobal.js +8 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getMapData.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getNative.js +15 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getRawTag.js +19 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_getValue.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashClear.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashDelete.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashGet.js +18 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashHas.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_hashSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isKeyable.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_isMasked.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheClear.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheGet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_listCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheClear.js +19 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheDelete.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheGet.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheHas.js +13 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_mapCacheSet.js +14 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_nativeCreate.js +9 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_objectToString.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_root.js +10 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/_toSource.js +20 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/eq.js +11 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isFunction.js +16 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/isObject.js +12 -0
- package/dist/node_modules/.bun/lodash@4.18.1/node_modules/lodash/memoize.js +20 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/formula_evaluator.js +37 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/lexer.js +509 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/math_function.js +108 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix.js +31 -0
- package/dist/node_modules/.bun/math-expression-evaluator@1.4.0/node_modules/math-expression-evaluator/src/postfix_evaluator.js +45 -0
- package/dist/node_modules/.bun/react-redux@9.3.0_9e2203c65d1d5fa1/node_modules/react-redux/dist/react-redux.js +471 -0
- package/dist/node_modules/.bun/reduce-css-calc@1.3.0/node_modules/reduce-css-calc/index.js +49 -0
- package/dist/node_modules/.bun/reduce-function-call@1.0.3/node_modules/reduce-function-call/index.js +34 -0
- package/dist/node_modules/.bun/redux-undo@1.1.0/node_modules/redux-undo/dist/redux-undo.js +185 -0
- package/dist/node_modules/.bun/redux@5.0.1/node_modules/redux/dist/redux.js +198 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +53 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +51 -0
- package/dist/node_modules/.bun/use-sync-external-store@1.6.0_f4eacebf2041cd4f/node_modules/use-sync-external-store/with-selector.js +10 -0
- package/dist/toggle-bar.d.ts +40 -0
- package/dist/tool-menu.d.ts +21 -0
- package/dist/tool-menu.js +188 -0
- package/dist/tools/index.d.ts +17 -0
- package/dist/tools/index.js +12 -0
- package/dist/tools/line/component.d.ts +113 -0
- package/dist/tools/line/component.js +58 -0
- package/dist/tools/line/index.d.ts +13 -0
- package/dist/tools/line/index.js +6 -0
- package/dist/tools/polygon/component.d.ts +117 -0
- package/dist/tools/polygon/component.js +194 -0
- package/dist/tools/polygon/index.d.ts +19 -0
- package/dist/tools/polygon/index.js +55 -0
- package/dist/tools/polygon/line.d.ts +125 -0
- package/dist/tools/polygon/polygon.d.ts +122 -0
- package/dist/tools/polygon/polygon.js +62 -0
- package/dist/tools/shared/arrow-head.d.ts +43 -0
- package/dist/tools/shared/arrow-head.js +37 -0
- package/dist/tools/shared/line/index.d.ts +240 -0
- package/dist/tools/shared/line/index.js +320 -0
- package/dist/tools/shared/line/line-path.d.ts +57 -0
- package/dist/tools/shared/line/with-root-edge.d.ts +143 -0
- package/dist/tools/shared/point/arrow-point.d.ts +57 -0
- package/dist/tools/shared/point/arrow-point.js +47 -0
- package/dist/tools/shared/point/arrow.d.ts +46 -0
- package/dist/tools/shared/point/arrow.js +36 -0
- package/dist/tools/shared/point/base-point.d.ts +50 -0
- package/dist/tools/shared/point/base-point.js +88 -0
- package/dist/tools/shared/point/index.d.ts +217 -0
- package/dist/tools/shared/point/index.js +51 -0
- package/dist/tools/shared/styles.d.ts +24 -0
- package/dist/tools/shared/styles.js +17 -0
- package/dist/tools/shared/types.d.ts +15 -0
- package/dist/tools/shared/types.js +10 -0
- package/dist/undo-redo.d.ts +20 -0
- package/dist/undo-redo.js +33 -0
- package/dist/use-debounce.d.ts +9 -0
- package/dist/use-debounce.js +13 -0
- package/dist/utils.d.ts +58 -0
- package/dist/utils.js +72 -0
- package/package.json +46 -34
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -449
- package/LICENSE.md +0 -5
- package/lib/axis/arrow.js +0 -79
- package/lib/axis/arrow.js.map +0 -1
- package/lib/axis/axes.js +0 -327
- package/lib/axis/axes.js.map +0 -1
- package/lib/axis/index.js +0 -21
- package/lib/axis/index.js.map +0 -1
- package/lib/bg.js +0 -114
- package/lib/bg.js.map +0 -1
- package/lib/container/actions.js +0 -18
- package/lib/container/actions.js.map +0 -1
- package/lib/container/index.js +0 -129
- package/lib/container/index.js.map +0 -1
- package/lib/container/marks.js +0 -22
- package/lib/container/marks.js.map +0 -1
- package/lib/container/middleware.js +0 -19
- package/lib/container/middleware.js.map +0 -1
- package/lib/container/reducer.js +0 -18
- package/lib/container/reducer.js.map +0 -1
- package/lib/coordinates-label.js +0 -77
- package/lib/coordinates-label.js.map +0 -1
- package/lib/graph-with-controls.js +0 -297
- package/lib/graph-with-controls.js.map +0 -1
- package/lib/graph.js +0 -353
- package/lib/graph.js.map +0 -1
- package/lib/grid-setup.js +0 -414
- package/lib/grid-setup.js.map +0 -1
- package/lib/grid.js +0 -131
- package/lib/grid.js.map +0 -1
- package/lib/index.js +0 -40
- package/lib/index.js.map +0 -1
- package/lib/labels.js +0 -199
- package/lib/labels.js.map +0 -1
- package/lib/mark-label.js +0 -159
- package/lib/mark-label.js.map +0 -1
- package/lib/toggle-bar.js +0 -248
- package/lib/toggle-bar.js.map +0 -1
- package/lib/tool-menu.js +0 -218
- package/lib/tool-menu.js.map +0 -1
- package/lib/tools/index.js +0 -24
- package/lib/tools/index.js.map +0 -1
- package/lib/tools/line/component.js +0 -92
- package/lib/tools/line/component.js.map +0 -1
- package/lib/tools/line/index.js +0 -11
- package/lib/tools/line/index.js.map +0 -1
- package/lib/tools/polygon/component.js +0 -358
- package/lib/tools/polygon/component.js.map +0 -1
- package/lib/tools/polygon/index.js +0 -89
- package/lib/tools/polygon/index.js.map +0 -1
- package/lib/tools/polygon/line.js +0 -114
- package/lib/tools/polygon/line.js.map +0 -1
- package/lib/tools/polygon/polygon.js +0 -128
- package/lib/tools/polygon/polygon.js.map +0 -1
- package/lib/tools/shared/arrow-head.js +0 -62
- package/lib/tools/shared/arrow-head.js.map +0 -1
- package/lib/tools/shared/line/index.js +0 -539
- package/lib/tools/shared/line/index.js.map +0 -1
- package/lib/tools/shared/line/line-path.js +0 -121
- package/lib/tools/shared/line/line-path.js.map +0 -1
- package/lib/tools/shared/line/with-root-edge.js +0 -121
- package/lib/tools/shared/line/with-root-edge.js.map +0 -1
- package/lib/tools/shared/point/arrow-point.js +0 -86
- package/lib/tools/shared/point/arrow-point.js.map +0 -1
- package/lib/tools/shared/point/arrow.js +0 -70
- package/lib/tools/shared/point/arrow.js.map +0 -1
- package/lib/tools/shared/point/base-point.js +0 -137
- package/lib/tools/shared/point/base-point.js.map +0 -1
- package/lib/tools/shared/point/index.js +0 -80
- package/lib/tools/shared/point/index.js.map +0 -1
- package/lib/tools/shared/styles.js +0 -26
- package/lib/tools/shared/styles.js.map +0 -1
- package/lib/tools/shared/types.js +0 -15
- package/lib/tools/shared/types.js.map +0 -1
- package/lib/undo-redo.js +0 -67
- package/lib/undo-redo.js.map +0 -1
- package/lib/use-debounce.js +0 -25
- package/lib/use-debounce.js.map +0 -1
- package/lib/utils.js +0 -235
- package/lib/utils.js.map +0 -1
- package/src/__tests__/bg.test.jsx +0 -250
- package/src/__tests__/coordinates-label.test.jsx +0 -243
- package/src/__tests__/graph-with-controls.test.jsx +0 -184
- package/src/__tests__/graph.test.jsx +0 -93
- package/src/__tests__/grid-setup.test.jsx +0 -645
- package/src/__tests__/grid.test.jsx +0 -23
- package/src/__tests__/labels.test.jsx +0 -41
- package/src/__tests__/mark-label.test.jsx +0 -66
- package/src/__tests__/toggle-bar.test.jsx +0 -106
- package/src/__tests__/tool-menu.test.jsx +0 -453
- package/src/__tests__/undo-redo.test.jsx +0 -26
- package/src/__tests__/use-debounce.test.js +0 -21
- package/src/__tests__/utils.js +0 -41
- package/src/__tests__/utils.test.js +0 -105
- package/src/axis/__tests__/arrow.test.jsx +0 -43
- package/src/axis/__tests__/axes.test.jsx +0 -182
- package/src/axis/arrow.jsx +0 -57
- package/src/axis/axes.jsx +0 -284
- package/src/axis/index.js +0 -3
- package/src/bg.jsx +0 -96
- package/src/container/__tests__/actions.test.js +0 -105
- package/src/container/__tests__/index.test.jsx +0 -227
- package/src/container/__tests__/marks.test.js +0 -172
- package/src/container/__tests__/middleware.test.js +0 -235
- package/src/container/__tests__/reducer.test.js +0 -324
- package/src/container/actions.js +0 -8
- package/src/container/index.jsx +0 -93
- package/src/container/marks.js +0 -14
- package/src/container/middleware.js +0 -7
- package/src/container/reducer.js +0 -5
- package/src/coordinates-label.jsx +0 -62
- package/src/graph-with-controls.jsx +0 -242
- package/src/graph.jsx +0 -333
- package/src/grid-setup.jsx +0 -432
- package/src/grid.jsx +0 -133
- package/src/index.js +0 -7
- package/src/labels.jsx +0 -173
- package/src/mark-label.jsx +0 -125
- package/src/toggle-bar.jsx +0 -221
- package/src/tool-menu.jsx +0 -235
- package/src/tools/index.js +0 -8
- package/src/tools/line/__tests__/component.test.jsx +0 -37
- package/src/tools/line/component.jsx +0 -77
- package/src/tools/line/index.js +0 -4
- package/src/tools/polygon/__tests__/component.test.jsx +0 -487
- package/src/tools/polygon/__tests__/index.test.js +0 -65
- package/src/tools/polygon/__tests__/line.test.jsx +0 -23
- package/src/tools/polygon/__tests__/polygon.test.jsx +0 -44
- package/src/tools/polygon/component.jsx +0 -324
- package/src/tools/polygon/index.js +0 -52
- package/src/tools/polygon/line.jsx +0 -80
- package/src/tools/polygon/polygon.jsx +0 -93
- package/src/tools/shared/__tests__/arrow-head.test.jsx +0 -33
- package/src/tools/shared/arrow-head.jsx +0 -46
- package/src/tools/shared/line/__tests__/index.test.jsx +0 -553
- package/src/tools/shared/line/__tests__/line-path.test.jsx +0 -56
- package/src/tools/shared/line/__tests__/with-root-edge.test.jsx +0 -488
- package/src/tools/shared/line/index.jsx +0 -471
- package/src/tools/shared/line/line-path.jsx +0 -85
- package/src/tools/shared/line/with-root-edge.jsx +0 -97
- package/src/tools/shared/point/__tests__/arrow-point.test.jsx +0 -91
- package/src/tools/shared/point/__tests__/arrow.test.jsx +0 -469
- package/src/tools/shared/point/__tests__/base-point.test.jsx +0 -87
- package/src/tools/shared/point/arrow-point.jsx +0 -60
- package/src/tools/shared/point/arrow.jsx +0 -40
- package/src/tools/shared/point/base-point.jsx +0 -113
- package/src/tools/shared/point/index.jsx +0 -58
- package/src/tools/shared/styles.js +0 -20
- package/src/tools/shared/types.js +0 -8
- package/src/undo-redo.jsx +0 -37
- package/src/use-debounce.js +0 -13
- package/src/utils.js +0 -230
package/dist/labels.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/labels.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare const getTransform: (side: any, width: any, height: any) => string | undefined;
|
|
12
|
+
declare class RawLabel extends React.Component {
|
|
13
|
+
static propTypes: {
|
|
14
|
+
text: PropTypes.Requireable<string>;
|
|
15
|
+
side: PropTypes.Requireable<string>;
|
|
16
|
+
disabledLabel: PropTypes.Requireable<boolean>;
|
|
17
|
+
placeholder: PropTypes.Requireable<string>;
|
|
18
|
+
graphProps: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
19
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
20
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
+
}>>>;
|
|
23
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
24
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
+
}>>>;
|
|
27
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
28
|
+
min: PropTypes.Validator<number>;
|
|
29
|
+
max: PropTypes.Validator<number>;
|
|
30
|
+
step: PropTypes.Requireable<number>;
|
|
31
|
+
}>>>;
|
|
32
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
33
|
+
min: PropTypes.Validator<number>;
|
|
34
|
+
max: PropTypes.Validator<number>;
|
|
35
|
+
step: PropTypes.Requireable<number>;
|
|
36
|
+
}>>>;
|
|
37
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
38
|
+
width: PropTypes.Validator<number>;
|
|
39
|
+
height: PropTypes.Validator<number>;
|
|
40
|
+
}>>>;
|
|
41
|
+
}>>>;
|
|
42
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
+
mathMlOptions: PropTypes.Requireable<object>;
|
|
44
|
+
};
|
|
45
|
+
static defaultProps: {
|
|
46
|
+
onChange: () => void;
|
|
47
|
+
};
|
|
48
|
+
render(): React.JSX.Element;
|
|
49
|
+
}
|
|
50
|
+
export declare const LabelType: {
|
|
51
|
+
left: PropTypes.Requireable<string>;
|
|
52
|
+
top: PropTypes.Requireable<string>;
|
|
53
|
+
bottom: PropTypes.Requireable<string>;
|
|
54
|
+
right: PropTypes.Requireable<string>;
|
|
55
|
+
};
|
|
56
|
+
export declare class Labels extends React.Component {
|
|
57
|
+
static propTypes: {
|
|
58
|
+
disabledLabels: PropTypes.Requireable<boolean>;
|
|
59
|
+
placeholders: PropTypes.Requireable<object>;
|
|
60
|
+
value: PropTypes.Requireable<PropTypes.InferProps<{
|
|
61
|
+
left: PropTypes.Requireable<string>;
|
|
62
|
+
top: PropTypes.Requireable<string>;
|
|
63
|
+
bottom: PropTypes.Requireable<string>;
|
|
64
|
+
right: PropTypes.Requireable<string>;
|
|
65
|
+
}>>;
|
|
66
|
+
graphProps: PropTypes.Requireable<object>;
|
|
67
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
68
|
+
mathMlOptions: PropTypes.Requireable<object>;
|
|
69
|
+
};
|
|
70
|
+
onChangeLabel: any;
|
|
71
|
+
render(): React.JSX.Element;
|
|
72
|
+
}
|
|
73
|
+
export default RawLabel;
|
package/dist/labels.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import e from "./node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import { types as r } from "@pie-lib/plot";
|
|
5
|
+
import { styled as i } from "@mui/material/styles";
|
|
6
|
+
import { Fragment as a, jsx as o } from "react/jsx-runtime";
|
|
7
|
+
import * as s from "@pie-lib/render-ui";
|
|
8
|
+
import { Readable as c, color as l } from "@pie-lib/render-ui";
|
|
9
|
+
import u from "@pie-lib/editable-html-tip-tap";
|
|
10
|
+
//#region src/labels.tsx
|
|
11
|
+
function d(e) {
|
|
12
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
13
|
+
}
|
|
14
|
+
function f(e, t) {
|
|
15
|
+
return !e || d(e) ? e : d(e.default) ? e.default : t && d(e[t]) ? e[t] : t && d(e[t]?.default) ? e[t].default : e;
|
|
16
|
+
}
|
|
17
|
+
var p = f(c, "Readable") || f(g.Readable, "Readable"), m = s, h = m.default, g = h && typeof h == "object" ? h : m, _ = {
|
|
18
|
+
left: -90,
|
|
19
|
+
top: 0,
|
|
20
|
+
bottom: 0,
|
|
21
|
+
right: 90
|
|
22
|
+
}, v = (e, t, n) => {
|
|
23
|
+
let r = (e, t, n) => `translate(${e}, ${t}), rotate(${n})`;
|
|
24
|
+
if (e === "left") return r(-20, n / 2, _[e]);
|
|
25
|
+
if (e === "right") return r(t + 30, n / 2, _[e]);
|
|
26
|
+
if (e === "top") return r(t / 2, -20, _[e]);
|
|
27
|
+
if (e === "bottom") return r(t / 2, n + 30, _[e]);
|
|
28
|
+
}, y = (e, t) => {
|
|
29
|
+
switch (e) {
|
|
30
|
+
case "left":
|
|
31
|
+
case "top": return -t;
|
|
32
|
+
case "right": return -t - 10;
|
|
33
|
+
default: return -t + 10;
|
|
34
|
+
}
|
|
35
|
+
}, b = "Label", x = {
|
|
36
|
+
label: `${b}-label`,
|
|
37
|
+
axisLabel: `${b}-axisLabel`,
|
|
38
|
+
disabledAxisLabel: `${b}-disabledAxisLabel`,
|
|
39
|
+
bottomLabel: `${b}-bottomLabel`
|
|
40
|
+
}, S = i("div")(({ theme: e }) => ({
|
|
41
|
+
[`& .${x.label}`]: { fill: l.defaults.SECONDARY },
|
|
42
|
+
[`& .${x.axisLabel}`]: {
|
|
43
|
+
fontSize: e.typography.fontSize - 2,
|
|
44
|
+
textAlign: "center",
|
|
45
|
+
padding: "0 4px"
|
|
46
|
+
},
|
|
47
|
+
[`& .${x.disabledAxisLabel}`]: { pointerEvents: "none" },
|
|
48
|
+
[`& .${x.bottomLabel}`]: { marginTop: "44px" }
|
|
49
|
+
})), C = class extends t.Component {
|
|
50
|
+
static propTypes = {
|
|
51
|
+
text: n.string,
|
|
52
|
+
side: n.string,
|
|
53
|
+
disabledLabel: n.bool,
|
|
54
|
+
placeholder: n.string,
|
|
55
|
+
graphProps: r.GraphPropsType.isRequired,
|
|
56
|
+
onChange: n.func,
|
|
57
|
+
mathMlOptions: n.object
|
|
58
|
+
};
|
|
59
|
+
static defaultProps = { onChange: () => {} };
|
|
60
|
+
render() {
|
|
61
|
+
let { disabledLabel: t, placeholder: n, text: r, side: i, graphProps: a, onChange: s, mathMlOptions: c = {} } = this.props, { size: l, domain: d, range: f } = a, m = (l.height || 500) + (f.padding || 0) * 2, h = (l.width || 500) + (d.padding || 0) * 2, g = v(i, h, m), _ = i === "left" || i === "right" ? m : h, b = y(i, 36), C = i === "bottom" ? 58 : 54, w = [
|
|
62
|
+
"bold",
|
|
63
|
+
"italic",
|
|
64
|
+
"underline",
|
|
65
|
+
"strikethrough",
|
|
66
|
+
"math"
|
|
67
|
+
];
|
|
68
|
+
return /* @__PURE__ */ o(S, { children: /* @__PURE__ */ o("foreignObject", {
|
|
69
|
+
x: -(_ / 2),
|
|
70
|
+
y: b,
|
|
71
|
+
width: _,
|
|
72
|
+
height: C,
|
|
73
|
+
transform: g,
|
|
74
|
+
textAnchor: "middle",
|
|
75
|
+
children: /* @__PURE__ */ o(p, { children: /* @__PURE__ */ o(u, {
|
|
76
|
+
className: e({
|
|
77
|
+
[x.bottomLabel]: i === "bottom",
|
|
78
|
+
[x.disabledAxisLabel]: t
|
|
79
|
+
}, x.axisLabel),
|
|
80
|
+
markup: r || "",
|
|
81
|
+
onChange: s,
|
|
82
|
+
placeholder: !t && n,
|
|
83
|
+
toolbarOpts: {
|
|
84
|
+
position: i === "bottom" ? "top" : "bottom",
|
|
85
|
+
noPadding: !0,
|
|
86
|
+
noBorder: !0
|
|
87
|
+
},
|
|
88
|
+
activePlugins: w,
|
|
89
|
+
mathMlOptions: c
|
|
90
|
+
}) })
|
|
91
|
+
}) });
|
|
92
|
+
}
|
|
93
|
+
}, w = {
|
|
94
|
+
left: n.string,
|
|
95
|
+
top: n.string,
|
|
96
|
+
bottom: n.string,
|
|
97
|
+
right: n.string
|
|
98
|
+
};
|
|
99
|
+
(class extends t.Component {
|
|
100
|
+
static propTypes = {
|
|
101
|
+
disabledLabels: n.bool,
|
|
102
|
+
placeholders: n.object,
|
|
103
|
+
value: n.shape(w),
|
|
104
|
+
graphProps: n.object,
|
|
105
|
+
onChange: n.func,
|
|
106
|
+
mathMlOptions: n.object
|
|
107
|
+
};
|
|
108
|
+
onChangeLabel = (e, t) => {
|
|
109
|
+
let { value: n, onChange: r } = this.props;
|
|
110
|
+
r({
|
|
111
|
+
...n,
|
|
112
|
+
[t]: e
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
render() {
|
|
116
|
+
let { disabledLabels: e, placeholders: t = {}, value: n = {}, graphProps: r, mathMlOptions: i = {} } = this.props;
|
|
117
|
+
return /* @__PURE__ */ o(a, { children: [
|
|
118
|
+
"left",
|
|
119
|
+
"top",
|
|
120
|
+
"bottom",
|
|
121
|
+
"right"
|
|
122
|
+
].map((a) => /* @__PURE__ */ o(C, {
|
|
123
|
+
side: a,
|
|
124
|
+
text: n[a],
|
|
125
|
+
disabledLabel: e,
|
|
126
|
+
placeholder: t[a],
|
|
127
|
+
graphProps: r,
|
|
128
|
+
onChange: (e) => this.onChangeLabel(e, a),
|
|
129
|
+
mathMlOptions: i
|
|
130
|
+
}, a)) });
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
//#endregion
|
|
134
|
+
export { w as LabelType };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/graphing-solution-set/src/mark-label.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare const position: (graphProps: any, mark: any, rect: any) => string;
|
|
12
|
+
export declare const coordinates: (graphProps: any, mark: any, rect: any, position: any) => {
|
|
13
|
+
left: any;
|
|
14
|
+
top: any;
|
|
15
|
+
} | undefined;
|
|
16
|
+
export declare const MarkLabel: {
|
|
17
|
+
(props: any): React.JSX.Element;
|
|
18
|
+
propTypes: {
|
|
19
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
20
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
graphProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
|
+
scale: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
23
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
}>>>;
|
|
26
|
+
snap: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
27
|
+
x: PropTypes.Validator<(...args: any[]) => any>;
|
|
28
|
+
y: PropTypes.Validator<(...args: any[]) => any>;
|
|
29
|
+
}>>>;
|
|
30
|
+
domain: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
31
|
+
min: PropTypes.Validator<number>;
|
|
32
|
+
max: PropTypes.Validator<number>;
|
|
33
|
+
step: PropTypes.Requireable<number>;
|
|
34
|
+
}>>>;
|
|
35
|
+
range: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
36
|
+
min: PropTypes.Validator<number>;
|
|
37
|
+
max: PropTypes.Validator<number>;
|
|
38
|
+
step: PropTypes.Requireable<number>;
|
|
39
|
+
}>>>;
|
|
40
|
+
size: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
41
|
+
width: PropTypes.Validator<number>;
|
|
42
|
+
height: PropTypes.Validator<number>;
|
|
43
|
+
}>>>;
|
|
44
|
+
}>>;
|
|
45
|
+
inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
46
|
+
mark: PropTypes.Requireable<object>;
|
|
47
|
+
theme: PropTypes.Requireable<object>;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export default MarkLabel;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { AutosizeInput as e } from "./autosize-input.js";
|
|
2
|
+
import { useDebounce as t } from "./use-debounce.js";
|
|
3
|
+
import { useCallback as n, useEffect as r, useState as i } from "react";
|
|
4
|
+
import a from "prop-types";
|
|
5
|
+
import { types as o } from "@pie-lib/plot";
|
|
6
|
+
import { styled as s } from "@mui/material/styles";
|
|
7
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
8
|
+
import { color as l } from "@pie-lib/render-ui";
|
|
9
|
+
//#region src/mark-label.tsx
|
|
10
|
+
var u = s(e, { shouldForwardProp: (e) => !["disabled", "markDisabled"].includes(e) })(({ theme: e, disabled: t, markDisabled: n }) => ({ "& input": {
|
|
11
|
+
float: "right",
|
|
12
|
+
padding: e.spacing(.5),
|
|
13
|
+
fontFamily: e.typography.fontFamily,
|
|
14
|
+
fontSize: e.typography.fontSize,
|
|
15
|
+
border: `solid 1px ${t ? l.defaults.PRIMARY_DARK : n ? l.disabled() : l.defaults.SECONDARY}`,
|
|
16
|
+
borderRadius: "3px",
|
|
17
|
+
color: n ? l.disabled() : l.defaults.PRIMARY_DARK,
|
|
18
|
+
background: t || n ? e.palette.background.paper : "transparent"
|
|
19
|
+
} })), d = (e, t, n) => {
|
|
20
|
+
n ||= {
|
|
21
|
+
width: 0,
|
|
22
|
+
height: 0
|
|
23
|
+
};
|
|
24
|
+
let { scale: r, domain: i, range: a } = e, o = r.x(t.x) + n.width + 10, s = r.y(t.y) + n.height + 10, c = o >= r.x(i.max) ? "left" : "right";
|
|
25
|
+
return `${s >= r.y(a.min) ? "top" : "bottom"}-${c}`;
|
|
26
|
+
}, f = (e, t, n, r) => {
|
|
27
|
+
let { scale: i } = e;
|
|
28
|
+
switch (n ||= {
|
|
29
|
+
width: 0,
|
|
30
|
+
height: 0
|
|
31
|
+
}, r) {
|
|
32
|
+
case "bottom-right": return {
|
|
33
|
+
left: i.x(t.x) + 10,
|
|
34
|
+
top: i.y(t.y) + 10
|
|
35
|
+
};
|
|
36
|
+
case "bottom-left": return {
|
|
37
|
+
left: i.x(t.x) - 10 - n.width,
|
|
38
|
+
top: i.y(t.y) + 10
|
|
39
|
+
};
|
|
40
|
+
case "top-left": return {
|
|
41
|
+
left: i.x(t.x) - 10 - n.width,
|
|
42
|
+
top: i.y(t.y) - 10 - n.height
|
|
43
|
+
};
|
|
44
|
+
case "top-right": return {
|
|
45
|
+
left: i.x(t.x) + 10,
|
|
46
|
+
top: i.y(t.y) - 10 - n.height
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}, p = (e) => {
|
|
50
|
+
let [a, o] = i(null), s = n((e) => o(e)), { mark: l, graphProps: p, disabled: m, inputRef: h } = e, [g, _] = i(l.label), v = (e) => _(e.target.value), y = t(g, 200);
|
|
51
|
+
r(() => {
|
|
52
|
+
_(l.label);
|
|
53
|
+
}, [l.label]), r(() => {
|
|
54
|
+
typeof y == "string" && y !== l.label && e.onChange(y);
|
|
55
|
+
}, [y]);
|
|
56
|
+
let b = a ? a.getBoundingClientRect() : {
|
|
57
|
+
width: 0,
|
|
58
|
+
height: 0
|
|
59
|
+
}, x = {
|
|
60
|
+
position: "fixed",
|
|
61
|
+
pointerEvents: "auto",
|
|
62
|
+
...f(p, l, b, d(p, l, b))
|
|
63
|
+
};
|
|
64
|
+
return /* @__PURE__ */ c(u, {
|
|
65
|
+
inputRef: (e) => {
|
|
66
|
+
s(e), h(e);
|
|
67
|
+
},
|
|
68
|
+
disabled: m || l.disabled,
|
|
69
|
+
markDisabled: l.disabled,
|
|
70
|
+
value: g,
|
|
71
|
+
style: x,
|
|
72
|
+
onChange: v
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
p.propTypes = {
|
|
76
|
+
disabled: a.bool,
|
|
77
|
+
onChange: a.func,
|
|
78
|
+
graphProps: o.GraphPropsType,
|
|
79
|
+
inputRef: a.func,
|
|
80
|
+
mark: a.object,
|
|
81
|
+
theme: a.object
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
export { p as default };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
+
import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
4
|
+
import r from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/coerceNumber.js";
|
|
5
|
+
import i from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/getTicks.js";
|
|
6
|
+
import a from "../constants/orientation.js";
|
|
7
|
+
import o from "./AxisRenderer.js";
|
|
8
|
+
import s from "../utils/getTickPosition.js";
|
|
9
|
+
import c from "../utils/getTickFormatter.js";
|
|
10
|
+
import l from "../utils/createPoint.js";
|
|
11
|
+
import u from "../utils/getAxisRangePaddingConfig.js";
|
|
12
|
+
import d from "react";
|
|
13
|
+
import "prop-types";
|
|
14
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Axis.js
|
|
15
|
+
var f = /* @__PURE__ */ e(t()), p = [
|
|
16
|
+
"children",
|
|
17
|
+
"axisClassName",
|
|
18
|
+
"hideAxisLine",
|
|
19
|
+
"hideTicks",
|
|
20
|
+
"hideZero",
|
|
21
|
+
"innerRef",
|
|
22
|
+
"left",
|
|
23
|
+
"numTicks",
|
|
24
|
+
"orientation",
|
|
25
|
+
"rangePadding",
|
|
26
|
+
"scale",
|
|
27
|
+
"tickFormat",
|
|
28
|
+
"tickLength",
|
|
29
|
+
"tickValues",
|
|
30
|
+
"top"
|
|
31
|
+
];
|
|
32
|
+
function m() {
|
|
33
|
+
return m = Object.assign ? Object.assign.bind() : function(e) {
|
|
34
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
35
|
+
var n = arguments[t];
|
|
36
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
37
|
+
}
|
|
38
|
+
return e;
|
|
39
|
+
}, m.apply(this, arguments);
|
|
40
|
+
}
|
|
41
|
+
function h(e, t) {
|
|
42
|
+
if (e == null) return {};
|
|
43
|
+
var n = {}, r = Object.keys(e), i, a;
|
|
44
|
+
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
45
|
+
return n;
|
|
46
|
+
}
|
|
47
|
+
function g(e) {
|
|
48
|
+
var t = e.children, g = t === void 0 ? o : t, _ = e.axisClassName, v = e.hideAxisLine, y = v === void 0 ? !1 : v, b = e.hideTicks, x = b === void 0 ? !1 : b, S = e.hideZero, C = S === void 0 ? !1 : S, w = e.innerRef, T = e.left, E = T === void 0 ? 0 : T, D = e.numTicks, O = D === void 0 ? 10 : D, k = e.orientation, A = k === void 0 ? a.bottom : k, j = e.rangePadding, M = j === void 0 ? 0 : j, N = e.scale, P = e.tickFormat, F = e.tickLength, I = F === void 0 ? 8 : F, L = e.tickValues, R = e.top, z = R === void 0 ? 0 : R, B = h(e, p), V = P ?? c(N), H = A === a.left, U = A === a.top, W = U || A === a.bottom, G = s(N), K = H || U ? -1 : 1, q = N.range(), J = u(M), Y = l({
|
|
49
|
+
x: Number(q[0]) + .5 - J.start,
|
|
50
|
+
y: 0
|
|
51
|
+
}, W), X = l({
|
|
52
|
+
x: Number(q[q.length - 1]) + .5 + J.end,
|
|
53
|
+
y: 0
|
|
54
|
+
}, W), Z = (L ?? i(N, O)).filter(function(e) {
|
|
55
|
+
return !C || e !== 0 && e !== "0";
|
|
56
|
+
}).map(function(e, t) {
|
|
57
|
+
return {
|
|
58
|
+
value: e,
|
|
59
|
+
index: t
|
|
60
|
+
};
|
|
61
|
+
}), Q = Z.map(function(e) {
|
|
62
|
+
var t = e.value, n = e.index, i = r(G(t));
|
|
63
|
+
return {
|
|
64
|
+
value: t,
|
|
65
|
+
index: n,
|
|
66
|
+
from: l({
|
|
67
|
+
x: i,
|
|
68
|
+
y: 0
|
|
69
|
+
}, W),
|
|
70
|
+
to: l({
|
|
71
|
+
x: i,
|
|
72
|
+
y: I * K
|
|
73
|
+
}, W),
|
|
74
|
+
formattedValue: V(t, n, Z)
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
return /*#__PURE__*/ d.createElement(n, {
|
|
78
|
+
className: (0, f.default)("visx-axis", _),
|
|
79
|
+
innerRef: w,
|
|
80
|
+
top: z,
|
|
81
|
+
left: E
|
|
82
|
+
}, g(m({}, B, {
|
|
83
|
+
axisFromPoint: Y,
|
|
84
|
+
axisToPoint: X,
|
|
85
|
+
hideAxisLine: y,
|
|
86
|
+
hideTicks: x,
|
|
87
|
+
hideZero: C,
|
|
88
|
+
horizontal: W,
|
|
89
|
+
numTicks: O,
|
|
90
|
+
orientation: A,
|
|
91
|
+
rangePadding: M,
|
|
92
|
+
scale: N,
|
|
93
|
+
tickFormat: V,
|
|
94
|
+
tickLength: I,
|
|
95
|
+
tickPosition: G,
|
|
96
|
+
tickSign: K,
|
|
97
|
+
ticks: Q
|
|
98
|
+
})));
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
export { g as default };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
+
import n from "../../../../../../@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js";
|
|
4
|
+
import r from "../../../../../../@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js";
|
|
5
|
+
import i from "../constants/orientation.js";
|
|
6
|
+
import a from "../utils/getLabelTransform.js";
|
|
7
|
+
import o from "./Ticks.js";
|
|
8
|
+
import s from "react";
|
|
9
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/AxisRenderer.js
|
|
10
|
+
var c = /* @__PURE__ */ e(t());
|
|
11
|
+
function l() {
|
|
12
|
+
return l = Object.assign ? Object.assign.bind() : function(e) {
|
|
13
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
14
|
+
var n = arguments[t];
|
|
15
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
16
|
+
}
|
|
17
|
+
return e;
|
|
18
|
+
}, l.apply(this, arguments);
|
|
19
|
+
}
|
|
20
|
+
var u = {
|
|
21
|
+
textAnchor: "middle",
|
|
22
|
+
fontFamily: "Arial",
|
|
23
|
+
fontSize: 10,
|
|
24
|
+
fill: "#222"
|
|
25
|
+
};
|
|
26
|
+
function d(e) {
|
|
27
|
+
var t = e.axisFromPoint, d = e.axisLineClassName, f = e.axisToPoint, p = e.hideAxisLine, m = e.hideTicks, h = e.horizontal, g = e.label, _ = g === void 0 ? "" : g, v = e.labelClassName, y = e.labelOffset, b = y === void 0 ? 14 : y, x = e.labelProps, S = e.orientation, C = S === void 0 ? i.bottom : S, w = e.scale, T = e.stroke, E = T === void 0 ? "#222" : T, D = e.strokeDasharray, O = e.strokeWidth, k = O === void 0 ? 1 : O, A = e.tickClassName, j = e.tickComponent, M = e.tickLineProps, N = e.tickLabelProps, P = e.tickLength, F = P === void 0 ? 8 : P, I = e.tickStroke, L = I === void 0 ? "#222" : I, R = e.tickTransform, z = e.ticks, B = e.ticksComponent, V = B === void 0 ? o : B, H = l({}, u, x), U = l({}, u, typeof N == "object" ? N : null), W = z.map(function(e) {
|
|
28
|
+
var t = e.value, n = e.index;
|
|
29
|
+
return typeof N == "function" ? N(t, n, z) : U;
|
|
30
|
+
}), G = Math.max.apply(Math, [10].concat(W.map(function(e) {
|
|
31
|
+
return typeof e.fontSize == "number" ? e.fontSize : 0;
|
|
32
|
+
})));
|
|
33
|
+
return /*#__PURE__*/ s.createElement(s.Fragment, null, V({
|
|
34
|
+
hideTicks: m,
|
|
35
|
+
horizontal: h,
|
|
36
|
+
orientation: C,
|
|
37
|
+
scale: w,
|
|
38
|
+
tickClassName: A,
|
|
39
|
+
tickComponent: j,
|
|
40
|
+
tickLabelProps: W,
|
|
41
|
+
tickStroke: L,
|
|
42
|
+
tickTransform: R,
|
|
43
|
+
ticks: z,
|
|
44
|
+
strokeWidth: k,
|
|
45
|
+
tickLineProps: M
|
|
46
|
+
}), !p && /*#__PURE__*/ s.createElement(n, {
|
|
47
|
+
className: (0, c.default)("visx-axis-line", d),
|
|
48
|
+
from: t,
|
|
49
|
+
to: f,
|
|
50
|
+
stroke: E,
|
|
51
|
+
strokeWidth: k,
|
|
52
|
+
strokeDasharray: D
|
|
53
|
+
}), _ && /*#__PURE__*/ s.createElement(r, l({ className: (0, c.default)("visx-axis-label", v) }, a({
|
|
54
|
+
labelOffset: b,
|
|
55
|
+
labelProps: H,
|
|
56
|
+
orientation: C,
|
|
57
|
+
range: w.range(),
|
|
58
|
+
tickLabelFontSize: G,
|
|
59
|
+
tickLength: F
|
|
60
|
+
}), H), _));
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { d as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { __toESM as e } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_classnames as t } from "../../../../../../classnames@2.5.1/node_modules/classnames/index.js";
|
|
3
|
+
import n from "../../../../../../@visx_group@3.12.0_f4eacebf2041cd4f/node_modules/@visx/group/esm/Group.js";
|
|
4
|
+
import r from "../../../../../../@visx_shape@3.12.0_f4eacebf2041cd4f/node_modules/@visx/shape/esm/shapes/Line.js";
|
|
5
|
+
import i from "../../../../../../@visx_text@3.12.0_f4eacebf2041cd4f/node_modules/@visx/text/esm/Text.js";
|
|
6
|
+
import a from "../constants/orientation.js";
|
|
7
|
+
import o from "react";
|
|
8
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/axis/Ticks.js
|
|
9
|
+
var s = /* @__PURE__ */ e(t());
|
|
10
|
+
function c() {
|
|
11
|
+
return c = Object.assign ? Object.assign.bind() : function(e) {
|
|
12
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
13
|
+
var n = arguments[t];
|
|
14
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
17
|
+
}, c.apply(this, arguments);
|
|
18
|
+
}
|
|
19
|
+
function l(e) {
|
|
20
|
+
var t = e.hideTicks, l = e.horizontal, u = e.orientation, d = e.tickClassName, f = e.tickComponent, p = e.tickLabelProps, m = e.tickStroke, h = m === void 0 ? "#222" : m, g = e.tickTransform, _ = e.ticks, v = e.strokeWidth, y = e.tickLineProps;
|
|
21
|
+
return _.map(function(e) {
|
|
22
|
+
var m = e.value, _ = e.index, b = e.from, x = e.to, S = e.formattedValue, C = p[_] ?? {}, w = Math.max(10, typeof C.fontSize == "number" && C.fontSize || 0), T = x.y + (l && u !== a.top ? w : 0);
|
|
23
|
+
return /*#__PURE__*/ o.createElement(n, {
|
|
24
|
+
key: "visx-tick-" + m + "-" + _,
|
|
25
|
+
className: (0, s.default)("visx-axis-tick", d),
|
|
26
|
+
transform: g
|
|
27
|
+
}, !t && /*#__PURE__*/ o.createElement(r, c({
|
|
28
|
+
from: b,
|
|
29
|
+
to: x,
|
|
30
|
+
stroke: h,
|
|
31
|
+
strokeWidth: v,
|
|
32
|
+
strokeLinecap: "square"
|
|
33
|
+
}, y)), f ? f(c({}, C, {
|
|
34
|
+
x: x.x,
|
|
35
|
+
y: T,
|
|
36
|
+
formattedValue: S
|
|
37
|
+
})) : /*#__PURE__*/ o.createElement(i, c({
|
|
38
|
+
x: x.x,
|
|
39
|
+
y: T
|
|
40
|
+
}, C), S));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { l as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Point as e } from "../../../../../../@visx_point@3.12.0/node_modules/@visx/point/esm/Point.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/createPoint.js
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
var r = t.x, i = t.y;
|
|
5
|
+
return new e(n ? {
|
|
6
|
+
x: r,
|
|
7
|
+
y: i
|
|
8
|
+
} : {
|
|
9
|
+
x: i,
|
|
10
|
+
y: r
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { t as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getAxisRangePaddingConfig.js
|
|
2
|
+
function e() {
|
|
3
|
+
return e = Object.assign ? Object.assign.bind() : function(e) {
|
|
4
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
5
|
+
var n = arguments[t];
|
|
6
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
7
|
+
}
|
|
8
|
+
return e;
|
|
9
|
+
}, e.apply(this, arguments);
|
|
10
|
+
}
|
|
11
|
+
function t(t) {
|
|
12
|
+
return t === void 0 && (t = 0), typeof t == "number" ? {
|
|
13
|
+
start: t,
|
|
14
|
+
end: t
|
|
15
|
+
} : e({
|
|
16
|
+
start: 0,
|
|
17
|
+
end: 0
|
|
18
|
+
}, t);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { t as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from "../constants/orientation.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getLabelTransform.js
|
|
3
|
+
function t(t) {
|
|
4
|
+
var n = t.labelOffset, r = t.labelProps, i = t.orientation, a = t.range, o = t.tickLabelFontSize, s = t.tickLength, c = i === e.left || i === e.top ? -1 : 1, l, u, d;
|
|
5
|
+
if (i === e.top || i === e.bottom) {
|
|
6
|
+
var f = i === e.bottom && typeof r.fontSize == "number" ? r.fontSize : 0;
|
|
7
|
+
l = (Number(a[0]) + Number(a[a.length - 1])) / 2, u = c * (s + n + o + f);
|
|
8
|
+
} else l = c * ((Number(a[0]) + Number(a[a.length - 1])) / 2), u = -(s + n), d = "rotate(" + c * 90 + ")";
|
|
9
|
+
return {
|
|
10
|
+
x: l,
|
|
11
|
+
y: u,
|
|
12
|
+
transform: d
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from "../../../../../../@visx_scale@3.12.0/node_modules/@visx/scale/esm/utils/toString.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickFormatter.js
|
|
3
|
+
function t(t) {
|
|
4
|
+
var n = t;
|
|
5
|
+
return "tickFormat" in n ? n.tickFormat() : e;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region ../../../node_modules/.bun/@visx+axis@3.12.0+f4eacebf2041cd4f/node_modules/@visx/axis/esm/utils/getTickPosition.js
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
t === void 0 && (t = "center");
|
|
4
|
+
var n = e;
|
|
5
|
+
if (t !== "start" && "bandwidth" in n) {
|
|
6
|
+
var r = n.bandwidth();
|
|
7
|
+
return t === "center" && (r /= 2), n.round() && (r = Math.round(r)), function(e) {
|
|
8
|
+
var t = n(e);
|
|
9
|
+
return typeof t == "number" ? t + r : t;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return e;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { e as default };
|