@farming-labs/next 0.0.54 → 0.0.56
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/dist/client-callbacks.mjs +1 -1
- package/dist/config.mjs +10 -1
- package/dist/layout.d.mts +5 -4
- package/dist/layout.mjs +9 -6
- package/package.json +3 -3
|
@@ -8,7 +8,7 @@ import { DocsClientHooks } from "@farming-labs/theme/client-hooks";
|
|
|
8
8
|
function DocsClientCallbacks() {
|
|
9
9
|
return /* @__PURE__ */ jsx(DocsClientHooks, {
|
|
10
10
|
onCopyClick: docsConfig.onCopyClick,
|
|
11
|
-
onFeedback: typeof docsConfig.feedback === "object" ? docsConfig.feedback.onFeedback : void 0
|
|
11
|
+
onFeedback: docsConfig.feedback && typeof docsConfig.feedback === "object" ? docsConfig.feedback.onFeedback : void 0
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
|
package/dist/config.mjs
CHANGED
|
@@ -52,7 +52,16 @@ export function useMDXComponents(components?: MDXComponents): MDXComponents {
|
|
|
52
52
|
`;
|
|
53
53
|
const DOCS_LAYOUT_TEMPLATE = `\
|
|
54
54
|
${GENERATED_BANNER}
|
|
55
|
-
|
|
55
|
+
import docsConfig from "@/docs.config";
|
|
56
|
+
import { createNextDocsLayout, createNextDocsMetadata } from "@farming-labs/next/layout";
|
|
57
|
+
|
|
58
|
+
export const metadata = createNextDocsMetadata(docsConfig);
|
|
59
|
+
|
|
60
|
+
const DocsLayout = createNextDocsLayout(docsConfig);
|
|
61
|
+
|
|
62
|
+
export default function Layout({ children }: { children: React.ReactNode }) {
|
|
63
|
+
return <DocsLayout>{children}</DocsLayout>;
|
|
64
|
+
}
|
|
56
65
|
`;
|
|
57
66
|
const DOCS_API_ROUTE_TEMPLATE = `\
|
|
58
67
|
${GENERATED_BANNER}
|
package/dist/layout.d.mts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { DocsConfig } from "@farming-labs/docs";
|
|
2
3
|
|
|
3
4
|
//#region src/layout.d.ts
|
|
4
|
-
declare
|
|
5
|
-
declare function
|
|
5
|
+
declare function createNextDocsMetadata(config: DocsConfig): Record<string, unknown>;
|
|
6
|
+
declare function createNextDocsLayout(config: DocsConfig): ({
|
|
6
7
|
children
|
|
7
8
|
}: {
|
|
8
9
|
children: React.ReactNode;
|
|
9
|
-
})
|
|
10
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
10
11
|
//#endregion
|
|
11
|
-
export {
|
|
12
|
+
export { createNextDocsLayout, createNextDocsMetadata };
|
package/dist/layout.mjs
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { withNextApiReferenceBanner } from "./api-reference.mjs";
|
|
2
2
|
import DocsClientCallbacks from "./client-callbacks.mjs";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import docsConfig from "@/docs.config";
|
|
5
4
|
import { createDocsLayout, createDocsMetadata } from "@farming-labs/theme";
|
|
6
5
|
|
|
7
6
|
//#region src/layout.tsx
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function createNextDocsMetadata(config) {
|
|
8
|
+
return createDocsMetadata(config);
|
|
9
|
+
}
|
|
10
|
+
function createNextDocsLayout(config) {
|
|
11
|
+
const DocsLayout = createDocsLayout(withNextApiReferenceBanner(config));
|
|
12
|
+
return function NextDocsLayout({ children }) {
|
|
13
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DocsClientCallbacks, {}), /* @__PURE__ */ jsx(DocsLayout, { children })] });
|
|
14
|
+
};
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
//#endregion
|
|
15
|
-
export {
|
|
18
|
+
export { createNextDocsLayout, createNextDocsMetadata };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/next",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.56",
|
|
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.
|
|
83
|
-
"@farming-labs/theme": "0.0.
|
|
82
|
+
"@farming-labs/docs": "0.0.56",
|
|
83
|
+
"@farming-labs/theme": "0.0.56"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@farming-labs/docs": ">=0.0.1",
|