@vunk/plus 1.7.3 → 1.7.4

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 (42) hide show
  1. package/components/broadcasting-markdown/index.mjs +101 -238
  2. package/components/broadcasting-markdown/src/ctx.d.ts +1 -4
  3. package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +49 -88
  4. package/components/broadcasting-markdown/src/index.vue.d.ts +44 -103
  5. package/components/broadcasting-markdown/src/types.d.ts +1 -1
  6. package/components/broadcasting-markdown/src/use.d.ts +6 -8
  7. package/components/bubble-templates/index.css +4 -0
  8. package/components/bubble-templates/index.mjs +1 -1
  9. package/components/metahuman-broadcasting/index.mjs +8 -5
  10. package/components/metahuman-broadcasting/src/index.vue.d.ts +62 -114
  11. package/components/pixi-frame/src/apng.vue.d.ts +3 -3
  12. package/components/pixi-frame/src/bitmap.vue.d.ts +5 -5
  13. package/components/pixi-frame/src/core.vue.d.ts +5 -5
  14. package/components/pixi-frame/src/index.vue.d.ts +12 -12
  15. package/components/pixi-frame/src/video.vue.d.ts +3 -3
  16. package/components/typing-markdown/index.mjs +4 -7
  17. package/components/vditor/src/ctx.d.ts +1 -1
  18. package/components/vditor/src/index.vue.d.ts +1 -1
  19. package/index.css +5 -0
  20. package/package.json +4 -1
  21. package/shared/StreamingInferenceService.mjs +4 -1
  22. package/shared/audioToFrames/index.mjs +2 -5
  23. package/shared/audioToFrames/src/audio/StreamingFeatureExtractorService.d.ts +20 -4
  24. package/shared/audioToFrames/src/audio/index.d.ts +0 -2
  25. package/shared/audioToFrames/src/audio/index.mjs +84 -157
  26. package/shared/audioToFrames/src/core/constants.d.ts +0 -22
  27. package/shared/audioToFrames/src/core/index.mjs +16 -2643
  28. package/shared/audioToFrames/src/core/utils.d.ts +1 -68
  29. package/shared/audioToFrames/src/inference/StreamingInferenceService.d.ts +43 -0
  30. package/shared/audioToFrames/src/media/index.d.ts +0 -5
  31. package/shared/audioToFrames/src/media/index.mjs +180 -610
  32. package/shared/constants.mjs +1 -12
  33. package/shared/PredictiveFrameLoader.mjs +0 -367
  34. package/shared/audioToFrames/src/audio/AudioProcessor.d.ts +0 -25
  35. package/shared/audioToFrames/src/audio/FeatureExtractorService.d.ts +0 -31
  36. package/shared/audioToFrames/src/inference/types.d.ts +0 -102
  37. package/shared/audioToFrames/src/media/ImageBitmapPool.d.ts +0 -63
  38. package/shared/audioToFrames/src/media/ImageProcessor.d.ts +0 -47
  39. package/shared/audioToFrames/src/media/PlaybackService.d.ts +0 -56
  40. package/shared/audioToFrames/src/media/WebGLPlaybackService.d.ts +0 -74
  41. package/shared/audioToFrames/src/media/WebGLRenderer.d.ts +0 -66
  42. package/shared/utils.mjs +0 -123
@@ -3,11 +3,10 @@ import { setData } from '@vunk/core';
3
3
  import { useDeferred, useDataComputed } from '@vunk/core/composables';
4
4
  import { blobToDataURL } from '@vunk/shared/data/blob';
5
5
  import { TickerStatus } from '@vunk/shared/enum';
6
- import { defineComponent, openBlock, createElementBlock, createElementVNode, Fragment, createVNode, withCtx, shallowRef, computed, watch, onBeforeUnmount, watchEffect, onMounted, nextTick, renderSlot, createCommentVNode, ref, resolveComponent, renderList, createBlock } from 'vue';
6
+ import { shallowRef, computed, watch, onBeforeUnmount, watchEffect, defineComponent, onMounted, renderSlot, nextTick, createCommentVNode, ref, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, renderList, createBlock, withCtx } from 'vue';
7
7
  import { noop } from '@vunk/shared/function';
8
- import { ElIcon } from 'element-plus';
9
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
10
8
  import { c as commonjsGlobal } from '../_commonjsHelpers.mjs';
9
+ import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
11
10
  import { Deferred } from '@vunk/shared/promise';
12
11
 
13
12
  function markdownToPlainText(md) {
@@ -94,12 +93,9 @@ const props = {
94
93
  };
95
94
  const emits = {
96
95
  "setData": (e) => e,
97
- "interrupt": null,
98
- "update:broadcasting": (_) => true,
99
- "update:completed": (_) => true,
100
- "update:error": (_) => true,
101
96
  "update:status": (_) => true,
102
- "paragraphLoad": (_) => true
97
+ "paragraphLoad": (_) => true,
98
+ "complete": () => true
103
99
  };
104
100
  const paragraphProps = {
105
101
  data: {
@@ -128,75 +124,6 @@ var ctx = /*#__PURE__*/Object.freeze({
128
124
  props: props
129
125
  });
130
126
 
131
- /*! Element Plus Icons Vue v2.3.1 */
132
-
133
- var close_bold_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
134
- name: "CloseBold",
135
- __name: "close-bold",
136
- setup(__props) {
137
- return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
138
- xmlns: "http://www.w3.org/2000/svg",
139
- viewBox: "0 0 1024 1024"
140
- }, [
141
- createElementVNode("path", {
142
- fill: "currentColor",
143
- d: "M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"
144
- })
145
- ]));
146
- }
147
- });
148
-
149
- // src/components/close-bold.vue
150
- var close_bold_default = close_bold_vue_vue_type_script_setup_true_lang_default;
151
-
152
- var _sfc_main$3 = /* @__PURE__ */ defineComponent({
153
- __name: "speech-error",
154
- setup(__props, { expose: __expose }) {
155
- __expose();
156
- const __returned__ = { get CloseBold() {
157
- return close_bold_default;
158
- }, get ElIcon() {
159
- return ElIcon;
160
- } };
161
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
162
- return __returned__;
163
- }
164
- });
165
-
166
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
167
- return openBlock(), createElementBlock(
168
- Fragment,
169
- null,
170
- [
171
- createVNode($setup["ElIcon"], {
172
- color: "var(--el-color-danger)",
173
- size: "1.5em",
174
- style: {
175
- verticalAlign: "text-bottom"
176
- }
177
- }, {
178
- default: withCtx(() => [
179
- createVNode($setup["CloseBold"])
180
- ]),
181
- _: 1
182
- /* STABLE */
183
- }),
184
- _cache[0] || (_cache[0] = createElementVNode(
185
- "span",
186
- { style: {
187
- color: "var(--el-color-danger)"
188
- } },
189
- " \u64AD\u62A5\u5931\u8D25 ",
190
- -1
191
- /* HOISTED */
192
- ))
193
- ],
194
- 64
195
- /* STABLE_FRAGMENT */
196
- );
197
- }
198
- var SpeechError = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/broadcasting-markdown/src/speech-error.vue"]]);
199
-
200
127
  var howler = {};
201
128
 
202
129
  /*!
@@ -3449,6 +3376,12 @@ howler.Howl.prototype.play = function(soundId) {
3449
3376
  };
3450
3377
  function useHowlerParagraph(props, emit) {
3451
3378
  const sound = shallowRef(null);
3379
+ const broadcast = computed({
3380
+ get: () => props.status,
3381
+ set: (val) => {
3382
+ emit("update:status", val);
3383
+ }
3384
+ });
3452
3385
  const createSound = (url2) => {
3453
3386
  if (!url2)
3454
3387
  return null;
@@ -3460,54 +3393,34 @@ function useHowlerParagraph(props, emit) {
3460
3393
  format: ["mp3", "wav", "aac"],
3461
3394
  // 事件处理
3462
3395
  onplay: () => {
3463
- emit("setData", {
3464
- k: "broadcast",
3465
- v: Broadcast.playing
3466
- });
3396
+ broadcast.value = TickerStatus.playing;
3467
3397
  },
3468
3398
  onpause: () => {
3469
- emit("setData", {
3470
- k: "broadcast",
3471
- v: Broadcast.paused
3472
- });
3399
+ broadcast.value = TickerStatus.paused;
3473
3400
  },
3474
3401
  onend: () => {
3475
- emit("setData", {
3476
- k: "broadcast",
3477
- v: Broadcast.stopped
3478
- });
3402
+ broadcast.value = TickerStatus.stopped;
3479
3403
  setTimeout(() => {
3480
3404
  if (sound.value) {
3481
3405
  sound.value.unload();
3482
3406
  sound.value = null;
3483
3407
  }
3484
3408
  }, 400);
3485
- props.deferred.resolve(true);
3486
3409
  },
3487
3410
  onstop: () => {
3488
- emit("setData", {
3489
- k: "broadcast",
3490
- v: Broadcast.stopped
3491
- });
3411
+ broadcast.value = TickerStatus.stopped;
3492
3412
  },
3493
3413
  onloaderror: (_, error) => {
3494
- emit("setData", {
3495
- k: "broadcast",
3496
- v: Broadcast.failed
3497
- });
3498
- props.deferred.reject(error);
3414
+ broadcast.value = TickerStatus.failed;
3415
+ emit("error", error);
3499
3416
  },
3500
3417
  onplayerror: (_, error) => {
3501
- emit("setData", {
3502
- k: "broadcast",
3503
- v: Broadcast.failed
3504
- });
3505
- props.deferred.reject(error);
3418
+ broadcast.value = TickerStatus.failed;
3419
+ emit("error", error);
3506
3420
  }
3507
3421
  });
3508
3422
  };
3509
- const url = computed(() => props.data.url);
3510
- const broadcast = computed(() => props.data.broadcast);
3423
+ const url = computed(() => props.source);
3511
3424
  watch(() => url.value, (newUrl) => {
3512
3425
  if (newUrl) {
3513
3426
  sound.value = createSound(newUrl);
@@ -3540,36 +3453,47 @@ function useHowlerParagraph(props, emit) {
3540
3453
  }
3541
3454
 
3542
3455
  var _sfc_main$2 = /* @__PURE__ */ defineComponent({
3543
- components: {
3544
- SpeechError
3456
+ __name: "howler-speech",
3457
+ props: {
3458
+ /**
3459
+ * 语音资源
3460
+ */
3461
+ source: {
3462
+ type: String,
3463
+ default: ""
3464
+ },
3465
+ status: {
3466
+ type: String,
3467
+ default: TickerStatus.pending
3468
+ }
3545
3469
  },
3546
- props: paragraphProps,
3547
- emits: paragraphEmits,
3548
- setup(props, {
3549
- emit
3550
- }) {
3551
- const value = props.render(props.data.value);
3552
- const theData = computed(() => props.data);
3553
- if (!value.trim()) {
3554
- props.deferred.resolve(true);
3555
- emit("setData", {
3556
- k: "broadcast",
3557
- v: Broadcast.stopped
3558
- });
3559
- return () => null;
3470
+ emits: {
3471
+ "update:status": null,
3472
+ "load": null,
3473
+ "error": null
3474
+ },
3475
+ setup(__props, { expose: __expose, emit: __emit }) {
3476
+ __expose();
3477
+ const props = __props;
3478
+ const emit = __emit;
3479
+ if (!props.source) {
3480
+ emit("update:status", TickerStatus.stopped);
3481
+ } else {
3482
+ useHowlerParagraph(props, emit);
3560
3483
  }
3561
- useHowlerParagraph(props, emit);
3562
3484
  onMounted(() => {
3563
- emit("load", {
3564
- data: props.data,
3565
- deferred: props.deferred
3566
- });
3485
+ emit("load");
3567
3486
  });
3568
- return () => createVNode(Fragment, null, [theData.value.status === ParagraphStatus.rejected && createVNode(SpeechError, null, null)]);
3487
+ const __returned__ = { props, emit };
3488
+ Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
3489
+ return __returned__;
3569
3490
  }
3570
3491
  });
3571
3492
 
3572
- var HowlerSpeechView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/broadcasting-markdown/src/howler-speech.vue"]]);
3493
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
3494
+ return renderSlot(_ctx.$slots, "default", { status: $props.status });
3495
+ }
3496
+ var HowlerSpeechView = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/broadcasting-markdown/src/howler-speech.vue"]]);
3573
3497
 
3574
3498
  const LogLevels = {
3575
3499
  silent: Number.NEGATIVE_INFINITY,
@@ -4135,12 +4059,15 @@ var _sfc_main = defineComponent({
4135
4059
  },
4136
4060
  props,
4137
4061
  emits,
4138
- setup(props2, { emit, expose, slots }) {
4062
+ setup(props2, { emit }) {
4139
4063
  const [theData, handleSetData] = useDataComputed({
4140
4064
  default: []
4141
4065
  }, props2, emit);
4142
4066
  const addParagraph = (paragraph) => {
4143
4067
  const k = theData.value.length;
4068
+ if (k === 0) {
4069
+ paragraph.broadcast = props2.status;
4070
+ }
4144
4071
  handleSetData({
4145
4072
  k,
4146
4073
  v: paragraph
@@ -4150,6 +4077,9 @@ var _sfc_main = defineComponent({
4150
4077
  if (!props2.textToSpeech) {
4151
4078
  return;
4152
4079
  }
4080
+ if (props2.separators.includes(paragraph.value)) {
4081
+ return;
4082
+ }
4153
4083
  const value = props2.render(paragraph.value);
4154
4084
  if (!value) {
4155
4085
  return;
@@ -4174,15 +4104,6 @@ var _sfc_main = defineComponent({
4174
4104
  return props2.source.substring(0, currentIndex.value);
4175
4105
  });
4176
4106
  const fulfilledTextValue = computed(() => {
4177
- if (theData.value.length === 0) {
4178
- return "......";
4179
- }
4180
- if (theData.value[0].broadcast === Broadcast.failed) {
4181
- return "";
4182
- }
4183
- if (theData.value[0].broadcast === Broadcast.pending) {
4184
- return "......";
4185
- }
4186
4107
  return theData.value.filter(
4187
4108
  (item) => item.status === ParagraphStatus.fulfilled || item.status === ParagraphStatus.pending
4188
4109
  ).map((item) => item.value).join("");
@@ -4226,7 +4147,7 @@ var _sfc_main = defineComponent({
4226
4147
  end,
4227
4148
  status: ParagraphStatus.initial,
4228
4149
  value,
4229
- broadcast: Broadcast.pending
4150
+ broadcast: Broadcast.play
4230
4151
  };
4231
4152
  addParagraph(paragraph);
4232
4153
  }
@@ -4260,113 +4181,51 @@ var _sfc_main = defineComponent({
4260
4181
  end,
4261
4182
  status: ParagraphStatus.initial,
4262
4183
  value,
4263
- broadcast: Broadcast.pending
4184
+ broadcast: Broadcast.play
4264
4185
  };
4265
4186
  addParagraph(paragraph);
4266
4187
  }
4267
4188
  }
4268
4189
  }
4269
- const isInterrupted = ref(false);
4270
- function interrupt() {
4271
- isInterrupted.value = true;
4272
- theData.value.forEach((item) => {
4273
- item.broadcast = Broadcast.stop;
4274
- });
4275
- emit("interrupt");
4190
+ function isPrevParagraphFulfilled(currentIndex2) {
4191
+ const last = theData.value[currentIndex2 - 1];
4192
+ return last ? last.status === ParagraphStatus.fulfilled : true;
4276
4193
  }
4277
- const currentParagraph = computed(() => {
4278
- return theData.value.find(
4279
- (item) => item.status === ParagraphStatus.pending
4280
- );
4194
+ function isParagraphEnabled(currentIndex2) {
4195
+ const isPrevFulfilled = isPrevParagraphFulfilled(currentIndex2);
4196
+ return isPrevFulfilled;
4197
+ }
4198
+ const currentPragraph = computed(() => {
4199
+ return theData.value.find((item) => item.status === ParagraphStatus.pending);
4281
4200
  });
4282
- watchEffect(() => {
4283
- if (!currentParagraph.value) {
4201
+ watch(() => props2.status, () => {
4202
+ if (!currentPragraph.value) {
4284
4203
  return;
4285
4204
  }
4286
- if (currentParagraph.value.broadcast === props2.status) {
4287
- return;
4205
+ if (currentPragraph.value.broadcast !== props2.status) {
4206
+ currentPragraph.value.broadcast = props2.status;
4288
4207
  }
4289
- props2.status === TickerStatus.play && (currentParagraph.value.broadcast = TickerStatus.play);
4290
- props2.status === TickerStatus.pause && (currentParagraph.value.broadcast = TickerStatus.pause);
4291
- props2.status === TickerStatus.stop && (currentParagraph.value.broadcast = TickerStatus.stop);
4292
- });
4293
- watchEffect(() => {
4294
- if (isInterrupted.value) {
4295
- return;
4208
+ if (props2.status === TickerStatus.stop) {
4209
+ theData.value.forEach((item) => {
4210
+ item.broadcast = Broadcast.stop;
4211
+ });
4296
4212
  }
4297
- const fulfilledCount = theData.value.filter((item) => item.status === ParagraphStatus.fulfilled).length;
4298
- const nextParagraph = theData.value.find(
4299
- (item) => item.status === ParagraphStatus.pending && item.broadcast === Broadcast.pending
4300
- );
4301
- if (fulfilledCount > 0 && nextParagraph) {
4302
- const currentlyPlaying = theData.value.find(
4303
- (item) => item.broadcast === Broadcast.playing || item.broadcast === Broadcast.play
4304
- );
4305
- if (!currentlyPlaying) {
4306
- nextParagraph.broadcast = Broadcast.play;
4307
- }
4213
+ }, { immediate: true });
4214
+ function handleParagraphStatus(para, v) {
4215
+ if (para.status === ParagraphStatus.pending) {
4216
+ emit("update:status", v);
4308
4217
  }
4309
- });
4310
- const isPaused = computed(() => {
4311
- return theData.value.some(
4312
- (item) => item.status === ParagraphStatus.pending && item.broadcast === Broadcast.paused
4313
- );
4314
- });
4315
- watchEffect(() => {
4316
- isPaused.value && emit("update:status", TickerStatus.paused);
4317
- });
4318
- const isBroadcasting = computed(() => {
4319
- return theData.value.some(
4320
- (item) => item.broadcast === Broadcast.playing
4321
- );
4322
- });
4323
- watchEffect(() => {
4324
- isBroadcasting.value && emit("update:broadcasting", isBroadcasting.value);
4325
- emit("update:status", TickerStatus.playing);
4326
- });
4327
- const isTypingFinished = ref(!!slots.paragraphs);
4328
- const isCompleted = computed(() => {
4329
- return isTypingFinished.value && props2.keepRead === false && theData.value.every(
4330
- (item) => item.status === ParagraphStatus.fulfilled
4331
- );
4332
- });
4333
- watchEffect(() => {
4334
- emit("update:completed", isCompleted.value);
4335
- isCompleted.value && emit("update:status", TickerStatus.stopped);
4336
- });
4337
- const isError = computed(() => {
4338
- return theData.value.some(
4339
- (item) => item.status === ParagraphStatus.rejected
4340
- );
4341
- });
4342
- watchEffect(() => {
4343
- emit("update:error", isError.value);
4344
- });
4345
- function isPrevParagraphFulfilled(currentIndex2) {
4346
- return theData.value[currentIndex2 - 1] ? [
4347
- ParagraphStatus.fulfilled
4348
- ].includes(theData.value[currentIndex2 - 1].status) : true;
4349
4218
  }
4350
- function isParagraphEnabled(currentIndex2) {
4351
- const isPrevFulfilled = isPrevParagraphFulfilled(currentIndex2);
4352
- return isPrevFulfilled;
4353
- }
4354
- expose({
4355
- interrupt
4356
- });
4357
4219
  return {
4358
4220
  theData,
4359
4221
  ParagraphStatus,
4360
4222
  fulfilledTextValue,
4361
- isPrevParagraphFulfilled,
4362
- isParagraphEnabled,
4363
4223
  processingParagraph,
4364
- isInterrupted,
4365
4224
  setData,
4366
4225
  Broadcast,
4367
- isPaused,
4368
- isTypingFinished,
4369
- currentParagraph
4226
+ isParagraphEnabled,
4227
+ TickerStatus,
4228
+ handleParagraphStatus
4370
4229
  };
4371
4230
  }
4372
4231
  });
@@ -4381,12 +4240,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
4381
4240
  [
4382
4241
  renderSlot(_ctx.$slots, "default", { paragraphs: _ctx.theData }, () => [
4383
4242
  createVNode(_component_VkTypingMarkdown, {
4384
- finished: _ctx.isTypingFinished,
4385
- "onUpdate:finished": _cache[0] || (_cache[0] = ($event) => _ctx.isTypingFinished = $event),
4386
4243
  source: _ctx.fulfilledTextValue,
4387
- delay: 120,
4388
- pause: _ctx.isInterrupted || _ctx.isPaused
4389
- }, null, 8, ["finished", "source", "pause"])
4244
+ pause: _ctx.status === _ctx.TickerStatus.stopped
4245
+ }, null, 8, ["source", "pause"])
4390
4246
  ]),
4391
4247
  (openBlock(true), createElementBlock(
4392
4248
  Fragment,
@@ -4405,12 +4261,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
4405
4261
  deferred
4406
4262
  }, () => [
4407
4263
  createVNode(_component_HowlerSpeechView, {
4408
- render: _ctx.render,
4409
- deferred,
4410
- data: item,
4411
- onSetData: ($event) => _ctx.setData(item, $event),
4412
- onLoad: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("paragraphLoad", $event))
4413
- }, null, 8, ["render", "deferred", "data", "onSetData"])
4264
+ status: item.broadcast,
4265
+ "onUpdate:status": [($event) => item.broadcast = $event, (e) => {
4266
+ _ctx.handleParagraphStatus(item, e);
4267
+ e === _ctx.TickerStatus.stopped && deferred.resolve(true);
4268
+ index === _ctx.theData.length - 1 && e === _ctx.TickerStatus.stopped && _ctx.$emit("complete");
4269
+ }],
4270
+ source: item.url,
4271
+ onError: ($event) => deferred.reject($event),
4272
+ onLoad: ($event) => _ctx.$emit("paragraphLoad", {
4273
+ data: item,
4274
+ deferred
4275
+ })
4276
+ }, null, 8, ["status", "onUpdate:status", "source", "onError", "onLoad"])
4414
4277
  ])
4415
4278
  ]),
4416
4279
  _: 2
@@ -102,12 +102,9 @@ export declare const props: {
102
102
  };
103
103
  export declare const emits: {
104
104
  setData: (e: SetDataEvent) => SetDataEvent;
105
- interrupt: null;
106
- 'update:broadcasting': (_: boolean) => boolean;
107
- 'update:completed': (_: boolean) => boolean;
108
- 'update:error': (_: boolean) => boolean;
109
105
  'update:status': (_: TickerStatus) => boolean;
110
106
  paragraphLoad: (_: ParagraphLoadEvent) => boolean;
107
+ complete: () => boolean;
111
108
  };
112
109
  export declare const paragraphProps: {
113
110
  data: {
@@ -1,97 +1,58 @@
1
+ import type { PropType } from 'vue';
2
+ import { TickerStatus } from '@vunk/shared/enum';
1
3
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
- data: {
3
- type: import("vue").PropType<import("./types").Paragraph>;
4
- default: () => {};
4
+ /**
5
+ * 语音资源
6
+ */
7
+ source: {
8
+ type: StringConstructor;
9
+ default: string;
5
10
  };
6
- deferred: {
7
- type: import("vue").PropType<import("@vunk/shared/promise").Deferred<any>>;
8
- required: true;
11
+ status: {
12
+ type: PropType<TickerStatus>;
13
+ default: TickerStatus;
9
14
  };
10
- render: {
11
- type: import("vue").PropType<(text: string) => string>;
12
- default: typeof import("./const").defaultRender;
13
- };
14
- }>, (() => null) | (() => JSX.Element), {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
- setData: (e: import("@vunk/core").SetDataEvent<keyof import("./types").Paragraph>) => import("@vunk/core").SetDataEvent<keyof import("./types").Paragraph>;
16
- load: (_: import("./types").ParagraphLoadEvent) => boolean;
15
+ }>, {
16
+ props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
17
+ /**
18
+ * 语音资源
19
+ */
20
+ source: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ status: {
25
+ type: PropType<TickerStatus>;
26
+ default: TickerStatus;
27
+ };
28
+ }>> & Readonly<{
29
+ "onUpdate:status"?: ((...args: any[]) => any) | undefined;
30
+ onError?: ((...args: any[]) => any) | undefined;
31
+ onLoad?: ((...args: any[]) => any) | undefined;
32
+ }> & {}>;
33
+ emit: ((event: "update:status", ...args: any[]) => void) & ((event: "error", ...args: any[]) => void) & ((event: "load", ...args: any[]) => void);
34
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
35
+ 'update:status': null;
36
+ load: null;
37
+ error: null;
17
38
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
- data: {
19
- type: import("vue").PropType<import("./types").Paragraph>;
20
- default: () => {};
21
- };
22
- deferred: {
23
- type: import("vue").PropType<import("@vunk/shared/promise").Deferred<any>>;
24
- required: true;
39
+ /**
40
+ * 语音资源
41
+ */
42
+ source: {
43
+ type: StringConstructor;
44
+ default: string;
25
45
  };
26
- render: {
27
- type: import("vue").PropType<(text: string) => string>;
28
- default: typeof import("./const").defaultRender;
46
+ status: {
47
+ type: PropType<TickerStatus>;
48
+ default: TickerStatus;
29
49
  };
30
50
  }>> & Readonly<{
31
- onSetData?: ((e: import("@vunk/core").SetDataEvent<keyof import("./types").Paragraph>) => any) | undefined;
32
- onLoad?: ((_: import("./types").ParagraphLoadEvent) => any) | undefined;
51
+ "onUpdate:status"?: ((...args: any[]) => any) | undefined;
52
+ onError?: ((...args: any[]) => any) | undefined;
53
+ onLoad?: ((...args: any[]) => any) | undefined;
33
54
  }>, {
34
- data: import("./types").Paragraph;
35
- render: (text: string) => string;
36
- }, {}, {
37
- SpeechError: import("vue").DefineComponent<{}, {
38
- readonly CloseBold: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
39
- readonly ElIcon: {
40
- new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
41
- readonly size: {
42
- readonly type: import("vue").PropType<string | number>;
43
- readonly required: false;
44
- readonly validator: ((val: unknown) => boolean) | undefined;
45
- __epPropKey: true;
46
- };
47
- readonly color: {
48
- readonly type: import("vue").PropType<string>;
49
- readonly required: false;
50
- readonly validator: ((val: unknown) => boolean) | undefined;
51
- __epPropKey: true;
52
- };
53
- }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
54
- P: {};
55
- B: {};
56
- D: {};
57
- C: {};
58
- M: {};
59
- Defaults: {};
60
- }, Readonly<import("vue").ExtractPropTypes<{
61
- readonly size: {
62
- readonly type: import("vue").PropType<string | number>;
63
- readonly required: false;
64
- readonly validator: ((val: unknown) => boolean) | undefined;
65
- __epPropKey: true;
66
- };
67
- readonly color: {
68
- readonly type: import("vue").PropType<string>;
69
- readonly required: false;
70
- readonly validator: ((val: unknown) => boolean) | undefined;
71
- __epPropKey: true;
72
- };
73
- }>>, {}, {}, {}, {}, {}>;
74
- __isFragment?: never;
75
- __isTeleport?: never;
76
- __isSuspense?: never;
77
- } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
78
- readonly size: {
79
- readonly type: import("vue").PropType<string | number>;
80
- readonly required: false;
81
- readonly validator: ((val: unknown) => boolean) | undefined;
82
- __epPropKey: true;
83
- };
84
- readonly color: {
85
- readonly type: import("vue").PropType<string>;
86
- readonly required: false;
87
- readonly validator: ((val: unknown) => boolean) | undefined;
88
- __epPropKey: true;
89
- };
90
- }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
91
- $slots: {
92
- default?(_: {}): any;
93
- };
94
- }) & import("vue").Plugin;
95
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
96
- }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
55
+ source: string;
56
+ status: TickerStatus;
57
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
97
58
  export default _default;