ardo 2.8.0 → 3.0.1

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.
@@ -364,7 +364,7 @@ declare function CodeBlock({ code: codeProp, language, title, lineNumbers, highl
364
364
  interface CodeGroupProps {
365
365
  /** CodeBlock components to display as tabs */
366
366
  children: React.ReactNode;
367
- /** Comma-separated tab labels (set by remarkContainersMdx from code block meta) */
367
+ /** Comma-separated tab labels */
368
368
  labels?: string;
369
369
  }
370
370
  /**
@@ -620,9 +620,9 @@ var TypeDocGenerator = class {
620
620
  }
621
621
  const deprecated = reflection.comment.blockTags.find((t) => t.tag === "@deprecated");
622
622
  if (deprecated) {
623
- content.push(":::warning Deprecated");
623
+ content.push('<Warning title="Deprecated">');
624
624
  content.push(this.renderComment(deprecated.content));
625
- content.push(":::");
625
+ content.push("</Warning>");
626
626
  content.push("");
627
627
  }
628
628
  const see = reflection.comment.blockTags.filter((t) => t.tag === "@see");
@@ -1032,4 +1032,4 @@ export {
1032
1032
  TypeDocGenerator,
1033
1033
  generateApiDocs
1034
1034
  };
1035
- //# sourceMappingURL=chunk-CYZLI4AU.js.map
1035
+ //# sourceMappingURL=chunk-PGHUPTGL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/typedoc/generator.ts"],"sourcesContent":["import {\n Application,\n TSConfigReader,\n TypeDocReader,\n type ProjectReflection,\n ReflectionKind,\n type DeclarationReflection,\n type SignatureReflection,\n type TypeParameterReflection,\n} from \"typedoc\"\nimport path from \"path\"\nimport fs from \"fs/promises\"\nimport { readPackageUp } from \"read-package-up\"\nimport type { TypeDocConfig, GeneratedApiDoc } from \"./types\"\n\nexport class TypeDocGenerator {\n private config: TypeDocConfig\n private app: Application | undefined\n private project: ProjectReflection | undefined\n private basePath: string\n private packageNameCache = new Map<string, string | undefined>()\n\n constructor(config: TypeDocConfig) {\n this.config = {\n out: \"api\",\n excludeExternals: true,\n excludePrivate: true,\n excludeProtected: false,\n excludeInternal: true,\n sort: [\"source-order\"],\n sidebar: {\n title: \"API Reference\",\n position: 100,\n collapsed: false,\n },\n markdown: {\n breadcrumbs: true,\n hierarchy: true,\n sourceLinks: true,\n codeBlocks: true,\n },\n ...config,\n }\n // Use the output directory as the base path for links\n this.basePath = \"/\" + this.config.out!\n }\n\n async generate(outputDir: string): Promise<GeneratedApiDoc[]> {\n // Pre-populate package name cache for all entry points\n await Promise.all(this.config.entryPoints.map((ep) => this.resolvePackageName(ep)))\n\n const typedocOptions: Record<string, unknown> = {\n entryPoints: this.config.entryPoints,\n tsconfig: this.config.tsconfig,\n excludeExternals: this.config.excludeExternals,\n excludePrivate: this.config.excludePrivate,\n excludeProtected: this.config.excludeProtected,\n excludeInternal: this.config.excludeInternal,\n sort: this.config.sort,\n }\n\n // Only pass array/string options when explicitly set to avoid\n // TypeDoc errors like \"option must be set to an array of strings\"\n if (this.config.exclude) typedocOptions.exclude = this.config.exclude\n if (this.config.categoryOrder) typedocOptions.categoryOrder = this.config.categoryOrder\n if (this.config.groupOrder) typedocOptions.groupOrder = this.config.groupOrder\n if (this.config.plugin) typedocOptions.plugin = this.config.plugin\n if (this.config.readme) typedocOptions.readme = this.config.readme\n\n this.app = await Application.bootstrapWithPlugins(typedocOptions, [\n new TSConfigReader(),\n new TypeDocReader(),\n ])\n\n this.project = await this.app.convert()\n\n if (!this.project) {\n throw new Error(\"TypeDoc conversion failed\")\n }\n\n const docs = this.generateMarkdownDocs()\n const apiDir = path.join(outputDir, this.config.out!)\n\n await fs.mkdir(apiDir, { recursive: true })\n\n for (const doc of docs) {\n const filePath = path.join(apiDir, doc.path)\n const dir = path.dirname(filePath)\n await fs.mkdir(dir, { recursive: true })\n\n const frontmatterLines = [\n \"---\",\n `title: ${doc.frontmatter.title}`,\n doc.frontmatter.description ? `description: ${doc.frontmatter.description}` : null,\n doc.frontmatter.sidebar_position !== undefined\n ? `sidebar_position: ${doc.frontmatter.sidebar_position}`\n : null,\n doc.frontmatter.sidebar === false ? `sidebar: false` : null,\n \"---\",\n ].filter((line): line is string => line !== null)\n\n const frontmatter = frontmatterLines.join(\"\\n\") + \"\\n\\n\"\n\n await fs.writeFile(filePath, frontmatter + doc.content)\n }\n\n return docs\n }\n\n private generateMarkdownDocs(): GeneratedApiDoc[] {\n if (!this.project) return []\n\n const docs: GeneratedApiDoc[] = []\n\n // Generate index page\n docs.push(this.generateIndexPage())\n\n const children = this.project.children || []\n\n // Group functions and type aliases by source file\n // React components (PascalCase) get their own pages\n const functionsByFile = new Map<string, DeclarationReflection[]>()\n const typesByFile = new Map<string, DeclarationReflection[]>()\n const componentItems: DeclarationReflection[] = []\n const standaloneItems: DeclarationReflection[] = []\n\n for (const child of children) {\n const sourceFile = child.sources?.[0]?.fileName\n\n if (child.kind === ReflectionKind.Function && sourceFile) {\n // React components are PascalCase and get individual pages\n if (this.isReactComponent(child.name)) {\n componentItems.push(child)\n } else {\n const existing = functionsByFile.get(sourceFile) || []\n existing.push(child)\n functionsByFile.set(sourceFile, existing)\n }\n } else if (child.kind === ReflectionKind.TypeAlias && sourceFile) {\n const existing = typesByFile.get(sourceFile) || []\n existing.push(child)\n typesByFile.set(sourceFile, existing)\n } else {\n standaloneItems.push(child)\n }\n }\n\n // Generate grouped pages for functions (by source file)\n for (const [sourceFile, functions] of functionsByFile) {\n docs.push(this.generateGroupedFunctionsPage(sourceFile, functions))\n }\n\n // Generate grouped pages for types (by source file)\n for (const [sourceFile, types] of typesByFile) {\n docs.push(this.generateGroupedTypesPage(sourceFile, types))\n }\n\n // Generate individual pages for React components\n // Sort alphabetically for consistent prev/next navigation\n const sortedComponents = [...componentItems].sort((a, b) => a.name.localeCompare(b.name))\n for (let i = 0; i < sortedComponents.length; i++) {\n const prev = i > 0 ? sortedComponents[i - 1] : null\n const next = i < sortedComponents.length - 1 ? sortedComponents[i + 1] : null\n docs.push(this.generateComponentPage(sortedComponents[i], prev, next))\n }\n\n // Group standalone items by kind for prev/next navigation within each group\n const itemsByKind = new Map<number, DeclarationReflection[]>()\n for (const child of standaloneItems) {\n const kind = child.kind\n const existing = itemsByKind.get(kind) || []\n existing.push(child)\n itemsByKind.set(kind, existing)\n }\n\n // Generate individual pages for classes, interfaces, enums, etc. with prev/next within group\n for (const [, items] of itemsByKind) {\n const sortedItems = [...items].sort((a, b) => a.name.localeCompare(b.name))\n for (let i = 0; i < sortedItems.length; i++) {\n const prev = i > 0 ? sortedItems[i - 1] : null\n const next = i < sortedItems.length - 1 ? sortedItems[i + 1] : null\n docs.push(...this.generateReflectionDocs(sortedItems[i], \"\", prev, next))\n }\n }\n\n // Generate category index pages for non-empty categories\n docs.push(\n ...this.generateCategoryIndexPages(\n docs,\n componentItems,\n functionsByFile,\n typesByFile,\n standaloneItems\n )\n )\n\n return docs\n }\n\n private generateCategoryIndexPages(\n docs: GeneratedApiDoc[],\n componentItems: DeclarationReflection[],\n functionsByFile: Map<string, DeclarationReflection[]>,\n typesByFile: Map<string, DeclarationReflection[]>,\n standaloneItems: DeclarationReflection[]\n ): GeneratedApiDoc[] {\n const indexPages: GeneratedApiDoc[] = []\n\n // Components index\n if (componentItems.length > 0) {\n const sorted = [...componentItems].sort((a, b) => a.name.localeCompare(b.name))\n const content = [\n `# Components`,\n \"\",\n ...sorted.map((c) => {\n const desc = c.comment?.summary ? ` - ${this.renderCommentShort(c.comment.summary)}` : \"\"\n return `- [${c.name}](${this.buildLink(\"components\", this.getSlug(c.name))})${desc}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"components/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Components\", sidebar: false },\n })\n }\n\n // Functions index\n if (functionsByFile.size > 0) {\n const sortedModules = [...functionsByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n const content = [\n `# Functions`,\n \"\",\n ...sortedModules.map(([sourceFile, functions]) => {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const funcNames = functions\n .map((f) => f.name)\n .sort()\n .join(\", \")\n return `- [${moduleName}](${this.buildLink(\"functions\", slug)}) - ${funcNames}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"functions/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Functions\", sidebar: false },\n })\n }\n\n // Group standalone items by kind for category indexes\n const interfaces = standaloneItems.filter((c) => c.kind === ReflectionKind.Interface)\n const classes = standaloneItems.filter((c) => c.kind === ReflectionKind.Class)\n\n // Interfaces index\n if (interfaces.length > 0) {\n const sorted = [...interfaces].sort((a, b) => a.name.localeCompare(b.name))\n const content = [\n `# Interfaces`,\n \"\",\n ...sorted.map((item) => {\n const desc = item.comment?.summary\n ? ` - ${this.renderCommentShort(item.comment.summary)}`\n : \"\"\n return `- [${item.name}](${this.buildLink(\"interfaces\", this.getSlug(item.name))})${desc}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"interfaces/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Interfaces\", sidebar: false },\n })\n }\n\n // Types index\n if (typesByFile.size > 0) {\n const sortedModules = [...typesByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n const content = [\n `# Types`,\n \"\",\n ...sortedModules.map(([sourceFile, types]) => {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const typeNames = types\n .map((t) => t.name)\n .sort()\n .join(\", \")\n return `- [${moduleName}](${this.buildLink(\"types\", slug)}) - ${typeNames}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"types/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Types\", sidebar: false },\n })\n }\n\n // Classes index\n if (classes.length > 0) {\n const sorted = [...classes].sort((a, b) => a.name.localeCompare(b.name))\n const content = [\n `# Classes`,\n \"\",\n ...sorted.map((item) => {\n const desc = item.comment?.summary\n ? ` - ${this.renderCommentShort(item.comment.summary)}`\n : \"\"\n return `- [${item.name}](${this.buildLink(\"classes\", this.getSlug(item.name))})${desc}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"classes/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Classes\", sidebar: false },\n })\n }\n\n return indexPages\n }\n\n private generateGroupedFunctionsPage(\n sourceFile: string,\n functions: DeclarationReflection[]\n ): GeneratedApiDoc {\n // Extract module name from source file path (e.g., \"src/utils/string.ts\" -> \"string\")\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const content: string[] = []\n\n content.push(`# ${moduleName} Functions`)\n content.push(\"\")\n content.push(`Functions exported from \\`${sourceFile}\\``)\n content.push(\"\")\n\n // Sort functions alphabetically\n const sortedFunctions = [...functions].sort((a, b) => a.name.localeCompare(b.name))\n\n for (const func of sortedFunctions) {\n content.push(`## ${func.name}`)\n content.push(\"\")\n\n // Description\n if (func.comment?.summary) {\n content.push(this.renderComment(func.comment.summary))\n content.push(\"\")\n }\n\n // Signature\n if (func.signatures) {\n for (const sig of func.signatures) {\n content.push(this.renderSignature(sig))\n content.push(\"\")\n }\n }\n\n // Examples\n if (func.comment?.blockTags) {\n const examples = func.comment.blockTags.filter((t) => t.tag === \"@example\")\n if (examples.length > 0) {\n content.push(\"### Example\")\n content.push(\"\")\n for (const example of examples) {\n content.push(this.renderComment(example.content))\n content.push(\"\")\n }\n }\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && func.sources?.[0]) {\n const source = func.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n if (sourceUrl) {\n content.push(`[Source](${sourceUrl})`)\n content.push(\"\")\n }\n }\n\n content.push(\"---\")\n content.push(\"\")\n }\n\n return {\n path: `functions/${slug}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: `${moduleName} Functions`,\n description: `Functions from ${sourceFile}`,\n },\n }\n }\n\n private generateGroupedTypesPage(\n sourceFile: string,\n types: DeclarationReflection[]\n ): GeneratedApiDoc {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const content: string[] = []\n\n content.push(`# ${moduleName} Types`)\n content.push(\"\")\n content.push(`Type definitions from \\`${sourceFile}\\``)\n content.push(\"\")\n\n // Sort types alphabetically\n const sortedTypes = [...types].sort((a, b) => a.name.localeCompare(b.name))\n\n for (const typeAlias of sortedTypes) {\n content.push(`## ${typeAlias.name}`)\n content.push(\"\")\n\n // Description\n if (typeAlias.comment?.summary) {\n content.push(this.renderComment(typeAlias.comment.summary))\n content.push(\"\")\n }\n\n // Type definition\n if (typeAlias.type) {\n content.push(\"```typescript\")\n content.push(`type ${typeAlias.name} = ${typeAlias.type.toString()}`)\n content.push(\"```\")\n content.push(\"\")\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && typeAlias.sources?.[0]) {\n const source = typeAlias.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n if (sourceUrl) {\n content.push(`[Source](${sourceUrl})`)\n content.push(\"\")\n }\n }\n\n content.push(\"---\")\n content.push(\"\")\n }\n\n return {\n path: `types/${slug}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: `${moduleName} Types`,\n description: `Type definitions from ${sourceFile}`,\n },\n }\n }\n\n private async resolvePackageName(filePath: string): Promise<string | undefined> {\n const dir = path.dirname(path.resolve(filePath))\n if (this.packageNameCache.has(dir)) {\n return this.packageNameCache.get(dir)\n }\n\n const result = await readPackageUp({ cwd: dir })\n const name = result?.packageJson.name\n const resolved = name ? name.replace(/^@[^/]+\\//, \"\") : undefined\n this.packageNameCache.set(dir, resolved)\n return resolved\n }\n\n private getModuleNameFromPath(filePath: string): string {\n // Include parent directory to avoid naming conflicts\n // \"src/utils/string.ts\" -> \"utils/string\"\n // \"src/ui/Sidebar.tsx\" -> \"ui/Sidebar\"\n // \"runtime/sidebar.ts\" -> \"runtime/sidebar\"\n const parts = filePath.split(\"/\")\n const basename = (parts.pop() || filePath).replace(/\\.(ts|tsx|js|jsx)$/, \"\")\n\n // Get parent directory if available\n const parent = parts.pop()\n if (parent && parent !== \"src\") {\n return `${parent}/${basename}`\n }\n if (basename === \"index\") {\n // Find the first cached package name. We cannot use path.resolve() here\n // because TypeDoc reports sourceFile paths relative to the project root,\n // while entry points were resolved relative to a different CWD (e.g. docs/).\n for (const packageName of this.packageNameCache.values()) {\n if (packageName) return packageName\n }\n }\n return basename\n }\n\n private generateIndexPage(): GeneratedApiDoc {\n const content = [\n `# ${this.config.sidebar?.title || \"API Reference\"}`,\n \"\",\n this.project?.comment?.summary\n ? this.renderComment(this.project.comment.summary)\n : \"Auto-generated API documentation.\",\n \"\",\n ]\n\n const children = this.project?.children || []\n\n // Group functions and types by source file for linking\n // Separate React components from regular functions\n const functionsByFile = new Map<string, DeclarationReflection[]>()\n const typesByFile = new Map<string, DeclarationReflection[]>()\n const componentItems: DeclarationReflection[] = []\n const standaloneItems: DeclarationReflection[] = []\n\n for (const child of children) {\n const sourceFile = child.sources?.[0]?.fileName\n\n if (child.kind === ReflectionKind.Function && sourceFile) {\n if (this.isReactComponent(child.name)) {\n componentItems.push(child)\n } else {\n const existing = functionsByFile.get(sourceFile) || []\n existing.push(child)\n functionsByFile.set(sourceFile, existing)\n }\n } else if (child.kind === ReflectionKind.TypeAlias && sourceFile) {\n const existing = typesByFile.get(sourceFile) || []\n existing.push(child)\n typesByFile.set(sourceFile, existing)\n } else {\n standaloneItems.push(child)\n }\n }\n\n // Render components\n if (componentItems.length > 0) {\n content.push(\"## Components\")\n content.push(\"\")\n\n const sortedComponents = [...componentItems].sort((a, b) => a.name.localeCompare(b.name))\n\n for (const component of sortedComponents) {\n const description = component.comment?.summary\n ? this.renderCommentShort(component.comment.summary)\n : \"\"\n const descSuffix = description ? ` - ${description}` : \"\"\n content.push(\n `- [${component.name}](${this.buildLink(\"components\", this.getSlug(component.name))})${descSuffix}`\n )\n }\n\n content.push(\"\")\n }\n\n // Render grouped function modules\n if (functionsByFile.size > 0) {\n content.push(\"## Functions\")\n content.push(\"\")\n\n // Sort modules alphabetically\n const sortedModules = [...functionsByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n\n for (const [sourceFile, functions] of sortedModules) {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const funcNames = functions\n .map((f) => f.name)\n .sort()\n .join(\", \")\n content.push(`- [${moduleName}](${this.buildLink(\"functions\", slug)}) - ${funcNames}`)\n }\n\n content.push(\"\")\n }\n\n // Render grouped type modules\n if (typesByFile.size > 0) {\n content.push(\"## Type Aliases\")\n content.push(\"\")\n\n const sortedModules = [...typesByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n\n for (const [sourceFile, types] of sortedModules) {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const typeNames = types\n .map((t) => t.name)\n .sort()\n .join(\", \")\n content.push(`- [${moduleName}](${this.buildLink(\"types\", slug)}) - ${typeNames}`)\n }\n\n content.push(\"\")\n }\n\n // Group remaining items by kind\n const groups: Record<string, DeclarationReflection[]> = {}\n\n for (const child of standaloneItems) {\n const kindName = this.getKindGroupName(child.kind, child.name)\n if (!groups[kindName]) {\n groups[kindName] = []\n }\n groups[kindName].push(child)\n }\n\n // Sort each group alphabetically\n for (const group of Object.values(groups)) {\n group.sort((a, b) => a.name.localeCompare(b.name))\n }\n\n // Define the order of groups (excluding Functions and Types which are handled above)\n const groupOrder = [\"Interfaces\", \"Classes\", \"Variables\", \"Enums\", \"Other\"]\n\n // Render each group\n for (const groupName of groupOrder) {\n const group = groups[groupName]\n if (!group || group.length === 0) continue\n\n content.push(`## ${groupName}`)\n content.push(\"\")\n\n for (const child of group) {\n const description = child.comment?.summary\n ? this.renderCommentShort(child.comment.summary)\n : \"\"\n const descSuffix = description ? ` - ${description}` : \"\"\n const groupUrlPrefix = this.getGroupUrlPrefix(child.kind)\n content.push(\n `- [${child.name}](${this.buildLink(groupUrlPrefix, this.getSlug(child.name))})${descSuffix}`\n )\n }\n\n content.push(\"\")\n }\n\n return {\n path: \"index.md\",\n content: content.join(\"\\n\"),\n frontmatter: {\n title: this.config.sidebar?.title || \"API Reference\",\n description: \"Auto-generated API documentation\",\n sidebar_position: 0,\n },\n }\n }\n\n private getKindGroupName(kind: ReflectionKind, name: string): string {\n // Group hooks and components separately from regular functions\n if (kind === ReflectionKind.Function) {\n // React hooks start with \"use\"\n if (name.startsWith(\"use\")) {\n return \"React Hooks\"\n }\n // React components are PascalCase and typically don't start with lowercase\n if (name[0] === name[0].toUpperCase() && !name.includes(\"_\")) {\n return \"React Components\"\n }\n return \"Functions\"\n }\n\n switch (kind) {\n case ReflectionKind.Interface:\n return \"Interfaces\"\n case ReflectionKind.TypeAlias:\n return \"Types\"\n case ReflectionKind.Class:\n return \"Classes\"\n case ReflectionKind.Variable:\n return \"Variables\"\n case ReflectionKind.Enum:\n return \"Enums\"\n default:\n return \"Other\"\n }\n }\n\n private generateReflectionDocs(\n reflection: DeclarationReflection,\n parentPath: string,\n prev: DeclarationReflection | null = null,\n next: DeclarationReflection | null = null\n ): GeneratedApiDoc[] {\n const docs: GeneratedApiDoc[] = []\n const slug = this.getSlug(reflection.name)\n // Use group prefix (e.g., \"interfaces\", \"classes\") when at top level\n const groupPrefix = parentPath ? \"\" : this.getGroupUrlPrefix(reflection.kind)\n const currentPath = parentPath\n ? `${parentPath}/${slug}`\n : groupPrefix\n ? `${groupPrefix}/${slug}`\n : slug\n\n // Generate main page for this reflection\n docs.push(this.generateReflectionPage(reflection, currentPath, prev, next))\n\n // Generate pages for child classes, interfaces, etc.\n // Functions are grouped by source file, not individual pages\n const children = reflection.children || []\n const hasOwnPage = [\n ReflectionKind.Class,\n ReflectionKind.Interface,\n ReflectionKind.Enum,\n ReflectionKind.Namespace,\n ReflectionKind.Module,\n ]\n\n for (const child of children) {\n if (hasOwnPage.includes(child.kind)) {\n docs.push(...this.generateReflectionDocs(child, currentPath))\n }\n }\n\n return docs\n }\n\n private generateReflectionPage(\n reflection: DeclarationReflection,\n pagePath: string,\n prev: DeclarationReflection | null = null,\n next: DeclarationReflection | null = null\n ): GeneratedApiDoc {\n const kind = this.getKindName(reflection.kind)\n const content: string[] = []\n\n // Breadcrumbs\n if (this.config.markdown?.breadcrumbs) {\n content.push(this.generateBreadcrumbs(pagePath))\n content.push(\"\")\n }\n\n // Title\n content.push(`# ${kind}: ${reflection.name}`)\n content.push(\"\")\n\n // Description\n if (reflection.comment?.summary) {\n content.push(this.renderComment(reflection.comment.summary))\n content.push(\"\")\n }\n\n // Type parameters\n if (reflection.typeParameters && reflection.typeParameters.length > 0) {\n content.push(\"## Type Parameters\")\n content.push(\"\")\n content.push(this.renderTypeParameters(reflection.typeParameters))\n content.push(\"\")\n }\n\n // Hierarchy\n if (this.config.markdown?.hierarchy) {\n const hierarchy = this.renderHierarchy(reflection)\n if (hierarchy) {\n content.push(\"## Hierarchy\")\n content.push(\"\")\n content.push(hierarchy)\n content.push(\"\")\n }\n }\n\n // Signature (for functions)\n if (reflection.signatures) {\n content.push(\"## Signature\")\n content.push(\"\")\n for (const sig of reflection.signatures) {\n content.push(this.renderSignature(sig))\n content.push(\"\")\n }\n }\n\n // Properties\n const properties = (reflection.children || []).filter((c) => c.kind === ReflectionKind.Property)\n if (properties.length > 0) {\n content.push(\"## Properties\")\n content.push(\"\")\n for (const prop of properties) {\n content.push(this.renderProperty(prop))\n content.push(\"\")\n }\n }\n\n // Methods\n const methods = (reflection.children || []).filter((c) => c.kind === ReflectionKind.Method)\n if (methods.length > 0) {\n content.push(\"## Methods\")\n content.push(\"\")\n for (const method of methods) {\n content.push(this.renderMethod(method))\n content.push(\"\")\n }\n }\n\n // Enum members\n const enumMembers = (reflection.children || []).filter(\n (c) => c.kind === ReflectionKind.EnumMember\n )\n if (enumMembers.length > 0) {\n content.push(\"## Members\")\n content.push(\"\")\n content.push(\"| Member | Value | Description |\")\n content.push(\"|--------|-------|-------------|\")\n for (const member of enumMembers) {\n const value = member.defaultValue || \"\"\n const desc = member.comment?.summary ? this.renderCommentShort(member.comment.summary) : \"\"\n content.push(`| \\`${member.name}\\` | \\`${value}\\` | ${desc} |`)\n }\n content.push(\"\")\n }\n\n // Type alias definition\n if (reflection.kind === ReflectionKind.TypeAlias && reflection.type) {\n content.push(\"## Type\")\n content.push(\"\")\n content.push(\"```typescript\")\n content.push(`type ${reflection.name} = ${reflection.type.toString()}`)\n content.push(\"```\")\n content.push(\"\")\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && reflection.sources?.[0]) {\n const source = reflection.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n content.push(\"## Source\")\n content.push(\"\")\n if (sourceUrl) {\n content.push(`[${source.fileName}:${source.line}](${sourceUrl})`)\n } else {\n content.push(`${source.fileName}:${source.line}`)\n }\n content.push(\"\")\n }\n\n // Tags (deprecated, example, etc.)\n if (reflection.comment?.blockTags) {\n const examples = reflection.comment.blockTags.filter((t) => t.tag === \"@example\")\n if (examples.length > 0) {\n content.push(\"## Examples\")\n content.push(\"\")\n for (const example of examples) {\n content.push(this.renderComment(example.content))\n content.push(\"\")\n }\n }\n\n const deprecated = reflection.comment.blockTags.find((t) => t.tag === \"@deprecated\")\n if (deprecated) {\n content.push('<Warning title=\"Deprecated\">')\n content.push(this.renderComment(deprecated.content))\n content.push(\"</Warning>\")\n content.push(\"\")\n }\n\n const see = reflection.comment.blockTags.filter((t) => t.tag === \"@see\")\n if (see.length > 0) {\n content.push(\"## See Also\")\n content.push(\"\")\n for (const s of see) {\n content.push(`- ${this.renderComment(s.content)}`)\n }\n content.push(\"\")\n }\n }\n\n // Prev/Next navigation within group\n if (prev || next) {\n content.push(\"---\")\n content.push(\"\")\n const groupPrefix = this.getGroupUrlPrefix(reflection.kind)\n const prevLink = prev\n ? `[← ${prev.name}](${this.buildLink(groupPrefix, this.getSlug(prev.name))})`\n : \"\"\n const nextLink = next\n ? `[${next.name} →](${this.buildLink(groupPrefix, this.getSlug(next.name))})`\n : \"\"\n if (prev && next) {\n content.push(`${prevLink} | ${nextLink}`)\n } else {\n content.push(prevLink || nextLink)\n }\n content.push(\"\")\n }\n\n return {\n path: `${pagePath}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: reflection.name,\n description: reflection.comment?.summary\n ? this.renderCommentShort(reflection.comment.summary)\n : `${kind} ${reflection.name}`,\n },\n }\n }\n\n private renderSignature(sig: SignatureReflection): string {\n const lines: string[] = []\n\n if (this.config.markdown?.codeBlocks) {\n lines.push(\"```typescript\")\n }\n\n const typeParams = sig.typeParameters\n ? `<${sig.typeParameters.map((tp) => tp.name).join(\", \")}>`\n : \"\"\n\n const params = (sig.parameters || [])\n .map((p) => {\n const optional = p.flags.isOptional ? \"?\" : \"\"\n const type = p.type ? `: ${p.type.toString()}` : \"\"\n return `${p.name}${optional}${type}`\n })\n .join(\", \")\n\n const returnType = sig.type ? `: ${sig.type.toString()}` : \"\"\n\n lines.push(`function ${sig.name}${typeParams}(${params})${returnType}`)\n\n if (this.config.markdown?.codeBlocks) {\n lines.push(\"```\")\n }\n\n // Parameters table\n if (sig.parameters && sig.parameters.length > 0) {\n lines.push(\"\")\n lines.push(\"### Parameters\")\n lines.push(\"\")\n lines.push(\"| Name | Type | Description |\")\n lines.push(\"|------|------|-------------|\")\n\n for (const param of sig.parameters) {\n const type = param.type ? `\\`${param.type.toString()}\\`` : \"-\"\n const desc = param.comment?.summary ? this.renderCommentShort(param.comment.summary) : \"-\"\n const optional = param.flags.isOptional ? \" (optional)\" : \"\"\n lines.push(`| ${param.name}${optional} | ${type} | ${desc} |`)\n }\n }\n\n // Return value\n if (sig.type && sig.type.toString() !== \"void\") {\n lines.push(\"\")\n lines.push(\"### Returns\")\n lines.push(\"\")\n lines.push(`\\`${sig.type.toString()}\\``)\n\n if (sig.comment?.blockTags) {\n const returns = sig.comment.blockTags.find((t) => t.tag === \"@returns\")\n if (returns) {\n lines.push(\"\")\n lines.push(this.renderComment(returns.content))\n }\n }\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderProperty(prop: DeclarationReflection): string {\n const lines: string[] = []\n\n const flags: string[] = []\n if (prop.flags.isOptional) flags.push(\"optional\")\n if (prop.flags.isReadonly) flags.push(\"readonly\")\n if (prop.flags.isStatic) flags.push(\"static\")\n\n lines.push(`### ${prop.name}`)\n if (flags.length > 0) {\n lines.push(`*${flags.join(\", \")}*`)\n }\n lines.push(\"\")\n\n if (prop.type) {\n lines.push(\"```typescript\")\n lines.push(`${prop.name}: ${prop.type.toString()}`)\n lines.push(\"```\")\n lines.push(\"\")\n }\n\n if (prop.comment?.summary) {\n lines.push(this.renderComment(prop.comment.summary))\n }\n\n if (prop.defaultValue) {\n lines.push(\"\")\n lines.push(`**Default:** \\`${prop.defaultValue}\\``)\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderMethod(method: DeclarationReflection): string {\n const lines: string[] = []\n\n lines.push(`### ${method.name}()`)\n lines.push(\"\")\n\n if (method.signatures) {\n for (const sig of method.signatures) {\n if (sig.comment?.summary) {\n lines.push(this.renderComment(sig.comment.summary))\n lines.push(\"\")\n }\n\n lines.push(this.renderSignature(sig))\n lines.push(\"\")\n }\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderTypeParameters(typeParams: TypeParameterReflection[]): string {\n const lines: string[] = []\n lines.push(\"| Name | Constraint | Default | Description |\")\n lines.push(\"|------|------------|---------|-------------|\")\n\n for (const tp of typeParams) {\n const constraint = tp.type ? `\\`${tp.type.toString()}\\`` : \"-\"\n const defaultVal = tp.default ? `\\`${tp.default.toString()}\\`` : \"-\"\n const desc = tp.comment?.summary ? this.renderCommentShort(tp.comment.summary) : \"-\"\n lines.push(`| ${tp.name} | ${constraint} | ${defaultVal} | ${desc} |`)\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderHierarchy(reflection: DeclarationReflection): string | null {\n const lines: string[] = []\n\n if (reflection.extendedTypes && reflection.extendedTypes.length > 0) {\n lines.push(\"**Extends:**\")\n for (const t of reflection.extendedTypes) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n if (reflection.implementedTypes && reflection.implementedTypes.length > 0) {\n lines.push(\"**Implements:**\")\n for (const t of reflection.implementedTypes) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n if (reflection.extendedBy && reflection.extendedBy.length > 0) {\n lines.push(\"**Extended by:**\")\n for (const t of reflection.extendedBy) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n if (reflection.implementedBy && reflection.implementedBy.length > 0) {\n lines.push(\"**Implemented by:**\")\n for (const t of reflection.implementedBy) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n return lines.length > 0 ? lines.join(\"\\n\") : null\n }\n\n private renderComment(parts: { kind: string; text: string }[]): string {\n return parts.map((p) => p.text).join(\"\")\n }\n\n private renderCommentShort(parts: { kind: string; text: string }[]): string {\n const text = this.renderComment(parts)\n const firstSentence = text.split(/[.!?]\\s/)[0]\n return firstSentence.length < text.length ? firstSentence + \".\" : text\n }\n\n private generateBreadcrumbs(pagePath: string): string {\n const parts = pagePath.split(\"/\")\n const breadcrumbs: string[] = [`[API](${this.basePath})`]\n\n let currentPath = \"\"\n for (let i = 0; i < parts.length - 1; i++) {\n currentPath += (currentPath ? \"/\" : \"\") + parts[i]\n breadcrumbs.push(`[${parts[i]}](${this.basePath}/${currentPath})`)\n }\n\n breadcrumbs.push(parts[parts.length - 1])\n\n return breadcrumbs.join(\" / \")\n }\n\n private getKindName(kind: ReflectionKind): string {\n const kindNames: Partial<Record<ReflectionKind, string>> = {\n [ReflectionKind.Class]: \"Class\",\n [ReflectionKind.Interface]: \"Interface\",\n [ReflectionKind.Enum]: \"Enum\",\n [ReflectionKind.TypeAlias]: \"Type\",\n [ReflectionKind.Function]: \"Function\",\n [ReflectionKind.Variable]: \"Variable\",\n [ReflectionKind.Namespace]: \"Namespace\",\n [ReflectionKind.Module]: \"Module\",\n [ReflectionKind.Property]: \"Property\",\n [ReflectionKind.Method]: \"Method\",\n }\n return kindNames[kind] || \"Unknown\"\n }\n\n private getGroupUrlPrefix(kind: ReflectionKind): string {\n const prefixes: Partial<Record<ReflectionKind, string>> = {\n [ReflectionKind.Class]: \"classes\",\n [ReflectionKind.Interface]: \"interfaces\",\n [ReflectionKind.Enum]: \"enums\",\n [ReflectionKind.Variable]: \"variables\",\n [ReflectionKind.Namespace]: \"namespaces\",\n [ReflectionKind.Module]: \"modules\",\n }\n return prefixes[kind] || \"other\"\n }\n\n private getSlug(name: string): string {\n return name\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\")\n }\n\n /**\n * Build a route-compatible link path for a category/slug pair.\n * React Router maps \"category/index.md\" to the \"/category\" route,\n * so links must not include a trailing \"/index\".\n */\n private buildLink(category: string, slug: string): string {\n if (slug === \"index\") {\n return `${this.basePath}/${category}`\n }\n return `${this.basePath}/${category}/${slug}`\n }\n\n private getSourceUrl(fileName: string, line: number): string | null {\n if (!this.config.markdown?.sourceBaseUrl) return null\n const baseUrl = this.config.markdown.sourceBaseUrl.replace(/\\/$/, \"\")\n return `${baseUrl}/${fileName}#L${line}`\n }\n\n /**\n * Check if a function name looks like a React component (PascalCase)\n */\n private isReactComponent(name: string): boolean {\n // React components start with uppercase and don't contain underscores\n // Also check for common component patterns\n if (name[0] !== name[0].toUpperCase()) return false\n if (name.includes(\"_\")) return false\n // Exclude common non-component patterns\n if (name.startsWith(\"use\")) return false // hooks\n if (name.endsWith(\"Props\") || name.endsWith(\"Options\") || name.endsWith(\"Config\")) return false\n return true\n }\n\n /**\n * Generate a page for a React component\n */\n private generateComponentPage(\n component: DeclarationReflection,\n prev: DeclarationReflection | null,\n next: DeclarationReflection | null\n ): GeneratedApiDoc {\n const slug = this.getSlug(component.name)\n const groupPrefix = \"components\"\n const content: string[] = []\n\n content.push(`# ${component.name}`)\n content.push(\"\")\n\n // Description\n if (component.comment?.summary) {\n content.push(this.renderComment(component.comment.summary))\n content.push(\"\")\n }\n\n // Signature\n if (component.signatures) {\n content.push(\"## Usage\")\n content.push(\"\")\n for (const sig of component.signatures) {\n content.push(this.renderComponentSignature(sig, component.name))\n content.push(\"\")\n }\n }\n\n // Examples\n if (component.comment?.blockTags) {\n const examples = component.comment.blockTags.filter((t) => t.tag === \"@example\")\n if (examples.length > 0) {\n content.push(\"## Example\")\n content.push(\"\")\n for (const example of examples) {\n content.push(this.renderComment(example.content))\n content.push(\"\")\n }\n }\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && component.sources?.[0]) {\n const source = component.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n if (sourceUrl) {\n content.push(`[Source](${sourceUrl})`)\n content.push(\"\")\n }\n }\n\n // Prev/Next navigation\n if (prev || next) {\n content.push(\"---\")\n content.push(\"\")\n const prevLink = prev\n ? `[← ${prev.name}](${this.buildLink(groupPrefix, this.getSlug(prev.name))})`\n : \"\"\n const nextLink = next\n ? `[${next.name} →](${this.buildLink(groupPrefix, this.getSlug(next.name))})`\n : \"\"\n if (prev && next) {\n content.push(`${prevLink} | ${nextLink}`)\n } else {\n content.push(prevLink || nextLink)\n }\n content.push(\"\")\n }\n\n return {\n path: `${groupPrefix}/${slug}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: component.name,\n description: component.comment?.summary\n ? this.renderCommentShort(component.comment.summary)\n : `${component.name} component`,\n },\n }\n }\n\n /**\n * Get the name of a TypeDoc type (handles reference types, etc.)\n */\n private getTypeName(paramType: unknown): string | null {\n if (!paramType || typeof paramType !== \"object\") return null\n\n // Direct name property\n if (\"name\" in paramType && typeof (paramType as { name: unknown }).name === \"string\") {\n return (paramType as { name: string }).name\n }\n\n // Reference type with target\n if (\"type\" in paramType && (paramType as { type: string }).type === \"reference\") {\n const refType = paramType as { name?: string; qualifiedName?: string }\n return refType.name || refType.qualifiedName || null\n }\n\n return null\n }\n\n /**\n * Get props from a component's parameter type\n */\n private getPropsFromType(\n paramType: unknown\n ): Array<{ name: string; type: string; optional: boolean; description: string }> {\n const props: Array<{ name: string; type: string; optional: boolean; description: string }> = []\n\n // Check if it's a reflection type with inline declaration\n if (paramType && typeof paramType === \"object\" && \"declaration\" in paramType) {\n const declaration = (paramType as { declaration: DeclarationReflection }).declaration\n const children = declaration.children || []\n for (const child of children) {\n props.push({\n name: child.name,\n type: child.type ? child.type.toString() : \"unknown\",\n optional: child.flags.isOptional,\n description: child.comment?.summary ? this.renderCommentShort(child.comment.summary) : \"\",\n })\n }\n }\n // Check if it's a reference type - look up the interface in the project\n else {\n const typeName = this.getTypeName(paramType)\n if (typeName) {\n // Find the interface/type alias in the project\n let propsInterface = this.project?.getChildByName(typeName)\n\n // If not found directly, search all children\n if (!propsInterface && this.project?.children) {\n for (const child of this.project.children) {\n if (child.name === typeName) {\n propsInterface = child\n break\n }\n }\n }\n\n if (propsInterface && \"children\" in propsInterface) {\n const children = (propsInterface as DeclarationReflection).children || []\n for (const child of children) {\n props.push({\n name: child.name,\n type: child.type ? child.type.toString() : \"unknown\",\n optional: child.flags.isOptional,\n description: child.comment?.summary\n ? this.renderCommentShort(child.comment.summary)\n : \"\",\n })\n }\n }\n }\n }\n\n return props\n }\n\n /**\n * Render a component signature in a more readable format\n */\n private renderComponentSignature(sig: SignatureReflection, componentName: string): string {\n const lines: string[] = []\n\n // Get props from the first parameter\n const propsParam = sig.parameters?.[0]\n const props = propsParam ? this.getPropsFromType(propsParam.type) : []\n\n // Get the props interface name for linking\n const propsTypeName = propsParam?.type ? this.getTypeName(propsParam.type) : null\n\n // Check if component has children prop\n const hasChildren = props.some((p) => p.name === \"children\")\n // Filter out children from props display (shown in JSX structure instead)\n const displayProps = props.filter((p) => p.name !== \"children\")\n\n lines.push(\"```tsx\")\n lines.push(`<${componentName}`)\n\n if (displayProps.length > 0) {\n for (const prop of displayProps) {\n const optMark = prop.optional ? \"?\" : \"\"\n lines.push(` ${prop.name}${optMark}={${prop.type}}`)\n }\n } else if (!hasChildren) {\n lines.push(` {...props}`)\n }\n\n if (hasChildren) {\n lines.push(`>`)\n lines.push(` {children}`)\n lines.push(`</${componentName}>`)\n } else {\n lines.push(`/>`)\n }\n lines.push(\"```\")\n\n // Props table with link to props interface\n if (props.length > 0) {\n lines.push(\"\")\n if (propsTypeName) {\n lines.push(`## [Props](${this.basePath}/interfaces/${this.getSlug(propsTypeName)})`)\n } else {\n lines.push(\"## Props\")\n }\n lines.push(\"\")\n lines.push(\"| Prop | Type | Required | Description |\")\n lines.push(\"|------|------|----------|-------------|\")\n\n for (const prop of props) {\n const type = `\\`${prop.type}\\``\n const required = prop.optional ? \"No\" : \"Yes\"\n const desc = prop.description || \"-\"\n lines.push(`| ${prop.name} | ${type} | ${required} | ${desc} |`)\n }\n }\n\n // Skip return value for components - it's always Element/JSX.Element\n\n return lines.join(\"\\n\")\n }\n}\n\nexport async function generateApiDocs(\n config: TypeDocConfig,\n outputDir: string\n): Promise<GeneratedApiDoc[]> {\n const generator = new TypeDocGenerator(config)\n return generator.generate(outputDir)\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OAIK;AACP,OAAO,UAAU;AACjB,OAAO,QAAQ;AACf,SAAS,qBAAqB;AAGvB,IAAM,mBAAN,MAAuB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB,oBAAI,IAAgC;AAAA,EAE/D,YAAY,QAAuB;AACjC,SAAK,SAAS;AAAA,MACZ,KAAK;AAAA,MACL,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,MACjB,MAAM,CAAC,cAAc;AAAA,MACrB,SAAS;AAAA,QACP,OAAO;AAAA,QACP,UAAU;AAAA,QACV,WAAW;AAAA,MACb;AAAA,MACA,UAAU;AAAA,QACR,aAAa;AAAA,QACb,WAAW;AAAA,QACX,aAAa;AAAA,QACb,YAAY;AAAA,MACd;AAAA,MACA,GAAG;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841
841
  Steps,
842
842
  FileTree
843
843
  };
844
- //# sourceMappingURL=chunk-D3I3T743.js.map
844
+ //# sourceMappingURL=chunk-TDBU2FXP.js.map
@@ -327,4 +327,4 @@ export {
327
327
  TabPanel,
328
328
  TabPanels
329
329
  };
330
- //# sourceMappingURL=chunk-TUXQC2BT.js.map
330
+ //# sourceMappingURL=chunk-UWFMFHRD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/BareContent.tsx","../src/ui/Content.tsx","../src/ui/components/Icon.tsx","../src/ui/components/CopyButton.tsx","../src/ui/components/CodeBlock.tsx","../src/ui/components/Container.tsx","../src/ui/components/Tabs.tsx"],"sourcesContent":["import { createContext, useContext, type ReactNode } from \"react\"\n\nconst BareContentContext = createContext(false)\n\n/**\n * Wraps imported MDX content to render without the full Content wrapper\n * (article, header, footer, navigation). Only the content body is rendered.\n *\n * ```tsx\n * import MySnippet from \"./snippet.mdx\"\n *\n * <BareContent>\n * <MySnippet />\n * </BareContent>\n * ```\n */\nexport function BareContent({ children }: { children: ReactNode }) {\n return <BareContentContext value={true}>{children}</BareContentContext>\n}\n\nexport function useBareContent(): boolean {\n return useContext(BareContentContext)\n}\n","import { type ReactNode } from \"react\"\nimport { usePageData, useThemeConfig, useSidebar } from \"../runtime/hooks\"\nimport { getPrevNextLinks } from \"../runtime/sidebar-utils\"\nimport { Link, useLocation } from \"react-router\"\nimport { useBareContent } from \"./BareContent\"\n\ninterface ContentProps {\n children: ReactNode\n}\n\nexport function Content({ children }: ContentProps) {\n const isBare = useBareContent()\n const pageData = usePageData()\n const themeConfig = useThemeConfig()\n const sidebar = useSidebar()\n const location = useLocation()\n\n if (isBare) {\n return <div className=\"ardo-content-body ardo-content\">{children}</div>\n }\n\n const { prev, next } = getPrevNextLinks(sidebar, location.pathname)\n\n const showEditLink = pageData?.frontmatter.editLink !== false && themeConfig.editLink?.pattern\n\n const showLastUpdated =\n pageData?.frontmatter.lastUpdated !== false &&\n themeConfig.lastUpdated?.enabled &&\n pageData?.lastUpdated\n\n const editLink = showEditLink\n ? themeConfig.editLink!.pattern.replace(\":path\", pageData?.relativePath || \"\")\n : null\n\n const lastUpdatedText = showLastUpdated\n ? new Date(pageData!.lastUpdated!).toLocaleDateString(\n undefined,\n themeConfig.lastUpdated?.formatOptions ?? {\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n }\n )\n : null\n\n return (\n <article className=\"ardo-content-container\">\n {pageData?.frontmatter.title && (\n <header className=\"ardo-content-header\">\n <h1 className=\"ardo-content-title\">{pageData.frontmatter.title}</h1>\n {pageData.frontmatter.description && (\n <p className=\"ardo-content-description\">{pageData.frontmatter.description}</p>\n )}\n </header>\n )}\n\n <div className=\"ardo-content-body ardo-content\">{children}</div>\n\n <footer className=\"ardo-content-footer\">\n {(showEditLink || showLastUpdated) && (\n <div className=\"ardo-content-meta\">\n {showEditLink && (\n <a\n href={editLink!}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"ardo-edit-link\"\n >\n {themeConfig.editLink?.text ?? \"Edit this page\"}\n </a>\n )}\n {showLastUpdated && (\n <span className=\"ardo-last-updated\">\n {themeConfig.lastUpdated?.text ?? \"Last updated\"}: {lastUpdatedText}\n </span>\n )}\n </div>\n )}\n\n {(prev || next) && (\n <nav className=\"ardo-prev-next\" aria-label=\"Page navigation\">\n {prev ? (\n <Link to={prev.link!} className=\"ardo-prev-link\">\n <span className=\"ardo-prev-next-label\">Previous</span>\n <span className=\"ardo-prev-next-title\">{prev.text}</span>\n </Link>\n ) : (\n <div />\n )}\n {next ? (\n <Link to={next.link!} className=\"ardo-next-link\">\n <span className=\"ardo-prev-next-label\">Next</span>\n <span className=\"ardo-prev-next-title\">{next.text}</span>\n </Link>\n ) : (\n <div />\n )}\n </nav>\n )}\n </footer>\n </article>\n )\n}\n","import type { ComponentType, SVGAttributes, ReactNode } from \"react\"\n\ntype IconComponent = ComponentType<SVGAttributes<SVGSVGElement> & { size?: number }>\n\nexport interface IconProps extends SVGAttributes<SVGSVGElement> {\n /** Name of the registered icon */\n name: string\n /** Icon size */\n size?: number\n}\n\n// Icon registry - users register only the icons they need\nconst iconRegistry = new Map<string, IconComponent>()\n\n/**\n * Register icons for use with the Icon component.\n * Only registered icons are included in your bundle.\n *\n * @example\n * ```tsx\n * // In your app's entry point or layout:\n * import { registerIcons } from \"ardo/ui\"\n * import { Zap, Rocket, Code } from \"lucide-react\"\n *\n * registerIcons({ Zap, Rocket, Code })\n * ```\n */\nexport function registerIcons(icons: Record<string, IconComponent>): void {\n for (const [name, icon] of Object.entries(icons)) {\n iconRegistry.set(name, icon)\n }\n}\n\n/**\n * Get all registered icon names (useful for documentation).\n */\nexport function getRegisteredIconNames(): string[] {\n return Array.from(iconRegistry.keys())\n}\n\n/**\n * Renders a registered icon by name.\n * Icons must be registered first using `registerIcons()`.\n *\n * @example\n * ```tsx\n * // First register icons in your app:\n * import { registerIcons } from \"ardo/ui\"\n * import { Zap, Rocket } from \"lucide-react\"\n * registerIcons({ Zap, Rocket })\n *\n * // Then use in MDX:\n * <Icon name=\"Zap\" size={24} />\n * <Icon name=\"Rocket\" className=\"text-brand\" />\n * ```\n *\n * @see https://lucide.dev/icons for available icon names\n */\nexport function Icon({ name, ...props }: IconProps): ReactNode {\n const IconComp = iconRegistry.get(name)\n\n if (!IconComp) {\n console.warn(`[Ardo] Icon \"${name}\" not found. Did you register it with registerIcons()?`)\n return null\n }\n\n return <IconComp {...props} />\n}\n","import { useState } from \"react\"\nimport { CopyIcon, CheckIcon } from \"../icons\"\n\ninterface CopyButtonProps {\n code: string\n}\n\nexport function CopyButton({ code }: CopyButtonProps) {\n const [copied, setCopied] = useState(false)\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(code)\n setCopied(true)\n setTimeout(() => setCopied(false), 2000)\n } catch (err) {\n console.error(\"Failed to copy:\", err)\n }\n }\n\n return (\n <button\n className=\"ardo-copy-button\"\n onClick={handleCopy}\n aria-label={copied ? \"Copied!\" : \"Copy code\"}\n >\n {copied ? <CheckIcon size={16} /> : <CopyIcon size={16} />}\n <span className=\"ardo-copy-text\">{copied ? \"Copied!\" : \"Copy\"}</span>\n </button>\n )\n}\n","import { useState, Children, isValidElement } from \"react\"\nimport { CopyButton } from \"./CopyButton\"\n\n/**\n * Strips leading/trailing blank lines and removes common leading whitespace\n * so that template literals in indented JSX render cleanly.\n */\nfunction outdent(text: string): string {\n // Remove leading/trailing blank lines\n const trimmed = text.replace(/^\\n+/, \"\").replace(/\\n\\s*$/, \"\")\n const lines = trimmed.split(\"\\n\")\n\n // Find minimum indentation (ignoring empty lines)\n const indent = lines.reduce((min, line) => {\n if (line.trim().length === 0) return min\n const match = line.match(/^(\\s*)/)\n return match ? Math.min(min, match[1].length) : min\n }, Infinity)\n\n if (indent === 0 || indent === Infinity) return trimmed\n return lines.map((line) => line.slice(indent)).join(\"\\n\")\n}\n\nexport interface CodeBlockProps {\n /** The code to display (as prop or as children string) */\n code?: string\n /** Programming language for syntax highlighting */\n language?: string\n /** Optional title shown above the code */\n title?: string\n /** Show line numbers */\n lineNumbers?: boolean\n /** Line numbers to highlight */\n highlightLines?: number[]\n /** Code as children — supports template literals with auto-outdent */\n children?: React.ReactNode\n /** Pre-rendered Shiki HTML (injected by ardo:codeblock-highlight plugin) */\n __html?: string\n}\n\n/**\n * Syntax-highlighted code block with copy button.\n *\n * Code can be provided via the `code` prop or as children:\n * ```tsx\n * <CodeBlock language=\"typescript\">{`\n * const x = 42\n * `}</CodeBlock>\n * ```\n * When children is a string, leading/trailing blank lines and common\n * indentation are stripped automatically.\n */\nexport function CodeBlock({\n code: codeProp,\n language = \"text\",\n title,\n lineNumbers = false,\n highlightLines = [],\n children,\n __html,\n}: CodeBlockProps) {\n const code = codeProp ?? (typeof children === \"string\" ? outdent(children) : \"\")\n const hasCustomChildren = children != null && typeof children !== \"string\"\n const lines = code.split(\"\\n\")\n\n let content: React.ReactNode\n if (__html) {\n content = <div dangerouslySetInnerHTML={{ __html }} />\n } else if (hasCustomChildren) {\n content = <>{children}</>\n } else {\n content = (\n <pre className={`language-${language}`}>\n <code>\n {lines.map((line, index) => {\n const lineNum = index + 1\n const isHighlighted = highlightLines.includes(lineNum)\n const classes = [\"ardo-code-line\"]\n if (isHighlighted) classes.push(\"highlighted\")\n\n return (\n <span key={index} className={classes.join(\" \")}>\n {lineNumbers && <span className=\"ardo-line-number\">{lineNum}</span>}\n <span className=\"ardo-line-content\">{line}</span>\n {index < lines.length - 1 && \"\\n\"}\n </span>\n )\n })}\n </code>\n </pre>\n )\n }\n\n return (\n <div className=\"ardo-code-block\" data-lang={language}>\n {title && <div className=\"ardo-code-title\">{title}</div>}\n <div className=\"ardo-code-wrapper\">\n {content}\n <CopyButton code={code} />\n </div>\n </div>\n )\n}\n\nexport interface CodeGroupProps {\n /** CodeBlock components to display as tabs */\n children: React.ReactNode\n /** Comma-separated tab labels */\n labels?: string\n}\n\n/**\n * Tabbed group of code blocks.\n * Labels come from the `labels` prop (set at remark level) or fall back to\n * data-label / title / language props on children.\n */\nexport function CodeGroup({ children, labels: labelsStr }: CodeGroupProps) {\n const [activeTab, setActiveTab] = useState(0)\n\n // Filter to only valid React elements (skip whitespace text nodes)\n const childArray = Children.toArray(children).filter(isValidElement)\n const labelArray = labelsStr ? labelsStr.split(\",\") : []\n const tabs = childArray.map((child, index) => {\n if (labelArray[index]) return labelArray[index]\n const props = child.props as Record<string, unknown>\n return (\n (props[\"data-label\"] as string) ||\n (props.title as string) ||\n (props.language as string) ||\n `Tab ${index + 1}`\n )\n })\n\n return (\n <div className=\"ardo-code-group\">\n <div className=\"ardo-code-group-tabs\">\n {tabs.map((tab, index) => (\n <button\n key={index}\n className={[\"ardo-code-group-tab\", index === activeTab && \"active\"]\n .filter(Boolean)\n .join(\" \")}\n onClick={() => setActiveTab(index)}\n >\n {tab}\n </button>\n ))}\n </div>\n <div className=\"ardo-code-group-panels\">\n {childArray.map((child, index) => (\n <div\n key={index}\n className={[\"ardo-code-group-panel\", index === activeTab && \"active\"]\n .filter(Boolean)\n .join(\" \")}\n style={{ display: index === activeTab ? \"block\" : \"none\" }}\n >\n {child}\n </div>\n ))}\n </div>\n </div>\n )\n}\n","import { type ReactNode } from \"react\"\nimport { LightbulbIcon, AlertTriangleIcon, XCircleIcon, InfoIcon, FileTextIcon } from \"../icons\"\n\nexport type ContainerType = \"tip\" | \"warning\" | \"danger\" | \"info\" | \"note\"\n\nexport interface ContainerProps {\n /** Container type determining the style */\n type: ContainerType\n /** Optional custom title */\n title?: string\n /** Content to display inside the container */\n children: ReactNode\n}\n\nconst defaultTitles: Record<ContainerType, string> = {\n tip: \"TIP\",\n warning: \"WARNING\",\n danger: \"DANGER\",\n info: \"INFO\",\n note: \"NOTE\",\n}\n\nconst icons: Record<ContainerType, ReactNode> = {\n tip: <LightbulbIcon size={18} />,\n warning: <AlertTriangleIcon size={18} />,\n danger: <XCircleIcon size={18} />,\n info: <InfoIcon size={18} />,\n note: <FileTextIcon size={18} />,\n}\n\n/**\n * A styled container for callouts, tips, warnings, etc.\n */\nexport function Container({ type, title, children }: ContainerProps) {\n const displayTitle = title || defaultTitles[type]\n\n return (\n <div className={`ardo-container ardo-container-${type}`}>\n <p className=\"ardo-container-title\">\n <span className=\"ardo-container-icon\">{icons[type]}</span>\n {displayTitle}\n </p>\n <div className=\"ardo-container-content\">{children}</div>\n </div>\n )\n}\n\nexport interface TipProps {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * A tip container for helpful information.\n */\nexport function Tip({ title, children }: TipProps) {\n return (\n <Container type=\"tip\" title={title}>\n {children}\n </Container>\n )\n}\n\nexport interface WarningProps {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * A warning container for cautionary information.\n */\nexport function Warning({ title, children }: WarningProps) {\n return (\n <Container type=\"warning\" title={title}>\n {children}\n </Container>\n )\n}\n\nexport interface DangerProps {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * A danger container for critical warnings.\n */\nexport function Danger({ title, children }: DangerProps) {\n return (\n <Container type=\"danger\" title={title}>\n {children}\n </Container>\n )\n}\n\nexport interface InfoProps {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * An info container for informational content.\n */\nexport function Info({ title, children }: InfoProps) {\n return (\n <Container type=\"info\" title={title}>\n {children}\n </Container>\n )\n}\n\nexport interface NoteProps {\n /** Optional custom title */\n title?: string\n /** Content to display */\n children: ReactNode\n}\n\n/**\n * A note container for additional information.\n */\nexport function Note({ title, children }: NoteProps) {\n return (\n <Container type=\"note\" title={title}>\n {children}\n </Container>\n )\n}\n","import { useState, createContext, useContext, type ReactNode } from \"react\"\n\ninterface TabsContextValue {\n activeTab: string\n setActiveTab: (tab: string) => void\n}\n\nconst TabsContext = createContext<TabsContextValue | null>(null)\n\nfunction useTabsContext() {\n const context = useContext(TabsContext)\n if (!context) {\n throw new Error(\"Tab components must be used within a Tabs component\")\n }\n return context\n}\n\nexport interface TabsProps {\n /** Default active tab value */\n defaultValue?: string\n /** Tab components (TabList and TabPanels) */\n children: ReactNode\n}\n\n/**\n * Tabs container component for organizing content into tabbed panels.\n */\nexport function Tabs({ defaultValue, children }: TabsProps) {\n const [activeTab, setActiveTab] = useState(defaultValue || \"\")\n\n return (\n <TabsContext.Provider value={{ activeTab, setActiveTab }}>\n <div className=\"ardo-tabs\">{children}</div>\n </TabsContext.Provider>\n )\n}\n\nexport interface TabListProps {\n /** Tab buttons */\n children: ReactNode\n}\n\n/**\n * Container for Tab buttons.\n */\nexport function TabList({ children }: TabListProps) {\n return (\n <div className=\"ardo-tab-list\" role=\"tablist\">\n {children}\n </div>\n )\n}\n\nexport interface TabProps {\n /** Unique value identifying this tab */\n value: string\n /** Tab button label */\n children: ReactNode\n}\n\n/**\n * Individual tab button.\n */\nexport function Tab({ value, children }: TabProps) {\n const { activeTab, setActiveTab } = useTabsContext()\n const isActive = activeTab === value\n\n return (\n <button\n role=\"tab\"\n aria-selected={isActive}\n className={[\"ardo-tab\", isActive && \"active\"].filter(Boolean).join(\" \")}\n onClick={() => setActiveTab(value)}\n >\n {children}\n </button>\n )\n}\n\nexport interface TabPanelProps {\n /** Value matching the corresponding Tab */\n value: string\n /** Panel content */\n children: ReactNode\n}\n\n/**\n * Content panel for a tab.\n */\nexport function TabPanel({ value, children }: TabPanelProps) {\n const { activeTab } = useTabsContext()\n const isActive = activeTab === value\n\n if (!isActive) {\n return null\n }\n\n return (\n <div role=\"tabpanel\" className=\"ardo-tab-panel\">\n {children}\n </div>\n )\n}\n\nexport interface TabPanelsProps {\n /** TabPanel components */\n children: ReactNode\n}\n\n/**\n * Container for TabPanel components.\n */\nexport function TabPanels({ children }: TabPanelsProps) {\n return <div className=\"ardo-tab-panels\">{children}</div>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAe,kBAAkC;AAiBjD;AAfT,IAAM,qBAAqB,cAAc,KAAK;AAcvC,SAAS,YAAY,EAAE,SAAS,GAA4B;AACjE,SAAO,oBAAC,sBAAmB,OAAO,MAAO,UAAS;AACpD;AAEO,SAAS,iBAA0B;AACxC,SAAO,WAAW,kBAAkB;AACtC;;;ACnBA,SAAS,MAAM,mBAAmB;AAevB,gBAAAA,MA8BH,YA9BG;AARJ,SAAS,QAAQ,EAAE,SAAS,GAAiB;AAClD,QAAM,SAAS,eAAe;AAC9B,QAAM,WAAW,YAAY;AAC7B,QAAM,cAAc,eAAe;AACnC,QAAM,UAAU,WAAW;AAC3B,QAAM,WAAW,YAAY;AAE7B,MAAI,QAAQ;AACV,WAAO,gBAAAA,KAAC,SAAI,WAAU,kCAAkC,UAAS;AAAA,EACnE;AAEA,QAAM,EAAE,MAAM,KAAK,IAAI,iBAAiB,SAAS,SAAS,QAAQ;AAElE,QAAM,eAAe,UAAU,YAAY,aAAa,SAAS,YAAY,UAAU;AAEvF,QAAM,kBACJ,UAAU,YAAY,gBAAgB,SACtC,YAAY,aAAa,WACzB,UAAU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