@farming-labs/next 0.0.51 → 0.0.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.
@@ -0,0 +1,6 @@
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/client-callbacks.d.ts
4
+ declare function DocsClientCallbacks(): react_jsx_runtime0.JSX.Element;
5
+ //#endregion
6
+ export { DocsClientCallbacks as default };
@@ -0,0 +1,16 @@
1
+ "use client";
2
+
3
+ import { jsx } from "react/jsx-runtime";
4
+ import docsConfig from "@/docs.config";
5
+ import { DocsClientHooks } from "@farming-labs/theme/client-hooks";
6
+
7
+ //#region src/client-callbacks.tsx
8
+ function DocsClientCallbacks() {
9
+ return /* @__PURE__ */ jsx(DocsClientHooks, {
10
+ onCopyClick: docsConfig.onCopyClick,
11
+ onFeedback: typeof docsConfig.feedback === "object" ? docsConfig.feedback.onFeedback : void 0
12
+ });
13
+ }
14
+
15
+ //#endregion
16
+ export { DocsClientCallbacks as default };
package/dist/config.mjs CHANGED
@@ -52,21 +52,7 @@ export function useMDXComponents(components?: MDXComponents): MDXComponents {
52
52
  `;
53
53
  const DOCS_LAYOUT_TEMPLATE = `\
54
54
  ${GENERATED_BANNER}
55
- import docsConfig from "@/docs.config";
56
- import { createDocsLayout, createDocsMetadata } from "@farming-labs/theme";
57
- import { withNextApiReferenceBanner } from "@farming-labs/next/api-reference";
58
-
59
- export const metadata = createDocsMetadata(docsConfig);
60
-
61
- const DocsLayout = createDocsLayout(withNextApiReferenceBanner(docsConfig));
62
-
63
- export default function Layout({ children }: { children: React.ReactNode }) {
64
- return (
65
- <>
66
- <DocsLayout>{children}</DocsLayout>
67
- </>
68
- );
69
- }
55
+ export { metadata, default } from "@farming-labs/next/layout";
70
56
  `;
71
57
  const DOCS_API_ROUTE_TEMPLATE = `\
72
58
  ${GENERATED_BANNER}
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+
3
+ //#region src/layout.d.ts
4
+ declare const metadata: Record<string, unknown>;
5
+ declare function Layout({
6
+ children
7
+ }: {
8
+ children: React.ReactNode;
9
+ }): react_jsx_runtime0.JSX.Element;
10
+ //#endregion
11
+ export { Layout as default, metadata };
@@ -0,0 +1,15 @@
1
+ import { withNextApiReferenceBanner } from "./api-reference.mjs";
2
+ import DocsClientCallbacks from "./client-callbacks.mjs";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import docsConfig from "@/docs.config";
5
+ import { createDocsLayout, createDocsMetadata } from "@farming-labs/theme";
6
+
7
+ //#region src/layout.tsx
8
+ const metadata = createDocsMetadata(docsConfig);
9
+ const DocsLayout = createDocsLayout(withNextApiReferenceBanner(docsConfig));
10
+ function Layout({ children }) {
11
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DocsClientCallbacks, {}), /* @__PURE__ */ jsx(DocsLayout, { children })] });
12
+ }
13
+
14
+ //#endregion
15
+ export { Layout as default, metadata };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/next",
3
- "version": "0.0.51",
3
+ "version": "0.0.52",
4
4
  "description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
5
5
  "keywords": [
6
6
  "docs",
@@ -27,6 +27,16 @@
27
27
  "import": "./dist/api-reference.mjs",
28
28
  "default": "./dist/api-reference.mjs"
29
29
  },
30
+ "./client-callbacks": {
31
+ "types": "./dist/client-callbacks.d.mts",
32
+ "import": "./dist/client-callbacks.mjs",
33
+ "default": "./dist/client-callbacks.mjs"
34
+ },
35
+ "./layout": {
36
+ "types": "./dist/layout.d.mts",
37
+ "import": "./dist/layout.mjs",
38
+ "default": "./dist/layout.mjs"
39
+ },
30
40
  "./config": {
31
41
  "types": "./dist/config.d.mts",
32
42
  "import": "./dist/config.mjs",
@@ -69,8 +79,8 @@
69
79
  "tsdown": "^0.20.3",
70
80
  "typescript": "^5.9.3",
71
81
  "vitest": "^3.2.4",
72
- "@farming-labs/docs": "0.0.51",
73
- "@farming-labs/theme": "0.0.51"
82
+ "@farming-labs/theme": "0.0.52",
83
+ "@farming-labs/docs": "0.0.52"
74
84
  },
75
85
  "peerDependencies": {
76
86
  "@farming-labs/docs": ">=0.0.1",