fumadocs-core 12.5.1 → 12.5.3
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/breadcrumb.d.ts +5 -2
- package/dist/breadcrumb.js +2 -2
- package/dist/{chunk-XB7CNOKH.js → chunk-UMTVJNLA.js} +15 -3
- package/dist/dynamic-link.d.ts +2 -3
- package/dist/dynamic-link.js +1 -1
- package/dist/link.d.ts +5 -11
- package/dist/link.js +1 -1
- package/package.json +1 -1
package/dist/breadcrumb.d.ts
CHANGED
|
@@ -7,11 +7,14 @@ interface BreadcrumbItem {
|
|
|
7
7
|
}
|
|
8
8
|
interface BreadcrumbOptions extends SearchOptions {
|
|
9
9
|
/**
|
|
10
|
-
* Include the root itself in the breadcrumb items array
|
|
10
|
+
* Include the root itself in the breadcrumb items array.
|
|
11
|
+
* Specify the url by passing an object instead
|
|
11
12
|
*
|
|
12
13
|
* @defaultValue false
|
|
13
14
|
*/
|
|
14
|
-
includeRoot?: boolean
|
|
15
|
+
includeRoot?: boolean | {
|
|
16
|
+
url: string;
|
|
17
|
+
};
|
|
15
18
|
}
|
|
16
19
|
declare function useBreadcrumb(url: string, tree: Root, options?: BreadcrumbOptions): BreadcrumbItem[];
|
|
17
20
|
declare function getBreadcrumbItems(url: string, tree: Root, options?: BreadcrumbOptions): BreadcrumbItem[];
|
package/dist/breadcrumb.js
CHANGED
|
@@ -11,13 +11,13 @@ function useBreadcrumb(url, tree, options) {
|
|
|
11
11
|
);
|
|
12
12
|
}
|
|
13
13
|
function getBreadcrumbItems(url, tree, options = {}) {
|
|
14
|
-
var _b
|
|
14
|
+
var _b;
|
|
15
15
|
const _a = options, { includeRoot } = _a, rest = __objRest(_a, ["includeRoot"]);
|
|
16
16
|
const path = (_b = searchPath(tree.children, url, rest)) != null ? _b : [];
|
|
17
17
|
if (includeRoot) {
|
|
18
18
|
path.unshift({
|
|
19
19
|
name: tree.name,
|
|
20
|
-
url:
|
|
20
|
+
url: typeof includeRoot === "object" ? includeRoot.url : void 0
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
return path;
|
|
@@ -12,10 +12,14 @@ var Link = forwardRef(
|
|
|
12
12
|
(_a, ref) => {
|
|
13
13
|
var _b = _a, {
|
|
14
14
|
href = "#",
|
|
15
|
-
external = !(href.startsWith("/") || href.startsWith("#") || href.startsWith("."))
|
|
15
|
+
external = !(href.startsWith("/") || href.startsWith("#") || href.startsWith(".")),
|
|
16
|
+
prefetch,
|
|
17
|
+
replace
|
|
16
18
|
} = _b, props = __objRest(_b, [
|
|
17
19
|
"href",
|
|
18
|
-
"external"
|
|
20
|
+
"external",
|
|
21
|
+
"prefetch",
|
|
22
|
+
"replace"
|
|
19
23
|
]);
|
|
20
24
|
if (external) {
|
|
21
25
|
return /* @__PURE__ */ jsx(
|
|
@@ -30,7 +34,15 @@ var Link = forwardRef(
|
|
|
30
34
|
})
|
|
31
35
|
);
|
|
32
36
|
}
|
|
33
|
-
return /* @__PURE__ */ jsx(
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
Original,
|
|
39
|
+
__spreadValues({
|
|
40
|
+
ref,
|
|
41
|
+
href,
|
|
42
|
+
prefetch,
|
|
43
|
+
replace
|
|
44
|
+
}, props)
|
|
45
|
+
);
|
|
34
46
|
}
|
|
35
47
|
);
|
|
36
48
|
Link.displayName = "Link";
|
package/dist/dynamic-link.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { LinkProps } from './link.js';
|
|
3
|
+
import 'next/link';
|
|
3
4
|
|
|
4
5
|
type DynamicLinkProps = LinkProps;
|
|
5
6
|
/**
|
|
@@ -7,8 +8,6 @@ type DynamicLinkProps = LinkProps;
|
|
|
7
8
|
*
|
|
8
9
|
* It supports dynamic hrefs, which means you can use `/[lang]/my-page` with `dynamicHrefs` enabled
|
|
9
10
|
*/
|
|
10
|
-
declare const DynamicLink: react.ForwardRefExoticComponent<react.
|
|
11
|
-
external?: boolean;
|
|
12
|
-
} & react.RefAttributes<HTMLAnchorElement>>;
|
|
11
|
+
declare const DynamicLink: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
13
12
|
|
|
14
13
|
export { DynamicLink, type DynamicLinkProps, DynamicLink as default };
|
package/dist/dynamic-link.js
CHANGED
package/dist/link.d.ts
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { AnchorHTMLAttributes } from 'react';
|
|
3
|
+
import { LinkProps as LinkProps$1 } from 'next/link';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
interface LinkProps extends Pick<LinkProps$1, 'prefetch' | 'replace'>, AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
5
6
|
/**
|
|
6
7
|
* If the href is an external URL
|
|
7
8
|
*
|
|
8
9
|
* automatically determined by default
|
|
9
10
|
*/
|
|
10
11
|
external?: boolean;
|
|
11
|
-
}
|
|
12
|
+
}
|
|
12
13
|
/**
|
|
13
|
-
* Wraps `next/link` and safe to use in
|
|
14
|
+
* Wraps `next/link` and safe to use in MDX documents
|
|
14
15
|
*/
|
|
15
|
-
declare const Link: react.ForwardRefExoticComponent<
|
|
16
|
-
/**
|
|
17
|
-
* If the href is an external URL
|
|
18
|
-
*
|
|
19
|
-
* automatically determined by default
|
|
20
|
-
*/
|
|
21
|
-
external?: boolean;
|
|
22
|
-
} & react.RefAttributes<HTMLAnchorElement>>;
|
|
16
|
+
declare const Link: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
23
17
|
|
|
24
18
|
export { type LinkProps, Link as default };
|
package/dist/link.js
CHANGED