fumadocs-core 15.8.2 → 15.8.4
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/{algolia-Z232AL35.js → algolia-IZEDLPHE.js} +1 -1
- package/dist/breadcrumb.js +4 -4
- package/dist/builder-5BHIAfCi.d.ts +383 -0
- package/dist/{chunk-DDDU7USP.js → chunk-FAEPKD7U.js} +1 -0
- package/dist/{chunk-Z5V4JSQY.js → chunk-LMRZFODA.js} +16 -1
- package/dist/{chunk-JSBRDJBE.js → chunk-U67V476Y.js} +5 -0
- package/dist/content/github.js +1 -1
- package/dist/content/index.js +1 -1
- package/dist/content/toc.js +1 -1
- package/dist/dynamic-link.js +1 -1
- package/dist/{fetch-C3XV44E6.js → fetch-2XFMBLBA.js} +1 -1
- package/dist/framework/index.js +1 -1
- package/dist/framework/next.js +1 -1
- package/dist/framework/react-router.js +1 -1
- package/dist/framework/tanstack.js +1 -1
- package/dist/framework/waku.js +1 -1
- package/dist/hide-if-empty.js +1 -1
- package/dist/highlight/client.js +1 -1
- package/dist/highlight/index.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/legacy.js +1 -1
- package/dist/i18n/middleware.js +1 -1
- package/dist/link.js +1 -1
- package/dist/mdx-plugins/index.js +1 -1
- package/dist/{mixedbread-AG5AAOKO.js → mixedbread-RAHDVXGJ.js} +1 -1
- package/dist/negotiation/index.js +1 -1
- package/dist/{orama-cloud-GMFFJOIB.js → orama-cloud-74FM25SB.js} +1 -1
- package/dist/page-tree/index.js +1 -1
- package/dist/search/algolia.js +1 -1
- package/dist/search/client.js +6 -6
- package/dist/search/index.js +1 -1
- package/dist/search/orama-cloud.js +1 -1
- package/dist/search/server.d.ts +1 -1
- package/dist/search/server.js +5 -5
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +4 -4
- package/dist/sidebar.js +1 -1
- package/dist/source/index.d.ts +6 -331
- package/dist/source/index.js +200 -150
- package/dist/source/plugins/lucide-icons.d.ts +1 -1
- package/dist/source/plugins/lucide-icons.js +2 -2
- package/dist/{static-UVSWNGTY.js → static-A2YJ5TXV.js} +1 -1
- package/dist/toc.js +1 -1
- package/dist/utils/use-effect-event.d.ts +4 -3
- package/dist/utils/use-effect-event.js +9 -6
- package/dist/utils/use-media-query.js +1 -1
- package/dist/utils/use-on-change.js +1 -1
- package/package.json +12 -12
package/dist/breadcrumb.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
findPath
|
|
3
|
-
} from "./chunk-2IYQ7QMS.js";
|
|
4
1
|
import {
|
|
5
2
|
normalizeUrl
|
|
6
3
|
} from "./chunk-PFNP6PEB.js";
|
|
7
|
-
import
|
|
4
|
+
import {
|
|
5
|
+
findPath
|
|
6
|
+
} from "./chunk-2IYQ7QMS.js";
|
|
7
|
+
import "./chunk-U67V476Y.js";
|
|
8
8
|
|
|
9
9
|
// src/breadcrumb.tsx
|
|
10
10
|
import { useMemo } from "react";
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { I as Item, F as Folder, S as Separator, R as Root } from './definitions-Q95-psoo.js';
|
|
2
|
+
import { I18nConfig } from './i18n/index.js';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
interface FileInfo {
|
|
6
|
+
/**
|
|
7
|
+
* File path without extension
|
|
8
|
+
*
|
|
9
|
+
* @deprecated obtain it with `join(dirname, name)`
|
|
10
|
+
*/
|
|
11
|
+
flattenedPath: string;
|
|
12
|
+
/**
|
|
13
|
+
* path of file (unparsed)
|
|
14
|
+
*/
|
|
15
|
+
path: string;
|
|
16
|
+
/**
|
|
17
|
+
* File name without extension
|
|
18
|
+
*/
|
|
19
|
+
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* file extension from the last `.`, like `.md`
|
|
22
|
+
*
|
|
23
|
+
* empty string if no file extension
|
|
24
|
+
*/
|
|
25
|
+
ext: string;
|
|
26
|
+
dirname: string;
|
|
27
|
+
}
|
|
28
|
+
declare function basename(path: string, ext?: string): string;
|
|
29
|
+
declare function extname(path: string): string;
|
|
30
|
+
declare function dirname(path: string): string;
|
|
31
|
+
declare function parseFilePath(path: string): FileInfo;
|
|
32
|
+
/**
|
|
33
|
+
* Split path into segments, trailing/leading slashes are removed
|
|
34
|
+
*/
|
|
35
|
+
declare function splitPath(path: string): string[];
|
|
36
|
+
/**
|
|
37
|
+
* Resolve paths, slashes within the path will be ignored
|
|
38
|
+
* @param paths - Paths to join
|
|
39
|
+
* @example
|
|
40
|
+
* ```
|
|
41
|
+
* ['a','b'] // 'a/b'
|
|
42
|
+
* ['/a'] // 'a'
|
|
43
|
+
* ['a', '/b'] // 'a/b'
|
|
44
|
+
* ['a', '../b/c'] // 'b/c'
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare function joinPath(...paths: string[]): string;
|
|
48
|
+
declare function slash(path: string): string;
|
|
49
|
+
|
|
50
|
+
type path_FileInfo = FileInfo;
|
|
51
|
+
declare const path_basename: typeof basename;
|
|
52
|
+
declare const path_dirname: typeof dirname;
|
|
53
|
+
declare const path_extname: typeof extname;
|
|
54
|
+
declare const path_joinPath: typeof joinPath;
|
|
55
|
+
declare const path_parseFilePath: typeof parseFilePath;
|
|
56
|
+
declare const path_slash: typeof slash;
|
|
57
|
+
declare const path_splitPath: typeof splitPath;
|
|
58
|
+
declare namespace path {
|
|
59
|
+
export { type path_FileInfo as FileInfo, path_basename as basename, path_dirname as dirname, path_extname as extname, path_joinPath as joinPath, path_parseFilePath as parseFilePath, path_slash as slash, path_splitPath as splitPath };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface LoaderPlugin<Page extends PageData = PageData, Meta extends MetaData = MetaData> {
|
|
63
|
+
name?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Change the order of plugin:
|
|
66
|
+
* - `pre`: before normal plugins
|
|
67
|
+
* - `post`: after normal plugins
|
|
68
|
+
*/
|
|
69
|
+
enforce?: 'pre' | 'post';
|
|
70
|
+
/**
|
|
71
|
+
* receive & replace loader options
|
|
72
|
+
*/
|
|
73
|
+
config?: (config: ResolvedLoaderConfig) => ResolvedLoaderConfig | void | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* transform the storage after loading
|
|
76
|
+
*/
|
|
77
|
+
transformStorage?: (context: {
|
|
78
|
+
storage: ContentStorage<Page, Meta>;
|
|
79
|
+
}) => void;
|
|
80
|
+
/**
|
|
81
|
+
* transform the generated page tree
|
|
82
|
+
*/
|
|
83
|
+
transformPageTree?: PageTreeTransformer<Page, Meta>;
|
|
84
|
+
}
|
|
85
|
+
declare function buildPlugins(plugins: (LoaderPlugin | LoaderPlugin[] | undefined)[]): LoaderPlugin[];
|
|
86
|
+
|
|
87
|
+
type TransformContentStorage = (context: {
|
|
88
|
+
storage: ContentStorage;
|
|
89
|
+
}) => void;
|
|
90
|
+
interface LegacyLoaderOptions {
|
|
91
|
+
/**
|
|
92
|
+
* We recommend you to use `plugins` instead
|
|
93
|
+
*/
|
|
94
|
+
transformers?: TransformContentStorage[];
|
|
95
|
+
}
|
|
96
|
+
interface LegacyPageTreeOptions<Page extends PageData = PageData, Meta extends MetaData = MetaData> {
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated use `plugins` instead
|
|
99
|
+
*/
|
|
100
|
+
attachFile?: (node: Item, file?: PageFile<Page>) => Item;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated use `plugins` instead
|
|
103
|
+
*/
|
|
104
|
+
attachFolder?: (node: Folder, folder: {
|
|
105
|
+
children: (PageFile<Page> | MetaFile<Meta>)[];
|
|
106
|
+
}, meta?: MetaFile<Meta>) => Folder;
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated use `plugins` instead
|
|
109
|
+
*/
|
|
110
|
+
attachSeparator?: (node: Separator) => Separator;
|
|
111
|
+
/**
|
|
112
|
+
* We recommend you to use `plugins` instead
|
|
113
|
+
*/
|
|
114
|
+
transformers?: PageTreeTransformer<Page, Meta>[];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
type IconResolver = (icon: string | undefined) => ReactNode;
|
|
118
|
+
|
|
119
|
+
interface LoaderConfig {
|
|
120
|
+
source: SourceConfig;
|
|
121
|
+
i18n: I18nConfig | undefined;
|
|
122
|
+
}
|
|
123
|
+
interface SourceConfig {
|
|
124
|
+
pageData: PageData;
|
|
125
|
+
metaData: MetaData;
|
|
126
|
+
}
|
|
127
|
+
interface LoaderOptions<S extends SourceConfig = SourceConfig, I18n extends I18nConfig | undefined = I18nConfig | undefined> extends LegacyLoaderOptions {
|
|
128
|
+
baseUrl: string;
|
|
129
|
+
i18n?: I18n;
|
|
130
|
+
url?: UrlFn;
|
|
131
|
+
/**
|
|
132
|
+
* Additional options for page tree builder
|
|
133
|
+
*/
|
|
134
|
+
pageTree?: PageTreeOptions & LegacyPageTreeOptions<S['pageData'], S['metaData']>;
|
|
135
|
+
plugins?: (LoaderPlugin<S['pageData'], S['metaData']> | LoaderPlugin<S['pageData'], S['metaData']>[] | undefined)[];
|
|
136
|
+
icon?: IconResolver;
|
|
137
|
+
slugs?: (info: FileInfo) => string[];
|
|
138
|
+
}
|
|
139
|
+
interface ResolvedLoaderConfig {
|
|
140
|
+
source: Source;
|
|
141
|
+
url: UrlFn;
|
|
142
|
+
plugins?: LoaderPlugin[];
|
|
143
|
+
pageTree?: PageTreeOptions;
|
|
144
|
+
i18n?: I18nConfig | undefined;
|
|
145
|
+
}
|
|
146
|
+
interface Source<Config extends SourceConfig = SourceConfig> {
|
|
147
|
+
files: VirtualFile<Config>[];
|
|
148
|
+
}
|
|
149
|
+
interface SharedFileInfo {
|
|
150
|
+
/**
|
|
151
|
+
* Virtualized file path (parsed)
|
|
152
|
+
*
|
|
153
|
+
* @deprecated Use `path` instead.
|
|
154
|
+
*/
|
|
155
|
+
file: FileInfo;
|
|
156
|
+
/**
|
|
157
|
+
* Virtualized file path (relative to content directory)
|
|
158
|
+
*
|
|
159
|
+
* @example `docs/page.mdx`
|
|
160
|
+
*/
|
|
161
|
+
path: string;
|
|
162
|
+
/**
|
|
163
|
+
* Absolute path of the file (can be empty)
|
|
164
|
+
*/
|
|
165
|
+
absolutePath: string;
|
|
166
|
+
}
|
|
167
|
+
interface Page<Data = PageData> extends SharedFileInfo {
|
|
168
|
+
slugs: string[];
|
|
169
|
+
url: string;
|
|
170
|
+
data: Data;
|
|
171
|
+
locale?: string | undefined;
|
|
172
|
+
}
|
|
173
|
+
interface Meta<Data = MetaData> extends SharedFileInfo {
|
|
174
|
+
data: Data;
|
|
175
|
+
}
|
|
176
|
+
interface LoaderOutput<Config extends LoaderConfig> {
|
|
177
|
+
pageTree: Config['i18n'] extends I18nConfig ? Record<string, Root> : Root;
|
|
178
|
+
getPageTree: (locale?: string) => Root;
|
|
179
|
+
getPageByHref: (href: string, options?: {
|
|
180
|
+
language?: string;
|
|
181
|
+
/**
|
|
182
|
+
* resolve relative file paths in `href` from specified dirname, must be a virtual path.
|
|
183
|
+
*/
|
|
184
|
+
dir?: string;
|
|
185
|
+
}) => {
|
|
186
|
+
page: Page<Config['source']['pageData']>;
|
|
187
|
+
hash?: string;
|
|
188
|
+
} | undefined;
|
|
189
|
+
/**
|
|
190
|
+
* @internal
|
|
191
|
+
*/
|
|
192
|
+
_i18n?: I18nConfig;
|
|
193
|
+
/**
|
|
194
|
+
* Get a list of pages from specified language
|
|
195
|
+
*
|
|
196
|
+
* @param language - If empty, list pages from all languages.
|
|
197
|
+
*/
|
|
198
|
+
getPages: (language?: string) => Page<Config['source']['pageData']>[];
|
|
199
|
+
/**
|
|
200
|
+
* get each language and its pages, empty if i18n is not enabled.
|
|
201
|
+
*/
|
|
202
|
+
getLanguages: () => {
|
|
203
|
+
language: string;
|
|
204
|
+
pages: Page<Config['source']['pageData']>[];
|
|
205
|
+
}[];
|
|
206
|
+
/**
|
|
207
|
+
* Get page with slugs
|
|
208
|
+
*
|
|
209
|
+
* @param language - If empty, the default language will be used
|
|
210
|
+
*/
|
|
211
|
+
getPage: (slugs: string[] | undefined, language?: string) => Page<Config['source']['pageData']> | undefined;
|
|
212
|
+
getNodePage: (node: Item, language?: string) => Page<Config['source']['pageData']> | undefined;
|
|
213
|
+
getNodeMeta: (node: Folder, language?: string) => Meta<Config['source']['metaData']> | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* generate static params for Next.js SSG
|
|
216
|
+
*
|
|
217
|
+
* @param slug - customise parameter name for slugs
|
|
218
|
+
* @param lang - customise parameter name for lang
|
|
219
|
+
*/
|
|
220
|
+
generateParams: <TSlug extends string = 'slug', TLang extends string = 'lang'>(slug?: TSlug, lang?: TLang) => (Record<TSlug, string[]> & Record<TLang, string>)[];
|
|
221
|
+
}
|
|
222
|
+
declare function createGetUrl(baseUrl: string, i18n?: I18nConfig): UrlFn;
|
|
223
|
+
declare function loader<Config extends SourceConfig, I18n extends I18nConfig | undefined = undefined>(source: Source<Config>, options: LoaderOptions<NoInfer<Config>, I18n>): LoaderOutput<{
|
|
224
|
+
source: Config;
|
|
225
|
+
i18n: I18n;
|
|
226
|
+
}>;
|
|
227
|
+
declare function loader<Config extends SourceConfig, I18n extends I18nConfig | undefined = undefined>(options: LoaderOptions<NoInfer<Config>, I18n> & {
|
|
228
|
+
source: Source<Config>;
|
|
229
|
+
}): LoaderOutput<{
|
|
230
|
+
source: Config;
|
|
231
|
+
i18n: I18n;
|
|
232
|
+
}>;
|
|
233
|
+
type _ConfigUnion_<T extends Record<string, Source>> = {
|
|
234
|
+
[K in keyof T]: T[K] extends Source<infer Config> ? {
|
|
235
|
+
pageData: Config['pageData'] & {
|
|
236
|
+
type: K;
|
|
237
|
+
};
|
|
238
|
+
metaData: Config['metaData'] & {
|
|
239
|
+
type: K;
|
|
240
|
+
};
|
|
241
|
+
} : never;
|
|
242
|
+
}[keyof T];
|
|
243
|
+
declare function multiple<T extends Record<string, Source>>(sources: T): Source<_ConfigUnion_<T>>;
|
|
244
|
+
/**
|
|
245
|
+
* map virtual files in source
|
|
246
|
+
*/
|
|
247
|
+
declare function map<Config extends SourceConfig>(source: Source<Config>): {
|
|
248
|
+
page<$Page extends PageData>(fn: (entry: VirtualPage<Config["pageData"]>) => VirtualPage<$Page>): Source<{
|
|
249
|
+
pageData: $Page;
|
|
250
|
+
metaData: Config["metaData"];
|
|
251
|
+
}>;
|
|
252
|
+
meta<$Meta extends MetaData>(fn: (entry: VirtualMeta<Config["metaData"]>) => VirtualMeta<$Meta>): Source<{
|
|
253
|
+
pageData: Config["pageData"];
|
|
254
|
+
metaData: $Meta;
|
|
255
|
+
}>;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
interface MetaData {
|
|
259
|
+
icon?: string | undefined;
|
|
260
|
+
title?: string | undefined;
|
|
261
|
+
root?: boolean | undefined;
|
|
262
|
+
pages?: string[] | undefined;
|
|
263
|
+
defaultOpen?: boolean | undefined;
|
|
264
|
+
description?: string | undefined;
|
|
265
|
+
}
|
|
266
|
+
interface PageData {
|
|
267
|
+
icon?: string | undefined;
|
|
268
|
+
title?: string;
|
|
269
|
+
description?: string | undefined;
|
|
270
|
+
}
|
|
271
|
+
interface BaseVirtualFile {
|
|
272
|
+
/**
|
|
273
|
+
* Virtualized path (relative to content directory)
|
|
274
|
+
*
|
|
275
|
+
* @example `docs/page.mdx`
|
|
276
|
+
*/
|
|
277
|
+
path: string;
|
|
278
|
+
/**
|
|
279
|
+
* Absolute path of the file
|
|
280
|
+
*/
|
|
281
|
+
absolutePath?: string;
|
|
282
|
+
}
|
|
283
|
+
interface VirtualPage<Data extends PageData> extends BaseVirtualFile {
|
|
284
|
+
type: 'page';
|
|
285
|
+
/**
|
|
286
|
+
* Specified Slugs for page
|
|
287
|
+
*/
|
|
288
|
+
slugs?: string[];
|
|
289
|
+
data: Data;
|
|
290
|
+
}
|
|
291
|
+
interface VirtualMeta<Data extends MetaData> extends BaseVirtualFile {
|
|
292
|
+
type: 'meta';
|
|
293
|
+
data: Data;
|
|
294
|
+
}
|
|
295
|
+
type VirtualFile<Config extends SourceConfig = SourceConfig> = VirtualPage<Config['pageData']> | VirtualMeta<Config['metaData']>;
|
|
296
|
+
type InferPageType<Utils extends LoaderOutput<any>> = Utils extends LoaderOutput<infer Config> ? Page<Config['source']['pageData']> : never;
|
|
297
|
+
type InferMetaType<Utils extends LoaderOutput<any>> = Utils extends LoaderOutput<infer Config> ? Meta<Config['source']['metaData']> : never;
|
|
298
|
+
/**
|
|
299
|
+
* @internal
|
|
300
|
+
*/
|
|
301
|
+
type UrlFn = (slugs: string[], locale?: string) => string;
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* In memory file system.
|
|
305
|
+
*/
|
|
306
|
+
declare class FileSystem<File> {
|
|
307
|
+
files: Map<string, File>;
|
|
308
|
+
folders: Map<string, string[]>;
|
|
309
|
+
constructor(inherit?: FileSystem<File>);
|
|
310
|
+
read(path: string): File | undefined;
|
|
311
|
+
/**
|
|
312
|
+
* get the direct children of folder (in virtual file path)
|
|
313
|
+
*/
|
|
314
|
+
readDir(path: string): string[] | undefined;
|
|
315
|
+
write(path: string, file: File): void;
|
|
316
|
+
/**
|
|
317
|
+
* Delete files at specified path.
|
|
318
|
+
*
|
|
319
|
+
* @param path - the target path.
|
|
320
|
+
* @param [recursive=false] - if set to `true`, it will also delete directories.
|
|
321
|
+
*/
|
|
322
|
+
delete(path: string, recursive?: boolean): boolean;
|
|
323
|
+
getFiles(): string[];
|
|
324
|
+
makeDir(path: string): void;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
type ContentStorage<Page extends PageData = PageData, Meta extends MetaData = MetaData> = FileSystem<MetaFile<Meta> | PageFile<Page>>;
|
|
328
|
+
interface MetaFile<Data extends MetaData = MetaData> {
|
|
329
|
+
path: string;
|
|
330
|
+
absolutePath: string;
|
|
331
|
+
format: 'meta';
|
|
332
|
+
data: Data;
|
|
333
|
+
}
|
|
334
|
+
interface PageFile<Data extends PageData = PageData> {
|
|
335
|
+
path: string;
|
|
336
|
+
absolutePath: string;
|
|
337
|
+
format: 'page';
|
|
338
|
+
slugs: string[];
|
|
339
|
+
data: Data;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
interface PageTreeBuilderContext<Page extends PageData = PageData, Meta extends MetaData = MetaData> {
|
|
343
|
+
/**
|
|
344
|
+
* @internal resolve paths without extensions
|
|
345
|
+
*/
|
|
346
|
+
resolveName: (name: string, format: 'meta' | 'page') => string;
|
|
347
|
+
options: PageTreeOptions;
|
|
348
|
+
transformers: PageTreeTransformer<Page, Meta>[];
|
|
349
|
+
builder: PageTreeBuilder;
|
|
350
|
+
storage: ContentStorage<Page, Meta>;
|
|
351
|
+
getUrl: UrlFn;
|
|
352
|
+
storages?: Record<string, ContentStorage<Page, Meta>>;
|
|
353
|
+
locale?: string;
|
|
354
|
+
visitedPaths: Set<string>;
|
|
355
|
+
}
|
|
356
|
+
interface PageTreeTransformer<Page extends PageData = PageData, Meta extends MetaData = MetaData> {
|
|
357
|
+
file?: (this: PageTreeBuilderContext<Page, Meta>, node: Item, filePath?: string) => Item;
|
|
358
|
+
folder?: (this: PageTreeBuilderContext<Page, Meta>, node: Folder, folderPath: string, metaPath?: string) => Folder;
|
|
359
|
+
separator?: (this: PageTreeBuilderContext<Page, Meta>, node: Separator) => Separator;
|
|
360
|
+
root?: (this: PageTreeBuilderContext<Page, Meta>, node: Root) => Root;
|
|
361
|
+
}
|
|
362
|
+
interface PageTreeOptions {
|
|
363
|
+
id?: string;
|
|
364
|
+
/**
|
|
365
|
+
* Remove references to the file path of original nodes (`$ref`)
|
|
366
|
+
*
|
|
367
|
+
* @defaultValue false
|
|
368
|
+
*/
|
|
369
|
+
noRef?: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* generate fallback page tree
|
|
372
|
+
*
|
|
373
|
+
* @defaultValue true
|
|
374
|
+
*/
|
|
375
|
+
generateFallback?: boolean;
|
|
376
|
+
}
|
|
377
|
+
interface PageTreeBuilder {
|
|
378
|
+
build: (storage: ContentStorage, options?: PageTreeOptions) => Root;
|
|
379
|
+
buildI18n: (storages: Record<string, ContentStorage>, options?: PageTreeOptions) => Record<string, Root>;
|
|
380
|
+
}
|
|
381
|
+
declare function createPageTreeBuilder(getUrl: UrlFn, plugins?: LoaderPlugin[]): PageTreeBuilder;
|
|
382
|
+
|
|
383
|
+
export { type ContentStorage as C, type FileInfo as F, type InferPageType as I, type LoaderOutput as L, type MetaFile as M, type PageTreeTransformer as P, type ResolvedLoaderConfig as R, type SourceConfig as S, type TransformContentStorage as T, type UrlFn as U, type VirtualPage as V, type _ConfigUnion_ as _, type LoaderConfig as a, type PageTreeBuilder as b, createPageTreeBuilder as c, type PageTreeBuilderContext as d, type PageTreeOptions as e, FileSystem as f, type PageFile as g, parseFilePath as h, type LoaderOptions as i, type Source as j, type Page as k, type Meta as l, createGetUrl as m, loader as n, multiple as o, path as p, map as q, type MetaData as r, type PageData as s, type VirtualMeta as t, type VirtualFile as u, type InferMetaType as v, type LoaderPlugin as w, buildPlugins as x };
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-U67V476Y.js";
|
|
4
|
+
|
|
1
5
|
// src/source/path.ts
|
|
6
|
+
var path_exports = {};
|
|
7
|
+
__export(path_exports, {
|
|
8
|
+
basename: () => basename,
|
|
9
|
+
dirname: () => dirname,
|
|
10
|
+
extname: () => extname,
|
|
11
|
+
joinPath: () => joinPath,
|
|
12
|
+
parseFilePath: () => parseFilePath,
|
|
13
|
+
slash: () => slash,
|
|
14
|
+
splitPath: () => splitPath
|
|
15
|
+
});
|
|
2
16
|
function basename(path, ext) {
|
|
3
17
|
const idx = path.lastIndexOf("/");
|
|
4
18
|
return path.substring(
|
|
@@ -64,5 +78,6 @@ export {
|
|
|
64
78
|
parseFilePath,
|
|
65
79
|
splitPath,
|
|
66
80
|
joinPath,
|
|
67
|
-
slash
|
|
81
|
+
slash,
|
|
82
|
+
path_exports
|
|
68
83
|
};
|
|
@@ -7,6 +7,10 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
|
7
7
|
var __commonJS = (cb, mod) => function __require() {
|
|
8
8
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
9
|
};
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all)
|
|
12
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
|
+
};
|
|
10
14
|
var __copyProps = (to, from, except, desc) => {
|
|
11
15
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
16
|
for (let key of __getOwnPropNames(from))
|
|
@@ -26,5 +30,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
30
|
|
|
27
31
|
export {
|
|
28
32
|
__commonJS,
|
|
33
|
+
__export,
|
|
29
34
|
__toESM
|
|
30
35
|
};
|
package/dist/content/github.js
CHANGED
package/dist/content/index.js
CHANGED
package/dist/content/toc.js
CHANGED
package/dist/dynamic-link.js
CHANGED
package/dist/framework/index.js
CHANGED
package/dist/framework/next.js
CHANGED
package/dist/framework/waku.js
CHANGED
package/dist/hide-if-empty.js
CHANGED
package/dist/highlight/client.js
CHANGED
package/dist/highlight/index.js
CHANGED
package/dist/i18n/index.js
CHANGED
package/dist/i18n/legacy.js
CHANGED
package/dist/i18n/middleware.js
CHANGED
package/dist/link.js
CHANGED