@antdv-next/x 1.2.1-beta.1 → 1.2.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 (100) hide show
  1. package/dist/attachments/index.js +1 -2
  2. package/dist/code-highlighter/style/index.d.ts +51 -19
  3. package/dist/code-highlighter/style/index.js +44 -31
  4. package/dist/index.umd.js +54 -44
  5. package/dist/package.js +1 -1
  6. package/dist/sender/hooks/use-speech.js +1 -2
  7. package/dist/suggestion/useActive.js +2 -0
  8. package/dist/theme/util/alias.js +5 -5
  9. package/dist/think/Think.js +2 -3
  10. package/dist/thought-chain/Node.js +2 -3
  11. package/dist/x-provider/index.js +2 -3
  12. package/es/{_basePickBy-CrbncDqR.js → _basePickBy-BL4DHvHb.js} +1 -1
  13. package/es/{_baseUniq-B-qU_Imh.js → _baseUniq-CyFYmJd-.js} +7 -7
  14. package/es/antdv-next-x.esm.js +253 -245
  15. package/es/architecture-PBZL5I3N-M9p1teRv.js +3 -0
  16. package/es/{architectureDiagram-2XIMDMQ5-OvuktNfv.js → architectureDiagram-2XIMDMQ5-zW5aGalx.js} +99 -89
  17. package/es/{blockDiagram-WCTKOSBZ-CS-kh74L.js → blockDiagram-WCTKOSBZ-0QujSG-h.js} +36 -33
  18. package/es/{c4Diagram-IC4MRINW-BZGIF4Dk.js → c4Diagram-IC4MRINW-B7y07WFn.js} +24 -16
  19. package/es/{channel-DrSSYyxp.js → channel-CxLj88Pg.js} +1 -1
  20. package/es/{chunk-4BX2VUAB-Rm8-te6i.js → chunk-4BX2VUAB-CprgMM4u.js} +1 -1
  21. package/es/{chunk-55IACEB6-Tre45n-8.js → chunk-55IACEB6-BpkEkHy8.js} +1 -1
  22. package/es/{chunk-7R4GIKGN-scch4dXY.js → chunk-7R4GIKGN-mKY502R8.js} +6 -4
  23. package/es/{chunk-FMBD7UC4-JmekSPZP.js → chunk-FMBD7UC4-B88neS61.js} +1 -1
  24. package/es/{chunk-GEFDOKGD-BEzc6NZw.js → chunk-GEFDOKGD-oBEpn5hN.js} +67 -27
  25. package/es/chunk-GLR3WWYH-B2D9kjtF.js +41 -0
  26. package/es/chunk-HHEYEP7N-DcZkCke2.js +9 -0
  27. package/es/{chunk-JSJVCQXG-_l_UVbaa.js → chunk-JSJVCQXG-BbVOaXjl.js} +3 -3
  28. package/es/{chunk-KX2RTZJC-BUWM8pJz.js → chunk-KX2RTZJC-Dw3D7Wrw.js} +2 -2
  29. package/es/{chunk-KYZI473N-BSgb_E0Q.js → chunk-KYZI473N-33-uii7Y.js} +10 -10
  30. package/es/{chunk-MX3YWQON-D602L8pU.js → chunk-MX3YWQON-D4cz36rq.js} +1 -1
  31. package/es/{chunk-NQ4KR5QH-BPQV0i93.js → chunk-NQ4KR5QH-CprADZhD.js} +44 -40
  32. package/es/{chunk-O4XLMI2P-BMqc3iYa.js → chunk-O4XLMI2P-DBAvycZ-.js} +13 -14
  33. package/es/{chunk-PQ6SQG4A-DcYrzB1X.js → chunk-PQ6SQG4A-BITIwHAS.js} +2 -2
  34. package/es/{chunk-PU5JKC2W-TuGY6X1n.js → chunk-PU5JKC2W-DIl8TkGX.js} +22 -26
  35. package/es/{chunk-QZHKN3VN-CKbD02cl.js → chunk-QZHKN3VN-Cg0ROtzE.js} +1 -1
  36. package/es/{chunk-WL4C6EOR-B31ErTFp.js → chunk-WL4C6EOR-Bhp_3T_o.js} +15 -15
  37. package/es/chunk-XPW4576I-255j2Rgd.js +1146 -0
  38. package/es/{chunk-XZSTWKYB-DYKLwCEy.js → chunk-XZSTWKYB-kjAdbx6i.js} +266 -321
  39. package/es/{chunk-YBOYWFTD-CRiKEIiS.js → chunk-YBOYWFTD-C2IdGsg8.js} +5 -5
  40. package/es/classDiagram-VBA2DB6C-BQonl2jX.js +29 -0
  41. package/es/classDiagram-v2-RAHNMMFH-C9U3lqTc.js +29 -0
  42. package/es/{clone-yzFtXY5G.js → clone-DIGEZsKS.js} +1 -1
  43. package/es/{cose-bilkent-S5V4N54A-BM90wTBk.js → cose-bilkent-S5V4N54A-Cyxewg9z.js} +36 -31
  44. package/es/{cytoscape.esm-B_-hKv4-.js → cytoscape.esm-DBPri10E.js} +197 -155
  45. package/es/{dagre-DCYVBij1.js → dagre-BHOjJWBG.js} +26 -24
  46. package/es/{dagre-KLK3FWXG-Ced70SgJ.js → dagre-KLK3FWXG-CnJPDj7X.js} +17 -18
  47. package/es/{defaultLocale-yzzuPw6P.js → defaultLocale-aSMWOJHq.js} +4 -1
  48. package/es/{diagram-E7M64L7V-xZCloH_i.js → diagram-E7M64L7V-CBOCgbMd.js} +22 -24
  49. package/es/{diagram-IFDJBPK2-BTmFZhvz.js → diagram-IFDJBPK2-BtubJp0H.js} +11 -11
  50. package/es/{diagram-P4PSJMXO-DX_3B0LB.js → diagram-P4PSJMXO-CI30BBYG.js} +10 -10
  51. package/es/{dist-h4ggShny.js → dist-BpM0Gz7z.js} +1 -1
  52. package/es/{erDiagram-INFDFZHY-MJ_HVY-7.js → erDiagram-INFDFZHY-C8hYuPxm.js} +21 -21
  53. package/es/{flowDiagram-PKNHOUZH-CQIRy1sx.js → flowDiagram-PKNHOUZH-D5vrDkks.js} +40 -33
  54. package/es/{ganttDiagram-A5KZAMGK-Dw9bjWjx.js → ganttDiagram-A5KZAMGK-BmIEQBGq.js} +33 -21
  55. package/es/gitGraph-HDMCJU4V-x8fnR2OX.js +3 -0
  56. package/es/{gitGraphDiagram-K3NZZRJ6-Gk6FiGbZ.js → gitGraphDiagram-K3NZZRJ6-PO0pMJD3.js} +7 -7
  57. package/es/{graphlib-BMvIh7N7.js → graphlib-DqWOhV4K.js} +2 -2
  58. package/es/info-3K5VOQVL-CRBCVSej.js +3 -0
  59. package/es/{infoDiagram-LFFYTUFH-CS64-uil.js → infoDiagram-LFFYTUFH-DOcKfbXf.js} +4 -4
  60. package/es/{init-sjaVZO3f.js → init-Co4dhKfe.js} +3 -1
  61. package/es/isEmpty-BJdINx-6.js +35 -0
  62. package/es/{ishikawaDiagram-PHBUUO56-C_Hw5UnV.js → ishikawaDiagram-PHBUUO56-DM1elxPS.js} +12 -12
  63. package/es/{journeyDiagram-4ABVD52K-CFFyM4Ar.js → journeyDiagram-4ABVD52K-BnYWOH1P.js} +11 -11
  64. package/es/{kanban-definition-K7BYSVSG-B_R-mA10.js → kanban-definition-K7BYSVSG-Ys7nAs7y.js} +27 -26
  65. package/es/{katex-C-qdUNlg.js → katex-olkKUfKs.js} +52 -62
  66. package/es/{line-D05MESIS.js → line-Cm2n2y9Z.js} +1 -1
  67. package/es/{linear-B8tPH2Pw.js → linear-D-yDc6KG.js} +6 -4
  68. package/es/{mermaid-parser.core-C_69nk7j.js → mermaid-parser.core-DFgQn74w.js} +8 -8
  69. package/es/mermaid.core-BzgA0NbC.js +680 -0
  70. package/es/{mindmap-definition-YRQLILUH-qgGUYYe3.js → mindmap-definition-YRQLILUH-Ca8psfLi.js} +26 -24
  71. package/es/{ordinal-CNQzPcrr.js → ordinal-95c16pGC.js} +1 -1
  72. package/es/packet-RMMSAZCW-CyE-elPF.js +3 -0
  73. package/es/pie-UPGHQEXC-EfdQ-_OF.js +3 -0
  74. package/es/{pieDiagram-SKSYHLDU-B8-AVOmP.js → pieDiagram-SKSYHLDU-DhQSMJCw.js} +11 -11
  75. package/es/{quadrantDiagram-337W2JSQ-C2Z0CN4Z.js → quadrantDiagram-337W2JSQ-jOtIC8r0.js} +9 -9
  76. package/es/radar-KQ55EAFF-B68vkNB4.js +3 -0
  77. package/es/{requirementDiagram-Z7DCOOCP-Cdj7PwWC.js → requirementDiagram-Z7DCOOCP-CNngzPE4.js} +18 -18
  78. package/es/{rolldown-runtime-CEY2VRuR.js → rolldown-runtime-Dv1pqm0U.js} +2 -2
  79. package/es/{sankeyDiagram-WA2Y5GQK-BNmU-dM1.js → sankeyDiagram-WA2Y5GQK-BgsyVNdD.js} +9 -9
  80. package/es/{sequenceDiagram-2WXFIKYE-pj0uPf22.js → sequenceDiagram-2WXFIKYE-BAc5PP9P.js} +46 -34
  81. package/es/{shiki-runtime-7QG17np_.js → shiki-runtime-BlKUZiZP.js} +41 -44
  82. package/es/{src-Dynw_Lub.js → src-3T61hYex.js} +1 -1
  83. package/es/{stateDiagram-RAJIS63D-BgCfMnGb.js → stateDiagram-RAJIS63D-153LjStx.js} +18 -18
  84. package/es/stateDiagram-v2-FVOUBMTO-BXEvy1YD.js +27 -0
  85. package/es/{timeline-definition-YZTLITO2-Bj5QKnBI.js → timeline-definition-YZTLITO2-BLhlkb_X.js} +8 -8
  86. package/es/treemap-KZPCXAKY-Dg_ShzRB.js +3 -0
  87. package/es/{vennDiagram-LZ73GAT5-lpWcIvN6.js → vennDiagram-LZ73GAT5-BTYWphmf.js} +13 -13
  88. package/es/{xychartDiagram-JWTSCODW-De1M-7Yz.js → xychartDiagram-JWTSCODW-B9Nlu6S_.js} +29 -25
  89. package/package.json +1 -1
  90. package/es/architecture-PBZL5I3N-BRGGaMu3.js +0 -3
  91. package/es/classDiagram-VBA2DB6C-BDqwxUdU.js +0 -29
  92. package/es/classDiagram-v2-RAHNMMFH-DdmOjeUb.js +0 -29
  93. package/es/gitGraph-HDMCJU4V-oForq_Vw.js +0 -3
  94. package/es/info-3K5VOQVL-0F-ZLEMx.js +0 -3
  95. package/es/mermaid.core-BVGVwWcu.js +0 -1914
  96. package/es/packet-RMMSAZCW-CeqtQQ_e.js +0 -3
  97. package/es/pie-UPGHQEXC-BI60FhK4.js +0 -3
  98. package/es/radar-KQ55EAFF-CRwOOFw0.js +0 -3
  99. package/es/stateDiagram-v2-FVOUBMTO-ByMhP6Xo.js +0 -27
  100. package/es/treemap-KZPCXAKY-BlOAFUbR.js +0 -3
@@ -205,10 +205,9 @@ var XAttachments = /* @__PURE__ */ defineComponent({
205
205
  }
206
206
  });
207
207
  const getPlaceholderNode = (type, options) => {
208
- const placeholderContent = typeof props.placeholder === "function" ? props.placeholder(type) : props.placeholder;
209
208
  return createVNode(PlaceholderUploader, {
210
209
  "type": type,
211
- "placeholder": placeholderContent,
210
+ "placeholder": typeof props.placeholder === "function" ? props.placeholder(type) : props.placeholder,
212
211
  "upload": uploadProps.value,
213
212
  "prefixCls": props.prefixCls,
214
213
  "class": mergedClasses.value.placeholder,
@@ -1,51 +1,83 @@
1
1
  import { FullToken, GetDefaultToken } from '../../theme/interface';
2
2
  export interface ComponentToken {
3
3
  /**
4
- * 代码字体
4
+ * @desc 标题背景颜色
5
+ * @descEN Title background color
5
6
  */
6
- codeFontFamily?: string;
7
+ colorBgTitle?: string;
7
8
  /**
8
- * 代码字体大小
9
+ * @desc 暗色主题下标题背景颜色
10
+ * @descEN Title background color in dark theme
9
11
  */
10
- codeFontSize?: number;
12
+ colorBgTitleDark?: string;
11
13
  /**
12
- * 亮色主题下的代码文字颜色,用于语言未命中高亮时的降级文本
14
+ * @desc 标题文本颜色
15
+ * @descEN Title text color
13
16
  */
14
- codeColor?: string;
17
+ colorTextTitle?: string;
15
18
  /**
16
- * 暗色主题下的代码文字颜色,用于语言未命中高亮时的降级文本
19
+ * @desc 暗色主题下标题文本颜色
20
+ * @descEN Title text color in dark theme
17
21
  */
18
- codeColorDark?: string;
22
+ colorTextTitleDark?: string;
23
+ /**
24
+ * @desc 代码块边框颜色
25
+ * @descEN Code block border color
26
+ */
27
+ colorBorderCode?: string;
28
+ /**
29
+ * @desc 暗色主题下代码块边框颜色
30
+ * @descEN Code block border color in dark theme
31
+ */
32
+ colorBorderCodeDark?: string;
19
33
  /**
20
- * 亮色主题下代码区与行号栏的背景色
34
+ * @desc 代码区与行号栏背景色
35
+ * @descEN Background of the code area and gutter
21
36
  */
22
37
  codeBg?: string;
23
38
  /**
24
- * 暗色主题下代码区与行号栏的背景色
39
+ * @desc 暗色主题下代码区与行号栏背景色
40
+ * @descEN Background of the code area and gutter in dark theme
25
41
  */
26
42
  codeBgDark?: string;
27
43
  /**
28
- * 暗色主题下头部区域的背景色
44
+ * @desc 代码文字颜色(语言未命中高亮时降级)
45
+ * @descEN Code text color (fallback when language is not highlighted)
29
46
  */
30
- codeHeaderBgDark?: string;
47
+ codeColor?: string;
31
48
  /**
32
- * 暗色主题下头部与行号栏的分隔线颜色
49
+ * @desc 暗色主题下代码文字颜色(语言未命中高亮时降级)
50
+ * @descEN Code text color in dark theme (fallback when language is not highlighted)
33
51
  */
34
- codeBorderColorDark?: string;
52
+ codeColorDark?: string;
35
53
  /**
36
- * 暗色主题下语言标签的文字颜色
54
+ * @desc 行号文字颜色
55
+ * @descEN Line number color
37
56
  */
38
- codeLangColorDark?: string;
57
+ codeLineNumberColor?: string;
39
58
  /**
40
- * 暗色主题下行号的文字颜色
59
+ * @desc 暗色主题下行号文字颜色
60
+ * @descEN Line number color in dark theme
41
61
  */
42
62
  codeLineNumberColorDark?: string;
43
63
  /**
44
- * 暗色主题下头部操作按钮的文字颜色
64
+ * @desc 操作按钮文字颜色
65
+ * @descEN Action button color
66
+ */
67
+ codeBtnColor?: string;
68
+ /**
69
+ * @desc 暗色主题下操作按钮文字颜色
70
+ * @descEN Action button color in dark theme
45
71
  */
46
72
  codeBtnColorDark?: string;
47
73
  /**
48
- * 暗色主题下头部操作按钮悬浮态的背景色
74
+ * @desc 操作按钮悬浮背景色
75
+ * @descEN Action button hover background
76
+ */
77
+ codeBtnHoverBg?: string;
78
+ /**
79
+ * @desc 暗色主题下操作按钮悬浮背景色
80
+ * @descEN Action button hover background in dark theme
49
81
  */
50
82
  codeBtnHoverBgDark?: string;
51
83
  }
@@ -1,6 +1,7 @@
1
1
  import { genStyleHooks } from "../../theme/genStyleUtils.js";
2
2
  import { unit } from "@antdv-next/cssinjs";
3
3
  import { mergeToken } from "@antdv-next/cssinjs/cssinjs-utils";
4
+ import { FastColor } from "@ant-design/fast-color";
4
5
  //#region components/code-highlighter/style/index.ts
5
6
  var genCodeHighlighterStyle = (token) => {
6
7
  const { componentCls } = token;
@@ -8,21 +9,20 @@ var genCodeHighlighterStyle = (token) => {
8
9
  position: "relative",
9
10
  borderRadius: token.borderRadiusLG,
10
11
  overflow: "hidden",
11
- fontFamily: token.fontFamily,
12
12
  fontSize: token.fontSize,
13
- border: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
13
+ border: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderCode}`,
14
14
  [`${componentCls}-header`]: {
15
15
  display: "flex",
16
16
  alignItems: "center",
17
17
  justifyContent: "space-between",
18
18
  paddingInline: unit(token.paddingSM),
19
19
  paddingBlock: 4,
20
- borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
21
- backgroundColor: token.colorFillSecondary
20
+ borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderCode}`,
21
+ backgroundColor: token.colorBgTitle
22
22
  },
23
23
  [`${componentCls}-lang`]: {
24
24
  fontSize: token.fontSizeSM,
25
- color: token.colorTextSecondary,
25
+ color: token.colorTextTitle,
26
26
  fontWeight: 500,
27
27
  textTransform: "capitalize"
28
28
  },
@@ -31,7 +31,13 @@ var genCodeHighlighterStyle = (token) => {
31
31
  alignItems: "center",
32
32
  gap: token.paddingXXS
33
33
  },
34
- [`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: { color: token.colorTextSecondary },
34
+ [`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
35
+ color: `${token.codeBtnColor} !important`,
36
+ "&:hover, &:focus": {
37
+ color: `${token.codeBtnColor} !important`,
38
+ backgroundColor: `${token.codeBtnHoverBg} !important`
39
+ }
40
+ },
35
41
  [`${componentCls}-content`]: {
36
42
  display: "flex",
37
43
  overflow: "auto",
@@ -43,18 +49,18 @@ var genCodeHighlighterStyle = (token) => {
43
49
  paddingInline: unit(token.paddingXS),
44
50
  textAlign: "right",
45
51
  backgroundColor: token.codeBg,
46
- borderRight: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
52
+ borderRight: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderCode}`,
47
53
  userSelect: "none",
48
54
  flexShrink: 0,
49
55
  minWidth: "3em",
50
56
  lineHeight: "1.5em"
51
57
  },
52
58
  [`${componentCls}-line-number`]: {
53
- fontFamily: token.codeFontFamily,
54
- fontSize: unit(token.codeFontSize ?? 13),
59
+ fontFamily: token.fontFamilyCode,
60
+ fontSize: unit(token.fontSize),
55
61
  lineHeight: "1.5em",
56
62
  height: "1.5em",
57
- color: token.colorTextQuaternary,
63
+ color: token.codeLineNumberColor,
58
64
  display: "flex",
59
65
  alignItems: "center",
60
66
  justifyContent: "flex-end",
@@ -68,8 +74,8 @@ var genCodeHighlighterStyle = (token) => {
68
74
  margin: 0,
69
75
  padding: unit(token.paddingSM),
70
76
  backgroundColor: "transparent !important",
71
- fontFamily: token.codeFontFamily,
72
- fontSize: unit(token.codeFontSize ?? 13),
77
+ fontFamily: token.fontFamilyCode,
78
+ fontSize: unit(token.fontSize),
73
79
  lineHeight: "1.5em",
74
80
  overflow: "visible"
75
81
  },
@@ -82,12 +88,12 @@ var genCodeHighlighterStyle = (token) => {
82
88
  }
83
89
  },
84
90
  [`&${componentCls}-dark`]: {
85
- borderColor: token.colorBorder,
91
+ borderColor: token.colorBorderCodeDark,
86
92
  [`${componentCls}-header`]: {
87
- backgroundColor: token.codeHeaderBgDark,
88
- borderBottomColor: token.codeBorderColorDark
93
+ backgroundColor: token.colorBgTitleDark,
94
+ borderBottomColor: token.colorBorderCodeDark
89
95
  },
90
- [`${componentCls}-lang`]: { color: token.codeLangColorDark },
96
+ [`${componentCls}-lang`]: { color: token.colorTextTitleDark },
91
97
  [`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
92
98
  color: `${token.codeBtnColorDark} !important`,
93
99
  "&:hover, &:focus": {
@@ -98,27 +104,34 @@ var genCodeHighlighterStyle = (token) => {
98
104
  [`${componentCls}-content`]: { backgroundColor: token.codeBgDark },
99
105
  [`${componentCls}-line-numbers`]: {
100
106
  backgroundColor: token.codeBgDark,
101
- borderRightColor: token.codeBorderColorDark
107
+ borderRightColor: token.colorBorderCodeDark
102
108
  },
103
109
  [`${componentCls}-line-number`]: { color: token.codeLineNumberColorDark },
104
110
  [`${componentCls}-code`]: { color: token.codeColorDark }
105
111
  }
106
112
  } };
107
113
  };
108
- var prepareComponentToken = () => ({
109
- codeFontFamily: "'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace",
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"
121
- });
114
+ var prepareComponentToken = (token) => {
115
+ const isDarkApp = new FastColor(token.colorBgContainer).isDark();
116
+ return {
117
+ colorBgTitle: isDarkApp ? "#f0f0f0" : token.colorFillContent,
118
+ colorTextTitle: isDarkApp ? "rgba(0, 0, 0, 0.65)" : token.colorText,
119
+ colorBorderCode: isDarkApp ? "#f0f0f0" : token.colorBorderSecondary,
120
+ codeColor: isDarkApp ? "#393a34" : token.colorText,
121
+ codeBg: isDarkApp ? "#fafafa" : token.colorBgLayout,
122
+ codeLineNumberColor: isDarkApp ? "rgba(0, 0, 0, 0.25)" : token.colorTextQuaternary,
123
+ codeBtnColor: isDarkApp ? "rgba(0, 0, 0, 0.65)" : token.colorTextSecondary,
124
+ codeBtnHoverBg: isDarkApp ? "rgba(0, 0, 0, 0.06)" : token.colorFillSecondary,
125
+ colorBgTitleDark: isDarkApp ? token.colorFillContent : "#252526",
126
+ colorTextTitleDark: isDarkApp ? token.colorText : "#cccccc",
127
+ colorBorderCodeDark: isDarkApp ? token.colorBorder : "#3e3e42",
128
+ codeColorDark: isDarkApp ? token.colorText : "#dbd7caee",
129
+ codeBgDark: isDarkApp ? token.colorBgElevated : "#1e1e1e",
130
+ codeLineNumberColorDark: isDarkApp ? token.colorTextQuaternary : "#858585",
131
+ codeBtnColorDark: isDarkApp ? token.colorText : "#ffffff",
132
+ codeBtnHoverBgDark: isDarkApp ? token.colorFillSecondary : "#3e3e42"
133
+ };
134
+ };
122
135
  var style_default = genStyleHooks("CodeHighlighter", (token) => {
123
136
  return [genCodeHighlighterStyle(mergeToken(token, {}))];
124
137
  }, prepareComponentToken);
package/dist/index.umd.js CHANGED
@@ -56,7 +56,7 @@
56
56
  }
57
57
  return to;
58
58
  };
59
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
59
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
60
60
  value: mod,
61
61
  enumerable: true
62
62
  }) : target, mod));
@@ -66,7 +66,7 @@
66
66
  shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs, 1);
67
67
  shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs, 1);
68
68
  //#region package.json
69
- var version = "1.2.1-beta.1";
69
+ var version = "1.2.1";
70
70
  //#endregion
71
71
  //#region components/x-provider/context.ts
72
72
  var XProviderContextKey = Symbol("antdv-next-x-provider-context");
@@ -3165,10 +3165,9 @@
3165
3165
  }
3166
3166
  });
3167
3167
  const getPlaceholderNode = (type, options) => {
3168
- const placeholderContent = typeof props.placeholder === "function" ? props.placeholder(type) : props.placeholder;
3169
3168
  return (0, vue.createVNode)(PlaceholderUploader, {
3170
3169
  "type": type,
3171
- "placeholder": placeholderContent,
3170
+ "placeholder": typeof props.placeholder === "function" ? props.placeholder(type) : props.placeholder,
3172
3171
  "upload": uploadProps.value,
3173
3172
  "prefixCls": props.prefixCls,
3174
3173
  "class": mergedClasses.value.placeholder,
@@ -4897,21 +4896,20 @@
4897
4896
  position: "relative",
4898
4897
  borderRadius: token.borderRadiusLG,
4899
4898
  overflow: "hidden",
4900
- fontFamily: token.fontFamily,
4901
4899
  fontSize: token.fontSize,
4902
- border: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
4900
+ border: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderCode}`,
4903
4901
  [`${componentCls}-header`]: {
4904
4902
  display: "flex",
4905
4903
  alignItems: "center",
4906
4904
  justifyContent: "space-between",
4907
4905
  paddingInline: (0, _antdv_next_cssinjs.unit)(token.paddingSM),
4908
4906
  paddingBlock: 4,
4909
- borderBottom: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
4910
- backgroundColor: token.colorFillSecondary
4907
+ borderBottom: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderCode}`,
4908
+ backgroundColor: token.colorBgTitle
4911
4909
  },
4912
4910
  [`${componentCls}-lang`]: {
4913
4911
  fontSize: token.fontSizeSM,
4914
- color: token.colorTextSecondary,
4912
+ color: token.colorTextTitle,
4915
4913
  fontWeight: 500,
4916
4914
  textTransform: "capitalize"
4917
4915
  },
@@ -4920,7 +4918,13 @@
4920
4918
  alignItems: "center",
4921
4919
  gap: token.paddingXXS
4922
4920
  },
4923
- [`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: { color: token.colorTextSecondary },
4921
+ [`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
4922
+ color: `${token.codeBtnColor} !important`,
4923
+ "&:hover, &:focus": {
4924
+ color: `${token.codeBtnColor} !important`,
4925
+ backgroundColor: `${token.codeBtnHoverBg} !important`
4926
+ }
4927
+ },
4924
4928
  [`${componentCls}-content`]: {
4925
4929
  display: "flex",
4926
4930
  overflow: "auto",
@@ -4932,18 +4936,18 @@
4932
4936
  paddingInline: (0, _antdv_next_cssinjs.unit)(token.paddingXS),
4933
4937
  textAlign: "right",
4934
4938
  backgroundColor: token.codeBg,
4935
- borderRight: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
4939
+ borderRight: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderCode}`,
4936
4940
  userSelect: "none",
4937
4941
  flexShrink: 0,
4938
4942
  minWidth: "3em",
4939
4943
  lineHeight: "1.5em"
4940
4944
  },
4941
4945
  [`${componentCls}-line-number`]: {
4942
- fontFamily: token.codeFontFamily,
4943
- fontSize: (0, _antdv_next_cssinjs.unit)(token.codeFontSize ?? 13),
4946
+ fontFamily: token.fontFamilyCode,
4947
+ fontSize: (0, _antdv_next_cssinjs.unit)(token.fontSize),
4944
4948
  lineHeight: "1.5em",
4945
4949
  height: "1.5em",
4946
- color: token.colorTextQuaternary,
4950
+ color: token.codeLineNumberColor,
4947
4951
  display: "flex",
4948
4952
  alignItems: "center",
4949
4953
  justifyContent: "flex-end",
@@ -4957,8 +4961,8 @@
4957
4961
  margin: 0,
4958
4962
  padding: (0, _antdv_next_cssinjs.unit)(token.paddingSM),
4959
4963
  backgroundColor: "transparent !important",
4960
- fontFamily: token.codeFontFamily,
4961
- fontSize: (0, _antdv_next_cssinjs.unit)(token.codeFontSize ?? 13),
4964
+ fontFamily: token.fontFamilyCode,
4965
+ fontSize: (0, _antdv_next_cssinjs.unit)(token.fontSize),
4962
4966
  lineHeight: "1.5em",
4963
4967
  overflow: "visible"
4964
4968
  },
@@ -4971,12 +4975,12 @@
4971
4975
  }
4972
4976
  },
4973
4977
  [`&${componentCls}-dark`]: {
4974
- borderColor: token.colorBorder,
4978
+ borderColor: token.colorBorderCodeDark,
4975
4979
  [`${componentCls}-header`]: {
4976
- backgroundColor: token.codeHeaderBgDark,
4977
- borderBottomColor: token.codeBorderColorDark
4980
+ backgroundColor: token.colorBgTitleDark,
4981
+ borderBottomColor: token.colorBorderCodeDark
4978
4982
  },
4979
- [`${componentCls}-lang`]: { color: token.codeLangColorDark },
4983
+ [`${componentCls}-lang`]: { color: token.colorTextTitleDark },
4980
4984
  [`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
4981
4985
  color: `${token.codeBtnColorDark} !important`,
4982
4986
  "&:hover, &:focus": {
@@ -4987,27 +4991,34 @@
4987
4991
  [`${componentCls}-content`]: { backgroundColor: token.codeBgDark },
4988
4992
  [`${componentCls}-line-numbers`]: {
4989
4993
  backgroundColor: token.codeBgDark,
4990
- borderRightColor: token.codeBorderColorDark
4994
+ borderRightColor: token.colorBorderCodeDark
4991
4995
  },
4992
4996
  [`${componentCls}-line-number`]: { color: token.codeLineNumberColorDark },
4993
4997
  [`${componentCls}-code`]: { color: token.codeColorDark }
4994
4998
  }
4995
4999
  } };
4996
5000
  };
4997
- var prepareComponentToken$10 = () => ({
4998
- codeFontFamily: "'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace",
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"
5010
- });
5001
+ var prepareComponentToken$10 = (token) => {
5002
+ const isDarkApp = new _ant_design_fast_color.FastColor(token.colorBgContainer).isDark();
5003
+ return {
5004
+ colorBgTitle: isDarkApp ? "#f0f0f0" : token.colorFillContent,
5005
+ colorTextTitle: isDarkApp ? "rgba(0, 0, 0, 0.65)" : token.colorText,
5006
+ colorBorderCode: isDarkApp ? "#f0f0f0" : token.colorBorderSecondary,
5007
+ codeColor: isDarkApp ? "#393a34" : token.colorText,
5008
+ codeBg: isDarkApp ? "#fafafa" : token.colorBgLayout,
5009
+ codeLineNumberColor: isDarkApp ? "rgba(0, 0, 0, 0.25)" : token.colorTextQuaternary,
5010
+ codeBtnColor: isDarkApp ? "rgba(0, 0, 0, 0.65)" : token.colorTextSecondary,
5011
+ codeBtnHoverBg: isDarkApp ? "rgba(0, 0, 0, 0.06)" : token.colorFillSecondary,
5012
+ colorBgTitleDark: isDarkApp ? token.colorFillContent : "#252526",
5013
+ colorTextTitleDark: isDarkApp ? token.colorText : "#cccccc",
5014
+ colorBorderCodeDark: isDarkApp ? token.colorBorder : "#3e3e42",
5015
+ codeColorDark: isDarkApp ? token.colorText : "#dbd7caee",
5016
+ codeBgDark: isDarkApp ? token.colorBgElevated : "#1e1e1e",
5017
+ codeLineNumberColorDark: isDarkApp ? token.colorTextQuaternary : "#858585",
5018
+ codeBtnColorDark: isDarkApp ? token.colorText : "#ffffff",
5019
+ codeBtnHoverBgDark: isDarkApp ? token.colorFillSecondary : "#3e3e42"
5020
+ };
5021
+ };
5011
5022
  var style_default$10 = genStyleHooks("CodeHighlighter", (token) => {
5012
5023
  return [genCodeHighlighterStyle((0, _antdv_next_cssinjs_cssinjs_utils.mergeToken)(token, {}))];
5013
5024
  }, prepareComponentToken$10);
@@ -10787,6 +10798,8 @@
10787
10798
  case "Escape":
10788
10799
  onCancel();
10789
10800
  event.preventDefault();
10801
+ break;
10802
+ default: break;
10790
10803
  }
10791
10804
  };
10792
10805
  (0, vue.watch)([open, items], ([nextOpen, nextItems]) => {
@@ -11203,15 +11216,14 @@
11203
11216
  });
11204
11217
  const prefixCls = (0, vue.computed)(() => props.prefixCls);
11205
11218
  function renderContent() {
11206
- const node = (0, vue.createVNode)("div", { "ref": contentRef }, [(0, vue.createVNode)("div", {
11219
+ return (0, vue.withDirectives)((0, vue.createVNode)("div", { "ref": contentRef }, [(0, vue.createVNode)("div", {
11207
11220
  "class": [
11208
11221
  `${prefixCls.value}-content`,
11209
11222
  contextConfig.value.classes?.content,
11210
11223
  props.classes?.content
11211
11224
  ],
11212
11225
  "style": [contextConfig.value.styles?.content, props.styles?.content]
11213
- }, [slots.default?.()])]);
11214
- return (0, vue.withDirectives)(node, [[vue.vShow, mergedExpanded.value]]);
11226
+ }, [slots.default?.()])]), [[vue.vShow, mergedExpanded.value]]);
11215
11227
  }
11216
11228
  expose({ get nativeElement() {
11217
11229
  return rootRef.value;
@@ -11775,11 +11787,10 @@
11775
11787
  const showContent = hasContent && (!collapsible || props.expanded);
11776
11788
  const destroyOnHidden = item.destroyOnHidden ?? true;
11777
11789
  const renderContent = () => {
11778
- const node = (0, vue.createVNode)("div", null, [(0, vue.createVNode)("div", {
11790
+ return (0, vue.withDirectives)((0, vue.createVNode)("div", null, [(0, vue.createVNode)("div", {
11779
11791
  "class": [`${cls}-content`, props.classes?.itemContent],
11780
11792
  "style": props.styles?.itemContent
11781
- }, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]);
11782
- return (0, vue.withDirectives)(node, [[vue.vShow, showContent]]);
11793
+ }, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]), [[vue.vShow, showContent]]);
11783
11794
  };
11784
11795
  return (0, vue.createVNode)("div", {
11785
11796
  "class": [`${cls}`, props.classes?.item],
@@ -12263,7 +12274,7 @@
12263
12274
  },
12264
12275
  setup(props, { slots }) {
12265
12276
  const attrs = (0, vue.useAttrs)();
12266
- const xProviderConfig = (0, vue.computed)(() => {
12277
+ (0, vue.provide)(XProviderContextKey, (0, vue.computed)(() => {
12267
12278
  return {
12268
12279
  attachments: props.attachments,
12269
12280
  actions: props.actions,
@@ -12280,8 +12291,7 @@
12280
12291
  thoughtChain: props.thoughtChain,
12281
12292
  welcome: props.welcome
12282
12293
  };
12283
- });
12284
- (0, vue.provide)(XProviderContextKey, xProviderConfig);
12294
+ }));
12285
12295
  return () => (0, vue.createVNode)(antdv_next.ConfigProvider, (0, vue.mergeProps)(attrs, {
12286
12296
  "theme": props.theme,
12287
12297
  "locale": props.locale,
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.2.1-beta.1";
2
+ var version = "1.2.1";
3
3
  //#endregion
4
4
  export { version };
@@ -21,8 +21,7 @@ function useSpeech(onSpeech, allowSpeech) {
21
21
  };
22
22
  permissionStatus = status;
23
23
  }).catch((error) => {
24
- const message = error instanceof Error ? error.message : String(error);
25
- warning(false, "Sender", `Browser does not support querying microphone permission. ${message}`);
24
+ warning(false, "Sender", `Browser does not support querying microphone permission. ${error instanceof Error ? error.message : String(error)}`);
26
25
  });
27
26
  });
28
27
  onBeforeUnmount(() => {
@@ -62,6 +62,8 @@ function useActive(items, open, rtl, onCancel) {
62
62
  case "Escape":
63
63
  onCancel();
64
64
  event.preventDefault();
65
+ break;
66
+ default: break;
65
67
  }
66
68
  };
67
69
  watch([open, items], ([nextOpen, nextItems]) => {
@@ -111,19 +111,19 @@ function formatToken(derivativeToken) {
111
111
  `,
112
112
  screenXS,
113
113
  screenXSMin: screenXS,
114
- screenXSMax: 575,
114
+ screenXSMax: screenSM - 1,
115
115
  screenSM,
116
116
  screenSMMin: screenSM,
117
- screenSMMax: 767,
117
+ screenSMMax: screenMD - 1,
118
118
  screenMD,
119
119
  screenMDMin: screenMD,
120
- screenMDMax: 991,
120
+ screenMDMax: screenLG - 1,
121
121
  screenLG,
122
122
  screenLGMin: screenLG,
123
- screenLGMax: 1199,
123
+ screenLGMax: screenXL - 1,
124
124
  screenXL,
125
125
  screenXLMin: screenXL,
126
- screenXLMax: 1599,
126
+ screenXLMax: screenXXL - 1,
127
127
  screenXXL,
128
128
  screenXXLMin: screenXXL,
129
129
  boxShadowPopoverArrow: "2px 2px 5px rgba(0, 0, 0, 0.05)",
@@ -142,15 +142,14 @@ var XThink = /* @__PURE__ */ defineComponent({
142
142
  });
143
143
  const prefixCls = computed(() => props.prefixCls);
144
144
  function renderContent() {
145
- const node = createVNode("div", { "ref": contentRef }, [createVNode("div", {
145
+ return withDirectives(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?.()])]);
153
- return withDirectives(node, [[vShow, mergedExpanded.value]]);
152
+ }, [slots.default?.()])]), [[vShow, mergedExpanded.value]]);
154
153
  }
155
154
  expose({ get nativeElement() {
156
155
  return rootRef.value;
@@ -166,11 +166,10 @@ 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
- const node = createVNode("div", null, [createVNode("div", {
169
+ return withDirectives(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])])]);
173
- return withDirectives(node, [[vShow, showContent]]);
172
+ }, [createVNode("div", { "class": `${cls}-content-box` }, [contentNode])])]), [[vShow, showContent]]);
174
173
  };
175
174
  return createVNode("div", {
176
175
  "class": [`${cls}`, props.classes?.item],
@@ -78,7 +78,7 @@ var XProvider = /* @__PURE__ */ defineComponent({
78
78
  },
79
79
  setup(props, { slots }) {
80
80
  const attrs = useAttrs();
81
- const xProviderConfig = computed(() => {
81
+ provide(XProviderContextKey, computed(() => {
82
82
  return {
83
83
  attachments: props.attachments,
84
84
  actions: props.actions,
@@ -95,8 +95,7 @@ var XProvider = /* @__PURE__ */ defineComponent({
95
95
  thoughtChain: props.thoughtChain,
96
96
  welcome: props.welcome
97
97
  };
98
- });
99
- provide(XProviderContextKey, xProviderConfig);
98
+ }));
100
99
  return () => createVNode(ConfigProvider, mergeProps(attrs, {
101
100
  "theme": props.theme,
102
101
  "locale": props.locale,
@@ -1,5 +1,5 @@
1
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-Dqk_yOP-.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-B-qU_Imh.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-CyFYmJd-.js";
3
3
  //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js
4
4
  var C = /\s/;
5
5
  function w(e) {