react-minimal-pie-chart 9.1.2 → 9.1.3

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/README.md CHANGED
@@ -196,6 +196,14 @@ Please consider that [`Math.sign`](https://developer.mozilla.org/en-US/docs/Web/
196
196
 
197
197
  ## Misc
198
198
 
199
+ ### Dry-run the release
200
+
201
+ Validate that a release would succeed without publishing anything to npm:
202
+
203
+ - Open [`Actions > Release (dry run)`](https://github.com/toomuchdesign/react-minimal-pie-chart/actions/workflows/release-dry-run.yml) and click `Run workflow`
204
+
205
+ It runs `changeset publish-plan` (which packages/versions would be published) and `npm publish --dry-run` (builds and inspects the tarball contents). Neither command authenticates or uploads to npm.
206
+
199
207
  ### How svg arc paths work?
200
208
 
201
209
  - http://xahlee.info/js/svg_circle_arc.html
package/dist/index.cjs.js CHANGED
@@ -154,12 +154,12 @@ function ReactMinimalPieChartPath({ cx, cy, lengthAngle, lineWidth, radius, shif
154
154
  // Animate/hide paths with "stroke-dasharray" + "stroke-dashoffset"
155
155
  // https://css-tricks.com/svg-line-animation-works/
156
156
  if (isNumber(reveal)) {
157
- const pathLength = degreesToRadians(pathRadius) * lengthAngle;
157
+ const pathLength = pathRadius * degreesToRadians(lengthAngle);
158
158
  strokeDasharray = Math.abs(pathLength);
159
159
  strokeDashoffset =
160
160
  strokeDasharray - extractPercentage(strokeDasharray, reveal);
161
161
  }
162
- return (React.createElement("path", { d: pathCommands, fill: "none", strokeWidth: lineWidth, strokeDasharray: strokeDasharray, strokeDashoffset: strokeDashoffset, strokeLinecap: rounded ? 'round' : undefined, ...props }, title && React.createElement("title", null, title)));
162
+ return (React.createElement("path", { d: pathCommands, fill: "none", strokeWidth: lineWidth, strokeDasharray: strokeDasharray, strokeDashoffset: strokeDashoffset, strokeLinecap: rounded ? 'round' : undefined, ...props }, title != null && React.createElement("title", null, title)));
163
163
  }
164
164
 
165
165
  function combineSegmentTransitionsStyle(duration, easing, customStyle) {
package/dist/index.esm.js CHANGED
@@ -152,12 +152,12 @@ function ReactMinimalPieChartPath({ cx, cy, lengthAngle, lineWidth, radius, shif
152
152
  // Animate/hide paths with "stroke-dasharray" + "stroke-dashoffset"
153
153
  // https://css-tricks.com/svg-line-animation-works/
154
154
  if (isNumber(reveal)) {
155
- const pathLength = degreesToRadians(pathRadius) * lengthAngle;
155
+ const pathLength = pathRadius * degreesToRadians(lengthAngle);
156
156
  strokeDasharray = Math.abs(pathLength);
157
157
  strokeDashoffset =
158
158
  strokeDasharray - extractPercentage(strokeDasharray, reveal);
159
159
  }
160
- return (React.createElement("path", { d: pathCommands, fill: "none", strokeWidth: lineWidth, strokeDasharray: strokeDasharray, strokeDashoffset: strokeDashoffset, strokeLinecap: rounded ? 'round' : undefined, ...props }, title && React.createElement("title", null, title)));
160
+ return (React.createElement("path", { d: pathCommands, fill: "none", strokeWidth: lineWidth, strokeDasharray: strokeDasharray, strokeDashoffset: strokeDashoffset, strokeLinecap: rounded ? 'round' : undefined, ...props }, title != null && React.createElement("title", null, title)));
161
161
  }
162
162
 
163
163
  function combineSegmentTransitionsStyle(duration, easing, customStyle) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-minimal-pie-chart",
3
- "version": "9.1.2",
3
+ "version": "9.1.3",
4
4
  "description": "Lightweight but versatile SVG pie/donut charts for React",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -24,9 +24,6 @@
24
24
  "build:types": "tsc -p tsconfig.build.json",
25
25
  "format:check": "prettier . --check",
26
26
  "format:fix": "npm run format:check -- --write",
27
- "preversion": "npm run prepare",
28
- "version": "git add package.json",
29
- "postversion": "git push && git push --tags",
30
27
  "prepare": "npx simple-git-hooks && npm run test:source && npm run test -- --run && npm run build && npm run test:bundles",
31
28
  "release": "npm run prepare && npx changeset publish",
32
29
  "start": "storybook dev",
@@ -54,11 +51,11 @@
54
51
  "react-dom": "^16.8.0 || ^17 || ^18 || ^19"
55
52
  },
56
53
  "devDependencies": {
57
- "@changesets/changelog-github": "^0.5.1",
58
- "@changesets/cli": "^2.27.9",
54
+ "@changesets/changelog-github": "^1.0.1",
55
+ "@changesets/cli": "^3.0.3",
59
56
  "@rollup/plugin-typescript": "^12.1.1",
60
57
  "@schwingbat/relative-angle": "^1.0.0",
61
- "@size-limit/preset-small-lib": "^11.1.4",
58
+ "@size-limit/preset-small-lib": "^12.0.0",
62
59
  "@storybook/addon-essentials": "^8.1.6",
63
60
  "@storybook/react": "^8.1.6",
64
61
  "@storybook/react-vite": "^8.1.6",
@@ -70,19 +67,19 @@
70
67
  "@types/react": "^19.0.0",
71
68
  "@types/react-dom": "^19.0.0",
72
69
  "@types/svg-path-parser": "^1.1.6",
73
- "@vitest/coverage-v8": "^3.0.1",
74
- "jsdom": "^26.0.0",
70
+ "@vitest/coverage-v8": "^4.0.1",
71
+ "jsdom": "^29.0.1",
75
72
  "prettier": "^3.2.5",
76
73
  "react": "^19.0.0",
77
74
  "react-dom": "^19.0.0",
78
75
  "react-tooltip": "^4.5.1",
79
76
  "rollup": "^4.18.0",
80
77
  "simple-git-hooks": "^2.11.1",
81
- "size-limit": "^11.1.4",
78
+ "size-limit": "^12.0.0",
82
79
  "storybook": "^8.1.6",
83
80
  "svg-path-parser": "^1.1.0",
84
81
  "typescript": "^5.4.5",
85
- "vitest": "^3.0.1"
82
+ "vitest": "^4.0.1"
86
83
  },
87
84
  "size-limit": [
88
85
  {