fumadocs-core 16.17.8 → 16.17.9
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/{advanced-cJMxLDd5.js → advanced-8SKrWgR9.js} +3 -5
- package/dist/{algolia-NG5vCx7r.d.ts → algolia-DnAe2syq.d.ts} +3 -5
- package/dist/breadcrumb.d.ts +2 -4
- package/dist/breadcrumb.js +3 -4
- package/dist/{build-doc-C7HYXyRK.js → build-doc-CHLmZvHA.js} +1 -2
- package/dist/{build-index-a5ygCRBZ.js → build-index-CqctTvug.js} +2 -3
- package/dist/{client-BAj2KxA7.d.ts → client-DnKr8e39.d.ts} +4 -24
- package/dist/{codeblock-utils-D4AMPi6B.d.ts → codeblock-utils-D65x-Jra.d.ts} +0 -2
- package/dist/content/github.d.ts +1 -3
- package/dist/content/github.js +1 -2
- package/dist/content/md/frontmatter.d.ts +0 -2
- package/dist/content/md/frontmatter.js +1 -2
- package/dist/content/md.d.ts +2 -4
- package/dist/content/md.js +1 -2
- package/dist/content/mdx/preset-bundler.d.ts +9 -11
- package/dist/content/mdx/preset-bundler.js +2 -3
- package/dist/content/mdx/preset-runtime.d.ts +9 -11
- package/dist/content/mdx/preset-runtime.js +2 -3
- package/dist/content/toc.d.ts +2 -4
- package/dist/content/toc.js +1 -2
- package/dist/{definitions-CFOhwE1k.d.ts → definitions-BQVehOBz.d.ts} +0 -2
- package/dist/{dynamic-CymQi8F2.js → dynamic-B2QN5ycX.js} +11 -17
- package/dist/dynamic-link.d.ts +0 -2
- package/dist/dynamic-link.js +1 -2
- package/dist/{endpoint-MyoBU5IC.js → endpoint-H7rb4eeq.js} +1 -2
- package/dist/framework/astro.d.ts +0 -2
- package/dist/framework/astro.js +1 -2
- package/dist/framework/index.d.ts +0 -2
- package/dist/framework/index.js +1 -2
- package/dist/framework/next.d.ts +1 -3
- package/dist/framework/next.js +1 -2
- package/dist/framework/react-router.d.ts +1 -3
- package/dist/framework/react-router.js +1 -2
- package/dist/framework/tanstack.d.ts +1 -3
- package/dist/framework/tanstack.js +10 -5
- package/dist/framework/waku.d.ts +1 -3
- package/dist/framework/waku.js +1 -2
- package/dist/{hast-to-jsx-CgR__kSX.d.ts → hast-to-jsx-ezp6bh3J.d.ts} +0 -2
- package/dist/{heading-id-CUA_RA6B.js → heading-id-BXARvmRb.js} +1 -2
- package/dist/highlight/client.d.ts +2 -4
- package/dist/highlight/client.js +2 -3
- package/dist/highlight/highlights.d.ts +2 -4
- package/dist/highlight/highlights.js +1 -2
- package/dist/highlight/index.d.ts +1 -1
- package/dist/highlight/index.js +2 -3
- package/dist/highlight/shiki/full.d.ts +2 -4
- package/dist/highlight/shiki/full.js +2 -3
- package/dist/highlight/shiki/index.d.ts +1 -1
- package/dist/highlight/shiki/index.js +1 -1
- package/dist/highlight/shiki/react.d.ts +4 -6
- package/dist/highlight/shiki/react.js +2 -3
- package/dist/{highlight-SXtD3BKk.js → highlight-D_pTHg81.js} +1 -2
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +1 -2
- package/dist/i18n/middleware.d.ts +1 -3
- package/dist/i18n/middleware.js +4 -8
- package/dist/{icon-BILaoXeg.js → icon-CDrAUvm5.js} +1 -2
- package/dist/{index-m7W5wflM.d.ts → index-B0Bzrmfa.d.ts} +2 -4
- package/dist/{index-B-0R0VbS.d.ts → index-B2EN5xn0.d.ts} +2 -4
- package/dist/{index-DydiXvgS.d.ts → index-BIhpw5_j.d.ts} +0 -2
- package/dist/{index-Bf_V9OZJ.d.ts → index-BhAz6nyI.d.ts} +1 -3
- package/dist/index-C0yDf9A2.d.ts +17 -0
- package/dist/{index-BbTxYEFm.d.ts → index-CE1OSGGq.d.ts} +1 -3
- package/dist/{index-DNo8LS3A.d.ts → index-DAbFAfHX.d.ts} +7 -25
- package/dist/{index-E8Qh_yQs.d.ts → index-DMxrC6WS.d.ts} +1 -3
- package/dist/{is-equal-LdLqRs0o.js → is-equal-BuZW92e4.js} +1 -2
- package/dist/link.d.ts +0 -2
- package/dist/link.js +1 -2
- package/dist/mcp.d.ts +4 -6
- package/dist/mcp.js +1 -2
- package/dist/mdx-plugins/codeblock-utils.d.ts +1 -1
- package/dist/mdx-plugins/codeblock-utils.js +1 -2
- package/dist/mdx-plugins/index.d.ts +19 -19
- package/dist/mdx-plugins/index.js +1 -1
- package/dist/mdx-plugins/rehype-code.core.d.ts +2 -2
- package/dist/mdx-plugins/rehype-code.core.js +1 -1
- package/dist/mdx-plugins/rehype-code.d.ts +3 -3
- package/dist/mdx-plugins/rehype-code.js +2 -3
- package/dist/mdx-plugins/rehype-toc.d.ts +1 -1
- package/dist/mdx-plugins/rehype-toc.js +2 -3
- package/dist/mdx-plugins/remark-admonition.d.ts +1 -1
- package/dist/mdx-plugins/remark-admonition.js +2 -3
- package/dist/mdx-plugins/remark-block-id.d.ts +1 -3
- package/dist/mdx-plugins/remark-block-id.js +2 -3
- package/dist/mdx-plugins/remark-code-tab.d.ts +1 -1
- package/dist/mdx-plugins/remark-code-tab.js +2 -3
- package/dist/mdx-plugins/remark-directive-admonition.d.ts +1 -1
- package/dist/mdx-plugins/remark-directive-admonition.js +2 -3
- package/dist/mdx-plugins/remark-feedback-block.d.ts +1 -1
- package/dist/mdx-plugins/remark-feedback-block.js +2 -3
- package/dist/mdx-plugins/remark-heading.d.ts +1 -1
- package/dist/mdx-plugins/remark-heading.js +3 -4
- package/dist/mdx-plugins/remark-image.d.ts +1 -1
- package/dist/mdx-plugins/remark-image.js +2 -3
- package/dist/mdx-plugins/remark-include.d.ts +1 -1
- package/dist/mdx-plugins/remark-include.js +3 -4
- package/dist/mdx-plugins/remark-llms.d.ts +1 -1
- package/dist/mdx-plugins/remark-llms.js +3 -4
- package/dist/mdx-plugins/remark-llms.runtime.d.ts +2 -4
- package/dist/mdx-plugins/remark-llms.runtime.js +1 -2
- package/dist/mdx-plugins/remark-mdx-files.d.ts +1 -1
- package/dist/mdx-plugins/remark-mdx-files.js +2 -3
- package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +1 -1
- package/dist/mdx-plugins/remark-mdx-mermaid.js +2 -3
- package/dist/mdx-plugins/remark-npm.d.ts +1 -1
- package/dist/mdx-plugins/remark-npm.js +2 -3
- package/dist/mdx-plugins/remark-steps.d.ts +1 -1
- package/dist/mdx-plugins/remark-steps.js +2 -3
- package/dist/mdx-plugins/remark-structure.d.ts +1 -1
- package/dist/mdx-plugins/remark-structure.js +3 -4
- package/dist/mdx-plugins/stringifier.d.ts +0 -2
- package/dist/mdx-plugins/stringifier.js +1 -2
- package/dist/mdx-plugins/transformer-icon.d.ts +1 -1
- package/dist/mdx-plugins/transformer-icon.js +1 -2
- package/dist/{meilisearch-Cy3VXUZn.d.ts → meilisearch-DLgT0_3G.d.ts} +3 -5
- package/dist/{mixedbread-2VnWtXx5.d.ts → mixedbread-DWeuz1Xb.d.ts} +3 -5
- package/dist/negotiation/index.d.ts +1 -3
- package/dist/negotiation/index.js +2 -4
- package/dist/page-tree/index.d.ts +2 -2
- package/dist/page-tree/index.js +1 -1
- package/dist/{parse-BU3fTLtO.js → parse-CsgDThRb.js} +1 -2
- package/dist/{path-UUoiuLiY.js → path-CH9Umap3.js} +2 -3
- package/dist/{rehype-code-BVf0Uz2w.d.ts → rehype-code-CPNaiqAY.d.ts} +1 -3
- package/dist/{rehype-code.core-4GV1oJiD.d.ts → rehype-code.core-D1aZ5yla.d.ts} +4 -8
- package/dist/{rehype-code.core-CI2UNT3P.js → rehype-code.core-Dq2jmvan.js} +5 -8
- package/dist/{rehype-toc-BXIfcuF8.d.ts → rehype-toc-BBnmTg-x.d.ts} +0 -2
- package/dist/{remark-admonition-BwTcmI_S.d.ts → remark-admonition-BxacgP6i.d.ts} +0 -2
- package/dist/{remark-code-tab-DE_4bdnu.d.ts → remark-code-tab-Dj_--R3y.d.ts} +0 -2
- package/dist/{remark-directive-admonition-BLiJ5l43.d.ts → remark-directive-admonition-BT_PH6hL.d.ts} +0 -2
- package/dist/{remark-feedback-block-BxtINXN-.d.ts → remark-feedback-block-2Ei4IDr4.d.ts} +0 -2
- package/dist/{remark-heading-DEIzTkU5.d.ts → remark-heading-Dr13q5Om.d.ts} +1 -3
- package/dist/{remark-image-BI2S9LOb.d.ts → remark-image-BwyGdFld.d.ts} +0 -2
- package/dist/{remark-include-BUSAq2rM.d.ts → remark-include-D_FmDdtI.d.ts} +0 -2
- package/dist/{remark-llms-cgVaxL_5.d.ts → remark-llms-eA0WMw4X.d.ts} +0 -2
- package/dist/{remark-mdx-files-NfjIpY1d.d.ts → remark-mdx-files-BJvKexDp.d.ts} +0 -2
- package/dist/{remark-mdx-mermaid-C1bCHHc6.d.ts → remark-mdx-mermaid-BrK4YVTJ.d.ts} +0 -2
- package/dist/{remark-npm-BbpvkJaT.d.ts → remark-npm-IH35Vls_.d.ts} +0 -2
- package/dist/{remark-steps-DqVEo0iq.d.ts → remark-steps-CKvq9VmR.d.ts} +0 -2
- package/dist/{remark-structure-C4hp7I5L.d.ts → remark-structure-50nmY6sX.d.ts} +0 -2
- package/dist/{remove-undefined-CzMSKybq.js → remove-undefined-C_sjLeQT.js} +1 -2
- package/dist/{rolldown-runtime-CgOhrHTk.js → rolldown-runtime-C-UrYobY.js} +1 -2
- package/dist/search/algolia.d.ts +1 -1
- package/dist/search/algolia.js +2 -3
- package/dist/search/client/algolia.d.ts +1 -1
- package/dist/search/client/algolia.js +2 -3
- package/dist/search/client/docs-search.d.ts +1 -1
- package/dist/search/client/docs-search.js +2 -3
- package/dist/search/client/fetch.d.ts +1 -1
- package/dist/search/client/fetch.js +3 -4
- package/dist/search/client/flexsearch-static.d.ts +1 -1
- package/dist/search/client/flexsearch-static.js +4 -5
- package/dist/search/client/meilisearch.d.ts +1 -1
- package/dist/search/client/meilisearch.js +2 -3
- package/dist/search/client/mixedbread.d.ts +2 -2
- package/dist/search/client/mixedbread.js +1 -2
- package/dist/search/client/orama-cloud-legacy.d.ts +1 -1
- package/dist/search/client/orama-cloud-legacy.js +3 -4
- package/dist/search/client/orama-cloud.d.ts +1 -1
- package/dist/search/client/orama-cloud.js +3 -4
- package/dist/search/client/orama-static.d.ts +1 -1
- package/dist/search/client/orama-static.js +4 -5
- package/dist/search/client.d.ts +1 -1
- package/dist/search/client.js +1 -1
- package/dist/search/flexsearch.d.ts +5 -11
- package/dist/search/flexsearch.js +5 -6
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +3 -4
- package/dist/search/meilisearch.d.ts +1 -1
- package/dist/search/meilisearch.js +2 -3
- package/dist/search/mixedbread.d.ts +2 -2
- package/dist/search/mixedbread.js +2 -3
- package/dist/search/orama-cloud-legacy.d.ts +3 -5
- package/dist/search/orama-cloud-legacy.js +1 -2
- package/dist/search/orama-cloud.d.ts +5 -7
- package/dist/search/orama-cloud.js +2 -3
- package/dist/search/server.d.ts +1 -1
- package/dist/search/server.js +6 -8
- package/dist/{server-BhSRJDWc.d.ts → server-k8QJZEib.d.ts} +5 -13
- package/dist/server.browser.d.ts +1 -3
- package/dist/server.browser.js +1 -2
- package/dist/server.d.ts +1 -3
- package/dist/server.js +1 -2
- package/dist/{shiki-DzWiTQMz.js → shiki-DL5DIaX-.js} +2 -4
- package/dist/source/client/index.d.ts +1 -1
- package/dist/source/client/index.js +6 -6
- package/dist/source/dynamic.d.ts +1 -1
- package/dist/source/dynamic.js +1 -1
- package/dist/source/index.d.ts +1 -1
- package/dist/source/index.js +2 -2
- package/dist/source/llms.d.ts +1 -1
- package/dist/source/llms.js +1 -2
- package/dist/source/plugins/lucide-icons.d.ts +2 -4
- package/dist/source/plugins/lucide-icons.js +2 -3
- package/dist/source/plugins/slugs.d.ts +1 -1
- package/dist/source/plugins/slugs.js +2 -3
- package/dist/source/plugins/status-badges.d.ts +3 -5
- package/dist/source/plugins/status-badges.js +1 -2
- package/dist/source/schema.d.ts +2 -3
- package/dist/source/schema.js +3 -3
- package/dist/{toc-CtW5lwA1.d.ts → toc-BPaCQkFr.d.ts} +0 -2
- package/dist/toc.d.ts +1 -1
- package/dist/toc.js +3 -5
- package/dist/{transformer-icon-DlrneIS3.d.ts → transformer-icon-Bi4LROAz.d.ts} +0 -2
- package/dist/{types-D1vp9AYr.d.ts → types-Dvkw0Kd0.d.ts} +0 -2
- package/dist/{url-BVHvi3_K.js → url-BF81yL4m.js} +1 -2
- package/dist/{use-search-Dy8lBrbN.js → use-search-eSAjMJVB.js} +3 -4
- package/dist/{util-DjBr9b3w.js → util-LjTEYxnT.js} +1 -2
- package/dist/{util-BDsqOxh3.d.ts → util-YfkucgkA.d.ts} +0 -2
- package/dist/utils/hast-to-jsx.d.ts +1 -1
- package/dist/utils/hast-to-jsx.js +1 -2
- package/dist/utils/use-media-query.d.ts +1 -3
- package/dist/utils/use-media-query.js +1 -2
- package/dist/utils/use-on-change.d.ts +1 -3
- package/dist/utils/use-on-change.js +2 -3
- package/dist/{utils-CbSdov6X.js → utils-BYuB2fyY.js} +1 -2
- package/dist/{utils-DEVq3cEC.js → utils-D63kPQ77.js} +1 -2
- package/dist/{utils-2pZeFRk8.js → utils-DV8PBZiI.js} +1 -2
- package/package.json +1 -1
- package/dist/index-Cr-WMmZN.d.ts +0 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as removeUndefined } from "./remove-undefined-
|
|
1
|
+
import { t as removeUndefined } from "./remove-undefined-C_sjLeQT.js";
|
|
2
2
|
import { getByID, search } from "zbsearch";
|
|
3
|
-
|
|
3
|
+
// src/search/zbsearch/search/simple.ts
|
|
4
4
|
async function searchSimple(db, query, params = {}, locale) {
|
|
5
5
|
return (await search(db, {
|
|
6
6
|
term: query,
|
|
@@ -22,8 +22,7 @@ async function searchSimple(db, query, params = {}, locale) {
|
|
|
22
22
|
url: hit.document.url
|
|
23
23
|
}));
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
//#region src/search/zbsearch/search/advanced.ts
|
|
25
|
+
// src/search/zbsearch/search/advanced.ts
|
|
27
26
|
async function searchAdvanced(db, query, tag = [], { mode = "fulltext", limit = 60, ...override } = {}, locale) {
|
|
28
27
|
if (typeof tag === "string") tag = [tag];
|
|
29
28
|
const params = {
|
|
@@ -72,5 +71,4 @@ async function searchAdvanced(db, query, tag = [], { mode = "fulltext", limit =
|
|
|
72
71
|
}
|
|
73
72
|
return list;
|
|
74
73
|
}
|
|
75
|
-
//#endregion
|
|
76
74
|
export { searchSimple as n, searchAdvanced as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as Awaitable } from "./types-
|
|
2
|
-
import { n as StructuredData } from "./remark-structure-
|
|
3
|
-
import { S as LoaderOutput, b as LoaderConfig } from "./index-
|
|
1
|
+
import { t as Awaitable } from "./types-Dvkw0Kd0.js";
|
|
2
|
+
import { n as StructuredData } from "./remark-structure-50nmY6sX.js";
|
|
3
|
+
import { S as LoaderOutput, b as LoaderConfig } from "./index-DAbFAfHX.js";
|
|
4
4
|
import { Algoliasearch } from "algoliasearch";
|
|
5
|
-
//#region src/search/algolia.d.ts
|
|
6
5
|
interface DocumentRecord {
|
|
7
6
|
/**
|
|
8
7
|
* The ID of document, must be unique
|
|
@@ -72,5 +71,4 @@ interface BaseIndex {
|
|
|
72
71
|
content: string;
|
|
73
72
|
table?: string;
|
|
74
73
|
}
|
|
75
|
-
//#endregion
|
|
76
74
|
export { sync as a, setIndexSettings as i, DocumentRecord as n, toDocuments as o, SyncOptions as r, updateDocuments as s, BaseIndex as t };
|
package/dist/breadcrumb.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { i as Root, r as Node, t as Folder } from "./definitions-
|
|
1
|
+
import { i as Root, r as Node, t as Folder } from "./definitions-BQVehOBz.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
//#region src/breadcrumb.d.ts
|
|
4
3
|
export interface BreadcrumbItem {
|
|
5
4
|
name: ReactNode;
|
|
6
5
|
url?: string;
|
|
@@ -41,5 +40,4 @@ export declare function getBreadcrumbItemsFromPath(tree: Root | Folder, path: No
|
|
|
41
40
|
* @returns The path to the target node from root
|
|
42
41
|
* @internal Don't use this on your own
|
|
43
42
|
*/
|
|
44
|
-
export declare function searchPath(nodes: Node[], url: string): Node[] | null;
|
|
45
|
-
//#endregion
|
|
43
|
+
export declare function searchPath(nodes: Node[], url: string): Node[] | null;
|
package/dist/breadcrumb.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as normalizeUrl } from "./url-
|
|
2
|
-
import { r as findPath } from "./utils-
|
|
1
|
+
import { r as normalizeUrl } from "./url-BF81yL4m.js";
|
|
2
|
+
import { r as findPath } from "./utils-D63kPQ77.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
-
|
|
4
|
+
// src/breadcrumb.tsx
|
|
5
5
|
function useBreadcrumb(url, tree, options) {
|
|
6
6
|
return useMemo(() => getBreadcrumbItems(url, tree, options), [
|
|
7
7
|
tree,
|
|
@@ -55,5 +55,4 @@ function searchPath(nodes, url) {
|
|
|
55
55
|
const normalizedUrl = normalizeUrl(url);
|
|
56
56
|
return findPath(nodes, (node) => node.type === "page" && node.url === normalizedUrl);
|
|
57
57
|
}
|
|
58
|
-
//#endregion
|
|
59
58
|
export { getBreadcrumbItems, getBreadcrumbItemsFromPath, searchPath, useBreadcrumb };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/search/server/build-doc.ts
|
|
2
2
|
function buildDocuments(indexes) {
|
|
3
3
|
const docs = [];
|
|
4
4
|
for (const page of indexes) {
|
|
@@ -48,5 +48,4 @@ function buildDocuments(indexes) {
|
|
|
48
48
|
}
|
|
49
49
|
return docs;
|
|
50
50
|
}
|
|
51
|
-
//#endregion
|
|
52
51
|
export { buildDocuments as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as extname, t as basename } from "./path-
|
|
2
|
-
|
|
1
|
+
import { r as extname, t as basename } from "./path-CH9Umap3.js";
|
|
2
|
+
// src/search/server/build-index.ts
|
|
3
3
|
async function buildIndexDefault(page) {
|
|
4
4
|
let structuredData;
|
|
5
5
|
if (page.data.structuredData) structuredData = typeof page.data.structuredData === "function" ? await page.data.structuredData() : page.data.structuredData;
|
|
@@ -50,5 +50,4 @@ function collectBreadcrumbs(folder, parents, out) {
|
|
|
50
50
|
else if (!out.has(node.url)) out.set(node.url, current);
|
|
51
51
|
return out;
|
|
52
52
|
}
|
|
53
|
-
//#endregion
|
|
54
53
|
export { buildIndexDefault as n, createBreadcrumbs as r, buildDocuments as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as Awaitable } from "./types-
|
|
2
|
-
import { r as SortedResult } from "./index-
|
|
3
|
-
import { t as BaseIndex } from "./algolia-
|
|
4
|
-
import "./mixedbread-
|
|
1
|
+
import { t as Awaitable } from "./types-Dvkw0Kd0.js";
|
|
2
|
+
import { r as SortedResult } from "./index-CE1OSGGq.js";
|
|
3
|
+
import { t as BaseIndex } from "./algolia-DnAe2syq.js";
|
|
4
|
+
import "./mixedbread-DWeuz1Xb.js";
|
|
5
5
|
import { DependencyList } from "react";
|
|
6
6
|
import { AnyZBSearch, SearchParams } from "zbsearch";
|
|
7
7
|
import { Root } from "hast";
|
|
@@ -10,7 +10,6 @@ import { OramaCloud, OramaCloudSearchParams } from "@orama/core";
|
|
|
10
10
|
import { Meilisearch } from "meilisearch";
|
|
11
11
|
import { ClientSearchParams, OramaClient } from "@oramacloud/client";
|
|
12
12
|
import Mixedbread from "@mixedbread/sdk";
|
|
13
|
-
//#region src/search/use-search.d.ts
|
|
14
13
|
interface UseSearchOptions {
|
|
15
14
|
/**
|
|
16
15
|
* The debounced delay for performing a search (in ms).
|
|
@@ -68,8 +67,6 @@ declare function useSearch(run: (query: string) => Awaitable<SortedResult[]>, {
|
|
|
68
67
|
* @returns a ref callback for the element
|
|
69
68
|
*/
|
|
70
69
|
declare function useHighlightQuery(query: string): (element: Element | null) => () => void;
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/search/client/fetch.d.ts
|
|
73
70
|
interface FetchOptions {
|
|
74
71
|
/**
|
|
75
72
|
* API route for search endpoint, support absolute URLs.
|
|
@@ -92,8 +89,6 @@ declare function fetchClient(options?: FetchOptions): SearchClient;
|
|
|
92
89
|
* Search with the search server, or an API of the same format.
|
|
93
90
|
*/
|
|
94
91
|
declare function useFetchSearch({ api, locale, tag, ...rest }?: FetchOptions & UseSearchOptions): UseSearchReturn;
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/search/client/orama-static.d.ts
|
|
97
92
|
interface StaticOptions {
|
|
98
93
|
/**
|
|
99
94
|
* Where to download exported search indexes (URL)
|
|
@@ -133,8 +128,6 @@ declare function useStaticSearch({ from, locale, tag, ...rest }?: StaticOptions
|
|
|
133
128
|
* @deprecated Renamed to `staticClient`, note that the search engine is now ZBSearch.
|
|
134
129
|
*/
|
|
135
130
|
declare const oramaStaticClient: typeof staticClient;
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/search/client/algolia.d.ts
|
|
138
131
|
interface AlgoliaOptions {
|
|
139
132
|
indexName: string;
|
|
140
133
|
client: LiteClient;
|
|
@@ -149,8 +142,6 @@ interface AlgoliaOptions {
|
|
|
149
142
|
}
|
|
150
143
|
declare function algoliaClient(options: AlgoliaOptions): SearchClient;
|
|
151
144
|
declare function useAlgoliaSearch({ indexName, client, locale, tag, ...rest }: AlgoliaOptions & UseSearchOptions): UseSearchReturn;
|
|
152
|
-
//#endregion
|
|
153
|
-
//#region src/search/client/orama-cloud.d.ts
|
|
154
145
|
interface OramaCloudOptions {
|
|
155
146
|
client: OramaCloud;
|
|
156
147
|
/**
|
|
@@ -174,8 +165,6 @@ interface OramaCloudOptions {
|
|
|
174
165
|
}
|
|
175
166
|
declare function oramaCloudClient(options: OramaCloudOptions): SearchClient;
|
|
176
167
|
declare function useOramaCloudSearch({ client, index, tag, ...rest }: OramaCloudOptions & UseSearchOptions): UseSearchReturn;
|
|
177
|
-
//#endregion
|
|
178
|
-
//#region src/search/client/meilisearch.d.ts
|
|
179
168
|
interface MeilisearchOptions {
|
|
180
169
|
/**
|
|
181
170
|
* Meilisearch client with a search API key
|
|
@@ -193,8 +182,6 @@ interface MeilisearchOptions {
|
|
|
193
182
|
}
|
|
194
183
|
declare function meilisearchClient(options: MeilisearchOptions): SearchClient;
|
|
195
184
|
declare function useMeilisearch({ client, indexName, locale, tag, ...rest }: MeilisearchOptions & UseSearchOptions): UseSearchReturn;
|
|
196
|
-
//#endregion
|
|
197
|
-
//#region src/search/client/orama-cloud-legacy.d.ts
|
|
198
185
|
interface OramaCloudLegacyOptions {
|
|
199
186
|
client: OramaClient;
|
|
200
187
|
/**
|
|
@@ -218,8 +205,6 @@ interface OramaCloudLegacyOptions {
|
|
|
218
205
|
}
|
|
219
206
|
declare function oramaCloudLegacyClient(options: OramaCloudLegacyOptions): SearchClient;
|
|
220
207
|
declare function useOramaCloudLegacySearch({ client, index, tag, ...rest }: OramaCloudLegacyOptions & UseSearchOptions): UseSearchReturn;
|
|
221
|
-
//#endregion
|
|
222
|
-
//#region src/search/client/mixedbread.d.ts
|
|
223
208
|
interface MixedbreadOptions {
|
|
224
209
|
/**
|
|
225
210
|
* The identifier of the store to search in
|
|
@@ -244,8 +229,6 @@ interface MixedbreadOptions {
|
|
|
244
229
|
* The server-side approach keeps the key secure and uses `useFetchSearch()` on the client.
|
|
245
230
|
*/
|
|
246
231
|
declare function mixedbreadClient(options: MixedbreadOptions): SearchClient;
|
|
247
|
-
//#endregion
|
|
248
|
-
//#region src/search/client/flexsearch-static.d.ts
|
|
249
232
|
interface FlexsearchStaticOptions {
|
|
250
233
|
/**
|
|
251
234
|
* @defaultValue `/api/search`
|
|
@@ -256,8 +239,6 @@ interface FlexsearchStaticOptions {
|
|
|
256
239
|
}
|
|
257
240
|
declare function flexsearchStaticClient(options?: FlexsearchStaticOptions): SearchClient;
|
|
258
241
|
declare function useFlexsearchStatic({ from, locale, tag, ...rest }?: FlexsearchStaticOptions & UseSearchOptions): UseSearchReturn;
|
|
259
|
-
//#endregion
|
|
260
|
-
//#region src/search/client/docs-search.d.ts
|
|
261
242
|
interface SearchClient {
|
|
262
243
|
search: (query: string) => Awaitable<SortedResult[]>;
|
|
263
244
|
deps?: DependencyList;
|
|
@@ -299,5 +280,4 @@ declare function useDocsSearch({ delayMs, allowEmpty, ...options }: ClientPreset
|
|
|
299
280
|
error: Error | undefined;
|
|
300
281
|
};
|
|
301
282
|
};
|
|
302
|
-
//#endregion
|
|
303
283
|
export { SearchResultRecord as A, staticClient as C, useFetchSearch as D, fetchClient as E, useSearch as F, UseSearchOptions as M, UseSearchReturn as N, SearchResult as O, useHighlightQuery as P, oramaStaticClient as S, FetchOptions as T, useOramaCloudSearch as _, flexsearchStaticClient as a, useAlgoliaSearch as b, mixedbreadClient as c, useOramaCloudLegacySearch as d, MeilisearchOptions as f, oramaCloudClient as g, OramaCloudOptions as h, FlexsearchStaticOptions as i, SearchResultTable as j, SearchResultItem as k, OramaCloudLegacyOptions as l, useMeilisearch as m, SearchClient as n, useFlexsearchStatic as o, meilisearchClient as p, useDocsSearch as r, MixedbreadOptions as s, ClientPreset as t, oramaCloudLegacyClient as u, AlgoliaOptions as v, useStaticSearch as w, StaticOptions as x, algoliaClient as y };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BlockContent, Text } from "mdast";
|
|
2
2
|
import { MdxJsxAttribute, MdxJsxFlowElement } from "mdast-util-mdx";
|
|
3
|
-
//#region src/mdx-plugins/codeblock-utils.d.ts
|
|
4
3
|
interface CodeBlockTabsOptions {
|
|
5
4
|
attributes?: MdxJsxAttribute[];
|
|
6
5
|
defaultValue?: string;
|
|
@@ -25,5 +24,4 @@ interface CodeBlockAttributes<Name extends string = string> {
|
|
|
25
24
|
* Parse Fumadocs-style code block attributes from meta string, like `title="hello world"`
|
|
26
25
|
*/
|
|
27
26
|
declare function parseCodeBlockAttributes<const Name extends string = string>(meta: string, allowedNames?: Name[]): CodeBlockAttributes<Name>;
|
|
28
|
-
//#endregion
|
|
29
27
|
export { parseCodeBlockAttributes as i, CodeBlockTabsOptions as n, generateCodeBlockTabs as r, CodeBlockAttributes as t };
|
package/dist/content/github.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/content/github.d.ts
|
|
2
1
|
export interface GetGithubLastCommitOptions {
|
|
3
2
|
/**
|
|
4
3
|
* Repository name, like "fumadocs"
|
|
@@ -36,5 +35,4 @@ export interface GetGithubLastCommitOptions {
|
|
|
36
35
|
* By default, this will cache the result forever.
|
|
37
36
|
* Set `options.next.revalidate` to customize this.
|
|
38
37
|
*/
|
|
39
|
-
export declare function getGithubLastEdit({ repo, token, owner, path, sha, baseUrl, options, params: customParams }: GetGithubLastCommitOptions): Promise<Date | null>;
|
|
40
|
-
//#endregion
|
|
38
|
+
export declare function getGithubLastEdit({ repo, token, owner, path, sha, baseUrl, options, params: customParams }: GetGithubLastCommitOptions): Promise<Date | null>;
|
package/dist/content/github.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/content/github.ts
|
|
2
2
|
/**
|
|
3
3
|
* Get the last edit time of a file using GitHub API
|
|
4
4
|
*
|
|
@@ -24,5 +24,4 @@ async function getGithubLastEdit({ repo, token, owner, path, sha, baseUrl = "htt
|
|
|
24
24
|
if (data.length === 0) return null;
|
|
25
25
|
return new Date(data[0].commit.committer.date);
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { getGithubLastEdit };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/content/md/frontmatter.d.ts
|
|
2
1
|
interface Output {
|
|
3
2
|
/**
|
|
4
3
|
* The matter section, including the delimiter.
|
|
@@ -11,5 +10,4 @@ interface Output {
|
|
|
11
10
|
* parse frontmatter, it supports only yaml format
|
|
12
11
|
*/
|
|
13
12
|
export declare function frontmatter(input: string): Output;
|
|
14
|
-
//#endregion
|
|
15
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parse } from "yaml";
|
|
2
|
-
|
|
2
|
+
// src/content/md/frontmatter.ts
|
|
3
3
|
/**
|
|
4
4
|
* Inspired by https://github.com/jonschlinkert/gray-matter
|
|
5
5
|
*/
|
|
@@ -20,5 +20,4 @@ function frontmatter(input) {
|
|
|
20
20
|
output.data = parse(match[1]) ?? {};
|
|
21
21
|
return output;
|
|
22
22
|
}
|
|
23
|
-
//#endregion
|
|
24
23
|
export { frontmatter };
|
package/dist/content/md.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as Components } from "../hast-to-jsx-
|
|
1
|
+
import { t as Components } from "../hast-to-jsx-ezp6bh3J.js";
|
|
2
2
|
import { FC } from "react";
|
|
3
3
|
import { Options } from "remark-rehype";
|
|
4
4
|
import { Compatible } from "vfile";
|
|
5
5
|
import { PluggableList } from "unified";
|
|
6
|
-
//#region src/content/md.d.ts
|
|
7
6
|
export interface MarkdownRendererOptions {
|
|
8
7
|
remarkPlugins?: PluggableList;
|
|
9
8
|
rehypePlugins?: PluggableList;
|
|
@@ -19,5 +18,4 @@ export interface MarkdownProps {
|
|
|
19
18
|
children: Compatible;
|
|
20
19
|
}
|
|
21
20
|
export declare function createMarkdownRenderer({ rehypePlugins, remarkPlugins, remarkRehypeOptions }?: MarkdownRendererOptions): MarkdownRenderer;
|
|
22
|
-
export declare function Markdown(props: MarkdownProps & MarkdownRendererOptions): Promise<import("react").ReactNode> | import("react").ReactNode;
|
|
23
|
-
//#endregion
|
|
21
|
+
export declare function Markdown(props: MarkdownProps & MarkdownRendererOptions): Promise<import("react").ReactNode> | import("react").ReactNode;
|
package/dist/content/md.js
CHANGED
|
@@ -3,7 +3,7 @@ import { use, useMemo } from "react";
|
|
|
3
3
|
import { remark } from "remark";
|
|
4
4
|
import remarkRehype from "remark-rehype";
|
|
5
5
|
import { VFile } from "vfile";
|
|
6
|
-
|
|
6
|
+
// src/content/md.ts
|
|
7
7
|
function createMarkdownRenderer({ rehypePlugins = [], remarkPlugins = [], remarkRehypeOptions } = {}) {
|
|
8
8
|
const processor = remark().use(remarkPlugins).use(remarkRehype, remarkRehypeOptions).use(rehypePlugins);
|
|
9
9
|
const promises = {};
|
|
@@ -32,5 +32,4 @@ function createMarkdownRenderer({ rehypePlugins = [], remarkPlugins = [], remark
|
|
|
32
32
|
function Markdown(props) {
|
|
33
33
|
return createMarkdownRenderer(props).MarkdownServer(props);
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { Markdown, createMarkdownRenderer };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { t as RehypeCodeOptions } from "../../rehype-code-
|
|
2
|
-
import { t as RemarkImageOptions } from "../../remark-image-
|
|
3
|
-
import { t as StructureOptions } from "../../remark-structure-
|
|
4
|
-
import { t as RemarkHeadingOptions } from "../../remark-heading-
|
|
5
|
-
import { t as RemarkCodeTabOptions } from "../../remark-code-tab-
|
|
6
|
-
import { t as RemarkNpmOptions } from "../../remark-npm-
|
|
7
|
-
import "../../index-
|
|
8
|
-
import { t as ResolvePlugins } from "../../util-
|
|
1
|
+
import { t as RehypeCodeOptions } from "../../rehype-code-CPNaiqAY.js";
|
|
2
|
+
import { t as RemarkImageOptions } from "../../remark-image-BwyGdFld.js";
|
|
3
|
+
import { t as StructureOptions } from "../../remark-structure-50nmY6sX.js";
|
|
4
|
+
import { t as RemarkHeadingOptions } from "../../remark-heading-Dr13q5Om.js";
|
|
5
|
+
import { t as RemarkCodeTabOptions } from "../../remark-code-tab-Dj_--R3y.js";
|
|
6
|
+
import { t as RemarkNpmOptions } from "../../remark-npm-IH35Vls_.js";
|
|
7
|
+
import "../../index-C0yDf9A2.js";
|
|
8
|
+
import { t as ResolvePlugins } from "../../util-YfkucgkA.js";
|
|
9
9
|
import { Pluggable } from "unified";
|
|
10
10
|
import { ProcessorOptions } from "@mdx-js/mdx";
|
|
11
|
-
//#region src/content/mdx/preset-bundler.d.ts
|
|
12
11
|
export type MDXBundlerPresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
|
|
13
12
|
rehypePlugins?: ResolvePlugins;
|
|
14
13
|
remarkPlugins?: ResolvePlugins;
|
|
@@ -24,5 +23,4 @@ export type MDXBundlerPresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehyp
|
|
|
24
23
|
/**
|
|
25
24
|
* apply MDX processor presets
|
|
26
25
|
*/
|
|
27
|
-
export declare function mdxPreset(options?: MDXBundlerPresetOptions): Promise<ProcessorOptions>;
|
|
28
|
-
//#endregion
|
|
26
|
+
export declare function mdxPreset(options?: MDXBundlerPresetOptions): Promise<ProcessorOptions>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as resolvePlugins } from "../../util-
|
|
2
|
-
|
|
1
|
+
import { t as resolvePlugins } from "../../util-LjTEYxnT.js";
|
|
2
|
+
// src/content/mdx/preset-bundler.ts
|
|
3
3
|
/**
|
|
4
4
|
* apply MDX processor presets
|
|
5
5
|
*/
|
|
@@ -35,5 +35,4 @@ async function mdxPreset(options = {}) {
|
|
|
35
35
|
rehypePlugins
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { mdxPreset };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { t as RehypeCodeOptions } from "../../rehype-code-
|
|
2
|
-
import { t as RemarkImageOptions } from "../../remark-image-
|
|
3
|
-
import { t as StructureOptions } from "../../remark-structure-
|
|
4
|
-
import { t as RemarkHeadingOptions } from "../../remark-heading-
|
|
5
|
-
import { t as RemarkCodeTabOptions } from "../../remark-code-tab-
|
|
6
|
-
import { t as RemarkNpmOptions } from "../../remark-npm-
|
|
7
|
-
import "../../index-
|
|
8
|
-
import { t as ResolvePlugins } from "../../util-
|
|
1
|
+
import { t as RehypeCodeOptions } from "../../rehype-code-CPNaiqAY.js";
|
|
2
|
+
import { t as RemarkImageOptions } from "../../remark-image-BwyGdFld.js";
|
|
3
|
+
import { t as StructureOptions } from "../../remark-structure-50nmY6sX.js";
|
|
4
|
+
import { t as RemarkHeadingOptions } from "../../remark-heading-Dr13q5Om.js";
|
|
5
|
+
import { t as RemarkCodeTabOptions } from "../../remark-code-tab-Dj_--R3y.js";
|
|
6
|
+
import { t as RemarkNpmOptions } from "../../remark-npm-IH35Vls_.js";
|
|
7
|
+
import "../../index-C0yDf9A2.js";
|
|
8
|
+
import { t as ResolvePlugins } from "../../util-YfkucgkA.js";
|
|
9
9
|
import { ProcessorOptions } from "@mdx-js/mdx";
|
|
10
|
-
//#region src/content/mdx/preset-runtime.d.ts
|
|
11
10
|
export type MDXRuntimePresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
|
|
12
11
|
rehypePlugins?: ResolvePlugins;
|
|
13
12
|
remarkPlugins?: ResolvePlugins;
|
|
@@ -21,5 +20,4 @@ export type MDXRuntimePresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehyp
|
|
|
21
20
|
/**
|
|
22
21
|
* apply MDX processor presets
|
|
23
22
|
*/
|
|
24
|
-
export declare function mdxPreset(options?: MDXRuntimePresetOptions): Promise<ProcessorOptions>;
|
|
25
|
-
//#endregion
|
|
23
|
+
export declare function mdxPreset(options?: MDXRuntimePresetOptions): Promise<ProcessorOptions>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as resolvePlugins } from "../../util-
|
|
2
|
-
|
|
1
|
+
import { t as resolvePlugins } from "../../util-LjTEYxnT.js";
|
|
2
|
+
// src/content/mdx/preset-runtime.ts
|
|
3
3
|
/**
|
|
4
4
|
* apply MDX processor presets
|
|
5
5
|
*/
|
|
@@ -32,5 +32,4 @@ async function mdxPreset(options = {}) {
|
|
|
32
32
|
rehypePlugins
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
//#endregion
|
|
36
35
|
export { mdxPreset };
|
package/dist/content/toc.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { c as TOCItemType } from "../toc-
|
|
1
|
+
import { c as TOCItemType } from "../toc-BPaCQkFr.js";
|
|
2
2
|
import { Compatible } from "vfile";
|
|
3
3
|
import { PluggableList } from "unified";
|
|
4
|
-
//#region src/content/toc.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Get Table of Contents from markdown/mdx document (using remark)
|
|
7
6
|
*
|
|
@@ -14,5 +13,4 @@ export declare function getTableOfContents(content: Compatible): TOCItemType[];
|
|
|
14
13
|
* @param content - Markdown content or file
|
|
15
14
|
* @param remarkPlugins - remark plugins to be applied first
|
|
16
15
|
*/
|
|
17
|
-
export declare function getTableOfContents(content: Compatible, remarkPlugins: PluggableList): Promise<TOCItemType[]>;
|
|
18
|
-
//#endregion
|
|
16
|
+
export declare function getTableOfContents(content: Compatible, remarkPlugins: PluggableList): Promise<TOCItemType[]>;
|
package/dist/content/toc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { remarkHeading } from "../mdx-plugins/remark-heading.js";
|
|
2
2
|
import { remark } from "remark";
|
|
3
|
-
|
|
3
|
+
// src/content/toc.ts
|
|
4
4
|
function getTableOfContents(content, remarkPlugins) {
|
|
5
5
|
if (remarkPlugins) return remark().use(remarkPlugins).use(remarkHeading).process(content).then((result) => {
|
|
6
6
|
if ("toc" in result.data) return result.data.toc;
|
|
@@ -10,5 +10,4 @@ function getTableOfContents(content, remarkPlugins) {
|
|
|
10
10
|
if ("toc" in result.data) return result.data.toc;
|
|
11
11
|
return [];
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { getTableOfContents };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/page-tree/definitions.d.ts
|
|
3
2
|
interface ID {
|
|
4
3
|
/**
|
|
5
4
|
* ID for the node, unique in all page trees (even across different locales)
|
|
@@ -68,5 +67,4 @@ interface Folder extends ID {
|
|
|
68
67
|
icon?: ReactNode;
|
|
69
68
|
children: Node[];
|
|
70
69
|
}
|
|
71
|
-
//#endregion
|
|
72
70
|
export { Separator as a, Root as i, Item as n, Node as r, Folder as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as normalizeUrl } from "./url-
|
|
2
|
-
import { l as visit } from "./utils-
|
|
3
|
-
import { t as isEqualShallow } from "./is-equal-
|
|
4
|
-
import { a as normalize, i as joinPath, n as dirname, r as extname, t as basename } from "./path-
|
|
1
|
+
import { r as normalizeUrl } from "./url-BF81yL4m.js";
|
|
2
|
+
import { l as visit } from "./utils-D63kPQ77.js";
|
|
3
|
+
import { t as isEqualShallow } from "./is-equal-BuZW92e4.js";
|
|
4
|
+
import { a as normalize, i as joinPath, n as dirname, r as extname, t as basename } from "./path-CH9Umap3.js";
|
|
5
5
|
import { slugsPlugin } from "./source/plugins/slugs.js";
|
|
6
|
-
import { t as iconPlugin } from "./icon-
|
|
6
|
+
import { t as iconPlugin } from "./icon-CDrAUvm5.js";
|
|
7
7
|
import { cache } from "react";
|
|
8
|
-
|
|
8
|
+
// src/source/storage/file-system.ts
|
|
9
9
|
/**
|
|
10
10
|
* In memory file system.
|
|
11
11
|
*/
|
|
@@ -68,8 +68,7 @@ var FileSystem = class {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
|
|
72
|
-
//#region src/source/source.ts
|
|
71
|
+
// src/source/source.ts
|
|
73
72
|
/**
|
|
74
73
|
* @deprecated you can directly pass a record of source objects to `loader()`.
|
|
75
74
|
*/
|
|
@@ -118,8 +117,7 @@ function isStaticSource(s) {
|
|
|
118
117
|
function isDynamicSource(s) {
|
|
119
118
|
return "files" in s && typeof s.files === "function";
|
|
120
119
|
}
|
|
121
|
-
|
|
122
|
-
//#region src/source/storage/content.ts
|
|
120
|
+
// src/source/storage/content.ts
|
|
123
121
|
const EmptyLang = Symbol();
|
|
124
122
|
/**
|
|
125
123
|
* convert input files into virtual file system.
|
|
@@ -210,8 +208,7 @@ function pushMapList(map, k, v) {
|
|
|
210
208
|
}
|
|
211
209
|
list.push(v);
|
|
212
210
|
}
|
|
213
|
-
|
|
214
|
-
//#region src/source/page-tree/builder.ts
|
|
211
|
+
// src/source/page-tree/builder.ts
|
|
215
212
|
const group = /^\((?<name>.+)\)$/;
|
|
216
213
|
const link = /^(?<external>external:)?(?:\[(?<icon>[^\]]+)])?\[(?<name>[^\]]+)]\((?<url>[^)]+)\)$/;
|
|
217
214
|
const separator = /^---(?:\[(?<icon>[^\]]+)])?(?<name>.+)---|^---$/;
|
|
@@ -482,8 +479,7 @@ function pathToName(name) {
|
|
|
482
479
|
const [first = "", ...rest] = name;
|
|
483
480
|
return first.toLocaleUpperCase() + rest.join("").replaceAll("-", " ");
|
|
484
481
|
}
|
|
485
|
-
|
|
486
|
-
//#region src/source/loader.ts
|
|
482
|
+
// src/source/loader.ts
|
|
487
483
|
/** decoded, generated slugs are URI encoded but some routers pass them decoded */
|
|
488
484
|
function slugsKey(slugs) {
|
|
489
485
|
const key = slugs.join("/");
|
|
@@ -727,8 +723,7 @@ function buildPlugins(plugins, sort = true) {
|
|
|
727
723
|
if (sort) return flatten.sort((a, b) => priorityMap[b.enforce ?? "default"] - priorityMap[a.enforce ?? "default"]);
|
|
728
724
|
return flatten;
|
|
729
725
|
}
|
|
730
|
-
|
|
731
|
-
//#region src/source/dynamic.ts
|
|
726
|
+
// src/source/dynamic.ts
|
|
732
727
|
/** content loader API for static & dynamic content sources, with in-memory cache. */
|
|
733
728
|
function dynamicLoader(input, options) {
|
|
734
729
|
let cachedLoader;
|
|
@@ -809,5 +804,4 @@ function isEqual(a, b) {
|
|
|
809
804
|
if (!isStaticSource(a) && !isStaticSource(b)) return Object.keys(b).every((k) => isEqualShallow(a[k].files, b[k].files));
|
|
810
805
|
return false;
|
|
811
806
|
}
|
|
812
|
-
//#endregion
|
|
813
807
|
export { update as a, multiple as i, createGetUrl as n, FileSystem as o, loader as r, dynamicLoader as t };
|
package/dist/dynamic-link.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LinkProps } from "./link.js";
|
|
2
|
-
//#region src/dynamic-link.d.ts
|
|
3
2
|
export type DynamicLinkProps = LinkProps;
|
|
4
3
|
/**
|
|
5
4
|
* Extends the default `Link` component
|
|
@@ -8,5 +7,4 @@ export type DynamicLinkProps = LinkProps;
|
|
|
8
7
|
*/
|
|
9
8
|
export declare function DynamicLink({ href, ref, ...props }: DynamicLinkProps): import("react").JSX.Element;
|
|
10
9
|
export declare function updateHref(href: string, params: Record<string, string | string[]>): string;
|
|
11
|
-
//#endregion
|
|
12
10
|
export { DynamicLink as default };
|
package/dist/dynamic-link.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useParams } from "./framework/index.js";
|
|
|
3
3
|
import { Link } from "./link.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/dynamic-link.tsx
|
|
7
7
|
/**
|
|
8
8
|
* Extends the default `Link` component
|
|
9
9
|
*
|
|
@@ -27,5 +27,4 @@ function updateHref(href, params) {
|
|
|
27
27
|
return hasEndingSlash ? `${replacement}/` : replacement;
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
//#endregion
|
|
31
30
|
export { DynamicLink, DynamicLink as default, updateHref };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/search/server/endpoint.ts
|
|
2
2
|
function createEndpoint(server, options = {}) {
|
|
3
3
|
const { search } = server;
|
|
4
4
|
const { readOptions = defaultReadOptions } = options;
|
|
@@ -24,5 +24,4 @@ function defaultReadOptions(url) {
|
|
|
24
24
|
limit: Number.isInteger(limit) ? limit : void 0
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
//#endregion
|
|
28
27
|
export { defaultReadOptions as n, createEndpoint as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Framework } from "./index.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
//#region src/framework/astro.d.ts
|
|
4
3
|
type AstroParams = Record<string, string | string[] | undefined>;
|
|
5
4
|
export interface AstroProviderProps {
|
|
6
5
|
children: ReactNode;
|
|
@@ -17,5 +16,4 @@ export interface AstroProviderProps {
|
|
|
17
16
|
* You can pass `navigate` from `astro:transitions/client` to preserve client navigation.
|
|
18
17
|
*/
|
|
19
18
|
export declare function AstroProvider({ children, pathname, params, navigate, Link, Image }: AstroProviderProps): import("react").JSX.Element;
|
|
20
|
-
//#endregion
|
|
21
19
|
export {};
|
package/dist/framework/astro.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { FrameworkProvider } from "./index.js";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/framework/astro.tsx
|
|
6
6
|
function normalizeParams(params = {}) {
|
|
7
7
|
const out = {};
|
|
8
8
|
for (const [key, value] of Object.entries(params)) if (value !== void 0) out[key] = value;
|
|
@@ -48,5 +48,4 @@ function AstroProvider({ children, pathname, params, navigate, Link, Image }) {
|
|
|
48
48
|
children
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
//#endregion
|
|
52
51
|
export { AstroProvider };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, FC, ReactNode } from "react";
|
|
2
2
|
import { StaticImport } from "next/dist/shared/lib/get-img-props";
|
|
3
|
-
//#region src/framework/index.d.ts
|
|
4
3
|
export interface ImageProps extends Omit<ComponentProps<'img'>, 'src'> {
|
|
5
4
|
sizes?: string;
|
|
6
5
|
/**
|
|
@@ -36,5 +35,4 @@ export declare function useRouter(): Router;
|
|
|
36
35
|
export declare function useParams(): Record<string, string | string[]>;
|
|
37
36
|
export declare function Image(props: ImageProps): import("react").JSX.Element;
|
|
38
37
|
export declare function Link(props: LinkProps): import("react").JSX.Element;
|
|
39
|
-
//#endregion
|
|
40
38
|
export {};
|
package/dist/framework/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext, use, useMemo } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/framework/index.tsx
|
|
5
5
|
const notImplemented = () => {
|
|
6
6
|
throw new Error("You need to wrap your application inside `FrameworkProvider`.");
|
|
7
7
|
};
|
|
@@ -62,5 +62,4 @@ function Link(props) {
|
|
|
62
62
|
}
|
|
63
63
|
return /* @__PURE__ */ jsx(Link, { ...props });
|
|
64
64
|
}
|
|
65
|
-
//#endregion
|
|
66
65
|
export { FrameworkProvider, Image, Link, useParams, usePathname, useRouter };
|
package/dist/framework/next.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Framework } from "./index.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
|
-
//#region src/framework/next.d.ts
|
|
4
3
|
export declare function NextProvider({ children, Link: CustomLink, Image: CustomImage }: {
|
|
5
4
|
children: ReactNode;
|
|
6
5
|
Link?: Framework['Link'];
|
|
7
6
|
Image?: Framework['Image'];
|
|
8
|
-
}): import("react").JSX.Element;
|
|
9
|
-
//#endregion
|
|
7
|
+
}): import("react").JSX.Element;
|
package/dist/framework/next.js
CHANGED
|
@@ -4,7 +4,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { useParams, usePathname, useRouter } from "next/navigation";
|
|
5
5
|
import Link from "next/link";
|
|
6
6
|
import Image from "next/image";
|
|
7
|
-
|
|
7
|
+
// src/framework/next.tsx
|
|
8
8
|
function NextProvider({ children, Link: CustomLink, Image: CustomImage }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(FrameworkProvider, {
|
|
10
10
|
usePathname,
|
|
@@ -15,5 +15,4 @@ function NextProvider({ children, Link: CustomLink, Image: CustomImage }) {
|
|
|
15
15
|
children
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
export { NextProvider };
|