@vunk/plus 1.12.2 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/components/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  2. package/components/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  3. package/components/agent-chat-provider/index.cjs +1 -0
  4. package/components/agent-chat-provider/index.mjs +113 -187
  5. package/components/agent-chat-provider/src/index.vue.d.ts +3 -2
  6. package/components/avatar/index.cjs +1 -0
  7. package/components/avatar/index.mjs +25 -31
  8. package/components/avatar/src/index.vue.d.ts +40 -39
  9. package/components/broadcasting-markdown/__tests__/const.test.d.ts +1 -0
  10. package/components/broadcasting-markdown/__tests__/utils.test.d.ts +1 -0
  11. package/components/broadcasting-markdown/index.cjs +5 -0
  12. package/components/broadcasting-markdown/index.mjs +346 -4376
  13. package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +18 -24
  14. package/components/broadcasting-markdown/src/index.vue.d.ts +101 -51
  15. package/components/broadcasting-markdown/src/paragraph.vue.d.ts +17 -29
  16. package/components/broadcasting-markdown/src/speech-error.vue.d.ts +2 -59
  17. package/components/bubble-list/index.cjs +1 -0
  18. package/components/bubble-list/index.mjs +220 -302
  19. package/components/bubble-list/src/core/index.vue.d.ts +40 -885
  20. package/components/bubble-list/src/core/loading.vue.d.ts +3 -0
  21. package/components/bubble-list/src/index.vue.d.ts +29 -1321
  22. package/components/bubble-templates/index.cjs +1 -0
  23. package/components/bubble-templates/index.mjs +34 -49
  24. package/components/bubble-templates/src/index.vue.d.ts +3 -224
  25. package/components/chat-independent/index.cjs +1 -0
  26. package/components/chat-independent/index.mjs +105 -212
  27. package/components/chat-independent/src/index.vue.d.ts +20 -2712
  28. package/components/components.css +1 -0
  29. package/components/drawer/index.cjs +1 -0
  30. package/components/drawer/index.mjs +53 -94
  31. package/components/drawer/src/ctx.d.ts +22 -22
  32. package/components/drawer/src/index.vue.d.ts +84 -557
  33. package/components/index.cjs +1 -0
  34. package/components/index.d.ts +1 -0
  35. package/components/lottie-animation/index.cjs +1 -0
  36. package/components/lottie-animation/index.mjs +36 -55
  37. package/components/lottie-animation/src/index.vue.d.ts +3 -2
  38. package/components/metahuman-broadcasting/index.cjs +1 -0
  39. package/components/metahuman-broadcasting/index.mjs +89 -140
  40. package/components/metahuman-broadcasting/src/index.vue.d.ts +16 -718
  41. package/components/monaco-editor/index.cjs +1 -0
  42. package/components/monaco-editor/index.mjs +68 -95
  43. package/components/monaco-editor/src/index.vue.d.ts +3 -2
  44. package/components/monaco-environment/index.cjs +1 -0
  45. package/components/monaco-environment/index.mjs +23 -38
  46. package/components/monaco-environment/src/index.vue.d.ts +2 -1
  47. package/components/pixi-frame/index.cjs +1 -0
  48. package/components/pixi-frame/index.mjs +941 -1969
  49. package/components/pixi-frame/src/apng.vue.d.ts +17 -73
  50. package/components/pixi-frame/src/bitmap-generator.vue.d.ts +24 -66
  51. package/components/pixi-frame/src/bitmap.vue.d.ts +28 -80
  52. package/components/pixi-frame/src/buffer-image.vue.d.ts +29 -97
  53. package/components/pixi-frame/src/core.vue.d.ts +20 -75
  54. package/components/pixi-frame/src/index.vue.d.ts +302 -237
  55. package/components/pixi-frame/src/provider.vue.d.ts +12 -1
  56. package/components/pixi-frame/src/video.vue.d.ts +17 -71
  57. package/components/pixi-frame/src/view.vue.d.ts +4 -16
  58. package/components/recorder-button/index.cjs +1 -0
  59. package/components/recorder-button/index.mjs +140 -269
  60. package/components/recorder-button/src/index.vue.d.ts +67 -66
  61. package/components/routes-menu-content/index.cjs +1 -0
  62. package/components/routes-menu-content/index.mjs +150 -229
  63. package/components/routes-menu-content/src/index.vue.d.ts +27 -26
  64. package/components/routes-menu-content/src/item/core/index.vue.d.ts +27 -26
  65. package/components/routes-menu-content/src/item/index.vue.d.ts +27 -26
  66. package/components/scrollbar/index.cjs +1 -0
  67. package/components/scrollbar/index.mjs +288 -567
  68. package/components/scrollbar/src/bar.vue.d.ts +6 -133
  69. package/components/scrollbar/src/index.vue.d.ts +66 -337
  70. package/components/scrollbar/src/thumb.vue.d.ts +3 -80
  71. package/components/sender/index.cjs +1 -0
  72. package/components/sender/index.mjs +156 -285
  73. package/components/sender/src/SenderHeader.vue.d.ts +14 -221
  74. package/components/sender/src/index.vue.d.ts +16 -505
  75. package/components/speech-button/index.cjs +1 -0
  76. package/components/speech-button/index.mjs +98 -144
  77. package/components/speech-button/src/LoadingIcon.vue.d.ts +2 -1
  78. package/components/speech-button/src/RecordingIcon.vue.d.ts +2 -1
  79. package/components/speech-button/src/index.vue.d.ts +6 -5
  80. package/components/table-columns/index.cjs +1 -0
  81. package/components/table-columns/index.mjs +48 -78
  82. package/components/table-columns/src/ctx.d.ts +10 -10
  83. package/components/table-columns/src/el-ctx.d.ts +1 -1
  84. package/components/table-columns/src/index.vue.d.ts +24 -23
  85. package/components/tables-v1/index.cjs +1 -0
  86. package/components/tables-v1/index.mjs +99 -160
  87. package/components/tables-v1/src/ctx.d.ts +28 -28
  88. package/components/tables-v1/src/el-ctx.d.ts +2 -2
  89. package/components/tables-v1/src/index.vue.d.ts +88 -2243
  90. package/components/tables-v1-checkbox/index.cjs +98 -0
  91. package/components/tables-v1-checkbox/index.mjs +1594 -3735
  92. package/components/tables-v1-checkbox/src/ctx.d.ts +26 -26
  93. package/components/tables-v1-checkbox/src/index.vue.d.ts +176 -2330
  94. package/components/text/index.cjs +1 -0
  95. package/components/text/index.mjs +70 -108
  96. package/components/text/src/ctx.d.ts +31 -31
  97. package/components/text/src/index.vue.d.ts +92 -1819
  98. package/components/thinking/index.cjs +1 -0
  99. package/components/thinking/index.mjs +127 -227
  100. package/components/thinking/src/index.vue.d.ts +22 -2044
  101. package/components/typing-markdown/index.cjs +1 -0
  102. package/components/typing-markdown/index.mjs +61 -201
  103. package/components/typing-markdown/src/index.vue.d.ts +3 -2
  104. package/components/vditor/index.cjs +1 -0
  105. package/components/vditor/index.mjs +121 -195
  106. package/components/vditor/src/ctx.d.ts +2 -2
  107. package/components/vditor/src/handle-fullscreen.vue.d.ts +3 -2
  108. package/components/vditor/src/handle-value.vue.d.ts +3 -2
  109. package/components/vditor/src/index.vue.d.ts +5 -4
  110. package/components/xgplayer/index.cjs +1 -0
  111. package/components/xgplayer/index.mjs +49 -90
  112. package/components/xgplayer/src/core.vue.d.ts +13 -18
  113. package/components/xgplayer/src/index.vue.d.ts +13 -67
  114. package/composables/el-breakpoints/index.cjs +1 -0
  115. package/composables/el-breakpoints/index.d.ts +10 -10
  116. package/composables/el-breakpoints/index.mjs +10 -12
  117. package/composables/index.cjs +1 -0
  118. package/composables/index.d.ts +1 -0
  119. package/composables/recorder/index.cjs +1 -0
  120. package/composables/recorder/index.mjs +9172 -14803
  121. package/element/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  122. package/element/bubble/index.cjs +3 -0
  123. package/element/bubble/index.d.ts +1 -1
  124. package/element/bubble/index.mjs +1 -1
  125. package/element/bubble/src/index.vue.d.ts +22 -22
  126. package/element/index.css +1 -1
  127. package/element/thinking/index.cjs +1 -0
  128. package/element/thinking/index.d.ts +1 -1
  129. package/element/thinking/index.mjs +1 -1
  130. package/element/thinking/src/index.vue.d.ts +26 -26
  131. package/element/thinking/src/types.d.ts +10 -0
  132. package/icons/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  133. package/icons/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  134. package/icons/end/index.cjs +1 -0
  135. package/icons/end/index.mjs +21 -26
  136. package/icons/end/src/index.vue.d.ts +3 -0
  137. package/icons/keyboard/index.cjs +1 -0
  138. package/icons/keyboard/index.mjs +21 -26
  139. package/icons/keyboard/src/index.vue.d.ts +3 -0
  140. package/icons/start/index.cjs +1 -0
  141. package/icons/start/index.mjs +21 -26
  142. package/icons/start/src/index.vue.d.ts +3 -0
  143. package/icons/voice/index.cjs +1 -0
  144. package/icons/voice/index.mjs +26 -44
  145. package/icons/voice/src/index.vue.d.ts +2 -3
  146. package/index.css +2 -558
  147. package/index.d.ts +1 -0
  148. package/package.json +78 -87
  149. package/shared/data/index.cjs +1 -0
  150. package/shared/data/index.mjs +16 -22
  151. package/shared/types/index.cjs +1 -0
  152. package/shared/types/index.d.ts +1 -0
  153. package/components/LinkOutlined.mjs +0 -1321
  154. package/components/_commonjsHelpers.mjs +0 -7
  155. package/components/_plugin-vue_export-helper.mjs +0 -9
  156. package/components/bubble-list/index.css +0 -70
  157. package/components/bubble-templates/index.css +0 -4
  158. package/components/chat-independent/index.css +0 -47
  159. package/components/drawer/index.css +0 -124
  160. package/components/index2.mjs +0 -78
  161. package/components/lottie-animation/index.css +0 -4
  162. package/components/monaco-editor/index.css +0 -4
  163. package/components/pixi-frame/index.css +0 -4
  164. package/components/recorder-button/index.css +0 -69
  165. package/components/sender/index.css +0 -22
  166. package/components/speech-button/index.css +0 -10
  167. package/components/tables-v1/index.css +0 -7
  168. package/components/tables-v1-checkbox/index.css +0 -8
  169. package/components/thinking/index.css +0 -125
  170. package/components/typing-markdown/index.css +0 -31
  171. package/components/vditor/index.css +0 -12
  172. package/components/xgplayer/index.css +0 -1
  173. package/icons/_plugin-vue_export-helper.mjs +0 -9
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("@element-plus/icons-vue"),b=require("@vunk/plus/components/scrollbar"),c=require("element-plus"),y={modelValue:{type:Boolean,default:!0},content:{type:String,default:""},status:{type:String,default:"start"},disabled:{type:Boolean,default:!1},autoCollapse:{type:Boolean,default:!1},duration:{type:String,default:"0.2s"},buttonWidth:{type:String,default:"160px"},maxWidth:{type:String,default:"100%"},backgroundColor:{type:String,default:"#fcfcfc"},color:{type:String,default:"var(--el-color-info)"},title:{type:String,default:"分析用户需求"},skipText:{type:String,default:"跳过思考"},showSkip:{type:Boolean,default:!1},radius:{type:String,default:"22px"},borderColor:{type:String,default:"#e4e7ed"},maxHeight:{type:String,default:""}},S={change:null,"update:modelValue":null,skip:null},V={class:"vk-thinking__header"},C=["disabled"],x={class:"vk-thinking__title"},w={class:"vk-thinking__body"},T={class:"vk-thinking__content"},a=e.defineComponent({name:"VkThinking",inheritAttrs:!1,__name:"index",props:y,emits:S,setup(l,{emit:k}){const t=l,o=k,h=e.useSlots(),n=e.ref(t.modelValue);e.watch(()=>t.modelValue,i=>{n.value=i}),e.watch(()=>t.status,i=>{i==="end"&&t.autoCollapse&&(n.value=!1,o("update:modelValue",!1))});const s=e.computed(()=>t.status==="error"?"思考过程中出现错误":t.content),r=e.computed(()=>!!h.default||!!s.value),p=e.computed(()=>t.showSkip&&!t.disabled&&t.status==="thinking"),g=e.computed(()=>t.status==="error"?"分析出现问题":t.status==="cancel"?"已跳过思考":t.title),f=e.computed(()=>({"--vk-thinking-animation-duration":t.duration,"--vk-thinking-button-width":t.buttonWidth,"--vk-thinking-max-width":t.maxWidth,"--vk-thinking-background-color":t.backgroundColor,"--vk-thinking-color":t.color,"--vk-thinking-radius":t.radius,"--vk-thinking-border-color":t.borderColor,"--vk-thinking-body-max-height":t.maxHeight||"none","--vk-thinking-font-size-base":"16px","--vk-thinking-font-size-title":"1.125em","--vk-thinking-font-size-skip":"1em","--vk-thinking-font-size-content":"0.9em","--vk-thinking-font-size-caret":"0.8125em"})),u=e.ref();e.watch(()=>[t.content,n.value,t.status],()=>{t.status==="thinking"&&n.value&&e.nextTick(()=>{u.value?.scrollToBottom({behavior:"auto"})})},{flush:"post"});function d(){o("change",{value:n.value,status:t.status}),o("update:modelValue",n.value)}function v(){t.disabled||!r.value||(n.value=!n.value,d())}function m(){t.disabled||(n.value=!1,d(),o("skip",{value:!1,status:t.status}))}return(i,E)=>(e.openBlock(),e.createElementBlock("div",{class:"vk-thinking",style:e.normalizeStyle(f.value)},[e.createElementVNode("section",{class:e.normalizeClass(["vk-thinking__card",[`is-${i.status}`,{"is-disabled":i.disabled,"is-expanded":n.value&&r.value}]])},[e.createElementVNode("header",V,[e.createElementVNode("button",{class:"vk-thinking__toggle",type:"button",disabled:i.disabled,onClick:v},[e.createElementVNode("span",x,e.toDisplayString(g.value)+":",1),e.createVNode(e.unref(c.ElIcon),{class:e.normalizeClass(["vk-thinking__caret",{"is-expanded":n.value}])},{default:e.withCtx(()=>[e.createVNode(e.unref(_.ArrowRightBold))]),_:1},8,["class"])],8,C),p.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"vk-thinking__skip",type:"button",onClick:e.withModifiers(m,["stop"])},e.toDisplayString(i.skipText),1)):e.createCommentVNode("",!0)]),e.createVNode(e.unref(c.ElCollapseTransition),null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",w,[e.createVNode(e.unref(b.VkScrollbar),{ref_key:"scrollbarRef",ref:u,class:"vk-thinking__scrollbar","max-height":i.maxHeight},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default",{content:s.value,status:i.status},()=>[e.createElementVNode("div",T,e.toDisplayString(s.value),1)])]),_:3},8,["max-height"])],512),[[e.vShow,n.value&&r.value]])]),_:3})],2)],4))}}),B=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));a.install=l=>{l.component(a.name||"VkThinking",a)};exports.VkThinking=a;exports.__VkThinking=B;exports.default=a;
@@ -1,16 +1,14 @@
1
- import { defineComponent, useSlots, ref, watch, computed, nextTick, openBlock, createElementBlock, normalizeStyle, createElementVNode, normalizeClass, toDisplayString, createVNode, withCtx, withModifiers, createCommentVNode, withDirectives, renderSlot, vShow } from 'vue';
2
- import { c as arrow_right_bold_default } from '../index2.mjs';
3
- import { VkScrollbar } from '@vunk/plus/components/scrollbar';
4
- import { ElCollapseTransition, ElIcon } from 'element-plus';
5
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
6
-
7
- const props = {
1
+ import { defineComponent as B, useSlots as z, ref as v, watch as c, computed as a, nextTick as E, createElementBlock as m, openBlock as _, normalizeStyle as W, createElementVNode as i, normalizeClass as b, createVNode as l, createCommentVNode as A, toDisplayString as k, unref as s, withCtx as h, withModifiers as H, withDirectives as N, renderSlot as R, vShow as j } from "vue";
2
+ import { ArrowRightBold as D } from "@element-plus/icons-vue";
3
+ import { VkScrollbar as M } from "@vunk/plus/components/scrollbar";
4
+ import { ElIcon as O, ElCollapseTransition as $ } from "element-plus";
5
+ const I = {
8
6
  /**
9
7
  * @description 展开/收起状态(v-model)
10
8
  */
11
9
  modelValue: {
12
10
  type: Boolean,
13
- default: true
11
+ default: !0
14
12
  },
15
13
  /**
16
14
  * @description 思考内容文本
@@ -31,14 +29,14 @@ const props = {
31
29
  */
32
30
  disabled: {
33
31
  type: Boolean,
34
- default: false
32
+ default: !1
35
33
  },
36
34
  /**
37
35
  * @description status=end 时是否自动收起
38
36
  */
39
37
  autoCollapse: {
40
38
  type: Boolean,
41
- default: false
39
+ default: !1
42
40
  },
43
41
  /**
44
42
  * @description 动画过渡时长
@@ -80,21 +78,21 @@ const props = {
80
78
  */
81
79
  title: {
82
80
  type: String,
83
- default: "\u5206\u6790\u7528\u6237\u9700\u6C42"
81
+ default: "分析用户需求"
84
82
  },
85
83
  /**
86
84
  * @description 跳过按钮文案
87
85
  */
88
86
  skipText: {
89
87
  type: String,
90
- default: "\u8DF3\u8FC7\u601D\u8003"
88
+ default: "跳过思考"
91
89
  },
92
90
  /**
93
91
  * @description 是否显示跳过按钮
94
92
  */
95
93
  showSkip: {
96
94
  type: Boolean,
97
- default: false
95
+ default: !1
98
96
  },
99
97
  /**
100
98
  * @description 卡片圆角
@@ -117,241 +115,143 @@ const props = {
117
115
  type: String,
118
116
  default: ""
119
117
  }
120
- };
121
- const emits = {
122
- "change": null,
118
+ }, P = {
119
+ change: null,
123
120
  "update:modelValue": null,
124
- "skip": null
125
- };
126
-
127
- var _sfc_main = /* @__PURE__ */ defineComponent({
128
- ...{
129
- name: "VkThinking",
130
- inheritAttrs: false
131
- },
121
+ skip: null
122
+ }, q = { class: "vk-thinking__header" }, F = ["disabled"], G = { class: "vk-thinking__title" }, J = { class: "vk-thinking__body" }, K = { class: "vk-thinking__content" }, p = /* @__PURE__ */ B({
123
+ name: "VkThinking",
124
+ inheritAttrs: !1,
132
125
  __name: "index",
133
- props: props,
134
- emits,
135
- setup(__props, { expose: __expose, emit: __emit }) {
136
- __expose();
137
- const props = __props;
138
- const emit = __emit;
139
- const slots = useSlots();
140
- const isExpanded = ref(props.modelValue);
141
- watch(
142
- () => props.modelValue,
143
- (newVal) => {
144
- isExpanded.value = newVal;
126
+ props: I,
127
+ emits: P,
128
+ setup(r, { emit: y }) {
129
+ const t = r, o = y, S = z(), e = v(t.modelValue);
130
+ c(
131
+ () => t.modelValue,
132
+ (n) => {
133
+ e.value = n;
145
134
  }
146
- );
147
- watch(
148
- () => props.status,
149
- (newVal) => {
150
- if (newVal === "end" && props.autoCollapse) {
151
- isExpanded.value = false;
152
- emit("update:modelValue", false);
153
- }
135
+ ), c(
136
+ () => t.status,
137
+ (n) => {
138
+ n === "end" && t.autoCollapse && (e.value = !1, o("update:modelValue", !1));
154
139
  }
155
140
  );
156
- const displayedContent = computed(() => {
157
- return props.status === "error" ? "\u601D\u8003\u8FC7\u7A0B\u4E2D\u51FA\u73B0\u9519\u8BEF" : props.content;
158
- });
159
- const hasContent = computed(() => {
160
- return Boolean(slots.default) || Boolean(displayedContent.value);
161
- });
162
- const showSkipAction = computed(() => {
163
- return props.showSkip && !props.disabled && props.status === "thinking";
164
- });
165
- const titleText = computed(() => {
166
- if (props.status === "error")
167
- return "\u5206\u6790\u51FA\u73B0\u95EE\u9898";
168
- if (props.status === "cancel")
169
- return "\u5DF2\u8DF3\u8FC7\u601D\u8003";
170
- return props.title;
171
- });
172
- const cssVars = computed(() => ({
173
- "--vk-thinking-animation-duration": props.duration,
174
- "--vk-thinking-button-width": props.buttonWidth,
175
- "--vk-thinking-max-width": props.maxWidth,
176
- "--vk-thinking-background-color": props.backgroundColor,
177
- "--vk-thinking-color": props.color,
178
- "--vk-thinking-radius": props.radius,
179
- "--vk-thinking-border-color": props.borderColor,
180
- "--vk-thinking-body-max-height": props.maxHeight || "none",
141
+ const u = a(() => t.status === "error" ? "思考过程中出现错误" : t.content), d = a(() => !!S.default || !!u.value), x = a(() => t.showSkip && !t.disabled && t.status === "thinking"), C = a(() => t.status === "error" ? "分析出现问题" : t.status === "cancel" ? "已跳过思考" : t.title), V = a(() => ({
142
+ "--vk-thinking-animation-duration": t.duration,
143
+ "--vk-thinking-button-width": t.buttonWidth,
144
+ "--vk-thinking-max-width": t.maxWidth,
145
+ "--vk-thinking-background-color": t.backgroundColor,
146
+ "--vk-thinking-color": t.color,
147
+ "--vk-thinking-radius": t.radius,
148
+ "--vk-thinking-border-color": t.borderColor,
149
+ "--vk-thinking-body-max-height": t.maxHeight || "none",
181
150
  "--vk-thinking-font-size-base": "16px",
182
151
  "--vk-thinking-font-size-title": "1.125em",
183
152
  "--vk-thinking-font-size-skip": "1em",
184
153
  "--vk-thinking-font-size-content": "0.9em",
185
154
  "--vk-thinking-font-size-caret": "0.8125em"
186
- }));
187
- const scrollbarRef = ref();
188
- watch(
189
- () => [props.content, isExpanded.value, props.status],
155
+ })), f = v();
156
+ c(
157
+ () => [t.content, e.value, t.status],
190
158
  () => {
191
- if (props.status === "thinking" && isExpanded.value) {
192
- nextTick(() => {
193
- scrollbarRef.value?.scrollToBottom({
194
- behavior: "auto"
195
- });
159
+ t.status === "thinking" && e.value && E(() => {
160
+ f.value?.scrollToBottom({
161
+ behavior: "auto"
196
162
  });
197
- }
163
+ });
198
164
  },
199
165
  { flush: "post" }
200
166
  );
201
- function emitChange() {
202
- emit("change", {
203
- value: isExpanded.value,
204
- status: props.status
205
- });
206
- emit("update:modelValue", isExpanded.value);
167
+ function g() {
168
+ o("change", {
169
+ value: e.value,
170
+ status: t.status
171
+ }), o("update:modelValue", e.value);
207
172
  }
208
- function toggleExpand() {
209
- if (props.disabled || !hasContent.value)
210
- return;
211
- isExpanded.value = !isExpanded.value;
212
- emitChange();
173
+ function T() {
174
+ t.disabled || !d.value || (e.value = !e.value, g());
213
175
  }
214
- function skipThinking() {
215
- if (props.disabled)
216
- return;
217
- isExpanded.value = false;
218
- emitChange();
219
- emit("skip", {
220
- value: false,
221
- status: props.status
222
- });
176
+ function w() {
177
+ t.disabled || (e.value = !1, g(), o("skip", {
178
+ value: !1,
179
+ status: t.status
180
+ }));
223
181
  }
224
- const __returned__ = { props, emit, slots, isExpanded, displayedContent, hasContent, showSkipAction, titleText, cssVars, scrollbarRef, emitChange, toggleExpand, skipThinking, get ArrowRightBold() {
225
- return arrow_right_bold_default;
226
- }, get VkScrollbar() {
227
- return VkScrollbar;
228
- }, get ElCollapseTransition() {
229
- return ElCollapseTransition;
230
- }, get ElIcon() {
231
- return ElIcon;
232
- } };
233
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
234
- return __returned__;
235
- }
236
- });
237
-
238
- const _hoisted_1 = { class: "vk-thinking__header" };
239
- const _hoisted_2 = ["disabled"];
240
- const _hoisted_3 = { class: "vk-thinking__title" };
241
- const _hoisted_4 = { class: "vk-thinking__body" };
242
- const _hoisted_5 = { class: "vk-thinking__content" };
243
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
244
- return openBlock(), createElementBlock(
245
- "div",
246
- {
182
+ return (n, L) => (_(), m("div", {
247
183
  class: "vk-thinking",
248
- style: normalizeStyle($setup.cssVars)
249
- },
250
- [
251
- createElementVNode(
252
- "section",
253
- {
254
- class: normalizeClass(["vk-thinking__card", [
255
- `is-${_ctx.status}`,
256
- {
257
- "is-disabled": _ctx.disabled,
258
- "is-expanded": $setup.isExpanded && $setup.hasContent
259
- }
260
- ]])
261
- },
262
- [
263
- createElementVNode("header", _hoisted_1, [
264
- createElementVNode("button", {
265
- class: "vk-thinking__toggle",
266
- type: "button",
267
- disabled: _ctx.disabled,
268
- onClick: $setup.toggleExpand
269
- }, [
270
- createElementVNode(
271
- "span",
272
- _hoisted_3,
273
- toDisplayString($setup.titleText) + "\uFF1A",
274
- 1
275
- /* TEXT */
276
- ),
277
- createVNode($setup["ElIcon"], {
278
- class: normalizeClass(["vk-thinking__caret", { "is-expanded": $setup.isExpanded }])
184
+ style: W(V.value)
185
+ }, [
186
+ i("section", {
187
+ class: b(["vk-thinking__card", [
188
+ `is-${n.status}`,
189
+ {
190
+ "is-disabled": n.disabled,
191
+ "is-expanded": e.value && d.value
192
+ }
193
+ ]])
194
+ }, [
195
+ i("header", q, [
196
+ i("button", {
197
+ class: "vk-thinking__toggle",
198
+ type: "button",
199
+ disabled: n.disabled,
200
+ onClick: T
201
+ }, [
202
+ i("span", G, k(C.value) + ":", 1),
203
+ l(s(O), {
204
+ class: b(["vk-thinking__caret", { "is-expanded": e.value }])
205
+ }, {
206
+ default: h(() => [
207
+ l(s(D))
208
+ ]),
209
+ _: 1
210
+ }, 8, ["class"])
211
+ ], 8, F),
212
+ x.value ? (_(), m("button", {
213
+ key: 0,
214
+ class: "vk-thinking__skip",
215
+ type: "button",
216
+ onClick: H(w, ["stop"])
217
+ }, k(n.skipText), 1)) : A("", !0)
218
+ ]),
219
+ l(s($), null, {
220
+ default: h(() => [
221
+ N(i("div", J, [
222
+ l(s(M), {
223
+ ref_key: "scrollbarRef",
224
+ ref: f,
225
+ class: "vk-thinking__scrollbar",
226
+ "max-height": n.maxHeight
279
227
  }, {
280
- default: withCtx(() => [
281
- createVNode($setup["ArrowRightBold"])
228
+ default: h(() => [
229
+ R(n.$slots, "default", {
230
+ content: u.value,
231
+ status: n.status
232
+ }, () => [
233
+ i("div", K, k(u.value), 1)
234
+ ])
282
235
  ]),
283
- _: 1
284
- /* STABLE */
285
- }, 8, ["class"])
286
- ], 8, _hoisted_2),
287
- $setup.showSkipAction ? (openBlock(), createElementBlock(
288
- "button",
289
- {
290
- key: 0,
291
- class: "vk-thinking__skip",
292
- type: "button",
293
- onClick: withModifiers($setup.skipThinking, ["stop"])
294
- },
295
- toDisplayString(_ctx.skipText),
296
- 1
297
- /* TEXT */
298
- )) : createCommentVNode("v-if", true)
236
+ _: 3
237
+ }, 8, ["max-height"])
238
+ ], 512), [
239
+ [j, e.value && d.value]
240
+ ])
299
241
  ]),
300
- createVNode($setup["ElCollapseTransition"], null, {
301
- default: withCtx(() => [
302
- withDirectives(createElementVNode(
303
- "div",
304
- _hoisted_4,
305
- [
306
- createVNode($setup["VkScrollbar"], {
307
- ref: "scrollbarRef",
308
- class: "vk-thinking__scrollbar",
309
- "max-height": _ctx.maxHeight
310
- }, {
311
- default: withCtx(() => [
312
- renderSlot(_ctx.$slots, "default", {
313
- content: $setup.displayedContent,
314
- status: _ctx.status
315
- }, () => [
316
- createElementVNode(
317
- "div",
318
- _hoisted_5,
319
- toDisplayString($setup.displayedContent),
320
- 1
321
- /* TEXT */
322
- )
323
- ])
324
- ]),
325
- _: 3
326
- /* FORWARDED */
327
- }, 8, ["max-height"])
328
- ],
329
- 512
330
- /* NEED_PATCH */
331
- ), [
332
- [vShow, $setup.isExpanded && $setup.hasContent]
333
- ])
334
- ]),
335
- _: 3
336
- /* FORWARDED */
337
- })
338
- ],
339
- 2
340
- /* CLASS */
341
- )
342
- ],
343
- 4
344
- /* STYLE */
345
- );
346
- }
347
- var VkThinking = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/thinking/src/index.vue"]]);
348
-
349
- var types = /*#__PURE__*/Object.freeze({
242
+ _: 3
243
+ })
244
+ ], 2)
245
+ ], 4));
246
+ }
247
+ }), Z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
350
248
  __proto__: null
351
- });
352
-
353
- VkThinking.install = (app) => {
354
- app.component(VkThinking.name || "VkThinking", VkThinking);
249
+ }, Symbol.toStringTag, { value: "Module" }));
250
+ p.install = (r) => {
251
+ r.component(p.name || "VkThinking", p);
252
+ };
253
+ export {
254
+ p as VkThinking,
255
+ Z as __VkThinking,
256
+ p as default
355
257
  };
356
-
357
- export { VkThinking, types as __VkThinking, VkThinking as default };