@antdv-next/x 1.2.1-beta.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/attachments/index.js +1 -2
- package/dist/code-highlighter/style/index.d.ts +51 -19
- package/dist/code-highlighter/style/index.js +44 -31
- package/dist/index.umd.js +133 -52
- package/dist/package.js +1 -1
- package/dist/sender/hooks/use-speech.js +1 -2
- package/dist/suggestion/Suggestion.js +37 -6
- package/dist/suggestion/useActive.d.ts +1 -1
- package/dist/suggestion/useActive.js +44 -2
- package/dist/theme/util/alias.js +5 -5
- package/dist/think/Think.js +2 -3
- package/dist/thought-chain/Node.js +2 -3
- package/dist/x-provider/index.js +2 -3
- package/es/{_basePickBy-CrbncDqR.js → _basePickBy-BL4DHvHb.js} +1 -1
- package/es/{_baseUniq-B-qU_Imh.js → _baseUniq-CyFYmJd-.js} +7 -7
- package/es/antdv-next-x.esm.js +374 -335
- package/es/architecture-PBZL5I3N-M9p1teRv.js +3 -0
- package/es/{architectureDiagram-2XIMDMQ5-OvuktNfv.js → architectureDiagram-2XIMDMQ5-zW5aGalx.js} +99 -89
- package/es/{blockDiagram-WCTKOSBZ-CS-kh74L.js → blockDiagram-WCTKOSBZ-0QujSG-h.js} +36 -33
- package/es/{c4Diagram-IC4MRINW-BZGIF4Dk.js → c4Diagram-IC4MRINW-B7y07WFn.js} +24 -16
- package/es/{channel-DrSSYyxp.js → channel-CxLj88Pg.js} +1 -1
- package/es/{chunk-4BX2VUAB-Rm8-te6i.js → chunk-4BX2VUAB-CprgMM4u.js} +1 -1
- package/es/{chunk-55IACEB6-Tre45n-8.js → chunk-55IACEB6-BpkEkHy8.js} +1 -1
- package/es/{chunk-7R4GIKGN-scch4dXY.js → chunk-7R4GIKGN-mKY502R8.js} +6 -4
- package/es/{chunk-FMBD7UC4-JmekSPZP.js → chunk-FMBD7UC4-B88neS61.js} +1 -1
- package/es/{chunk-GEFDOKGD-BEzc6NZw.js → chunk-GEFDOKGD-oBEpn5hN.js} +67 -27
- package/es/chunk-GLR3WWYH-B2D9kjtF.js +41 -0
- package/es/chunk-HHEYEP7N-DcZkCke2.js +9 -0
- package/es/{chunk-JSJVCQXG-_l_UVbaa.js → chunk-JSJVCQXG-BbVOaXjl.js} +3 -3
- package/es/{chunk-KX2RTZJC-BUWM8pJz.js → chunk-KX2RTZJC-Dw3D7Wrw.js} +2 -2
- package/es/{chunk-KYZI473N-BSgb_E0Q.js → chunk-KYZI473N-33-uii7Y.js} +10 -10
- package/es/{chunk-MX3YWQON-D602L8pU.js → chunk-MX3YWQON-D4cz36rq.js} +1 -1
- package/es/{chunk-NQ4KR5QH-BPQV0i93.js → chunk-NQ4KR5QH-CprADZhD.js} +44 -40
- package/es/{chunk-O4XLMI2P-BMqc3iYa.js → chunk-O4XLMI2P-DBAvycZ-.js} +13 -14
- package/es/{chunk-PQ6SQG4A-DcYrzB1X.js → chunk-PQ6SQG4A-BITIwHAS.js} +2 -2
- package/es/{chunk-PU5JKC2W-TuGY6X1n.js → chunk-PU5JKC2W-DIl8TkGX.js} +22 -26
- package/es/{chunk-QZHKN3VN-CKbD02cl.js → chunk-QZHKN3VN-Cg0ROtzE.js} +1 -1
- package/es/{chunk-WL4C6EOR-B31ErTFp.js → chunk-WL4C6EOR-Bhp_3T_o.js} +15 -15
- package/es/chunk-XPW4576I-255j2Rgd.js +1146 -0
- package/es/{chunk-XZSTWKYB-DYKLwCEy.js → chunk-XZSTWKYB-kjAdbx6i.js} +266 -321
- package/es/{chunk-YBOYWFTD-CRiKEIiS.js → chunk-YBOYWFTD-C2IdGsg8.js} +5 -5
- package/es/classDiagram-VBA2DB6C-BQonl2jX.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-C9U3lqTc.js +29 -0
- package/es/{clone-yzFtXY5G.js → clone-DIGEZsKS.js} +1 -1
- package/es/{cose-bilkent-S5V4N54A-BM90wTBk.js → cose-bilkent-S5V4N54A-Cyxewg9z.js} +36 -31
- package/es/{cytoscape.esm-B_-hKv4-.js → cytoscape.esm-DBPri10E.js} +197 -155
- package/es/{dagre-DCYVBij1.js → dagre-BHOjJWBG.js} +26 -24
- package/es/{dagre-KLK3FWXG-Ced70SgJ.js → dagre-KLK3FWXG-CnJPDj7X.js} +17 -18
- package/es/{defaultLocale-yzzuPw6P.js → defaultLocale-aSMWOJHq.js} +4 -1
- package/es/{diagram-E7M64L7V-xZCloH_i.js → diagram-E7M64L7V-CBOCgbMd.js} +22 -24
- package/es/{diagram-IFDJBPK2-BTmFZhvz.js → diagram-IFDJBPK2-BtubJp0H.js} +11 -11
- package/es/{diagram-P4PSJMXO-DX_3B0LB.js → diagram-P4PSJMXO-CI30BBYG.js} +10 -10
- package/es/{dist-h4ggShny.js → dist-BpM0Gz7z.js} +1 -1
- package/es/{erDiagram-INFDFZHY-MJ_HVY-7.js → erDiagram-INFDFZHY-C8hYuPxm.js} +21 -21
- package/es/{flowDiagram-PKNHOUZH-CQIRy1sx.js → flowDiagram-PKNHOUZH-D5vrDkks.js} +40 -33
- package/es/{ganttDiagram-A5KZAMGK-Dw9bjWjx.js → ganttDiagram-A5KZAMGK-BmIEQBGq.js} +33 -21
- package/es/gitGraph-HDMCJU4V-x8fnR2OX.js +3 -0
- package/es/{gitGraphDiagram-K3NZZRJ6-Gk6FiGbZ.js → gitGraphDiagram-K3NZZRJ6-PO0pMJD3.js} +7 -7
- package/es/{graphlib-BMvIh7N7.js → graphlib-DqWOhV4K.js} +2 -2
- package/es/info-3K5VOQVL-CRBCVSej.js +3 -0
- package/es/{infoDiagram-LFFYTUFH-CS64-uil.js → infoDiagram-LFFYTUFH-DOcKfbXf.js} +4 -4
- package/es/{init-sjaVZO3f.js → init-Co4dhKfe.js} +3 -1
- package/es/isEmpty-BJdINx-6.js +35 -0
- package/es/{ishikawaDiagram-PHBUUO56-C_Hw5UnV.js → ishikawaDiagram-PHBUUO56-DM1elxPS.js} +12 -12
- package/es/{journeyDiagram-4ABVD52K-CFFyM4Ar.js → journeyDiagram-4ABVD52K-BnYWOH1P.js} +11 -11
- package/es/{kanban-definition-K7BYSVSG-B_R-mA10.js → kanban-definition-K7BYSVSG-Ys7nAs7y.js} +27 -26
- package/es/{katex-C-qdUNlg.js → katex-olkKUfKs.js} +52 -62
- package/es/{line-D05MESIS.js → line-Cm2n2y9Z.js} +1 -1
- package/es/{linear-B8tPH2Pw.js → linear-D-yDc6KG.js} +6 -4
- package/es/{mermaid-parser.core-C_69nk7j.js → mermaid-parser.core-DFgQn74w.js} +8 -8
- package/es/mermaid.core-BzgA0NbC.js +680 -0
- package/es/{mindmap-definition-YRQLILUH-qgGUYYe3.js → mindmap-definition-YRQLILUH-Ca8psfLi.js} +26 -24
- package/es/{ordinal-CNQzPcrr.js → ordinal-95c16pGC.js} +1 -1
- package/es/packet-RMMSAZCW-CyE-elPF.js +3 -0
- package/es/pie-UPGHQEXC-EfdQ-_OF.js +3 -0
- package/es/{pieDiagram-SKSYHLDU-B8-AVOmP.js → pieDiagram-SKSYHLDU-DhQSMJCw.js} +11 -11
- package/es/{quadrantDiagram-337W2JSQ-C2Z0CN4Z.js → quadrantDiagram-337W2JSQ-jOtIC8r0.js} +9 -9
- package/es/radar-KQ55EAFF-B68vkNB4.js +3 -0
- package/es/{requirementDiagram-Z7DCOOCP-Cdj7PwWC.js → requirementDiagram-Z7DCOOCP-CNngzPE4.js} +18 -18
- package/es/{rolldown-runtime-CEY2VRuR.js → rolldown-runtime-Dv1pqm0U.js} +2 -2
- package/es/{sankeyDiagram-WA2Y5GQK-BNmU-dM1.js → sankeyDiagram-WA2Y5GQK-BgsyVNdD.js} +9 -9
- package/es/{sequenceDiagram-2WXFIKYE-pj0uPf22.js → sequenceDiagram-2WXFIKYE-BAc5PP9P.js} +46 -34
- package/es/{shiki-runtime-7QG17np_.js → shiki-runtime-BlKUZiZP.js} +41 -44
- package/es/{src-Dynw_Lub.js → src-3T61hYex.js} +1 -1
- package/es/{stateDiagram-RAJIS63D-BgCfMnGb.js → stateDiagram-RAJIS63D-153LjStx.js} +18 -18
- package/es/stateDiagram-v2-FVOUBMTO-BXEvy1YD.js +27 -0
- package/es/{timeline-definition-YZTLITO2-Bj5QKnBI.js → timeline-definition-YZTLITO2-BLhlkb_X.js} +8 -8
- package/es/treemap-KZPCXAKY-Dg_ShzRB.js +3 -0
- package/es/{vennDiagram-LZ73GAT5-lpWcIvN6.js → vennDiagram-LZ73GAT5-BTYWphmf.js} +13 -13
- package/es/{xychartDiagram-JWTSCODW-De1M-7Yz.js → xychartDiagram-JWTSCODW-B9Nlu6S_.js} +29 -25
- package/package.json +1 -1
- package/es/architecture-PBZL5I3N-BRGGaMu3.js +0 -3
- package/es/classDiagram-VBA2DB6C-BDqwxUdU.js +0 -29
- package/es/classDiagram-v2-RAHNMMFH-DdmOjeUb.js +0 -29
- package/es/gitGraph-HDMCJU4V-oForq_Vw.js +0 -3
- package/es/info-3K5VOQVL-0F-ZLEMx.js +0 -3
- package/es/mermaid.core-BVGVwWcu.js +0 -1914
- package/es/packet-RMMSAZCW-CeqtQQ_e.js +0 -3
- package/es/pie-UPGHQEXC-BI60FhK4.js +0 -3
- package/es/radar-KQ55EAFF-CRwOOFw0.js +0 -3
- package/es/stateDiagram-v2-FVOUBMTO-ByMhP6Xo.js +0 -27
- 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":
|
|
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
|
-
|
|
7
|
+
colorBgTitle?: string;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* @desc 暗色主题下标题背景颜色
|
|
10
|
+
* @descEN Title background color in dark theme
|
|
9
11
|
*/
|
|
10
|
-
|
|
12
|
+
colorBgTitleDark?: string;
|
|
11
13
|
/**
|
|
12
|
-
*
|
|
14
|
+
* @desc 标题文本颜色
|
|
15
|
+
* @descEN Title text color
|
|
13
16
|
*/
|
|
14
|
-
|
|
17
|
+
colorTextTitle?: string;
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
19
|
+
* @desc 暗色主题下标题文本颜色
|
|
20
|
+
* @descEN Title text color in dark theme
|
|
17
21
|
*/
|
|
18
|
-
|
|
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
|
-
|
|
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
|
-
|
|
52
|
+
codeColorDark?: string;
|
|
35
53
|
/**
|
|
36
|
-
*
|
|
54
|
+
* @desc 行号文字颜色
|
|
55
|
+
* @descEN Line number color
|
|
37
56
|
*/
|
|
38
|
-
|
|
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.
|
|
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.
|
|
21
|
-
backgroundColor: token.
|
|
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.
|
|
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`]: {
|
|
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.
|
|
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.
|
|
54
|
-
fontSize: unit(token.
|
|
59
|
+
fontFamily: token.fontFamilyCode,
|
|
60
|
+
fontSize: unit(token.fontSize),
|
|
55
61
|
lineHeight: "1.5em",
|
|
56
62
|
height: "1.5em",
|
|
57
|
-
color: token.
|
|
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.
|
|
72
|
-
fontSize: unit(token.
|
|
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.
|
|
91
|
+
borderColor: token.colorBorderCodeDark,
|
|
86
92
|
[`${componentCls}-header`]: {
|
|
87
|
-
backgroundColor: token.
|
|
88
|
-
borderBottomColor: token.
|
|
93
|
+
backgroundColor: token.colorBgTitleDark,
|
|
94
|
+
borderBottomColor: token.colorBorderCodeDark
|
|
89
95
|
},
|
|
90
|
-
[`${componentCls}-lang`]: { color: token.
|
|
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.
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
|
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.
|
|
69
|
+
var version = "1.2.2";
|
|
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":
|
|
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.
|
|
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.
|
|
4910
|
-
backgroundColor: token.
|
|
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.
|
|
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`]: {
|
|
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.
|
|
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.
|
|
4943
|
-
fontSize: (0, _antdv_next_cssinjs.unit)(token.
|
|
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.
|
|
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.
|
|
4961
|
-
fontSize: (0, _antdv_next_cssinjs.unit)(token.
|
|
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.
|
|
4978
|
+
borderColor: token.colorBorderCodeDark,
|
|
4975
4979
|
[`${componentCls}-header`]: {
|
|
4976
|
-
backgroundColor: token.
|
|
4977
|
-
borderBottomColor: token.
|
|
4980
|
+
backgroundColor: token.colorBgTitleDark,
|
|
4981
|
+
borderBottomColor: token.colorBorderCodeDark
|
|
4978
4982
|
},
|
|
4979
|
-
[`${componentCls}-lang`]: { color: token.
|
|
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.
|
|
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
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
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);
|
|
@@ -10726,6 +10737,13 @@
|
|
|
10726
10737
|
//#endregion
|
|
10727
10738
|
//#region components/suggestion/useActive.ts
|
|
10728
10739
|
/**
|
|
10740
|
+
* An Enter pressed with a modifier or while an IME is composing belongs to the trigger
|
|
10741
|
+
* (submit, newline, candidate confirmation), never to the suggestion list.
|
|
10742
|
+
*/
|
|
10743
|
+
function isPlainEnter(event) {
|
|
10744
|
+
return !event.isComposing && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey;
|
|
10745
|
+
}
|
|
10746
|
+
/**
|
|
10729
10747
|
* Cascader does not expose active item control, so we use `value` to mirror focus path.
|
|
10730
10748
|
*/
|
|
10731
10749
|
function useActive(items, open, rtl, onCancel) {
|
|
@@ -10756,6 +10774,26 @@
|
|
|
10756
10774
|
const firstItem = getItems(activePaths.value.length + 1)[0];
|
|
10757
10775
|
if (firstItem) activePaths.value = [...activePaths.value, firstItem.value];
|
|
10758
10776
|
};
|
|
10777
|
+
const getActiveItem = () => {
|
|
10778
|
+
let currentItems = items.value;
|
|
10779
|
+
let activeItem;
|
|
10780
|
+
for (const activePath of activePaths.value) {
|
|
10781
|
+
activeItem = currentItems.find((item) => item.value === activePath);
|
|
10782
|
+
if (!activeItem) return void 0;
|
|
10783
|
+
currentItems = activeItem.children || [];
|
|
10784
|
+
}
|
|
10785
|
+
return activeItem;
|
|
10786
|
+
};
|
|
10787
|
+
/**
|
|
10788
|
+
* Whether this Enter belongs to the popup: it needs an open popup, a plain Enter and a
|
|
10789
|
+
* leaf item to select. Anything else stays with the trigger, so the input can still
|
|
10790
|
+
* submit, insert a newline or confirm an IME candidate.
|
|
10791
|
+
*/
|
|
10792
|
+
const shouldSelectOnEnter = (event) => {
|
|
10793
|
+
if (!open.value || !isPlainEnter(event)) return false;
|
|
10794
|
+
const activeItem = getActiveItem();
|
|
10795
|
+
return !!activeItem && !activeItem.children?.length;
|
|
10796
|
+
};
|
|
10759
10797
|
const onKeyDown = (event) => {
|
|
10760
10798
|
if (!open.value) return;
|
|
10761
10799
|
switch (event.key) {
|
|
@@ -10781,18 +10819,33 @@
|
|
|
10781
10819
|
event.preventDefault();
|
|
10782
10820
|
event.stopPropagation();
|
|
10783
10821
|
break;
|
|
10784
|
-
case "Enter":
|
|
10822
|
+
case "Enter": {
|
|
10823
|
+
if (!isPlainEnter(event)) break;
|
|
10824
|
+
const activeItem = getActiveItem();
|
|
10825
|
+
if (!activeItem) break;
|
|
10785
10826
|
event.preventDefault();
|
|
10827
|
+
if (activeItem.children?.length) {
|
|
10828
|
+
offsetNext();
|
|
10829
|
+
event.stopPropagation();
|
|
10830
|
+
}
|
|
10786
10831
|
return false;
|
|
10832
|
+
}
|
|
10787
10833
|
case "Escape":
|
|
10788
10834
|
onCancel();
|
|
10789
10835
|
event.preventDefault();
|
|
10836
|
+
event.stopPropagation();
|
|
10837
|
+
break;
|
|
10838
|
+
default: break;
|
|
10790
10839
|
}
|
|
10791
10840
|
};
|
|
10792
10841
|
(0, vue.watch)([open, items], ([nextOpen, nextItems]) => {
|
|
10793
10842
|
if (nextOpen && Array.isArray(nextItems) && nextItems.length > 0) activePaths.value = [nextItems[0].value];
|
|
10794
10843
|
}, { immediate: true });
|
|
10795
|
-
return [
|
|
10844
|
+
return [
|
|
10845
|
+
activePaths,
|
|
10846
|
+
onKeyDown,
|
|
10847
|
+
shouldSelectOnEnter
|
|
10848
|
+
];
|
|
10796
10849
|
}
|
|
10797
10850
|
//#endregion
|
|
10798
10851
|
//#region components/suggestion/index.tsx
|
|
@@ -10875,10 +10928,18 @@
|
|
|
10875
10928
|
const innerOpen = (0, vue.ref)(false);
|
|
10876
10929
|
const mergedOpen = (0, vue.computed)(() => props.open ?? innerOpen.value);
|
|
10877
10930
|
const itemList = (0, vue.ref)([]);
|
|
10931
|
+
/**
|
|
10932
|
+
* What the last `onTrigger` asked for. A function `items` is usually an inline arrow,
|
|
10933
|
+
* so it gets a new identity on every parent render — without this the watcher below
|
|
10934
|
+
* would re-evaluate it with no info and drop the triggered list.
|
|
10935
|
+
*/
|
|
10936
|
+
const triggerInfo = (0, vue.ref)();
|
|
10937
|
+
const resolveItems = (source, info) => {
|
|
10938
|
+
if (typeof source === "function") return source(info);
|
|
10939
|
+
return Array.isArray(source) ? source : [];
|
|
10940
|
+
};
|
|
10878
10941
|
(0, vue.watch)(() => props.items, (nextItems) => {
|
|
10879
|
-
|
|
10880
|
-
else if (typeof nextItems === "function") itemList.value = nextItems();
|
|
10881
|
-
else itemList.value = [];
|
|
10942
|
+
itemList.value = resolveItems(nextItems, triggerInfo.value);
|
|
10882
10943
|
}, { immediate: true });
|
|
10883
10944
|
const triggerOpen = (nextOpen) => {
|
|
10884
10945
|
if (props.open === void 0) innerOpen.value = nextOpen;
|
|
@@ -10893,7 +10954,8 @@
|
|
|
10893
10954
|
triggerOpen(false);
|
|
10894
10955
|
return;
|
|
10895
10956
|
}
|
|
10896
|
-
|
|
10957
|
+
triggerInfo.value = nextInfo;
|
|
10958
|
+
if (typeof props.items === "function") itemList.value = resolveItems(props.items, nextInfo);
|
|
10897
10959
|
triggerOpen(true);
|
|
10898
10960
|
};
|
|
10899
10961
|
const onInternalChange = (valuePath, selectedOptions) => {
|
|
@@ -10903,10 +10965,31 @@
|
|
|
10903
10965
|
if (lastValue !== void 0) emit("select", String(lastValue), selected);
|
|
10904
10966
|
triggerOpen(false);
|
|
10905
10967
|
};
|
|
10906
|
-
const [activePath, onKeyDown] = useActive(itemList, mergedOpen, isRtl, onClose);
|
|
10968
|
+
const [activePath, onKeyDown, shouldSelectOnEnter] = useActive(itemList, mergedOpen, isRtl, onClose);
|
|
10907
10969
|
const onInternalOpenChange = (nextOpen) => {
|
|
10908
10970
|
if (!nextOpen) onClose();
|
|
10909
10971
|
};
|
|
10972
|
+
/**
|
|
10973
|
+
* Cascader renders our children as its raw input element, so every keydown from the
|
|
10974
|
+
* children bubbles into BaseSelect's keyboard model. That model is built for a
|
|
10975
|
+
* non-editable trigger and breaks typing inside an editable one such as Sender:
|
|
10976
|
+
*
|
|
10977
|
+
* - Space is always `preventDefault()`ed, so no space can be typed;
|
|
10978
|
+
* - Enter is always `preventDefault()`ed, even when there is nothing to select;
|
|
10979
|
+
* - Backspace makes the option list step back a level or close the popup.
|
|
10980
|
+
*
|
|
10981
|
+
* Keep exactly those inside the content wrapper. Every other key — Escape, arrows,
|
|
10982
|
+
* application shortcuts — must keep bubbling, otherwise the app around us stops
|
|
10983
|
+
* receiving keyboard events while the trigger has focus.
|
|
10984
|
+
*/
|
|
10985
|
+
const onContentKeyDown = (event) => {
|
|
10986
|
+
const { key } = event;
|
|
10987
|
+
if (key === "Enter") {
|
|
10988
|
+
if (!shouldSelectOnEnter(event)) event.stopPropagation();
|
|
10989
|
+
return;
|
|
10990
|
+
}
|
|
10991
|
+
if (key === " " || key === "Backspace" && mergedOpen.value) event.stopPropagation();
|
|
10992
|
+
};
|
|
10910
10993
|
const domAttrs = (0, vue.computed)(() => {
|
|
10911
10994
|
const { class: _class, style: _style, ...rest } = attrs;
|
|
10912
10995
|
return rest;
|
|
@@ -10980,7 +11063,8 @@
|
|
|
10980
11063
|
contextConfig.value.classes?.content,
|
|
10981
11064
|
mergedClasses.value.content
|
|
10982
11065
|
],
|
|
10983
|
-
"style": [contextConfig.value.styles?.content, mergedStyles.value.content]
|
|
11066
|
+
"style": [contextConfig.value.styles?.content, mergedStyles.value.content],
|
|
11067
|
+
"onKeydown": onContentKeyDown
|
|
10984
11068
|
}, [childNode])])] });
|
|
10985
11069
|
};
|
|
10986
11070
|
}
|
|
@@ -11203,15 +11287,14 @@
|
|
|
11203
11287
|
});
|
|
11204
11288
|
const prefixCls = (0, vue.computed)(() => props.prefixCls);
|
|
11205
11289
|
function renderContent() {
|
|
11206
|
-
|
|
11290
|
+
return (0, vue.withDirectives)((0, vue.createVNode)("div", { "ref": contentRef }, [(0, vue.createVNode)("div", {
|
|
11207
11291
|
"class": [
|
|
11208
11292
|
`${prefixCls.value}-content`,
|
|
11209
11293
|
contextConfig.value.classes?.content,
|
|
11210
11294
|
props.classes?.content
|
|
11211
11295
|
],
|
|
11212
11296
|
"style": [contextConfig.value.styles?.content, props.styles?.content]
|
|
11213
|
-
}, [slots.default?.()])]);
|
|
11214
|
-
return (0, vue.withDirectives)(node, [[vue.vShow, mergedExpanded.value]]);
|
|
11297
|
+
}, [slots.default?.()])]), [[vue.vShow, mergedExpanded.value]]);
|
|
11215
11298
|
}
|
|
11216
11299
|
expose({ get nativeElement() {
|
|
11217
11300
|
return rootRef.value;
|
|
@@ -11775,11 +11858,10 @@
|
|
|
11775
11858
|
const showContent = hasContent && (!collapsible || props.expanded);
|
|
11776
11859
|
const destroyOnHidden = item.destroyOnHidden ?? true;
|
|
11777
11860
|
const renderContent = () => {
|
|
11778
|
-
|
|
11861
|
+
return (0, vue.withDirectives)((0, vue.createVNode)("div", null, [(0, vue.createVNode)("div", {
|
|
11779
11862
|
"class": [`${cls}-content`, props.classes?.itemContent],
|
|
11780
11863
|
"style": props.styles?.itemContent
|
|
11781
|
-
}, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]);
|
|
11782
|
-
return (0, vue.withDirectives)(node, [[vue.vShow, showContent]]);
|
|
11864
|
+
}, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]), [[vue.vShow, showContent]]);
|
|
11783
11865
|
};
|
|
11784
11866
|
return (0, vue.createVNode)("div", {
|
|
11785
11867
|
"class": [`${cls}`, props.classes?.item],
|
|
@@ -12263,7 +12345,7 @@
|
|
|
12263
12345
|
},
|
|
12264
12346
|
setup(props, { slots }) {
|
|
12265
12347
|
const attrs = (0, vue.useAttrs)();
|
|
12266
|
-
|
|
12348
|
+
(0, vue.provide)(XProviderContextKey, (0, vue.computed)(() => {
|
|
12267
12349
|
return {
|
|
12268
12350
|
attachments: props.attachments,
|
|
12269
12351
|
actions: props.actions,
|
|
@@ -12280,8 +12362,7 @@
|
|
|
12280
12362
|
thoughtChain: props.thoughtChain,
|
|
12281
12363
|
welcome: props.welcome
|
|
12282
12364
|
};
|
|
12283
|
-
});
|
|
12284
|
-
(0, vue.provide)(XProviderContextKey, xProviderConfig);
|
|
12365
|
+
}));
|
|
12285
12366
|
return () => (0, vue.createVNode)(antdv_next.ConfigProvider, (0, vue.mergeProps)(attrs, {
|
|
12286
12367
|
"theme": props.theme,
|
|
12287
12368
|
"locale": props.locale,
|
package/dist/package.js
CHANGED
|
@@ -21,8 +21,7 @@ function useSpeech(onSpeech, allowSpeech) {
|
|
|
21
21
|
};
|
|
22
22
|
permissionStatus = status;
|
|
23
23
|
}).catch((error) => {
|
|
24
|
-
|
|
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(() => {
|