@usecross/docs 0.11.0 → 0.12.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.
@@ -1,136 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- /**
4
- * Cross-Docs TypeScript type definitions
5
- */
6
-
7
- /** Single navigation item */
8
- interface NavItem {
9
- title: string;
10
- href: string;
11
- }
12
- /** Navigation section containing multiple items */
13
- interface NavSection {
14
- title: string;
15
- items: NavItem[];
16
- }
17
- /** Documentation set metadata (for multi-docs mode) */
18
- interface DocSetMeta {
19
- name: string;
20
- slug: string;
21
- description: string;
22
- /** Emoji or short text icon (e.g., "🍓") */
23
- icon?: string;
24
- /** URL to icon image */
25
- iconUrl?: string;
26
- prefix: string;
27
- }
28
- /** Shared props passed to all pages via Inertia */
29
- interface SharedProps {
30
- nav: NavSection[];
31
- currentPath: string;
32
- /** Logo image URL (from Python backend) */
33
- logoUrl?: string;
34
- /** Logo image URL for dark/inverted contexts (from Python backend) */
35
- logoInvertedUrl?: string;
36
- /** Footer logo image URL (from Python backend) */
37
- footerLogoUrl?: string;
38
- /** Footer logo image URL for dark mode (from Python backend) */
39
- footerLogoInvertedUrl?: string;
40
- /** GitHub repository URL (from Python backend) */
41
- githubUrl?: string;
42
- /** Additional navigation links (from Python backend) */
43
- navLinks?: Array<{
44
- label: string;
45
- href: string;
46
- }>;
47
- /** Available documentation sets (multi-docs mode) */
48
- docSets?: DocSetMeta[];
49
- /** Current documentation set slug (multi-docs mode) */
50
- currentDocSet?: string;
51
- }
52
- /** Table of contents item */
53
- interface TOCItem {
54
- id: string;
55
- text: string;
56
- level: number;
57
- }
58
- /** Document content structure */
59
- interface DocContent {
60
- title: string;
61
- description: string;
62
- body: string;
63
- toc?: TOCItem[];
64
- }
65
- /** Props for DocsLayout component */
66
- interface DocsLayoutProps {
67
- children: ReactNode;
68
- title: string;
69
- description?: string;
70
- /** Custom logo component (React node) */
71
- logo?: ReactNode;
72
- /** Custom logo for dark/inverted contexts (React node) */
73
- logoInverted?: ReactNode;
74
- /** Logo image URL (alternative to logo prop, can be passed from backend) */
75
- logoUrl?: string;
76
- /** Logo image URL for dark/inverted contexts */
77
- logoInvertedUrl?: string;
78
- /** GitHub repository URL (shows GitHub icon in nav) */
79
- githubUrl?: string;
80
- /** Additional navigation links */
81
- navLinks?: Array<{
82
- label: string;
83
- href: string;
84
- }>;
85
- /** Custom header component (replaces entire header). Can be a ReactNode or a function that receives mobile menu props. */
86
- header?: ReactNode | ((props: {
87
- mobileMenuOpen: boolean;
88
- toggleMobileMenu: () => void;
89
- }) => ReactNode);
90
- /** Header height in pixels. Used to calculate content offset. Defaults to 64 (h-16). */
91
- headerHeight?: number;
92
- /** Custom footer component */
93
- footer?: ReactNode;
94
- /** Table of contents items for the current page */
95
- toc?: TOCItem[];
96
- }
97
- /** Props for TableOfContents component */
98
- interface TableOfContentsProps {
99
- items: TOCItem[];
100
- className?: string;
101
- style: any;
102
- }
103
- /** Props for Sidebar component */
104
- interface SidebarProps {
105
- nav: NavSection[];
106
- currentPath: string;
107
- className?: string;
108
- /** Available documentation sets (multi-docs mode) */
109
- docSets?: DocSetMeta[];
110
- /** Current documentation set slug (multi-docs mode) */
111
- currentDocSet?: string;
112
- }
113
- /** Props for Markdown component */
114
- interface MarkdownProps {
115
- content: string;
116
- /** Override default markdown components */
117
- components?: Record<string, React.ComponentType<any>>;
118
- }
119
- /** Props for CodeBlock component */
120
- interface CodeBlockProps {
121
- code: string;
122
- language?: string;
123
- filename?: string;
124
- showLineNumbers?: boolean;
125
- theme?: string;
126
- className?: string;
127
- }
128
- /** Configuration for createDocsApp */
129
- interface DocsAppConfig {
130
- pages: Record<string, React.ComponentType<any>>;
131
- title?: (pageTitle: string) => string;
132
- /** Custom components to use in markdown (e.g., Alert, Card, etc.) */
133
- components?: Record<string, React.ComponentType<any>>;
134
- }
135
-
136
- export type { CodeBlockProps as C, DocSetMeta as D, MarkdownProps as M, NavItem as N, SidebarProps as S, TableOfContentsProps as T, DocsLayoutProps as a, DocContent as b, DocsAppConfig as c, NavSection as d, SharedProps as e, TOCItem as f };