@farming-labs/fumadocs 0.0.2-beta.1

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.
@@ -0,0 +1,7 @@
1
+ import { createRequire } from "node:module";
2
+
3
+ //#region \0rolldown/runtime.js
4
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
5
+
6
+ //#endregion
7
+ export { __require };
@@ -0,0 +1,97 @@
1
+ import { DocsTheme } from "@farming-labs/docs";
2
+
3
+ //#region src/darksharp/index.d.ts
4
+ /**
5
+ * Darksharp UI defaults — all-black, sharp edges, zero-radius aesthetic.
6
+ *
7
+ * Theme authors can import and extend:
8
+ * ```ts
9
+ * import { DarksharpUIDefaults } from "@farming-labs/fumadocs/darksharp";
10
+ * ```
11
+ */
12
+ declare const DarksharpUIDefaults: {
13
+ colors: {
14
+ primary: string;
15
+ background: string;
16
+ muted: string;
17
+ border: string;
18
+ };
19
+ typography: {
20
+ font: {
21
+ style: {
22
+ sans: string;
23
+ mono: string;
24
+ };
25
+ h1: {
26
+ size: string;
27
+ weight: number;
28
+ lineHeight: string;
29
+ letterSpacing: string;
30
+ };
31
+ h2: {
32
+ size: string;
33
+ weight: number;
34
+ lineHeight: string;
35
+ };
36
+ h3: {
37
+ size: string;
38
+ weight: number;
39
+ lineHeight: string;
40
+ };
41
+ h4: {
42
+ size: string;
43
+ weight: number;
44
+ lineHeight: string;
45
+ };
46
+ body: {
47
+ size: string;
48
+ weight: number;
49
+ lineHeight: string;
50
+ };
51
+ small: {
52
+ size: string;
53
+ weight: number;
54
+ lineHeight: string;
55
+ };
56
+ };
57
+ };
58
+ layout: {
59
+ contentWidth: number;
60
+ sidebarWidth: number;
61
+ toc: {
62
+ enabled: boolean;
63
+ depth: number;
64
+ };
65
+ header: {
66
+ height: number;
67
+ sticky: boolean;
68
+ };
69
+ };
70
+ components: {
71
+ Callout: {
72
+ variant: string;
73
+ icon: boolean;
74
+ };
75
+ CodeBlock: {
76
+ showCopyButton: boolean;
77
+ };
78
+ Tabs: {
79
+ style: string;
80
+ };
81
+ };
82
+ };
83
+ /**
84
+ * Darksharp theme preset factory.
85
+ *
86
+ * Built with `createTheme` — the same helper theme authors use.
87
+ * All-black background, near-zero border-radius, minimal & sharp aesthetic.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * import { darksharp } from "@farming-labs/fumadocs/darksharp";
92
+ * export default defineDocs({ theme: darksharp() });
93
+ * ```
94
+ */
95
+ declare const darksharp: (overrides?: Partial<DocsTheme>) => DocsTheme;
96
+ //#endregion
97
+ export { DarksharpUIDefaults, darksharp };
@@ -0,0 +1,111 @@
1
+ import { createTheme } from "@farming-labs/docs";
2
+
3
+ //#region src/darksharp/index.ts
4
+ /**
5
+ * Darksharp fumadocs theme preset — all-black, sharp edges, zero-radius look.
6
+ * Inspired by better-auth.com documentation style.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { darksharp } from "@farming-labs/fumadocs/darksharp";
11
+ *
12
+ * export default defineDocs({
13
+ * entry: "docs",
14
+ * theme: darksharp({ ui: { colors: { primary: "#ffffff" } } }),
15
+ * });
16
+ * ```
17
+ *
18
+ * CSS: `@import "@farming-labs/fumadocs/darksharp/css";`
19
+ */
20
+ /**
21
+ * Darksharp UI defaults — all-black, sharp edges, zero-radius aesthetic.
22
+ *
23
+ * Theme authors can import and extend:
24
+ * ```ts
25
+ * import { DarksharpUIDefaults } from "@farming-labs/fumadocs/darksharp";
26
+ * ```
27
+ */
28
+ const DarksharpUIDefaults = {
29
+ colors: {
30
+ primary: "#fafaf9",
31
+ background: "#000000",
32
+ muted: "#a8a29e",
33
+ border: "#292524"
34
+ },
35
+ typography: { font: {
36
+ style: {
37
+ sans: "Geist, system-ui, sans-serif",
38
+ mono: "Geist Mono, monospace"
39
+ },
40
+ h1: {
41
+ size: "2rem",
42
+ weight: 700,
43
+ lineHeight: "1.2",
44
+ letterSpacing: "-0.02em"
45
+ },
46
+ h2: {
47
+ size: "1.5rem",
48
+ weight: 600,
49
+ lineHeight: "1.3"
50
+ },
51
+ h3: {
52
+ size: "1.25rem",
53
+ weight: 600,
54
+ lineHeight: "1.4"
55
+ },
56
+ h4: {
57
+ size: "1.125rem",
58
+ weight: 600,
59
+ lineHeight: "1.4"
60
+ },
61
+ body: {
62
+ size: "1rem",
63
+ weight: 400,
64
+ lineHeight: "1.75"
65
+ },
66
+ small: {
67
+ size: "0.875rem",
68
+ weight: 400,
69
+ lineHeight: "1.5"
70
+ }
71
+ } },
72
+ layout: {
73
+ contentWidth: 768,
74
+ sidebarWidth: 280,
75
+ toc: {
76
+ enabled: true,
77
+ depth: 3
78
+ },
79
+ header: {
80
+ height: 56,
81
+ sticky: true
82
+ }
83
+ },
84
+ components: {
85
+ Callout: {
86
+ variant: "soft",
87
+ icon: true
88
+ },
89
+ CodeBlock: { showCopyButton: true },
90
+ Tabs: { style: "default" }
91
+ }
92
+ };
93
+ /**
94
+ * Darksharp theme preset factory.
95
+ *
96
+ * Built with `createTheme` — the same helper theme authors use.
97
+ * All-black background, near-zero border-radius, minimal & sharp aesthetic.
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * import { darksharp } from "@farming-labs/fumadocs/darksharp";
102
+ * export default defineDocs({ theme: darksharp() });
103
+ * ```
104
+ */
105
+ const darksharp = createTheme({
106
+ name: "fumadocs-darksharp",
107
+ ui: DarksharpUIDefaults
108
+ });
109
+
110
+ //#endregion
111
+ export { DarksharpUIDefaults, darksharp };
@@ -0,0 +1,97 @@
1
+ import { DocsTheme } from "@farming-labs/docs";
2
+
3
+ //#region src/default/index.d.ts
4
+ /**
5
+ * Default UI configuration — neutral palette, standard border-radius.
6
+ *
7
+ * Theme authors can import this and extend it:
8
+ * ```ts
9
+ * import { DefaultUIDefaults } from "@farming-labs/fumadocs/default";
10
+ * ```
11
+ */
12
+ declare const DefaultUIDefaults: {
13
+ colors: {
14
+ primary: string;
15
+ background: string;
16
+ muted: string;
17
+ border: string;
18
+ };
19
+ typography: {
20
+ font: {
21
+ style: {
22
+ sans: string;
23
+ mono: string;
24
+ };
25
+ h1: {
26
+ size: string;
27
+ weight: number;
28
+ lineHeight: string;
29
+ letterSpacing: string;
30
+ };
31
+ h2: {
32
+ size: string;
33
+ weight: number;
34
+ lineHeight: string;
35
+ };
36
+ h3: {
37
+ size: string;
38
+ weight: number;
39
+ lineHeight: string;
40
+ };
41
+ h4: {
42
+ size: string;
43
+ weight: number;
44
+ lineHeight: string;
45
+ };
46
+ body: {
47
+ size: string;
48
+ weight: number;
49
+ lineHeight: string;
50
+ };
51
+ small: {
52
+ size: string;
53
+ weight: number;
54
+ lineHeight: string;
55
+ };
56
+ };
57
+ };
58
+ layout: {
59
+ contentWidth: number;
60
+ sidebarWidth: number;
61
+ toc: {
62
+ enabled: boolean;
63
+ depth: number;
64
+ };
65
+ header: {
66
+ height: number;
67
+ sticky: boolean;
68
+ };
69
+ };
70
+ components: {
71
+ Callout: {
72
+ variant: string;
73
+ icon: boolean;
74
+ };
75
+ CodeBlock: {
76
+ showCopyButton: boolean;
77
+ };
78
+ Tabs: {
79
+ style: string;
80
+ };
81
+ };
82
+ };
83
+ /**
84
+ * Default fumadocs theme preset factory.
85
+ *
86
+ * Built with `createTheme` — the same helper theme authors use.
87
+ * Merges user overrides on top of sensible defaults.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * import { fumadocs } from "@farming-labs/fumadocs/default";
92
+ * export default defineDocs({ theme: fumadocs({ ui: { colors: { primary: "#22c55e" } } }) });
93
+ * ```
94
+ */
95
+ declare const fumadocs: (overrides?: Partial<DocsTheme>) => DocsTheme;
96
+ //#endregion
97
+ export { DefaultUIDefaults, fumadocs };
@@ -0,0 +1,110 @@
1
+ import { createTheme } from "@farming-labs/docs";
2
+
3
+ //#region src/default/index.ts
4
+ /**
5
+ * Default fumadocs theme preset — neutral colors, standard radius.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { fumadocs } from "@farming-labs/fumadocs/default";
10
+ *
11
+ * export default defineDocs({
12
+ * entry: "docs",
13
+ * theme: fumadocs({ ui: { colors: { primary: "#22c55e" } } }),
14
+ * });
15
+ * ```
16
+ *
17
+ * CSS: `@import "@farming-labs/fumadocs/default/css";`
18
+ */
19
+ /**
20
+ * Default UI configuration — neutral palette, standard border-radius.
21
+ *
22
+ * Theme authors can import this and extend it:
23
+ * ```ts
24
+ * import { DefaultUIDefaults } from "@farming-labs/fumadocs/default";
25
+ * ```
26
+ */
27
+ const DefaultUIDefaults = {
28
+ colors: {
29
+ primary: "#6366f1",
30
+ background: "#ffffff",
31
+ muted: "#64748b",
32
+ border: "#e5e7eb"
33
+ },
34
+ typography: { font: {
35
+ style: {
36
+ sans: "Inter, system-ui, sans-serif",
37
+ mono: "JetBrains Mono, monospace"
38
+ },
39
+ h1: {
40
+ size: "2rem",
41
+ weight: 700,
42
+ lineHeight: "1.2",
43
+ letterSpacing: "-0.02em"
44
+ },
45
+ h2: {
46
+ size: "1.5rem",
47
+ weight: 600,
48
+ lineHeight: "1.3"
49
+ },
50
+ h3: {
51
+ size: "1.25rem",
52
+ weight: 600,
53
+ lineHeight: "1.4"
54
+ },
55
+ h4: {
56
+ size: "1.125rem",
57
+ weight: 600,
58
+ lineHeight: "1.4"
59
+ },
60
+ body: {
61
+ size: "1rem",
62
+ weight: 400,
63
+ lineHeight: "1.75"
64
+ },
65
+ small: {
66
+ size: "0.875rem",
67
+ weight: 400,
68
+ lineHeight: "1.5"
69
+ }
70
+ } },
71
+ layout: {
72
+ contentWidth: 768,
73
+ sidebarWidth: 280,
74
+ toc: {
75
+ enabled: true,
76
+ depth: 3
77
+ },
78
+ header: {
79
+ height: 72,
80
+ sticky: true
81
+ }
82
+ },
83
+ components: {
84
+ Callout: {
85
+ variant: "soft",
86
+ icon: true
87
+ },
88
+ CodeBlock: { showCopyButton: true },
89
+ Tabs: { style: "default" }
90
+ }
91
+ };
92
+ /**
93
+ * Default fumadocs theme preset factory.
94
+ *
95
+ * Built with `createTheme` — the same helper theme authors use.
96
+ * Merges user overrides on top of sensible defaults.
97
+ *
98
+ * @example
99
+ * ```ts
100
+ * import { fumadocs } from "@farming-labs/fumadocs/default";
101
+ * export default defineDocs({ theme: fumadocs({ ui: { colors: { primary: "#22c55e" } } }) });
102
+ * ```
103
+ */
104
+ const fumadocs = createTheme({
105
+ name: "fumadocs-default",
106
+ ui: DefaultUIDefaults
107
+ });
108
+
109
+ //#endregion
110
+ export { DefaultUIDefaults, fumadocs };
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from "react";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { DocsConfig } from "@farming-labs/docs";
4
+
5
+ //#region src/docs-layout.d.ts
6
+ /**
7
+ * Build a Next.js Metadata object from the docs config.
8
+ *
9
+ * Returns layout-level metadata including `title.template` so each page's
10
+ * frontmatter `title` is formatted (e.g. "Getting Started – Docs").
11
+ *
12
+ * Usage in `app/docs/layout.tsx`:
13
+ * ```ts
14
+ * export const metadata = createDocsMetadata(docsConfig);
15
+ * ```
16
+ */
17
+ declare function createDocsMetadata(config: DocsConfig): {
18
+ twitter?: {
19
+ card: "summary" | "summary_large_image";
20
+ } | undefined;
21
+ description?: string | undefined;
22
+ title: {
23
+ template: string;
24
+ default: string;
25
+ };
26
+ };
27
+ declare function createDocsLayout(config: DocsConfig): ({
28
+ children
29
+ }: {
30
+ children: ReactNode;
31
+ }) => react_jsx_runtime0.JSX.Element;
32
+ //#endregion
33
+ export { createDocsLayout, createDocsMetadata };