@antdv-next/x 1.0.2-beta.1 → 1.0.2-beta.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/code-highlighter/CodeHighlighter.js +24 -7
- package/dist/index.umd.js +49 -8
- package/dist/package.js +1 -1
- package/dist/x-provider/context.d.ts +5 -1
- package/dist/x-provider/index.d.ts +47 -0
- package/dist/x-provider/index.js +25 -0
- package/{dist-browser/_basePickBy-Cy7KVmkk.js → es/_basePickBy-DPqob0cQ.js} +2 -2
- package/{dist-browser/_baseUniq-Ch3HuHeT.js → es/_baseUniq-AMhRdOMz.js} +2 -2
- package/es/antdv-next-x.esm.js +22171 -0
- package/es/architecture-PBZL5I3N-CBmkTWjb.js +3 -0
- package/{dist-browser/architectureDiagram-2XIMDMQ5-D3IYLROv.js → es/architectureDiagram-2XIMDMQ5-ZOgJV9Kg.js} +84 -84
- package/{dist-browser/blockDiagram-WCTKOSBZ-nXanZ0sc.js → es/blockDiagram-WCTKOSBZ-8iZwAKBK.js} +529 -529
- package/{dist-browser/c4Diagram-IC4MRINW-C-gVp6th.js → es/c4Diagram-IC4MRINW-DrH9eRMR.js} +168 -168
- package/{dist-browser/channel-DoEe9DF9.js → es/channel-DIQFjdG3.js} +1 -1
- package/{dist-browser/chunk-4BX2VUAB-fLFD6XW0.js → es/chunk-4BX2VUAB-DUVpjbJi.js} +1 -1
- package/{dist-browser/chunk-55IACEB6-OtyKJzCH.js → es/chunk-55IACEB6-RlJ-J3tE.js} +1 -1
- package/{dist-browser/chunk-7E7YKBS2-C1dd36rm.js → es/chunk-7E7YKBS2-ChLFamzc.js} +1 -1
- package/{dist-browser/chunk-7R4GIKGN-DuTRhdsf.js → es/chunk-7R4GIKGN-B9vamSzt.js} +2 -2
- package/{dist-browser/chunk-C72U2L5F-ClmZGhFC.js → es/chunk-C72U2L5F-BV-rXau1.js} +1 -1
- package/{dist-browser/chunk-EGIJ26TM-Bar_u1MN.js → es/chunk-EGIJ26TM-GvsuORRL.js} +1 -1
- package/{dist-browser/chunk-FMBD7UC4-C_uJ_JJA.js → es/chunk-FMBD7UC4-D6ZlqqMC.js} +1 -1
- package/{dist-browser/chunk-GEFDOKGD-P7WhyrTU.js → es/chunk-GEFDOKGD-DM6dsEsk.js} +251 -251
- package/{dist-browser/chunk-GLR3WWYH-BvazRgdo.js → es/chunk-GLR3WWYH-CqFdLic9.js} +16 -16
- package/{dist-browser/chunk-HHEYEP7N-rv5s5WD4.js → es/chunk-HHEYEP7N-FVfYw94p.js} +2 -2
- package/{dist-browser/chunk-JSJVCQXG-89HUGe9V.js → es/chunk-JSJVCQXG-Wr9uPcCh.js} +2 -2
- package/{dist-browser/chunk-KX2RTZJC-pMHnNRQg.js → es/chunk-KX2RTZJC-BGffjoxB.js} +2 -2
- package/{dist-browser/chunk-KYZI473N-DJmSs1gK.js → es/chunk-KYZI473N-Bit5smNE.js} +571 -571
- package/{dist-browser/chunk-L3YUKLVL-Ck54qytQ.js → es/chunk-L3YUKLVL-DBuHDpQ2.js} +1 -1
- package/{dist-browser/chunk-MX3YWQON-MkpK3uBD.js → es/chunk-MX3YWQON-Cbj2WwUZ.js} +1 -1
- package/{dist-browser/chunk-NQ4KR5QH-DGshodQv.js → es/chunk-NQ4KR5QH-FPQ-IHJN.js} +119 -119
- package/{dist-browser/chunk-O4XLMI2P-e-ZzDQwg.js → es/chunk-O4XLMI2P-BCDk0ZIW.js} +237 -237
- package/{dist-browser/chunk-OZEHJAEY-DULNd43V.js → es/chunk-OZEHJAEY-BZ24IOgQ.js} +1 -1
- package/{dist-browser/chunk-PQ6SQG4A-CQ9Csv7s.js → es/chunk-PQ6SQG4A-DpwBx6Hx.js} +2 -2
- package/{dist-browser/chunk-PU5JKC2W-DkEFvrjH.js → es/chunk-PU5JKC2W-BNpJuXxn.js} +63 -63
- package/{dist-browser/chunk-QZHKN3VN-qww1plfw.js → es/chunk-QZHKN3VN-NEMwPryC.js} +1 -1
- package/{dist-browser/chunk-R5LLSJPH-BERXSDGJ.js → es/chunk-R5LLSJPH-g44vgerl.js} +1 -1
- package/{dist-browser/chunk-WL4C6EOR-C-d8WPS7.js → es/chunk-WL4C6EOR-B6l-Yy2t.js} +119 -119
- package/{dist-browser/chunk-XIRO2GV7-CFHofxVB.js → es/chunk-XIRO2GV7-CaFInIOW.js} +1 -1
- package/{dist-browser/chunk-XPW4576I-DgvoNZkW.js → es/chunk-XPW4576I-Cp1j6iTN.js} +1 -1
- package/{dist-browser/chunk-XZSTWKYB-k8_EXrSa.js → es/chunk-XZSTWKYB-CGk7ipHd.js} +5 -5
- package/{dist-browser/chunk-YBOYWFTD-BUW4AzEX.js → es/chunk-YBOYWFTD-dOTBpTYs.js} +7 -7
- package/es/classDiagram-VBA2DB6C-B3yBiQy3.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-jbFYm_Xj.js +29 -0
- package/{dist-browser/clone-BXDbKCDu.js → es/clone-DXVS0uSx.js} +1 -1
- package/{dist-browser/cose-bilkent-S5V4N54A-CnrS2OC1.js → es/cose-bilkent-S5V4N54A-DlmXyn6m.js} +1 -1
- package/{dist-browser/css-Dh17kjFY.js → es/css-DyS1hwc1.js} +1 -1
- package/es/css-HrHT_VUz.js +2 -0
- package/{dist-browser/dagre-BJOzGlhW.js → es/dagre-B1qTL793.js} +6 -6
- package/es/dagre-KLK3FWXG-CEhXRLVR.js +294 -0
- package/{dist-browser/diagram-E7M64L7V-DxuJj8ZG.js → es/diagram-E7M64L7V-Dnd8N74o.js} +59 -59
- package/{dist-browser/diagram-IFDJBPK2-BOpPZ6pu.js → es/diagram-IFDJBPK2-Dan7RsGr.js} +30 -30
- package/{dist-browser/diagram-P4PSJMXO--ChDmcya.js → es/diagram-P4PSJMXO-DwKJpttH.js} +31 -31
- package/{dist-browser/erDiagram-INFDFZHY-BA3m-v87.js → es/erDiagram-INFDFZHY-CGO6k23w.js} +127 -127
- package/{dist-browser/flowDiagram-PKNHOUZH-BCq6k3kr.js → es/flowDiagram-PKNHOUZH-DFN1GsRx.js} +155 -155
- package/{dist-browser/ganttDiagram-A5KZAMGK-DdMePS21.js → es/ganttDiagram-A5KZAMGK-Cf5NxH1w.js} +599 -602
- package/es/gitGraph-HDMCJU4V-CrEEHSZS.js +3 -0
- package/{dist-browser/gitGraphDiagram-K3NZZRJ6-CLbRwChG.js → es/gitGraphDiagram-K3NZZRJ6-BgE6aSZO.js} +175 -175
- package/{dist-browser/graphlib-C7ysKz4u.js → es/graphlib-DFxSohCv.js} +3 -3
- package/{dist-browser/html-BmZO1Eoo.js → es/html-C2-_98S6.js} +2 -2
- package/es/html-JbFqcNgP.js +2 -0
- package/es/info-3K5VOQVL-Dg3DCp4F.js +3 -0
- package/{dist-browser/infoDiagram-LFFYTUFH-DQAZ-vFk.js → es/infoDiagram-LFFYTUFH-WcApcdl5.js} +4 -4
- package/{dist-browser/isEmpty-2JxdWtc-.js → es/isEmpty-B1YrVV8B.js} +1 -1
- package/{dist-browser/ishikawaDiagram-PHBUUO56-B0r2IgGz.js → es/ishikawaDiagram-PHBUUO56-DwK7J31a.js} +65 -65
- package/{dist-browser/journeyDiagram-4ABVD52K-DnMUhOvg.js → es/journeyDiagram-4ABVD52K-CWuA57by.js} +4 -4
- package/{dist-browser/kanban-definition-K7BYSVSG-Da5Y-nJy.js → es/kanban-definition-K7BYSVSG-DBt3gYRQ.js} +10 -10
- package/{dist-browser/line-h2iCTGsE.js → es/line-zOBKZCP5.js} +1 -1
- package/{dist-browser/linear-Bv7XrZCH.js → es/linear-DttXWw4q.js} +1 -1
- package/{dist-browser/mermaid-parser.core-kTgpNO7M.js → es/mermaid-parser.core-CWNEdmZ_.js} +15 -15
- package/{dist-browser/mermaid.core-DRuUNxpC.js → es/mermaid.core-DPBXXViR.js} +206 -206
- package/{dist-browser/mindmap-definition-YRQLILUH-CYeqnCde.js → es/mindmap-definition-YRQLILUH-Bq2xqboX.js} +12 -12
- package/es/packet-RMMSAZCW-Dk7mKMJ4.js +3 -0
- package/es/pie-UPGHQEXC-CnM5YLNO.js +3 -0
- package/{dist-browser/pieDiagram-SKSYHLDU-DAsfTGvY.js → es/pieDiagram-SKSYHLDU-D4iMzwzH.js} +24 -24
- package/{dist-browser/quadrantDiagram-337W2JSQ-CZLbmQS4.js → es/quadrantDiagram-337W2JSQ-DSbXC0z6.js} +3 -3
- package/es/radar-KQ55EAFF-BwfADDx8.js +3 -0
- package/{dist-browser/requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js → es/requirementDiagram-Z7DCOOCP-D7eLn3fs.js} +58 -58
- package/{dist-browser/sankeyDiagram-WA2Y5GQK-DBe5YfW4.js → es/sankeyDiagram-WA2Y5GQK-DN5ZPgWU.js} +2 -2
- package/{dist-browser/sequenceDiagram-2WXFIKYE-C_KUoojT.js → es/sequenceDiagram-2WXFIKYE-CRFEBP8-.js} +388 -388
- package/{dist-browser/stateDiagram-RAJIS63D-boG6DyfW.js → es/stateDiagram-RAJIS63D-CfO23QJX.js} +67 -67
- package/es/stateDiagram-v2-FVOUBMTO-BGWbXepL.js +27 -0
- package/{dist-browser/timeline-definition-YZTLITO2-pFt6rZ6S.js → es/timeline-definition-YZTLITO2-DmpPrD-3.js} +2 -2
- package/es/treemap-KZPCXAKY-BWfn7JxQ.js +3 -0
- package/{dist-browser/vennDiagram-LZ73GAT5-VaCO6k4H.js → es/vennDiagram-LZ73GAT5-B80Xr4jV.js} +104 -104
- package/{dist-browser/vue-BJ0ov2CZ.js → es/vue-DTiWrQBM.js} +3 -3
- package/{dist-browser/vue-html-D0gyDbfn.js → es/vue-html-BG3Xflut.js} +1 -1
- package/{dist-browser/xychartDiagram-JWTSCODW-xS5ybemA.js → es/xychartDiagram-JWTSCODW-DvQyPDr4.js} +98 -98
- package/package.json +13 -11
- package/dist/index.esm.js +0 -11377
- package/dist-browser/architecture-PBZL5I3N-DHfBr78A.js +0 -3
- package/dist-browser/classDiagram-VBA2DB6C-DWTAs0Zm.js +0 -29
- package/dist-browser/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +0 -29
- 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}/Serializer-y_SfSPKv.js +0 -0
- /package/{dist-browser → es}/arc-caEkbRYF.js +0 -0
- /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}/cytoscape.esm-BY3wHcbp.js +0 -0
- /package/{dist-browser → es}/defaultLocale-BaPFSbai.js +0 -0
- /package/{dist-browser → es}/diff-BSu5dsa2.js +0 -0
- /package/{dist-browser → es}/dist-DltyvPj3.js +0 -0
- /package/{dist-browser → es}/init-PAs0hR-b.js +0 -0
- /package/{dist-browser/isArrayLikeObject-y3HlYDaX.js → es/isArrayLikeObject-BEG9p74d.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/katex-b-xdokOf.js → es/katex-OR8z_f6I.js} +0 -0
- /package/{dist-browser → es}/markdown-BKwT7HWz.js +0 -0
- /package/{dist-browser → es}/math-DPzKeDKn.js +0 -0
- /package/{dist-browser → es}/mermaid-C1RUu_Iw.js +0 -0
- /package/{dist-browser → es}/ordinal-D8PKtxfM.js +0 -0
- /package/{dist-browser → es}/path-DZ-6AyWK.js +0 -0
- /package/{dist-browser → es}/python-BQM8giqx.js +0 -0
- /package/{dist-browser → es}/rough.esm-C_hJ3ICT.js +0 -0
- /package/{dist-browser/src-BukXhifV.js → es/src-BH16DVv0.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
|
@@ -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
|
package/dist/index.umd.js
CHANGED
|
@@ -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.2";
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region components/x-provider/context.ts
|
|
54
54
|
var XProviderContextKey = Symbol("antdv-next-x-provider-context");
|
|
@@ -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
|
|
@@ -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/package.js
CHANGED
|
@@ -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">;
|
|
@@ -22,6 +22,14 @@ declare const XProvider: import('vue').DefineComponent<import('vue').ExtractProp
|
|
|
22
22
|
type: PropType<XProviderProps["fileCard"]>;
|
|
23
23
|
default: undefined;
|
|
24
24
|
};
|
|
25
|
+
sources: {
|
|
26
|
+
type: PropType<XProviderProps["sources"]>;
|
|
27
|
+
default: undefined;
|
|
28
|
+
};
|
|
29
|
+
codeHighlighter: {
|
|
30
|
+
type: PropType<XProviderProps["codeHighlighter"]>;
|
|
31
|
+
default: undefined;
|
|
32
|
+
};
|
|
25
33
|
mermaid: {
|
|
26
34
|
type: PropType<XProviderProps["mermaid"]>;
|
|
27
35
|
default: undefined;
|
|
@@ -34,6 +42,18 @@ declare const XProvider: import('vue').DefineComponent<import('vue').ExtractProp
|
|
|
34
42
|
type: PropType<XProviderProps["suggestion"]>;
|
|
35
43
|
default: undefined;
|
|
36
44
|
};
|
|
45
|
+
sender: {
|
|
46
|
+
type: PropType<XProviderProps["sender"]>;
|
|
47
|
+
default: undefined;
|
|
48
|
+
};
|
|
49
|
+
think: {
|
|
50
|
+
type: PropType<XProviderProps["think"]>;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
53
|
+
thoughtChain: {
|
|
54
|
+
type: PropType<XProviderProps["thoughtChain"]>;
|
|
55
|
+
default: undefined;
|
|
56
|
+
};
|
|
37
57
|
welcome: {
|
|
38
58
|
type: PropType<XProviderProps["welcome"]>;
|
|
39
59
|
default: undefined;
|
|
@@ -71,6 +91,14 @@ declare const XProvider: import('vue').DefineComponent<import('vue').ExtractProp
|
|
|
71
91
|
type: PropType<XProviderProps["fileCard"]>;
|
|
72
92
|
default: undefined;
|
|
73
93
|
};
|
|
94
|
+
sources: {
|
|
95
|
+
type: PropType<XProviderProps["sources"]>;
|
|
96
|
+
default: undefined;
|
|
97
|
+
};
|
|
98
|
+
codeHighlighter: {
|
|
99
|
+
type: PropType<XProviderProps["codeHighlighter"]>;
|
|
100
|
+
default: undefined;
|
|
101
|
+
};
|
|
74
102
|
mermaid: {
|
|
75
103
|
type: PropType<XProviderProps["mermaid"]>;
|
|
76
104
|
default: undefined;
|
|
@@ -83,6 +111,18 @@ declare const XProvider: import('vue').DefineComponent<import('vue').ExtractProp
|
|
|
83
111
|
type: PropType<XProviderProps["suggestion"]>;
|
|
84
112
|
default: undefined;
|
|
85
113
|
};
|
|
114
|
+
sender: {
|
|
115
|
+
type: PropType<XProviderProps["sender"]>;
|
|
116
|
+
default: undefined;
|
|
117
|
+
};
|
|
118
|
+
think: {
|
|
119
|
+
type: PropType<XProviderProps["think"]>;
|
|
120
|
+
default: undefined;
|
|
121
|
+
};
|
|
122
|
+
thoughtChain: {
|
|
123
|
+
type: PropType<XProviderProps["thoughtChain"]>;
|
|
124
|
+
default: undefined;
|
|
125
|
+
};
|
|
86
126
|
welcome: {
|
|
87
127
|
type: PropType<XProviderProps["welcome"]>;
|
|
88
128
|
default: undefined;
|
|
@@ -109,10 +149,17 @@ declare const XProvider: import('vue').DefineComponent<import('vue').ExtractProp
|
|
|
109
149
|
bubble: Pick<import('..').BubbleProps<string>, "style" | "classes" | "styles"> | undefined;
|
|
110
150
|
conversations: Pick<import('..').ConversationsProps, "style" | "classes" | "styles" | "shortcutKeys"> | undefined;
|
|
111
151
|
actions: Pick<import('..').ActionsProps, "style" | "classes" | "styles"> | undefined;
|
|
152
|
+
sources: Pick<import('..').SourcesProps, "style" | "classes" | "styles"> | undefined;
|
|
112
153
|
fileCard: Pick<import('..').FileCardProps, "style" | "classes" | "styles"> | undefined;
|
|
154
|
+
codeHighlighter: Pick<import('..').CodeHighlighterProps, "style" | "classes" | "styles"> | undefined;
|
|
113
155
|
mermaid: Pick<import('..').MermaidProps, "style" | "classes" | "styles"> | undefined;
|
|
114
156
|
prompts: Pick<import('..').PromptsProps, "style" | "classes" | "styles"> | undefined;
|
|
157
|
+
sender: (Pick<import('..').SenderProps, "style" | "styles" | "classNames"> & {
|
|
158
|
+
classes?: import('..').SenderProps["classNames"];
|
|
159
|
+
}) | undefined;
|
|
115
160
|
suggestion: Pick<import('..').SuggestionProps<any>, "style" | "classes" | "styles"> | undefined;
|
|
161
|
+
think: Pick<import('..').ThinkProps, "style" | "classes" | "styles"> | undefined;
|
|
162
|
+
thoughtChain: Pick<import('..').ThoughtChainProps, "style" | "classes" | "styles"> | undefined;
|
|
116
163
|
welcome: Pick<import('..').WelcomeProps, "style" | "classes" | "styles"> | undefined;
|
|
117
164
|
locale: any;
|
|
118
165
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
package/dist/x-provider/index.js
CHANGED
|
@@ -27,6 +27,14 @@ var XProvider = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
type: Object,
|
|
28
28
|
default: void 0
|
|
29
29
|
},
|
|
30
|
+
sources: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: void 0
|
|
33
|
+
},
|
|
34
|
+
codeHighlighter: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
30
38
|
mermaid: {
|
|
31
39
|
type: Object,
|
|
32
40
|
default: void 0
|
|
@@ -39,6 +47,18 @@ var XProvider = /* @__PURE__ */ defineComponent({
|
|
|
39
47
|
type: Object,
|
|
40
48
|
default: void 0
|
|
41
49
|
},
|
|
50
|
+
sender: {
|
|
51
|
+
type: Object,
|
|
52
|
+
default: void 0
|
|
53
|
+
},
|
|
54
|
+
think: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: void 0
|
|
57
|
+
},
|
|
58
|
+
thoughtChain: {
|
|
59
|
+
type: Object,
|
|
60
|
+
default: void 0
|
|
61
|
+
},
|
|
42
62
|
welcome: {
|
|
43
63
|
type: Object,
|
|
44
64
|
default: void 0
|
|
@@ -65,9 +85,14 @@ var XProvider = /* @__PURE__ */ defineComponent({
|
|
|
65
85
|
bubble: props.bubble,
|
|
66
86
|
conversations: props.conversations,
|
|
67
87
|
fileCard: props.fileCard,
|
|
88
|
+
sources: props.sources,
|
|
89
|
+
codeHighlighter: props.codeHighlighter,
|
|
68
90
|
mermaid: props.mermaid,
|
|
69
91
|
prompts: props.prompts,
|
|
70
92
|
suggestion: props.suggestion,
|
|
93
|
+
sender: props.sender,
|
|
94
|
+
think: props.think,
|
|
95
|
+
thoughtChain: props.thoughtChain,
|
|
71
96
|
welcome: props.welcome
|
|
72
97
|
};
|
|
73
98
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, E as r, H as i, M as a, U as o, V as s, k as c, p as l, w as u, z as d } from "./isArrayLikeObject-
|
|
2
|
-
import { A as f, C as p, D as m, M as h, N as g, S as _, T as v, f as y, h as b, u as x, w as S } from "./_baseUniq-
|
|
1
|
+
import { A as e, B as t, C as n, E as r, H as i, M as a, U as o, V as s, k as c, p as l, w as u, z as d } from "./isArrayLikeObject-BEG9p74d.js";
|
|
2
|
+
import { A as f, C as p, D as m, M as h, N as g, S as _, T as v, f as y, h as b, u as x, w as S } from "./_baseUniq-AMhRdOMz.js";
|
|
3
3
|
//#region ../../node_modules/lodash-es/_trimmedEndIndex.js
|
|
4
4
|
var C = /\s/;
|
|
5
5
|
function w(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e, B as t, F as n, H as r, M as i, O as a, T as o, U as s, V as c, W as l, _ as u, a as d, b as f, c as p, d as m, g as h, h as g, i as _, k as v, l as y, n as ee, o as b, p as x, r as te, s as ne, u as re, v as ie, w as S, y as C, z as w } from "./isArrayLikeObject-
|
|
2
|
-
import { i as ae, n as T, r as E } from "./isEmpty-
|
|
1
|
+
import { A as e, B as t, F as n, H as r, M as i, O as a, T as o, U as s, V as c, W as l, _ as u, a as d, b as f, c as p, d as m, g as h, h as g, i as _, k as v, l as y, n as ee, o as b, p as x, r as te, s as ne, u as re, v as ie, w as S, y as C, z as w } from "./isArrayLikeObject-BEG9p74d.js";
|
|
2
|
+
import { i as ae, n as T, r as E } from "./isEmpty-B1YrVV8B.js";
|
|
3
3
|
//#region ../../node_modules/lodash-es/isSymbol.js
|
|
4
4
|
var oe = "[object Symbol]";
|
|
5
5
|
function D(e) {
|