@vunk/plus 1.12.1 → 1.13.0

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 (174) hide show
  1. package/components/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  2. package/components/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  3. package/components/agent-chat-provider/index.cjs +1 -0
  4. package/components/agent-chat-provider/index.mjs +113 -187
  5. package/components/agent-chat-provider/src/index.vue.d.ts +3 -2
  6. package/components/avatar/index.cjs +1 -0
  7. package/components/avatar/index.mjs +25 -31
  8. package/components/avatar/src/index.vue.d.ts +40 -39
  9. package/components/broadcasting-markdown/__tests__/const.test.d.ts +1 -0
  10. package/components/broadcasting-markdown/__tests__/utils.test.d.ts +1 -0
  11. package/components/broadcasting-markdown/index.cjs +5 -0
  12. package/components/broadcasting-markdown/index.mjs +346 -4376
  13. package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +18 -24
  14. package/components/broadcasting-markdown/src/index.vue.d.ts +101 -51
  15. package/components/broadcasting-markdown/src/paragraph.vue.d.ts +17 -29
  16. package/components/broadcasting-markdown/src/speech-error.vue.d.ts +2 -59
  17. package/components/bubble-list/index.cjs +1 -0
  18. package/components/bubble-list/index.mjs +220 -302
  19. package/components/bubble-list/src/core/index.vue.d.ts +40 -885
  20. package/components/bubble-list/src/core/loading.vue.d.ts +3 -0
  21. package/components/bubble-list/src/index.vue.d.ts +29 -1321
  22. package/components/bubble-templates/index.cjs +1 -0
  23. package/components/bubble-templates/index.mjs +34 -49
  24. package/components/bubble-templates/src/index.vue.d.ts +3 -224
  25. package/components/chat-independent/index.cjs +1 -0
  26. package/components/chat-independent/index.mjs +105 -212
  27. package/components/chat-independent/src/index.vue.d.ts +20 -2712
  28. package/components/components.css +1 -0
  29. package/components/drawer/index.cjs +1 -0
  30. package/components/drawer/index.mjs +53 -94
  31. package/components/drawer/src/ctx.d.ts +22 -22
  32. package/components/drawer/src/index.vue.d.ts +84 -557
  33. package/components/index.cjs +1 -0
  34. package/components/index.d.ts +1 -0
  35. package/components/lottie-animation/index.cjs +1 -0
  36. package/components/lottie-animation/index.mjs +36 -55
  37. package/components/lottie-animation/src/index.vue.d.ts +3 -2
  38. package/components/metahuman-broadcasting/index.cjs +1 -0
  39. package/components/metahuman-broadcasting/index.mjs +89 -140
  40. package/components/metahuman-broadcasting/src/index.vue.d.ts +16 -718
  41. package/components/monaco-editor/index.cjs +1 -0
  42. package/components/monaco-editor/index.mjs +75 -73
  43. package/components/monaco-editor/src/ctx.d.ts +10 -4
  44. package/components/monaco-editor/src/index.vue.d.ts +17 -2
  45. package/components/monaco-environment/index.cjs +1 -0
  46. package/components/monaco-environment/index.mjs +23 -38
  47. package/components/monaco-environment/src/index.vue.d.ts +2 -1
  48. package/components/pixi-frame/index.cjs +1 -0
  49. package/components/pixi-frame/index.mjs +501 -1978
  50. package/components/pixi-frame/src/apng.vue.d.ts +17 -73
  51. package/components/pixi-frame/src/bitmap-generator.vue.d.ts +24 -66
  52. package/components/pixi-frame/src/bitmap.vue.d.ts +28 -80
  53. package/components/pixi-frame/src/buffer-image.vue.d.ts +29 -97
  54. package/components/pixi-frame/src/core.vue.d.ts +20 -75
  55. package/components/pixi-frame/src/index.vue.d.ts +302 -237
  56. package/components/pixi-frame/src/provider.vue.d.ts +12 -1
  57. package/components/pixi-frame/src/video.vue.d.ts +17 -71
  58. package/components/pixi-frame/src/view.vue.d.ts +4 -16
  59. package/components/recorder-button/index.cjs +1 -0
  60. package/components/recorder-button/index.mjs +140 -269
  61. package/components/recorder-button/src/index.vue.d.ts +67 -66
  62. package/components/routes-menu-content/index.cjs +1 -0
  63. package/components/routes-menu-content/index.mjs +150 -229
  64. package/components/routes-menu-content/src/index.vue.d.ts +27 -26
  65. package/components/routes-menu-content/src/item/core/index.vue.d.ts +27 -26
  66. package/components/routes-menu-content/src/item/index.vue.d.ts +27 -26
  67. package/components/scrollbar/index.cjs +1 -0
  68. package/components/scrollbar/index.mjs +288 -567
  69. package/components/scrollbar/src/bar.vue.d.ts +6 -133
  70. package/components/scrollbar/src/index.vue.d.ts +66 -337
  71. package/components/scrollbar/src/thumb.vue.d.ts +3 -80
  72. package/components/sender/index.cjs +1 -0
  73. package/components/sender/index.mjs +156 -285
  74. package/components/sender/src/SenderHeader.vue.d.ts +14 -221
  75. package/components/sender/src/index.vue.d.ts +16 -505
  76. package/components/speech-button/index.cjs +1 -0
  77. package/components/speech-button/index.mjs +98 -144
  78. package/components/speech-button/src/LoadingIcon.vue.d.ts +2 -1
  79. package/components/speech-button/src/RecordingIcon.vue.d.ts +2 -1
  80. package/components/speech-button/src/index.vue.d.ts +6 -5
  81. package/components/table-columns/index.cjs +1 -0
  82. package/components/table-columns/index.mjs +48 -78
  83. package/components/table-columns/src/ctx.d.ts +12 -12
  84. package/components/table-columns/src/el-ctx.d.ts +3 -3
  85. package/components/table-columns/src/index.vue.d.ts +28 -27
  86. package/components/tables-v1/index.cjs +1 -0
  87. package/components/tables-v1/index.mjs +99 -160
  88. package/components/tables-v1/src/ctx.d.ts +38 -38
  89. package/components/tables-v1/src/el-ctx.d.ts +7 -7
  90. package/components/tables-v1/src/index.vue.d.ts +111 -2266
  91. package/components/tables-v1-checkbox/index.cjs +1 -0
  92. package/components/tables-v1-checkbox/index.mjs +116 -4043
  93. package/components/tables-v1-checkbox/src/ctx.d.ts +36 -36
  94. package/components/tables-v1-checkbox/src/index.vue.d.ts +224 -2378
  95. package/components/text/index.cjs +1 -0
  96. package/components/text/index.mjs +70 -108
  97. package/components/text/src/ctx.d.ts +32 -32
  98. package/components/text/src/index.vue.d.ts +92 -1819
  99. package/components/thinking/index.cjs +1 -0
  100. package/components/thinking/index.mjs +127 -227
  101. package/components/thinking/src/index.vue.d.ts +23 -2045
  102. package/components/typing-markdown/index.cjs +1 -0
  103. package/components/typing-markdown/index.mjs +61 -201
  104. package/components/typing-markdown/src/index.vue.d.ts +3 -2
  105. package/components/vditor/index.cjs +1 -0
  106. package/components/vditor/index.mjs +121 -195
  107. package/components/vditor/src/ctx.d.ts +2 -2
  108. package/components/vditor/src/handle-fullscreen.vue.d.ts +3 -2
  109. package/components/vditor/src/handle-value.vue.d.ts +3 -2
  110. package/components/vditor/src/index.vue.d.ts +5 -4
  111. package/components/xgplayer/index.cjs +1 -0
  112. package/components/xgplayer/index.mjs +49 -90
  113. package/components/xgplayer/src/core.vue.d.ts +13 -18
  114. package/components/xgplayer/src/index.vue.d.ts +13 -67
  115. package/composables/el-breakpoints/index.cjs +1 -0
  116. package/composables/el-breakpoints/index.d.ts +10 -10
  117. package/composables/el-breakpoints/index.mjs +10 -12
  118. package/composables/index.cjs +1 -0
  119. package/composables/index.d.ts +1 -0
  120. package/composables/recorder/index.cjs +1 -0
  121. package/composables/recorder/index.mjs +9172 -14803
  122. package/element/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  123. package/element/bubble/index.cjs +3 -0
  124. package/element/bubble/index.d.ts +1 -1
  125. package/element/bubble/index.mjs +1 -1
  126. package/element/bubble/src/index.vue.d.ts +22 -22
  127. package/element/index.css +1 -1
  128. package/element/thinking/index.cjs +1 -0
  129. package/element/thinking/index.d.ts +1 -1
  130. package/element/thinking/index.mjs +1 -1
  131. package/element/thinking/src/index.vue.d.ts +26 -26
  132. package/element/thinking/src/types.d.ts +10 -0
  133. package/icons/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  134. package/icons/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  135. package/icons/end/index.cjs +1 -0
  136. package/icons/end/index.mjs +21 -26
  137. package/icons/end/src/index.vue.d.ts +3 -0
  138. package/icons/keyboard/index.cjs +1 -0
  139. package/icons/keyboard/index.mjs +21 -26
  140. package/icons/keyboard/src/index.vue.d.ts +3 -0
  141. package/icons/start/index.cjs +1 -0
  142. package/icons/start/index.mjs +21 -26
  143. package/icons/start/src/index.vue.d.ts +3 -0
  144. package/icons/voice/index.cjs +1 -0
  145. package/icons/voice/index.mjs +26 -44
  146. package/icons/voice/src/index.vue.d.ts +2 -3
  147. package/index.css +2 -558
  148. package/index.d.ts +1 -0
  149. package/package.json +78 -87
  150. package/shared/data/index.cjs +1 -0
  151. package/shared/data/index.mjs +16 -22
  152. package/shared/types/index.cjs +1 -0
  153. package/shared/types/index.d.ts +1 -0
  154. package/components/LinkOutlined.mjs +0 -1321
  155. package/components/_commonjsHelpers.mjs +0 -7
  156. package/components/_plugin-vue_export-helper.mjs +0 -9
  157. package/components/bubble-list/index.css +0 -70
  158. package/components/bubble-templates/index.css +0 -4
  159. package/components/chat-independent/index.css +0 -47
  160. package/components/drawer/index.css +0 -124
  161. package/components/index2.mjs +0 -78
  162. package/components/lottie-animation/index.css +0 -4
  163. package/components/monaco-editor/index.css +0 -4
  164. package/components/pixi-frame/index.css +0 -4
  165. package/components/recorder-button/index.css +0 -69
  166. package/components/sender/index.css +0 -22
  167. package/components/speech-button/index.css +0 -10
  168. package/components/tables-v1/index.css +0 -7
  169. package/components/tables-v1-checkbox/index.css +0 -8
  170. package/components/thinking/index.css +0 -125
  171. package/components/typing-markdown/index.css +0 -31
  172. package/components/vditor/index.css +0 -12
  173. package/components/xgplayer/index.css +0 -1
  174. package/icons/_plugin-vue_export-helper.mjs +0 -9
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@vueuse/core"),g=require("monaco-editor"),e=require("vue"),m=require("@vunk/core/shared/utils-vue"),h=require("../_plugin-vue_export-helper-BHFhmbuH.js"),u={modelValue:{type:String,default:""},defaultOptions:{type:Object,default:()=>({})},readOnly:{type:Boolean,default:!1},autoHeight:{type:Boolean,default:!1}},v=m.bindPropsFactory(u),c={"update:modelValue":null,load:o=>!0},b=m.onEmitsFactory(c),O=Object.freeze(Object.defineProperty({__proto__:null,createBindProps:v,createOnEmits:b,emits:c,props:u},Symbol.toStringTag,{value:"Module"})),V=e.defineComponent({name:"VkMonacoEditor",props:u,emits:c,setup(o,{emit:l}){const a=e.ref(),n=e.ref(""),s=e.computed(()=>{if(!(!o.autoHeight||!n.value))return{height:n.value}});return e.onMounted(()=>{const t=g.editor.create(a.value,o.defaultOptions);l("load",t);function d(){if(!o.autoHeight)return;const i=`${Math.ceil(t.getContentHeight())}px`;n.value!==i&&(n.value=i,e.nextTick(()=>{t.layout()}))}const f=y.watchPausable(()=>o.modelValue,i=>{t.setValue(i)},{immediate:!0});t.onDidChangeModelContent(()=>{f.pause(),l("update:modelValue",t.getValue()),e.nextTick(()=>{f.resume()})});const _=t.onDidContentSizeChange(d);e.watchEffect(d),e.watchEffect(()=>{t.updateOptions({readOnly:o.readOnly})});const p=new ResizeObserver(()=>{t.layout()});p.observe(a.value),e.onBeforeUnmount(()=>{_.dispose(),p.disconnect(),t.dispose()})}),{editorNode:a,editorStyle:s}}});function M(o,l,a,n,s,t){return e.openBlock(),e.createElementBlock("div",{ref:"editorNode",class:"vk-monaco-editor",style:e.normalizeStyle(o.editorStyle)},null,4)}const r=h._export_sfc(V,[["render",M]]),E=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));r.install=o=>{o.component(r.name||"VkMonacoEditor",r)};exports.VkMonacoEditor=r;exports._VkMonacoEditorCtx=O;exports.__VkMonacoEditor=E;exports.default=r;
@@ -1,10 +1,9 @@
1
- import { watchPausable } from '@vueuse/core';
2
- import { editor } from 'monaco-editor';
3
- import { defineComponent, ref, onMounted, nextTick, watchEffect, onBeforeUnmount, openBlock, createElementBlock } from 'vue';
4
- import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
5
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
6
-
7
- const props = {
1
+ import { watchPausable as g } from "@vueuse/core";
2
+ import { editor as h } from "monaco-editor";
3
+ import { defineComponent as b, ref as p, computed as v, onMounted as O, nextTick as m, watchEffect as y, onBeforeUnmount as V, createElementBlock as M, openBlock as S, normalizeStyle as k } from "vue";
4
+ import { bindPropsFactory as E, onEmitsFactory as x } from "@vunk/core/shared/utils-vue";
5
+ import { _ as z } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
6
+ const i = {
8
7
  modelValue: {
9
8
  type: String,
10
9
  default: ""
@@ -15,88 +14,91 @@ const props = {
15
14
  },
16
15
  readOnly: {
17
16
  type: Boolean,
18
- default: false
17
+ default: !1
18
+ },
19
+ autoHeight: {
20
+ type: Boolean,
21
+ default: !1
19
22
  }
20
- };
21
- const createBindProps = bindPropsFactory(props);
22
- const emits = {
23
- "update:modelValue": null
24
- };
25
- const createOnEmits = onEmitsFactory(emits);
26
-
27
- var ctx = /*#__PURE__*/Object.freeze({
23
+ }, C = E(i), c = {
24
+ "update:modelValue": null,
25
+ load: (t) => !0
26
+ }, H = x(c), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28
27
  __proto__: null,
29
- createBindProps: createBindProps,
30
- createOnEmits: createOnEmits,
31
- emits: emits,
32
- props: props
33
- });
34
-
35
- var _sfc_main = defineComponent({
28
+ createBindProps: C,
29
+ createOnEmits: H,
30
+ emits: c,
31
+ props: i
32
+ }, Symbol.toStringTag, { value: "Module" })), j = b({
36
33
  name: "VkMonacoEditor",
37
- props,
38
- emits,
39
- setup(props2, { emit }) {
40
- const editorNode = ref();
41
- onMounted(() => {
42
- const editor$1 = editor.create(editorNode.value, props2.defaultOptions);
43
- const subjectModelValueWatcher = watchPausable(
44
- () => props2.modelValue,
45
- (v) => {
46
- editor$1.setValue(v);
34
+ props: i,
35
+ emits: c,
36
+ setup(t, { emit: r }) {
37
+ const n = p(), o = p(""), s = v(() => {
38
+ if (!(!t.autoHeight || !o.value))
39
+ return {
40
+ height: o.value
41
+ };
42
+ });
43
+ return O(() => {
44
+ const e = h.create(n.value, t.defaultOptions);
45
+ r("load", e);
46
+ function u() {
47
+ if (!t.autoHeight)
48
+ return;
49
+ const a = `${Math.ceil(e.getContentHeight())}px`;
50
+ o.value !== a && (o.value = a, m(() => {
51
+ e.layout();
52
+ }));
53
+ }
54
+ const d = g(
55
+ () => t.modelValue,
56
+ (a) => {
57
+ e.setValue(a);
47
58
  },
48
59
  {
49
- immediate: true
60
+ immediate: !0
50
61
  }
51
62
  );
52
- editor$1.onDidChangeModelContent(() => {
53
- subjectModelValueWatcher.pause();
54
- emit("update:modelValue", editor$1.getValue());
55
- nextTick(() => {
56
- subjectModelValueWatcher.resume();
63
+ e.onDidChangeModelContent(() => {
64
+ d.pause(), r("update:modelValue", e.getValue()), m(() => {
65
+ d.resume();
57
66
  });
58
67
  });
59
- watchEffect(() => {
60
- editor$1.updateOptions({
61
- readOnly: props2.readOnly
68
+ const _ = e.onDidContentSizeChange(u);
69
+ y(u), y(() => {
70
+ e.updateOptions({
71
+ readOnly: t.readOnly
62
72
  });
63
73
  });
64
- const resizeObserver = new ResizeObserver(() => {
65
- editor$1.layout();
74
+ const f = new ResizeObserver(() => {
75
+ e.layout();
66
76
  });
67
- resizeObserver.observe(editorNode.value);
68
- onBeforeUnmount(() => {
69
- resizeObserver.disconnect();
70
- editor$1.dispose();
77
+ f.observe(n.value), V(() => {
78
+ _.dispose(), f.disconnect(), e.dispose();
71
79
  });
72
- });
73
- return {
74
- editorNode
80
+ }), {
81
+ editorNode: n,
82
+ editorStyle: s
75
83
  };
76
84
  }
77
85
  });
78
-
79
- const _hoisted_1 = {
80
- ref: "editorNode",
81
- class: "vk-monaco-editor"
82
- };
83
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
84
- return openBlock(), createElementBlock(
85
- "div",
86
- _hoisted_1,
87
- null,
88
- 512
89
- /* NEED_PATCH */
90
- );
86
+ function B(t, r, n, o, s, e) {
87
+ return S(), M("div", {
88
+ ref: "editorNode",
89
+ class: "vk-monaco-editor",
90
+ style: k(t.editorStyle)
91
+ }, null, 4);
91
92
  }
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"]]);
93
-
94
- var types = /*#__PURE__*/Object.freeze({
93
+ const l = /* @__PURE__ */ z(j, [["render", B]]), N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
95
94
  __proto__: null
96
- });
97
-
98
- VkMonacoEditor.install = (app) => {
99
- app.component(VkMonacoEditor.name || "VkMonacoEditor", VkMonacoEditor);
95
+ }, Symbol.toStringTag, { value: "Module" }));
96
+ l.install = (t) => {
97
+ t.component(l.name || "VkMonacoEditor", l);
98
+ };
99
+ export {
100
+ l as VkMonacoEditor,
101
+ F as _VkMonacoEditorCtx,
102
+ N as __VkMonacoEditor,
103
+ l as default
100
104
  };
101
-
102
- export { VkMonacoEditor, ctx as _VkMonacoEditorCtx, types as __VkMonacoEditor, VkMonacoEditor as default };
@@ -1,5 +1,5 @@
1
- import { PropType } from 'vue';
2
- import { editor } from 'monaco-editor';
1
+ import type { editor } from 'monaco-editor';
2
+ import type { PropType } from 'vue';
3
3
  export declare const props: {
4
4
  modelValue: {
5
5
  type: StringConstructor;
@@ -13,11 +13,17 @@ export declare const props: {
13
13
  type: BooleanConstructor;
14
14
  default: boolean;
15
15
  };
16
+ autoHeight: {
17
+ type: BooleanConstructor;
18
+ default: boolean;
19
+ };
16
20
  };
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]; }>;
21
+ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"modelValue", keyof T2> | Extract<"readOnly", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"autoHeight", 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> | Exclude<Extract<"autoHeight", keyof T2>, KE> : Extract<"modelValue", keyof T2> | Extract<"readOnly", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"autoHeight", keyof T2>]: { [k in Extract<"modelValue", keyof T2> | Extract<"readOnly", keyof T2> | Extract<"defaultOptions", keyof T2> | Extract<"autoHeight", keyof T2>]: T2[k]; }[P]; }>;
18
22
  export declare const emits: {
19
23
  'update:modelValue': null;
24
+ load: (_editor: editor.IStandaloneCodeEditor) => boolean;
20
25
  };
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"]: {
26
+ export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("load" | "update:modelValue")[]>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"load", KE> | Exclude<"update:modelValue", KE> : "load" | "update:modelValue"]: {
22
27
  'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
28
+ load: (...e: import("@vunk/core").RestParameters<T2>) => void;
23
29
  }[P]; };
@@ -1,6 +1,8 @@
1
1
  import type { Ref } from 'vue';
2
2
  import { editor as mEditor } from 'monaco-editor';
3
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
5
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
6
  modelValue: {
5
7
  type: StringConstructor;
6
8
  default: string;
@@ -13,10 +15,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
13
15
  type: BooleanConstructor;
14
16
  default: boolean;
15
17
  };
18
+ autoHeight: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
16
22
  }>, {
17
23
  editorNode: Ref<HTMLDivElement, HTMLDivElement>;
24
+ editorStyle: import("vue").ComputedRef<{
25
+ height: string;
26
+ } | undefined>;
18
27
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
28
  'update:modelValue': null;
29
+ load: (_editor: mEditor.IStandaloneCodeEditor) => boolean;
20
30
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
31
  modelValue: {
22
32
  type: StringConstructor;
@@ -30,11 +40,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
30
40
  type: BooleanConstructor;
31
41
  default: boolean;
32
42
  };
43
+ autoHeight: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
33
47
  }>> & Readonly<{
48
+ onLoad?: ((_editor: mEditor.IStandaloneCodeEditor) => any) | undefined;
34
49
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
35
50
  }>, {
36
51
  modelValue: string;
37
52
  readOnly: boolean;
38
53
  defaultOptions: mEditor.IStandaloneEditorConstructionOptions;
54
+ autoHeight: boolean;
39
55
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
40
- export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("monaco-editor/esm/vs/editor/editor.worker?worker"),s=require("monaco-editor/esm/vs/language/css/css.worker?worker"),i=require("monaco-editor/esm/vs/language/html/html.worker?worker"),c=require("monaco-editor/esm/vs/language/json/json.worker?worker"),u=require("monaco-editor/esm/vs/language/typescript/ts.worker?worker"),o=require("vue"),a=require("../_plugin-vue_export-helper-BHFhmbuH.js"),p=o.defineComponent({name:"VkMonacoEnvironment",setup(){return globalThis.MonacoEnvironment={getWorker(n,e){return e==="json"?new c:e==="css"||e==="scss"||e==="less"?new s:e==="html"||e==="handlebars"||e==="razor"?new i:["typescript","javascript"].includes(e)?new u:new t}},{}}});function _(n,e,m,f,k,l){return o.renderSlot(n.$slots,"default")}const r=a._export_sfc(p,[["render",_]]),d=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));r.install=n=>{n.component(r.name||"VkMonacoEnvironment",r)};exports.VkMonacoEnvironment=r;exports.__VkMonacoEnvironment=d;exports.default=r;
@@ -1,46 +1,31 @@
1
- import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
2
- import CssWorker from 'monaco-editor/esm/vs/language/css/css.worker?worker';
3
- import HtmlWorker from 'monaco-editor/esm/vs/language/html/html.worker?worker';
4
- import JsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker';
5
- import TsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker';
6
- import { defineComponent, renderSlot } from 'vue';
7
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
8
-
9
- var _sfc_main = defineComponent({
1
+ import e from "monaco-editor/esm/vs/editor/editor.worker?worker";
2
+ import t from "monaco-editor/esm/vs/language/css/css.worker?worker";
3
+ import s from "monaco-editor/esm/vs/language/html/html.worker?worker";
4
+ import i from "monaco-editor/esm/vs/language/json/json.worker?worker";
5
+ import m from "monaco-editor/esm/vs/language/typescript/ts.worker?worker";
6
+ import { defineComponent as c, renderSlot as p } from "vue";
7
+ import { _ as f } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
8
+ const a = c({
10
9
  name: "VkMonacoEnvironment",
11
10
  setup() {
12
- globalThis.MonacoEnvironment = {
13
- getWorker(_, label) {
14
- if (label === "json") {
15
- return new JsonWorker();
16
- }
17
- if (label === "css" || label === "scss" || label === "less") {
18
- return new CssWorker();
19
- }
20
- if (label === "html" || label === "handlebars" || label === "razor") {
21
- return new HtmlWorker();
22
- }
23
- if (["typescript", "javascript"].includes(label)) {
24
- return new TsWorker();
25
- }
26
- return new EditorWorker();
11
+ return globalThis.MonacoEnvironment = {
12
+ getWorker(o, r) {
13
+ return r === "json" ? new i() : r === "css" || r === "scss" || r === "less" ? new t() : r === "html" || r === "handlebars" || r === "razor" ? new s() : ["typescript", "javascript"].includes(r) ? new m() : new e();
27
14
  }
28
- };
29
- return {};
15
+ }, {};
30
16
  }
31
17
  });
32
-
33
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
34
- return renderSlot(_ctx.$slots, "default");
18
+ function u(o, r, _, d, k, v) {
19
+ return p(o.$slots, "default");
35
20
  }
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"]]);
37
-
38
- var types = /*#__PURE__*/Object.freeze({
21
+ const n = /* @__PURE__ */ f(a, [["render", u]]), j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
39
22
  __proto__: null
40
- });
41
-
42
- VkMonacoEnvironment.install = (app) => {
43
- app.component(VkMonacoEnvironment.name || "VkMonacoEnvironment", VkMonacoEnvironment);
23
+ }, Symbol.toStringTag, { value: "Module" }));
24
+ n.install = (o) => {
25
+ o.component(n.name || "VkMonacoEnvironment", n);
26
+ };
27
+ export {
28
+ n as VkMonacoEnvironment,
29
+ j as __VkMonacoEnvironment,
30
+ n as default
44
31
  };
45
-
46
- export { VkMonacoEnvironment, types as __VkMonacoEnvironment, VkMonacoEnvironment as default };
@@ -1,2 +1,3 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: typeof __VLS_export;
2
2
  export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),r=require("@vunk/shared/enum"),D=require("@vunk/shared/promise"),ee=require("apng-js"),x=require("pixi.js"),O=require("@vunk/shared/object"),z=require("@vunk/core/composables"),te=require("../_plugin-vue_export-helper-BHFhmbuH.js"),E={url:{type:String,requierd:!1},data:{type:Array,default:()=>[]},loop:{type:Boolean,default:!1},status:{type:String,default:r.TickerStatus.pending},frameRate:{type:Number,default:25},label:{type:String,default:""},resize:{type:Function,default:void 0},prerender:{type:Boolean,default:!1},visible:{type:Boolean,default:!0}},$={"update:status":null,"update:data":null,setData:null},L=Symbol("appInjectKey");function ae(){const n=new x.Application,m=new D.Deferred,e={whenDef:m,when:()=>m.promise};return t.provide(L,{application:n,context:e}),{application:n,context:e}}function N(){const n=t.inject(L);if(!n)throw new Error("Pixi app not provided");return n}function I(n){const m=n.autoResize??!0,e=n.resize??v,{application:a,context:_}=N(),c=new x.Sprite;a.stage.addChild(c),t.watchEffect(()=>{c.visible=n.visible??!0}),t.watchEffect(()=>{n.label&&(c.label=n.label)}),m&&_.when().then(k=>{c.texture&&(h(),k.renderer.on("resize",h))});function h(){if(!a.renderer?.screen)return;const k=c.texture._meta;e({application:a,sprite:c,meta:k})}t.onBeforeUnmount(()=>{a.renderer.off("resize",h),a.stage.removeChild(c)});function v(){const k=a.screen.width/c.texture.width,s=a.screen.height/c.texture.height,T=Math.min(k,s);c.scale.set(T),c.x=(a.screen.width-c.width)/2,c.y=(a.screen.height-c.height)/2}return{sprite:c,resizeSprite:h,application:a}}const G=t.defineComponent({__name:"apng",props:{...E,url:{type:String,required:!0}},emits:$,setup(n,{emit:m}){const e=n,a=m,_=t.useId(),c=u=>`${_}-apng-frame-${u}`,{sprite:h,resizeSprite:v}=I(e),k=t.ref([]),s=t.ref(0),T=t.ref(!1),g=t.ref(""),l=new Map;let i=null,d=null,F=null;t.onMounted(()=>b(e.url));function C(u,w){return d||(d=document.createElement("canvas"),F=d.getContext("2d",{willReadFrequently:!0})),(d.width!==u||d.height!==w)&&(d.width=u,d.height=w),{canvas:d,ctx:F}}async function b(u){try{g.value="",T.value=!1,await S();const w=await fetch(u);if(!w.ok)throw new Error(`加载APNG失败: ${w.status}`);const A=await w.arrayBuffer(),P=ee(A);if(P instanceof Error)throw new TypeError(`APNG解析失败: ${P.message}`);const{canvas:B,ctx:q}=C(P.width,P.height),X=P.frames.map(async(M,U)=>{q.clearRect(0,0,B.width,B.height),await M.createImage();const J=M.imageElement;q.drawImage(J,M.left,M.top);const Q=q.getImageData(0,0,B.width,B.height),V=c(U);l.set(V,void 0),q.putImageData(Q,0,0);const Z=B.toDataURL();x.Assets.add({alias:V,src:Z});const j=await x.Assets.load(V);return l.set(V,j),U===0&&(h.texture=j,v()),V});k.value=await Promise.all(X),T.value=!0}catch(w){console.error("加载APNG失败:",w),g.value=w instanceof Error?w.message:"加载APNG失败",a("update:status",r.TickerStatus.stopped)}}function y(){i===null&&(i=window.setInterval(()=>{if(k.value.length===0||e.status!==r.TickerStatus.playing)return;const u=l.get(c(s.value));if(u){const w=s.value-1;w>=0&&!e.loop&&Promise.resolve().then(()=>D.sleep(500)).then(()=>{x.Assets.unload(c(w)),l.delete(c(w))}),h.texture=u,v(),s.value=e.loop?(s.value+1)%k.value.length:s.value+1}else e.loop||a("update:status",r.TickerStatus.paused)},1e3/e.frameRate))}function p(){!T.value||k.value.length<=1||(a("update:status",r.TickerStatus.playing),y())}function o(){i!==null&&(clearInterval(i),i=null),a("update:status",r.TickerStatus.paused)}function f(){i!==null&&(clearInterval(i),i=null),s.value=0;const u=l.get(c(0));u&&(h.texture=u,v()),a("update:status",r.TickerStatus.stopped)}async function S(){i!==null&&(clearInterval(i),i=null);const u=[];for(const[w,A]of l)A&&A!==x.Texture.EMPTY&&u.push(x.Assets.unload(w));await Promise.all(u),l.clear(),k.value=[],s.value=0,T.value=!1,g.value="",d&&(d.width=0,d.height=0)}return t.watchEffect(()=>{switch(e.status){case r.TickerStatus.play:p();break;case r.TickerStatus.pause:o();break;case r.TickerStatus.stop:f();break}}),t.onBeforeUnmount(async()=>{await S(),d=null,F=null}),(u,w)=>t.renderSlot(u.$slots,"default")}}),ne=t.defineComponent({__name:"bitmap-generator",props:{...O.pickObject(E,{excludes:["loop"]}),generator:{type:Object,required:!0}},emits:{"update:status":null,load:n=>n},setup(n,{emit:m}){const e=n,a=m,{sprite:_,resizeSprite:c,application:h}=I(e),v=new x.Texture({dynamic:!0});_.texture=v;function k(i){v.source.destroy();const d=new x.ImageSource({resource:i});v.source=d,v.update(),c()}a("load",{application:h,sprite:_}),t.watch(()=>e.status,i=>{i===r.TickerStatus.play&&T(),i===r.TickerStatus.pause&&g(),i===r.TickerStatus.stop&&l()},{immediate:!0});function s(){e.status===r.TickerStatus.playing&&e.generator.next().then(({value:i,done:d})=>{if(d)return a("update:status",r.TickerStatus.stopped);k(i)})}function T(){h.ticker.minFPS=e.frameRate,h.ticker.maxFPS=e.frameRate,a("update:status",r.TickerStatus.playing),h.ticker.add(s)}function g(){h.ticker.remove(s),a("update:status",r.TickerStatus.paused)}function l(){h.ticker.remove(s),a("update:status",r.TickerStatus.stopped)}return t.onBeforeUnmount(()=>{l(),v.destroy()}),(i,d)=>t.renderSlot(i.$slots,"default")}}),K=t.defineComponent({__name:"bitmap",props:{...O.pickObject(E,{excludes:["loop"]}),data:{type:void 0,required:!0},frameIndex:{type:Number}},emits:{...$,load:n=>n,"update:frameIndex":null,notFound:n=>!0},setup(n,{emit:m}){const e=n,a=m,{sprite:_,resizeSprite:c,application:h}=I(e),v=new x.Texture({dynamic:!0});_.texture=v;function k(o){v.source?.resource?.close(),v.source?.destroy();const f=new x.ImageSource({resource:o});v.source=f,v.update(),c()}a("load",{application:h,sprite:_});const s=z.useModelComputed({default:0,key:"frameIndex"},e,a),T=t.ref(-1);function g(o){o<=T.value||(T.value=o,D.sleep(0).then(()=>{a("setData",{k:o,v:null})}))}let l=null,i=0,d=0,F=0;function C(){if(l!==null)return;i=performance.now(),F=i,d=0;function o(){const S=performance.now(),u=1e3/e.frameRate,w=S-i;if(w>=u){i=S-w%u,f(),d++;const A=S-F;if(A>=1e3){const P=Math.round(d*1e3/A);console.log(`[Bitmap] FPS: ${P}`),d=0,F=S}}e.status===r.TickerStatus.playing?l=requestAnimationFrame(o):l=null}function f(){if(e.data.length===0||e.status!==r.TickerStatus.playing)return;const S=e.data[s.value];if(S){const u=s.value-1;u>=0&&g(u),k(S),s.value=s.value+1}else console.warn(`Bitmap for index ${s.value} not found. Ensure the data is loaded.`),a("notFound",s.value)}l=requestAnimationFrame(o)}t.watchEffect(()=>{e.prerender&&s.value===0&&e.data.length>0&&e.data[0]&&k(e.data[0])}),t.watch(()=>e.status,o=>{o===r.TickerStatus.play&&b(),o===r.TickerStatus.pause&&y(),o===r.TickerStatus.stop&&p()},{immediate:!0});function b(){e.data.length>0?(a("update:status",r.TickerStatus.playing),C()):a("update:status",r.TickerStatus.stopped)}function y(){a("update:status",r.TickerStatus.paused)}function p(){a("update:status",r.TickerStatus.stopped),l!==null&&(cancelAnimationFrame(l),l=null),a("update:data",[]),s.value=0,T.value=-1}return t.onBeforeUnmount(()=>{p(),v.destroy()}),(o,f)=>t.renderSlot(o.$slots,"default")}}),re=t.defineComponent({__name:"buffer-image",props:{...O.pickObject(E,{excludes:["loop"]}),data:{type:Array,required:!0},format:{type:String,default:"rgba8unorm"},frameIndex:{type:Number},height:{type:Number,required:!0},width:{type:Number,required:!0}},emits:{...$,load:n=>n,"update:frameIndex":null,notFound:n=>!0},setup(n,{emit:m}){const e=n,a=m,{sprite:_,resizeSprite:c,application:h}=I(e),v=new x.Texture({dynamic:!0});_.texture=v;function k(o){v.source?.destroy();const f=new x.BufferImageSource({resource:o,height:e.height,width:e.width,format:e.format});v.source=f,v.update(),c()}a("load",{application:h,sprite:_});const s=z.useModelComputed({default:0,key:"frameIndex"},e,a),T=t.ref(-1);function g(o){o<=T.value||(T.value=o,D.sleep(0).then(()=>{a("setData",{k:o,v:null})}))}let l=null,i=0,d=0,F=0;function C(){if(l!==null)return;i=performance.now(),F=i,d=0;function o(){const S=performance.now(),u=1e3/e.frameRate,w=S-i;if(w>=u){i=S-w%u,f(),d++;const A=S-F;if(A>=1e3){const P=Math.round(d*1e3/A);console.log(`[Bitmap] FPS: ${P}`),d=0,F=S}}e.status===r.TickerStatus.playing?l=requestAnimationFrame(o):l=null}function f(){if(e.data.length===0||e.status!==r.TickerStatus.playing)return;const S=e.data[s.value];if(S){const u=s.value-1;u>=0&&g(u),k(S),s.value=s.value+1}else console.warn(`Bitmap for index ${s.value} not found. Ensure the data is loaded.`),a("notFound",s.value)}l=requestAnimationFrame(o)}t.watchEffect(()=>{e.prerender&&s.value===0&&e.data.length>0&&e.data[0]&&k(e.data[0])}),t.watch(()=>e.status,o=>{o===r.TickerStatus.play&&b(),o===r.TickerStatus.pause&&y(),o===r.TickerStatus.stop&&p()},{immediate:!0});function b(){e.data.length>0?(a("update:status",r.TickerStatus.playing),C()):a("update:status",r.TickerStatus.stopped)}function y(){a("update:status",r.TickerStatus.paused)}function p(){a("update:status",r.TickerStatus.stopped),l!==null&&(cancelAnimationFrame(l),l=null),a("update:data",[]),s.value=0,T.value=-1}return t.onBeforeUnmount(()=>{p(),v.destroy()}),(o,f)=>t.renderSlot(o.$slots,"default")}}),se=t.defineComponent({__name:"core",props:{...E,data:{type:void 0,required:!0},frameIndex:{type:Number}},emits:{...$,load:n=>n,"update:frameIndex":null,notFound:n=>!0},setup(n,{emit:m}){const e=n,a=m,_=t.useId(),c=p=>`${_}-${p}`,{sprite:h,resizeSprite:v,application:k}=I(e),s=new Map,T=t.ref(0),g=t.computed(()=>e.data.slice(T.value));t.watchEffect(()=>{for(const p in g.value){const o=+p+T.value,f=`${_}-${o}`,S=typeof g.value[p]=="string"?g.value[p]:g.value[p]?.src;S&&(s.has(f)||(x.Assets.add({alias:f,src:S,loadParser:"loadTextures"}),s.set(f,void 0),x.Assets.load(f).then(u=>{u._meta=g.value[p],s.set(f,u),e.prerender&&o===0&&(h.texture=u,v())})))}}),a("load",{application:k,sprite:h});const l=z.useModelComputed({default:0,key:"frameIndex"},e,a);let i=null,d=0;function F(){if(i!==null)return;d=performance.now();function p(){const f=performance.now(),S=1e3/e.frameRate,u=f-d;u>=S&&(d=f-u%S,o()),e.status===r.TickerStatus.playing?i=requestAnimationFrame(p):i=null}function o(){if(e.data.length===0||e.status!==r.TickerStatus.playing)return;const f=s.get(c(l.value));if(f){const S=h.texture,u=l.value-1;S&&u>=0&&!e.loop&&Promise.resolve(D.sleep(500)).then(()=>x.Assets.unload(c(u))).then(()=>{s.set(c(u),void 0),a("setData",{k:u,v:""}),T.value=u}),h.texture=f,v(),l.value=e.loop?(l.value+1)%e.data.length:l.value+1}else console.warn(`Texture for index ${l.value} not found. Ensure the texture is loaded.`),a("notFound",l.value),e.loop||a("update:status",r.TickerStatus.paused)}i=requestAnimationFrame(p)}t.watch(()=>e.status,p=>{p===r.TickerStatus.play&&C(),p===r.TickerStatus.pause&&b(),p===r.TickerStatus.stop&&y()},{immediate:!0});function C(){e.data.length>0?(a("update:status",r.TickerStatus.playing),F()):a("update:status",r.TickerStatus.stopped)}function b(){a("update:status",r.TickerStatus.paused)}function y(){a("update:status",r.TickerStatus.stopped),i!==null&&(cancelAnimationFrame(i),i=null),a("update:data",[]),s.clear(),l.value=0}return t.onBeforeUnmount(()=>{Array.from(s.entries()).forEach(([o,f])=>{f&&x.Assets.unload(o)}),y()}),(p,o)=>t.renderSlot(p.$slots,"default")}}),H=t.defineComponent({__name:"provider",setup(n){return ae(),(m,e)=>t.renderSlot(m.$slots,"default")}}),Y=t.defineComponent({__name:"video",props:{...E,url:{type:String,required:!0}},emits:$,setup(n,{emit:m}){const e=n,a=m,_=t.useId(),c=()=>`${_}-video`,{sprite:h,resizeSprite:v}=I(e),k=t.ref(),s=t.computed(()=>{if(k.value?.source&&k.value.source.resource){const y=k.value.source.resource;if(y instanceof HTMLVideoElement)return y}return null}),T=z.useDeferred(),g=t.ref("");T.promise.then(()=>{e.status===r.TickerStatus.play&&F()}),t.watchEffect(()=>{s.value&&(s.value.loop=e.loop)}),t.onMounted(()=>l(e.url));async function l(y){try{g.value="";const p=c();x.Assets.cache.has(p)&&await x.Assets.unload(p),x.Assets.add({alias:p,src:y});const o=await x.Assets.load(p);return k.value=o,h.texture=o,s.value&&(s.value.loop=e.loop,s.value.muted=!0,s.value.crossOrigin="anonymous",i(s.value),T.resolve()),v(),o}catch(p){return console.error("加载视频纹理失败:",p),g.value="视频加载失败",null}}function i(y){y.addEventListener("play",()=>{e.status!==r.TickerStatus.playing&&a("update:status",r.TickerStatus.playing)}),y.addEventListener("pause",()=>{e.status!==r.TickerStatus.paused&&a("update:status",r.TickerStatus.paused)}),y.addEventListener("ended",()=>{e.loop?(y.currentTime=0,y.play()):a("update:status",r.TickerStatus.stopped)}),y.addEventListener("error",p=>{const o=y.error;let f="视频播放失败";if(o)switch(o.code){case o.MEDIA_ERR_ABORTED:f="视频播放被中止";break;case o.MEDIA_ERR_NETWORK:f="网络错误导致视频播放失败";break;case o.MEDIA_ERR_DECODE:f="视频解码失败";break;case o.MEDIA_ERR_SRC_NOT_SUPPORTED:f="不支持的视频格式";break}console.error("视频播放错误:",f,p),g.value=f,a("update:status",r.TickerStatus.stopped)})}async function d(){if(k.value){const y=c();k.value.destroy(!0),k.value=void 0,x.Assets.cache.has(y)&&await x.Assets.unload(y)}g.value=""}t.watchEffect(()=>{e.status===r.TickerStatus.play&&F(),e.status===r.TickerStatus.pause&&C(),e.status===r.TickerStatus.stop&&b()}),t.onBeforeUnmount(()=>{d()});function F(){s.value&&s.value.play().catch(y=>{console.error("视频播放失败:",y),g.value="视频播放失败"})}function C(){s.value?.pause()}function b(){s.value&&(s.value.pause(),s.value.currentTime=0),a("update:status",r.TickerStatus.stopped)}return(y,p)=>t.renderSlot(y.$slots,"default")}}),W=t.defineComponent({__name:"view",props:{defaultOptions:{type:Object,default:()=>({})}},setup(n){const m=n,{application:e,context:a}=N(),_=t.ref();return t.onMounted(async()=>{await e.init({resizeTo:_.value,...m.defaultOptions}),a.whenDef.resolve(e),_.value.appendChild(e.canvas)}),(c,h)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"appRef",ref:_,class:"vk-pixi-frame"},null,512))}}),oe=t.defineComponent({name:"VkPixiFrame",components:{ApngComp:G,ProviderComp:H,ViewComp:W,VideoComp:Y,Bitmap:K},props:E,emits:$,setup(n){const m=t.computed(()=>{if(!n.url)return!1;const a=n.url.toLowerCase();return a.includes(".png")&&!a.includes(".mp4")&&!a.includes(".webm")}),e=t.computed(()=>{if(!n.url)return!1;const a=n.url.toLowerCase();return a.includes(".mp4")||a.includes(".webm")||a.includes(".mov")});return{isApng:m,isVideo:e}}});function ue(n,m,e,a,_,c){const h=t.resolveComponent("ViewComp"),v=t.resolveComponent("ApngComp"),k=t.resolveComponent("VideoComp"),s=t.resolveComponent("Bitmap"),T=t.resolveComponent("ProviderComp");return t.openBlock(),t.createBlock(T,null,{default:t.withCtx(()=>[t.createVNode(h),n.isApng&&n.url?(t.openBlock(),t.createBlock(v,{key:0,url:n.url,loop:n.loop,status:n.status,"onUpdate:status":m[0]||(m[0]=g=>n.$emit("update:status",g))},null,8,["url","loop","status"])):n.isVideo&&n.url?(t.openBlock(),t.createBlock(k,{key:1,url:n.url,loop:n.loop,status:n.status,"onUpdate:status":m[1]||(m[1]=g=>n.$emit("update:status",g))},null,8,["url","loop","status"])):(t.openBlock(),t.createBlock(s,{key:2,data:n.data,loop:n.loop,status:n.status,onSetData:m[2]||(m[2]=g=>n.$emit("setData",g)),"onUpdate:status":m[3]||(m[3]=g=>n.$emit("update:status",g))},null,8,["data","loop","status"]))]),_:1})}const R=te._export_sfc(oe,[["render",ue]]),ie=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));R.install=n=>{n.component(R.name||"VkPixiFrame",R)};Object.defineProperty(exports,"TickerStatus",{enumerable:!0,get:()=>r.TickerStatus});exports.VkPixiFrame=R;exports.VkPixiFrameApng=G;exports.VkPixiFrameBitmap=K;exports.VkPixiFrameBitmapGenerator=ne;exports.VkPixiFrameBufferImage=re;exports.VkPixiFrameCore=se;exports.VkPixiFrameProvider=H;exports.VkPixiFrameVideo=Y;exports.VkPixiFrameView=W;exports.__VkPixiFrame=ie;exports.default=R;exports.usePixiApp=N;exports.useSprite=I;