Skip to content

Commit 2ddbdab

Browse files
authored
ProgressDonut: properly fix the render AND hydration issue (#454)
1 parent dd8f712 commit 2ddbdab

File tree

7 files changed

+429
-408
lines changed

7 files changed

+429
-408
lines changed

.changeset/gentle-beds-push.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ngrok/mantle": patch
3+
---
4+
5+
ProgressDonut: properly fix the render AND hydration issue

apps/www/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@react-router/fs-routes": "7.2.0",
2222
"@react-router/node": "7.2.0",
2323
"@react-router/serve": "7.2.0",
24-
"@vercel/react-router": "1.0.2",
24+
"@vercel/react-router": "1.1.0",
2525
"isbot": "5.1.23",
2626
"prismjs": "1.29.0",
2727
"react": "18.3.1",
@@ -34,16 +34,16 @@
3434
"@cfg/tsconfig": "workspace:*",
3535
"@commander-js/extra-typings": "13.1.0",
3636
"@react-router/dev": "7.2.0",
37-
"@types/node": "22.13.4",
37+
"@types/node": "22.13.9",
3838
"@types/prismjs": "1.26.5",
3939
"@types/react": "18.3.18",
4040
"@types/react-dom": "18.3.5",
4141
"commander": "13.1.0",
4242
"postcss": "8.5.3",
43-
"react-router-devtools": "1.1.5",
43+
"react-router-devtools": "1.1.6",
4444
"tailwindcss": "3.4.17",
45-
"typescript": "5.7.3",
46-
"vite": "6.1.1",
45+
"typescript": "5.8.2",
46+
"vite": "6.2.0",
4747
"vite-tsconfig-paths": "5.1.4"
4848
}
4949
}

config/tsconfig/tsconfig.base.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@
33
"display": "Default",
44
"compilerOptions": {
55
/* Base Options: */
6+
"allowJs": true,
7+
"erasableSyntaxOnly": true,
68
"esModuleInterop": true,
9+
"isolatedModules": true,
10+
"moduleDetection": "force",
11+
"resolveJsonModule": true,
712
"skipLibCheck": true,
813
"target": "ES2022",
9-
"allowJs": true,
10-
"resolveJsonModule": true,
11-
"moduleDetection": "force",
12-
"isolatedModules": true,
1314
"verbatimModuleSyntax": true,
1415

1516
/* Strictness */
1617
"strict": true,
17-
"noUncheckedIndexedAccess": true,
1818
"noImplicitOverride": true,
19+
"noUncheckedIndexedAccess": true,
1920
"noUncheckedSideEffectImports": true,
2021
}
2122
}

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"name": "mantle",
44
"license": "MIT",
5-
"packageManager": "pnpm@10.4.1",
5+
"packageManager": "pnpm@10.5.2",
66
"type": "module",
77
"engines": {
88
"node": "^22.0.0"
@@ -31,9 +31,9 @@
3131
"devDependencies": {
3232
"@biomejs/biome": "1.9.4",
3333
"@changesets/changelog-github": "0.5.1",
34-
"@changesets/cli": "2.28.0",
35-
"turbo": "2.4.2",
36-
"vitest": "3.0.6"
34+
"@changesets/cli": "2.28.1",
35+
"turbo": "2.4.4",
36+
"vitest": "3.0.7"
3737
},
3838
"pnpm": {
3939
"overrides": {

packages/mantle/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"clsx": "2.1.1",
5353
"prismjs": "1.29.0",
5454
"react-day-picker": "8.10.1",
55-
"sonner": "2.0.0",
55+
"sonner": "2.0.1",
5656
"tailwind-merge": "2.6.0",
5757
"tailwindcss-animate": "1.0.7",
5858
"tiny-invariant": "1.3.3"
@@ -64,7 +64,7 @@
6464
"@testing-library/jest-dom": "6.6.3",
6565
"@testing-library/react": "16.2.0",
6666
"@testing-library/user-event": "14.6.1",
67-
"@types/node": "22.13.4",
67+
"@types/node": "22.13.9",
6868
"@types/prismjs": "1.26.5",
6969
"@types/react": "18.3.18",
7070
"@types/react-dom": "18.3.5",
@@ -78,8 +78,8 @@
7878
"react-dom": "18.3.1",
7979
"react-router": "7.2.0",
8080
"tailwindcss": "3.4.17",
81-
"tsup": "8.3.6",
82-
"typescript": "5.7.3",
81+
"tsup": "8.4.0",
82+
"typescript": "5.8.2",
8383
"zod": "3.24.2"
8484
},
8585
"peerDependencies": {

packages/mantle/src/components/progress/progress-donut.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ const ProgressDonutIndicator = ({
180180
</defs>
181181
)}
182182
<circle
183-
className="[r:var(--radius)]"
183+
className={clsx(
184+
"[r:var(--radius)]", // set the circle radius to be the value of the calc'd CSS variable set on the style
185+
"origin-center",
186+
)}
184187
cx="50%"
185188
cy="50%"
186189
fill="transparent"
@@ -193,7 +196,6 @@ const ProgressDonutIndicator = ({
193196
strokeLinecap="round"
194197
strokeWidth={strokeWidthPx}
195198
style={{ "--radius": radius } as CSSProperties}
196-
{...{ transformOrigin: "center" as const }}
197199
transform="rotate(-90)" // rotate -90 degrees so it starts from the top
198200
/>
199201
</g>

0 commit comments

Comments
 (0)