fumadocs-core
Version:
The React.js library for building a documentation website
622 lines • 24.9 kB
TypeScript
import { t as Awaitable } from "./types-Dvkw0Kd0.js";
import { n as I18nConfig } from "./index-DFrWGSeW.js";
import { n as StructuredData } from "./remark-structure-CV606E7e.js";
import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "./definitions-BQVehOBz.js";
import { n as SerializedPageTree } from "./index-B2EN5xn0.js";
import "./index-DuwVLhPl.js";
import "./index-DMxrC6WS.js";
import { ReactNode } from "react";
/**
* In memory file system.
*/
declare class FileSystem<File> {
files: Map<string, File>;
folders: Map<string, string[]>;
constructor(inherit?: FileSystem<File>);
read(path: string): File | undefined;
/**
* get the direct children of folder (in virtual file path)
*/
readDir(path: string): string[] | undefined;
write(path: string, file: File): void;
/**
* Delete files at specified path.
*
* @param path - the target path.
* @param [recursive=false] - if set to `true`, it will also delete directories.
*/
delete(path: string, recursive?: boolean): boolean;
getFiles(): string[];
makeDir(path: string): void;
}
type ContentStorage<P extends ContentStoragePageFile = ContentStoragePageFile, M extends ContentStorageMetaFile = ContentStorageMetaFile> = FileSystem<P | M> & {
/** always `undefined`, for inferring types only */
$inferPage: P;
/** always `undefined`, for inferring types only */
$inferMeta: M;
};
/** @internal */
interface ContentStorageMetaFile<Type extends string | undefined = string | undefined, Data extends MetaData = MetaData> {
type: Type;
path: string;
absolutePath?: string;
format: 'meta';
data: Data;
}
/** @internal */
interface ContentStoragePageFile<Type extends string | undefined = string | undefined, Data extends PageData = PageData> {
type: Type;
path: string;
absolutePath?: string;
format: 'page';
slugs: string[];
data: Data;
/** for a page of a dynamic file, its params */
params?: Params;
/** see `dataAt` of `VirtualFile`, for custom props */
dataAt?(params: Params, custom?: {
props: Record<string, unknown>;
data: Data;
}): Data;
}
interface PageTreeBuilderContext<S extends ContentStorage = ContentStorage> {
transformers: PageTreeTransformer<S>[];
builder: PageTreeBuilder;
storage: S;
storages?: Record<string, S>;
locale?: string;
custom?: Record<string, unknown>;
options: PageTreeOptions<S>;
}
interface PageTreeTransformer<S extends ContentStorage = ContentStorage> {
file?: (this: PageTreeBuilderContext<S>, node: Item, filePath?: string) => Item;
folder?: (this: PageTreeBuilderContext<S>, node: Folder, folderPath: string, metaPath?: string) => Folder;
separator?: (this: PageTreeBuilderContext<S>, node: Separator) => Separator;
root?: (this: PageTreeBuilderContext<S>, node: Root) => Root;
}
interface PageTreeOptions<S extends ContentStorage = ContentStorage> {
/** generate URL from page */
url: ResolvedLoaderConfig['url'];
idPrefix?: string;
/**
* Remove references to the file path of original nodes (`$ref`)
*
* @defaultValue false
*/
noRef?: boolean;
/**
* generate fallback page tree
*
* @defaultValue true
*/
generateFallback?: boolean;
/**
* Additional page tree transformers to apply
*/
transformers?: PageTreeTransformer<S>[];
/** custom context */
context?: Record<string, unknown>;
/** customize the default sorting behaviour (`localeCompare`) */
sort?: {
/** @default 'path' */
by?: 'name' | 'path';
locales?: Intl.LocalesArgument;
options?: Intl.CollatorOptions;
};
}
interface PageTreeBuilder {
resolveFlattenPath(name: string, format: string): string;
root(id?: string, path?: string): Root;
}
/**
* a function to generate slugs, return `undefined` to generate default slugs.
*
* conflicting cases like `dir/index.mdx` vs `dir.mdx` are resolved after the function returns.
*
* @param next - generate the default slugs from file path (before conflict resolution).
*/
type SlugFn<S extends ContentStorage = ContentStorage> = (file: S['$inferPage'], next: () => string[]) => string[] | undefined;
interface SlugsPluginOptions<S extends ContentStorage = ContentStorage> {
/** Slugs to prepend to every page. */
baseSlugs?: string[];
/** generate default slugs for pages */
slugs?: SlugFn<S>;
}
/**
* Generate slugs for pages if missing.
*/
declare function slugsPlugin(optsOrFn?: SlugsPluginOptions | SlugFn): LoaderPlugin;
/**
* Generate slugs from file data (e.g. frontmatter).
*
* @param key - the property name in file data to generate slugs, default to `slug`.
*/
declare function slugsFromData(key?: string): SlugFn;
/**
* Convert file path into slugs, also encode non-ASCII characters, so they can work in pathname
*/
declare function getSlugs(file: string): string[];
type IconResolver = (icon: string | undefined) => ReactNode;
declare namespace types_d_exports {
export { AnyInput, GenerateMeta, GenerateMetaFile, GeneratePage, GeneratePageFile, GenerateStorage };
}
type AnyInput = SourceUnion | Record<string, SourceUnion>;
type GeneratePage<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? Page<k, D['pageData']> : never; }[K] : T extends SourceUnion<infer D> ? Page<undefined, D['pageData']> : never;
type GenerateMeta<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? Meta<k, D['metaData']> : never; }[K] : T extends SourceUnion<infer D> ? Meta<undefined, D['metaData']> : never;
type GeneratePageFile<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? ContentStoragePageFile<k, D['pageData']> : never; }[K] : T extends SourceUnion<infer D> ? ContentStoragePageFile<undefined, D['pageData']> : never;
type GenerateMetaFile<T extends AnyInput> = T extends Record<infer K extends string, SourceUnion> ? { [k in K]: T[k] extends SourceUnion<infer D> ? ContentStorageMetaFile<k, D['metaData']> : never; }[K] : T extends SourceUnion<infer D> ? ContentStorageMetaFile<undefined, D['metaData']> : never;
type GenerateStorage<T extends AnyInput> = ContentStorage<GeneratePageFile<T>, GenerateMetaFile<T>>;
type ResolvedInput = StaticSource | Record<string, StaticSource>;
interface LoaderConfig {
page: Page;
meta: Meta;
i18n: I18nConfig | undefined;
}
interface LoaderOptions<S extends ContentStorage = ContentStorage, I18n extends I18nConfig | undefined = I18nConfig | undefined> extends SlugsPluginOptions<S> {
baseUrl: string;
i18n?: I18n;
url?: (slugs: string[], locale?: string) => string;
/**
* Additional options for page tree builder
*/
pageTree?: Partial<PageTreeOptions<S>>;
plugins?: LoaderPluginOption[] | ((context: {
typedPlugin: (plugin: LoaderPlugin<S>) => LoaderPlugin;
}) => LoaderPluginOption[]);
icon?: IconResolver;
}
interface ResolvedLoaderConfig {
input: ResolvedInput;
url: (slugs: string[], locale?: string) => string;
plugins: LoaderPlugin[];
pageTree?: Partial<PageTreeOptions>;
i18n?: I18nConfig | undefined;
}
interface SharedFileInfo {
/**
* Virtualized file path (relative to content directory)
*
* @example `docs/page.mdx`
*/
path: string;
/**
* Absolute path of the file
*/
absolutePath?: string;
}
interface Page<Type extends string | undefined = string | undefined, Data extends PageData = PageData> extends SharedFileInfo {
type: Type;
slugs: string[];
url: string;
data: Data;
/** for a page of a dynamic file, its params */
params?: Params;
locale?: string | undefined;
}
interface GetPageOptions {
/** if unspecified, the default language */
language?: string;
/**
* The props you pass to the content of the page, its outputs (like the table of contents) render for them too. The
* page is not cached.
*/
props?: Record<string, unknown>;
}
interface Meta<Type extends string | undefined = string | undefined, Data extends MetaData = MetaData> extends SharedFileInfo {
type: Type;
data: Data;
}
interface LoaderOutput<Config extends LoaderConfig = LoaderConfig> {
readonly $inferPage: Config['page'];
readonly $inferMeta: Config['meta'];
readonly $infer: Config;
pageTree: Config['i18n'] extends I18nConfig ? Record<string, Root> : Root;
getPageTree: (locale?: string) => Root;
/**
* get referenced page from href, supported:
*
* - relative file paths, like `./my/page.mdx`.
* - generated page pathname, like `/docs/my/page`.
*/
getPageByHref: (href: string, options?: {
language?: string;
/**
* resolve relative file paths in `href` from specified dirname, must be a virtual path.
*/
dir?: string;
}) => {
page: Config['page'];
hash?: string;
} | undefined;
/**
* resolve special hrefs in a page, including:
*
* - relative file paths, like `./my/page.mdx`.
*/
resolveHref(href: string, parent: Config['page']): string;
/**
* @internal
*/
_i18n?: I18nConfig;
/**
* Get a list of pages from specified language
*
* @param language - If unspecified, list pages from all languages.
*/
getPages: (language?: string) => Config['page'][];
/**
* get each language and its pages, empty if i18n is not enabled.
*/
getLanguages: () => {
language: string;
pages: Config['page'][];
}[];
/**
* Get page with slugs, they can be URI encoded or decoded.
*
* @param options - the language, or the options. If unspecified, the default language will be used.
*/
getPage: (slugs: string[] | undefined, options?: string | GetPageOptions) => Config['page'] | undefined;
/**
* Get page by its URL (pathname).
*
* @param language - If unspecified, look up every language.
*/
getPageByUrl: (url: string, language?: string) => Config['page'] | undefined;
getNodePage: (node: Item, language?: string) => Config['page'] | undefined;
getNodeMeta: (node: Folder | Root, language?: string) => Config['meta'] | undefined;
/**
* generate static params for Next.js SSG
*
* @param slug - customize parameter name for slugs
* @param lang - customize parameter name for lang
*/
generateParams: <TSlug extends string = 'slug', TLang extends string = 'lang'>(slug?: TSlug, lang?: TLang) => (Record<TSlug, string[]> & Record<TLang, string>)[];
/**
* serialize page tree for non-RSC environments
*/
serializePageTree: (tree: Root) => Promise<SerializedPageTree>;
}
declare function createGetUrl(baseUrl: string, i18n?: I18nConfig): ResolvedLoaderConfig['url'];
/** content loader API for static content sources */
declare function loader<I extends ResolvedInput, I18n extends I18nConfig | undefined = undefined>(source: I, options: LoaderOptions<NoInfer<GenerateStorage<I>>, I18n>): LoaderOutput<{
meta: GenerateMeta<I>;
page: GeneratePage<I>;
i18n: I18n;
}>;
/** content loader API for static content sources */
declare function loader<I extends ResolvedInput, I18n extends I18nConfig | undefined = undefined>(options: LoaderOptions<NoInfer<GenerateStorage<I>>, I18n> & {
source: I;
}): LoaderOutput<{
meta: GenerateMeta<I>;
page: GeneratePage<I>;
i18n: I18n;
}>;
interface LoaderPlugin<S extends ContentStorage = ContentStorage> {
name?: string;
/**
* Change the order of plugin:
* - `pre`: before normal plugins
* - `post`: after normal plugins
*/
enforce?: 'pre' | 'post';
/**
* receive & replace loader options
*/
config?: (config: ResolvedLoaderConfig) => ResolvedLoaderConfig | void | undefined;
/**
* transform the storage after loading
*/
transformStorage?: (context: {
storage: S;
}) => void;
/**
* transform the generated page tree
*/
transformPageTree?: PageTreeTransformer<S>;
}
type LoaderPluginOption<S extends ContentStorage = ContentStorage> = LoaderPlugin<S> | LoaderPluginOption<S>[] | undefined;
type InferPageType<Utils extends LoaderOutput<any>> = Utils['$inferPage'];
type InferMetaType<Utils extends LoaderOutput<any>> = Utils['$inferMeta'];
interface DynamicLoaderConfig extends LoaderConfig {
source: string | undefined;
}
interface DynamicLoader<Config extends DynamicLoaderConfig = DynamicLoaderConfig> {
get: () => Promise<LoaderOutput<Config>>;
/** invalidate & re-compute dynamic sources immediately */
revalidate: (source?: Config['source']) => Promise<void>;
/** remove computed cache of dynamic sources */
invalidate: (source?: Config['source']) => void;
get $inferPage(): Config['page'];
get $inferMeta(): Config['meta'];
}
/** content loader API for static & dynamic content sources, with in-memory cache. */
declare function dynamicLoader<I extends SourceUnion | Record<string, SourceUnion>, I18n extends I18nConfig | undefined = undefined>(input: I, options: LoaderOptions<NoInfer<GenerateStorage<I>>, I18n>): DynamicLoader<{
i18n: I18n;
meta: NoInfer<GenerateMeta<I>>;
page: NoInfer<GeneratePage<I>>;
source: I extends Record<infer K, SourceUnion> ? K : undefined;
}>;
type SourceUnion<Config extends SourceConfig = SourceConfig> = StaticSource<Config> | DynamicSource<Config>;
/**
* @deprecated use `StaticSource<Config>` instead
*/
type Source<Config extends SourceConfig = SourceConfig> = StaticSource<Config>;
interface GenericSourceOptions {
/** the base directory for generated virtual files */
baseDir?: string;
/**
* when the source is attached to a new static loader, before loader output is accessible.
*
* can be called multiple times when attached to a dynamic loader.
**/
configureStatic?: (opts: {
loader: LoaderOutput;
source?: string;
}) => void;
/**
* when the source is attached to a dynamic loader.
*
* called at most once for each source object.
**/
configureDynamic?: (opts: {
loader: DynamicLoader;
source?: string;
}) => void;
}
interface StaticSource<Config extends SourceConfig = SourceConfig> extends GenericSourceOptions {
files: VirtualFile<Config>[];
}
/** one dynamic source object can only be used by one dynamic loader */
type DynamicSource<Config extends SourceConfig = SourceConfig> = GenericSourceOptions & {
/**
* - `memory`: the dynamic loader's in-memory cache handles caching.
* - `custom`: the source handles caching itself. When the newer result of `files()` is (shallowly) different from the previous result, the source is considered revalidated, and all associated properties will be re-computed.
*
* @default 'memory'
**/
cache?: 'memory' | 'custom';
files: () => Awaitable<VirtualFile<Config>[]>;
/** @deprecated use `configureDynamic` instead */
configure?: (loader: DynamicLoader, opts: {
source?: string;
}) => void;
/** when the source is invalidated */
invalidate?: () => void;
} & ({
cache?: 'memory';
/** enable time-based revalidation, the previous result will be stale after the specified duration (ms) */
staleTime?: number;
} | {
cache: 'custom';
});
type SourceConfig = {
pageData: PageData;
metaData: MetaData;
};
/** the values of dynamic segments, by their names */
type Params = Record<string, string>;
interface MetaData {
/** the params of the pages in this folder, like Next.js `generateStaticParams()` */
staticParams?: Params[] | undefined;
icon?: string | undefined;
title?: string | undefined;
root?: boolean | string | undefined;
pages?: string[] | undefined;
pagesIndex?: string | undefined;
defaultOpen?: boolean | undefined;
collapsible?: boolean | undefined;
description?: string | undefined;
}
interface PageData {
/** the params of the pages this dynamic file makes, like Next.js `generateStaticParams()` */
staticParams?: Params[] | undefined;
icon?: string | undefined;
title?: string | undefined;
description?: string | undefined;
structuredData?: StructuredData | (() => Awaitable<StructuredData>) | undefined;
}
type VirtualFile<Config extends SourceConfig = SourceConfig> = VirtualPage<Config['pageData']> | VirtualMeta<Config['metaData']>;
interface BaseVirtualFile {
/**
* Virtualized path (relative to content directory)
*
* @example `docs/page.mdx`
*/
path: string;
/**
* Absolute path of the file
*/
absolutePath?: string;
/**
* Locale of the file when i18n is enabled, `$` for every language.
*
* Parsed from `path` if unspecified.
*/
locale?: string;
}
interface VirtualPage<Data extends PageData> extends BaseVirtualFile {
type: 'page';
/**
* Specified Slugs for page
*/
slugs?: string[];
data: Data;
/**
* The data of the page at some params, for a file of a dynamic path like `[framework]/deploy.mdx`.
*
* With `custom`, the page with custom props passed to its content, for `getPage(slugs, { props })`: like the
* content, its outputs render for them, with the params. `custom.data` is the data of the page after the plugins of
* the loader.
*/
dataAt?(params: Params, custom?: {
props: Record<string, unknown>;
data: Data;
}): Data;
}
interface VirtualMeta<Data extends MetaData> extends BaseVirtualFile {
type: 'meta';
data: Data;
/** for a meta file of a dynamic folder, like `[framework]/meta.ts`, its data in the folder filled with some params */
dataAt?: (params: Params) => Data;
}
/**
* @deprecated you can directly pass a record of source objects to `loader()`.
*/
declare function multiple<T extends Record<string, StaticSource>>(sources: T): T extends Record<infer K extends string, StaticSource> ? { [k in K]: T[k] extends StaticSource<infer C> ? StaticSource<{
metaData: C['metaData'] & {
type: k;
};
pageData: C['pageData'] & {
type: k;
};
}> : never; } : never;
interface SourceUpdater<Config extends SourceConfig> {
files: <Page extends PageData, Meta extends MetaData>(fn: (files: VirtualFile<Config>[]) => (VirtualPage<Page> | VirtualMeta<Meta>)[]) => SourceUpdater<{
pageData: Page;
metaData: Meta;
}>;
page: <V extends PageData>(fn: (page: VirtualPage<Config['pageData']>) => VirtualPage<V>) => SourceUpdater<{
pageData: V;
metaData: Config['metaData'];
}>;
meta: <V extends MetaData>(fn: (meta: VirtualMeta<Config['metaData']>) => VirtualMeta<V>) => SourceUpdater<{
pageData: Config['pageData'];
metaData: V;
}>;
build: () => StaticSource<Config>;
}
/**
* update a **static** source object in-place.
*/
declare function update<Config extends SourceConfig>(source: StaticSource<Config>): SourceUpdater<Config>;
declare namespace path_d_exports {
export { basename, dirname, extname, joinPath, normalize, slash, splitPath };
}
declare function basename(path: string, ext?: string): string;
declare function extname(path: string): string;
declare function dirname(path: string): string;
/**
* Split path into segments, trailing/leading slashes are removed
*/
declare function splitPath(path: string): string[];
/**
* Resolve paths, slashes within the path will be ignored
* @param paths - Paths to join
* @example
* ```
* ['a','b'] // 'a/b'
* ['/a'] // 'a'
* ['a', '/b'] // 'a/b'
* ['a', '../b/c'] // 'b/c'
* ```
*/
declare function joinPath(...paths: string[]): string;
declare function slash(path: string): string;
/**
* Convert (relative) file path to virtual file path.
*
* @param path - Relative path
* @returns Normalized path, with no trailing/leading slashes
* @throws Throws error if path starts with `./` or `../`
*/
declare function normalize(path: string): string;
/** whether a path has dynamic segments, like `[framework]/deploy.mdx` */
declare function isDynamicPath(path: string): boolean;
interface StaticParamsOptions {
/** the `staticParams` of the file itself, like in its frontmatter */
staticParams?: Params[];
/**
* Read the `staticParams` of a meta file in the storage, by its path without the extension, like
* `[framework]/meta`. `undefined` when the file doesn't exist or lists none.
*/
readStaticParams: (path: string) => Params[] | undefined;
}
/**
* The params of each page that a file of a dynamic path makes, like `[framework]/deploy.mdx`: its own
* `staticParams`, combined with those of the meta files in its folders by the names they share. `undefined` when the
* path isn't dynamic or nothing lists them, the file is then a page at its literal path.
*
* The meta files of a language come first, like `meta.cn.json` for `deploy.cn.mdx`.
*
* @param file - the path of the file, relative to the content directory
*/
declare function getStaticParams(file: string, { staticParams, readStaticParams }: StaticParamsOptions): Params[] | undefined;
interface Context {
lang?: string;
}
interface LLMsConfig<Page = unknown> {
TAB?: string;
renderName?: (item: Node | Root, ctx: Context) => string;
renderDescription?: (item: Root | Item | Folder, ctx: Context) => string;
/**
* The URL of a link, in files `item.url` is the path of the file it links to, like the `.md` file of a page.
*/
renderUrl?: (item: Item, ctx: Context) => string;
/**
* Render a page as Markdown, required by `page()`, `full()` and the files.
*/
renderPage?: (page: Page) => Awaitable<string>;
/**
* The pages in `full()` and the files, every page by default.
*/
filter?: (page: Page) => boolean;
/**
* Whether a folder is a section: a folder with its own `llms-full.txt`. Root folders are sections by default.
*
* - `collapse`: list the section in `llms.txt` as one link to its own `llms.txt`, which lists its pages.
* - `asPath`: the path to serve its files under, instead of the URL of the folder's index page.
*/
section?: (folder: Folder, ctx: Context) => boolean | {
asPath?: string;
collapse?: boolean;
};
}
interface LLMs<IndexOutput extends Awaitable<string> = Awaitable<string>> {
/**
* generate `llms.txt` content in Markdown format.
*
* use `indexNode(node)` instead for more control (e.g. add extra sections to output).
*/
index: (lang?: string) => IndexOutput;
/**
* generate `llms.txt` content for a single page tree node.
*/
indexNode: (node: Node, lang?: string) => IndexOutput;
}
interface LLMsWithPages<Page, IndexOutput extends Awaitable<string> = Awaitable<string>> extends LLMs<IndexOutput> {
/**
* render a page with `renderPage`.
*/
page: (page: Page) => Promise<string>;
/**
* generate `llms-full.txt` content: every page rendered with `renderPage`.
*/
full: (lang?: string) => Promise<string>;
/**
* The paths of the files for agents, for static output:
*
* - `/llms.txt`: the index, with a link to the `.md` file of each page.
* - `/llms-full.txt`: every page.
* - `<page>.md`: a page, `/index.md` for `/`.
* - `<section>/llms-full.txt`: the pages of a section, and `<section>/llms.txt` when it's collapsed, see `section`.
*
* @param lang - only the pages of a language, required when URLs don't have the locale (`hideLocale: 'always'`)
*/
files: (lang?: string) => Promise<string[]>;
/**
* Respond with the file at a path, `undefined` when there's none.
*
* @param lang - only the pages of a language, see `files()`
*/
serve: (path: string, lang?: string) => Promise<Response | undefined>;
}
declare function llms<C extends LoaderConfig = LoaderConfig>(input: LoaderOutput<C>, config: LLMsConfig<C['page']> & {
renderPage: (page: C['page']) => Awaitable<string>;
}): LLMsWithPages<C['page'], string>;
declare function llms<C extends LoaderConfig = LoaderConfig>(input: LoaderOutput<C>, config?: LLMsConfig<C['page']>): LLMs<string>;
declare function llms<C extends LoaderConfig = LoaderConfig>(input: () => Awaitable<LoaderOutput<C>>, config: LLMsConfig<C['page']> & {
renderPage: (page: C['page']) => Awaitable<string>;
}): LLMsWithPages<C['page'], Promise<string>>;
declare function llms<C extends LoaderConfig = LoaderConfig>(input: () => Awaitable<LoaderOutput<C>>, config?: LLMsConfig<C['page']>): LLMs<Promise<string>>;
export { Meta as A, slugsPlugin as B, InferMetaType as C, LoaderOutput as D, LoaderOptions as E, types_d_exports as F, ContentStorage as G, PageTreeBuilderContext as H, SlugFn as I, FileSystem as J, ContentStorageMetaFile as K, SlugsPluginOptions as L, ResolvedLoaderConfig as M, createGetUrl as N, LoaderPlugin as O, loader as P, getSlugs as R, GetPageOptions as S, LoaderConfig as T, PageTreeOptions as U, PageTreeBuilder as V, PageTreeTransformer as W, multiple as _, StaticParamsOptions as a, DynamicLoaderConfig as b, path_d_exports as c, PageData as d, Params as f, VirtualFile as g, StaticSource as h, llms as i, Page as j, LoaderPluginOption as k, DynamicSource as l, SourceUnion as m, LLMsConfig as n, getStaticParams as o, Source as p, ContentStoragePageFile as q, LLMsWithPages as r, isDynamicPath as s, LLMs as t, MetaData as u, update as v, InferPageType as w, dynamicLoader as x, DynamicLoader as y, slugsFromData as z };