@farming-labs/next 0.0.2-beta.3 → 0.0.2-beta.5

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 (2) hide show
  1. package/dist/config.mjs +9 -9
  2. package/package.json +1 -1
package/dist/config.mjs CHANGED
@@ -23,7 +23,7 @@ import createMDX from "@next/mdx";
23
23
  const GENERATED_BANNER = "// Auto-generated by @farming-labs/next — do not edit manually.\n";
24
24
  const MDX_COMPONENTS_TEMPLATE = `\
25
25
  ${GENERATED_BANNER}
26
- import { getMDXComponents } from "@farming-labs/fumadocs/mdx";
26
+ import { getMDXComponents } from "@farming-labs/theme/mdx";
27
27
  import type { MDXComponents } from "mdx/types";
28
28
  import docsConfig from "@/docs.config";
29
29
 
@@ -37,16 +37,16 @@ export function useMDXComponents(components?: MDXComponents): MDXComponents {
37
37
  const DOCS_LAYOUT_TEMPLATE = `\
38
38
  ${GENERATED_BANNER}
39
39
  import docsConfig from "@/docs.config";
40
- import { createDocsLayout, createDocsMetadata } from "@farming-labs/fumadocs";
40
+ import { createDocsLayout, createDocsMetadata } from "@farming-labs/theme";
41
41
 
42
42
  export const metadata = createDocsMetadata(docsConfig);
43
43
  export default createDocsLayout(docsConfig);
44
44
  `;
45
- const SEARCH_ROUTE_TEMPLATE = `\
45
+ const DOCS_API_ROUTE_TEMPLATE = `\
46
46
  ${GENERATED_BANNER}
47
- import { createDocsSearchAPI } from "@farming-labs/fumadocs/search";
47
+ import { createDocsAPI } from "@farming-labs/theme/api";
48
48
 
49
- export const { GET } = createDocsSearchAPI();
49
+ export const { GET, POST } = createDocsAPI();
50
50
 
51
51
  export const revalidate = false;
52
52
  `;
@@ -79,10 +79,10 @@ function withDocs(nextConfig = {}) {
79
79
  mkdirSync(layoutDir, { recursive: true });
80
80
  writeFileSync(join(layoutDir, "layout.tsx"), DOCS_LAYOUT_TEMPLATE);
81
81
  }
82
- const searchRouteDir = join(root, "app", "api", "search");
83
- if (!hasFile(searchRouteDir, "route")) {
84
- mkdirSync(searchRouteDir, { recursive: true });
85
- writeFileSync(join(searchRouteDir, "route.ts"), SEARCH_ROUTE_TEMPLATE);
82
+ const docsApiRouteDir = join(root, "app", "api", "docs");
83
+ if (!hasFile(docsApiRouteDir, "route")) {
84
+ mkdirSync(docsApiRouteDir, { recursive: true });
85
+ writeFileSync(join(docsApiRouteDir, "route.ts"), DOCS_API_ROUTE_TEMPLATE);
86
86
  }
87
87
  const withMDX = createMDX({
88
88
  extension: /\.mdx?$/,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/next",
3
- "version": "0.0.2-beta.3",
3
+ "version": "0.0.2-beta.5",
4
4
  "description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",