fumadocs-core 13.4.8 → 13.4.10
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/source/index.d.ts +6 -6
- package/dist/source/index.js +2 -2
- package/package.json +1 -1
package/dist/source/index.d.ts
CHANGED
|
@@ -140,14 +140,14 @@ declare function loader<Options extends LoaderOptions>(options: Options): Loader
|
|
|
140
140
|
}>;
|
|
141
141
|
|
|
142
142
|
interface MetaData {
|
|
143
|
-
icon?: string;
|
|
144
|
-
title?: string;
|
|
145
|
-
root?: boolean;
|
|
146
|
-
pages?: string[];
|
|
147
|
-
defaultOpen?: boolean;
|
|
143
|
+
icon?: string | undefined;
|
|
144
|
+
title?: string | undefined;
|
|
145
|
+
root?: boolean | undefined;
|
|
146
|
+
pages?: string[] | undefined;
|
|
147
|
+
defaultOpen?: boolean | undefined;
|
|
148
148
|
}
|
|
149
149
|
interface PageData {
|
|
150
|
-
icon?: string;
|
|
150
|
+
icon?: string | undefined;
|
|
151
151
|
title: string;
|
|
152
152
|
}
|
|
153
153
|
type InferPageType<Utils extends LoaderOutput<any>> = Utils extends LoaderOutput<infer Config> ? Page<Config['source']['pageData']> : never;
|
package/dist/source/index.js
CHANGED
|
@@ -108,12 +108,12 @@ function resolveFolderItem(folder, item, ctx, addedNodePaths) {
|
|
|
108
108
|
}
|
|
109
109
|
const linkResult = link.exec(item);
|
|
110
110
|
if (linkResult?.groups) {
|
|
111
|
-
const { icon, url,
|
|
111
|
+
const { icon, url, name } = linkResult.groups;
|
|
112
112
|
const isRelative = url.startsWith("/") || url.startsWith("#") || url.startsWith(".");
|
|
113
113
|
const node = {
|
|
114
114
|
type: "page",
|
|
115
115
|
icon: ctx.options.resolveIcon?.(icon),
|
|
116
|
-
name
|
|
116
|
+
name,
|
|
117
117
|
url,
|
|
118
118
|
external: !isRelative
|
|
119
119
|
};
|