Skip to content

Commit f70a2aa

Browse files
authored
Disable flashing when navigating between sections (#3705)
1 parent 56e46ce commit f70a2aa

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"micromark-extension-gfm": "^3.0.0",
146146
"motion": "^12.23.12",
147147
"next": "15.4.0",
148-
"next-themes": "^0.2.1",
148+
"next-themes": "^0.4.6",
149149
"nuqs": "^2.2.3",
150150
"object-hash": "^3.0.0",
151151
"object-identity": "^0.1.2",
@@ -2454,7 +2454,7 @@
24542454

24552455
"next": ["next@15.4.0", "", { "dependencies": { "@next/env": "15.4.0-canary.57", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.4.0", "@next/swc-darwin-x64": "15.4.0", "@next/swc-linux-arm64-gnu": "15.4.0", "@next/swc-linux-arm64-musl": "15.4.0", "@next/swc-linux-x64-gnu": "15.4.0", "@next/swc-linux-x64-musl": "15.4.0", "@next/swc-win32-arm64-msvc": "15.4.0", "@next/swc-win32-x64-msvc": "15.4.0", "sharp": "^0.34.1" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-9JfEyg23carbb/AxUylRQh4zVN4dt1af9aJ+L3CFl/LKQIQkWUWN44YhB9M5JhxMjleF6rkfNOD7IqDcsb6zyQ=="],
24562456

2457-
"next-themes": ["next-themes@0.2.1", "", { "peerDependencies": { "next": "*", "react": "*", "react-dom": "*" } }, "sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A=="],
2457+
"next-themes": ["next-themes@0.4.6", "", { "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA=="],
24582458

24592459
"next-tick": ["next-tick@1.1.0", "", {}, "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="],
24602460

packages/gitbook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"micromark-extension-gfm": "^3.0.0",
5252
"motion": "^12.23.12",
5353
"next": "15.4.0",
54-
"next-themes": "^0.2.1",
54+
"next-themes": "^0.4.6",
5555
"nuqs": "^2.2.3",
5656
"object-hash": "^3.0.0",
5757
"object-identity": "^0.1.2",

packages/gitbook/src/components/SiteLayout/SiteLayoutClientContexts.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@ export function SiteLayoutClientContexts(props: {
2222
useClearRouterCache(contextId);
2323

2424
return (
25-
<NuqsAdapter>
26-
<ThemeProvider attribute="class" enableSystem forcedTheme={forcedTheme}>
25+
<ThemeProvider
26+
attribute="class"
27+
disableTransitionOnChange
28+
enableSystem
29+
forcedTheme={forcedTheme}
30+
>
31+
<NuqsAdapter>
2732
<LinkSettingsContext.Provider value={{ externalLinksTarget }}>
2833
<SearchContextProvider>{children}</SearchContextProvider>
2934
</LinkSettingsContext.Provider>
30-
</ThemeProvider>
31-
</NuqsAdapter>
35+
</NuqsAdapter>
36+
</ThemeProvider>
3237
);
3338
}

0 commit comments

Comments
 (0)