fumadocs-core 16.18.2 → 16.18.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-B36wJl6E.d.ts → algolia-DsNJZd4P.d.ts} +2 -2
- package/dist/{build-index-CqctTvug.js → build-index-8ryBfL45.js} +1 -1
- package/dist/{client-LE_6Q0xR.d.ts → client-Bv_2P4D3.d.ts} +3 -3
- package/dist/content/mdx/preset-bundler.d.ts +2 -2
- package/dist/content/mdx/preset-runtime.d.ts +2 -2
- package/dist/{dynamic-BKMu5hc8.js → dynamic-CENrXFis.js} +182 -23
- package/dist/dynamic-link.js +1 -1
- package/dist/framework/plugin.d.ts +2 -2
- package/dist/highlight/client.js +1 -1
- package/dist/highlight/index.js +1 -1
- package/dist/highlight/shiki/full.d.ts +1 -1
- package/dist/highlight/shiki/index.d.ts +1 -1
- package/dist/highlight/shiki/react.d.ts +2 -2
- package/dist/i18n/middleware.js +2088 -3439
- package/dist/{index-DWVer6sb.d.ts → index-BOhS1UKT.d.ts} +110 -13
- package/dist/{index-B0Bzrmfa.d.ts → index-e-8QoCiA.d.ts} +1 -1
- package/dist/mcp.d.ts +2 -2
- package/dist/mdx-plugins/index.d.ts +4 -4
- package/dist/mdx-plugins/index.js +6 -5
- package/dist/mdx-plugins/rehype-code.core.d.ts +1 -1
- package/dist/mdx-plugins/rehype-code.core.js +1 -1
- package/dist/mdx-plugins/rehype-code.d.ts +2 -2
- package/dist/mdx-plugins/rehype-code.js +1 -1
- package/dist/mdx-plugins/remark-code-tab.js +1 -1
- package/dist/mdx-plugins/remark-include.js +2 -2
- package/dist/mdx-plugins/remark-llms.js +1 -1
- package/dist/mdx-plugins/remark-npm.js +1 -1
- package/dist/mdx-plugins/remark-show.d.ts +2 -0
- package/dist/mdx-plugins/remark-show.js +162 -0
- package/dist/mdx-plugins/remark-steps.js +1 -1
- package/dist/mdx-plugins/remark-structure.js +1 -1
- package/dist/mdx-plugins/stringifier.js +6 -0
- package/dist/{meilisearch-CsyDr1xA.d.ts → meilisearch-DzjbVbAn.d.ts} +2 -2
- package/dist/{mixedbread-CyM4na_-.d.ts → mixedbread-CMi5F-zO.d.ts} +2 -2
- package/dist/negotiation/index.js +279 -290
- package/dist/{path-CH9Umap3.js → path-B8old5-F.js} +1 -1
- package/dist/{rehype-code-CPNaiqAY.d.ts → rehype-code-Czh_8L5z.d.ts} +1 -1
- package/dist/{rehype-code.core-D1aZ5yla.d.ts → rehype-code.core-BeCtKe7K.d.ts} +1 -1
- package/dist/{rehype-code.core-Dq2jmvan.js → rehype-code.core-Jt2VtK1A.js} +3 -3
- package/dist/rolldown-runtime-D3KUYPsf.js +12 -0
- package/dist/search/algolia.d.ts +1 -1
- package/dist/search/algolia.js +1 -1
- package/dist/search/client/algolia.d.ts +1 -1
- package/dist/search/client/docs-search.d.ts +1 -1
- package/dist/search/client/fetch.d.ts +1 -1
- package/dist/search/client/fetch.js +1 -1
- package/dist/search/client/flexsearch-static.d.ts +1 -1
- package/dist/search/client/flexsearch-static.js +1 -1
- package/dist/search/client/meilisearch.d.ts +1 -1
- package/dist/search/client/mixedbread.d.ts +2 -2
- package/dist/search/client/orama-cloud-legacy.d.ts +1 -1
- package/dist/search/client/orama-cloud-legacy.js +1 -1
- package/dist/search/client/orama-cloud.d.ts +1 -1
- package/dist/search/client/orama-cloud.js +1 -1
- package/dist/search/client/orama-static.d.ts +1 -1
- package/dist/search/client/orama-static.js +2 -2
- package/dist/search/client.d.ts +1 -1
- package/dist/search/flexsearch.d.ts +2 -2
- package/dist/search/flexsearch.js +1 -1
- package/dist/search/index.js +1 -1
- package/dist/search/meilisearch.d.ts +1 -1
- package/dist/search/meilisearch.js +1 -1
- package/dist/search/mixedbread.d.ts +2 -2
- package/dist/search/orama-cloud-legacy.d.ts +1 -1
- package/dist/search/orama-cloud.d.ts +2 -3
- package/dist/search/orama-cloud.js +1 -1
- package/dist/search/server.d.ts +1 -1
- package/dist/search/server.js +2 -2
- package/dist/{server-BUYLz3H4.d.ts → server-MsDv36PV.d.ts} +3 -3
- package/dist/source/dynamic.d.ts +1 -1
- package/dist/source/dynamic.js +1 -1
- package/dist/source/index.d.ts +2 -2
- package/dist/source/index.js +3 -3
- package/dist/source/llms.d.ts +1 -1
- package/dist/source/plugins/lucide-icons.d.ts +1 -1
- package/dist/source/plugins/slugs.d.ts +1 -1
- package/dist/source/plugins/slugs.js +1 -1
- package/dist/source/plugins/status-badges.d.ts +1 -1
- package/dist/source/schema.d.ts +2 -0
- package/dist/source/schema.js +3 -0
- package/dist/utils/hast-to-jsx.js +22 -31
- package/package.json +21 -20
- package/dist/index-BFnMPJLk.d.ts +0 -17
- package/dist/rolldown-runtime-C-UrYobY.js +0 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Awaitable } from "./types-Dvkw0Kd0.js";
|
|
2
1
|
import { n as StructuredData } from "./remark-structure-50nmY6sX.js";
|
|
3
|
-
import {
|
|
2
|
+
import { j as LoaderOutput, k as LoaderConfig } from "./index-BOhS1UKT.js";
|
|
3
|
+
import { t as Awaitable } from "./types-Dvkw0Kd0.js";
|
|
4
4
|
import { Algoliasearch } from "algoliasearch";
|
|
5
5
|
interface DocumentRecord {
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as Awaitable } from "./types-Dvkw0Kd0.js";
|
|
2
1
|
import { r as SortedResult } from "./index-CE1OSGGq.js";
|
|
3
|
-
import { t as
|
|
4
|
-
import "./
|
|
2
|
+
import { t as Awaitable } from "./types-Dvkw0Kd0.js";
|
|
3
|
+
import { t as BaseIndex } from "./algolia-DsNJZd4P.js";
|
|
4
|
+
import "./mixedbread-CMi5F-zO.js";
|
|
5
5
|
import { DependencyList } from "react";
|
|
6
6
|
import { AnyZBSearch, SearchParams } from "zbsearch";
|
|
7
7
|
import { Root } from "hast";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as RehypeCodeOptions } from "../../rehype-code-
|
|
1
|
+
import { t as RehypeCodeOptions } from "../../rehype-code-Czh_8L5z.js";
|
|
2
2
|
import { t as RemarkImageOptions } from "../../remark-image-BwyGdFld.js";
|
|
3
3
|
import { t as StructureOptions } from "../../remark-structure-50nmY6sX.js";
|
|
4
4
|
import { t as RemarkHeadingOptions } from "../../remark-heading-Dhiig5Fv.js";
|
|
5
5
|
import { t as RemarkCodeTabOptions } from "../../remark-code-tab-Dj_--R3y.js";
|
|
6
6
|
import { t as RemarkNpmOptions } from "../../remark-npm-IH35Vls_.js";
|
|
7
|
-
import "../../index-
|
|
7
|
+
import "../../index-BOhS1UKT.js";
|
|
8
8
|
import { t as ResolvePlugins } from "../../util-YfkucgkA.js";
|
|
9
9
|
import { Pluggable } from "unified";
|
|
10
10
|
import { ProcessorOptions } from "@mdx-js/mdx";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as RehypeCodeOptions } from "../../rehype-code-
|
|
1
|
+
import { t as RehypeCodeOptions } from "../../rehype-code-Czh_8L5z.js";
|
|
2
2
|
import { t as RemarkImageOptions } from "../../remark-image-BwyGdFld.js";
|
|
3
3
|
import { t as StructureOptions } from "../../remark-structure-50nmY6sX.js";
|
|
4
4
|
import { t as RemarkHeadingOptions } from "../../remark-heading-Dhiig5Fv.js";
|
|
5
5
|
import { t as RemarkCodeTabOptions } from "../../remark-code-tab-Dj_--R3y.js";
|
|
6
6
|
import { t as RemarkNpmOptions } from "../../remark-npm-IH35Vls_.js";
|
|
7
|
-
import "../../index-
|
|
7
|
+
import "../../index-BOhS1UKT.js";
|
|
8
8
|
import { t as ResolvePlugins } from "../../util-YfkucgkA.js";
|
|
9
9
|
import { ProcessorOptions } from "@mdx-js/mdx";
|
|
10
10
|
export type MDXRuntimePresetOptions = Omit<NonNullable<ProcessorOptions>, 'rehypePlugins' | 'remarkPlugins'> & {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { a as normalize, i as joinPath, n as dirname, r as extname, t as basename } from "./path-B8old5-F.js";
|
|
1
2
|
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
3
|
import { slugsPlugin } from "./source/plugins/slugs.js";
|
|
6
4
|
import { t as iconPlugin } from "./icon-CDrAUvm5.js";
|
|
5
|
+
import { l as visit } from "./utils-D63kPQ77.js";
|
|
6
|
+
import { t as isEqualShallow } from "./is-equal-BuZW92e4.js";
|
|
7
7
|
import { cache } from "react";
|
|
8
8
|
// src/source/storage/file-system.ts
|
|
9
9
|
/**
|
|
@@ -120,6 +120,89 @@ function isStaticSource(s) {
|
|
|
120
120
|
function isDynamicSource(s) {
|
|
121
121
|
return "files" in s && typeof s.files === "function";
|
|
122
122
|
}
|
|
123
|
+
// src/source/static-params.ts
|
|
124
|
+
const segmentRegex = /^\[([^\]/]+)\]/;
|
|
125
|
+
/** the names of the params in a path, like `framework` in `[framework]/docs` */
|
|
126
|
+
function segmentNames(path) {
|
|
127
|
+
const names = [];
|
|
128
|
+
for (const seg of path.split("/")) {
|
|
129
|
+
const match = segmentRegex.exec(seg);
|
|
130
|
+
if (match) names.push(match[1]);
|
|
131
|
+
}
|
|
132
|
+
return names;
|
|
133
|
+
}
|
|
134
|
+
/** whether a path has dynamic segments, like `[framework]/deploy.mdx` */
|
|
135
|
+
function isDynamicPath(path) {
|
|
136
|
+
return path.includes("[") && path.split("/").some((seg) => segmentRegex.test(seg));
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The params of each page that a file of a dynamic path makes, like `[framework]/deploy.mdx`: its own
|
|
140
|
+
* `staticParams`, combined with those of the meta files in its folders by the names they share. `undefined` when the
|
|
141
|
+
* path isn't dynamic or nothing lists them, the file is then a page at its literal path.
|
|
142
|
+
*
|
|
143
|
+
* The meta files of a language come first, like `meta.cn.json` for `deploy.cn.mdx`.
|
|
144
|
+
*
|
|
145
|
+
* @param file - the path of the file, relative to the content directory
|
|
146
|
+
*/
|
|
147
|
+
function getStaticParams(file, { staticParams, readStaticParams }) {
|
|
148
|
+
if (!file.includes("[")) return;
|
|
149
|
+
const names = segmentNames(file);
|
|
150
|
+
if (names.length === 0) return;
|
|
151
|
+
const segments = file.split("/");
|
|
152
|
+
const parts = segments.pop().split(".");
|
|
153
|
+
const metaNames = parts.length > 2 ? [`meta.${parts.at(-2)}`, "meta"] : ["meta"];
|
|
154
|
+
let combinations = [{}];
|
|
155
|
+
let listed = false;
|
|
156
|
+
const join = (list) => {
|
|
157
|
+
if (!list?.some((entry) => names.some((name) => Object.hasOwn(entry, name)))) return;
|
|
158
|
+
listed = true;
|
|
159
|
+
const next = [];
|
|
160
|
+
for (const combination of combinations) for (const entry of list) {
|
|
161
|
+
let agrees = true;
|
|
162
|
+
for (const k in entry) if (Object.hasOwn(combination, k) && combination[k] !== entry[k]) {
|
|
163
|
+
agrees = false;
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
if (agrees) next.push({
|
|
167
|
+
...combination,
|
|
168
|
+
...entry
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
combinations = next;
|
|
172
|
+
};
|
|
173
|
+
const readFolder = (folder) => {
|
|
174
|
+
for (const name of metaNames) {
|
|
175
|
+
const list = readStaticParams(folder ? `${folder}/${name}` : name);
|
|
176
|
+
if (list) return join(list);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
let folder = "";
|
|
180
|
+
readFolder(folder);
|
|
181
|
+
for (const seg of segments) readFolder(folder = folder ? `${folder}/${seg}` : seg);
|
|
182
|
+
join(staticParams);
|
|
183
|
+
if (!listed) return;
|
|
184
|
+
const out = /* @__PURE__ */ new Map();
|
|
185
|
+
for (const combination of combinations) {
|
|
186
|
+
const entries = [];
|
|
187
|
+
for (const name of names) {
|
|
188
|
+
if (!Object.hasOwn(combination, name)) throw new Error(`No value of "[${name}]" is listed for "${file}"`);
|
|
189
|
+
entries.push([name, combination[name]]);
|
|
190
|
+
}
|
|
191
|
+
const params = Object.fromEntries(entries);
|
|
192
|
+
out.set(JSON.stringify(params), params);
|
|
193
|
+
}
|
|
194
|
+
return [...out.values()];
|
|
195
|
+
}
|
|
196
|
+
/** @internal */
|
|
197
|
+
function fillParams(file, params) {
|
|
198
|
+
let out = "";
|
|
199
|
+
for (const seg of file.split("/")) {
|
|
200
|
+
const match = segmentRegex.exec(seg);
|
|
201
|
+
const value = match && Object.hasOwn(params, match[1]) ? params[match[1]] + seg.slice(match[0].length) : seg;
|
|
202
|
+
out = out ? `${out}/${value}` : value;
|
|
203
|
+
}
|
|
204
|
+
return out;
|
|
205
|
+
}
|
|
123
206
|
// src/source/storage/content.ts
|
|
124
207
|
const EmptyLang = Symbol();
|
|
125
208
|
/**
|
|
@@ -152,33 +235,77 @@ function createContentStorageBuilder(loaderConfig) {
|
|
|
152
235
|
};
|
|
153
236
|
}
|
|
154
237
|
const fileMap = /* @__PURE__ */ new Map();
|
|
238
|
+
function add(storageKey, locale, file) {
|
|
239
|
+
const entry = [storageKey, file];
|
|
240
|
+
if (i18n && locale === "$") for (const item of i18n.languages) pushMapList(fileMap, item, entry);
|
|
241
|
+
else pushMapList(fileMap, locale, entry);
|
|
242
|
+
}
|
|
243
|
+
/** the meta files of dynamic folders that give their data at the params of each folder */
|
|
244
|
+
const metaDataAt = /* @__PURE__ */ new Map();
|
|
155
245
|
function scan(type, source) {
|
|
246
|
+
const staticParams = /* @__PURE__ */ new Map();
|
|
247
|
+
const readStaticParams = (path) => staticParams.get(path);
|
|
248
|
+
for (const inputFile of source.files) {
|
|
249
|
+
if (inputFile.type !== "meta") continue;
|
|
250
|
+
const path = normalize(source.baseDir ? `${source.baseDir}/${inputFile.path}` : inputFile.path);
|
|
251
|
+
staticParams.set(path.slice(0, path.length - extname(path).length), inputFile.data.staticParams);
|
|
252
|
+
}
|
|
156
253
|
for (const inputFile of source.files) {
|
|
157
254
|
let file;
|
|
158
255
|
const path = normalize(source.baseDir ? `${source.baseDir}/${inputFile.path}` : inputFile.path);
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
path,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
256
|
+
let files;
|
|
257
|
+
if (inputFile.type === "page") {
|
|
258
|
+
file = {
|
|
259
|
+
format: "page",
|
|
260
|
+
type,
|
|
261
|
+
path,
|
|
262
|
+
slugs: inputFile.slugs,
|
|
263
|
+
data: inputFile.data,
|
|
264
|
+
absolutePath: inputFile.absolutePath
|
|
265
|
+
};
|
|
266
|
+
const page = file;
|
|
267
|
+
files = getStaticParams(path, {
|
|
268
|
+
staticParams: inputFile.data.staticParams,
|
|
269
|
+
readStaticParams
|
|
270
|
+
})?.map((params) => ({
|
|
271
|
+
...page,
|
|
272
|
+
params,
|
|
273
|
+
data: inputFile.dataAt?.(params) ?? page.data
|
|
274
|
+
}));
|
|
275
|
+
} else {
|
|
276
|
+
file = {
|
|
277
|
+
format: "meta",
|
|
278
|
+
type,
|
|
279
|
+
path,
|
|
280
|
+
absolutePath: inputFile.absolutePath,
|
|
281
|
+
data: inputFile.data
|
|
282
|
+
};
|
|
283
|
+
if (inputFile.dataAt) metaDataAt.set(file, inputFile.dataAt);
|
|
284
|
+
}
|
|
174
285
|
const [storageKey, locale = i18n ? i18n.defaultLanguage : EmptyLang] = i18n && inputFile.locale ? [path, inputFile.locale] : parser(path);
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
else pushMapList(fileMap, locale, entry);
|
|
286
|
+
if (files) for (const item of files) add(storageKey, locale, item);
|
|
287
|
+
else add(storageKey, locale, file);
|
|
178
288
|
}
|
|
179
289
|
}
|
|
180
290
|
if (isStaticSource(input)) scan(void 0, input);
|
|
181
291
|
else for (const k in input) scan(k, input[k]);
|
|
292
|
+
const folders = /* @__PURE__ */ new Map();
|
|
293
|
+
for (const list of fileMap.values()) for (const [path, file] of list) {
|
|
294
|
+
if (file.format !== "page" || !file.params) continue;
|
|
295
|
+
for (let folder = dirname(path); isDynamicPath(folder); folder = dirname(folder)) {
|
|
296
|
+
let filled = folders.get(folder);
|
|
297
|
+
if (!filled) folders.set(folder, filled = /* @__PURE__ */ new Map());
|
|
298
|
+
const target = fillParams(folder, file.params);
|
|
299
|
+
if (filled.has(target)) continue;
|
|
300
|
+
const params = {};
|
|
301
|
+
for (const name of segmentNames(folder)) params[name] = file.params[name];
|
|
302
|
+
filled.set(target, params);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
for (const [locale, list] of fileMap) {
|
|
306
|
+
if (folders.size === 0 && !list.some(([path]) => isDynamicPath(path))) continue;
|
|
307
|
+
fileMap.set(locale, route(list, folders, metaDataAt));
|
|
308
|
+
}
|
|
182
309
|
function makeStorage(locale, inherit) {
|
|
183
310
|
const storage = new FileSystem(inherit);
|
|
184
311
|
for (const [storageKey, file] of fileMap.get(locale) ?? []) storage.write(storageKey, file);
|
|
@@ -211,6 +338,37 @@ function pushMapList(map, k, v) {
|
|
|
211
338
|
}
|
|
212
339
|
list.push(v);
|
|
213
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* Route the files of dynamic paths: a page goes to the path its `params` fill, the meta file of a dynamic folder to
|
|
343
|
+
* each folder that pages fill. Files at a static path win.
|
|
344
|
+
*/
|
|
345
|
+
function route(list, folders, metaDataAt) {
|
|
346
|
+
const out = /* @__PURE__ */ new Map();
|
|
347
|
+
for (const [path, file] of list) if (!isDynamicPath(path)) out.set(path, file);
|
|
348
|
+
/** the path of a page or meta file -> its dynamic file */
|
|
349
|
+
const made = /* @__PURE__ */ new Map();
|
|
350
|
+
for (const [path, file] of list) {
|
|
351
|
+
if (!isDynamicPath(path)) continue;
|
|
352
|
+
const targets = [];
|
|
353
|
+
if (file.format === "page" && file.params) targets.push([fillParams(path, file.params), file]);
|
|
354
|
+
if (file.format === "meta") {
|
|
355
|
+
const dataAt = metaDataAt.get(file);
|
|
356
|
+
for (const [folder, params] of folders.get(dirname(path)) ?? []) targets.push([`${folder}/${basename(path)}`, dataAt ? {
|
|
357
|
+
...file,
|
|
358
|
+
data: dataAt(params)
|
|
359
|
+
} : file]);
|
|
360
|
+
}
|
|
361
|
+
if (targets.length === 0) out.set(path, file);
|
|
362
|
+
for (const [target, item] of targets) {
|
|
363
|
+
const other = made.get(target);
|
|
364
|
+
if (other) throw new Error(`"${other}" and "${path}" both go to "${target}"`);
|
|
365
|
+
if (out.has(target)) continue;
|
|
366
|
+
made.set(target, path);
|
|
367
|
+
out.set(target, item);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return [...out];
|
|
371
|
+
}
|
|
214
372
|
// src/source/page-tree/builder.ts
|
|
215
373
|
const group = /^\((?<name>.+)\)$/;
|
|
216
374
|
const link = /^(?<external>external:)?(?:\[(?<icon>[^\]]+)])?\[(?<name>[^\]]+)]\((?<url>[^)]+)\)$/;
|
|
@@ -522,6 +680,7 @@ function createPageIndexer({ url }) {
|
|
|
522
680
|
url: url(item.slugs, lang),
|
|
523
681
|
slugs: item.slugs,
|
|
524
682
|
data: item.data,
|
|
683
|
+
params: item.params,
|
|
525
684
|
locale: lang
|
|
526
685
|
};
|
|
527
686
|
index.pathToPage.set(path, page);
|
|
@@ -614,7 +773,7 @@ function loader(...args) {
|
|
|
614
773
|
resolveHref(href, parent) {
|
|
615
774
|
if (href.startsWith("./") || href.startsWith("../")) {
|
|
616
775
|
const target = this.getPageByHref(href, {
|
|
617
|
-
dir: dirname(parent.path),
|
|
776
|
+
dir: dirname(parent.params ? fillParams(parent.path, parent.params) : parent.path),
|
|
618
777
|
language: parent.locale
|
|
619
778
|
});
|
|
620
779
|
if (target) return target.hash ? `${target.page.url}#${target.hash}` : target.page.url;
|
|
@@ -807,4 +966,4 @@ function isEqual(a, b) {
|
|
|
807
966
|
if (!isStaticSource(a) && !isStaticSource(b)) return Object.keys(b).every((k) => isEqualShallow(a[k].files, b[k].files));
|
|
808
967
|
return false;
|
|
809
968
|
}
|
|
810
|
-
export {
|
|
969
|
+
export { isDynamicPath as a, FileSystem as c, getStaticParams as i, createGetUrl as n, multiple as o, loader as r, update as s, dynamicLoader as t };
|
package/dist/dynamic-link.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { i as TranslationExtension } from "../index-DFrWGSeW.js";
|
|
1
2
|
import { n as StructuredData } from "../remark-structure-50nmY6sX.js";
|
|
3
|
+
import { A as LoaderOptions, N as LoaderPluginOption, j as LoaderOutput, k as LoaderConfig } from "../index-BOhS1UKT.js";
|
|
2
4
|
import { c as TOCItemType } from "../toc-BuHOTlzj.js";
|
|
3
|
-
import { i as TranslationExtension } from "../index-DFrWGSeW.js";
|
|
4
|
-
import { S as LoaderOutput, b as LoaderConfig, w as LoaderPluginOption, x as LoaderOptions } from "../index-DWVer6sb.js";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
type Awaitable<T> = T | Promise<T>;
|
|
7
7
|
/** the site, `this` in plugin hooks; frameworks extend it */
|
package/dist/highlight/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { i as applyDefaultThemes } from "../shiki-DL5DIaX-.js";
|
|
3
2
|
import { useShiki as useShiki$1 } from "./shiki/react.js";
|
|
4
3
|
import { defaultShikiFactory } from "./shiki/full.js";
|
|
4
|
+
import { i as applyDefaultThemes } from "../shiki-DL5DIaX-.js";
|
|
5
5
|
// src/highlight/client.ts
|
|
6
6
|
/**
|
|
7
7
|
* get highlighted results, should be used with React Suspense API.
|
package/dist/highlight/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { defaultShikiFactory, wasmShikiFactory } from "./shiki/full.js";
|
|
1
2
|
import { toJsx } from "../utils/hast-to-jsx.js";
|
|
2
3
|
import { i as applyDefaultThemes, o as loadMissingLanguage, r as highlightHast$1, s as loadMissingTheme } from "../shiki-DL5DIaX-.js";
|
|
3
|
-
import { defaultShikiFactory, wasmShikiFactory } from "./shiki/full.js";
|
|
4
4
|
// src/highlight/index.ts
|
|
5
5
|
async function highlightHast(code, options) {
|
|
6
6
|
const instance = await ((options.engine ?? "js") === "js" ? defaultShikiFactory : wasmShikiFactory).getOrInit();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ShikiFactory } from "../../index-
|
|
1
|
+
import { n as ShikiFactory } from "../../index-e-8QoCiA.js";
|
|
2
2
|
export declare const defaultShikiFactory: ShikiFactory;
|
|
3
3
|
/** factory using the WASM powered Regex engine */
|
|
4
4
|
export declare const wasmShikiFactory: ShikiFactory;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createShikiFactory, i as ShikiHighlighterOptions, n as ShikiFactory, o as createShikiHighlighter, r as ShikiHighlighter, s as highlightHast, t as HighlightHastOptions } from "../../index-
|
|
1
|
+
import { a as createShikiFactory, i as ShikiHighlighterOptions, n as ShikiFactory, o as createShikiHighlighter, r as ShikiHighlighter, s as highlightHast, t as HighlightHastOptions } from "../../index-e-8QoCiA.js";
|
|
2
2
|
export { HighlightHastOptions, ShikiFactory, ShikiHighlighter, ShikiHighlighterOptions, createShikiFactory, createShikiHighlighter, highlightHast };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Components } from "../../hast-to-jsx-ezp6bh3J.js";
|
|
2
1
|
import { t as Awaitable } from "../../types-Dvkw0Kd0.js";
|
|
3
|
-
import { t as
|
|
2
|
+
import { t as Components } from "../../hast-to-jsx-ezp6bh3J.js";
|
|
3
|
+
import { t as HighlightHastOptions } from "../../index-e-8QoCiA.js";
|
|
4
4
|
import { DependencyList, ReactNode } from "react";
|
|
5
5
|
import { HighlighterCore } from "shiki";
|
|
6
6
|
export type UseShikiOptions = HighlightHastOptions & {
|