@vunk/plus 1.3.0 → 1.3.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.
Files changed (109) hide show
  1. package/components/SendOutlined.mjs +1 -1
  2. package/components/agent-chat-provider/index.d.ts +7 -0
  3. package/components/agent-chat-provider/src/api.d.ts +3 -0
  4. package/components/agent-chat-provider/src/const-roles.d.ts +8 -0
  5. package/components/agent-chat-provider/src/const.d.ts +1 -0
  6. package/components/agent-chat-provider/src/index.vue.d.ts +47 -0
  7. package/components/agent-chat-provider/src/types.d.ts +37 -0
  8. package/components/agent-chat-provider/src/use.d.ts +29 -0
  9. package/components/avatar/index.d.ts +4 -0
  10. package/components/avatar/src/ctx.d.ts +18 -0
  11. package/components/avatar/src/index.vue.d.ts +121 -0
  12. package/components/avatar/src/types.d.ts +1 -0
  13. package/components/broadcasting-markdown/index.d.ts +5 -0
  14. package/components/broadcasting-markdown/index.mjs +32 -16
  15. package/components/broadcasting-markdown/src/const.d.ts +18 -0
  16. package/components/broadcasting-markdown/src/ctx.d.ts +101 -0
  17. package/components/broadcasting-markdown/src/custom-speech.vue.d.ts +117 -0
  18. package/components/broadcasting-markdown/src/index.vue.d.ts +502 -0
  19. package/components/broadcasting-markdown/src/paragraph.vue.d.ts +78 -0
  20. package/components/broadcasting-markdown/src/speech-error.vue.d.ts +60 -0
  21. package/components/broadcasting-markdown/src/types.d.ts +17 -0
  22. package/components/broadcasting-markdown/src/use.d.ts +3 -0
  23. package/components/broadcasting-markdown/src/web-speech.vue.d.ts +110 -0
  24. package/components/bubble-list/index.d.ts +5 -0
  25. package/components/bubble-list/index.mjs +2 -316
  26. package/components/bubble-list/src/ctx.d.ts +30 -0
  27. package/components/bubble-list/src/index.vue.d.ts +952 -0
  28. package/components/bubble-list/src/types.d.ts +4 -0
  29. package/components/bubble-templates/index.d.ts +4 -0
  30. package/components/bubble-templates/index.mjs +2 -161
  31. package/components/bubble-templates/src/index.vue.d.ts +656 -0
  32. package/components/bubble-templates/src/types.d.ts +30 -0
  33. package/components/chat-independent/index.d.ts +4 -0
  34. package/components/chat-independent/index.mjs +42 -34
  35. package/components/chat-independent/src/const.d.ts +13 -0
  36. package/components/chat-independent/src/ctx.d.ts +20 -0
  37. package/components/chat-independent/src/index.vue.d.ts +2413 -0
  38. package/components/chat-independent/src/types.d.ts +13 -0
  39. package/components/index.d.ts +0 -0
  40. package/components/index.mjs +0 -35979
  41. package/components/lottie-animation/index.d.ts +4 -0
  42. package/components/lottie-animation/src/ctx.d.ts +10 -0
  43. package/components/lottie-animation/src/index.vue.d.ts +21 -0
  44. package/components/lottie-animation/src/types.d.ts +4 -0
  45. package/components/monaco-editor/index.d.ts +5 -0
  46. package/components/monaco-editor/src/ctx.d.ts +23 -0
  47. package/components/monaco-editor/src/index.vue.d.ts +40 -0
  48. package/components/monaco-editor/src/types.d.ts +1 -0
  49. package/components/monaco-environment/index.d.ts +4 -0
  50. package/components/monaco-environment/src/ctx.d.ts +8 -0
  51. package/components/monaco-environment/src/index.vue.d.ts +2 -0
  52. package/components/monaco-environment/src/types.d.ts +1 -0
  53. package/components/recorder-button/index.d.ts +4 -0
  54. package/components/recorder-button/src/ctx.d.ts +40 -0
  55. package/components/recorder-button/src/index.vue.d.ts +303 -0
  56. package/components/recorder-button/src/speech-to-text.d.ts +1 -0
  57. package/components/recorder-button/src/types.d.ts +7 -0
  58. package/components/routes-menu-content/index.d.ts +4 -0
  59. package/components/routes-menu-content/src/ctx.d.ts +17 -0
  60. package/components/routes-menu-content/src/index.vue.d.ts +472 -0
  61. package/components/routes-menu-content/src/item/core/ctx.d.ts +18 -0
  62. package/components/routes-menu-content/src/item/core/index.vue.d.ts +307 -0
  63. package/components/routes-menu-content/src/item/ctx.d.ts +14 -0
  64. package/components/routes-menu-content/src/item/index.vue.d.ts +438 -0
  65. package/components/routes-menu-content/src/types.d.ts +1 -0
  66. package/components/sender/index.d.ts +4 -0
  67. package/components/sender/index.mjs +1 -1
  68. package/components/sender/src/SenderHeader.vue.d.ts +256 -0
  69. package/components/sender/src/ctx.d.ts +58 -0
  70. package/components/sender/src/index.vue.d.ts +778 -0
  71. package/components/sender/src/types.d.ts +1 -0
  72. package/components/speech-button/index.d.ts +4 -0
  73. package/components/speech-button/index.mjs +1 -1
  74. package/components/speech-button/src/LoadingIcon.vue.d.ts +2 -0
  75. package/components/speech-button/src/RecordingIcon.vue.d.ts +2 -0
  76. package/components/speech-button/src/ctx.d.ts +10 -0
  77. package/components/speech-button/src/index.vue.d.ts +22 -0
  78. package/components/speech-button/src/types.d.ts +1 -0
  79. package/components/table-columns/index.d.ts +5 -0
  80. package/components/table-columns/src/ctx.d.ts +66 -0
  81. package/components/table-columns/src/el-ctx.d.ts +63 -0
  82. package/components/table-columns/src/index.vue.d.ts +282 -0
  83. package/components/table-columns/src/types.d.ts +21 -0
  84. package/components/tables-v1/index.d.ts +5 -0
  85. package/components/tables-v1/src/ctx.d.ts +281 -0
  86. package/components/tables-v1/src/el-ctx.d.ts +269 -0
  87. package/components/tables-v1/src/index.vue.d.ts +3014 -0
  88. package/components/tables-v1/src/types.d.ts +4 -0
  89. package/components/tables-v1-checkbox/index.d.ts +5 -0
  90. package/components/tables-v1-checkbox/src/ctx.d.ts +321 -0
  91. package/components/tables-v1-checkbox/src/index.vue.d.ts +3796 -0
  92. package/components/tables-v1-checkbox/src/types.d.ts +1 -0
  93. package/components/typing-markdown/index.d.ts +4 -0
  94. package/components/typing-markdown/index.mjs +2 -2
  95. package/components/typing-markdown/src/core.d.ts +2 -0
  96. package/components/typing-markdown/src/ctx.d.ts +33 -0
  97. package/components/typing-markdown/src/index.vue.d.ts +57 -0
  98. package/components/typing-markdown/src/types.d.ts +1 -0
  99. package/components/vditor/index.d.ts +5 -0
  100. package/components/vditor/src/ctx.d.ts +37 -0
  101. package/components/vditor/src/handle-fullscreen.vue.d.ts +18 -0
  102. package/components/vditor/src/handle-value.vue.d.ts +18 -0
  103. package/components/vditor/src/index.vue.d.ts +144 -0
  104. package/components/vditor/src/types.d.ts +9 -0
  105. package/components/vditor/src/use.d.ts +4 -0
  106. package/index.css +0 -38
  107. package/package.json +1 -7
  108. package/components/bubble-list/index.css +0 -18
  109. package/components/bubble-templates/index.css +0 -18
@@ -0,0 +1,30 @@
1
+ import type { VkBroadcastingMarkdown } from '@vunk/plus/components/broadcasting-markdown';
2
+ import type { __VkRenderer } from '@vunk/core/components/renderer';
3
+ import type { VueComponentPropsType } from '@vunk/shared';
4
+ import type { TypewriterProps } from 'vue-element-plus-x/types/components/Typewriter/types';
5
+ export interface TypewriterSource extends __VkRenderer.SourceItem, TypewriterProps {
6
+ templateType: 'Typewriter';
7
+ }
8
+ export interface BroadcastingMarkdownSource extends __VkRenderer.SourceItem, VueComponentPropsType<typeof VkBroadcastingMarkdown> {
9
+ templateType: 'VkBroadcastingMarkdown';
10
+ }
11
+ export type RenderItem = TypewriterSource | BroadcastingMarkdownSource;
12
+ export type RenderData = Record<string, RenderDataRecord>;
13
+ export interface RenderDataRecord {
14
+ /**
15
+ * @description 渲染的组件
16
+ */
17
+ templateType?: RenderItem['templateType'];
18
+ /**
19
+ * @description 组件暴露的元数据
20
+ */
21
+ meta?: any;
22
+ /**
23
+ * @description 已经完成的
24
+ */
25
+ completed?: boolean;
26
+ /**
27
+ * @description 发生错误的
28
+ */
29
+ error?: boolean;
30
+ }
@@ -0,0 +1,4 @@
1
+ import VkChatIndependent from './src/index.vue';
2
+ export * as __VkChatIndependent from './src/types';
3
+ export { VkChatIndependent, };
4
+ export default VkChatIndependent;
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, createElementBlock, openBlock, createElementVNode, createVNode, unref, withCtx, withDirectives, vShow, renderSlot, nextTick } from 'vue';
1
+ import { defineComponent, ref, computed, createElementBlock, openBlock, createElementVNode, createVNode, unref, withCtx, createCommentVNode, withDirectives, Fragment, vShow, renderSlot, nextTick } from 'vue';
2
2
  import { useAgentChat } from '@vunk/plus/components/agent-chat-provider';
3
3
  import { VkBubbleList } from '@vunk/plus/components/bubble-list';
4
4
  import { VkRecorderButton } from '@vunk/plus/components/recorder-button';
@@ -113,39 +113,47 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
113
113
  ]),
114
114
  two: withCtx(() => [
115
115
  createElementVNode("div", _hoisted_3, [
116
- withDirectives(createVNode(
117
- unref(VkKeyboardAvatar),
118
- {
119
- size: 40,
120
- onClick: _cache[0] || (_cache[0] = ($event) => inputType.value = unref(InputType).Text)
121
- },
122
- null,
123
- 512
124
- /* NEED_PATCH */
125
- ), [
126
- [vShow, inputType.value === unref(InputType).Voice]
127
- ]),
128
- withDirectives(createVNode(
129
- unref(VkVoiceAvatar),
130
- {
131
- size: 40,
132
- onClick: _cache[1] || (_cache[1] = ($event) => inputType.value = unref(InputType).Voice)
133
- },
134
- null,
135
- 512
136
- /* NEED_PATCH */
137
- ), [
138
- [vShow, inputType.value === unref(InputType).Text]
139
- ]),
140
- withDirectives(createVNode(unref(VkRecorderButton), {
141
- "append-to": mainRef.value,
142
- disabled: senderDisabled.value,
143
- "speech-to-text": _ctx.speechToText,
144
- "submit-to-text": true,
145
- onSubmitText: onSubmit
146
- }, null, 8, ["append-to", "disabled", "speech-to-text"]), [
147
- [vShow, inputType.value === unref(InputType).Voice]
148
- ]),
116
+ _ctx.speechToText ? (openBlock(), createElementBlock(
117
+ Fragment,
118
+ { key: 0 },
119
+ [
120
+ withDirectives(createVNode(
121
+ unref(VkKeyboardAvatar),
122
+ {
123
+ size: 40,
124
+ onClick: _cache[0] || (_cache[0] = ($event) => inputType.value = unref(InputType).Text)
125
+ },
126
+ null,
127
+ 512
128
+ /* NEED_PATCH */
129
+ ), [
130
+ [vShow, inputType.value === unref(InputType).Voice]
131
+ ]),
132
+ withDirectives(createVNode(unref(VkRecorderButton), {
133
+ "append-to": mainRef.value,
134
+ disabled: senderDisabled.value,
135
+ "speech-to-text": _ctx.speechToText,
136
+ "submit-to-text": true,
137
+ onSubmitText: onSubmit
138
+ }, null, 8, ["append-to", "disabled", "speech-to-text"]), [
139
+ [vShow, inputType.value === unref(InputType).Voice]
140
+ ]),
141
+ withDirectives(createVNode(
142
+ unref(VkVoiceAvatar),
143
+ {
144
+ size: 40,
145
+ onClick: _cache[1] || (_cache[1] = ($event) => inputType.value = unref(InputType).Voice)
146
+ },
147
+ null,
148
+ 512
149
+ /* NEED_PATCH */
150
+ ), [
151
+ [vShow, inputType.value === unref(InputType).Text]
152
+ ])
153
+ ],
154
+ 64
155
+ /* STABLE_FRAGMENT */
156
+ )) : createCommentVNode("v-if", true),
149
157
  withDirectives(createVNode(unref(VkSender), {
150
158
  modelValue: content.value,
151
159
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => content.value = $event),
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 输入的两种方式 语音和文本
3
+ */
4
+ export declare enum InputType {
5
+ /**
6
+ * 语音
7
+ */
8
+ Voice = "voice",
9
+ /**
10
+ * 文本
11
+ */
12
+ Text = "text"
13
+ }
@@ -0,0 +1,20 @@
1
+ import type { __VkBubbleList } from '@vunk/plus/components/bubble-list';
2
+ import type { SetDataEvent } from '@vunk/core';
3
+ import type { PropType } from 'vue';
4
+ export declare const props: {
5
+ /**
6
+ * @description BubbleList渲染时数据, 受控于setData
7
+ */
8
+ data: {
9
+ type: PropType<import("../../bubble-templates/src/types").RenderData>;
10
+ };
11
+ speechToText: {
12
+ type: PropType<import("./types").SpeechToText>;
13
+ };
14
+ textToSpeech: {
15
+ type: PropType<import("./types").TextToSpeech>;
16
+ };
17
+ };
18
+ export declare const emits: {
19
+ setData: (e: SetDataEvent) => SetDataEvent;
20
+ };