fumadocs-core 15.6.11 → 15.7.0

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,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { R as Root, N as Node } from './page-tree-bSt6K__E.js';
2
+ import { R as Root, N as Node } from './definitions-Q95-psoo.js';
3
3
 
4
4
  interface BreadcrumbItem {
5
5
  name: ReactNode;
@@ -0,0 +1,8 @@
1
+ // src/i18n/index.ts
2
+ function defineI18n(config) {
3
+ return config;
4
+ }
5
+
6
+ export {
7
+ defineI18n
8
+ };
@@ -0,0 +1,72 @@
1
+ // src/i18n/middleware.ts
2
+ import { match as matchLocale } from "@formatjs/intl-localematcher";
3
+ import Negotiator from "negotiator";
4
+ import { NextResponse } from "next/server";
5
+ var COOKIE = "FD_LOCALE";
6
+ function getLocale(request, locales, defaultLanguage) {
7
+ const negotiatorHeaders = {};
8
+ request.headers.forEach((value, key) => {
9
+ negotiatorHeaders[key] = value;
10
+ });
11
+ const languages = new Negotiator({ headers: negotiatorHeaders }).languages(
12
+ locales
13
+ );
14
+ return matchLocale(languages, locales, defaultLanguage);
15
+ }
16
+ var defaultFormat = (locale, path) => {
17
+ return `/${locale}/${path}`;
18
+ };
19
+ function createI18nMiddleware({
20
+ languages,
21
+ defaultLanguage,
22
+ format = defaultFormat,
23
+ hideLocale = "never"
24
+ }) {
25
+ function getUrl(request, pathname, locale) {
26
+ if (!locale) {
27
+ return new URL(
28
+ pathname.startsWith("/") ? pathname : `/${pathname}`,
29
+ request.url
30
+ );
31
+ }
32
+ return new URL(
33
+ format(locale, pathname.startsWith("/") ? pathname.slice(1) : pathname),
34
+ request.url
35
+ );
36
+ }
37
+ return (request) => {
38
+ const inputPath = `${request.nextUrl.pathname}${request.nextUrl.search}`;
39
+ const pathLocale = languages.find(
40
+ (locale) => inputPath.startsWith(`/${locale}/`) || inputPath === `/${locale}`
41
+ );
42
+ if (!pathLocale) {
43
+ if (hideLocale === "default-locale") {
44
+ return NextResponse.rewrite(
45
+ getUrl(request, inputPath, defaultLanguage)
46
+ );
47
+ }
48
+ const preferred = getLocale(request, languages, defaultLanguage);
49
+ if (hideLocale === "always") {
50
+ const locale = request.cookies.get(COOKIE)?.value ?? preferred;
51
+ return NextResponse.rewrite(getUrl(request, inputPath, locale));
52
+ }
53
+ return NextResponse.redirect(getUrl(request, inputPath, preferred));
54
+ }
55
+ if (hideLocale === "always") {
56
+ const path = inputPath.slice(`/${pathLocale}`.length);
57
+ const res = NextResponse.redirect(getUrl(request, path));
58
+ res.cookies.set(COOKIE, pathLocale);
59
+ return res;
60
+ }
61
+ if (hideLocale === "default-locale" && pathLocale === defaultLanguage) {
62
+ return NextResponse.redirect(
63
+ getUrl(request, inputPath.slice(`/${pathLocale}`.length))
64
+ );
65
+ }
66
+ return NextResponse.next();
67
+ };
68
+ }
69
+
70
+ export {
71
+ createI18nMiddleware
72
+ };
@@ -106,8 +106,6 @@ async function highlight(code, options) {
106
106
 
107
107
  export {
108
108
  defaultThemes,
109
- _highlight,
110
- _renderHighlight,
111
109
  getHighlighter,
112
110
  highlight
113
111
  };
@@ -1,9 +1,13 @@
1
- import { ReactNode, ReactElement } from 'react';
1
+ import { ReactNode } from 'react';
2
2
 
3
3
  interface Root {
4
4
  $id?: string;
5
5
  name: ReactNode;
6
6
  children: Node[];
7
+ /**
8
+ * Another page tree that won't be displayed unless being opened.
9
+ */
10
+ fallback?: Root;
7
11
  }
8
12
  type Node = Item | Separator | Folder;
9
13
  interface Item {
@@ -19,13 +23,13 @@ interface Item {
19
23
  url: string;
20
24
  external?: boolean;
21
25
  description?: ReactNode;
22
- icon?: ReactElement;
26
+ icon?: ReactNode;
23
27
  }
24
28
  interface Separator {
25
29
  $id?: string;
26
30
  type: 'separator';
27
31
  name?: ReactNode;
28
- icon?: ReactElement;
32
+ icon?: ReactNode;
29
33
  }
30
34
  interface Folder {
31
35
  $id?: string;
@@ -41,17 +45,17 @@ interface Folder {
41
45
  root?: boolean;
42
46
  defaultOpen?: boolean;
43
47
  index?: Item;
44
- icon?: ReactElement;
48
+ icon?: ReactNode;
45
49
  children: Node[];
46
50
  }
47
51
 
48
- type pageTree_Folder = Folder;
49
- type pageTree_Item = Item;
50
- type pageTree_Node = Node;
51
- type pageTree_Root = Root;
52
- type pageTree_Separator = Separator;
53
- declare namespace pageTree {
54
- export type { pageTree_Folder as Folder, pageTree_Item as Item, pageTree_Node as Node, pageTree_Root as Root, pageTree_Separator as Separator };
52
+ type definitions_Folder = Folder;
53
+ type definitions_Item = Item;
54
+ type definitions_Node = Node;
55
+ type definitions_Root = Root;
56
+ type definitions_Separator = Separator;
57
+ declare namespace definitions {
58
+ export type { definitions_Folder as Folder, definitions_Item as Item, definitions_Node as Node, definitions_Root as Root, definitions_Separator as Separator };
55
59
  }
56
60
 
57
- export { type Folder as F, type Item as I, type Node as N, type Root as R, type Separator as S, pageTree as p };
61
+ export { type Folder as F, type Item as I, type Node as N, type Root as R, type Separator as S, definitions as d };
@@ -4,10 +4,15 @@ import 'shiki';
4
4
  import 'shiki/themes';
5
5
  import 'hast-util-to-jsx-runtime';
6
6
 
7
- declare function useShiki(code: string, { withPrerenderScript, loading, ...options }: HighlightOptions & {
7
+ declare function useShiki(code: string, options: HighlightOptions & {
8
+ /**
9
+ * @deprecated no longer pre-rendered using scripts.
10
+ */
8
11
  withPrerenderScript?: boolean;
9
12
  /**
10
13
  * Displayed before highlighter is loaded.
14
+ *
15
+ * @deprecated use React `Suspense` fallback instead.
11
16
  */
12
17
  loading?: ReactNode;
13
18
  }, deps?: DependencyList): ReactNode;
@@ -1,88 +1,28 @@
1
1
  "use client";
2
2
  import {
3
- _highlight,
4
- _renderHighlight,
5
3
  highlight
6
- } from "../chunk-3NX26V7I.js";
4
+ } from "../chunk-NJLFLPV4.js";
7
5
  import "../chunk-JSBRDJBE.js";
8
6
 
9
7
  // src/highlight/client.tsx
10
8
  import {
11
9
  use,
12
- useEffect,
13
10
  useId,
14
- useMemo,
15
- useRef,
16
- useState
11
+ useMemo
17
12
  } from "react";
18
- import { jsx } from "react/jsx-runtime";
19
- function useShiki(code, {
20
- withPrerenderScript = false,
21
- loading,
22
- ...options
23
- }, deps) {
24
- const markupId = useId();
25
- const key = useMemo(
26
- () => deps ? JSON.stringify(deps) : `${options.lang}:${code}`,
27
- [code, deps, options.lang]
13
+ var promises = {};
14
+ function useShiki(code, options, deps) {
15
+ const id = useId();
16
+ const key = useMemo(() => {
17
+ const state = deps ? JSON.stringify(deps) : `${options.lang}:${code}`;
18
+ return `${id}:${state}`;
19
+ }, [code, deps, id, options.lang]);
20
+ return use(
21
+ promises[key] ??= highlight(code, {
22
+ ...options,
23
+ engine: options.engine ?? "js"
24
+ })
28
25
  );
29
- const shikiOptions = {
30
- ...options,
31
- engine: options.engine ?? "js"
32
- };
33
- const currentTask = useRef({
34
- key,
35
- aborted: false
36
- });
37
- const [rendered, setRendered] = useState(() => {
38
- const element = withPrerenderScript && typeof document !== "undefined" ? document.querySelector(`[data-markup-id="${markupId}"]`) : null;
39
- const attr = element?.getAttribute("data-markup");
40
- if (attr) {
41
- const hast = JSON.parse(attr);
42
- return renderHighlightWithMarkup(markupId, hast, shikiOptions, attr);
43
- }
44
- currentTask.current = void 0;
45
- return loading;
46
- });
47
- useEffect(() => {
48
- if (currentTask.current?.key === key) return;
49
- if (currentTask.current) {
50
- currentTask.current.aborted = true;
51
- }
52
- const task = {
53
- key,
54
- aborted: false
55
- };
56
- currentTask.current = task;
57
- void highlight(code, shikiOptions).then((result) => {
58
- if (!task.aborted) setRendered(result);
59
- });
60
- }, [key]);
61
- if (typeof window === "undefined") {
62
- return use(
63
- _highlight(code, shikiOptions).then(
64
- (tree) => renderHighlightWithMarkup(markupId, tree, shikiOptions)
65
- )
66
- );
67
- }
68
- return rendered;
69
- }
70
- function renderHighlightWithMarkup(id, tree, shikiOptions, rawAttr) {
71
- const Pre = shikiOptions.components?.pre ?? "pre";
72
- return _renderHighlight(tree, {
73
- ...shikiOptions,
74
- components: {
75
- ...shikiOptions.components,
76
- pre: (props) => /* @__PURE__ */ jsx(
77
- Pre,
78
- {
79
- ...props,
80
- "data-markup-id": id,
81
- "data-markup": rawAttr ?? JSON.stringify(tree)
82
- }
83
- )
84
- }
85
- });
86
26
  }
87
27
  export {
88
28
  useShiki
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getHighlighter,
3
3
  highlight
4
- } from "../chunk-3NX26V7I.js";
4
+ } from "../chunk-NJLFLPV4.js";
5
5
  import "../chunk-JSBRDJBE.js";
6
6
  export {
7
7
  getHighlighter,
@@ -1,24 +1,14 @@
1
- import { NextMiddleware } from 'next/dist/server/web/types';
2
-
3
- interface MiddlewareOptions extends I18nConfig {
4
- /**
5
- * A function that adds the locale prefix to path name
6
- */
7
- format?: (locale: string, path: string) => string;
8
- }
9
- declare function createI18nMiddleware({ languages, defaultLanguage, format, hideLocale, }: MiddlewareOptions): NextMiddleware;
10
-
11
- interface I18nConfig {
1
+ interface I18nConfig<Languages extends string = string> {
12
2
  /**
13
3
  * Supported locale codes.
14
4
  *
15
5
  * A page tree will be built for each language.
16
6
  */
17
- languages: string[];
7
+ languages: Languages[];
18
8
  /**
19
9
  * Default locale if not specified
20
10
  */
21
- defaultLanguage: string;
11
+ defaultLanguage: Languages;
22
12
  /**
23
13
  * Don't show the locale prefix on URL.
24
14
  *
@@ -38,5 +28,6 @@ interface I18nConfig {
38
28
  */
39
29
  parser?: 'dot' | 'dir';
40
30
  }
31
+ declare function defineI18n<Languages extends string>(config: I18nConfig<Languages>): I18nConfig<Languages>;
41
32
 
42
- export { type I18nConfig, createI18nMiddleware };
33
+ export { type I18nConfig, defineI18n };
@@ -1,73 +1,7 @@
1
+ import {
2
+ defineI18n
3
+ } from "../chunk-HUTQC33E.js";
1
4
  import "../chunk-JSBRDJBE.js";
2
-
3
- // src/i18n/middleware.ts
4
- import { match as matchLocale } from "@formatjs/intl-localematcher";
5
- import Negotiator from "negotiator";
6
- import { NextResponse } from "next/server";
7
- var COOKIE = "FD_LOCALE";
8
- function getLocale(request, locales, defaultLanguage) {
9
- const negotiatorHeaders = {};
10
- request.headers.forEach((value, key) => {
11
- negotiatorHeaders[key] = value;
12
- });
13
- const languages = new Negotiator({ headers: negotiatorHeaders }).languages(
14
- locales
15
- );
16
- return matchLocale(languages, locales, defaultLanguage);
17
- }
18
- var defaultFormat = (locale, path) => {
19
- return `/${locale}/${path}`;
20
- };
21
- function createI18nMiddleware({
22
- languages,
23
- defaultLanguage,
24
- format = defaultFormat,
25
- hideLocale = "never"
26
- }) {
27
- function getUrl(request, pathname, locale) {
28
- if (!locale) {
29
- return new URL(
30
- pathname.startsWith("/") ? pathname : `/${pathname}`,
31
- request.url
32
- );
33
- }
34
- return new URL(
35
- format(locale, pathname.startsWith("/") ? pathname.slice(1) : pathname),
36
- request.url
37
- );
38
- }
39
- return (request) => {
40
- const inputPath = `${request.nextUrl.pathname}${request.nextUrl.search}`;
41
- const pathLocale = languages.find(
42
- (locale) => inputPath.startsWith(`/${locale}/`) || inputPath === `/${locale}`
43
- );
44
- if (!pathLocale) {
45
- if (hideLocale === "default-locale") {
46
- return NextResponse.rewrite(
47
- getUrl(request, inputPath, defaultLanguage)
48
- );
49
- }
50
- const preferred = getLocale(request, languages, defaultLanguage);
51
- if (hideLocale === "always") {
52
- const locale = request.cookies.get(COOKIE)?.value ?? preferred;
53
- return NextResponse.rewrite(getUrl(request, inputPath, locale));
54
- }
55
- return NextResponse.redirect(getUrl(request, inputPath, preferred));
56
- }
57
- if (hideLocale === "always") {
58
- const path = inputPath.slice(`/${pathLocale}`.length);
59
- const res = NextResponse.redirect(getUrl(request, path));
60
- res.cookies.set(COOKIE, pathLocale);
61
- return res;
62
- }
63
- if (hideLocale === "default-locale" && pathLocale === defaultLanguage) {
64
- return NextResponse.redirect(
65
- getUrl(request, inputPath.slice(`/${pathLocale}`.length))
66
- );
67
- }
68
- return NextResponse.next();
69
- };
70
- }
71
5
  export {
72
- createI18nMiddleware
6
+ defineI18n
73
7
  };
@@ -0,0 +1,3 @@
1
+ export { I18nConfig, defineI18n } from './index.js';
2
+ export { createI18nMiddleware } from './middleware.js';
3
+ import 'next/dist/server/web/types';
@@ -0,0 +1,11 @@
1
+ import {
2
+ createI18nMiddleware
3
+ } from "../chunk-KLUGJRZC.js";
4
+ import {
5
+ defineI18n
6
+ } from "../chunk-HUTQC33E.js";
7
+ import "../chunk-JSBRDJBE.js";
8
+ export {
9
+ createI18nMiddleware,
10
+ defineI18n
11
+ };
@@ -0,0 +1,12 @@
1
+ import { I18nConfig } from './index.js';
2
+ import { NextMiddleware } from 'next/dist/server/web/types';
3
+
4
+ interface MiddlewareOptions extends I18nConfig {
5
+ /**
6
+ * A function that adds the locale prefix to path name
7
+ */
8
+ format?: (locale: string, path: string) => string;
9
+ }
10
+ declare function createI18nMiddleware({ languages, defaultLanguage, format, hideLocale, }: MiddlewareOptions): NextMiddleware;
11
+
12
+ export { createI18nMiddleware };
@@ -0,0 +1,7 @@
1
+ import {
2
+ createI18nMiddleware
3
+ } from "../chunk-KLUGJRZC.js";
4
+ import "../chunk-JSBRDJBE.js";
5
+ export {
6
+ createI18nMiddleware
7
+ };
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  defaultThemes,
11
11
  getHighlighter
12
- } from "../chunk-3NX26V7I.js";
12
+ } from "../chunk-NJLFLPV4.js";
13
13
  import "../chunk-JSBRDJBE.js";
14
14
 
15
15
  // src/mdx-plugins/index.ts
@@ -7,9 +7,8 @@ import { LoaderOutput, LoaderConfig, InferPageType } from '../source/index.js';
7
7
  import 'mdast';
8
8
  import 'unified';
9
9
  import 'mdast-util-mdx-jsx';
10
- import 'next/dist/server/web/types';
11
10
  import 'react';
12
- import '../page-tree-bSt6K__E.js';
11
+ import '../definitions-Q95-psoo.js';
13
12
 
14
13
  type AdvancedDocument = TypedDocument<Orama<typeof advancedSchema>>;
15
14
  declare const advancedSchema: {
@@ -28,13 +27,25 @@ declare const simpleSchema: {
28
27
  readonly keywords: "string";
29
28
  };
30
29
 
31
- type LocaleMap<O> = Record<string, Language | O>;
30
+ type Awaitable<T> = T | Promise<T>;
31
+ interface Options<S extends LoaderOutput<LoaderConfig>> extends Omit<AdvancedOptions, 'indexes'> {
32
+ localeMap?: {
33
+ [K in S extends LoaderOutput<infer C> ? C['i18n'] extends I18nConfig<infer Languages> ? Languages : string : string]?: Partial<AdvancedOptions> | Language;
34
+ };
35
+ buildIndex?: (page: InferPageType<S>) => Awaitable<AdvancedIndex>;
36
+ }
37
+ declare function createFromSource<S extends LoaderOutput<LoaderConfig>>(source: S, options?: Options<S>): SearchAPI;
38
+ /**
39
+ * @deprecated Use `createFromSource(source, options)` instead.
40
+ */
41
+ declare function createFromSource<S extends LoaderOutput<LoaderConfig>>(source: S, pageToIndexFn?: (page: InferPageType<S>) => Awaitable<AdvancedIndex>, options?: Omit<Options<S>, 'buildIndex'>): SearchAPI;
42
+
32
43
  type I18nOptions<O extends SimpleOptions | AdvancedOptions, Idx> = Omit<O, 'language' | 'indexes'> & {
33
44
  i18n: I18nConfig;
34
45
  /**
35
46
  * Map locale name from i18n config to Orama compatible `language` or options
36
47
  */
37
- localeMap?: LocaleMap<Partial<O>>;
48
+ localeMap?: Record<string, Language | Partial<O> | undefined>;
38
49
  indexes: WithLocale<Idx>[] | Dynamic<WithLocale<Idx>>;
39
50
  };
40
51
  type I18nSimpleOptions = I18nOptions<SimpleOptions, Index>;
@@ -44,16 +55,6 @@ type WithLocale<T> = T & {
44
55
  };
45
56
  declare function createI18nSearchAPI<T extends 'simple' | 'advanced'>(type: T, options: T extends 'simple' ? I18nSimpleOptions : I18nAdvancedOptions): SearchAPI;
46
57
 
47
- interface Options<Page = unknown> extends Omit<AdvancedOptions, 'indexes'> {
48
- localeMap?: LocaleMap<Partial<AdvancedOptions>>;
49
- buildIndex?: (page: Page) => AdvancedIndex;
50
- }
51
- declare function createFromSource<S extends LoaderOutput<LoaderConfig>>(source: S, options?: Options<InferPageType<S>>): SearchAPI;
52
- /**
53
- * @deprecated Use `createFromSource(source, options)` instead.
54
- */
55
- declare function createFromSource<S extends LoaderOutput<LoaderConfig>>(source: S, pageToIndexFn?: (page: InferPageType<S>) => AdvancedIndex, options?: Omit<Options, 'buildIndex'>): SearchAPI;
56
-
57
58
  type SearchType = 'simple' | 'advanced';
58
59
  type ExportedData = (RawData & {
59
60
  type: SearchType;
@@ -148,13 +148,17 @@ async function createDBSimple({
148
148
  }
149
149
 
150
150
  // src/search/orama/create-from-source.ts
151
- function pageToIndex(page) {
152
- if (!("structuredData" in page.data)) {
151
+ async function pageToIndex(page) {
152
+ let structuredData;
153
+ if ("structuredData" in page.data) {
154
+ structuredData = page.data.structuredData;
155
+ } else if ("load" in page.data && typeof page.data.load === "function") {
156
+ structuredData = (await page.data.load()).structuredData;
157
+ }
158
+ if (!structuredData)
153
159
  throw new Error(
154
160
  "Cannot find structured data from page, please define the page to index function."
155
161
  );
156
- }
157
- const structuredData = page.data.structuredData;
158
162
  return {
159
163
  title: page.data.title ?? basename(page.path, extname(page.path)),
160
164
  description: "description" in page.data ? page.data.description : void 0,
@@ -164,32 +168,53 @@ function pageToIndex(page) {
164
168
  };
165
169
  }
166
170
  function createFromSource(source, _buildIndexOrOptions = pageToIndex, _options) {
167
- const options = {
171
+ const { buildIndex = pageToIndex, ...options } = {
168
172
  ...typeof _buildIndexOrOptions === "function" ? {
169
173
  buildIndex: _buildIndexOrOptions
170
174
  } : _buildIndexOrOptions,
171
175
  ..._options
172
176
  };
173
- if (source._i18n) {
174
- return createI18nSearchAPI("advanced", {
175
- ...options,
176
- i18n: source._i18n,
177
- indexes: source.getLanguages().flatMap((entry) => {
178
- return entry.pages.map((page) => {
179
- return {
180
- ...(options.buildIndex ?? pageToIndex)(page),
181
- locale: entry.language
182
- };
183
- });
177
+ const i18n = source._i18n;
178
+ let server;
179
+ if (i18n) {
180
+ const indexes = source.getLanguages().flatMap((entry) => {
181
+ return entry.pages.map(async (page) => ({
182
+ ...await buildIndex(page),
183
+ locale: entry.language
184
+ }));
185
+ });
186
+ server = Promise.all(indexes).then(
187
+ (loaded) => createI18nSearchAPI("advanced", {
188
+ ...options,
189
+ i18n,
190
+ indexes: loaded
184
191
  })
192
+ );
193
+ } else {
194
+ const indexes = source.getPages().map(async (page) => {
195
+ return buildIndex(page);
185
196
  });
197
+ server = Promise.all(indexes).then(
198
+ (loaded) => createSearchAPI("advanced", {
199
+ ...options,
200
+ indexes: loaded
201
+ })
202
+ );
186
203
  }
187
- return createSearchAPI("advanced", {
188
- ...options,
189
- indexes: source.getPages().map((page) => {
190
- return (options.buildIndex ?? pageToIndex)(page);
191
- })
192
- });
204
+ return {
205
+ async export(...args) {
206
+ return (await server).export(...args);
207
+ },
208
+ async GET(...args) {
209
+ return (await server).GET(...args);
210
+ },
211
+ async search(...args) {
212
+ return (await server).search(...args);
213
+ },
214
+ async staticGET(...args) {
215
+ return (await server).staticGET(...args);
216
+ }
217
+ };
193
218
  }
194
219
 
195
220
  // src/search/orama/_stemmers.ts
@@ -1,6 +1,6 @@
1
1
  export { a as TOCItemType, T as TableOfContents, g as getTableOfContents } from '../get-toc-Cr2URuiP.js';
2
- import { N as Node, I as Item, R as Root, F as Folder } from '../page-tree-bSt6K__E.js';
3
- export { p as PageTree } from '../page-tree-bSt6K__E.js';
2
+ import { N as Node, I as Item, R as Root, F as Folder } from '../definitions-Q95-psoo.js';
3
+ export { d as PageTree } from '../definitions-Q95-psoo.js';
4
4
  import { Metadata } from 'next';
5
5
  import { NextRequest } from 'next/server';
6
6
  import { LoaderOutput, LoaderConfig, InferPageType } from '../source/index.js';
@@ -9,12 +9,11 @@ import 'react';
9
9
  import 'unified';
10
10
  import 'vfile';
11
11
  import '../i18n/index.js';
12
- import 'next/dist/server/web/types';
13
12
 
14
13
  /**
15
14
  * Flatten tree to an array of page nodes
16
15
  */
17
- declare function flattenTree(tree: Node[]): Item[];
16
+ declare function flattenTree(nodes: Node[]): Item[];
18
17
  /**
19
18
  * Get neighbours of a page, useful for implementing "previous & next" buttons
20
19
  */
@@ -27,6 +26,8 @@ declare function findNeighbour(tree: Root, url: string, options?: {
27
26
  declare function getPageTreeRoots(pageTree: Root | Folder): (Root | Folder)[];
28
27
  /**
29
28
  * Separate the folder nodes of a root into multiple roots
29
+ *
30
+ * @deprecated it's useless
30
31
  */
31
32
  declare function separatePageTree(pageTree: Root): Root[];
32
33
  /**