@usecross/docs 0.5.0 → 0.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CodeBlockProps, D as DocsLayoutProps, a as DocContent, M as MarkdownProps, S as SidebarProps, b as DocsAppConfig } from './types-CCdOzu28.js';
3
- export { N as NavItem, c as NavSection, d as SharedProps } from './types-CCdOzu28.js';
2
+ import { C as CodeBlockProps, D as DocSetMeta, a as DocsLayoutProps, b as DocContent, M as MarkdownProps, S as SidebarProps, c as DocsAppConfig } from './types-DlF8TX2Q.js';
3
+ export { N as NavItem, d as NavSection, e as SharedProps } from './types-DlF8TX2Q.js';
4
4
  import { ReactNode } from 'react';
5
5
  import { ClassValue } from 'clsx';
6
6
  import { HighlighterCore } from 'shiki/core';
@@ -16,6 +16,17 @@ declare function InlineCode({ children }: {
16
16
  children: React.ReactNode;
17
17
  }): react_jsx_runtime.JSX.Element;
18
18
 
19
+ interface DocSetSelectorProps {
20
+ docSets: DocSetMeta[];
21
+ currentDocSet: string;
22
+ className?: string;
23
+ }
24
+ /**
25
+ * Dropdown selector for switching between documentation sets.
26
+ * Inspired by Fumadocs design - clean and minimal.
27
+ */
28
+ declare function DocSetSelector({ docSets, currentDocSet, className }: DocSetSelectorProps): react_jsx_runtime.JSX.Element;
29
+
19
30
  /**
20
31
  * Full-featured documentation layout with sidebar, mobile menu, and header.
21
32
  */
@@ -50,6 +61,7 @@ interface HomePageContextValue {
50
61
  logoUrl?: string;
51
62
  heroLogoUrl?: string;
52
63
  footerLogoUrl?: string;
64
+ footerLogoInvertedUrl?: string;
53
65
  githubUrl?: string;
54
66
  navLinks: Array<{
55
67
  label: string;
@@ -141,8 +153,43 @@ declare function Markdown({ content, components }: MarkdownProps): react_jsx_run
141
153
 
142
154
  /**
143
155
  * Documentation sidebar with section-based navigation.
156
+ * In multi-docs mode, includes a dropdown selector at the top.
157
+ */
158
+ declare function Sidebar({ nav, currentPath, className, docSets, currentDocSet }: SidebarProps): react_jsx_runtime.JSX.Element;
159
+
160
+ type Theme = 'light' | 'dark' | 'system';
161
+ type ResolvedTheme = 'light' | 'dark';
162
+ interface ThemeContextValue {
163
+ theme: Theme;
164
+ resolvedTheme: ResolvedTheme;
165
+ setTheme: (theme: Theme) => void;
166
+ }
167
+ interface ThemeProviderProps {
168
+ children: ReactNode;
169
+ /** Default theme if no preference is stored. Defaults to 'system'. */
170
+ defaultTheme?: Theme;
171
+ /** Force a specific theme, ignoring user preference */
172
+ forcedTheme?: ResolvedTheme;
173
+ }
174
+ declare function ThemeProvider({ children, defaultTheme, forcedTheme, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
175
+ declare function useTheme(): ThemeContextValue;
176
+ /**
177
+ * Script to prevent flash of unstyled content (FOUC) during page load.
178
+ * Include this in your HTML <head> before any stylesheets.
179
+ */
180
+ declare const themeInitScript: string;
181
+
182
+ interface ThemeToggleProps {
183
+ /** Additional CSS classes */
184
+ className?: string;
185
+ /** Size variant */
186
+ size?: 'sm' | 'md' | 'lg';
187
+ }
188
+ /**
189
+ * Theme toggle dropdown with Light, Dark, and System options.
190
+ * Refined design with smooth animations and premium feel.
144
191
  */
145
- declare function Sidebar({ nav, currentPath, className }: SidebarProps): react_jsx_runtime.JSX.Element;
192
+ declare function ThemeToggle({ className, size }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
146
193
 
147
194
  /**
148
195
  * Create and mount an Inertia.js documentation app.
@@ -180,4 +227,4 @@ declare function configureHighlighter(options: {
180
227
  langs?: Promise<any>[];
181
228
  }): void;
182
229
 
183
- export { CodeBlock, CodeBlockProps, DocContent, DocsAppConfig, DocsLayout, DocsLayoutProps, DocsPage, EmojiConfetti, HomeCTA, type HomeFeature, HomeFeatureItem, type HomeFeatureItemProps, HomeFeatures, type HomeFeaturesProps, HomeFooter, HomeHeader, type HomeHeaderProps, HomeHero, HomePage, type HomePageContextValue, type HomePageProps, InlineCode, Markdown, MarkdownProps, Sidebar, SidebarProps, cn, configureHighlighter, createDocsApp, getHighlighter };
230
+ export { CodeBlock, CodeBlockProps, DocContent, DocSetMeta, DocSetSelector, DocsAppConfig, DocsLayout, DocsLayoutProps, DocsPage, EmojiConfetti, HomeCTA, type HomeFeature, HomeFeatureItem, type HomeFeatureItemProps, HomeFeatures, type HomeFeaturesProps, HomeFooter, HomeHeader, type HomeHeaderProps, HomeHero, HomePage, type HomePageContextValue, type HomePageProps, InlineCode, Markdown, MarkdownProps, type ResolvedTheme, Sidebar, SidebarProps, type Theme, ThemeProvider, ThemeToggle, cn, configureHighlighter, createDocsApp, getHighlighter, themeInitScript, useTheme };