@antdv-next/x 1.2.0 → 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.
- package/dist/actions/ActionsFeedback.js +1 -1
- package/dist/actions/ActionsItem.js +1 -1
- package/dist/attachments/index.js +1 -2
- package/dist/bubble/hooks/useCompatibleScroll.js +1 -1
- package/dist/code-highlighter/CodeHighlighter.js +2 -1
- package/dist/code-highlighter/shiki.js +1 -1
- package/dist/code-highlighter/style/index.d.ts +76 -4
- package/dist/code-highlighter/style/index.js +54 -29
- package/dist/folder/Folder.js +2 -1
- package/dist/index.umd.js +82 -49
- package/dist/mermaid/Mermaid.js +1 -1
- package/dist/package.js +1 -1
- package/dist/sender/components/SlotTextArea.js +3 -2
- package/dist/sender/components/SpeechButton/RecordingIcon.js +1 -1
- package/dist/theme/themes/seed.js +3 -0
- package/dist/thought-chain/ThoughtChain.js +2 -2
- package/es/Serializer-Sc9uEpQk.js +262 -0
- package/es/{_basePickBy-DFHEGO2M.js → _basePickBy-BL4DHvHb.js} +2 -2
- package/es/{_baseUniq-BlS7rXTs.js → _baseUniq-CyFYmJd-.js} +3 -3
- package/es/antdv-next-x.esm.js +2708 -2688
- package/es/{arc-BuXEd18J.js → arc-NI3ROx5X.js} +2 -2
- package/es/architecture-PBZL5I3N-M9p1teRv.js +3 -0
- package/es/{architectureDiagram-2XIMDMQ5-CmfsCwJk.js → architectureDiagram-2XIMDMQ5-zW5aGalx.js} +52 -52
- package/es/{blockDiagram-WCTKOSBZ-lJAan65A.js → blockDiagram-WCTKOSBZ-0QujSG-h.js} +20 -18
- package/es/{c4Diagram-IC4MRINW-B1c2x_1Q.js → c4Diagram-IC4MRINW-B7y07WFn.js} +6 -6
- package/es/{channel-DFgF_2F7.js → channel-CxLj88Pg.js} +1 -1
- package/es/{chunk-4BX2VUAB-J2N81Fpp.js → chunk-4BX2VUAB-CprgMM4u.js} +1 -1
- package/es/{chunk-55IACEB6-DGtfGRgi.js → chunk-55IACEB6-BpkEkHy8.js} +1 -1
- package/es/{chunk-7R4GIKGN-QT6IorJ_.js → chunk-7R4GIKGN-mKY502R8.js} +8 -6
- package/es/{chunk-FMBD7UC4-DCcRjunY.js → chunk-FMBD7UC4-B88neS61.js} +1 -1
- package/es/{chunk-GEFDOKGD-BWpC-zoH.js → chunk-GEFDOKGD-oBEpn5hN.js} +7 -7
- package/es/{chunk-GLR3WWYH-DiXcKb5Y.js → chunk-GLR3WWYH-B2D9kjtF.js} +9 -9
- package/es/{chunk-HHEYEP7N-Cxc7E4dX.js → chunk-HHEYEP7N-DcZkCke2.js} +2 -2
- package/es/{chunk-JSJVCQXG-D8_heHOp.js → chunk-JSJVCQXG-BbVOaXjl.js} +3 -3
- package/es/{chunk-KX2RTZJC-D5cc4rj6.js → chunk-KX2RTZJC-Dw3D7Wrw.js} +2 -2
- package/es/{chunk-KYZI473N-BHJ3T5Zv.js → chunk-KYZI473N-33-uii7Y.js} +7 -7
- package/es/{chunk-MX3YWQON-BxE-Aq9c.js → chunk-MX3YWQON-D4cz36rq.js} +1 -1
- package/es/{chunk-NQ4KR5QH-EYQBXkqP.js → chunk-NQ4KR5QH-CprADZhD.js} +7 -7
- package/es/{chunk-O4XLMI2P-qjOoGpnx.js → chunk-O4XLMI2P-DBAvycZ-.js} +10 -10
- package/es/{chunk-PQ6SQG4A-D3jtNCWN.js → chunk-PQ6SQG4A-BITIwHAS.js} +2 -2
- package/es/{chunk-PU5JKC2W-DdP8BS-S.js → chunk-PU5JKC2W-DIl8TkGX.js} +5 -5
- package/es/{chunk-QZHKN3VN-CW3cFN-h.js → chunk-QZHKN3VN-Cg0ROtzE.js} +1 -1
- package/es/{chunk-WL4C6EOR-BDbxJyGk.js → chunk-WL4C6EOR-Bhp_3T_o.js} +12 -10
- package/es/{chunk-XPW4576I-B0KVSHwE.js → chunk-XPW4576I-255j2Rgd.js} +2 -2
- package/es/{chunk-XZSTWKYB-CucN1XvM.js → chunk-XZSTWKYB-kjAdbx6i.js} +1589 -1541
- package/es/{chunk-YBOYWFTD-CvaddD9G.js → chunk-YBOYWFTD-C2IdGsg8.js} +3 -3
- package/es/classDiagram-VBA2DB6C-BQonl2jX.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-C9U3lqTc.js +29 -0
- package/es/{clone-r3YukIBB.js → clone-DIGEZsKS.js} +1 -1
- package/es/{cose-bilkent-S5V4N54A-B5OQuIhl.js → cose-bilkent-S5V4N54A-Cyxewg9z.js} +20 -20
- package/es/css-CRY9BUqw.js +2 -0
- package/es/{cytoscape.esm-i2CZcWd-.js → cytoscape.esm-DBPri10E.js} +121 -124
- package/es/{dagre-5aGJFKmT.js → dagre-BHOjJWBG.js} +6 -6
- package/es/{dagre-KLK3FWXG-BI5QQMXo.js → dagre-KLK3FWXG-CnJPDj7X.js} +18 -15
- package/es/{diagram-E7M64L7V-Dz62Vz_a.js → diagram-E7M64L7V-CBOCgbMd.js} +63 -63
- package/es/{diagram-IFDJBPK2-9fjvFkSc.js → diagram-IFDJBPK2-BtubJp0H.js} +20 -20
- package/es/{diagram-P4PSJMXO-BlX6jFjZ.js → diagram-P4PSJMXO-CI30BBYG.js} +17 -17
- package/es/{dist-BX_roQzC.js → dist-BpM0Gz7z.js} +1 -1
- package/es/{erDiagram-INFDFZHY-BcRXu8Cp.js → erDiagram-INFDFZHY-C8hYuPxm.js} +14 -14
- package/es/{flowDiagram-PKNHOUZH-UeyfgU8z.js → flowDiagram-PKNHOUZH-D5vrDkks.js} +18 -18
- package/es/{ganttDiagram-A5KZAMGK-txCzqgQ5.js → ganttDiagram-A5KZAMGK-BmIEQBGq.js} +25 -26
- package/es/gitGraph-HDMCJU4V-x8fnR2OX.js +3 -0
- package/es/{gitGraphDiagram-K3NZZRJ6-DghWYaFU.js → gitGraphDiagram-K3NZZRJ6-PO0pMJD3.js} +20 -20
- package/es/{graphlib-dRkI1OCL.js → graphlib-DqWOhV4K.js} +4 -4
- package/es/{html-CWvNBSxv.js → html-C4rrmxbP.js} +2 -2
- package/es/info-3K5VOQVL-CRBCVSej.js +3 -0
- package/es/{infoDiagram-LFFYTUFH-CA-vlAvP.js → infoDiagram-LFFYTUFH-DOcKfbXf.js} +9 -9
- package/es/{isArrayLikeObject-jl2bjkAJ.js → isArrayLikeObject-Dqk_yOP-.js} +5 -4
- package/es/{isEmpty-CmA-HYrg.js → isEmpty-BJdINx-6.js} +1 -1
- package/es/{ishikawaDiagram-PHBUUO56-DjdpS9Lb.js → ishikawaDiagram-PHBUUO56-DM1elxPS.js} +6 -6
- package/es/javascript--0qAxhnA.js +2 -0
- package/es/{journeyDiagram-4ABVD52K-CIJfC1fp.js → journeyDiagram-4ABVD52K-BnYWOH1P.js} +9 -9
- package/es/{kanban-definition-K7BYSVSG-CC2vwGck.js → kanban-definition-K7BYSVSG-Ys7nAs7y.js} +11 -11
- package/es/{katex-DCMiIo1z.js → katex-olkKUfKs.js} +16 -16
- package/es/{line-Cu9NTacD.js → line-Cm2n2y9Z.js} +3 -3
- package/es/{linear-C0rAYYmp.js → linear-D-yDc6KG.js} +3 -3
- package/es/mermaid-parser.core-DFgQn74w.js +259 -0
- package/es/{mermaid.core-Bvy_Q6Hu.js → mermaid.core-BzgA0NbC.js} +45 -45
- package/es/{mindmap-definition-YRQLILUH-BzTYDYmK.js → mindmap-definition-YRQLILUH-Ca8psfLi.js} +14 -14
- package/es/{ordinal-F3U6aXtP.js → ordinal-95c16pGC.js} +1 -1
- package/es/packet-RMMSAZCW-CyE-elPF.js +3 -0
- package/es/{path-Dm3C8WEs.js → path-CqWAdh69.js} +4 -7
- package/es/pie-UPGHQEXC-EfdQ-_OF.js +3 -0
- package/es/{pieDiagram-SKSYHLDU-COvqE_C6.js → pieDiagram-SKSYHLDU-DhQSMJCw.js} +48 -48
- package/es/{quadrantDiagram-337W2JSQ-Dgv8ccjt.js → quadrantDiagram-337W2JSQ-jOtIC8r0.js} +4 -4
- package/es/radar-KQ55EAFF-B68vkNB4.js +3 -0
- package/es/{requirementDiagram-Z7DCOOCP-B2NyhxO-.js → requirementDiagram-Z7DCOOCP-CNngzPE4.js} +13 -13
- package/es/{chunk-WQLz0Won.js → rolldown-runtime-Dv1pqm0U.js} +8 -1
- package/es/{rough.esm-BhGP2Udb.js → rough.esm-D1ibUQD-.js} +1 -1
- package/es/{sankeyDiagram-WA2Y5GQK-BfnH_gpl.js → sankeyDiagram-WA2Y5GQK-BgsyVNdD.js} +4 -4
- package/es/{sequenceDiagram-2WXFIKYE-DXssVQOF.js → sequenceDiagram-2WXFIKYE-BAc5PP9P.js} +98 -98
- package/es/{shiki-runtime-D0MO6er5.js → shiki-runtime-BlKUZiZP.js} +944 -952
- package/es/{src-CUQ6oOYk.js → src-3T61hYex.js} +26 -26
- package/es/{stateDiagram-RAJIS63D-DvDLfupV.js → stateDiagram-RAJIS63D-153LjStx.js} +16 -16
- package/es/stateDiagram-v2-FVOUBMTO-BXEvy1YD.js +27 -0
- package/es/{timeline-definition-YZTLITO2-ErcRjbZf.js → timeline-definition-YZTLITO2-BLhlkb_X.js} +4 -4
- package/es/treemap-KZPCXAKY-Dg_ShzRB.js +3 -0
- package/es/{vennDiagram-LZ73GAT5-CDTZUtc8.js → vennDiagram-LZ73GAT5-BTYWphmf.js} +8 -8
- package/es/{xychartDiagram-JWTSCODW-Y21jBOTg.js → xychartDiagram-JWTSCODW-B9Nlu6S_.js} +10 -10
- package/package.json +1 -1
- package/es/Serializer-D1JYN1kI.js +0 -262
- package/es/architecture-PBZL5I3N-D7tS55xM.js +0 -3
- package/es/chunk-7E7YKBS2-CL2d4WAf.js +0 -23
- package/es/chunk-C72U2L5F-OHTVpS-m.js +0 -23
- package/es/chunk-EGIJ26TM-DyMPGYrB.js +0 -23
- package/es/chunk-L3YUKLVL-7oGaUOdc.js +0 -23
- package/es/chunk-OZEHJAEY-D82nx27s.js +0 -64
- package/es/chunk-R5LLSJPH-CreI2kO9.js +0 -35
- package/es/chunk-XIRO2GV7-S5KkbVnN.js +0 -30
- package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +0 -29
- package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +0 -29
- package/es/css-Bi5OTYo2.js +0 -2
- package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +0 -3
- package/es/info-3K5VOQVL-COqdvM99.js +0 -3
- package/es/javascript-CjdDmufJ.js +0 -2
- package/es/mermaid-parser.core-7Wn2L29P.js +0 -59
- package/es/packet-RMMSAZCW-2PTjWKLd.js +0 -3
- package/es/pie-UPGHQEXC-Du8-k-EA.js +0 -3
- package/es/radar-KQ55EAFF-jJOhyjxC.js +0 -3
- package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +0 -27
- package/es/treemap-KZPCXAKY-CvZAIYVa.js +0 -3
- /package/es/{array-CWNufkl9.js → array-CApNbSU9.js} +0 -0
- /package/es/{css-v5r4VtJ6.js → css-DVAQAvTD.js} +0 -0
- /package/es/{defaultLocale-bckJcYh1.js → defaultLocale-aSMWOJHq.js} +0 -0
- /package/es/{init-B75p2clj.js → init-Co4dhKfe.js} +0 -0
- /package/es/{javascript-o_jd8Ivw.js → javascript-Bk0bJ4nQ.js} +0 -0
- /package/es/{json-DqMXJlo0.js → json-CAwkMa5O.js} +0 -0
- /package/es/{math-CoDOuve-.js → math-BZ_bUCIA.js} +0 -0
- /package/es/{python-CQPNJfOt.js → python-D0AaDoWC.js} +0 -0
- /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 =
|
|
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 =
|
|
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";
|
|
@@ -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,
|
|
@@ -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 >= -
|
|
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
|
-
|
|
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,13 +1,85 @@
|
|
|
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;
|
|
13
|
+
/**
|
|
14
|
+
* @desc 标题文本颜色
|
|
15
|
+
* @descEN Title text color
|
|
16
|
+
*/
|
|
17
|
+
colorTextTitle?: string;
|
|
18
|
+
/**
|
|
19
|
+
* @desc 暗色主题下标题文本颜色
|
|
20
|
+
* @descEN Title text color in dark theme
|
|
21
|
+
*/
|
|
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;
|
|
33
|
+
/**
|
|
34
|
+
* @desc 代码区与行号栏背景色
|
|
35
|
+
* @descEN Background of the code area and gutter
|
|
36
|
+
*/
|
|
37
|
+
codeBg?: string;
|
|
38
|
+
/**
|
|
39
|
+
* @desc 暗色主题下代码区与行号栏背景色
|
|
40
|
+
* @descEN Background of the code area and gutter in dark theme
|
|
41
|
+
*/
|
|
42
|
+
codeBgDark?: string;
|
|
43
|
+
/**
|
|
44
|
+
* @desc 代码文字颜色(语言未命中高亮时降级)
|
|
45
|
+
* @descEN Code text color (fallback when language is not highlighted)
|
|
46
|
+
*/
|
|
47
|
+
codeColor?: string;
|
|
48
|
+
/**
|
|
49
|
+
* @desc 暗色主题下代码文字颜色(语言未命中高亮时降级)
|
|
50
|
+
* @descEN Code text color in dark theme (fallback when language is not highlighted)
|
|
51
|
+
*/
|
|
52
|
+
codeColorDark?: string;
|
|
53
|
+
/**
|
|
54
|
+
* @desc 行号文字颜色
|
|
55
|
+
* @descEN Line number color
|
|
56
|
+
*/
|
|
57
|
+
codeLineNumberColor?: string;
|
|
58
|
+
/**
|
|
59
|
+
* @desc 暗色主题下行号文字颜色
|
|
60
|
+
* @descEN Line number color in dark theme
|
|
61
|
+
*/
|
|
62
|
+
codeLineNumberColorDark?: string;
|
|
63
|
+
/**
|
|
64
|
+
* @desc 操作按钮文字颜色
|
|
65
|
+
* @descEN Action button color
|
|
66
|
+
*/
|
|
67
|
+
codeBtnColor?: string;
|
|
68
|
+
/**
|
|
69
|
+
* @desc 暗色主题下操作按钮文字颜色
|
|
70
|
+
* @descEN Action button color in dark theme
|
|
71
|
+
*/
|
|
72
|
+
codeBtnColorDark?: string;
|
|
73
|
+
/**
|
|
74
|
+
* @desc 操作按钮悬浮背景色
|
|
75
|
+
* @descEN Action button hover background
|
|
76
|
+
*/
|
|
77
|
+
codeBtnHoverBg?: string;
|
|
78
|
+
/**
|
|
79
|
+
* @desc 暗色主题下操作按钮悬浮背景色
|
|
80
|
+
* @descEN Action button hover background in dark theme
|
|
81
|
+
*/
|
|
82
|
+
codeBtnHoverBgDark?: string;
|
|
11
83
|
}
|
|
12
84
|
export interface CodeHighlighterToken extends FullToken<"CodeHighlighter"> {
|
|
13
85
|
}
|
|
@@ -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,30 +31,36 @@ 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",
|
|
38
|
-
backgroundColor:
|
|
44
|
+
backgroundColor: token.codeBg,
|
|
39
45
|
alignItems: "stretch"
|
|
40
46
|
},
|
|
41
47
|
[`${componentCls}-line-numbers`]: {
|
|
42
48
|
paddingBlock: unit(token.paddingSM),
|
|
43
49
|
paddingInline: unit(token.paddingXS),
|
|
44
50
|
textAlign: "right",
|
|
45
|
-
backgroundColor:
|
|
46
|
-
borderRight: `${unit(token.lineWidth)} ${token.lineType} ${token.
|
|
51
|
+
backgroundColor: token.codeBg,
|
|
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",
|
|
@@ -63,12 +69,13 @@ var genCodeHighlighterStyle = (token) => {
|
|
|
63
69
|
[`${componentCls}-code`]: {
|
|
64
70
|
flex: 1,
|
|
65
71
|
overflow: "auto",
|
|
72
|
+
color: token.codeColor,
|
|
66
73
|
"& > pre": {
|
|
67
74
|
margin: 0,
|
|
68
75
|
padding: unit(token.paddingSM),
|
|
69
76
|
backgroundColor: "transparent !important",
|
|
70
|
-
fontFamily: token.
|
|
71
|
-
fontSize: unit(token.
|
|
77
|
+
fontFamily: token.fontFamilyCode,
|
|
78
|
+
fontSize: unit(token.fontSize),
|
|
72
79
|
lineHeight: "1.5em",
|
|
73
80
|
overflow: "visible"
|
|
74
81
|
},
|
|
@@ -81,32 +88,50 @@ var genCodeHighlighterStyle = (token) => {
|
|
|
81
88
|
}
|
|
82
89
|
},
|
|
83
90
|
[`&${componentCls}-dark`]: {
|
|
84
|
-
borderColor: token.
|
|
91
|
+
borderColor: token.colorBorderCodeDark,
|
|
85
92
|
[`${componentCls}-header`]: {
|
|
86
|
-
backgroundColor:
|
|
87
|
-
borderBottomColor:
|
|
93
|
+
backgroundColor: token.colorBgTitleDark,
|
|
94
|
+
borderBottomColor: token.colorBorderCodeDark
|
|
88
95
|
},
|
|
89
|
-
[`${componentCls}-lang`]: { color:
|
|
96
|
+
[`${componentCls}-lang`]: { color: token.colorTextTitleDark },
|
|
90
97
|
[`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
|
|
91
|
-
color:
|
|
98
|
+
color: `${token.codeBtnColorDark} !important`,
|
|
92
99
|
"&:hover, &:focus": {
|
|
93
|
-
color:
|
|
94
|
-
backgroundColor:
|
|
100
|
+
color: `${token.codeBtnColorDark} !important`,
|
|
101
|
+
backgroundColor: `${token.codeBtnHoverBgDark} !important`
|
|
95
102
|
}
|
|
96
103
|
},
|
|
97
|
-
[`${componentCls}-content`]: { backgroundColor:
|
|
104
|
+
[`${componentCls}-content`]: { backgroundColor: token.codeBgDark },
|
|
98
105
|
[`${componentCls}-line-numbers`]: {
|
|
99
|
-
backgroundColor:
|
|
100
|
-
borderRightColor:
|
|
106
|
+
backgroundColor: token.codeBgDark,
|
|
107
|
+
borderRightColor: token.colorBorderCodeDark
|
|
101
108
|
},
|
|
102
|
-
[`${componentCls}-line-number`]: { color:
|
|
109
|
+
[`${componentCls}-line-number`]: { color: token.codeLineNumberColorDark },
|
|
110
|
+
[`${componentCls}-code`]: { color: token.codeColorDark }
|
|
103
111
|
}
|
|
104
112
|
} };
|
|
105
113
|
};
|
|
106
|
-
var prepareComponentToken = () =>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
+
};
|
|
110
135
|
var style_default = genStyleHooks("CodeHighlighter", (token) => {
|
|
111
136
|
return [genCodeHighlighterStyle(mergeToken(token, {}))];
|
|
112
137
|
}, prepareComponentToken);
|
package/dist/folder/Folder.js
CHANGED
|
@@ -195,7 +195,8 @@ var XFolder = /* @__PURE__ */ defineComponent({
|
|
|
195
195
|
if (props.fileContentService) {
|
|
196
196
|
loadingContent.value = true;
|
|
197
197
|
try {
|
|
198
|
-
|
|
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) => () =>
|
|
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, {
|
|
@@ -54,12 +61,12 @@
|
|
|
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.
|
|
69
|
+
var version = "1.2.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 =
|
|
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 =
|
|
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";
|
|
@@ -3158,10 +3165,9 @@
|
|
|
3158
3165
|
}
|
|
3159
3166
|
});
|
|
3160
3167
|
const getPlaceholderNode = (type, options) => {
|
|
3161
|
-
const placeholderContent = typeof props.placeholder === "function" ? props.placeholder(type) : props.placeholder;
|
|
3162
3168
|
return (0, vue.createVNode)(PlaceholderUploader, {
|
|
3163
3169
|
"type": type,
|
|
3164
|
-
"placeholder":
|
|
3170
|
+
"placeholder": typeof props.placeholder === "function" ? props.placeholder(type) : props.placeholder,
|
|
3165
3171
|
"upload": uploadProps.value,
|
|
3166
3172
|
"prefixCls": props.prefixCls,
|
|
3167
3173
|
"class": mergedClasses.value.placeholder,
|
|
@@ -4425,7 +4431,7 @@
|
|
|
4425
4431
|
const contentDom = contentDomRef.value;
|
|
4426
4432
|
if (!scrollDom || !contentDom) return;
|
|
4427
4433
|
const { top, intoView, intoViewDom } = option || {};
|
|
4428
|
-
if (isReverse(scrollDom)) if (top !== void 0 && top >= -
|
|
4434
|
+
if (isReverse(scrollDom)) if (top !== void 0 && top >= -10) isScrollToBottom = true;
|
|
4429
4435
|
else if (intoViewDom && intoView?.block === "end") isScrollToBottom = contentDom.lastElementChild === intoViewDom;
|
|
4430
4436
|
else isScrollToBottom = false;
|
|
4431
4437
|
else if (top !== void 0 && top >= scrollDom.scrollHeight - scrollDom.clientHeight - sentinelHeight) isScrollToBottom = true;
|
|
@@ -4776,7 +4782,7 @@
|
|
|
4776
4782
|
var init_shiki_runtime = __esmMin((() => {}));
|
|
4777
4783
|
//#endregion
|
|
4778
4784
|
//#region components/code-highlighter/shiki.ts
|
|
4779
|
-
var PLAIN_TEXT_LANGUAGES = new Set([
|
|
4785
|
+
var PLAIN_TEXT_LANGUAGES = /* @__PURE__ */ new Set([
|
|
4780
4786
|
"text",
|
|
4781
4787
|
"plaintext",
|
|
4782
4788
|
"txt",
|
|
@@ -4890,21 +4896,20 @@
|
|
|
4890
4896
|
position: "relative",
|
|
4891
4897
|
borderRadius: token.borderRadiusLG,
|
|
4892
4898
|
overflow: "hidden",
|
|
4893
|
-
fontFamily: token.fontFamily,
|
|
4894
4899
|
fontSize: token.fontSize,
|
|
4895
|
-
border: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.
|
|
4900
|
+
border: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderCode}`,
|
|
4896
4901
|
[`${componentCls}-header`]: {
|
|
4897
4902
|
display: "flex",
|
|
4898
4903
|
alignItems: "center",
|
|
4899
4904
|
justifyContent: "space-between",
|
|
4900
4905
|
paddingInline: (0, _antdv_next_cssinjs.unit)(token.paddingSM),
|
|
4901
4906
|
paddingBlock: 4,
|
|
4902
|
-
borderBottom: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.
|
|
4903
|
-
backgroundColor: token.
|
|
4907
|
+
borderBottom: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderCode}`,
|
|
4908
|
+
backgroundColor: token.colorBgTitle
|
|
4904
4909
|
},
|
|
4905
4910
|
[`${componentCls}-lang`]: {
|
|
4906
4911
|
fontSize: token.fontSizeSM,
|
|
4907
|
-
color: token.
|
|
4912
|
+
color: token.colorTextTitle,
|
|
4908
4913
|
fontWeight: 500,
|
|
4909
4914
|
textTransform: "capitalize"
|
|
4910
4915
|
},
|
|
@@ -4913,30 +4918,36 @@
|
|
|
4913
4918
|
alignItems: "center",
|
|
4914
4919
|
gap: token.paddingXXS
|
|
4915
4920
|
},
|
|
4916
|
-
[`${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
|
+
},
|
|
4917
4928
|
[`${componentCls}-content`]: {
|
|
4918
4929
|
display: "flex",
|
|
4919
4930
|
overflow: "auto",
|
|
4920
|
-
backgroundColor:
|
|
4931
|
+
backgroundColor: token.codeBg,
|
|
4921
4932
|
alignItems: "stretch"
|
|
4922
4933
|
},
|
|
4923
4934
|
[`${componentCls}-line-numbers`]: {
|
|
4924
4935
|
paddingBlock: (0, _antdv_next_cssinjs.unit)(token.paddingSM),
|
|
4925
4936
|
paddingInline: (0, _antdv_next_cssinjs.unit)(token.paddingXS),
|
|
4926
4937
|
textAlign: "right",
|
|
4927
|
-
backgroundColor:
|
|
4928
|
-
borderRight: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.
|
|
4938
|
+
backgroundColor: token.codeBg,
|
|
4939
|
+
borderRight: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderCode}`,
|
|
4929
4940
|
userSelect: "none",
|
|
4930
4941
|
flexShrink: 0,
|
|
4931
4942
|
minWidth: "3em",
|
|
4932
4943
|
lineHeight: "1.5em"
|
|
4933
4944
|
},
|
|
4934
4945
|
[`${componentCls}-line-number`]: {
|
|
4935
|
-
fontFamily: token.
|
|
4936
|
-
fontSize: (0, _antdv_next_cssinjs.unit)(token.
|
|
4946
|
+
fontFamily: token.fontFamilyCode,
|
|
4947
|
+
fontSize: (0, _antdv_next_cssinjs.unit)(token.fontSize),
|
|
4937
4948
|
lineHeight: "1.5em",
|
|
4938
4949
|
height: "1.5em",
|
|
4939
|
-
color: token.
|
|
4950
|
+
color: token.codeLineNumberColor,
|
|
4940
4951
|
display: "flex",
|
|
4941
4952
|
alignItems: "center",
|
|
4942
4953
|
justifyContent: "flex-end",
|
|
@@ -4945,12 +4956,13 @@
|
|
|
4945
4956
|
[`${componentCls}-code`]: {
|
|
4946
4957
|
flex: 1,
|
|
4947
4958
|
overflow: "auto",
|
|
4959
|
+
color: token.codeColor,
|
|
4948
4960
|
"& > pre": {
|
|
4949
4961
|
margin: 0,
|
|
4950
4962
|
padding: (0, _antdv_next_cssinjs.unit)(token.paddingSM),
|
|
4951
4963
|
backgroundColor: "transparent !important",
|
|
4952
|
-
fontFamily: token.
|
|
4953
|
-
fontSize: (0, _antdv_next_cssinjs.unit)(token.
|
|
4964
|
+
fontFamily: token.fontFamilyCode,
|
|
4965
|
+
fontSize: (0, _antdv_next_cssinjs.unit)(token.fontSize),
|
|
4954
4966
|
lineHeight: "1.5em",
|
|
4955
4967
|
overflow: "visible"
|
|
4956
4968
|
},
|
|
@@ -4963,32 +4975,50 @@
|
|
|
4963
4975
|
}
|
|
4964
4976
|
},
|
|
4965
4977
|
[`&${componentCls}-dark`]: {
|
|
4966
|
-
borderColor: token.
|
|
4978
|
+
borderColor: token.colorBorderCodeDark,
|
|
4967
4979
|
[`${componentCls}-header`]: {
|
|
4968
|
-
backgroundColor:
|
|
4969
|
-
borderBottomColor:
|
|
4980
|
+
backgroundColor: token.colorBgTitleDark,
|
|
4981
|
+
borderBottomColor: token.colorBorderCodeDark
|
|
4970
4982
|
},
|
|
4971
|
-
[`${componentCls}-lang`]: { color:
|
|
4983
|
+
[`${componentCls}-lang`]: { color: token.colorTextTitleDark },
|
|
4972
4984
|
[`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
|
|
4973
|
-
color:
|
|
4985
|
+
color: `${token.codeBtnColorDark} !important`,
|
|
4974
4986
|
"&:hover, &:focus": {
|
|
4975
|
-
color:
|
|
4976
|
-
backgroundColor:
|
|
4987
|
+
color: `${token.codeBtnColorDark} !important`,
|
|
4988
|
+
backgroundColor: `${token.codeBtnHoverBgDark} !important`
|
|
4977
4989
|
}
|
|
4978
4990
|
},
|
|
4979
|
-
[`${componentCls}-content`]: { backgroundColor:
|
|
4991
|
+
[`${componentCls}-content`]: { backgroundColor: token.codeBgDark },
|
|
4980
4992
|
[`${componentCls}-line-numbers`]: {
|
|
4981
|
-
backgroundColor:
|
|
4982
|
-
borderRightColor:
|
|
4993
|
+
backgroundColor: token.codeBgDark,
|
|
4994
|
+
borderRightColor: token.colorBorderCodeDark
|
|
4983
4995
|
},
|
|
4984
|
-
[`${componentCls}-line-number`]: { color:
|
|
4996
|
+
[`${componentCls}-line-number`]: { color: token.codeLineNumberColorDark },
|
|
4997
|
+
[`${componentCls}-code`]: { color: token.codeColorDark }
|
|
4985
4998
|
}
|
|
4986
4999
|
} };
|
|
4987
5000
|
};
|
|
4988
|
-
var prepareComponentToken$10 = () =>
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
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
|
+
};
|
|
4992
5022
|
var style_default$10 = genStyleHooks("CodeHighlighter", (token) => {
|
|
4993
5023
|
return [genCodeHighlighterStyle((0, _antdv_next_cssinjs_cssinjs_utils.mergeToken)(token, {}))];
|
|
4994
5024
|
}, prepareComponentToken$10);
|
|
@@ -5078,10 +5108,11 @@
|
|
|
5078
5108
|
const highlightedHtml = (0, vue.shallowRef)("");
|
|
5079
5109
|
const highlightCode = async () => {
|
|
5080
5110
|
try {
|
|
5081
|
-
|
|
5111
|
+
const html = await codeToHtml(props.content, {
|
|
5082
5112
|
lang: props.language,
|
|
5083
5113
|
theme: props.theme === "dark" ? "vitesse-dark" : "vitesse-light"
|
|
5084
5114
|
});
|
|
5115
|
+
highlightedHtml.value = html;
|
|
5085
5116
|
} catch (e) {
|
|
5086
5117
|
console.error("Failed to highlight code:", e);
|
|
5087
5118
|
highlightedHtml.value = `<pre><code>${escapeHtml(props.content)}</code></pre>`;
|
|
@@ -6906,7 +6937,8 @@
|
|
|
6906
6937
|
if (props.fileContentService) {
|
|
6907
6938
|
loadingContent.value = true;
|
|
6908
6939
|
try {
|
|
6909
|
-
|
|
6940
|
+
const content = await props.fileContentService.loadFileContent(filePath);
|
|
6941
|
+
fileContent.value = content;
|
|
6910
6942
|
} catch (error) {
|
|
6911
6943
|
fileContent.value = `// ${locale.value.loadError}: ${error instanceof Error ? error.message : "Unknown error"}`;
|
|
6912
6944
|
} finally {
|
|
@@ -7149,7 +7181,7 @@
|
|
|
7149
7181
|
}, prepareComponentToken$7);
|
|
7150
7182
|
//#endregion
|
|
7151
7183
|
//#region components/mermaid/Mermaid.tsx
|
|
7152
|
-
var RenderType =
|
|
7184
|
+
var RenderType = /*#__PURE__*/ function(RenderType) {
|
|
7153
7185
|
RenderType["Code"] = "code";
|
|
7154
7186
|
RenderType["Image"] = "image";
|
|
7155
7187
|
return RenderType;
|
|
@@ -8237,7 +8269,7 @@
|
|
|
8237
8269
|
});
|
|
8238
8270
|
//#endregion
|
|
8239
8271
|
//#region components/sender/components/SlotTextArea.tsx
|
|
8240
|
-
var SUPPORTED_INPUT_TYPES = new Set([
|
|
8272
|
+
var SUPPORTED_INPUT_TYPES = /* @__PURE__ */ new Set([
|
|
8241
8273
|
"input",
|
|
8242
8274
|
"select",
|
|
8243
8275
|
"custom",
|
|
@@ -8564,7 +8596,8 @@
|
|
|
8564
8596
|
const setStartCursor = (preventScroll) => {
|
|
8565
8597
|
const editable = editableRef.value;
|
|
8566
8598
|
if (!editable) return;
|
|
8567
|
-
|
|
8599
|
+
const startIndex = skillDomRef.value ? 1 : 0;
|
|
8600
|
+
setCursorPosition(editable, startIndex, preventScroll);
|
|
8568
8601
|
};
|
|
8569
8602
|
const setEndCursor = (preventScroll) => {
|
|
8570
8603
|
const editable = editableRef.value;
|
|
@@ -9058,7 +9091,7 @@
|
|
|
9058
9091
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
9059
9092
|
"class": props.class
|
|
9060
9093
|
}, [(0, vue.createVNode)("title", null, [contextLocale.value.speechRecording]), Array.from({ length: COUNT }).map((_, index) => {
|
|
9061
|
-
const x = index *
|
|
9094
|
+
const x = index * 286.66666666666663;
|
|
9062
9095
|
const yMin = SIZE / 2 - RECT_HEIGHT_MIN / 2;
|
|
9063
9096
|
const yMax = SIZE / 2 - RECT_HEIGHT_MAX / 2;
|
|
9064
9097
|
return (0, vue.createVNode)("rect", {
|
|
@@ -11867,7 +11900,7 @@
|
|
|
11867
11900
|
const ctx = contextConfig.value.classes ?? {};
|
|
11868
11901
|
const prop = props.classes ?? {};
|
|
11869
11902
|
const result = {};
|
|
11870
|
-
const keys = new Set([...Object.keys(ctx), ...Object.keys(prop)]);
|
|
11903
|
+
const keys = /* @__PURE__ */ new Set([...Object.keys(ctx), ...Object.keys(prop)]);
|
|
11871
11904
|
for (const k of keys) {
|
|
11872
11905
|
const vals = [ctx[k], prop[k]].filter(Boolean).join(" ");
|
|
11873
11906
|
if (vals) result[k] = vals;
|
|
@@ -11878,7 +11911,7 @@
|
|
|
11878
11911
|
const ctx = contextConfig.value.styles ?? {};
|
|
11879
11912
|
const prop = props.styles ?? {};
|
|
11880
11913
|
const result = {};
|
|
11881
|
-
const keys = new Set([...Object.keys(ctx), ...Object.keys(prop)]);
|
|
11914
|
+
const keys = /* @__PURE__ */ new Set([...Object.keys(ctx), ...Object.keys(prop)]);
|
|
11882
11915
|
for (const k of keys) result[k] = {
|
|
11883
11916
|
...ctx[k],
|
|
11884
11917
|
...prop[k]
|
package/dist/mermaid/Mermaid.js
CHANGED
|
@@ -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 =
|
|
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