Skip to content

Commit 4ed433f

Browse files
build(deps): @opennextjs/cloudflare 1.20.8, lucide-react 1.51.0, fumadocs 16.15.2 with patches ported (supersedes #239, #323, #325) (#474)
* build(deps-dev): bump @opennextjs/cloudflare from 1.19.11 to 1.20.8 Same specifier and resolved version dependabot proposed in #323 (^1.20.8, locked at 1.20.8); its lockfile no longer rebases onto main. Co-Authored-By: Claude <noreply@anthropic.com> * build(deps): bump lucide-react from 1.16.0 to 1.51.0 Same specifier and resolved version dependabot proposed in #325. Every icon apps/docs imports (Building2, Cloud, Users, Check, ChevronDown, Copy, ExternalLinkIcon, Globe, type LucideIcon) and every icon fumadocs-ui imports still exports from 1.51.0. Only Building2 changed upstream: it is now an alias of BuildingComplex, with byte-identical path data. Its class changed from lucide-building2 to lucide-building-complex, and no stylesheet here selects either class. Co-Authored-By: Claude <noreply@anthropic.com> * build(deps): bump fumadocs-core and fumadocs-ui from 16.8.12 to 16.15.2 Supersedes dependabot #239, which bumps fumadocs-core alone and cannot rebase: both packages are pinned through pnpm patchedDependencies, and fumadocs-ui 16.15.2 peers on fumadocs-core 16.15.2 exactly. fumadocs-core: the patch is ported unchanged. 16.15.2 still wraps the serializer handlers without carrying Handle.peek (same anchor line, no `peek` in dist/mdx-plugins/stringifier.js), so the llms bodies would carry numeric character references again without it. The hunk sits two lines lower. fumadocs-ui: eight of the thirteen hunks backported upstream 16.9.0's localized icon-button names. 16.15.2 ships those names through its Translations API, so those hunks are dropped. The five that upstream still lacks are ported: the header navigation's "Main" name read through the Translations API, the label-in-name language trigger, the decorative GitHub icon, the unnamed code-block region, and the TOC bar's stray <header>. The copy buttons also keep their own `lang`. App: since 16.10, fumadocs' Translations are keyed by English string plus notes, so fumadocsTranslations() now maps the app's names onto those keys. The excess-property check still turns a renamed key or a lost patch into a tsc error. The `chooseTheme` key goes, because no fumadocs version this site ran ever read it. The docs page drops role="main", because DocsPage's container renders its own <main> now. Co-Authored-By: Claude <noreply@anthropic.com> * docs(ui-text): localize the two accessible names fumadocs-ui 16.15.2 adds 16.15.2 names the search dialog's close button "Close Search" (16.8.12 gave it no name), and while the mobile drawer is open it renames the sidebar button to "Close Sidebar". Both go through fumadocs' Translations API but only render after interaction, so no prerendered page carries them and check-locale-surface cannot see them. Without these keys, both names would be English on every localized page, which is the #305 defect again. zh-Hant.json is regenerated from zh-Hans. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a30b8cd commit 4ed433f

17 files changed

Lines changed: 876 additions & 1016 deletions

‎.github/scripts/check-locale-surface.mjs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@
114114
* as HTML numeric character references (#197) — into files no reader runs
115115
* through an HTML parser, and in four places into the closing `)` of a link,
116116
* which stops that link being a link. #197 fixed it at the producer with
117-
* `patches/fumadocs-core@16.8.12.patch`, pinned to that exact version string,
117+
* `patches/fumadocs-core@16.8.12.patch` (since #239, `@16.15.2.patch`), pinned to
118+
* that exact version string,
118119
* and #197 measured the defect in 16.15.1, 16.15.2 and 16.15.8 as well, so
119120
* upgrading does not remove it. What a bump does to the pin, measured with
120121
* pnpm 10.28.2 and #239's 16.15.2 (#282): a lockfile-updating install
@@ -1480,7 +1481,7 @@ function pageFindings({ surface, lang, pages, chrome, local = new Map() }) {
14801481
`${where}: ${name.where} "${name.value}" is a ${lang} chrome name (×${local.get(name.value)} on ` +
14811482
`the ${lang} pages) inside a lang="${name.lang}" region with no lang of its own — it is read to a ` +
14821483
`${lang} reader with English rules. Give the element lang="${lang}" (the heading-anchor and ` +
1483-
'code-copy buttons take it from `useI18n().locale` in `patches/fumadocs-ui@16.8.12.patch`)',
1484+
'code-copy buttons take it from `useI18n().locale` in `patches/fumadocs-ui@16.15.2.patch`)',
14841485
});
14851486
continue;
14861487
}
@@ -1977,7 +1978,7 @@ function gate() {
19771978
(pin.installed && pin.pinned.length && !pin.pinned.includes(pin.installed)
19781979
? ' — the pin does not name the installed version, so pnpm applied no patch to it. ' +
19791980
'Regenerate it against the new version (`pnpm patch fumadocs-core@<version>`), or drop it ' +
1980-
'if that version carries the upstream `peek` fix; see `patches/fumadocs-core@16.8.12.patch`.'
1981+
'if that version carries the upstream `peek` fix; see `patches/fumadocs-core@16.15.2.patch`.'
19811982
: ''),
19821983
);
19831984
console.log('');

‎apps/docs/app/[lang]/docs/[[...slug]]/page.tsx‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,17 +360,13 @@ export default async function Page(props: {
360360
/>
361361
))}
362362
{/*
363-
`role="main"`: the page's main landmark (#308). Fumadocs 16.8.12
364-
renders none anywhere in the docs layout, so a screen reader's "main"
365-
jump went nowhere. DocsPage passes its other props to the `<article>`
366-
it renders (breadcrumb, title, body, footer; not the sidebar or the
367-
table of contents), and ARIA in HTML allows `main` on an article.
368-
Upgrade note: fumadocs-ui 16.16.2 wraps that article in a `<main>` of
369-
its own. On a version that does, delete this prop, or the page has two
370-
main landmarks (`patches/fumadocs-ui@16.8.12.patch` says the same).
363+
No `role` here. The page's main landmark (#308) is fumadocs-ui's own
364+
since 16.15.2 at the latest: DocsPage's container renders
365+
`<main className="contents">` around the `<article>` it passes these
366+
props to. Under 16.8.12, which rendered no main landmark, this element
367+
carried `role="main"`; keeping it now would give the page two.
371368
*/}
372369
<DocsPage
373-
role="main"
374370
toc={isFallback ? tocInLanguage(loaded.toc, contentLang) : loaded.toc}
375371
full={page.data.full}
376372
>

‎apps/docs/lib/ui-text.ts‎

Lines changed: 63 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,35 @@ import zhHant from './ui-text/zh-Hant.json';
1111
/**
1212
* The docs site's interface copy — the chrome around a page, never the page.
1313
*
14-
* Two kinds of string live here. The first nineteen keys are Fumadocs' own
15-
* `Translations` (the search box, "On this page", "Choose a language", the
14+
* Two kinds of string live here. The first twenty keys are the strings
15+
* Fumadocs renders (the search box, "On this page", "Choose a language", the
1616
* previous/next footer, the accessible names of its icon buttons, …);
17-
* `fumadocsTranslations()` hands exactly those to `RootProvider`, which is the
18-
* only channel Fumadocs reads them through. The rest are this app's own
19-
* controls and notices, read by the docs page and the 404 page.
17+
* `fumadocsTranslations()` maps exactly those onto Fumadocs' own
18+
* `Translations` keys and hands them to `RootProvider`, which is the only
19+
* channel Fumadocs reads them through. The rest are this app's own controls
20+
* and notices, read by the docs page and the 404 page.
2021
*
2122
* English is the source, written here and nowhere else (AGENTS.md rule 1). The
2223
* Fumadocs values are its built-in defaults verbatim, so the English site
2324
* renders byte-identically to before this table existed.
2425
*
25-
* Nine of the Fumadocs keys — `searchOpen` through `navMain` — do not exist in
26-
* fumadocs-ui 16.8.12 as published: there the names are English literals in
27-
* the components, outside the Translations API, so every locale page announced
28-
* "Open Search" and "Copy Anchor Link" inside `<html lang="de">`.
29-
* `patches/fumadocs-ui@16.8.12.patch` adds them: eight are a backport of
30-
* upstream 16.9.0's own fix (the same key names, the same English defaults),
31-
* and `navMain` replaces the `aria-label="Main"` Radix's navigation menu puts
32-
* on the legal pages' header, which upstream has not localized. They arrive
33-
* here through the one channel the other ten already use. The patch header
34-
* says why a patch rather than slot overrides, and when it can go.
26+
* Since fumadocs-ui 16.10, Fumadocs' `Translations` are keyed by the English
27+
* string plus its notes (`"Open Search(search trigger)(aria-label)"`), not by
28+
* name, so the keys here are this app's own names and
29+
* `fumadocsTranslations()` is the one place that knows the mapping. Ten of
30+
* them — `searchOpen` through `menuToggle` — are the icon buttons'
31+
* accessible names. Eight of those 16.8.12 hard-coded in English outside its
32+
* Translations API (#305), and upstream has read them through it since 16.9.0.
33+
* `searchClose` and `sidebarClose` arrived with 16.15.2: the search dialog's
34+
* close button, which had no name before, and the name the sidebar button
35+
* takes while the mobile drawer is open. Both render only after interaction,
36+
* so no prerendered page carries them and `check-locale-surface.mjs` cannot
37+
* see them; they are here so that they are not English on a localized page.
38+
* `navMain` names the legal pages' header navigation, which Radix labels
39+
* "Main" and upstream still does not localize:
40+
* `patches/fumadocs-ui@16.15.2.patch` reads it through the same API under the
41+
* key `"Main(navigation menu)(aria-label)"`, and the patch header says why a
42+
* patch and when it can go.
3543
*
3644
* The locale tables are UI copy in app code — the shape `app/not-found.tsx`
3745
* and `app/[lang]/privacy/page.tsx` already use — not `content/docs/`
@@ -52,13 +60,14 @@ const en = {
5260
chooseLanguage: 'Choose a language',
5361
nextPage: 'Next Page',
5462
previousPage: 'Previous Page',
55-
chooseTheme: 'Theme',
5663
editOnGithub: 'Edit on GitHub',
5764
/** The icon buttons' accessible names: no visible text, only `aria-label`. */
5865
searchOpen: 'Open Search',
66+
searchClose: 'Close Search',
5967
themeToggle: 'Toggle Theme',
6068
sidebarOpen: 'Open Sidebar',
6169
sidebarCollapse: 'Collapse Sidebar',
70+
sidebarClose: 'Close Sidebar',
6271
headingCopyAnchor: 'Copy Anchor Link',
6372
codeBlockCopy: 'Copy Text',
6473
codeBlockCopied: 'Copied Text',
@@ -102,17 +111,21 @@ const en = {
102111
* the Simplified one like every other string in this table.
103112
*/
104113
notFound: 'This page could not be found.',
105-
} satisfies Translations & Record<string, string>;
114+
} satisfies Record<string, string>;
106115

107116
export type UiText = Record<keyof typeof en, string>;
108117

109118
/**
110-
* Fumadocs' `Translations`, restated as a type alias. Same keys, same values;
111-
* the difference is that an alias satisfies the index signature of the
112-
* provider's `translations` prop (`TranslationsOption`) and an interface
113-
* cannot, so the interface would not type-check at the one place it is used.
119+
* The subset of Fumadocs' `Translations` this site supplies. Optional per key,
120+
* because Fumadocs falls back to its English for a key it is not given and
121+
* most of its keys belong to components this site does not render (the type
122+
* table, the glass layout, its own page actions). Exact per key all the same:
123+
* `fumadocsTranslations()` returns an object literal of this type, so a key
124+
* Fumadocs renamed or dropped — or the patched navigation key, if the patch
125+
* stops applying — is an excess-property error in `tsc`, not an English name
126+
* on a localized page.
114127
*/
115-
export type FumadocsTranslations = { [K in keyof Translations]: Translations[K] };
128+
export type FumadocsTranslations = { [K in keyof Translations]?: Translations[K] };
116129

117130
type Locale = (typeof i18n.languages)[number];
118131

@@ -185,32 +198,39 @@ export function uiText(lang: string): UiText {
185198
}
186199

187200
/**
188-
* Exactly the strings Fumadocs reads, for `RootProvider`'s `i18n.translations`.
201+
* Exactly the strings Fumadocs reads, for `RootProvider`'s `i18n.translations`,
202+
* under Fumadocs' own keys.
189203
*
190204
* Picked rather than spread: the provider merges whatever it is given into the
191205
* context every Fumadocs component reads, and this app's own keys have no
192-
* business there. It also keeps the serialized client prop to nineteen strings.
206+
* business there. Two app strings each feed two Fumadocs keys, because
207+
* Fumadocs notes the same English twice: "Search" in the dialog and on the
208+
* trigger, and "Choose a language" as the picker's heading and as its button's
209+
* name.
193210
*/
194211
export function fumadocsTranslations(text: UiText): FumadocsTranslations {
195212
return {
196-
search: text.search,
197-
searchNoResult: text.searchNoResult,
198-
toc: text.toc,
199-
tocNoHeadings: text.tocNoHeadings,
200-
lastUpdate: text.lastUpdate,
201-
chooseLanguage: text.chooseLanguage,
202-
nextPage: text.nextPage,
203-
previousPage: text.previousPage,
204-
chooseTheme: text.chooseTheme,
205-
editOnGithub: text.editOnGithub,
206-
searchOpen: text.searchOpen,
207-
themeToggle: text.themeToggle,
208-
sidebarOpen: text.sidebarOpen,
209-
sidebarCollapse: text.sidebarCollapse,
210-
headingCopyAnchor: text.headingCopyAnchor,
211-
codeBlockCopy: text.codeBlockCopy,
212-
codeBlockCopied: text.codeBlockCopied,
213-
menuToggle: text.menuToggle,
214-
navMain: text.navMain,
213+
'Search(search dialog)': text.search,
214+
'Search(search trigger)': text.search,
215+
'No results found(search dialog)': text.searchNoResult,
216+
'On this page(table of contents)': text.toc,
217+
'No Headings(table of contents)': text.tocNoHeadings,
218+
'Last updated on(page footer)': text.lastUpdate,
219+
'Choose a language(language switcher)': text.chooseLanguage,
220+
'Choose a language(language switcher)(aria-label)': text.chooseLanguage,
221+
'Next Page(pagination)': text.nextPage,
222+
'Previous Page(pagination)': text.previousPage,
223+
'Edit on GitHub(edit page)': text.editOnGithub,
224+
'Open Search(search trigger)(aria-label)': text.searchOpen,
225+
'Close Search(search dialog)(aria-label)': text.searchClose,
226+
'Toggle Theme(theme switcher)(aria-label)': text.themeToggle,
227+
'Open Sidebar(sidebar)(aria-label)': text.sidebarOpen,
228+
'Collapse Sidebar(sidebar)(aria-label)': text.sidebarCollapse,
229+
'Close Sidebar(sidebar)(aria-label)': text.sidebarClose,
230+
'Copy Anchor Link(heading anchor)(aria-label)': text.headingCopyAnchor,
231+
'Copy Text(code block)(aria-label)': text.codeBlockCopy,
232+
'Copied Text(code block)(aria-label)': text.codeBlockCopied,
233+
'Toggle Menu(mobile menu)(aria-label)': text.menuToggle,
234+
'Main(navigation menu)(aria-label)': text.navMain,
215235
};
216236
}

‎apps/docs/lib/ui-text/de.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"chooseLanguage": "Sprache wählen",
88
"nextPage": "Nächste Seite",
99
"previousPage": "Vorherige Seite",
10-
"chooseTheme": "Design",
1110
"editOnGithub": "Auf GitHub bearbeiten",
1211
"searchOpen": "Suche öffnen",
12+
"searchClose": "Suche schließen",
1313
"themeToggle": "Design wechseln",
1414
"sidebarOpen": "Seitenleiste öffnen",
1515
"sidebarCollapse": "Seitenleiste einklappen",
16+
"sidebarClose": "Seitenleiste schließen",
1617
"headingCopyAnchor": "Ankerlink kopieren",
1718
"codeBlockCopy": "Text kopieren",
1819
"codeBlockCopied": "Text kopiert",

‎apps/docs/lib/ui-text/es.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"chooseLanguage": "Elegir idioma",
88
"nextPage": "Página siguiente",
99
"previousPage": "Página anterior",
10-
"chooseTheme": "Tema",
1110
"editOnGithub": "Editar en GitHub",
1211
"searchOpen": "Abrir la búsqueda",
12+
"searchClose": "Cerrar la búsqueda",
1313
"themeToggle": "Cambiar de tema",
1414
"sidebarOpen": "Abrir la barra lateral",
1515
"sidebarCollapse": "Contraer la barra lateral",
16+
"sidebarClose": "Cerrar la barra lateral",
1617
"headingCopyAnchor": "Copiar enlace de anclaje",
1718
"codeBlockCopy": "Copiar texto",
1819
"codeBlockCopied": "Texto copiado",

‎apps/docs/lib/ui-text/fr.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"chooseLanguage": "Choisir une langue",
88
"nextPage": "Page suivante",
99
"previousPage": "Page précédente",
10-
"chooseTheme": "Thème",
1110
"editOnGithub": "Modifier sur GitHub",
1211
"searchOpen": "Ouvrir la recherche",
12+
"searchClose": "Fermer la recherche",
1313
"themeToggle": "Changer de thème",
1414
"sidebarOpen": "Ouvrir la barre latérale",
1515
"sidebarCollapse": "Réduire la barre latérale",
16+
"sidebarClose": "Fermer la barre latérale",
1617
"headingCopyAnchor": "Copier le lien d'ancre",
1718
"codeBlockCopy": "Copier le texte",
1819
"codeBlockCopied": "Texte copié",

‎apps/docs/lib/ui-text/ja.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"chooseLanguage": "言語を選択",
88
"nextPage": "次のページ",
99
"previousPage": "前のページ",
10-
"chooseTheme": "テーマ",
1110
"editOnGithub": "GitHub で編集",
1211
"searchOpen": "検索を開く",
12+
"searchClose": "検索を閉じる",
1313
"themeToggle": "テーマを切り替える",
1414
"sidebarOpen": "サイドバーを開く",
1515
"sidebarCollapse": "サイドバーを折りたたむ",
16+
"sidebarClose": "サイドバーを閉じる",
1617
"headingCopyAnchor": "アンカーリンクをコピー",
1718
"codeBlockCopy": "テキストをコピー",
1819
"codeBlockCopied": "テキストをコピーしました",

‎apps/docs/lib/ui-text/ko.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"chooseLanguage": "언어 선택",
88
"nextPage": "다음 페이지",
99
"previousPage": "이전 페이지",
10-
"chooseTheme": "테마",
1110
"editOnGithub": "GitHub에서 편집",
1211
"searchOpen": "검색 열기",
12+
"searchClose": "검색 닫기",
1313
"themeToggle": "테마 전환",
1414
"sidebarOpen": "사이드바 열기",
1515
"sidebarCollapse": "사이드바 접기",
16+
"sidebarClose": "사이드바 닫기",
1617
"headingCopyAnchor": "앵커 링크 복사",
1718
"codeBlockCopy": "텍스트 복사",
1819
"codeBlockCopied": "텍스트 복사됨",

‎apps/docs/lib/ui-text/zh-Hans.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"chooseLanguage": "选择语言",
88
"nextPage": "下一页",
99
"previousPage": "上一页",
10-
"chooseTheme": "主题",
1110
"editOnGithub": "在 GitHub 上编辑",
1211
"searchOpen": "打开搜索",
12+
"searchClose": "关闭搜索",
1313
"themeToggle": "切换主题",
1414
"sidebarOpen": "打开侧边栏",
1515
"sidebarCollapse": "收起侧边栏",
16+
"sidebarClose": "关闭侧边栏",
1617
"headingCopyAnchor": "复制锚点链接",
1718
"codeBlockCopy": "复制文本",
1819
"codeBlockCopied": "已复制文本",

‎apps/docs/lib/ui-text/zh-Hant.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
"chooseLanguage": "選擇語言",
88
"nextPage": "下一頁",
99
"previousPage": "上一頁",
10-
"chooseTheme": "主題",
1110
"editOnGithub": "在 GitHub 上編輯",
1211
"searchOpen": "開啟搜尋",
12+
"searchClose": "關閉搜尋",
1313
"themeToggle": "切換主題",
1414
"sidebarOpen": "開啟側邊欄",
1515
"sidebarCollapse": "收起側邊欄",
16+
"sidebarClose": "關閉側邊欄",
1617
"headingCopyAnchor": "複製錨點連結",
1718
"codeBlockCopy": "複製文本",
1819
"codeBlockCopied": "已複製文本",

0 commit comments

Comments
 (0)