@farming-labs/theme 0.0.2-beta.4

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.
Files changed (41) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +7 -0
  2. package/dist/ai-search-dialog.d.mts +37 -0
  3. package/dist/ai-search-dialog.mjs +937 -0
  4. package/dist/darksharp/index.d.mts +97 -0
  5. package/dist/darksharp/index.mjs +111 -0
  6. package/dist/default/index.d.mts +97 -0
  7. package/dist/default/index.mjs +110 -0
  8. package/dist/docs-ai-features.d.mts +23 -0
  9. package/dist/docs-ai-features.mjs +81 -0
  10. package/dist/docs-api.d.mts +68 -0
  11. package/dist/docs-api.mjs +204 -0
  12. package/dist/docs-layout.d.mts +33 -0
  13. package/dist/docs-layout.mjs +331 -0
  14. package/dist/docs-page-client.d.mts +46 -0
  15. package/dist/docs-page-client.mjs +128 -0
  16. package/dist/index.d.mts +11 -0
  17. package/dist/index.mjs +12 -0
  18. package/dist/mdx.d.mts +38 -0
  19. package/dist/mdx.mjs +27 -0
  20. package/dist/page-actions.d.mts +21 -0
  21. package/dist/page-actions.mjs +155 -0
  22. package/dist/pixel-border/index.d.mts +87 -0
  23. package/dist/pixel-border/index.mjs +95 -0
  24. package/dist/provider.d.mts +14 -0
  25. package/dist/provider.mjs +29 -0
  26. package/dist/search.d.mts +34 -0
  27. package/dist/search.mjs +36 -0
  28. package/dist/serialize-icon.d.mts +4 -0
  29. package/dist/serialize-icon.mjs +16 -0
  30. package/dist/theme.d.mts +2 -0
  31. package/dist/theme.mjs +3 -0
  32. package/package.json +90 -0
  33. package/styles/ai.css +894 -0
  34. package/styles/base.css +298 -0
  35. package/styles/darksharp.css +433 -0
  36. package/styles/default.css +88 -0
  37. package/styles/fumadocs.css +2 -0
  38. package/styles/pixel-border.css +671 -0
  39. package/styles/presets/base.css +14 -0
  40. package/styles/presets/black.css +14 -0
  41. package/styles/presets/neutral.css +14 -0
@@ -0,0 +1,36 @@
1
+ import { createDocsAPI } from "./docs-api.mjs";
2
+
3
+ //#region src/search.ts
4
+ /**
5
+ * Search API — backward-compatible re-export.
6
+ *
7
+ * New projects should use `createDocsAPI` from `@farming-labs/theme/api`
8
+ * which provides a unified handler for both search (GET) and AI chat (POST).
9
+ *
10
+ * This module is kept for backward compatibility with existing projects
11
+ * that import `createDocsSearchAPI` from `@farming-labs/theme/search`.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * // Recommended (new): app/api/docs/route.ts
16
+ * import { createDocsAPI } from "@farming-labs/theme/api";
17
+ * export const { GET, POST } = createDocsAPI();
18
+ *
19
+ * // Legacy: app/api/search/route.ts
20
+ * import { createDocsSearchAPI } from "@farming-labs/theme/search";
21
+ * export const { GET } = createDocsSearchAPI();
22
+ * ```
23
+ */
24
+ /**
25
+ * @deprecated Use `createDocsAPI` from `@farming-labs/theme/api` instead.
26
+ * This function is kept for backward compatibility.
27
+ */
28
+ function createDocsSearchAPI(options) {
29
+ return createDocsAPI({
30
+ entry: options?.entry,
31
+ language: options?.language
32
+ });
33
+ }
34
+
35
+ //#endregion
36
+ export { createDocsSearchAPI };
@@ -0,0 +1,4 @@
1
+ //#region src/serialize-icon.d.ts
2
+ declare function serializeIcon(icon: unknown): string | undefined;
3
+ //#endregion
4
+ export { serializeIcon };
@@ -0,0 +1,16 @@
1
+ import { __require } from "./_virtual/_rolldown/runtime.mjs";
2
+
3
+ //#region src/serialize-icon.ts
4
+ function serializeIcon(icon) {
5
+ if (!icon) return void 0;
6
+ if (typeof icon === "string") return icon;
7
+ try {
8
+ const { renderToStaticMarkup } = __require("react-dom/server");
9
+ return renderToStaticMarkup(icon);
10
+ } catch {
11
+ return;
12
+ }
13
+ }
14
+
15
+ //#endregion
16
+ export { serializeIcon };
@@ -0,0 +1,2 @@
1
+ import { DefaultUIDefaults, fumadocs } from "./default/index.mjs";
2
+ export { DefaultUIDefaults as FumadocsUIDefaults, fumadocs };
package/dist/theme.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { DefaultUIDefaults, fumadocs } from "./default/index.mjs";
2
+
3
+ export { DefaultUIDefaults as FumadocsUIDefaults, fumadocs };
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "@farming-labs/theme",
3
+ "version": "0.0.2-beta.4",
4
+ "description": "Theme package for @farming-labs/docs — layout, provider, MDX components, and styles",
5
+ "type": "module",
6
+ "main": "./dist/index.mjs",
7
+ "types": "./dist/index.d.mts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.mts",
11
+ "import": "./dist/index.mjs",
12
+ "default": "./dist/index.mjs"
13
+ },
14
+ "./mdx": {
15
+ "types": "./dist/mdx.d.mts",
16
+ "import": "./dist/mdx.mjs",
17
+ "default": "./dist/mdx.mjs"
18
+ },
19
+ "./default": {
20
+ "types": "./dist/default/index.d.mts",
21
+ "import": "./dist/default/index.mjs",
22
+ "default": "./dist/default/index.mjs"
23
+ },
24
+ "./darksharp": {
25
+ "types": "./dist/darksharp/index.d.mts",
26
+ "import": "./dist/darksharp/index.mjs",
27
+ "default": "./dist/darksharp/index.mjs"
28
+ },
29
+ "./pixel-border": {
30
+ "types": "./dist/pixel-border/index.d.mts",
31
+ "import": "./dist/pixel-border/index.mjs",
32
+ "default": "./dist/pixel-border/index.mjs"
33
+ },
34
+ "./search": {
35
+ "types": "./dist/search.d.mts",
36
+ "import": "./dist/search.mjs",
37
+ "default": "./dist/search.mjs"
38
+ },
39
+ "./api": {
40
+ "types": "./dist/docs-api.d.mts",
41
+ "import": "./dist/docs-api.mjs",
42
+ "default": "./dist/docs-api.mjs"
43
+ },
44
+ "./css": "./styles/default.css",
45
+ "./base/css": "./styles/base.css",
46
+ "./default/css": "./styles/default.css",
47
+ "./darksharp/css": "./styles/darksharp.css",
48
+ "./pixel-border/css": "./styles/pixel-border.css",
49
+ "./presets/neutral": "./styles/presets/neutral.css",
50
+ "./presets/black": "./styles/presets/black.css",
51
+ "./presets/base": "./styles/presets/base.css"
52
+ },
53
+ "files": [
54
+ "dist",
55
+ "styles"
56
+ ],
57
+ "keywords": [
58
+ "docs",
59
+ "fumadocs",
60
+ "theme",
61
+ "documentation"
62
+ ],
63
+ "author": "Farming Labs",
64
+ "license": "MIT",
65
+ "dependencies": {
66
+ "fumadocs-core": "^16.6.1",
67
+ "fumadocs-ui": "^16.6.1",
68
+ "gray-matter": "^4.0.3",
69
+ "sugar-high": "^0.9.5"
70
+ },
71
+ "devDependencies": {
72
+ "@types/node": "^22.10.0",
73
+ "@types/react": "^19.0.0",
74
+ "next": ">=14.0.0",
75
+ "tsdown": "^0.20.3",
76
+ "typescript": "^5.9.3",
77
+ "@farming-labs/docs": "0.0.2-beta.4"
78
+ },
79
+ "peerDependencies": {
80
+ "@farming-labs/docs": ">=0.0.1",
81
+ "next": ">=16.0.0",
82
+ "react": ">=19.2.0",
83
+ "react-dom": ">=19.2.0"
84
+ },
85
+ "scripts": {
86
+ "build": "tsdown",
87
+ "dev": "tsdown --watch",
88
+ "typecheck": "tsc --noEmit"
89
+ }
90
+ }