@antdv-next/x 1.1.3-beta.2 → 1.1.3-beta.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.
Files changed (135) hide show
  1. package/dist/code-highlighter/index.d.ts +2 -0
  2. package/dist/code-highlighter/index.js +2 -1
  3. package/dist/code-highlighter/shiki-runtime.d.ts +3 -0
  4. package/dist/code-highlighter/shiki-runtime.js +14 -0
  5. package/dist/code-highlighter/shiki.d.ts +27 -0
  6. package/dist/code-highlighter/shiki.js +79 -43
  7. package/dist/index.d.ts +2 -1
  8. package/dist/index.js +2 -1
  9. package/dist/index.umd.js +101 -39
  10. package/dist/package.js +1 -1
  11. package/dist/x-provider/hooks/use-x-provider-context.d.ts +2 -2
  12. package/es/{Serializer-D1JYN1kI.js → Serializer-y_SfSPKv.js} +4 -4
  13. package/es/{_basePickBy-DFHEGO2M.js → _basePickBy-Cy7KVmkk.js} +23 -23
  14. package/es/{_baseUniq-BlS7rXTs.js → _baseUniq-Ch3HuHeT.js} +83 -83
  15. package/es/antdv-next-x.esm.js +7919 -14891
  16. package/es/{arc-BuXEd18J.js → arc-caEkbRYF.js} +3 -3
  17. package/es/architecture-PBZL5I3N-DHfBr78A.js +3 -0
  18. package/es/{architectureDiagram-2XIMDMQ5-CmfsCwJk.js → architectureDiagram-2XIMDMQ5-B4BHdsAL.js} +9 -9
  19. package/es/{blockDiagram-WCTKOSBZ-lJAan65A.js → blockDiagram-WCTKOSBZ-nXanZ0sc.js} +12 -12
  20. package/es/{c4Diagram-IC4MRINW-B1c2x_1Q.js → c4Diagram-IC4MRINW-C-gVp6th.js} +6 -6
  21. package/es/channel-DoEe9DF9.js +5 -0
  22. package/es/{chunk-4BX2VUAB-J2N81Fpp.js → chunk-4BX2VUAB-fLFD6XW0.js} +2 -2
  23. package/es/{chunk-55IACEB6-DGtfGRgi.js → chunk-55IACEB6-OtyKJzCH.js} +2 -2
  24. package/es/{chunk-7E7YKBS2-CL2d4WAf.js → chunk-7E7YKBS2-C1dd36rm.js} +2 -2
  25. package/es/{chunk-7R4GIKGN-QT6IorJ_.js → chunk-7R4GIKGN-DuTRhdsf.js} +3 -3
  26. package/es/{chunk-C72U2L5F-OHTVpS-m.js → chunk-C72U2L5F-ClmZGhFC.js} +2 -2
  27. package/es/{chunk-EGIJ26TM-DyMPGYrB.js → chunk-EGIJ26TM-Bar_u1MN.js} +2 -2
  28. package/es/{chunk-FMBD7UC4-DCcRjunY.js → chunk-FMBD7UC4-C_uJ_JJA.js} +2 -2
  29. package/es/{chunk-GEFDOKGD-BWpC-zoH.js → chunk-GEFDOKGD-P7WhyrTU.js} +30 -30
  30. package/es/{chunk-GLR3WWYH-DiXcKb5Y.js → chunk-GLR3WWYH-BvazRgdo.js} +8 -8
  31. package/es/{chunk-HHEYEP7N-Cxc7E4dX.js → chunk-HHEYEP7N-rv5s5WD4.js} +3 -3
  32. package/es/{chunk-JSJVCQXG-D8_heHOp.js → chunk-JSJVCQXG-89HUGe9V.js} +4 -4
  33. package/es/{chunk-KX2RTZJC-D5cc4rj6.js → chunk-KX2RTZJC-pMHnNRQg.js} +3 -3
  34. package/es/{chunk-KYZI473N-BHJ3T5Zv.js → chunk-KYZI473N-DJmSs1gK.js} +8 -8
  35. package/es/{chunk-L3YUKLVL-7oGaUOdc.js → chunk-L3YUKLVL-Ck54qytQ.js} +2 -2
  36. package/es/{chunk-MX3YWQON-BxE-Aq9c.js → chunk-MX3YWQON-MkpK3uBD.js} +2 -2
  37. package/es/{chunk-NQ4KR5QH-EYQBXkqP.js → chunk-NQ4KR5QH-DGshodQv.js} +7 -7
  38. package/es/{chunk-O4XLMI2P-qjOoGpnx.js → chunk-O4XLMI2P-e-ZzDQwg.js} +11 -11
  39. package/es/{chunk-OZEHJAEY-D82nx27s.js → chunk-OZEHJAEY-DULNd43V.js} +2 -2
  40. package/es/{chunk-PQ6SQG4A-D3jtNCWN.js → chunk-PQ6SQG4A-CQ9Csv7s.js} +3 -3
  41. package/es/{chunk-PU5JKC2W-DdP8BS-S.js → chunk-PU5JKC2W-DkEFvrjH.js} +16 -16
  42. package/es/{chunk-QZHKN3VN-CW3cFN-h.js → chunk-QZHKN3VN-qww1plfw.js} +2 -2
  43. package/es/{chunk-R5LLSJPH-CreI2kO9.js → chunk-R5LLSJPH-BERXSDGJ.js} +2 -2
  44. package/es/{chunk-WL4C6EOR-BDbxJyGk.js → chunk-WL4C6EOR-C-d8WPS7.js} +9 -9
  45. package/es/{chunk-XIRO2GV7-S5KkbVnN.js → chunk-XIRO2GV7-CFHofxVB.js} +2 -2
  46. package/es/{chunk-XPW4576I-B0KVSHwE.js → chunk-XPW4576I-DgvoNZkW.js} +2 -2
  47. package/es/{chunk-XZSTWKYB-CucN1XvM.js → chunk-XZSTWKYB-k8_EXrSa.js} +93 -93
  48. package/es/{chunk-YBOYWFTD-CvaddD9G.js → chunk-YBOYWFTD-BUW4AzEX.js} +4 -4
  49. package/es/classDiagram-VBA2DB6C-DWTAs0Zm.js +29 -0
  50. package/es/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +29 -0
  51. package/es/clone-BXDbKCDu.js +8 -0
  52. package/es/{cose-bilkent-S5V4N54A-B5OQuIhl.js → cose-bilkent-S5V4N54A-CnrS2OC1.js} +3 -3
  53. package/es/css-Bi5OTYo2.js +2 -0
  54. package/es/{cytoscape.esm-i2CZcWd-.js → cytoscape.esm-BY3wHcbp.js} +1 -1
  55. package/es/{dagre-5aGJFKmT.js → dagre-BJOzGlhW.js} +57 -57
  56. package/es/{dagre-KLK3FWXG-BI5QQMXo.js → dagre-KLK3FWXG-CFC0naVr.js} +16 -16
  57. package/es/{defaultLocale-bckJcYh1.js → defaultLocale-BaPFSbai.js} +12 -12
  58. package/es/{diagram-E7M64L7V-Dz62Vz_a.js → diagram-E7M64L7V-DxuJj8ZG.js} +32 -32
  59. package/es/{diagram-IFDJBPK2-9fjvFkSc.js → diagram-IFDJBPK2-BOpPZ6pu.js} +7 -7
  60. package/es/{diagram-P4PSJMXO-BlX6jFjZ.js → diagram-P4PSJMXO--ChDmcya.js} +7 -7
  61. package/es/{dist-BX_roQzC.js → dist-DltyvPj3.js} +1 -1
  62. package/es/{erDiagram-INFDFZHY-BcRXu8Cp.js → erDiagram-INFDFZHY-BA3m-v87.js} +14 -14
  63. package/es/{flowDiagram-PKNHOUZH-UeyfgU8z.js → flowDiagram-PKNHOUZH-BCq6k3kr.js} +17 -17
  64. package/es/{ganttDiagram-A5KZAMGK-txCzqgQ5.js → ganttDiagram-A5KZAMGK-DdMePS21.js} +28 -28
  65. package/es/gitGraph-HDMCJU4V-DbzpICZW.js +3 -0
  66. package/es/{gitGraphDiagram-K3NZZRJ6-DghWYaFU.js → gitGraphDiagram-K3NZZRJ6-CLbRwChG.js} +7 -7
  67. package/es/{graphlib-dRkI1OCL.js → graphlib-C7ysKz4u.js} +4 -4
  68. package/es/{html-B6UxjOv0.js → html-BNNJXCkq.js} +4 -4
  69. package/es/info-3K5VOQVL-CpUiQuel.js +3 -0
  70. package/es/{infoDiagram-LFFYTUFH-CA-vlAvP.js → infoDiagram-LFFYTUFH-DQAZ-vFk.js} +5 -5
  71. package/es/{init-B75p2clj.js → init-PAs0hR-b.js} +1 -1
  72. package/es/{isArrayLikeObject-jl2bjkAJ.js → isArrayLikeObject-y3HlYDaX.js} +80 -80
  73. package/es/{isEmpty-CmA-HYrg.js → isEmpty-2JxdWtc-.js} +3 -3
  74. package/es/{ishikawaDiagram-PHBUUO56-DjdpS9Lb.js → ishikawaDiagram-PHBUUO56-B0r2IgGz.js} +6 -6
  75. package/es/javascript-CjdDmufJ.js +2 -0
  76. package/es/{journeyDiagram-4ABVD52K-CIJfC1fp.js → journeyDiagram-4ABVD52K-DnMUhOvg.js} +6 -6
  77. package/es/{json-DZ_9-j3Q.js → json-DqMXJlo0.js} +1 -1
  78. package/es/{kanban-definition-K7BYSVSG-CC2vwGck.js → kanban-definition-K7BYSVSG-Da5Y-nJy.js} +11 -11
  79. package/es/{katex-DCMiIo1z.js → katex-b-xdokOf.js} +1 -1
  80. package/es/{line-Cu9NTacD.js → line-h2iCTGsE.js} +4 -4
  81. package/es/{linear-C0rAYYmp.js → linear-Bv7XrZCH.js} +23 -23
  82. package/es/{math-CoDOuve-.js → math-DPzKeDKn.js} +1 -1
  83. package/es/{mermaid-parser.core-7Wn2L29P.js → mermaid-parser.core-kTgpNO7M.js} +16 -16
  84. package/es/{mermaid.core-Bvy_Q6Hu.js → mermaid.core-Db1VE3-f.js} +44 -44
  85. package/es/{mindmap-definition-YRQLILUH-BzTYDYmK.js → mindmap-definition-YRQLILUH-CYeqnCde.js} +16 -16
  86. package/es/{ordinal-F3U6aXtP.js → ordinal-D8PKtxfM.js} +3 -3
  87. package/es/packet-RMMSAZCW-UTFQ0FQx.js +3 -0
  88. package/es/{path-Dm3C8WEs.js → path-DZ-6AyWK.js} +3 -3
  89. package/es/pie-UPGHQEXC-CarAcBSi.js +3 -0
  90. package/es/{pieDiagram-SKSYHLDU-COvqE_C6.js → pieDiagram-SKSYHLDU-DAsfTGvY.js} +14 -14
  91. package/es/{quadrantDiagram-337W2JSQ-Dgv8ccjt.js → quadrantDiagram-337W2JSQ-CZLbmQS4.js} +4 -4
  92. package/es/radar-KQ55EAFF-NXK5PC9R.js +3 -0
  93. package/es/{requirementDiagram-Z7DCOOCP-B2NyhxO-.js → requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js} +13 -13
  94. package/es/{rough.esm-BhGP2Udb.js → rough.esm-C_hJ3ICT.js} +1 -1
  95. package/es/{sankeyDiagram-WA2Y5GQK-BfnH_gpl.js → sankeyDiagram-WA2Y5GQK-DBe5YfW4.js} +18 -18
  96. package/es/{sequenceDiagram-2WXFIKYE-DXssVQOF.js → sequenceDiagram-2WXFIKYE-C_KUoojT.js} +8 -8
  97. package/es/shiki-runtime-B7sqK6Yk.js +6985 -0
  98. package/es/{src-CUQ6oOYk.js → src-BukXhifV.js} +86 -86
  99. package/es/{stateDiagram-RAJIS63D-DvDLfupV.js → stateDiagram-RAJIS63D-boG6DyfW.js} +17 -17
  100. package/es/stateDiagram-v2-FVOUBMTO-DHCajhrN.js +27 -0
  101. package/es/{timeline-definition-YZTLITO2-ErcRjbZf.js → timeline-definition-YZTLITO2-pFt6rZ6S.js} +4 -4
  102. package/es/treemap-KZPCXAKY-Cj9QakFB.js +3 -0
  103. package/es/{typescript-B6MWEsBH.js → typescript-Ck7Pr_E3.js} +1 -1
  104. package/es/{vennDiagram-LZ73GAT5-CDTZUtc8.js → vennDiagram-LZ73GAT5-VaCO6k4H.js} +7 -7
  105. package/es/{xychartDiagram-JWTSCODW-Y21jBOTg.js → xychartDiagram-JWTSCODW-xS5ybemA.js} +12 -12
  106. package/package.json +1 -1
  107. package/es/architecture-PBZL5I3N-D7tS55xM.js +0 -3
  108. package/es/bash-CXEwhtGQ.js +0 -3
  109. package/es/channel-DFgF_2F7.js +0 -5
  110. package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +0 -29
  111. package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +0 -29
  112. package/es/clone-r3YukIBB.js +0 -8
  113. package/es/css-HrHT_VUz.js +0 -2
  114. package/es/diff-BSu5dsa2.js +0 -3
  115. package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +0 -3
  116. package/es/html-Hb1oe8XT.js +0 -2
  117. package/es/info-3K5VOQVL-COqdvM99.js +0 -3
  118. package/es/javascript-NV_FQBab.js +0 -2
  119. package/es/json-C8Y9C4Ne.js +0 -2
  120. package/es/jsx-CxlNNvOI.js +0 -3
  121. package/es/markdown-BKwT7HWz.js +0 -3
  122. package/es/mermaid-C1RUu_Iw.js +0 -3
  123. package/es/packet-RMMSAZCW-2PTjWKLd.js +0 -3
  124. package/es/pie-UPGHQEXC-Du8-k-EA.js +0 -3
  125. package/es/radar-KQ55EAFF-jJOhyjxC.js +0 -3
  126. package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +0 -27
  127. package/es/treemap-KZPCXAKY-CvZAIYVa.js +0 -3
  128. package/es/tsx-DIYEV_g7.js +0 -3
  129. package/es/typescript-CR48gG1F.js +0 -2
  130. package/es/vue-2aJw7p5p.js +0 -21
  131. package/es/vue-html-DEjI8X9t.js +0 -5
  132. package/es/yaml-Y0CqUPTQ.js +0 -3
  133. /package/es/{css-DyS1hwc1.js → css-v5r4VtJ6.js} +0 -0
  134. /package/es/{javascript-BXHK_bZ2.js → javascript-o_jd8Ivw.js} +0 -0
  135. /package/es/{python-BQM8giqx.js → python-CQPNJfOt.js} +0 -0
@@ -1,3 +1,5 @@
1
1
  import { default as CodeHighlighter } from './CodeHighlighter';
2
+ export { setupCodeHighlighter } from './shiki';
3
+ export type { CodeHighlighterLanguageLoader, SetupCodeHighlighterOptions, } from './shiki';
2
4
  export type { CodeHighlighterHeaderSlotScope, CodeHighlighterProps, CodeHighlighterRef, CodeHighlighterSemanticType, CodeHighlighterSlots, } from './interface';
3
5
  export default CodeHighlighter;
@@ -1,5 +1,6 @@
1
+ import { setupCodeHighlighter } from "./shiki.js";
1
2
  import { XCodeHighlighter } from "./CodeHighlighter.js";
2
3
  //#region components/code-highlighter/index.tsx
3
4
  var code_highlighter_default = XCodeHighlighter;
4
5
  //#endregion
5
- export { code_highlighter_default as default };
6
+ export { code_highlighter_default as default, setupCodeHighlighter };
@@ -0,0 +1,3 @@
1
+ import { createHighlighterCore } from 'shiki/core';
2
+ export type CodeHighlighterInstance = Awaited<ReturnType<typeof createHighlighterCore>>;
3
+ export declare function createHighlighter(): Promise<import('shiki').HighlighterCore>;
@@ -0,0 +1,14 @@
1
+ import { createHighlighterCore } from "shiki/core";
2
+ import darkTheme from "shiki/dist/themes/vitesse-dark.mjs";
3
+ import lightTheme from "shiki/dist/themes/vitesse-light.mjs";
4
+ import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
5
+ //#region components/code-highlighter/shiki-runtime.ts
6
+ function createHighlighter() {
7
+ return createHighlighterCore({
8
+ themes: [lightTheme, darkTheme],
9
+ langs: [],
10
+ engine: createJavaScriptRegexEngine()
11
+ });
12
+ }
13
+ //#endregion
14
+ export { createHighlighter };
@@ -1,3 +1,30 @@
1
+ import { LanguageInput } from 'shiki';
2
+ export type CodeHighlighterLanguageLoader = (lang: string) => Promise<LanguageInput | null>;
3
+ export interface SetupCodeHighlighterOptions {
4
+ loadLanguage?: CodeHighlighterLanguageLoader;
5
+ }
6
+ /**
7
+ * 注入自定义语言加载器。返回 `null` 时回退到默认内置白名单。
8
+ * 建议按需 `import` 语言模块,避免引入全量语言包。
9
+ *
10
+ * @example 按需加载额外语言
11
+ * ```ts
12
+ * import { setupCodeHighlighter } from "@antdv-next/x";
13
+ * import type { LanguageInput } from "shiki";
14
+ *
15
+ * setupCodeHighlighter({
16
+ * loadLanguage: async (lang) => {
17
+ * const loaders: Record<string, () => Promise<{ default: LanguageInput }>> = {
18
+ * go: () => import("shiki/dist/langs/go.mjs"),
19
+ * rust: () => import("shiki/dist/langs/rust.mjs"),
20
+ * };
21
+ * const loader = loaders[lang];
22
+ * return loader ? (await loader()).default : null;
23
+ * },
24
+ * });
25
+ * ```
26
+ */
27
+ export declare function setupCodeHighlighter(options?: SetupCodeHighlighterOptions): void;
1
28
  export declare function codeToHtml(code: string, options?: {
2
29
  lang?: string;
3
30
  theme?: string;
@@ -1,65 +1,101 @@
1
- import { createHighlighterCore } from "shiki/core";
2
- import darkTheme from "shiki/dist/themes/vitesse-dark.mjs";
3
- import lightTheme from "shiki/dist/themes/vitesse-light.mjs";
4
- import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
5
1
  //#region components/code-highlighter/shiki.ts
6
- var SUPPORTED_LANG_ALIASES = {
7
- ts: "typescript",
8
- js: "javascript",
9
- py: "python",
10
- md: "markdown",
11
- yml: "yaml",
12
- shell: "bash",
13
- zsh: "bash",
14
- sh: "bash",
15
- vue: "vue"
16
- };
17
- var LANG_LOADERS = {
18
- javascript: () => import("shiki/dist/langs/javascript.mjs"),
2
+ var PLAIN_TEXT_LANGUAGES = new Set([
3
+ "text",
4
+ "plaintext",
5
+ "txt",
6
+ "plain"
7
+ ]);
8
+ /**
9
+ * 内置热门语言白名单。
10
+ * 使用静态 import 路径,打包时仅生成这几个语言对应的 chunk。
11
+ */
12
+ var BUILTIN_LANGUAGES = {
19
13
  typescript: () => import("shiki/dist/langs/typescript.mjs"),
20
- jsx: () => import("shiki/dist/langs/jsx.mjs"),
21
- tsx: () => import("shiki/dist/langs/tsx.mjs"),
14
+ javascript: () => import("shiki/dist/langs/javascript.mjs"),
15
+ python: () => import("shiki/dist/langs/python.mjs"),
22
16
  json: () => import("shiki/dist/langs/json.mjs"),
23
- bash: () => import("shiki/dist/langs/bash.mjs"),
24
- markdown: () => import("shiki/dist/langs/markdown.mjs"),
25
17
  html: () => import("shiki/dist/langs/html.mjs"),
26
- css: () => import("shiki/dist/langs/css.mjs"),
27
- vue: () => import("shiki/dist/langs/vue.mjs"),
28
- "vue-html": () => import("shiki/dist/langs/vue-html.mjs"),
29
- python: () => import("shiki/dist/langs/python.mjs"),
30
- mermaid: () => import("shiki/dist/langs/mermaid.mjs"),
31
- yaml: () => import("shiki/dist/langs/yaml.mjs"),
32
- diff: () => import("shiki/dist/langs/diff.mjs")
18
+ css: () => import("shiki/dist/langs/css.mjs")
33
19
  };
20
+ /** 常用别名 -> 基础语言 */
21
+ var BUILTIN_ALIASES = {
22
+ ts: "typescript",
23
+ js: "javascript",
24
+ py: "python"
25
+ };
26
+ var defaultLoader = async (lang) => {
27
+ const loader = BUILTIN_LANGUAGES[BUILTIN_ALIASES[lang] ?? lang];
28
+ return loader ? (await loader()).default : null;
29
+ };
30
+ var customLoader = null;
31
+ /**
32
+ * 注入自定义语言加载器。返回 `null` 时回退到默认内置白名单。
33
+ * 建议按需 `import` 语言模块,避免引入全量语言包。
34
+ *
35
+ * @example 按需加载额外语言
36
+ * ```ts
37
+ * import { setupCodeHighlighter } from "@antdv-next/x";
38
+ * import type { LanguageInput } from "shiki";
39
+ *
40
+ * setupCodeHighlighter({
41
+ * loadLanguage: async (lang) => {
42
+ * const loaders: Record<string, () => Promise<{ default: LanguageInput }>> = {
43
+ * go: () => import("shiki/dist/langs/go.mjs"),
44
+ * rust: () => import("shiki/dist/langs/rust.mjs"),
45
+ * };
46
+ * const loader = loaders[lang];
47
+ * return loader ? (await loader()).default : null;
48
+ * },
49
+ * });
50
+ * ```
51
+ */
52
+ function setupCodeHighlighter(options = {}) {
53
+ customLoader = options.loadLanguage ?? null;
54
+ failedLangs.clear();
55
+ }
34
56
  var highlighter = null;
35
57
  var highlighterPromise = null;
36
58
  var loadedLangs = /* @__PURE__ */ new Set();
59
+ var failedLangs = /* @__PURE__ */ new Set();
60
+ var languageLoadPromises = /* @__PURE__ */ new Map();
37
61
  function normalizeLanguage(language) {
38
- const input = (language || "text").toLowerCase();
39
- return SUPPORTED_LANG_ALIASES[input] || input;
62
+ return (language || "text").toLowerCase();
40
63
  }
41
64
  function escapeHtml(str) {
42
65
  return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
43
66
  }
44
67
  async function getHighlighter() {
45
68
  if (highlighter) return highlighter;
46
- if (!highlighterPromise) highlighterPromise = createHighlighterCore({
47
- themes: [lightTheme, darkTheme],
48
- langs: [],
49
- engine: createJavaScriptRegexEngine()
50
- });
69
+ if (!highlighterPromise) highlighterPromise = import("./shiki-runtime.js").then(({ createHighlighter }) => createHighlighter());
51
70
  highlighter = await highlighterPromise;
52
71
  return highlighter;
53
72
  }
54
73
  async function loadLang(lang) {
55
- const loader = LANG_LOADERS[lang];
56
- if (!loader) return false;
57
74
  if (loadedLangs.has(lang)) return true;
58
- const instance = await getHighlighter();
59
- const mod = await loader();
60
- await instance.loadLanguage(mod.default);
61
- loadedLangs.add(lang);
62
- return true;
75
+ if (failedLangs.has(lang) || PLAIN_TEXT_LANGUAGES.has(lang)) return false;
76
+ const pendingLoad = languageLoadPromises.get(lang);
77
+ if (pendingLoad) return pendingLoad;
78
+ const loadPromise = (async () => {
79
+ try {
80
+ const registration = await customLoader?.(lang) ?? await defaultLoader(lang);
81
+ if (!registration) {
82
+ failedLangs.add(lang);
83
+ return false;
84
+ }
85
+ await (await getHighlighter()).loadLanguage(registration);
86
+ loadedLangs.add(lang);
87
+ return true;
88
+ } catch (error) {
89
+ const loadError = error instanceof Error ? error : new Error(String(error));
90
+ failedLangs.add(lang);
91
+ console.warn(`[CodeHighlighter] Failed to load language: ${lang}`, loadError);
92
+ return false;
93
+ } finally {
94
+ languageLoadPromises.delete(lang);
95
+ }
96
+ })();
97
+ languageLoadPromises.set(lang, loadPromise);
98
+ return loadPromise;
63
99
  }
64
100
  async function codeToHtml(code, options = {}) {
65
101
  const lang = normalizeLanguage(options.lang);
@@ -70,4 +106,4 @@ async function codeToHtml(code, options = {}) {
70
106
  });
71
107
  }
72
108
  //#endregion
73
- export { codeToHtml };
109
+ export { codeToHtml, setupCodeHighlighter };
package/dist/index.d.ts CHANGED
@@ -34,7 +34,8 @@ export type { ThoughtChainItemProps, ThoughtChainItemStatus, ThoughtChainItemTyp
34
34
  export type { ConversationItemType, ConversationsProps, ConversationsRef, CreationProps, DividerItemType, GroupableProps, } from './conversations';
35
35
  export type { SourcesProps } from './sources';
36
36
  export type { WelcomeProps, WelcomeRef } from './welcome';
37
- export type { CodeHighlighterProps, CodeHighlighterRef, CodeHighlighterSemanticType, } from './code-highlighter';
37
+ export type { CodeHighlighterLanguageLoader, CodeHighlighterProps, CodeHighlighterRef, CodeHighlighterSemanticType, SetupCodeHighlighterOptions, } from './code-highlighter';
38
+ export { setupCodeHighlighter } from './code-highlighter';
38
39
  export type { SenderProps, SenderRef } from './sender';
39
40
  export type { RenderChildrenProps, SuggestionItem, SuggestionProps, } from './suggestion';
40
41
  export type { XProviderProps } from './x-provider';
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ import { XBubbleDivider } from "./bubble/Divider.js";
10
10
  import { XBubbleSystem } from "./bubble/System.js";
11
11
  import { XBubbleList } from "./bubble/BubbleList.js";
12
12
  import BubbleWithSub from "./bubble/index.js";
13
+ import { setupCodeHighlighter } from "./code-highlighter/shiki.js";
13
14
  import code_highlighter_default from "./code-highlighter/index.js";
14
15
  import Creation from "./conversations/Creation.js";
15
16
  import ConversationsWithSub from "./conversations/index.js";
@@ -69,4 +70,4 @@ var components_default = {
69
70
  version
70
71
  };
71
72
  //#endregion
72
- export { ActionsWithSub as Actions, XActionsAudio as ActionsAudio, XActionsCopy as ActionsCopy, XActionsFeedback as ActionsFeedback, XActionsItem as ActionsItem, XAttachments as Attachments, BubbleWithSub as Bubble, XBubbleDivider as BubbleDivider, XBubbleList as BubbleList, XBubbleSystem as BubbleSystem, code_highlighter_default as CodeHighlighter, ConversationsWithSub as Conversations, Creation as ConversationsCreation, FileCardWithSub as FileCard, XFileCardList as FileCardList, folder_default as Folder, mermaid_default as Mermaid, notification_default as Notification, prompts_default as Prompts, Sender, SenderHeader_default as SenderHeader, SenderSwitch_default as SenderSwitch, sources_default as Sources, suggestion_default as Suggestion, think_default as Think, ThoughtChainWithSub as ThoughtChain, XThoughtChainItem as ThoughtChainItem, XWelcome as Welcome, XNotification, XProvider, components_default as default, version };
73
+ export { ActionsWithSub as Actions, XActionsAudio as ActionsAudio, XActionsCopy as ActionsCopy, XActionsFeedback as ActionsFeedback, XActionsItem as ActionsItem, XAttachments as Attachments, BubbleWithSub as Bubble, XBubbleDivider as BubbleDivider, XBubbleList as BubbleList, XBubbleSystem as BubbleSystem, code_highlighter_default as CodeHighlighter, ConversationsWithSub as Conversations, Creation as ConversationsCreation, FileCardWithSub as FileCard, XFileCardList as FileCardList, folder_default as Folder, mermaid_default as Mermaid, notification_default as Notification, prompts_default as Prompts, Sender, SenderHeader_default as SenderHeader, SenderSwitch_default as SenderSwitch, sources_default as Sources, suggestion_default as Suggestion, think_default as Think, ThoughtChainWithSub as ThoughtChain, XThoughtChainItem as ThoughtChainItem, XWelcome as Welcome, XNotification, XProvider, components_default as default, setupCodeHighlighter, version };
package/dist/index.umd.js CHANGED
@@ -29,6 +29,16 @@
29
29
  var __getOwnPropNames = Object.getOwnPropertyNames;
30
30
  var __getProtoOf = Object.getPrototypeOf;
31
31
  var __hasOwnProp = Object.prototype.hasOwnProperty;
32
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
33
+ var __exportAll = (all, no_symbols) => {
34
+ let target = {};
35
+ for (var name in all) __defProp(target, name, {
36
+ get: all[name],
37
+ enumerable: true
38
+ });
39
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
40
+ return target;
41
+ };
32
42
  var __copyProps = (to, from, except, desc) => {
33
43
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
34
44
  key = keys[i];
@@ -49,7 +59,7 @@
49
59
  shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs);
50
60
  shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs);
51
61
  //#region package.json
52
- var version = "1.1.3-beta.2";
62
+ var version = "1.1.3-beta.4";
53
63
  //#endregion
54
64
  //#region components/x-provider/context.ts
55
65
  var XProviderContextKey = Symbol("antdv-next-x-provider-context");
@@ -4754,64 +4764,115 @@
4754
4764
  BubbleWithSub.System = XBubbleSystem;
4755
4765
  BubbleWithSub.Divider = XBubbleDivider;
4756
4766
  //#endregion
4767
+ //#region components/code-highlighter/shiki-runtime.ts
4768
+ var shiki_runtime_exports = /* @__PURE__ */ __exportAll({ createHighlighter: () => createHighlighter });
4769
+ function createHighlighter() {
4770
+ return (0, shiki_core.createHighlighterCore)({
4771
+ themes: [shiki_dist_themes_vitesse_light_mjs.default, shiki_dist_themes_vitesse_dark_mjs.default],
4772
+ langs: [],
4773
+ engine: (0, shiki_engine_javascript.createJavaScriptRegexEngine)()
4774
+ });
4775
+ }
4776
+ var init_shiki_runtime = __esmMin((() => {}));
4777
+ //#endregion
4757
4778
  //#region components/code-highlighter/shiki.ts
4758
- var SUPPORTED_LANG_ALIASES = {
4759
- ts: "typescript",
4760
- js: "javascript",
4761
- py: "python",
4762
- md: "markdown",
4763
- yml: "yaml",
4764
- shell: "bash",
4765
- zsh: "bash",
4766
- sh: "bash",
4767
- vue: "vue"
4768
- };
4769
- var LANG_LOADERS = {
4770
- javascript: () => import("shiki/dist/langs/javascript.mjs"),
4779
+ var PLAIN_TEXT_LANGUAGES = new Set([
4780
+ "text",
4781
+ "plaintext",
4782
+ "txt",
4783
+ "plain"
4784
+ ]);
4785
+ /**
4786
+ * 内置热门语言白名单。
4787
+ * 使用静态 import 路径,打包时仅生成这几个语言对应的 chunk。
4788
+ */
4789
+ var BUILTIN_LANGUAGES = {
4771
4790
  typescript: () => import("shiki/dist/langs/typescript.mjs"),
4772
- jsx: () => import("shiki/dist/langs/jsx.mjs"),
4773
- tsx: () => import("shiki/dist/langs/tsx.mjs"),
4791
+ javascript: () => import("shiki/dist/langs/javascript.mjs"),
4792
+ python: () => import("shiki/dist/langs/python.mjs"),
4774
4793
  json: () => import("shiki/dist/langs/json.mjs"),
4775
- bash: () => import("shiki/dist/langs/bash.mjs"),
4776
- markdown: () => import("shiki/dist/langs/markdown.mjs"),
4777
4794
  html: () => import("shiki/dist/langs/html.mjs"),
4778
- css: () => import("shiki/dist/langs/css.mjs"),
4779
- vue: () => import("shiki/dist/langs/vue.mjs"),
4780
- "vue-html": () => import("shiki/dist/langs/vue-html.mjs"),
4781
- python: () => import("shiki/dist/langs/python.mjs"),
4782
- mermaid: () => import("shiki/dist/langs/mermaid.mjs"),
4783
- yaml: () => import("shiki/dist/langs/yaml.mjs"),
4784
- diff: () => import("shiki/dist/langs/diff.mjs")
4795
+ css: () => import("shiki/dist/langs/css.mjs")
4796
+ };
4797
+ /** 常用别名 -> 基础语言 */
4798
+ var BUILTIN_ALIASES = {
4799
+ ts: "typescript",
4800
+ js: "javascript",
4801
+ py: "python"
4785
4802
  };
4803
+ var defaultLoader = async (lang) => {
4804
+ const loader = BUILTIN_LANGUAGES[BUILTIN_ALIASES[lang] ?? lang];
4805
+ return loader ? (await loader()).default : null;
4806
+ };
4807
+ var customLoader = null;
4808
+ /**
4809
+ * 注入自定义语言加载器。返回 `null` 时回退到默认内置白名单。
4810
+ * 建议按需 `import` 语言模块,避免引入全量语言包。
4811
+ *
4812
+ * @example 按需加载额外语言
4813
+ * ```ts
4814
+ * import { setupCodeHighlighter } from "@antdv-next/x";
4815
+ * import type { LanguageInput } from "shiki";
4816
+ *
4817
+ * setupCodeHighlighter({
4818
+ * loadLanguage: async (lang) => {
4819
+ * const loaders: Record<string, () => Promise<{ default: LanguageInput }>> = {
4820
+ * go: () => import("shiki/dist/langs/go.mjs"),
4821
+ * rust: () => import("shiki/dist/langs/rust.mjs"),
4822
+ * };
4823
+ * const loader = loaders[lang];
4824
+ * return loader ? (await loader()).default : null;
4825
+ * },
4826
+ * });
4827
+ * ```
4828
+ */
4829
+ function setupCodeHighlighter(options = {}) {
4830
+ customLoader = options.loadLanguage ?? null;
4831
+ failedLangs.clear();
4832
+ }
4786
4833
  var highlighter = null;
4787
4834
  var highlighterPromise = null;
4788
4835
  var loadedLangs = /* @__PURE__ */ new Set();
4836
+ var failedLangs = /* @__PURE__ */ new Set();
4837
+ var languageLoadPromises = /* @__PURE__ */ new Map();
4789
4838
  function normalizeLanguage(language) {
4790
- const input = (language || "text").toLowerCase();
4791
- return SUPPORTED_LANG_ALIASES[input] || input;
4839
+ return (language || "text").toLowerCase();
4792
4840
  }
4793
4841
  function escapeHtml(str) {
4794
4842
  return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
4795
4843
  }
4796
4844
  async function getHighlighter() {
4797
4845
  if (highlighter) return highlighter;
4798
- if (!highlighterPromise) highlighterPromise = (0, shiki_core.createHighlighterCore)({
4799
- themes: [shiki_dist_themes_vitesse_light_mjs.default, shiki_dist_themes_vitesse_dark_mjs.default],
4800
- langs: [],
4801
- engine: (0, shiki_engine_javascript.createJavaScriptRegexEngine)()
4802
- });
4846
+ if (!highlighterPromise) highlighterPromise = Promise.resolve().then(() => (init_shiki_runtime(), shiki_runtime_exports)).then(({ createHighlighter }) => createHighlighter());
4803
4847
  highlighter = await highlighterPromise;
4804
4848
  return highlighter;
4805
4849
  }
4806
4850
  async function loadLang(lang) {
4807
- const loader = LANG_LOADERS[lang];
4808
- if (!loader) return false;
4809
4851
  if (loadedLangs.has(lang)) return true;
4810
- const instance = await getHighlighter();
4811
- const mod = await loader();
4812
- await instance.loadLanguage(mod.default);
4813
- loadedLangs.add(lang);
4814
- return true;
4852
+ if (failedLangs.has(lang) || PLAIN_TEXT_LANGUAGES.has(lang)) return false;
4853
+ const pendingLoad = languageLoadPromises.get(lang);
4854
+ if (pendingLoad) return pendingLoad;
4855
+ const loadPromise = (async () => {
4856
+ try {
4857
+ const registration = await customLoader?.(lang) ?? await defaultLoader(lang);
4858
+ if (!registration) {
4859
+ failedLangs.add(lang);
4860
+ return false;
4861
+ }
4862
+ await (await getHighlighter()).loadLanguage(registration);
4863
+ loadedLangs.add(lang);
4864
+ return true;
4865
+ } catch (error) {
4866
+ const loadError = error instanceof Error ? error : new Error(String(error));
4867
+ failedLangs.add(lang);
4868
+ console.warn(`[CodeHighlighter] Failed to load language: ${lang}`, loadError);
4869
+ return false;
4870
+ } finally {
4871
+ languageLoadPromises.delete(lang);
4872
+ }
4873
+ })();
4874
+ languageLoadPromises.set(lang, loadPromise);
4875
+ return loadPromise;
4815
4876
  }
4816
4877
  async function codeToHtml(code, options = {}) {
4817
4878
  const lang = normalizeLanguage(options.lang);
@@ -12269,5 +12330,6 @@
12269
12330
  exports.XNotification = XNotification;
12270
12331
  exports.XProvider = XProvider;
12271
12332
  exports.default = components_default;
12333
+ exports.setupCodeHighlighter = setupCodeHighlighter;
12272
12334
  exports.version = version;
12273
12335
  });
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.1.3-beta.2";
2
+ var version = "1.1.3-beta.4";
3
3
  //#endregion
4
4
  export { version };
@@ -2,7 +2,7 @@ export declare const defaultPrefixCls = "ant";
2
2
  export default function useXProviderContext(): {
3
3
  theme: import('antdv-next').ThemeConfig | undefined;
4
4
  getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
5
- direction: import('antdv-next/dist/config-provider/context').DirectionType;
6
- csp: import('antdv-next/dist/config-provider/context').CSPConfig | undefined;
5
+ direction: import('antdv-next/config-provider/context').DirectionType;
6
+ csp: import('antdv-next/config-provider/context').CSPConfig | undefined;
7
7
  iconPrefixCls: string;
8
8
  };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Enum.js
1
+ //#region ../../node_modules/stylis/src/Enum.js
2
2
  var e = "-ms-", t = "-moz-", n = "-webkit-", r = "comm", i = "rule", a = "decl", o = "@import", s = "@namespace", c = "@keyframes", l = "@layer", u = Math.abs, d = String.fromCharCode, f = Object.assign;
3
3
  function p(e, t) {
4
4
  return v(e, 0) ^ 45 ? (((t << 2 ^ v(e, 0)) << 2 ^ v(e, 1)) << 2 ^ v(e, 2)) << 2 ^ v(e, 3) : 0;
@@ -39,7 +39,7 @@ function w(e, t) {
39
39
  });
40
40
  }
41
41
  //#endregion
42
- //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Tokenizer.js
42
+ //#region ../../node_modules/stylis/src/Tokenizer.js
43
43
  var T = 1, E = 1, D = 0, O = 0, k = 0, A = "";
44
44
  function j(e, t, n, r, i, a, o, s) {
45
45
  return {
@@ -150,7 +150,7 @@ function J(e) {
150
150
  return z(e, O);
151
151
  }
152
152
  //#endregion
153
- //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Parser.js
153
+ //#region ../../node_modules/stylis/src/Parser.js
154
154
  function Y(e) {
155
155
  return H(X("", null, null, null, [""], e = V(e), 0, [0], e));
156
156
  }
@@ -241,7 +241,7 @@ function Q(e, t, n, r, i) {
241
241
  return j(e, t, n, a, y(e, 0, r), y(e, r + 1, -1), r, i);
242
242
  }
243
243
  //#endregion
244
- //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Serializer.js
244
+ //#region ../../node_modules/stylis/src/Serializer.js
245
245
  function $(e, t) {
246
246
  for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
247
247
  return n;
@@ -1,19 +1,19 @@
1
- import { A as e, B as t, C as n, E as r, H as i, M as a, U as o, V as s, k as c, p as l, w as u, z as d } from "./isArrayLikeObject-jl2bjkAJ.js";
2
- import { A as f, C as p, D as m, M as h, N as g, S as _, T as v, f as y, h as b, u as x, w as S } from "./_baseUniq-BlS7rXTs.js";
3
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js
1
+ import { A as e, B as t, C as n, E as r, H as i, M as a, U as o, V as s, k as c, p as l, w as u, z as d } from "./isArrayLikeObject-y3HlYDaX.js";
2
+ import { A as f, C as p, D as m, M as h, N as g, S as _, T as v, f as y, h as b, u as x, w as S } from "./_baseUniq-Ch3HuHeT.js";
3
+ //#region ../../node_modules/lodash-es/_trimmedEndIndex.js
4
4
  var C = /\s/;
5
5
  function w(e) {
6
6
  for (var t = e.length; t-- && C.test(e.charAt(t)););
7
7
  return t;
8
8
  }
9
9
  //#endregion
10
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js
10
+ //#region ../../node_modules/lodash-es/_baseTrim.js
11
11
  var ee = /^\s+/;
12
12
  function T(e) {
13
13
  return e && e.slice(0, w(e) + 1).replace(ee, "");
14
14
  }
15
15
  //#endregion
16
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js
16
+ //#region ../../node_modules/lodash-es/toNumber.js
17
17
  var E = NaN, D = /^[-+]0x[0-9a-f]+$/i, O = /^0b[01]+$/i, k = /^0o[0-7]+$/i, A = parseInt;
18
18
  function j(e) {
19
19
  if (typeof e == "number") return e;
@@ -28,24 +28,24 @@ function j(e) {
28
28
  return r || k.test(e) ? A(e.slice(2), r ? 2 : 8) : D.test(e) ? E : +e;
29
29
  }
30
30
  //#endregion
31
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toFinite.js
31
+ //#region ../../node_modules/lodash-es/toFinite.js
32
32
  var M = Infinity, N = 17976931348623157e292;
33
33
  function P(e) {
34
34
  return e ? (e = j(e), e === M || e === -M ? (e < 0 ? -1 : 1) * N : e === e ? e : 0) : e === 0 ? e : 0;
35
35
  }
36
36
  //#endregion
37
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toInteger.js
37
+ //#region ../../node_modules/lodash-es/toInteger.js
38
38
  function F(e) {
39
39
  var t = P(e), n = t % 1;
40
40
  return t === t ? n ? t - n : t : 0;
41
41
  }
42
42
  //#endregion
43
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flatten.js
43
+ //#region ../../node_modules/lodash-es/flatten.js
44
44
  function I(e) {
45
45
  return e != null && e.length ? _(e, 1) : [];
46
46
  }
47
47
  //#endregion
48
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/defaults.js
48
+ //#region ../../node_modules/lodash-es/defaults.js
49
49
  var L = Object.prototype, R = L.hasOwnProperty, z = r(function(t, r) {
50
50
  t = Object(t);
51
51
  var i = -1, a = r.length, o = a > 2 ? r[2] : void 0;
@@ -56,13 +56,13 @@ var L = Object.prototype, R = L.hasOwnProperty, z = r(function(t, r) {
56
56
  return t;
57
57
  });
58
58
  //#endregion
59
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.js
59
+ //#region ../../node_modules/lodash-es/last.js
60
60
  function B(e) {
61
61
  var t = e == null ? 0 : e.length;
62
62
  return t ? e[t - 1] : void 0;
63
63
  }
64
64
  //#endregion
65
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_createFind.js
65
+ //#region ../../node_modules/lodash-es/_createFind.js
66
66
  function V(e) {
67
67
  return function(t, n, r) {
68
68
  var i = Object(t);
@@ -77,7 +77,7 @@ function V(e) {
77
77
  };
78
78
  }
79
79
  //#endregion
80
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/findIndex.js
80
+ //#region ../../node_modules/lodash-es/findIndex.js
81
81
  var H = Math.max;
82
82
  function U(e, t, n) {
83
83
  var r = e == null ? 0 : e.length;
@@ -86,10 +86,10 @@ function U(e, t, n) {
86
86
  return i < 0 && (i = H(r + i, 0)), f(e, y(t, 3), i);
87
87
  }
88
88
  //#endregion
89
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/find.js
89
+ //#region ../../node_modules/lodash-es/find.js
90
90
  var W = V(U);
91
91
  //#endregion
92
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMap.js
92
+ //#region ../../node_modules/lodash-es/_baseMap.js
93
93
  function G(e, t) {
94
94
  var n = -1, r = u(e) ? Array(e.length) : [];
95
95
  return x(e, function(e, i, a) {
@@ -97,34 +97,34 @@ function G(e, t) {
97
97
  }), r;
98
98
  }
99
99
  //#endregion
100
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/map.js
100
+ //#region ../../node_modules/lodash-es/map.js
101
101
  function K(e, t) {
102
102
  return (s(e) ? h : G)(e, y(t, 3));
103
103
  }
104
104
  //#endregion
105
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseHas.js
105
+ //#region ../../node_modules/lodash-es/_baseHas.js
106
106
  var q = Object.prototype.hasOwnProperty;
107
107
  function J(e, t) {
108
108
  return e != null && q.call(e, t);
109
109
  }
110
110
  //#endregion
111
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/has.js
111
+ //#region ../../node_modules/lodash-es/has.js
112
112
  function Y(e, t) {
113
113
  return e != null && b(e, t, J);
114
114
  }
115
115
  //#endregion
116
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isString.js
116
+ //#region ../../node_modules/lodash-es/isString.js
117
117
  var X = "[object String]";
118
118
  function Z(e) {
119
119
  return typeof e == "string" || !s(e) && i(e) && o(e) == X;
120
120
  }
121
121
  //#endregion
122
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseLt.js
122
+ //#region ../../node_modules/lodash-es/_baseLt.js
123
123
  function Q(e, t) {
124
124
  return e < t;
125
125
  }
126
126
  //#endregion
127
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseExtremum.js
127
+ //#region ../../node_modules/lodash-es/_baseExtremum.js
128
128
  function $(e, t, n) {
129
129
  for (var r = -1, i = e.length; ++r < i;) {
130
130
  var a = e[r], o = t(a);
@@ -133,12 +133,12 @@ function $(e, t, n) {
133
133
  return c;
134
134
  }
135
135
  //#endregion
136
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/min.js
136
+ //#region ../../node_modules/lodash-es/min.js
137
137
  function te(e) {
138
138
  return e && e.length ? $(e, d, Q) : void 0;
139
139
  }
140
140
  //#endregion
141
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSet.js
141
+ //#region ../../node_modules/lodash-es/_baseSet.js
142
142
  function ne(e, n, r, i) {
143
143
  if (!t(e)) return e;
144
144
  n = v(n, e);
@@ -154,7 +154,7 @@ function ne(e, n, r, i) {
154
154
  return e;
155
155
  }
156
156
  //#endregion
157
- //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_basePickBy.js
157
+ //#region ../../node_modules/lodash-es/_basePickBy.js
158
158
  function re(e, t, n) {
159
159
  for (var r = -1, i = t.length, a = {}; ++r < i;) {
160
160
  var o = t[r], s = p(e, o);