@usecross/docs 0.6.0 → 0.8.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/dist/index.d.ts +23 -5
- package/dist/index.js +514 -161
- package/dist/index.js.map +1 -1
- package/dist/ssr.d.ts +1 -1
- package/dist/{types-CR-kx8KP.d.ts → types-DlTTA3Dc.d.ts} +34 -1
- package/package.json +1 -1
- package/src/components/DocSetSelector.tsx +239 -0
- package/src/components/DocsLayout.tsx +20 -9
- package/src/components/DocsPage.tsx +6 -1
- package/src/components/Markdown.tsx +45 -0
- package/src/components/Sidebar.tsx +12 -2
- package/src/components/TableOfContents.tsx +180 -0
- package/src/components/index.ts +2 -0
- package/src/index.ts +5 -0
- package/src/styles.css +3 -0
- package/src/types.ts +36 -0
package/src/types.ts
CHANGED
|
@@ -16,6 +16,18 @@ export interface NavSection {
|
|
|
16
16
|
items: NavItem[]
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/** Documentation set metadata (for multi-docs mode) */
|
|
20
|
+
export interface DocSetMeta {
|
|
21
|
+
name: string
|
|
22
|
+
slug: string
|
|
23
|
+
description: string
|
|
24
|
+
/** Emoji or short text icon (e.g., "🍓") */
|
|
25
|
+
icon?: string
|
|
26
|
+
/** URL to icon image */
|
|
27
|
+
iconUrl?: string
|
|
28
|
+
prefix: string
|
|
29
|
+
}
|
|
30
|
+
|
|
19
31
|
/** Shared props passed to all pages via Inertia */
|
|
20
32
|
export interface SharedProps {
|
|
21
33
|
nav: NavSection[]
|
|
@@ -32,6 +44,17 @@ export interface SharedProps {
|
|
|
32
44
|
githubUrl?: string
|
|
33
45
|
/** Additional navigation links (from Python backend) */
|
|
34
46
|
navLinks?: Array<{ label: string; href: string }>
|
|
47
|
+
/** Available documentation sets (multi-docs mode) */
|
|
48
|
+
docSets?: DocSetMeta[]
|
|
49
|
+
/** Current documentation set slug (multi-docs mode) */
|
|
50
|
+
currentDocSet?: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Table of contents item */
|
|
54
|
+
export interface TOCItem {
|
|
55
|
+
id: string
|
|
56
|
+
text: string
|
|
57
|
+
level: number
|
|
35
58
|
}
|
|
36
59
|
|
|
37
60
|
/** Document content structure */
|
|
@@ -39,6 +62,7 @@ export interface DocContent {
|
|
|
39
62
|
title: string
|
|
40
63
|
description: string
|
|
41
64
|
body: string
|
|
65
|
+
toc?: TOCItem[]
|
|
42
66
|
}
|
|
43
67
|
|
|
44
68
|
/** Props for DocsLayout component */
|
|
@@ -60,6 +84,14 @@ export interface DocsLayoutProps {
|
|
|
60
84
|
navLinks?: Array<{ label: string; href: string }>
|
|
61
85
|
/** Custom footer component */
|
|
62
86
|
footer?: ReactNode
|
|
87
|
+
/** Table of contents items for the current page */
|
|
88
|
+
toc?: TOCItem[]
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Props for TableOfContents component */
|
|
92
|
+
export interface TableOfContentsProps {
|
|
93
|
+
items: TOCItem[]
|
|
94
|
+
className?: string
|
|
63
95
|
}
|
|
64
96
|
|
|
65
97
|
/** Props for Sidebar component */
|
|
@@ -67,6 +99,10 @@ export interface SidebarProps {
|
|
|
67
99
|
nav: NavSection[]
|
|
68
100
|
currentPath: string
|
|
69
101
|
className?: string
|
|
102
|
+
/** Available documentation sets (multi-docs mode) */
|
|
103
|
+
docSets?: DocSetMeta[]
|
|
104
|
+
/** Current documentation set slug (multi-docs mode) */
|
|
105
|
+
currentDocSet?: string
|
|
70
106
|
}
|
|
71
107
|
|
|
72
108
|
/** Props for Markdown component */
|