specra 0.1.10 → 0.1.12
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/{chunk-WSQZILUA.mjs → chunk-WMCO2UX5.mjs} +15 -9
- package/dist/chunk-WMCO2UX5.mjs.map +1 -0
- package/dist/components/index.d.mts +3 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +462 -386
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +428 -353
- package/dist/components/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +477 -394
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +239 -162
- package/dist/index.mjs.map +1 -1
- package/dist/layouts/index.d.mts +1 -1
- package/dist/layouts/index.d.ts +1 -1
- package/dist/lib/index.d.mts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +15 -8
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +3 -1
- package/dist/{config.types-Ccp3jN5U.d.mts → mdx-ColN3Cyg.d.mts} +58 -57
- package/dist/{config.types-Ccp3jN5U.d.ts → mdx-ColN3Cyg.d.ts} +58 -57
- package/package.json +2 -2
- package/dist/chunk-WSQZILUA.mjs.map +0 -1
|
@@ -223,7 +223,7 @@ async function getAllDocs(version = "v1.0.0", locale) {
|
|
|
223
223
|
originalFilePath = parts.slice(0, -1).join(".");
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
const doc = await getDocBySlug(
|
|
226
|
+
const doc = await getDocBySlug(originalFilePath, version, isLocalized ? fileLocale : void 0);
|
|
227
227
|
if (!doc) return null;
|
|
228
228
|
doc.filePath = originalFilePath;
|
|
229
229
|
const folderPath = path2.dirname(originalFilePath).replace(/\\/g, "/");
|
|
@@ -245,6 +245,10 @@ async function getAllDocs(version = "v1.0.0", locale) {
|
|
|
245
245
|
const uniqueDocs = /* @__PURE__ */ new Map();
|
|
246
246
|
const validDocs = docs.filter((doc) => doc !== null && (isDevelopment3 || !doc.meta.draft));
|
|
247
247
|
validDocs.forEach((doc) => {
|
|
248
|
+
if (locale === "all") {
|
|
249
|
+
uniqueDocs.set(doc.slug, doc);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
248
252
|
let logicalSlug = doc.slug;
|
|
249
253
|
if (i18nConfig) {
|
|
250
254
|
const parts = logicalSlug.split("/");
|
|
@@ -457,18 +461,19 @@ function getCachedVersions() {
|
|
|
457
461
|
versionsCache.timestamp = Date.now();
|
|
458
462
|
return versions;
|
|
459
463
|
}
|
|
460
|
-
async function getCachedAllDocs(version = "v1.0.0") {
|
|
464
|
+
async function getCachedAllDocs(version = "v1.0.0", locale) {
|
|
461
465
|
initializeWatchers();
|
|
462
|
-
const
|
|
466
|
+
const cacheKey = locale ? `${version}:${locale}` : version;
|
|
467
|
+
const cached = allDocsCache.get(cacheKey);
|
|
463
468
|
if (cached && isCacheValid(cached.timestamp)) {
|
|
464
|
-
logCacheOperation("hit", `getAllDocs:${
|
|
469
|
+
logCacheOperation("hit", `getAllDocs:${cacheKey}`);
|
|
465
470
|
return cached.data;
|
|
466
471
|
}
|
|
467
|
-
logCacheOperation("miss", `getAllDocs:${
|
|
468
|
-
const timer = new PerfTimer(`getAllDocs(${
|
|
469
|
-
const docs = await getAllDocs(version);
|
|
472
|
+
logCacheOperation("miss", `getAllDocs:${cacheKey}`);
|
|
473
|
+
const timer = new PerfTimer(`getAllDocs(${cacheKey})`);
|
|
474
|
+
const docs = await getAllDocs(version, locale);
|
|
470
475
|
timer.end();
|
|
471
|
-
allDocsCache.set(
|
|
476
|
+
allDocsCache.set(cacheKey, {
|
|
472
477
|
data: docs,
|
|
473
478
|
timestamp: Date.now()
|
|
474
479
|
});
|
|
@@ -557,6 +562,7 @@ export {
|
|
|
557
562
|
getCategoryConfig,
|
|
558
563
|
getAllCategoryConfigs,
|
|
559
564
|
getVersions,
|
|
565
|
+
getI18nConfig,
|
|
560
566
|
getDocBySlug,
|
|
561
567
|
getAllDocs,
|
|
562
568
|
getAdjacentDocs,
|
|
@@ -576,4 +582,4 @@ export {
|
|
|
576
582
|
buildRedirectMappings,
|
|
577
583
|
findRedirect
|
|
578
584
|
};
|
|
579
|
-
//# sourceMappingURL=chunk-
|
|
585
|
+
//# sourceMappingURL=chunk-WMCO2UX5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/mdx.ts","../src/lib/category.ts","../src/lib/mdx-cache.ts","../src/lib/dev-utils.ts","../src/lib/toc.ts","../src/lib/redirects.ts"],"sourcesContent":["import fs from \"fs\"\nimport path from \"path\"\nimport matter from \"gray-matter\"\nimport { getAllCategoryConfigs } from \"./category\"\nimport { sortSidebarItems, sortSidebarGroups, buildSidebarStructure, type SidebarGroup } from \"./sidebar-utils\"\nimport { sanitizePath, validatePathWithinDirectory, validateMDXSecurity } from \"./mdx-security\"\nimport { getConfig } from \"./config\"\nimport { I18nConfig } from \"./config.types\"\n\nconst DOCS_DIR = path.join(process.cwd(), \"docs\")\n\n/**\n * Calculate reading time based on word count\n * Average reading speed: 200 words per minute\n */\nfunction calculateReadingTime(content: string): { minutes: number; words: number } {\n const words = content.trim().split(/\\s+/).length\n const minutes = Math.ceil(words / 200)\n return { minutes, words }\n}\n\nexport interface DocMeta {\n title: string\n description?: string\n slug?: string\n section?: string\n group?: string\n sidebar?: string\n order?: number\n sidebar_position?: number\n content?: string\n last_updated?: string\n draft?: boolean\n authors?: Array<{ id: string; name?: string }>\n tags?: string[]\n redirect_from?: string[]\n reading_time?: number\n word_count?: number\n icon?: string // Icon name for sidebar display (Lucide icon name)\n tab_group?: string // Tab group ID for organizing docs into tabs\n locale?: string // Locale of the document\n}\n\nexport interface Doc {\n slug: string\n filePath: string // Original file path for sidebar grouping\n title: string\n meta: DocMeta\n content: string\n categoryLabel?: string // Label from _category_.json\n categoryPosition?: number // Position from _category_.json\n categoryCollapsible?: boolean // Collapsible from _category_.json\n categoryCollapsed?: boolean // Default collapsed state from _category_.json\n categoryIcon?: string // Icon from _category_.json\n categoryTabGroup?: string // Tab group from _category_.json\n locale?: string // Locale of the document\n}\n\nexport interface TocItem {\n id: string\n title: string\n level: number\n}\n\nexport function getVersions(): string[] {\n try {\n const versions = fs.readdirSync(DOCS_DIR)\n return versions.filter((v) => fs.statSync(path.join(DOCS_DIR, v)).isDirectory())\n } catch (error) {\n return [\"v1.0.0\"]\n }\n}\n\n/**\n * Recursively find all MDX files in a directory\n */\nfunction findMdxFiles(dir: string, baseDir: string = dir): string[] {\n const files: string[] = []\n\n try {\n const entries = fs.readdirSync(dir, { withFileTypes: true })\n\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name)\n\n if (entry.isDirectory()) {\n files.push(...findMdxFiles(fullPath, baseDir))\n } else if (entry.isFile() && entry.name.endsWith(\".mdx\")) {\n // Get relative path from base directory and normalize to forward slashes\n const relativePath = path.relative(baseDir, fullPath).replace(/\\\\/g, '/')\n files.push(relativePath)\n }\n }\n } catch (error) {\n console.error(`Error reading directory ${dir}:`, error)\n }\n\n return files\n}\n\n/**\n * Internal function to read a doc from file path\n */\nfunction readDocFromFile(filePath: string, originalSlug: string): Doc | null {\n try {\n if (!fs.existsSync(filePath)) {\n return null\n }\n\n // Validate path is within allowed directory\n if (!validatePathWithinDirectory(filePath, DOCS_DIR)) {\n console.error(`[Security] Path traversal attempt blocked: ${filePath}`)\n return null\n }\n\n const fileContents = fs.readFileSync(filePath, \"utf8\")\n const { data, content } = matter(fileContents)\n\n // Security: Validate MDX content for dangerous patterns\n const securityCheck = validateMDXSecurity(content, {\n strictMode: process.env.NODE_ENV === 'production',\n blockDangerousPatterns: true,\n })\n\n if (!securityCheck.valid) {\n console.error(`[Security] MDX validation failed for ${filePath}:`, securityCheck.issues)\n if (process.env.NODE_ENV === 'production') {\n return null\n }\n // In development, log warnings but continue\n console.warn('[Security] Continuing in development mode with sanitized content')\n }\n\n // Use sanitized content if available\n const safeContent = securityCheck.sanitized || content\n\n // Calculate reading time\n const { minutes, words } = calculateReadingTime(safeContent)\n\n // If custom slug provided, replace only the filename part, keep the folder structure\n let finalSlug = originalSlug\n if (data.slug) {\n const customSlug = data.slug.replace(/^\\//, '')\n const parts = originalSlug.split(\"/\")\n\n if (parts.length > 1) {\n // Keep folder structure, replace only filename\n parts[parts.length - 1] = customSlug\n finalSlug = parts.join(\"/\")\n } else {\n // Root level file, use custom slug as-is\n finalSlug = customSlug\n }\n }\n\n return {\n slug: finalSlug,\n filePath: originalSlug, // Keep original file path for sidebar\n title: data.title || originalSlug,\n meta: {\n ...data,\n content: safeContent,\n reading_time: minutes,\n word_count: words,\n } as DocMeta,\n content: safeContent,\n }\n } catch (error) {\n console.error(`Error reading file ${filePath}:`, error)\n return null\n }\n}\n\nexport function getI18nConfig(): I18nConfig | null {\n const config = getConfig()\n const i18n = config.features?.i18n\n\n if (!i18n) return null\n\n if (typeof i18n === 'boolean') {\n return i18n ? {\n defaultLocale: 'en',\n locales: ['en'],\n localeNames: { en: 'English' }\n } : null\n }\n\n return i18n\n}\n\nexport async function getDocBySlug(slug: string, version = \"v1.0.0\", locale?: string): Promise<Doc | null> {\n try {\n // Security: Sanitize and validate slug\n const sanitizedVersion = sanitizePath(version)\n let sanitizedSlug = sanitizePath(slug)\n\n // Get i18n config\n const i18nConfig = getI18nConfig()\n\n // Determine locale from slug if not provided\n let detectedLocale = locale || i18nConfig?.defaultLocale\n\n if (i18nConfig) {\n const parts = sanitizedSlug.split('/')\n if (parts.length > 0 && i18nConfig.locales.includes(parts[0])) {\n detectedLocale = parts[0]\n sanitizedSlug = parts.slice(1).join('/')\n if (sanitizedSlug === \"\") sanitizedSlug = \"index\"\n }\n }\n\n const targetLocale = detectedLocale\n const isDefaultLocale = targetLocale === i18nConfig?.defaultLocale\n\n // Try finding the file in this order:\n // 1. Localized extension: slug.locale.mdx (e.g. guide.fr.mdx)\n // 2. Default file: slug.mdx (only if using default locale and configured to fallback or strictly default)\n\n // Construct potential paths\n const basePath = path.join(DOCS_DIR, sanitizedVersion)\n\n // 1. Try localized file extension\n if (targetLocale) {\n const localizedPath = path.join(basePath, `${sanitizedSlug}.${targetLocale}.mdx`)\n const doc = readDocFromFile(localizedPath, sanitizedSlug) // Keep parsed slug\n if (doc) {\n doc.slug = i18nConfig ? `${targetLocale}/${sanitizedSlug}` : sanitizedSlug\n doc.meta.locale = targetLocale\n return doc\n }\n }\n\n // 2. Try default file\n const defaultPath = path.join(basePath, `${sanitizedSlug}.mdx`)\n const doc = readDocFromFile(defaultPath, sanitizedSlug)\n\n if (doc) {\n // If we found a default file but requested a specific locale using prefix, \n // we might want to return it but with the prefix in slug if we are doing fallback.\n // For now, strict mode: if I request /fr/guide and guide.fr.mdx is missing, \n // should I return guide.mdx? \n // Let's assume explicitly: Yes, but keep the URL /fr/guide ?? \n // No, typically you want 404 if translation missing, OR fallback.\n // Let's stick to: if explicit locale requested and file not found, we fall through to null eventually.\n // BUT if it matches default locale, we return it.\n\n if (isDefaultLocale || !i18nConfig) {\n // For default locale, we might want to prefix if prompt said \"add language to url\"\n // If i18n enabled and prefixDefault is true, ensure slug has prefix.\n // But existing behavior for default locale usually omits prefix.\n // If plan said: /en/docs/... then we probably want prefix even for default?\n // The config I added has `prefixDefault`. Checks that.\n\n const usePrefix = i18nConfig && (i18nConfig.prefixDefault || targetLocale !== i18nConfig.defaultLocale)\n\n if (usePrefix && targetLocale) {\n doc.slug = `${targetLocale}/${doc.slug}`\n }\n doc.meta.locale = targetLocale || 'en'\n return doc\n }\n }\n\n // If still not found, search all docs for a matching custom slug\n // This part is expensive and might need update for i18n, disabling for now or leaving as is for default locale\n // Ideally custom slugs should also be localized? \n // Let's rely on standard file resolution for now for i18n to ensure stability.\n\n return null\n } catch (error) {\n console.error(`Error reading doc ${slug}:`, error)\n return null\n }\n}\n\nexport async function getAllDocs(version = \"v1.0.0\", locale?: string): Promise<Doc[]> {\n try {\n const versionDir = path.join(DOCS_DIR, version)\n\n if (!fs.existsSync(versionDir)) {\n return []\n }\n\n // Get i18n config\n const i18nConfig = getI18nConfig()\n const targetLocale = locale || i18nConfig?.defaultLocale || 'en'\n\n const mdxFiles = findMdxFiles(versionDir)\n const categoryConfigs = getAllCategoryConfigs(version)\n\n const docs = await Promise.all(\n mdxFiles.map(async (file) => {\n // file contains path relative to version dir, e.g. \"getting-started/intro.mdx\" or \"intro.fr.mdx\"\n\n let originalFilePath = file.replace(/\\.mdx$/, \"\")\n\n // Handle localized files\n let isLocalized = false\n let fileLocale = i18nConfig?.defaultLocale || 'en'\n\n if (i18nConfig) {\n // Check for .<locale> suffix\n const parts = originalFilePath.split('.')\n const lastPart = parts[parts.length - 1]\n if (i18nConfig.locales.includes(lastPart)) {\n fileLocale = lastPart\n isLocalized = true\n originalFilePath = parts.slice(0, -1).join('.')\n }\n }\n\n // If we requested a specific locale, filter out others\n // If target is 'fr', we want intro.fr.mdx (if exists) OR intro.mdx (fallback? no, getAllDocs is usually for list)\n // Actually, for sidebar we want the \"best\" version of each doc for the current locale.\n\n // Strategy: Map all files to their logical slug, then group by slug and pick best locale.\n // But getAllDocs is async and parallel.\n\n // Simplified: Just process all files, returning the doc with its true locale.\n // Then filter/merge later? \n // No, current logic returns flat array.\n\n // Let's try to load the doc.\n const doc = await getDocBySlug(originalFilePath, version, isLocalized ? fileLocale : undefined)\n\n if (!doc) return null\n\n // Override filePath properties for sidebar grouping \n // (we want grouped by logical path, not physically localized path if possible)\n doc.filePath = originalFilePath // Use logical path (without .fr) for grouping\n\n const folderPath = path.dirname(originalFilePath).replace(/\\\\/g, '/')\n if (folderPath !== \".\") {\n const categoryConfig = categoryConfigs.get(folderPath)\n if (categoryConfig) {\n doc.categoryLabel = categoryConfig.label\n doc.categoryPosition = categoryConfig.position ?? categoryConfig.sidebar_position\n doc.categoryCollapsible = categoryConfig.collapsible\n doc.categoryCollapsed = categoryConfig.collapsed\n doc.categoryIcon = categoryConfig.icon\n doc.categoryTabGroup = categoryConfig.tab_group\n }\n }\n\n return doc\n }),\n )\n\n const isDevelopment = process.env.NODE_ENV === \"development\"\n\n // Create a map to track unique slugs and avoid duplicates, prioritizing target locale\n const uniqueDocs = new Map<string, Doc>()\n\n // Sort docs such that target locale comes first? No, we need to filter/merge.\n const validDocs = docs.filter((doc): doc is Doc => doc !== null && (isDevelopment || !doc.meta.draft))\n\n // Group by logical slug (we stored logical path in filePath, maybe use that?)\n // Actually doc.slug might differ if custom slug used.\n\n // If we have intro.mdx (en) and intro.fr.mdx (fr)\n // And targetLocale is 'fr'\n // We want the 'fr' one.\n\n validDocs.forEach(doc => {\n // If we want all docs (e.g. for static params generation), return everything unique by slug\n if (locale === 'all') {\n uniqueDocs.set(doc.slug, doc)\n return\n }\n\n // Identify logical slug. \n // If doc.slug already has prefix (e.g. fr/intro), stripped slug is 'intro'.\n let logicalSlug = doc.slug\n if (i18nConfig) {\n const parts = logicalSlug.split('/')\n if (i18nConfig.locales.includes(parts[0])) {\n logicalSlug = parts.slice(1).join('/')\n }\n }\n\n const existing = uniqueDocs.get(logicalSlug)\n\n if (!existing) {\n // If doc matches target locale or is default (and we allow default fallback), take it.\n // For now, take everything, filter later?\n // Better: Only add if it matches target locale OR is default and we don't have target yet.\n if (doc.meta.locale === targetLocale) {\n uniqueDocs.set(logicalSlug, doc)\n } else if (doc.meta.locale === i18nConfig?.defaultLocale) {\n uniqueDocs.set(logicalSlug, doc)\n }\n } else {\n // We have an existing entry. prefer targetLocale\n if (doc.meta.locale === targetLocale && existing.meta.locale !== targetLocale) {\n uniqueDocs.set(logicalSlug, doc)\n }\n }\n })\n\n return Array.from(uniqueDocs.values()).sort((a, b) => {\n const orderA = a.meta.sidebar_position ?? a.meta.order ?? 999\n const orderB = b.meta.sidebar_position ?? b.meta.order ?? 999\n return orderA - orderB\n })\n } catch (error) {\n console.error(`Error getting all docs for version ${version}:`, error)\n return []\n }\n}\n\n// export function getAdjacentDocs(currentSlug: string, allDocs: Doc[]): { previous?: Doc; next?: Doc } {\n// const currentIndex = allDocs.findIndex((doc) => doc.slug === currentSlug)\n\n// if (currentIndex === -1) {\n// return {}\n// }\n\n// return {\n// previous: currentIndex > 0 ? allDocs[currentIndex - 1] : undefined,\n// next: currentIndex < allDocs.length - 1 ? allDocs[currentIndex + 1] : undefined,\n// }\n// }\n\n// Flatten the sidebar structure into a linear order\nfunction flattenSidebarOrder(\n rootGroups: Record<string, SidebarGroup>,\n standalone: Doc[]\n): Doc[] {\n const flatDocs: Doc[] = []\n\n // Recursively flatten groups - intermix folders and files by position\n const flattenGroup = (group: SidebarGroup) => {\n const sortedChildren = sortSidebarGroups(group.children)\n const sortedItems = sortSidebarItems(group.items)\n\n // Merge child groups and items, then sort by position\n const merged: Array<{ type: 'group', group: SidebarGroup, position: number } | { type: 'item', doc: Doc, position: number }> = [\n ...sortedChildren.map(([, childGroup]) => ({\n type: 'group' as const,\n group: childGroup,\n position: childGroup.position\n })),\n ...sortedItems.map((doc) => ({\n type: 'item' as const,\n doc,\n position: doc.meta.sidebar_position ?? doc.meta.order ?? 999\n }))\n ]\n\n // Sort by position\n merged.sort((a, b) => a.position - b.position)\n\n // Process in sorted order\n merged.forEach((item) => {\n if (item.type === 'group') {\n flattenGroup(item.group)\n } else {\n flatDocs.push(item.doc)\n }\n })\n }\n\n // Add standalone items first\n sortSidebarItems(standalone).forEach((doc) => {\n flatDocs.push(doc)\n })\n\n // Then add all grouped items\n const sortedRootGroups = sortSidebarGroups(rootGroups)\n sortedRootGroups.forEach(([, group]) => {\n flattenGroup(group)\n })\n\n return flatDocs\n}\n\nexport function getAdjacentDocs(currentSlug: string, allDocs: Doc[]): { previous?: Doc; next?: Doc } {\n // Build the same sidebar structure\n const { rootGroups, standalone } = buildSidebarStructure(allDocs)\n\n // Flatten into the same order as shown in the sidebar\n const orderedDocs = flattenSidebarOrder(rootGroups, standalone)\n\n // Find current doc in the ordered list\n const currentIndex = orderedDocs.findIndex((doc) => doc.slug === currentSlug)\n\n if (currentIndex === -1) {\n return {}\n }\n\n const currentDoc = orderedDocs[currentIndex]\n\n // Get current doc's tab group (from meta or category)\n const currentTabGroup = currentDoc.meta?.tab_group || currentDoc.categoryTabGroup\n\n // Filter docs to match the current doc's tab group status\n // If current has a tab group, only show docs in the same tab group\n // If current has NO tab group, only show docs with NO tab group\n const filteredDocs = orderedDocs.filter((doc) => {\n const docTabGroup = doc.meta?.tab_group || doc.categoryTabGroup\n\n // If current doc has a tab group, only include docs with the same tab group\n if (currentTabGroup) {\n return docTabGroup === currentTabGroup\n }\n\n // If current doc has no tab group, only include docs with no tab group\n return !docTabGroup\n })\n\n // Find current doc's index within the filtered list\n const filteredIndex = filteredDocs.findIndex((doc) => doc.slug === currentSlug)\n\n if (filteredIndex === -1) {\n return {}\n }\n\n return {\n previous: filteredIndex > 0 ? filteredDocs[filteredIndex - 1] : undefined,\n next: filteredIndex < filteredDocs.length - 1 ? filteredDocs[filteredIndex + 1] : undefined,\n }\n}\n\nexport function extractTableOfContents(content: string): TocItem[] {\n const headingRegex = /^(#{2,3})\\s+(.+)$/gm\n const toc: TocItem[] = []\n let match\n\n while ((match = headingRegex.exec(content)) !== null) {\n const level = match[1].length\n const text = match[2]\n // Generate ID the same way rehype-slug does\n const id = text\n .toLowerCase()\n .replace(/\\s+/g, \"-\") // Replace spaces with hyphens first\n .replace(/[^a-z0-9-]/g, \"\") // Remove special chars (dots, slashes, etc)\n .replace(/^-|-$/g, \"\") // Remove leading/trailing hyphens\n\n toc.push({ id, title: text, level })\n }\n\n return toc\n}\n\n/**\n * Check if a slug represents a category (has child documents)\n */\nexport function isCategoryPage(slug: string, allDocs: Doc[]): boolean {\n return allDocs.some((doc) => {\n const parts = doc.slug.split(\"/\")\n const docParent = parts.slice(0, -1).join(\"/\")\n return docParent === slug && doc.slug !== slug\n })\n}\n\n\n","// Note: This file uses server-only APIs (fs, path) and should only be imported in Server Components\nimport fs from \"fs\"\nimport path from \"path\"\n\nexport interface CategoryConfig {\n label?: string\n position?: number\n sidebar_position?: number // Alternative naming for position\n link?: {\n type: \"generated-index\" | \"doc\"\n slug?: string\n }\n collapsed?: boolean\n collapsible?: boolean\n icon?: string // Icon name for sidebar display (Lucide icon name)\n tab_group?: string // Tab group ID for organizing categories into tabs\n}\n\nconst DOCS_DIR = path.join(process.cwd(), \"docs\")\n\n/**\n * Read category.json from a folder\n */\nexport function getCategoryConfig(folderPath: string): CategoryConfig | null {\n try {\n const categoryPath = path.join(folderPath, \"_category_.json\")\n\n if (!fs.existsSync(categoryPath)) {\n return null\n }\n\n const content = fs.readFileSync(categoryPath, \"utf8\")\n return JSON.parse(content) as CategoryConfig\n } catch (error) {\n console.error(`Error reading category config from ${folderPath}:`, error)\n return null\n }\n}\n\n/**\n * Get all category configs for a version\n */\nexport function getAllCategoryConfigs(version: string): Map<string, CategoryConfig> {\n const configs = new Map<string, CategoryConfig>()\n const versionDir = path.join(DOCS_DIR, version)\n\n if (!fs.existsSync(versionDir)) {\n return configs\n }\n\n function scanDirectory(dir: string, relativePath: string = \"\") {\n const entries = fs.readdirSync(dir, { withFileTypes: true })\n\n for (const entry of entries) {\n if (entry.isDirectory()) {\n const fullPath = path.join(dir, entry.name)\n const relPath = relativePath ? `${relativePath}/${entry.name}` : entry.name\n\n const config = getCategoryConfig(fullPath)\n if (config) {\n configs.set(relPath, config)\n }\n\n // Recursively scan subdirectories\n scanDirectory(fullPath, relPath)\n }\n }\n }\n\n scanDirectory(versionDir)\n return configs\n}\n","/**\n * Caching layer for MDX operations to improve development performance\n *\n * This module provides in-memory caching for expensive file system operations\n * that occur during static generation. In development mode, caches are\n * invalidated automatically when files change.\n */\n\n// Note: This file uses server-only APIs (fs, path) and should only be imported in Server Components\nimport { Doc, getVersions, getAllDocs, getDocBySlug } from './mdx'\nimport { watch } from 'fs'\nimport { join } from 'path'\nimport { PerfTimer, logCacheOperation } from './dev-utils'\n\nconst isDevelopment = process.env.NODE_ENV === 'development'\n\n// Cache stores\nconst versionsCache = {\n data: null as string[] | null,\n timestamp: 0,\n}\n\nconst allDocsCache = new Map<string, {\n data: Doc[]\n timestamp: number\n}>()\n\nconst docBySlugCache = new Map<string, {\n data: Doc | null\n timestamp: number\n}>()\n\n// Cache TTL (time to live) in milliseconds\nconst CACHE_TTL = isDevelopment ? 5000 : 60000 // 5s in dev, 60s in prod\n\n// Track if we've set up file watchers\nlet watchersInitialized = false\n\n/**\n * Initialize file watchers to invalidate cache on changes\n * Only runs in development mode\n */\nfunction initializeWatchers() {\n if (!isDevelopment || watchersInitialized) return\n\n watchersInitialized = true\n const docsPath = join(process.cwd(), 'docs')\n\n try {\n watch(docsPath, { recursive: true }, (eventType, filename) => {\n if (!filename) return\n\n // Invalidate relevant caches when MDX or JSON files change\n if (filename.endsWith('.mdx') || filename.endsWith('.json')) {\n // Extract version from path\n const parts = filename.split(/[/\\\\]/)\n const version = parts[0]\n\n // Clear all docs cache for this version\n allDocsCache.delete(version)\n\n // Clear individual doc caches for this version\n const cacheKeysToDelete: string[] = []\n docBySlugCache.forEach((_, key) => {\n if (key.startsWith(`${version}:`)) {\n cacheKeysToDelete.push(key)\n }\n })\n cacheKeysToDelete.forEach(key => docBySlugCache.delete(key))\n\n // Clear versions cache if directory structure changed\n if (eventType === 'rename') {\n versionsCache.data = null\n }\n\n console.log(`[MDX Cache] Invalidated cache for: ${filename}`)\n }\n })\n\n console.log('[MDX Cache] File watchers initialized')\n } catch (error) {\n console.error('[MDX Cache] Failed to initialize watchers:', error)\n }\n}\n\n/**\n * Check if a cache entry is still valid\n */\nfunction isCacheValid(timestamp: number): boolean {\n return Date.now() - timestamp < CACHE_TTL\n}\n\n/**\n * Cached version of getVersions()\n */\nexport function getCachedVersions(): string[] {\n // Initialize watchers on first use\n initializeWatchers()\n\n if (versionsCache.data && isCacheValid(versionsCache.timestamp)) {\n logCacheOperation('hit', 'versions')\n return versionsCache.data\n }\n\n logCacheOperation('miss', 'versions')\n const timer = new PerfTimer('getVersions')\n const versions = getVersions()\n timer.end()\n\n versionsCache.data = versions\n versionsCache.timestamp = Date.now()\n\n return versions\n}\n\n/**\n * Cached version of getAllDocs()\n */\nexport async function getCachedAllDocs(version = 'v1.0.0', locale?: string): Promise<Doc[]> {\n // Initialize watchers on first use\n initializeWatchers()\n\n const cacheKey = locale ? `${version}:${locale}` : version\n const cached = allDocsCache.get(cacheKey)\n if (cached && isCacheValid(cached.timestamp)) {\n logCacheOperation('hit', `getAllDocs:${cacheKey}`)\n return cached.data\n }\n\n logCacheOperation('miss', `getAllDocs:${cacheKey}`)\n const timer = new PerfTimer(`getAllDocs(${cacheKey})`)\n const docs = await getAllDocs(version, locale)\n timer.end()\n\n allDocsCache.set(cacheKey, {\n data: docs,\n timestamp: Date.now(),\n })\n\n return docs\n}\n\n/**\n * Cached version of getDocBySlug()\n */\nexport async function getCachedDocBySlug(\n slug: string,\n version = 'v1.0.0'\n): Promise<Doc | null> {\n // Initialize watchers on first use\n initializeWatchers()\n\n const cacheKey = `${version}:${slug}`\n const cached = docBySlugCache.get(cacheKey)\n\n if (cached && isCacheValid(cached.timestamp)) {\n logCacheOperation('hit', `getDocBySlug:${cacheKey}`)\n return cached.data\n }\n\n logCacheOperation('miss', `getDocBySlug:${cacheKey}`)\n const timer = new PerfTimer(`getDocBySlug(${slug})`)\n const doc = await getDocBySlug(slug, version)\n timer.end()\n\n docBySlugCache.set(cacheKey, {\n data: doc,\n timestamp: Date.now(),\n })\n\n return doc\n}\n\n/**\n * Manually clear all caches\n * Useful for testing or when you want to force a refresh\n */\nexport function clearAllCaches() {\n versionsCache.data = null\n allDocsCache.clear()\n docBySlugCache.clear()\n console.log('[MDX Cache] All caches cleared')\n}\n\n/**\n * Get cache statistics for debugging\n */\nexport function getCacheStats() {\n return {\n versions: {\n cached: versionsCache.data !== null,\n age: versionsCache.timestamp ? Date.now() - versionsCache.timestamp : 0,\n },\n allDocs: {\n entries: allDocsCache.size,\n versions: Array.from(allDocsCache.keys()),\n },\n docBySlug: {\n entries: docBySlugCache.size,\n },\n }\n}\n","/**\n * Development utilities for debugging and performance monitoring\n * Only active in development mode\n */\n\nconst isDevelopment = process.env.NODE_ENV === 'development'\n\n/**\n * Performance timer for measuring operation duration\n */\nexport class PerfTimer {\n private startTime: number\n private label: string\n\n constructor(label: string) {\n this.label = label\n this.startTime = isDevelopment ? performance.now() : 0\n }\n\n end() {\n if (!isDevelopment) return\n\n const duration = performance.now() - this.startTime\n const color = duration > 1000 ? '\\x1b[31m' : duration > 500 ? '\\x1b[33m' : '\\x1b[32m'\n const reset = '\\x1b[0m'\n\n console.log(`${color}⏱️ ${this.label}: ${duration.toFixed(2)}ms${reset}`)\n }\n}\n\n/**\n * Log file system operations\n */\nexport function logFsOperation(operation: string, path: string, details?: any) {\n if (!isDevelopment) return\n\n console.log(`📁 [FS] ${operation}: ${path}`, details || '')\n}\n\n/**\n * Log cache operations\n */\nexport function logCacheOperation(operation: 'hit' | 'miss' | 'invalidate', key: string) {\n if (!isDevelopment) return\n\n const emoji = operation === 'hit' ? '✅' : operation === 'miss' ? '❌' : '🔄'\n console.log(`${emoji} [Cache] ${operation}: ${key}`)\n}\n\n/**\n * Memory usage reporter\n */\nexport function logMemoryUsage(label?: string) {\n if (!isDevelopment) return\n\n const used = process.memoryUsage()\n const prefix = label ? `[${label}] ` : ''\n\n console.log(`💾 ${prefix}Memory Usage:`, {\n rss: `${Math.round(used.rss / 1024 / 1024)}MB`,\n heapTotal: `${Math.round(used.heapTotal / 1024 / 1024)}MB`,\n heapUsed: `${Math.round(used.heapUsed / 1024 / 1024)}MB`,\n })\n}\n\n/**\n * Pretty print object for debugging\n */\nexport function debugLog(label: string, data: any) {\n if (!isDevelopment) return\n\n console.log(`\\n🔍 ${label}:`)\n console.dir(data, { depth: null, colors: true })\n console.log('')\n}\n","export interface TOCItem {\n id: string\n title: string\n level: number\n}\n\n/**\n * Extract headings from HTML string for table of contents\n */\nexport function extractHeadings(html: string): TOCItem[] {\n const headingRegex = /<h([2-3])[^>]*id=\"([^\"]*)\"[^>]*>(.*?)<\\/h\\1>/g\n const toc: TOCItem[] = []\n let match\n\n while ((match = headingRegex.exec(html)) !== null) {\n const level = Number.parseInt(match[1])\n const id = match[2]\n const title = match[3].replace(/<[^>]*>/g, \"\") // Strip HTML tags\n\n toc.push({ id, title, level })\n }\n\n return toc\n}\n","import { getAllDocs, getVersions } from \"./mdx\"\n\nexport interface RedirectMapping {\n from: string\n to: string\n}\n\n/**\n * Build redirect mappings from all docs' redirect_from frontmatter\n */\nexport async function buildRedirectMappings(): Promise<RedirectMapping[]> {\n const versions = getVersions()\n const redirects: RedirectMapping[] = []\n\n for (const version of versions) {\n const docs = await getAllDocs(version)\n \n for (const doc of docs) {\n if (doc.meta.redirect_from && Array.isArray(doc.meta.redirect_from)) {\n for (const oldPath of doc.meta.redirect_from) {\n redirects.push({\n from: oldPath,\n to: `/docs/${version}/${doc.slug}`,\n })\n }\n }\n }\n }\n\n return redirects\n}\n\n/**\n * Find redirect destination for a given path\n */\nexport async function findRedirect(path: string): Promise<string | null> {\n const redirects = await buildRedirectMappings()\n const redirect = redirects.find((r) => r.from === path)\n return redirect ? redirect.to : null\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,SAAQ;AACf,OAAOC,WAAU;AACjB,OAAO,YAAY;;;ACDnB,OAAO,QAAQ;AACf,OAAO,UAAU;AAgBjB,IAAM,WAAW,KAAK,KAAK,QAAQ,IAAI,GAAG,MAAM;AAKzC,SAAS,kBAAkB,YAA2C;AAC3E,MAAI;AACF,UAAM,eAAe,KAAK,KAAK,YAAY,iBAAiB;AAE5D,QAAI,CAAC,GAAG,WAAW,YAAY,GAAG;AAChC,aAAO;AAAA,IACT;AAEA,UAAM,UAAU,GAAG,aAAa,cAAc,MAAM;AACpD,WAAO,KAAK,MAAM,OAAO;AAAA,EAC3B,SAAS,OAAO;AACd,YAAQ,MAAM,sCAAsC,UAAU,KAAK,KAAK;AACxE,WAAO;AAAA,EACT;AACF;AAKO,SAAS,sBAAsB,SAA8C;AAClF,QAAM,UAAU,oBAAI,IAA4B;AAChD,QAAM,aAAa,KAA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iB,CAAC;AACxB,MAAI;AAEJ,UAAQ,QAAQ,aAAa,KAAK,IAAI,OAAO,MAAM;AACjD,UAAM,QAAQ,OAAO,SAAS,MAAM,CAAC,CAAC;AACtC,UAAM,KAAK,MAAM,CAAC;AAClB,UAAM,QAAQ,MAAM,CAAC,EAAE,QAAQ,YAAY,EAAE;AAE7C,QAAI,KAAK,EAAE,IAAI,OAAO,MAAM,CAAC;AAAA,EAC/B;AAEA,SAAO;AACT;;;ACbA,eAAsB,wBAAoD;AACxE,QAAM,WAAW,YAAY;AAC7B,QAAM,YAA+B,CAAC;AAEtC,aAAW,WAAW,UAAU;AAC9B,UAAM,OAAO,MAAM,WAAW,OAAO;AAErC,eAAW,OAAO,MAAM;AACtB,UAAI,IAAI,KAAK,iBAAiB,MAAM,QAAQ,IAAI,KAAK,aAAa,GAAG;AACnE,mBAAW,WAAW,IAAI,KAAK,eAAe;AAC5C,oBAAU,KAAK;AAAA,YACb,MAAM;AAAA,YACN,IAAI,SAAS,OAAO,IAAI,IAAI,IAAI;AAAA,UAClC,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAKA,eAAsB,aAAaC,OAAsC;AACvE,QAAM,YAAY,MAAM,sBAAsB;AAC9C,QAAM,WAAW,UAAU,KAAK,CAAC,MAAM,EAAE,SAASA,KAAI;AACtD,SAAO,WAAW,SAAS,KAAK;AAClC;","names":["fs","path","DOCS_DIR","path","fs","doc","isDevelopment","path","isDevelopment","path"]}
|
|
@@ -519,6 +519,8 @@ interface LogoProps {
|
|
|
519
519
|
}
|
|
520
520
|
declare function Logo({ logo, alt, className }: LogoProps): react_jsx_runtime.JSX.Element | null;
|
|
521
521
|
|
|
522
|
+
declare function LanguageSwitcher(): react_jsx_runtime.JSX.Element | null;
|
|
523
|
+
|
|
522
524
|
interface MathProps {
|
|
523
525
|
children: string;
|
|
524
526
|
block?: boolean;
|
|
@@ -817,4 +819,4 @@ declare function Textarea({ className, ...props }: React$1.ComponentProps<"texta
|
|
|
817
819
|
|
|
818
820
|
declare function VersionNotFound(): react_jsx_runtime.JSX.Element;
|
|
819
821
|
|
|
820
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ApiEndpoint, ApiParams, ApiPlayground, ApiReference, ApiResponse, ApiResponse as ApiResponseDisplay, Badge, Breadcrumb, Button, COMPONENT_TEXT_PROPS, Callout, Card, CardGrid, CodeBlock, type CodeBlockProps, Column, Columns, ConfigProvider, DevModeBadge, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Badge$1 as DocBadge, DocLayoutWrapper, DocLoading, DocMetadata, DocNavigation, DocTags, DraftBadge, Footer, Frame, Header, HotReloadIndicator, Icon, type IconProps, Image, ImageCard, ImageCardGrid, type ImageProps, Input, Logo, Math, type MathProps, MdxHotReload, Mermaid, type MermaidProps, MobileDocLayout, NotFoundContent, SearchHighlight, SearchModal, Sidebar, SidebarSkeleton, SiteBanner, Step, Steps, Tab, TabGroups, type TabProps, TabProvider, TableOfContents, Tabs, type TabsProps, Textarea, ThemeToggle, Tooltip, VersionNotFound, VersionSwitcher, Video, badgeVariants, buttonVariants, extractComponentPropsText, extractSearchText, useConfig, useConfigValue, useTabContext };
|
|
822
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ApiEndpoint, ApiParams, ApiPlayground, ApiReference, ApiResponse, ApiResponse as ApiResponseDisplay, Badge, Breadcrumb, Button, COMPONENT_TEXT_PROPS, Callout, Card, CardGrid, CodeBlock, type CodeBlockProps, Column, Columns, ConfigProvider, DevModeBadge, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Badge$1 as DocBadge, DocLayoutWrapper, DocLoading, DocMetadata, DocNavigation, DocTags, DraftBadge, Footer, Frame, Header, HotReloadIndicator, Icon, type IconProps, Image, ImageCard, ImageCardGrid, type ImageProps, Input, LanguageSwitcher, Logo, Math, type MathProps, MdxHotReload, Mermaid, type MermaidProps, MobileDocLayout, NotFoundContent, SearchHighlight, SearchModal, Sidebar, SidebarSkeleton, SiteBanner, Step, Steps, Tab, TabGroups, type TabProps, TabProvider, TableOfContents, Tabs, type TabsProps, Textarea, ThemeToggle, Tooltip, VersionNotFound, VersionSwitcher, Video, badgeVariants, buttonVariants, extractComponentPropsText, extractSearchText, useConfig, useConfigValue, useTabContext };
|
|
@@ -519,6 +519,8 @@ interface LogoProps {
|
|
|
519
519
|
}
|
|
520
520
|
declare function Logo({ logo, alt, className }: LogoProps): react_jsx_runtime.JSX.Element | null;
|
|
521
521
|
|
|
522
|
+
declare function LanguageSwitcher(): react_jsx_runtime.JSX.Element | null;
|
|
523
|
+
|
|
522
524
|
interface MathProps {
|
|
523
525
|
children: string;
|
|
524
526
|
block?: boolean;
|
|
@@ -817,4 +819,4 @@ declare function Textarea({ className, ...props }: React$1.ComponentProps<"texta
|
|
|
817
819
|
|
|
818
820
|
declare function VersionNotFound(): react_jsx_runtime.JSX.Element;
|
|
819
821
|
|
|
820
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ApiEndpoint, ApiParams, ApiPlayground, ApiReference, ApiResponse, ApiResponse as ApiResponseDisplay, Badge, Breadcrumb, Button, COMPONENT_TEXT_PROPS, Callout, Card, CardGrid, CodeBlock, type CodeBlockProps, Column, Columns, ConfigProvider, DevModeBadge, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Badge$1 as DocBadge, DocLayoutWrapper, DocLoading, DocMetadata, DocNavigation, DocTags, DraftBadge, Footer, Frame, Header, HotReloadIndicator, Icon, type IconProps, Image, ImageCard, ImageCardGrid, type ImageProps, Input, Logo, Math, type MathProps, MdxHotReload, Mermaid, type MermaidProps, MobileDocLayout, NotFoundContent, SearchHighlight, SearchModal, Sidebar, SidebarSkeleton, SiteBanner, Step, Steps, Tab, TabGroups, type TabProps, TabProvider, TableOfContents, Tabs, type TabsProps, Textarea, ThemeToggle, Tooltip, VersionNotFound, VersionSwitcher, Video, badgeVariants, buttonVariants, extractComponentPropsText, extractSearchText, useConfig, useConfigValue, useTabContext };
|
|
822
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ApiEndpoint, ApiParams, ApiPlayground, ApiReference, ApiResponse, ApiResponse as ApiResponseDisplay, Badge, Breadcrumb, Button, COMPONENT_TEXT_PROPS, Callout, Card, CardGrid, CodeBlock, type CodeBlockProps, Column, Columns, ConfigProvider, DevModeBadge, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Badge$1 as DocBadge, DocLayoutWrapper, DocLoading, DocMetadata, DocNavigation, DocTags, DraftBadge, Footer, Frame, Header, HotReloadIndicator, Icon, type IconProps, Image, ImageCard, ImageCardGrid, type ImageProps, Input, LanguageSwitcher, Logo, Math, type MathProps, MdxHotReload, Mermaid, type MermaidProps, MobileDocLayout, NotFoundContent, SearchHighlight, SearchModal, Sidebar, SidebarSkeleton, SiteBanner, Step, Steps, Tab, TabGroups, type TabProps, TabProvider, TableOfContents, Tabs, type TabsProps, Textarea, ThemeToggle, Tooltip, VersionNotFound, VersionSwitcher, Video, badgeVariants, buttonVariants, extractComponentPropsText, extractSearchText, useConfig, useConfigValue, useTabContext };
|