@vunk/plus 1.6.6 → 1.6.8

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 (123) hide show
  1. package/components/SendOutlined.mjs +1 -1
  2. package/components/agent-chat-provider/index.mjs +1 -1
  3. package/components/bubble-list/index.mjs +4 -1
  4. package/components/sender/index.css +0 -8
  5. package/components/sender/index.mjs +112 -174
  6. package/components/speech-button/index.mjs +1 -1
  7. package/index.css +0 -8
  8. package/package.json +1 -1
  9. package/components/agent-chat-provider/index.d.ts +0 -7
  10. package/components/agent-chat-provider/src/api.d.ts +0 -3
  11. package/components/agent-chat-provider/src/const-roles.d.ts +0 -8
  12. package/components/agent-chat-provider/src/const.d.ts +0 -1
  13. package/components/agent-chat-provider/src/index.vue.d.ts +0 -47
  14. package/components/agent-chat-provider/src/types.d.ts +0 -43
  15. package/components/agent-chat-provider/src/use.d.ts +0 -29
  16. package/components/avatar/index.d.ts +0 -4
  17. package/components/avatar/src/ctx.d.ts +0 -18
  18. package/components/avatar/src/index.vue.d.ts +0 -121
  19. package/components/avatar/src/types.d.ts +0 -1
  20. package/components/broadcasting-markdown/index.d.ts +0 -7
  21. package/components/broadcasting-markdown/src/const.d.ts +0 -13
  22. package/components/broadcasting-markdown/src/ctx.d.ts +0 -125
  23. package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +0 -97
  24. package/components/broadcasting-markdown/src/index.vue.d.ts +0 -424
  25. package/components/broadcasting-markdown/src/paragraph.vue.d.ts +0 -79
  26. package/components/broadcasting-markdown/src/speech-error.vue.d.ts +0 -60
  27. package/components/broadcasting-markdown/src/types.d.ts +0 -26
  28. package/components/broadcasting-markdown/src/use.d.ts +0 -21
  29. package/components/bubble-list/index.d.ts +0 -5
  30. package/components/bubble-list/src/ctx.d.ts +0 -30
  31. package/components/bubble-list/src/index.vue.d.ts +0 -848
  32. package/components/bubble-list/src/types.d.ts +0 -4
  33. package/components/bubble-templates/index.d.ts +0 -4
  34. package/components/bubble-templates/src/index.vue.d.ts +0 -579
  35. package/components/bubble-templates/src/types.d.ts +0 -40
  36. package/components/chat-independent/index.d.ts +0 -4
  37. package/components/chat-independent/src/const.d.ts +0 -13
  38. package/components/chat-independent/src/ctx.d.ts +0 -20
  39. package/components/chat-independent/src/index.vue.d.ts +0 -2326
  40. package/components/chat-independent/src/types.d.ts +0 -13
  41. package/components/index.d.ts +0 -0
  42. package/components/lottie-animation/index.d.ts +0 -4
  43. package/components/lottie-animation/src/ctx.d.ts +0 -10
  44. package/components/lottie-animation/src/index.vue.d.ts +0 -21
  45. package/components/lottie-animation/src/types.d.ts +0 -4
  46. package/components/metahuman-broadcasting/index.d.ts +0 -5
  47. package/components/metahuman-broadcasting/src/ctx.d.ts +0 -57
  48. package/components/metahuman-broadcasting/src/index.vue.d.ts +0 -870
  49. package/components/metahuman-broadcasting/src/types.d.ts +0 -1
  50. package/components/monaco-editor/index.d.ts +0 -5
  51. package/components/monaco-editor/src/ctx.d.ts +0 -23
  52. package/components/monaco-editor/src/index.vue.d.ts +0 -40
  53. package/components/monaco-editor/src/types.d.ts +0 -1
  54. package/components/monaco-environment/index.d.ts +0 -4
  55. package/components/monaco-environment/src/ctx.d.ts +0 -8
  56. package/components/monaco-environment/src/index.vue.d.ts +0 -2
  57. package/components/monaco-environment/src/types.d.ts +0 -1
  58. package/components/pixi-frame/index.d.ts +0 -11
  59. package/components/pixi-frame/src/apng.vue.d.ts +0 -161
  60. package/components/pixi-frame/src/bitmap.vue.d.ts +0 -158
  61. package/components/pixi-frame/src/core.vue.d.ts +0 -173
  62. package/components/pixi-frame/src/ctx.d.ts +0 -55
  63. package/components/pixi-frame/src/index.vue.d.ts +0 -591
  64. package/components/pixi-frame/src/provider.vue.d.ts +0 -2
  65. package/components/pixi-frame/src/types.d.ts +0 -17
  66. package/components/pixi-frame/src/use.d.ts +0 -16
  67. package/components/pixi-frame/src/useSprite.d.ts +0 -12
  68. package/components/pixi-frame/src/video.vue.d.ts +0 -159
  69. package/components/pixi-frame/src/view.vue.d.ts +0 -29
  70. package/components/recorder-button/index.d.ts +0 -4
  71. package/components/recorder-button/src/ctx.d.ts +0 -41
  72. package/components/recorder-button/src/index.vue.d.ts +0 -300
  73. package/components/recorder-button/src/speech-to-text.d.ts +0 -1
  74. package/components/recorder-button/src/types.d.ts +0 -7
  75. package/components/routes-menu-content/index.d.ts +0 -4
  76. package/components/routes-menu-content/src/ctx.d.ts +0 -17
  77. package/components/routes-menu-content/src/index.vue.d.ts +0 -472
  78. package/components/routes-menu-content/src/item/core/ctx.d.ts +0 -18
  79. package/components/routes-menu-content/src/item/core/index.vue.d.ts +0 -307
  80. package/components/routes-menu-content/src/item/ctx.d.ts +0 -14
  81. package/components/routes-menu-content/src/item/index.vue.d.ts +0 -438
  82. package/components/routes-menu-content/src/types.d.ts +0 -1
  83. package/components/sender/index.d.ts +0 -4
  84. package/components/sender/src/SenderHeader.vue.d.ts +0 -256
  85. package/components/sender/src/ctx.d.ts +0 -62
  86. package/components/sender/src/index.vue.d.ts +0 -787
  87. package/components/sender/src/types.d.ts +0 -1
  88. package/components/speech-button/index.d.ts +0 -4
  89. package/components/speech-button/src/LoadingIcon.vue.d.ts +0 -2
  90. package/components/speech-button/src/RecordingIcon.vue.d.ts +0 -2
  91. package/components/speech-button/src/ctx.d.ts +0 -10
  92. package/components/speech-button/src/index.vue.d.ts +0 -22
  93. package/components/speech-button/src/types.d.ts +0 -1
  94. package/components/table-columns/index.d.ts +0 -5
  95. package/components/table-columns/src/ctx.d.ts +0 -66
  96. package/components/table-columns/src/el-ctx.d.ts +0 -63
  97. package/components/table-columns/src/index.vue.d.ts +0 -282
  98. package/components/table-columns/src/types.d.ts +0 -21
  99. package/components/tables-v1/index.d.ts +0 -5
  100. package/components/tables-v1/src/ctx.d.ts +0 -288
  101. package/components/tables-v1/src/el-ctx.d.ts +0 -269
  102. package/components/tables-v1/src/index.vue.d.ts +0 -3106
  103. package/components/tables-v1/src/types.d.ts +0 -3
  104. package/components/tables-v1-checkbox/index.d.ts +0 -5
  105. package/components/tables-v1-checkbox/src/ctx.d.ts +0 -325
  106. package/components/tables-v1-checkbox/src/index.vue.d.ts +0 -3898
  107. package/components/tables-v1-checkbox/src/types.d.ts +0 -1
  108. package/components/text/index.d.ts +0 -4
  109. package/components/text/src/ctx.d.ts +0 -320
  110. package/components/text/src/index.vue.d.ts +0 -2314
  111. package/components/text/src/types.d.ts +0 -1
  112. package/components/typing-markdown/index.d.ts +0 -4
  113. package/components/typing-markdown/src/core.d.ts +0 -2
  114. package/components/typing-markdown/src/ctx.d.ts +0 -41
  115. package/components/typing-markdown/src/index.vue.d.ts +0 -75
  116. package/components/typing-markdown/src/types.d.ts +0 -1
  117. package/components/vditor/index.d.ts +0 -5
  118. package/components/vditor/src/ctx.d.ts +0 -37
  119. package/components/vditor/src/handle-fullscreen.vue.d.ts +0 -18
  120. package/components/vditor/src/handle-value.vue.d.ts +0 -18
  121. package/components/vditor/src/index.vue.d.ts +0 -144
  122. package/components/vditor/src/types.d.ts +0 -9
  123. package/components/vditor/src/use.d.ts +0 -4
@@ -1334,4 +1334,4 @@ var SendOutlined = function SendOutlined(props, context) {
1334
1334
  SendOutlined.displayName = 'SendOutlined';
1335
1335
  SendOutlined.inheritAttrs = false;
1336
1336
 
1337
- export { AudioMutedOutlined as A, CloseOutlined as C, LinkOutlined as L, SendOutlined as S, AudioOutlined as a, CloudUploadOutlined as b };
1337
+ export { AudioMutedOutlined as A, CloseOutlined as C, LinkOutlined as L, SendOutlined as S, CloudUploadOutlined as a, AudioOutlined as b };
@@ -108,7 +108,7 @@ var _sfc_main = defineComponent({
108
108
  }
109
109
  },
110
110
  emits: {
111
- load: (e) => e
111
+ load: null
112
112
  },
113
113
  setup(props, { slots, emit }) {
114
114
  const request = (info, event) => {
@@ -44,6 +44,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
44
44
  ref: _ctx.elRef,
45
45
  "btn-icon-size": 18,
46
46
  "max-height": `${height}px`,
47
+ style: {
48
+ "--el-bubble-list-max-height": `${height}px`
49
+ },
47
50
  list: _ctx.items
48
51
  }, _ctx.$attrs), createSlots({
49
52
  content: withCtx(({ item }) => [
@@ -89,7 +92,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
89
92
  ]),
90
93
  key: "3"
91
94
  } : void 0
92
- ]), 1040, ["max-height", "list"])
95
+ ]), 1040, ["max-height", "style", "list"])
93
96
  ]),
94
97
  _: 3
95
98
  /* FORWARDED */
@@ -2,14 +2,6 @@
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  }
5
- /* .vk-sender .ant-sender-content{
6
- display: grid;
7
- grid-template-columns: auto 1fr;
8
- }
9
- .vk-sender .ant-sender-actions-list {
10
- margin-top: 1em;
11
- grid-column: 1 / -1;
12
- } */
13
5
  .vk-sender .ant-sender-prefix {
14
6
  align-self: start;
15
7
  }
@@ -1,11 +1,10 @@
1
- import { defineComponent, resolveComponent, createBlock, openBlock, withCtx, withDirectives, createElementVNode, mergeProps, toDisplayString, createVNode, renderSlot, vShow, computed, ref, nextTick, createSlots, createCommentVNode } from 'vue';
1
+ import { defineComponent, createBlock, openBlock, unref, withCtx, withDirectives, createElementVNode, mergeProps, toDisplayString, createVNode, renderSlot, vShow, useSlots, computed, ref, createSlots, createCommentVNode, nextTick } from 'vue';
2
2
  import { useModelComputed, useDeferred } from '@vunk/core/composables';
3
3
  import { Button } from 'ant-design-vue';
4
- import { Attachments, Sender } from 'ant-design-x-vue';
4
+ import { Sender, Attachments } from 'ant-design-x-vue';
5
5
  import { noop } from '@vunk/shared/function';
6
6
  import { ElCollapseTransition } from 'element-plus';
7
- import { C as CloseOutlined, L as LinkOutlined, b as CloudUploadOutlined, S as SendOutlined } from '../SendOutlined.mjs';
8
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
7
+ import { C as CloseOutlined, L as LinkOutlined, a as CloudUploadOutlined, S as SendOutlined } from '../SendOutlined.mjs';
9
8
 
10
9
  const props = {
11
10
  /**
@@ -55,14 +54,21 @@ const emits = {
55
54
  "cancel": null
56
55
  };
57
56
 
58
- var _sfc_main$1 = /* @__PURE__ */ defineComponent({
59
- name: "AXSenderHeader",
60
- components: {
61
- ElCollapseTransition,
62
- AntButton: Button,
63
- CloseOutlined
57
+ const _hoisted_1 = {
58
+ class: "ant-sender-header-header"
59
+ };
60
+ const _hoisted_2 = {
61
+ class: "ant-sender-header-header-title"
62
+ };
63
+ const _hoisted_3 = {
64
+ class: "ant-sender-header-header-close"
65
+ };
66
+ var _sfc_main$1 = /* @__PURE__ */defineComponent({
67
+ ...{
68
+ name: "AXSenderHeader",
69
+ inheritAttrs: false
64
70
  },
65
- inheritAttrs: false,
71
+ __name: "SenderHeader",
66
72
  props: {
67
73
  modelValue: {
68
74
  type: Boolean,
@@ -80,91 +86,51 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
80
86
  emits: {
81
87
  "update:modelValue": null
82
88
  },
83
- setup() {
84
- return {};
89
+ setup(__props) {
90
+ return (_ctx, _cache) => {
91
+ return openBlock(), createBlock(unref(ElCollapseTransition), null, {
92
+ default: withCtx(() => [withDirectives(createElementVNode("div", mergeProps({
93
+ class: "ant-sender-header"
94
+ }, _ctx.$attrs), [createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, toDisplayString(__props.title), 1
95
+ /* TEXT */), createElementVNode("div", _hoisted_3, [createVNode(unref(Button), {
96
+ type: "text",
97
+ size: "small",
98
+ onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit("update:modelValue", false))
99
+ }, {
100
+ icon: withCtx(() => [createVNode(unref(CloseOutlined))]),
101
+ _: 1
102
+ /* STABLE */
103
+ })])]), createElementVNode("div", {
104
+ ref: __props.contentRef,
105
+ class: "ant-sender-header-content"
106
+ }, [renderSlot(_ctx.$slots, "default")], 512
107
+ /* NEED_PATCH */)], 16
108
+ /* FULL_PROPS */), [[vShow, __props.modelValue]])]),
109
+ _: 3
110
+ /* FORWARDED */
111
+ });
112
+ };
85
113
  }
86
114
  });
87
115
 
88
- const _hoisted_1 = { class: "ant-sender-header-header" };
89
- const _hoisted_2 = { class: "ant-sender-header-header-title" };
90
- const _hoisted_3 = { class: "ant-sender-header-header-close" };
91
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
92
- const _component_CloseOutlined = resolveComponent("CloseOutlined");
93
- const _component_AntButton = resolveComponent("AntButton");
94
- const _component_ElCollapseTransition = resolveComponent("ElCollapseTransition");
95
- return openBlock(), createBlock(_component_ElCollapseTransition, null, {
96
- default: withCtx(() => [
97
- withDirectives(createElementVNode(
98
- "div",
99
- mergeProps({ class: "ant-sender-header" }, _ctx.$attrs),
100
- [
101
- createElementVNode("div", _hoisted_1, [
102
- createElementVNode(
103
- "div",
104
- _hoisted_2,
105
- toDisplayString(_ctx.title),
106
- 1
107
- /* TEXT */
108
- ),
109
- createElementVNode("div", _hoisted_3, [
110
- createVNode(_component_AntButton, {
111
- type: "text",
112
- size: "small",
113
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", false))
114
- }, {
115
- icon: withCtx(() => [
116
- createVNode(_component_CloseOutlined)
117
- ]),
118
- _: 1
119
- /* STABLE */
120
- })
121
- ])
122
- ]),
123
- createElementVNode(
124
- "div",
125
- {
126
- ref: _ctx.contentRef,
127
- class: "ant-sender-header-content"
128
- },
129
- [
130
- renderSlot(_ctx.$slots, "default")
131
- ],
132
- 512
133
- /* NEED_PATCH */
134
- )
135
- ],
136
- 16
137
- /* FULL_PROPS */
138
- ), [
139
- [vShow, _ctx.modelValue]
140
- ])
141
- ]),
142
- _: 3
143
- /* FORWARDED */
144
- });
145
- }
146
- var SenderHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
147
-
148
- var _sfc_main = /* @__PURE__ */ defineComponent({
149
- name: "VkSender",
150
- components: {
151
- Sender,
152
- LinkOutlined,
153
- AntButton: Button,
154
- Attachments,
155
- SenderHeader
116
+ var _sfc_main = /* @__PURE__ */defineComponent({
117
+ ...{
118
+ name: "VkSender"
156
119
  },
157
- props,
120
+ __name: "index",
121
+ props: props,
158
122
  emits,
159
- setup(props2, {
160
- emit,
161
- slots
123
+ setup(__props, {
124
+ emit: __emit
162
125
  }) {
163
- const hasAttachments = computed(() => props2.modules.includes("Attachments"));
126
+ const props = __props;
127
+ const emit = __emit;
128
+ const slots = useSlots();
129
+ const hasAttachments = computed(() => props.modules.includes("Attachments"));
164
130
  const loading = useModelComputed({
165
131
  key: "loading",
166
132
  default: false
167
- }, props2, emit);
133
+ }, props, emit);
168
134
  const headerOpen = ref(false);
169
135
  const actionsRender = (_, info) => {
170
136
  const {
@@ -178,7 +144,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
178
144
  return createVNode(SendButton, {
179
145
  "type": "text",
180
146
  "icon": createVNode(SendOutlined, null, null),
181
- "disabled": props2.sendDisabled
147
+ "disabled": props.sendDisabled
182
148
  }, null);
183
149
  };
184
150
  const sendAction = () => loading.value ? loadingRender() : sendRender();
@@ -206,10 +172,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
206
172
  const theFileList = useModelComputed({
207
173
  key: "fileList",
208
174
  default: []
209
- }, props2, emit);
175
+ }, props, emit);
210
176
  const attachmentsRef = ref();
211
177
  const attachmentWrapDef = useDeferred();
212
- const handlePasteFile = async file => {
178
+ const attachmentWrapResolve = attachmentWrapDef.resolve;
179
+ async function handlePasteFile(file) {
213
180
  headerOpen.value = true;
214
181
  const attachmentWrap = await attachmentWrapDef.promise;
215
182
  await nextTick();
@@ -222,98 +189,69 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
222
189
  bubbles: true
223
190
  }));
224
191
  }
225
- };
226
- const handleChange = e => {
192
+ }
193
+ function handleChange(e) {
227
194
  theFileList.value = e.fileList;
228
- };
229
- return {
230
- hasAttachments,
231
- actionsRender,
232
- headerOpen,
233
- attachmentsPlaceholder,
234
- handlePasteFile,
235
- attachmentsRef,
236
- theFileList,
237
- handleChange,
238
- attachmentWrapResolve: attachmentWrapDef.resolve
195
+ }
196
+ return (_ctx, _cache) => {
197
+ return openBlock(), createBlock(unref(Sender), {
198
+ class: "vk-sender",
199
+ value: _ctx.modelValue,
200
+ loading: unref(loading),
201
+ "allow-speech": true,
202
+ actions: actionsRender,
203
+ "on-submit": e => {
204
+ !_ctx.sendDisabled && _ctx.$emit("submit", e);
205
+ },
206
+ "on-cancel": () => _ctx.$emit("cancel"),
207
+ "onUpdate:value": _cache[2] || (_cache[2] = $event => _ctx.$emit("update:modelValue", $event)),
208
+ onPasteFile: handlePasteFile
209
+ }, createSlots({
210
+ header: withCtx(() => [hasAttachments.value ? (openBlock(), createBlock(_sfc_main$1, {
211
+ key: 0,
212
+ modelValue: headerOpen.value,
213
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => headerOpen.value = $event),
214
+ title: "\u9644\u4EF6",
215
+ "content-ref": unref(attachmentWrapResolve)
216
+ }, {
217
+ default: withCtx(() => [createVNode(unref(Attachments), {
218
+ ref_key: "attachmentsRef",
219
+ ref: attachmentsRef,
220
+ "file-list": unref(theFileList),
221
+ placeholder: attachmentsPlaceholder,
222
+ action: _ctx.action,
223
+ multiple: "",
224
+ onChange: handleChange
225
+ }, null, 8, ["file-list", "action"])]),
226
+ _: 1
227
+ /* STABLE */
228
+ }, 8, ["modelValue", "content-ref"])) : createCommentVNode("v-if", true)]),
229
+ prefix: withCtx(() => [hasAttachments.value ? (openBlock(), createBlock(unref(Button), {
230
+ key: 0,
231
+ type: "text",
232
+ onClick: _cache[1] || (_cache[1] = $event => headerOpen.value = !headerOpen.value)
233
+ }, {
234
+ icon: withCtx(() => [createVNode(unref(LinkOutlined))]),
235
+ _: 1
236
+ /* STABLE */
237
+ })) : createCommentVNode("v-if", true)]),
238
+ _: 2
239
+ /* DYNAMIC */
240
+ }, [_ctx.$slots.footer ? {
241
+ name: "footer",
242
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
243
+ key: "0"
244
+ } : void 0]), 1032, ["value", "loading", "on-submit", "on-cancel"]);
239
245
  };
240
246
  }
241
247
  });
242
248
 
243
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
244
- const _component_Attachments = resolveComponent("Attachments");
245
- const _component_SenderHeader = resolveComponent("SenderHeader");
246
- const _component_LinkOutlined = resolveComponent("LinkOutlined");
247
- const _component_AntButton = resolveComponent("AntButton");
248
- const _component_Sender = resolveComponent("Sender");
249
- return openBlock(), createBlock(_component_Sender, {
250
- class: "vk-sender",
251
- value: _ctx.modelValue,
252
- loading: _ctx.loading,
253
- "allow-speech": true,
254
- actions: _ctx.actionsRender,
255
- "on-submit": (e) => {
256
- !_ctx.sendDisabled && _ctx.$emit("submit", e);
257
- },
258
- "on-cancel": () => _ctx.$emit("cancel"),
259
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:modelValue", $event)),
260
- onPasteFile: _ctx.handlePasteFile
261
- }, createSlots({
262
- header: withCtx(() => [
263
- _ctx.hasAttachments ? (openBlock(), createBlock(_component_SenderHeader, {
264
- key: 0,
265
- modelValue: _ctx.headerOpen,
266
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.headerOpen = $event),
267
- title: "\u9644\u4EF6",
268
- "content-ref": _ctx.attachmentWrapResolve
269
- }, {
270
- default: withCtx(() => [
271
- createVNode(_component_Attachments, {
272
- ref: "attachmentsRef",
273
- "file-list": _ctx.theFileList,
274
- placeholder: _ctx.attachmentsPlaceholder,
275
- action: _ctx.action,
276
- multiple: "",
277
- onChange: _ctx.handleChange
278
- }, null, 8, ["file-list", "placeholder", "action", "onChange"])
279
- ]),
280
- _: 1
281
- /* STABLE */
282
- }, 8, ["modelValue", "content-ref"])) : createCommentVNode("v-if", true)
283
- ]),
284
- prefix: withCtx(() => [
285
- _ctx.hasAttachments ? (openBlock(), createBlock(_component_AntButton, {
286
- key: 0,
287
- type: "text",
288
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.headerOpen = !_ctx.headerOpen)
289
- }, {
290
- icon: withCtx(() => [
291
- createVNode(_component_LinkOutlined)
292
- ]),
293
- _: 1
294
- /* STABLE */
295
- })) : createCommentVNode("v-if", true)
296
- ]),
297
- _: 2
298
- /* DYNAMIC */
299
- }, [
300
- _ctx.$slots.footer ? {
301
- name: "footer",
302
- fn: withCtx(() => [
303
- renderSlot(_ctx.$slots, "footer")
304
- ]),
305
- key: "0"
306
- } : void 0
307
- ]), 1032, ["value", "loading", "actions", "on-submit", "on-cancel", "onPasteFile"]);
308
- }
309
- var VkSender = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
310
-
311
249
  var types = /*#__PURE__*/Object.freeze({
312
250
  __proto__: null
313
251
  });
314
252
 
315
- VkSender.install = (app) => {
316
- app.component(VkSender.name || "VkSender", VkSender);
253
+ _sfc_main.install = (app) => {
254
+ app.component(_sfc_main.name || "VkSender", _sfc_main);
317
255
  };
318
256
 
319
- export { VkSender, types as __VkSender, VkSender as default };
257
+ export { _sfc_main as VkSender, types as __VkSender, _sfc_main as default };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, createVNode, createTextVNode } from 'vue';
2
2
  import { useRecorder } from '@vunk/plus/composables/recorder';
3
3
  import { Button } from 'ant-design-vue';
4
- import { A as AudioMutedOutlined, a as AudioOutlined } from '../SendOutlined.mjs';
4
+ import { A as AudioMutedOutlined, b as AudioOutlined } from '../SendOutlined.mjs';
5
5
 
6
6
  const props = {
7
7
  disabled: {
package/index.css CHANGED
@@ -135,14 +135,6 @@
135
135
  display: flex;
136
136
  justify-content: space-between;
137
137
  }
138
- /* .vk-sender .ant-sender-content{
139
- display: grid;
140
- grid-template-columns: auto 1fr;
141
- }
142
- .vk-sender .ant-sender-actions-list {
143
- margin-top: 1em;
144
- grid-column: 1 / -1;
145
- } */
146
138
  .vk-sender .ant-sender-prefix {
147
139
  align-self: start;
148
140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/plus",
3
- "version": "1.6.6",
3
+ "version": "1.6.8",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -1,7 +0,0 @@
1
- import VkAgentChatProvider from './src/index.vue';
2
- export * from './src/const';
3
- export * from './src/const-roles';
4
- export * as __VkAgentChatProvider from './src/types';
5
- export { useAgentChat } from './src/use';
6
- export { VkAgentChatProvider, };
7
- export default VkAgentChatProvider;
@@ -1,3 +0,0 @@
1
- import type { NormalObject } from '@vunk/shared';
2
- import type { RestFetchReaderOnmessage } from '@vunk/shared/fetch';
3
- export declare function agentRequest(onmessage: RestFetchReaderOnmessage, data: NormalObject): Promise<void>;
@@ -1,8 +0,0 @@
1
- import type { RoleMedia } from './types';
2
- export declare enum Role {
3
- User = "user",
4
- Assistant = "assistant",
5
- Broadcasting = "broadcasting"
6
- }
7
- export declare const roleOptions: RoleMedia[];
8
- export declare const roleMap: Record<Role, RoleMedia>;
@@ -1 +0,0 @@
1
- export declare const ChatAgentInjectKey = "vk_agent_chat_inject_key";
@@ -1,47 +0,0 @@
1
- import type { AnyFunc } from '@vunk/shared';
2
- import type { PropType } from 'vue';
3
- import type { AgentChatContext, AgentMessage } from './types';
4
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
- request: {
6
- type: PropType<AnyFunc>;
7
- };
8
- parser: {
9
- type: PropType<AnyFunc>;
10
- };
11
- }>, import("vue").Slot<any> | undefined, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
- load: (e: AgentChatContext) => {
13
- agent: import("vue").ComputedRef<import("ant-design-x-vue").XAgent<AgentMessage>>;
14
- chat: {
15
- readonly onRequest: (value: AgentMessage) => void;
16
- readonly messages: import("vue").Ref<import("ant-design-x-vue").MessageInfo<AgentMessage>[], import("ant-design-x-vue").MessageInfo<AgentMessage>[]>;
17
- readonly parsedMessages: import("vue").ComputedRef<import("ant-design-x-vue").MessageInfo<import("./types").BubbleMessage>[]>;
18
- readonly setMessages: (updater: import("ant-design-x-vue").MessageInfo<AgentMessage>[] | ((prev: import("ant-design-x-vue").MessageInfo<AgentMessage>[]) => import("ant-design-x-vue").MessageInfo<AgentMessage>[])) => void;
19
- };
20
- simplicity: {
21
- onRequest: (message: string) => void;
22
- items: import("vue").ComputedRef<import("./types").BubbleItem[]>;
23
- };
24
- };
25
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
26
- request: {
27
- type: PropType<AnyFunc>;
28
- };
29
- parser: {
30
- type: PropType<AnyFunc>;
31
- };
32
- }>> & Readonly<{
33
- onLoad?: ((e: {
34
- agent: import("vue").ComputedRef<import("ant-design-x-vue").XAgent<AgentMessage>>;
35
- chat: {
36
- readonly onRequest: (value: AgentMessage) => void;
37
- readonly messages: import("vue").Ref<import("ant-design-x-vue").MessageInfo<AgentMessage>[], import("ant-design-x-vue").MessageInfo<AgentMessage>[]>;
38
- readonly parsedMessages: import("vue").ComputedRef<import("ant-design-x-vue").MessageInfo<import("./types").BubbleMessage>[]>;
39
- readonly setMessages: (updater: import("ant-design-x-vue").MessageInfo<AgentMessage>[] | ((prev: import("ant-design-x-vue").MessageInfo<AgentMessage>[]) => import("ant-design-x-vue").MessageInfo<AgentMessage>[])) => void;
40
- };
41
- simplicity: {
42
- onRequest: (message: string) => void;
43
- items: import("vue").ComputedRef<import("./types").BubbleItem[]>;
44
- };
45
- }) => any) | undefined;
46
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
47
- export default _default;
@@ -1,43 +0,0 @@
1
- import type { __VkBubbleTemplates } from '@vunk/plus/components/bubble-templates';
2
- import type { Media, NormalObject } from '@vunk/shared';
3
- import type { RequestFn } from 'ant-design-x-vue';
4
- import type { MaybeArray } from 'naive-ui/es/_utils';
5
- import type { BubbleListItemProps } from 'vue-element-plus-x/types/components/BubbleList/types';
6
- import type { initAgentChat } from './use';
7
- export type AgentChatContext = ReturnType<typeof initAgentChat>;
8
- export type Request = RequestFn<AgentMessage>;
9
- export type Parser = (message: AgentMessage) => MaybeArray<BubbleMessage>;
10
- /**
11
- * @description useXAgent request onSuccess 发送的数据
12
- */
13
- export type AgentMessage = BubbleMessage & {
14
- seviceLoading?: boolean;
15
- seviceEnd?: boolean;
16
- };
17
- /**
18
- * @description useXChat parser 解析数据
19
- */
20
- export type BubbleMessage = Partial<BubbleListItemProps> & {
21
- role: string;
22
- content: string;
23
- /**
24
- * @description 服务端请求是否完成
25
- */
26
- seviceEnd?: boolean;
27
- thinkingStatus?: 'start' | 'thinking' | 'end' | 'error';
28
- thinkingContent?: string;
29
- meta?: NormalObject;
30
- abortController?: AbortController;
31
- templateType?: string;
32
- [key: string]: any;
33
- };
34
- export type BubbleItem = BubbleItemBasic & __VkBubbleTemplates.RenderItem;
35
- export type RoleMedia = RoleMediaBasic & __VkBubbleTemplates.RenderItem;
36
- export type BubbleItemModule = 'Thinking';
37
- export interface BubbleItemBasic extends BubbleMessage {
38
- key: string;
39
- modules?: BubbleItemModule[];
40
- }
41
- export interface RoleMediaBasic extends Partial<BubbleItemBasic>, Media {
42
- value: string;
43
- }
@@ -1,29 +0,0 @@
1
- import type { RequestFn } from 'ant-design-x-vue';
2
- import type { AgentMessage, BubbleItem, BubbleMessage, Parser } from './types';
3
- export declare function useAgent(request: RequestFn<AgentMessage>): import("vue").ComputedRef<import("ant-design-x-vue").XAgent<AgentMessage>>[];
4
- export declare function initAgentChat(request: RequestFn<AgentMessage>, parser: Parser): {
5
- agent: import("vue").ComputedRef<import("ant-design-x-vue").XAgent<AgentMessage>>;
6
- chat: {
7
- readonly onRequest: (value: AgentMessage) => void;
8
- readonly messages: import("vue").Ref<import("ant-design-x-vue").MessageInfo<AgentMessage>[], import("ant-design-x-vue").MessageInfo<AgentMessage>[]>;
9
- readonly parsedMessages: import("vue").ComputedRef<import("ant-design-x-vue").MessageInfo<BubbleMessage>[]>;
10
- readonly setMessages: (updater: import("ant-design-x-vue").MessageInfo<AgentMessage>[] | ((prev: import("ant-design-x-vue").MessageInfo<AgentMessage>[]) => import("ant-design-x-vue").MessageInfo<AgentMessage>[])) => void;
11
- };
12
- simplicity: {
13
- onRequest: (message: string) => void;
14
- items: import("vue").ComputedRef<BubbleItem[]>;
15
- };
16
- };
17
- export declare function useAgentChat(): {
18
- agent: import("vue").ComputedRef<import("ant-design-x-vue").XAgent<AgentMessage>>;
19
- chat: {
20
- readonly onRequest: (value: AgentMessage) => void;
21
- readonly messages: import("vue").Ref<import("ant-design-x-vue").MessageInfo<AgentMessage>[], import("ant-design-x-vue").MessageInfo<AgentMessage>[]>;
22
- readonly parsedMessages: import("vue").ComputedRef<import("ant-design-x-vue").MessageInfo<BubbleMessage>[]>;
23
- readonly setMessages: (updater: import("ant-design-x-vue").MessageInfo<AgentMessage>[] | ((prev: import("ant-design-x-vue").MessageInfo<AgentMessage>[]) => import("ant-design-x-vue").MessageInfo<AgentMessage>[])) => void;
24
- };
25
- simplicity: {
26
- onRequest: (message: string) => void;
27
- items: import("vue").ComputedRef<BubbleItem[]>;
28
- };
29
- };
@@ -1,4 +0,0 @@
1
- import VkAvatar from './src/index.vue';
2
- export * as __VkAvatar from './src/types';
3
- export { VkAvatar, };
4
- export default VkAvatar;
@@ -1,18 +0,0 @@
1
- export declare const props: {
2
- readonly size: import("element-plus/es/utils").EpPropFinalized<readonly [NumberConstructor, StringConstructor], "" | "small" | "default" | "large", number, "", boolean>;
3
- readonly shape: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "circle" | "square", unknown, "circle", boolean>;
4
- readonly icon: {
5
- readonly type: import("vue").PropType<import("element-plus").ButtonType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>))[], unknown, unknown>>;
6
- readonly required: false;
7
- readonly validator: ((val: unknown) => boolean) | undefined;
8
- __epPropKey: true;
9
- };
10
- readonly src: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
11
- readonly alt: StringConstructor;
12
- readonly srcSet: StringConstructor;
13
- readonly fit: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => "initial" | "fill" | "cover" | "contain" | "none" | "scale-down" | "-moz-initial" | "inherit" | "revert" | "unset") | (() => ObjectFitProperty) | ((new (...args: any[]) => "initial" | "fill" | "cover" | "contain" | "none" | "scale-down" | "-moz-initial" | "inherit" | "revert" | "unset") | (() => ObjectFitProperty))[], unknown, unknown, "cover", boolean>;
14
- } & {
15
- background: never;
16
- color: never;
17
- };
18
- export declare const emits: {};