@usecross/docs 0.5.0 → 0.6.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 DocsLayoutProps, a as DocContent, M as MarkdownProps, S as SidebarProps, b as DocsAppConfig } from './types-CR-kx8KP.js';
3
+ export { N as NavItem, c as NavSection, d as SharedProps } from './types-CR-kx8KP.js';
4
4
  import { ReactNode } from 'react';
5
5
  import { ClassValue } from 'clsx';
6
6
  import { HighlighterCore } from 'shiki/core';
@@ -50,6 +50,7 @@ interface HomePageContextValue {
50
50
  logoUrl?: string;
51
51
  heroLogoUrl?: string;
52
52
  footerLogoUrl?: string;
53
+ footerLogoInvertedUrl?: string;
53
54
  githubUrl?: string;
54
55
  navLinks: Array<{
55
56
  label: string;
@@ -144,6 +145,40 @@ declare function Markdown({ content, components }: MarkdownProps): react_jsx_run
144
145
  */
145
146
  declare function Sidebar({ nav, currentPath, className }: SidebarProps): react_jsx_runtime.JSX.Element;
146
147
 
148
+ type Theme = 'light' | 'dark' | 'system';
149
+ type ResolvedTheme = 'light' | 'dark';
150
+ interface ThemeContextValue {
151
+ theme: Theme;
152
+ resolvedTheme: ResolvedTheme;
153
+ setTheme: (theme: Theme) => void;
154
+ }
155
+ interface ThemeProviderProps {
156
+ children: ReactNode;
157
+ /** Default theme if no preference is stored. Defaults to 'system'. */
158
+ defaultTheme?: Theme;
159
+ /** Force a specific theme, ignoring user preference */
160
+ forcedTheme?: ResolvedTheme;
161
+ }
162
+ declare function ThemeProvider({ children, defaultTheme, forcedTheme, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
163
+ declare function useTheme(): ThemeContextValue;
164
+ /**
165
+ * Script to prevent flash of unstyled content (FOUC) during page load.
166
+ * Include this in your HTML <head> before any stylesheets.
167
+ */
168
+ declare const themeInitScript: string;
169
+
170
+ interface ThemeToggleProps {
171
+ /** Additional CSS classes */
172
+ className?: string;
173
+ /** Size variant */
174
+ size?: 'sm' | 'md' | 'lg';
175
+ }
176
+ /**
177
+ * Theme toggle dropdown with Light, Dark, and System options.
178
+ * Refined design with smooth animations and premium feel.
179
+ */
180
+ declare function ThemeToggle({ className, size }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
181
+
147
182
  /**
148
183
  * Create and mount an Inertia.js documentation app.
149
184
  *
@@ -180,4 +215,4 @@ declare function configureHighlighter(options: {
180
215
  langs?: Promise<any>[];
181
216
  }): void;
182
217
 
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 };
218
+ 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, type ResolvedTheme, Sidebar, SidebarProps, type Theme, ThemeProvider, ThemeToggle, cn, configureHighlighter, createDocsApp, getHighlighter, themeInitScript, useTheme };