@vunk/plus 1.11.2 → 1.11.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/components/agent-chat-provider/src/types.d.ts +2 -2
- package/components/broadcasting-markdown/index.mjs +138 -3
- package/components/broadcasting-markdown/src/index.vue.d.ts +1 -1
- package/components/bubble-list/index.mjs +1 -1
- package/components/bubble-list/src/core/index.vue.d.ts +7 -155
- package/components/bubble-list/src/index.vue.d.ts +7 -155
- package/components/chat-independent/src/index.vue.d.ts +7 -155
- package/components/drawer/src/ctx.d.ts +2 -2
- package/components/drawer/src/index.vue.d.ts +6 -6
- package/components/metahuman-broadcasting/src/index.vue.d.ts +6 -2
- package/components/pixi-frame/index.mjs +71 -21
- package/components/pixi-frame/src/bitmap.vue.d.ts +5 -1
- package/components/pixi-frame/src/index.vue.d.ts +5 -1
- package/components/routes-menu-content/index.mjs +1 -1
- package/components/table-columns/src/el-ctx.d.ts +1 -1
- package/components/tables-v1/src/ctx.d.ts +3 -3
- package/components/tables-v1/src/index.vue.d.ts +6 -6
- package/components/tables-v1-checkbox/src/ctx.d.ts +3 -3
- package/components/tables-v1-checkbox/src/index.vue.d.ts +14 -14
- package/components/text/src/ctx.d.ts +1 -1
- package/components/text/src/index.vue.d.ts +2 -2
- package/components/vditor/src/ctx.d.ts +1 -1
- package/components/vditor/src/index.vue.d.ts +1 -1
- package/element/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/element/bubble/index.d.ts +4 -0
- package/element/bubble/index.mjs +154 -0
- package/element/bubble/src/index.vue.d.ts +51 -0
- package/element/bubble/src/types.d.ts +19 -0
- package/element/index.css +1 -0
- package/element/thinking/index.d.ts +4 -0
- package/element/thinking/index.mjs +232 -0
- package/element/thinking/src/index.vue.d.ts +53 -0
- package/element/thinking/src/types.d.ts +20 -0
- package/package.json +12 -1
- package/components/bubble-templates/src/legacy.vue.d.ts +0 -153
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { defineComponent as B, ref as s, watch as T, computed as u, onUnmounted as F, resolveComponent as N, createElementBlock as a, createCommentVNode as t, openBlock as l, normalizeStyle as c, normalizeClass as f, createElementVNode as i, createVNode as V, renderSlot as n, Fragment as D, renderList as G } from "vue";
|
|
2
|
+
import { _ as W } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
3
|
+
const A = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "el-bubble-avatar el-bubble-avatar-size"
|
|
6
|
+
}, I = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "el-bubble-avatar-placeholder"
|
|
9
|
+
}, L = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "el-bubble-avatar"
|
|
12
|
+
}, R = { class: "el-bubble-content-wrapper" }, U = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "el-bubble-header"
|
|
15
|
+
}, j = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "el-bubble-loading-wrap"
|
|
18
|
+
}, q = {
|
|
19
|
+
key: 2,
|
|
20
|
+
class: "el-bubble-loading-wrap"
|
|
21
|
+
}, H = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "el-bubble-footer"
|
|
24
|
+
}, J = /* @__PURE__ */ B({
|
|
25
|
+
__name: "index",
|
|
26
|
+
props: {
|
|
27
|
+
placement: { default: "start" },
|
|
28
|
+
avatar: { default: "" },
|
|
29
|
+
loading: { type: Boolean },
|
|
30
|
+
shape: {},
|
|
31
|
+
variant: { default: "filled" },
|
|
32
|
+
maxWidth: { default: "500px" },
|
|
33
|
+
avatarSize: { default: "" },
|
|
34
|
+
avatarGap: { default: "12px" },
|
|
35
|
+
avatarShape: { default: "circle" },
|
|
36
|
+
avatarSrcSet: { default: "" },
|
|
37
|
+
avatarAlt: { default: "" },
|
|
38
|
+
avatarFit: { default: "cover" },
|
|
39
|
+
noStyle: { type: Boolean, default: !1 },
|
|
40
|
+
content: { default: "" }
|
|
41
|
+
},
|
|
42
|
+
emits: ["avatarError"],
|
|
43
|
+
setup(y, { expose: h, emit: m }) {
|
|
44
|
+
const g = y, S = m, o = s(!1), $ = s(!1);
|
|
45
|
+
T(
|
|
46
|
+
() => g.content,
|
|
47
|
+
(e, v) => {
|
|
48
|
+
e !== v && o.value && b();
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
const r = s(), d = {
|
|
52
|
+
interrupt: w,
|
|
53
|
+
continue: z,
|
|
54
|
+
restart: b,
|
|
55
|
+
destroy: C,
|
|
56
|
+
renderedContent: u(
|
|
57
|
+
() => o.value ? "" : r.value?.renderedContent.value || ""
|
|
58
|
+
),
|
|
59
|
+
isTyping: u(
|
|
60
|
+
() => !o.value && (r.value?.isTyping.value || !1)
|
|
61
|
+
),
|
|
62
|
+
progress: u(
|
|
63
|
+
() => o.value ? 0 : r.value?.progress.value || 0
|
|
64
|
+
)
|
|
65
|
+
};
|
|
66
|
+
function k(e) {
|
|
67
|
+
S("avatarError", e);
|
|
68
|
+
}
|
|
69
|
+
function w() {
|
|
70
|
+
r.value?.interrupt();
|
|
71
|
+
}
|
|
72
|
+
function z() {
|
|
73
|
+
r.value?.continue();
|
|
74
|
+
}
|
|
75
|
+
function b() {
|
|
76
|
+
o.value = !1, r.value?.restart();
|
|
77
|
+
}
|
|
78
|
+
function C() {
|
|
79
|
+
r.value?.destroy(), o.value = !0;
|
|
80
|
+
}
|
|
81
|
+
return F(d.destroy), h(d), (e, v) => {
|
|
82
|
+
const E = N("el-avatar");
|
|
83
|
+
return o.value ? t("", !0) : (l(), a("div", {
|
|
84
|
+
key: 0,
|
|
85
|
+
class: f(["el-bubble", {
|
|
86
|
+
"el-bubble-start": e.placement === "start",
|
|
87
|
+
"el-bubble-end": e.placement === "end",
|
|
88
|
+
"el-bubble-no-style": e.noStyle,
|
|
89
|
+
"el-bubble-is-typing": $.value
|
|
90
|
+
// 新增动态类名
|
|
91
|
+
}]),
|
|
92
|
+
style: c({
|
|
93
|
+
"--el-box-shadow-tertiary": `0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
94
|
+
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
95
|
+
0 2px 4px 0 rgba(0, 0, 0, 0.02)`,
|
|
96
|
+
"--bubble-content-max-width": `${e.maxWidth}`,
|
|
97
|
+
"--el-bubble-avatar-placeholder-width": `${e.$slots.avatar ? "" : e.avatarSize}`,
|
|
98
|
+
"--el-bubble-avatar-placeholder-height": `${e.$slots.avatar ? "" : e.avatarSize}`,
|
|
99
|
+
"--el-bubble-avatar-placeholder-gap": `${e.avatarGap}`
|
|
100
|
+
})
|
|
101
|
+
}, [
|
|
102
|
+
!e.$slots.avatar && e.avatar ? (l(), a("div", A, [
|
|
103
|
+
V(E, {
|
|
104
|
+
size: 0,
|
|
105
|
+
src: e.avatar,
|
|
106
|
+
shape: e.avatarShape,
|
|
107
|
+
"src-set": e.avatarSrcSet,
|
|
108
|
+
alt: e.avatarFit,
|
|
109
|
+
onError: k
|
|
110
|
+
}, null, 8, ["src", "shape", "src-set", "alt"])
|
|
111
|
+
])) : t("", !0),
|
|
112
|
+
!e.$slots.avatar && !e.avatar && e.avatarSize ? (l(), a("div", I)) : t("", !0),
|
|
113
|
+
e.$slots.avatar ? (l(), a("div", L, [
|
|
114
|
+
n(e.$slots, "avatar", {}, void 0, !0)
|
|
115
|
+
])) : t("", !0),
|
|
116
|
+
i("div", R, [
|
|
117
|
+
e.$slots.header ? (l(), a("div", U, [
|
|
118
|
+
n(e.$slots, "header", {}, void 0, !0)
|
|
119
|
+
])) : t("", !0),
|
|
120
|
+
i("div", {
|
|
121
|
+
class: f(["el-bubble-content", {
|
|
122
|
+
"el-bubble-content-loading": e.loading,
|
|
123
|
+
"el-bubble-content-round": e.shape === "round" && !e.noStyle,
|
|
124
|
+
"el-bubble-content-corner": e.shape === "corner" && !e.noStyle,
|
|
125
|
+
"el-bubble-content-filled": e.variant === "filled" && !e.noStyle,
|
|
126
|
+
"el-bubble-content-borderless": e.variant === "borderless" && !e.noStyle,
|
|
127
|
+
"el-bubble-content-outlined": e.variant === "outlined" && !e.noStyle,
|
|
128
|
+
"el-bubble-content-shadow": e.variant === "shadow" && !e.noStyle
|
|
129
|
+
}])
|
|
130
|
+
}, [
|
|
131
|
+
!o.value && e.$slots.content && !e.loading ? n(e.$slots, "content", { key: 0 }, void 0, !0) : t("", !0),
|
|
132
|
+
e.loading && !e.$slots.loading ? (l(), a("div", j, [
|
|
133
|
+
(l(), a(D, null, G(3, (K, p) => i("div", {
|
|
134
|
+
key: p,
|
|
135
|
+
class: "dot",
|
|
136
|
+
style: c({ animationDelay: `${p * 0.2}s` })
|
|
137
|
+
}, null, 4)), 64))
|
|
138
|
+
])) : t("", !0),
|
|
139
|
+
e.loading && e.$slots.loading ? (l(), a("div", q, [
|
|
140
|
+
n(e.$slots, "loading", {}, void 0, !0)
|
|
141
|
+
])) : t("", !0)
|
|
142
|
+
], 2),
|
|
143
|
+
e.$slots.footer ? (l(), a("div", H, [
|
|
144
|
+
n(e.$slots, "footer", {}, void 0, !0)
|
|
145
|
+
])) : t("", !0)
|
|
146
|
+
])
|
|
147
|
+
], 6));
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}), P = /* @__PURE__ */ W(J, [["__scopeId", "data-v-84e81b19"]]);
|
|
151
|
+
export {
|
|
152
|
+
P as Bubble,
|
|
153
|
+
P as default
|
|
154
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BubbleProps } from './types';
|
|
2
|
+
declare function interrupt(): void;
|
|
3
|
+
declare function continueTyping(): void;
|
|
4
|
+
declare function restart(): void;
|
|
5
|
+
declare function destroy(): void;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
avatar?(_: {}): any;
|
|
10
|
+
header?(_: {}): any;
|
|
11
|
+
content?(_: {}): any;
|
|
12
|
+
loading?(_: {}): any;
|
|
13
|
+
footer?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<BubbleProps, {
|
|
20
|
+
interrupt: typeof interrupt;
|
|
21
|
+
continue: typeof continueTyping;
|
|
22
|
+
restart: typeof restart;
|
|
23
|
+
destroy: typeof destroy;
|
|
24
|
+
renderedContent: import('vue').ComputedRef<any>;
|
|
25
|
+
isTyping: import('vue').ComputedRef<any>;
|
|
26
|
+
progress: import('vue').ComputedRef<any>;
|
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
28
|
+
avatarError: (e: Event) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<BubbleProps> & Readonly<{
|
|
30
|
+
onAvatarError?: ((e: Event) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
placement: "start" | "end";
|
|
33
|
+
avatar: string;
|
|
34
|
+
variant: "filled" | "borderless" | "outlined" | "shadow";
|
|
35
|
+
maxWidth: string;
|
|
36
|
+
avatarSize: string;
|
|
37
|
+
avatarGap: string;
|
|
38
|
+
avatarShape: "circle" | "square";
|
|
39
|
+
avatarSrcSet: string;
|
|
40
|
+
avatarAlt: string;
|
|
41
|
+
avatarFit: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
42
|
+
noStyle: boolean;
|
|
43
|
+
content: string;
|
|
44
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface BubbleProps {
|
|
2
|
+
placement?: 'start' | 'end';
|
|
3
|
+
avatar?: string;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
shape?: 'round' | 'corner';
|
|
6
|
+
variant?: 'filled' | 'borderless' | 'outlined' | 'shadow';
|
|
7
|
+
maxWidth?: string;
|
|
8
|
+
avatarSize?: string;
|
|
9
|
+
avatarGap?: string;
|
|
10
|
+
avatarShape?: 'circle' | 'square';
|
|
11
|
+
avatarSrcSet?: string;
|
|
12
|
+
avatarAlt?: string;
|
|
13
|
+
avatarFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
14
|
+
noStyle?: boolean;
|
|
15
|
+
content?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface BubbleEmits {
|
|
18
|
+
(event: 'avatarError', e: Event): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@charset "UTF-8";.el-bubble[data-v-84e81b19]{display:flex;gap:var(--el-bubble-avatar-placeholder-gap)}.el-bubble-avatar-size[data-v-84e81b19] .el-avatar,.el-bubble-avatar-placeholder[data-v-84e81b19]{width:var(--el-bubble-avatar-placeholder-width);height:var(--el-bubble-avatar-placeholder-height)}.el-bubble-start .el-bubble-content-wrapper .el-bubble-content-corner[data-v-84e81b19]{border-start-start-radius:calc(var(--el-border-radius-base) - 2px)}.el-bubble-end[data-v-84e81b19]{justify-content:end;flex-direction:row-reverse}.el-bubble-end .el-bubble-content-wrapper[data-v-84e81b19]{align-items:flex-end}.el-bubble-end .el-bubble-content-wrapper .el-bubble-content-corner[data-v-84e81b19]{border-start-end-radius:calc(var(--el-border-radius-base) - 2px)}.el-bubble-no-style .el-bubble-content-wrapper .el-bubble-content[data-v-84e81b19]{background-color:transparent;padding:0}.el-bubble-content-wrapper[data-v-84e81b19]{flex:auto;display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:100%}.el-bubble-content-wrapper .el-bubble-header[data-v-84e81b19],.el-bubble-content-wrapper .el-bubble-content[data-v-84e81b19],.el-bubble-content-wrapper .el-bubble-footer[data-v-84e81b19]{font-size:var(--el-font-size-base);color:var(--el-text-color-primary);line-height:var(--el-font-line-height-primary)}.el-bubble-content-wrapper .el-bubble-content[data-v-84e81b19]{background-color:var(--el-fill-color);padding:var(--el-padding-sm, 12px) calc(var(--el-padding-sm, 12px) + 4px);border-radius:calc(var(--el-border-radius-base) + 4px);position:relative;box-sizing:border-box;min-width:0;max-width:var(--bubble-content-max-width);color:var(--el-text-color-primary);font-size:var(--el-font-size-base);line-height:var(--el-font-line-height-primary);min-height:calc(var(--el-padding-sm, 12px) * 2 + var(--el-font-line-height-primary) * var(--el-font-size-base));word-break:break-word}.el-bubble-content-wrapper .el-bubble-content .no-content[data-v-84e81b19]{height:0}.el-bubble-content-wrapper .el-bubble-content-round[data-v-84e81b19]{border-radius:var(--el-border-radius-round)}.el-bubble-content-wrapper .el-bubble-content-filled[data-v-84e81b19]{background-color:var(--el-fill-color)}.el-bubble-content-wrapper .el-bubble-content-borderless[data-v-84e81b19]{background-color:var(--el-fill-color);border:var(--el-border-width) solid var(--el-border-color)}.el-bubble-content-wrapper .el-bubble-content-outlined[data-v-84e81b19]{background:none;border:var(--el-border-width) solid var(--el-border-color)}.el-bubble-content-wrapper .el-bubble-content-shadow[data-v-84e81b19]{background:none;box-shadow:var(--el-box-shadow)}.el-bubble-content-wrapper .el-bubble-content-loading[data-v-84e81b19]{width:fit-content}.el-bubble-content-wrapper .el-bubble-content-loading .el-bubble-loading-wrap[data-v-84e81b19]{display:flex;justify-content:center;align-items:center;gap:5px}.el-bubble-content-wrapper .el-bubble-content-loading .dot[data-v-84e81b19]{will-change:transform;width:5px;height:5px;background-color:var(--el-color-primary);border-radius:50%;animation:wave-84e81b19 1s infinite ease-in-out}.el-bubble-content-wrapper .el-bubble-content-loading .dot-2[data-v-84e81b19]{animation-delay:.2s}.el-bubble-content-wrapper .el-bubble-content-loading .dot-3[data-v-84e81b19]{animation-delay:.4s}@keyframes wave-84e81b19{0%,to{transform:translateY(-2px)}50%{transform:translateY(2px)}}.el-bubble-content-wrapper .el-bubble-footer[data-v-84e81b19]{margin-top:var(--el-padding-sm, 12px)}.el-thinking[data-v-1247234a]{font-family:system-ui,sans-serif;margin:0 auto}.trigger[data-v-1247234a]{display:flex;align-items:center;height:100%;width:var(--el-thinking-button-width);gap:8px;padding:var(--el-padding-sm, 12px) calc(var(--el-padding-sm, 12px) + 4px);border:1px solid #e4e4e4;border-radius:8px;background:#fff;cursor:pointer;margin-bottom:8px}.trigger .el-icon-center[data-v-1247234a]{height:100%;display:flex;align-items:center}.trigger .start-color[data-v-1247234a]{color:var(--el-color-warning)}.trigger .end-color[data-v-1247234a]{color:var(--el-color-success)}.trigger .is-loading[data-v-1247234a]{color:var(--el-color-primary)}.trigger .error-color[data-v-1247234a]{color:var(--el-color-danger)}.trigger .cancel-color[data-v-1247234a]{color:var(--el-color-info)}.trigger[data-v-1247234a]:hover{background:#f8f8f8}.trigger.disabled[data-v-1247234a]{cursor:pointer}.trigger[data-v-1247234a]:disabled{cursor:not-allowed;opacity:.7}.status-icon[data-v-1247234a]{font-size:1.2em}.arrow[data-v-1247234a]{margin-left:auto;transition:transform var(--el-thinking-animation-duration)}.arrow.expanded[data-v-1247234a]{transform:rotate(180deg)}.slide-enter-active[data-v-1247234a],.slide-leave-active[data-v-1247234a]{height:calc-size(max-content,size);transition:height var(--el-thinking-animation-duration) ease-in-out,opacity var(--el-thinking-animation-duration) ease-in-out;overflow:hidden}.slide-enter-from[data-v-1247234a],.slide-leave-to[data-v-1247234a]{height:0!important;opacity:0}.content-wrapper[data-v-1247234a]{box-sizing:border-box;min-width:0}.content pre[data-v-1247234a]{border:1px solid #eee;background:var(--el-thinking-content-wrapper-background-color);padding:var(--el-padding-sm, 12px) calc(var(--el-padding-sm, 12px) + 4px);border-radius:calc(var(--el-border-radius-base) + 4px);max-width:var(--el-thinking-content-wrapper-width);font-size:14px;color:var(--el-thinking-content-wrapper-color);white-space:pre-wrap;font-family:DeepSeek-CJK-patch,Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,Oxygen,Open Sans,sans-serif;margin:0;line-height:var(--el-font-line-height-primary)}.error-state[data-v-1247234a]{border-color:#ffd0d0;background:#fff0f0}.error-message[data-v-1247234a]{color:#dc3545;height:fit-content;padding:8px;background:#ffeef0;border-radius:4px}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { defineComponent as p, createElementBlock as n, openBlock as a, createElementVNode as l, ref as L, watch as k, computed as V, resolveComponent as B, normalizeStyle as x, createVNode as o, normalizeClass as g, renderSlot as f, createBlock as m, createCommentVNode as u, withCtx as r, unref as _, createTextVNode as z, toDisplayString as w, Transition as y, withDirectives as M, vShow as S } from "vue";
|
|
2
|
+
import { _ as $ } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
3
|
+
var E = /* @__PURE__ */ p({
|
|
4
|
+
name: "ArrowUpBold",
|
|
5
|
+
__name: "arrow-up-bold",
|
|
6
|
+
setup(c) {
|
|
7
|
+
return (i, e) => (a(), n("svg", {
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
viewBox: "0 0 1024 1024"
|
|
10
|
+
}, [
|
|
11
|
+
l("path", {
|
|
12
|
+
fill: "currentColor",
|
|
13
|
+
d: "M104.704 685.248a64 64 0 0 0 90.496 0l316.8-316.8 316.8 316.8a64 64 0 0 0 90.496-90.496L557.248 232.704a64 64 0 0 0-90.496 0L104.704 594.752a64 64 0 0 0 0 90.496z"
|
|
14
|
+
})
|
|
15
|
+
]));
|
|
16
|
+
}
|
|
17
|
+
}), N = E, W = /* @__PURE__ */ p({
|
|
18
|
+
name: "CircleCloseFilled",
|
|
19
|
+
__name: "circle-close-filled",
|
|
20
|
+
setup(c) {
|
|
21
|
+
return (i, e) => (a(), n("svg", {
|
|
22
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23
|
+
viewBox: "0 0 1024 1024"
|
|
24
|
+
}, [
|
|
25
|
+
l("path", {
|
|
26
|
+
fill: "currentColor",
|
|
27
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
|
|
28
|
+
})
|
|
29
|
+
]));
|
|
30
|
+
}
|
|
31
|
+
}), b = W, H = /* @__PURE__ */ p({
|
|
32
|
+
name: "Loading",
|
|
33
|
+
__name: "loading",
|
|
34
|
+
setup(c) {
|
|
35
|
+
return (i, e) => (a(), n("svg", {
|
|
36
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37
|
+
viewBox: "0 0 1024 1024"
|
|
38
|
+
}, [
|
|
39
|
+
l("path", {
|
|
40
|
+
fill: "currentColor",
|
|
41
|
+
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
|
|
42
|
+
})
|
|
43
|
+
]));
|
|
44
|
+
}
|
|
45
|
+
}), T = H, A = /* @__PURE__ */ p({
|
|
46
|
+
name: "Opportunity",
|
|
47
|
+
__name: "opportunity",
|
|
48
|
+
setup(c) {
|
|
49
|
+
return (i, e) => (a(), n("svg", {
|
|
50
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
51
|
+
viewBox: "0 0 1024 1024"
|
|
52
|
+
}, [
|
|
53
|
+
l("path", {
|
|
54
|
+
fill: "currentColor",
|
|
55
|
+
d: "M384 960v-64h192.064v64zm448-544a350.656 350.656 0 0 1-128.32 271.424C665.344 719.04 640 763.776 640 813.504V832H320v-14.336c0-48-19.392-95.36-57.216-124.992a351.552 351.552 0 0 1-128.448-344.256c25.344-136.448 133.888-248.128 269.76-276.48A352.384 352.384 0 0 1 832 416m-544 32c0-132.288 75.904-224 192-224v-64c-154.432 0-256 122.752-256 288z"
|
|
56
|
+
})
|
|
57
|
+
]));
|
|
58
|
+
}
|
|
59
|
+
}), D = A, F = /* @__PURE__ */ p({
|
|
60
|
+
name: "SuccessFilled",
|
|
61
|
+
__name: "success-filled",
|
|
62
|
+
setup(c) {
|
|
63
|
+
return (i, e) => (a(), n("svg", {
|
|
64
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
65
|
+
viewBox: "0 0 1024 1024"
|
|
66
|
+
}, [
|
|
67
|
+
l("path", {
|
|
68
|
+
fill: "currentColor",
|
|
69
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
|
|
70
|
+
})
|
|
71
|
+
]));
|
|
72
|
+
}
|
|
73
|
+
}), I = F;
|
|
74
|
+
const O = ["disabled"], U = { class: "status-icon" }, j = { class: "label" }, q = { class: "content" }, G = { class: "error-message" }, J = /* @__PURE__ */ p({
|
|
75
|
+
__name: "index",
|
|
76
|
+
props: {
|
|
77
|
+
modelValue: { type: Boolean, default: !0 },
|
|
78
|
+
content: { default: "" },
|
|
79
|
+
status: { default: "start" },
|
|
80
|
+
disabled: { type: Boolean, default: !1 },
|
|
81
|
+
autoCollapse: { type: Boolean, default: !1 },
|
|
82
|
+
duration: { default: "0.2s" },
|
|
83
|
+
buttonWidth: { default: "160px" },
|
|
84
|
+
maxWidth: { default: "500px" },
|
|
85
|
+
backgroundColor: { default: "#fcfcfc" },
|
|
86
|
+
color: { default: "var(--el-color-info)" }
|
|
87
|
+
},
|
|
88
|
+
emits: ["change", "update:modelValue"],
|
|
89
|
+
setup(c, { emit: i }) {
|
|
90
|
+
const e = c, h = i, s = L(e.modelValue);
|
|
91
|
+
k(
|
|
92
|
+
() => e.modelValue,
|
|
93
|
+
(t) => {
|
|
94
|
+
s.value = t;
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
function C() {
|
|
98
|
+
e.disabled || (s.value = !s.value, h("change", { value: s.value, status: e.status }), h("update:modelValue", s.value));
|
|
99
|
+
}
|
|
100
|
+
const v = V(() => e.status === "error" ? "思考过程中出现错误" : e.content);
|
|
101
|
+
return k(
|
|
102
|
+
() => e.status,
|
|
103
|
+
(t) => {
|
|
104
|
+
t === "end" && e.autoCollapse && (s.value = !1, h("update:modelValue", s.value));
|
|
105
|
+
}
|
|
106
|
+
), (t, K) => {
|
|
107
|
+
const d = B("el-icon");
|
|
108
|
+
return a(), n("div", {
|
|
109
|
+
class: "el-thinking",
|
|
110
|
+
style: x({
|
|
111
|
+
"--el-thinking-button-width": e.buttonWidth,
|
|
112
|
+
"--el-thinking-animation-duration": e.duration,
|
|
113
|
+
"--el-thinking-content-wrapper-width": e.maxWidth,
|
|
114
|
+
"--el-thinking-content-wrapper-background-color": e.backgroundColor,
|
|
115
|
+
"--el-thinking-content-wrapper-color": e.color
|
|
116
|
+
})
|
|
117
|
+
}, [
|
|
118
|
+
l("button", {
|
|
119
|
+
class: g(["trigger", [t.status, { disabled: !e.disabled }]]),
|
|
120
|
+
disabled: e.disabled,
|
|
121
|
+
onClick: C
|
|
122
|
+
}, [
|
|
123
|
+
l("span", U, [
|
|
124
|
+
f(t.$slots, "status-icon", {
|
|
125
|
+
status: e.status
|
|
126
|
+
}, () => [
|
|
127
|
+
t.status === "thinking" ? (a(), m(d, {
|
|
128
|
+
key: 0,
|
|
129
|
+
class: "is-loading el-icon-center"
|
|
130
|
+
}, {
|
|
131
|
+
default: r(() => [
|
|
132
|
+
o(_(T))
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
})) : u("", !0),
|
|
136
|
+
t.status === "start" ? (a(), m(d, {
|
|
137
|
+
key: 1,
|
|
138
|
+
class: "el-icon-center start-color"
|
|
139
|
+
}, {
|
|
140
|
+
default: r(() => [
|
|
141
|
+
o(_(D))
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
})) : u("", !0),
|
|
145
|
+
t.status === "end" ? (a(), m(d, {
|
|
146
|
+
key: 2,
|
|
147
|
+
class: "el-icon-center end-color"
|
|
148
|
+
}, {
|
|
149
|
+
default: r(() => [
|
|
150
|
+
o(_(I))
|
|
151
|
+
]),
|
|
152
|
+
_: 1
|
|
153
|
+
})) : u("", !0),
|
|
154
|
+
t.status === "error" ? (a(), m(d, {
|
|
155
|
+
key: 3,
|
|
156
|
+
class: "el-icon-center error-color"
|
|
157
|
+
}, {
|
|
158
|
+
default: r(() => [
|
|
159
|
+
o(_(b))
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
})) : u("", !0),
|
|
163
|
+
t.status === "cancel" ? (a(), m(d, {
|
|
164
|
+
key: 4,
|
|
165
|
+
class: "el-icon-center cancel-color"
|
|
166
|
+
}, {
|
|
167
|
+
default: r(() => [
|
|
168
|
+
o(_(b))
|
|
169
|
+
]),
|
|
170
|
+
_: 1
|
|
171
|
+
})) : u("", !0)
|
|
172
|
+
], !0)
|
|
173
|
+
]),
|
|
174
|
+
l("span", j, [
|
|
175
|
+
f(t.$slots, "label", {
|
|
176
|
+
status: e.status
|
|
177
|
+
}, () => [
|
|
178
|
+
z(w(t.status === "thinking" ? "思考中..." : t.status === "error" ? "思考遇到问题" : t.status === "end" ? "思考完成" : t.status === "cancel" ? "中断思考" : "开始思考"), 1)
|
|
179
|
+
], !0)
|
|
180
|
+
]),
|
|
181
|
+
o(y, { name: "rotate" }, {
|
|
182
|
+
default: r(() => [
|
|
183
|
+
e.disabled ? u("", !0) : (a(), n("span", {
|
|
184
|
+
key: 0,
|
|
185
|
+
class: g(["arrow el-icon-center", { expanded: s.value }])
|
|
186
|
+
}, [
|
|
187
|
+
f(t.$slots, "arrow", {}, () => [
|
|
188
|
+
o(d, { class: "el-icon-center" }, {
|
|
189
|
+
default: r(() => [
|
|
190
|
+
o(_(N))
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
})
|
|
194
|
+
], !0)
|
|
195
|
+
], 2))
|
|
196
|
+
]),
|
|
197
|
+
_: 3
|
|
198
|
+
})
|
|
199
|
+
], 10, O),
|
|
200
|
+
o(y, { name: "slide" }, {
|
|
201
|
+
default: r(() => [
|
|
202
|
+
v.value ? M((a(), n("div", {
|
|
203
|
+
key: 0,
|
|
204
|
+
class: g(["content-wrapper", { "error-state": t.status === "error" }])
|
|
205
|
+
}, [
|
|
206
|
+
l("div", q, [
|
|
207
|
+
t.status !== "error" ? f(t.$slots, "content", {
|
|
208
|
+
key: 0,
|
|
209
|
+
content: v.value
|
|
210
|
+
}, () => [
|
|
211
|
+
l("pre", null, w(v.value), 1)
|
|
212
|
+
], !0) : f(t.$slots, "error", {
|
|
213
|
+
key: 1,
|
|
214
|
+
errorContent: v.value
|
|
215
|
+
}, () => [
|
|
216
|
+
l("div", G, w(v.value), 1)
|
|
217
|
+
], !0)
|
|
218
|
+
])
|
|
219
|
+
], 2)), [
|
|
220
|
+
[S, s.value]
|
|
221
|
+
]) : u("", !0)
|
|
222
|
+
]),
|
|
223
|
+
_: 3
|
|
224
|
+
})
|
|
225
|
+
], 4);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
}), R = /* @__PURE__ */ $(J, [["__scopeId", "data-v-1247234a"]]);
|
|
229
|
+
export {
|
|
230
|
+
R as Thinking,
|
|
231
|
+
R as default
|
|
232
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ThinkingProps, ThinkingStatus } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: {
|
|
5
|
+
'status-icon'?(_: {
|
|
6
|
+
status: ThinkingStatus;
|
|
7
|
+
}): any;
|
|
8
|
+
label?(_: {
|
|
9
|
+
status: ThinkingStatus;
|
|
10
|
+
}): any;
|
|
11
|
+
arrow?(_: {}): any;
|
|
12
|
+
content?(_: {
|
|
13
|
+
content: string;
|
|
14
|
+
}): any;
|
|
15
|
+
error?(_: {
|
|
16
|
+
errorContent: string;
|
|
17
|
+
}): any;
|
|
18
|
+
};
|
|
19
|
+
refs: {};
|
|
20
|
+
rootEl: HTMLDivElement;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
23
|
+
declare const __VLS_component: import('vue').DefineComponent<ThinkingProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
24
|
+
change: (value: {
|
|
25
|
+
value: boolean;
|
|
26
|
+
status: ThinkingStatus;
|
|
27
|
+
}) => any;
|
|
28
|
+
"update:modelValue": (value: boolean) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<ThinkingProps> & Readonly<{
|
|
30
|
+
onChange?: ((value: {
|
|
31
|
+
value: boolean;
|
|
32
|
+
status: ThinkingStatus;
|
|
33
|
+
}) => any) | undefined;
|
|
34
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
maxWidth: string;
|
|
37
|
+
content: string;
|
|
38
|
+
modelValue: boolean;
|
|
39
|
+
status: ThinkingStatus;
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
autoCollapse: boolean;
|
|
42
|
+
duration: string;
|
|
43
|
+
buttonWidth: string;
|
|
44
|
+
backgroundColor: string;
|
|
45
|
+
color: string;
|
|
46
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
47
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
48
|
+
export default _default;
|
|
49
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type ThinkingStatus = 'start' | 'thinking' | 'end' | 'error' | 'cancel';
|
|
2
|
+
export interface ThinkingProps {
|
|
3
|
+
modelValue?: boolean;
|
|
4
|
+
content?: string;
|
|
5
|
+
status?: ThinkingStatus;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
autoCollapse?: boolean;
|
|
8
|
+
duration?: string;
|
|
9
|
+
buttonWidth?: string;
|
|
10
|
+
maxWidth?: string;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
color?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ThinkingEmits {
|
|
15
|
+
(event: 'change', value: {
|
|
16
|
+
value: boolean;
|
|
17
|
+
status: ThinkingStatus;
|
|
18
|
+
}): void;
|
|
19
|
+
(event: 'update:modelValue', value: boolean): void;
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vunk/plus",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -39,6 +39,14 @@
|
|
|
39
39
|
"import": "./icons/end/index.mjs",
|
|
40
40
|
"types": "./icons/end/index.d.ts"
|
|
41
41
|
},
|
|
42
|
+
"./element/thinking": {
|
|
43
|
+
"import": "./element/thinking/index.mjs",
|
|
44
|
+
"types": "./element/thinking/index.d.ts"
|
|
45
|
+
},
|
|
46
|
+
"./element/bubble": {
|
|
47
|
+
"import": "./element/bubble/index.mjs",
|
|
48
|
+
"types": "./element/bubble/index.d.ts"
|
|
49
|
+
},
|
|
42
50
|
"./composables": {
|
|
43
51
|
"import": "./composables/index.mjs",
|
|
44
52
|
"types": "./composables/index.d.ts"
|
|
@@ -154,6 +162,9 @@
|
|
|
154
162
|
"./index.css": {
|
|
155
163
|
"import": "./index.css"
|
|
156
164
|
},
|
|
165
|
+
"./element/index.css": {
|
|
166
|
+
"import": "./element/index.css"
|
|
167
|
+
},
|
|
157
168
|
"./components/xgplayer/index.css": {
|
|
158
169
|
"import": "./components/xgplayer/index.css"
|
|
159
170
|
},
|