specra 0.1.0 → 0.1.3
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.
- package/dist/app/docs-page.js +487 -260
- package/dist/app/docs-page.js.map +1 -1
- package/dist/app/docs-page.mjs +4 -4
- package/dist/app/layout.js +105 -6
- package/dist/app/layout.js.map +1 -1
- package/dist/app/layout.mjs +3 -3
- package/dist/chunk-45VTS5EN.mjs +76 -0
- package/dist/chunk-45VTS5EN.mjs.map +1 -0
- package/dist/{chunk-IZFGEAD6.mjs → chunk-636BPU7W.mjs} +5 -4
- package/dist/chunk-636BPU7W.mjs.map +1 -0
- package/dist/{chunk-DR4EPLMT.mjs → chunk-6U2KVOSS.mjs} +1 -1
- package/dist/chunk-6U2KVOSS.mjs.map +1 -0
- package/dist/{chunk-KTRWWAGL.mjs → chunk-G62NLKJR.mjs} +2 -2
- package/dist/{chunk-NXRIAL7T.mjs → chunk-GWN6JRGM.mjs} +456 -232
- package/dist/chunk-GWN6JRGM.mjs.map +1 -0
- package/dist/{chunk-INL2EC72.mjs → chunk-RATDO3CG.mjs} +2 -5
- package/dist/chunk-RATDO3CG.mjs.map +1 -0
- package/dist/components/index.d.mts +86 -6
- package/dist/components/index.d.ts +86 -6
- package/dist/components/index.js +583 -310
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +560 -291
- package/dist/components/index.mjs.map +1 -1
- package/dist/index.d.mts +60 -5
- package/dist/index.d.ts +60 -5
- package/dist/index.js +613 -333
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -6
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.d.mts +35 -3
- package/dist/lib/index.d.ts +35 -3
- package/dist/lib/index.js +1 -4
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +3 -3
- package/package.json +7 -4
- package/scripts/postinstall.js +44 -0
- package/src/app/layout.tsx +6 -3
- package/src/components/docs/doc-layout-wrapper.tsx +23 -11
- package/src/components/docs/footer.tsx +36 -6
- package/src/components/docs/header.tsx +22 -14
- package/src/components/docs/index.ts +4 -0
- package/src/components/docs/logo.tsx +37 -0
- package/src/components/docs/mobile-doc-layout.tsx +59 -9
- package/src/components/docs/sidebar-menu-items.tsx +291 -0
- package/src/components/docs/sidebar.tsx +13 -278
- package/src/components/docs/tab-context.tsx +26 -1
- package/src/components/docs/tab-groups.tsx +138 -5
- package/src/lib/category.ts +1 -0
- package/src/lib/config.context.tsx +65 -0
- package/src/lib/config.schema.json +471 -0
- package/src/lib/config.server.ts +9 -6
- package/src/lib/config.types.ts +22 -2
- package/src/lib/index.ts +1 -0
- package/src/lib/mdx-cache.ts +1 -0
- package/dist/chunk-DR4EPLMT.mjs.map +0 -1
- package/dist/chunk-INL2EC72.mjs.map +0 -1
- package/dist/chunk-IZFGEAD6.mjs.map +0 -1
- package/dist/chunk-MZJHJ6BV.mjs +0 -21
- package/dist/chunk-MZJHJ6BV.mjs.map +0 -1
- package/dist/chunk-NXRIAL7T.mjs.map +0 -1
- /package/dist/{chunk-KTRWWAGL.mjs.map → chunk-G62NLKJR.mjs.map} +0 -0
package/dist/app/docs-page.js
CHANGED
|
@@ -1269,16 +1269,6 @@ var import_tailwind_merge = require("tailwind-merge");
|
|
|
1269
1269
|
function cn(...inputs) {
|
|
1270
1270
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
1271
1271
|
}
|
|
1272
|
-
function getAssetPath(path3) {
|
|
1273
|
-
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || process.env.__NEXT_ROUTER_BASEPATH || "";
|
|
1274
|
-
const normalizedPath = path3.startsWith("/") ? path3 : `/${path3}`;
|
|
1275
|
-
if (basePath) {
|
|
1276
|
-
const normalizedBase = basePath.startsWith("/") ? basePath : `/${basePath}`;
|
|
1277
|
-
const cleanBase = normalizedBase.replace(/\/$/, "");
|
|
1278
|
-
return `${cleanBase}${normalizedPath}`;
|
|
1279
|
-
}
|
|
1280
|
-
return normalizedPath;
|
|
1281
|
-
}
|
|
1282
1272
|
|
|
1283
1273
|
// src/components/docs/api/api-endpoint.tsx
|
|
1284
1274
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
@@ -2707,7 +2697,7 @@ function processContentWithEnv(content, config) {
|
|
|
2707
2697
|
var configInstance = null;
|
|
2708
2698
|
function getConfig() {
|
|
2709
2699
|
if (!configInstance) {
|
|
2710
|
-
|
|
2700
|
+
configInstance = loadConfig({});
|
|
2711
2701
|
}
|
|
2712
2702
|
return configInstance;
|
|
2713
2703
|
}
|
|
@@ -3143,12 +3133,49 @@ function SearchModal({ isOpen, onClose, config }) {
|
|
|
3143
3133
|
) });
|
|
3144
3134
|
}
|
|
3145
3135
|
|
|
3146
|
-
// src/components/docs/
|
|
3136
|
+
// src/components/docs/logo.tsx
|
|
3137
|
+
var import_next_themes = require("next-themes");
|
|
3147
3138
|
var import_react16 = require("react");
|
|
3148
3139
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3149
|
-
function
|
|
3150
|
-
const
|
|
3140
|
+
function Logo({ logo, alt = "Logo", className = "h-8 w-8 object-contain" }) {
|
|
3141
|
+
const { resolvedTheme } = (0, import_next_themes.useTheme)();
|
|
3142
|
+
const [mounted, setMounted] = (0, import_react16.useState)(false);
|
|
3151
3143
|
(0, import_react16.useEffect)(() => {
|
|
3144
|
+
setMounted(true);
|
|
3145
|
+
}, []);
|
|
3146
|
+
if (!logo) return null;
|
|
3147
|
+
if (typeof logo === "string") {
|
|
3148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: logo, alt, className });
|
|
3149
|
+
}
|
|
3150
|
+
if (!mounted) {
|
|
3151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: logo.light, alt, className });
|
|
3152
|
+
}
|
|
3153
|
+
const logoSrc = resolvedTheme === "dark" ? logo.dark : logo.light;
|
|
3154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: logoSrc, alt, className });
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
// src/components/docs/header.tsx
|
|
3158
|
+
var import_react17 = require("react");
|
|
3159
|
+
|
|
3160
|
+
// src/lib/config.context.tsx
|
|
3161
|
+
var React2 = __toESM(require("react"));
|
|
3162
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3163
|
+
var ConfigContext = React2.createContext(defaultConfig);
|
|
3164
|
+
function useConfig() {
|
|
3165
|
+
const config = React2.useContext(ConfigContext);
|
|
3166
|
+
if (!config) {
|
|
3167
|
+
throw new Error("useConfig must be used within a ConfigProvider");
|
|
3168
|
+
}
|
|
3169
|
+
return config;
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
// src/components/docs/header.tsx
|
|
3173
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3174
|
+
function Header({ currentVersion, versions, onMenuClick, config: configProp }) {
|
|
3175
|
+
const contextConfig = useConfig();
|
|
3176
|
+
const config = configProp || contextConfig;
|
|
3177
|
+
const [searchOpen, setSearchOpen] = (0, import_react17.useState)(false);
|
|
3178
|
+
(0, import_react17.useEffect)(() => {
|
|
3152
3179
|
const handleKeyDown = (e) => {
|
|
3153
3180
|
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
|
3154
3181
|
e.preventDefault();
|
|
@@ -3158,38 +3185,38 @@ function Header({ currentVersion, versions, onMenuClick, config }) {
|
|
|
3158
3185
|
window.addEventListener("keydown", handleKeyDown);
|
|
3159
3186
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
3160
3187
|
}, []);
|
|
3161
|
-
return /* @__PURE__ */ (0,
|
|
3162
|
-
/* @__PURE__ */ (0,
|
|
3163
|
-
/* @__PURE__ */ (0,
|
|
3164
|
-
/* @__PURE__ */ (0,
|
|
3188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("header", { className: "sticky top-0 z-50 w-full border-b border-border bg-background/95 backdrop-blur supports-backdrop-filter:bg-background/60", children: [
|
|
3189
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "container flex h-16 items-center justify-between px-6 mx-auto", children: [
|
|
3190
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
3191
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3165
3192
|
"button",
|
|
3166
3193
|
{
|
|
3167
3194
|
onClick: onMenuClick,
|
|
3168
3195
|
className: "lg:hidden hover:bg-muted p-2 rounded-md transition-colors",
|
|
3169
3196
|
"aria-label": "Toggle menu",
|
|
3170
|
-
children: /* @__PURE__ */ (0,
|
|
3197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.Menu, { className: "h-5 w-5" })
|
|
3171
3198
|
}
|
|
3172
3199
|
),
|
|
3173
|
-
/* @__PURE__ */ (0,
|
|
3174
|
-
config.site.logo ? /* @__PURE__ */ (0,
|
|
3175
|
-
/* @__PURE__ */ (0,
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_link5.default, { href: "/", className: "flex items-center gap-2", children: [
|
|
3201
|
+
!config.site.hideLogo && (config.site.logo ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Logo, { logo: config.site.logo, alt: config.site.title, className: "w-18 object-contain" }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "h-8 w-8 rounded-xl bg-primary flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-primary-foreground font-bold text-lg", children: config.site.title.charAt(0).toUpperCase() }) })),
|
|
3202
|
+
!config.site.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "font-semibold text-lg text-foreground", children: config.site.title ?? "Specra" })
|
|
3176
3203
|
] })
|
|
3177
3204
|
] }),
|
|
3178
|
-
/* @__PURE__ */ (0,
|
|
3179
|
-
config.search?.enabled && /* @__PURE__ */ (0,
|
|
3205
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3206
|
+
config.search?.enabled && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3180
3207
|
"button",
|
|
3181
3208
|
{
|
|
3182
3209
|
onClick: () => setSearchOpen(true),
|
|
3183
3210
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground hover:text-foreground bg-muted rounded-md transition-colors",
|
|
3184
3211
|
children: [
|
|
3185
|
-
/* @__PURE__ */ (0,
|
|
3186
|
-
/* @__PURE__ */ (0,
|
|
3187
|
-
/* @__PURE__ */ (0,
|
|
3212
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.Search, { className: "h-4 w-4" }),
|
|
3213
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "hidden sm:inline", children: config.search.placeholder || "Search" }),
|
|
3214
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("kbd", { className: "hidden sm:inline-flex h-5 select-none items-center gap-1 rounded border border-border bg-background px-1.5 font-mono text-xs font-medium", children: "\u2318K" })
|
|
3188
3215
|
]
|
|
3189
3216
|
}
|
|
3190
3217
|
),
|
|
3191
|
-
config.features?.versioning && /* @__PURE__ */ (0,
|
|
3192
|
-
config.social?.github && /* @__PURE__ */ (0,
|
|
3218
|
+
config.features?.versioning && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(VersionSwitcher, { currentVersion, versions }),
|
|
3219
|
+
config.social?.github && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3193
3220
|
"a",
|
|
3194
3221
|
{
|
|
3195
3222
|
href: config.social.github,
|
|
@@ -3197,10 +3224,10 @@ function Header({ currentVersion, versions, onMenuClick, config }) {
|
|
|
3197
3224
|
rel: "noopener noreferrer",
|
|
3198
3225
|
className: "hidden md:flex items-center justify-center h-9 w-9 rounded-md hover:bg-muted transition-colors",
|
|
3199
3226
|
"aria-label": "GitHub",
|
|
3200
|
-
children: /* @__PURE__ */ (0,
|
|
3227
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.Github, { className: "h-4 w-4" })
|
|
3201
3228
|
}
|
|
3202
3229
|
),
|
|
3203
|
-
config.social?.twitter && /* @__PURE__ */ (0,
|
|
3230
|
+
config.social?.twitter && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3204
3231
|
"a",
|
|
3205
3232
|
{
|
|
3206
3233
|
href: config.social.twitter,
|
|
@@ -3208,10 +3235,10 @@ function Header({ currentVersion, versions, onMenuClick, config }) {
|
|
|
3208
3235
|
rel: "noopener noreferrer",
|
|
3209
3236
|
className: "hidden md:flex items-center justify-center h-9 w-9 rounded-md hover:bg-muted transition-colors",
|
|
3210
3237
|
"aria-label": "Twitter",
|
|
3211
|
-
children: /* @__PURE__ */ (0,
|
|
3238
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.Twitter, { className: "h-4 w-4" })
|
|
3212
3239
|
}
|
|
3213
3240
|
),
|
|
3214
|
-
config.social?.discord && /* @__PURE__ */ (0,
|
|
3241
|
+
config.social?.discord && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3215
3242
|
"a",
|
|
3216
3243
|
{
|
|
3217
3244
|
href: config.social.discord,
|
|
@@ -3219,33 +3246,34 @@ function Header({ currentVersion, versions, onMenuClick, config }) {
|
|
|
3219
3246
|
rel: "noopener noreferrer",
|
|
3220
3247
|
className: "hidden md:flex items-center justify-center h-9 w-9 rounded-md hover:bg-muted transition-colors",
|
|
3221
3248
|
"aria-label": "Discord",
|
|
3222
|
-
children: /* @__PURE__ */ (0,
|
|
3249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react19.MessageCircle, { className: "h-4 w-4" })
|
|
3223
3250
|
}
|
|
3224
3251
|
),
|
|
3225
|
-
/* @__PURE__ */ (0,
|
|
3252
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ThemeToggle, {})
|
|
3226
3253
|
] })
|
|
3227
3254
|
] }),
|
|
3228
|
-
/* @__PURE__ */ (0,
|
|
3255
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SearchModal, { isOpen: searchOpen, onClose: () => setSearchOpen(false), config })
|
|
3229
3256
|
] });
|
|
3230
3257
|
}
|
|
3231
3258
|
|
|
3232
3259
|
// src/components/docs/doc-layout-wrapper.tsx
|
|
3233
|
-
var
|
|
3260
|
+
var import_react23 = require("react");
|
|
3234
3261
|
|
|
3235
3262
|
// src/components/docs/mobile-doc-layout.tsx
|
|
3236
|
-
var
|
|
3263
|
+
var import_react21 = require("react");
|
|
3264
|
+
var import_link8 = __toESM(require("next/link"));
|
|
3237
3265
|
|
|
3238
3266
|
// src/components/docs/footer.tsx
|
|
3239
3267
|
var import_link6 = __toESM(require("next/link"));
|
|
3240
|
-
var
|
|
3268
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3241
3269
|
function Footer({ config }) {
|
|
3242
3270
|
if (!config.footer) {
|
|
3243
3271
|
return null;
|
|
3244
3272
|
}
|
|
3245
|
-
return /* @__PURE__ */ (0,
|
|
3246
|
-
config.footer.links && config.footer.links.length > 0 && /* @__PURE__ */ (0,
|
|
3247
|
-
/* @__PURE__ */ (0,
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("footer", { className: "bg-muted/30 dark:bg-muted/10 rounded-2xl mt-24", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "px-6 py-12", children: [
|
|
3274
|
+
config.footer.links && config.footer.links.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-8 mb-8", children: config.footer.links.map((column, idx) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
|
|
3275
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h3", { className: "font-semibold text-foreground mb-4", children: column.title }),
|
|
3276
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("ul", { className: "space-y-2", children: column.items.map((item, itemIdx) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3249
3277
|
import_link6.default,
|
|
3250
3278
|
{
|
|
3251
3279
|
href: item.href,
|
|
@@ -3254,20 +3282,43 @@ function Footer({ config }) {
|
|
|
3254
3282
|
}
|
|
3255
3283
|
) }, itemIdx)) })
|
|
3256
3284
|
] }, idx)) }),
|
|
3257
|
-
|
|
3285
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "pt-8 border-t border-border/50", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col md:flex-row items-center justify-between gap-4", children: [
|
|
3286
|
+
config.footer.copyright && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-muted-foreground text-center md:text-left", children: config.footer.copyright }),
|
|
3287
|
+
config.footer.branding?.showBranding && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
3288
|
+
config.footer.branding.logo && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3289
|
+
Logo,
|
|
3290
|
+
{
|
|
3291
|
+
logo: config.footer.branding.logo,
|
|
3292
|
+
alt: config.footer.branding.title || "Powered by",
|
|
3293
|
+
className: "h-5 w-auto object-contain"
|
|
3294
|
+
}
|
|
3295
|
+
),
|
|
3296
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Powered by" }),
|
|
3297
|
+
config.footer.branding.url ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3298
|
+
import_link6.default,
|
|
3299
|
+
{
|
|
3300
|
+
href: config.footer.branding.url,
|
|
3301
|
+
target: "_blank",
|
|
3302
|
+
rel: "noopener noreferrer",
|
|
3303
|
+
className: "font-semibold hover:text-foreground transition-colors",
|
|
3304
|
+
children: config.footer.branding.title || "Specra"
|
|
3305
|
+
}
|
|
3306
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "font-semibold", children: config.footer.branding.title || "Specra" })
|
|
3307
|
+
] })
|
|
3308
|
+
] }) })
|
|
3258
3309
|
] }) });
|
|
3259
3310
|
}
|
|
3260
3311
|
|
|
3261
3312
|
// src/components/docs/site-banner.tsx
|
|
3262
3313
|
var import_lucide_react20 = require("lucide-react");
|
|
3263
|
-
var
|
|
3264
|
-
var
|
|
3314
|
+
var import_react18 = require("react");
|
|
3315
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3265
3316
|
function SiteBanner({ config }) {
|
|
3266
|
-
const [dismissed, setDismissed] = (0,
|
|
3267
|
-
const [mounted, setMounted] = (0,
|
|
3317
|
+
const [dismissed, setDismissed] = (0, import_react18.useState)(false);
|
|
3318
|
+
const [mounted, setMounted] = (0, import_react18.useState)(false);
|
|
3268
3319
|
const banner = config.banner;
|
|
3269
3320
|
const storageKey = "site-banner-dismissed";
|
|
3270
|
-
(0,
|
|
3321
|
+
(0, import_react18.useEffect)(() => {
|
|
3271
3322
|
setMounted(true);
|
|
3272
3323
|
const isDismissed = localStorage.getItem(storageKey) === "true";
|
|
3273
3324
|
setDismissed(isDismissed);
|
|
@@ -3311,64 +3362,182 @@ function SiteBanner({ config }) {
|
|
|
3311
3362
|
};
|
|
3312
3363
|
const type = banner.type || "info";
|
|
3313
3364
|
const { icon: IconComponent, bg, border, iconColor, textColor } = typeConfig[type];
|
|
3314
|
-
return /* @__PURE__ */ (0,
|
|
3315
|
-
/* @__PURE__ */ (0,
|
|
3316
|
-
/* @__PURE__ */ (0,
|
|
3317
|
-
banner.dismissible && /* @__PURE__ */ (0,
|
|
3365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `w-full border-b ${border} ${bg}`, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "container mx-auto px-6 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
3366
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconComponent, { className: `h-5 w-5 shrink-0 ${iconColor}` }),
|
|
3367
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: `text-sm font-medium ${textColor}`, children: banner.message }) }),
|
|
3368
|
+
banner.dismissible && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3318
3369
|
"button",
|
|
3319
3370
|
{
|
|
3320
3371
|
onClick: handleDismiss,
|
|
3321
3372
|
className: `shrink-0 p-1 rounded-md hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${iconColor}`,
|
|
3322
3373
|
"aria-label": "Dismiss banner",
|
|
3323
|
-
children: /* @__PURE__ */ (0,
|
|
3374
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react20.X, { className: "h-4 w-4" })
|
|
3324
3375
|
}
|
|
3325
3376
|
)
|
|
3326
3377
|
] }) }) });
|
|
3327
3378
|
}
|
|
3328
3379
|
|
|
3329
3380
|
// src/components/docs/tab-groups.tsx
|
|
3330
|
-
var
|
|
3331
|
-
|
|
3332
|
-
|
|
3381
|
+
var import_react19 = require("react");
|
|
3382
|
+
var import_navigation4 = require("next/navigation");
|
|
3383
|
+
var import_lucide_react21 = require("lucide-react");
|
|
3384
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3385
|
+
function TabGroups({ tabGroups, activeTabId, onTabChange, mobileOnly = false, docs, version }) {
|
|
3386
|
+
const [dropdownOpen, setDropdownOpen] = (0, import_react19.useState)(false);
|
|
3387
|
+
const router = (0, import_navigation4.useRouter)();
|
|
3388
|
+
const filteredTabGroups = docs ? tabGroups.filter((tab) => {
|
|
3389
|
+
const hasDocsInTab = docs.some((doc) => {
|
|
3390
|
+
const docTabGroup = doc.meta?.tab_group || doc.categoryTabGroup;
|
|
3391
|
+
return docTabGroup === tab.id || !docTabGroup && tab.id === tabGroups[0]?.id;
|
|
3392
|
+
});
|
|
3393
|
+
return hasDocsInTab;
|
|
3394
|
+
}) : tabGroups;
|
|
3395
|
+
const activeTab = activeTabId || filteredTabGroups[0]?.id || "";
|
|
3396
|
+
const activeTabData = filteredTabGroups.find((tab) => tab.id === activeTab);
|
|
3333
3397
|
const handleTabChange = (tabId) => {
|
|
3334
3398
|
onTabChange?.(tabId);
|
|
3399
|
+
setDropdownOpen(false);
|
|
3400
|
+
if (docs && version) {
|
|
3401
|
+
const firstDocInTab = docs.find((doc) => {
|
|
3402
|
+
const docTabGroup = doc.meta?.tab_group || doc.categoryTabGroup;
|
|
3403
|
+
return docTabGroup === tabId || !docTabGroup && tabId === filteredTabGroups[0]?.id;
|
|
3404
|
+
});
|
|
3405
|
+
if (firstDocInTab) {
|
|
3406
|
+
router.push(`/docs/${version}/${firstDocInTab.slug}`);
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
3335
3409
|
};
|
|
3336
|
-
if (!
|
|
3410
|
+
if (!filteredTabGroups || filteredTabGroups.length === 0) {
|
|
3337
3411
|
return null;
|
|
3338
3412
|
}
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3413
|
+
if (mobileOnly) {
|
|
3414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative", children: [
|
|
3415
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3416
|
+
"button",
|
|
3417
|
+
{
|
|
3418
|
+
onClick: () => setDropdownOpen(!dropdownOpen),
|
|
3419
|
+
className: "flex items-center justify-between w-full px-3 py-2 text-sm font-medium text-foreground bg-muted/50 rounded-lg hover:bg-muted transition-colors",
|
|
3420
|
+
"aria-label": "Select tab group",
|
|
3421
|
+
"aria-expanded": dropdownOpen,
|
|
3422
|
+
children: [
|
|
3423
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3424
|
+
activeTabData?.icon && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: activeTabData.icon, size: 16, className: "shrink-0" }),
|
|
3425
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { children: activeTabData?.label })
|
|
3426
|
+
] }),
|
|
3427
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3428
|
+
import_lucide_react21.ChevronDown,
|
|
3429
|
+
{
|
|
3430
|
+
className: `h-4 w-4 transition-transform ${dropdownOpen ? "rotate-180" : ""}`
|
|
3431
|
+
}
|
|
3432
|
+
)
|
|
3433
|
+
]
|
|
3434
|
+
}
|
|
3435
|
+
),
|
|
3436
|
+
dropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
3437
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3438
|
+
"div",
|
|
3439
|
+
{
|
|
3440
|
+
className: "fixed inset-0 z-40",
|
|
3441
|
+
onClick: () => setDropdownOpen(false)
|
|
3442
|
+
}
|
|
3443
|
+
),
|
|
3444
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "absolute top-full left-0 right-0 mt-2 bg-background border border-border rounded-lg shadow-lg z-50 max-h-[60vh] overflow-y-auto", children: filteredTabGroups.map((tab) => {
|
|
3445
|
+
const isActive = tab.id === activeTab;
|
|
3446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3447
|
+
"button",
|
|
3448
|
+
{
|
|
3449
|
+
onClick: () => handleTabChange(tab.id),
|
|
3450
|
+
className: `flex items-center gap-2 w-full px-3 py-2 text-sm font-medium text-left transition-colors first:rounded-t-lg last:rounded-b-lg ${isActive ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent hover:text-foreground"}`,
|
|
3451
|
+
children: [
|
|
3452
|
+
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: tab.icon, size: 16, className: "shrink-0" }),
|
|
3453
|
+
tab.label
|
|
3454
|
+
]
|
|
3455
|
+
},
|
|
3456
|
+
tab.id
|
|
3457
|
+
);
|
|
3458
|
+
}) })
|
|
3459
|
+
] })
|
|
3460
|
+
] });
|
|
3461
|
+
}
|
|
3462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "sticky top-16 z-30 border-b border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "container mx-auto px-6", children: [
|
|
3463
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "md:hidden relative", children: [
|
|
3464
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3465
|
+
"button",
|
|
3466
|
+
{
|
|
3467
|
+
onClick: () => setDropdownOpen(!dropdownOpen),
|
|
3468
|
+
className: "flex items-center justify-between w-full px-4 py-3 text-sm font-medium text-foreground",
|
|
3469
|
+
"aria-label": "Select tab",
|
|
3470
|
+
"aria-expanded": dropdownOpen,
|
|
3471
|
+
children: [
|
|
3472
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3473
|
+
activeTabData?.icon && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: activeTabData.icon, size: 16, className: "shrink-0" }),
|
|
3474
|
+
activeTabData?.label
|
|
3475
|
+
] }),
|
|
3476
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3477
|
+
import_lucide_react21.ChevronDown,
|
|
3478
|
+
{
|
|
3479
|
+
className: `h-4 w-4 transition-transform ${dropdownOpen ? "rotate-180" : ""}`
|
|
3480
|
+
}
|
|
3481
|
+
)
|
|
3482
|
+
]
|
|
3483
|
+
}
|
|
3484
|
+
),
|
|
3485
|
+
dropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
3486
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3487
|
+
"div",
|
|
3488
|
+
{
|
|
3489
|
+
className: "fixed inset-0 z-40",
|
|
3490
|
+
onClick: () => setDropdownOpen(false)
|
|
3491
|
+
}
|
|
3492
|
+
),
|
|
3493
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "absolute top-full left-0 right-0 bg-background border border-border shadow-lg z-50 max-h-[60vh] overflow-y-auto", children: filteredTabGroups.map((tab) => {
|
|
3494
|
+
const isActive = tab.id === activeTab;
|
|
3495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3496
|
+
"button",
|
|
3497
|
+
{
|
|
3498
|
+
onClick: () => handleTabChange(tab.id),
|
|
3499
|
+
className: `flex items-center gap-2 w-full px-4 py-3 text-sm font-medium text-left transition-colors ${isActive ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-accent hover:text-foreground"}`,
|
|
3500
|
+
children: [
|
|
3501
|
+
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: tab.icon, size: 16, className: "shrink-0" }),
|
|
3502
|
+
tab.label
|
|
3503
|
+
]
|
|
3504
|
+
},
|
|
3505
|
+
tab.id
|
|
3506
|
+
);
|
|
3507
|
+
}) })
|
|
3508
|
+
] })
|
|
3509
|
+
] }),
|
|
3510
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("nav", { className: "hidden md:flex gap-1", "aria-label": "Documentation tabs", children: filteredTabGroups.map((tab) => {
|
|
3511
|
+
const isActive = tab.id === activeTab;
|
|
3512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3513
|
+
"button",
|
|
3514
|
+
{
|
|
3515
|
+
onClick: () => handleTabChange(tab.id),
|
|
3516
|
+
className: `flex items-center gap-2 px-4 py-3 text-sm font-medium whitespace-nowrap transition-all border-b-2 ${isActive ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border"}`,
|
|
3517
|
+
"aria-current": isActive ? "page" : void 0,
|
|
3518
|
+
children: [
|
|
3519
|
+
tab.icon && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { icon: tab.icon, size: 16, className: "shrink-0" }),
|
|
3520
|
+
tab.label
|
|
3521
|
+
]
|
|
3522
|
+
},
|
|
3523
|
+
tab.id
|
|
3524
|
+
);
|
|
3525
|
+
}) })
|
|
3526
|
+
] }) });
|
|
3355
3527
|
}
|
|
3356
3528
|
|
|
3357
|
-
// src/components/docs/sidebar.tsx
|
|
3529
|
+
// src/components/docs/sidebar-menu-items.tsx
|
|
3358
3530
|
var import_link7 = __toESM(require("next/link"));
|
|
3359
|
-
var
|
|
3360
|
-
var
|
|
3361
|
-
var
|
|
3362
|
-
var
|
|
3363
|
-
function
|
|
3364
|
-
const pathname = (0,
|
|
3365
|
-
const [collapsed, setCollapsed] = (0,
|
|
3531
|
+
var import_navigation5 = require("next/navigation");
|
|
3532
|
+
var import_lucide_react22 = require("lucide-react");
|
|
3533
|
+
var import_react20 = require("react");
|
|
3534
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3535
|
+
function SidebarMenuItems({ docs, version, onLinkClick, config, activeTabGroup }) {
|
|
3536
|
+
const pathname = (0, import_navigation5.usePathname)();
|
|
3537
|
+
const [collapsed, setCollapsed] = (0, import_react20.useState)(() => {
|
|
3366
3538
|
const initial = {};
|
|
3367
3539
|
return initial;
|
|
3368
3540
|
});
|
|
3369
|
-
if (!config.navigation?.showSidebar) {
|
|
3370
|
-
return null;
|
|
3371
|
-
}
|
|
3372
3541
|
const hasTabGroups = config.navigation?.tabGroups && config.navigation.tabGroups.length > 0;
|
|
3373
3542
|
const filteredDocs = hasTabGroups && activeTabGroup ? docs.filter((doc) => {
|
|
3374
3543
|
const docTabGroup = doc.meta?.tab_group || doc.categoryTabGroup;
|
|
@@ -3464,21 +3633,21 @@ function Sidebar({ docs, version, onLinkClick, config, activeTabGroup }) {
|
|
|
3464
3633
|
const isCollapsed = hasActiveItem || isGroupActive ? false : collapsed[groupKey] ?? group.defaultCollapsed;
|
|
3465
3634
|
const marginLeft = depth > 0 ? "ml-4" : "";
|
|
3466
3635
|
const groupHref = `/docs/${version}/${group.path}`;
|
|
3467
|
-
return /* @__PURE__ */ (0,
|
|
3468
|
-
/* @__PURE__ */ (0,
|
|
3469
|
-
/* @__PURE__ */ (0,
|
|
3636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: `space-y-1 ${marginLeft}`, children: [
|
|
3637
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center group", children: [
|
|
3638
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3470
3639
|
import_link7.default,
|
|
3471
3640
|
{
|
|
3472
3641
|
href: groupHref,
|
|
3473
3642
|
onClick: onLinkClick,
|
|
3474
3643
|
className: `flex items-center gap-2 flex-1 px-3 py-2 text-sm font-semibold rounded-l-xl transition-all ${isGroupActive ? "bg-primary/10 text-primary" : "text-foreground hover:bg-accent/50"}`,
|
|
3475
3644
|
children: [
|
|
3476
|
-
group.icon ? /* @__PURE__ */ (0,
|
|
3645
|
+
group.icon ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { icon: group.icon, size: 16, className: "shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react22.FolderOpen, { size: 16, className: "shrink-0" }),
|
|
3477
3646
|
group.label
|
|
3478
3647
|
]
|
|
3479
3648
|
}
|
|
3480
3649
|
),
|
|
3481
|
-
hasContent && group.collapsible && config.navigation?.collapsibleSidebar && /* @__PURE__ */ (0,
|
|
3650
|
+
hasContent && group.collapsible && config.navigation?.collapsibleSidebar && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3482
3651
|
"button",
|
|
3483
3652
|
{
|
|
3484
3653
|
onClick: (e) => {
|
|
@@ -3488,11 +3657,11 @@ function Sidebar({ docs, version, onLinkClick, config, activeTabGroup }) {
|
|
|
3488
3657
|
},
|
|
3489
3658
|
className: `p-2 rounded-r-xl transition-all ${isGroupActive ? "hover:bg-primary/20" : "hover:bg-accent/50"}`,
|
|
3490
3659
|
"aria-label": isCollapsed ? "Expand section" : "Collapse section",
|
|
3491
|
-
children: isCollapsed ? /* @__PURE__ */ (0,
|
|
3660
|
+
children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react22.ChevronRight, { className: `h-4 w-4 ${isGroupActive ? "text-primary" : "text-muted-foreground"}` }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react22.ChevronDown, { className: `h-4 w-4 ${isGroupActive ? "text-primary" : "text-muted-foreground"}` })
|
|
3492
3661
|
}
|
|
3493
3662
|
)
|
|
3494
3663
|
] }),
|
|
3495
|
-
!isCollapsed && hasContent && /* @__PURE__ */ (0,
|
|
3664
|
+
!isCollapsed && hasContent && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "ml-4 space-y-1", children: (() => {
|
|
3496
3665
|
const merged = [
|
|
3497
3666
|
...sortedChildren.map(([childKey, childGroup]) => ({
|
|
3498
3667
|
type: "group",
|
|
@@ -3513,14 +3682,14 @@ function Sidebar({ docs, version, onLinkClick, config, activeTabGroup }) {
|
|
|
3513
3682
|
} else {
|
|
3514
3683
|
const href = `/docs/${version}/${item.doc.slug}`;
|
|
3515
3684
|
const isActive = pathname === href;
|
|
3516
|
-
return /* @__PURE__ */ (0,
|
|
3685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3517
3686
|
import_link7.default,
|
|
3518
3687
|
{
|
|
3519
3688
|
href,
|
|
3520
3689
|
onClick: onLinkClick,
|
|
3521
3690
|
className: `flex items-center gap-2 px-3 py-2 text-sm rounded-xl transition-all ${isActive ? "bg-primary/10 text-primary font-medium" : "text-foreground hover:text-foreground hover:bg-accent/50"}`,
|
|
3522
3691
|
children: [
|
|
3523
|
-
item.doc.meta?.icon && /* @__PURE__ */ (0,
|
|
3692
|
+
item.doc.meta?.icon && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { icon: item.doc.meta.icon, size: 16, className: "shrink-0" }),
|
|
3524
3693
|
item.doc.title
|
|
3525
3694
|
]
|
|
3526
3695
|
},
|
|
@@ -3533,81 +3702,130 @@ function Sidebar({ docs, version, onLinkClick, config, activeTabGroup }) {
|
|
|
3533
3702
|
};
|
|
3534
3703
|
const sortedRootGroups = sortSidebarGroups(rootGroups);
|
|
3535
3704
|
const sortedStandalone = sortSidebarItems(standalone);
|
|
3705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("nav", { className: "space-y-1", children: [
|
|
3706
|
+
sortedStandalone.length > 0 && sortedStandalone.map((doc) => {
|
|
3707
|
+
const href = `/docs/${version}/${doc.slug}`;
|
|
3708
|
+
const isActive = pathname === href;
|
|
3709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3710
|
+
import_link7.default,
|
|
3711
|
+
{
|
|
3712
|
+
href,
|
|
3713
|
+
onClick: onLinkClick,
|
|
3714
|
+
className: `flex items-center gap-2 px-3 py-2 text-sm rounded-xl transition-all ${isActive ? "bg-primary/10 text-primary font-medium" : "text-foreground hover:text-foreground hover:bg-accent/50"}`,
|
|
3715
|
+
children: [
|
|
3716
|
+
doc.meta?.icon && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { icon: doc.meta.icon, size: 16, className: "shrink-0" }),
|
|
3717
|
+
doc.title
|
|
3718
|
+
]
|
|
3719
|
+
},
|
|
3720
|
+
`standalone-${doc.slug}`
|
|
3721
|
+
);
|
|
3722
|
+
}),
|
|
3723
|
+
sortedRootGroups.map(([groupKey, group]) => renderGroup(groupKey, group, 0))
|
|
3724
|
+
] });
|
|
3725
|
+
}
|
|
3726
|
+
|
|
3727
|
+
// src/components/docs/sidebar.tsx
|
|
3728
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3729
|
+
function Sidebar({ docs, version, onLinkClick, config, activeTabGroup }) {
|
|
3730
|
+
if (!config.navigation?.showSidebar) {
|
|
3731
|
+
return null;
|
|
3732
|
+
}
|
|
3733
|
+
const hasTabGroups = config.navigation?.tabGroups && config.navigation.tabGroups.length > 0;
|
|
3536
3734
|
const stickyTop = hasTabGroups ? "top-[7.5rem]" : "top-24";
|
|
3537
3735
|
const maxHeight = hasTabGroups ? "max-h-[calc(100vh-10rem)]" : "max-h-[calc(100vh-7rem)]";
|
|
3538
|
-
return /* @__PURE__ */ (0,
|
|
3539
|
-
/* @__PURE__ */ (0,
|
|
3540
|
-
/* @__PURE__ */ (0,
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
children: [
|
|
3551
|
-
doc.meta?.icon && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { icon: doc.meta.icon, size: 16, className: "shrink-0" }),
|
|
3552
|
-
doc.title
|
|
3553
|
-
]
|
|
3554
|
-
},
|
|
3555
|
-
`standalone-${doc.slug}`
|
|
3556
|
-
);
|
|
3557
|
-
}),
|
|
3558
|
-
sortedRootGroups.map(([groupKey, group]) => renderGroup(groupKey, group, 0))
|
|
3559
|
-
] })
|
|
3736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("aside", { className: `w-64 shrink-0 sticky ${stickyTop} self-start`, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: `${maxHeight} overflow-y-auto bg-muted/30 dark:bg-muted/10 rounded-2xl p-4 border border-border/50`, children: [
|
|
3737
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h2", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-4 px-2", children: "Documentation" }),
|
|
3738
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3739
|
+
SidebarMenuItems,
|
|
3740
|
+
{
|
|
3741
|
+
docs,
|
|
3742
|
+
version,
|
|
3743
|
+
onLinkClick,
|
|
3744
|
+
config,
|
|
3745
|
+
activeTabGroup
|
|
3746
|
+
}
|
|
3747
|
+
)
|
|
3560
3748
|
] }) });
|
|
3561
3749
|
}
|
|
3562
3750
|
|
|
3563
3751
|
// src/components/docs/mobile-doc-layout.tsx
|
|
3564
|
-
var
|
|
3752
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3565
3753
|
function MobileDocLayout({ header, docs, version, content, toc, config, activeTabGroup, onTabChange }) {
|
|
3566
|
-
const [sidebarOpen, setSidebarOpen] = (0,
|
|
3754
|
+
const [sidebarOpen, setSidebarOpen] = (0, import_react21.useState)(false);
|
|
3567
3755
|
const handleTabChange = (tabId) => {
|
|
3568
3756
|
onTabChange?.(tabId);
|
|
3569
3757
|
};
|
|
3570
3758
|
const closeSidebar = () => setSidebarOpen(false);
|
|
3571
3759
|
const toggleSidebar = () => setSidebarOpen(!sidebarOpen);
|
|
3572
|
-
const headerWithProps = (0,
|
|
3760
|
+
const headerWithProps = (0, import_react21.isValidElement)(header) ? (0, import_react21.cloneElement)(header, {
|
|
3573
3761
|
onMenuClick: toggleSidebar
|
|
3574
3762
|
}) : header;
|
|
3575
|
-
return /* @__PURE__ */ (0,
|
|
3763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-h-screen bg-background", children: [
|
|
3576
3764
|
headerWithProps,
|
|
3577
|
-
/* @__PURE__ */ (0,
|
|
3578
|
-
config.navigation?.tabGroups && config.navigation.tabGroups.length > 0 && /* @__PURE__ */ (0,
|
|
3765
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SiteBanner, { config }),
|
|
3766
|
+
config.navigation?.tabGroups && config.navigation.tabGroups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3579
3767
|
TabGroups,
|
|
3580
3768
|
{
|
|
3581
3769
|
tabGroups: config.navigation.tabGroups,
|
|
3582
3770
|
activeTabId: activeTabGroup,
|
|
3583
|
-
onTabChange: handleTabChange
|
|
3771
|
+
onTabChange: handleTabChange,
|
|
3772
|
+
docs,
|
|
3773
|
+
version
|
|
3584
3774
|
}
|
|
3585
3775
|
),
|
|
3586
|
-
sidebarOpen && /* @__PURE__ */ (0,
|
|
3776
|
+
sidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3587
3777
|
"div",
|
|
3588
3778
|
{
|
|
3589
3779
|
className: "lg:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-40",
|
|
3590
3780
|
onClick: () => setSidebarOpen(false)
|
|
3591
3781
|
}
|
|
3592
3782
|
),
|
|
3593
|
-
/* @__PURE__ */ (0,
|
|
3783
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3594
3784
|
"div",
|
|
3595
3785
|
{
|
|
3596
|
-
className: `lg:hidden fixed top-0 left-0 h-full w-
|
|
3597
|
-
children: /* @__PURE__ */ (0,
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3786
|
+
className: `lg:hidden fixed top-0 left-0 h-full w-72 bg-background border-r border-border z-50 transform transition-transform duration-300 ease-in-out ${sidebarOpen ? "translate-x-0" : "-translate-x-full"}`,
|
|
3787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col h-full", children: [
|
|
3788
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "shrink-0 px-4 py-4 border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_link8.default, { href: "/", className: "flex items-center gap-2 group justify-center", children: [
|
|
3789
|
+
!config.site?.hideLogo && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3790
|
+
Logo,
|
|
3791
|
+
{
|
|
3792
|
+
logo: config.site?.logo,
|
|
3793
|
+
alt: config.site?.title || "Logo",
|
|
3794
|
+
className: "w-18 object-contain"
|
|
3795
|
+
}
|
|
3796
|
+
),
|
|
3797
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col", children: [
|
|
3798
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "font-semibold text-foreground group-hover:text-primary transition-colors", children: config.site?.title || "Documentation" }),
|
|
3799
|
+
config.site?.description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs text-muted-foreground line-clamp-1", children: config.site.description })
|
|
3800
|
+
] })
|
|
3801
|
+
] }) }),
|
|
3802
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "shrink-0 px-4 pt-4 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h2", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider px-2", children: "Documentation" }) }),
|
|
3803
|
+
config.navigation?.tabGroups && config.navigation.tabGroups.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "shrink-0 px-4 py-3 border-b border-border", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3804
|
+
TabGroups,
|
|
3805
|
+
{
|
|
3806
|
+
tabGroups: config.navigation.tabGroups,
|
|
3807
|
+
activeTabId: activeTabGroup,
|
|
3808
|
+
onTabChange: handleTabChange,
|
|
3809
|
+
mobileOnly: true,
|
|
3810
|
+
docs,
|
|
3811
|
+
version
|
|
3812
|
+
}
|
|
3813
|
+
) }),
|
|
3814
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex-1 overflow-y-auto px-4 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3815
|
+
SidebarMenuItems,
|
|
3816
|
+
{
|
|
3817
|
+
docs,
|
|
3818
|
+
version,
|
|
3819
|
+
config,
|
|
3820
|
+
onLinkClick: closeSidebar,
|
|
3821
|
+
activeTabGroup
|
|
3822
|
+
}
|
|
3823
|
+
) })
|
|
3824
|
+
] })
|
|
3607
3825
|
}
|
|
3608
3826
|
),
|
|
3609
|
-
/* @__PURE__ */ (0,
|
|
3610
|
-
/* @__PURE__ */ (0,
|
|
3827
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("main", { className: "container mx-auto px-6 py-8", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex", children: [
|
|
3828
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3611
3829
|
Sidebar,
|
|
3612
3830
|
{
|
|
3613
3831
|
docs,
|
|
@@ -3616,9 +3834,9 @@ function MobileDocLayout({ header, docs, version, content, toc, config, activeTa
|
|
|
3616
3834
|
activeTabGroup
|
|
3617
3835
|
}
|
|
3618
3836
|
) }),
|
|
3619
|
-
/* @__PURE__ */ (0,
|
|
3837
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-2 px-2 md:px-8", children: [
|
|
3620
3838
|
content,
|
|
3621
|
-
/* @__PURE__ */ (0,
|
|
3839
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Footer, { config })
|
|
3622
3840
|
] }) }),
|
|
3623
3841
|
toc
|
|
3624
3842
|
] }) })
|
|
@@ -3626,11 +3844,11 @@ function MobileDocLayout({ header, docs, version, content, toc, config, activeTa
|
|
|
3626
3844
|
}
|
|
3627
3845
|
|
|
3628
3846
|
// src/components/docs/tab-context.tsx
|
|
3629
|
-
var
|
|
3630
|
-
var
|
|
3631
|
-
var TabContext = (0,
|
|
3847
|
+
var import_react22 = require("react");
|
|
3848
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3849
|
+
var TabContext = (0, import_react22.createContext)(void 0);
|
|
3632
3850
|
function useTabContext() {
|
|
3633
|
-
const context = (0,
|
|
3851
|
+
const context = (0, import_react22.useContext)(TabContext);
|
|
3634
3852
|
if (!context) {
|
|
3635
3853
|
throw new Error("useTabContext must be used within TabProvider");
|
|
3636
3854
|
}
|
|
@@ -3638,24 +3856,33 @@ function useTabContext() {
|
|
|
3638
3856
|
}
|
|
3639
3857
|
|
|
3640
3858
|
// src/components/docs/doc-layout-wrapper.tsx
|
|
3641
|
-
var
|
|
3859
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3642
3860
|
function DocLayoutWrapper({ header, docs, version, content, toc, config, currentPageTabGroup }) {
|
|
3643
3861
|
const { activeTabGroup, setActiveTabGroup } = useTabContext();
|
|
3644
|
-
const lastPageTabGroupRef = (0,
|
|
3645
|
-
const
|
|
3646
|
-
(0,
|
|
3647
|
-
if (
|
|
3648
|
-
setActiveTabGroup(currentPageTabGroup);
|
|
3649
|
-
lastPageTabGroupRef.current = currentPageTabGroup;
|
|
3650
|
-
isInitialMount.current = false;
|
|
3862
|
+
const lastPageTabGroupRef = (0, import_react23.useRef)(void 0);
|
|
3863
|
+
const hasInitialized = (0, import_react23.useRef)(false);
|
|
3864
|
+
(0, import_react23.useEffect)(() => {
|
|
3865
|
+
if (!config.navigation?.tabGroups || config.navigation.tabGroups.length === 0) {
|
|
3651
3866
|
return;
|
|
3652
3867
|
}
|
|
3653
|
-
if (currentPageTabGroup
|
|
3654
|
-
|
|
3655
|
-
|
|
3868
|
+
if (currentPageTabGroup) {
|
|
3869
|
+
if (lastPageTabGroupRef.current !== currentPageTabGroup) {
|
|
3870
|
+
setActiveTabGroup(currentPageTabGroup);
|
|
3871
|
+
lastPageTabGroupRef.current = currentPageTabGroup;
|
|
3872
|
+
hasInitialized.current = true;
|
|
3873
|
+
}
|
|
3874
|
+
return;
|
|
3656
3875
|
}
|
|
3657
|
-
|
|
3658
|
-
|
|
3876
|
+
if (!hasInitialized.current && !activeTabGroup) {
|
|
3877
|
+
const firstTab = config.navigation.tabGroups[0]?.id;
|
|
3878
|
+
if (firstTab) {
|
|
3879
|
+
setActiveTabGroup(firstTab);
|
|
3880
|
+
lastPageTabGroupRef.current = firstTab;
|
|
3881
|
+
hasInitialized.current = true;
|
|
3882
|
+
}
|
|
3883
|
+
}
|
|
3884
|
+
}, [currentPageTabGroup, setActiveTabGroup, activeTabGroup, config.navigation?.tabGroups]);
|
|
3885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3659
3886
|
MobileDocLayout,
|
|
3660
3887
|
{
|
|
3661
3888
|
header,
|
|
@@ -3671,15 +3898,15 @@ function DocLayoutWrapper({ header, docs, version, content, toc, config, current
|
|
|
3671
3898
|
}
|
|
3672
3899
|
|
|
3673
3900
|
// src/components/docs/hot-reload-indicator.tsx
|
|
3674
|
-
var
|
|
3675
|
-
var
|
|
3676
|
-
var
|
|
3677
|
-
var
|
|
3901
|
+
var import_react24 = require("react");
|
|
3902
|
+
var import_navigation6 = require("next/navigation");
|
|
3903
|
+
var import_lucide_react23 = require("lucide-react");
|
|
3904
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3678
3905
|
function HotReloadIndicator() {
|
|
3679
|
-
const [isReloading, setIsReloading] = (0,
|
|
3680
|
-
const [lastReload, setLastReload] = (0,
|
|
3681
|
-
const pathname = (0,
|
|
3682
|
-
(0,
|
|
3906
|
+
const [isReloading, setIsReloading] = (0, import_react24.useState)(false);
|
|
3907
|
+
const [lastReload, setLastReload] = (0, import_react24.useState)(null);
|
|
3908
|
+
const pathname = (0, import_navigation6.usePathname)();
|
|
3909
|
+
(0, import_react24.useEffect)(() => {
|
|
3683
3910
|
if (process.env.NODE_ENV !== "development") return;
|
|
3684
3911
|
setIsReloading(true);
|
|
3685
3912
|
const timer = setTimeout(() => {
|
|
@@ -3691,7 +3918,7 @@ function HotReloadIndicator() {
|
|
|
3691
3918
|
}, 500);
|
|
3692
3919
|
return () => clearTimeout(timer);
|
|
3693
3920
|
}, [pathname]);
|
|
3694
|
-
(0,
|
|
3921
|
+
(0, import_react24.useEffect)(() => {
|
|
3695
3922
|
if (process.env.NODE_ENV !== "development") return;
|
|
3696
3923
|
const handleBeforeRefresh = () => {
|
|
3697
3924
|
setIsReloading(true);
|
|
@@ -3709,14 +3936,14 @@ function HotReloadIndicator() {
|
|
|
3709
3936
|
};
|
|
3710
3937
|
}, []);
|
|
3711
3938
|
if (process.env.NODE_ENV !== "development") return null;
|
|
3712
|
-
return /* @__PURE__ */ (0,
|
|
3713
|
-
isReloading && /* @__PURE__ */ (0,
|
|
3714
|
-
/* @__PURE__ */ (0,
|
|
3715
|
-
/* @__PURE__ */ (0,
|
|
3939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
3940
|
+
isReloading && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "fixed bottom-4 right-4 z-50 flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-xl shadow-lg animate-in slide-in-from-bottom-2", children: [
|
|
3941
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react23.RefreshCw, { className: "h-4 w-4 animate-spin" }),
|
|
3942
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-sm font-medium", children: "Reloading..." })
|
|
3716
3943
|
] }),
|
|
3717
|
-
lastReload && !isReloading && /* @__PURE__ */ (0,
|
|
3718
|
-
/* @__PURE__ */ (0,
|
|
3719
|
-
/* @__PURE__ */ (0,
|
|
3944
|
+
lastReload && !isReloading && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "fixed bottom-4 right-4 z-50 flex items-center gap-2 px-4 py-2 bg-green-500 text-white rounded-xl shadow-lg animate-in slide-in-from-bottom-2", children: [
|
|
3945
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react23.RefreshCw, { className: "h-4 w-4" }),
|
|
3946
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "text-sm font-medium", children: [
|
|
3720
3947
|
"Updated at ",
|
|
3721
3948
|
lastReload.toLocaleTimeString()
|
|
3722
3949
|
] })
|
|
@@ -3725,12 +3952,12 @@ function HotReloadIndicator() {
|
|
|
3725
3952
|
}
|
|
3726
3953
|
|
|
3727
3954
|
// src/components/docs/dev-mode-badge.tsx
|
|
3728
|
-
var
|
|
3729
|
-
var
|
|
3730
|
-
var
|
|
3955
|
+
var import_react25 = require("react");
|
|
3956
|
+
var import_lucide_react24 = require("lucide-react");
|
|
3957
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3731
3958
|
function DevModeBadge() {
|
|
3732
|
-
const [isConnected, setIsConnected] = (0,
|
|
3733
|
-
(0,
|
|
3959
|
+
const [isConnected, setIsConnected] = (0, import_react25.useState)(true);
|
|
3960
|
+
(0, import_react25.useEffect)(() => {
|
|
3734
3961
|
if (process.env.NODE_ENV !== "development") return;
|
|
3735
3962
|
const checkConnection = () => {
|
|
3736
3963
|
setIsConnected(navigator.onLine);
|
|
@@ -3743,19 +3970,19 @@ function DevModeBadge() {
|
|
|
3743
3970
|
};
|
|
3744
3971
|
}, []);
|
|
3745
3972
|
if (process.env.NODE_ENV !== "development") return null;
|
|
3746
|
-
return /* @__PURE__ */ (0,
|
|
3747
|
-
/* @__PURE__ */ (0,
|
|
3748
|
-
/* @__PURE__ */ (0,
|
|
3749
|
-
/* @__PURE__ */ (0,
|
|
3973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "fixed top-20 left-4 z-40 flex items-center gap-2 px-3 py-1.5 bg-orange-500/10 text-orange-600 dark:text-orange-400 border border-orange-500/20 rounded-full text-xs font-medium", children: [
|
|
3974
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react24.Code2, { className: "h-3 w-3" }),
|
|
3975
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: "Dev Mode" }),
|
|
3976
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: `h-2 w-2 rounded-full ${isConnected ? "bg-green-500" : "bg-red-500"} animate-pulse` })
|
|
3750
3977
|
] });
|
|
3751
3978
|
}
|
|
3752
3979
|
|
|
3753
3980
|
// src/components/docs/mdx-hot-reload.tsx
|
|
3754
|
-
var
|
|
3755
|
-
var
|
|
3981
|
+
var import_react26 = require("react");
|
|
3982
|
+
var import_navigation7 = require("next/navigation");
|
|
3756
3983
|
function MdxHotReload() {
|
|
3757
|
-
const router = (0,
|
|
3758
|
-
(0,
|
|
3984
|
+
const router = (0, import_navigation7.useRouter)();
|
|
3985
|
+
(0, import_react26.useEffect)(() => {
|
|
3759
3986
|
if (process.env.NODE_ENV !== "development") return;
|
|
3760
3987
|
const eventSource = new EventSource("/api/mdx-watch");
|
|
3761
3988
|
eventSource.onmessage = (event) => {
|
|
@@ -3779,12 +4006,12 @@ function MdxHotReload() {
|
|
|
3779
4006
|
}
|
|
3780
4007
|
|
|
3781
4008
|
// src/components/docs/category-index.tsx
|
|
3782
|
-
var
|
|
3783
|
-
var
|
|
4009
|
+
var import_link9 = __toESM(require("next/link"));
|
|
4010
|
+
var import_lucide_react25 = require("lucide-react");
|
|
3784
4011
|
var import_rsc2 = require("next-mdx-remote/rsc");
|
|
3785
4012
|
var import_remark_gfm2 = __toESM(require("remark-gfm"));
|
|
3786
4013
|
var import_rehype_slug2 = __toESM(require("rehype-slug"));
|
|
3787
|
-
var
|
|
4014
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3788
4015
|
function CategoryIndex({ categoryPath, version, allDocs, title, description, content, config }) {
|
|
3789
4016
|
const childDocs = allDocs.filter((doc) => {
|
|
3790
4017
|
const parts = doc.slug.split("/");
|
|
@@ -3798,11 +4025,11 @@ function CategoryIndex({ categoryPath, version, allDocs, title, description, con
|
|
|
3798
4025
|
return "";
|
|
3799
4026
|
};
|
|
3800
4027
|
const sortedDocs = sortSidebarItems(childDocs);
|
|
3801
|
-
return /* @__PURE__ */ (0,
|
|
3802
|
-
/* @__PURE__ */ (0,
|
|
3803
|
-
/* @__PURE__ */ (0,
|
|
3804
|
-
description && /* @__PURE__ */ (0,
|
|
3805
|
-
/* @__PURE__ */ (0,
|
|
4028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
4029
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "mb-8", children: [
|
|
4030
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h1", { className: "text-4xl font-bold tracking-tight mb-3 text-foreground", children: title }),
|
|
4031
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-lg text-muted-foreground leading-relaxed", children: description }),
|
|
4032
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "prose prose-slate dark:prose-invert max-w-none prose-headings:scroll-mt-24 prose-headings:font-semibold prose-h1:text-4xl prose-h2:text-3xl prose-h2:mt-12 prose-h2:mb-4 prose-h3:text-2xl prose-h3:mt-8 prose-h3:mb-3 prose-p:text-base prose-p:leading-7 prose-p:text-muted-foreground prose-p:mb-4 prose-a:font-normal prose-a:transition-all prose-code:text-primary prose-code:bg-muted/50 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded-md prose-code:text-[13px] prose-code:font-mono prose-code:border prose-code:border-border/50 prose-code:before:content-none prose-code:after:content-none prose-pre:bg-transparent prose-pre:p-0 prose-ul:list-disc prose-ul:list-inside prose-ul:space-y-2 prose-ul:mb-4 prose-ol:list-decimal prose-ol:list-inside prose-ol:space-y-2 prose-ol:mb-4 prose-li:leading-7 prose-li:text-muted-foreground prose-strong:text-foreground prose-strong:font-semibold", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3806
4033
|
import_rsc2.MDXRemote,
|
|
3807
4034
|
{
|
|
3808
4035
|
source: processedContent(),
|
|
@@ -3818,102 +4045,102 @@ function CategoryIndex({ categoryPath, version, allDocs, title, description, con
|
|
|
3818
4045
|
}
|
|
3819
4046
|
) })
|
|
3820
4047
|
] }),
|
|
3821
|
-
/* @__PURE__ */ (0,
|
|
3822
|
-
|
|
4048
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-3 gap-4", children: sortedDocs.map((doc) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4049
|
+
import_link9.default,
|
|
3823
4050
|
{
|
|
3824
4051
|
href: `/docs/${version}/${doc.slug}`,
|
|
3825
4052
|
className: "group block p-5 rounded-xl border border-border bg-card hover:bg-accent hover:border-primary/50 transition-all duration-200",
|
|
3826
4053
|
style: {
|
|
3827
4054
|
textDecoration: "none !important"
|
|
3828
4055
|
},
|
|
3829
|
-
children: /* @__PURE__ */ (0,
|
|
3830
|
-
/* @__PURE__ */ (0,
|
|
3831
|
-
/* @__PURE__ */ (0,
|
|
3832
|
-
/* @__PURE__ */ (0,
|
|
3833
|
-
/* @__PURE__ */ (0,
|
|
4056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-start justify-between gap-4", children: [
|
|
4057
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
4058
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
4059
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react25.FileText, { className: "h-6 w-6 text-primary shrink-0" }),
|
|
4060
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h3", { className: "text-lg font-semibold text-foreground group-hover:text-primary transition-colors", children: doc.meta.title || doc.title })
|
|
3834
4061
|
] }),
|
|
3835
|
-
doc.meta.description && /* @__PURE__ */ (0,
|
|
3836
|
-
doc.meta.reading_time && /* @__PURE__ */ (0,
|
|
4062
|
+
doc.meta.description && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm text-muted-foreground line-clamp-2", children: doc.meta.description }),
|
|
4063
|
+
doc.meta.reading_time && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "text-xs text-muted-foreground mt-2", children: [
|
|
3837
4064
|
doc.meta.reading_time,
|
|
3838
4065
|
" min read"
|
|
3839
4066
|
] })
|
|
3840
4067
|
] }),
|
|
3841
|
-
/* @__PURE__ */ (0,
|
|
4068
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react25.ChevronRight, { className: "h-5 w-5 text-muted-foreground group-hover:text-primary group-hover:translate-x-1 transition-all flex-shrink-0 mt-1" })
|
|
3842
4069
|
] })
|
|
3843
4070
|
},
|
|
3844
4071
|
doc.slug
|
|
3845
4072
|
)) }),
|
|
3846
|
-
sortedDocs.length === 0 && /* @__PURE__ */ (0,
|
|
3847
|
-
/* @__PURE__ */ (0,
|
|
3848
|
-
/* @__PURE__ */ (0,
|
|
4073
|
+
sortedDocs.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "text-center py-12 text-muted-foreground", children: [
|
|
4074
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react25.FileText, { className: "h-12 w-12 mx-auto mb-3 opacity-50" }),
|
|
4075
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: "No documents found in this category." })
|
|
3849
4076
|
] })
|
|
3850
4077
|
] });
|
|
3851
4078
|
}
|
|
3852
4079
|
|
|
3853
4080
|
// src/components/docs/not-found-content.tsx
|
|
3854
|
-
var
|
|
3855
|
-
var
|
|
3856
|
-
var
|
|
4081
|
+
var import_link10 = __toESM(require("next/link"));
|
|
4082
|
+
var import_lucide_react26 = require("lucide-react");
|
|
4083
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3857
4084
|
function NotFoundContent({ version }) {
|
|
3858
|
-
return /* @__PURE__ */ (0,
|
|
3859
|
-
/* @__PURE__ */ (0,
|
|
3860
|
-
/* @__PURE__ */ (0,
|
|
3861
|
-
/* @__PURE__ */ (0,
|
|
3862
|
-
/* @__PURE__ */ (0,
|
|
4085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex min-h-[calc(100vh-12rem)] items-center justify-center px-4 py-12", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "w-full max-w-2xl text-center", children: [
|
|
4086
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mb-6 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "rounded-full bg-yellow-500/10 p-4", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react26.AlertTriangle, { className: "h-16 w-16 text-yellow-500" }) }) }),
|
|
4087
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h1", { className: "mb-3 text-5xl font-bold tracking-tight", children: "404" }),
|
|
4088
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "mb-4 text-2xl font-semibold", children: "Page Not Found" }),
|
|
4089
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "mb-8 text-base text-muted-foreground", children: [
|
|
3863
4090
|
"The documentation page you're looking for doesn't exist or may have been moved.",
|
|
3864
|
-
/* @__PURE__ */ (0,
|
|
4091
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("br", {}),
|
|
3865
4092
|
"Try using the sidebar to find what you're looking for, or return to the documentation home."
|
|
3866
4093
|
] }),
|
|
3867
|
-
/* @__PURE__ */ (0,
|
|
3868
|
-
/* @__PURE__ */ (0,
|
|
3869
|
-
|
|
4094
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col items-center justify-center gap-3 sm:flex-row", children: [
|
|
4095
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4096
|
+
import_link10.default,
|
|
3870
4097
|
{
|
|
3871
4098
|
href: `/docs/${version}`,
|
|
3872
4099
|
className: "inline-flex items-center gap-2 rounded-lg bg-primary px-6 py-3 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
3873
4100
|
children: [
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
4101
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react26.ArrowLeft, { className: "h-4 w-4" }),
|
|
3875
4102
|
"Back to Documentation"
|
|
3876
4103
|
]
|
|
3877
4104
|
}
|
|
3878
4105
|
),
|
|
3879
|
-
/* @__PURE__ */ (0,
|
|
3880
|
-
|
|
4106
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4107
|
+
import_link10.default,
|
|
3881
4108
|
{
|
|
3882
4109
|
href: "/",
|
|
3883
4110
|
className: "inline-flex items-center gap-2 rounded-lg border border-border bg-background px-6 py-3 text-sm font-medium hover:bg-muted transition-colors",
|
|
3884
4111
|
children: [
|
|
3885
|
-
/* @__PURE__ */ (0,
|
|
4112
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react26.Home, { className: "h-4 w-4" }),
|
|
3886
4113
|
"Go to Homepage"
|
|
3887
4114
|
]
|
|
3888
4115
|
}
|
|
3889
4116
|
)
|
|
3890
4117
|
] }),
|
|
3891
|
-
/* @__PURE__ */ (0,
|
|
3892
|
-
/* @__PURE__ */ (0,
|
|
4118
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mt-12 rounded-lg border border-border bg-muted/30 p-6", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
4119
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("strong", { className: "font-medium text-foreground", children: "Tip:" }),
|
|
3893
4120
|
" Use the sidebar navigation on the left to browse all available documentation pages."
|
|
3894
4121
|
] }) })
|
|
3895
4122
|
] }) });
|
|
3896
4123
|
}
|
|
3897
4124
|
|
|
3898
4125
|
// src/app/docs-page.tsx
|
|
3899
|
-
var
|
|
4126
|
+
var import_react27 = require("react");
|
|
3900
4127
|
|
|
3901
4128
|
// src/components/docs/doc-loading.tsx
|
|
3902
|
-
var
|
|
4129
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3903
4130
|
function DocLoading() {
|
|
3904
|
-
return /* @__PURE__ */ (0,
|
|
3905
|
-
/* @__PURE__ */ (0,
|
|
3906
|
-
/* @__PURE__ */ (0,
|
|
3907
|
-
/* @__PURE__ */ (0,
|
|
3908
|
-
/* @__PURE__ */ (0,
|
|
3909
|
-
/* @__PURE__ */ (0,
|
|
3910
|
-
/* @__PURE__ */ (0,
|
|
4131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "max-w-4xl mx-auto px-6 py-8", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "animate-pulse space-y-4", children: [
|
|
4132
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "h-8 bg-gray-200 rounded w-3/4" }),
|
|
4133
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "h-4 bg-gray-200 rounded w-1/2" }),
|
|
4134
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "space-y-3 mt-8", children: [
|
|
4135
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "h-4 bg-gray-200 rounded" }),
|
|
4136
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "h-4 bg-gray-200 rounded w-5/6" }),
|
|
4137
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "h-4 bg-gray-200 rounded w-4/6" })
|
|
3911
4138
|
] })
|
|
3912
4139
|
] }) });
|
|
3913
4140
|
}
|
|
3914
4141
|
|
|
3915
4142
|
// src/app/docs-page.tsx
|
|
3916
|
-
var
|
|
4143
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3917
4144
|
async function generateMetadata({ params }) {
|
|
3918
4145
|
const { version, slug: slugArray } = await params;
|
|
3919
4146
|
const slug = slugArray.join("/");
|
|
@@ -3973,14 +4200,14 @@ async function DocPage({ params }) {
|
|
|
3973
4200
|
if (!doc && isCategory) {
|
|
3974
4201
|
const categoryDoc = allDocs.find((d) => d.slug.startsWith(slug + "/"));
|
|
3975
4202
|
const categoryTabGroup = categoryDoc?.meta?.tab_group || categoryDoc?.categoryTabGroup;
|
|
3976
|
-
return /* @__PURE__ */ (0,
|
|
3977
|
-
/* @__PURE__ */ (0,
|
|
4203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
4204
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3978
4205
|
DocLayoutWrapper,
|
|
3979
4206
|
{
|
|
3980
|
-
header: /* @__PURE__ */ (0,
|
|
4207
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Header, { currentVersion: version, versions, config }),
|
|
3981
4208
|
docs: allDocs,
|
|
3982
4209
|
version,
|
|
3983
|
-
content: /* @__PURE__ */ (0,
|
|
4210
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3984
4211
|
CategoryIndex,
|
|
3985
4212
|
{
|
|
3986
4213
|
categoryPath: slug,
|
|
@@ -3991,47 +4218,47 @@ async function DocPage({ params }) {
|
|
|
3991
4218
|
config
|
|
3992
4219
|
}
|
|
3993
4220
|
),
|
|
3994
|
-
toc: /* @__PURE__ */ (0,
|
|
4221
|
+
toc: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", {}),
|
|
3995
4222
|
config,
|
|
3996
4223
|
currentPageTabGroup: categoryTabGroup
|
|
3997
4224
|
}
|
|
3998
4225
|
),
|
|
3999
|
-
/* @__PURE__ */ (0,
|
|
4000
|
-
/* @__PURE__ */ (0,
|
|
4001
|
-
/* @__PURE__ */ (0,
|
|
4226
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(MdxHotReload, {}),
|
|
4227
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(HotReloadIndicator, {}),
|
|
4228
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DevModeBadge, {})
|
|
4002
4229
|
] });
|
|
4003
4230
|
}
|
|
4004
4231
|
if (!doc) {
|
|
4005
|
-
return /* @__PURE__ */ (0,
|
|
4006
|
-
/* @__PURE__ */ (0,
|
|
4232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react27.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DocLoading, {}), children: [
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4007
4234
|
DocLayoutWrapper,
|
|
4008
4235
|
{
|
|
4009
|
-
header: /* @__PURE__ */ (0,
|
|
4236
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Header, { currentVersion: version, versions, config }),
|
|
4010
4237
|
docs: allDocs,
|
|
4011
4238
|
version,
|
|
4012
|
-
content: /* @__PURE__ */ (0,
|
|
4013
|
-
toc: /* @__PURE__ */ (0,
|
|
4239
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(NotFoundContent, { version }),
|
|
4240
|
+
toc: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", {}),
|
|
4014
4241
|
config,
|
|
4015
4242
|
currentPageTabGroup: void 0
|
|
4016
4243
|
}
|
|
4017
4244
|
),
|
|
4018
|
-
/* @__PURE__ */ (0,
|
|
4019
|
-
/* @__PURE__ */ (0,
|
|
4020
|
-
/* @__PURE__ */ (0,
|
|
4245
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(MdxHotReload, {}),
|
|
4246
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(HotReloadIndicator, {}),
|
|
4247
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DevModeBadge, {})
|
|
4021
4248
|
] }) });
|
|
4022
4249
|
}
|
|
4023
4250
|
const toc = extractTableOfContents(doc.content);
|
|
4024
4251
|
const { previous, next } = getAdjacentDocs(slug, allDocs);
|
|
4025
4252
|
const showCategoryIndex = isCategory && doc;
|
|
4026
4253
|
const currentPageTabGroup = doc.meta?.tab_group || doc.categoryTabGroup;
|
|
4027
|
-
return /* @__PURE__ */ (0,
|
|
4028
|
-
/* @__PURE__ */ (0,
|
|
4254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react27.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DocLoading, {}), children: [
|
|
4255
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4029
4256
|
DocLayoutWrapper,
|
|
4030
4257
|
{
|
|
4031
|
-
header: /* @__PURE__ */ (0,
|
|
4258
|
+
header: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Header, { currentVersion: version, versions, config }),
|
|
4032
4259
|
docs: allDocs,
|
|
4033
4260
|
version,
|
|
4034
|
-
content: showCategoryIndex ? /* @__PURE__ */ (0,
|
|
4261
|
+
content: showCategoryIndex ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4035
4262
|
CategoryIndex,
|
|
4036
4263
|
{
|
|
4037
4264
|
categoryPath: slug,
|
|
@@ -4042,7 +4269,7 @@ async function DocPage({ params }) {
|
|
|
4042
4269
|
content: doc.content,
|
|
4043
4270
|
config
|
|
4044
4271
|
}
|
|
4045
|
-
) : /* @__PURE__ */ (0,
|
|
4272
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4046
4273
|
DocLayout,
|
|
4047
4274
|
{
|
|
4048
4275
|
meta: doc.meta,
|
|
@@ -4054,14 +4281,14 @@ async function DocPage({ params }) {
|
|
|
4054
4281
|
config
|
|
4055
4282
|
}
|
|
4056
4283
|
),
|
|
4057
|
-
toc: showCategoryIndex ? /* @__PURE__ */ (0,
|
|
4284
|
+
toc: showCategoryIndex ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", {}) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TableOfContents, { items: toc, config }),
|
|
4058
4285
|
config,
|
|
4059
4286
|
currentPageTabGroup
|
|
4060
4287
|
}
|
|
4061
4288
|
),
|
|
4062
|
-
/* @__PURE__ */ (0,
|
|
4063
|
-
/* @__PURE__ */ (0,
|
|
4064
|
-
/* @__PURE__ */ (0,
|
|
4289
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(MdxHotReload, {}),
|
|
4290
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(HotReloadIndicator, {}),
|
|
4291
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DevModeBadge, {})
|
|
4065
4292
|
] }) });
|
|
4066
4293
|
}
|
|
4067
4294
|
// Annotate the CommonJS export names for ESM import in node:
|