@farming-labs/next 0.1.58 → 0.1.59

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 -1
  2. package/package.json +3 -3
package/dist/config.mjs CHANGED
@@ -35,11 +35,17 @@ function getNextAppDir(root) {
35
35
  const GENERATED_BANNER = "// Auto-generated by @farming-labs/next — do not edit manually.\n";
36
36
  const MDX_COMPONENTS_TEMPLATE = `\
37
37
  ${GENERATED_BANNER}
38
- import { getMDXComponents } from "@farming-labs/theme/mdx";
38
+ import { getMDXComponents, type GetMDXComponentsOptions } from "@farming-labs/theme/mdx";
39
39
  import type { MDXComponents } from "mdx/types";
40
40
  import docsConfig from "@/docs.config";
41
41
 
42
42
  export function useMDXComponents(components?: MDXComponents): MDXComponents {
43
+ const promptIconRegistry = docsConfig.icons as GetMDXComponentsOptions["icons"];
44
+ const promptOpenDocsProviders =
45
+ docsConfig.pageActions?.openDocs && typeof docsConfig.pageActions.openDocs === "object"
46
+ ? (docsConfig.pageActions.openDocs.providers as GetMDXComponentsOptions["openDocsProviders"])
47
+ : undefined;
48
+
43
49
  return getMDXComponents(
44
50
  {
45
51
  ...(docsConfig.components as MDXComponents),
@@ -48,6 +54,8 @@ export function useMDXComponents(components?: MDXComponents): MDXComponents {
48
54
  {
49
55
  onCopyClick: docsConfig.onCopyClick,
50
56
  theme: docsConfig.theme,
57
+ icons: promptIconRegistry,
58
+ openDocsProviders: promptOpenDocsProviders,
51
59
  },
52
60
  );
53
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/next",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
5
5
  "keywords": [
6
6
  "docs",
@@ -95,8 +95,8 @@
95
95
  "tsdown": "^0.20.3",
96
96
  "typescript": "^5.9.3",
97
97
  "vitest": "^3.2.4",
98
- "@farming-labs/docs": "0.1.58",
99
- "@farming-labs/theme": "0.1.58"
98
+ "@farming-labs/docs": "0.1.59",
99
+ "@farming-labs/theme": "0.1.59"
100
100
  },
101
101
  "peerDependencies": {
102
102
  "@farming-labs/docs": ">=0.0.1",