@antdv-next/x 1.0.2-beta.1 → 1.0.2-beta.3
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/Actions.js +1 -1
- package/dist/attachments/index.js +1 -1
- package/dist/code-highlighter/CodeHighlighter.js +24 -7
- package/dist/conversations/index.js +1 -1
- package/dist/file-card/FileCard.js +1 -1
- package/dist/file-card/List.js +1 -1
- package/dist/index.umd.js +73 -32
- package/dist/locale/useLocale.js +1 -1
- package/dist/mermaid/Mermaid.js +1 -1
- package/dist/package.js +1 -1
- package/dist/prompts/Prompts.js +1 -1
- package/dist/sender/Sender.js +1 -1
- package/dist/sender/SenderHeader.js +1 -1
- package/dist/sender/SenderSwitch.js +1 -1
- package/dist/sources/Sources.js +1 -1
- package/dist/suggestion/Suggestion.js +1 -1
- package/dist/theme/genStyleUtils.js +1 -1
- package/dist/think/Think.js +1 -1
- package/dist/thought-chain/Item.js +1 -1
- package/dist/thought-chain/Node.js +1 -1
- package/dist/thought-chain/ThoughtChain.js +1 -1
- package/dist/welcome/index.js +1 -1
- package/dist/x-provider/context.d.ts +5 -1
- package/dist/x-provider/hooks/use-x-provider-context.js +1 -1
- package/dist/x-provider/index.d.ts +47 -0
- package/dist/x-provider/index.js +25 -0
- package/{dist-browser/Serializer-y_SfSPKv.js → es/Serializer-D1JYN1kI.js} +4 -4
- package/{dist-browser/_basePickBy-Cy7KVmkk.js → es/_basePickBy-DZiMKfOQ.js} +23 -23
- package/{dist-browser/_baseUniq-Ch3HuHeT.js → es/_baseUniq-DY3uHjSO.js} +83 -83
- package/es/antdv-next-x.esm.js +21009 -0
- package/{dist-browser/arc-caEkbRYF.js → es/arc-BuXEd18J.js} +3 -3
- package/es/architecture-PBZL5I3N-BdQzc3t9.js +3 -0
- package/{dist-browser/architectureDiagram-2XIMDMQ5-D3IYLROv.js → es/architectureDiagram-2XIMDMQ5-C8x7stcr.js} +85 -85
- package/{dist-browser/blockDiagram-WCTKOSBZ-nXanZ0sc.js → es/blockDiagram-WCTKOSBZ-DA-s3zoq.js} +530 -530
- package/{dist-browser/c4Diagram-IC4MRINW-C-gVp6th.js → es/c4Diagram-IC4MRINW-DD81dyS8.js} +170 -170
- package/es/channel-DZcPzDuw.js +5 -0
- package/{dist-browser/chunk-4BX2VUAB-fLFD6XW0.js → es/chunk-4BX2VUAB-B3zzxglQ.js} +2 -2
- package/{dist-browser/chunk-55IACEB6-OtyKJzCH.js → es/chunk-55IACEB6-CA9CRLkM.js} +2 -2
- package/{dist-browser/chunk-7E7YKBS2-C1dd36rm.js → es/chunk-7E7YKBS2-C_F-WOLQ.js} +2 -2
- package/{dist-browser/chunk-7R4GIKGN-DuTRhdsf.js → es/chunk-7R4GIKGN-CaI-1szl.js} +3 -3
- package/{dist-browser/chunk-C72U2L5F-ClmZGhFC.js → es/chunk-C72U2L5F-l6RZhGri.js} +2 -2
- package/{dist-browser/chunk-EGIJ26TM-Bar_u1MN.js → es/chunk-EGIJ26TM-Be42NeHw.js} +2 -2
- package/{dist-browser/chunk-FMBD7UC4-C_uJ_JJA.js → es/chunk-FMBD7UC4-DJh0L322.js} +2 -2
- package/{dist-browser/chunk-GEFDOKGD-P7WhyrTU.js → es/chunk-GEFDOKGD-BWt_f4io.js} +278 -278
- package/es/chunk-GLR3WWYH-B30PgFZZ.js +41 -0
- package/{dist-browser/chunk-HHEYEP7N-rv5s5WD4.js → es/chunk-HHEYEP7N-DkMnkoQX.js} +3 -3
- package/{dist-browser/chunk-JSJVCQXG-89HUGe9V.js → es/chunk-JSJVCQXG-ddNKdfu8.js} +4 -4
- package/{dist-browser/chunk-KX2RTZJC-pMHnNRQg.js → es/chunk-KX2RTZJC-BbnGQVgL.js} +3 -3
- package/{dist-browser/chunk-KYZI473N-DJmSs1gK.js → es/chunk-KYZI473N-B2rmiORt.js} +573 -573
- package/{dist-browser/chunk-L3YUKLVL-Ck54qytQ.js → es/chunk-L3YUKLVL-CmAZrf2E.js} +2 -2
- package/{dist-browser/chunk-MX3YWQON-MkpK3uBD.js → es/chunk-MX3YWQON-B3_AxMM1.js} +2 -2
- package/{dist-browser/chunk-NQ4KR5QH-DGshodQv.js → es/chunk-NQ4KR5QH-CmCG9ow3.js} +120 -120
- package/{dist-browser/chunk-O4XLMI2P-e-ZzDQwg.js → es/chunk-O4XLMI2P-CTLwv925.js} +238 -238
- package/{dist-browser/chunk-OZEHJAEY-DULNd43V.js → es/chunk-OZEHJAEY-CtONdvqY.js} +2 -2
- package/{dist-browser/chunk-PQ6SQG4A-CQ9Csv7s.js → es/chunk-PQ6SQG4A-Dx7no2mb.js} +3 -3
- package/{dist-browser/chunk-PU5JKC2W-DkEFvrjH.js → es/chunk-PU5JKC2W-O9_8B7zU.js} +76 -76
- package/{dist-browser/chunk-QZHKN3VN-qww1plfw.js → es/chunk-QZHKN3VN-BbuqVxkO.js} +2 -2
- package/{dist-browser/chunk-R5LLSJPH-BERXSDGJ.js → es/chunk-R5LLSJPH-CpwKqyBY.js} +2 -2
- package/{dist-browser/chunk-WL4C6EOR-C-d8WPS7.js → es/chunk-WL4C6EOR-BXrjoxmr.js} +120 -120
- package/{dist-browser/chunk-XIRO2GV7-CFHofxVB.js → es/chunk-XIRO2GV7-4kMze38t.js} +2 -2
- package/{dist-browser/chunk-XPW4576I-DgvoNZkW.js → es/chunk-XPW4576I-DG6JendS.js} +2 -2
- package/{dist-browser/chunk-XZSTWKYB-k8_EXrSa.js → es/chunk-XZSTWKYB-DjOnj3KP.js} +93 -93
- package/{dist-browser/chunk-YBOYWFTD-BUW4AzEX.js → es/chunk-YBOYWFTD-DVAsFYJ-.js} +8 -8
- package/es/classDiagram-VBA2DB6C-wt_pcvEN.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-B8Bw4b3n.js +29 -0
- package/es/clone-CtpnpaZq.js +8 -0
- package/{dist-browser/cose-bilkent-S5V4N54A-CnrS2OC1.js → es/cose-bilkent-S5V4N54A-IRlkXPnk.js} +3 -3
- package/{dist-browser/css-Dh17kjFY.js → es/css-DyS1hwc1.js} +1 -1
- package/es/css-HrHT_VUz.js +2 -0
- package/{dist-browser/cytoscape.esm-BY3wHcbp.js → es/cytoscape.esm-i2CZcWd-.js} +1 -1
- package/{dist-browser/dagre-BJOzGlhW.js → es/dagre-Dm2PNtRY.js} +57 -57
- package/es/dagre-KLK3FWXG-DLgOeqbz.js +294 -0
- package/{dist-browser/defaultLocale-BaPFSbai.js → es/defaultLocale-bckJcYh1.js} +12 -12
- package/{dist-browser/diagram-E7M64L7V-DxuJj8ZG.js → es/diagram-E7M64L7V-Cdek_47s.js} +83 -83
- package/{dist-browser/diagram-IFDJBPK2-BOpPZ6pu.js → es/diagram-IFDJBPK2-DzCaWPW3.js} +31 -31
- package/{dist-browser/diagram-P4PSJMXO--ChDmcya.js → es/diagram-P4PSJMXO-B7pPaer-.js} +32 -32
- package/{dist-browser/dist-DltyvPj3.js → es/dist-BX_roQzC.js} +1 -1
- package/{dist-browser/erDiagram-INFDFZHY-BA3m-v87.js → es/erDiagram-INFDFZHY-BZHMCNB3.js} +128 -128
- package/{dist-browser/flowDiagram-PKNHOUZH-BCq6k3kr.js → es/flowDiagram-PKNHOUZH-BBJx8-jP.js} +156 -156
- package/{dist-browser/ganttDiagram-A5KZAMGK-DdMePS21.js → es/ganttDiagram-A5KZAMGK-4TJAHJUF.js} +622 -625
- package/es/gitGraph-HDMCJU4V-CGPcRI5K.js +3 -0
- package/{dist-browser/gitGraphDiagram-K3NZZRJ6-CLbRwChG.js → es/gitGraphDiagram-K3NZZRJ6-CSATib_y.js} +176 -176
- package/{dist-browser/graphlib-C7ysKz4u.js → es/graphlib-WtNUGuyd.js} +4 -4
- package/{dist-browser/html-BmZO1Eoo.js → es/html-B6UxjOv0.js} +2 -2
- package/es/html-Hb1oe8XT.js +2 -0
- package/es/info-3K5VOQVL-D6bOjfim.js +3 -0
- package/{dist-browser/infoDiagram-LFFYTUFH-DQAZ-vFk.js → es/infoDiagram-LFFYTUFH-ahqynRAA.js} +5 -5
- package/{dist-browser/init-PAs0hR-b.js → es/init-B75p2clj.js} +1 -1
- package/{dist-browser/isArrayLikeObject-y3HlYDaX.js → es/isArrayLikeObject-D4gDJaEW.js} +80 -80
- package/{dist-browser/isEmpty-2JxdWtc-.js → es/isEmpty-BgdRybYg.js} +3 -3
- package/{dist-browser/ishikawaDiagram-PHBUUO56-B0r2IgGz.js → es/ishikawaDiagram-PHBUUO56-B9NWp429.js} +67 -67
- package/{dist-browser/journeyDiagram-4ABVD52K-DnMUhOvg.js → es/journeyDiagram-4ABVD52K-CXmYa8OF.js} +6 -6
- package/{dist-browser/kanban-definition-K7BYSVSG-Da5Y-nJy.js → es/kanban-definition-K7BYSVSG-g9tToeab.js} +11 -11
- package/{dist-browser/katex-b-xdokOf.js → es/katex-Bvh2oRWI.js} +1 -1
- package/{dist-browser/line-h2iCTGsE.js → es/line-DETnb8Mr.js} +4 -4
- package/{dist-browser/linear-Bv7XrZCH.js → es/linear-DGQDIL28.js} +23 -23
- package/{dist-browser/math-DPzKeDKn.js → es/math-CoDOuve-.js} +1 -1
- package/{dist-browser/mermaid-parser.core-kTgpNO7M.js → es/mermaid-parser.core-DXn-0ev4.js} +16 -16
- package/{dist-browser/mermaid.core-DRuUNxpC.js → es/mermaid.core-W4vXivv8.js} +208 -208
- package/{dist-browser/mindmap-definition-YRQLILUH-CYeqnCde.js → es/mindmap-definition-YRQLILUH-x9QfilEP.js} +16 -16
- package/{dist-browser/ordinal-D8PKtxfM.js → es/ordinal-F3U6aXtP.js} +3 -3
- package/es/packet-RMMSAZCW-CW6reTze.js +3 -0
- package/{dist-browser/path-DZ-6AyWK.js → es/path-Dm3C8WEs.js} +3 -3
- package/es/pie-UPGHQEXC-ByJXXnsc.js +3 -0
- package/{dist-browser/pieDiagram-SKSYHLDU-DAsfTGvY.js → es/pieDiagram-SKSYHLDU-CG2GOW6Z.js} +32 -32
- package/{dist-browser/quadrantDiagram-337W2JSQ-CZLbmQS4.js → es/quadrantDiagram-337W2JSQ-C81pfz0c.js} +4 -4
- package/es/radar-KQ55EAFF-DLq-eYVH.js +3 -0
- package/{dist-browser/requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js → es/requirementDiagram-Z7DCOOCP-J-tc0fnw.js} +59 -59
- package/{dist-browser/rough.esm-C_hJ3ICT.js → es/rough.esm-BhGP2Udb.js} +1 -1
- package/{dist-browser/sankeyDiagram-WA2Y5GQK-DBe5YfW4.js → es/sankeyDiagram-WA2Y5GQK-BfGyH2f1.js} +18 -18
- package/{dist-browser/sequenceDiagram-2WXFIKYE-C_KUoojT.js → es/sequenceDiagram-2WXFIKYE-m6aSnjku.js} +390 -390
- package/{dist-browser/src-BukXhifV.js → es/src-CFVe5TPD.js} +86 -86
- package/{dist-browser/stateDiagram-RAJIS63D-boG6DyfW.js → es/stateDiagram-RAJIS63D-CPJuOh-s.js} +68 -68
- package/es/stateDiagram-v2-FVOUBMTO-uxSkj8dH.js +27 -0
- package/{dist-browser/timeline-definition-YZTLITO2-pFt6rZ6S.js → es/timeline-definition-YZTLITO2-C7Vz32PK.js} +4 -4
- package/es/treemap-KZPCXAKY-BhLuAwPA.js +3 -0
- package/{dist-browser/vennDiagram-LZ73GAT5-VaCO6k4H.js → es/vennDiagram-LZ73GAT5-BWloH3fI.js} +107 -107
- package/{dist-browser/vue-BJ0ov2CZ.js → es/vue-2aJw7p5p.js} +3 -3
- package/{dist-browser/vue-html-D0gyDbfn.js → es/vue-html-DEjI8X9t.js} +1 -1
- package/{dist-browser/xychartDiagram-JWTSCODW-xS5ybemA.js → es/xychartDiagram-JWTSCODW-l-SVBlqB.js} +103 -103
- package/package.json +13 -11
- package/dist/index.esm.js +0 -11377
- package/dist-browser/architecture-PBZL5I3N-DHfBr78A.js +0 -3
- package/dist-browser/channel-DoEe9DF9.js +0 -5
- package/dist-browser/chunk-GLR3WWYH-BvazRgdo.js +0 -41
- package/dist-browser/classDiagram-VBA2DB6C-DWTAs0Zm.js +0 -29
- package/dist-browser/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +0 -29
- package/dist-browser/clone-BXDbKCDu.js +0 -8
- package/dist-browser/css-D9vrnIUE.js +0 -2
- package/dist-browser/dagre-KLK3FWXG-CFC0naVr.js +0 -294
- package/dist-browser/gitGraph-HDMCJU4V-DbzpICZW.js +0 -3
- package/dist-browser/html-DnTYsv5k.js +0 -2
- package/dist-browser/index.es.js +0 -56150
- package/dist-browser/index.umd.js +0 -3281
- package/dist-browser/info-3K5VOQVL-CpUiQuel.js +0 -3
- package/dist-browser/packet-RMMSAZCW-UTFQ0FQx.js +0 -3
- package/dist-browser/pie-UPGHQEXC-CarAcBSi.js +0 -3
- package/dist-browser/radar-KQ55EAFF-NXK5PC9R.js +0 -3
- package/dist-browser/stateDiagram-v2-FVOUBMTO-DHCajhrN.js +0 -27
- package/dist-browser/treemap-KZPCXAKY-Cj9QakFB.js +0 -3
- /package/{dist-browser → es}/array-CWNufkl9.js +0 -0
- /package/{dist-browser → es}/bash-CXEwhtGQ.js +0 -0
- /package/{dist-browser → es}/chunk-WQLz0Won.js +0 -0
- /package/{dist-browser → es}/diff-BSu5dsa2.js +0 -0
- /package/{dist-browser → es}/javascript-BXHK_bZ2.js +0 -0
- /package/{dist-browser → es}/javascript-NV_FQBab.js +0 -0
- /package/{dist-browser → es}/json-C8Y9C4Ne.js +0 -0
- /package/{dist-browser → es}/json-DZ_9-j3Q.js +0 -0
- /package/{dist-browser → es}/jsx-CxlNNvOI.js +0 -0
- /package/{dist-browser → es}/markdown-BKwT7HWz.js +0 -0
- /package/{dist-browser → es}/mermaid-C1RUu_Iw.js +0 -0
- /package/{dist-browser → es}/python-BQM8giqx.js +0 -0
- /package/{dist-browser → es}/tsx-DIYEV_g7.js +0 -0
- /package/{dist-browser → es}/typescript-B6MWEsBH.js +0 -0
- /package/{dist-browser → es}/typescript-CR48gG1F.js +0 -0
- /package/{dist-browser → es}/yaml-Y0CqUPTQ.js +0 -0
package/dist/actions/Actions.js
CHANGED
|
@@ -3,7 +3,7 @@ import { isEmptyNode } from "../_utils/vue.js";
|
|
|
3
3
|
import Item from "./Item.js";
|
|
4
4
|
import style_default from "./style/index.js";
|
|
5
5
|
import { Transition, computed, createVNode, defineComponent, isVNode, mergeProps, ref, useAttrs, useSlots } from "vue";
|
|
6
|
-
import { useConfig } from "antdv-next/
|
|
6
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
7
7
|
//#region components/actions/Actions.tsx
|
|
8
8
|
function _isSlot(s) {
|
|
9
9
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
@@ -6,7 +6,7 @@ import FileList_default from "./FileList/index.js";
|
|
|
6
6
|
import PlaceholderUploader from "./PlaceholderUploader.js";
|
|
7
7
|
import style_default from "./style/index.js";
|
|
8
8
|
import { computed, createVNode, defineComponent, isVNode, provide, ref, watch } from "vue";
|
|
9
|
-
import { useConfig } from "antdv-next/
|
|
9
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
10
10
|
//#region components/attachments/index.tsx
|
|
11
11
|
function _isSlot(s) {
|
|
12
12
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import useXComponentConfig from "../_utils/hooks/use-x-component-config.js";
|
|
1
2
|
import { codeToHtml } from "./shiki.js";
|
|
2
3
|
import style_default from "./style/index.js";
|
|
3
4
|
import { computed, createVNode, defineComponent, mergeProps, ref, shallowRef, useAttrs, watch } from "vue";
|
|
@@ -80,6 +81,7 @@ var XCodeHighlighter = /* @__PURE__ */ defineComponent({
|
|
|
80
81
|
emits: ["update:theme"],
|
|
81
82
|
setup(props, { emit, expose }) {
|
|
82
83
|
const attrs = useAttrs();
|
|
84
|
+
const contextConfig = useXComponentConfig("codeHighlighter");
|
|
83
85
|
const rootRef = ref();
|
|
84
86
|
const [hashId, cssVarCls] = style_default(computed(() => props.prefixCls));
|
|
85
87
|
const copied = ref(false);
|
|
@@ -131,16 +133,24 @@ var XCodeHighlighter = /* @__PURE__ */ defineComponent({
|
|
|
131
133
|
emit("update:theme", props.theme === "light" ? "dark" : "light");
|
|
132
134
|
};
|
|
133
135
|
const getSlotClassName = (slot) => {
|
|
134
|
-
return [
|
|
136
|
+
return [
|
|
137
|
+
`${props.prefixCls}-${slot}`,
|
|
138
|
+
contextConfig.value.classes?.[slot],
|
|
139
|
+
props.classes?.[slot]
|
|
140
|
+
];
|
|
135
141
|
};
|
|
136
142
|
const renderHeader = () => {
|
|
137
143
|
if (!(props.showLanguage || props.showThemeToggle || props.showCopyButton)) return null;
|
|
138
144
|
return createVNode("div", {
|
|
139
145
|
"class": getSlotClassName("header"),
|
|
140
|
-
"style": props.styles?.header
|
|
146
|
+
"style": [contextConfig.value.styles?.header, props.styles?.header]
|
|
141
147
|
}, [props.showLanguage && createVNode("span", {
|
|
142
|
-
"class": [
|
|
143
|
-
|
|
148
|
+
"class": [
|
|
149
|
+
`${props.prefixCls}-lang`,
|
|
150
|
+
contextConfig.value.classes?.headerTitle,
|
|
151
|
+
props.classes?.headerTitle
|
|
152
|
+
],
|
|
153
|
+
"style": [contextConfig.value.styles?.headerTitle, props.styles?.headerTitle]
|
|
144
154
|
}, [props.language || "text"]), createVNode("div", { "class": `${props.prefixCls}-actions` }, [props.showThemeToggle && createVNode(Tooltip, { "title": props.theme === "light" ? "切换暗色主题" : "切换亮色主题" }, { default: () => [createVNode(Button, {
|
|
145
155
|
"type": "text",
|
|
146
156
|
"size": "small",
|
|
@@ -163,10 +173,14 @@ var XCodeHighlighter = /* @__PURE__ */ defineComponent({
|
|
|
163
173
|
const renderContent = () => {
|
|
164
174
|
return createVNode("div", {
|
|
165
175
|
"class": getSlotClassName("content"),
|
|
166
|
-
"style": props.styles?.content
|
|
176
|
+
"style": [contextConfig.value.styles?.content, props.styles?.content]
|
|
167
177
|
}, [renderLineNumbers(), createVNode("div", {
|
|
168
|
-
"class": [
|
|
169
|
-
|
|
178
|
+
"class": [
|
|
179
|
+
`${props.prefixCls}-code`,
|
|
180
|
+
contextConfig.value.classes?.code,
|
|
181
|
+
props.classes?.code
|
|
182
|
+
],
|
|
183
|
+
"style": [contextConfig.value.styles?.code, props.styles?.code],
|
|
170
184
|
"innerHTML": highlightedHtml.value
|
|
171
185
|
}, null)]);
|
|
172
186
|
};
|
|
@@ -175,6 +189,7 @@ var XCodeHighlighter = /* @__PURE__ */ defineComponent({
|
|
|
175
189
|
props.prefixCls,
|
|
176
190
|
`${props.prefixCls}-${props.theme}`,
|
|
177
191
|
props.rootClass,
|
|
192
|
+
contextConfig.value.classes?.root,
|
|
178
193
|
props.classes?.root,
|
|
179
194
|
hashId.value,
|
|
180
195
|
cssVarCls.value,
|
|
@@ -182,6 +197,8 @@ var XCodeHighlighter = /* @__PURE__ */ defineComponent({
|
|
|
182
197
|
props.class
|
|
183
198
|
],
|
|
184
199
|
"style": [
|
|
200
|
+
contextConfig.value.style,
|
|
201
|
+
contextConfig.value.styles?.root,
|
|
185
202
|
props.styles?.root,
|
|
186
203
|
attrs.style,
|
|
187
204
|
props.style
|
|
@@ -7,7 +7,7 @@ import ConversationsItem from "./Item.js";
|
|
|
7
7
|
import useGroupable from "./hooks/useGroupable.js";
|
|
8
8
|
import style_default from "./style/index.js";
|
|
9
9
|
import { computed, createVNode, defineComponent, mergeProps, ref, useAttrs } from "vue";
|
|
10
|
-
import { useConfig } from "antdv-next/
|
|
10
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
11
11
|
import { Divider } from "antdv-next";
|
|
12
12
|
//#region components/conversations/index.tsx
|
|
13
13
|
function isTypingTarget(target) {
|
|
@@ -6,7 +6,7 @@ import AudioIcon from "./icons/audio.js";
|
|
|
6
6
|
import VideoIcon from "./icons/video.js";
|
|
7
7
|
import style_default from "./style/index.js";
|
|
8
8
|
import { computed, createVNode, defineComponent, mergeProps, useAttrs } from "vue";
|
|
9
|
-
import { useConfig } from "antdv-next/
|
|
9
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
10
10
|
import { Image } from "antdv-next";
|
|
11
11
|
import { FileExcelFilled, FileImageFilled, FileMarkdownFilled, FilePdfFilled, FilePptFilled, FileTextFilled, FileWordFilled, FileZipFilled, JavaOutlined, JavaScriptOutlined, PythonOutlined } from "@antdv-next/icons";
|
|
12
12
|
//#region components/file-card/FileCard.tsx
|
package/dist/file-card/List.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import style_default from "./style/index.js";
|
|
2
2
|
import { XFileCard } from "./FileCard.js";
|
|
3
3
|
import { Fragment, TransitionGroup, computed, createVNode, defineComponent, isVNode, mergeProps, ref, watch } from "vue";
|
|
4
|
-
import { useConfig } from "antdv-next/
|
|
4
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
5
5
|
import { Button } from "antdv-next";
|
|
6
6
|
import { CloseCircleFilled, LeftOutlined, RightOutlined } from "@antdv-next/icons";
|
|
7
7
|
import { useResizeObserver } from "@vueuse/core";
|
package/dist/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("antdv-next/
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("antdv-next/config-provider/context"), require("antdv-next"), require("@antdv-next/icons"), require("@antdv-next/cssinjs"), require("@antdv-next/cssinjs/cssinjs-utils"), require("@ant-design/fast-color"), require("antdv-next/dist/theme/useToken"), require("@vueuse/core"), require("shiki/core"), require("shiki/dist/themes/vitesse-dark.mjs"), require("shiki/dist/themes/vitesse-light.mjs"), require("shiki/engine/javascript"), require("@v-c/util")) : typeof define === "function" && define.amd ? define([
|
|
3
3
|
"exports",
|
|
4
4
|
"vue",
|
|
5
|
-
"antdv-next/
|
|
5
|
+
"antdv-next/config-provider/context",
|
|
6
6
|
"antdv-next",
|
|
7
7
|
"@antdv-next/icons",
|
|
8
8
|
"@antdv-next/cssinjs",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"shiki/dist/themes/vitesse-light.mjs",
|
|
16
16
|
"shiki/engine/javascript",
|
|
17
17
|
"@v-c/util"
|
|
18
|
-
], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.AntdComponents = {}, global.Vue, global.
|
|
19
|
-
})(this, function(exports, vue,
|
|
18
|
+
], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.AntdComponents = {}, global.Vue, global.antdv_next_config_provider_context, global.antd, global.AntdIcons, global._antdv_next_cssinjs, global._antdv_next_cssinjs_cssinjs_utils, global._ant_design_fast_color, global.antdv_next_dist_theme_useToken, global._vueuse_core, global.shiki_core, global.shiki_dist_themes_vitesse_dark_mjs, global.shiki_dist_themes_vitesse_light_mjs, global.shiki_engine_javascript, global._v_c_util));
|
|
19
|
+
})(this, function(exports, vue, antdv_next_config_provider_context, antdv_next, _antdv_next_icons, _antdv_next_cssinjs, _antdv_next_cssinjs_cssinjs_utils, _ant_design_fast_color, antdv_next_dist_theme_useToken, _vueuse_core, shiki_core, shiki_dist_themes_vitesse_dark_mjs, shiki_dist_themes_vitesse_light_mjs, shiki_engine_javascript, _v_c_util) {
|
|
20
20
|
Object.defineProperties(exports, {
|
|
21
21
|
__esModule: { value: true },
|
|
22
22
|
[Symbol.toStringTag]: { value: "Module" }
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs);
|
|
49
49
|
shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs);
|
|
50
50
|
//#region package.json
|
|
51
|
-
var version = "1.0.2-beta.
|
|
51
|
+
var version = "1.0.2-beta.3";
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region components/x-provider/context.ts
|
|
54
54
|
var XProviderContextKey = Symbol("antdv-next-x-provider-context");
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
//#region components/theme/genStyleUtils.ts
|
|
412
412
|
var { genStyleHooks, genComponentStyleHook, genSubStyleComponent } = (0, _antdv_next_cssinjs_cssinjs_utils.genStyleUtils)({
|
|
413
413
|
usePrefix: () => {
|
|
414
|
-
const configCtx = (0,
|
|
414
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
415
415
|
return (0, vue.computed)(() => {
|
|
416
416
|
const { getPrefixCls, iconPrefixCls } = configCtx.value;
|
|
417
417
|
return {
|
|
@@ -431,7 +431,7 @@
|
|
|
431
431
|
};
|
|
432
432
|
},
|
|
433
433
|
useCSP: () => {
|
|
434
|
-
const configCtx = (0,
|
|
434
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
435
435
|
return (0, vue.computed)(() => configCtx.value?.csp ?? {});
|
|
436
436
|
},
|
|
437
437
|
layer: { name: "antdx" }
|
|
@@ -618,7 +618,7 @@
|
|
|
618
618
|
}
|
|
619
619
|
},
|
|
620
620
|
setup(props, { expose }) {
|
|
621
|
-
const configCtx = (0,
|
|
621
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
622
622
|
const attrs = (0, vue.useAttrs)();
|
|
623
623
|
const slots = (0, vue.useSlots)();
|
|
624
624
|
const contextConfig = useXComponentConfig("actions");
|
|
@@ -2096,7 +2096,7 @@
|
|
|
2096
2096
|
},
|
|
2097
2097
|
setup(props, { slots }) {
|
|
2098
2098
|
const attrs = (0, vue.useAttrs)();
|
|
2099
|
-
const configCtx = (0,
|
|
2099
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
2100
2100
|
const contextConfig = useXComponentConfig("fileCard");
|
|
2101
2101
|
const [hashId, cssVarCls] = style_default$12((0, vue.computed)(() => props.prefixCls));
|
|
2102
2102
|
const domAttrs = (0, vue.computed)(() => {
|
|
@@ -2287,7 +2287,7 @@
|
|
|
2287
2287
|
}
|
|
2288
2288
|
},
|
|
2289
2289
|
setup(props, { attrs, slots }) {
|
|
2290
|
-
const configCtx = (0,
|
|
2290
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
2291
2291
|
const [hashId, cssVarCls] = style_default$12((0, vue.computed)(() => props.prefixCls));
|
|
2292
2292
|
const compCls = (0, vue.computed)(() => `${props.prefixCls}-list`);
|
|
2293
2293
|
const list = (0, vue.ref)([]);
|
|
@@ -3062,7 +3062,7 @@
|
|
|
3062
3062
|
},
|
|
3063
3063
|
emits: ["change"],
|
|
3064
3064
|
setup(props, { attrs, emit, slots, expose }) {
|
|
3065
|
-
const configCtx = (0,
|
|
3065
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
3066
3066
|
const contextConfig = useXComponentConfig("attachments");
|
|
3067
3067
|
const containerRef = (0, vue.ref)(null);
|
|
3068
3068
|
const [hashId, cssVarCls] = style_default$11((0, vue.computed)(() => props.prefixCls));
|
|
@@ -3303,7 +3303,7 @@
|
|
|
3303
3303
|
return localeCode.startsWith("zh") ? localeValues : localeValues$1;
|
|
3304
3304
|
}
|
|
3305
3305
|
function useLocale(componentName, defaultLocale) {
|
|
3306
|
-
const configCtx = (0,
|
|
3306
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
3307
3307
|
const fullLocale = (0, vue.computed)(() => {
|
|
3308
3308
|
return configCtx.value.locale ?? {};
|
|
3309
3309
|
});
|
|
@@ -5013,6 +5013,7 @@
|
|
|
5013
5013
|
emits: ["update:theme"],
|
|
5014
5014
|
setup(props, { emit, expose }) {
|
|
5015
5015
|
const attrs = (0, vue.useAttrs)();
|
|
5016
|
+
const contextConfig = useXComponentConfig("codeHighlighter");
|
|
5016
5017
|
const rootRef = (0, vue.ref)();
|
|
5017
5018
|
const [hashId, cssVarCls] = style_default$9((0, vue.computed)(() => props.prefixCls));
|
|
5018
5019
|
const copied = (0, vue.ref)(false);
|
|
@@ -5064,16 +5065,24 @@
|
|
|
5064
5065
|
emit("update:theme", props.theme === "light" ? "dark" : "light");
|
|
5065
5066
|
};
|
|
5066
5067
|
const getSlotClassName = (slot) => {
|
|
5067
|
-
return [
|
|
5068
|
+
return [
|
|
5069
|
+
`${props.prefixCls}-${slot}`,
|
|
5070
|
+
contextConfig.value.classes?.[slot],
|
|
5071
|
+
props.classes?.[slot]
|
|
5072
|
+
];
|
|
5068
5073
|
};
|
|
5069
5074
|
const renderHeader = () => {
|
|
5070
5075
|
if (!(props.showLanguage || props.showThemeToggle || props.showCopyButton)) return null;
|
|
5071
5076
|
return (0, vue.createVNode)("div", {
|
|
5072
5077
|
"class": getSlotClassName("header"),
|
|
5073
|
-
"style": props.styles?.header
|
|
5078
|
+
"style": [contextConfig.value.styles?.header, props.styles?.header]
|
|
5074
5079
|
}, [props.showLanguage && (0, vue.createVNode)("span", {
|
|
5075
|
-
"class": [
|
|
5076
|
-
|
|
5080
|
+
"class": [
|
|
5081
|
+
`${props.prefixCls}-lang`,
|
|
5082
|
+
contextConfig.value.classes?.headerTitle,
|
|
5083
|
+
props.classes?.headerTitle
|
|
5084
|
+
],
|
|
5085
|
+
"style": [contextConfig.value.styles?.headerTitle, props.styles?.headerTitle]
|
|
5077
5086
|
}, [props.language || "text"]), (0, vue.createVNode)("div", { "class": `${props.prefixCls}-actions` }, [props.showThemeToggle && (0, vue.createVNode)(antdv_next.Tooltip, { "title": props.theme === "light" ? "切换暗色主题" : "切换亮色主题" }, { default: () => [(0, vue.createVNode)(antdv_next.Button, {
|
|
5078
5087
|
"type": "text",
|
|
5079
5088
|
"size": "small",
|
|
@@ -5096,10 +5105,14 @@
|
|
|
5096
5105
|
const renderContent = () => {
|
|
5097
5106
|
return (0, vue.createVNode)("div", {
|
|
5098
5107
|
"class": getSlotClassName("content"),
|
|
5099
|
-
"style": props.styles?.content
|
|
5108
|
+
"style": [contextConfig.value.styles?.content, props.styles?.content]
|
|
5100
5109
|
}, [renderLineNumbers(), (0, vue.createVNode)("div", {
|
|
5101
|
-
"class": [
|
|
5102
|
-
|
|
5110
|
+
"class": [
|
|
5111
|
+
`${props.prefixCls}-code`,
|
|
5112
|
+
contextConfig.value.classes?.code,
|
|
5113
|
+
props.classes?.code
|
|
5114
|
+
],
|
|
5115
|
+
"style": [contextConfig.value.styles?.code, props.styles?.code],
|
|
5103
5116
|
"innerHTML": highlightedHtml.value
|
|
5104
5117
|
}, null)]);
|
|
5105
5118
|
};
|
|
@@ -5108,6 +5121,7 @@
|
|
|
5108
5121
|
props.prefixCls,
|
|
5109
5122
|
`${props.prefixCls}-${props.theme}`,
|
|
5110
5123
|
props.rootClass,
|
|
5124
|
+
contextConfig.value.classes?.root,
|
|
5111
5125
|
props.classes?.root,
|
|
5112
5126
|
hashId.value,
|
|
5113
5127
|
cssVarCls.value,
|
|
@@ -5115,6 +5129,8 @@
|
|
|
5115
5129
|
props.class
|
|
5116
5130
|
],
|
|
5117
5131
|
"style": [
|
|
5132
|
+
contextConfig.value.style,
|
|
5133
|
+
contextConfig.value.styles?.root,
|
|
5118
5134
|
props.styles?.root,
|
|
5119
5135
|
attrs.style,
|
|
5120
5136
|
props.style
|
|
@@ -6118,7 +6134,7 @@
|
|
|
6118
6134
|
},
|
|
6119
6135
|
emits: ["update:activeKey", "expand"],
|
|
6120
6136
|
setup(props, { expose, emit, slots }) {
|
|
6121
|
-
const configCtx = (0,
|
|
6137
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
6122
6138
|
const attrs = (0, vue.useAttrs)();
|
|
6123
6139
|
const contextConfig = useXComponentConfig("conversations");
|
|
6124
6140
|
const rootRef = (0, vue.ref)();
|
|
@@ -6477,7 +6493,7 @@
|
|
|
6477
6493
|
emits: ["update:renderType", "renderTypeChange"],
|
|
6478
6494
|
setup(props, { emit, expose, slots }) {
|
|
6479
6495
|
const attrs = (0, vue.useAttrs)();
|
|
6480
|
-
const configCtx = (0,
|
|
6496
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
6481
6497
|
const [contextLocale] = useLocale("Mermaid", localeValues$1.Mermaid);
|
|
6482
6498
|
const contextConfig = useXComponentConfig("mermaid");
|
|
6483
6499
|
const rootRef = (0, vue.ref)();
|
|
@@ -7076,7 +7092,7 @@
|
|
|
7076
7092
|
},
|
|
7077
7093
|
emits: ["itemClick"],
|
|
7078
7094
|
setup(props, { expose, emit, slots }) {
|
|
7079
|
-
const configCtx = (0,
|
|
7095
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
7080
7096
|
const attrs = (0, vue.useAttrs)();
|
|
7081
7097
|
const contextConfig = useXComponentConfig("prompts");
|
|
7082
7098
|
const rootRef = (0, vue.ref)();
|
|
@@ -8957,7 +8973,7 @@
|
|
|
8957
8973
|
},
|
|
8958
8974
|
setup(props, { expose, slots }) {
|
|
8959
8975
|
const attrs = (0, vue.useAttrs)();
|
|
8960
|
-
const configCtx = (0,
|
|
8976
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
8961
8977
|
const contextConfig = useXComponentConfig("sender");
|
|
8962
8978
|
const prefixCls = (0, vue.computed)(() => configCtx.value.getPrefixCls?.("sender", props.prefixCls) ?? props.prefixCls);
|
|
8963
8979
|
const direction = (0, vue.computed)(() => configCtx.value.direction);
|
|
@@ -9196,7 +9212,7 @@
|
|
|
9196
9212
|
}
|
|
9197
9213
|
},
|
|
9198
9214
|
setup(props, { slots }) {
|
|
9199
|
-
const configCtx = (0,
|
|
9215
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
9200
9216
|
const senderCtx = useSenderContext();
|
|
9201
9217
|
const prefixCls = (0, vue.computed)(() => {
|
|
9202
9218
|
const senderPrefix = senderCtx.value.prefixCls;
|
|
@@ -9322,7 +9338,7 @@
|
|
|
9322
9338
|
},
|
|
9323
9339
|
setup(props, { expose, slots }) {
|
|
9324
9340
|
const attrs = (0, vue.useAttrs)();
|
|
9325
|
-
const configCtx = (0,
|
|
9341
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
9326
9342
|
const senderCtx = useSenderContext();
|
|
9327
9343
|
const contextConfig = useXComponentConfig("sender");
|
|
9328
9344
|
const prefixCls = (0, vue.computed)(() => {
|
|
@@ -9695,7 +9711,7 @@
|
|
|
9695
9711
|
},
|
|
9696
9712
|
emits: ["expand"],
|
|
9697
9713
|
setup(props, { slots, expose, emit }) {
|
|
9698
|
-
const configCtx = (0,
|
|
9714
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
9699
9715
|
const attrs = (0, vue.useAttrs)();
|
|
9700
9716
|
const contextConfig = useXComponentConfig("sources");
|
|
9701
9717
|
const rootPrefixCls = (0, vue.computed)(() => configCtx.value.getPrefixCls());
|
|
@@ -9965,7 +9981,7 @@
|
|
|
9965
9981
|
emits: ["openChange", "select"],
|
|
9966
9982
|
setup(props, { slots, emit }) {
|
|
9967
9983
|
const attrs = (0, vue.useAttrs)();
|
|
9968
|
-
const configCtx = (0,
|
|
9984
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
9969
9985
|
const contextConfig = useXComponentConfig("suggestion");
|
|
9970
9986
|
const prefixCls = (0, vue.computed)(() => configCtx.value.getPrefixCls?.("suggestion", props.prefixCls) ?? props.prefixCls);
|
|
9971
9987
|
const isRtl = (0, vue.computed)(() => configCtx.value.direction === "rtl");
|
|
@@ -10255,7 +10271,7 @@
|
|
|
10255
10271
|
emits: ["update:expanded", "expand"],
|
|
10256
10272
|
setup(props, { slots, emit, expose }) {
|
|
10257
10273
|
const attrs = (0, vue.useAttrs)();
|
|
10258
|
-
const configCtx = (0,
|
|
10274
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
10259
10275
|
const contextConfig = useXComponentConfig("think");
|
|
10260
10276
|
const rootRef = (0, vue.ref)();
|
|
10261
10277
|
const [hashId, cssVarCls] = style_default$2((0, vue.computed)(() => props.prefixCls));
|
|
@@ -10649,7 +10665,7 @@
|
|
|
10649
10665
|
}
|
|
10650
10666
|
},
|
|
10651
10667
|
setup(props, { expose, slots }) {
|
|
10652
|
-
const configCtx = (0,
|
|
10668
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
10653
10669
|
const rootRef = (0, vue.ref)();
|
|
10654
10670
|
const [hashId, cssVarCls] = style_default$1((0, vue.computed)(() => props.prefixCls));
|
|
10655
10671
|
const itemPrefixCls = (0, vue.computed)(() => `${props.prefixCls}-item`);
|
|
@@ -10773,7 +10789,7 @@
|
|
|
10773
10789
|
},
|
|
10774
10790
|
emits: ["toggleExpand"],
|
|
10775
10791
|
setup(props, { emit }) {
|
|
10776
|
-
const configCtx = (0,
|
|
10792
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
10777
10793
|
const isRtl = (0, vue.computed)(() => configCtx.value.direction === "rtl");
|
|
10778
10794
|
const nodePrefixCls = (0, vue.computed)(() => `${props.prefixCls}-node`);
|
|
10779
10795
|
const resolvedLineStyle = (0, vue.computed)(() => {
|
|
@@ -10966,7 +10982,7 @@
|
|
|
10966
10982
|
emits: ["update:expandedKeys", "expand"],
|
|
10967
10983
|
setup(props, { emit, expose, slots }) {
|
|
10968
10984
|
const attrs = (0, vue.useAttrs)();
|
|
10969
|
-
const configCtx = (0,
|
|
10985
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
10970
10986
|
const contextConfig = useXComponentConfig("thoughtChain");
|
|
10971
10987
|
const rootRef = (0, vue.ref)();
|
|
10972
10988
|
const [hashId, cssVarCls] = style_default$1((0, vue.computed)(() => props.prefixCls));
|
|
@@ -11202,7 +11218,7 @@
|
|
|
11202
11218
|
}
|
|
11203
11219
|
},
|
|
11204
11220
|
setup(props, { expose, slots }) {
|
|
11205
|
-
const configCtx = (0,
|
|
11221
|
+
const configCtx = (0, antdv_next_config_provider_context.useConfig)();
|
|
11206
11222
|
const attrs = (0, vue.useAttrs)();
|
|
11207
11223
|
const contextConfig = useXComponentConfig("welcome");
|
|
11208
11224
|
const rootRef = (0, vue.ref)();
|
|
@@ -11317,6 +11333,14 @@
|
|
|
11317
11333
|
type: Object,
|
|
11318
11334
|
default: void 0
|
|
11319
11335
|
},
|
|
11336
|
+
sources: {
|
|
11337
|
+
type: Object,
|
|
11338
|
+
default: void 0
|
|
11339
|
+
},
|
|
11340
|
+
codeHighlighter: {
|
|
11341
|
+
type: Object,
|
|
11342
|
+
default: void 0
|
|
11343
|
+
},
|
|
11320
11344
|
mermaid: {
|
|
11321
11345
|
type: Object,
|
|
11322
11346
|
default: void 0
|
|
@@ -11329,6 +11353,18 @@
|
|
|
11329
11353
|
type: Object,
|
|
11330
11354
|
default: void 0
|
|
11331
11355
|
},
|
|
11356
|
+
sender: {
|
|
11357
|
+
type: Object,
|
|
11358
|
+
default: void 0
|
|
11359
|
+
},
|
|
11360
|
+
think: {
|
|
11361
|
+
type: Object,
|
|
11362
|
+
default: void 0
|
|
11363
|
+
},
|
|
11364
|
+
thoughtChain: {
|
|
11365
|
+
type: Object,
|
|
11366
|
+
default: void 0
|
|
11367
|
+
},
|
|
11332
11368
|
welcome: {
|
|
11333
11369
|
type: Object,
|
|
11334
11370
|
default: void 0
|
|
@@ -11355,9 +11391,14 @@
|
|
|
11355
11391
|
bubble: props.bubble,
|
|
11356
11392
|
conversations: props.conversations,
|
|
11357
11393
|
fileCard: props.fileCard,
|
|
11394
|
+
sources: props.sources,
|
|
11395
|
+
codeHighlighter: props.codeHighlighter,
|
|
11358
11396
|
mermaid: props.mermaid,
|
|
11359
11397
|
prompts: props.prompts,
|
|
11360
11398
|
suggestion: props.suggestion,
|
|
11399
|
+
sender: props.sender,
|
|
11400
|
+
think: props.think,
|
|
11401
|
+
thoughtChain: props.thoughtChain,
|
|
11361
11402
|
welcome: props.welcome
|
|
11362
11403
|
};
|
|
11363
11404
|
}));
|
package/dist/locale/useLocale.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import localeValues from "./en_US.js";
|
|
2
2
|
import localeValues$1 from "./zh_CN.js";
|
|
3
3
|
import { computed } from "vue";
|
|
4
|
-
import { useConfig } from "antdv-next/
|
|
4
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
5
5
|
//#region components/locale/useLocale.ts
|
|
6
6
|
function normalizeLocaleCode(locale) {
|
|
7
7
|
return String(locale ?? "").toLowerCase().replace("_", "-");
|
package/dist/mermaid/Mermaid.js
CHANGED
|
@@ -8,7 +8,7 @@ import code_highlighter_default from "../code-highlighter/index.js";
|
|
|
8
8
|
import { initializeMermaid, parseMermaid, renderMermaid } from "./loader.js";
|
|
9
9
|
import style_default from "./style/index.js";
|
|
10
10
|
import { computed, createVNode, defineComponent, mergeProps, onBeforeUnmount, ref, useAttrs, watch } from "vue";
|
|
11
|
-
import { useConfig } from "antdv-next/
|
|
11
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
12
12
|
import { Button, Segmented, Tooltip } from "antdv-next";
|
|
13
13
|
import { DownloadOutlined, ZoomInOutlined, ZoomOutOutlined } from "@antdv-next/icons";
|
|
14
14
|
//#region components/mermaid/Mermaid.tsx
|
package/dist/package.js
CHANGED
package/dist/prompts/Prompts.js
CHANGED
|
@@ -2,7 +2,7 @@ import useXComponentConfig from "../_utils/hooks/use-x-component-config.js";
|
|
|
2
2
|
import { hasRenderableNode } from "../_utils/vue.js";
|
|
3
3
|
import style_default from "./style/index.js";
|
|
4
4
|
import { computed, createVNode, defineComponent, mergeProps, nextTick, onMounted, ref, useAttrs } from "vue";
|
|
5
|
-
import { useConfig } from "antdv-next/
|
|
5
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
6
6
|
//#region components/prompts/Prompts.tsx
|
|
7
7
|
function hasChildren(item) {
|
|
8
8
|
const children = item.children;
|
package/dist/sender/Sender.js
CHANGED
|
@@ -10,7 +10,7 @@ import TextArea_default from "./components/TextArea.js";
|
|
|
10
10
|
import useSpeech from "./hooks/use-speech.js";
|
|
11
11
|
import style_default from "./style/index.js";
|
|
12
12
|
import { computed, createVNode, defineComponent, mergeProps, ref, useAttrs, watch } from "vue";
|
|
13
|
-
import { useConfig } from "antdv-next/
|
|
13
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
14
14
|
//#region components/sender/Sender.tsx
|
|
15
15
|
var sharedRenderComponents = {
|
|
16
16
|
SendButton: SendButton_default,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useSenderContext } from "./context.js";
|
|
2
2
|
import { Transition, computed, createVNode, defineComponent, vShow, withDirectives } from "vue";
|
|
3
|
-
import { useConfig } from "antdv-next/
|
|
3
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
4
4
|
import { Button } from "antdv-next";
|
|
5
5
|
import { CloseOutlined } from "@antdv-next/icons";
|
|
6
6
|
//#region components/sender/SenderHeader.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import useXComponentConfig from "../_utils/hooks/use-x-component-config.js";
|
|
2
2
|
import { useSenderContext } from "./context.js";
|
|
3
3
|
import { computed, createVNode, defineComponent, mergeProps, ref, useAttrs, watch } from "vue";
|
|
4
|
-
import { useConfig } from "antdv-next/
|
|
4
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
5
5
|
import { Button } from "antdv-next";
|
|
6
6
|
//#region components/sender/SenderSwitch.tsx
|
|
7
7
|
var SenderSwitch_default = /* @__PURE__ */ defineComponent({
|
package/dist/sources/Sources.js
CHANGED
|
@@ -4,7 +4,7 @@ import { hasRenderableNode } from "../_utils/vue.js";
|
|
|
4
4
|
import CarouselCard from "./components/CarouselCard.js";
|
|
5
5
|
import style_default from "./style/index.js";
|
|
6
6
|
import { Fragment, Transition, computed, createVNode, defineComponent, mergeProps, ref, useAttrs } from "vue";
|
|
7
|
-
import { useConfig } from "antdv-next/
|
|
7
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
8
8
|
import { Popover } from "antdv-next";
|
|
9
9
|
import { RightOutlined } from "@antdv-next/icons";
|
|
10
10
|
//#region components/sources/Sources.tsx
|
|
@@ -3,7 +3,7 @@ import { hasRenderableNode } from "../_utils/vue.js";
|
|
|
3
3
|
import style_default from "./style/index.js";
|
|
4
4
|
import useActive from "./useActive.js";
|
|
5
5
|
import { computed, createVNode, defineComponent, mergeProps, ref, useAttrs, watch } from "vue";
|
|
6
|
-
import { useConfig } from "antdv-next/
|
|
6
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
7
7
|
import { Cascader, Flex } from "antdv-next";
|
|
8
8
|
//#region components/suggestion/Suggestion.tsx
|
|
9
9
|
var XSuggestion = /* @__PURE__ */ defineComponent({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useInternalToken } from "./useToken.js";
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
-
import { useConfig } from "antdv-next/
|
|
3
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
4
4
|
import { genStyleUtils } from "@antdv-next/cssinjs/cssinjs-utils";
|
|
5
5
|
//#region components/theme/genStyleUtils.ts
|
|
6
6
|
var { genStyleHooks, genComponentStyleHook, genSubStyleComponent } = genStyleUtils({
|
package/dist/think/Think.js
CHANGED
|
@@ -2,7 +2,7 @@ import useXComponentConfig from "../_utils/hooks/use-x-component-config.js";
|
|
|
2
2
|
import think_default from "./icons/think.js";
|
|
3
3
|
import style_default from "./style/index.js";
|
|
4
4
|
import { Transition, computed, createVNode, defineComponent, mergeProps, ref, useAttrs, watch } from "vue";
|
|
5
|
-
import { useConfig } from "antdv-next/
|
|
5
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
6
6
|
import { LoadingOutlined, RightOutlined } from "@antdv-next/icons";
|
|
7
7
|
//#region components/think/Think.tsx
|
|
8
8
|
var XThink = /* @__PURE__ */ defineComponent({
|
|
@@ -2,7 +2,7 @@ import { hasRenderableNode } from "../_utils/vue.js";
|
|
|
2
2
|
import { STATUS_ICON_MAP } from "./Status.js";
|
|
3
3
|
import style_default from "./style/index.js";
|
|
4
4
|
import { computed, createVNode, defineComponent, ref } from "vue";
|
|
5
|
-
import { useConfig } from "antdv-next/
|
|
5
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
6
6
|
//#region components/thought-chain/Item.tsx
|
|
7
7
|
var XThoughtChainItem = /* @__PURE__ */ defineComponent({
|
|
8
8
|
name: "AxThoughtChainItem",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hasRenderableNode } from "../_utils/vue.js";
|
|
2
2
|
import { STATUS_ICON_MAP } from "./Status.js";
|
|
3
3
|
import { Transition, computed, createVNode, defineComponent } from "vue";
|
|
4
|
-
import { useConfig } from "antdv-next/
|
|
4
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
5
5
|
import { LeftOutlined, RightOutlined } from "@antdv-next/icons";
|
|
6
6
|
//#region components/thought-chain/Node.tsx
|
|
7
7
|
var Node_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2,7 +2,7 @@ import useXComponentConfig from "../_utils/hooks/use-x-component-config.js";
|
|
|
2
2
|
import style_default from "./style/index.js";
|
|
3
3
|
import Node_default from "./Node.js";
|
|
4
4
|
import { computed, createVNode, defineComponent, mergeProps, ref, useAttrs, watch } from "vue";
|
|
5
|
-
import { useConfig } from "antdv-next/
|
|
5
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
6
6
|
//#region components/thought-chain/ThoughtChain.tsx
|
|
7
7
|
var XThoughtChain = /* @__PURE__ */ defineComponent({
|
|
8
8
|
name: "AxThoughtChain",
|
package/dist/welcome/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import useXComponentConfig from "../_utils/hooks/use-x-component-config.js";
|
|
2
2
|
import style_default from "./style/index.js";
|
|
3
3
|
import { computed, createVNode, defineComponent, isVNode, mergeProps, ref, useAttrs } from "vue";
|
|
4
|
-
import { useConfig } from "antdv-next/
|
|
4
|
+
import { useConfig } from "antdv-next/config-provider/context";
|
|
5
5
|
import { Typography } from "antdv-next";
|
|
6
6
|
//#region components/welcome/index.tsx
|
|
7
7
|
function _isSlot(s) {
|
|
@@ -3,6 +3,7 @@ import { ComputedRef, CSSProperties, StyleValue } from 'vue';
|
|
|
3
3
|
import { ActionsProps } from '../actions';
|
|
4
4
|
import { AttachmentsProps } from '../attachments';
|
|
5
5
|
import { BubbleProps } from '../bubble';
|
|
6
|
+
import { CodeHighlighterProps } from '../code-highlighter';
|
|
6
7
|
import { ConversationsProps } from '../conversations';
|
|
7
8
|
import { FileCardProps } from '../file-card';
|
|
8
9
|
import { MermaidProps } from '../mermaid';
|
|
@@ -29,9 +30,12 @@ export interface XComponentsConfig {
|
|
|
29
30
|
actions?: Pick<ActionsProps, "style" | "styles" | "classes">;
|
|
30
31
|
sources?: Pick<SourcesProps, "style" | "styles" | "classes">;
|
|
31
32
|
fileCard?: Pick<FileCardProps, "style" | "styles" | "classes">;
|
|
33
|
+
codeHighlighter?: Pick<CodeHighlighterProps, "style" | "styles" | "classes">;
|
|
32
34
|
mermaid?: Pick<MermaidProps, "style" | "styles" | "classes">;
|
|
33
35
|
prompts?: Pick<PromptsProps, "style" | "styles" | "classes">;
|
|
34
|
-
sender?: Pick<SenderProps, "style" | "styles" | "classNames"
|
|
36
|
+
sender?: Pick<SenderProps, "style" | "styles" | "classNames"> & {
|
|
37
|
+
classes?: SenderProps["classNames"];
|
|
38
|
+
};
|
|
35
39
|
suggestion?: Pick<SuggestionProps, "style" | "styles" | "classes">;
|
|
36
40
|
think?: Pick<ThinkProps, "style" | "styles" | "classes">;
|
|
37
41
|
thoughtChain?: Pick<ThoughtChainProps, "style" | "styles" | "classes">;
|