fumadocs-core 16.7.12 → 16.7.13

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.
Files changed (118) hide show
  1. package/dist/{advanced-B6xijHpk.js → advanced-Bv_qi9IC.js} +1 -1
  2. package/dist/{algolia-CV1p_BGs.d.ts → algolia-DphIPKrc.d.ts} +1 -1
  3. package/dist/breadcrumb.d.ts +1 -1
  4. package/dist/{build-doc-CRrL6r30.js → build-doc-DKBeOVIN.js} +1 -1
  5. package/dist/{client-DwXJpdzf.d.ts → client-D3PZ2z2N.d.ts} +3 -3
  6. package/dist/content/mdx/preset-bundler.d.ts +7 -7
  7. package/dist/content/mdx/preset-bundler.js +1 -1
  8. package/dist/content/mdx/preset-runtime.d.ts +7 -7
  9. package/dist/content/mdx/preset-runtime.js +1 -1
  10. package/dist/content/toc.d.ts +1 -1
  11. package/dist/dist-BvsXWCqT.js +808 -0
  12. package/dist/fromFile-rjAsJGw3.js +845 -0
  13. package/dist/highlight/shiki/full.d.ts +1 -1
  14. package/dist/highlight/shiki/index.d.ts +1 -1
  15. package/dist/highlight/shiki/react.d.ts +2 -2
  16. package/dist/i18n/index.d.ts +1 -1
  17. package/dist/i18n/middleware.d.ts +1 -1
  18. package/dist/i18n/middleware.js +3763 -2
  19. package/dist/{index-DkqXqEn8.d.ts → index-9M3g3SDy.d.ts} +3 -3
  20. package/dist/{index-D-UKvVrz.d.ts → index-Bm0msojm.d.ts} +1 -1
  21. package/dist/{index-D2XxhP9t.d.ts → index-C4kyQCbj.d.ts} +1 -1
  22. package/dist/{index-Ca0YkTYK2.d.ts → index-CDOu1Gxx2.d.ts} +1 -1
  23. package/dist/mdx-plugins/codeblock-utils.d.ts +1 -1
  24. package/dist/mdx-plugins/index.d.ts +17 -17
  25. package/dist/mdx-plugins/index.js +2 -2
  26. package/dist/mdx-plugins/rehype-code.core.d.ts +1 -1
  27. package/dist/mdx-plugins/rehype-code.core.js +1 -1
  28. package/dist/mdx-plugins/rehype-code.d.ts +2 -2
  29. package/dist/mdx-plugins/rehype-code.js +1 -1
  30. package/dist/mdx-plugins/rehype-toc.d.ts +1 -1
  31. package/dist/mdx-plugins/remark-admonition.d.ts +1 -1
  32. package/dist/mdx-plugins/remark-code-tab.d.ts +1 -1
  33. package/dist/mdx-plugins/remark-directive-admonition.d.ts +1 -1
  34. package/dist/mdx-plugins/remark-feedback-block.d.ts +1 -1
  35. package/dist/mdx-plugins/remark-gfm.d.ts +1 -1
  36. package/dist/mdx-plugins/remark-heading.d.ts +1 -1
  37. package/dist/mdx-plugins/remark-image.d.ts +1 -1
  38. package/dist/mdx-plugins/remark-image.js +2 -2
  39. package/dist/mdx-plugins/remark-llms.d.ts +1 -1
  40. package/dist/mdx-plugins/remark-llms.runtime.d.ts +1 -1
  41. package/dist/mdx-plugins/remark-mdx-files.d.ts +1 -1
  42. package/dist/mdx-plugins/remark-mdx-mermaid.d.ts +1 -1
  43. package/dist/mdx-plugins/remark-npm.d.ts +1 -1
  44. package/dist/mdx-plugins/remark-npm.js +1 -64
  45. package/dist/mdx-plugins/remark-steps.d.ts +1 -1
  46. package/dist/mdx-plugins/remark-structure.d.ts +1 -1
  47. package/dist/mdx-plugins/stringifier.d.ts +1 -1
  48. package/dist/negotiation/index.js +1 -37
  49. package/dist/negotiation-CMIpYwJJ.js +1021 -0
  50. package/dist/page-tree/index.d.ts +2 -2
  51. package/dist/{rehype-code-CMrTh9Lu.d.ts → rehype-code-BceXtwzN.d.ts} +1 -1
  52. package/dist/{rehype-code.core-AAMsXdqJ.d.ts → rehype-code.core-DfJelVqH.d.ts} +2 -2
  53. package/dist/{remark-heading-95OQNNoH.d.ts → remark-heading-C3ZesmHL.d.ts} +1 -1
  54. package/dist/{remark-llms-Bjyq1jdk.d.ts → remark-llms-4bK9f_wN.d.ts} +1 -1
  55. package/dist/remark-npm-DIGXA7E3.js +593 -0
  56. package/dist/{remark-structure-c-gm2PCy.d.ts → remark-structure-DLKk-p9t.d.ts} +1 -1
  57. package/dist/search/algolia.d.ts +1 -1
  58. package/dist/search/client/algolia.d.ts +1 -1
  59. package/dist/search/client/fetch.d.ts +1 -1
  60. package/dist/search/client/flexsearch-static.d.ts +1 -1
  61. package/dist/search/client/flexsearch-static.js +1 -1
  62. package/dist/search/client/mixedbread.d.ts +1 -1
  63. package/dist/search/client/mixedbread.js +1 -1
  64. package/dist/search/client/orama-cloud-legacy.d.ts +1 -1
  65. package/dist/search/client/orama-cloud-legacy.js +1 -1
  66. package/dist/search/client/orama-cloud.d.ts +1 -1
  67. package/dist/search/client/orama-cloud.js +1 -1
  68. package/dist/search/client/orama-static.d.ts +1 -1
  69. package/dist/search/client/orama-static.js +1 -1
  70. package/dist/search/client.d.ts +1 -1
  71. package/dist/search/flexsearch.d.ts +4 -4
  72. package/dist/search/flexsearch.js +3 -3
  73. package/dist/search/index.d.ts +1 -1
  74. package/dist/search/mixedbread.d.ts +2 -2
  75. package/dist/search/mixedbread.js +2 -2
  76. package/dist/search/orama-cloud-legacy.d.ts +1 -1
  77. package/dist/search/orama-cloud.d.ts +1 -1
  78. package/dist/search/server.d.ts +1 -1
  79. package/dist/search/server.js +3 -3
  80. package/dist/{server-B89IM_4v.d.ts → server-D74cMtck.d.ts} +5 -5
  81. package/dist/source/client/index.d.ts +1 -1
  82. package/dist/source/index.d.ts +1 -1
  83. package/dist/source/index.js +2 -2
  84. package/dist/source/plugins/lucide-icons.d.ts +1 -1
  85. package/dist/source/plugins/lucide-icons.js +1 -1
  86. package/dist/source/plugins/slugs.d.ts +1 -1
  87. package/dist/source/plugins/slugs.js +1 -1
  88. package/dist/source/plugins/status-badges.d.ts +2 -2
  89. package/dist/toc.d.ts +1 -1
  90. package/dist/toc.js +12 -26
  91. package/package.json +87 -103
  92. /package/dist/{codeblock-utils-DuhKfwET.d.ts → codeblock-utils-BMoNeXUb.d.ts} +0 -0
  93. /package/dist/{definitions-j1YD3oZE.d.ts → definitions-DH0vdUJV.d.ts} +0 -0
  94. /package/dist/{endpoint-Bs6bqGYq.js → endpoint-BWgZs3LL.js} +0 -0
  95. /package/dist/{icon-CfEtMzdP.js → icon-DXrdIp2K.js} +0 -0
  96. /package/dist/{index-DAzunKMp.d.ts → index-B_5tvyCk.d.ts} +0 -0
  97. /package/dist/{index-CQ5TBOzH.d.ts → index-WhA-NTMB.d.ts} +0 -0
  98. /package/dist/{path-CL7hf0GY.js → path-ClKaiDuq.js} +0 -0
  99. /package/dist/{rehype-code.core-23F1yz08.js → rehype-code.core-B9asBGBz.js} +0 -0
  100. /package/dist/{rehype-toc-iWxg6ELI.d.ts → rehype-toc-Dk5ozAin.d.ts} +0 -0
  101. /package/dist/{remark-admonition-0gZM40ZU.d.ts → remark-admonition-D6mMI676.d.ts} +0 -0
  102. /package/dist/{remark-code-tab-Dk79zZwn.d.ts → remark-code-tab-Cl4XxpJ9.d.ts} +0 -0
  103. /package/dist/{remark-directive-admonition-CxFIkQ_i.d.ts → remark-directive-admonition-BJwUZuIt.d.ts} +0 -0
  104. /package/dist/{remark-feedback-block-CehhnqT0.d.ts → remark-feedback-block-PeBl_Fvl.d.ts} +0 -0
  105. /package/dist/{remark-gfm-DIHBRjLx.d.ts → remark-gfm-IilhXQUz.d.ts} +0 -0
  106. /package/dist/{remark-image-DQlJevNY.d.ts → remark-image-Co-rKW87.d.ts} +0 -0
  107. /package/dist/{remark-mdx-files-C50nFvnY.d.ts → remark-mdx-files-Ba1Yf3sk.d.ts} +0 -0
  108. /package/dist/{remark-mdx-mermaid-BkA2vurg.d.ts → remark-mdx-mermaid-DPDDbIZJ.d.ts} +0 -0
  109. /package/dist/{remark-npm-7SDuqMc6.d.ts → remark-npm-B7OPb7Ze.d.ts} +0 -0
  110. /package/dist/{remark-steps-DsnXM6Xj.d.ts → remark-steps-PxfBg8ws.d.ts} +0 -0
  111. /package/dist/{remove-markdown-Cte6pwYx.js → remove-markdown-CQ--9YPQ.js} +0 -0
  112. /package/dist/{remove-undefined-PK1FA5gc.js → remove-undefined-DLE4y6II.js} +0 -0
  113. /package/dist/{stringifier-l_KdmdPb.d.ts → stringifier-D6T4zhkn.d.ts} +0 -0
  114. /package/dist/{toc-CgnJPi4Q.d.ts → toc-DXlLlbv_.d.ts} +0 -0
  115. /package/dist/{types-Dr0HqbXP.d.ts → types-D8S_yMgI.d.ts} +0 -0
  116. /package/dist/{util-D2LMvKsn.d.ts → util-CZD_oO6N.d.ts} +0 -0
  117. /package/dist/{util-BnfE-P1F.js → util-D3lJGMcv.js} +0 -0
  118. /package/dist/{utils-D_KDPEof.js → utils-CEyx3kFf.js} +0 -0
@@ -1,3 +1,3 @@
1
- import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "../definitions-j1YD3oZE.js";
2
- import { a as flattenTree, c as visit, i as findSiblings, n as findParent, o as getPageTreePeers, r as findPath, s as getPageTreeRoots, t as findNeighbour } from "../index-D2XxhP9t.js";
1
+ import { a as Separator, i as Root, n as Item, r as Node, t as Folder } from "../definitions-DH0vdUJV.js";
2
+ import { a as flattenTree, c as visit, i as findSiblings, n as findParent, o as getPageTreePeers, r as findPath, s as getPageTreeRoots, t as findNeighbour } from "../index-C4kyQCbj.js";
3
3
  export { Folder, Item, Node, Root, Separator, findNeighbour, findParent, findPath, findSiblings, flattenTree, getPageTreePeers, getPageTreeRoots, visit };
@@ -1,4 +1,4 @@
1
- import { t as RehypeCodeOptionsCommon } from "./rehype-code.core-AAMsXdqJ.js";
1
+ import { t as RehypeCodeOptionsCommon } from "./rehype-code.core-DfJelVqH.js";
2
2
  import * as _$unified from "unified";
3
3
  import * as _$hast from "hast";
4
4
 
@@ -1,5 +1,5 @@
1
- import { n as DistributiveOmit, t as Awaitable } from "./types-Dr0HqbXP.js";
2
- import { n as ShikiFactory } from "./index-D-UKvVrz.js";
1
+ import { n as DistributiveOmit, t as Awaitable } from "./types-D8S_yMgI.js";
2
+ import { n as ShikiFactory } from "./index-Bm0msojm.js";
3
3
  import { Processor, Transformer } from "unified";
4
4
  import { Root } from "hast";
5
5
  import { RehypeShikiOptions } from "@shikijs/rehype";
@@ -1,4 +1,4 @@
1
- import { c as TOCItemType } from "./toc-CgnJPi4Q.js";
1
+ import { c as TOCItemType } from "./toc-DXlLlbv_.js";
2
2
  import { Transformer } from "unified";
3
3
  import { Heading, Root } from "mdast";
4
4
 
@@ -1,4 +1,4 @@
1
- import { n as StringifyOptions } from "./stringifier-l_KdmdPb.js";
1
+ import { n as StringifyOptions } from "./stringifier-D6T4zhkn.js";
2
2
  import { MdxJsxFlowElement, MdxJsxTextElement } from "mdast-util-mdx";
3
3
  import { Info, State } from "mdast-util-to-markdown";
4
4
  import { Processor, Transformer } from "unified";
@@ -0,0 +1,593 @@
1
+ import { generateCodeBlockTabs } from "./mdx-plugins/codeblock-utils.js";
2
+ import { visit } from "unist-util-visit";
3
+ //#region ../../node_modules/.pnpm/npm-to-yarn@3.0.1/node_modules/npm-to-yarn/dist/npm-to-yarn.mjs
4
+ var unchangedCLICommands = [
5
+ "test",
6
+ "login",
7
+ "logout",
8
+ "link",
9
+ "unlink",
10
+ "publish",
11
+ "cache",
12
+ "start",
13
+ "stop",
14
+ "test"
15
+ ];
16
+ var yarnCLICommands = [
17
+ "init",
18
+ "run",
19
+ "add",
20
+ "audit",
21
+ "autoclean",
22
+ "bin",
23
+ "check",
24
+ "config",
25
+ "create",
26
+ "dedupe",
27
+ "generate-lock-entry",
28
+ "global",
29
+ "help",
30
+ "import",
31
+ "info",
32
+ "install",
33
+ "licenses",
34
+ "list",
35
+ "lockfile",
36
+ "outdated",
37
+ "owner",
38
+ "pack",
39
+ "policies",
40
+ "prune",
41
+ "remove",
42
+ "self-update",
43
+ "tag",
44
+ "team",
45
+ "upgrade",
46
+ "upgrade-interactive",
47
+ "version",
48
+ "versions",
49
+ "why",
50
+ "workspace",
51
+ "workspaces"
52
+ ];
53
+ var executorCommands = {
54
+ npm: "npx",
55
+ yarn: "yarn dlx",
56
+ pnpm: "pnpm dlx",
57
+ bun: "bun x"
58
+ };
59
+ function parse(command) {
60
+ var args = [];
61
+ var lastQuote = false;
62
+ var escaped = false;
63
+ var part = "";
64
+ for (var i = 0; i < command.length; ++i) {
65
+ var char = command.charAt(i);
66
+ if (char === "\\") {
67
+ part += char;
68
+ escaped = true;
69
+ } else {
70
+ if (char === " " && !lastQuote) {
71
+ args.push(part);
72
+ part = "";
73
+ } else if (!escaped && (char === "\"" || char === "'")) {
74
+ part += char;
75
+ if (char === lastQuote) lastQuote = false;
76
+ else if (!lastQuote) lastQuote = char;
77
+ } else part += char;
78
+ escaped = false;
79
+ }
80
+ }
81
+ args.push(part);
82
+ return args;
83
+ }
84
+ function convertAddRemoveArgs(args) {
85
+ return args.map(function(item) {
86
+ switch (item) {
87
+ case "--no-lockfile": return "--no-package-lock";
88
+ case "--production": return "--save-prod";
89
+ case "--dev": return "--save-dev";
90
+ case "--optional": return "--save-optional";
91
+ case "--exact": return "--save-exact";
92
+ default: return item;
93
+ }
94
+ });
95
+ }
96
+ var yarnToNpmTable = {
97
+ add: function(args) {
98
+ if (args.length === 2 && args[1] === "--force") return ["rebuild"];
99
+ args[0] = "install";
100
+ return convertAddRemoveArgs(args);
101
+ },
102
+ remove: function(args) {
103
+ args[0] = "uninstall";
104
+ return convertAddRemoveArgs(args);
105
+ },
106
+ version: function(args) {
107
+ return args.map(function(item) {
108
+ switch (item) {
109
+ case "--major": return "major";
110
+ case "--minor": return "minor";
111
+ case "--patch": return "patch";
112
+ default: return item;
113
+ }
114
+ });
115
+ },
116
+ install: "install",
117
+ list: function(args) {
118
+ args[0] = "ls";
119
+ var patternIndex = args.findIndex(function(item) {
120
+ return item === "--pattern";
121
+ });
122
+ if (patternIndex >= 0 && args[patternIndex + 1]) {
123
+ var packages = args[patternIndex + 1].replace(/["']([^"']+)["']/, "$1").split("|");
124
+ args.splice(patternIndex, 2, packages.join(" "));
125
+ }
126
+ return args;
127
+ },
128
+ init: "init",
129
+ create: "init",
130
+ outdated: "outdated",
131
+ run: "run",
132
+ global: function(args) {
133
+ switch (args[1]) {
134
+ case "add":
135
+ args.shift();
136
+ args = yarnToNpmTable.add(args);
137
+ args.push("--global");
138
+ return args;
139
+ case "remove":
140
+ args.shift();
141
+ args = yarnToNpmTable.remove(args);
142
+ args.push("--global");
143
+ return args;
144
+ case "list":
145
+ args.shift();
146
+ args = yarnToNpmTable.list(args);
147
+ args.push("--global");
148
+ return args;
149
+ default:
150
+ args.push("\n# couldn't auto-convert command");
151
+ return args;
152
+ }
153
+ },
154
+ pack: function(args) {
155
+ return args.map(function(item) {
156
+ if (item === "--filename") return "--pack-destination";
157
+ return item;
158
+ });
159
+ }
160
+ };
161
+ function yarnToNPM(_m, command) {
162
+ command = (command || "").trim();
163
+ if (command === "") return "npm install";
164
+ var args = parse(command);
165
+ var firstCommand = (/\w+/.exec(command) || [""])[0];
166
+ if (unchangedCLICommands.includes(args[0])) return "npm " + command;
167
+ else if (args[0] in yarnToNpmTable) {
168
+ var converter = yarnToNpmTable[args[0]];
169
+ if (typeof converter === "function") args = converter(args);
170
+ else args[0] = converter;
171
+ return "npm " + args.filter(Boolean).join(" ");
172
+ } else if (!yarnCLICommands.includes(firstCommand)) return "npm run " + command;
173
+ else return "npm " + command + "\n# couldn't auto-convert command";
174
+ }
175
+ function convertInstallArgs$1(args) {
176
+ if (args.includes("--global") || args.includes("-g")) args.unshift("global");
177
+ return args.map(function(item) {
178
+ switch (item) {
179
+ case "--save-dev":
180
+ case "-D": return "--dev";
181
+ case "--save-prod":
182
+ case "-P": return "--production";
183
+ case "--no-package-lock": return "--no-lockfile";
184
+ case "--save-optional":
185
+ case "-O": return "--optional";
186
+ case "--save-exact":
187
+ case "-E": return "--exact";
188
+ case "--save":
189
+ case "-S":
190
+ case "--global":
191
+ case "-g": return "";
192
+ default: return item;
193
+ }
194
+ });
195
+ }
196
+ var npmToYarnTable = {
197
+ install: function(args) {
198
+ if (args.length === 1) return ["install"];
199
+ args[0] = "add";
200
+ return convertInstallArgs$1(args);
201
+ },
202
+ i: function(args) {
203
+ return npmToYarnTable.install(args);
204
+ },
205
+ uninstall: function(args) {
206
+ args[0] = "remove";
207
+ return convertInstallArgs$1(args);
208
+ },
209
+ un: function(args) {
210
+ return npmToYarnTable.uninstall(args);
211
+ },
212
+ remove: function(args) {
213
+ return npmToYarnTable.uninstall(args);
214
+ },
215
+ r: function(args) {
216
+ return npmToYarnTable.uninstall(args);
217
+ },
218
+ rm: function(args) {
219
+ return npmToYarnTable.uninstall(args);
220
+ },
221
+ version: function(args) {
222
+ return args.map(function(item) {
223
+ switch (item) {
224
+ case "major": return "--major";
225
+ case "minor": return "--minor";
226
+ case "patch": return "--patch";
227
+ default: return item;
228
+ }
229
+ });
230
+ },
231
+ rb: function(args) {
232
+ return npmToYarnTable.rebuild(args);
233
+ },
234
+ rebuild: function(args) {
235
+ args[0] = "add";
236
+ args.push("--force");
237
+ return args;
238
+ },
239
+ run: function(args) {
240
+ if (args[1] && !unchangedCLICommands.includes(args[1]) && !yarnCLICommands.includes(args[1])) args.splice(0, 1);
241
+ return args;
242
+ },
243
+ exec: function(args) {
244
+ args[0] = "run";
245
+ return npmToYarnTable.run(args);
246
+ },
247
+ ls: function(args) {
248
+ args[0] = "list";
249
+ var ended = false;
250
+ var packages = args.filter(function(item, id) {
251
+ if (id > 0 && !ended) {
252
+ ended = item.startsWith("-");
253
+ return !ended;
254
+ }
255
+ return false;
256
+ });
257
+ if (packages.length > 0) args.splice(1, packages.length, "--pattern", "\"" + packages.join("|") + "\"");
258
+ return args;
259
+ },
260
+ list: function(args) {
261
+ return npmToYarnTable.ls(args);
262
+ },
263
+ init: function(args) {
264
+ if (args[1] && !args[1].startsWith("-")) {
265
+ args[0] = "create";
266
+ var m = args[1].match(/(.+)@latest/);
267
+ if (m) args[1] = m[1];
268
+ }
269
+ return args.filter(function(item) {
270
+ return item !== "--scope";
271
+ });
272
+ },
273
+ create: function(args) {
274
+ return npmToYarnTable.init(args);
275
+ },
276
+ ln: "link",
277
+ t: "test",
278
+ tst: "test",
279
+ outdated: "outdated",
280
+ pack: function(args) {
281
+ return args.map(function(item) {
282
+ if (item.startsWith("--pack-destination")) return item.replace(/^--pack-destination[\s=]/, "--filename ");
283
+ return item;
284
+ });
285
+ }
286
+ };
287
+ function npmToYarn(_m, command) {
288
+ var args = parse((command || "").trim());
289
+ var index = args.findIndex(function(a) {
290
+ return a === "--";
291
+ });
292
+ if (index >= 0) args.splice(index, 1);
293
+ if (unchangedCLICommands.includes(args[0])) return "yarn " + args.filter(Boolean).join(" ");
294
+ else if (args[0] in npmToYarnTable) {
295
+ var converter = npmToYarnTable[args[0]];
296
+ if (typeof converter === "function") args = converter(args);
297
+ else args[0] = converter;
298
+ return "yarn " + args.filter(Boolean).join(" ");
299
+ } else return "npm " + command + "\n# couldn't auto-convert command";
300
+ }
301
+ function convertPnpmInstallArgs(args) {
302
+ return args.map(function(item) {
303
+ switch (item) {
304
+ case "--save":
305
+ case "-S": return "";
306
+ case "--no-package-lock": return "--frozen-lockfile";
307
+ default: return item;
308
+ }
309
+ });
310
+ }
311
+ function convertFilterArg(args) {
312
+ if (args.length > 1) {
313
+ var filter = args.filter(function(item, index) {
314
+ return index !== 0 && !item.startsWith("-");
315
+ });
316
+ if (filter.length > 0) {
317
+ args = args.filter(function(item, index) {
318
+ return index === 0 || item.startsWith("-");
319
+ });
320
+ args.push("--filter");
321
+ args.push(filter.join(" "));
322
+ }
323
+ }
324
+ return args;
325
+ }
326
+ var npmToPnpmTable = {
327
+ install: function(args) {
328
+ if (args.length > 1 && args.filter(function(item) {
329
+ return !item.startsWith("-");
330
+ }).length > 1) args[0] = "add";
331
+ return convertPnpmInstallArgs(args);
332
+ },
333
+ i: function(args) {
334
+ return npmToPnpmTable.install(args);
335
+ },
336
+ uninstall: function(args) {
337
+ args[0] = "remove";
338
+ return convertPnpmInstallArgs(args);
339
+ },
340
+ un: function(args) {
341
+ return npmToPnpmTable.uninstall(args);
342
+ },
343
+ remove: function(args) {
344
+ return npmToPnpmTable.uninstall(args);
345
+ },
346
+ r: function(args) {
347
+ return npmToPnpmTable.uninstall(args);
348
+ },
349
+ rm: function(args) {
350
+ return npmToPnpmTable.uninstall(args);
351
+ },
352
+ rb: function(args) {
353
+ return npmToPnpmTable.rebuild(args);
354
+ },
355
+ rebuild: function(args) {
356
+ args[0] = "rebuild";
357
+ return convertFilterArg(args);
358
+ },
359
+ run: "run",
360
+ exec: "exec",
361
+ ls: function(args) {
362
+ return npmToPnpmTable.list(args);
363
+ },
364
+ list: function(args) {
365
+ return args.map(function(item) {
366
+ if (item.startsWith("--depth=")) return "--depth ".concat(item.split("=")[1]);
367
+ switch (item) {
368
+ case "--production": return "--prod";
369
+ case "--development": return "--dev";
370
+ default: return item;
371
+ }
372
+ });
373
+ },
374
+ init: function(args) {
375
+ if (args[1] && !args[1].startsWith("-")) {
376
+ args[0] = "create";
377
+ var m = args[1].match(/(.+)@latest/);
378
+ if (m) args[1] = m[1];
379
+ }
380
+ return args.filter(function(item) {
381
+ return item !== "--scope";
382
+ });
383
+ },
384
+ create: function(args) {
385
+ return npmToPnpmTable.init(args);
386
+ },
387
+ ln: "link",
388
+ t: "test",
389
+ test: "test",
390
+ tst: "test",
391
+ start: "start",
392
+ link: "link",
393
+ unlink: function(args) {
394
+ return convertFilterArg(args);
395
+ },
396
+ outdated: "outdated",
397
+ pack: function(args) {
398
+ return args.map(function(item) {
399
+ if (item.startsWith("--pack-destination")) return item.replace(/^--pack-destination[\s=]/, "--pack-destination ");
400
+ return item;
401
+ });
402
+ }
403
+ };
404
+ function npmToPnpm(_m, command) {
405
+ var args = parse((command || "").trim());
406
+ var index = args.findIndex(function(a) {
407
+ return a === "--";
408
+ });
409
+ if (index >= 0) args.splice(index, 1);
410
+ if (args[0] in npmToPnpmTable) {
411
+ var converter = npmToPnpmTable[args[0]];
412
+ if (typeof converter === "function") args = converter(args);
413
+ else args[0] = converter;
414
+ return "pnpm " + args.filter(Boolean).join(" ");
415
+ } else return "npm " + command + "\n# couldn't auto-convert command";
416
+ }
417
+ function convertInstallArgs(args) {
418
+ return args.map(function(item) {
419
+ switch (item) {
420
+ case "--save-dev":
421
+ case "--development":
422
+ case "-D": return "--dev";
423
+ case "--save-prod":
424
+ case "-P": return "--production";
425
+ case "--no-package-lock": return "--no-save";
426
+ case "--save-optional":
427
+ case "-O": return "--optional";
428
+ case "--save-exact":
429
+ case "-E": return "--exact";
430
+ case "--save":
431
+ case "-S": return "";
432
+ case "--global":
433
+ case "-g": return "--global";
434
+ default: return item;
435
+ }
436
+ });
437
+ }
438
+ function npmToBun(_m, command) {
439
+ var args = parse((command || "").trim());
440
+ var index = args.findIndex(function(a) {
441
+ return a === "--";
442
+ });
443
+ if (index >= 0) args.splice(index, 1);
444
+ var cmd = "bun";
445
+ switch (args[0]) {
446
+ case "install":
447
+ case "i":
448
+ if (args.length === 1) args = ["install"];
449
+ else args[0] = "add";
450
+ args = convertInstallArgs(args);
451
+ break;
452
+ case "uninstall":
453
+ case "un":
454
+ case "remove":
455
+ case "r":
456
+ case "rm":
457
+ args[0] = "remove";
458
+ args = convertInstallArgs(args);
459
+ break;
460
+ case "cache":
461
+ if (args[1] === "clean") args = [
462
+ "pm",
463
+ "cache",
464
+ "rm"
465
+ ].concat(args.slice(2));
466
+ else cmd = "npm";
467
+ break;
468
+ case "rebuild":
469
+ case "rb":
470
+ args[0] = "add";
471
+ args.push("--force");
472
+ break;
473
+ case "run": break;
474
+ case "list":
475
+ case "ls":
476
+ args = convertInstallArgs(args);
477
+ args[0] = "ls";
478
+ args.unshift("pm");
479
+ break;
480
+ case "init":
481
+ case "create":
482
+ if (args[1]) if (args[1].startsWith("@")) {
483
+ cmd = "bunx";
484
+ args[1] = args[1].replace("/", "/create-");
485
+ args = args.slice(1);
486
+ } else if (!args[1].startsWith("-")) {
487
+ cmd = "bunx";
488
+ args[1] = "create-".concat(args[1].replace("@latest", ""));
489
+ args = args.slice(1);
490
+ } else args[0] = "init";
491
+ break;
492
+ case "link":
493
+ case "ln":
494
+ args = convertInstallArgs(args);
495
+ args[0] = "link";
496
+ break;
497
+ case "stop":
498
+ case "start":
499
+ case "unlink": break;
500
+ case "test":
501
+ case "t":
502
+ case "tst":
503
+ args[0] = "test";
504
+ args.unshift("run");
505
+ break;
506
+ case "exec":
507
+ cmd = "bunx";
508
+ args.splice(0, 1);
509
+ break;
510
+ default:
511
+ cmd = "npm";
512
+ break;
513
+ }
514
+ var filtered = args.filter(Boolean).filter(function(arg) {
515
+ return arg !== "--";
516
+ });
517
+ return "".concat(cmd, " ").concat(filtered.join(" ")).concat(cmd === "npm" ? "\n# couldn't auto-convert command" : "").replace("=", " ");
518
+ }
519
+ /**
520
+ * Converts between npm and yarn command
521
+ */
522
+ function convert(str, to) {
523
+ if (str.includes("npx") || str.includes("yarn dlx") || str.includes("pnpm dlx") || str.includes("bun x")) {
524
+ var executor = str.includes("npx") ? "npx" : str.includes("yarn dlx") ? "yarn dlx" : str.includes("pnpm dlx") ? "pnpm dlx" : "bun x";
525
+ return str.replace(executor, executorCommands[to]);
526
+ } else if (to === "npm") return str.replace(/yarn(?: +([^&\n\r]*))?/gm, yarnToNPM);
527
+ else if (to === "pnpm") return str.replace(/npm(?: +([^&\n\r]*))?/gm, npmToPnpm);
528
+ else if (to === "bun") return str.replace(/npm(?: +([^&\n\r]*))?/gm, npmToBun);
529
+ else return str.replace(/npm(?: +([^&\n\r]*))?/gm, npmToYarn);
530
+ }
531
+ //#endregion
532
+ //#region src/mdx-plugins/remark-npm.ts
533
+ const aliases = ["npm", "package-install"];
534
+ /**
535
+ * It generates multiple tabs of codeblocks for different package managers from a npm command codeblock.
536
+ */
537
+ function remarkNpm({ persist = false, packageManagers = [
538
+ {
539
+ command: (cmd) => convert(cmd, "npm"),
540
+ name: "npm"
541
+ },
542
+ {
543
+ command: (cmd) => convert(cmd, "pnpm"),
544
+ name: "pnpm"
545
+ },
546
+ {
547
+ command: (cmd) => convert(cmd, "yarn"),
548
+ name: "yarn"
549
+ },
550
+ {
551
+ command: (cmd) => convert(cmd, "bun"),
552
+ name: "bun"
553
+ }
554
+ ] } = {}) {
555
+ return (tree) => {
556
+ visit(tree, "code", (node) => {
557
+ if (!node.lang || !aliases.includes(node.lang)) return;
558
+ let code = node.value;
559
+ if (node.lang === "package-install" && !code.startsWith("npm") && !code.startsWith("npx")) code = `npm install ${code}`;
560
+ const options = {
561
+ persist,
562
+ tabs: [],
563
+ triggers: []
564
+ };
565
+ for (const manager of packageManagers) {
566
+ const value = manager.value ?? manager.name;
567
+ const command = manager.command(code);
568
+ if (!command || command.length === 0) continue;
569
+ options.defaultValue ??= value;
570
+ options.triggers.push({
571
+ value,
572
+ children: [{
573
+ type: "text",
574
+ value: manager.name
575
+ }]
576
+ });
577
+ options.tabs.push({
578
+ value,
579
+ children: [{
580
+ type: "code",
581
+ lang: "bash",
582
+ meta: node.meta,
583
+ value: command
584
+ }]
585
+ });
586
+ }
587
+ Object.assign(node, generateCodeBlockTabs(options));
588
+ return "skip";
589
+ });
590
+ };
591
+ }
592
+ //#endregion
593
+ export { remarkNpm as t };
@@ -1,4 +1,4 @@
1
- import { n as StringifyOptions$1, t as Stringifier$1 } from "./stringifier-l_KdmdPb.js";
1
+ import { n as StringifyOptions$1, t as Stringifier$1 } from "./stringifier-D6T4zhkn.js";
2
2
  import { MdxJsxAttribute, MdxJsxExpressionAttribute, MdxJsxFlowElement, MdxJsxTextElement } from "mdast-util-mdx";
3
3
  import { PluggableList, Processor, Transformer } from "unified";
4
4
  import { Nodes, Root } from "mdast";
@@ -1,2 +1,2 @@
1
- import { a as sync, i as setIndexSettings, n as DocumentRecord, o as updateDocuments, r as SyncOptions, t as BaseIndex } from "../algolia-CV1p_BGs.js";
1
+ import { a as sync, i as setIndexSettings, n as DocumentRecord, o as updateDocuments, r as SyncOptions, t as BaseIndex } from "../algolia-DphIPKrc.js";
2
2
  export { BaseIndex, DocumentRecord, SyncOptions, setIndexSettings, sync, updateDocuments };
@@ -1,2 +1,2 @@
1
- import { m as algoliaClient, p as AlgoliaOptions } from "../../client-DwXJpdzf.js";
1
+ import { m as algoliaClient, p as AlgoliaOptions } from "../../client-D3PZ2z2N.js";
2
2
  export { AlgoliaOptions, algoliaClient };
@@ -1,2 +1,2 @@
1
- import { _ as FetchOptions, v as fetchClient } from "../../client-DwXJpdzf.js";
1
+ import { _ as FetchOptions, v as fetchClient } from "../../client-D3PZ2z2N.js";
2
2
  export { FetchOptions, fetchClient };
@@ -1,2 +1,2 @@
1
- import { a as flexsearchStaticClient, i as FlexsearchStaticOptions } from "../../client-DwXJpdzf.js";
1
+ import { a as flexsearchStaticClient, i as FlexsearchStaticOptions } from "../../client-D3PZ2z2N.js";
2
2
  export { FlexsearchStaticOptions, flexsearchStaticClient };
@@ -1,4 +1,4 @@
1
- import { n as search, t as createDocument } from "../../utils-D_KDPEof.js";
1
+ import { n as search, t as createDocument } from "../../utils-CEyx3kFf.js";
2
2
  //#region src/search/client/flexsearch-static.ts
3
3
  function initDocument(data) {
4
4
  const document = createDocument();
@@ -1,2 +1,2 @@
1
- import { c as mixedbreadClient, o as MixedbreadOptions, s as SearchMetadata } from "../../client-DwXJpdzf.js";
1
+ import { c as mixedbreadClient, o as MixedbreadOptions, s as SearchMetadata } from "../../client-D3PZ2z2N.js";
2
2
  export { MixedbreadOptions, SearchMetadata, mixedbreadClient };
@@ -1,5 +1,5 @@
1
1
  import { r as __toESM } from "../../chunk-BoAXSpZd.js";
2
- import { t as require_remove_markdown } from "../../remove-markdown-Cte6pwYx.js";
2
+ import { t as require_remove_markdown } from "../../remove-markdown-CQ--9YPQ.js";
3
3
  import Slugger from "github-slugger";
4
4
  //#region src/search/client/mixedbread.ts
5
5
  var import_remove_markdown = /* @__PURE__ */ __toESM(require_remove_markdown(), 1);
@@ -1,2 +1,2 @@
1
- import { l as OramaCloudLegacyOptions, u as oramaCloudLegacyClient } from "../../client-DwXJpdzf.js";
1
+ import { l as OramaCloudLegacyOptions, u as oramaCloudLegacyClient } from "../../client-D3PZ2z2N.js";
2
2
  export { OramaCloudLegacyOptions, oramaCloudLegacyClient };
@@ -1,5 +1,5 @@
1
1
  import { createContentHighlighter } from "../index.js";
2
- import { t as removeUndefined } from "../../remove-undefined-PK1FA5gc.js";
2
+ import { t as removeUndefined } from "../../remove-undefined-DLE4y6II.js";
3
3
  //#region src/search/client/orama-cloud-legacy.ts
4
4
  function oramaCloudLegacyClient(options) {
5
5
  const { index = "default", client, params: extraParams = {}, tag } = options;