@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/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
|
|
3
|
-
export { N as NavItem,
|
|
2
|
+
import { C as CodeBlockProps, D as DocSetMeta, a as DocsLayoutProps, b as DocContent, M as MarkdownProps, S as SidebarProps, T as TableOfContentsProps, c as DocsAppConfig } from './types-DlTTA3Dc.js';
|
|
3
|
+
export { N as NavItem, d as NavSection, e as SharedProps, f as TOCItem } from './types-DlTTA3Dc.js';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
6
6
|
import { HighlighterCore } from 'shiki/core';
|
|
@@ -16,10 +16,21 @@ 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
|
*/
|
|
22
|
-
declare function DocsLayout({ children, title, description: _description, logo, logoInverted, logoUrl: propLogoUrl, logoInvertedUrl: propLogoInvertedUrl, githubUrl: propGithubUrl, navLinks: propNavLinks, footer, }: DocsLayoutProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function DocsLayout({ children, title, description: _description, logo, logoInverted, logoUrl: propLogoUrl, logoInvertedUrl: propLogoInvertedUrl, githubUrl: propGithubUrl, navLinks: propNavLinks, footer, toc, }: DocsLayoutProps): react_jsx_runtime.JSX.Element;
|
|
23
34
|
|
|
24
35
|
interface DocsPageProps extends Omit<DocsLayoutProps, 'children' | 'title'> {
|
|
25
36
|
content: DocContent;
|
|
@@ -142,8 +153,15 @@ declare function Markdown({ content, components }: MarkdownProps): react_jsx_run
|
|
|
142
153
|
|
|
143
154
|
/**
|
|
144
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
|
+
/**
|
|
161
|
+
* Table of contents component with scroll spy functionality.
|
|
162
|
+
* Displays "ON THIS PAGE" sidebar with heading links.
|
|
145
163
|
*/
|
|
146
|
-
declare function
|
|
164
|
+
declare function TableOfContents({ items, className }: TableOfContentsProps): react_jsx_runtime.JSX.Element | null;
|
|
147
165
|
|
|
148
166
|
type Theme = 'light' | 'dark' | 'system';
|
|
149
167
|
type ResolvedTheme = 'light' | 'dark';
|
|
@@ -215,4 +233,4 @@ declare function configureHighlighter(options: {
|
|
|
215
233
|
langs?: Promise<any>[];
|
|
216
234
|
}): void;
|
|
217
235
|
|
|
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 };
|
|
236
|
+
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, TableOfContents, TableOfContentsProps, type Theme, ThemeProvider, ThemeToggle, cn, configureHighlighter, createDocsApp, getHighlighter, themeInitScript, useTheme };
|