@farming-labs/theme 0.2.49 → 0.2.52
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/README.md +96 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# @farming-labs/theme
|
|
2
|
+
|
|
3
|
+
The React UI layer and shared theme preset package for
|
|
4
|
+
[`@farming-labs/docs`](https://www.npmjs.com/package/@farming-labs/docs).
|
|
5
|
+
|
|
6
|
+
It provides the docs shell, root providers, MDX components, search and AI interfaces, theme
|
|
7
|
+
factories, and the CSS used across every Farming Labs framework integration.
|
|
8
|
+
|
|
9
|
+
## Where it fits
|
|
10
|
+
|
|
11
|
+
- **Next.js and TanStack Start:** supplies the React layout, providers, components, and CSS
|
|
12
|
+
- **SvelteKit, Astro, and Nuxt:** supplies shared preset CSS while the matching `*-theme` package
|
|
13
|
+
supplies framework-native UI components
|
|
14
|
+
- **`@farming-labs/docs`:** supplies the shared configuration, content features, and CLI
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
For Next.js:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @farming-labs/docs @farming-labs/next @farming-labs/theme
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For TanStack Start:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install @farming-labs/docs @farming-labs/tanstack-start @farming-labs/theme
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The setup CLI installs the correct package set automatically:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx @farming-labs/docs@latest init
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Choose a theme
|
|
37
|
+
|
|
38
|
+
Use a theme factory in `docs.config.ts`:
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { defineDocs } from "@farming-labs/docs";
|
|
42
|
+
import { fumadocs } from "@farming-labs/theme";
|
|
43
|
+
|
|
44
|
+
export default defineDocs({
|
|
45
|
+
entry: "docs",
|
|
46
|
+
theme: fumadocs(),
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Then import its CSS. The default `fumadocs()` preset uses the `default/css` entrypoint:
|
|
51
|
+
|
|
52
|
+
```css
|
|
53
|
+
@import "tailwindcss";
|
|
54
|
+
@import "@farming-labs/theme/default/css";
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Other presets use matching factory and CSS subpaths:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { hardline } from "@farming-labs/theme/hardline";
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```css
|
|
64
|
+
@import "@farming-labs/theme/hardline/css";
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Available preset subpaths include `default`, `darksharp`, `pixel-border`, `colorful`, `shiny`,
|
|
68
|
+
`darkbold`, `greentree`, `hardline`, `concrete`, `command-grid`, `ledger`, and `threadline`.
|
|
69
|
+
|
|
70
|
+
## Main entrypoints
|
|
71
|
+
|
|
72
|
+
| Entrypoint | Purpose |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `@farming-labs/theme` | Default theme, `RootProvider`, layout helpers, and React UI |
|
|
75
|
+
| `@farming-labs/theme/<preset>` | Theme factory for a preset |
|
|
76
|
+
| `@farming-labs/theme/<preset>/css` | Complete CSS for a preset |
|
|
77
|
+
| `@farming-labs/theme/mdx` | Farming Labs MDX component map |
|
|
78
|
+
| `@farming-labs/theme/search` | Legacy `createDocsSearchAPI()` compatibility helper |
|
|
79
|
+
| `@farming-labs/theme/ai` | AI search and chat UI |
|
|
80
|
+
| `@farming-labs/theme/tanstack` | TanStack Start provider and layout integration |
|
|
81
|
+
|
|
82
|
+
## Runtime requirements
|
|
83
|
+
|
|
84
|
+
The package currently declares Next.js 16+, React 19.2+, and React DOM 19.2+ as peers because its
|
|
85
|
+
root entrypoints provide the React and Next.js UI. SvelteKit, Astro, and Nuxt integrations consume
|
|
86
|
+
the shared CSS subpaths while rendering UI through their framework-native theme packages.
|
|
87
|
+
|
|
88
|
+
## Learn more
|
|
89
|
+
|
|
90
|
+
- [Themes](https://docs.farming-labs.dev/docs/themes)
|
|
91
|
+
- [Creating themes](https://docs.farming-labs.dev/docs/themes/creating-themes)
|
|
92
|
+
- [GitHub repository](https://github.com/farming-labs/docs)
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/theme",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.52",
|
|
4
4
|
"description": "Theme package for @farming-labs/docs — layout, provider, MDX components, and styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"tsdown": "^0.20.3",
|
|
147
147
|
"typescript": "^5.9.3",
|
|
148
148
|
"vitest": "^4.1.8",
|
|
149
|
-
"@farming-labs/docs": "0.2.
|
|
149
|
+
"@farming-labs/docs": "0.2.52"
|
|
150
150
|
},
|
|
151
151
|
"peerDependencies": {
|
|
152
152
|
"@farming-labs/docs": ">=0.0.1",
|