doccupine 0.0.109 → 0.0.110
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/templates/components/SideBar.d.ts +1 -1
- package/dist/templates/components/SideBar.js +45 -3
- package/dist/templates/mdx/accordion.mdx.d.ts +1 -1
- package/dist/templates/mdx/accordion.mdx.js +19 -21
- package/dist/templates/mdx/buttons.mdx.d.ts +1 -1
- package/dist/templates/mdx/buttons.mdx.js +6 -6
- package/dist/templates/mdx/callouts.mdx.d.ts +1 -1
- package/dist/templates/mdx/callouts.mdx.js +1 -9
- package/dist/templates/mdx/cards.mdx.d.ts +1 -1
- package/dist/templates/mdx/cards.mdx.js +2 -2
- package/dist/templates/mdx/code.mdx.d.ts +1 -1
- package/dist/templates/mdx/code.mdx.js +8 -8
- package/dist/templates/mdx/color-swatches.mdx.d.ts +1 -1
- package/dist/templates/mdx/color-swatches.mdx.js +2 -2
- package/dist/templates/mdx/columns.mdx.d.ts +1 -1
- package/dist/templates/mdx/columns.mdx.js +1 -3
- package/dist/templates/mdx/fields.mdx.d.ts +1 -1
- package/dist/templates/mdx/fields.mdx.js +1 -1
- package/dist/templates/mdx/icons.mdx.d.ts +1 -1
- package/dist/templates/mdx/icons.mdx.js +2 -2
- package/dist/templates/mdx/steps.mdx.d.ts +1 -1
- package/dist/templates/mdx/steps.mdx.js +4 -8
- package/dist/templates/mdx/tabs.mdx.d.ts +1 -1
- package/dist/templates/mdx/tabs.mdx.js +8 -10
- package/dist/templates/mdx/update.mdx.d.ts +1 -1
- package/dist/templates/mdx/update.mdx.js +13 -15
- package/dist/templates/package.js +2 -2
- package/dist/templates/prettierignore.d.ts +1 -1
- package/dist/templates/prettierignore.js +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const sideBarTemplate = "\"use client\";\nimport { useContext, useState } from \"react\";\nimport { usePathname } from \"next/navigation\";\nimport { Flex, Space, ThemeToggle } from \"cherry-styled-components\";\nimport {\n DocsSidebar,\n SectionBarContext,\n StyledSidebar,\n StyledSidebarList,\n StyledSidebarListItem,\n StyledStrong,\n StyledSidebarListItemLink,\n StyledSidebarGroupButton,\n StyledSidebarGroupRow,\n StyledSidebarGroupLink,\n StyledSidebarGroupChevron,\n StyledSidebarGroupContent,\n StyledSidebarFooter,\n StyleMobileBar,\n StyledMobileBurger,\n} from \"@/components/layout/DocsComponents\";\nimport { Icon } from \"@/components/layout/Icon\";\nimport { useLockBodyScroll } from \"@/components/LockBodyScroll\";\n\n// A link can be a leaf (slug + title) or a group with nested children. Both the\n// category icon and the per-link icon are optional Lucide names.\ntype NavItemLink = {\n slug?: string;\n title: string;\n icon?: string;\n links?: NavItemLink[];\n};\n\ntype NavItem = {\n label: string;\n icon?: string;\n links: NavItemLink[];\n};\n\ninterface SideBarProps {\n result: NavItem[];\n}\n\nfunction linkContainsActivePath(link: NavItemLink, pathname: string): boolean {\n if (link.slug !== undefined && pathname === `/${link.slug}`) {\n return true;\n }\n return (link.links ?? []).some((child) =>\n linkContainsActivePath(child, pathname),\n );\n}\n\nfunction SidebarNavLink({\n link,\n depth,\n pathname,\n onNavigate,\n}: {\n link: NavItemLink;\n depth: number;\n pathname: string;\n onNavigate: () => void;\n}) {\n const children = link.links ?? [];\n const hasChildren = children.length > 0;\n const href = link.slug !== undefined ? `/${link.slug}` : undefined;\n const isActive = href !== undefined && pathname === href;\n const indent = { paddingLeft: `${20 + depth * 14}px` };\n\n // Open collapsible groups that contain the active page so deep links land\n // with their ancestors already expanded.\n const [isOpen, setIsOpen] = useState(\n hasChildren\n ? children.some((child) => linkContainsActivePath(child, pathname))\n : false,\n );\n\n if (!hasChildren) {\n return (\n <StyledSidebarListItem>\n <StyledSidebarListItemLink\n href={href ?? \"#\"}\n $isActive={isActive}\n onClick={onNavigate}\n style={indent}\n >\n {link.icon && <Icon name={link.icon} size={16} />}\n {link.title}\n </StyledSidebarListItemLink>\n </StyledSidebarListItem>\n );\n }\n\n const toggle = () => setIsOpen((prev) => !prev);\n const toggleLabel = isOpen\n ? `Collapse ${link.title}`\n : `Expand ${link.title}`;\n const groupActive = linkContainsActivePath(link, pathname);\n\n return (\n <li>\n {href !== undefined ? (\n <StyledSidebarGroupRow\n $isActive={groupActive}\n $isOpen={isOpen}\n style={indent}\n >\n <StyledSidebarGroupLink
|
|
1
|
+
export declare const sideBarTemplate = "\"use client\";\nimport { useContext, useEffect, useRef, useState } from \"react\";\nimport { usePathname } from \"next/navigation\";\nimport { Flex, Space, ThemeToggle } from \"cherry-styled-components\";\nimport {\n DocsSidebar,\n SectionBarContext,\n StyledSidebar,\n StyledSidebarList,\n StyledSidebarListItem,\n StyledStrong,\n StyledSidebarListItemLink,\n StyledSidebarGroupButton,\n StyledSidebarGroupRow,\n StyledSidebarGroupLink,\n StyledSidebarGroupChevron,\n StyledSidebarGroupContent,\n StyledSidebarFooter,\n StyleMobileBar,\n StyledMobileBurger,\n} from \"@/components/layout/DocsComponents\";\nimport { Icon } from \"@/components/layout/Icon\";\nimport { useLockBodyScroll } from \"@/components/LockBodyScroll\";\n\n// A link can be a leaf (slug + title) or a group with nested children. Both the\n// category icon and the per-link icon are optional Lucide names.\ntype NavItemLink = {\n slug?: string;\n title: string;\n icon?: string;\n links?: NavItemLink[];\n};\n\ntype NavItem = {\n label: string;\n icon?: string;\n links: NavItemLink[];\n};\n\ninterface SideBarProps {\n result: NavItem[];\n}\n\nfunction linkContainsActivePath(link: NavItemLink, pathname: string): boolean {\n if (link.slug !== undefined && pathname === `/${link.slug}`) {\n return true;\n }\n return (link.links ?? []).some((child) =>\n linkContainsActivePath(child, pathname),\n );\n}\n\nfunction SidebarNavLink({\n link,\n depth,\n pathname,\n onNavigate,\n}: {\n link: NavItemLink;\n depth: number;\n pathname: string;\n onNavigate: () => void;\n}) {\n const children = link.links ?? [];\n const hasChildren = children.length > 0;\n const href = link.slug !== undefined ? `/${link.slug}` : undefined;\n const isActive = href !== undefined && pathname === href;\n const indent = { paddingLeft: `${20 + depth * 14}px` };\n\n // Open collapsible groups that contain the active page so deep links land\n // with their ancestors already expanded.\n const [isOpen, setIsOpen] = useState(\n hasChildren\n ? children.some((child) => linkContainsActivePath(child, pathname))\n : false,\n );\n\n if (!hasChildren) {\n return (\n <StyledSidebarListItem>\n <StyledSidebarListItemLink\n href={href ?? \"#\"}\n $isActive={isActive}\n aria-current={isActive ? \"page\" : undefined}\n onClick={onNavigate}\n style={indent}\n >\n {link.icon && <Icon name={link.icon} size={16} />}\n {link.title}\n </StyledSidebarListItemLink>\n </StyledSidebarListItem>\n );\n }\n\n const toggle = () => setIsOpen((prev) => !prev);\n const toggleLabel = isOpen\n ? `Collapse ${link.title}`\n : `Expand ${link.title}`;\n const groupActive = linkContainsActivePath(link, pathname);\n\n return (\n <li>\n {href !== undefined ? (\n <StyledSidebarGroupRow\n $isActive={groupActive}\n $isOpen={isOpen}\n style={indent}\n >\n <StyledSidebarGroupLink\n href={href}\n aria-current={pathname === href ? \"page\" : undefined}\n onClick={onNavigate}\n >\n {link.icon && <Icon name={link.icon} size={16} />}\n {link.title}\n </StyledSidebarGroupLink>\n <StyledSidebarGroupChevron\n type=\"button\"\n onClick={toggle}\n aria-expanded={isOpen}\n aria-label={toggleLabel}\n >\n <Icon name=\"chevron-right\" size={16} />\n </StyledSidebarGroupChevron>\n </StyledSidebarGroupRow>\n ) : (\n <StyledSidebarGroupButton\n type=\"button\"\n onClick={toggle}\n $isActive={groupActive}\n $isOpen={isOpen}\n style={indent}\n aria-expanded={isOpen}\n aria-label={toggleLabel}\n >\n {link.icon && <Icon name={link.icon} size={16} />}\n {link.title}\n <Icon name=\"chevron-right\" size={16} />\n </StyledSidebarGroupButton>\n )}\n <StyledSidebarGroupContent $isOpen={isOpen}>\n {children.map((child: NavItemLink, index: number) => (\n <SidebarNavLink\n key={index}\n link={child}\n depth={depth + 1}\n pathname={pathname}\n onNavigate={onNavigate}\n />\n ))}\n </StyledSidebarGroupContent>\n </li>\n );\n}\n\nfunction SideBar({ result }: SideBarProps) {\n const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);\n const hasSectionBar = useContext(SectionBarContext);\n const pathname = usePathname();\n const navRef = useRef<HTMLElement>(null);\n const footerRef = useRef<HTMLDivElement>(null);\n\n useLockBodyScroll(isMobileMenuOpen);\n\n // Bring the current page's link into view within the sidebar's own scroll\n // area when it starts off-screen (deep pages, in-content links, search).\n // Scoped to the nav via scrollTo so the main document never jumps.\n useEffect(() => {\n const nav = navRef.current;\n if (!nav) return;\n const active = nav.querySelector<HTMLElement>('[aria-current=\"page\"]');\n if (!active) return;\n\n const navRect = nav.getBoundingClientRect();\n const activeRect = active.getBoundingClientRect();\n\n // The theme-toggle footer is sticky over the bottom of the scroll area\n // (~60px tall), so links underneath it are covered rather than visible.\n // Clamp the visible bottom to the footer's top edge when it's pinned.\n const footerRect = footerRef.current?.getBoundingClientRect();\n const visibleBottom = footerRect\n ? Math.min(navRect.bottom, footerRect.top)\n : navRect.bottom;\n\n const isOutOfView =\n activeRect.top < navRect.top || activeRect.bottom > visibleBottom;\n if (!isOutOfView) return;\n\n // Center within the visible band (nav top .. footer top), not the full\n // nav height, so the link never settles behind the footer.\n const visibleHeight = visibleBottom - navRect.top;\n const target =\n nav.scrollTop +\n (activeRect.top - navRect.top) -\n (visibleHeight - active.clientHeight) / 2;\n nav.scrollTo({ top: Math.max(0, target) });\n }, [pathname]);\n\n return (\n <DocsSidebar>\n <StyleMobileBar\n onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)}\n $isActive={isMobileMenuOpen}\n aria-label={\n isMobileMenuOpen ? \"Close navigation menu\" : \"Open navigation menu\"\n }\n aria-expanded={isMobileMenuOpen}\n >\n <StyledMobileBurger $isActive={isMobileMenuOpen} />\n </StyleMobileBar>\n\n <StyledSidebar\n ref={navRef}\n $isActive={isMobileMenuOpen}\n $hasSectionBar={hasSectionBar}\n >\n {result &&\n result.map((item: NavItem, index: number) => {\n return (\n <StyledSidebarList key={index}>\n <StyledSidebarListItem>\n <StyledStrong>\n {item.icon && <Icon name={item.icon} size={16} />}\n {item.label}\n </StyledStrong>{\" \"}\n </StyledSidebarListItem>\n <li>\n <Space $size={20} />\n </li>\n {item.links &&\n item.links.map((link: NavItemLink, indexChild: number) => (\n <SidebarNavLink\n key={indexChild}\n link={link}\n depth={0}\n pathname={pathname}\n onNavigate={() => setIsMobileMenuOpen(false)}\n />\n ))}\n <li aria-hidden=\"true\">\n <Space $size={20} />\n </li>\n </StyledSidebarList>\n );\n })}\n <StyledSidebarFooter ref={footerRef}>\n <Flex $xsJustifyContent=\"flex-start\" $lgJustifyContent=\"flex-end\">\n <ThemeToggle />\n </Flex>\n </StyledSidebarFooter>\n </StyledSidebar>\n </DocsSidebar>\n );\n}\n\nexport { SideBar };\n";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const sideBarTemplate = `"use client";
|
|
2
|
-
import { useContext, useState } from "react";
|
|
2
|
+
import { useContext, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { usePathname } from "next/navigation";
|
|
4
4
|
import { Flex, Space, ThemeToggle } from "cherry-styled-components";
|
|
5
5
|
import {
|
|
@@ -81,6 +81,7 @@ function SidebarNavLink({
|
|
|
81
81
|
<StyledSidebarListItemLink
|
|
82
82
|
href={href ?? "#"}
|
|
83
83
|
$isActive={isActive}
|
|
84
|
+
aria-current={isActive ? "page" : undefined}
|
|
84
85
|
onClick={onNavigate}
|
|
85
86
|
style={indent}
|
|
86
87
|
>
|
|
@@ -105,7 +106,11 @@ function SidebarNavLink({
|
|
|
105
106
|
$isOpen={isOpen}
|
|
106
107
|
style={indent}
|
|
107
108
|
>
|
|
108
|
-
<StyledSidebarGroupLink
|
|
109
|
+
<StyledSidebarGroupLink
|
|
110
|
+
href={href}
|
|
111
|
+
aria-current={pathname === href ? "page" : undefined}
|
|
112
|
+
onClick={onNavigate}
|
|
113
|
+
>
|
|
109
114
|
{link.icon && <Icon name={link.icon} size={16} />}
|
|
110
115
|
{link.title}
|
|
111
116
|
</StyledSidebarGroupLink>
|
|
@@ -152,9 +157,45 @@ function SideBar({ result }: SideBarProps) {
|
|
|
152
157
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
153
158
|
const hasSectionBar = useContext(SectionBarContext);
|
|
154
159
|
const pathname = usePathname();
|
|
160
|
+
const navRef = useRef<HTMLElement>(null);
|
|
161
|
+
const footerRef = useRef<HTMLDivElement>(null);
|
|
155
162
|
|
|
156
163
|
useLockBodyScroll(isMobileMenuOpen);
|
|
157
164
|
|
|
165
|
+
// Bring the current page's link into view within the sidebar's own scroll
|
|
166
|
+
// area when it starts off-screen (deep pages, in-content links, search).
|
|
167
|
+
// Scoped to the nav via scrollTo so the main document never jumps.
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
const nav = navRef.current;
|
|
170
|
+
if (!nav) return;
|
|
171
|
+
const active = nav.querySelector<HTMLElement>('[aria-current="page"]');
|
|
172
|
+
if (!active) return;
|
|
173
|
+
|
|
174
|
+
const navRect = nav.getBoundingClientRect();
|
|
175
|
+
const activeRect = active.getBoundingClientRect();
|
|
176
|
+
|
|
177
|
+
// The theme-toggle footer is sticky over the bottom of the scroll area
|
|
178
|
+
// (~60px tall), so links underneath it are covered rather than visible.
|
|
179
|
+
// Clamp the visible bottom to the footer's top edge when it's pinned.
|
|
180
|
+
const footerRect = footerRef.current?.getBoundingClientRect();
|
|
181
|
+
const visibleBottom = footerRect
|
|
182
|
+
? Math.min(navRect.bottom, footerRect.top)
|
|
183
|
+
: navRect.bottom;
|
|
184
|
+
|
|
185
|
+
const isOutOfView =
|
|
186
|
+
activeRect.top < navRect.top || activeRect.bottom > visibleBottom;
|
|
187
|
+
if (!isOutOfView) return;
|
|
188
|
+
|
|
189
|
+
// Center within the visible band (nav top .. footer top), not the full
|
|
190
|
+
// nav height, so the link never settles behind the footer.
|
|
191
|
+
const visibleHeight = visibleBottom - navRect.top;
|
|
192
|
+
const target =
|
|
193
|
+
nav.scrollTop +
|
|
194
|
+
(activeRect.top - navRect.top) -
|
|
195
|
+
(visibleHeight - active.clientHeight) / 2;
|
|
196
|
+
nav.scrollTo({ top: Math.max(0, target) });
|
|
197
|
+
}, [pathname]);
|
|
198
|
+
|
|
158
199
|
return (
|
|
159
200
|
<DocsSidebar>
|
|
160
201
|
<StyleMobileBar
|
|
@@ -169,6 +210,7 @@ function SideBar({ result }: SideBarProps) {
|
|
|
169
210
|
</StyleMobileBar>
|
|
170
211
|
|
|
171
212
|
<StyledSidebar
|
|
213
|
+
ref={navRef}
|
|
172
214
|
$isActive={isMobileMenuOpen}
|
|
173
215
|
$hasSectionBar={hasSectionBar}
|
|
174
216
|
>
|
|
@@ -201,7 +243,7 @@ function SideBar({ result }: SideBarProps) {
|
|
|
201
243
|
</StyledSidebarList>
|
|
202
244
|
);
|
|
203
245
|
})}
|
|
204
|
-
<StyledSidebarFooter>
|
|
246
|
+
<StyledSidebarFooter ref={footerRef}>
|
|
205
247
|
<Flex $xsJustifyContent="flex-start" $lgJustifyContent="flex-end">
|
|
206
248
|
<ThemeToggle />
|
|
207
249
|
</Flex>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const accordionMdxTemplate = "---\ntitle: \"Accordion\"\ndescription: \"Interactive panels for toggling visibility of content.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 4\n---\n\n# Accordion\n\nInteractive panels for toggling visibility of content.\n\nAccordion elements help organize information by letting users show or hide sections as needed. They\u2019re an effective way to manage progressive disclosure and simplify navigation through dense or optional content.\n\n## Accordion Usage\n\nYou can use the Accordion component directly within your MDX files without any import. The following example shows a basic usage:\n\n````
|
|
1
|
+
export declare const accordionMdxTemplate = "---\ntitle: \"Accordion\"\ndescription: \"Interactive panels for toggling visibility of content.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 4\n---\n\n# Accordion\n\nInteractive panels for toggling visibility of content.\n\nAccordion elements help organize information by letting users show or hide sections as needed. They\u2019re an effective way to manage progressive disclosure and simplify navigation through dense or optional content.\n\n## Accordion Usage\n\nYou can use the Accordion component directly within your MDX files without any import. The following example shows a basic usage:\n\n````html\n<Accordion title=\"What is MDX?\">\n You can put any content in here, including other components, like code:\n\n ```java\n class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n }\n ```\n</Accordion>\n````\n\n<Accordion title=\"What is MDX?\">\n You can put any content in here, including other components, like code:\n\n ```java\n class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n }\n ```\n</Accordion>\n\n## Properties\n\n<Field value=\"title\" type=\"string\" required>\n The title of the accordion.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the accordion.\n</Field>";
|
|
@@ -17,32 +17,30 @@ Accordion elements help organize information by letting users show or hide secti
|
|
|
17
17
|
|
|
18
18
|
You can use the Accordion component directly within your MDX files without any import. The following example shows a basic usage:
|
|
19
19
|
|
|
20
|
-
\`\`\`\`
|
|
20
|
+
\`\`\`\`html
|
|
21
21
|
<Accordion title="What is MDX?">
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
\`\`\`java
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
\`\`\`
|
|
31
|
-
|
|
22
|
+
You can put any content in here, including other components, like code:
|
|
23
|
+
|
|
24
|
+
\`\`\`java
|
|
25
|
+
class HelloWorld {
|
|
26
|
+
public static void main(String[] args) {
|
|
27
|
+
System.out.println("Hello, World!");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
\`\`\`
|
|
32
31
|
</Accordion>
|
|
33
32
|
\`\`\`\`
|
|
34
33
|
|
|
35
34
|
<Accordion title="What is MDX?">
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
\`\`\`java
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
\`\`\`
|
|
45
|
-
|
|
35
|
+
You can put any content in here, including other components, like code:
|
|
36
|
+
|
|
37
|
+
\`\`\`java
|
|
38
|
+
class HelloWorld {
|
|
39
|
+
public static void main(String[] args) {
|
|
40
|
+
System.out.println("Hello, World!");
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
\`\`\`
|
|
46
44
|
</Accordion>
|
|
47
45
|
|
|
48
46
|
## Properties
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const buttonsMdxTemplate = "---\ntitle: \"Buttons\"\ndescription: \"A flexible action component supporting variants, sizes, icons, and links.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 7\n---\n\n# Buttons\n\nA flexible action component supporting variants, sizes, icons, and links.\n\nButtons help users initiate actions or navigate to other pages. Use variants to convey emphasis, size for hierarchy, and icons to add clarity.\n\n## Button Usage\n\nYou can use the Button component directly within your MDX files without any import. The following examples show basic usage:\n\n```
|
|
1
|
+
export declare const buttonsMdxTemplate = "---\ntitle: \"Buttons\"\ndescription: \"A flexible action component supporting variants, sizes, icons, and links.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 7\n---\n\n# Buttons\n\nA flexible action component supporting variants, sizes, icons, and links.\n\nButtons help users initiate actions or navigate to other pages. Use variants to convey emphasis, size for hierarchy, and icons to add clarity.\n\n## Button Usage\n\nYou can use the Button component directly within your MDX files without any import. The following examples show basic usage:\n\n```html\n<Button>Primary</Button>\n<Button variant=\"secondary\">Secondary</Button>\n<Button variant=\"tertiary\">Tertiary</Button>\n```\n\n<Button>Primary</Button>\n<Button variant=\"secondary\">Secondary</Button>\n<Button variant=\"tertiary\">Tertiary</Button>\n\n### Sizes\n\n```html\n<Button size=\"default\">Default size</Button>\n<Button size=\"big\">Big size</Button>\n```\n\n<Button size=\"default\">Default size</Button>\n<Button size=\"big\">Big size</Button>\n\n### Outline\n\n```html\n<Button outline>Outlined</Button>\n```\n\n<Button outline>Outlined</Button>\n\n### Full width\n\n```html\n<Button fullWidth>Full width button</Button>\n```\n\n<Button fullWidth>Full width button</Button>\n\n### With icon\n\n```html\n<Button icon=\"arrow-right\" iconPosition=\"left\">\n With left icon\n</Button>\n<Button icon=\"arrow-right\" iconPosition=\"right\">\n With right icon\n</Button>\n```\n\n<Button icon=\"arrow-right\" iconPosition=\"left\">With left icon</Button>\n<Button icon=\"arrow-right\" iconPosition=\"right\">With right icon</Button>\n\n### As a link\n\nButtons can render as links when you provide an `href`.\n\n```html\n<Button href=\"/\">Home</Button>\n```\n\n<Button href=\"/\">Home</Button>\n\n## Properties\n\n<Field value=\"children\" type=\"node\" required>\n The content of the button.\n</Field>\n\n<Field value=\"variant\" type=\"string\">\n Controls visual emphasis.\n</Field>\n\n- **primary**\n- **secondary**\n- **tertiary**\n\n<Field value=\"size\" type=\"string\">\n Controls the size of the button.\n</Field>\n\n- **default**\n- **big**\n\n<Field value=\"outline\" type=\"boolean\">\n When true, renders the outlined style of the selected variant.\n</Field>\n\n<Field value=\"fullWidth\" type=\"boolean\">\n When true, the button expands to the full width of its container.\n</Field>\n\n<Field value=\"icon\" type=\"string\">\n Optional icon to display inside the button.\n</Field>\n\n- [**Lucide icon**](https://lucide.dev/icons) name or icon node\n\n<Field value=\"iconPosition\" type=\"string\">\n The position of the icon relative to the text.\n</Field>\n\n- **left**\n- **right**\n\n<Field value=\"href\" type=\"string\">\n When provided, the button renders as a link (`<a>`), enabling navigation.\n</Field>";
|
|
@@ -17,7 +17,7 @@ Buttons help users initiate actions or navigate to other pages. Use variants to
|
|
|
17
17
|
|
|
18
18
|
You can use the Button component directly within your MDX files without any import. The following examples show basic usage:
|
|
19
19
|
|
|
20
|
-
\`\`\`
|
|
20
|
+
\`\`\`html
|
|
21
21
|
<Button>Primary</Button>
|
|
22
22
|
<Button variant="secondary">Secondary</Button>
|
|
23
23
|
<Button variant="tertiary">Tertiary</Button>
|
|
@@ -29,7 +29,7 @@ You can use the Button component directly within your MDX files without any impo
|
|
|
29
29
|
|
|
30
30
|
### Sizes
|
|
31
31
|
|
|
32
|
-
\`\`\`
|
|
32
|
+
\`\`\`html
|
|
33
33
|
<Button size="default">Default size</Button>
|
|
34
34
|
<Button size="big">Big size</Button>
|
|
35
35
|
\`\`\`
|
|
@@ -39,7 +39,7 @@ You can use the Button component directly within your MDX files without any impo
|
|
|
39
39
|
|
|
40
40
|
### Outline
|
|
41
41
|
|
|
42
|
-
\`\`\`
|
|
42
|
+
\`\`\`html
|
|
43
43
|
<Button outline>Outlined</Button>
|
|
44
44
|
\`\`\`
|
|
45
45
|
|
|
@@ -47,7 +47,7 @@ You can use the Button component directly within your MDX files without any impo
|
|
|
47
47
|
|
|
48
48
|
### Full width
|
|
49
49
|
|
|
50
|
-
\`\`\`
|
|
50
|
+
\`\`\`html
|
|
51
51
|
<Button fullWidth>Full width button</Button>
|
|
52
52
|
\`\`\`
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ You can use the Button component directly within your MDX files without any impo
|
|
|
55
55
|
|
|
56
56
|
### With icon
|
|
57
57
|
|
|
58
|
-
\`\`\`
|
|
58
|
+
\`\`\`html
|
|
59
59
|
<Button icon="arrow-right" iconPosition="left">
|
|
60
60
|
With left icon
|
|
61
61
|
</Button>
|
|
@@ -71,7 +71,7 @@ You can use the Button component directly within your MDX files without any impo
|
|
|
71
71
|
|
|
72
72
|
Buttons can render as links when you provide an \`href\`.
|
|
73
73
|
|
|
74
|
-
\`\`\`
|
|
74
|
+
\`\`\`html
|
|
75
75
|
<Button href="/">Home</Button>
|
|
76
76
|
\`\`\`
|
|
77
77
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const calloutsMdxTemplate = "---\ntitle: \"Callouts\"\ndescription: \"Make your content stand out by using callouts for extra emphasis.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 8\n---\n\n# Callouts\n\nMake your content stand out by using callouts for extra emphasis.\n\nYou can format them as Note, Warning, Info, Danger and Success.\n\n## Callouts Usage\n\nYou can use the Callouts component directly within your MDX files without any import. The following example shows a basic usage:\n\n```
|
|
1
|
+
export declare const calloutsMdxTemplate = "---\ntitle: \"Callouts\"\ndescription: \"Make your content stand out by using callouts for extra emphasis.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 8\n---\n\n# Callouts\n\nMake your content stand out by using callouts for extra emphasis.\n\nYou can format them as Note, Warning, Info, Danger and Success.\n\n## Callouts Usage\n\nYou can use the Callouts component directly within your MDX files without any import. The following example shows a basic usage:\n\n```html\n<Callout type=\"note\">This is a note callout</Callout>\n<Callout type=\"warning\">This is a warning callout</Callout>\n<Callout type=\"info\">This is an info callout</Callout>\n<Callout type=\"danger\">This is a danger callout</Callout>\n<Callout type=\"success\">This is a success callout</Callout>\n```\n\n<Callout type=\"note\">\n This is a note callout\n</Callout>\n<Callout type=\"warning\">\n This is a warning callout\n</Callout>\n<Callout type=\"info\">\n This is an info callout\n</Callout>\n<Callout type=\"danger\">\n This is a danger callout\n</Callout>\n<Callout type=\"success\">\n This is a success callout\n</Callout>\n\n## Properties\n\n<Field value=\"type\" type=\"string\">\n The type of the callout: `note`, `info`, `warning`, `danger`, or `success`.\n</Field>\n\n<Field value=\"icon\" type=\"string\">\n A custom [Lucide](https://lucide.dev/icons) icon name. Overrides the default icon for the callout type.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the callout.\n</Field>";
|
|
@@ -17,34 +17,26 @@ You can format them as Note, Warning, Info, Danger and Success.
|
|
|
17
17
|
|
|
18
18
|
You can use the Callouts component directly within your MDX files without any import. The following example shows a basic usage:
|
|
19
19
|
|
|
20
|
-
\`\`\`
|
|
20
|
+
\`\`\`html
|
|
21
21
|
<Callout type="note">This is a note callout</Callout>
|
|
22
|
-
|
|
23
22
|
<Callout type="warning">This is a warning callout</Callout>
|
|
24
|
-
|
|
25
23
|
<Callout type="info">This is an info callout</Callout>
|
|
26
|
-
|
|
27
24
|
<Callout type="danger">This is a danger callout</Callout>
|
|
28
|
-
|
|
29
25
|
<Callout type="success">This is a success callout</Callout>
|
|
30
26
|
\`\`\`
|
|
31
27
|
|
|
32
28
|
<Callout type="note">
|
|
33
29
|
This is a note callout
|
|
34
30
|
</Callout>
|
|
35
|
-
|
|
36
31
|
<Callout type="warning">
|
|
37
32
|
This is a warning callout
|
|
38
33
|
</Callout>
|
|
39
|
-
|
|
40
34
|
<Callout type="info">
|
|
41
35
|
This is an info callout
|
|
42
36
|
</Callout>
|
|
43
|
-
|
|
44
37
|
<Callout type="danger">
|
|
45
38
|
This is a danger callout
|
|
46
39
|
</Callout>
|
|
47
|
-
|
|
48
40
|
<Callout type="success">
|
|
49
41
|
This is a success callout
|
|
50
42
|
</Callout>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const cardsMdxTemplate = "---\ntitle: \"Cards\"\ndescription: \"Cards act as visual containers for your content, giving you flexibility to combine text, icons, images, and links in a clean and organized way.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 6\n---\n\n# Cards\n\nDuplicate a page or section with ease, then emphasize important information or links using customizable layouts and icons.\n\nCards act as visual containers for your content, giving you flexibility to combine text, icons, images, and links in a clean and organized way.\n\n## Cards Usage\n\nYou can use the Cards component directly within your MDX files without any import. The following example shows a basic usage:\n\n```
|
|
1
|
+
export declare const cardsMdxTemplate = "---\ntitle: \"Cards\"\ndescription: \"Cards act as visual containers for your content, giving you flexibility to combine text, icons, images, and links in a clean and organized way.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 6\n---\n\n# Cards\n\nDuplicate a page or section with ease, then emphasize important information or links using customizable layouts and icons.\n\nCards act as visual containers for your content, giving you flexibility to combine text, icons, images, and links in a clean and organized way.\n\n## Cards Usage\n\nYou can use the Cards component directly within your MDX files without any import. The following example shows a basic usage:\n\n```html\n<Card title=\"Note\" icon=\"badge-info\">\n Doccupine CLI is a command-line tool that helps you create and manage your\n Doccupine project. It provides a simple and intuitive interface for creating\n and configuring your project.\n</Card>\n```\n\n<Card title=\"Note\" icon=\"badge-info\">\n Doccupine CLI is a command-line tool that helps you create and manage your Doccupine project. It provides a simple and intuitive interface for creating and configuring your project.\n</Card>\n\n## Link Card\n\nPass a `href` prop to turn the card into a clickable link. The card will display interactive hover and focus styles automatically.\n\n```html\n<Card title=\"Getting Started\" icon=\"rocket\" href=\"/cards\">\n Learn how to set up Doccupine and create your first documentation site.\n</Card>\n```\n\n<Card title=\"Getting Started\" icon=\"rocket\" href=\"/cards\">\n Learn how to set up Doccupine and create your first documentation site.\n</Card>\n\n## Properties\n\n<Field value=\"title\" type=\"string\" required>\n The title of the card.\n</Field>\n\n<Field value=\"icon\" type=\"string\">\n The [Lucide](https://lucide.dev/icons) icon name to display in the card.\n</Field>\n\n<Field value=\"href\" type=\"string\">\n A URL or path to link to. When provided, the card becomes a clickable link with interactive styles.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the card.\n</Field>";
|
|
@@ -17,7 +17,7 @@ Cards act as visual containers for your content, giving you flexibility to combi
|
|
|
17
17
|
|
|
18
18
|
You can use the Cards component directly within your MDX files without any import. The following example shows a basic usage:
|
|
19
19
|
|
|
20
|
-
\`\`\`
|
|
20
|
+
\`\`\`html
|
|
21
21
|
<Card title="Note" icon="badge-info">
|
|
22
22
|
Doccupine CLI is a command-line tool that helps you create and manage your
|
|
23
23
|
Doccupine project. It provides a simple and intuitive interface for creating
|
|
@@ -33,7 +33,7 @@ You can use the Cards component directly within your MDX files without any impor
|
|
|
33
33
|
|
|
34
34
|
Pass a \`href\` prop to turn the card into a clickable link. The card will display interactive hover and focus styles automatically.
|
|
35
35
|
|
|
36
|
-
\`\`\`
|
|
36
|
+
\`\`\`html
|
|
37
37
|
<Card title="Getting Started" icon="rocket" href="/cards">
|
|
38
38
|
Learn how to set up Doccupine and create your first documentation site.
|
|
39
39
|
</Card>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const codeMdxTemplate = "---\ntitle: \"Code\"\ndescription: \"Learn how to display inline code and code blocks in documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 3\n---\n\n# Code\n\nLearn how to display inline code and code blocks in documentation.\n\n## Adding Code Samples\n\nBoth inline code snippets and full code blocks are supported. Code blocks offer customization for syntax highlighting and more to improve readability and user experience.\n\n### Inline Code\n\nHighlight code within text by wrapping it with backticks:\n\n```text\nEnclose any `word` or `phrase` in backticks to format it as code.\n```\n\nEnclose any `word` or `phrase` in backticks to format it as code.\n\n## Code Blocks\n\nTo present larger code samples, use triple backticks for fenced code blocks. Each block can be copied, and\u2014if assistant features are enabled\u2014users can request explanations.\n\nYou may specify the language for highlighting:\n\n````text\n```java\nclass HelloWorld {\n
|
|
1
|
+
export declare const codeMdxTemplate = "---\ntitle: \"Code\"\ndescription: \"Learn how to display inline code and code blocks in documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 3\n---\n\n# Code\n\nLearn how to display inline code and code blocks in documentation.\n\n## Adding Code Samples\n\nBoth inline code snippets and full code blocks are supported. Code blocks offer customization for syntax highlighting and more to improve readability and user experience.\n\n### Inline Code\n\nHighlight code within text by wrapping it with backticks:\n\n```text\nEnclose any `word` or `phrase` in backticks to format it as code.\n```\n\nEnclose any `word` or `phrase` in backticks to format it as code.\n\n## Code Blocks\n\nTo present larger code samples, use triple backticks for fenced code blocks. Each block can be copied, and\u2014if assistant features are enabled\u2014users can request explanations.\n\nYou may specify the language for highlighting:\n\n````text\n```java\nclass HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n}\n```\n````\n\n```java\nclass HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n}\n```\n\n## Highlighting Diffs\n\nShow a visual diff of added or removed lines in your code blocks. Added lines are highlighted in green and removed lines are highlighted in red. Set the language to `diff` and prefix each changed line with `+` or `-`:\n\n````text\n```diff\nfunction calculateTotal(items) {\n- return items.reduce((sum, item) => sum + item.price, 0);\n+ const total = items.reduce((sum, item) => sum + item.price, 0);\n+ return Math.round(total * 100) / 100;\n}\n```\n````\n\n```diff\nfunction calculateTotal(items) {\n- return items.reduce((sum, item) => sum + item.price, 0);\n+ const total = items.reduce((sum, item) => sum + item.price, 0);\n+ return Math.round(total * 100) / 100;\n}\n```\n\n## File Names\n\nAdd a `title` to a code block to display a file name in the window bar, styled to match the GitHub-style header. Pass it through the `<Code />` component:\n\n```html\n<Code title=\"package.json\" language=\"json\" code={`{\\n \"name\": \"my-app\",\\n \"version\": \"1.0.0\"\\n}`} />\n```\n\n<Code title=\"package.json\" language=\"json\" code={`{\\n \"name\": \"my-app\",\\n \"version\": \"1.0.0\"\\n}`} />\n\n## Tabbed Code Blocks\n\nUse `<CodeTabs />` to show several variants of the same snippet - for example the same install command across package managers. Each tab is a keyboard-accessible button, and the copy button copies whichever tab is active. Each tab may set a `language` for highlighting (defaults to `bash`).\n\n```html\n<CodeTabs tabs={[{ label: \"npm\", code: \"npm install doccupine\" }, { label: \"pnpm\", code: \"pnpm add doccupine\" }, { label: \"yarn\", code: \"yarn add doccupine\" }]} />\n```\n\n<CodeTabs tabs={[{ label: \"npm\", code: \"npm install doccupine\" }, { label: \"pnpm\", code: \"pnpm add doccupine\" }, { label: \"yarn\", code: \"yarn add doccupine\" }]} />";
|
|
@@ -34,18 +34,18 @@ You may specify the language for highlighting:
|
|
|
34
34
|
\`\`\`\`text
|
|
35
35
|
\`\`\`java
|
|
36
36
|
class HelloWorld {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
public static void main(String[] args) {
|
|
38
|
+
System.out.println("Hello, World!");
|
|
39
|
+
}
|
|
40
40
|
}
|
|
41
41
|
\`\`\`
|
|
42
42
|
\`\`\`\`
|
|
43
43
|
|
|
44
44
|
\`\`\`java
|
|
45
45
|
class HelloWorld {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
public static void main(String[] args) {
|
|
47
|
+
System.out.println("Hello, World!");
|
|
48
|
+
}
|
|
49
49
|
}
|
|
50
50
|
\`\`\`
|
|
51
51
|
|
|
@@ -75,7 +75,7 @@ function calculateTotal(items) {
|
|
|
75
75
|
|
|
76
76
|
Add a \`title\` to a code block to display a file name in the window bar, styled to match the GitHub-style header. Pass it through the \`<Code />\` component:
|
|
77
77
|
|
|
78
|
-
\`\`\`
|
|
78
|
+
\`\`\`html
|
|
79
79
|
<Code title="package.json" language="json" code={\`{\\n "name": "my-app",\\n "version": "1.0.0"\\n}\`} />
|
|
80
80
|
\`\`\`
|
|
81
81
|
|
|
@@ -85,7 +85,7 @@ Add a \`title\` to a code block to display a file name in the window bar, styled
|
|
|
85
85
|
|
|
86
86
|
Use \`<CodeTabs />\` to show several variants of the same snippet - for example the same install command across package managers. Each tab is a keyboard-accessible button, and the copy button copies whichever tab is active. Each tab may set a \`language\` for highlighting (defaults to \`bash\`).
|
|
87
87
|
|
|
88
|
-
\`\`\`
|
|
88
|
+
\`\`\`html
|
|
89
89
|
<CodeTabs tabs={[{ label: "npm", code: "npm install doccupine" }, { label: "pnpm", code: "pnpm add doccupine" }, { label: "yarn", code: "yarn add doccupine" }]} />
|
|
90
90
|
\`\`\`
|
|
91
91
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const colorSwatchesMdxTemplate = "---\ntitle: \"Color Swatches\"\ndescription: \"Display color palettes with labeled swatches to document your theme colors.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 15\n---\n\n# Color Swatches\n\nDisplay color palettes with labeled swatches to document your theme colors.\n\nThe `ColorSwatch` component renders a visual preview of a color alongside its token name, and `ColorSwatchGroup` arranges multiple swatches in a responsive grid.\n\n## Usage\n\nYou can use the ColorSwatch components directly within your MDX files without any import:\n\n```
|
|
1
|
+
export declare const colorSwatchesMdxTemplate = "---\ntitle: \"Color Swatches\"\ndescription: \"Display color palettes with labeled swatches to document your theme colors.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 15\n---\n\n# Color Swatches\n\nDisplay color palettes with labeled swatches to document your theme colors.\n\nThe `ColorSwatch` component renders a visual preview of a color alongside its token name, and `ColorSwatchGroup` arranges multiple swatches in a responsive grid.\n\n## Usage\n\nYou can use the ColorSwatch components directly within your MDX files without any import:\n\n```html\n<ColorSwatchGroup>\n <ColorSwatch token=\"primary\" value=\"#6366F1\" />\n <ColorSwatch token=\"secondary\" value=\"#EC4899\" />\n <ColorSwatch token=\"success\" value=\"#10B981\" />\n <ColorSwatch token=\"warning\" value=\"#F59E0B\" />\n <ColorSwatch token=\"danger\" value=\"#EF4444\" />\n <ColorSwatch token=\"info\" value=\"#3B82F6\" />\n</ColorSwatchGroup>\n```\n\n<ColorSwatchGroup>\n <ColorSwatch token=\"primary\" value=\"#6366F1\" />\n <ColorSwatch token=\"secondary\" value=\"#EC4899\" />\n <ColorSwatch token=\"success\" value=\"#10B981\" />\n <ColorSwatch token=\"warning\" value=\"#F59E0B\" />\n <ColorSwatch token=\"danger\" value=\"#EF4444\" />\n <ColorSwatch token=\"info\" value=\"#3B82F6\" />\n</ColorSwatchGroup>\n\n## Dark Colors\n\nText color automatically adapts based on the background luminance, so dark swatches display white text:\n\n```html\n<ColorSwatchGroup>\n <ColorSwatch token=\"dark\" value=\"#1E1E2E\" />\n <ColorSwatch token=\"grayDark\" value=\"#374151\" />\n <ColorSwatch token=\"gray\" value=\"#6B7280\" />\n <ColorSwatch token=\"grayLight\" value=\"#D1D5DB\" />\n <ColorSwatch token=\"light\" value=\"#F9FAFB\" />\n <ColorSwatch token=\"white\" value=\"#FFFFFF\" />\n</ColorSwatchGroup>\n```\n\n<ColorSwatchGroup>\n <ColorSwatch token=\"dark\" value=\"#1E1E2E\" />\n <ColorSwatch token=\"grayDark\" value=\"#374151\" />\n <ColorSwatch token=\"gray\" value=\"#6B7280\" />\n <ColorSwatch token=\"grayLight\" value=\"#D1D5DB\" />\n <ColorSwatch token=\"light\" value=\"#F9FAFB\" />\n <ColorSwatch token=\"white\" value=\"#FFFFFF\" />\n</ColorSwatchGroup>\n\n## ColorSwatch Properties\n\n<Field value=\"token\" type=\"string\" required>\n The name or label displayed below the color preview (e.g. a design token name).\n</Field>\n\n<Field value=\"value\" type=\"string\" required>\n A hex color value (e.g. `#6366F1`). Displayed inside the color preview and used as the background.\n</Field>\n\n## ColorSwatchGroup Properties\n\n<Field value=\"children\" type=\"node\" required>\n One or more `ColorSwatch` components to display in a responsive grid.\n</Field>";
|
|
@@ -17,7 +17,7 @@ The \`ColorSwatch\` component renders a visual preview of a color alongside its
|
|
|
17
17
|
|
|
18
18
|
You can use the ColorSwatch components directly within your MDX files without any import:
|
|
19
19
|
|
|
20
|
-
\`\`\`
|
|
20
|
+
\`\`\`html
|
|
21
21
|
<ColorSwatchGroup>
|
|
22
22
|
<ColorSwatch token="primary" value="#6366F1" />
|
|
23
23
|
<ColorSwatch token="secondary" value="#EC4899" />
|
|
@@ -41,7 +41,7 @@ You can use the ColorSwatch components directly within your MDX files without an
|
|
|
41
41
|
|
|
42
42
|
Text color automatically adapts based on the background luminance, so dark swatches display white text:
|
|
43
43
|
|
|
44
|
-
\`\`\`
|
|
44
|
+
\`\`\`html
|
|
45
45
|
<ColorSwatchGroup>
|
|
46
46
|
<ColorSwatch token="dark" value="#1E1E2E" />
|
|
47
47
|
<ColorSwatch token="grayDark" value="#374151" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const columnsMdxTemplate = "---\ntitle: \"Columns\"\ndescription: \"Columns are used to organize content in a grid-like structure.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 13\n---\n\n# Columns\n\nArrange multiple cards neatly in a side-by-side grid layout.\n\nThe `Columns` component helps you organize several `Card` elements into a visually balanced grid. By choosing how many columns you want, you can control the layout and spacing of your cards.\n\n## Columns Usage\n\nYou can use the `Columns` component to create a grid of cards with a specified number of columns.\n\n```
|
|
1
|
+
export declare const columnsMdxTemplate = "---\ntitle: \"Columns\"\ndescription: \"Columns are used to organize content in a grid-like structure.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 13\n---\n\n# Columns\n\nArrange multiple cards neatly in a side-by-side grid layout.\n\nThe `Columns` component helps you organize several `Card` elements into a visually balanced grid. By choosing how many columns you want, you can control the layout and spacing of your cards.\n\n## Columns Usage\n\nYou can use the `Columns` component to create a grid of cards with a specified number of columns.\n\n```html\n<Columns cols={2}>\n <Card title=\"Getting Started\" icon=\"rocket\">\n Kick off your project using our easy quickstart guide.\n </Card>\n <Card title=\"API Reference\" icon=\"code\">\n Browse all endpoints, parameters, and code examples for your API integration.\n </Card>\n</Columns>\n```\n\n<Columns cols={2}>\n <Card title=\"Getting Started\" icon=\"rocket\">\n Kick off your project using our easy quickstart guide.\n </Card>\n <Card title=\"API Reference\" icon=\"code\">\n Browse all endpoints, parameters, and code examples for your API integration.\n </Card>\n</Columns>\n\n## Properties\n\n<Field value=\"cols\" type=\"number\">\n The number of columns in the grid. Defaults to 1.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the columns.\n</Field>";
|
|
@@ -17,12 +17,11 @@ The \`Columns\` component helps you organize several \`Card\` elements into a vi
|
|
|
17
17
|
|
|
18
18
|
You can use the \`Columns\` component to create a grid of cards with a specified number of columns.
|
|
19
19
|
|
|
20
|
-
\`\`\`
|
|
20
|
+
\`\`\`html
|
|
21
21
|
<Columns cols={2}>
|
|
22
22
|
<Card title="Getting Started" icon="rocket">
|
|
23
23
|
Kick off your project using our easy quickstart guide.
|
|
24
24
|
</Card>
|
|
25
|
-
|
|
26
25
|
<Card title="API Reference" icon="code">
|
|
27
26
|
Browse all endpoints, parameters, and code examples for your API integration.
|
|
28
27
|
</Card>
|
|
@@ -33,7 +32,6 @@ You can use the \`Columns\` component to create a grid of cards with a specified
|
|
|
33
32
|
<Card title="Getting Started" icon="rocket">
|
|
34
33
|
Kick off your project using our easy quickstart guide.
|
|
35
34
|
</Card>
|
|
36
|
-
|
|
37
35
|
<Card title="API Reference" icon="code">
|
|
38
36
|
Browse all endpoints, parameters, and code examples for your API integration.
|
|
39
37
|
</Card>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const fieldsMdxTemplate = "---\ntitle: \"Fields\"\ndescription: \"Configure parameters for your API or SDK documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 11\n---\n\n# Fields\n\nConfigure parameters for your API or SDK documentation.\n\nFields allow you to describe both the **inputs** (parameters) and **outputs** (responses) of your API. The main field component is available: `Field` for parameters and for responses.\n\n## Fields Usage\n\nUse the `<Field>` component to declare API or SDK parameters, or define the return values of an API.\n\n<Field value=\"param\" type=\"string\" required>\n Example definition of a parameter field.\n</Field>\n\n```
|
|
1
|
+
export declare const fieldsMdxTemplate = "---\ntitle: \"Fields\"\ndescription: \"Configure parameters for your API or SDK documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 11\n---\n\n# Fields\n\nConfigure parameters for your API or SDK documentation.\n\nFields allow you to describe both the **inputs** (parameters) and **outputs** (responses) of your API. The main field component is available: `Field` for parameters and for responses.\n\n## Fields Usage\n\nUse the `<Field>` component to declare API or SDK parameters, or define the return values of an API.\n\n<Field value=\"param\" type=\"string\" required>\n Example definition of a parameter field.\n</Field>\n\n```html\n<Field value=\"param\" type=\"string\" required>\n Example definition of a parameter field.\n</Field>\n```\n\n## Properties\n\n<Field value=\"value\" type=\"string\" required>\n The name of the field.\n</Field>\n\n<Field value=\"type\" type=\"string\" required>\n The type of the field.\n</Field>\n\n<Field value=\"required\" type=\"boolean\">\n Whether the field is required.\n</Field>";
|
|
@@ -21,7 +21,7 @@ Use the \`<Field>\` component to declare API or SDK parameters, or define the re
|
|
|
21
21
|
Example definition of a parameter field.
|
|
22
22
|
</Field>
|
|
23
23
|
|
|
24
|
-
\`\`\`
|
|
24
|
+
\`\`\`html
|
|
25
25
|
<Field value="param" type="string" required>
|
|
26
26
|
Example definition of a parameter field.
|
|
27
27
|
</Field>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const iconsMdxTemplate = "---\ntitle: \"Icons\"\ndescription: \"Integrate visual icons from well-known libraries to enrich your documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 10\n---\n\n# Icons\n\nIntegrate visual icons from well-known libraries to enrich your documentation.\n\nIcons can be sourced from Lucide, SVG elements, external URLs, or local files within your project directory.\n\n<Icon name=\"flag\" size={32} />\n\n```
|
|
1
|
+
export declare const iconsMdxTemplate = "---\ntitle: \"Icons\"\ndescription: \"Integrate visual icons from well-known libraries to enrich your documentation.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 10\n---\n\n# Icons\n\nIntegrate visual icons from well-known libraries to enrich your documentation.\n\nIcons can be sourced from Lucide, SVG elements, external URLs, or local files within your project directory.\n\n<Icon name=\"flag\" size={32} />\n\n```html\n<Icon name=\"flag\" size={32} />\n```\n\n## Inline icons\n\nYou can use icons directly within text to highlight information or add visual context.\n\n<Icon name=\"flag\" size={16} /> Build your documentation seamlessly.\n\n```html\n<Icon name=\"flag\" size={16} /> Build your documentation seamlessly.\n```\n\n## Properties\n\n<Field value=\"name\" type=\"string\" required>\n The icon to display.\n</Field>\n\n- [**Lucide icon**](https://lucide.dev/icons) name\n\n<Field value=\"size\" type=\"number\">\n The size of the icon in pixels.\n</Field>\n\n<Field value=\"color\" type=\"string\">\n The color of the icon as a hex code (for example, `#FF5733`).\n</Field>";
|
|
@@ -15,7 +15,7 @@ Icons can be sourced from Lucide, SVG elements, external URLs, or local files wi
|
|
|
15
15
|
|
|
16
16
|
<Icon name="flag" size={32} />
|
|
17
17
|
|
|
18
|
-
\`\`\`
|
|
18
|
+
\`\`\`html
|
|
19
19
|
<Icon name="flag" size={32} />
|
|
20
20
|
\`\`\`
|
|
21
21
|
|
|
@@ -25,7 +25,7 @@ You can use icons directly within text to highlight information or add visual co
|
|
|
25
25
|
|
|
26
26
|
<Icon name="flag" size={16} /> Build your documentation seamlessly.
|
|
27
27
|
|
|
28
|
-
\`\`\`
|
|
28
|
+
\`\`\`html
|
|
29
29
|
<Icon name="flag" size={16} /> Build your documentation seamlessly.
|
|
30
30
|
\`\`\`
|
|
31
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const stepsMdxTemplate = "---\ntitle: \"Steps\"\ndescription: \"Guide readers step-by-step using the Steps component.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 14\n---\n\n# Steps\n\nGuide readers step-by-step using the Steps component.\n\nThe Steps component is perfect for organizing procedures or workflows in a clear sequence. Include as many individual steps as necessary to outline your process.\n\n## Steps Usage\n\nYou can use the `Steps` component to create a step-by-step guide. Each step is represented by a `Step` component, which includes a title and content.\n\n```
|
|
1
|
+
export declare const stepsMdxTemplate = "---\ntitle: \"Steps\"\ndescription: \"Guide readers step-by-step using the Steps component.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 14\n---\n\n# Steps\n\nGuide readers step-by-step using the Steps component.\n\nThe Steps component is perfect for organizing procedures or workflows in a clear sequence. Include as many individual steps as necessary to outline your process.\n\n## Steps Usage\n\nYou can use the `Steps` component to create a step-by-step guide. Each step is represented by a `Step` component, which includes a title and content.\n\n```html\n<Steps>\n <Step title=\"Step 1\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n </Step>\n <Step title=\"Step 2\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n </Step>\n <Step title=\"Step 3\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n </Step>\n</Steps>\n```\n\n<Steps>\n <Step title=\"Step 1\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n </Step>\n <Step title=\"Step 2\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n </Step>\n <Step title=\"Step 3\">\n Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n </Step>\n</Steps>\n\n## Properties\n\n<Field value=\"title\" type=\"string\" required>\n The title of the step.\n</Field>\n\n<Field value=\"icon\" type=\"string\">\n A [Lucide](https://lucide.dev/icons) icon name shown next to the step title.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the step.\n</Field>";
|
|
@@ -17,16 +17,14 @@ The Steps component is perfect for organizing procedures or workflows in a clear
|
|
|
17
17
|
|
|
18
18
|
You can use the \`Steps\` component to create a step-by-step guide. Each step is represented by a \`Step\` component, which includes a title and content.
|
|
19
19
|
|
|
20
|
-
\`\`\`
|
|
20
|
+
\`\`\`html
|
|
21
21
|
<Steps>
|
|
22
22
|
<Step title="Step 1">
|
|
23
23
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
24
24
|
</Step>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</Step>
|
|
29
|
-
|
|
25
|
+
<Step title="Step 2">
|
|
26
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
27
|
+
</Step>
|
|
30
28
|
<Step title="Step 3">
|
|
31
29
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
32
30
|
</Step>
|
|
@@ -37,11 +35,9 @@ You can use the \`Steps\` component to create a step-by-step guide. Each step is
|
|
|
37
35
|
<Step title="Step 1">
|
|
38
36
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
39
37
|
</Step>
|
|
40
|
-
|
|
41
38
|
<Step title="Step 2">
|
|
42
39
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
43
40
|
</Step>
|
|
44
|
-
|
|
45
41
|
<Step title="Step 3">
|
|
46
42
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
47
43
|
</Step>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const tabsMdxTemplate = "---\ntitle: \"Tabs\"\ndescription: \"Use the Tabs component to display different content sections in a switchable panel layout.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 5\n---\n\n# Tabs\n\nUse the Tabs component to display different content sections in a switchable panel layout.\n\nTabs are useful for grouping related information while keeping the interface tidy. You can create as many tabs as needed, and each one can hold other components, text, or code snippets.\n\n## Tabs Usage\n\nYou can use the Tabs component directly within your MDX files without any import. The following example shows a basic usage:\n\n````
|
|
1
|
+
export declare const tabsMdxTemplate = "---\ntitle: \"Tabs\"\ndescription: \"Use the Tabs component to display different content sections in a switchable panel layout.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 5\n---\n\n# Tabs\n\nUse the Tabs component to display different content sections in a switchable panel layout.\n\nTabs are useful for grouping related information while keeping the interface tidy. You can create as many tabs as needed, and each one can hold other components, text, or code snippets.\n\n## Tabs Usage\n\nYou can use the Tabs component directly within your MDX files without any import. The following example shows a basic usage:\n\n````html\n<Tabs>\n <TabContent title=\"First tab\" icon=\"code\">\n \u261D\uFE0F This is the content shown only when the first tab is active.\n\n Tabs can include all kinds of components. For example, a simple Java program:\n ```java\n class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n }\n ```\n </TabContent>\n <TabContent title=\"Second tab\" icon=\"book-open\">\n \u270C\uFE0F Content inside this second tab is separate from the first.\n </TabContent>\n <TabContent title=\"Third tab\" icon=\"rocket\">\n \uD83D\uDCAA This third tab contains its own unique content.\n </TabContent>\n</Tabs>\n````\n\n<Tabs>\n <TabContent title=\"First tab\" icon=\"code\">\n \u261D\uFE0F This is the content shown only when the first tab is active.\n\n Tabs can include all kinds of components. For example, a simple Java program:\n ```java\n class HelloWorld {\n public static void main(String[] args) {\n System.out.println(\"Hello, World!\");\n }\n }\n ```\n </TabContent>\n <TabContent title=\"Second tab\" icon=\"book-open\">\n \u270C\uFE0F Content inside this second tab is separate from the first.\n </TabContent>\n <TabContent title=\"Third tab\" icon=\"rocket\">\n \uD83D\uDCAA This third tab contains its own unique content.\n </TabContent>\n</Tabs>\n\nEach tab also accepts an optional `icon` - any [Lucide](https://lucide.dev/icons) icon name - rendered before its title, as shown above.\n\n## Properties\n\n<Field value=\"title\" type=\"string\">\n The title of the tab.\n</Field>\n\n<Field value=\"icon\" type=\"string\">\n Optional [Lucide](https://lucide.dev/icons) icon name (kebab-case, e.g.\n `rocket`) shown next to the tab title.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the tabs.\n</Field>";
|
|
@@ -17,20 +17,19 @@ Tabs are useful for grouping related information while keeping the interface tid
|
|
|
17
17
|
|
|
18
18
|
You can use the Tabs component directly within your MDX files without any import. The following example shows a basic usage:
|
|
19
19
|
|
|
20
|
-
\`\`\`\`
|
|
20
|
+
\`\`\`\`html
|
|
21
21
|
<Tabs>
|
|
22
22
|
<TabContent title="First tab" icon="code">
|
|
23
23
|
☝️ This is the content shown only when the first tab is active.
|
|
24
24
|
|
|
25
25
|
Tabs can include all kinds of components. For example, a simple Java program:
|
|
26
26
|
\`\`\`java
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
27
|
+
class HelloWorld {
|
|
28
|
+
public static void main(String[] args) {
|
|
29
|
+
System.out.println("Hello, World!");
|
|
31
30
|
}
|
|
31
|
+
}
|
|
32
32
|
\`\`\`
|
|
33
|
-
|
|
34
33
|
</TabContent>
|
|
35
34
|
<TabContent title="Second tab" icon="book-open">
|
|
36
35
|
✌️ Content inside this second tab is separate from the first.
|
|
@@ -48,12 +47,11 @@ You can use the Tabs component directly within your MDX files without any import
|
|
|
48
47
|
Tabs can include all kinds of components. For example, a simple Java program:
|
|
49
48
|
\`\`\`java
|
|
50
49
|
class HelloWorld {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
public static void main(String[] args) {
|
|
51
|
+
System.out.println("Hello, World!");
|
|
52
|
+
}
|
|
54
53
|
}
|
|
55
54
|
\`\`\`
|
|
56
|
-
|
|
57
55
|
</TabContent>
|
|
58
56
|
<TabContent title="Second tab" icon="book-open">
|
|
59
57
|
✌️ Content inside this second tab is separate from the first.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const updateMdxTemplate = "---\ntitle: \"Update\"\ndescription: \"Easily manage and present change history.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 12\n---\n\n# Update\n\nEasily manage and present change history.\n\nThe `Update` component helps you display release notes, version details, and changelogs in a standardized format.\n\nEach `Update` label is added to the \"On this page\" sidebar and gets its own anchor, so you can link directly to a specific entry.\n\n<Update label=\"v0.0.1\" description=\"Example\">\n ## Example entry\n\
|
|
1
|
+
export declare const updateMdxTemplate = "---\ntitle: \"Update\"\ndescription: \"Easily manage and present change history.\"\ndate: \"2026-02-19\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 12\n---\n\n# Update\n\nEasily manage and present change history.\n\nThe `Update` component helps you display release notes, version details, and changelogs in a standardized format.\n\nEach `Update` label is added to the \"On this page\" sidebar and gets its own anchor, so you can link directly to a specific entry.\n\n<Update label=\"v0.0.1\" description=\"Example\">\n ## Example entry\n\n You can include anything here - images, code snippets, or a bullet list of modifications.\n\n \n\n ### Key additions\n\n - Fully responsive layout\n - Individual anchor for each update\n - Automatic RSS feed entry generation\n</Update>\n\n## Update Usage\n\nYou can combine multiple `Update` components to build complete changelogs.\n\n```html\n<Update label=\"v0.0.1\" description=\"Example\">\n ## Example entry\n\n You can include anything here - images, code snippets, or a bullet list of modifications.\n\n \n\n ### Key additions\n\n - Fully responsive layout\n - Individual anchor for each update\n - Automatic RSS feed entry generation\n</Update>\n```\n\n## Properties\n\n<Field value=\"label\" type=\"string\" required>\n The label of the update. It also appears in the page's \"On this page\"\n navigation and acts as a deep-link anchor to this entry.\n</Field>\n\n<Field value=\"description\" type=\"string\" required>\n The description of the update.\n</Field>\n\n<Field value=\"children\" type=\"node\" required>\n The content of the update.\n</Field>";
|
|
@@ -18,36 +18,34 @@ Each \`Update\` label is added to the "On this page" sidebar and gets its own an
|
|
|
18
18
|
<Update label="v0.0.1" description="Example">
|
|
19
19
|
## Example entry
|
|
20
20
|
|
|
21
|
-
You can include anything here - images, code snippets, or a bullet list of modifications.
|
|
21
|
+
You can include anything here - images, code snippets, or a bullet list of modifications.
|
|
22
22
|
|
|
23
|
-

|
|
23
|
+

|
|
24
24
|
|
|
25
|
-
### Key additions
|
|
26
|
-
|
|
27
|
-
- Fully responsive layout
|
|
28
|
-
- Individual anchor for each update
|
|
29
|
-
- Automatic RSS feed entry generation
|
|
25
|
+
### Key additions
|
|
30
26
|
|
|
27
|
+
- Fully responsive layout
|
|
28
|
+
- Individual anchor for each update
|
|
29
|
+
- Automatic RSS feed entry generation
|
|
31
30
|
</Update>
|
|
32
31
|
|
|
33
32
|
## Update Usage
|
|
34
33
|
|
|
35
34
|
You can combine multiple \`Update\` components to build complete changelogs.
|
|
36
35
|
|
|
37
|
-
\`\`\`
|
|
36
|
+
\`\`\`html
|
|
38
37
|
<Update label="v0.0.1" description="Example">
|
|
39
38
|
## Example entry
|
|
40
39
|
|
|
41
|
-
You can include anything here - images, code snippets, or a bullet list of modifications.
|
|
42
|
-
|
|
43
|
-

|
|
40
|
+
You can include anything here - images, code snippets, or a bullet list of modifications.
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+

|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
- Individual anchor for each update
|
|
49
|
-
- Automatic RSS feed entry generation
|
|
44
|
+
### Key additions
|
|
50
45
|
|
|
46
|
+
- Fully responsive layout
|
|
47
|
+
- Individual anchor for each update
|
|
48
|
+
- Automatic RSS feed entry generation
|
|
51
49
|
</Update>
|
|
52
50
|
\`\`\`
|
|
53
51
|
|
|
@@ -23,8 +23,8 @@ export const packageJsonTemplate = JSON.stringify({
|
|
|
23
23
|
minisearch: "^7.2.0",
|
|
24
24
|
next: "16.2.10",
|
|
25
25
|
"next-mdx-remote": "^6.0.0",
|
|
26
|
-
"posthog-js": "^1.398.
|
|
27
|
-
"posthog-node": "^5.
|
|
26
|
+
"posthog-js": "^1.398.4",
|
|
27
|
+
"posthog-node": "^5.40.0",
|
|
28
28
|
react: "19.2.7",
|
|
29
29
|
"react-dom": "19.2.7",
|
|
30
30
|
"rehype-highlight": "^7.0.2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const prettierignoreTemplate = "node_modules\nconvex/_generated\npackage.json\npackage-lock.json\npnpm-lock.yaml\npnpm-workspace.yaml\n";
|
|
1
|
+
export declare const prettierignoreTemplate = "node_modules\nconvex/_generated\npublic\npackage.json\npackage-lock.json\npnpm-lock.yaml\npnpm-workspace.yaml\n";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doccupine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.110",
|
|
4
4
|
"description": "Free and open-source documentation platform. Write MDX, get a production-ready site with AI chat, built-in components, and an MCP server - in one command.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/fs-extra": "^11.0.4",
|
|
49
|
-
"@types/node": "^26.1.
|
|
49
|
+
"@types/node": "^26.1.1",
|
|
50
50
|
"@types/prompts": "^2.4.9",
|
|
51
51
|
"prettier": "^3.9.4",
|
|
52
52
|
"typescript": "^6.0.3",
|
|
53
|
-
"vitest": "^4.1.
|
|
53
|
+
"vitest": "^4.1.10"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
56
56
|
"dist/**/*"
|