@wrksz/docs 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +157 -2
- package/dist/agents.d.ts +30 -0
- package/dist/agents.js +70 -0
- package/dist/components/agent-logos.js +90 -0
- package/dist/components/agent-prompt.d.ts +29 -0
- package/dist/components/agent-prompt.js +100 -0
- package/dist/components/badge.d.ts +16 -0
- package/dist/components/badge.js +26 -0
- package/dist/components/brand.js +30 -0
- package/dist/components/callout.d.ts +24 -0
- package/dist/components/callout.js +58 -0
- package/dist/components/cards.d.ts +26 -0
- package/dist/components/cards.js +48 -0
- package/dist/components/code-body.js +18 -0
- package/dist/components/code-group.d.ts +20 -0
- package/dist/components/code-group.js +41 -0
- package/dist/components/code-tabs.d.ts +30 -0
- package/dist/components/code-tabs.js +49 -0
- package/dist/components/content-tabs.d.ts +14 -0
- package/dist/components/content-tabs.js +27 -0
- package/dist/components/copy-code.js +41 -0
- package/dist/components/deferred-analytics.js +5 -0
- package/dist/components/details.d.ts +20 -0
- package/dist/components/details.js +29 -0
- package/dist/components/heading-link.js +23 -0
- package/dist/components/heading.d.ts +5 -0
- package/dist/components/heading.js +22 -0
- package/dist/components/icons.js +362 -0
- package/dist/components/image.d.ts +27 -0
- package/dist/components/image.js +204 -0
- package/dist/components/inline-text.js +14 -0
- package/dist/components/install.d.ts +22 -0
- package/dist/components/install.js +62 -0
- package/dist/components/mdx-tabs.d.ts +22 -0
- package/dist/components/mdx-tabs.js +30 -0
- package/dist/components/practice.d.ts +41 -0
- package/dist/components/practice.js +99 -0
- package/dist/components/props.d.ts +37 -0
- package/dist/components/props.js +70 -0
- package/dist/components/status.js +35 -0
- package/dist/components/steps.d.ts +18 -0
- package/dist/components/steps.js +23 -0
- package/dist/components/theme-switch.js +31 -0
- package/dist/components/ui/kbd.js +410 -0
- package/dist/components/ui/scroll-area.js +169 -0
- package/dist/components/ui/table.d.ts +33 -0
- package/dist/components/ui/table.js +103 -0
- package/dist/components/ui/tabs.js +69 -0
- package/dist/components/ui/toast.js +629 -0
- package/dist/components/ui/tooltip.js +31 -0
- package/dist/components/wrksz-mark.js +12 -0
- package/dist/docs/index.d.ts +8 -0
- package/dist/docs/index.js +8 -0
- package/dist/docs/layout.d.ts +6 -0
- package/dist/docs/layout.js +10 -0
- package/dist/docs/page-actions.d.ts +36 -0
- package/dist/docs/page-actions.js +136 -0
- package/dist/docs/page-footer.d.ts +14 -0
- package/dist/docs/page-footer.js +68 -0
- package/dist/docs/page-header.d.ts +13 -0
- package/dist/docs/page-header.js +57 -0
- package/dist/docs/page.d.ts +16 -0
- package/dist/docs/page.js +38 -0
- package/dist/docs/reading.js +64 -0
- package/dist/docs/shell.js +101 -0
- package/dist/docs/sidebar.js +161 -0
- package/dist/docs/toc-bar.d.ts +12 -0
- package/dist/docs/toc-bar.js +132 -0
- package/dist/docs/toc.d.ts +11 -0
- package/dist/docs/toc.js +127 -0
- package/dist/fonts/Inter-Italic.woff2 +0 -0
- package/dist/fonts/Inter-LICENSE.txt +92 -0
- package/dist/fonts/Inter.woff2 +0 -0
- package/dist/fonts/IoskeleyMono-Bold.woff2 +0 -0
- package/dist/fonts/IoskeleyMono-Italic.woff2 +0 -0
- package/dist/fonts/IoskeleyMono-LICENSE.txt +92 -0
- package/dist/fonts/IoskeleyMono-Regular.woff2 +0 -0
- package/dist/fonts.d.ts +1 -0
- package/dist/fonts.js +38 -0
- package/dist/home/features.d.ts +39 -0
- package/dist/home/features.js +75 -0
- package/dist/home/footer.d.ts +4 -0
- package/dist/home/footer.js +79 -0
- package/dist/home/hero-content.js +102 -0
- package/dist/home/hero-install.js +128 -0
- package/dist/home/hero-stage.d.ts +4 -0
- package/dist/home/hero-stage.js +9 -0
- package/dist/home/hero.d.ts +6 -0
- package/dist/home/hero.js +16 -0
- package/dist/home/home-header.d.ts +1 -0
- package/dist/home/home-header.js +173 -0
- package/dist/home/index.d.ts +7 -0
- package/dist/home/index.js +7 -0
- package/dist/home/layout.d.ts +6 -0
- package/dist/home/layout.js +15 -0
- package/dist/home/reveal.js +31 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/lib/clipboard.js +55 -0
- package/dist/lib/cn.js +1 -0
- package/dist/lib/format.js +9 -0
- package/dist/lib/package-manager-script.js +12 -0
- package/dist/lib/package-manager.js +54 -0
- package/dist/lib/theme-config.js +10 -0
- package/dist/llms.d.ts +34 -0
- package/dist/llms.js +111 -0
- package/dist/next.d.ts +18 -0
- package/dist/next.js +45 -0
- package/dist/node_modules/.pnpm/@types_mdast@4.0.4/node_modules/@types/mdast/index.d.ts +930 -0
- package/dist/node_modules/.pnpm/@types_mdx@2.0.14/node_modules/@types/mdx/types.d.ts +81 -0
- package/dist/node_modules/.pnpm/@types_unist@3.0.3/node_modules/@types/unist/index.d.ts +80 -0
- package/dist/registry.d.ts +61 -0
- package/dist/registry.js +113 -0
- package/dist/root.d.ts +9 -0
- package/dist/root.js +34 -0
- package/dist/search.d.ts +5 -0
- package/dist/search.js +43 -0
- package/dist/seo/index.d.ts +6 -0
- package/dist/seo/index.js +6 -0
- package/dist/seo/json-ld.d.ts +17 -0
- package/dist/seo/json-ld.js +88 -0
- package/dist/seo/metadata.d.ts +21 -0
- package/dist/seo/metadata.js +75 -0
- package/dist/seo/robots.d.ts +14 -0
- package/dist/seo/robots.js +18 -0
- package/dist/seo/sitemap.d.ts +16 -0
- package/dist/seo/sitemap.js +26 -0
- package/dist/seo/url.d.ts +6 -0
- package/dist/seo/url.js +11 -0
- package/dist/server.js +63 -0
- package/dist/site-context.js +17 -0
- package/dist/site.d.ts +41 -0
- package/dist/site.js +13 -0
- package/dist/source/compile.d.ts +6 -0
- package/dist/source/compile.js +32 -0
- package/dist/source/errors.d.ts +4 -0
- package/dist/source/errors.js +10 -0
- package/dist/source/frontmatter.d.ts +13 -0
- package/dist/source/frontmatter.js +102 -0
- package/dist/source/highlight.js +102 -0
- package/dist/source/index.d.ts +36 -0
- package/dist/source/index.js +102 -0
- package/dist/source/markdown.d.ts +48 -0
- package/dist/source/markdown.js +393 -0
- package/dist/source/prompt.js +33 -0
- package/dist/source/scan.d.ts +8 -0
- package/dist/source/scan.js +64 -0
- package/dist/source/toc.d.ts +5 -0
- package/dist/source/toc.js +28 -0
- package/dist/source/tree.d.ts +29 -0
- package/dist/source/tree.js +91 -0
- package/dist/styles.css +879 -0
- package/dist/typography.d.ts +101 -0
- package/dist/typography.js +232 -0
- package/package.json +84 -4
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import { AgentPrompt } from "./components/agent-prompt.js";
|
|
3
|
+
import { Badge, BadgeTone } from "./components/badge.js";
|
|
4
|
+
import { Callout, CalloutType } from "./components/callout.js";
|
|
5
|
+
import { Card, Cards } from "./components/cards.js";
|
|
6
|
+
import { CodeGroup } from "./components/code-group.js";
|
|
7
|
+
import { Details } from "./components/details.js";
|
|
8
|
+
import { Image } from "./components/image.js";
|
|
9
|
+
import { Install } from "./components/install.js";
|
|
10
|
+
import { Do, Dont, Pair, Pairs } from "./components/practice.js";
|
|
11
|
+
import { Prop, Props } from "./components/props.js";
|
|
12
|
+
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableProps, TableRow } from "./components/ui/table.js";
|
|
13
|
+
import { Steps } from "./components/steps.js";
|
|
14
|
+
import { MdxTab, MdxTabs } from "./components/mdx-tabs.js";
|
|
15
|
+
import { Heading } from "./components/heading.js";
|
|
16
|
+
import { ContentTabs } from "./components/content-tabs.js";
|
|
17
|
+
import { CodeTab, CodeTabs } from "./components/code-tabs.js";
|
|
18
|
+
type Props$1<T extends keyof React.JSX.IntrinsicElements> = ComponentProps<T>;
|
|
19
|
+
export declare function Prose({ className, ...props }: Props$1<"div">): import("react").JSX.Element;
|
|
20
|
+
export declare function Title({ className, children, ...props }: Props$1<"h1">): import("react").JSX.Element;
|
|
21
|
+
export declare function Lead({ className, ...props }: Props$1<"p">): import("react").JSX.Element;
|
|
22
|
+
export declare function Text({ className, ...props }: Props$1<"p">): import("react").JSX.Element;
|
|
23
|
+
export declare function Caption({ className, ...props }: Props$1<"p">): import("react").JSX.Element;
|
|
24
|
+
export declare function Code({ className, ...props }: Props$1<"code">): import("react").JSX.Element;
|
|
25
|
+
export declare function TextLink({ href, className, children, ...props }: Props$1<"a">): import("react").JSX.Element;
|
|
26
|
+
export declare function Strong({ className, ...props }: Props$1<"strong">): import("react").JSX.Element;
|
|
27
|
+
export type ListProps = ({
|
|
28
|
+
ordered?: false;
|
|
29
|
+
} & Props$1<"ul">) | ({
|
|
30
|
+
ordered: true;
|
|
31
|
+
} & Props$1<"ol">);
|
|
32
|
+
export declare function List(props: ListProps): import("react").JSX.Element;
|
|
33
|
+
export declare function ListItem({ className, ...props }: Props$1<"li">): import("react").JSX.Element;
|
|
34
|
+
export declare function Blockquote({ className, ...props }: Props$1<"blockquote">): import("react").JSX.Element;
|
|
35
|
+
export declare function Separator({ className, ...props }: Props$1<"hr">): import("react").JSX.Element;
|
|
36
|
+
declare function MdxHeadCell({ align, ...props }: Props$1<"th">): import("react").JSX.Element;
|
|
37
|
+
declare function MdxCell({ align, ...props }: Props$1<"td">): import("react").JSX.Element;
|
|
38
|
+
type PreProps = Props$1<"pre"> & {
|
|
39
|
+
"data-title"?: string;
|
|
40
|
+
"data-language"?: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* A highlighted code block. `rehypeHighlight` renders the `<pre>`; this frames it with the
|
|
44
|
+
* file name from the fence's `title="…"`, a copy button that leaves out lines a diff
|
|
45
|
+
* removes, and a horizontal scroll area.
|
|
46
|
+
*/
|
|
47
|
+
export declare function CodeBlock({ "data-title": title, "data-language": language, className, children, ...props }: PreProps): import("react").JSX.Element;
|
|
48
|
+
export declare function Mark({ children }: {
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
}): import("react").JSX.Element;
|
|
51
|
+
/** A paragraph that holds only an image renders the image alone; a figure can't sit in a `<p>`. */
|
|
52
|
+
declare function MdxParagraph(props: Props$1<"p">): import("react").JSX.Element;
|
|
53
|
+
export declare const typography: {
|
|
54
|
+
h1: typeof Title;
|
|
55
|
+
h2: (props: Props$1<"h2">) => import("react").JSX.Element;
|
|
56
|
+
h3: (props: Props$1<"h2">) => import("react").JSX.Element;
|
|
57
|
+
h4: (props: Props$1<"h2">) => import("react").JSX.Element;
|
|
58
|
+
p: typeof MdxParagraph;
|
|
59
|
+
img: typeof Image;
|
|
60
|
+
a: typeof TextLink;
|
|
61
|
+
strong: typeof Strong;
|
|
62
|
+
code: typeof Code;
|
|
63
|
+
ul: (props: Props$1<"ul">) => import("react").JSX.Element;
|
|
64
|
+
ol: (props: Props$1<"ol">) => import("react").JSX.Element;
|
|
65
|
+
li: typeof ListItem;
|
|
66
|
+
blockquote: typeof Blockquote;
|
|
67
|
+
hr: typeof Separator;
|
|
68
|
+
table: typeof Table;
|
|
69
|
+
thead: typeof TableHeader;
|
|
70
|
+
tbody: typeof TableBody;
|
|
71
|
+
tr: typeof TableRow;
|
|
72
|
+
th: typeof MdxHeadCell;
|
|
73
|
+
td: typeof MdxCell;
|
|
74
|
+
pre: typeof CodeBlock;
|
|
75
|
+
AgentPrompt: typeof AgentPrompt;
|
|
76
|
+
Badge: typeof Badge;
|
|
77
|
+
Callout: typeof Callout;
|
|
78
|
+
Card: typeof Card;
|
|
79
|
+
Cards: typeof Cards;
|
|
80
|
+
CodeGroup: typeof CodeGroup;
|
|
81
|
+
Details: typeof Details;
|
|
82
|
+
Do: typeof Do;
|
|
83
|
+
Dont: typeof Dont;
|
|
84
|
+
Image: typeof Image;
|
|
85
|
+
Install: typeof Install;
|
|
86
|
+
Pair: typeof Pair;
|
|
87
|
+
Pairs: typeof Pairs;
|
|
88
|
+
Prop: typeof Prop;
|
|
89
|
+
Props: typeof Props;
|
|
90
|
+
PropsTable: typeof Props;
|
|
91
|
+
Table: typeof Table;
|
|
92
|
+
TableBody: typeof TableBody;
|
|
93
|
+
TableCell: typeof TableCell;
|
|
94
|
+
TableHead: typeof TableHead;
|
|
95
|
+
TableHeader: typeof TableHeader;
|
|
96
|
+
TableRow: typeof TableRow;
|
|
97
|
+
Steps: typeof Steps;
|
|
98
|
+
Tab: typeof MdxTab;
|
|
99
|
+
Tabs: typeof MdxTabs;
|
|
100
|
+
};
|
|
101
|
+
export { AgentPrompt, Badge, type BadgeTone, Callout, type CalloutType, Card, Cards, CodeGroup, type CodeTab, CodeTabs, ContentTabs, Details, Do, Dont, Heading, Image, Install, Pair, Pairs, Prop, Props, Steps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow };
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import Link from "next/link";
|
|
2
|
+
import { Children, isValidElement } from "react";
|
|
3
|
+
import { AgentPrompt } from "./components/agent-prompt.js";
|
|
4
|
+
import { Badge } from "./components/badge.js";
|
|
5
|
+
import { Callout } from "./components/callout.js";
|
|
6
|
+
import { Card, Cards } from "./components/cards.js";
|
|
7
|
+
import { CodeBody } from "./components/code-body.js";
|
|
8
|
+
import { CodeGroup } from "./components/code-group.js";
|
|
9
|
+
import { CopyCode } from "./components/copy-code.js";
|
|
10
|
+
import { Details } from "./components/details.js";
|
|
11
|
+
import { Heading } from "./components/heading.js";
|
|
12
|
+
import { Image } from "./components/image.js";
|
|
13
|
+
import { Install } from "./components/install.js";
|
|
14
|
+
import { Do, Dont, Pair, Pairs } from "./components/practice.js";
|
|
15
|
+
import { Prop, Props } from "./components/props.js";
|
|
16
|
+
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./components/ui/table.js";
|
|
17
|
+
import { Steps } from "./components/steps.js";
|
|
18
|
+
import { MdxTab, MdxTabs } from "./components/mdx-tabs.js";
|
|
19
|
+
import { cn } from "./lib/cn.js";
|
|
20
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
|
+
import { ContentTabs } from "./components/content-tabs.js";
|
|
22
|
+
import { CodeTabs } from "./components/code-tabs.js";
|
|
23
|
+
// src/typography.tsx
|
|
24
|
+
function Prose({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
className: cn("docs-prose", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function Title({ className, children, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx("h1", {
|
|
32
|
+
className: cn("text-[1.75rem] leading-tight font-medium tracking-[-0.015em] text-balance text-fd-foreground", className),
|
|
33
|
+
...props,
|
|
34
|
+
children
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function Lead({ className, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("p", {
|
|
39
|
+
className: cn("text-[1.0625rem] leading-relaxed text-pretty text-fd-muted-foreground", className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function Text({ className, ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsx("p", {
|
|
45
|
+
className: cn("text-base leading-[1.7] text-pretty text-fd-foreground", className),
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function Caption({ className, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ jsx("p", {
|
|
51
|
+
className: cn("text-sm leading-normal text-pretty text-fd-muted-foreground", className),
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function Code({ className, ...props }) {
|
|
56
|
+
return /* @__PURE__ */ jsx("code", {
|
|
57
|
+
className: cn("rounded-[5px] bg-fd-card px-[0.3em] py-[0.1em] font-mono text-[0.9em] text-fd-foreground wrap-anywhere", className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const LINK = "rounded-sm text-fd-foreground underline decoration-fd-border underline-offset-[0.2em] outline-none transition-[text-decoration-color] duration-150 hover:decoration-fd-foreground focus-visible:ring-2 focus-visible:ring-fd-ring";
|
|
62
|
+
function TextLink({ href = "", className, children, ...props }) {
|
|
63
|
+
if (href.startsWith("/") || href.startsWith("#")) return /* @__PURE__ */ jsx(Link, {
|
|
64
|
+
href,
|
|
65
|
+
className: cn(LINK, className),
|
|
66
|
+
...props,
|
|
67
|
+
children
|
|
68
|
+
});
|
|
69
|
+
return /* @__PURE__ */ jsx("a", {
|
|
70
|
+
href,
|
|
71
|
+
target: "_blank",
|
|
72
|
+
rel: "noreferrer noopener",
|
|
73
|
+
className: cn(LINK, className),
|
|
74
|
+
...props,
|
|
75
|
+
children
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function Strong({ className, ...props }) {
|
|
79
|
+
return /* @__PURE__ */ jsx("strong", {
|
|
80
|
+
className: cn("font-medium text-fd-foreground", className),
|
|
81
|
+
...props
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function List(props) {
|
|
85
|
+
if (props.ordered) {
|
|
86
|
+
const { ordered: _ordered, className, ...rest } = props;
|
|
87
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
88
|
+
className: cn("docs-list docs-list-ordered flex flex-col gap-2 text-base leading-[1.7]", className),
|
|
89
|
+
...rest
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
const { ordered: _ordered, className, ...rest } = props;
|
|
93
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
94
|
+
className: cn("docs-list docs-list-bullets flex flex-col gap-2 text-base leading-[1.7]", className),
|
|
95
|
+
...rest
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function ListItem({ className, ...props }) {
|
|
99
|
+
return /* @__PURE__ */ jsx("li", {
|
|
100
|
+
className: cn("text-pretty", className),
|
|
101
|
+
...props
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function Blockquote({ className, ...props }) {
|
|
105
|
+
return /* @__PURE__ */ jsx("blockquote", {
|
|
106
|
+
className: cn("border-s-2 border-fd-border ps-4 text-base leading-[1.7] text-pretty text-fd-muted-foreground", className),
|
|
107
|
+
...props
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function Separator({ className, ...props }) {
|
|
111
|
+
return /* @__PURE__ */ jsx("hr", {
|
|
112
|
+
className: cn("border-fd-border", className),
|
|
113
|
+
...props
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/** GFM alignment (`:---:`) arrives as an `align` attribute; anything else means left. */
|
|
117
|
+
function alignOf(value) {
|
|
118
|
+
return value === "center" || value === "right" ? value : "left";
|
|
119
|
+
}
|
|
120
|
+
function MdxHeadCell({ align, ...props }) {
|
|
121
|
+
return /* @__PURE__ */ jsx(TableHead, {
|
|
122
|
+
align: alignOf(align),
|
|
123
|
+
...props
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function MdxCell({ align, ...props }) {
|
|
127
|
+
return /* @__PURE__ */ jsx(TableCell, {
|
|
128
|
+
align: alignOf(align),
|
|
129
|
+
...props
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* A highlighted code block. `rehypeHighlight` renders the `<pre>`; this frames it with the
|
|
134
|
+
* file name from the fence's `title="…"`, a copy button that leaves out lines a diff
|
|
135
|
+
* removes, and a horizontal scroll area.
|
|
136
|
+
*/
|
|
137
|
+
function CodeBlock({ "data-title": title, "data-language": language, className, children, ...props }) {
|
|
138
|
+
const lines = isValidElement(children) ? children.props.children : children;
|
|
139
|
+
return /* @__PURE__ */ jsxs("figure", {
|
|
140
|
+
"data-code-block": true,
|
|
141
|
+
className: "docs-code relative overflow-hidden rounded-xl bg-fd-card [--scroll-area-bg:var(--color-fd-card)]",
|
|
142
|
+
children: [
|
|
143
|
+
title ? /* @__PURE__ */ jsx("figcaption", {
|
|
144
|
+
className: "flex h-10 items-center border-b border-fd-border ps-4 pe-12 font-mono text-[0.8125rem] text-fd-muted-foreground",
|
|
145
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
146
|
+
className: "truncate",
|
|
147
|
+
children: title
|
|
148
|
+
})
|
|
149
|
+
}) : null,
|
|
150
|
+
title ? /* @__PURE__ */ jsx(CopyCode, { className: "absolute top-1 right-1" }) : /* @__PURE__ */ jsx("span", {
|
|
151
|
+
className: "absolute top-2 right-0 z-3 flex bg-[linear-gradient(to_right,transparent,var(--color-fd-card)_1.25rem)] ps-6 pe-2",
|
|
152
|
+
children: /* @__PURE__ */ jsx(CopyCode, {})
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ jsx(CodeBody, {
|
|
155
|
+
...props,
|
|
156
|
+
"data-language": language,
|
|
157
|
+
className,
|
|
158
|
+
children: lines
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
function Mark({ children }) {
|
|
164
|
+
return /* @__PURE__ */ jsx("mark", {
|
|
165
|
+
className: "rounded-[3px] bg-fd-accent px-0.5 text-inherit",
|
|
166
|
+
children
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/** A paragraph that holds only an image renders the image alone; a figure can't sit in a `<p>`. */
|
|
170
|
+
function MdxParagraph(props) {
|
|
171
|
+
const only = Children.toArray(props.children);
|
|
172
|
+
if (only.length === 1 && isValidElement(only[0]) && only[0].type === Image) return only[0];
|
|
173
|
+
return /* @__PURE__ */ jsx(Text, { ...props });
|
|
174
|
+
}
|
|
175
|
+
const heading = (level) => function MdxHeading(props) {
|
|
176
|
+
return /* @__PURE__ */ jsx(Heading, {
|
|
177
|
+
level,
|
|
178
|
+
...props
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
const typography = {
|
|
182
|
+
h1: Title,
|
|
183
|
+
h2: heading(2),
|
|
184
|
+
h3: heading(3),
|
|
185
|
+
h4: heading(4),
|
|
186
|
+
p: MdxParagraph,
|
|
187
|
+
img: Image,
|
|
188
|
+
a: TextLink,
|
|
189
|
+
strong: Strong,
|
|
190
|
+
code: Code,
|
|
191
|
+
ul: (props) => /* @__PURE__ */ jsx(List, { ...props }),
|
|
192
|
+
ol: (props) => /* @__PURE__ */ jsx(List, {
|
|
193
|
+
ordered: true,
|
|
194
|
+
...props
|
|
195
|
+
}),
|
|
196
|
+
li: ListItem,
|
|
197
|
+
blockquote: Blockquote,
|
|
198
|
+
hr: Separator,
|
|
199
|
+
table: Table,
|
|
200
|
+
thead: TableHeader,
|
|
201
|
+
tbody: TableBody,
|
|
202
|
+
tr: TableRow,
|
|
203
|
+
th: MdxHeadCell,
|
|
204
|
+
td: MdxCell,
|
|
205
|
+
pre: CodeBlock,
|
|
206
|
+
AgentPrompt,
|
|
207
|
+
Badge,
|
|
208
|
+
Callout,
|
|
209
|
+
Card,
|
|
210
|
+
Cards,
|
|
211
|
+
CodeGroup,
|
|
212
|
+
Details,
|
|
213
|
+
Do,
|
|
214
|
+
Dont,
|
|
215
|
+
Image,
|
|
216
|
+
Install,
|
|
217
|
+
Pair,
|
|
218
|
+
Pairs,
|
|
219
|
+
Prop,
|
|
220
|
+
Props,
|
|
221
|
+
PropsTable: Props,
|
|
222
|
+
Table,
|
|
223
|
+
TableBody,
|
|
224
|
+
TableCell,
|
|
225
|
+
TableHead,
|
|
226
|
+
TableHeader,
|
|
227
|
+
TableRow,
|
|
228
|
+
Steps,
|
|
229
|
+
Tab: MdxTab,
|
|
230
|
+
Tabs: MdxTabs
|
|
231
|
+
};
|
|
232
|
+
export { AgentPrompt, Badge, Blockquote, Callout, Caption, Card, Cards, Code, CodeBlock, CodeGroup, CodeTabs, ContentTabs, Details, Do, Dont, Heading, Image, Install, Lead, List, ListItem, Mark, Pair, Pairs, Prop, Props, Prose, Separator, Steps, Strong, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Text, TextLink, Title, typography };
|
package/package.json
CHANGED
|
@@ -1,6 +1,86 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrksz/docs",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A documentation engine for Next.js: MDX, page tree, table of contents, search and llms.txt",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/jakubwarkusz/docs.git"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"*.css"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./docs": {
|
|
23
|
+
"types": "./dist/docs/index.d.ts",
|
|
24
|
+
"default": "./dist/docs/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./fonts": {
|
|
27
|
+
"types": "./dist/fonts.d.ts",
|
|
28
|
+
"default": "./dist/fonts.js"
|
|
29
|
+
},
|
|
30
|
+
"./home": {
|
|
31
|
+
"types": "./dist/home/index.d.ts",
|
|
32
|
+
"default": "./dist/home/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./llms": {
|
|
35
|
+
"types": "./dist/llms.d.ts",
|
|
36
|
+
"default": "./dist/llms.js"
|
|
37
|
+
},
|
|
38
|
+
"./next": {
|
|
39
|
+
"types": "./dist/next.d.ts",
|
|
40
|
+
"default": "./dist/next.js"
|
|
41
|
+
},
|
|
42
|
+
"./root": {
|
|
43
|
+
"types": "./dist/root.d.ts",
|
|
44
|
+
"default": "./dist/root.js"
|
|
45
|
+
},
|
|
46
|
+
"./seo": {
|
|
47
|
+
"types": "./dist/seo/index.d.ts",
|
|
48
|
+
"default": "./dist/seo/index.js"
|
|
49
|
+
},
|
|
50
|
+
"./source": {
|
|
51
|
+
"types": "./dist/source/index.d.ts",
|
|
52
|
+
"default": "./dist/source/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./styles.css": "./dist/styles.css",
|
|
55
|
+
"./typography": {
|
|
56
|
+
"types": "./dist/typography.d.ts",
|
|
57
|
+
"default": "./dist/typography.js"
|
|
58
|
+
},
|
|
59
|
+
"./package.json": "./package.json"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@base-ui/react": "1.8.0",
|
|
63
|
+
"@mdx-js/mdx": "^3.1.1",
|
|
64
|
+
"@pierre/highlights": "^0.6.0",
|
|
65
|
+
"@vercel/analytics": "^2.0.1",
|
|
66
|
+
"@wrksz/cue": "^0.1.1",
|
|
67
|
+
"@wrksz/themes": "^2.1.2",
|
|
68
|
+
"github-slugger": "^2.0.0",
|
|
69
|
+
"hast-util-to-string": "^3.0.1",
|
|
70
|
+
"mdast-util-mdx-jsx": "^3.2.2",
|
|
71
|
+
"remark-gfm": "^4.0.1",
|
|
72
|
+
"remark-mdx": "^3.1.1",
|
|
73
|
+
"remark-parse": "^11.0.0",
|
|
74
|
+
"remark-stringify": "^11.0.0",
|
|
75
|
+
"tailwind-merge": "^3.7.1",
|
|
76
|
+
"unified": "^11.0.5",
|
|
77
|
+
"unist-util-visit": "^5.2.0",
|
|
78
|
+
"yaml": "^2.9.1"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"next": ">=16",
|
|
82
|
+
"react": "^19.0.0",
|
|
83
|
+
"react-dom": "^19.0.0",
|
|
84
|
+
"tailwindcss": "^4.0.0"
|
|
85
|
+
}
|
|
86
|
+
}
|