@clarify-labs/renderer 0.9.3 → 0.10.0

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.
Files changed (52) hide show
  1. package/output/{ClarifyShell-BQ29N8P5.js → ClarifyShell-CxhXBtsR.js} +104 -73
  2. package/output/ClarifyShell-CxhXBtsR.js.map +1 -0
  3. package/output/{ClarifyShell-Dm--LZco.cjs → ClarifyShell-DjLRRW8T.cjs} +111 -74
  4. package/output/ClarifyShell-DjLRRW8T.cjs.map +1 -0
  5. package/output/{OpenApiOperation-C9xyRo5a.js → OpenApiOperation-CyBkzvob.js} +123 -43
  6. package/output/OpenApiOperation-CyBkzvob.js.map +1 -0
  7. package/output/{OpenApiOperation-DIWGdw29.cjs → OpenApiOperation-qp5tFaWP.cjs} +128 -48
  8. package/output/OpenApiOperation-qp5tFaWP.cjs.map +1 -0
  9. package/output/{PageActions-B_tSec1f.js → PageActions-Dn8IGWoL.js} +9 -4
  10. package/output/PageActions-Dn8IGWoL.js.map +1 -0
  11. package/output/{PageActions-DEuFHgyB.cjs → PageActions-GS_cxeJN.cjs} +17 -6
  12. package/output/PageActions-GS_cxeJN.cjs.map +1 -0
  13. package/output/app/ContentDiagnostic.d.ts +9 -0
  14. package/output/app/ErrorBoundary.d.ts +0 -2
  15. package/output/app/RenderErrorPanel.d.ts +20 -0
  16. package/output/client.cjs +3 -3
  17. package/output/client.js +3 -3
  18. package/output/core/context.d.ts +1 -0
  19. package/output/core/i18n.d.ts +1 -1
  20. package/output/core/types.d.ts +1 -0
  21. package/output/index.cjs +44 -5
  22. package/output/index.cjs.map +1 -1
  23. package/output/index.d.ts +5 -3
  24. package/output/index.js +42 -5
  25. package/output/index.js.map +1 -1
  26. package/output/markdown.cjs +1 -1
  27. package/output/openapi/components/SchemaProperties.d.ts +1 -0
  28. package/output/openapi/entry.d.ts +5 -0
  29. package/output/openapi/index.d.ts +2 -2
  30. package/output/preview.cjs +2 -2
  31. package/output/preview.cjs.map +1 -1
  32. package/output/preview.js +2 -2
  33. package/output/preview.js.map +1 -1
  34. package/output/remark-Dd2WU50s.js.map +1 -1
  35. package/output/{remark-Dv3owbSH.cjs → remark-zSQT0MBv.cjs} +3 -3
  36. package/output/{remark-Dv3owbSH.cjs.map → remark-zSQT0MBv.cjs.map} +1 -1
  37. package/output/{render-BCGK1WpS.cjs → render-CCCoUWDP.cjs} +2 -2
  38. package/output/{render-BCGK1WpS.cjs.map → render-CCCoUWDP.cjs.map} +1 -1
  39. package/output/{render-CEWLJSmt.js → render-CV0a-qtD.js} +2 -2
  40. package/output/{render-CEWLJSmt.js.map → render-CV0a-qtD.js.map} +1 -1
  41. package/output/renderer.css +5 -1
  42. package/output/server.cjs +2 -2
  43. package/output/server.cjs.map +1 -1
  44. package/output/server.js +2 -2
  45. package/package.json +10 -10
  46. package/output/ClarifyShell-BQ29N8P5.js.map +0 -1
  47. package/output/ClarifyShell-Dm--LZco.cjs.map +0 -1
  48. package/output/OpenApiOperation-C9xyRo5a.js.map +0 -1
  49. package/output/OpenApiOperation-DIWGdw29.cjs.map +0 -1
  50. package/output/PageActions-B_tSec1f.js.map +0 -1
  51. package/output/PageActions-DEuFHgyB.cjs.map +0 -1
  52. /package/output/{chunk-DakpK96I.cjs → rolldown-runtime-DakpK96I.cjs} +0 -0
@@ -16,6 +16,9 @@ function useConfig() {
16
16
  if (!config) throw new Error("[clarify] useConfig must be used within a ConfigContext.Provider");
17
17
  return config;
18
18
  }
19
+ function useConfigOptional() {
20
+ return useContext(ConfigContext);
21
+ }
19
22
  function useLocale() {
20
23
  return useContext(LocaleContext);
21
24
  }
@@ -88,6 +91,7 @@ var builtInText = {
88
91
  "openapi.queryParameters": "Query parameters",
89
92
  "openapi.request": "Request",
90
93
  "openapi.requestBody": "Request body",
94
+ "openapi.requestBodyEmpty": "No request body",
91
95
  "openapi.responseBodyProperties": "Response body properties",
92
96
  "openapi.required": "Required.",
93
97
  "openapi.requiredBadge": "required",
@@ -111,9 +115,9 @@ var builtInText = {
111
115
  "renderError.path": "Route",
112
116
  "renderError.reload": "Reload route",
113
117
  "renderError.stack": "JavaScript stack trace",
114
- "renderError.timestamp": "Captured at",
115
118
  "renderError.title": "Route render failed",
116
119
  "renderError.type": "Error type",
120
+ "renderError.version": "Clarify version",
117
121
  "theme.switchToDark": "Switch to dark theme",
118
122
  "theme.switchToLight": "Switch to light theme",
119
123
  "theme.switchToSystem": "Follow system theme",
@@ -187,6 +191,7 @@ var builtInText = {
187
191
  "openapi.queryParameters": "查询参数",
188
192
  "openapi.request": "请求",
189
193
  "openapi.requestBody": "请求体",
194
+ "openapi.requestBodyEmpty": "暂无请求体",
190
195
  "openapi.responseBodyProperties": "响应体属性",
191
196
  "openapi.required": "必填。",
192
197
  "openapi.requiredBadge": "必填",
@@ -210,9 +215,9 @@ var builtInText = {
210
215
  "renderError.path": "路由",
211
216
  "renderError.reload": "重新加载路由",
212
217
  "renderError.stack": "JavaScript 堆栈",
213
- "renderError.timestamp": "捕获时间",
214
218
  "renderError.title": "路由渲染失败",
215
219
  "renderError.type": "错误类型",
220
+ "renderError.version": "Clarify 版本",
216
221
  "theme.switchToDark": "切换到深色主题",
217
222
  "theme.switchToLight": "切换到浅色主题",
218
223
  "theme.switchToSystem": "跟随系统主题",
@@ -2046,6 +2051,6 @@ function PageTitleActions() {
2046
2051
  });
2047
2052
  }
2048
2053
  //#endregion
2049
- export { OpenApisContext as A, isExternalHref as C, useBuiltInText as D, copyTextToClipboard as E, useLocale as M, useOpenApis as N, ConfigContext as O, themeCookieName as S, prefixHref as T, getStoredThemePreference as _, SectionProvider as a, storeLocalePreference as b, lucideIconRegistry as c, normalizeRoutePath as d, resolveLocalizedText as f, getStoredLocalePreference as g, useTheme as h, Navigation as i, useConfig as j, LocaleContext as k, resolveLucideIconName as l, ThemeProvider as m, PageTitleActions as n, useSectionStore as o, ThemeToggle as p, Header as r, remToPx as s, PageActionsProvider as t, isSameRoutePath as u, localeCookieName as v, localizeHref as w, storeThemePreference as x, readLocaleCookie as y };
2054
+ export { OpenApisContext as A, isExternalHref as C, useBuiltInText as D, copyTextToClipboard as E, useConfigOptional as M, useLocale as N, ConfigContext as O, useOpenApis as P, themeCookieName as S, prefixHref as T, getStoredThemePreference as _, SectionProvider as a, storeLocalePreference as b, lucideIconRegistry as c, normalizeRoutePath as d, resolveLocalizedText as f, getStoredLocalePreference as g, useTheme as h, Navigation as i, useConfig as j, LocaleContext as k, resolveLucideIconName as l, ThemeProvider as m, PageTitleActions as n, useSectionStore as o, ThemeToggle as p, Header as r, remToPx as s, PageActionsProvider as t, isSameRoutePath as u, localeCookieName as v, localizeHref as w, storeThemePreference as x, readLocaleCookie as y };
2050
2055
 
2051
- //# sourceMappingURL=PageActions-B_tSec1f.js.map
2056
+ //# sourceMappingURL=PageActions-Dn8IGWoL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageActions-Dn8IGWoL.js","names":[],"sources":["../source/core/context.tsx","../source/core/i18n.ts","../source/utils/clipboard.ts","../source/utils/href.ts","../source/shell/ContentActions.tsx","../source/theme/cookies.ts","../source/theme/ThemeProvider.tsx","../source/theme/ThemeToggle.tsx","../source/utils/localized-text.ts","../source/utils/path.ts","../source/utils/lucide.ts","../source/shell/icons.tsx","../source/utils/remToPx.ts","../source/app/SectionProvider.tsx","../source/shell/Navigation.tsx","../source/shell/mobile.tsx","../source/shell/search/items.ts","../source/shell/search/pagefind.ts","../source/shell/search/SearchInput.tsx","../source/shell/search/Highlight.tsx","../source/shell/search/SearchResult.tsx","../source/shell/search/SearchDialog.tsx","../source/shell/search/useSearchProps.ts","../source/shell/Search.tsx","../source/shell/SiteLogo.tsx","../source/shell/Header.tsx","../source/app/PageActions.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nimport type { OpenAPISpec } from '../openapi/lib/utils'\n\nimport type { Config } from './types'\n\nexport const ConfigContext = createContext<Config | null>(null)\nexport const LocaleContext = createContext<string | undefined>(undefined)\nexport const OpenApisContext = createContext<Record<string, OpenAPISpec>>({})\n\nexport function useConfig(): Config {\n const config = useContext(ConfigContext)\n if (!config) {\n throw new Error(\n '[clarify] useConfig must be used within a ConfigContext.Provider'\n )\n }\n return config\n}\n\nexport function useConfigOptional(): Config | null {\n return useContext(ConfigContext)\n}\n\nexport function useLocale(): string | undefined {\n return useContext(LocaleContext)\n}\n\nexport function useOpenApis(): Record<string, OpenAPISpec> {\n return useContext(OpenApisContext)\n}\n","import { useContext } from 'react'\n\nimport { ConfigContext, LocaleContext } from './context'\n\nexport type BuiltInLocale = 'en' | 'zh-CN'\n\nexport type BuiltInTextKey =\n | 'actions.code'\n | 'actions.copy'\n | 'actions.copied'\n | 'builtWith.label'\n | 'builtWith.prefix'\n | 'callout.danger'\n | 'callout.info'\n | 'callout.note'\n | 'callout.success'\n | 'callout.tip'\n | 'callout.warning'\n | 'contentActions.copyContent'\n | 'contentActions.copyContentDescription'\n | 'contentActions.copyLink'\n | 'contentActions.copyLinkDescription'\n | 'contentActions.copyLlms'\n | 'contentActions.copyLlmsDescription'\n | 'contentActions.copiedLlms'\n | 'contentActions.editPage'\n | 'contentActions.editPageDescription'\n | 'contentActions.copyOptions'\n | 'contentActions.copiedContent'\n | 'contentActions.copiedLink'\n | 'contentActions.viewMarkdown'\n | 'contentActions.viewMarkdownDescription'\n | 'contentActions.viewOpenApi'\n | 'contentActions.viewOpenApiDescription'\n | 'feedback.no'\n | 'feedback.prompt'\n | 'feedback.thanks'\n | 'feedback.yes'\n | 'navigation.documentation'\n | 'navigation.next'\n | 'navigation.previous'\n | 'navigation.previousNext'\n | 'navigation.toggle'\n | 'navbar.home'\n | 'navbar.openLinks'\n | 'navbar.sections'\n | 'notFound.description'\n | 'notFound.home'\n | 'notFound.label'\n | 'notFound.title'\n | 'openapi.apiDocumentation'\n | 'openapi.bodyProperties'\n | 'openapi.collapse'\n | 'openapi.endpointNotFound'\n | 'openapi.example'\n | 'openapi.expand'\n | 'openapi.headers'\n | 'openapi.language'\n | 'openapi.client'\n | 'openapi.mediaType'\n | 'openapi.none'\n | 'openapi.openApiReference'\n | 'openapi.operationParameter'\n | 'openapi.optional'\n | 'openapi.parameter'\n | 'openapi.pathParameters'\n | 'openapi.queryParameters'\n | 'openapi.request'\n | 'openapi.requestBody'\n | 'openapi.requestBodyEmpty'\n | 'openapi.responseBodyProperties'\n | 'openapi.required'\n | 'openapi.requiredBadge'\n | 'openapi.response'\n | 'openapi.responses'\n | 'openapi.schemaExample'\n | 'openapi.scrollExamplesLeft'\n | 'openapi.scrollExamplesRight'\n | 'openapi.specNotFound'\n | 'openapi.specPathMissing'\n | 'openapi.status'\n | 'openapi.version'\n | 'search.button'\n | 'search.noResults'\n | 'search.placeholder'\n | 'search.shortcutCtrl'\n | 'renderError.componentStack'\n | 'renderError.description'\n | 'renderError.details'\n | 'renderError.message'\n | 'renderError.path'\n | 'renderError.reload'\n | 'renderError.stack'\n | 'renderError.title'\n | 'renderError.version'\n | 'renderError.type'\n | 'theme.switchToDark'\n | 'theme.switchToLight'\n | 'theme.switchToSystem'\n | 'language.switch'\n | 'mermaid.zoomIn'\n | 'mermaid.zoomOut'\n | 'mermaid.resetZoom'\n | 'mermaid.renderError'\n | 'mermaid.scrollHint'\n\nconst builtInText = {\n en: {\n 'actions.code': 'Code',\n 'actions.copy': 'Copy',\n 'actions.copied': 'Copied!',\n 'builtWith.label': 'Built with Clarify',\n 'builtWith.prefix': 'Built with',\n 'callout.danger': 'Danger',\n 'callout.info': 'Info',\n 'callout.note': 'Note',\n 'callout.success': 'Success',\n 'callout.tip': 'Tip',\n 'callout.warning': 'Warning',\n 'contentActions.copyContent': 'Copy page',\n 'contentActions.copyContentDescription': 'Copy this page as {contentType} for LLMs',\n 'contentActions.copyLink': 'Copy {contentType} link',\n 'contentActions.copyLinkDescription': 'Copy the raw {contentType} content link for this page',\n 'contentActions.copyLlms': 'Copy llms.txt',\n 'contentActions.copyLlmsDescription': 'Copy the llms.txt link for this site',\n 'contentActions.copiedLlms': 'Copied llms.txt',\n 'contentActions.editPage': 'Edit this page',\n 'contentActions.editPageDescription': 'Open the source file for this page',\n 'contentActions.copyOptions': 'Choose copy option',\n 'contentActions.copiedContent': 'Copied page',\n 'contentActions.copiedLink': 'Copied link',\n 'contentActions.viewMarkdown': 'View as Markdown',\n 'contentActions.viewMarkdownDescription': 'View this page as plain text',\n 'contentActions.viewOpenApi': 'View raw OpenAPI',\n 'contentActions.viewOpenApiDescription': 'Open the API description file in a new tab',\n 'feedback.no': 'No',\n 'feedback.prompt': 'Was this page helpful?',\n 'feedback.thanks': 'Thanks for your feedback!',\n 'feedback.yes': 'Yes',\n 'navigation.documentation': 'Documentation',\n 'navigation.next': 'Next',\n 'navigation.previous': 'Previous',\n 'navigation.previousNext': 'Previous and next pages',\n 'navigation.toggle': 'Toggle navigation',\n 'navbar.home': 'Home',\n 'navbar.openLinks': 'Open navigation links',\n 'navbar.sections': 'Documentation sections',\n 'notFound.description': 'The page may have moved, been renamed, or never existed. Check the address or return to the homepage.',\n 'notFound.home': 'Back to homepage',\n 'notFound.label': '404',\n 'notFound.title': 'Page not found',\n 'openapi.apiDocumentation': 'API Documentation',\n 'openapi.bodyProperties': 'Body properties',\n 'openapi.collapse': 'Collapse',\n 'openapi.endpointNotFound': 'Endpoint not found: {endpoint}',\n 'openapi.example': 'Example',\n 'openapi.expand': 'Expand',\n 'openapi.headers': 'Headers',\n 'openapi.language': 'Language',\n 'openapi.client': 'Client',\n 'openapi.mediaType': 'Media type',\n 'openapi.none': 'None',\n 'openapi.openApiReference': 'OpenAPI Reference',\n 'openapi.operationParameter': 'Operation parameter.',\n 'openapi.optional': 'Optional.',\n 'openapi.parameter': 'parameter',\n 'openapi.pathParameters': 'Path parameters',\n 'openapi.queryParameters': 'Query parameters',\n 'openapi.request': 'Request',\n 'openapi.requestBody': 'Request body',\n 'openapi.requestBodyEmpty': 'No request body',\n 'openapi.responseBodyProperties': 'Response body properties',\n 'openapi.required': 'Required.',\n 'openapi.requiredBadge': 'required',\n 'openapi.response': 'Response',\n 'openapi.responses': 'Responses',\n 'openapi.schemaExample': 'Schema example',\n 'openapi.scrollExamplesLeft': 'Scroll examples left',\n 'openapi.scrollExamplesRight': 'Scroll examples right',\n 'openapi.specNotFound': 'OpenAPI spec not found: {specPath}',\n 'openapi.specPathMissing': 'spec or specPath was not provided',\n 'openapi.status': 'Status',\n 'openapi.version': 'Version {version}',\n 'search.button': 'Search...',\n 'search.noResults': 'Nothing found for {query}.',\n 'search.placeholder': 'Find something...',\n 'search.shortcutCtrl': 'Ctrl ',\n 'renderError.componentStack': 'React component stack',\n 'renderError.description': 'Clarify stopped rendering this route to keep the rest of the shell responsive. Review the diagnostics below, fix the page source, then reload the route.',\n 'renderError.details': 'Runtime diagnostics',\n 'renderError.message': 'Message',\n 'renderError.path': 'Route',\n 'renderError.reload': 'Reload route',\n 'renderError.stack': 'JavaScript stack trace',\n 'renderError.title': 'Route render failed',\n 'renderError.type': 'Error type',\n 'renderError.version': 'Clarify version',\n 'theme.switchToDark': 'Switch to dark theme',\n 'theme.switchToLight': 'Switch to light theme',\n 'theme.switchToSystem': 'Follow system theme',\n 'language.switch': 'Switch language',\n 'mermaid.zoomIn': 'Zoom in',\n 'mermaid.zoomOut': 'Zoom out',\n 'mermaid.resetZoom': 'Reset zoom',\n 'mermaid.renderError': 'Mermaid render error',\n 'mermaid.scrollHint': 'Click the diagram to enable scroll-to-zoom',\n },\n 'zh-CN': {\n 'actions.code': '代码',\n 'actions.copy': '复制',\n 'actions.copied': '已复制!',\n 'builtWith.label': '由 Clarify 构建',\n 'builtWith.prefix': '构建来自',\n 'callout.danger': '危险',\n 'callout.info': '信息',\n 'callout.note': '注意',\n 'callout.success': '成功',\n 'callout.tip': '提示',\n 'callout.warning': '警告',\n 'contentActions.copyContent': '复制页面',\n 'contentActions.copyContentDescription': '将页面以 {contentType} 格式复制给 LLMs',\n 'contentActions.copyLink': '复制 {contentType} 链接',\n 'contentActions.copyLinkDescription': '复制当前页面的 {contentType} 原始内容链接',\n 'contentActions.copyLlms': '复制 llms.txt',\n 'contentActions.copyLlmsDescription': '复制此站点的 llms.txt 链接',\n 'contentActions.copiedLlms': '已复制 llms.txt',\n 'contentActions.editPage': '编辑此页面',\n 'contentActions.editPageDescription': '打开当前页面的源文件',\n 'contentActions.copyOptions': '选择复制选项',\n 'contentActions.copiedContent': '已复制页面',\n 'contentActions.copiedLink': '已复制链接',\n 'contentActions.viewMarkdown': '以 Markdown 格式查看',\n 'contentActions.viewMarkdownDescription': '以纯文本查看此页面',\n 'contentActions.viewOpenApi': '查看 OpenAPI 原始内容',\n 'contentActions.viewOpenApiDescription': '在新标签页打开 API 描述文件',\n 'feedback.no': '否',\n 'feedback.prompt': '这个页面有帮助吗?',\n 'feedback.thanks': '感谢你的反馈!',\n 'feedback.yes': '是',\n 'navigation.documentation': '文档',\n 'navigation.next': '下一页',\n 'navigation.previous': '上一页',\n 'navigation.previousNext': '上一页和下一页',\n 'navigation.toggle': '切换导航',\n 'navbar.home': '首页',\n 'navbar.openLinks': '打开导航链接',\n 'navbar.sections': '文档栏目',\n 'notFound.description': '页面可能已移动、重命名或不存在。请检查地址,或返回首页继续浏览。',\n 'notFound.home': '返回首页',\n 'notFound.label': '404',\n 'notFound.title': '页面未找到',\n 'openapi.apiDocumentation': 'API 文档',\n 'openapi.bodyProperties': '请求体属性',\n 'openapi.collapse': '收起',\n 'openapi.endpointNotFound': '未找到端点:{endpoint}',\n 'openapi.example': '示例',\n 'openapi.expand': '展开',\n 'openapi.headers': '请求头',\n 'openapi.language': '语言',\n 'openapi.client': '客户端',\n 'openapi.mediaType': '媒体类型',\n 'openapi.none': '无',\n 'openapi.openApiReference': 'OpenAPI 参考',\n 'openapi.operationParameter': '操作参数。',\n 'openapi.optional': '可选。',\n 'openapi.parameter': '参数',\n 'openapi.pathParameters': '路径参数',\n 'openapi.queryParameters': '查询参数',\n 'openapi.request': '请求',\n 'openapi.requestBody': '请求体',\n 'openapi.requestBodyEmpty': '暂无请求体',\n 'openapi.responseBodyProperties': '响应体属性',\n 'openapi.required': '必填。',\n 'openapi.requiredBadge': '必填',\n 'openapi.response': '响应',\n 'openapi.responses': '响应',\n 'openapi.schemaExample': 'Schema 示例',\n 'openapi.scrollExamplesLeft': '向左滚动示例',\n 'openapi.scrollExamplesRight': '向右滚动示例',\n 'openapi.specNotFound': '未找到 OpenAPI 描述文件:{specPath}',\n 'openapi.specPathMissing': '未提供 spec 或 specPath',\n 'openapi.status': '状态',\n 'openapi.version': '版本 {version}',\n 'search.button': '搜索...',\n 'search.noResults': '没有找到与 {query} 相关的结果。',\n 'search.placeholder': '搜索内容...',\n 'search.shortcutCtrl': 'Ctrl ',\n 'renderError.componentStack': 'React 组件栈',\n 'renderError.description': 'Clarify 已停止渲染此路由,以保证文档 Shell 仍可响应。请查看下方诊断信息,修复页面源码后重新加载路由。',\n 'renderError.details': '运行时诊断',\n 'renderError.message': '错误消息',\n 'renderError.path': '路由',\n 'renderError.reload': '重新加载路由',\n 'renderError.stack': 'JavaScript 堆栈',\n 'renderError.title': '路由渲染失败',\n 'renderError.type': '错误类型',\n 'renderError.version': 'Clarify 版本',\n 'theme.switchToDark': '切换到深色主题',\n 'theme.switchToLight': '切换到浅色主题',\n 'theme.switchToSystem': '跟随系统主题',\n 'language.switch': '切换语言',\n 'mermaid.zoomIn': '放大',\n 'mermaid.zoomOut': '缩小',\n 'mermaid.resetZoom': '重置缩放',\n 'mermaid.renderError': 'Mermaid 渲染错误',\n 'mermaid.scrollHint': '点击图表后即可滚轮缩放',\n },\n} satisfies Record<BuiltInLocale, Record<BuiltInTextKey, string>>\n\nexport function resolveBuiltInLocale(locale?: string): BuiltInLocale {\n return locale === 'zh-CN' || locale?.toLowerCase().startsWith('zh') ? 'zh-CN' : 'en'\n}\n\nexport function translateBuiltInText(locale: string | undefined, key: BuiltInTextKey, replacements: Record<string, string> = {}): string {\n let value = builtInText[resolveBuiltInLocale(locale)]?.[key] ?? builtInText.en[key]\n for (const [name, replacement] of Object.entries(replacements)) {\n value = value.replaceAll(`{${name}}`, replacement)\n }\n return value\n}\n\nexport function useBuiltInText(locale?: string) {\n const config = useContext(ConfigContext)\n const currentLocale = useContext(LocaleContext)\n const resolvedLocale = locale ?? currentLocale ?? config?.i18n?.defaultLocale\n return (key: BuiltInTextKey, replacements?: Record<string, string>) => translateBuiltInText(resolvedLocale, key, replacements)\n}\n","export async function copyTextToClipboard(text: string): Promise<boolean> {\n if (typeof navigator !== 'undefined' && navigator.clipboard?.writeText) {\n try {\n await navigator.clipboard.writeText(text)\n return true\n } catch {\n // Fall back to a temporary textarea below.\n }\n }\n\n if (typeof document === 'undefined') return false\n\n const textarea = document.createElement('textarea')\n textarea.value = text\n textarea.setAttribute('readonly', '')\n textarea.style.position = 'fixed'\n textarea.style.top = '-9999px'\n textarea.style.opacity = '0'\n document.body.appendChild(textarea)\n\n try {\n textarea.select()\n return document.execCommand('copy')\n } catch {\n return false\n } finally {\n textarea.remove()\n }\n}\n","import type { Config } from '../types'\n\nexport function isExternalHref(href: string): boolean {\n return /^[a-z][a-z\\d+.-]*:/i.test(href) || href.startsWith('//')\n}\n\nexport function hasLocalePrefix(href: string, config: Config): boolean {\n const firstSegment = href.replace(/^\\/+/, '').split('/')[0]\n return Boolean(firstSegment && config.i18n?.locales.some((locale) => locale.code === firstSegment))\n}\n\nexport function localizeHref(href: string, config: Config, locale?: string): string {\n if (!locale || !config.i18n || isExternalHref(href) || href.startsWith('#')) return href\n if (hasLocalePrefix(href, config)) return href\n if (locale === config.i18n.defaultLocale) return href.startsWith('/') ? href : `/${href}`\n\n const cleanHref = href === '/' ? '' : href.replace(/^\\/+/, '')\n return `/${locale}${cleanHref ? `/${cleanHref}` : ''}`\n}\n\nexport function prefixHref(href: string, routePrefix: string = '/'): string {\n if (isExternalHref(href) || href.startsWith('#')) return href\n if (!routePrefix || routePrefix === '/') return href.startsWith('/') ? href : `/${href}`\n\n const prefix = routePrefix.replace(/^\\/+|\\/+$/g, '')\n const path = href.replace(/^\\/+/, '')\n if (!path) return `/${prefix}`\n if (path === prefix || path.startsWith(`${prefix}/`)) return `/${path}`\n return `/${prefix}/${path}`\n}\n","import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/react'\nimport { Check, ChevronDown, Copy, ExternalLink, FileText, Link2, PencilLine } from 'lucide-react'\nimport { useState } from 'react'\n\nimport { useBuiltInText } from '../i18n'\nimport type { RouteItem } from '../types'\nimport { copyTextToClipboard } from '../utils/clipboard'\nimport { prefixHref } from '../utils/href'\n\ntype ContentActionsProps = {\n route?: RouteItem\n routePrefix?: string\n}\n\ntype CopyState = 'idle' | 'content' | 'link' | 'llms'\ntype CopyAction = {\n key: Exclude<CopyState, 'idle'>\n label: string\n description: string\n icon: typeof Copy\n run: () => Promise<void>\n copiedLabel?: string\n}\n\nfunction resolveContentArtifactUrl(contentArtifactUrl: string, routePrefix: string = '/'): string {\n return prefixHref(contentArtifactUrl, routePrefix)\n}\n\nfunction getAbsoluteUrl(path: string): string {\n if (typeof window === 'undefined') return path\n return new URL(path, window.location.href).href\n}\n\nexport function ContentActions(arg0: ContentActionsProps) {\n const { route, routePrefix } = arg0\n const t = useBuiltInText()\n const [copied, setCopied] = useState<CopyState>('idle')\n\n if (!route?.contentArtifactUrl && !route?.sourceUrl) return null\n\n const contentArtifactUrl = route.contentArtifactUrl ? resolveContentArtifactUrl(route.contentArtifactUrl, routePrefix) : undefined\n const isOpenApi = route.kind === 'openapi'\n const contentTypeLabel = isOpenApi ? 'OpenAPI' : 'Markdown'\n const replacements = { contentType: contentTypeLabel }\n const viewLabel = isOpenApi ? t('contentActions.viewOpenApi') : t('contentActions.viewMarkdown')\n const viewDescription = isOpenApi ? t('contentActions.viewOpenApiDescription') : t('contentActions.viewMarkdownDescription')\n\n function markCopied(state: Exclude<CopyState, 'idle'>) {\n setCopied(state)\n window.setTimeout(() => setCopied('idle'), 1600)\n }\n\n async function handleCopyContent() {\n if (!contentArtifactUrl) return\n const response = await fetch(contentArtifactUrl)\n const text = await response.text()\n if (await copyTextToClipboard(text)) markCopied('content')\n }\n\n const llmsArtifactUrl = resolveContentArtifactUrl('/llms.txt', routePrefix)\n\n async function handleCopyLink() {\n if (!contentArtifactUrl) return\n if (await copyTextToClipboard(getAbsoluteUrl(contentArtifactUrl))) markCopied('link')\n }\n\n async function handleCopyLlms() {\n if (await copyTextToClipboard(getAbsoluteUrl(llmsArtifactUrl))) markCopied('llms')\n }\n\n const actions: CopyAction[] = contentArtifactUrl\n ? [\n {\n key: 'content',\n label: t('contentActions.copyContent'),\n description: t('contentActions.copyContentDescription', replacements),\n icon: Copy,\n run: handleCopyContent,\n copiedLabel: t('contentActions.copiedContent'),\n },\n {\n key: 'link',\n label: t('contentActions.copyLink', replacements),\n description: t('contentActions.copyLinkDescription', replacements),\n icon: Link2,\n run: handleCopyLink,\n copiedLabel: t('contentActions.copiedLink'),\n },\n ]\n : []\n\n const llmsAction: CopyAction = {\n key: 'llms',\n label: t('contentActions.copyLlms'),\n description: t('contentActions.copyLlmsDescription'),\n icon: FileText,\n run: handleCopyLlms,\n copiedLabel: t('contentActions.copiedLlms'),\n }\n const primaryAction = actions[0]\n const PrimaryIcon = primaryAction && copied === primaryAction.key ? Check : primaryAction?.icon ?? PencilLine\n\n return (\n <div className=\"clarify-content-actions not-prose flex shrink-0 justify-start sm:justify-end\">\n <Menu as=\"div\" className=\"clarify-content-actions-menu relative inline-flex min-w-0 text-sm font-medium\">\n <div className=\"clarify-content-actions-group inline-flex min-w-0 overflow-hidden rounded-full border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) shadow-sm shadow-zinc-900/5\">\n {primaryAction ? (\n <button\n type=\"button\"\n onClick={primaryAction.run}\n className=\"clarify-content-actions-primary clarify-ui-control inline-flex h-8 min-w-0 items-center gap-1.5 px-2.5 transition sm:px-3\"\n >\n <PrimaryIcon className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate\">{copied === primaryAction.key ? t('actions.copied') : primaryAction.label}</span>\n </button>\n ) : (\n <a\n href={route.sourceUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"clarify-content-actions-primary clarify-ui-control inline-flex h-8 min-w-0 items-center gap-1.5 px-2.5 no-underline transition sm:px-3\"\n >\n <PrimaryIcon className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate\">{t('contentActions.editPage')}</span>\n </a>\n )}\n <MenuButton className=\"clarify-content-actions-trigger clarify-ui-control inline-flex h-8 w-8 items-center justify-center border-l border-(--clarify-theme-tokens-colors-border) transition\" aria-label={t('contentActions.copyOptions')}>\n <ChevronDown className=\"h-3.5 w-3.5\" />\n </MenuButton>\n </div>\n <MenuItems\n modal={false}\n anchor=\"bottom end\"\n className=\"clarify-content-actions-list clarify-ui-menu z-30 mt-2 w-(--clarify-ui-action-menu-width) origin-top-right rounded-(--clarify-theme-tokens-radius-xl) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-1.5 shadow-xl shadow-zinc-900/5 transition [--anchor-gap:--spacing(2)] focus:outline-none data-closed:scale-95 data-closed:opacity-0\"\n >\n {route.sourceUrl ? (\n <MenuItem>\n <a\n href={route.sourceUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"clarify-content-actions-item clarify-ui-menu-item group flex w-full items-center gap-2 rounded-(--clarify-theme-tokens-radius-lg) px-1.5 py-1.5 text-left no-underline transition\"\n >\n <span className=\"clarify-ui-menu-icon flex shrink-0 rounded-(--clarify-theme-tokens-radius-md) border border-(--clarify-theme-tokens-colors-border) p-1.5\">\n <PencilLine className=\"h-4 w-4\" />\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col px-1\">\n <span className=\"clarify-ui-menu-title flex items-center gap-1\">\n {t('contentActions.editPage')}\n <ExternalLink className=\"clarify-ui-menu-icon h-3 w-3\" />\n </span>\n <span className=\"clarify-ui-menu-description truncate\">{t('contentActions.editPageDescription')}</span>\n </span>\n <Check className=\"h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-primary) opacity-0\" />\n </a>\n </MenuItem>\n ) : null}\n {actions.slice(0, 1).map((action) => {\n const Icon = action.icon\n const isCopied = copied === action.key\n\n return (\n <MenuItem key={action.key}>\n <button\n type=\"button\"\n onClick={action.run}\n className=\"clarify-content-actions-item clarify-ui-menu-item group flex w-full items-center gap-2 rounded-(--clarify-theme-tokens-radius-lg) px-1.5 py-1.5 text-left transition\"\n >\n <span className=\"clarify-ui-menu-icon flex shrink-0 rounded-(--clarify-theme-tokens-radius-md) border border-(--clarify-theme-tokens-colors-border) p-1.5\">\n <Icon className=\"h-4 w-4\" />\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col px-1\">\n <span className=\"clarify-ui-menu-title\">{isCopied ? t('contentActions.copiedContent') : action.label}</span>\n <span className=\"clarify-ui-menu-description truncate\">{action.description}</span>\n </span>\n <Check className={`h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-primary) transition ${isCopied ? 'opacity-100' : 'opacity-0'}`} />\n </button>\n </MenuItem>\n )\n })}\n {contentArtifactUrl ? (\n <MenuItem>\n <a\n href={contentArtifactUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"clarify-content-actions-item clarify-ui-menu-item group flex w-full items-center gap-2 rounded-(--clarify-theme-tokens-radius-lg) px-1.5 py-1.5 text-left no-underline transition\"\n >\n <span className=\"clarify-ui-menu-icon flex shrink-0 rounded-(--clarify-theme-tokens-radius-md) border border-(--clarify-theme-tokens-colors-border) p-1.5\">\n <FileText className=\"h-4 w-4\" />\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col px-1\">\n <span className=\"clarify-ui-menu-title flex items-center gap-1\">\n {viewLabel}\n <ExternalLink className=\"clarify-ui-menu-icon h-3 w-3\" />\n </span>\n <span className=\"clarify-ui-menu-description truncate\">{viewDescription}</span>\n </span>\n <Check className=\"h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-primary) opacity-0\" />\n </a>\n </MenuItem>\n ) : null}\n {actions.slice(1).map((action) => {\n const Icon = action.icon\n const isCopied = copied === action.key\n\n return (\n <MenuItem key={action.key}>\n <button\n type=\"button\"\n onClick={action.run}\n className=\"clarify-content-actions-item clarify-ui-menu-item group flex w-full items-center gap-2 rounded-(--clarify-theme-tokens-radius-lg) px-1.5 py-1.5 text-left transition\"\n >\n <span className=\"clarify-ui-menu-icon flex shrink-0 rounded-(--clarify-theme-tokens-radius-md) border border-(--clarify-theme-tokens-colors-border) p-1.5\">\n <Icon className=\"h-4 w-4\" />\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col px-1\">\n <span className=\"clarify-ui-menu-title\">{isCopied ? action.copiedLabel ?? action.label : action.label}</span>\n <span className=\"clarify-ui-menu-description truncate\">{action.description}</span>\n </span>\n <Check className={`h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-primary) transition ${isCopied ? 'opacity-100' : 'opacity-0'}`} />\n </button>\n </MenuItem>\n )\n })}\n <MenuItem key={llmsAction.key}>\n <button\n type=\"button\"\n onClick={llmsAction.run}\n className=\"clarify-content-actions-item clarify-ui-menu-item group flex w-full items-center gap-2 rounded-(--clarify-theme-tokens-radius-lg) px-1.5 py-1.5 text-left transition\"\n >\n <span className=\"clarify-ui-menu-icon flex shrink-0 rounded-(--clarify-theme-tokens-radius-md) border border-(--clarify-theme-tokens-colors-border) p-1.5\">\n <FileText className=\"h-4 w-4\" />\n </span>\n <span className=\"flex min-w-0 flex-1 flex-col px-1\">\n <span className=\"clarify-ui-menu-title\">{copied === llmsAction.key ? llmsAction.copiedLabel ?? llmsAction.label : llmsAction.label}</span>\n <span className=\"clarify-ui-menu-description truncate\">{llmsAction.description}</span>\n </span>\n <Check className={`h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-primary) transition ${copied === llmsAction.key ? 'opacity-100' : 'opacity-0'}`} />\n </button>\n </MenuItem>\n </MenuItems>\n </Menu>\n </div>\n )\n}\n","export type ThemePreference = 'light' | 'dark' | 'system'\n\ntype CookieOptions = { domain?: string }\ntype WritableCookieOptions = CookieOptions & { maxAge: number }\n\nexport const themeCookieName = 'clarify-theme'\nexport const localeCookieName = 'clarify-locale'\n\nconst preferenceCookieMaxAge = 60 * 60 * 24 * 365\nconst cookiePath = '/'\n\nexport function isThemePreference(value: string | null | undefined): value is ThemePreference {\n return value === 'light' || value === 'dark' || value === 'system'\n}\n\nexport function readThemeCookie(): ThemePreference | null {\n if (typeof document === 'undefined') return null\n\n const value = readCookieValue(themeCookieName)\n return isThemePreference(value) ? value : null\n}\n\nexport function getStoredThemePreference(): ThemePreference {\n return readThemeCookie() ?? 'system'\n}\n\nexport function storeThemePreference(theme: ThemePreference): void {\n storeSharedPreferenceCookie(themeCookieName, theme)\n}\n\nexport function readLocaleCookie(): string | null {\n if (typeof document === 'undefined') return null\n return readCookieValue(localeCookieName)\n}\n\nexport function getStoredLocalePreference(locales?: readonly string[]): string | null {\n const locale = readLocaleCookie()\n if (!locale) return null\n return locales && !locales.includes(locale) ? null : locale\n}\n\nexport function storeLocalePreference(locale: string): void {\n storeSharedPreferenceCookie(localeCookieName, locale)\n}\n\nfunction storeSharedPreferenceCookie(name: string, value: string): void {\n if (typeof document === 'undefined') return\n\n const domains = resolveSharedCookieDomains()\n const domain = resolveWritableSharedCookieDomain(domains, name)\n\n deleteCookie(name)\n\n for (const candidateDomain of domains) {\n deleteCookie(name, { domain: candidateDomain })\n }\n\n writeCookie(name, value, { domain: domain ?? undefined, maxAge: preferenceCookieMaxAge })\n}\n\nexport function resolveSharedCookieDomains(hostname = typeof window !== 'undefined' ? window.location.hostname : ''): string[] {\n const normalizedHostname = hostname.toLowerCase().replace(/\\.$/, '')\n\n if (!normalizedHostname || normalizedHostname === 'localhost' || normalizedHostname.endsWith('.localhost') || isIpAddress(normalizedHostname)) {\n return []\n }\n\n const parts = normalizedHostname.split('.')\n\n if (parts.length < 2) return []\n\n const domains: string[] = []\n\n for (let index = parts.length - 2; index >= 0; index -= 1) {\n domains.push(parts.slice(index).join('.'))\n }\n\n return domains\n}\n\nfunction resolveWritableSharedCookieDomain(domains: string[], probePrefix = themeCookieName): string | null {\n for (const domain of domains) {\n const probeName = `${probePrefix}-probe-${Date.now()}-${Math.random().toString(36).slice(2)}`\n const probeValue = '1'\n\n writeCookie(probeName, probeValue, { domain, maxAge: 60 })\n\n const isWritable = readCookieValue(probeName) === probeValue\n deleteCookie(probeName, { domain })\n\n if (isWritable) return domain\n }\n\n return null\n}\n\nfunction readCookieValue(cookieName: string): string | null {\n const cookies = document.cookie ? document.cookie.split('; ') : []\n\n for (const cookie of cookies) {\n const separatorIndex = cookie.indexOf('=')\n const name = separatorIndex === -1 ? cookie : cookie.slice(0, separatorIndex)\n\n if (decodeURIComponent(name) !== cookieName) continue\n\n return separatorIndex === -1 ? '' : decodeURIComponent(cookie.slice(separatorIndex + 1))\n }\n\n return null\n}\n\nfunction deleteCookie(name: string, options: CookieOptions = {}): void {\n writeCookie(name, '', { domain: options.domain, maxAge: 0 })\n}\n\nfunction writeCookie(name: string, value: string, options: WritableCookieOptions): void {\n const attributes = [\n `${encodeURIComponent(name)}=${encodeURIComponent(value)}`,\n `Path=${cookiePath}`,\n `Max-Age=${options.maxAge}`,\n 'SameSite=Lax',\n ]\n\n if (options.domain) attributes.push(`Domain=.${options.domain}`)\n if (typeof window !== 'undefined' && window.location.protocol === 'https:') attributes.push('Secure')\n\n try {\n document.cookie = attributes.join('; ')\n } catch {\n // Ignore cookie write failures from restricted embeds.\n }\n}\n\nfunction isIpAddress(hostname: string): boolean {\n return /^\\d{1,3}(?:\\.\\d{1,3}){3}$/.test(hostname) || hostname.includes(':')\n}\n","import { createContext, useContext, useEffect, useMemo, useState } from 'react'\nimport type { ReactNode } from 'react'\n\nimport { getStoredThemePreference, storeThemePreference } from './cookies'\nimport type { ThemePreference } from './cookies'\n\nexport type Theme = ThemePreference\nexport type ResolvedTheme = 'light' | 'dark'\n\ntype ThemeContextValue = {\n theme: Theme\n resolvedTheme: ResolvedTheme\n setTheme: (theme: Theme) => void\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null)\n\nfunction getSystemTheme(): ResolvedTheme {\n if (typeof window === 'undefined') {\n return 'light'\n }\n\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'\n}\n\nfunction getStoredTheme(): Theme {\n if (typeof window === 'undefined') {\n return 'system'\n }\n\n return getStoredThemePreference()\n}\n\nfunction storeTheme(theme: Theme) {\n storeThemePreference(theme)\n}\n\nfunction applyTheme(resolvedTheme: ResolvedTheme) {\n if (typeof document === 'undefined') {\n return\n }\n\n document.documentElement.classList.toggle('dark', resolvedTheme === 'dark')\n document.documentElement.style.colorScheme = resolvedTheme\n}\n\ntype ThemeProviderProps = { children: ReactNode }\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n const { children } = props\n\n const [theme, setThemeState] = useState<Theme>(() => getStoredTheme())\n const [systemTheme, setSystemTheme] = useState<ResolvedTheme>(() => getSystemTheme())\n const resolvedTheme = theme === 'system' ? systemTheme : theme\n\n useEffect(() => {\n applyTheme(resolvedTheme)\n }, [resolvedTheme])\n\n useEffect(() => {\n if (typeof window === 'undefined') {\n return undefined\n }\n\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n\n function updateSystemTheme() {\n setSystemTheme(mediaQuery.matches ? 'dark' : 'light')\n }\n\n updateSystemTheme()\n mediaQuery.addEventListener('change', updateSystemTheme)\n\n return () => mediaQuery.removeEventListener('change', updateSystemTheme)\n }, [])\n\n const value = useMemo<ThemeContextValue>(\n () => ({\n theme,\n resolvedTheme,\n setTheme(nextTheme) {\n setThemeState(nextTheme)\n storeTheme(nextTheme)\n },\n }),\n [resolvedTheme, theme],\n )\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>\n}\n\nexport function useTheme() {\n const context = useContext(ThemeContext)\n\n if (!context) {\n throw new Error('[clarify] useTheme must be used within ThemeProvider')\n }\n\n return context\n}\n","import { Monitor, Moon, Sun } from 'lucide-react'\n\nimport { useBuiltInText } from '../core/i18n'\n\nimport { useTheme } from './ThemeProvider'\n\nexport function ThemeToggle() {\n const { theme, setTheme } = useTheme()\n const t = useBuiltInText()\n const nextTheme = getNextTheme(theme)\n const label = getThemeLabel(nextTheme, t)\n\n return (\n <button\n type=\"button\"\n className=\"clarify-theme-toggle relative flex size-8 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition hover:bg-(--clarify-ui-hover-background)\"\n aria-label={label}\n title={label}\n onClick={() => setTheme(nextTheme)}\n >\n <span className=\"absolute size-12 pointer-fine:hidden\" />\n {theme === 'system' ? <Monitor className=\"h-5 w-5 stroke-(--clarify-theme-tokens-colors-foreground)\" /> : null}\n {theme === 'light' ? <Sun className=\"h-5 w-5 stroke-(--clarify-theme-tokens-colors-foreground)\" /> : null}\n {theme === 'dark' ? <Moon className=\"h-5 w-5 stroke-white\" /> : null}\n </button>\n )\n}\n\nfunction getNextTheme(theme: 'light' | 'dark' | 'system') {\n if (theme === 'system') return 'light'\n if (theme === 'light') return 'dark'\n return 'system'\n}\n\nfunction getThemeLabel(theme: 'light' | 'dark' | 'system', t: ReturnType<typeof useBuiltInText>) {\n if (theme === 'dark') return t('theme.switchToDark')\n if (theme === 'light') return t('theme.switchToLight')\n return t('theme.switchToSystem')\n}\n","import type { LocalizedText } from '../core/types'\n\n/**\n * Resolve a localized text value for the given locale.\n * Falls back to the fallback locale, then the first available value,\n * then an empty string.\n */\nexport function resolveLocalizedText(text: LocalizedText, locale?: string, fallbackLocale?: string): string {\n if (typeof text === 'string') return text\n return (locale ? text[locale] : undefined)\n ?? (fallbackLocale ? text[fallbackLocale] : undefined)\n ?? Object.values(text)[0]\n ?? ''\n}\n","export function normalizeRoutePath(path: string): string {\n const [pathname, suffix = ''] = path.split(/([?#].*)/, 2)\n const normalizedPathname = pathname.replace(/^\\/+/, '/').replace(/\\/+$/, '') || '/'\n return `${normalizedPathname}${suffix}`\n}\n\nexport function isSameRoutePath(a: string | undefined, b: string | undefined): boolean {\n if (!a || !b) return false\n return normalizeRoutePath(a) === normalizeRoutePath(b)\n}\n","import * as LucideIcons from 'lucide-react'\nimport type { ComponentType, SVGProps } from 'react'\n\nexport type LucideIconComponent = ComponentType<SVGProps<SVGSVGElement>>\n\n/**\n * Registry of all Lucide icon components keyed by their PascalCase export name.\n *\n * Access icons via index lookup (e.g. `lucideIconRegistry[name]`) so React\n * tooling does not mistake the access for a component created during render.\n */\nexport const lucideIconRegistry = LucideIcons as unknown as Record<string, LucideIconComponent | undefined>\n\nfunction toPascalCase(value: string): string {\n return value\n .split(/[^a-zA-Z0-9]+/)\n .filter(Boolean)\n .map(part => `${part.charAt(0).toUpperCase()}${part.slice(1)}`)\n .join('')\n}\n\n/**\n * Resolve an icon name into the matching Lucide registry key.\n *\n * Accepts both the exact PascalCase export name (e.g. `ArrowRight`) and\n * kebab/space/snake variants (e.g. `arrow-right`), returning `undefined`\n * when no matching icon exists.\n */\nexport function resolveLucideIconName(name: string | undefined): string | undefined {\n if (!name) return undefined\n if (lucideIconRegistry[name]) return name\n const pascalName = toPascalCase(name)\n return lucideIconRegistry[pascalName] ? pascalName : undefined\n}\n","import clsx from 'clsx'\n\nimport { lucideIconRegistry, resolveLucideIconName } from '../utils/lucide'\n\nexport type NavigationIconProps = { name?: string; className?: string }\n\nexport function NavigationIcon(arg0: NavigationIconProps) {\n const { name, className } = arg0\n\n if (!name) return null\n\n const iconName = resolveLucideIconName(name)\n if (!iconName) return null\n\n const Icon = lucideIconRegistry[iconName]\n if (!Icon) return null\n\n return <Icon className={clsx('shrink-0 stroke-current', className)} aria-hidden=\"true\" />\n}\n","export function remToPx(remValue: number) {\n const rootFontSize =\n typeof window === 'undefined'\n ? 16\n : Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize)\n\n return remValue * rootFontSize\n}\n","import {\n useCallback,\n createContext,\n useContext,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n type ReactNode,\n type RefObject,\n} from 'react'\nimport { createStore, useStore, type StoreApi } from 'zustand'\n\nimport { remToPx } from '../utils/remToPx'\n\nexport interface Section {\n id: string\n title: string\n level?: number\n offsetRem?: number\n badge?: string\n tags?: string[]\n headingRef?: RefObject<HTMLHeadingElement | null>\n}\n\ninterface SectionState {\n sections: Section[]\n visibleSections: string[]\n setVisibleSections: (visibleSections: string[]) => void\n registerHeading: (heading: {\n id: string\n ref: RefObject<HTMLHeadingElement | null>\n offsetRem: number\n }) => void\n}\n\nfunction createSectionStore(sections: Section[]) {\n return createStore<SectionState>()((set) => ({\n sections,\n visibleSections: [],\n setVisibleSections: (visibleSections) =>\n set((state) =>\n state.visibleSections.join() === visibleSections.join()\n ? {}\n : { visibleSections },\n ),\n registerHeading: ({ id, ref, offsetRem }) =>\n set((state) => ({\n sections: state.sections.map((section) =>\n section.id === id\n ? {\n ...section,\n headingRef: ref,\n offsetRem,\n }\n : section,\n ),\n })),\n }))\n}\n\nfunction getHeaderBlockedTop(innerHeight: number, headerTopAreaRef?: RefObject<HTMLDivElement | null>) {\n const blockedTop = headerTopAreaRef?.current?.offsetHeight ?? 0\n return Math.max(0, Math.min(innerHeight, blockedTop))\n}\n\nfunction getVisibleViewportTop(scrollY: number, innerHeight: number, headerTopAreaRef?: RefObject<HTMLDivElement | null>) {\n return scrollY + getHeaderBlockedTop(innerHeight, headerTopAreaRef)\n}\n\nfunction getVisibleViewportBottom(scrollY: number, innerHeight: number, headerTopAreaRef?: RefObject<HTMLDivElement | null>) {\n const blockedTop = getHeaderBlockedTop(innerHeight, headerTopAreaRef)\n\n return scrollY + Math.max(0, innerHeight - blockedTop)\n}\n\ntype VisibilitySnapshot = {\n scrollY: number\n innerHeight: number\n blockedTop: number\n viewportTop: number\n viewportBottom: number\n visibleSections: string[]\n}\n\nfunction computeVisibleSections(sections: Section[], scrollY: number, viewportTop: number, viewportBottom: number) {\n const visibleSections: string[] = []\n\n for (let sectionIndex = 0; sectionIndex < sections.length; sectionIndex += 1) {\n const { id, headingRef, offsetRem = 0 } = sections[sectionIndex]\n\n if (!headingRef?.current) continue\n\n const offset = remToPx(offsetRem)\n const top = headingRef.current.getBoundingClientRect().top + scrollY\n const sectionTop = top - offset\n\n if (sectionIndex === 0 && sectionTop > viewportTop) {\n visibleSections.push('_top')\n }\n\n const nextSection = sections[sectionIndex + 1]\n const nextOffset = remToPx(nextSection?.offsetRem ?? offsetRem)\n const sectionBottom =\n (nextSection?.headingRef?.current?.getBoundingClientRect().top ?? Infinity) +\n scrollY -\n nextOffset\n\n if (sectionBottom > viewportTop && sectionTop < viewportBottom) {\n visibleSections.push(id)\n }\n }\n\n return visibleSections\n}\n\nfunction useSectionVisibilityDebug(headerTopAreaRef?: RefObject<HTMLDivElement | null>) {\n const lastDebugSignatureRef = useRef('')\n\n return (snapshot: VisibilitySnapshot) => {\n const { scrollY, innerHeight, blockedTop, visibleSections } = snapshot\n const debugSignature = [\n Math.round(scrollY),\n innerHeight,\n Math.round(blockedTop),\n visibleSections.join(','),\n ].join('|')\n\n if (lastDebugSignatureRef.current === debugSignature) return\n lastDebugSignatureRef.current = debugSignature\n\n console.info('[clarify][section-visibility]', {\n ...snapshot,\n topAreaHeight: headerTopAreaRef?.current?.offsetHeight ?? 0,\n })\n }\n}\n\nfunction useSectionVisibilityObserver(checkVisibleSections: () => void, headerTopAreaRef?: RefObject<HTMLDivElement | null>) {\n useEffect(() => {\n const raf = window.requestAnimationFrame(() => checkVisibleSections())\n window.addEventListener('scroll', checkVisibleSections, { passive: true })\n window.addEventListener('resize', checkVisibleSections)\n\n const resizeObserver =\n typeof ResizeObserver === 'undefined'\n ? undefined\n : new ResizeObserver(() => {\n checkVisibleSections()\n })\n if (resizeObserver && headerTopAreaRef?.current) {\n resizeObserver.observe(headerTopAreaRef.current)\n }\n\n return () => {\n window.cancelAnimationFrame(raf)\n window.removeEventListener('scroll', checkVisibleSections)\n window.removeEventListener('resize', checkVisibleSections)\n resizeObserver?.disconnect()\n }\n }, [checkVisibleSections, headerTopAreaRef])\n}\n\nfunction useVisibleSections(sectionStore: StoreApi<SectionState>, headerTopAreaRef?: RefObject<HTMLDivElement | null>) {\n const setVisibleSections = useStore(sectionStore, (state) => state.setVisibleSections)\n const sections = useStore(sectionStore, (state) => state.sections)\n const emitVisibilityDebug = useSectionVisibilityDebug(headerTopAreaRef)\n\n const checkVisibleSections = useCallback(() => {\n const { innerHeight, scrollY } = window\n const viewportTop = getVisibleViewportTop(scrollY, innerHeight, headerTopAreaRef)\n const viewportBottom = getVisibleViewportBottom(scrollY, innerHeight, headerTopAreaRef)\n const blockedTop = getHeaderBlockedTop(innerHeight, headerTopAreaRef)\n const newVisibleSections = computeVisibleSections(sections, scrollY, viewportTop, viewportBottom)\n\n emitVisibilityDebug({\n scrollY,\n innerHeight,\n blockedTop,\n viewportTop,\n viewportBottom,\n visibleSections: newVisibleSections,\n })\n\n setVisibleSections(newVisibleSections)\n }, [emitVisibilityDebug, headerTopAreaRef, sections, setVisibleSections])\n\n useSectionVisibilityObserver(checkVisibleSections, headerTopAreaRef)\n}\n\nfunction useSyncSections(sectionStore: StoreApi<SectionState>, sections: Section[]) {\n useIsomorphicLayoutEffect(() => {\n sectionStore.setState((state) => ({\n sections: sections.map((section) => {\n const registeredSection = state.sections.find((item) => item.id === section.id)\n return {\n ...section,\n headingRef: registeredSection?.headingRef,\n offsetRem: registeredSection?.offsetRem ?? section.offsetRem,\n }\n }),\n visibleSections: [],\n }))\n }, [sectionStore, sections])\n}\n\nconst SectionStoreContext = createContext<StoreApi<SectionState> | null>(null)\n\nconst useIsomorphicLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect\n\ntype SectionProviderProps = {\n sections: Section[]\n headerTopAreaRef?: RefObject<HTMLDivElement | null>\n children: ReactNode\n}\n\nexport function SectionProvider(arg0: SectionProviderProps) { const {\n sections,\n headerTopAreaRef,\n children,\n} = arg0\n\n const [sectionStore] = useState(() => createSectionStore(sections))\n\n useVisibleSections(sectionStore, headerTopAreaRef)\n useSyncSections(sectionStore, sections)\n\n return <SectionStoreContext.Provider value={sectionStore}>{children}</SectionStoreContext.Provider>\n}\n\nexport function useSectionStore<T>(selector: (state: SectionState) => T) {\n const store = useContext(SectionStoreContext)\n\n if (!store) {\n throw new Error('[clarify] useSectionStore must be used within SectionProvider')\n }\n\n return useStore(store, selector)\n}\n","import { CloseButton } from '@headlessui/react'\nimport clsx from 'clsx'\nimport { AnimatePresence, motion, useIsPresent } from 'framer-motion'\nimport { useState } from 'react'\nimport { Link, useLocation } from 'react-router-dom'\n\nimport { useSectionStore } from '../app/SectionProvider'\nimport { useBuiltInText } from '../i18n'\nimport type { NavigationNode } from '../types'\nimport { isSameRoutePath, normalizeRoutePath } from '../utils/path'\nimport { remToPx } from '../utils/remToPx'\n\nimport { NavigationIcon } from './icons'\nimport { useIsInsideMobileNavigation } from './mobile'\n\ntype NavGroup = {\n title: string\n icon?: string\n links: Array<{\n title: string\n href: string\n icon?: string\n }>\n}\n\nfunction useInitialValue<T>(value: T, condition = true) {\n const [initialValue] = useState(value)\n return condition ? initialValue : value\n}\n\nfunction normalizePath(path: string) {\n return path === '' ? '/' : path\n}\n\nfunction navigationToGroups(navigation: NavigationNode[], defaultTitle: string): NavGroup[] {\n return navigation.map((node) => {\n const children = node.children?.length ? node.children : [node]\n\n return {\n title: node.children?.length ? node.title : defaultTitle,\n icon: node.icon,\n links: children.map((child) => ({\n title: child.title,\n href: normalizePath(child.path),\n icon: child.icon,\n })),\n }\n })\n}\n\nconst sectionBadgeColorStyles: Record<string, string> = {\n GET: 'text-emerald-500 dark:text-emerald-400',\n POST: 'text-sky-500 dark:text-sky-400',\n PUT: 'text-amber-500 dark:text-amber-400',\n PATCH: 'text-amber-500 dark:text-amber-400',\n DELETE: 'text-red-500 dark:text-rose-500',\n OPTIONS: 'text-violet-500 dark:text-violet-400',\n HEAD: 'text-zinc-500 dark:text-zinc-400',\n TRACE: 'text-fuchsia-500 dark:text-fuchsia-400',\n}\n\ntype SectionBadgeProps = { children: string }\n\nfunction SectionBadge(arg0: SectionBadgeProps) { const { children } = arg0\n\n return (\n <span\n className={clsx(\n 'clarify-navigation-section-badge inline-flex shrink-0 justify-end font-semibold uppercase tracking-wide',\n sectionBadgeColorStyles[children.toUpperCase()] ?? 'clarify-ui-menu-description',\n )}\n >\n {children}\n </span>\n )\n}\n\ntype NavLinkProps = {\n href: string\n children: React.ReactNode\n badge?: string\n icon?: string\n tags?: string[]\n active?: boolean\n isAnchorLink?: boolean\n level?: number\n}\n\nfunction NavLink(arg0: NavLinkProps) { const {\n href,\n children,\n badge,\n icon,\n active = false,\n isAnchorLink = false,\n level,\n} = arg0\n\n return (\n <CloseButton\n as={Link}\n to={href}\n aria-current={active ? 'page' : undefined}\n className={clsx(\n 'clarify-navigation-link flex h-8 items-center justify-between gap-2 pr-3 transition',\n isAnchorLink ? 'clarify-navigation-anchor-link' : 'pl-4',\n )}\n style={isAnchorLink ? { paddingLeft: `${1.75 + Math.max(0, (level ?? 2) - 2) * 0.75}rem` } : undefined}\n >\n <span className=\"flex min-w-0 flex-1 items-center gap-2\">\n {icon ? <NavigationIcon name={icon} className=\"h-3.5 w-3.5\" /> : null}\n {badge ? <SectionBadge>{badge}</SectionBadge> : null}\n <span className=\"min-w-0 truncate whitespace-nowrap\">{children}</span>\n </span>\n </CloseButton>\n )\n}\n\ntype VisibleSectionHighlightProps = { group: NavGroup; pathname: string }\n\nfunction VisibleSectionHighlight(arg0: VisibleSectionHighlightProps) { const { group, pathname } = arg0\n\n const [sections, visibleSections] = useInitialValue(\n [useSectionStore((s) => s.sections), useSectionStore((s) => s.visibleSections)],\n useIsInsideMobileNavigation(),\n )\n\n const isPresent = useIsPresent()\n const firstVisibleSectionIndex = Math.max(\n 0,\n [{ id: '_top' }, ...sections].findIndex((section) => section.id === visibleSections[0]),\n )\n const itemHeight = remToPx(2)\n const height = isPresent ? Math.max(1, visibleSections.length) * itemHeight : itemHeight\n const top = group.links.findIndex((link) => isSameRoutePath(link.href, pathname)) * itemHeight + firstVisibleSectionIndex * itemHeight\n\n return (\n <motion.div\n initial={{ opacity: 0, height: 0 }}\n animate={{ opacity: 1, top, height, transition: { duration: 0.2, ease: 'easeOut' } }}\n exit={{ opacity: 0, height: 0, transition: { duration: 0.15, ease: 'easeIn' } }}\n className=\"clarify-navigation-section-highlight absolute inset-x-0 top-0 will-change-transform\"\n style={{ borderRadius: 'var(--clarify-theme-tokens-radius-sm)', height, top }}\n />\n )\n}\n\ntype ActivePageMarkerProps = { group: NavGroup; pathname: string }\n\nfunction ActivePageMarker(arg0: ActivePageMarkerProps) { const { group, pathname } = arg0\n\n const itemHeight = remToPx(2)\n const offset = remToPx(0.25)\n const activePageIndex = group.links.findIndex((link) => isSameRoutePath(link.href, pathname))\n const top = offset + activePageIndex * itemHeight\n\n return (\n <motion.div\n className=\"absolute left-2 h-6 w-px bg-(--clarify-theme-tokens-colors-primary)\"\n initial={{ opacity: 0, top }}\n animate={{ opacity: 1, top, transition: { duration: 0.2, ease: 'easeOut' } }}\n exit={{ opacity: 0, transition: { duration: 0.15, ease: 'easeIn' } }}\n style={{ top }}\n />\n )\n}\n\ntype NavigationGroupProps = { group: NavGroup; className?: string }\n\nfunction NavigationGroup(arg0: NavigationGroupProps) { const { group, className } = arg0\n\n const isInsideMobileNavigation = useIsInsideMobileNavigation()\n const [pathname, sections] = useInitialValue(\n [normalizeRoutePath(useLocation().pathname), useSectionStore((s) => s.sections)],\n isInsideMobileNavigation,\n )\n const isActiveGroup = group.links.findIndex((link) => isSameRoutePath(link.href, pathname)) !== -1\n\n return (\n <li className={clsx('clarify-navigation-group relative mb-6', className)}>\n <h2 className=\"clarify-navigation-group-title flex items-center gap-2\">\n <NavigationIcon name={group.icon} className=\"clarify-navigation-group-title-icon h-3.5 w-3.5\" />\n <span>{group.title}</span>\n </h2>\n <div className=\"relative mt-3 pl-2\">\n <AnimatePresence initial={!isInsideMobileNavigation}>\n {isActiveGroup ? <VisibleSectionHighlight group={group} pathname={pathname} /> : null}\n </AnimatePresence>\n <div className=\"absolute inset-y-0 left-2 w-px bg-(--clarify-theme-tokens-colors-border) dark:bg-white/5\" />\n <AnimatePresence initial={false}>\n {isActiveGroup ? <ActivePageMarker group={group} pathname={pathname} /> : null}\n </AnimatePresence>\n <ul role=\"list\" className=\"border-l border-transparent\">\n {group.links.map((link) => {\n const active = isSameRoutePath(link.href, pathname)\n return (\n <li key={link.href} className=\"relative\">\n <NavLink href={link.href} icon={link.icon} active={active}>\n {link.title}\n </NavLink>\n <AnimatePresence initial={false}>\n {active && sections.length > 0 ? (\n <motion.ul\n role=\"list\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1, transition: { delay: 0.1 } }}\n exit={{ opacity: 0, transition: { duration: 0.15 } }}\n >\n {sections.map((section) => (\n <li key={section.id}>\n <NavLink href={`${link.href}#${section.id}`} badge={section.badge} tags={section.tags} isAnchorLink level={section.level}>\n {section.title}\n </NavLink>\n </li>\n ))}\n </motion.ul>\n ) : null}\n </AnimatePresence>\n </li>\n )\n })}\n </ul>\n </div>\n </li>\n )\n}\n\nexport type NavigationProps = { navigation: NavigationNode[]; className?: string }\n\nexport function Navigation(arg0: NavigationProps) { const { navigation, className } = arg0\n\n const t = useBuiltInText()\n const groups = navigationToGroups(navigation, t('navigation.documentation'))\n\n return (\n <nav className={clsx('clarify-navigation', className)}>\n <ul role=\"list\" className=\"clarify-navigation-list\">\n {groups.map((group, groupIndex) => (\n <NavigationGroup key={group.title} group={group} className={groupIndex === 0 ? 'mt-0' : ''} />\n ))}\n </ul>\n </nav>\n )\n}\n","import { Dialog, DialogBackdrop, DialogPanel, Menu, MenuButton, MenuItem, MenuItems, TransitionChild } from '@headlessui/react'\nimport clsx from 'clsx'\nimport { motion } from 'framer-motion'\nimport { Check, ChevronDown, Menu as MenuGlyph, X } from 'lucide-react'\nimport { createContext, Suspense, useContext } from 'react'\nimport { Link, useLocation } from 'react-router-dom'\nimport { create } from 'zustand'\n\nimport { useBuiltInText } from '../i18n'\nimport type { Config, NavigationNode, NavigationTab, RouteItem } from '../types'\nimport { isSameRoutePath, normalizeRoutePath } from '../utils/path'\n\nimport { Header } from './Header'\nimport { NavigationIcon } from './icons'\nimport { Navigation } from './Navigation'\n\nconst IsInsideMobileNavigationContext = createContext(false)\n\nfunction hasPath(nodes: NavigationNode[], pathname: string): boolean {\n return nodes.some((node) => isSameRoutePath(node.path, pathname) || hasPath(node.children ?? [], pathname))\n}\n\nfunction isActiveTab(tab: NavigationTab, pathname: string): boolean {\n return isSameRoutePath(tab.path, pathname) || hasPath(tab.children, pathname)\n}\n\ntype MobileTabsSelectProps = { tabs?: NavigationTab[] }\n\nfunction MobileTabsSelect(arg0: MobileTabsSelectProps) {\n const { tabs } = arg0\n const pathname = normalizeRoutePath(useLocation().pathname)\n if (!tabs?.length) return null\n\n const activeTab = tabs.find((tab) => isActiveTab(tab, pathname)) ?? tabs[0]\n\n return (\n <Menu as=\"div\" className=\"clarify-mobile-tabs-select mb-6\">\n <MenuButton className=\"clarify-mobile-tabs-select-trigger clarify-ui-control group flex h-10 w-full items-center justify-between gap-2 rounded-(--clarify-theme-tokens-radius-xl) border border-(--clarify-theme-tokens-colors-border) px-4 text-left font-semibold shadow-xs shadow-zinc-900/5 transition dark:border-white/10\">\n <span className=\"flex min-w-0 items-center gap-2\">\n <NavigationIcon name={activeTab.icon} className=\"h-4 w-4 shrink-0 text-(--clarify-theme-tokens-colors-primary)\" />\n <span className=\"truncate\">{activeTab.title}</span>\n </span>\n <ChevronDown className=\"h-4 w-4 shrink-0 text-(--clarify-theme-tokens-colors-muted) transition-transform group-aria-expanded:rotate-180\" />\n </MenuButton>\n <MenuItems className=\"clarify-mobile-tabs-select-list clarify-ui-menu mt-2 flex flex-col gap-1 rounded-(--clarify-theme-tokens-radius-xl) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-1 shadow-lg shadow-zinc-900/5 focus:outline-none dark:border-white/10 dark:bg-zinc-900 dark:shadow-none\">\n {tabs.map((tab) => {\n const active = isActiveTab(tab, pathname)\n\n return (\n <MenuItem key={`${tab.title}-${tab.path}`}>\n <Link\n to={tab.path}\n className={clsx(\n 'clarify-mobile-tabs-select-item clarify-ui-menu-item flex items-center justify-between gap-3 rounded-(--clarify-theme-tokens-radius-lg) px-3 py-2.5 no-underline transition',\n active && 'clarify-ui-menu-item-active',\n )}\n aria-current={active ? 'page' : undefined}\n >\n <span className=\"flex min-w-0 items-start gap-2\">\n <NavigationIcon name={tab.icon} className=\"mt-0.5 h-4 w-4 shrink-0\" />\n <span className=\"min-w-0 whitespace-normal wrap-anywhere font-medium leading-5\">{tab.title}</span>\n </span>\n {active ? <Check className=\"mt-0.5 h-4 w-4 shrink-0\" /> : null}\n </Link>\n </MenuItem>\n )\n })}\n </MenuItems>\n </Menu>\n )\n}\n\ntype MobileNavigationDialogProps = {\n config: Config\n isOpen: boolean\n navigation: NavigationNode[]\n tabs?: NavigationTab[]\n routes: RouteItem[]\n currentLocale?: string\n currentRoute?: RouteItem\n close: () => void\n}\n\nfunction MobileNavigationDialog(arg0: MobileNavigationDialogProps) { const {\n config,\n isOpen,\n navigation,\n tabs,\n routes,\n currentLocale,\n currentRoute,\n close,\n} = arg0\n\n return (\n <Dialog transition open={isOpen} onClose={close} className=\"clarify-mobile-navigation-dialog fixed inset-0 z-50 lg:hidden\">\n <DialogBackdrop\n transition\n className=\"clarify-mobile-navigation-backdrop clarify-ui-backdrop fixed inset-0 top-14 backdrop-blur-xs data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in\"\n />\n\n <DialogPanel>\n <TransitionChild>\n <Header\n config={config}\n navigation={navigation}\n tabs={tabs}\n routes={routes}\n currentLocale={currentLocale}\n currentRoute={currentRoute}\n className=\"data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in\"\n />\n </TransitionChild>\n\n <TransitionChild>\n <motion.div\n layoutScroll\n className=\"clarify-mobile-navigation-panel fixed top-14 bottom-0 left-0 w-full max-w-sm overflow-y-auto bg-(--clarify-theme-tokens-colors-background) px-4 pt-6 pb-4 shadow-lg ring-1 shadow-zinc-900/10 ring-(--clarify-theme-tokens-colors-border) duration-500 ease-in-out data-closed:-translate-x-full sm:px-6 sm:pb-10 dark:bg-zinc-950 dark:ring-zinc-800\"\n >\n <MobileTabsSelect tabs={tabs} />\n <Navigation navigation={navigation} />\n </motion.div>\n </TransitionChild>\n </DialogPanel>\n </Dialog>\n )\n}\n\nexport function useIsInsideMobileNavigation() {\n return useContext(IsInsideMobileNavigationContext)\n}\n\nexport const useMobileNavigationStore = create<{\n isOpen: boolean\n open: () => void\n close: () => void\n toggle: () => void\n}>()((set) => ({\n isOpen: false,\n open: () => set({ isOpen: true }),\n close: () => set({ isOpen: false }),\n toggle: () => set((state) => ({ isOpen: !state.isOpen })),\n}))\n\nexport type MobileNavigationProps = {\n config: Config\n navigation: NavigationNode[]\n tabs?: NavigationTab[]\n routes: RouteItem[]\n currentLocale?: string\n currentRoute?: RouteItem\n}\n\nexport function MobileNavigation(arg0: MobileNavigationProps) { const {\n config,\n navigation,\n tabs,\n routes,\n currentLocale,\n currentRoute,\n} = arg0\n\n const isInsideMobileNavigation = useIsInsideMobileNavigation()\n const { isOpen, toggle, close } = useMobileNavigationStore()\n const t = useBuiltInText()\n const ToggleIcon = isOpen ? X : MenuGlyph\n\n return (\n <IsInsideMobileNavigationContext.Provider value={true}>\n <button\n type=\"button\"\n className=\"clarify-mobile-navigation-button clarify-ui-icon-button relative flex size-8 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition\"\n aria-label={t('navigation.toggle')}\n onClick={toggle}\n >\n <span className=\"absolute size-12 pointer-fine:hidden\" />\n <ToggleIcon className=\"h-4 w-4 stroke-(--clarify-theme-tokens-colors-foreground) dark:stroke-white\" />\n </button>\n {!isInsideMobileNavigation ? (\n <Suspense fallback={null}>\n <MobileNavigationDialog\n config={config}\n navigation={navigation}\n tabs={tabs}\n routes={routes}\n currentLocale={currentLocale}\n currentRoute={currentRoute}\n isOpen={isOpen}\n close={close}\n />\n </Suspense>\n ) : null}\n </IsInsideMobileNavigationContext.Provider>\n )\n}\n","import type { NavigationNode, RouteItem } from '../../types'\n\nimport type { SearchItem } from './types'\n\nfunction routeGroupTitles(navigation: NavigationNode[]) {\n const titles = new Map<string, string>()\n\n for (const node of navigation) {\n if (node.children?.length) {\n for (const child of node.children) {\n titles.set(child.path, node.title)\n }\n } else {\n titles.set(node.path, node.title)\n }\n }\n\n return titles\n}\n\nexport function buildSearchItems(routes: RouteItem[], navigation: NavigationNode[]): SearchItem[] {\n const groupTitles = routeGroupTitles(navigation)\n\n return routes.flatMap((route) => {\n // Skip bare alias routes (e.g., /path) from search to avoid duplicates in multilingual sites\n if (route.isBareAlias) return []\n \n const groupTitle = groupTitles.get(route.path)\n const pageItem: SearchItem = {\n title: route.title,\n pageTitle: route.title,\n sectionTitle: groupTitle,\n url: route.path,\n keywords: [groupTitle, route.title, route.path, route.kind].filter(Boolean).join(' ').toLowerCase(),\n }\n\n const sectionItems = route.sections?.map((section) => ({\n title: section.title,\n pageTitle: route.title,\n sectionTitle: groupTitle,\n url: `${route.path}#${section.id}`,\n keywords: [groupTitle, route.title, section.title, route.path, section.id].filter(Boolean).join(' ').toLowerCase(),\n })) ?? []\n\n return [pageItem, ...sectionItems]\n })\n}\n","import { prefixHref } from '../../utils/href'\n\nimport type { Pagefind } from './types'\n\ntype PagefindModule = {\n createInstance: () => Pagefind\n}\n\nconst pagefindPromises = new Map<string, Promise<Pagefind | null>>()\n\nexport function pagefindCacheKey(routePrefix: string, locale: string | undefined) {\n return `${routePrefix || '/'}:${locale || 'default'}`\n}\n\nexport function loadPagefind(routePrefix: string, locale: string | undefined): Promise<Pagefind | null> {\n if (typeof window === 'undefined') return Promise.resolve(null)\n\n const language = locale ?? document.documentElement.lang\n const cacheKey = pagefindCacheKey(routePrefix, language)\n const cachedPagefind = pagefindPromises.get(cacheKey)\n if (cachedPagefind) {\n return cachedPagefind\n }\n\n const pagefindUrl = prefixHref('/pagefind/pagefind.js', routePrefix)\n const pagefindPromise = import(/* @vite-ignore */ pagefindUrl)\n .then(async (module: PagefindModule) => {\n const previousLanguage = document.documentElement.lang\n if (language) document.documentElement.lang = language\n const pagefind = module.createInstance()\n if (previousLanguage && previousLanguage !== language) document.documentElement.lang = previousLanguage\n await pagefind.init?.()\n return pagefind\n })\n .catch((error: unknown) => {\n pagefindPromises.delete(cacheKey)\n console.warn('[clarify:search] Pagefind instance failed', { cacheKey, language, error })\n return null\n })\n\n pagefindPromises.set(cacheKey, pagefindPromise)\n return pagefindPromise\n}\n\nexport function normalizePagefindUrl(url: string, routePrefix: string): string {\n const parsedUrl = new URL(url, window.location.origin)\n let pathname = parsedUrl.pathname\n const prefix = routePrefix && routePrefix !== '/' ? `/${routePrefix.replace(/^\\/+|\\/+$/g, '')}` : ''\n\n if (prefix && (pathname === prefix || pathname.startsWith(`${prefix}/`))) {\n pathname = pathname.slice(prefix.length) || '/'\n }\n\n return `${pathname}${parsedUrl.search}${parsedUrl.hash}`\n}\n","import clsx from 'clsx'\nimport { LoaderCircle, Search as SearchIcon } from 'lucide-react'\nimport { forwardRef } from 'react'\n\nimport { useBuiltInText } from '../../i18n'\n\nexport const SearchInput = forwardRef<\n React.ElementRef<'input'>,\n {\n query: string\n setQuery: (query: string) => void\n onClose: () => void\n onSubmit: () => void\n activeDescendantId?: string\n loading?: boolean\n }\n>(function SearchInput(arg0, inputRef) {\n const { query, setQuery, onClose, onSubmit, activeDescendantId, loading = false } = arg0\n const t = useBuiltInText()\n const Icon = loading ? LoaderCircle : SearchIcon\n\n return (\n <div className=\"clarify-search-input group relative flex h-12\">\n <Icon\n aria-hidden=\"true\"\n className={clsx(\n 'pointer-events-none absolute top-0 left-3 h-full w-5 stroke-(--clarify-theme-tokens-colors-muted)',\n loading && 'animate-spin',\n )}\n />\n <input\n ref={inputRef}\n data-autofocus\n role=\"combobox\"\n aria-expanded={query !== ''}\n aria-controls=\"clarify-search-results\"\n aria-activedescendant={activeDescendantId}\n value={query}\n onChange={(event) => setQuery(event.currentTarget.value)}\n onKeyDown={(event) => {\n if (event.key === 'Escape') {\n if (query) setQuery('')\n else onClose()\n }\n if (event.key === 'Enter') {\n event.preventDefault()\n onSubmit()\n }\n }}\n placeholder={t('search.placeholder')}\n className=\"clarify-search-field flex-auto appearance-none bg-transparent pr-4 pl-10 outline-hidden focus:w-full focus:flex-none [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden [&::-webkit-search-results-button]:hidden [&::-webkit-search-results-decoration]:hidden\"\n />\n </div>\n )\n})\n","import { Fragment } from 'react'\nimport type { ReactNode } from 'react'\n\nfunction stripHtml(value: string): string {\n if (typeof document === 'undefined') return value.replace(/<[^>]*>/g, '')\n const template = document.createElement('template')\n template.innerHTML = value\n return template.content.textContent ?? ''\n}\n\nfunction escapeRegExp(value: string) {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')\n}\n\ntype HighlightQueryProps = { text: string; query: string }\n\nexport function HighlightQuery(arg0: HighlightQueryProps) {\n const { text, query } = arg0\n\n if (!query) return text\n\n const parts = text.split(new RegExp(`(${escapeRegExp(query)})`, 'ig'))\n\n return (\n <>\n {parts.map((part, index) =>\n part.toLowerCase() === query.toLowerCase() ? (\n <mark key={index} className=\"bg-transparent text-(--clarify-theme-tokens-colors-primary) underline\">\n {part}\n </mark>\n ) : (\n <Fragment key={index}>{part}</Fragment>\n ),\n )}\n </>\n )\n}\n\nfunction renderExcerptNode(node: ChildNode, key: string): ReactNode {\n if (node.nodeType === Node.TEXT_NODE) return node.textContent\n if (node.nodeType !== Node.ELEMENT_NODE) return null\n\n const element = node as HTMLElement\n const children = Array.from(element.childNodes).map((child, index) => renderExcerptNode(child, `${key}-${index}`))\n\n if (element.tagName.toLowerCase() === 'mark') {\n return (\n <mark key={key} className=\"bg-transparent text-(--clarify-theme-tokens-colors-primary) underline\">\n {children}\n </mark>\n )\n }\n\n return <Fragment key={key}>{children}</Fragment>\n}\n\ntype HighlightExcerptProps = { excerpt: string; query: string }\n\nexport function HighlightExcerpt(arg0: HighlightExcerptProps) {\n const { excerpt, query } = arg0\n\n if (typeof document === 'undefined' || !excerpt.includes('<mark')) {\n return <HighlightQuery text={stripHtml(excerpt)} query={query} />\n }\n\n const template = document.createElement('template')\n template.innerHTML = excerpt\n\n return <>{Array.from(template.content.childNodes).map((node, index) => renderExcerptNode(node, String(index)))}</>\n}\n","import clsx from 'clsx'\nimport { Fragment, useId } from 'react'\n\nimport { HighlightExcerpt, HighlightQuery } from './Highlight'\nimport type { SearchDisplayItem } from './types'\n\ntype SearchResultProps = {\n result: SearchDisplayItem\n query: string\n active: boolean\n onActive: () => void\n onSelect: () => void\n}\n\nexport function SearchResult(arg0: SearchResultProps) {\n const { result, query, active, onActive, onSelect } = arg0\n const id = useId()\n const hierarchy = result.type === 'quick'\n ? [result.sectionTitle, result.pageTitle].filter((value): value is string => typeof value === 'string')\n : []\n\n return (\n <li\n id={id}\n className={clsx('clarify-search-result group block cursor-pointer px-4 py-3', active && 'clarify-search-result-active')}\n aria-selected={active}\n onMouseEnter={onActive}\n onMouseMove={onActive}\n onMouseDown={(event) => {\n event.preventDefault()\n onSelect()\n }}\n >\n <div className=\"clarify-search-result-title\">\n <HighlightQuery text={result.title} query={query} />\n </div>\n {hierarchy.length > 0 ? (\n <div className=\"clarify-search-result-hierarchy mt-1 truncate whitespace-nowrap\">\n {hierarchy.map((item, itemIndex, items) => (\n <Fragment key={`${item}-${itemIndex}`}>\n <HighlightQuery text={item} query={query} />\n <span className={itemIndex === items.length - 1 ? 'sr-only' : 'clarify-search-result-separator mx-2'}>/</span>\n </Fragment>\n ))}\n </div>\n ) : null}\n {result.type === 'full-text' && result.excerpt ? (\n <p className=\"clarify-search-result-excerpt mt-1 line-clamp-2 text-xs leading-5 text-(--clarify-theme-tokens-colors-muted)\">\n <HighlightExcerpt excerpt={result.excerpt} query={query} />\n </p>\n ) : null}\n </li>\n )\n}\n","import { Dialog, DialogBackdrop, DialogPanel } from '@headlessui/react'\nimport clsx from 'clsx'\nimport { SearchX } from 'lucide-react'\nimport { useEffect, useMemo, useRef, useState } from 'react'\nimport { useLocation, useNavigate } from 'react-router-dom'\n\nimport { useBuiltInText } from '../../i18n'\nimport type { NavigationNode, RouteItem } from '../../types'\n\nimport { buildSearchItems } from './items'\nimport { loadPagefind, normalizePagefindUrl, pagefindCacheKey } from './pagefind'\nimport { SearchInput } from './SearchInput'\nimport { SearchResult } from './SearchResult'\nimport type { FullTextSearchItem, Pagefind, SearchDisplayItem } from './types'\n\ntype SearchDialogProps = {\n open: boolean\n setOpen: (open: boolean) => void\n routes: RouteItem[]\n navigation: NavigationNode[]\n routePrefix?: string\n currentLocale?: string\n className?: string\n onNavigate?: () => void\n}\n\ntype PagefindState = {\n key: string\n pagefind: Pagefind | null\n available: boolean\n}\n\ntype FullTextSearchState = {\n key: string\n results: FullTextSearchItem[] | null\n}\n\ntype UseSearchDialogLifecycleArgs = {\n open: boolean\n setOpen: (open: boolean) => void\n}\n\nfunction useSearchDialogLifecycle(arg0: UseSearchDialogLifecycleArgs) {\n const { open, setOpen } = arg0\n const location = useLocation()\n\n useEffect(() => {\n setOpen(false)\n }, [location.pathname, location.search, location.hash, setOpen])\n\n useEffect(() => {\n if (open) return undefined\n\n function onKeyDown(event: KeyboardEvent) {\n if (event.key === 'k' && (event.metaKey || event.ctrlKey)) {\n event.preventDefault()\n setOpen(true)\n }\n }\n\n window.addEventListener('keydown', onKeyDown)\n return () => window.removeEventListener('keydown', onKeyDown)\n }, [open, setOpen])\n}\n\ntype UseSearchDataArgs = {\n query: string\n searchItems: ReturnType<typeof buildSearchItems>\n routePrefix: string\n currentLocale?: string\n}\n\ntype SearchDataState = {\n results: SearchDisplayItem[]\n searchInputLoading: boolean\n showNoResults: boolean\n}\n\nfunction useSearchData(arg0: UseSearchDataArgs): SearchDataState {\n const { query, searchItems, routePrefix, currentLocale } = arg0\n const [fullTextState, setFullTextState] = useState<FullTextSearchState | null>(null)\n const [pagefindState, setPagefindState] = useState<PagefindState | null>(null)\n\n const quickResults = useMemo(() => {\n const normalizedQuery = query.trim().toLowerCase()\n if (!normalizedQuery) return []\n return searchItems.filter((item) => item.keywords.includes(normalizedQuery)).slice(0, 8).map((item) => ({ ...item, type: 'quick' as const }))\n }, [query, searchItems])\n\n const pagefindKey = pagefindCacheKey(routePrefix, currentLocale)\n const activePagefindState = pagefindState?.key === pagefindKey ? pagefindState : null\n const pagefind = activePagefindState?.pagefind ?? null\n const pagefindAvailable = activePagefindState?.available ?? null\n const trimmedQuery = query.trim()\n const fullTextKey = `${pagefindKey}:${trimmedQuery}`\n const fullTextResults = fullTextState?.key === fullTextKey ? fullTextState.results : null\n const results: SearchDisplayItem[] = fullTextResults ?? quickResults\n const searchInputLoading = pagefindAvailable === null || Boolean(trimmedQuery && pagefind && fullTextState?.key !== fullTextKey)\n const showNoResults = Boolean(query.trim()) && results.length === 0 && pagefindAvailable !== null\n\n useEffect(() => {\n let cancelled = false\n\n loadPagefind(routePrefix, currentLocale).then((loadedPagefind) => {\n if (cancelled) return\n setPagefindState({ key: pagefindKey, pagefind: loadedPagefind, available: Boolean(loadedPagefind) })\n })\n\n return () => {\n cancelled = true\n }\n }, [currentLocale, pagefindKey, routePrefix])\n\n useEffect(() => {\n let cancelled = false\n if (!trimmedQuery || !pagefind) return undefined\n\n Promise.resolve().then(async () => {\n if (cancelled) return\n\n try {\n const search = await pagefind.search(trimmedQuery, { limit: 8 })\n const data = await Promise.all(search.results.map(async (result) => ({ id: result.id, data: await result.data() })))\n if (cancelled) return\n setFullTextState({\n key: fullTextKey,\n results: data.map(({ id, data }) => ({\n type: 'full-text',\n id,\n title: data.meta.title || data.url,\n url: normalizePagefindUrl(data.url, routePrefix),\n excerpt: data.excerpt,\n })),\n })\n } catch (error: unknown) {\n console.warn('[clarify:search] Pagefind search failed', { currentLocale, query: trimmedQuery, error })\n if (!cancelled) setFullTextState({ key: fullTextKey, results: null })\n }\n })\n\n return () => {\n cancelled = true\n }\n }, [currentLocale, fullTextKey, pagefind, routePrefix, trimmedQuery])\n\n return {\n results,\n searchInputLoading,\n showNoResults,\n }\n}\n\nexport function SearchDialog(arg0: SearchDialogProps) {\n const {\n open,\n setOpen,\n routes,\n navigation,\n routePrefix = '/',\n currentLocale,\n className,\n onNavigate = () => {},\n } = arg0\n\n const t = useBuiltInText()\n const navigate = useNavigate()\n const inputRef = useRef<React.ElementRef<typeof SearchInput>>(null)\n const [query, setQuery] = useState('')\n const [activeIndex, setActiveIndex] = useState(0)\n const searchItems = useMemo(() => buildSearchItems(routes, navigation), [navigation, routes])\n\n useSearchDialogLifecycle({ open, setOpen })\n const { results, searchInputLoading, showNoResults } = useSearchData({ query, searchItems, routePrefix, currentLocale })\n\n const updateQuery = (value: string) => {\n setQuery(value)\n setActiveIndex(0)\n }\n\n function closeDialog() {\n updateQuery('')\n setOpen(false)\n }\n\n function selectResult(result = results[activeIndex]) {\n if (!result) return\n navigate(result.url)\n onNavigate()\n closeDialog()\n }\n\n function renderResultsPanel() {\n return (\n <div className=\"border-t border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-background) empty:hidden dark:border-zinc-100/5 dark:bg-white/2.5\">\n {showNoResults ? (\n <div className=\"p-6 text-center\">\n <SearchX className=\"mx-auto h-5 w-5 stroke-(--clarify-theme-tokens-colors-foreground) dark:stroke-zinc-600\" />\n <p className=\"mt-2 text-xs text-(--clarify-theme-tokens-colors-muted) dark:text-zinc-400\">\n {t('search.noResults', { query })}\n </p>\n </div>\n ) : null}\n {results.length ? (\n <ul id=\"clarify-search-results\" className=\"clarify-search-results\" role=\"listbox\">\n {results.map((result, resultIndex) => (\n <SearchResult\n key={result.type === 'full-text' ? result.id : result.url}\n result={result}\n query={query}\n active={resultIndex === activeIndex}\n onActive={() => setActiveIndex(resultIndex)}\n onSelect={() => selectResult(result)}\n />\n ))}\n </ul>\n ) : null}\n </div>\n )\n }\n\n return (\n <Dialog open={open} onClose={closeDialog} className={clsx('clarify-search-dialog fixed inset-0 z-50', className)}>\n <DialogBackdrop\n transition\n className=\"clarify-search-backdrop clarify-ui-backdrop fixed inset-0 backdrop-blur-xs data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in\"\n />\n\n <div className=\"fixed inset-0 overflow-y-auto px-4 py-4 sm:px-6 sm:py-20 md:py-32 lg:px-8 lg:py-(--clarify-search-dialog-padding-block-lg)\">\n <DialogPanel\n transition\n className=\"clarify-search-panel mx-auto transform-gpu overflow-hidden rounded-(--clarify-theme-tokens-radius-lg) bg-(--clarify-theme-tokens-colors-surface) shadow-xl ring-1 ring-(--clarify-theme-tokens-colors-border) data-closed:scale-95 data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in sm:max-w-xl dark:bg-zinc-900 dark:ring-zinc-800\"\n onKeyDown={(event) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n setActiveIndex((index) => (results.length ? (index + 1) % results.length : 0))\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault()\n setActiveIndex((index) => (results.length ? (index - 1 + results.length) % results.length : 0))\n }\n }}\n >\n <SearchInput\n ref={inputRef}\n query={query}\n setQuery={updateQuery}\n onClose={closeDialog}\n onSubmit={() => selectResult()}\n loading={searchInputLoading}\n />\n {renderResultsPanel()}\n </DialogPanel>\n </div>\n </Dialog>\n )\n}\n","import { useRef, useState } from 'react'\n\nexport function useSearchProps() {\n const buttonRef = useRef<React.ElementRef<'button'>>(null)\n const [open, setOpen] = useState(false)\n\n return {\n buttonProps: {\n ref: buttonRef,\n onClick() {\n setOpen(true)\n },\n },\n dialogProps: {\n open,\n setOpen,\n },\n }\n}\n","import { Search as SearchIcon } from 'lucide-react'\nimport { Suspense } from 'react'\n\nimport { useBuiltInText } from '../i18n'\nimport type { NavigationNode, RouteItem } from '../types'\n\nimport { SearchDialog } from './search/SearchDialog'\nimport { useSearchProps } from './search/useSearchProps'\n\nfunction getModifierKey() {\n if (typeof navigator === 'undefined') return 'Ctrl '\n return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? '⌘' : 'Ctrl '\n}\n\nexport type SearchProps = { routes: RouteItem[]; navigation: NavigationNode[]; routePrefix?: string; currentLocale?: string }\n\nexport function Search(arg0: SearchProps) { const { routes, navigation, routePrefix, currentLocale } = arg0\n\n const t = useBuiltInText()\n const modifierKey = getModifierKey()\n const { buttonProps, dialogProps } = useSearchProps()\n\n return (\n <div className=\"clarify-search hidden w-80 max-w-(--clarify-search-max-width) lg:block\">\n <button\n type=\"button\"\n className=\"clarify-search-button hidden h-9 w-full items-center gap-2 rounded-(--clarify-theme-tokens-radius-lg) bg-(--clarify-theme-tokens-colors-surface) pr-3 pl-2.5 font-medium ring-1 ring-(--clarify-theme-tokens-colors-border) transition hover:bg-(--clarify-theme-tokens-colors-background) lg:flex dark:bg-white/5 dark:ring-white/10 dark:ring-inset dark:hover:bg-white/10\"\n {...buttonProps}\n >\n <SearchIcon className=\"h-5 w-5 stroke-current\" />\n {t('search.button')}\n <kbd className=\"clarify-search-shortcut ml-auto rounded-(--clarify-theme-tokens-radius-sm) bg-(--clarify-theme-tokens-colors-background) px-1.5 py-0.5 ring-1 ring-(--clarify-theme-tokens-colors-border) dark:bg-white/5 dark:ring-white/10\">\n <kbd className=\"font-sans\">{modifierKey}</kbd>\n <kbd className=\"font-sans\">K</kbd>\n </kbd>\n </button>\n <Suspense fallback={null}>\n <SearchDialog className=\"hidden lg:block\" routes={routes} navigation={navigation} routePrefix={routePrefix} currentLocale={currentLocale} {...dialogProps} />\n </Suspense>\n </div>\n )\n}\n\nexport type MobileSearchProps = {\n routes: RouteItem[]\n navigation: NavigationNode[]\n routePrefix?: string\n currentLocale?: string\n onNavigate?: () => void\n}\n\nexport function MobileSearch(arg0: MobileSearchProps) { const {\n routes,\n navigation,\n routePrefix,\n currentLocale,\n onNavigate,\n} = arg0\n\n const t = useBuiltInText()\n const { buttonProps, dialogProps } = useSearchProps()\n\n return (\n <div className=\"clarify-mobile-search contents lg:hidden\">\n <button\n type=\"button\"\n className=\"clarify-mobile-search-button clarify-ui-control relative flex size-8 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition lg:hidden\"\n aria-label={t('search.placeholder')}\n {...buttonProps}\n >\n <span className=\"absolute size-12 pointer-fine:hidden\" />\n <SearchIcon className=\"h-5 w-5 stroke-(--clarify-theme-tokens-colors-foreground) dark:stroke-white\" />\n </button>\n <Suspense fallback={null}>\n <SearchDialog className=\"lg:hidden\" routes={routes} navigation={navigation} routePrefix={routePrefix} currentLocale={currentLocale} onNavigate={onNavigate} {...dialogProps} />\n </Suspense>\n </div>\n )\n}\n","import clsx from 'clsx'\n\nimport type { LogoConfig } from '../core/types'\n\nexport type SiteLogoProps = {\n logo?: LogoConfig\n className?: string\n}\n\nexport function SiteLogo(arg0: SiteLogoProps) { const { logo, className } = arg0\n if (!logo) return null\n\n if (typeof logo === 'string') {\n return <img src={logo} alt=\"\" className={clsx('clarify-logo', className)} />\n }\n\n const lightLogo = logo.light ?? logo.dark\n const darkLogo = logo.dark ?? logo.light\n\n if (!lightLogo || !darkLogo) return null\n if (lightLogo === darkLogo) {\n return <img src={lightLogo} alt=\"\" className={clsx('clarify-logo', className)} />\n }\n\n return (\n <>\n <img src={lightLogo} alt=\"\" className={clsx('clarify-logo clarify-logo-light', className, 'dark:hidden')} />\n <img src={darkLogo} alt=\"\" className={clsx('clarify-logo clarify-logo-dark', className, 'hidden dark:block')} />\n </>\n )\n}\n","import { CloseButton, Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/react'\nimport clsx from 'clsx'\nimport { motion, useScroll, useTransform } from 'framer-motion'\nimport { Globe2, MoreHorizontal } from 'lucide-react'\nimport { forwardRef } from 'react'\nimport type { RefObject } from 'react'\nimport { Link, useLocation } from 'react-router-dom'\n\nimport { useBuiltInText } from '../i18n'\nimport { storeLocalePreference } from '../theme/cookies'\nimport { ThemeToggle } from '../theme/ThemeToggle'\nimport type { Config, LocaleConfig, NavbarLink, NavigationNode, NavigationTab, RouteItem } from '../types'\nimport { isExternalHref, localizeHref } from '../utils/href'\nimport { resolveLocalizedText } from '../utils/localized-text'\nimport { isSameRoutePath, normalizeRoutePath } from '../utils/path'\n\nimport { NavigationIcon } from './icons'\nimport { MobileNavigation, useIsInsideMobileNavigation, useMobileNavigationStore } from './mobile'\nimport { MobileSearch, Search } from './Search'\nimport { SiteLogo } from './SiteLogo'\n\nfunction localizedRoutePath(config: Config, locale: string, route?: RouteItem): string | undefined {\n const alternatePath = route?.alternates?.[locale]\n if (alternatePath) return alternatePath\n if (route?.alternates) return undefined\n return localizeHref(route?.basePath ?? route?.path ?? '/', config, locale)\n}\n\ntype LanguageSwitcherProps = { config: Config; currentLocale?: string; currentRoute?: RouteItem }\n\nfunction LanguageSwitcher(arg0: LanguageSwitcherProps) { const { config, currentLocale, currentRoute } = arg0\n\n const t = useBuiltInText()\n const location = useLocation()\n const i18n = config.i18n\n if (!i18n || i18n.locales.length < 2) return null\n\n const selectedLocale = currentLocale ?? i18n.defaultLocale\n const selectedLocaleConfig = i18n.locales.find(locale => locale.code === selectedLocale) ?? i18n.locales[0]\n const suffix = `${location.search}${location.hash}`\n\n return (\n <Menu as=\"div\" className=\"clarify-language-switcher relative\">\n <MenuButton\n className=\"clarify-language-switcher-button clarify-ui-control flex h-8 items-center gap-1.5 rounded-(--clarify-theme-tokens-radius-md) px-1.5 transition\"\n aria-label={t('language.switch')}\n >\n <span className=\"absolute size-12 pointer-fine:hidden\" />\n <Globe2 className=\"h-5 w-5 stroke-current\" />\n <span className=\"hidden sm:inline\">{selectedLocaleConfig?.label ?? selectedLocale}</span>\n </MenuButton>\n <MenuItems\n transition\n className=\"clarify-language-switcher-menu clarify-ui-menu absolute right-0 z-50 mt-2 w-(--clarify-ui-menu-width) rounded-(--clarify-theme-tokens-radius-xl) bg-(--clarify-theme-tokens-colors-surface) p-1 shadow-lg ring-1 shadow-zinc-900/5 ring-(--clarify-theme-tokens-colors-border) transition data-closed:scale-95 data-closed:opacity-0 data-enter:duration-100 data-enter:ease-out data-leave:duration-75 data-leave:ease-in dark:bg-zinc-900 dark:ring-white/10\"\n >\n {i18n.locales.flatMap((locale: LocaleConfig) => {\n const localizedPath = localizedRoutePath(config, locale.code, currentRoute)\n if (!localizedPath) return []\n\n const selected = locale.code === selectedLocale\n return [\n <MenuItem key={locale.code}>\n {({ focus }) => (\n <Link\n to={`${localizedPath}${suffix}`}\n onClick={() => storeLocalePreference(locale.code)}\n className={clsx(\n 'clarify-language-switcher-item clarify-ui-menu-item flex items-center justify-between rounded-(--clarify-theme-tokens-radius-lg) px-3 py-2 no-underline transition',\n focus && 'clarify-ui-menu-item-focus',\n selected && 'clarify-ui-menu-item-active',\n )}\n aria-current={selected ? 'true' : undefined}\n lang={locale.code}\n dir={locale.dir}\n >\n <span>{locale.label}</span>\n <span className=\"clarify-ui-menu-code\">{locale.code}</span>\n </Link>\n )}\n </MenuItem>,\n ]\n })}\n </MenuItems>\n </Menu>\n )\n}\n\ntype TopLevelNavItemProps = { href: string; children: React.ReactNode }\n\nfunction TopLevelNavItem(arg0: TopLevelNavItemProps) { const { href, children } = arg0\n\n const external = isExternalHref(href)\n\n if (external) {\n return (\n <li>\n <a\n href={href}\n className=\"clarify-ui-top-link transition\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {children}\n </a>\n </li>\n )\n }\n\n return (\n <li>\n <Link\n to={href}\n className=\"clarify-ui-top-link transition\"\n >\n {children}\n </Link>\n </li>\n )\n}\n\ntype MobileNavbarMenuProps = { links?: NavbarLink[]; config: Config; currentLocale?: string }\n\nfunction resolveHomeHref(config: Config, currentLocale?: string): string {\n const homeUrl = config.homeUrl ?? '/'\n return isExternalHref(homeUrl) ? homeUrl : localizeHref(homeUrl, config, currentLocale)\n}\n\nfunction MobileNavbarMenu(arg0: MobileNavbarMenuProps) {\n const { links, config, currentLocale } = arg0\n const t = useBuiltInText()\n if (!links?.length) return null\n\n return (\n <Menu as=\"div\" className=\"clarify-mobile-navbar-menu relative md:hidden\">\n <MenuButton\n className=\"clarify-mobile-navbar-menu-button clarify-ui-control relative flex size-8 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition\"\n aria-label={t('navbar.openLinks')}\n >\n <span className=\"absolute size-12 pointer-fine:hidden\" />\n <MoreHorizontal className=\"h-5 w-5\" />\n </MenuButton>\n <MenuItems\n transition\n anchor=\"bottom end\"\n className=\"clarify-mobile-navbar-menu-list clarify-ui-menu z-50 mt-2 w-(--clarify-ui-menu-width) rounded-(--clarify-theme-tokens-radius-xl) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-1 shadow-lg transition [--anchor-gap:--spacing(2)] focus:outline-none data-closed:scale-95 data-closed:opacity-0 dark:border-white/10 dark:bg-zinc-900\"\n >\n {links.map((link) => {\n const label = resolveLocalizedText(link.label, currentLocale, config.i18n?.defaultLocale)\n const href = localizeHref(link.href, config, currentLocale)\n const external = isExternalHref(href)\n\n return (\n <MenuItem key={link.href}>\n {({ focus }) => {\n const className = clsx(\n 'clarify-mobile-navbar-menu-item clarify-ui-menu-item block rounded-(--clarify-theme-tokens-radius-lg) px-3 py-2 no-underline transition',\n focus && 'clarify-ui-menu-item-focus',\n )\n\n return external ? (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className={className}>\n {label}\n </a>\n ) : (\n <Link to={href} className={className}>\n {label}\n </Link>\n )\n }}\n </MenuItem>\n )\n })}\n </MenuItems>\n </Menu>\n )\n}\n\nfunction hasPath(nodes: NavigationNode[], pathname: string): boolean {\n return nodes.some((node) => isSameRoutePath(node.path, pathname) || hasPath(node.children ?? [], pathname))\n}\n\nfunction isActiveTab(tab: NavigationTab, pathname: string): boolean {\n return isSameRoutePath(tab.path, pathname) || hasPath(tab.children, pathname)\n}\n\ntype ProductTabsProps = { tabs?: NavigationTab[] }\n\nfunction ProductTabs(arg0: ProductTabsProps) { const { tabs } = arg0\n\n const t = useBuiltInText()\n const pathname = normalizeRoutePath(useLocation().pathname)\n if (!tabs?.length) return null\n\n return (\n <div data-clarify-header-tabs className=\"clarify-product-tabs hidden h-14 border-t border-(--clarify-theme-tokens-colors-border) lg:block dark:border-white/10\">\n <nav className=\"clarify-product-tabs-nav mx-auto flex h-full w-full max-w-(--clarify-theme-layout-max-width) items-stretch gap-6 overflow-x-auto px-5\" aria-label={t('navbar.sections')}>\n {tabs.map((tab) => {\n const active = isActiveTab(tab, pathname)\n return (\n <Link\n key={`${tab.title}-${tab.path}`}\n to={tab.path}\n aria-current={active ? 'page' : undefined}\n className={clsx(\n 'clarify-product-tab clarify-ui-tab relative inline-flex h-full shrink-0 items-center gap-2 px-0 transition',\n active && 'clarify-ui-tab-active',\n )}\n >\n <NavigationIcon name={tab.icon} className=\"h-4 w-4\" />\n <span>{tab.title}</span>\n {active ? (\n <motion.span\n layoutId=\"clarify-product-tab-indicator\"\n className=\"absolute inset-x-0 bottom-0 h-0.5 rounded-full bg-(--clarify-theme-tokens-colors-foreground) dark:bg-white\"\n transition={{ type: 'tween', duration: 0.16, ease: 'easeOut' }}\n />\n ) : null}\n </Link>\n )\n })}\n </nav>\n </div>\n )\n}\n\nexport const Header = forwardRef<\n React.ComponentRef<'header'>,\n React.ComponentPropsWithoutRef<typeof motion.header> & {\n config: Config\n navigation: NavigationNode[]\n tabs?: NavigationTab[]\n routes: RouteItem[]\n currentLocale?: string\n currentRoute?: RouteItem\n banner?: React.ReactNode\n topAreaRef?: RefObject<HTMLDivElement | null>\n }\n>(function Header(arg0, ref) { const { config, navigation, tabs, routes, currentLocale, currentRoute, banner, topAreaRef, className, ...props } = arg0\n\n const t = useBuiltInText()\n const { isOpen: mobileNavIsOpen } = useMobileNavigationStore()\n const isInsideMobileNavigation = useIsInsideMobileNavigation()\n const homeHref = resolveHomeHref(config, currentLocale)\n const homeExternal = isExternalHref(homeHref)\n\n const { scrollY } = useScroll()\n const bgOpacityLight = useTransform(scrollY, [0, 72], ['70%', '95%'])\n const bgOpacityDark = useTransform(scrollY, [0, 72], ['60%', '92%'])\n const hasNavbarLinks = Boolean(config.navbar?.links?.length)\n\n function renderBrand() {\n if (homeExternal) {\n return (\n <CloseButton as=\"a\" href={homeHref} aria-label={t('navbar.home')} className=\"clarify-brand flex min-w-0 items-center gap-2 no-underline\">\n <SiteLogo logo={config.logo} className=\"h-6 w-auto shrink-0 object-contain\" />\n <span className=\"clarify-brand-title truncate font-semibold\">{config.title}</span>\n </CloseButton>\n )\n }\n\n return (\n <CloseButton as={Link} to={homeHref} aria-label={t('navbar.home')} className=\"clarify-brand flex min-w-0 items-center gap-2 no-underline\">\n <SiteLogo logo={config.logo} className=\"h-6 w-auto shrink-0 object-contain\" />\n <span className=\"clarify-brand-title truncate font-semibold\">{config.title}</span>\n </CloseButton>\n )\n }\n\n function renderTopLinks() {\n if (!hasNavbarLinks) return null\n\n return (\n <nav className=\"clarify-top-nav hidden md:block\">\n <ul role=\"list\" className=\"flex items-center gap-8\">\n {config.navbar?.links?.map((link) => (\n <TopLevelNavItem key={link.href} href={localizeHref(link.href, config, currentLocale)}>\n {resolveLocalizedText(link.label, currentLocale, config.i18n?.defaultLocale)}\n </TopLevelNavItem>\n ))}\n </ul>\n </nav>\n )\n }\n\n function renderHeaderActions() {\n return (\n <div className=\"clarify-header-actions flex shrink-0 items-center gap-5\">\n {renderTopLinks()}\n {hasNavbarLinks ? <div className=\"hidden md:block md:h-5 md:w-px md:bg-(--clarify-theme-tokens-colors-border) md:dark:bg-white/15\" /> : null}\n <MobileSearch routes={routes} navigation={navigation} routePrefix={config.routePrefix} currentLocale={currentLocale} />\n <LanguageSwitcher config={config} currentLocale={currentLocale} currentRoute={currentRoute} />\n <ThemeToggle />\n <MobileNavbarMenu links={config.navbar?.links} config={config} currentLocale={currentLocale} />\n </div>\n )\n }\n\n function renderHeaderMain() {\n return (\n <div\n data-clarify-header-main\n className={clsx(\n 'clarify-header-main relative mx-auto flex h-14 w-full max-w-(--clarify-theme-layout-max-width) items-center justify-between gap-6 px-4 sm:px-6 lg:px-5',\n (isInsideMobileNavigation || !mobileNavIsOpen) && 'shadow-none',\n )}\n >\n <div className=\"clarify-header-left flex min-w-0 items-center gap-5\">\n <div className=\"clarify-mobile-brand flex items-center gap-5 lg:hidden\">\n <MobileNavigation config={config} navigation={navigation} tabs={tabs} routes={routes} currentLocale={currentLocale} currentRoute={currentRoute} />\n </div>\n {renderBrand()}\n </div>\n <div className=\"clarify-header-center absolute left-1/2 hidden -translate-x-1/2 lg:block\">\n <Search routes={routes} navigation={navigation} routePrefix={config.routePrefix} currentLocale={currentLocale} />\n </div>\n {renderHeaderActions()}\n </div>\n )\n }\n\n function renderTopArea() {\n return (\n <div ref={topAreaRef}>\n {renderHeaderMain()}\n <div data-clarify-header-banner>{banner}</div>\n <ProductTabs tabs={tabs} />\n </div>\n )\n }\n\n return (\n <motion.header\n {...props}\n ref={ref}\n data-pagefind-ignore\n className={clsx(\n className,\n 'clarify-header fixed inset-x-0 top-0 z-50 border-b border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-background)/(--bg-opacity-light) backdrop-blur-xs transition dark:border-white/10 dark:bg-zinc-950/(--bg-opacity-dark) dark:backdrop-blur-sm',\n isInsideMobileNavigation && 'bg-(--clarify-theme-tokens-colors-background) dark:bg-zinc-950',\n )}\n style={\n {\n '--bg-opacity-light': bgOpacityLight,\n '--bg-opacity-dark': bgOpacityDark,\n } as React.CSSProperties\n }\n >\n {renderTopArea()}\n </motion.header>\n )\n})\n","import { createContext, useContext, type ReactNode } from 'react'\n\nimport { ContentActions } from '../shell/ContentActions'\nimport type { RouteItem } from '../types'\n\ntype PageActionsContextValue = {\n route?: RouteItem\n routePrefix?: string\n}\n\ntype PageActionsProviderProps = PageActionsContextValue & {\n children: ReactNode\n}\n\nconst PageActionsContext = createContext<PageActionsContextValue>({})\n\nexport function PageActionsProvider(props: PageActionsProviderProps) {\n const { children, route, routePrefix } = props\n\n return (\n <PageActionsContext.Provider value={{ route, routePrefix }}>\n {children}\n </PageActionsContext.Provider>\n )\n}\n\nexport function PageTitleActions() {\n const { route, routePrefix } = useContext(PageActionsContext)\n\n return <ContentActions route={route} routePrefix={routePrefix} />\n}\n"],"mappings":";;;;;;;;;;AAMA,IAAa,gBAAgB,cAA6B,IAAI;AAC9D,IAAa,gBAAgB,cAAkC,KAAA,CAAS;AACxE,IAAa,kBAAkB,cAA2C,CAAC,CAAC;AAE5E,SAAgB,YAAoB;CAClC,MAAM,SAAS,WAAW,aAAa;CACvC,IAAI,CAAC,QACH,MAAM,IAAI,MACR,kEACF;CAEF,OAAO;AACT;AAEA,SAAgB,oBAAmC;CACjD,OAAO,WAAW,aAAa;AACjC;AAEA,SAAgB,YAAgC;CAC9C,OAAO,WAAW,aAAa;AACjC;AAEA,SAAgB,cAA2C;CACzD,OAAO,WAAW,eAAe;AACnC;;;AC4EA,IAAM,cAAc;CAClB,IAAI;EACF,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;EACnB,oBAAoB;EACpB,kBAAkB;EAClB,gBAAgB;EAChB,gBAAgB;EAChB,mBAAmB;EACnB,eAAe;EACf,mBAAmB;EACnB,8BAA8B;EAC9B,yCAAyC;EACzC,2BAA2B;EAC3B,sCAAsC;EACtC,2BAA2B;EAC3B,sCAAsC;EACtC,6BAA6B;EAC7B,2BAA2B;EAC3B,sCAAsC;EACtC,8BAA8B;EAC9B,gCAAgC;EAChC,6BAA6B;EAC7B,+BAA+B;EAC/B,0CAA0C;EAC1C,8BAA8B;EAC9B,yCAAyC;EACzC,eAAe;EACf,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,4BAA4B;EAC5B,mBAAmB;EACnB,uBAAuB;EACvB,2BAA2B;EAC3B,qBAAqB;EACrB,eAAe;EACf,oBAAoB;EACpB,mBAAmB;EACnB,wBAAwB;EACxB,iBAAiB;EACjB,kBAAkB;EAClB,kBAAkB;EAClB,4BAA4B;EAC5B,0BAA0B;EAC1B,oBAAoB;EACpB,4BAA4B;EAC5B,mBAAmB;EACnB,kBAAkB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A;KAC9I,CAAA,GACJ,YAAY,CACV;;IACL,oBAAC,OAAD;KAAK,WAAU;eACb,oBAAC,UAAD;MAAgB;MAAoB;MAAY,aAAa,OAAO;MAA4B;KAAgB,CAAA;IAC7G,CAAA;IACJ,oBAAoB;GAClB;;CAET;CAEA,SAAS,gBAAgB;EACvB,OACE,qBAAC,OAAD;GAAK,KAAK;aAAV;IACG,iBAAiB;IAClB,oBAAC,OAAD;KAAK,8BAAA;eAA4B;IAAY,CAAA;IAC7C,oBAAC,aAAD,EAAmB,KAAO,CAAA;GACvB;;CAET;CAEA,OACE,oBAAC,OAAO,QAAR;EACE,GAAI;EACC;EACL,wBAAA;EACA,WAAW,KACT,WACA,mRACA,4BAA4B,gEAC9B;EACA,OACE;GACE,sBAAsB;GACtB,qBAAqB;EACvB;YAGD,cAAc;CACF,CAAA;AAEnB,CAAC;;;AChVD,IAAM,qBAAqB,cAAuC,CAAC,CAAC;AAEpE,SAAgB,oBAAoB,OAAiC;CACnE,MAAM,EAAE,UAAU,OAAO,gBAAgB;CAEzC,OACE,oBAAC,mBAAmB,UAApB;EAA6B,OAAO;GAAE;GAAO;EAAY;EACtD;CAC0B,CAAA;AAEjC;AAEA,SAAgB,mBAAmB;CACjC,MAAM,EAAE,OAAO,gBAAgB,WAAW,kBAAkB;CAE5D,OAAO,oBAAC,gBAAD;EAAuB;EAAoB;CAAc,CAAA;AAClE"}
@@ -1,11 +1,11 @@
1
- const require_chunk = require("./chunk-DakpK96I.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
2
  let clsx = require("clsx");
3
- clsx = require_chunk.__toESM(clsx, 1);
3
+ clsx = require_rolldown_runtime.__toESM(clsx, 1);
4
4
  let react = require("react");
5
5
  let react_router_dom = require("react-router-dom");
6
6
  let _headlessui_react = require("@headlessui/react");
7
7
  let lucide_react = require("lucide-react");
8
- lucide_react = require_chunk.__toESM(lucide_react, 1);
8
+ lucide_react = require_rolldown_runtime.__toESM(lucide_react, 1);
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let framer_motion = require("framer-motion");
11
11
  let zustand = require("zustand");
@@ -18,6 +18,9 @@ function useConfig() {
18
18
  if (!config) throw new Error("[clarify] useConfig must be used within a ConfigContext.Provider");
19
19
  return config;
20
20
  }
21
+ function useConfigOptional() {
22
+ return (0, react.useContext)(ConfigContext);
23
+ }
21
24
  function useLocale() {
22
25
  return (0, react.useContext)(LocaleContext);
23
26
  }
@@ -90,6 +93,7 @@ var builtInText = {
90
93
  "openapi.queryParameters": "Query parameters",
91
94
  "openapi.request": "Request",
92
95
  "openapi.requestBody": "Request body",
96
+ "openapi.requestBodyEmpty": "No request body",
93
97
  "openapi.responseBodyProperties": "Response body properties",
94
98
  "openapi.required": "Required.",
95
99
  "openapi.requiredBadge": "required",
@@ -113,9 +117,9 @@ var builtInText = {
113
117
  "renderError.path": "Route",
114
118
  "renderError.reload": "Reload route",
115
119
  "renderError.stack": "JavaScript stack trace",
116
- "renderError.timestamp": "Captured at",
117
120
  "renderError.title": "Route render failed",
118
121
  "renderError.type": "Error type",
122
+ "renderError.version": "Clarify version",
119
123
  "theme.switchToDark": "Switch to dark theme",
120
124
  "theme.switchToLight": "Switch to light theme",
121
125
  "theme.switchToSystem": "Follow system theme",
@@ -189,6 +193,7 @@ var builtInText = {
189
193
  "openapi.queryParameters": "查询参数",
190
194
  "openapi.request": "请求",
191
195
  "openapi.requestBody": "请求体",
196
+ "openapi.requestBodyEmpty": "暂无请求体",
192
197
  "openapi.responseBodyProperties": "响应体属性",
193
198
  "openapi.required": "必填。",
194
199
  "openapi.requiredBadge": "必填",
@@ -212,9 +217,9 @@ var builtInText = {
212
217
  "renderError.path": "路由",
213
218
  "renderError.reload": "重新加载路由",
214
219
  "renderError.stack": "JavaScript 堆栈",
215
- "renderError.timestamp": "捕获时间",
216
220
  "renderError.title": "路由渲染失败",
217
221
  "renderError.type": "错误类型",
222
+ "renderError.version": "Clarify 版本",
218
223
  "theme.switchToDark": "切换到深色主题",
219
224
  "theme.switchToLight": "切换到浅色主题",
220
225
  "theme.switchToSystem": "跟随系统主题",
@@ -2222,6 +2227,12 @@ Object.defineProperty(exports, "useConfig", {
2222
2227
  return useConfig;
2223
2228
  }
2224
2229
  });
2230
+ Object.defineProperty(exports, "useConfigOptional", {
2231
+ enumerable: true,
2232
+ get: function() {
2233
+ return useConfigOptional;
2234
+ }
2235
+ });
2225
2236
  Object.defineProperty(exports, "useLocale", {
2226
2237
  enumerable: true,
2227
2238
  get: function() {
@@ -2247,4 +2258,4 @@ Object.defineProperty(exports, "useTheme", {
2247
2258
  }
2248
2259
  });
2249
2260
 
2250
- //# sourceMappingURL=PageActions-DEuFHgyB.cjs.map
2261
+ //# sourceMappingURL=PageActions-GS_cxeJN.cjs.map