@clarify-labs/renderer 0.11.7 → 0.11.9

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 (67) hide show
  1. package/output/{ClarifyShell-CukbPOAd.cjs → ClarifyShell-GCXbb_AF.cjs} +120 -68
  2. package/output/ClarifyShell-GCXbb_AF.cjs.map +1 -0
  3. package/output/{ClarifyShell-CKvXZj0f.js → ClarifyShell-nV23Fn7m.js} +120 -68
  4. package/output/ClarifyShell-nV23Fn7m.js.map +1 -0
  5. package/output/{MermaidViewer-FOg263MO.cjs → MermaidViewer-DEKNDG7K.cjs} +3 -3
  6. package/output/{MermaidViewer-FOg263MO.cjs.map → MermaidViewer-DEKNDG7K.cjs.map} +1 -1
  7. package/output/{MermaidViewer-_tpH0JNn.js → MermaidViewer-Ssxr00dy.js} +3 -3
  8. package/output/{MermaidViewer-_tpH0JNn.js.map → MermaidViewer-Ssxr00dy.js.map} +1 -1
  9. package/output/{OpenApiOperation-Dv9u2GEJ.js → OpenApiOperation-B26v2y44.js} +77 -12
  10. package/output/{OpenApiOperation-Dv9u2GEJ.js.map → OpenApiOperation-B26v2y44.js.map} +1 -1
  11. package/output/{OpenApiOperation-c-I6Nw9j.cjs → OpenApiOperation-DIgbzvk5.cjs} +77 -12
  12. package/output/{OpenApiOperation-c-I6Nw9j.cjs.map → OpenApiOperation-DIgbzvk5.cjs.map} +1 -1
  13. package/output/{PageActions-DviEypf6.js → PageActions-BbmyFeSk.js} +114 -76
  14. package/output/PageActions-BbmyFeSk.js.map +1 -0
  15. package/output/{PageActions-ob2OJusG.cjs → PageActions-DxGK-444.cjs} +119 -75
  16. package/output/PageActions-DxGK-444.cjs.map +1 -0
  17. package/output/{SearchDialog-89JAjQMh.js → SearchDialog-4oEbmVMR.js} +29 -20
  18. package/output/SearchDialog-4oEbmVMR.js.map +1 -0
  19. package/output/{SearchDialog-CTiUIKeo.cjs → SearchDialog-DexOW8E4.cjs} +29 -20
  20. package/output/SearchDialog-DexOW8E4.cjs.map +1 -0
  21. package/output/app/AppShell.d.ts +1 -2
  22. package/output/app/BuiltInNotFoundPage.d.ts +1 -0
  23. package/output/app/PageActions.d.ts +0 -1
  24. package/output/client.cjs +3 -3
  25. package/output/client.js +3 -3
  26. package/output/context.d.ts +2 -1
  27. package/output/core/context.d.ts +9 -0
  28. package/output/core/types.d.ts +4 -0
  29. package/output/{i18n-Cjfk1N7i.cjs → i18n-BuvwT5W9.cjs} +38 -3
  30. package/output/i18n-BuvwT5W9.cjs.map +1 -0
  31. package/output/{i18n-Cff810G_.js → i18n-C6tIP-nl.js} +26 -3
  32. package/output/i18n-C6tIP-nl.js.map +1 -0
  33. package/output/index.cjs +11 -7
  34. package/output/index.cjs.map +1 -1
  35. package/output/index.d.ts +3 -2
  36. package/output/index.js +8 -8
  37. package/output/index.js.map +1 -1
  38. package/output/openapi/lib/api-exchange.d.ts +2 -0
  39. package/output/preview.cjs +6 -6
  40. package/output/preview.cjs.map +1 -1
  41. package/output/preview.js +6 -6
  42. package/output/preview.js.map +1 -1
  43. package/output/{render-B41PHjt8.js → render-CAtVGsQF.js} +2 -2
  44. package/output/{render-B41PHjt8.js.map → render-CAtVGsQF.js.map} +1 -1
  45. package/output/{render-BxiVlY6q.cjs → render-D8h-jcnw.cjs} +2 -2
  46. package/output/{render-BxiVlY6q.cjs.map → render-D8h-jcnw.cjs.map} +1 -1
  47. package/output/renderer.css +4 -0
  48. package/output/server.cjs +2 -2
  49. package/output/server.js +2 -2
  50. package/output/shell/ContentActions.d.ts +0 -1
  51. package/output/shell/Header.d.ts +1 -2
  52. package/output/shell/Search.d.ts +3 -6
  53. package/output/shell/mobile.d.ts +1 -2
  54. package/output/shell/search/SearchDialog.d.ts +2 -1
  55. package/output/shell/search/pagefind.d.ts +3 -2
  56. package/output/theme/ThemeRoot.d.ts +0 -2
  57. package/output/theme/randomTheme.d.ts +2 -1
  58. package/output/utils/href.d.ts +2 -0
  59. package/package.json +1 -1
  60. package/output/ClarifyShell-CKvXZj0f.js.map +0 -1
  61. package/output/ClarifyShell-CukbPOAd.cjs.map +0 -1
  62. package/output/PageActions-DviEypf6.js.map +0 -1
  63. package/output/PageActions-ob2OJusG.cjs.map +0 -1
  64. package/output/SearchDialog-89JAjQMh.js.map +0 -1
  65. package/output/SearchDialog-CTiUIKeo.cjs.map +0 -1
  66. package/output/i18n-Cff810G_.js.map +0 -1
  67. package/output/i18n-Cjfk1N7i.cjs.map +0 -1
@@ -1,13 +1,13 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_i18n = require("./i18n-Cjfk1N7i.cjs");
2
+ const require_i18n = require("./i18n-BuvwT5W9.cjs");
3
3
  let clsx = require("clsx");
4
4
  clsx = require_rolldown_runtime.__toESM(clsx, 1);
5
5
  let react = require("react");
6
6
  let react_router_dom = require("react-router-dom");
7
+ let react_jsx_runtime = require("react/jsx-runtime");
7
8
  let _headlessui_react = require("@headlessui/react");
8
9
  let lucide_react = require("lucide-react");
9
10
  lucide_react = require_rolldown_runtime.__toESM(lucide_react, 1);
10
- let react_jsx_runtime = require("react/jsx-runtime");
11
11
  let framer_motion = require("framer-motion");
12
12
  let zustand = require("zustand");
13
13
  //#region source/utils/clipboard.ts
@@ -49,6 +49,10 @@ function localizeHref(href, config, locale) {
49
49
  const cleanHref = href === "/" ? "" : href.replace(/^\/+/, "");
50
50
  return `/${locale}${cleanHref ? `/${cleanHref}` : ""}`;
51
51
  }
52
+ function resolveHomeHref(config, locale) {
53
+ const homeUrl = config.homeUrl ?? "/";
54
+ return isExternalHref(homeUrl) ? homeUrl : localizeHref(homeUrl, config, locale);
55
+ }
52
56
  function prefixHref(href, routePrefix = "/") {
53
57
  if (isExternalHref(href) || href.startsWith("#")) return href;
54
58
  if (!routePrefix || routePrefix === "/") return href.startsWith("/") ? href : `/${href}`;
@@ -58,17 +62,24 @@ function prefixHref(href, routePrefix = "/") {
58
62
  if (path === prefix || path.startsWith(`${prefix}/`)) return `/${path}`;
59
63
  return `/${prefix}/${path}`;
60
64
  }
65
+ function resolveAbsoluteSiteHref(href, config) {
66
+ const path = prefixHref(href, config.routePrefix);
67
+ if (isExternalHref(path)) return path;
68
+ const base = config.siteUrl;
69
+ if (!base) return void 0;
70
+ return new URL(path, base.endsWith("/") ? base : `${base}/`).href;
71
+ }
61
72
  //#endregion
62
73
  //#region source/shell/ContentActions.tsx
63
74
  function resolveContentArtifactUrl(contentArtifactUrl, routePrefix = "/") {
64
75
  return prefixHref(contentArtifactUrl, routePrefix);
65
76
  }
66
- function getAbsoluteUrl(path) {
67
- if (typeof window === "undefined") return path;
68
- return new URL(path, window.location.href).href;
69
- }
70
77
  function ContentActions(arg0) {
71
- const { route, routePrefix } = arg0;
78
+ const { route } = arg0;
79
+ const config = require_i18n.useConfig();
80
+ const routePrefix = config.routePrefix;
81
+ const absoluteLinksEnabled = Boolean(config.siteUrl);
82
+ const mcpEnabled = absoluteLinksEnabled && config.features.search.enabled && config.features.search.mcp;
72
83
  const t = require_i18n.useBuiltInText();
73
84
  const [copied, setCopied] = (0, react.useState)("idle");
74
85
  const [copyPhase, setCopyPhase] = (0, react.useState)("idle");
@@ -107,22 +118,25 @@ function ContentActions(arg0) {
107
118
  const llmsArtifactUrl = resolveContentArtifactUrl("/llms.txt", routePrefix);
108
119
  async function handleCopyLink() {
109
120
  if (!contentArtifactUrl) return;
110
- await runCopy("link", () => getAbsoluteUrl(contentArtifactUrl));
121
+ await runCopy("link", () => resolveAbsoluteSiteHref(contentArtifactUrl, config) ?? contentArtifactUrl);
111
122
  }
112
123
  async function handleCopyLlms() {
113
- await runCopy("llms", () => getAbsoluteUrl(llmsArtifactUrl));
124
+ await runCopy("llms", () => resolveAbsoluteSiteHref(llmsArtifactUrl, config) ?? llmsArtifactUrl);
114
125
  }
115
126
  async function handleCopyMcp() {
116
- await runCopy("mcp", () => mcpConfig);
127
+ await runCopy("mcp", () => {
128
+ const siteUrl = resolveAbsoluteSiteHref("/", config);
129
+ if (!siteUrl) throw new Error("siteUrl is required for MCP configuration");
130
+ return JSON.stringify({ mcpServers: { clarify: {
131
+ command: "npx",
132
+ args: [
133
+ "@clarify-labs/cli",
134
+ "mcp",
135
+ siteUrl
136
+ ]
137
+ } } }, null, 2);
138
+ });
117
139
  }
118
- const mcpConfig = JSON.stringify({ mcpServers: { clarify: {
119
- command: "npx",
120
- args: [
121
- "@clarify-labs/cli",
122
- "mcp",
123
- window.location.origin
124
- ]
125
- } } }, null, 2);
126
140
  const actions = contentArtifactUrl ? [{
127
141
  key: "content",
128
142
  label: t("contentActions.copyContent"),
@@ -130,14 +144,14 @@ function ContentActions(arg0) {
130
144
  icon: lucide_react.Copy,
131
145
  run: handleCopyContent,
132
146
  copiedLabel: t("contentActions.copiedContent")
133
- }, {
147
+ }, ...absoluteLinksEnabled ? [{
134
148
  key: "link",
135
149
  label: t("contentActions.copyLink", replacements),
136
150
  description: t("contentActions.copyLinkDescription", replacements),
137
151
  icon: lucide_react.Link2,
138
152
  run: handleCopyLink,
139
153
  copiedLabel: t("contentActions.copiedLink")
140
- }] : [];
154
+ }] : []] : [];
141
155
  const llmsAction = {
142
156
  key: "llms",
143
157
  label: t("contentActions.copyLlms"),
@@ -300,7 +314,7 @@ function ContentActions(arg0) {
300
314
  ]
301
315
  }) }, action.key);
302
316
  }),
303
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_headlessui_react.MenuItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
317
+ absoluteLinksEnabled ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_headlessui_react.MenuItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
304
318
  type: "button",
305
319
  onClick: llmsAction.run,
306
320
  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",
@@ -321,8 +335,8 @@ function ContentActions(arg0) {
321
335
  }),
322
336
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: `h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-primary) transition ${copied === llmsAction.key ? "opacity-100" : "opacity-0"}` })
323
337
  ]
324
- }) }, llmsAction.key),
325
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_headlessui_react.MenuItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
338
+ }) }, llmsAction.key) : null,
339
+ mcpEnabled ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_headlessui_react.MenuItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
326
340
  type: "button",
327
341
  onClick: mcpAction.run,
328
342
  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",
@@ -343,7 +357,7 @@ function ContentActions(arg0) {
343
357
  }),
344
358
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: `h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-primary) transition ${copied === mcpAction.key ? "opacity-100" : "opacity-0"}` })
345
359
  ]
346
- }) }, mcpAction.key)
360
+ }) }, mcpAction.key) : null
347
361
  ]
348
362
  })
349
363
  ]
@@ -1083,7 +1097,7 @@ function MobileTabsSelect(arg0) {
1083
1097
  });
1084
1098
  }
1085
1099
  function MobileNavigationDialog(arg0) {
1086
- const { config, isOpen, navigation, tabs, routes, currentLocale, currentRoute, close } = arg0;
1100
+ const { isOpen, navigation, tabs, routes, currentLocale, currentRoute, close } = arg0;
1087
1101
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_headlessui_react.Dialog, {
1088
1102
  transition: true,
1089
1103
  open: isOpen,
@@ -1093,7 +1107,6 @@ function MobileNavigationDialog(arg0) {
1093
1107
  transition: true,
1094
1108
  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"
1095
1109
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_headlessui_react.DialogPanel, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_headlessui_react.TransitionChild, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Header, {
1096
- config,
1097
1110
  navigation,
1098
1111
  tabs,
1099
1112
  routes,
@@ -1123,7 +1136,7 @@ var useMobileNavigationStore = (0, zustand.create)()((set) => ({
1123
1136
  toggle: () => set((state) => ({ isOpen: !state.isOpen }))
1124
1137
  }));
1125
1138
  function MobileNavigation(arg0) {
1126
- const { config, navigation, tabs, routes, currentLocale, currentRoute } = arg0;
1139
+ const { navigation, tabs, routes, currentLocale, currentRoute } = arg0;
1127
1140
  const isInsideMobileNavigation = useIsInsideMobileNavigation();
1128
1141
  const { isOpen, toggle, close } = useMobileNavigationStore();
1129
1142
  const t = require_i18n.useBuiltInText();
@@ -1139,7 +1152,6 @@ function MobileNavigation(arg0) {
1139
1152
  }), !isInsideMobileNavigation ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
1140
1153
  fallback: null,
1141
1154
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MobileNavigationDialog, {
1142
- config,
1143
1155
  navigation,
1144
1156
  tabs,
1145
1157
  routes,
@@ -1171,43 +1183,44 @@ function useSearchProps() {
1171
1183
  }
1172
1184
  //#endregion
1173
1185
  //#region source/shell/Search.tsx
1174
- var SearchDialog = (0, react.lazy)(() => Promise.resolve().then(() => require("./SearchDialog-CTiUIKeo.cjs")));
1186
+ var SearchDialog = (0, react.lazy)(() => Promise.resolve().then(() => require("./SearchDialog-DexOW8E4.cjs")));
1175
1187
  function getModifierKey() {
1176
1188
  if (typeof navigator === "undefined") return "Ctrl ";
1177
1189
  return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl ";
1178
1190
  }
1179
1191
  function Search(arg0) {
1180
- const { routes, navigation, routePrefix, currentLocale } = arg0;
1192
+ const { routes, navigation, compact = false } = arg0;
1193
+ const config = require_i18n.useConfig();
1194
+ const currentLocale = require_i18n.useLocale() ?? config.locales?.default;
1181
1195
  const t = require_i18n.useBuiltInText();
1182
1196
  const modifierKey = getModifierKey();
1183
1197
  const { buttonProps, dialogProps } = useSearchProps();
1198
+ if (!config.features.search.enabled) return null;
1184
1199
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1185
- className: "clarify-search hidden w-80 max-w-(--clarify-search-max-width) lg:block",
1200
+ className: compact ? "clarify-search hidden lg:block" : "clarify-search hidden w-80 max-w-(--clarify-search-max-width) lg:block",
1186
1201
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1187
1202
  type: "button",
1188
- 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",
1203
+ className: compact ? "clarify-search-button clarify-ui-control hidden size-9 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition lg:flex" : "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",
1204
+ "aria-label": compact ? t("search.placeholder") : void 0,
1189
1205
  ...buttonProps,
1190
- children: [
1191
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Search, { className: "h-5 w-5 stroke-current" }),
1192
- t("search.button"),
1193
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("kbd", {
1194
- 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",
1195
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("kbd", {
1196
- className: "font-sans",
1197
- children: modifierKey
1198
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("kbd", {
1199
- className: "font-sans",
1200
- children: "K"
1201
- })]
1202
- })
1203
- ]
1206
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Search, { className: "h-5 w-5 stroke-current" }), !compact ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t("search.button"), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("kbd", {
1207
+ 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",
1208
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("kbd", {
1209
+ className: "font-sans",
1210
+ children: modifierKey
1211
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("kbd", {
1212
+ className: "font-sans",
1213
+ children: "K"
1214
+ })]
1215
+ })] }) : null]
1204
1216
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
1205
1217
  fallback: null,
1206
1218
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchDialog, {
1207
1219
  className: "hidden lg:block",
1208
1220
  routes,
1209
1221
  navigation,
1210
- routePrefix,
1222
+ routePrefix: config.routePrefix,
1223
+ assetPrefix: config.assetPrefix,
1211
1224
  currentLocale,
1212
1225
  ...dialogProps
1213
1226
  })
@@ -1215,9 +1228,12 @@ function Search(arg0) {
1215
1228
  });
1216
1229
  }
1217
1230
  function MobileSearch(arg0) {
1218
- const { routes, navigation, routePrefix, currentLocale, onNavigate } = arg0;
1231
+ const { routes, navigation, onNavigate } = arg0;
1232
+ const config = require_i18n.useConfig();
1233
+ const currentLocale = require_i18n.useLocale() ?? config.locales?.default;
1219
1234
  const t = require_i18n.useBuiltInText();
1220
1235
  const { buttonProps, dialogProps } = useSearchProps();
1236
+ if (!config.features.search.enabled) return null;
1221
1237
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1222
1238
  className: "clarify-mobile-search contents lg:hidden",
1223
1239
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
@@ -1232,7 +1248,8 @@ function MobileSearch(arg0) {
1232
1248
  className: "lg:hidden",
1233
1249
  routes,
1234
1250
  navigation,
1235
- routePrefix,
1251
+ routePrefix: config.routePrefix,
1252
+ assetPrefix: config.assetPrefix,
1236
1253
  currentLocale,
1237
1254
  onNavigate,
1238
1255
  ...dialogProps
@@ -1341,9 +1358,30 @@ function TopLevelNavItem(arg0) {
1341
1358
  children
1342
1359
  }) });
1343
1360
  }
1344
- function resolveHomeHref(config, currentLocale) {
1345
- const homeUrl = config.homeUrl ?? "/";
1346
- return isExternalHref(homeUrl) ? homeUrl : localizeHref(homeUrl, config, currentLocale);
1361
+ function NavbarTabs(arg0) {
1362
+ const { tabs, currentLocale } = arg0;
1363
+ const pathname = normalizeRoutePath((0, react_router_dom.useLocation)().pathname);
1364
+ const t = require_i18n.useBuiltInText();
1365
+ if (!tabs?.length) return null;
1366
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
1367
+ className: "clarify-tabs-navbar hidden md:block",
1368
+ "aria-label": t("navbar.sections"),
1369
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
1370
+ role: "list",
1371
+ className: "flex items-center gap-0.5",
1372
+ children: tabs.map((tab) => {
1373
+ const active = isActiveTab(tab, pathname, currentLocale);
1374
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TopLevelNavItem, {
1375
+ href: tab.path,
1376
+ active,
1377
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(NavigationIcon, {
1378
+ name: tab.icon,
1379
+ className: "mr-1.5 h-4 w-4"
1380
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: tab.title })]
1381
+ }, `${tab.title}-${tab.path}`);
1382
+ })
1383
+ })
1384
+ });
1347
1385
  }
1348
1386
  function MobileNavbarMenu(arg0) {
1349
1387
  const { links, config, currentLocale } = arg0;
@@ -1505,7 +1543,8 @@ function ProductTabs(arg0) {
1505
1543
  });
1506
1544
  }
1507
1545
  var Header = (0, react.forwardRef)(function Header(arg0, ref) {
1508
- const { config, navigation, tabs, routes, currentLocale, currentRoute, banner, topAreaRef, className, ...props } = arg0;
1546
+ const { navigation, tabs, routes, currentLocale, currentRoute, banner, topAreaRef, className, ...props } = arg0;
1547
+ const config = require_i18n.useConfig();
1509
1548
  const t = require_i18n.useBuiltInText();
1510
1549
  const pathname = normalizeRoutePath((0, react_router_dom.useLocation)().pathname);
1511
1550
  const { isOpen: mobileNavIsOpen } = useMobileNavigationStore();
@@ -1516,6 +1555,7 @@ var Header = (0, react.forwardRef)(function Header(arg0, ref) {
1516
1555
  const bgOpacityLight = (0, framer_motion.useTransform)(scrollY, [0, 72], ["70%", "95%"]);
1517
1556
  const bgOpacityDark = (0, framer_motion.useTransform)(scrollY, [0, 72], ["60%", "92%"]);
1518
1557
  const hasNavbarLinks = Boolean(config.navigation?.links?.length);
1558
+ const tabsInNavbar = config.layout?.tabs === "navbar";
1519
1559
  function renderBrand() {
1520
1560
  if (homeExternal) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_headlessui_react.CloseButton, {
1521
1561
  as: "a",
@@ -1567,13 +1607,20 @@ var Header = (0, react.forwardRef)(function Header(arg0, ref) {
1567
1607
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1568
1608
  className: "clarify-header-actions flex shrink-0 items-center gap-1",
1569
1609
  children: [
1610
+ tabsInNavbar ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Search, {
1611
+ compact: true,
1612
+ routes,
1613
+ navigation
1614
+ }) : null,
1615
+ tabsInNavbar ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NavbarTabs, {
1616
+ tabs,
1617
+ currentLocale
1618
+ }) : null,
1570
1619
  renderTopLinks(),
1571
1620
  hasNavbarLinks ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "mx-2 hidden h-5 w-px bg-(--clarify-theme-tokens-colors-border) md:block md:dark:bg-white/15" }) : null,
1572
1621
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MobileSearch, {
1573
1622
  routes,
1574
- navigation,
1575
- routePrefix: config.routePrefix,
1576
- currentLocale
1623
+ navigation
1577
1624
  }),
1578
1625
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LanguageSwitcher, {
1579
1626
  config,
@@ -1599,7 +1646,6 @@ var Header = (0, react.forwardRef)(function Header(arg0, ref) {
1599
1646
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1600
1647
  className: "clarify-mobile-brand flex items-center gap-5 lg:hidden",
1601
1648
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MobileNavigation, {
1602
- config,
1603
1649
  navigation,
1604
1650
  tabs,
1605
1651
  routes,
@@ -1608,15 +1654,13 @@ var Header = (0, react.forwardRef)(function Header(arg0, ref) {
1608
1654
  })
1609
1655
  }), renderBrand()]
1610
1656
  }),
1611
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1657
+ !tabsInNavbar ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1612
1658
  className: "clarify-header-center absolute left-1/2 hidden -translate-x-1/2 lg:block",
1613
1659
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Search, {
1614
1660
  routes,
1615
- navigation,
1616
- routePrefix: config.routePrefix,
1617
- currentLocale
1661
+ navigation
1618
1662
  })
1619
- }),
1663
+ }) : null,
1620
1664
  renderHeaderActions()
1621
1665
  ]
1622
1666
  });
@@ -1630,10 +1674,10 @@ var Header = (0, react.forwardRef)(function Header(arg0, ref) {
1630
1674
  "data-clarify-header-banner": true,
1631
1675
  children: banner
1632
1676
  }),
1633
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProductTabs, {
1677
+ !tabsInNavbar ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProductTabs, {
1634
1678
  tabs,
1635
1679
  currentLocale
1636
- })
1680
+ }) : null
1637
1681
  ]
1638
1682
  });
1639
1683
  }
@@ -1653,21 +1697,15 @@ var Header = (0, react.forwardRef)(function Header(arg0, ref) {
1653
1697
  //#region source/app/PageActions.tsx
1654
1698
  var PageActionsContext = (0, react.createContext)({});
1655
1699
  function PageActionsProvider(props) {
1656
- const { children, route, routePrefix } = props;
1700
+ const { children, route } = props;
1657
1701
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageActionsContext.Provider, {
1658
- value: {
1659
- route,
1660
- routePrefix
1661
- },
1702
+ value: { route },
1662
1703
  children
1663
1704
  });
1664
1705
  }
1665
1706
  function PageActions() {
1666
- const { route, routePrefix } = (0, react.useContext)(PageActionsContext);
1667
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContentActions, {
1668
- route,
1669
- routePrefix
1670
- });
1707
+ const { route } = (0, react.useContext)(PageActionsContext);
1708
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContentActions, { route });
1671
1709
  }
1672
1710
  //#endregion
1673
1711
  Object.defineProperty(exports, "Header", {
@@ -1784,6 +1822,12 @@ Object.defineProperty(exports, "remToPx", {
1784
1822
  return remToPx;
1785
1823
  }
1786
1824
  });
1825
+ Object.defineProperty(exports, "resolveHomeHref", {
1826
+ enumerable: true,
1827
+ get: function() {
1828
+ return resolveHomeHref;
1829
+ }
1830
+ });
1787
1831
  Object.defineProperty(exports, "resolveLocalizedText", {
1788
1832
  enumerable: true,
1789
1833
  get: function() {
@@ -1827,4 +1871,4 @@ Object.defineProperty(exports, "useTheme", {
1827
1871
  }
1828
1872
  });
1829
1873
 
1830
- //# sourceMappingURL=PageActions-ob2OJusG.cjs.map
1874
+ //# sourceMappingURL=PageActions-DxGK-444.cjs.map