@farming-labs/theme 0.0.2-beta.14 → 0.0.2-beta.17
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/ai-search-dialog.mjs +2 -2
- package/dist/colorful/index.d.mts +78 -0
- package/dist/colorful/index.mjs +82 -0
- package/dist/docs-command-search.d.mts +10 -0
- package/dist/docs-command-search.mjs +653 -0
- package/dist/docs-layout.mjs +34 -2
- package/dist/docs-page-client.d.mts +8 -0
- package/dist/docs-page-client.mjs +33 -7
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +8 -2
- package/styles/ai.css +33 -20
- package/styles/base.css +12 -0
- package/styles/colorful.css +261 -0
- package/styles/darksharp.css +22 -5
- package/styles/default.css +17 -0
- package/styles/omni.css +307 -0
- package/styles/pixel-border.css +64 -40
|
@@ -696,12 +696,12 @@ function FloatingAIChat({ api = "/api/docs", position = "bottom-right", floating
|
|
|
696
696
|
className: "fd-ai-floating-trigger",
|
|
697
697
|
style: btnPosition,
|
|
698
698
|
dangerouslySetInnerHTML: { __html: triggerComponentHtml }
|
|
699
|
-
}) : /* @__PURE__ */
|
|
699
|
+
}) : /* @__PURE__ */ jsxs("button", {
|
|
700
700
|
onClick: () => setIsOpen(true),
|
|
701
701
|
"aria-label": `Ask ${aiName}`,
|
|
702
702
|
className: "fd-ai-floating-btn",
|
|
703
703
|
style: btnPosition,
|
|
704
|
-
children: /* @__PURE__ */ jsx(SparklesIcon, { size:
|
|
704
|
+
children: [/* @__PURE__ */ jsx(SparklesIcon, { size: 16 }), /* @__PURE__ */ jsxs("span", { children: ["Ask ", aiName] })]
|
|
705
705
|
}))
|
|
706
706
|
] }), document.body);
|
|
707
707
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as _farming_labs_docs0 from "@farming-labs/docs";
|
|
2
|
+
|
|
3
|
+
//#region src/colorful/index.d.ts
|
|
4
|
+
declare const ColorfulUIDefaults: {
|
|
5
|
+
colors: {
|
|
6
|
+
primary: string;
|
|
7
|
+
background: string;
|
|
8
|
+
muted: string;
|
|
9
|
+
border: string;
|
|
10
|
+
};
|
|
11
|
+
typography: {
|
|
12
|
+
font: {
|
|
13
|
+
style: {
|
|
14
|
+
sans: string;
|
|
15
|
+
mono: string;
|
|
16
|
+
};
|
|
17
|
+
h1: {
|
|
18
|
+
size: string;
|
|
19
|
+
weight: number;
|
|
20
|
+
lineHeight: string;
|
|
21
|
+
letterSpacing: string;
|
|
22
|
+
};
|
|
23
|
+
h2: {
|
|
24
|
+
size: string;
|
|
25
|
+
weight: number;
|
|
26
|
+
lineHeight: string;
|
|
27
|
+
};
|
|
28
|
+
h3: {
|
|
29
|
+
size: string;
|
|
30
|
+
weight: number;
|
|
31
|
+
lineHeight: string;
|
|
32
|
+
};
|
|
33
|
+
h4: {
|
|
34
|
+
size: string;
|
|
35
|
+
weight: number;
|
|
36
|
+
lineHeight: string;
|
|
37
|
+
};
|
|
38
|
+
body: {
|
|
39
|
+
size: string;
|
|
40
|
+
weight: number;
|
|
41
|
+
lineHeight: string;
|
|
42
|
+
};
|
|
43
|
+
small: {
|
|
44
|
+
size: string;
|
|
45
|
+
weight: number;
|
|
46
|
+
lineHeight: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
layout: {
|
|
51
|
+
contentWidth: number;
|
|
52
|
+
sidebarWidth: number;
|
|
53
|
+
toc: {
|
|
54
|
+
enabled: boolean;
|
|
55
|
+
depth: number;
|
|
56
|
+
style: "directional";
|
|
57
|
+
};
|
|
58
|
+
header: {
|
|
59
|
+
height: number;
|
|
60
|
+
sticky: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
components: {
|
|
64
|
+
Callout: {
|
|
65
|
+
variant: string;
|
|
66
|
+
icon: boolean;
|
|
67
|
+
};
|
|
68
|
+
CodeBlock: {
|
|
69
|
+
showCopyButton: boolean;
|
|
70
|
+
};
|
|
71
|
+
Tabs: {
|
|
72
|
+
style: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
declare const colorful: (overrides?: Partial<_farming_labs_docs0.DocsTheme>) => _farming_labs_docs0.DocsTheme;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { ColorfulUIDefaults, colorful };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { createTheme } from "@farming-labs/docs";
|
|
2
|
+
|
|
3
|
+
//#region src/colorful/index.ts
|
|
4
|
+
/**
|
|
5
|
+
* Colorful fumadocs theme preset — a faithful reproduction of the fumadocs
|
|
6
|
+
* default (neutral) theme with description support.
|
|
7
|
+
*
|
|
8
|
+
* CSS: `@import "@farming-labs/theme/colorful/css";`
|
|
9
|
+
*/
|
|
10
|
+
const ColorfulUIDefaults = {
|
|
11
|
+
colors: {
|
|
12
|
+
primary: "hsl(40, 96%, 40%)",
|
|
13
|
+
background: "#ffffff",
|
|
14
|
+
muted: "#64748b",
|
|
15
|
+
border: "#e5e7eb"
|
|
16
|
+
},
|
|
17
|
+
typography: { font: {
|
|
18
|
+
style: {
|
|
19
|
+
sans: "Inter, system-ui, sans-serif",
|
|
20
|
+
mono: "JetBrains Mono, monospace"
|
|
21
|
+
},
|
|
22
|
+
h1: {
|
|
23
|
+
size: "1.875rem",
|
|
24
|
+
weight: 700,
|
|
25
|
+
lineHeight: "1.2",
|
|
26
|
+
letterSpacing: "-0.02em"
|
|
27
|
+
},
|
|
28
|
+
h2: {
|
|
29
|
+
size: "1.5rem",
|
|
30
|
+
weight: 600,
|
|
31
|
+
lineHeight: "1.3"
|
|
32
|
+
},
|
|
33
|
+
h3: {
|
|
34
|
+
size: "1.25rem",
|
|
35
|
+
weight: 600,
|
|
36
|
+
lineHeight: "1.4"
|
|
37
|
+
},
|
|
38
|
+
h4: {
|
|
39
|
+
size: "1.125rem",
|
|
40
|
+
weight: 600,
|
|
41
|
+
lineHeight: "1.4"
|
|
42
|
+
},
|
|
43
|
+
body: {
|
|
44
|
+
size: "1rem",
|
|
45
|
+
weight: 400,
|
|
46
|
+
lineHeight: "1.75"
|
|
47
|
+
},
|
|
48
|
+
small: {
|
|
49
|
+
size: "0.875rem",
|
|
50
|
+
weight: 400,
|
|
51
|
+
lineHeight: "1.5"
|
|
52
|
+
}
|
|
53
|
+
} },
|
|
54
|
+
layout: {
|
|
55
|
+
contentWidth: 768,
|
|
56
|
+
sidebarWidth: 260,
|
|
57
|
+
toc: {
|
|
58
|
+
enabled: true,
|
|
59
|
+
depth: 3,
|
|
60
|
+
style: "directional"
|
|
61
|
+
},
|
|
62
|
+
header: {
|
|
63
|
+
height: 56,
|
|
64
|
+
sticky: true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
components: {
|
|
68
|
+
Callout: {
|
|
69
|
+
variant: "soft",
|
|
70
|
+
icon: true
|
|
71
|
+
},
|
|
72
|
+
CodeBlock: { showCopyButton: true },
|
|
73
|
+
Tabs: { style: "default" }
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const colorful = createTheme({
|
|
77
|
+
name: "fumadocs-colorful",
|
|
78
|
+
ui: ColorfulUIDefaults
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
export { ColorfulUIDefaults, colorful };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/docs-command-search.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Built-in docs search command palette.
|
|
4
|
+
* Intercepts Cmd+K and sidebar search button to provide an advanced
|
|
5
|
+
* fuzzy-search experience. Styled entirely via omni-* CSS classes
|
|
6
|
+
* so each theme provides its own visual variant.
|
|
7
|
+
*/
|
|
8
|
+
declare function DocsCommandSearch(): any;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { DocsCommandSearch };
|