ardo 1.2.2 → 2.0.0
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/README.md +29 -47
- package/dist/{CopyButton-BkACwxQM.d.ts → Features-C_06EvGb.d.ts} +212 -10
- package/dist/{chunk-SZVJKB3V.js → chunk-G5L4ZUTS.js} +40 -40
- package/dist/chunk-G5L4ZUTS.js.map +1 -0
- package/dist/{chunk-VMA2OXSY.js → chunk-LUOUBO3L.js} +587 -669
- package/dist/chunk-LUOUBO3L.js.map +1 -0
- package/dist/{chunk-3U63LMDZ.js → chunk-N5CEHG2F.js} +3 -3
- package/dist/{chunk-3U63LMDZ.js.map → chunk-N5CEHG2F.js.map} +1 -1
- package/dist/chunk-OTUACKCQ.js +896 -0
- package/dist/chunk-OTUACKCQ.js.map +1 -0
- package/dist/chunk-UWAVET45.js +311 -0
- package/dist/chunk-UWAVET45.js.map +1 -0
- package/dist/chunk-ZXPAEM3M.js +854 -0
- package/dist/chunk-ZXPAEM3M.js.map +1 -0
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +1 -1
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +3 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +34 -26
- package/dist/mdx/provider.d.ts +9 -0
- package/dist/mdx/provider.js +114 -0
- package/dist/mdx/provider.js.map +1 -0
- package/dist/runtime/index.d.ts +1 -1
- package/dist/typedoc/index.d.ts +25 -0
- package/dist/typedoc/index.js +2 -2
- package/dist/{types-C22M-Kor.d.ts → types-DchPWkJl.d.ts} +1 -1
- package/dist/ui/index.d.ts +116 -0
- package/dist/{theme → ui}/index.js +26 -12
- package/dist/ui/styles.css +2198 -0
- package/dist/vite/index.d.ts +13 -23
- package/dist/vite/index.js +5 -5
- package/package.json +23 -11
- package/dist/chunk-2JBVPO6S.js +0 -1144
- package/dist/chunk-2JBVPO6S.js.map +0 -1
- package/dist/chunk-SZVJKB3V.js.map +0 -1
- package/dist/chunk-VMA2OXSY.js.map +0 -1
- package/dist/chunk-YN6PP526.js +0 -441
- package/dist/chunk-YN6PP526.js.map +0 -1
- package/dist/theme/index.d.ts +0 -70
- package/dist/theme/styles.css +0 -1454
- /package/dist/{theme → ui}/index.js.map +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ardo
|
|
2
2
|
|
|
3
|
-
React-first Static Documentation Framework built on
|
|
3
|
+
React-first Static Documentation Framework built on React Router 7.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
@@ -16,59 +16,42 @@ pnpm dev
|
|
|
16
16
|
## Manual Installation
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
pnpm add ardo
|
|
20
|
-
pnpm add -D typescript vite
|
|
19
|
+
pnpm add ardo react react-dom react-router
|
|
20
|
+
pnpm add -D typescript vite
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
25
|
-
### Configuration
|
|
25
|
+
### Vite Configuration
|
|
26
26
|
|
|
27
|
-
Create a `
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
import { defineConfig } from "ardo/config"
|
|
31
|
-
|
|
32
|
-
export default defineConfig({
|
|
33
|
-
title: "My Documentation",
|
|
34
|
-
description: "Built with Ardo",
|
|
35
|
-
|
|
36
|
-
themeConfig: {
|
|
37
|
-
nav: [{ text: "Guide", link: "/guide/getting-started" }],
|
|
38
|
-
sidebar: [
|
|
39
|
-
{
|
|
40
|
-
text: "Guide",
|
|
41
|
-
items: [{ text: "Getting Started", link: "/guide/getting-started" }],
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
})
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Vite Plugin
|
|
49
|
-
|
|
50
|
-
Add the plugin to your `vite.config.ts`:
|
|
27
|
+
Create a `vite.config.ts` with your Ardo configuration:
|
|
51
28
|
|
|
52
29
|
```typescript
|
|
53
30
|
import { defineConfig } from "vite"
|
|
54
|
-
import {
|
|
55
|
-
import react from "@vitejs/plugin-react"
|
|
56
|
-
import { ardoPlugin } from "ardo/vite"
|
|
31
|
+
import { ardo } from "ardo/vite"
|
|
57
32
|
|
|
58
33
|
export default defineConfig({
|
|
59
34
|
plugins: [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
35
|
+
ardo({
|
|
36
|
+
title: "My Documentation",
|
|
37
|
+
description: "Built with Ardo",
|
|
38
|
+
|
|
39
|
+
themeConfig: {
|
|
40
|
+
nav: [{ text: "Guide", link: "/guide/getting-started" }],
|
|
41
|
+
sidebar: [
|
|
42
|
+
{
|
|
43
|
+
text: "Guide",
|
|
44
|
+
items: [{ text: "Getting Started", link: "/guide/getting-started" }],
|
|
45
|
+
},
|
|
46
|
+
],
|
|
64
47
|
},
|
|
65
48
|
}),
|
|
66
|
-
react(),
|
|
67
|
-
ardoPlugin(),
|
|
68
49
|
],
|
|
69
50
|
})
|
|
70
51
|
```
|
|
71
52
|
|
|
53
|
+
The `ardo()` plugin includes React Router, MDX processing, and all necessary configuration.
|
|
54
|
+
|
|
72
55
|
### Runtime Hooks
|
|
73
56
|
|
|
74
57
|
Access configuration and page data in your components:
|
|
@@ -91,26 +74,25 @@ function MyComponent() {
|
|
|
91
74
|
Use pre-built components for your documentation:
|
|
92
75
|
|
|
93
76
|
```tsx
|
|
94
|
-
import {
|
|
77
|
+
import { Layout, Header, Sidebar, Footer } from "ardo/ui"
|
|
95
78
|
|
|
96
79
|
function App() {
|
|
97
80
|
return (
|
|
98
|
-
<
|
|
81
|
+
<Layout header={<Header />} sidebar={<Sidebar />} footer={<Footer />}>
|
|
99
82
|
<YourContent />
|
|
100
|
-
</
|
|
83
|
+
</Layout>
|
|
101
84
|
)
|
|
102
85
|
}
|
|
103
86
|
```
|
|
104
87
|
|
|
105
88
|
## Exports
|
|
106
89
|
|
|
107
|
-
| Export
|
|
108
|
-
|
|
|
109
|
-
| `ardo/
|
|
110
|
-
| `ardo/
|
|
111
|
-
| `ardo/
|
|
112
|
-
| `ardo/
|
|
113
|
-
| `ardo/theme/styles.css` | Default theme styles |
|
|
90
|
+
| Export | Description |
|
|
91
|
+
| -------------------- | ------------------------- |
|
|
92
|
+
| `ardo/vite` | Vite plugin (`ardo`) |
|
|
93
|
+
| `ardo/runtime` | React hooks and providers |
|
|
94
|
+
| `ardo/ui` | Pre-built UI components |
|
|
95
|
+
| `ardo/ui/styles.css` | Default theme styles |
|
|
114
96
|
|
|
115
97
|
## Documentation
|
|
116
98
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
2
|
+
import { ReactNode, ComponentProps } from 'react';
|
|
3
|
+
import { NavLink, Link } from 'react-router';
|
|
4
|
+
import { S as SidebarItem } from './types-DchPWkJl.js';
|
|
4
5
|
|
|
5
6
|
interface LayoutProps {
|
|
6
7
|
/** Header content */
|
|
@@ -90,6 +91,8 @@ interface SocialLinkProps {
|
|
|
90
91
|
*/
|
|
91
92
|
declare function SocialLink({ href, icon, ariaLabel, className }: SocialLinkProps): react_jsx_runtime.JSX.Element;
|
|
92
93
|
|
|
94
|
+
/** Route path type - uses React Router's NavLink 'to' prop type for type-safe routes */
|
|
95
|
+
type RoutePath$1 = ComponentProps<typeof NavLink>["to"];
|
|
93
96
|
interface SidebarProps {
|
|
94
97
|
/** Sidebar items (for data-driven approach) */
|
|
95
98
|
items?: SidebarItem[];
|
|
@@ -156,8 +159,8 @@ interface SidebarGroupProps {
|
|
|
156
159
|
*/
|
|
157
160
|
declare function SidebarGroup({ title, to, collapsed: initialCollapsed, collapsible, children, className, }: SidebarGroupProps): react_jsx_runtime.JSX.Element;
|
|
158
161
|
interface SidebarLinkProps {
|
|
159
|
-
/** Internal route path */
|
|
160
|
-
to:
|
|
162
|
+
/** Internal route path (type-safe with React Router's registered routes) */
|
|
163
|
+
to: RoutePath$1;
|
|
161
164
|
/** Link text */
|
|
162
165
|
children: ReactNode;
|
|
163
166
|
/** Additional CSS classes */
|
|
@@ -277,54 +280,141 @@ declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
|
277
280
|
declare function Search(): react_jsx_runtime.JSX.Element;
|
|
278
281
|
|
|
279
282
|
interface CodeBlockProps {
|
|
283
|
+
/** The code to display */
|
|
280
284
|
code: string;
|
|
285
|
+
/** Programming language for syntax highlighting */
|
|
281
286
|
language?: string;
|
|
287
|
+
/** Optional title shown above the code */
|
|
282
288
|
title?: string;
|
|
289
|
+
/** Show line numbers */
|
|
283
290
|
lineNumbers?: boolean;
|
|
291
|
+
/** Line numbers to highlight */
|
|
284
292
|
highlightLines?: number[];
|
|
293
|
+
/** Optional custom content to render instead of the code */
|
|
285
294
|
children?: React.ReactNode;
|
|
286
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
* Syntax-highlighted code block with copy button.
|
|
298
|
+
*/
|
|
287
299
|
declare function CodeBlock({ code, language, title, lineNumbers, highlightLines, children, }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
288
300
|
interface CodeGroupProps {
|
|
301
|
+
/** CodeBlock components to display as tabs */
|
|
289
302
|
children: React.ReactNode;
|
|
290
303
|
}
|
|
304
|
+
/**
|
|
305
|
+
* Tabbed group of code blocks.
|
|
306
|
+
*/
|
|
291
307
|
declare function CodeGroup({ children }: CodeGroupProps): react_jsx_runtime.JSX.Element;
|
|
292
308
|
|
|
293
309
|
type ContainerType = "tip" | "warning" | "danger" | "info" | "note";
|
|
294
310
|
interface ContainerProps {
|
|
311
|
+
/** Container type determining the style */
|
|
295
312
|
type: ContainerType;
|
|
313
|
+
/** Optional custom title */
|
|
296
314
|
title?: string;
|
|
315
|
+
/** Content to display inside the container */
|
|
297
316
|
children: ReactNode;
|
|
298
317
|
}
|
|
318
|
+
/**
|
|
319
|
+
* A styled container for callouts, tips, warnings, etc.
|
|
320
|
+
*/
|
|
299
321
|
declare function Container({ type, title, children }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
322
|
+
interface TipProps {
|
|
323
|
+
/** Optional custom title */
|
|
324
|
+
title?: string;
|
|
325
|
+
/** Content to display */
|
|
326
|
+
children: ReactNode;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* A tip container for helpful information.
|
|
330
|
+
*/
|
|
331
|
+
declare function Tip({ title, children }: TipProps): react_jsx_runtime.JSX.Element;
|
|
332
|
+
interface WarningProps {
|
|
333
|
+
/** Optional custom title */
|
|
334
|
+
title?: string;
|
|
335
|
+
/** Content to display */
|
|
336
|
+
children: ReactNode;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* A warning container for cautionary information.
|
|
340
|
+
*/
|
|
341
|
+
declare function Warning({ title, children }: WarningProps): react_jsx_runtime.JSX.Element;
|
|
342
|
+
interface DangerProps {
|
|
343
|
+
/** Optional custom title */
|
|
344
|
+
title?: string;
|
|
345
|
+
/** Content to display */
|
|
346
|
+
children: ReactNode;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* A danger container for critical warnings.
|
|
350
|
+
*/
|
|
351
|
+
declare function Danger({ title, children }: DangerProps): react_jsx_runtime.JSX.Element;
|
|
352
|
+
interface InfoProps {
|
|
353
|
+
/** Optional custom title */
|
|
354
|
+
title?: string;
|
|
355
|
+
/** Content to display */
|
|
356
|
+
children: ReactNode;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* An info container for informational content.
|
|
360
|
+
*/
|
|
361
|
+
declare function Info({ title, children }: InfoProps): react_jsx_runtime.JSX.Element;
|
|
362
|
+
interface NoteProps {
|
|
363
|
+
/** Optional custom title */
|
|
364
|
+
title?: string;
|
|
365
|
+
/** Content to display */
|
|
366
|
+
children: ReactNode;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* A note container for additional information.
|
|
370
|
+
*/
|
|
371
|
+
declare function Note({ title, children }: NoteProps): react_jsx_runtime.JSX.Element;
|
|
305
372
|
|
|
306
373
|
interface TabsProps {
|
|
374
|
+
/** Default active tab value */
|
|
307
375
|
defaultValue?: string;
|
|
376
|
+
/** Tab components (TabList and TabPanels) */
|
|
308
377
|
children: ReactNode;
|
|
309
378
|
}
|
|
379
|
+
/**
|
|
380
|
+
* Tabs container component for organizing content into tabbed panels.
|
|
381
|
+
*/
|
|
310
382
|
declare function Tabs({ defaultValue, children }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
311
383
|
interface TabListProps {
|
|
384
|
+
/** Tab buttons */
|
|
312
385
|
children: ReactNode;
|
|
313
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* Container for Tab buttons.
|
|
389
|
+
*/
|
|
314
390
|
declare function TabList({ children }: TabListProps): react_jsx_runtime.JSX.Element;
|
|
315
391
|
interface TabProps {
|
|
392
|
+
/** Unique value identifying this tab */
|
|
316
393
|
value: string;
|
|
394
|
+
/** Tab button label */
|
|
317
395
|
children: ReactNode;
|
|
318
396
|
}
|
|
397
|
+
/**
|
|
398
|
+
* Individual tab button.
|
|
399
|
+
*/
|
|
319
400
|
declare function Tab({ value, children }: TabProps): react_jsx_runtime.JSX.Element;
|
|
320
401
|
interface TabPanelProps {
|
|
402
|
+
/** Value matching the corresponding Tab */
|
|
321
403
|
value: string;
|
|
404
|
+
/** Panel content */
|
|
322
405
|
children: ReactNode;
|
|
323
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* Content panel for a tab.
|
|
409
|
+
*/
|
|
324
410
|
declare function TabPanel({ value, children }: TabPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
325
411
|
interface TabPanelsProps {
|
|
412
|
+
/** TabPanel components */
|
|
326
413
|
children: ReactNode;
|
|
327
414
|
}
|
|
415
|
+
/**
|
|
416
|
+
* Container for TabPanel components.
|
|
417
|
+
*/
|
|
328
418
|
declare function TabPanels({ children }: TabPanelsProps): react_jsx_runtime.JSX.Element;
|
|
329
419
|
|
|
330
420
|
interface CopyButtonProps {
|
|
@@ -332,4 +422,116 @@ interface CopyButtonProps {
|
|
|
332
422
|
}
|
|
333
423
|
declare function CopyButton({ code }: CopyButtonProps): react_jsx_runtime.JSX.Element;
|
|
334
424
|
|
|
335
|
-
|
|
425
|
+
/** Internal route path from React Router */
|
|
426
|
+
type RoutePath = ComponentProps<typeof Link>["to"];
|
|
427
|
+
/** External URL starting with http:// or https:// */
|
|
428
|
+
type ExternalUrl = `http://${string}` | `https://${string}`;
|
|
429
|
+
interface HeroAction {
|
|
430
|
+
/** Button text */
|
|
431
|
+
text: string;
|
|
432
|
+
/** Link destination - internal route path or external URL */
|
|
433
|
+
link: RoutePath | ExternalUrl;
|
|
434
|
+
/** Visual theme: "brand" for primary, "alt" for secondary */
|
|
435
|
+
theme?: "brand" | "alt";
|
|
436
|
+
}
|
|
437
|
+
interface HeroImage {
|
|
438
|
+
/** Image for light mode */
|
|
439
|
+
light: string;
|
|
440
|
+
/** Image for dark mode */
|
|
441
|
+
dark?: string;
|
|
442
|
+
/** Alt text for the image */
|
|
443
|
+
alt?: string;
|
|
444
|
+
}
|
|
445
|
+
interface HeroProps {
|
|
446
|
+
/** Large title displayed prominently */
|
|
447
|
+
name?: string;
|
|
448
|
+
/** Secondary text below the name */
|
|
449
|
+
text?: string;
|
|
450
|
+
/** Descriptive tagline */
|
|
451
|
+
tagline?: string;
|
|
452
|
+
/** Hero image - can be a string URL or an object with light/dark variants */
|
|
453
|
+
image?: string | HeroImage;
|
|
454
|
+
/** Call-to-action buttons */
|
|
455
|
+
actions?: HeroAction[];
|
|
456
|
+
/** Additional CSS class */
|
|
457
|
+
className?: string;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Hero section component for landing pages.
|
|
461
|
+
*
|
|
462
|
+
* @example
|
|
463
|
+
* ```tsx
|
|
464
|
+
* <Hero
|
|
465
|
+
* name="Ardo"
|
|
466
|
+
* text="React-first Documentation"
|
|
467
|
+
* tagline="Build beautiful documentation sites with React."
|
|
468
|
+
* image="/logo.svg"
|
|
469
|
+
* actions={[
|
|
470
|
+
* { text: "Get Started", link: "/guide/getting-started", theme: "brand" },
|
|
471
|
+
* { text: "GitHub", link: "https://github.com/...", theme: "alt" }
|
|
472
|
+
* ]}
|
|
473
|
+
* />
|
|
474
|
+
* ```
|
|
475
|
+
*/
|
|
476
|
+
declare function Hero({ name, text, tagline, image, actions, className }: HeroProps): react_jsx_runtime.JSX.Element;
|
|
477
|
+
|
|
478
|
+
interface FeatureItem {
|
|
479
|
+
/** Feature title */
|
|
480
|
+
title: string;
|
|
481
|
+
/** Icon as ReactNode (emoji, Lucide icon component, or any JSX) */
|
|
482
|
+
icon?: ReactNode;
|
|
483
|
+
/** Feature description */
|
|
484
|
+
details: string;
|
|
485
|
+
/** Optional link */
|
|
486
|
+
link?: string;
|
|
487
|
+
/** Link text (defaults to "Learn more") */
|
|
488
|
+
linkText?: string;
|
|
489
|
+
}
|
|
490
|
+
interface FeaturesProps {
|
|
491
|
+
/** Array of feature items to display */
|
|
492
|
+
items: FeatureItem[];
|
|
493
|
+
/** Section title */
|
|
494
|
+
title?: string;
|
|
495
|
+
/** Section subtitle */
|
|
496
|
+
subtitle?: string;
|
|
497
|
+
/** Additional CSS class */
|
|
498
|
+
className?: string;
|
|
499
|
+
}
|
|
500
|
+
interface FeatureCardProps extends FeatureItem {
|
|
501
|
+
/** Additional CSS class */
|
|
502
|
+
className?: string;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Individual feature card component.
|
|
506
|
+
*
|
|
507
|
+
* @example
|
|
508
|
+
* ```tsx
|
|
509
|
+
* import { Zap } from "lucide-react"
|
|
510
|
+
*
|
|
511
|
+
* // Using emoji
|
|
512
|
+
* <FeatureCard title="Fast" icon="⚡" details="Lightning fast." />
|
|
513
|
+
*
|
|
514
|
+
* // Using Lucide icon (tree-shakeable)
|
|
515
|
+
* <FeatureCard title="Fast" icon={<Zap size={28} />} details="Lightning fast." />
|
|
516
|
+
* ```
|
|
517
|
+
*/
|
|
518
|
+
declare function FeatureCard({ title, icon, details, link, linkText, className }: FeatureCardProps): react_jsx_runtime.JSX.Element;
|
|
519
|
+
/**
|
|
520
|
+
* Features grid component for displaying multiple feature cards.
|
|
521
|
+
*
|
|
522
|
+
* @example
|
|
523
|
+
* ```tsx
|
|
524
|
+
* <Features
|
|
525
|
+
* title="Key Features"
|
|
526
|
+
* subtitle="Everything you need to build great docs"
|
|
527
|
+
* items={[
|
|
528
|
+
* { title: "React-First", icon: "⚛️", details: "Built on React." },
|
|
529
|
+
* { title: "Fast", icon: "⚡", details: "Powered by Vite." },
|
|
530
|
+
* { title: "Type-Safe", icon: "📝", details: "Full TypeScript support." },
|
|
531
|
+
* ]}
|
|
532
|
+
* />
|
|
533
|
+
* ```
|
|
534
|
+
*/
|
|
535
|
+
declare function Features({ items, title, subtitle, className }: FeaturesProps): react_jsx_runtime.JSX.Element | null;
|
|
536
|
+
|
|
537
|
+
export { type LayoutProps as $, type TabListProps as A, TabPanel as B, CodeBlock as C, Danger as D, type TabPanelProps as E, FeatureCard as F, TabPanels as G, Header as H, Info as I, type TabPanelsProps as J, type TabProps as K, Layout as L, Tabs as M, Note as N, type TabsProps as O, ThemeToggle as P, Tip as Q, type TipProps as R, Search as S, TOC as T, type WarningProps as U, DocContent as V, Warning as W, type FooterCopyrightProps as X, type FooterMessageProps as Y, type FooterProps as Z, type HeaderProps as _, type CodeBlockProps as a, SidebarGroup as a0, type SidebarGroupProps as a1, SidebarLink as a2, type SidebarLinkProps as a3, type SidebarProps as a4, SocialLink as a5, type SocialLinkProps as a6, CodeGroup as b, type CodeGroupProps as c, Container as d, type ContainerProps as e, type ContainerType as f, Content as g, CopyButton as h, type DangerProps as i, DocLayout as j, DocPage as k, type FeatureCardProps as l, type FeatureItem as m, Features as n, type FeaturesProps as o, Footer as p, Hero as q, type HeroAction as r, type HeroImage as s, type HeroProps as t, HomePage as u, type InfoProps as v, type NoteProps as w, Sidebar as x, Tab as y, TabList as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateApiDocs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OTUACKCQ.js";
|
|
4
4
|
|
|
5
5
|
// src/typedoc/vite-plugin.ts
|
|
6
6
|
import path from "path";
|
|
@@ -107,24 +107,24 @@ function ApiSignature({
|
|
|
107
107
|
return `${p.name}${optional}: ${p.type}`;
|
|
108
108
|
}).join(", ");
|
|
109
109
|
const returnStr = returns?.type ? `: ${returns.type}` : "";
|
|
110
|
-
return /* @__PURE__ */ jsx("div", { className: `
|
|
111
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
110
|
+
return /* @__PURE__ */ jsx("div", { className: `ardo-api-signature ${className}`, children: /* @__PURE__ */ jsx("pre", { className: "ardo-api-signature-code", children: /* @__PURE__ */ jsxs("code", { children: [
|
|
111
|
+
/* @__PURE__ */ jsx("span", { className: "ardo-api-keyword", children: "function" }),
|
|
112
112
|
" ",
|
|
113
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
114
|
-
typeParamsStr && /* @__PURE__ */ jsx("span", { className: "
|
|
115
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
113
|
+
/* @__PURE__ */ jsx("span", { className: "ardo-api-function-name", children: name }),
|
|
114
|
+
typeParamsStr && /* @__PURE__ */ jsx("span", { className: "ardo-api-type-params", children: typeParamsStr }),
|
|
115
|
+
/* @__PURE__ */ jsxs("span", { className: "ardo-api-params", children: [
|
|
116
116
|
"(",
|
|
117
117
|
paramsStr,
|
|
118
118
|
")"
|
|
119
119
|
] }),
|
|
120
|
-
returnStr && /* @__PURE__ */ jsx("span", { className: "
|
|
120
|
+
returnStr && /* @__PURE__ */ jsx("span", { className: "ardo-api-return-type", children: returnStr })
|
|
121
121
|
] }) }) });
|
|
122
122
|
}
|
|
123
123
|
function ApiParametersTable({ parameters }) {
|
|
124
124
|
if (!parameters.length) return null;
|
|
125
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
126
|
-
/* @__PURE__ */ jsx("h4", { className: "
|
|
127
|
-
/* @__PURE__ */ jsxs("table", { className: "
|
|
125
|
+
return /* @__PURE__ */ jsxs("div", { className: "ardo-api-parameters", children: [
|
|
126
|
+
/* @__PURE__ */ jsx("h4", { className: "ardo-api-section-title", children: "Parameters" }),
|
|
127
|
+
/* @__PURE__ */ jsxs("table", { className: "ardo-api-table", children: [
|
|
128
128
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
129
129
|
/* @__PURE__ */ jsx("th", { children: "Name" }),
|
|
130
130
|
/* @__PURE__ */ jsx("th", { children: "Type" }),
|
|
@@ -133,12 +133,12 @@ function ApiParametersTable({ parameters }) {
|
|
|
133
133
|
/* @__PURE__ */ jsx("tbody", { children: parameters.map((param) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
134
134
|
/* @__PURE__ */ jsxs("td", { children: [
|
|
135
135
|
/* @__PURE__ */ jsx("code", { children: param.name }),
|
|
136
|
-
param.optional && /* @__PURE__ */ jsx("span", { className: "
|
|
136
|
+
param.optional && /* @__PURE__ */ jsx("span", { className: "ardo-api-optional", children: "(optional)" })
|
|
137
137
|
] }),
|
|
138
138
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("code", { children: param.type }) }),
|
|
139
139
|
/* @__PURE__ */ jsxs("td", { children: [
|
|
140
140
|
param.description,
|
|
141
|
-
param.defaultValue && /* @__PURE__ */ jsxs("span", { className: "
|
|
141
|
+
param.defaultValue && /* @__PURE__ */ jsxs("span", { className: "ardo-api-default", children: [
|
|
142
142
|
"Default: ",
|
|
143
143
|
/* @__PURE__ */ jsx("code", { children: param.defaultValue })
|
|
144
144
|
] })
|
|
@@ -148,8 +148,8 @@ function ApiParametersTable({ parameters }) {
|
|
|
148
148
|
] });
|
|
149
149
|
}
|
|
150
150
|
function ApiReturns({ returns }) {
|
|
151
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
152
|
-
/* @__PURE__ */ jsx("h4", { className: "
|
|
151
|
+
return /* @__PURE__ */ jsxs("div", { className: "ardo-api-returns", children: [
|
|
152
|
+
/* @__PURE__ */ jsx("h4", { className: "ardo-api-section-title", children: "Returns" }),
|
|
153
153
|
/* @__PURE__ */ jsxs("p", { children: [
|
|
154
154
|
/* @__PURE__ */ jsx("code", { children: returns.type }),
|
|
155
155
|
returns.description && /* @__PURE__ */ jsxs("span", { children: [
|
|
@@ -164,13 +164,13 @@ function ApiReturns({ returns }) {
|
|
|
164
164
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
165
165
|
function ApiItem({ item, level = 2 }) {
|
|
166
166
|
const HeadingTag = `h${Math.min(level, 6)}`;
|
|
167
|
-
return /* @__PURE__ */ jsxs2("div", { className: `
|
|
168
|
-
/* @__PURE__ */ jsxs2(HeadingTag, { className: "
|
|
167
|
+
return /* @__PURE__ */ jsxs2("div", { className: `ardo-api-item ardo-api-item-${item.kind}`, id: item.id, children: [
|
|
168
|
+
/* @__PURE__ */ jsxs2(HeadingTag, { className: "ardo-api-item-title", children: [
|
|
169
169
|
/* @__PURE__ */ jsx2(ApiKindBadge, { kind: item.kind }),
|
|
170
|
-
/* @__PURE__ */ jsx2("span", { className: "
|
|
171
|
-
/* @__PURE__ */ jsx2("a", { href: `#${item.id}`, className: "
|
|
170
|
+
/* @__PURE__ */ jsx2("span", { className: "ardo-api-item-name", children: item.name }),
|
|
171
|
+
/* @__PURE__ */ jsx2("a", { href: `#${item.id}`, className: "ardo-api-anchor", children: "#" })
|
|
172
172
|
] }),
|
|
173
|
-
item.description && /* @__PURE__ */ jsx2("p", { className: "
|
|
173
|
+
item.description && /* @__PURE__ */ jsx2("p", { className: "ardo-api-item-description", children: item.description }),
|
|
174
174
|
item.signature && /* @__PURE__ */ jsx2(
|
|
175
175
|
ApiSignature,
|
|
176
176
|
{
|
|
@@ -182,11 +182,11 @@ function ApiItem({ item, level = 2 }) {
|
|
|
182
182
|
),
|
|
183
183
|
item.parameters && item.parameters.length > 0 && /* @__PURE__ */ jsx2(ApiParametersTable, { parameters: item.parameters }),
|
|
184
184
|
item.returns && /* @__PURE__ */ jsx2(ApiReturns, { returns: item.returns }),
|
|
185
|
-
item.examples && item.examples.length > 0 && /* @__PURE__ */ jsxs2("div", { className: "
|
|
186
|
-
/* @__PURE__ */ jsx2("h4", { className: "
|
|
187
|
-
item.examples.map((example, i) => /* @__PURE__ */ jsx2("pre", { className: "
|
|
185
|
+
item.examples && item.examples.length > 0 && /* @__PURE__ */ jsxs2("div", { className: "ardo-api-examples", children: [
|
|
186
|
+
/* @__PURE__ */ jsx2("h4", { className: "ardo-api-section-title", children: "Examples" }),
|
|
187
|
+
item.examples.map((example, i) => /* @__PURE__ */ jsx2("pre", { className: "ardo-api-example", children: /* @__PURE__ */ jsx2("code", { children: example }) }, i))
|
|
188
188
|
] }),
|
|
189
|
-
item.source && /* @__PURE__ */ jsx2("div", { className: "
|
|
189
|
+
item.source && /* @__PURE__ */ jsx2("div", { className: "ardo-api-source", children: item.source.url ? /* @__PURE__ */ jsxs2("a", { href: item.source.url, target: "_blank", rel: "noopener noreferrer", children: [
|
|
190
190
|
item.source.file,
|
|
191
191
|
":",
|
|
192
192
|
item.source.line
|
|
@@ -195,7 +195,7 @@ function ApiItem({ item, level = 2 }) {
|
|
|
195
195
|
":",
|
|
196
196
|
item.source.line
|
|
197
197
|
] }) }),
|
|
198
|
-
item.children && item.children.length > 0 && /* @__PURE__ */ jsx2("div", { className: "
|
|
198
|
+
item.children && item.children.length > 0 && /* @__PURE__ */ jsx2("div", { className: "ardo-api-children", children: item.children.map((child) => /* @__PURE__ */ jsx2(ApiItem, { item: child, level: level + 1 }, child.id)) })
|
|
199
199
|
] });
|
|
200
200
|
}
|
|
201
201
|
function ApiKindBadge({ kind }) {
|
|
@@ -217,15 +217,15 @@ function ApiKindBadge({ kind }) {
|
|
|
217
217
|
enumMember: "Enum Member"
|
|
218
218
|
};
|
|
219
219
|
const kindColors = {
|
|
220
|
-
class: "
|
|
221
|
-
interface: "
|
|
222
|
-
type: "
|
|
223
|
-
enum: "
|
|
224
|
-
function: "
|
|
225
|
-
method: "
|
|
226
|
-
property: "
|
|
220
|
+
class: "ardo-api-badge-class",
|
|
221
|
+
interface: "ardo-api-badge-interface",
|
|
222
|
+
type: "ardo-api-badge-type",
|
|
223
|
+
enum: "ardo-api-badge-enum",
|
|
224
|
+
function: "ardo-api-badge-function",
|
|
225
|
+
method: "ardo-api-badge-method",
|
|
226
|
+
property: "ardo-api-badge-property"
|
|
227
227
|
};
|
|
228
|
-
return /* @__PURE__ */ jsx2("span", { className: `
|
|
228
|
+
return /* @__PURE__ */ jsx2("span", { className: `ardo-api-badge ${kindColors[kind] || ""}`, children: kindLabels[kind] });
|
|
229
229
|
}
|
|
230
230
|
function ApiHierarchy({ hierarchy }) {
|
|
231
231
|
if (!hierarchy) return null;
|
|
@@ -238,23 +238,23 @@ function ApiHierarchy({ hierarchy }) {
|
|
|
238
238
|
if (!extendsTypes?.length && !implementsTypes?.length && !extendedBy?.length && !implementedBy?.length) {
|
|
239
239
|
return null;
|
|
240
240
|
}
|
|
241
|
-
return /* @__PURE__ */ jsxs2("div", { className: "
|
|
242
|
-
/* @__PURE__ */ jsx2("h4", { className: "
|
|
243
|
-
/* @__PURE__ */ jsxs2("ul", { className: "
|
|
241
|
+
return /* @__PURE__ */ jsxs2("div", { className: "ardo-api-hierarchy", children: [
|
|
242
|
+
/* @__PURE__ */ jsx2("h4", { className: "ardo-api-section-title", children: "Hierarchy" }),
|
|
243
|
+
/* @__PURE__ */ jsxs2("ul", { className: "ardo-api-hierarchy-list", children: [
|
|
244
244
|
extendsTypes?.map((type) => /* @__PURE__ */ jsxs2("li", { children: [
|
|
245
|
-
/* @__PURE__ */ jsx2("span", { className: "
|
|
245
|
+
/* @__PURE__ */ jsx2("span", { className: "ardo-api-hierarchy-label", children: "extends" }),
|
|
246
246
|
/* @__PURE__ */ jsx2("code", { children: type })
|
|
247
247
|
] }, type)),
|
|
248
248
|
implementsTypes?.map((type) => /* @__PURE__ */ jsxs2("li", { children: [
|
|
249
|
-
/* @__PURE__ */ jsx2("span", { className: "
|
|
249
|
+
/* @__PURE__ */ jsx2("span", { className: "ardo-api-hierarchy-label", children: "implements" }),
|
|
250
250
|
/* @__PURE__ */ jsx2("code", { children: type })
|
|
251
251
|
] }, type)),
|
|
252
252
|
extendedBy?.map((type) => /* @__PURE__ */ jsxs2("li", { children: [
|
|
253
|
-
/* @__PURE__ */ jsx2("span", { className: "
|
|
253
|
+
/* @__PURE__ */ jsx2("span", { className: "ardo-api-hierarchy-label", children: "extended by" }),
|
|
254
254
|
/* @__PURE__ */ jsx2("code", { children: type })
|
|
255
255
|
] }, type)),
|
|
256
256
|
implementedBy?.map((type) => /* @__PURE__ */ jsxs2("li", { children: [
|
|
257
|
-
/* @__PURE__ */ jsx2("span", { className: "
|
|
257
|
+
/* @__PURE__ */ jsx2("span", { className: "ardo-api-hierarchy-label", children: "implemented by" }),
|
|
258
258
|
/* @__PURE__ */ jsx2("code", { children: type })
|
|
259
259
|
] }, type))
|
|
260
260
|
] })
|
|
@@ -271,4 +271,4 @@ export {
|
|
|
271
271
|
ApiKindBadge,
|
|
272
272
|
ApiHierarchy
|
|
273
273
|
};
|
|
274
|
-
//# sourceMappingURL=chunk-
|
|
274
|
+
//# sourceMappingURL=chunk-G5L4ZUTS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/typedoc/vite-plugin.ts","../src/typedoc/components/ApiSignature.tsx","../src/typedoc/components/ApiItem.tsx"],"sourcesContent":["import type { Plugin } from \"vite\"\nimport type { TypeDocConfig } from \"./types\"\nimport { generateApiDocs } from \"./generator\"\nimport path from \"path\"\nimport fsSync from \"fs\"\nimport type { FSWatcher } from \"fs\"\n\nexport interface TypeDocPluginOptions extends Partial<TypeDocConfig> {\n /**\n * Content directory where markdown files are stored\n * @default './content'\n */\n contentDir?: string\n\n /**\n * Run TypeDoc on every build\n * @default false in dev, true in build\n */\n runOnBuild?: boolean\n\n /**\n * Run TypeDoc on startup\n * @default true\n */\n runOnStart?: boolean\n}\n\n/**\n * Vite plugin for generating API documentation with TypeDoc.\n *\n * @example\n * ```ts\n * // Minimal config (uses ./src/index.ts as entry point)\n * typedocPlugin()\n *\n * // Custom entry point\n * typedocPlugin({ entryPoints: ['./lib/index.ts'] })\n *\n * // Full config\n * typedocPlugin({\n * entryPoints: ['./src/index.ts'],\n * out: 'api-reference',\n * excludePrivate: true,\n * })\n * ```\n */\nexport function typedocPlugin(options: TypeDocPluginOptions = {}): Plugin {\n const {\n contentDir = \"./content\",\n runOnBuild,\n runOnStart = true,\n // TypeDoc config with defaults\n enabled = true,\n entryPoints = [\"./src/index.ts\"],\n out = \"api-reference\",\n excludePrivate = true,\n excludeInternal = true,\n ...restConfig\n } = options\n\n const config: TypeDocConfig = {\n enabled,\n entryPoints,\n out,\n excludePrivate,\n excludeInternal,\n ...restConfig,\n }\n\n let isBuilding = false\n let hasGenerated = false\n\n async function generate() {\n if (!config.enabled) return\n\n console.log(\"[ardo] Generating API documentation with TypeDoc...\")\n const startTime = Date.now()\n\n try {\n const docs = await generateApiDocs(config, contentDir)\n const duration = Date.now() - startTime\n console.log(`[ardo] Generated ${docs.length} API documentation pages in ${duration}ms`)\n hasGenerated = true\n } catch (error) {\n console.error(\"[ardo] TypeDoc generation failed:\", error)\n throw error\n }\n }\n\n return {\n name: \"ardo:typedoc\",\n\n async buildStart() {\n if (runOnStart && !hasGenerated) {\n await generate()\n }\n },\n\n async buildEnd() {\n if (isBuilding && runOnBuild !== false) {\n await generate()\n }\n },\n\n configResolved(config) {\n isBuilding = config.command === \"build\"\n },\n\n async handleHotUpdate({ file }) {\n // Regenerate on source file changes in watch mode\n if (config.watch && config.entryPoints.some((ep) => file.includes(ep))) {\n await generate()\n return []\n }\n },\n }\n}\n\nexport function createTypedocWatcher(\n config: TypeDocConfig,\n contentDir: string,\n onChange?: () => void\n): { start: () => Promise<void>; stop: () => void } {\n let watcher: FSWatcher | null = null\n\n return {\n async start() {\n if (!config.watch || !config.entryPoints.length) return\n\n const entryDir = path.dirname(config.entryPoints[0])\n\n try {\n watcher = fsSync.watch(entryDir, { recursive: true }, async (event, filename) => {\n if (filename?.endsWith(\".ts\") || filename?.endsWith(\".tsx\")) {\n console.log(`[ardo] Source file changed: ${filename}`)\n await generateApiDocs(config, contentDir)\n onChange?.()\n }\n })\n } catch {\n console.warn(\"[ardo] Could not start TypeDoc watcher\")\n }\n },\n\n stop() {\n if (watcher) {\n watcher.close()\n watcher = null\n }\n },\n }\n}\n","import type { ApiDocParameter, ApiDocReturn, ApiDocTypeParameter } from \"../types\"\n\ninterface ApiSignatureProps {\n name: string\n typeParameters?: ApiDocTypeParameter[]\n parameters?: ApiDocParameter[]\n returns?: ApiDocReturn\n className?: string\n}\n\nexport function ApiSignature({\n name,\n typeParameters,\n parameters,\n returns,\n className = \"\",\n}: ApiSignatureProps) {\n const typeParamsStr = typeParameters?.length\n ? `<${typeParameters.map((tp) => tp.name).join(\", \")}>`\n : \"\"\n\n const paramsStr = parameters\n ?.map((p) => {\n const optional = p.optional ? \"?\" : \"\"\n return `${p.name}${optional}: ${p.type}`\n })\n .join(\", \")\n\n const returnStr = returns?.type ? `: ${returns.type}` : \"\"\n\n return (\n <div className={`ardo-api-signature ${className}`}>\n <pre className=\"ardo-api-signature-code\">\n <code>\n <span className=\"ardo-api-keyword\">function</span>{\" \"}\n <span className=\"ardo-api-function-name\">{name}</span>\n {typeParamsStr && <span className=\"ardo-api-type-params\">{typeParamsStr}</span>}\n <span className=\"ardo-api-params\">({paramsStr})</span>\n {returnStr && <span className=\"ardo-api-return-type\">{returnStr}</span>}\n </code>\n </pre>\n </div>\n )\n}\n\ninterface ApiParametersTableProps {\n parameters: ApiDocParameter[]\n}\n\nexport function ApiParametersTable({ parameters }: ApiParametersTableProps) {\n if (!parameters.length) return null\n\n return (\n <div className=\"ardo-api-parameters\">\n <h4 className=\"ardo-api-section-title\">Parameters</h4>\n <table className=\"ardo-api-table\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Type</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n {parameters.map((param) => (\n <tr key={param.name}>\n <td>\n <code>{param.name}</code>\n {param.optional && <span className=\"ardo-api-optional\">(optional)</span>}\n </td>\n <td>\n <code>{param.type}</code>\n </td>\n <td>\n {param.description}\n {param.defaultValue && (\n <span className=\"ardo-api-default\">\n Default: <code>{param.defaultValue}</code>\n </span>\n )}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )\n}\n\ninterface ApiReturnsProps {\n returns: ApiDocReturn\n}\n\nexport function ApiReturns({ returns }: ApiReturnsProps) {\n return (\n <div className=\"ardo-api-returns\">\n <h4 className=\"ardo-api-section-title\">Returns</h4>\n <p>\n <code>{returns.type}</code>\n {returns.description && <span> - {returns.description}</span>}\n </p>\n </div>\n )\n}\n","import type { ApiDocItem, ApiDocKind } from \"../types\"\nimport { ApiSignature, ApiParametersTable, ApiReturns } from \"./ApiSignature\"\nimport type { JSX } from \"react\"\n\ninterface ApiItemProps {\n item: ApiDocItem\n level?: number\n}\n\nexport function ApiItem({ item, level = 2 }: ApiItemProps) {\n const HeadingTag = `h${Math.min(level, 6)}` as keyof JSX.IntrinsicElements\n\n return (\n <div className={`ardo-api-item ardo-api-item-${item.kind}`} id={item.id}>\n <HeadingTag className=\"ardo-api-item-title\">\n <ApiKindBadge kind={item.kind} />\n <span className=\"ardo-api-item-name\">{item.name}</span>\n <a href={`#${item.id}`} className=\"ardo-api-anchor\">\n #\n </a>\n </HeadingTag>\n\n {item.description && <p className=\"ardo-api-item-description\">{item.description}</p>}\n\n {item.signature && (\n <ApiSignature\n name={item.name}\n typeParameters={item.typeParameters}\n parameters={item.parameters}\n returns={item.returns}\n />\n )}\n\n {item.parameters && item.parameters.length > 0 && (\n <ApiParametersTable parameters={item.parameters} />\n )}\n\n {item.returns && <ApiReturns returns={item.returns} />}\n\n {item.examples && item.examples.length > 0 && (\n <div className=\"ardo-api-examples\">\n <h4 className=\"ardo-api-section-title\">Examples</h4>\n {item.examples.map((example, i) => (\n <pre key={i} className=\"ardo-api-example\">\n <code>{example}</code>\n </pre>\n ))}\n </div>\n )}\n\n {item.source && (\n <div className=\"ardo-api-source\">\n {item.source.url ? (\n <a href={item.source.url} target=\"_blank\" rel=\"noopener noreferrer\">\n {item.source.file}:{item.source.line}\n </a>\n ) : (\n <span>\n {item.source.file}:{item.source.line}\n </span>\n )}\n </div>\n )}\n\n {item.children && item.children.length > 0 && (\n <div className=\"ardo-api-children\">\n {item.children.map((child) => (\n <ApiItem key={child.id} item={child} level={level + 1} />\n ))}\n </div>\n )}\n </div>\n )\n}\n\ninterface ApiKindBadgeProps {\n kind: ApiDocKind\n}\n\nexport function ApiKindBadge({ kind }: ApiKindBadgeProps) {\n const kindLabels: Record<ApiDocKind, string> = {\n module: \"Module\",\n namespace: \"Namespace\",\n class: \"Class\",\n interface: \"Interface\",\n type: \"Type\",\n enum: \"Enum\",\n function: \"Function\",\n variable: \"Variable\",\n property: \"Property\",\n method: \"Method\",\n accessor: \"Accessor\",\n constructor: \"Constructor\",\n parameter: \"Parameter\",\n typeParameter: \"Type Parameter\",\n enumMember: \"Enum Member\",\n }\n\n const kindColors: Record<string, string> = {\n class: \"ardo-api-badge-class\",\n interface: \"ardo-api-badge-interface\",\n type: \"ardo-api-badge-type\",\n enum: \"ardo-api-badge-enum\",\n function: \"ardo-api-badge-function\",\n method: \"ardo-api-badge-method\",\n property: \"ardo-api-badge-property\",\n }\n\n return <span className={`ardo-api-badge ${kindColors[kind] || \"\"}`}>{kindLabels[kind]}</span>\n}\n\ninterface ApiHierarchyProps {\n hierarchy: ApiDocItem[\"hierarchy\"]\n}\n\nexport function ApiHierarchy({ hierarchy }: ApiHierarchyProps) {\n if (!hierarchy) return null\n\n const {\n extends: extendsTypes,\n implements: implementsTypes,\n extendedBy,\n implementedBy,\n } = hierarchy\n\n if (\n !extendsTypes?.length &&\n !implementsTypes?.length &&\n !extendedBy?.length &&\n !implementedBy?.length\n ) {\n return null\n }\n\n return (\n <div className=\"ardo-api-hierarchy\">\n <h4 className=\"ardo-api-section-title\">Hierarchy</h4>\n <ul className=\"ardo-api-hierarchy-list\">\n {extendsTypes?.map((type) => (\n <li key={type}>\n <span className=\"ardo-api-hierarchy-label\">extends</span>\n <code>{type}</code>\n </li>\n ))}\n {implementsTypes?.map((type) => (\n <li key={type}>\n <span className=\"ardo-api-hierarchy-label\">implements</span>\n <code>{type}</code>\n </li>\n ))}\n {extendedBy?.map((type) => (\n <li key={type}>\n <span className=\"ardo-api-hierarchy-label\">extended by</span>\n <code>{type}</code>\n </li>\n ))}\n {implementedBy?.map((type) => (\n <li key={type}>\n <span className=\"ardo-api-hierarchy-label\">implemented by</span>\n <code>{type}</code>\n </li>\n ))}\n </ul>\n </div>\n )\n}\n"],"mappings":";;;;;AAGA,OAAO,UAAU;AACjB,OAAO,YAAY;AA0CZ,SAAS,cAAc,UAAgC,CAAC,GAAW;AACxE,QAAM;AAAA,IACJ,aAAa;AAAA,IACb;AAAA,IACA,aAAa;AAAA;AAAA,IAEb,UAAU;AAAA,IACV,cAAc,CAAC,gBAAgB;AAAA,IAC/B,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,kBAAkB;AAAA,IAClB,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,SAAwB;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL;AAEA,MAAI,aAAa;AACjB,MAAI,eAAe;AAEnB,iBAAe,WAAW;AACxB,QAAI,CAAC,OAAO,QAAS;AAErB,YAAQ,IAAI,qDAAqD;AACjE,UAAM,YAAY,KAAK,IAAI;AAE3B,QAAI;AACF,YAAM,OAAO,MAAM,gBAAgB,QAAQ,U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