@farming-labs/next 0.0.53 → 0.0.55

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.
@@ -1,6 +1,2 @@
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 };
1
+ import docs_client_callbacks_default from "@/docs-client-callbacks";
2
+ export { docs_client_callbacks_default as default };
@@ -1,16 +1,5 @@
1
1
  "use client";
2
2
 
3
- import { jsx } from "react/jsx-runtime";
4
- import docsConfig from "@/docs.config";
5
- import { DocsClientHooks } from "@farming-labs/theme/client-hooks";
3
+ import docs_client_callbacks_default from "@/docs-client-callbacks";
6
4
 
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 };
5
+ export { docs_client_callbacks_default as default };
package/dist/config.mjs CHANGED
@@ -54,6 +54,24 @@ const DOCS_LAYOUT_TEMPLATE = `\
54
54
  ${GENERATED_BANNER}
55
55
  export { metadata, default } from "@farming-labs/next/layout";
56
56
  `;
57
+ const DOCS_CLIENT_CALLBACKS_TEMPLATE = `\
58
+ ${GENERATED_BANNER}
59
+ "use client";
60
+
61
+ import docsConfig from "@/docs.config";
62
+ import { DocsClientHooks } from "@farming-labs/theme/client-hooks";
63
+
64
+ export default function DocsClientCallbacks() {
65
+ return (
66
+ <DocsClientHooks
67
+ onCopyClick={docsConfig.onCopyClick}
68
+ onFeedback={
69
+ typeof docsConfig.feedback === "object" ? docsConfig.feedback.onFeedback : undefined
70
+ }
71
+ />
72
+ );
73
+ }
74
+ `;
57
75
  const DOCS_API_ROUTE_TEMPLATE = `\
58
76
  ${GENERATED_BANNER}
59
77
  import docsConfig from "@/docs.config";
@@ -165,6 +183,7 @@ function extractObjectLiteral(content, key) {
165
183
  function withDocs(nextConfig = {}) {
166
184
  const root = process.cwd();
167
185
  if (!hasFile(root, "mdx-components")) writeFileSync(join(root, "mdx-components.tsx"), MDX_COMPONENTS_TEMPLATE);
186
+ if (!hasFile(root, "docs-client-callbacks")) writeFileSync(join(root, "docs-client-callbacks.tsx"), DOCS_CLIENT_CALLBACKS_TEMPLATE);
168
187
  const entry = readDocsEntry(root);
169
188
  const appDir = getNextAppDir(root);
170
189
  const layoutDir = join(root, appDir, entry);
package/dist/layout.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { withNextApiReferenceBanner } from "./api-reference.mjs";
2
- import DocsClientCallbacks from "./client-callbacks.mjs";
3
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import DocsClientCallbacks from "@/docs-client-callbacks";
4
4
  import docsConfig from "@/docs.config";
5
5
  import { createDocsLayout, createDocsMetadata } from "@farming-labs/theme";
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/next",
3
- "version": "0.0.53",
3
+ "version": "0.0.55",
4
4
  "description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
5
5
  "keywords": [
6
6
  "docs",
@@ -79,8 +79,8 @@
79
79
  "tsdown": "^0.20.3",
80
80
  "typescript": "^5.9.3",
81
81
  "vitest": "^3.2.4",
82
- "@farming-labs/docs": "0.0.53",
83
- "@farming-labs/theme": "0.0.53"
82
+ "@farming-labs/docs": "0.0.55",
83
+ "@farming-labs/theme": "0.0.55"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "@farming-labs/docs": ">=0.0.1",