@antdv-next/x 1.2.0 → 1.2.1-beta.1

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 (136) hide show
  1. package/dist/actions/ActionsFeedback.js +1 -1
  2. package/dist/actions/ActionsItem.js +1 -1
  3. package/dist/bubble/hooks/useCompatibleScroll.js +1 -1
  4. package/dist/code-highlighter/CodeHighlighter.js +2 -1
  5. package/dist/code-highlighter/shiki.js +1 -1
  6. package/dist/code-highlighter/style/index.d.ts +40 -0
  7. package/dist/code-highlighter/style/index.js +25 -13
  8. package/dist/folder/Folder.js +2 -1
  9. package/dist/index.umd.js +63 -40
  10. package/dist/mermaid/Mermaid.js +1 -1
  11. package/dist/package.js +1 -1
  12. package/dist/sender/components/SlotTextArea.js +3 -2
  13. package/dist/sender/components/SpeechButton/RecordingIcon.js +1 -1
  14. package/dist/sender/hooks/use-speech.js +2 -1
  15. package/dist/suggestion/useActive.js +0 -2
  16. package/dist/theme/themes/seed.js +3 -0
  17. package/dist/theme/util/alias.js +5 -5
  18. package/dist/think/Think.js +3 -2
  19. package/dist/thought-chain/Node.js +3 -2
  20. package/dist/thought-chain/ThoughtChain.js +2 -2
  21. package/dist/x-provider/index.js +3 -2
  22. package/es/Serializer-Sc9uEpQk.js +262 -0
  23. package/es/{_basePickBy-DFHEGO2M.js → _basePickBy-CrbncDqR.js} +2 -2
  24. package/es/{_baseUniq-BlS7rXTs.js → _baseUniq-B-qU_Imh.js} +9 -9
  25. package/es/antdv-next-x.esm.js +2887 -2875
  26. package/es/{arc-BuXEd18J.js → arc-NI3ROx5X.js} +2 -2
  27. package/es/architecture-PBZL5I3N-BRGGaMu3.js +3 -0
  28. package/es/{architectureDiagram-2XIMDMQ5-CmfsCwJk.js → architectureDiagram-2XIMDMQ5-OvuktNfv.js} +100 -110
  29. package/es/{blockDiagram-WCTKOSBZ-lJAan65A.js → blockDiagram-WCTKOSBZ-CS-kh74L.js} +42 -43
  30. package/es/{c4Diagram-IC4MRINW-B1c2x_1Q.js → c4Diagram-IC4MRINW-BZGIF4Dk.js} +17 -25
  31. package/es/{channel-DFgF_2F7.js → channel-DrSSYyxp.js} +1 -1
  32. package/es/{chunk-4BX2VUAB-J2N81Fpp.js → chunk-4BX2VUAB-Rm8-te6i.js} +1 -1
  33. package/es/{chunk-55IACEB6-DGtfGRgi.js → chunk-55IACEB6-Tre45n-8.js} +1 -1
  34. package/es/{chunk-7R4GIKGN-QT6IorJ_.js → chunk-7R4GIKGN-scch4dXY.js} +10 -10
  35. package/es/{chunk-FMBD7UC4-DCcRjunY.js → chunk-FMBD7UC4-JmekSPZP.js} +1 -1
  36. package/es/{chunk-GEFDOKGD-BWpC-zoH.js → chunk-GEFDOKGD-BEzc6NZw.js} +31 -71
  37. package/es/{chunk-JSJVCQXG-D8_heHOp.js → chunk-JSJVCQXG-_l_UVbaa.js} +3 -3
  38. package/es/{chunk-KX2RTZJC-D5cc4rj6.js → chunk-KX2RTZJC-BUWM8pJz.js} +2 -2
  39. package/es/{chunk-KYZI473N-BHJ3T5Zv.js → chunk-KYZI473N-BSgb_E0Q.js} +11 -11
  40. package/es/{chunk-MX3YWQON-BxE-Aq9c.js → chunk-MX3YWQON-D602L8pU.js} +1 -1
  41. package/es/{chunk-NQ4KR5QH-EYQBXkqP.js → chunk-NQ4KR5QH-BPQV0i93.js} +41 -45
  42. package/es/{chunk-O4XLMI2P-qjOoGpnx.js → chunk-O4XLMI2P-BMqc3iYa.js} +15 -14
  43. package/es/{chunk-PQ6SQG4A-D3jtNCWN.js → chunk-PQ6SQG4A-DcYrzB1X.js} +2 -2
  44. package/es/{chunk-PU5JKC2W-DdP8BS-S.js → chunk-PU5JKC2W-TuGY6X1n.js} +28 -24
  45. package/es/{chunk-QZHKN3VN-CW3cFN-h.js → chunk-QZHKN3VN-CKbD02cl.js} +1 -1
  46. package/es/{chunk-WL4C6EOR-BDbxJyGk.js → chunk-WL4C6EOR-B31ErTFp.js} +19 -17
  47. package/es/{chunk-XZSTWKYB-CucN1XvM.js → chunk-XZSTWKYB-DYKLwCEy.js} +1888 -1785
  48. package/es/{chunk-YBOYWFTD-CvaddD9G.js → chunk-YBOYWFTD-CRiKEIiS.js} +5 -5
  49. package/es/classDiagram-VBA2DB6C-BDqwxUdU.js +29 -0
  50. package/es/classDiagram-v2-RAHNMMFH-DdmOjeUb.js +29 -0
  51. package/es/{clone-r3YukIBB.js → clone-yzFtXY5G.js} +1 -1
  52. package/es/{cose-bilkent-S5V4N54A-B5OQuIhl.js → cose-bilkent-S5V4N54A-BM90wTBk.js} +43 -48
  53. package/es/css-CRY9BUqw.js +2 -0
  54. package/es/{cytoscape.esm-i2CZcWd-.js → cytoscape.esm-B_-hKv4-.js} +276 -321
  55. package/es/{dagre-5aGJFKmT.js → dagre-DCYVBij1.js} +25 -27
  56. package/es/{dagre-KLK3FWXG-BI5QQMXo.js → dagre-KLK3FWXG-Ced70SgJ.js} +21 -17
  57. package/es/{defaultLocale-bckJcYh1.js → defaultLocale-yzzuPw6P.js} +1 -4
  58. package/es/{diagram-E7M64L7V-Dz62Vz_a.js → diagram-E7M64L7V-xZCloH_i.js} +72 -70
  59. package/es/{diagram-IFDJBPK2-9fjvFkSc.js → diagram-IFDJBPK2-BTmFZhvz.js} +21 -21
  60. package/es/{diagram-P4PSJMXO-BlX6jFjZ.js → diagram-P4PSJMXO-DX_3B0LB.js} +16 -16
  61. package/es/{dist-BX_roQzC.js → dist-h4ggShny.js} +1 -1
  62. package/es/{erDiagram-INFDFZHY-BcRXu8Cp.js → erDiagram-INFDFZHY-MJ_HVY-7.js} +22 -22
  63. package/es/{flowDiagram-PKNHOUZH-UeyfgU8z.js → flowDiagram-PKNHOUZH-CQIRy1sx.js} +35 -42
  64. package/es/{ganttDiagram-A5KZAMGK-txCzqgQ5.js → ganttDiagram-A5KZAMGK-Dw9bjWjx.js} +39 -52
  65. package/es/gitGraph-HDMCJU4V-oForq_Vw.js +3 -0
  66. package/es/{gitGraphDiagram-K3NZZRJ6-DghWYaFU.js → gitGraphDiagram-K3NZZRJ6-Gk6FiGbZ.js} +21 -21
  67. package/es/{graphlib-dRkI1OCL.js → graphlib-BMvIh7N7.js} +4 -4
  68. package/es/{html-CWvNBSxv.js → html-C4rrmxbP.js} +2 -2
  69. package/es/info-3K5VOQVL-0F-ZLEMx.js +3 -0
  70. package/es/{infoDiagram-LFFYTUFH-CA-vlAvP.js → infoDiagram-LFFYTUFH-CS64-uil.js} +9 -9
  71. package/es/{init-B75p2clj.js → init-sjaVZO3f.js} +1 -3
  72. package/es/{isArrayLikeObject-jl2bjkAJ.js → isArrayLikeObject-Dqk_yOP-.js} +5 -4
  73. package/es/{ishikawaDiagram-PHBUUO56-DjdpS9Lb.js → ishikawaDiagram-PHBUUO56-C_Hw5UnV.js} +13 -13
  74. package/es/javascript--0qAxhnA.js +2 -0
  75. package/es/{journeyDiagram-4ABVD52K-CIJfC1fp.js → journeyDiagram-4ABVD52K-CFFyM4Ar.js} +16 -16
  76. package/es/{kanban-definition-K7BYSVSG-CC2vwGck.js → kanban-definition-K7BYSVSG-B_R-mA10.js} +27 -28
  77. package/es/{katex-DCMiIo1z.js → katex-C-qdUNlg.js} +78 -68
  78. package/es/{line-Cu9NTacD.js → line-D05MESIS.js} +3 -3
  79. package/es/{linear-C0rAYYmp.js → linear-B8tPH2Pw.js} +4 -6
  80. package/es/mermaid-parser.core-C_69nk7j.js +259 -0
  81. package/es/mermaid.core-BVGVwWcu.js +1914 -0
  82. package/es/{mindmap-definition-YRQLILUH-BzTYDYmK.js → mindmap-definition-YRQLILUH-qgGUYYe3.js} +26 -28
  83. package/es/{ordinal-F3U6aXtP.js → ordinal-CNQzPcrr.js} +1 -1
  84. package/es/packet-RMMSAZCW-CeqtQQ_e.js +3 -0
  85. package/es/{path-Dm3C8WEs.js → path-CqWAdh69.js} +4 -7
  86. package/es/pie-UPGHQEXC-BI60FhK4.js +3 -0
  87. package/es/{pieDiagram-SKSYHLDU-COvqE_C6.js → pieDiagram-SKSYHLDU-B8-AVOmP.js} +47 -47
  88. package/es/{quadrantDiagram-337W2JSQ-Dgv8ccjt.js → quadrantDiagram-337W2JSQ-C2Z0CN4Z.js} +10 -10
  89. package/es/radar-KQ55EAFF-CRwOOFw0.js +3 -0
  90. package/es/{requirementDiagram-Z7DCOOCP-B2NyhxO-.js → requirementDiagram-Z7DCOOCP-Cdj7PwWC.js} +19 -19
  91. package/es/{chunk-WQLz0Won.js → rolldown-runtime-CEY2VRuR.js} +10 -3
  92. package/es/{rough.esm-BhGP2Udb.js → rough.esm-D1ibUQD-.js} +1 -1
  93. package/es/{sankeyDiagram-WA2Y5GQK-BfnH_gpl.js → sankeyDiagram-WA2Y5GQK-BNmU-dM1.js} +10 -10
  94. package/es/{sequenceDiagram-2WXFIKYE-DXssVQOF.js → sequenceDiagram-2WXFIKYE-pj0uPf22.js} +114 -126
  95. package/es/{shiki-runtime-D0MO6er5.js → shiki-runtime-7QG17np_.js} +978 -983
  96. package/es/{src-CUQ6oOYk.js → src-Dynw_Lub.js} +26 -26
  97. package/es/{stateDiagram-RAJIS63D-DvDLfupV.js → stateDiagram-RAJIS63D-BgCfMnGb.js} +18 -18
  98. package/es/stateDiagram-v2-FVOUBMTO-ByMhP6Xo.js +27 -0
  99. package/es/{timeline-definition-YZTLITO2-ErcRjbZf.js → timeline-definition-YZTLITO2-Bj5QKnBI.js} +10 -10
  100. package/es/treemap-KZPCXAKY-BlOAFUbR.js +3 -0
  101. package/es/{vennDiagram-LZ73GAT5-CDTZUtc8.js → vennDiagram-LZ73GAT5-lpWcIvN6.js} +16 -16
  102. package/es/{xychartDiagram-JWTSCODW-Y21jBOTg.js → xychartDiagram-JWTSCODW-De1M-7Yz.js} +26 -30
  103. package/package.json +1 -1
  104. package/es/Serializer-D1JYN1kI.js +0 -262
  105. package/es/architecture-PBZL5I3N-D7tS55xM.js +0 -3
  106. package/es/chunk-7E7YKBS2-CL2d4WAf.js +0 -23
  107. package/es/chunk-C72U2L5F-OHTVpS-m.js +0 -23
  108. package/es/chunk-EGIJ26TM-DyMPGYrB.js +0 -23
  109. package/es/chunk-GLR3WWYH-DiXcKb5Y.js +0 -41
  110. package/es/chunk-HHEYEP7N-Cxc7E4dX.js +0 -9
  111. package/es/chunk-L3YUKLVL-7oGaUOdc.js +0 -23
  112. package/es/chunk-OZEHJAEY-D82nx27s.js +0 -64
  113. package/es/chunk-R5LLSJPH-CreI2kO9.js +0 -35
  114. package/es/chunk-XIRO2GV7-S5KkbVnN.js +0 -30
  115. package/es/chunk-XPW4576I-B0KVSHwE.js +0 -1146
  116. package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +0 -29
  117. package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +0 -29
  118. package/es/css-Bi5OTYo2.js +0 -2
  119. package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +0 -3
  120. package/es/info-3K5VOQVL-COqdvM99.js +0 -3
  121. package/es/isEmpty-CmA-HYrg.js +0 -35
  122. package/es/javascript-CjdDmufJ.js +0 -2
  123. package/es/mermaid-parser.core-7Wn2L29P.js +0 -59
  124. package/es/mermaid.core-Bvy_Q6Hu.js +0 -680
  125. package/es/packet-RMMSAZCW-2PTjWKLd.js +0 -3
  126. package/es/pie-UPGHQEXC-Du8-k-EA.js +0 -3
  127. package/es/radar-KQ55EAFF-jJOhyjxC.js +0 -3
  128. package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +0 -27
  129. package/es/treemap-KZPCXAKY-CvZAIYVa.js +0 -3
  130. /package/es/{array-CWNufkl9.js → array-CApNbSU9.js} +0 -0
  131. /package/es/{css-v5r4VtJ6.js → css-DVAQAvTD.js} +0 -0
  132. /package/es/{javascript-o_jd8Ivw.js → javascript-Bk0bJ4nQ.js} +0 -0
  133. /package/es/{json-DqMXJlo0.js → json-CAwkMa5O.js} +0 -0
  134. /package/es/{math-CoDOuve-.js → math-BZ_bUCIA.js} +0 -0
  135. /package/es/{python-CQPNJfOt.js → python-D0AaDoWC.js} +0 -0
  136. /package/es/{typescript-Ck7Pr_E3.js → typescript-DWy2KXvB.js} +0 -0
@@ -3,7 +3,7 @@ import { computed, createVNode, defineComponent, mergeProps, useAttrs } from "vu
3
3
  import { Tooltip } from "antdv-next";
4
4
  import { DislikeFilled, DislikeOutlined, LikeFilled, LikeOutlined } from "@antdv-next/icons";
5
5
  //#region components/actions/ActionsFeedback.tsx
6
- var FEEDBACK_VALUE = /* @__PURE__ */ function(FEEDBACK_VALUE) {
6
+ var FEEDBACK_VALUE = /*#__PURE__*/ function(FEEDBACK_VALUE) {
7
7
  FEEDBACK_VALUE["like"] = "like";
8
8
  FEEDBACK_VALUE["dislike"] = "dislike";
9
9
  FEEDBACK_VALUE["default"] = "default";
@@ -3,7 +3,7 @@ import { computed, createVNode, defineComponent, mergeProps, useAttrs, useSlots
3
3
  import { Tooltip } from "antdv-next";
4
4
  import { CloseCircleOutlined, LoadingOutlined } from "@antdv-next/icons";
5
5
  //#region components/actions/ActionsItem.tsx
6
- var ACTIONS_ITEM_STATUS = /* @__PURE__ */ function(ACTIONS_ITEM_STATUS) {
6
+ var ACTIONS_ITEM_STATUS = /*#__PURE__*/ function(ACTIONS_ITEM_STATUS) {
7
7
  ACTIONS_ITEM_STATUS["LOADING"] = "loading";
8
8
  ACTIONS_ITEM_STATUS["ERROR"] = "error";
9
9
  ACTIONS_ITEM_STATUS["RUNNING"] = "running";
@@ -105,7 +105,7 @@ function useCompatibleScroll(scrollDomRef, contentDomRef) {
105
105
  const contentDom = contentDomRef.value;
106
106
  if (!scrollDom || !contentDom) return;
107
107
  const { top, intoView, intoViewDom } = option || {};
108
- if (isReverse(scrollDom)) if (top !== void 0 && top >= -sentinelHeight) isScrollToBottom = true;
108
+ if (isReverse(scrollDom)) if (top !== void 0 && top >= -10) isScrollToBottom = true;
109
109
  else if (intoViewDom && intoView?.block === "end") isScrollToBottom = contentDom.lastElementChild === intoViewDom;
110
110
  else isScrollToBottom = false;
111
111
  else if (top !== void 0 && top >= scrollDom.scrollHeight - scrollDom.clientHeight - sentinelHeight) isScrollToBottom = true;
@@ -89,10 +89,11 @@ var XCodeHighlighter = /* @__PURE__ */ defineComponent({
89
89
  const highlightedHtml = shallowRef("");
90
90
  const highlightCode = async () => {
91
91
  try {
92
- highlightedHtml.value = await codeToHtml(props.content, {
92
+ const html = await codeToHtml(props.content, {
93
93
  lang: props.language,
94
94
  theme: props.theme === "dark" ? "vitesse-dark" : "vitesse-light"
95
95
  });
96
+ highlightedHtml.value = html;
96
97
  } catch (e) {
97
98
  console.error("Failed to highlight code:", e);
98
99
  highlightedHtml.value = `<pre><code>${escapeHtml(props.content)}</code></pre>`;
@@ -1,5 +1,5 @@
1
1
  //#region components/code-highlighter/shiki.ts
2
- var PLAIN_TEXT_LANGUAGES = new Set([
2
+ var PLAIN_TEXT_LANGUAGES = /* @__PURE__ */ new Set([
3
3
  "text",
4
4
  "plaintext",
5
5
  "txt",
@@ -8,6 +8,46 @@ export interface ComponentToken {
8
8
  * 代码字体大小
9
9
  */
10
10
  codeFontSize?: number;
11
+ /**
12
+ * 亮色主题下的代码文字颜色,用于语言未命中高亮时的降级文本
13
+ */
14
+ codeColor?: string;
15
+ /**
16
+ * 暗色主题下的代码文字颜色,用于语言未命中高亮时的降级文本
17
+ */
18
+ codeColorDark?: string;
19
+ /**
20
+ * 亮色主题下代码区与行号栏的背景色
21
+ */
22
+ codeBg?: string;
23
+ /**
24
+ * 暗色主题下代码区与行号栏的背景色
25
+ */
26
+ codeBgDark?: string;
27
+ /**
28
+ * 暗色主题下头部区域的背景色
29
+ */
30
+ codeHeaderBgDark?: string;
31
+ /**
32
+ * 暗色主题下头部与行号栏的分隔线颜色
33
+ */
34
+ codeBorderColorDark?: string;
35
+ /**
36
+ * 暗色主题下语言标签的文字颜色
37
+ */
38
+ codeLangColorDark?: string;
39
+ /**
40
+ * 暗色主题下行号的文字颜色
41
+ */
42
+ codeLineNumberColorDark?: string;
43
+ /**
44
+ * 暗色主题下头部操作按钮的文字颜色
45
+ */
46
+ codeBtnColorDark?: string;
47
+ /**
48
+ * 暗色主题下头部操作按钮悬浮态的背景色
49
+ */
50
+ codeBtnHoverBgDark?: string;
11
51
  }
12
52
  export interface CodeHighlighterToken extends FullToken<"CodeHighlighter"> {
13
53
  }
@@ -35,14 +35,14 @@ var genCodeHighlighterStyle = (token) => {
35
35
  [`${componentCls}-content`]: {
36
36
  display: "flex",
37
37
  overflow: "auto",
38
- backgroundColor: "#fafafa",
38
+ backgroundColor: token.codeBg,
39
39
  alignItems: "stretch"
40
40
  },
41
41
  [`${componentCls}-line-numbers`]: {
42
42
  paddingBlock: unit(token.paddingSM),
43
43
  paddingInline: unit(token.paddingXS),
44
44
  textAlign: "right",
45
- backgroundColor: "#fafafa",
45
+ backgroundColor: token.codeBg,
46
46
  borderRight: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
47
47
  userSelect: "none",
48
48
  flexShrink: 0,
@@ -63,6 +63,7 @@ var genCodeHighlighterStyle = (token) => {
63
63
  [`${componentCls}-code`]: {
64
64
  flex: 1,
65
65
  overflow: "auto",
66
+ color: token.codeColor,
66
67
  "& > pre": {
67
68
  margin: 0,
68
69
  padding: unit(token.paddingSM),
@@ -83,29 +84,40 @@ var genCodeHighlighterStyle = (token) => {
83
84
  [`&${componentCls}-dark`]: {
84
85
  borderColor: token.colorBorder,
85
86
  [`${componentCls}-header`]: {
86
- backgroundColor: "#252526",
87
- borderBottomColor: "#3e3e42"
87
+ backgroundColor: token.codeHeaderBgDark,
88
+ borderBottomColor: token.codeBorderColorDark
88
89
  },
89
- [`${componentCls}-lang`]: { color: "#cccccc" },
90
+ [`${componentCls}-lang`]: { color: token.codeLangColorDark },
90
91
  [`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
91
- color: "#ffffff !important",
92
+ color: `${token.codeBtnColorDark} !important`,
92
93
  "&:hover, &:focus": {
93
- color: "#ffffff !important",
94
- backgroundColor: "#3e3e42 !important"
94
+ color: `${token.codeBtnColorDark} !important`,
95
+ backgroundColor: `${token.codeBtnHoverBgDark} !important`
95
96
  }
96
97
  },
97
- [`${componentCls}-content`]: { backgroundColor: "#1e1e1e" },
98
+ [`${componentCls}-content`]: { backgroundColor: token.codeBgDark },
98
99
  [`${componentCls}-line-numbers`]: {
99
- backgroundColor: "#1e1e1e",
100
- borderRightColor: "#3e3e42"
100
+ backgroundColor: token.codeBgDark,
101
+ borderRightColor: token.codeBorderColorDark
101
102
  },
102
- [`${componentCls}-line-number`]: { color: "#858585" }
103
+ [`${componentCls}-line-number`]: { color: token.codeLineNumberColorDark },
104
+ [`${componentCls}-code`]: { color: token.codeColorDark }
103
105
  }
104
106
  } };
105
107
  };
106
108
  var prepareComponentToken = () => ({
107
109
  codeFontFamily: "'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace",
108
- codeFontSize: 14
110
+ codeFontSize: 14,
111
+ codeColor: "#393a34",
112
+ codeColorDark: "#dbd7caee",
113
+ codeBg: "#fafafa",
114
+ codeBgDark: "#1e1e1e",
115
+ codeHeaderBgDark: "#252526",
116
+ codeBorderColorDark: "#3e3e42",
117
+ codeLangColorDark: "#cccccc",
118
+ codeLineNumberColorDark: "#858585",
119
+ codeBtnColorDark: "#ffffff",
120
+ codeBtnHoverBgDark: "#3e3e42"
109
121
  });
110
122
  var style_default = genStyleHooks("CodeHighlighter", (token) => {
111
123
  return [genCodeHighlighterStyle(mergeToken(token, {}))];
@@ -195,7 +195,8 @@ var XFolder = /* @__PURE__ */ defineComponent({
195
195
  if (props.fileContentService) {
196
196
  loadingContent.value = true;
197
197
  try {
198
- fileContent.value = await props.fileContentService.loadFileContent(filePath);
198
+ const content = await props.fileContentService.loadFileContent(filePath);
199
+ fileContent.value = content;
199
200
  } catch (error) {
200
201
  fileContent.value = `// ${locale.value.loadError}: ${error instanceof Error ? error.message : "Unknown error"}`;
201
202
  } finally {
package/dist/index.umd.js CHANGED
@@ -29,7 +29,14 @@
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);
32
+ var __esmMin = (fn, res, err) => () => {
33
+ if (err) throw err[0];
34
+ try {
35
+ return fn && (res = fn(fn = 0)), res;
36
+ } catch (e) {
37
+ throw err = [e], e;
38
+ }
39
+ };
33
40
  var __exportAll = (all, no_symbols) => {
34
41
  let target = {};
35
42
  for (var name in all) __defProp(target, name, {
@@ -49,17 +56,17 @@
49
56
  }
50
57
  return to;
51
58
  };
52
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
59
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
53
60
  value: mod,
54
61
  enumerable: true
55
62
  }) : target, mod));
56
63
  //#endregion
57
- _antdv_next_icons = __toESM(_antdv_next_icons);
58
- antdv_next_dist_theme_useToken = __toESM(antdv_next_dist_theme_useToken);
59
- shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs);
60
- shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs);
64
+ _antdv_next_icons = __toESM(_antdv_next_icons, 1);
65
+ antdv_next_dist_theme_useToken = __toESM(antdv_next_dist_theme_useToken, 1);
66
+ shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs, 1);
67
+ shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs, 1);
61
68
  //#region package.json
62
- var version = "1.2.0";
69
+ var version = "1.2.1-beta.1";
63
70
  //#endregion
64
71
  //#region components/x-provider/context.ts
65
72
  var XProviderContextKey = Symbol("antdv-next-x-provider-context");
@@ -718,7 +725,7 @@
718
725
  });
719
726
  //#endregion
720
727
  //#region components/actions/ActionsItem.tsx
721
- var ACTIONS_ITEM_STATUS = /* @__PURE__ */ function(ACTIONS_ITEM_STATUS) {
728
+ var ACTIONS_ITEM_STATUS = /*#__PURE__*/ function(ACTIONS_ITEM_STATUS) {
722
729
  ACTIONS_ITEM_STATUS["LOADING"] = "loading";
723
730
  ACTIONS_ITEM_STATUS["ERROR"] = "error";
724
731
  ACTIONS_ITEM_STATUS["RUNNING"] = "running";
@@ -1008,7 +1015,7 @@
1008
1015
  });
1009
1016
  //#endregion
1010
1017
  //#region components/actions/ActionsFeedback.tsx
1011
- var FEEDBACK_VALUE = /* @__PURE__ */ function(FEEDBACK_VALUE) {
1018
+ var FEEDBACK_VALUE = /*#__PURE__*/ function(FEEDBACK_VALUE) {
1012
1019
  FEEDBACK_VALUE["like"] = "like";
1013
1020
  FEEDBACK_VALUE["dislike"] = "dislike";
1014
1021
  FEEDBACK_VALUE["default"] = "default";
@@ -4425,7 +4432,7 @@
4425
4432
  const contentDom = contentDomRef.value;
4426
4433
  if (!scrollDom || !contentDom) return;
4427
4434
  const { top, intoView, intoViewDom } = option || {};
4428
- if (isReverse(scrollDom)) if (top !== void 0 && top >= -sentinelHeight) isScrollToBottom = true;
4435
+ if (isReverse(scrollDom)) if (top !== void 0 && top >= -10) isScrollToBottom = true;
4429
4436
  else if (intoViewDom && intoView?.block === "end") isScrollToBottom = contentDom.lastElementChild === intoViewDom;
4430
4437
  else isScrollToBottom = false;
4431
4438
  else if (top !== void 0 && top >= scrollDom.scrollHeight - scrollDom.clientHeight - sentinelHeight) isScrollToBottom = true;
@@ -4776,7 +4783,7 @@
4776
4783
  var init_shiki_runtime = __esmMin((() => {}));
4777
4784
  //#endregion
4778
4785
  //#region components/code-highlighter/shiki.ts
4779
- var PLAIN_TEXT_LANGUAGES = new Set([
4786
+ var PLAIN_TEXT_LANGUAGES = /* @__PURE__ */ new Set([
4780
4787
  "text",
4781
4788
  "plaintext",
4782
4789
  "txt",
@@ -4917,14 +4924,14 @@
4917
4924
  [`${componentCls}-content`]: {
4918
4925
  display: "flex",
4919
4926
  overflow: "auto",
4920
- backgroundColor: "#fafafa",
4927
+ backgroundColor: token.codeBg,
4921
4928
  alignItems: "stretch"
4922
4929
  },
4923
4930
  [`${componentCls}-line-numbers`]: {
4924
4931
  paddingBlock: (0, _antdv_next_cssinjs.unit)(token.paddingSM),
4925
4932
  paddingInline: (0, _antdv_next_cssinjs.unit)(token.paddingXS),
4926
4933
  textAlign: "right",
4927
- backgroundColor: "#fafafa",
4934
+ backgroundColor: token.codeBg,
4928
4935
  borderRight: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
4929
4936
  userSelect: "none",
4930
4937
  flexShrink: 0,
@@ -4945,6 +4952,7 @@
4945
4952
  [`${componentCls}-code`]: {
4946
4953
  flex: 1,
4947
4954
  overflow: "auto",
4955
+ color: token.codeColor,
4948
4956
  "& > pre": {
4949
4957
  margin: 0,
4950
4958
  padding: (0, _antdv_next_cssinjs.unit)(token.paddingSM),
@@ -4965,29 +4973,40 @@
4965
4973
  [`&${componentCls}-dark`]: {
4966
4974
  borderColor: token.colorBorder,
4967
4975
  [`${componentCls}-header`]: {
4968
- backgroundColor: "#252526",
4969
- borderBottomColor: "#3e3e42"
4976
+ backgroundColor: token.codeHeaderBgDark,
4977
+ borderBottomColor: token.codeBorderColorDark
4970
4978
  },
4971
- [`${componentCls}-lang`]: { color: "#cccccc" },
4979
+ [`${componentCls}-lang`]: { color: token.codeLangColorDark },
4972
4980
  [`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
4973
- color: "#ffffff !important",
4981
+ color: `${token.codeBtnColorDark} !important`,
4974
4982
  "&:hover, &:focus": {
4975
- color: "#ffffff !important",
4976
- backgroundColor: "#3e3e42 !important"
4983
+ color: `${token.codeBtnColorDark} !important`,
4984
+ backgroundColor: `${token.codeBtnHoverBgDark} !important`
4977
4985
  }
4978
4986
  },
4979
- [`${componentCls}-content`]: { backgroundColor: "#1e1e1e" },
4987
+ [`${componentCls}-content`]: { backgroundColor: token.codeBgDark },
4980
4988
  [`${componentCls}-line-numbers`]: {
4981
- backgroundColor: "#1e1e1e",
4982
- borderRightColor: "#3e3e42"
4989
+ backgroundColor: token.codeBgDark,
4990
+ borderRightColor: token.codeBorderColorDark
4983
4991
  },
4984
- [`${componentCls}-line-number`]: { color: "#858585" }
4992
+ [`${componentCls}-line-number`]: { color: token.codeLineNumberColorDark },
4993
+ [`${componentCls}-code`]: { color: token.codeColorDark }
4985
4994
  }
4986
4995
  } };
4987
4996
  };
4988
4997
  var prepareComponentToken$10 = () => ({
4989
4998
  codeFontFamily: "'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace",
4990
- codeFontSize: 14
4999
+ codeFontSize: 14,
5000
+ codeColor: "#393a34",
5001
+ codeColorDark: "#dbd7caee",
5002
+ codeBg: "#fafafa",
5003
+ codeBgDark: "#1e1e1e",
5004
+ codeHeaderBgDark: "#252526",
5005
+ codeBorderColorDark: "#3e3e42",
5006
+ codeLangColorDark: "#cccccc",
5007
+ codeLineNumberColorDark: "#858585",
5008
+ codeBtnColorDark: "#ffffff",
5009
+ codeBtnHoverBgDark: "#3e3e42"
4991
5010
  });
4992
5011
  var style_default$10 = genStyleHooks("CodeHighlighter", (token) => {
4993
5012
  return [genCodeHighlighterStyle((0, _antdv_next_cssinjs_cssinjs_utils.mergeToken)(token, {}))];
@@ -5078,10 +5097,11 @@
5078
5097
  const highlightedHtml = (0, vue.shallowRef)("");
5079
5098
  const highlightCode = async () => {
5080
5099
  try {
5081
- highlightedHtml.value = await codeToHtml(props.content, {
5100
+ const html = await codeToHtml(props.content, {
5082
5101
  lang: props.language,
5083
5102
  theme: props.theme === "dark" ? "vitesse-dark" : "vitesse-light"
5084
5103
  });
5104
+ highlightedHtml.value = html;
5085
5105
  } catch (e) {
5086
5106
  console.error("Failed to highlight code:", e);
5087
5107
  highlightedHtml.value = `<pre><code>${escapeHtml(props.content)}</code></pre>`;
@@ -6906,7 +6926,8 @@
6906
6926
  if (props.fileContentService) {
6907
6927
  loadingContent.value = true;
6908
6928
  try {
6909
- fileContent.value = await props.fileContentService.loadFileContent(filePath);
6929
+ const content = await props.fileContentService.loadFileContent(filePath);
6930
+ fileContent.value = content;
6910
6931
  } catch (error) {
6911
6932
  fileContent.value = `// ${locale.value.loadError}: ${error instanceof Error ? error.message : "Unknown error"}`;
6912
6933
  } finally {
@@ -7149,7 +7170,7 @@
7149
7170
  }, prepareComponentToken$7);
7150
7171
  //#endregion
7151
7172
  //#region components/mermaid/Mermaid.tsx
7152
- var RenderType = /* @__PURE__ */ function(RenderType) {
7173
+ var RenderType = /*#__PURE__*/ function(RenderType) {
7153
7174
  RenderType["Code"] = "code";
7154
7175
  RenderType["Image"] = "image";
7155
7176
  return RenderType;
@@ -8237,7 +8258,7 @@
8237
8258
  });
8238
8259
  //#endregion
8239
8260
  //#region components/sender/components/SlotTextArea.tsx
8240
- var SUPPORTED_INPUT_TYPES = new Set([
8261
+ var SUPPORTED_INPUT_TYPES = /* @__PURE__ */ new Set([
8241
8262
  "input",
8242
8263
  "select",
8243
8264
  "custom",
@@ -8564,7 +8585,8 @@
8564
8585
  const setStartCursor = (preventScroll) => {
8565
8586
  const editable = editableRef.value;
8566
8587
  if (!editable) return;
8567
- setCursorPosition(editable, skillDomRef.value ? 1 : 0, preventScroll);
8588
+ const startIndex = skillDomRef.value ? 1 : 0;
8589
+ setCursorPosition(editable, startIndex, preventScroll);
8568
8590
  };
8569
8591
  const setEndCursor = (preventScroll) => {
8570
8592
  const editable = editableRef.value;
@@ -9058,7 +9080,7 @@
9058
9080
  "xmlns": "http://www.w3.org/2000/svg",
9059
9081
  "class": props.class
9060
9082
  }, [(0, vue.createVNode)("title", null, [contextLocale.value.speechRecording]), Array.from({ length: COUNT }).map((_, index) => {
9061
- const x = index * ((SIZE - RECT_WIDTH * COUNT) / (COUNT - 1) + RECT_WIDTH);
9083
+ const x = index * 286.66666666666663;
9062
9084
  const yMin = SIZE / 2 - RECT_HEIGHT_MIN / 2;
9063
9085
  const yMax = SIZE / 2 - RECT_HEIGHT_MAX / 2;
9064
9086
  return (0, vue.createVNode)("rect", {
@@ -10765,8 +10787,6 @@
10765
10787
  case "Escape":
10766
10788
  onCancel();
10767
10789
  event.preventDefault();
10768
- break;
10769
- default: break;
10770
10790
  }
10771
10791
  };
10772
10792
  (0, vue.watch)([open, items], ([nextOpen, nextItems]) => {
@@ -11183,14 +11203,15 @@
11183
11203
  });
11184
11204
  const prefixCls = (0, vue.computed)(() => props.prefixCls);
11185
11205
  function renderContent() {
11186
- return (0, vue.withDirectives)((0, vue.createVNode)("div", { "ref": contentRef }, [(0, vue.createVNode)("div", {
11206
+ const node = (0, vue.createVNode)("div", { "ref": contentRef }, [(0, vue.createVNode)("div", {
11187
11207
  "class": [
11188
11208
  `${prefixCls.value}-content`,
11189
11209
  contextConfig.value.classes?.content,
11190
11210
  props.classes?.content
11191
11211
  ],
11192
11212
  "style": [contextConfig.value.styles?.content, props.styles?.content]
11193
- }, [slots.default?.()])]), [[vue.vShow, mergedExpanded.value]]);
11213
+ }, [slots.default?.()])]);
11214
+ return (0, vue.withDirectives)(node, [[vue.vShow, mergedExpanded.value]]);
11194
11215
  }
11195
11216
  expose({ get nativeElement() {
11196
11217
  return rootRef.value;
@@ -11754,10 +11775,11 @@
11754
11775
  const showContent = hasContent && (!collapsible || props.expanded);
11755
11776
  const destroyOnHidden = item.destroyOnHidden ?? true;
11756
11777
  const renderContent = () => {
11757
- return (0, vue.withDirectives)((0, vue.createVNode)("div", null, [(0, vue.createVNode)("div", {
11778
+ const node = (0, vue.createVNode)("div", null, [(0, vue.createVNode)("div", {
11758
11779
  "class": [`${cls}-content`, props.classes?.itemContent],
11759
11780
  "style": props.styles?.itemContent
11760
- }, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]), [[vue.vShow, showContent]]);
11781
+ }, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]);
11782
+ return (0, vue.withDirectives)(node, [[vue.vShow, showContent]]);
11761
11783
  };
11762
11784
  return (0, vue.createVNode)("div", {
11763
11785
  "class": [`${cls}`, props.classes?.item],
@@ -11867,7 +11889,7 @@
11867
11889
  const ctx = contextConfig.value.classes ?? {};
11868
11890
  const prop = props.classes ?? {};
11869
11891
  const result = {};
11870
- const keys = new Set([...Object.keys(ctx), ...Object.keys(prop)]);
11892
+ const keys = /* @__PURE__ */ new Set([...Object.keys(ctx), ...Object.keys(prop)]);
11871
11893
  for (const k of keys) {
11872
11894
  const vals = [ctx[k], prop[k]].filter(Boolean).join(" ");
11873
11895
  if (vals) result[k] = vals;
@@ -11878,7 +11900,7 @@
11878
11900
  const ctx = contextConfig.value.styles ?? {};
11879
11901
  const prop = props.styles ?? {};
11880
11902
  const result = {};
11881
- const keys = new Set([...Object.keys(ctx), ...Object.keys(prop)]);
11903
+ const keys = /* @__PURE__ */ new Set([...Object.keys(ctx), ...Object.keys(prop)]);
11882
11904
  for (const k of keys) result[k] = {
11883
11905
  ...ctx[k],
11884
11906
  ...prop[k]
@@ -12241,7 +12263,7 @@
12241
12263
  },
12242
12264
  setup(props, { slots }) {
12243
12265
  const attrs = (0, vue.useAttrs)();
12244
- (0, vue.provide)(XProviderContextKey, (0, vue.computed)(() => {
12266
+ const xProviderConfig = (0, vue.computed)(() => {
12245
12267
  return {
12246
12268
  attachments: props.attachments,
12247
12269
  actions: props.actions,
@@ -12258,7 +12280,8 @@
12258
12280
  thoughtChain: props.thoughtChain,
12259
12281
  welcome: props.welcome
12260
12282
  };
12261
- }));
12283
+ });
12284
+ (0, vue.provide)(XProviderContextKey, xProviderConfig);
12262
12285
  return () => (0, vue.createVNode)(antdv_next.ConfigProvider, (0, vue.mergeProps)(attrs, {
12263
12286
  "theme": props.theme,
12264
12287
  "locale": props.locale,
@@ -11,7 +11,7 @@ import { useConfig } from "antdv-next/config-provider/context";
11
11
  import { Button, Segmented, Tooltip } from "antdv-next";
12
12
  import { DownloadOutlined, ZoomInOutlined, ZoomOutOutlined } from "@antdv-next/icons";
13
13
  //#region components/mermaid/Mermaid.tsx
14
- var RenderType = /* @__PURE__ */ function(RenderType) {
14
+ var RenderType = /*#__PURE__*/ function(RenderType) {
15
15
  RenderType["Code"] = "code";
16
16
  RenderType["Image"] = "image";
17
17
  return RenderType;
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.2.0";
2
+ var version = "1.2.1-beta.1";
3
3
  //#endregion
4
4
  export { version };
@@ -5,7 +5,7 @@ import { classNames } from "@v-c/util";
5
5
  import { computed, createTextVNode, createVNode, defineComponent, nextTick, onBeforeUnmount, ref, render, watch } from "vue";
6
6
  import { Dropdown, Input } from "antdv-next";
7
7
  //#region components/sender/components/SlotTextArea.tsx
8
- var SUPPORTED_INPUT_TYPES = new Set([
8
+ var SUPPORTED_INPUT_TYPES = /* @__PURE__ */ new Set([
9
9
  "input",
10
10
  "select",
11
11
  "custom",
@@ -332,7 +332,8 @@ var SlotTextArea_default = /* @__PURE__ */ defineComponent({
332
332
  const setStartCursor = (preventScroll) => {
333
333
  const editable = editableRef.value;
334
334
  if (!editable) return;
335
- setCursorPosition(editable, skillDomRef.value ? 1 : 0, preventScroll);
335
+ const startIndex = skillDomRef.value ? 1 : 0;
336
+ setCursorPosition(editable, startIndex, preventScroll);
336
337
  };
337
338
  const setEndCursor = (preventScroll) => {
338
339
  const editable = editableRef.value;
@@ -23,7 +23,7 @@ var RecordingIcon_default = /* @__PURE__ */ defineComponent({
23
23
  "xmlns": "http://www.w3.org/2000/svg",
24
24
  "class": props.class
25
25
  }, [createVNode("title", null, [contextLocale.value.speechRecording]), Array.from({ length: COUNT }).map((_, index) => {
26
- const x = index * ((SIZE - RECT_WIDTH * COUNT) / (COUNT - 1) + RECT_WIDTH);
26
+ const x = index * 286.66666666666663;
27
27
  const yMin = SIZE / 2 - RECT_HEIGHT_MIN / 2;
28
28
  const yMax = SIZE / 2 - RECT_HEIGHT_MAX / 2;
29
29
  return createVNode("rect", {
@@ -21,7 +21,8 @@ function useSpeech(onSpeech, allowSpeech) {
21
21
  };
22
22
  permissionStatus = status;
23
23
  }).catch((error) => {
24
- warning(false, "Sender", `Browser does not support querying microphone permission. ${error instanceof Error ? error.message : String(error)}`);
24
+ const message = error instanceof Error ? error.message : String(error);
25
+ warning(false, "Sender", `Browser does not support querying microphone permission. ${message}`);
25
26
  });
26
27
  });
27
28
  onBeforeUnmount(() => {
@@ -62,8 +62,6 @@ function useActive(items, open, rtl, onCancel) {
62
62
  case "Escape":
63
63
  onCancel();
64
64
  event.preventDefault();
65
- break;
66
- default: break;
67
65
  }
68
66
  };
69
67
  watch([open, items], ([nextOpen, nextItems]) => {
@@ -5,6 +5,9 @@ var defaultPresetColors = {
5
5
  cyan: "#13C2C2",
6
6
  green: "#52C41A",
7
7
  magenta: "#EB2F96",
8
+ /**
9
+ * @deprecated Use magenta instead
10
+ */
8
11
  pink: "#EB2F96",
9
12
  red: "#F5222D",
10
13
  orange: "#FA8C16",
@@ -111,19 +111,19 @@ function formatToken(derivativeToken) {
111
111
  `,
112
112
  screenXS,
113
113
  screenXSMin: screenXS,
114
- screenXSMax: screenSM - 1,
114
+ screenXSMax: 575,
115
115
  screenSM,
116
116
  screenSMMin: screenSM,
117
- screenSMMax: screenMD - 1,
117
+ screenSMMax: 767,
118
118
  screenMD,
119
119
  screenMDMin: screenMD,
120
- screenMDMax: screenLG - 1,
120
+ screenMDMax: 991,
121
121
  screenLG,
122
122
  screenLGMin: screenLG,
123
- screenLGMax: screenXL - 1,
123
+ screenLGMax: 1199,
124
124
  screenXL,
125
125
  screenXLMin: screenXL,
126
- screenXLMax: screenXXL - 1,
126
+ screenXLMax: 1599,
127
127
  screenXXL,
128
128
  screenXXLMin: screenXXL,
129
129
  boxShadowPopoverArrow: "2px 2px 5px rgba(0, 0, 0, 0.05)",
@@ -142,14 +142,15 @@ var XThink = /* @__PURE__ */ defineComponent({
142
142
  });
143
143
  const prefixCls = computed(() => props.prefixCls);
144
144
  function renderContent() {
145
- return withDirectives(createVNode("div", { "ref": contentRef }, [createVNode("div", {
145
+ const node = createVNode("div", { "ref": contentRef }, [createVNode("div", {
146
146
  "class": [
147
147
  `${prefixCls.value}-content`,
148
148
  contextConfig.value.classes?.content,
149
149
  props.classes?.content
150
150
  ],
151
151
  "style": [contextConfig.value.styles?.content, props.styles?.content]
152
- }, [slots.default?.()])]), [[vShow, mergedExpanded.value]]);
152
+ }, [slots.default?.()])]);
153
+ return withDirectives(node, [[vShow, mergedExpanded.value]]);
153
154
  }
154
155
  expose({ get nativeElement() {
155
156
  return rootRef.value;
@@ -166,10 +166,11 @@ var Node_default = /* @__PURE__ */ defineComponent({
166
166
  const showContent = hasContent && (!collapsible || props.expanded);
167
167
  const destroyOnHidden = item.destroyOnHidden ?? true;
168
168
  const renderContent = () => {
169
- return withDirectives(createVNode("div", null, [createVNode("div", {
169
+ const node = createVNode("div", null, [createVNode("div", {
170
170
  "class": [`${cls}-content`, props.classes?.itemContent],
171
171
  "style": props.styles?.itemContent
172
- }, [createVNode("div", { "class": `${cls}-content-box` }, [contentNode])])]), [[vShow, showContent]]);
172
+ }, [createVNode("div", { "class": `${cls}-content-box` }, [contentNode])])]);
173
+ return withDirectives(node, [[vShow, showContent]]);
173
174
  };
174
175
  return createVNode("div", {
175
176
  "class": [`${cls}`, props.classes?.item],
@@ -87,7 +87,7 @@ var XThoughtChain = /* @__PURE__ */ defineComponent({
87
87
  const ctx = contextConfig.value.classes ?? {};
88
88
  const prop = props.classes ?? {};
89
89
  const result = {};
90
- const keys = new Set([...Object.keys(ctx), ...Object.keys(prop)]);
90
+ const keys = /* @__PURE__ */ new Set([...Object.keys(ctx), ...Object.keys(prop)]);
91
91
  for (const k of keys) {
92
92
  const vals = [ctx[k], prop[k]].filter(Boolean).join(" ");
93
93
  if (vals) result[k] = vals;
@@ -98,7 +98,7 @@ var XThoughtChain = /* @__PURE__ */ defineComponent({
98
98
  const ctx = contextConfig.value.styles ?? {};
99
99
  const prop = props.styles ?? {};
100
100
  const result = {};
101
- const keys = new Set([...Object.keys(ctx), ...Object.keys(prop)]);
101
+ const keys = /* @__PURE__ */ new Set([...Object.keys(ctx), ...Object.keys(prop)]);
102
102
  for (const k of keys) result[k] = {
103
103
  ...ctx[k],
104
104
  ...prop[k]
@@ -78,7 +78,7 @@ var XProvider = /* @__PURE__ */ defineComponent({
78
78
  },
79
79
  setup(props, { slots }) {
80
80
  const attrs = useAttrs();
81
- provide(XProviderContextKey, computed(() => {
81
+ const xProviderConfig = computed(() => {
82
82
  return {
83
83
  attachments: props.attachments,
84
84
  actions: props.actions,
@@ -95,7 +95,8 @@ var XProvider = /* @__PURE__ */ defineComponent({
95
95
  thoughtChain: props.thoughtChain,
96
96
  welcome: props.welcome
97
97
  };
98
- }));
98
+ });
99
+ provide(XProviderContextKey, xProviderConfig);
99
100
  return () => createVNode(ConfigProvider, mergeProps(attrs, {
100
101
  "theme": props.theme,
101
102
  "locale": props.locale,