@vunk/plus 1.2.2 → 1.3.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 (119) hide show
  1. package/components/SendOutlined.mjs +2 -2
  2. package/components/agent-chat-provider/index.d.ts +7 -0
  3. package/components/agent-chat-provider/index.mjs +789 -0
  4. package/components/agent-chat-provider/src/api.d.ts +3 -0
  5. package/components/agent-chat-provider/src/const-roles.d.ts +8 -0
  6. package/components/agent-chat-provider/src/const.d.ts +1 -0
  7. package/components/agent-chat-provider/src/index.vue.d.ts +47 -0
  8. package/components/agent-chat-provider/src/types.d.ts +37 -0
  9. package/components/agent-chat-provider/src/use.d.ts +29 -0
  10. package/components/avatar/index.mjs +2 -2
  11. package/components/avatar/src/ctx.d.ts +4 -4
  12. package/components/avatar/src/index.vue.d.ts +66 -125
  13. package/components/broadcasting-markdown/index.css +3 -0
  14. package/components/broadcasting-markdown/index.d.ts +5 -0
  15. package/components/broadcasting-markdown/index.mjs +637 -0
  16. package/components/broadcasting-markdown/src/const.d.ts +18 -0
  17. package/components/broadcasting-markdown/src/ctx.d.ts +93 -0
  18. package/components/broadcasting-markdown/src/custom-speech.vue.d.ts +109 -0
  19. package/components/broadcasting-markdown/src/index.vue.d.ts +477 -0
  20. package/components/broadcasting-markdown/src/paragraph.vue.d.ts +78 -0
  21. package/components/broadcasting-markdown/src/speech-error.vue.d.ts +60 -0
  22. package/components/broadcasting-markdown/src/types.d.ts +17 -0
  23. package/components/broadcasting-markdown/src/use.d.ts +3 -0
  24. package/components/broadcasting-markdown/src/web-speech.vue.d.ts +102 -0
  25. package/components/bubble-list/index.css +18 -0
  26. package/components/bubble-list/index.d.ts +5 -0
  27. package/components/bubble-list/index.mjs +386 -0
  28. package/components/bubble-list/src/ctx.d.ts +30 -0
  29. package/components/bubble-list/src/index.vue.d.ts +927 -0
  30. package/components/bubble-list/src/types.d.ts +4 -0
  31. package/components/bubble-templates/index.css +18 -0
  32. package/components/bubble-templates/index.d.ts +4 -0
  33. package/components/bubble-templates/index.mjs +258 -0
  34. package/components/bubble-templates/src/index.vue.d.ts +631 -0
  35. package/components/bubble-templates/src/types.d.ts +30 -0
  36. package/components/chat-independent/index.css +47 -0
  37. package/components/chat-independent/index.d.ts +4 -0
  38. package/components/chat-independent/index.mjs +184 -0
  39. package/components/chat-independent/src/const.d.ts +13 -0
  40. package/components/chat-independent/src/ctx.d.ts +20 -0
  41. package/components/chat-independent/src/index.vue.d.ts +2388 -0
  42. package/components/chat-independent/src/types.d.ts +13 -0
  43. package/components/index.d.ts +0 -0
  44. package/components/index.mjs +1 -0
  45. package/components/index2.mjs +35980 -0
  46. package/components/lottie-animation/index.mjs +2 -2
  47. package/components/lottie-animation/src/index.vue.d.ts +1 -1
  48. package/components/monaco-editor/index.mjs +2 -2
  49. package/components/monaco-editor/src/ctx.d.ts +3 -3
  50. package/components/monaco-editor/src/index.vue.d.ts +3 -3
  51. package/components/monaco-environment/index.mjs +1 -1
  52. package/components/recorder-button/index.css +7 -10
  53. package/components/recorder-button/index.mjs +115 -83
  54. package/components/recorder-button/src/ctx.d.ts +27 -6
  55. package/components/recorder-button/src/index.vue.d.ts +196 -202
  56. package/components/recorder-button/src/types.d.ts +1 -0
  57. package/components/routes-menu-content/index.mjs +5 -5
  58. package/components/routes-menu-content/src/ctx.d.ts +1 -1
  59. package/components/routes-menu-content/src/index.vue.d.ts +223 -101
  60. package/components/routes-menu-content/src/item/core/ctx.d.ts +1 -1
  61. package/components/routes-menu-content/src/item/core/index.vue.d.ts +175 -53
  62. package/components/routes-menu-content/src/item/index.vue.d.ts +221 -99
  63. package/components/sender/index.css +2 -5
  64. package/components/sender/index.mjs +32 -13
  65. package/components/sender/src/SenderHeader.vue.d.ts +31 -45
  66. package/components/sender/src/ctx.d.ts +23 -3
  67. package/components/sender/src/index.vue.d.ts +170 -124
  68. package/components/sender/src/types.d.ts +1 -1
  69. package/components/speech-button/index.mjs +7 -14
  70. package/components/speech-button/src/ctx.d.ts +1 -1
  71. package/components/speech-button/src/index.vue.d.ts +3 -3
  72. package/components/table-columns/index.d.ts +1 -1
  73. package/components/table-columns/index.mjs +3 -6
  74. package/components/table-columns/src/ctx.d.ts +8 -8
  75. package/components/table-columns/src/el-ctx.d.ts +7 -7
  76. package/components/table-columns/src/index.vue.d.ts +38 -36
  77. package/components/tables-v1/index.mjs +3 -3
  78. package/components/tables-v1/src/ctx.d.ts +66 -68
  79. package/components/tables-v1/src/el-ctx.d.ts +48 -51
  80. package/components/tables-v1/src/index.vue.d.ts +1950 -1933
  81. package/components/tables-v1-checkbox/index.mjs +269 -33
  82. package/components/tables-v1-checkbox/src/ctx.d.ts +65 -67
  83. package/components/tables-v1-checkbox/src/index.vue.d.ts +2167 -2159
  84. package/components/typing-markdown/index.mjs +128 -33
  85. package/components/typing-markdown/src/core.d.ts +2 -3
  86. package/components/typing-markdown/src/ctx.d.ts +5 -5
  87. package/components/typing-markdown/src/index.vue.d.ts +9 -9
  88. package/components/vditor/index.mjs +5 -9
  89. package/components/vditor/src/ctx.d.ts +2 -2
  90. package/components/vditor/src/handle-fullscreen.vue.d.ts +3 -3
  91. package/components/vditor/src/handle-value.vue.d.ts +3 -3
  92. package/components/vditor/src/index.vue.d.ts +11 -11
  93. package/composables/el-breakpoints/index.d.ts +1 -1
  94. package/composables/recorder/index.mjs +751 -182
  95. package/icons/_plugin-vue_export-helper.mjs +9 -0
  96. package/icons/end/index.d.ts +4 -0
  97. package/icons/end/index.mjs +36 -0
  98. package/icons/end/src/avatar.d.ts +12 -0
  99. package/icons/end/src/icon.d.ts +57 -0
  100. package/icons/keyboard/index.d.ts +4 -0
  101. package/icons/keyboard/index.mjs +36 -0
  102. package/icons/keyboard/src/avatar.d.ts +12 -0
  103. package/icons/keyboard/src/icon.d.ts +57 -0
  104. package/icons/start/index.d.ts +4 -0
  105. package/icons/start/index.mjs +36 -0
  106. package/icons/start/src/avatar.d.ts +12 -0
  107. package/icons/start/src/icon.d.ts +57 -0
  108. package/icons/voice/index.d.ts +4 -0
  109. package/icons/voice/index.mjs +51 -0
  110. package/icons/voice/src/avatar.d.ts +12 -0
  111. package/icons/voice/src/icon.d.ts +57 -0
  112. package/icons/voice/src/index.vue.d.ts +4 -0
  113. package/index.css +99 -15
  114. package/package.json +51 -7
  115. package/fetch/PlusFetch/index.d.ts +0 -14
  116. package/fetch/PlusFetch/index.mjs +0 -638
  117. package/fetch/PlusFetch/types.d.ts +0 -54
  118. package/fetch/index.d.ts +0 -1
  119. package/fetch/index.mjs +0 -5
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, onMounted, openBlock, createElementBlock, Fragment, createElementVNode, renderSlot } from 'vue';
1
+ import { defineComponent, ref, onMounted, createElementBlock, openBlock, Fragment, createElementVNode, renderSlot } from 'vue';
2
2
  import lottie from 'lottie-web';
3
3
  import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
4
4
 
@@ -58,7 +58,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
58
58
  /* STABLE_FRAGMENT */
59
59
  );
60
60
  }
61
- var VkLottieAnimation = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/lottie-animation/src/index.vue"]]);
61
+ var VkLottieAnimation = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
62
62
 
63
63
  var types = /*#__PURE__*/Object.freeze({
64
64
  __proto__: null
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
14
14
  default: string;
15
15
  };
16
16
  }>> & Readonly<{
17
- onLoad?: (e: import("./types").LoadEvent) => any;
17
+ onLoad?: ((e: import("./types").LoadEvent) => any) | undefined;
18
18
  }>, {
19
19
  path: string;
20
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,6 +1,6 @@
1
1
  import { watchPausable } from '@vueuse/core';
2
2
  import { editor } from 'monaco-editor';
3
- import { defineComponent, ref, onMounted, nextTick, watchEffect, onBeforeUnmount, openBlock, createElementBlock } from 'vue';
3
+ import { defineComponent, ref, onMounted, nextTick, watchEffect, onBeforeUnmount, createElementBlock, openBlock } from 'vue';
4
4
  import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
5
5
  import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
6
6
 
@@ -89,7 +89,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
89
89
  /* NEED_PATCH */
90
90
  );
91
91
  }
92
- var VkMonacoEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/monaco-editor/src/index.vue"]]);
92
+ var VkMonacoEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
93
93
 
94
94
  var types = /*#__PURE__*/Object.freeze({
95
95
  __proto__: null
@@ -14,10 +14,10 @@ export declare const props: {
14
14
  default: boolean;
15
15
  };
16
16
  };
17
- export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"readOnly", keyof T2>)[]>(propsArg: T2, excludes?: EX) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"defaultOptions", keyof T2>, KE> | Exclude<Extract<"readOnly", keyof T2>, KE> : Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"readOnly", keyof T2>]: { [k in Extract<"modelValue", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"readOnly", keyof T2>]: T2[k]; }[P]; }>;
17
+ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"modelValue", keyof T2> | Extract<"readOnly", keyof T2> | Extract<"defaultOptions", keyof T2>)[]>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"readOnly", keyof T2>, KE> | Exclude<Extract<"defaultOptions", keyof T2>, KE> : Extract<"modelValue", keyof T2> | Extract<"readOnly", keyof T2> | Extract<"defaultOptions", keyof T2>]: { [k in Extract<"modelValue", keyof T2> | Extract<"readOnly", keyof T2> | Extract<"defaultOptions", keyof T2>]: T2[k]; }[P]; }>;
18
18
  export declare const emits: {
19
- 'update:modelValue': any;
19
+ 'update:modelValue': null;
20
20
  };
21
- export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends "update:modelValue"[]>(emit: T2, excludes?: EX) => { [P in EX extends (infer KE)[] ? Exclude<"update:modelValue", KE> : "update:modelValue"]: {
21
+ export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends "update:modelValue"[]>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"update:modelValue", KE> : "update:modelValue"]: {
22
22
  'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
23
23
  }[P]; };
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
16
16
  }>, {
17
17
  editorNode: Ref<HTMLDivElement, HTMLDivElement>;
18
18
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
- 'update:modelValue': any;
19
+ 'update:modelValue': null;
20
20
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
21
  modelValue: {
22
22
  type: StringConstructor;
@@ -31,10 +31,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
31
31
  default: boolean;
32
32
  };
33
33
  }>> & Readonly<{
34
- "onUpdate:modelValue"?: (...args: any[] | unknown[]) => any;
34
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
35
35
  }>, {
36
36
  modelValue: string;
37
- defaultOptions: mEditor.IStandaloneEditorConstructionOptions;
38
37
  readOnly: boolean;
38
+ defaultOptions: mEditor.IStandaloneEditorConstructionOptions;
39
39
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
40
40
  export default _default;
@@ -33,7 +33,7 @@ var _sfc_main = defineComponent({
33
33
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
34
34
  return renderSlot(_ctx.$slots, "default");
35
35
  }
36
- var VkMonacoEnvironment = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/monaco-environment/src/index.vue"]]);
36
+ var VkMonacoEnvironment = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
37
37
 
38
38
  var types = /*#__PURE__*/Object.freeze({
39
39
  __proto__: null
@@ -1,19 +1,16 @@
1
- .sk-recorder-container {
1
+ .vk-recorder-container {
2
2
  position: relative;
3
3
  }
4
- .sk-recorder-button {
4
+ .vk-recorder-button {
5
5
  position: relative;
6
6
  width: 100%;
7
7
  touch-action: none;
8
8
  user-select: none;
9
9
  }
10
- .recording-mask {
11
- position: fixed;
12
- top: 0;
13
- left: 0;
14
- right: 0;
15
- bottom: 0;
16
- background: rgba(0, 0, 0, 0.6);
10
+ .vk-recording-mask {
11
+ position: absolute;
12
+ inset: 0;
13
+ background: rgba(0, 0, 0, 0.5);
17
14
  z-index: 1000;
18
15
  display: flex;
19
16
  flex-direction: column;
@@ -25,7 +22,7 @@
25
22
  display: flex;
26
23
  justify-content: space-between;
27
24
  padding: 20px 40px;
28
- margin-bottom: 100px;
25
+ margin-bottom: 24%;
29
26
  }
30
27
  .cancel-btn, .text-btn {
31
28
  display: flex;
@@ -1,6 +1,6 @@
1
1
  import { ElButton, ElMessage } from 'element-plus';
2
2
  import Recorder from 'recorder-core';
3
- import { defineComponent, ref, shallowRef, onUnmounted, resolveComponent, openBlock, createElementBlock, createCommentVNode, createElementVNode, toDisplayString, normalizeClass, createVNode, mergeProps, withCtx } from 'vue';
3
+ import { defineComponent, ref, shallowRef, onUnmounted, resolveComponent, createElementBlock, openBlock, createCommentVNode, createBlock, createVNode, Teleport, createElementVNode, toDisplayString, normalizeClass, mergeProps, withCtx } from 'vue';
4
4
  import 'recorder-core/src/engine/mp3';
5
5
  import 'recorder-core/src/engine/wav';
6
6
  import 'recorder-core/src/engine/mp3-engine';
@@ -9,16 +9,37 @@ import 'recorder-core/src/app-support/app';
9
9
  import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
10
10
 
11
11
  const props = {
12
- speenchToTextUrl: {
13
- type: String,
14
- default: "http://localhost:3000/speech-to-text"
15
- },
16
12
  /**
17
13
  * 自定义转为文本区域事件
18
14
  */
19
15
  onTextZone: {
20
16
  type: Function,
21
17
  default: void 0
18
+ },
19
+ /**
20
+ * 遮罩层 appendTo
21
+ */
22
+ appendTo: {
23
+ type: null,
24
+ default: "body"
25
+ },
26
+ disabled: {
27
+ type: Boolean,
28
+ default: false
29
+ },
30
+ /**
31
+ * 语音转文本函数
32
+ */
33
+ speechToText: {
34
+ type: Function,
35
+ default: void 0
36
+ },
37
+ /**
38
+ * @description 是否直接使用提交文本输出
39
+ */
40
+ submitToText: {
41
+ type: Boolean,
42
+ default: false
22
43
  }
23
44
  };
24
45
  const emits = {
@@ -100,14 +121,20 @@ var _sfc_main = defineComponent({
100
121
  blob,
101
122
  url: blobUrl.value
102
123
  });
103
- if (theTextZone) {
124
+ if (theTextZone || props2.submitToText) {
104
125
  if (props2.onTextZone) {
105
126
  props2.onTextZone({
106
127
  blob,
107
128
  url: blobUrl.value
108
129
  });
109
130
  } else {
110
- speechToText(props2.speenchToTextUrl, blob).then((text) => {
131
+ if (props2.speechToText) {
132
+ props2.speechToText(blob).then((text) => {
133
+ emit("submitText", text);
134
+ });
135
+ return;
136
+ }
137
+ speechToText("/speech-to-text", blob).then((text) => {
111
138
  emit("submitText", text);
112
139
  }).catch((err) => {
113
140
  console.error("\u8BED\u97F3\u8BC6\u522B\u9519\u8BEF:", err);
@@ -126,6 +153,8 @@ var _sfc_main = defineComponent({
126
153
  document.removeEventListener("mouseup", onmouseup);
127
154
  };
128
155
  const onmousedown = (e) => {
156
+ if (props2.disabled)
157
+ return;
129
158
  e.preventDefault();
130
159
  isMouseDown = true;
131
160
  const touch = "touches" in e ? e.touches[0] : e;
@@ -196,10 +225,10 @@ var _sfc_main = defineComponent({
196
225
  }
197
226
  });
198
227
 
199
- const _hoisted_1 = { class: "sk-recorder-container" };
228
+ const _hoisted_1 = { class: "vk-recorder-container" };
200
229
  const _hoisted_2 = {
201
230
  key: 0,
202
- class: "recording-mask"
231
+ class: "vk-recording-mask"
203
232
  };
204
233
  const _hoisted_3 = { class: "recording-tip" };
205
234
  const _hoisted_4 = {
@@ -212,81 +241,84 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
212
241
  const _component_ElButton = resolveComponent("ElButton");
213
242
  return openBlock(), createElementBlock("div", _hoisted_1, [
214
243
  createCommentVNode(" \u906E\u7F69\u5C42 "),
215
- _ctx.isDragging ? (openBlock(), createElementBlock("div", _hoisted_2, [
216
- createCommentVNode(" \u5F55\u97F3\u63D0\u793A\u533A\u57DF\u79FB\u5230\u4E0A\u9762 "),
217
- createElementVNode("div", _hoisted_3, [
218
- createElementVNode(
219
- "div",
220
- _hoisted_4,
221
- null,
222
- 512
223
- /* NEED_PATCH */
224
- ),
225
- createElementVNode(
226
- "div",
227
- _hoisted_5,
228
- toDisplayString(_ctx.cancelZone ? "\u677E\u5F00\u624B\u6307\uFF0C\u53D6\u6D88\u53D1\u9001" : "\u677E\u5F00\u53D1\u9001\uFF0C\u4E0A\u6ED1\u53D6\u6D88"),
229
- 1
230
- /* TEXT */
231
- )
232
- ]),
233
- createCommentVNode(" \u64CD\u4F5C\u6309\u94AE\u79FB\u5230\u5E95\u90E8 "),
234
- createElementVNode("div", _hoisted_6, [
235
- createElementVNode(
236
- "div",
237
- {
238
- class: normalizeClass(["cancel-btn", { active: _ctx.cancelZone }])
239
- },
240
- _cache[0] || (_cache[0] = [
241
- createElementVNode(
242
- "div",
243
- { class: "btn-icon" },
244
- " \xD7 ",
245
- -1
246
- /* HOISTED */
247
- ),
248
- createElementVNode(
249
- "div",
250
- { class: "btn-text" },
251
- " \u53D6\u6D88\u53D1\u9001 ",
252
- -1
253
- /* HOISTED */
254
- )
255
- ]),
256
- 2
257
- /* CLASS */
258
- ),
259
- createElementVNode(
260
- "div",
261
- {
262
- class: normalizeClass(["text-btn", { active: _ctx.isTextZone }])
263
- },
264
- _cache[1] || (_cache[1] = [
265
- createElementVNode(
266
- "div",
267
- { class: "btn-icon" },
268
- " \u6587 ",
269
- -1
270
- /* HOISTED */
271
- ),
272
- createElementVNode(
273
- "div",
274
- { class: "btn-text" },
275
- " \u8F6C\u4E3A\u6587\u5B57 ",
276
- -1
277
- /* HOISTED */
278
- )
279
- ]),
280
- 2
281
- /* CLASS */
282
- )
283
- ])
284
- ])) : createCommentVNode("v-if", true),
244
+ (openBlock(), createBlock(Teleport, { to: _ctx.appendTo }, [
245
+ _ctx.isDragging ? (openBlock(), createElementBlock("div", _hoisted_2, [
246
+ createCommentVNode(" \u5F55\u97F3\u63D0\u793A\u533A\u57DF\u79FB\u5230\u4E0A\u9762 "),
247
+ createElementVNode("div", _hoisted_3, [
248
+ createElementVNode(
249
+ "div",
250
+ _hoisted_4,
251
+ null,
252
+ 512
253
+ /* NEED_PATCH */
254
+ ),
255
+ createElementVNode(
256
+ "div",
257
+ _hoisted_5,
258
+ toDisplayString(_ctx.cancelZone ? "\u677E\u5F00\u624B\u6307\uFF0C\u53D6\u6D88\u53D1\u9001" : "\u677E\u5F00\u53D1\u9001\uFF0C\u4E0A\u6ED1\u53D6\u6D88"),
259
+ 1
260
+ /* TEXT */
261
+ )
262
+ ]),
263
+ createElementVNode("div", _hoisted_6, [
264
+ createElementVNode(
265
+ "div",
266
+ {
267
+ class: normalizeClass(["cancel-btn", { active: _ctx.cancelZone }])
268
+ },
269
+ _cache[0] || (_cache[0] = [
270
+ createElementVNode(
271
+ "div",
272
+ { class: "btn-icon" },
273
+ " \xD7 ",
274
+ -1
275
+ /* HOISTED */
276
+ ),
277
+ createElementVNode(
278
+ "div",
279
+ { class: "btn-text" },
280
+ " \u53D6\u6D88\u53D1\u9001 ",
281
+ -1
282
+ /* HOISTED */
283
+ )
284
+ ]),
285
+ 2
286
+ /* CLASS */
287
+ ),
288
+ createElementVNode(
289
+ "div",
290
+ {
291
+ class: normalizeClass(["text-btn", { active: _ctx.isTextZone }])
292
+ },
293
+ _cache[1] || (_cache[1] = [
294
+ createElementVNode(
295
+ "div",
296
+ { class: "btn-icon" },
297
+ " \u6587 ",
298
+ -1
299
+ /* HOISTED */
300
+ ),
301
+ createElementVNode(
302
+ "div",
303
+ { class: "btn-text" },
304
+ " \u8F6C\u4E3A\u6587\u5B57 ",
305
+ -1
306
+ /* HOISTED */
307
+ )
308
+ ]),
309
+ 2
310
+ /* CLASS */
311
+ )
312
+ ])
313
+ ])) : createCommentVNode("v-if", true)
314
+ ], 8, ["to"])),
285
315
  createCommentVNode(" \u5F55\u97F3\u6309\u94AE "),
286
316
  createVNode(_component_ElButton, mergeProps(_ctx.$attrs, {
287
- class: ["sk-recorder-button", {
317
+ disabled: _ctx.disabled,
318
+ class: ["vk-recorder-button", {
288
319
  "is-recording": _ctx.recording
289
320
  }],
321
+ size: "large",
290
322
  onTouchstart: _ctx.onmousedown,
291
323
  onTouchmove: _ctx.onmousemove,
292
324
  onTouchend: _ctx.onmouseup,
@@ -295,7 +327,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
295
327
  default: withCtx(() => _cache[2] || (_cache[2] = [
296
328
  createElementVNode(
297
329
  "span",
298
- { class: "sk-recorder-button-text" },
330
+ { class: "vk-recorder-button-text" },
299
331
  "\u6309\u4F4F \u8BF4\u8BDD",
300
332
  -1
301
333
  /* HOISTED */
@@ -303,10 +335,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
303
335
  ])),
304
336
  _: 1
305
337
  /* STABLE */
306
- }, 16, ["class", "onTouchstart", "onTouchmove", "onTouchend", "onMousedown"])
338
+ }, 16, ["disabled", "class", "onTouchstart", "onTouchmove", "onTouchend", "onMousedown"])
307
339
  ]);
308
340
  }
309
- var VkRecorderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/recorder-button/src/index.vue"]]);
341
+ var VkRecorderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
310
342
 
311
343
  var types = /*#__PURE__*/Object.freeze({
312
344
  __proto__: null
@@ -1,16 +1,37 @@
1
1
  import type { PropType } from 'vue';
2
- import type { OnTextZone, SubmitRawEvent } from './types';
2
+ import type { OnTextZone, SpeechToText, SubmitRawEvent } from './types';
3
3
  export declare const props: {
4
- speenchToTextUrl: {
5
- type: StringConstructor;
6
- default: string;
7
- };
8
4
  /**
9
5
  * 自定义转为文本区域事件
10
6
  */
11
7
  onTextZone: {
12
8
  type: PropType<OnTextZone>;
13
- default: any;
9
+ default: undefined;
10
+ };
11
+ /**
12
+ * 遮罩层 appendTo
13
+ */
14
+ appendTo: {
15
+ type: null;
16
+ default: string;
17
+ };
18
+ disabled: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ /**
23
+ * 语音转文本函数
24
+ */
25
+ speechToText: {
26
+ type: PropType<SpeechToText>;
27
+ default: undefined;
28
+ };
29
+ /**
30
+ * @description 是否直接使用提交文本输出
31
+ */
32
+ submitToText: {
33
+ type: BooleanConstructor;
34
+ default: boolean;
14
35
  };
15
36
  };
16
37
  export declare const emits: {