@pie-lib/graphing 2.4.8 → 2.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.4.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.8...@pie-lib/graphing@2.4.9) (2022-02-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-lib/graphing
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [2.4.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/graphing@2.4.7...@pie-lib/graphing@2.4.8) (2022-02-03)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-lib/graphing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/tools/line/component.jsx"],"names":["markerId","lineStyles","theme","line","styles","enabledArrow","arrow","disabledArrow","disabled","correct","correctArrow","incorrect","incorrectArrow","ArrowedLine","props","className","classes","correctness","graphProps","from","to","rest","scale","domain","range","trig","edges","eFrom","eTo","suffix","x","y","propTypes","PropTypes","string","object","bool","types","GraphPropsType","PointType","StyledArrowedLine","Line","Component"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;
|
|
1
|
+
{"version":3,"sources":["../../../src/tools/line/component.jsx"],"names":["markerId","lineStyles","theme","line","styles","enabledArrow","arrow","disabledArrow","disabled","correct","correctArrow","incorrect","incorrectArrow","ArrowedLine","props","className","classes","correctness","graphProps","from","to","rest","scale","domain","range","trig","edges","eFrom","eTo","suffix","x","y","propTypes","PropTypes","string","object","bool","types","GraphPropsType","PointType","StyledArrowedLine","Line","Component"],"mappings":";;;;;;;AAAA;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AAwB;AACtBjB,EAAAA,SAAS,EAAEkB,sBAAUC,MADC;AAEtBlB,EAAAA,OAAO,EAAEiB,sBAAUE,MAFG;AAGtBlB,EAAAA,WAAW,EAAEgB,sBAAUC,MAHD;AAItB1B,EAAAA,QAAQ,EAAEyB,sBAAUG,IAJE;AAKtBlB,EAAAA,UAAU,EAAEmB,YAAMC,cALI;AAMtBnB,EAAAA,IAAI,EAAEkB,YAAME,SANU;AAOtBnB,EAAAA,EAAE,EAAEiB,YAAME,SAPY;AAQtBvC,EAAAA,QAAQ,EAAEiC,sBAAUC;AARE,CAAxB;AAWA,IAAMM,iBAAiB,GAAG,wBAAWvC,UAAX,EAAuBY,WAAvB,CAA1B;AAEA,IAAM4B,IAAI,GAAG,oBAASD,iBAAT,CAAb;AACA,IAAME,SAAS,GAAG,6BAAkBD,IAAlB,CAAlB;eAEeC,S","sourcesContent":["import { lineToolComponent, lineBase, styles } from '../shared/line';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { trig, types } from '@pie-lib/plot';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport { ArrowMarker, genUid } from '../shared/arrow-head';\nimport { thinnerShapesNeeded, getAdjustedGraphLimits } from '../../utils';\n\nconst markerId = genUid();\n\nconst lineStyles = theme => ({\n line: styles.line(theme),\n enabledArrow: styles.arrow(theme),\n disabledArrow: styles.disabledArrow(theme),\n disabled: styles.disabled(theme),\n correct: styles.correct(theme, 'stroke'),\n correctArrow: styles.correct(theme),\n incorrect: styles.incorrect(theme, 'stroke'),\n incorrectArrow: styles.incorrect(theme)\n});\n\nexport const ArrowedLine = props => {\n const { className, classes, correctness, disabled, graphProps, from, to, ...rest } = props;\n const { scale } = graphProps;\n const { domain, range } = getAdjustedGraphLimits(graphProps);\n const [eFrom, eTo] = trig.edges(domain, range)(from, to);\n const suffix = correctness || (disabled && 'disabled') || 'enabled';\n\n return (\n <g>\n <defs>\n <ArrowMarker\n size={thinnerShapesNeeded(graphProps) ? 4 : 5}\n id={`${props.markerId || markerId}-${suffix}`}\n className={classNames(classes[`${suffix}Arrow`])}\n />\n </defs>\n <line\n x1={scale.x(eFrom.x)}\n y1={scale.y(eFrom.y)}\n x2={scale.x(eTo.x)}\n y2={scale.y(eTo.y)}\n className={classNames(\n classes.line,\n disabled && classes.disabled,\n classes[correctness],\n className\n )}\n markerEnd={`url(#${props.markerId || markerId}-${suffix})`}\n markerStart={`url(#${props.markerId || markerId}-${suffix})`}\n {...rest}\n />\n </g>\n );\n};\n\nArrowedLine.propTypes = {\n className: PropTypes.string,\n classes: PropTypes.object,\n correctness: PropTypes.string,\n disabled: PropTypes.bool,\n graphProps: types.GraphPropsType,\n from: types.PointType,\n to: types.PointType,\n markerId: PropTypes.string\n};\n\nconst StyledArrowedLine = withStyles(lineStyles)(ArrowedLine);\n\nconst Line = lineBase(StyledArrowedLine);\nconst Component = lineToolComponent(Line);\n\nexport default Component;\n"],"file":"component.js"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.4.
|
|
6
|
+
"version": "2.4.9",
|
|
7
7
|
"description": "Graphing components",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"react",
|
|
@@ -43,6 +43,6 @@
|
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": "^16.8.1"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "8c254f4c516c9f4e67109accdb2ad415e1f6cea4",
|
|
47
47
|
"scripts": {}
|
|
48
48
|
}
|
|
@@ -5,7 +5,6 @@ import { trig, types } from '@pie-lib/plot';
|
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { withStyles } from '@material-ui/core/styles';
|
|
7
7
|
import { ArrowMarker, genUid } from '../shared/arrow-head';
|
|
8
|
-
|
|
9
8
|
import { thinnerShapesNeeded, getAdjustedGraphLimits } from '../../utils';
|
|
10
9
|
|
|
11
10
|
const markerId = genUid();
|