doccupine 0.0.142 → 0.0.143
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/lib/structures.js +2 -0
- package/dist/templates/components/MDXComponents.d.ts +1 -1
- package/dist/templates/components/MDXComponents.js +1 -1
- package/dist/templates/components/layout/Space.d.ts +1 -0
- package/dist/templates/components/layout/Space.js +70 -0
- package/dist/templates/mdx/space.mdx.d.ts +1 -1
- package/dist/templates/mdx/space.mdx.js +32 -28
- package/package.json +1 -1
package/dist/lib/structures.js
CHANGED
|
@@ -58,6 +58,7 @@ import { sidePanelTemplate } from "../templates/components/layout/SidePanel.js";
|
|
|
58
58
|
import { notFoundComponentTemplate } from "../templates/components/layout/NotFound.js";
|
|
59
59
|
import { siteGateComponentTemplate } from "../templates/components/layout/SiteGate.js";
|
|
60
60
|
import { slugTemplate } from "../templates/components/layout/Slug.js";
|
|
61
|
+
import { spaceTemplate } from "../templates/components/layout/Space.js";
|
|
61
62
|
import { staticLinksTemplate } from "../templates/components/layout/StaticLinks.js";
|
|
62
63
|
import { stepsTemplate } from "../templates/components/layout/Steps.js";
|
|
63
64
|
import { tabsTemplate } from "../templates/components/layout/Tabs.js";
|
|
@@ -252,6 +253,7 @@ export const appStructure = {
|
|
|
252
253
|
"components/layout/NotFound.tsx": notFoundComponentTemplate,
|
|
253
254
|
"components/layout/SiteGate.tsx": siteGateComponentTemplate,
|
|
254
255
|
"components/layout/Slug.ts": slugTemplate,
|
|
256
|
+
"components/layout/Space.tsx": spaceTemplate,
|
|
255
257
|
"components/layout/StaticLinks.tsx": staticLinksTemplate,
|
|
256
258
|
"components/layout/Steps.tsx": stepsTemplate,
|
|
257
259
|
"components/layout/Tabs.tsx": tabsTemplate,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const mdxComponentsTemplate = "import React from \"react\";\nimport Link from \"next/link\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype MDXComponents = Record<string, React.ComponentType<any>>;\nimport {
|
|
1
|
+
export declare const mdxComponentsTemplate = "import React from \"react\";\nimport Link from \"next/link\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype MDXComponents = Record<string, React.ComponentType<any>>;\nimport { Badge } from \"@/components/layout/Badge\";\nimport { Code as CodeBlock, CodeTabs } from \"@/components/layout/Code\";\nimport { Card } from \"@/components/layout/Card\";\nimport { Accordion } from \"@/components/layout/Accordion\";\nimport { Tabs, TabContent } from \"@/components/layout/Tabs\";\nimport { Callout } from \"@/components/layout/Callout\";\nimport { Icon } from \"@/components/layout/Icon\";\nimport { Columns } from \"@/components/layout/Columns\";\nimport { Field } from \"@/components/layout/Field\";\nimport { Frame } from \"@/components/layout/Frame\";\nimport { Prompt } from \"@/components/layout/Prompt\";\nimport { SidePanel } from \"@/components/layout/SidePanel\";\nimport { Space } from \"@/components/layout/Space\";\nimport { Update } from \"@/components/layout/Update\";\nimport { Steps, Step } from \"@/components/layout/Steps\";\nimport { Button } from \"@/components/layout/Button\";\nimport { ColorSwatch, ColorSwatchGroup } from \"@/components/layout/ColorSwatch\";\nimport { DemoTheme } from \"@/components/layout/DemoTheme\";\nimport { Tooltip } from \"@/components/layout/Tooltip\";\nimport { Tree as TreeRoot } from \"@/components/layout/Tree\";\nimport {\n parseTreeChildren,\n TreeFolder,\n TreeFile,\n} from \"@/components/layout/TreeData\";\nimport { createSlugger } from \"@/components/layout/Slug\";\n\ninterface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {\n children?: React.ReactNode;\n}\n\ninterface PreProps extends React.HTMLAttributes<HTMLPreElement> {\n children?: React.ReactNode;\n}\n\n// The Tree compound is assembled here in shared code: statics attached to\n// the client component would not survive the client-reference boundary, and\n// the Tree.Folder / Tree.File elements MDX creates must be parsed in the\n// same runtime that created them, where marker identity is guaranteed. Only\n// the resulting plain TreeNode data crosses to the client component.\nconst Tree = Object.assign(\n function Tree({ children }: { children?: React.ReactNode }) {\n return <TreeRoot nodes={parseTreeChildren(children, \"node\")} />;\n },\n { Folder: TreeFolder, File: TreeFile },\n);\n\n// <Tree> and <FileTree> are aliases; either tag supports either syntax.\nconst FileTree = Tree;\n\nexport function extractAllTextFromChildren(children: React.ReactNode): string {\n if (children == null) return \"\";\n if (typeof children === \"string\") return children;\n if (typeof children === \"number\") return String(children);\n if (typeof children === \"boolean\") return \"\";\n if (Array.isArray(children))\n return children.map(extractAllTextFromChildren).join(\"\");\n if (React.isValidElement(children)) {\n const element = children as React.ReactElement<{\n children?: React.ReactNode;\n }>;\n return extractAllTextFromChildren(element.props.children);\n }\n return \"\";\n}\n\n// Map <pre><code class=\"language-xyz\"> to our <Code /> component\nexport function Pre(props: PreProps) {\n const child = React.Children.only(props.children) as React.ReactElement<{\n className?: string;\n children?: React.ReactNode;\n }> | null;\n if (child && child.type === \"code\") {\n const className = child.props.className || \"\";\n const match = /language-(\\w+)/.exec(className);\n const language = match ? match[1] : undefined;\n const code = extractAllTextFromChildren(child.props.children).replace(\n /\\n$/,\n \"\",\n );\n if (language) {\n return (\n <CodeBlock className={className} code={code} language={language} />\n );\n }\n }\n return <pre {...props} />;\n}\n\nexport function useMDXComponents(components: MDXComponents): MDXComponents {\n // One slugger per render so repeated heading text (and <Update> labels)\n // resolve to unique, document-order ids that match the index sidebar built\n // in components/Docs.tsx.\n const slug = createSlugger();\n return {\n // Headings with auto-generated ids for TOC and deep links\n h1: ({ children, ...props }: HeadingProps) => {\n const id = slug(extractAllTextFromChildren(children));\n return (\n <h1 id={id} {...props}>\n {children}\n </h1>\n );\n },\n h2: ({ children, ...props }: HeadingProps) => {\n const id = slug(extractAllTextFromChildren(children));\n return (\n <h2 id={id} {...props}>\n {children}\n </h2>\n );\n },\n h3: ({ children, ...props }: HeadingProps) => {\n const id = slug(extractAllTextFromChildren(children));\n return (\n <h3 id={id} {...props}>\n {children}\n </h3>\n );\n },\n h4: ({ children, ...props }: HeadingProps) => {\n const id = slug(extractAllTextFromChildren(children));\n return (\n <h4 id={id} {...props}>\n {children}\n </h4>\n );\n },\n h5: ({ children, ...props }: HeadingProps) => {\n const id = slug(extractAllTextFromChildren(children));\n return (\n <h5 id={id} {...props}>\n {children}\n </h5>\n );\n },\n h6: ({ children, ...props }: HeadingProps) => {\n const id = slug(extractAllTextFromChildren(children));\n return (\n <h6 id={id} {...props}>\n {children}\n </h6>\n );\n },\n\n // Links - use Next.js Link for internal paths\n a: ({\n href,\n children,\n ...props\n }: React.AnchorHTMLAttributes<HTMLAnchorElement>) => {\n if (href && href.startsWith(\"/\")) {\n return (\n <Link href={href} {...props}>\n {children}\n </Link>\n );\n }\n return (\n <a href={href} target=\"_blank\" rel=\"noopener noreferrer\" {...props}>\n {children}\n </a>\n );\n },\n\n // Tables - wrap in a div for responsive overflow\n table: (props: React.TableHTMLAttributes<HTMLTableElement>) => (\n <div className=\"table-wrapper\">\n <table {...props} />\n </div>\n ),\n\n // Code blocks\n pre: Pre,\n\n // Expose your custom components for MDX usage\n Badge,\n Code: CodeBlock,\n CodeTabs,\n Card,\n Accordion,\n Tabs,\n TabContent,\n Callout,\n Icon,\n Columns,\n Field,\n Frame,\n Prompt,\n SidePanel,\n // Share the heading slugger so an <Update> label anchor stays unique and\n // in document order alongside the surrounding headings. Only consume a\n // slug when a label is present so a label-less <Update> does not crash the\n // slugger (Update itself renders gracefully without a label anchor).\n Update: (props: React.ComponentProps<typeof Update>) => (\n <Update {...props} id={props.label ? slug(props.label) : undefined} />\n ),\n Steps,\n Step,\n Button,\n ColorSwatch,\n ColorSwatchGroup,\n DemoTheme,\n Tooltip,\n Tree,\n FileTree,\n Space,\n ...components,\n };\n}\n";
|
|
@@ -3,7 +3,6 @@ import Link from "next/link";
|
|
|
3
3
|
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
5
|
type MDXComponents = Record<string, React.ComponentType<any>>;
|
|
6
|
-
import { Space } from "cherry-styled-components";
|
|
7
6
|
import { Badge } from "@/components/layout/Badge";
|
|
8
7
|
import { Code as CodeBlock, CodeTabs } from "@/components/layout/Code";
|
|
9
8
|
import { Card } from "@/components/layout/Card";
|
|
@@ -16,6 +15,7 @@ import { Field } from "@/components/layout/Field";
|
|
|
16
15
|
import { Frame } from "@/components/layout/Frame";
|
|
17
16
|
import { Prompt } from "@/components/layout/Prompt";
|
|
18
17
|
import { SidePanel } from "@/components/layout/SidePanel";
|
|
18
|
+
import { Space } from "@/components/layout/Space";
|
|
19
19
|
import { Update } from "@/components/layout/Update";
|
|
20
20
|
import { Steps, Step } from "@/components/layout/Steps";
|
|
21
21
|
import { Button } from "@/components/layout/Button";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const spaceTemplate = "\"use client\";\nimport { Space as CherrySpace } from \"cherry-styled-components\";\n\ntype SpaceSize = number | \"none\";\n\ninterface SpaceProps {\n size?: SpaceSize;\n xs?: SpaceSize;\n sm?: SpaceSize;\n md?: SpaceSize;\n lg?: SpaceSize;\n xl?: SpaceSize;\n xxl?: SpaceSize;\n xxxl?: SpaceSize;\n horizontal?: boolean;\n // Cherry marks its styling props transient with a $ prefix, which is an\n // implementation detail of styled-components rather than something an MDX\n // author should have to know - every other Doccupine component takes plain\n // names. Space was previously re-exported straight from Cherry, so pages\n // written against that API still pass the $ form: it stays accepted here,\n // with the documented plain name winning when both are present, so an\n // upgrade never silently drops a gap from an existing page.\n $size?: SpaceSize;\n $xs?: SpaceSize;\n $sm?: SpaceSize;\n $md?: SpaceSize;\n $lg?: SpaceSize;\n $xl?: SpaceSize;\n $xxl?: SpaceSize;\n $xxxl?: SpaceSize;\n $horizontal?: boolean;\n}\n\nfunction Space({\n size,\n xs,\n sm,\n md,\n lg,\n xl,\n xxl,\n xxxl,\n horizontal,\n $size,\n $xs,\n $sm,\n $md,\n $lg,\n $xl,\n $xxl,\n $xxxl,\n $horizontal,\n}: SpaceProps) {\n return (\n <CherrySpace\n $size={size ?? $size}\n $xs={xs ?? $xs}\n $sm={sm ?? $sm}\n $md={md ?? $md}\n $lg={lg ?? $lg}\n $xl={xl ?? $xl}\n $xxl={xxl ?? $xxl}\n $xxxl={xxxl ?? $xxxl}\n $horizontal={horizontal ?? $horizontal}\n />\n );\n}\n\nexport { Space };\n";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export const spaceTemplate = `"use client";
|
|
2
|
+
import { Space as CherrySpace } from "cherry-styled-components";
|
|
3
|
+
|
|
4
|
+
type SpaceSize = number | "none";
|
|
5
|
+
|
|
6
|
+
interface SpaceProps {
|
|
7
|
+
size?: SpaceSize;
|
|
8
|
+
xs?: SpaceSize;
|
|
9
|
+
sm?: SpaceSize;
|
|
10
|
+
md?: SpaceSize;
|
|
11
|
+
lg?: SpaceSize;
|
|
12
|
+
xl?: SpaceSize;
|
|
13
|
+
xxl?: SpaceSize;
|
|
14
|
+
xxxl?: SpaceSize;
|
|
15
|
+
horizontal?: boolean;
|
|
16
|
+
// Cherry marks its styling props transient with a $ prefix, which is an
|
|
17
|
+
// implementation detail of styled-components rather than something an MDX
|
|
18
|
+
// author should have to know - every other Doccupine component takes plain
|
|
19
|
+
// names. Space was previously re-exported straight from Cherry, so pages
|
|
20
|
+
// written against that API still pass the $ form: it stays accepted here,
|
|
21
|
+
// with the documented plain name winning when both are present, so an
|
|
22
|
+
// upgrade never silently drops a gap from an existing page.
|
|
23
|
+
$size?: SpaceSize;
|
|
24
|
+
$xs?: SpaceSize;
|
|
25
|
+
$sm?: SpaceSize;
|
|
26
|
+
$md?: SpaceSize;
|
|
27
|
+
$lg?: SpaceSize;
|
|
28
|
+
$xl?: SpaceSize;
|
|
29
|
+
$xxl?: SpaceSize;
|
|
30
|
+
$xxxl?: SpaceSize;
|
|
31
|
+
$horizontal?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function Space({
|
|
35
|
+
size,
|
|
36
|
+
xs,
|
|
37
|
+
sm,
|
|
38
|
+
md,
|
|
39
|
+
lg,
|
|
40
|
+
xl,
|
|
41
|
+
xxl,
|
|
42
|
+
xxxl,
|
|
43
|
+
horizontal,
|
|
44
|
+
$size,
|
|
45
|
+
$xs,
|
|
46
|
+
$sm,
|
|
47
|
+
$md,
|
|
48
|
+
$lg,
|
|
49
|
+
$xl,
|
|
50
|
+
$xxl,
|
|
51
|
+
$xxxl,
|
|
52
|
+
$horizontal,
|
|
53
|
+
}: SpaceProps) {
|
|
54
|
+
return (
|
|
55
|
+
<CherrySpace
|
|
56
|
+
$size={size ?? $size}
|
|
57
|
+
$xs={xs ?? $xs}
|
|
58
|
+
$sm={sm ?? $sm}
|
|
59
|
+
$md={md ?? $md}
|
|
60
|
+
$lg={lg ?? $lg}
|
|
61
|
+
$xl={xl ?? $xl}
|
|
62
|
+
$xxl={xxl ?? $xxl}
|
|
63
|
+
$xxxl={xxxl ?? $xxxl}
|
|
64
|
+
$horizontal={horizontal ?? $horizontal}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { Space };
|
|
70
|
+
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const spaceMdxTemplate = "---\ntitle: \"Space\"\ndescription: \"Add a precise vertical or horizontal gap between blocks, with per-breakpoint control.\"\ndate: \"2026-07-30\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 24\n---\n# Space\n\nInsert a fixed gap between two blocks.\n\nMarkdown already spaces paragraphs, headings, lists, and tables for you, and that default rhythm is the right choice almost everywhere. Reach for `Space` when you need a specific gap the defaults do not give you: separating a dense table from the heading that follows it, opening up a landing page, or tightening a stack of cards on small screens.\n\n<Callout type=\"note\">\n If you find yourself adding a `Space` after every section, the page is telling you it wants a different structure - try `Steps`, `Columns`, or a heading instead.\n</Callout>\n\n## Space Usage\n\nSet
|
|
1
|
+
export declare const spaceMdxTemplate = "---\ntitle: \"Space\"\ndescription: \"Add a precise vertical or horizontal gap between blocks, with per-breakpoint control.\"\ndate: \"2026-07-30\"\ncategory: \"Components\"\ncategoryOrder: 1\norder: 24\n---\n# Space\n\nInsert a fixed gap between two blocks.\n\nMarkdown already spaces paragraphs, headings, lists, and tables for you, and that default rhythm is the right choice almost everywhere. Reach for `Space` when you need a specific gap the defaults do not give you: separating a dense table from the heading that follows it, opening up a landing page, or tightening a stack of cards on small screens.\n\n<Callout type=\"note\">\n If you find yourself adding a `Space` after every section, the page is telling you it wants a different structure - try `Steps`, `Columns`, or a heading instead.\n</Callout>\n\n## Space Usage\n\nSet `size` to the gap you want, in pixels.\n\n```html\nText above the gap.\n\n<Space size={60} />\n\nText below the gap.\n```\n\nText above the gap.\n\n<Space size={60} />\n\nText below the gap.\n\n## Responsive sizing\n\nA gap that looks right on a wide screen is often too large on a phone. Each breakpoint has its own prop, so you can grow the gap as the viewport widens.\n\n```html\n<Space size={20} md={40} xl={80} />\n```\n\nThat renders a 20px gap by default, 40px from the `md` breakpoint up, and 80px from `xl` up.\n\nEvery breakpoint prop is a `min-width` media query, so a value applies at that width and every width above it until a larger breakpoint overrides it:\n\n| Prop | Applies from |\n| ------ | ------------ |\n| `xs` | 0px |\n| `sm` | 576px |\n| `md` | 768px |\n| `lg` | 992px |\n| `xl` | 1200px |\n| `xxl` | 1440px |\n| `xxxl` | 1920px |\n\n`size` sets the gap at every width. Use it alone for a constant gap, or as the base that the breakpoint props build on.\n\n## Removing the space at a breakpoint\n\nPass `\"none\"` instead of a number to drop the gap entirely at that width. This is the usual way to add breathing room on desktop without wasting vertical space on a phone.\n\n```html\n<Space size=\"none\" lg={64} />\n```\n\nHere there is no gap at all below the `lg` breakpoint, and a 64px gap from `lg` up.\n\n## Horizontal spacing\n\nAdd `horizontal` to space things apart along the inline axis instead of the block axis. The size props then control width rather than height.\n\nIt belongs inside a line of inline content, where a gap along that axis has something to sit between. Dropping one into a button widens the distance between the label and the icon by the size you give it, on top of the spacing the button already applies:\n\n```html\n<Button icon=\"arrow-right\" iconPosition=\"right\">\n Get started\n <Space size={24} horizontal />\n</Button>\n```\n\n<Button icon=\"arrow-right\" iconPosition=\"right\">\n Get started\n <Space size={24} horizontal />\n</Button>\n\n## Properties\n\n<Field value=\"size\" type=\"number | 'none'\">\n The gap at every viewport width, in pixels. Pass `\"none\"` to render nothing.\n</Field>\n\n<Field value=\"xs\" type=\"number | 'none'\">\n Overrides the gap from 0px up.\n</Field>\n\n<Field value=\"sm\" type=\"number | 'none'\">\n Overrides the gap from 576px up.\n</Field>\n\n<Field value=\"md\" type=\"number | 'none'\">\n Overrides the gap from 768px up.\n</Field>\n\n<Field value=\"lg\" type=\"number | 'none'\">\n Overrides the gap from 992px up.\n</Field>\n\n<Field value=\"xl\" type=\"number | 'none'\">\n Overrides the gap from 1200px up.\n</Field>\n\n<Field value=\"xxl\" type=\"number | 'none'\">\n Overrides the gap from 1440px up.\n</Field>\n\n<Field value=\"xxxl\" type=\"number | 'none'\">\n Overrides the gap from 1920px up.\n</Field>\n\n<Field value=\"horizontal\" type=\"boolean\">\n Spaces along the inline axis instead of the block axis, so the size props control width. Defaults to false.\n</Field>\n\n<Callout type=\"note\">\n Pages written before these names existed pass the same props with a `$` prefix (`$size`, `$md`, `$horizontal`). Those still render, so nothing breaks on upgrade, but the unprefixed names above are the supported form - the `$` prefix belongs to the styling library underneath, not to the components you author with.\n</Callout>";
|
|
@@ -18,19 +18,19 @@ Markdown already spaces paragraphs, headings, lists, and tables for you, and tha
|
|
|
18
18
|
|
|
19
19
|
## Space Usage
|
|
20
20
|
|
|
21
|
-
Set
|
|
21
|
+
Set \`size\` to the gap you want, in pixels.
|
|
22
22
|
|
|
23
23
|
\`\`\`html
|
|
24
24
|
Text above the gap.
|
|
25
25
|
|
|
26
|
-
<Space
|
|
26
|
+
<Space size={60} />
|
|
27
27
|
|
|
28
28
|
Text below the gap.
|
|
29
29
|
\`\`\`
|
|
30
30
|
|
|
31
31
|
Text above the gap.
|
|
32
32
|
|
|
33
|
-
<Space
|
|
33
|
+
<Space size={60} />
|
|
34
34
|
|
|
35
35
|
Text below the gap.
|
|
36
36
|
|
|
@@ -39,87 +39,91 @@ Text below the gap.
|
|
|
39
39
|
A gap that looks right on a wide screen is often too large on a phone. Each breakpoint has its own prop, so you can grow the gap as the viewport widens.
|
|
40
40
|
|
|
41
41
|
\`\`\`html
|
|
42
|
-
<Space
|
|
42
|
+
<Space size={20} md={40} xl={80} />
|
|
43
43
|
\`\`\`
|
|
44
44
|
|
|
45
45
|
That renders a 20px gap by default, 40px from the \`md\` breakpoint up, and 80px from \`xl\` up.
|
|
46
46
|
|
|
47
47
|
Every breakpoint prop is a \`min-width\` media query, so a value applies at that width and every width above it until a larger breakpoint overrides it:
|
|
48
48
|
|
|
49
|
-
| Prop
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
49
|
+
| Prop | Applies from |
|
|
50
|
+
| ------ | ------------ |
|
|
51
|
+
| \`xs\` | 0px |
|
|
52
|
+
| \`sm\` | 576px |
|
|
53
|
+
| \`md\` | 768px |
|
|
54
|
+
| \`lg\` | 992px |
|
|
55
|
+
| \`xl\` | 1200px |
|
|
56
|
+
| \`xxl\` | 1440px |
|
|
57
|
+
| \`xxxl\` | 1920px |
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
\`size\` sets the gap at every width. Use it alone for a constant gap, or as the base that the breakpoint props build on.
|
|
60
60
|
|
|
61
61
|
## Removing the space at a breakpoint
|
|
62
62
|
|
|
63
63
|
Pass \`"none"\` instead of a number to drop the gap entirely at that width. This is the usual way to add breathing room on desktop without wasting vertical space on a phone.
|
|
64
64
|
|
|
65
65
|
\`\`\`html
|
|
66
|
-
<Space
|
|
66
|
+
<Space size="none" lg={64} />
|
|
67
67
|
\`\`\`
|
|
68
68
|
|
|
69
69
|
Here there is no gap at all below the \`lg\` breakpoint, and a 64px gap from \`lg\` up.
|
|
70
70
|
|
|
71
71
|
## Horizontal spacing
|
|
72
72
|
|
|
73
|
-
Add
|
|
73
|
+
Add \`horizontal\` to space things apart along the inline axis instead of the block axis. The size props then control width rather than height.
|
|
74
74
|
|
|
75
75
|
It belongs inside a line of inline content, where a gap along that axis has something to sit between. Dropping one into a button widens the distance between the label and the icon by the size you give it, on top of the spacing the button already applies:
|
|
76
76
|
|
|
77
77
|
\`\`\`html
|
|
78
78
|
<Button icon="arrow-right" iconPosition="right">
|
|
79
79
|
Get started
|
|
80
|
-
<Space
|
|
80
|
+
<Space size={24} horizontal />
|
|
81
81
|
</Button>
|
|
82
82
|
\`\`\`
|
|
83
83
|
|
|
84
84
|
<Button icon="arrow-right" iconPosition="right">
|
|
85
85
|
Get started
|
|
86
|
-
<Space
|
|
86
|
+
<Space size={24} horizontal />
|
|
87
87
|
</Button>
|
|
88
88
|
|
|
89
89
|
## Properties
|
|
90
90
|
|
|
91
|
-
<Field value="
|
|
91
|
+
<Field value="size" type="number | 'none'">
|
|
92
92
|
The gap at every viewport width, in pixels. Pass \`"none"\` to render nothing.
|
|
93
93
|
</Field>
|
|
94
94
|
|
|
95
|
-
<Field value="
|
|
95
|
+
<Field value="xs" type="number | 'none'">
|
|
96
96
|
Overrides the gap from 0px up.
|
|
97
97
|
</Field>
|
|
98
98
|
|
|
99
|
-
<Field value="
|
|
99
|
+
<Field value="sm" type="number | 'none'">
|
|
100
100
|
Overrides the gap from 576px up.
|
|
101
101
|
</Field>
|
|
102
102
|
|
|
103
|
-
<Field value="
|
|
103
|
+
<Field value="md" type="number | 'none'">
|
|
104
104
|
Overrides the gap from 768px up.
|
|
105
105
|
</Field>
|
|
106
106
|
|
|
107
|
-
<Field value="
|
|
107
|
+
<Field value="lg" type="number | 'none'">
|
|
108
108
|
Overrides the gap from 992px up.
|
|
109
109
|
</Field>
|
|
110
110
|
|
|
111
|
-
<Field value="
|
|
111
|
+
<Field value="xl" type="number | 'none'">
|
|
112
112
|
Overrides the gap from 1200px up.
|
|
113
113
|
</Field>
|
|
114
114
|
|
|
115
|
-
<Field value="
|
|
115
|
+
<Field value="xxl" type="number | 'none'">
|
|
116
116
|
Overrides the gap from 1440px up.
|
|
117
117
|
</Field>
|
|
118
118
|
|
|
119
|
-
<Field value="
|
|
119
|
+
<Field value="xxxl" type="number | 'none'">
|
|
120
120
|
Overrides the gap from 1920px up.
|
|
121
121
|
</Field>
|
|
122
122
|
|
|
123
|
-
<Field value="
|
|
123
|
+
<Field value="horizontal" type="boolean">
|
|
124
124
|
Spaces along the inline axis instead of the block axis, so the size props control width. Defaults to false.
|
|
125
|
-
</Field
|
|
125
|
+
</Field>
|
|
126
|
+
|
|
127
|
+
<Callout type="note">
|
|
128
|
+
Pages written before these names existed pass the same props with a \`$\` prefix (\`$size\`, \`$md\`, \`$horizontal\`). Those still render, so nothing breaks on upgrade, but the unprefixed names above are the supported form - the \`$\` prefix belongs to the styling library underneath, not to the components you author with.
|
|
129
|
+
</Callout>`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doccupine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.143",
|
|
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": {
|