fumadocs-core 16.15.10 → 16.15.12
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/{build-index-COlcoMFJ.js → build-index-BD-VRKOW.js} +1 -1
- package/dist/{dynamic-lx_V4971.js → dynamic-CSrl9w26.js} +1 -1
- package/dist/i18n/middleware.js +262 -15
- package/dist/mdx-plugins/remark-llms.js +1 -1
- package/dist/negotiation/index.js +1 -1
- package/dist/{path-1H5VzYiT.js → path-m9Srg2Jq.js} +1 -1
- package/dist/rolldown-runtime-EAsCxrDo.js +14 -0
- package/dist/search/algolia.js +1 -1
- package/dist/search/client/mixedbread.js +1 -4
- package/dist/search/flexsearch.js +1 -1
- package/dist/search/mixedbread.js +1 -4
- package/dist/search/orama-cloud.js +1 -1
- package/dist/search/server.js +1 -1
- package/dist/source/dynamic.js +1 -1
- package/dist/source/index.js +2 -2
- package/dist/source/plugins/slugs.js +1 -1
- package/package.json +18 -20
- package/dist/index.node-DkfYQyHM.js +0 -39
- package/dist/rolldown-runtime-DC62tzP2.js +0 -33
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as findPath } from "./utils-DEVq3cEC.js";
|
|
2
|
-
import { r as extname, t as basename } from "./path-
|
|
2
|
+
import { r as extname, t as basename } from "./path-m9Srg2Jq.js";
|
|
3
3
|
//#region src/search/server/build-index.ts
|
|
4
4
|
async function buildIndexDefault(page) {
|
|
5
5
|
let structuredData;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as normalizeUrl } from "./url-BVHvi3_K.js";
|
|
2
2
|
import { l as visit } from "./utils-DEVq3cEC.js";
|
|
3
3
|
import { t as isEqualShallow } from "./is-equal-LdLqRs0o.js";
|
|
4
|
-
import { a as normalize, i as joinPath, n as dirname, r as extname, t as basename } from "./path-
|
|
4
|
+
import { a as normalize, i as joinPath, n as dirname, r as extname, t as basename } from "./path-m9Srg2Jq.js";
|
|
5
5
|
import { slugsPlugin } from "./source/plugins/slugs.js";
|
|
6
6
|
import { t as iconPlugin } from "./icon-BILaoXeg.js";
|
|
7
7
|
import { cache } from "react";
|
package/dist/i18n/middleware.js
CHANGED
|
@@ -55,7 +55,7 @@ const cacheDefault = { create: function create() {
|
|
|
55
55
|
return new ObjectWithoutPrototypeCache();
|
|
56
56
|
} };
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region ../../node_modules/.pnpm/@formatjs+intl-localematcher@0.
|
|
58
|
+
//#region ../../node_modules/.pnpm/@formatjs+intl-localematcher@0.9.0/node_modules/@formatjs/intl-localematcher/index.js
|
|
59
59
|
/**
|
|
60
60
|
* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist
|
|
61
61
|
* @param locales
|
|
@@ -3242,7 +3242,20 @@ const regions = {
|
|
|
3242
3242
|
"ZW"
|
|
3243
3243
|
]
|
|
3244
3244
|
};
|
|
3245
|
-
|
|
3245
|
+
function splitUnicodeExtension(locale) {
|
|
3246
|
+
const subtags = locale.split("-");
|
|
3247
|
+
for (let i = 1; i < subtags.length; i++) {
|
|
3248
|
+
if (subtags[i] === "x") break;
|
|
3249
|
+
if (subtags[i] !== "u") continue;
|
|
3250
|
+
let end = i + 1;
|
|
3251
|
+
while (end < subtags.length && subtags[end].length > 1) end++;
|
|
3252
|
+
return {
|
|
3253
|
+
locale: [...subtags.slice(0, i), ...subtags.slice(end)].join("-"),
|
|
3254
|
+
extension: "-" + subtags.slice(i, end).join("-")
|
|
3255
|
+
};
|
|
3256
|
+
}
|
|
3257
|
+
return { locale };
|
|
3258
|
+
}
|
|
3246
3259
|
/**
|
|
3247
3260
|
* Asserts that a condition is true, throwing an error if it is not.
|
|
3248
3261
|
* Used for runtime validation and type narrowing.
|
|
@@ -3542,7 +3555,7 @@ function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
|
3542
3555
|
let extension;
|
|
3543
3556
|
const noExtensionLocales = [];
|
|
3544
3557
|
const noExtensionLocaleMap = requestedLocales.reduce((all, l) => {
|
|
3545
|
-
const noExtensionLocale = l
|
|
3558
|
+
const { locale: noExtensionLocale } = splitUnicodeExtension(l);
|
|
3546
3559
|
noExtensionLocales.push(noExtensionLocale);
|
|
3547
3560
|
all[noExtensionLocale] = l;
|
|
3548
3561
|
return all;
|
|
@@ -3550,7 +3563,7 @@ function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
|
3550
3563
|
const result = findBestMatch(noExtensionLocales, availableLocales);
|
|
3551
3564
|
if (result.matchedSupportedLocale && result.matchedDesiredLocale) {
|
|
3552
3565
|
foundLocale = result.matchedSupportedLocale;
|
|
3553
|
-
extension = noExtensionLocaleMap[result.matchedDesiredLocale].
|
|
3566
|
+
extension = splitUnicodeExtension(noExtensionLocaleMap[result.matchedDesiredLocale]).extension;
|
|
3554
3567
|
}
|
|
3555
3568
|
if (!foundLocale) return { locale: getDefaultLocale() };
|
|
3556
3569
|
return {
|
|
@@ -3558,16 +3571,251 @@ function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
|
3558
3571
|
extension
|
|
3559
3572
|
};
|
|
3560
3573
|
}
|
|
3574
|
+
const subdivisionAlias = {
|
|
3575
|
+
"cn11": "cnbj",
|
|
3576
|
+
"cn12": "cntj",
|
|
3577
|
+
"cn13": "cnhe",
|
|
3578
|
+
"cn14": "cnsx",
|
|
3579
|
+
"cn15": "cnmn",
|
|
3580
|
+
"cn21": "cnln",
|
|
3581
|
+
"cn22": "cnjl",
|
|
3582
|
+
"cn23": "cnhl",
|
|
3583
|
+
"cn31": "cnsh",
|
|
3584
|
+
"cn32": "cnjs",
|
|
3585
|
+
"cn33": "cnzj",
|
|
3586
|
+
"cn34": "cnah",
|
|
3587
|
+
"cn35": "cnfj",
|
|
3588
|
+
"cn36": "cnjx",
|
|
3589
|
+
"cn37": "cnsd",
|
|
3590
|
+
"cn41": "cnha",
|
|
3591
|
+
"cn42": "cnhb",
|
|
3592
|
+
"cn43": "cnhn",
|
|
3593
|
+
"cn44": "cngd",
|
|
3594
|
+
"cn45": "cngx",
|
|
3595
|
+
"cn46": "cnhi",
|
|
3596
|
+
"cn50": "cncq",
|
|
3597
|
+
"cn51": "cnsc",
|
|
3598
|
+
"cn52": "cngz",
|
|
3599
|
+
"cn53": "cnyn",
|
|
3600
|
+
"cn54": "cnxz",
|
|
3601
|
+
"cn61": "cnsn",
|
|
3602
|
+
"cn62": "cngs",
|
|
3603
|
+
"cn63": "cnqh",
|
|
3604
|
+
"cn64": "cnnx",
|
|
3605
|
+
"cn65": "cnxj",
|
|
3606
|
+
"cn71": "twzzzz",
|
|
3607
|
+
"cn91": "hkzzzz",
|
|
3608
|
+
"cn92": "mozzzz",
|
|
3609
|
+
"cz10a": "cz110",
|
|
3610
|
+
"cz10b": "cz111",
|
|
3611
|
+
"cz10c": "cz112",
|
|
3612
|
+
"cz10d": "cz113",
|
|
3613
|
+
"cz10e": "cz114",
|
|
3614
|
+
"cz10f": "cz115",
|
|
3615
|
+
"cz611": "cz663",
|
|
3616
|
+
"cz612": "cz632",
|
|
3617
|
+
"cz613": "cz633",
|
|
3618
|
+
"cz614": "cz634",
|
|
3619
|
+
"cz615": "cz635",
|
|
3620
|
+
"cz621": "cz641",
|
|
3621
|
+
"cz622": "cz642",
|
|
3622
|
+
"cz623": "cz643",
|
|
3623
|
+
"cz624": "cz644",
|
|
3624
|
+
"cz626": "cz646",
|
|
3625
|
+
"cz627": "cz647",
|
|
3626
|
+
"czjc": "cz31",
|
|
3627
|
+
"czjm": "cz64",
|
|
3628
|
+
"czka": "cz41",
|
|
3629
|
+
"czkr": "cz52",
|
|
3630
|
+
"czli": "cz51",
|
|
3631
|
+
"czmo": "cz80",
|
|
3632
|
+
"czol": "cz71",
|
|
3633
|
+
"czpa": "cz53",
|
|
3634
|
+
"czpl": "cz32",
|
|
3635
|
+
"czpr": "cz10",
|
|
3636
|
+
"czst": "cz20",
|
|
3637
|
+
"czus": "cz42",
|
|
3638
|
+
"czvy": "cz63",
|
|
3639
|
+
"czzl": "cz72",
|
|
3640
|
+
"fi01": "axzzzz",
|
|
3641
|
+
"fra": "frges",
|
|
3642
|
+
"frb": "frnaq",
|
|
3643
|
+
"frbl": "blzzzz",
|
|
3644
|
+
"frc": "frara",
|
|
3645
|
+
"frcp": "cpzzzz",
|
|
3646
|
+
"frd": "frbfc",
|
|
3647
|
+
"fre": "frbre",
|
|
3648
|
+
"frf": "frcvl",
|
|
3649
|
+
"frg": "frges",
|
|
3650
|
+
"frgf": "gfzzzz",
|
|
3651
|
+
"frgp": "gpzzzz",
|
|
3652
|
+
"frgua": "gpzzzz",
|
|
3653
|
+
"frh": "frcor",
|
|
3654
|
+
"fri": "frbfc",
|
|
3655
|
+
"frj": "fridf",
|
|
3656
|
+
"frk": "frocc",
|
|
3657
|
+
"frl": "frnaq",
|
|
3658
|
+
"frlre": "rezzzz",
|
|
3659
|
+
"frm": "frges",
|
|
3660
|
+
"frmay": "ytzzzz",
|
|
3661
|
+
"frmf": "mfzzzz",
|
|
3662
|
+
"frmq": "mqzzzz",
|
|
3663
|
+
"frn": "frocc",
|
|
3664
|
+
"frnc": "nczzzz",
|
|
3665
|
+
"fro": "frhdf",
|
|
3666
|
+
"frp": "frnor",
|
|
3667
|
+
"frpf": "pfzzzz",
|
|
3668
|
+
"frpm": "pmzzzz",
|
|
3669
|
+
"frq": "frnor",
|
|
3670
|
+
"frr": "frpdl",
|
|
3671
|
+
"frre": "rezzzz",
|
|
3672
|
+
"frs": "frhdf",
|
|
3673
|
+
"frt": "frnaq",
|
|
3674
|
+
"frtf": "tfzzzz",
|
|
3675
|
+
"fru": "frpac",
|
|
3676
|
+
"frv": "frara",
|
|
3677
|
+
"frwf": "wfzzzz",
|
|
3678
|
+
"fryt": "ytzzzz",
|
|
3679
|
+
"laxn": "laxs",
|
|
3680
|
+
"lud": "lucl",
|
|
3681
|
+
"lug": "luec",
|
|
3682
|
+
"lul": "luca",
|
|
3683
|
+
"mrnkc": "mr13",
|
|
3684
|
+
"nlaw": "awzzzz",
|
|
3685
|
+
"nlcw": "cwzzzz",
|
|
3686
|
+
"nlsx": "sxzzzz",
|
|
3687
|
+
"no23": "no50",
|
|
3688
|
+
"nzn": "nzauk",
|
|
3689
|
+
"nzs": "nzcan",
|
|
3690
|
+
"omba": "ombj",
|
|
3691
|
+
"omsh": "omsj",
|
|
3692
|
+
"plds": "pl02",
|
|
3693
|
+
"plkp": "pl04",
|
|
3694
|
+
"pllb": "pl08",
|
|
3695
|
+
"plld": "pl10",
|
|
3696
|
+
"pllu": "pl06",
|
|
3697
|
+
"plma": "pl12",
|
|
3698
|
+
"plmz": "pl14",
|
|
3699
|
+
"plop": "pl16",
|
|
3700
|
+
"plpd": "pl20",
|
|
3701
|
+
"plpk": "pl18",
|
|
3702
|
+
"plpm": "pl22",
|
|
3703
|
+
"plsk": "pl26",
|
|
3704
|
+
"plsl": "pl24",
|
|
3705
|
+
"plwn": "pl28",
|
|
3706
|
+
"plwp": "pl30",
|
|
3707
|
+
"plzp": "pl32",
|
|
3708
|
+
"shta": "tazzzz",
|
|
3709
|
+
"tteto": "tttob",
|
|
3710
|
+
"ttrcm": "ttmrc",
|
|
3711
|
+
"ttwto": "tttob",
|
|
3712
|
+
"twkhq": "twkhh",
|
|
3713
|
+
"twtnq": "twtnn",
|
|
3714
|
+
"twtpq": "twnwt",
|
|
3715
|
+
"twtxq": "twtxg",
|
|
3716
|
+
"usas": "aszzzz",
|
|
3717
|
+
"usgu": "guzzzz",
|
|
3718
|
+
"usmp": "mpzzzz",
|
|
3719
|
+
"uspr": "przzzz",
|
|
3720
|
+
"usum": "umzzzz",
|
|
3721
|
+
"usvi": "vizzzz"
|
|
3722
|
+
};
|
|
3723
|
+
const extensionAlias = {
|
|
3724
|
+
"t": {
|
|
3725
|
+
"d0": { "name": "charname" },
|
|
3726
|
+
"m0": {
|
|
3727
|
+
"beta-metsehaf": "betamets",
|
|
3728
|
+
"ies-jes": "iesjes",
|
|
3729
|
+
"names": "prprname",
|
|
3730
|
+
"tekie-alibekit": "tekieali"
|
|
3731
|
+
}
|
|
3732
|
+
},
|
|
3733
|
+
"u": {
|
|
3734
|
+
"ca": {
|
|
3735
|
+
"ethiopic-amete-alem": "ethioaa",
|
|
3736
|
+
"islamicc": "islamic-civil"
|
|
3737
|
+
},
|
|
3738
|
+
"kb": { "yes": "true" },
|
|
3739
|
+
"kc": { "yes": "true" },
|
|
3740
|
+
"kh": { "yes": "true" },
|
|
3741
|
+
"kk": { "yes": "true" },
|
|
3742
|
+
"kn": { "yes": "true" },
|
|
3743
|
+
"ks": {
|
|
3744
|
+
"primary": "level1",
|
|
3745
|
+
"tertiary": "level3"
|
|
3746
|
+
},
|
|
3747
|
+
"ms": { "imperial": "uksystem" },
|
|
3748
|
+
"tz": {
|
|
3749
|
+
"aqams": "aqmcm",
|
|
3750
|
+
"aukns": "auhba",
|
|
3751
|
+
"caffs": "cawnp",
|
|
3752
|
+
"camtr": "cator",
|
|
3753
|
+
"canpg": "cator",
|
|
3754
|
+
"capnt": "caiql",
|
|
3755
|
+
"cathu": "cator",
|
|
3756
|
+
"cayzf": "caedm",
|
|
3757
|
+
"cet": "bebru",
|
|
3758
|
+
"cnckg": "cnsha",
|
|
3759
|
+
"cnhrb": "cnsha",
|
|
3760
|
+
"cnkhg": "cnurc",
|
|
3761
|
+
"cst6cdt": "uschi",
|
|
3762
|
+
"cuba": "cuhav",
|
|
3763
|
+
"eet": "grath",
|
|
3764
|
+
"egypt": "egcai",
|
|
3765
|
+
"eire": "iedub",
|
|
3766
|
+
"est": "papty",
|
|
3767
|
+
"est5edt": "usnyc",
|
|
3768
|
+
"factory": "unk",
|
|
3769
|
+
"gaza": "gazastrp",
|
|
3770
|
+
"gmt0": "gmt",
|
|
3771
|
+
"hongkong": "hkhkg",
|
|
3772
|
+
"hst": "ushnl",
|
|
3773
|
+
"iceland": "isrey",
|
|
3774
|
+
"iran": "irthr",
|
|
3775
|
+
"israel": "jeruslm",
|
|
3776
|
+
"jamaica": "jmkin",
|
|
3777
|
+
"japan": "jptyo",
|
|
3778
|
+
"libya": "lytip",
|
|
3779
|
+
"met": "bebru",
|
|
3780
|
+
"mncoq": "mnuln",
|
|
3781
|
+
"mst": "usphx",
|
|
3782
|
+
"mst7mdt": "usden",
|
|
3783
|
+
"mxstis": "mxtij",
|
|
3784
|
+
"navajo": "usden",
|
|
3785
|
+
"poland": "plwaw",
|
|
3786
|
+
"portugal": "ptlis",
|
|
3787
|
+
"prc": "cnsha",
|
|
3788
|
+
"pst8pdt": "uslax",
|
|
3789
|
+
"roc": "twtpe",
|
|
3790
|
+
"rok": "krsel",
|
|
3791
|
+
"turkey": "trist",
|
|
3792
|
+
"uaozh": "uaiev",
|
|
3793
|
+
"uauzh": "uaiev",
|
|
3794
|
+
"uct": "utc",
|
|
3795
|
+
"umjon": "ushnl",
|
|
3796
|
+
"usnavajo": "usden",
|
|
3797
|
+
"wet": "ptlis",
|
|
3798
|
+
"zulu": "utc"
|
|
3799
|
+
}
|
|
3800
|
+
}
|
|
3801
|
+
};
|
|
3561
3802
|
function CanonicalizeUValue(ukey, uvalue) {
|
|
3562
|
-
let lowerValue = uvalue.toLowerCase();
|
|
3563
3803
|
invariant(ukey !== void 0, `ukey must be defined`);
|
|
3564
|
-
|
|
3804
|
+
let canonicalized = "";
|
|
3805
|
+
for (let i = 0; i < uvalue.length; i++) {
|
|
3806
|
+
const code = uvalue.charCodeAt(i);
|
|
3807
|
+
canonicalized += code >= 65 && code <= 90 ? String.fromCharCode(code + 32) : uvalue[i];
|
|
3808
|
+
}
|
|
3809
|
+
const aliases = Object.prototype.hasOwnProperty.call(extensionAlias.u, ukey) ? extensionAlias.u[ukey] : void 0;
|
|
3810
|
+
if (aliases && Object.prototype.hasOwnProperty.call(aliases, canonicalized)) canonicalized = aliases[canonicalized];
|
|
3811
|
+
if ((ukey === "rg" || ukey === "sd") && Object.prototype.hasOwnProperty.call(subdivisionAlias, canonicalized)) canonicalized = subdivisionAlias[canonicalized];
|
|
3812
|
+
return canonicalized === "true" ? "" : canonicalized;
|
|
3565
3813
|
}
|
|
3566
3814
|
function CanonicalizeUnicodeLocaleId(locale) {
|
|
3567
3815
|
return Intl.getCanonicalLocales(locale)[0];
|
|
3568
3816
|
}
|
|
3569
3817
|
function InsertUnicodeExtensionAndCanonicalize(locale, attributes, keywords) {
|
|
3570
|
-
invariant(locale.
|
|
3818
|
+
invariant(splitUnicodeExtension(locale).extension === void 0, "Expected locale to not have a Unicode locale extension");
|
|
3571
3819
|
let extension = "-u";
|
|
3572
3820
|
for (const attr of attributes) extension += `-${attr}`;
|
|
3573
3821
|
for (const kw of keywords) {
|
|
@@ -3616,11 +3864,11 @@ function BestAvailableLocale(availableLocales, locale) {
|
|
|
3616
3864
|
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
3617
3865
|
const result = { locale: "" };
|
|
3618
3866
|
for (const locale of requestedLocales) {
|
|
3619
|
-
const noExtensionLocale = locale
|
|
3867
|
+
const { locale: noExtensionLocale, extension } = splitUnicodeExtension(locale);
|
|
3620
3868
|
const availableLocale = BestAvailableLocale(availableLocales, noExtensionLocale);
|
|
3621
3869
|
if (availableLocale) {
|
|
3622
3870
|
result.locale = availableLocale;
|
|
3623
|
-
if (
|
|
3871
|
+
if (extension) result.extension = extension;
|
|
3624
3872
|
return result;
|
|
3625
3873
|
}
|
|
3626
3874
|
}
|
|
@@ -3676,10 +3924,9 @@ function ResolveLocale(availableLocales, requestedLocales, options, relevantExte
|
|
|
3676
3924
|
};
|
|
3677
3925
|
let foundLocale = r.locale;
|
|
3678
3926
|
let foundLocaleData = localeData[foundLocale];
|
|
3679
|
-
const result =
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
};
|
|
3927
|
+
const result = Object.create(null);
|
|
3928
|
+
result.locale = "en";
|
|
3929
|
+
result.dataLocale = foundLocale;
|
|
3683
3930
|
let components;
|
|
3684
3931
|
let keywords;
|
|
3685
3932
|
if (r.extension) {
|
|
@@ -3691,7 +3938,7 @@ function ResolveLocale(availableLocales, requestedLocales, options, relevantExte
|
|
|
3691
3938
|
let keyLocaleData = foundLocaleData?.[key] ?? [];
|
|
3692
3939
|
invariant(Array.isArray(keyLocaleData), `keyLocaleData for ${key} must be an array`);
|
|
3693
3940
|
let value = keyLocaleData[0];
|
|
3694
|
-
invariant(value
|
|
3941
|
+
invariant(value == null || typeof value === "string", `value must be a string, null, or undefined`);
|
|
3695
3942
|
let supportedKeyword;
|
|
3696
3943
|
let entry = keywords.find((k) => k.key === key);
|
|
3697
3944
|
if (entry) {
|
|
@@ -3718,7 +3965,7 @@ function ResolveLocale(availableLocales, requestedLocales, options, relevantExte
|
|
|
3718
3965
|
optionsValue = CanonicalizeUValue(key.toLowerCase(), optionsValue);
|
|
3719
3966
|
if (optionsValue === "") optionsValue = "true";
|
|
3720
3967
|
}
|
|
3721
|
-
if (optionsValue !== value && keyLocaleData.indexOf(optionsValue) > -1) {
|
|
3968
|
+
if (optionsValue !== void 0 && optionsValue !== value && keyLocaleData.indexOf(optionsValue) > -1) {
|
|
3722
3969
|
value = optionsValue;
|
|
3723
3970
|
supportedKeyword = void 0;
|
|
3724
3971
|
}
|
|
@@ -12,7 +12,7 @@ function remarkLLMs({ as = "_markdown", headingIds = true, _data = false, mdxAsP
|
|
|
12
12
|
filterElement(node) {
|
|
13
13
|
switch (node.type) {
|
|
14
14
|
case "mdxjsEsm": return false;
|
|
15
|
-
default: return true;
|
|
15
|
+
default: return rest.filterElement?.(node) ?? true;
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
stringify(node, parent, state, info, collect) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
4
|
+
var __exportAll = (all, no_symbols) => {
|
|
5
|
+
let target = {};
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { __exportAll as n, __commonJSMin as t };
|
package/dist/search/algolia.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { t as index_node_default } from "../../index.node-DkfYQyHM.js";
|
|
2
1
|
import Slugger from "github-slugger";
|
|
3
2
|
//#region src/search/client/mixedbread.ts
|
|
4
3
|
const slugger = new Slugger();
|
|
5
4
|
function extractHeadingTitle(text) {
|
|
6
5
|
const trimmedText = text.trim();
|
|
7
6
|
if (!trimmedText.startsWith("#")) return "";
|
|
8
|
-
|
|
9
|
-
if (firstLine) return index_node_default(firstLine, { useImgAltText: false });
|
|
10
|
-
return "";
|
|
7
|
+
return trimmedText.split("\n")[0]?.trim() ?? "";
|
|
11
8
|
}
|
|
12
9
|
/**
|
|
13
10
|
* @deprecated Use `createMixedbreadSearchAPI` from `fumadocs-core/search/mixedbread` instead.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as buildIndexDefault, t as buildBreadcrumbs } from "../build-index-
|
|
1
|
+
import { r as buildIndexDefault, t as buildBreadcrumbs } from "../build-index-BD-VRKOW.js";
|
|
2
2
|
import { t as createEndpoint } from "../endpoint-MyoBU5IC.js";
|
|
3
3
|
import { t as buildDocuments } from "../build-doc-Cjg7QvFR.js";
|
|
4
4
|
import { n as search, t as createDocument } from "../utils-Bvy3V-fv.js";
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { t as createEndpoint } from "../endpoint-MyoBU5IC.js";
|
|
2
|
-
import { t as index_node_default } from "../index.node-DkfYQyHM.js";
|
|
3
2
|
import Slugger from "github-slugger";
|
|
4
3
|
//#region src/search/mixedbread.ts
|
|
5
4
|
const slugger = new Slugger();
|
|
6
5
|
function extractHeadingTitle(text) {
|
|
7
6
|
const trimmedText = text.trim();
|
|
8
7
|
if (!trimmedText.startsWith("#")) return "";
|
|
9
|
-
|
|
10
|
-
if (firstLine) return index_node_default(firstLine, { useImgAltText: false });
|
|
11
|
-
return "";
|
|
8
|
+
return trimmedText.split("\n")[0]?.trim() ?? "";
|
|
12
9
|
}
|
|
13
10
|
function defaultTransform(results) {
|
|
14
11
|
return results.flatMap((item) => {
|
package/dist/search/server.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as buildIndexDefault, t as buildBreadcrumbs } from "../build-index-
|
|
1
|
+
import { r as buildIndexDefault, t as buildBreadcrumbs } from "../build-index-BD-VRKOW.js";
|
|
2
2
|
import { n as defaultReadOptions, t as createEndpoint } from "../endpoint-MyoBU5IC.js";
|
|
3
3
|
import { t as buildDocuments } from "../build-doc-Cjg7QvFR.js";
|
|
4
4
|
import { n as searchSimple, t as searchAdvanced } from "../advanced-Ct13khZr.js";
|
package/dist/source/dynamic.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as dynamicLoader } from "../dynamic-
|
|
1
|
+
import { t as dynamicLoader } from "../dynamic-CSrl9w26.js";
|
|
2
2
|
export { dynamicLoader };
|
package/dist/source/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as path_exports } from "../path-
|
|
2
|
-
import { a as update, i as multiple, n as createGetUrl, o as FileSystem, r as loader, t as dynamicLoader } from "../dynamic-
|
|
1
|
+
import { o as path_exports } from "../path-m9Srg2Jq.js";
|
|
2
|
+
import { a as update, i as multiple, n as createGetUrl, o as FileSystem, r as loader, t as dynamicLoader } from "../dynamic-CSrl9w26.js";
|
|
3
3
|
import { getSlugs } from "./plugins/slugs.js";
|
|
4
4
|
import { llms } from "./llms.js";
|
|
5
5
|
export { FileSystem, path_exports as PathUtils, createGetUrl, dynamicLoader, getSlugs, llms, loader, multiple, update };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-core",
|
|
3
|
-
"version": "16.15.
|
|
3
|
+
"version": "16.15.12",
|
|
4
4
|
"description": "The React.js library for building a documentation website",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
"access": "public"
|
|
111
111
|
},
|
|
112
112
|
"dependencies": {
|
|
113
|
+
"@fumari/image-size": "^0.1.1",
|
|
113
114
|
"estree-util-value-to-estree": "^3.5.0",
|
|
114
115
|
"github-slugger": "^2.0.0",
|
|
115
116
|
"hast-util-to-estree": "^3.1.3",
|
|
@@ -126,39 +127,37 @@
|
|
|
126
127
|
"unified": "^11.0.5",
|
|
127
128
|
"unist-util-visit": "^5.1.0",
|
|
128
129
|
"vfile": "^6.0.3",
|
|
129
|
-
"yaml": "^2.9.
|
|
130
|
-
"zbsearch": "^4.0.0"
|
|
131
|
-
"@fumari/image-size": "^0.1.0"
|
|
130
|
+
"yaml": "^2.9.1",
|
|
131
|
+
"zbsearch": "^4.0.0"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
|
-
"@formatjs/intl-localematcher": "^0.
|
|
134
|
+
"@formatjs/intl-localematcher": "^0.9.0",
|
|
135
135
|
"@mdx-js/mdx": "^3.1.1",
|
|
136
|
-
"@mixedbread/sdk": "0.
|
|
136
|
+
"@mixedbread/sdk": "0.78.0",
|
|
137
137
|
"@modelcontextprotocol/server": "2.0.0",
|
|
138
138
|
"@orama/core": "^1.2.19",
|
|
139
139
|
"@oramacloud/client": "^2.1.4",
|
|
140
140
|
"@shikijs/transformers": "^4.4.3",
|
|
141
|
-
"@tanstack/react-router": "1.170.
|
|
141
|
+
"@tanstack/react-router": "1.170.38",
|
|
142
142
|
"@types/estree-jsx": "^1.0.5",
|
|
143
143
|
"@types/hast": "^3.0.5",
|
|
144
144
|
"@types/mdast": "^4.0.4",
|
|
145
|
-
"@types/node": "26.
|
|
146
|
-
"@types/react": "^19.
|
|
147
|
-
"@types/react-dom": "^19.
|
|
148
|
-
"algoliasearch": "5.
|
|
145
|
+
"@types/node": "26.6.1",
|
|
146
|
+
"@types/react": "^19.3.0",
|
|
147
|
+
"@types/react-dom": "^19.3.0",
|
|
148
|
+
"algoliasearch": "5.59.0",
|
|
149
149
|
"flexsearch": "^0.8.212",
|
|
150
|
-
"lucide-react": "^1.
|
|
151
|
-
"next": "16.3.
|
|
150
|
+
"lucide-react": "^1.47.0",
|
|
151
|
+
"next": "16.3.5",
|
|
152
152
|
"path-to-regexp": "^8.4.2",
|
|
153
|
-
"react-router": "^8.
|
|
153
|
+
"react-router": "^8.4.0",
|
|
154
154
|
"remark-directive": "^4.0.0",
|
|
155
155
|
"remark-mdx": "^3.1.1",
|
|
156
|
-
"
|
|
156
|
+
"tsconfig": "0.0.0",
|
|
157
157
|
"tsdown": "0.23.0",
|
|
158
158
|
"typescript": "^7.0.2",
|
|
159
159
|
"waku": "1.0.0-rc.0",
|
|
160
|
-
"zod": "4.5
|
|
161
|
-
"tsconfig": "0.0.0"
|
|
160
|
+
"zod": "4.6.5"
|
|
162
161
|
},
|
|
163
162
|
"peerDependencies": {
|
|
164
163
|
"@mdx-js/mdx": "*",
|
|
@@ -242,10 +241,9 @@
|
|
|
242
241
|
},
|
|
243
242
|
"inlinedDependencies": {
|
|
244
243
|
"@formatjs/fast-memoize": "3.1.7",
|
|
245
|
-
"@formatjs/intl-localematcher": "0.
|
|
244
|
+
"@formatjs/intl-localematcher": "0.9.0",
|
|
246
245
|
"@shikijs/transformers": "4.4.3",
|
|
247
|
-
"path-to-regexp": "8.4.2"
|
|
248
|
-
"remove-markdown": "0.7.0"
|
|
246
|
+
"path-to-regexp": "8.4.2"
|
|
249
247
|
},
|
|
250
248
|
"scripts": {
|
|
251
249
|
"build": "tsdown",
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-DC62tzP2.js";
|
|
2
|
-
var index_node_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3
|
-
module.exports = function(md, options) {
|
|
4
|
-
options = options || {};
|
|
5
|
-
options.listUnicodeChar = options.hasOwnProperty("listUnicodeChar") ? options.listUnicodeChar : false;
|
|
6
|
-
options.stripListLeaders = options.hasOwnProperty("stripListLeaders") ? options.stripListLeaders : true;
|
|
7
|
-
options.gfm = options.hasOwnProperty("gfm") ? options.gfm : true;
|
|
8
|
-
options.useImgAltText = options.hasOwnProperty("useImgAltText") ? options.useImgAltText : true;
|
|
9
|
-
options.abbr = options.hasOwnProperty("abbr") ? options.abbr : false;
|
|
10
|
-
options.replaceLinksWithURL = options.hasOwnProperty("replaceLinksWithURL") ? options.replaceLinksWithURL : false;
|
|
11
|
-
options.separateLinksAndTexts = options.hasOwnProperty("separateLinksAndTexts") ? options.separateLinksAndTexts : null;
|
|
12
|
-
options.htmlTagsToSkip = options.hasOwnProperty("htmlTagsToSkip") ? options.htmlTagsToSkip : [];
|
|
13
|
-
options.throwError = options.hasOwnProperty("throwError") ? options.throwError : false;
|
|
14
|
-
var output = md || "";
|
|
15
|
-
output = output.replace(/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/gm, "");
|
|
16
|
-
try {
|
|
17
|
-
if (options.stripListLeaders) {
|
|
18
|
-
if (options.listUnicodeChar) output = output.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, options.listUnicodeChar + " $1");
|
|
19
|
-
else output = output.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm, "$1");
|
|
20
|
-
}
|
|
21
|
-
if (options.gfm) output = output.replace(/\n={2,}/g, "\n").replace(/~{3}.*\n/g, "").replace(/~~/g, "").replace(/```(?:.*)\n([\s\S]*?)```/g, (_, code) => code.trim());
|
|
22
|
-
if (options.abbr) output = output.replace(/\*\[.*\]:.*\n/, "");
|
|
23
|
-
let htmlReplaceRegex = /<[^>]*>/g;
|
|
24
|
-
if (options.htmlTagsToSkip && options.htmlTagsToSkip.length > 0) {
|
|
25
|
-
const joinedHtmlTagsToSkip = options.htmlTagsToSkip.join("|");
|
|
26
|
-
htmlReplaceRegex = new RegExp(`<(?!\/?(${joinedHtmlTagsToSkip})(?=>|\s[^>]*>))[^>]*>`, "g");
|
|
27
|
-
}
|
|
28
|
-
if (options.separateLinksAndTexts) output = output.replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1" + options.separateLinksAndTexts + "$2");
|
|
29
|
-
output = output.replace(htmlReplaceRegex, "").replace(/^[=\-]{2,}\s*$/g, "").replace(/\[\^.+?\](\: .*?$)?/g, "").replace(/\s{0,2}\[.*?\]: .*?$/g, "").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, options.useImgAltText ? "$1" : "").replace(/\[([\s\S]*?)\]\s*[\(\[](.*?)[\)\]]/g, options.replaceLinksWithURL ? "$2" : "$1").replace(/^(\n)?\s{0,3}>\s?/gm, "$1").replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g, "").replace(/^(\n)?\s{0,}#{1,6}\s*( (.+))? +#+$|^(\n)?\s{0,}#{1,6}\s*( (.+))?$/gm, "$1$3$4$6").replace(/([\*]+)(\S)(.*?\S)??\1/g, "$2$3").replace(/(^|\W)([_]+)(\S)(.*?\S)??\2($|\W)/g, "$1$3$4$5").replace(/(`{3,})(.*?)\1/gm, "$2").replace(/`(.+?)`/g, "$1").replace(/~(.*?)~/g, "$1");
|
|
30
|
-
} catch (e) {
|
|
31
|
-
if (options.throwError) throw e;
|
|
32
|
-
console.error("remove-markdown encountered error: %s", e);
|
|
33
|
-
return md;
|
|
34
|
-
}
|
|
35
|
-
return output;
|
|
36
|
-
};
|
|
37
|
-
})))(), 1)).default;
|
|
38
|
-
//#endregion
|
|
39
|
-
export { index_node_default as t };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
|
-
var __exportAll = (all, no_symbols) => {
|
|
10
|
-
let target = {};
|
|
11
|
-
for (var name in all) __defProp(target, name, {
|
|
12
|
-
get: all[name],
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
|
-
key = keys[i];
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
22
|
-
get: ((k) => from[k]).bind(null, key),
|
|
23
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
29
|
-
value: mod,
|
|
30
|
-
enumerable: true
|
|
31
|
-
}) : target, mod));
|
|
32
|
-
//#endregion
|
|
33
|
-
export { __exportAll as n, __toESM as r, __commonJSMin as t };
|