@clarify-labs/renderer 0.11.6 → 0.11.8

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 (66) hide show
  1. package/output/{ClarifyShell-CKvXZj0f.js → ClarifyShell-CGoRrkn1.js} +120 -68
  2. package/output/ClarifyShell-CGoRrkn1.js.map +1 -0
  3. package/output/{ClarifyShell-CukbPOAd.cjs → ClarifyShell-D8OGIUWq.cjs} +120 -68
  4. package/output/ClarifyShell-D8OGIUWq.cjs.map +1 -0
  5. package/output/{MermaidViewer-FOg263MO.cjs → MermaidViewer-CFqy0BnO.cjs} +3 -3
  6. package/output/{MermaidViewer-FOg263MO.cjs.map → MermaidViewer-CFqy0BnO.cjs.map} +1 -1
  7. package/output/{MermaidViewer-_tpH0JNn.js → MermaidViewer-TdU3sRfy.js} +3 -3
  8. package/output/{MermaidViewer-_tpH0JNn.js.map → MermaidViewer-TdU3sRfy.js.map} +1 -1
  9. package/output/{OpenApiOperation-c-I6Nw9j.cjs → OpenApiOperation-Bd68uxXq.cjs} +9 -8
  10. package/output/{OpenApiOperation-c-I6Nw9j.cjs.map → OpenApiOperation-Bd68uxXq.cjs.map} +1 -1
  11. package/output/{OpenApiOperation-Dv9u2GEJ.js → OpenApiOperation-vCuIKI4O.js} +9 -8
  12. package/output/{OpenApiOperation-Dv9u2GEJ.js.map → OpenApiOperation-vCuIKI4O.js.map} +1 -1
  13. package/output/{PageActions-DviEypf6.js → PageActions-CqXr0SyW.js} +112 -75
  14. package/output/PageActions-CqXr0SyW.js.map +1 -0
  15. package/output/{PageActions-ob2OJusG.cjs → PageActions-DPYXFL6N.cjs} +117 -74
  16. package/output/PageActions-DPYXFL6N.cjs.map +1 -0
  17. package/output/{SearchDialog-89JAjQMh.js → SearchDialog-BQcbGNvl.js} +29 -20
  18. package/output/SearchDialog-BQcbGNvl.js.map +1 -0
  19. package/output/{SearchDialog-CTiUIKeo.cjs → SearchDialog-CExM6Bxd.cjs} +29 -20
  20. package/output/SearchDialog-CExM6Bxd.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-Cff810G_.js → i18n-D4O3z-sP.js} +24 -3
  30. package/output/i18n-D4O3z-sP.js.map +1 -0
  31. package/output/{i18n-Cjfk1N7i.cjs → i18n-Dw4Jlho-.cjs} +36 -3
  32. package/output/i18n-Dw4Jlho-.cjs.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/preview.cjs +6 -6
  39. package/output/preview.cjs.map +1 -1
  40. package/output/preview.js +6 -6
  41. package/output/preview.js.map +1 -1
  42. package/output/{render-BxiVlY6q.cjs → render-CqBz1q82.cjs} +2 -2
  43. package/output/{render-BxiVlY6q.cjs.map → render-CqBz1q82.cjs.map} +1 -1
  44. package/output/{render-B41PHjt8.js → render-DQRifjrn.js} +2 -2
  45. package/output/{render-B41PHjt8.js.map → render-DQRifjrn.js.map} +1 -1
  46. package/output/renderer.css +4 -0
  47. package/output/server.cjs +2 -2
  48. package/output/server.js +2 -2
  49. package/output/shell/ContentActions.d.ts +0 -1
  50. package/output/shell/Header.d.ts +1 -2
  51. package/output/shell/Search.d.ts +3 -6
  52. package/output/shell/mobile.d.ts +1 -2
  53. package/output/shell/search/SearchDialog.d.ts +2 -1
  54. package/output/shell/search/pagefind.d.ts +3 -2
  55. package/output/theme/ThemeRoot.d.ts +0 -2
  56. package/output/theme/randomTheme.d.ts +2 -1
  57. package/output/utils/href.d.ts +2 -0
  58. package/package.json +1 -1
  59. package/output/ClarifyShell-CKvXZj0f.js.map +0 -1
  60. package/output/ClarifyShell-CukbPOAd.cjs.map +0 -1
  61. package/output/PageActions-DviEypf6.js.map +0 -1
  62. package/output/PageActions-ob2OJusG.cjs.map +0 -1
  63. package/output/SearchDialog-89JAjQMh.js.map +0 -1
  64. package/output/SearchDialog-CTiUIKeo.cjs.map +0 -1
  65. package/output/i18n-Cff810G_.js.map +0 -1
  66. package/output/i18n-Cjfk1N7i.cjs.map +0 -1
@@ -1,11 +1,11 @@
1
- import { t as useBuiltInText } from "./i18n-Cff810G_.js";
1
+ import { a as useConfig, l as useLocale, t as useBuiltInText } from "./i18n-D4O3z-sP.js";
2
2
  import clsx from "clsx";
3
3
  import { Suspense, createContext, forwardRef, lazy, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
4
4
  import { Link, useLocation } from "react-router-dom";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
5
6
  import { CloseButton, Dialog, DialogBackdrop, DialogPanel, Menu, MenuButton, MenuItem, MenuItems, TransitionChild } from "@headlessui/react";
6
7
  import * as LucideIcons from "lucide-react";
7
8
  import { Check, ChevronDown, ChevronLeft, ChevronRight, Copy, ExternalLink, FileText, Globe2, Link2, LoaderCircle, Menu as Menu$1, Monitor, Moon, MoreHorizontal, PencilLine, Search, Sun, Terminal, X } from "lucide-react";
8
- import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { AnimatePresence, LayoutGroup, motion, useReducedMotion, useScroll, useTransform } from "framer-motion";
10
10
  import { create, createStore, useStore } from "zustand";
11
11
  //#region source/utils/clipboard.ts
@@ -47,6 +47,10 @@ function localizeHref(href, config, locale) {
47
47
  const cleanHref = href === "/" ? "" : href.replace(/^\/+/, "");
48
48
  return `/${locale}${cleanHref ? `/${cleanHref}` : ""}`;
49
49
  }
50
+ function resolveHomeHref(config, locale) {
51
+ const homeUrl = config.homeUrl ?? "/";
52
+ return isExternalHref(homeUrl) ? homeUrl : localizeHref(homeUrl, config, locale);
53
+ }
50
54
  function prefixHref(href, routePrefix = "/") {
51
55
  if (isExternalHref(href) || href.startsWith("#")) return href;
52
56
  if (!routePrefix || routePrefix === "/") return href.startsWith("/") ? href : `/${href}`;
@@ -56,17 +60,24 @@ function prefixHref(href, routePrefix = "/") {
56
60
  if (path === prefix || path.startsWith(`${prefix}/`)) return `/${path}`;
57
61
  return `/${prefix}/${path}`;
58
62
  }
63
+ function resolveAbsoluteSiteHref(href, config) {
64
+ const path = prefixHref(href, config.routePrefix);
65
+ if (isExternalHref(path)) return path;
66
+ const base = config.siteUrl;
67
+ if (!base) return void 0;
68
+ return new URL(path, base.endsWith("/") ? base : `${base}/`).href;
69
+ }
59
70
  //#endregion
60
71
  //#region source/shell/ContentActions.tsx
61
72
  function resolveContentArtifactUrl(contentArtifactUrl, routePrefix = "/") {
62
73
  return prefixHref(contentArtifactUrl, routePrefix);
63
74
  }
64
- function getAbsoluteUrl(path) {
65
- if (typeof window === "undefined") return path;
66
- return new URL(path, window.location.href).href;
67
- }
68
75
  function ContentActions(arg0) {
69
- const { route, routePrefix } = arg0;
76
+ const { route } = arg0;
77
+ const config = useConfig();
78
+ const routePrefix = config.routePrefix;
79
+ const absoluteLinksEnabled = Boolean(config.siteUrl);
80
+ const mcpEnabled = absoluteLinksEnabled && config.features.search.enabled && config.features.search.mcp;
70
81
  const t = useBuiltInText();
71
82
  const [copied, setCopied] = useState("idle");
72
83
  const [copyPhase, setCopyPhase] = useState("idle");
@@ -105,22 +116,25 @@ function ContentActions(arg0) {
105
116
  const llmsArtifactUrl = resolveContentArtifactUrl("/llms.txt", routePrefix);
106
117
  async function handleCopyLink() {
107
118
  if (!contentArtifactUrl) return;
108
- await runCopy("link", () => getAbsoluteUrl(contentArtifactUrl));
119
+ await runCopy("link", () => resolveAbsoluteSiteHref(contentArtifactUrl, config) ?? contentArtifactUrl);
109
120
  }
110
121
  async function handleCopyLlms() {
111
- await runCopy("llms", () => getAbsoluteUrl(llmsArtifactUrl));
122
+ await runCopy("llms", () => resolveAbsoluteSiteHref(llmsArtifactUrl, config) ?? llmsArtifactUrl);
112
123
  }
113
124
  async function handleCopyMcp() {
114
- await runCopy("mcp", () => mcpConfig);
125
+ await runCopy("mcp", () => {
126
+ const siteUrl = resolveAbsoluteSiteHref("/", config);
127
+ if (!siteUrl) throw new Error("siteUrl is required for MCP configuration");
128
+ return JSON.stringify({ mcpServers: { clarify: {
129
+ command: "npx",
130
+ args: [
131
+ "@clarify-labs/cli",
132
+ "mcp",
133
+ siteUrl
134
+ ]
135
+ } } }, null, 2);
136
+ });
115
137
  }
116
- const mcpConfig = JSON.stringify({ mcpServers: { clarify: {
117
- command: "npx",
118
- args: [
119
- "@clarify-labs/cli",
120
- "mcp",
121
- window.location.origin
122
- ]
123
- } } }, null, 2);
124
138
  const actions = contentArtifactUrl ? [{
125
139
  key: "content",
126
140
  label: t("contentActions.copyContent"),
@@ -128,14 +142,14 @@ function ContentActions(arg0) {
128
142
  icon: Copy,
129
143
  run: handleCopyContent,
130
144
  copiedLabel: t("contentActions.copiedContent")
131
- }, {
145
+ }, ...absoluteLinksEnabled ? [{
132
146
  key: "link",
133
147
  label: t("contentActions.copyLink", replacements),
134
148
  description: t("contentActions.copyLinkDescription", replacements),
135
149
  icon: Link2,
136
150
  run: handleCopyLink,
137
151
  copiedLabel: t("contentActions.copiedLink")
138
- }] : [];
152
+ }] : []] : [];
139
153
  const llmsAction = {
140
154
  key: "llms",
141
155
  label: t("contentActions.copyLlms"),
@@ -298,7 +312,7 @@ function ContentActions(arg0) {
298
312
  ]
299
313
  }) }, action.key);
300
314
  }),
301
- /* @__PURE__ */ jsx(MenuItem, { children: /* @__PURE__ */ jsxs("button", {
315
+ absoluteLinksEnabled ? /* @__PURE__ */ jsx(MenuItem, { children: /* @__PURE__ */ jsxs("button", {
302
316
  type: "button",
303
317
  onClick: llmsAction.run,
304
318
  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",
@@ -319,8 +333,8 @@ function ContentActions(arg0) {
319
333
  }),
320
334
  /* @__PURE__ */ jsx(Check, { className: `h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-primary) transition ${copied === llmsAction.key ? "opacity-100" : "opacity-0"}` })
321
335
  ]
322
- }) }, llmsAction.key),
323
- /* @__PURE__ */ jsx(MenuItem, { children: /* @__PURE__ */ jsxs("button", {
336
+ }) }, llmsAction.key) : null,
337
+ mcpEnabled ? /* @__PURE__ */ jsx(MenuItem, { children: /* @__PURE__ */ jsxs("button", {
324
338
  type: "button",
325
339
  onClick: mcpAction.run,
326
340
  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",
@@ -341,7 +355,7 @@ function ContentActions(arg0) {
341
355
  }),
342
356
  /* @__PURE__ */ jsx(Check, { className: `h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-primary) transition ${copied === mcpAction.key ? "opacity-100" : "opacity-0"}` })
343
357
  ]
344
- }) }, mcpAction.key)
358
+ }) }, mcpAction.key) : null
345
359
  ]
346
360
  })
347
361
  ]
@@ -1081,7 +1095,7 @@ function MobileTabsSelect(arg0) {
1081
1095
  });
1082
1096
  }
1083
1097
  function MobileNavigationDialog(arg0) {
1084
- const { config, isOpen, navigation, tabs, routes, currentLocale, currentRoute, close } = arg0;
1098
+ const { isOpen, navigation, tabs, routes, currentLocale, currentRoute, close } = arg0;
1085
1099
  return /* @__PURE__ */ jsxs(Dialog, {
1086
1100
  transition: true,
1087
1101
  open: isOpen,
@@ -1091,7 +1105,6 @@ function MobileNavigationDialog(arg0) {
1091
1105
  transition: true,
1092
1106
  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"
1093
1107
  }), /* @__PURE__ */ jsxs(DialogPanel, { children: [/* @__PURE__ */ jsx(TransitionChild, { children: /* @__PURE__ */ jsx(Header, {
1094
- config,
1095
1108
  navigation,
1096
1109
  tabs,
1097
1110
  routes,
@@ -1121,7 +1134,7 @@ var useMobileNavigationStore = create()((set) => ({
1121
1134
  toggle: () => set((state) => ({ isOpen: !state.isOpen }))
1122
1135
  }));
1123
1136
  function MobileNavigation(arg0) {
1124
- const { config, navigation, tabs, routes, currentLocale, currentRoute } = arg0;
1137
+ const { navigation, tabs, routes, currentLocale, currentRoute } = arg0;
1125
1138
  const isInsideMobileNavigation = useIsInsideMobileNavigation();
1126
1139
  const { isOpen, toggle, close } = useMobileNavigationStore();
1127
1140
  const t = useBuiltInText();
@@ -1137,7 +1150,6 @@ function MobileNavigation(arg0) {
1137
1150
  }), !isInsideMobileNavigation ? /* @__PURE__ */ jsx(Suspense, {
1138
1151
  fallback: null,
1139
1152
  children: /* @__PURE__ */ jsx(MobileNavigationDialog, {
1140
- config,
1141
1153
  navigation,
1142
1154
  tabs,
1143
1155
  routes,
@@ -1169,43 +1181,44 @@ function useSearchProps() {
1169
1181
  }
1170
1182
  //#endregion
1171
1183
  //#region source/shell/Search.tsx
1172
- var SearchDialog = lazy(() => import("./SearchDialog-89JAjQMh.js"));
1184
+ var SearchDialog = lazy(() => import("./SearchDialog-BQcbGNvl.js"));
1173
1185
  function getModifierKey() {
1174
1186
  if (typeof navigator === "undefined") return "Ctrl ";
1175
1187
  return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl ";
1176
1188
  }
1177
1189
  function Search$1(arg0) {
1178
- const { routes, navigation, routePrefix, currentLocale } = arg0;
1190
+ const { routes, navigation, compact = false } = arg0;
1191
+ const config = useConfig();
1192
+ const currentLocale = useLocale() ?? config.locales?.default;
1179
1193
  const t = useBuiltInText();
1180
1194
  const modifierKey = getModifierKey();
1181
1195
  const { buttonProps, dialogProps } = useSearchProps();
1196
+ if (!config.features.search.enabled) return null;
1182
1197
  return /* @__PURE__ */ jsxs("div", {
1183
- className: "clarify-search hidden w-80 max-w-(--clarify-search-max-width) lg:block",
1198
+ className: compact ? "clarify-search hidden lg:block" : "clarify-search hidden w-80 max-w-(--clarify-search-max-width) lg:block",
1184
1199
  children: [/* @__PURE__ */ jsxs("button", {
1185
1200
  type: "button",
1186
- 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",
1201
+ 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",
1202
+ "aria-label": compact ? t("search.placeholder") : void 0,
1187
1203
  ...buttonProps,
1188
- children: [
1189
- /* @__PURE__ */ jsx(Search, { className: "h-5 w-5 stroke-current" }),
1190
- t("search.button"),
1191
- /* @__PURE__ */ jsxs("kbd", {
1192
- 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",
1193
- children: [/* @__PURE__ */ jsx("kbd", {
1194
- className: "font-sans",
1195
- children: modifierKey
1196
- }), /* @__PURE__ */ jsx("kbd", {
1197
- className: "font-sans",
1198
- children: "K"
1199
- })]
1200
- })
1201
- ]
1204
+ children: [/* @__PURE__ */ jsx(Search, { className: "h-5 w-5 stroke-current" }), !compact ? /* @__PURE__ */ jsxs(Fragment$1, { children: [t("search.button"), /* @__PURE__ */ jsxs("kbd", {
1205
+ 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",
1206
+ children: [/* @__PURE__ */ jsx("kbd", {
1207
+ className: "font-sans",
1208
+ children: modifierKey
1209
+ }), /* @__PURE__ */ jsx("kbd", {
1210
+ className: "font-sans",
1211
+ children: "K"
1212
+ })]
1213
+ })] }) : null]
1202
1214
  }), /* @__PURE__ */ jsx(Suspense, {
1203
1215
  fallback: null,
1204
1216
  children: /* @__PURE__ */ jsx(SearchDialog, {
1205
1217
  className: "hidden lg:block",
1206
1218
  routes,
1207
1219
  navigation,
1208
- routePrefix,
1220
+ routePrefix: config.routePrefix,
1221
+ assetPrefix: config.assetPrefix,
1209
1222
  currentLocale,
1210
1223
  ...dialogProps
1211
1224
  })
@@ -1213,9 +1226,12 @@ function Search$1(arg0) {
1213
1226
  });
1214
1227
  }
1215
1228
  function MobileSearch(arg0) {
1216
- const { routes, navigation, routePrefix, currentLocale, onNavigate } = arg0;
1229
+ const { routes, navigation, onNavigate } = arg0;
1230
+ const config = useConfig();
1231
+ const currentLocale = useLocale() ?? config.locales?.default;
1217
1232
  const t = useBuiltInText();
1218
1233
  const { buttonProps, dialogProps } = useSearchProps();
1234
+ if (!config.features.search.enabled) return null;
1219
1235
  return /* @__PURE__ */ jsxs("div", {
1220
1236
  className: "clarify-mobile-search contents lg:hidden",
1221
1237
  children: [/* @__PURE__ */ jsxs("button", {
@@ -1230,7 +1246,8 @@ function MobileSearch(arg0) {
1230
1246
  className: "lg:hidden",
1231
1247
  routes,
1232
1248
  navigation,
1233
- routePrefix,
1249
+ routePrefix: config.routePrefix,
1250
+ assetPrefix: config.assetPrefix,
1234
1251
  currentLocale,
1235
1252
  onNavigate,
1236
1253
  ...dialogProps
@@ -1339,9 +1356,30 @@ function TopLevelNavItem(arg0) {
1339
1356
  children
1340
1357
  }) });
1341
1358
  }
1342
- function resolveHomeHref(config, currentLocale) {
1343
- const homeUrl = config.homeUrl ?? "/";
1344
- return isExternalHref(homeUrl) ? homeUrl : localizeHref(homeUrl, config, currentLocale);
1359
+ function NavbarTabs(arg0) {
1360
+ const { tabs, currentLocale } = arg0;
1361
+ const pathname = normalizeRoutePath(useLocation().pathname);
1362
+ const t = useBuiltInText();
1363
+ if (!tabs?.length) return null;
1364
+ return /* @__PURE__ */ jsx("nav", {
1365
+ className: "clarify-tabs-navbar hidden md:block",
1366
+ "aria-label": t("navbar.sections"),
1367
+ children: /* @__PURE__ */ jsx("ul", {
1368
+ role: "list",
1369
+ className: "flex items-center gap-0.5",
1370
+ children: tabs.map((tab) => {
1371
+ const active = isActiveTab(tab, pathname, currentLocale);
1372
+ return /* @__PURE__ */ jsxs(TopLevelNavItem, {
1373
+ href: tab.path,
1374
+ active,
1375
+ children: [/* @__PURE__ */ jsx(NavigationIcon, {
1376
+ name: tab.icon,
1377
+ className: "mr-1.5 h-4 w-4"
1378
+ }), /* @__PURE__ */ jsx("span", { children: tab.title })]
1379
+ }, `${tab.title}-${tab.path}`);
1380
+ })
1381
+ })
1382
+ });
1345
1383
  }
1346
1384
  function MobileNavbarMenu(arg0) {
1347
1385
  const { links, config, currentLocale } = arg0;
@@ -1503,7 +1541,8 @@ function ProductTabs(arg0) {
1503
1541
  });
1504
1542
  }
1505
1543
  var Header = forwardRef(function Header(arg0, ref) {
1506
- const { config, navigation, tabs, routes, currentLocale, currentRoute, banner, topAreaRef, className, ...props } = arg0;
1544
+ const { navigation, tabs, routes, currentLocale, currentRoute, banner, topAreaRef, className, ...props } = arg0;
1545
+ const config = useConfig();
1507
1546
  const t = useBuiltInText();
1508
1547
  const pathname = normalizeRoutePath(useLocation().pathname);
1509
1548
  const { isOpen: mobileNavIsOpen } = useMobileNavigationStore();
@@ -1514,6 +1553,7 @@ var Header = forwardRef(function Header(arg0, ref) {
1514
1553
  const bgOpacityLight = useTransform(scrollY, [0, 72], ["70%", "95%"]);
1515
1554
  const bgOpacityDark = useTransform(scrollY, [0, 72], ["60%", "92%"]);
1516
1555
  const hasNavbarLinks = Boolean(config.navigation?.links?.length);
1556
+ const tabsInNavbar = config.layout?.tabs === "navbar";
1517
1557
  function renderBrand() {
1518
1558
  if (homeExternal) return /* @__PURE__ */ jsxs(CloseButton, {
1519
1559
  as: "a",
@@ -1565,13 +1605,16 @@ var Header = forwardRef(function Header(arg0, ref) {
1565
1605
  return /* @__PURE__ */ jsxs("div", {
1566
1606
  className: "clarify-header-actions flex shrink-0 items-center gap-1",
1567
1607
  children: [
1608
+ tabsInNavbar ? /* @__PURE__ */ jsx(Search$1, {
1609
+ compact: true,
1610
+ routes,
1611
+ navigation
1612
+ }) : null,
1568
1613
  renderTopLinks(),
1569
1614
  hasNavbarLinks ? /* @__PURE__ */ jsx("div", { className: "mx-2 hidden h-5 w-px bg-(--clarify-theme-tokens-colors-border) md:block md:dark:bg-white/15" }) : null,
1570
1615
  /* @__PURE__ */ jsx(MobileSearch, {
1571
1616
  routes,
1572
- navigation,
1573
- routePrefix: config.routePrefix,
1574
- currentLocale
1617
+ navigation
1575
1618
  }),
1576
1619
  /* @__PURE__ */ jsx(LanguageSwitcher, {
1577
1620
  config,
@@ -1597,7 +1640,6 @@ var Header = forwardRef(function Header(arg0, ref) {
1597
1640
  children: [/* @__PURE__ */ jsx("div", {
1598
1641
  className: "clarify-mobile-brand flex items-center gap-5 lg:hidden",
1599
1642
  children: /* @__PURE__ */ jsx(MobileNavigation, {
1600
- config,
1601
1643
  navigation,
1602
1644
  tabs,
1603
1645
  routes,
@@ -1608,11 +1650,12 @@ var Header = forwardRef(function Header(arg0, ref) {
1608
1650
  }),
1609
1651
  /* @__PURE__ */ jsx("div", {
1610
1652
  className: "clarify-header-center absolute left-1/2 hidden -translate-x-1/2 lg:block",
1611
- children: /* @__PURE__ */ jsx(Search$1, {
1612
- routes,
1613
- navigation,
1614
- routePrefix: config.routePrefix,
1653
+ children: tabsInNavbar ? /* @__PURE__ */ jsx(NavbarTabs, {
1654
+ tabs,
1615
1655
  currentLocale
1656
+ }) : /* @__PURE__ */ jsx(Search$1, {
1657
+ routes,
1658
+ navigation
1616
1659
  })
1617
1660
  }),
1618
1661
  renderHeaderActions()
@@ -1628,10 +1671,10 @@ var Header = forwardRef(function Header(arg0, ref) {
1628
1671
  "data-clarify-header-banner": true,
1629
1672
  children: banner
1630
1673
  }),
1631
- /* @__PURE__ */ jsx(ProductTabs, {
1674
+ !tabsInNavbar ? /* @__PURE__ */ jsx(ProductTabs, {
1632
1675
  tabs,
1633
1676
  currentLocale
1634
- })
1677
+ }) : null
1635
1678
  ]
1636
1679
  });
1637
1680
  }
@@ -1651,23 +1694,17 @@ var Header = forwardRef(function Header(arg0, ref) {
1651
1694
  //#region source/app/PageActions.tsx
1652
1695
  var PageActionsContext = createContext({});
1653
1696
  function PageActionsProvider(props) {
1654
- const { children, route, routePrefix } = props;
1697
+ const { children, route } = props;
1655
1698
  return /* @__PURE__ */ jsx(PageActionsContext.Provider, {
1656
- value: {
1657
- route,
1658
- routePrefix
1659
- },
1699
+ value: { route },
1660
1700
  children
1661
1701
  });
1662
1702
  }
1663
1703
  function PageActions() {
1664
- const { route, routePrefix } = useContext(PageActionsContext);
1665
- return /* @__PURE__ */ jsx(ContentActions, {
1666
- route,
1667
- routePrefix
1668
- });
1704
+ const { route } = useContext(PageActionsContext);
1705
+ return /* @__PURE__ */ jsx(ContentActions, { route });
1669
1706
  }
1670
1707
  //#endregion
1671
- export { isExternalHref as C, copyTextToClipboard as E, 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, resolveLucideIconName as l, ThemeProvider as m, PageActionsProvider as n, useSectionStore as o, ThemeToggle as p, Header as r, remToPx as s, PageActions as t, isSameRoutePath as u, localeCookieName as v, localizeHref as w, storeThemePreference as x, readLocaleCookie as y };
1708
+ export { isExternalHref as C, copyTextToClipboard as D, resolveHomeHref as E, 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, resolveLucideIconName as l, ThemeProvider as m, PageActionsProvider as n, useSectionStore as o, ThemeToggle as p, Header as r, remToPx as s, PageActions as t, isSameRoutePath as u, localeCookieName as v, localizeHref as w, storeThemePreference as x, readLocaleCookie as y };
1672
1709
 
1673
- //# sourceMappingURL=PageActions-DviEypf6.js.map
1710
+ //# sourceMappingURL=PageActions-CqXr0SyW.js.map