fumadocs-core 16.0.14 → 16.0.15

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,8 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Framework } from './index.js';
2
3
  import { ReactNode } from 'react';
4
+ import 'next/dist/shared/lib/get-img-props';
3
5
 
4
- declare function NextProvider({ children }: {
6
+ declare function NextProvider({ children, Link: CustomLink, Image: CustomImage, }: {
5
7
  children: ReactNode;
8
+ Link?: Framework['Link'];
9
+ Image?: Framework['Image'];
6
10
  }): react_jsx_runtime.JSX.Element;
7
11
 
8
12
  export { NextProvider };
@@ -9,15 +9,19 @@ import { useParams, usePathname, useRouter } from "next/navigation";
9
9
  import Link from "next/link";
10
10
  import Image from "next/image";
11
11
  import { jsx } from "react/jsx-runtime";
12
- function NextProvider({ children }) {
12
+ function NextProvider({
13
+ children,
14
+ Link: CustomLink,
15
+ Image: CustomImage
16
+ }) {
13
17
  return /* @__PURE__ */ jsx(
14
18
  FrameworkProvider,
15
19
  {
16
20
  usePathname,
17
21
  useRouter,
18
22
  useParams,
19
- Link,
20
- Image,
23
+ Link: CustomLink ?? Link,
24
+ Image: CustomImage ?? Image,
21
25
  children
22
26
  }
23
27
  );
@@ -1,8 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
+ import { Framework } from './index.js';
4
+ import 'next/dist/shared/lib/get-img-props';
3
5
 
4
- declare function ReactRouterProvider({ children }: {
6
+ declare function ReactRouterProvider({ children, Link: CustomLink, Image: CustomImage, }: {
5
7
  children: ReactNode;
8
+ Link?: Framework['Link'];
9
+ Image?: Framework['Image'];
6
10
  }): react_jsx_runtime.JSX.Element;
7
11
 
8
12
  export { ReactRouterProvider };
@@ -39,8 +39,20 @@ var framework = {
39
39
  return /* @__PURE__ */ jsx(Link, { to: href, prefetch: prefetch ? "intent" : "none", ...props, children: props.children });
40
40
  }
41
41
  };
42
- function ReactRouterProvider({ children }) {
43
- return /* @__PURE__ */ jsx(FrameworkProvider, { ...framework, children });
42
+ function ReactRouterProvider({
43
+ children,
44
+ Link: CustomLink,
45
+ Image: CustomImage
46
+ }) {
47
+ return /* @__PURE__ */ jsx(
48
+ FrameworkProvider,
49
+ {
50
+ ...framework,
51
+ Link: CustomLink ?? framework.Link,
52
+ Image: CustomImage ?? framework.Image,
53
+ children
54
+ }
55
+ );
44
56
  }
45
57
  export {
46
58
  ReactRouterProvider
@@ -1,11 +1,15 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
+ import { Framework } from './index.js';
4
+ import 'next/dist/shared/lib/get-img-props';
3
5
 
4
6
  /**
5
7
  * Fumadocs adapter for Tanstack Router/Start
6
8
  */
7
- declare function TanstackProvider({ children }: {
9
+ declare function TanstackProvider({ children, Link: CustomLink, Image: CustomImage, }: {
8
10
  children: ReactNode;
11
+ Link?: Framework['Link'];
12
+ Image?: Framework['Image'];
9
13
  }): react_jsx_runtime.JSX.Element;
10
14
 
11
15
  export { TanstackProvider };
@@ -52,8 +52,20 @@ var framework = {
52
52
  return useParams({ strict: false });
53
53
  }
54
54
  };
55
- function TanstackProvider({ children }) {
56
- return /* @__PURE__ */ jsx(FrameworkProvider, { ...framework, children });
55
+ function TanstackProvider({
56
+ children,
57
+ Link: CustomLink,
58
+ Image: CustomImage
59
+ }) {
60
+ return /* @__PURE__ */ jsx(
61
+ FrameworkProvider,
62
+ {
63
+ ...framework,
64
+ Link: CustomLink ?? framework.Link,
65
+ Image: CustomImage ?? framework.Image,
66
+ children
67
+ }
68
+ );
57
69
  }
58
70
  export {
59
71
  TanstackProvider
@@ -1,8 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
+ import { Framework } from './index.js';
4
+ import 'next/dist/shared/lib/get-img-props';
3
5
 
4
- declare function WakuProvider({ children }: {
6
+ declare function WakuProvider({ children, Link: CustomLink, Image: CustomImage, }: {
5
7
  children: ReactNode;
8
+ Link?: Framework['Link'];
9
+ Image?: Framework['Image'];
6
10
  }): react_jsx_runtime.JSX.Element;
7
11
 
8
12
  export { WakuProvider };
@@ -39,12 +39,24 @@ var framework = {
39
39
  [router]
40
40
  );
41
41
  },
42
- Link({ href, prefetch: _prefetch, ...props }) {
43
- return /* @__PURE__ */ jsx(WakuLink, { to: href, ...props, children: props.children });
42
+ Link({ href, prefetch = true, ...props }) {
43
+ return /* @__PURE__ */ jsx(WakuLink, { to: href, unstable_prefetchOnEnter: prefetch, ...props, children: props.children });
44
44
  }
45
45
  };
46
- function WakuProvider({ children }) {
47
- return /* @__PURE__ */ jsx(FrameworkProvider, { ...framework, children });
46
+ function WakuProvider({
47
+ children,
48
+ Link: CustomLink,
49
+ Image: CustomImage
50
+ }) {
51
+ return /* @__PURE__ */ jsx(
52
+ FrameworkProvider,
53
+ {
54
+ ...framework,
55
+ Link: CustomLink ?? framework.Link,
56
+ Image: CustomImage ?? framework.Image,
57
+ children
58
+ }
59
+ );
48
60
  }
49
61
  export {
50
62
  WakuProvider
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fumadocs-core",
3
- "version": "16.0.14",
4
- "description": "The library for building a documentation website in any React.js framework",
3
+ "version": "16.0.15",
4
+ "description": "The React.js library for building a documentation website",
5
5
  "keywords": [
6
6
  "Fumadocs",
7
7
  "Docs"