@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
@@ -1,11 +1,11 @@
1
- import Vditor from 'vditor';
2
- import { bindPropsFactory, onEmitsFactory } from '@vunk/core/shared/utils-vue';
3
- import { inject, unref, defineComponent, nextTick, ref, watch, shallowRef, provide, onMounted, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, createBlock, withCtx, normalizeClass, renderSlot, createCommentVNode } from 'vue';
4
- import { watchPausable, useMutationObserver } from '@vueuse/core';
5
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
6
- import { VkAsyncTeleport } from '@vunk/core';
7
-
8
- const defaultToolbar = [
1
+ import $ from "vditor";
2
+ import { bindPropsFactory as g, onEmitsFactory as F } from "@vunk/core/shared/utils-vue";
3
+ import { inject as h, unref as T, defineComponent as v, nextTick as C, ref as c, watch as b, shallowRef as M, provide as _, onMounted as S, resolveComponent as m, createElementBlock as P, openBlock as d, Fragment as j, createElementVNode as O, createBlock as p, createCommentVNode as i, renderSlot as E, withCtx as B, normalizeClass as H } from "vue";
4
+ import N from "mitt";
5
+ import { watchPausable as A, useMutationObserver as R } from "@vueuse/core";
6
+ import { VkAsyncTeleport as z } from "@vunk/core";
7
+ import { _ as K } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
8
+ const U = [
9
9
  "headings",
10
10
  "bold",
11
11
  "italic",
@@ -32,8 +32,7 @@ const defaultToolbar = [
32
32
  "outline",
33
33
  "export",
34
34
  "|"
35
- ];
36
- const props = {
35
+ ], y = {
37
36
  modelValue: {
38
37
  type: String,
39
38
  default: ""
@@ -44,52 +43,38 @@ const props = {
44
43
  },
45
44
  placeholder: {
46
45
  type: String,
47
- default: "Crtl + Enter \u53D1\u9001; Enter \u6362\u884C"
46
+ default: "Crtl + Enter 发送; Enter 换行"
48
47
  },
49
48
  toolbar: {
50
49
  type: Array,
51
- default: () => defaultToolbar
50
+ default: () => U
52
51
  },
53
52
  fullscreen: {
54
53
  type: Boolean,
55
- default: false
54
+ default: !1
56
55
  }
57
- };
58
- const createBindProps = bindPropsFactory(props);
59
- const emits = {
56
+ }, L = g(y), k = {
60
57
  load: (e) => e,
61
58
  "update:modelValue": (e) => e,
62
59
  ctrlEnter: (e) => e,
63
60
  "update:fullscreen": (e) => e
64
- };
65
- const createOnEmits = onEmitsFactory(emits);
66
-
67
- var ctx = /*#__PURE__*/Object.freeze({
61
+ }, q = F(k), re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
68
62
  __proto__: null,
69
- createBindProps: createBindProps,
70
- createOnEmits: createOnEmits,
71
- emits: emits,
72
- props: props
73
- });
74
-
75
- function mitt(n){return {all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e]);},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]));},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e);}),(i=n.get("*"))&&i.slice().map(function(n){n(t,e);});}}}
76
-
77
- const useVditor = () => {
78
- const core = inject("vkVditorRef", null);
79
- if (!core) {
63
+ createBindProps: L,
64
+ createOnEmits: q,
65
+ emits: k,
66
+ props: y
67
+ }, Symbol.toStringTag, { value: "Module" })), w = () => {
68
+ const e = h("vkVditorRef", null);
69
+ if (!e)
80
70
  throw new Error("useVditor must be used after VditorProvider");
81
- }
82
- return unref(core);
83
- };
84
- const useVditorMitter = () => {
85
- const core = inject("vkVditorMitter", null);
86
- if (!core) {
71
+ return T(e);
72
+ }, D = () => {
73
+ const e = h("vkVditorMitter", null);
74
+ if (!e)
87
75
  throw new Error("useVditorMitter must be used after VditorProvider");
88
- }
89
- return core;
90
- };
91
-
92
- var _sfc_main$2 = defineComponent({
76
+ return e;
77
+ }, G = v({
93
78
  props: {
94
79
  modelValue: {
95
80
  type: String,
@@ -99,192 +84,133 @@ var _sfc_main$2 = defineComponent({
99
84
  emits: {
100
85
  "update:modelValue": null
101
86
  },
102
- setup(props, { emit }) {
103
- const vditor = useVditor();
104
- const mitter = useVditorMitter();
105
- if (props.modelValue) {
106
- vditor.setValue(props.modelValue, true);
107
- }
108
- const { pause, resume } = watchPausable(() => props.modelValue, (value) => {
109
- vditor.setValue(value, true);
87
+ setup(e, { emit: t }) {
88
+ const n = w(), u = D();
89
+ e.modelValue && n.setValue(e.modelValue, !0);
90
+ const { pause: l, resume: a } = A(() => e.modelValue, (o) => {
91
+ n.setValue(o, !0);
110
92
  });
111
- mitter.on("input", (value) => {
112
- pause();
113
- emit("update:modelValue", value);
114
- nextTick(resume);
115
- });
116
- return () => null;
93
+ return u.on("input", (o) => {
94
+ l(), t("update:modelValue", o), C(a);
95
+ }), () => null;
117
96
  }
118
- });
119
-
120
- var HandleValue = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/vditor/src/handle-value.vue"]]);
121
-
122
- var _sfc_main$1 = defineComponent({
97
+ }), I = v({
123
98
  props: {
124
99
  fullscreen: {
125
100
  type: Boolean,
126
- default: false
101
+ default: !1
127
102
  }
128
103
  },
129
104
  emits: {
130
105
  "update:fullscreen": null
131
106
  },
132
- setup(props, { emit }) {
133
- const vditor = useVditor();
134
- const el = vditor.vditor.element;
135
- const domFullscreen = ref(false);
136
- useMutationObserver(el, () => {
137
- if (el.classList.contains("vditor--fullscreen")) {
138
- domFullscreen.value = true;
139
- } else {
140
- domFullscreen.value = false;
141
- }
107
+ setup(e, { emit: t }) {
108
+ const n = w(), u = n.vditor.element, l = c(!1);
109
+ return R(u, () => {
110
+ u.classList.contains("vditor--fullscreen") ? l.value = !0 : l.value = !1;
142
111
  }, {
143
- attributes: true
144
- });
145
- watch(() => props.fullscreen, (value) => {
146
- if (value !== domFullscreen.value) {
147
- const ir = vditor.vditor.ir?.element;
148
- if (!ir) return;
149
- ir.dispatchEvent(new KeyboardEvent("keydown", {
112
+ attributes: !0
113
+ }), b(() => e.fullscreen, (a) => {
114
+ if (a !== l.value) {
115
+ const o = n.vditor.ir?.element;
116
+ if (!o) return;
117
+ o.dispatchEvent(new KeyboardEvent("keydown", {
150
118
  key: "'",
151
- ctrlKey: true
119
+ ctrlKey: !0
152
120
  }));
153
121
  }
154
- }, { immediate: true });
155
- watch(() => domFullscreen.value, (value) => {
156
- emit("update:fullscreen", value);
157
- });
158
- return () => null;
122
+ }, { immediate: !0 }), b(() => l.value, (a) => {
123
+ t("update:fullscreen", a);
124
+ }), () => null;
159
125
  }
160
- });
161
-
162
- var HandleFullscreen = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/vditor/src/handle-fullscreen.vue"]]);
163
-
164
- var _sfc_main = defineComponent({
126
+ }), J = v({
165
127
  name: "VkVditor",
166
128
  components: {
167
- HandleValue,
168
- HandleFullscreen,
169
- VkAsyncTeleport
129
+ HandleValue: G,
130
+ HandleFullscreen: I,
131
+ VkAsyncTeleport: z
170
132
  },
171
- props,
172
- emits,
173
- setup(props2, { emit }) {
174
- const vditorNode = ref();
175
- const ready = ref(false);
176
- const mitter = mitt();
177
- const vditorRef = shallowRef();
178
- const isTextareaFocus = ref(false);
179
- provide("vkVditorMitter", mitter);
180
- provide("vkVditorRef", vditorRef);
181
- onMounted(() => {
182
- const vditor = new Vditor(vditorNode.value, {
183
- ...props2.defaultOptions,
184
- placeholder: props2.placeholder,
133
+ props: y,
134
+ emits: k,
135
+ setup(e, { emit: t }) {
136
+ const n = c(), u = c(!1), l = N(), a = M(), o = c(!1);
137
+ return _("vkVditorMitter", l), _("vkVditorRef", a), S(() => {
138
+ const s = new $(n.value, {
139
+ ...e.defaultOptions,
140
+ placeholder: e.placeholder,
185
141
  cache: {
186
- enable: true,
142
+ enable: !0,
187
143
  id: "VkVditorCache",
188
- ...props2.defaultOptions.cache || {}
144
+ ...e.defaultOptions.cache || {}
189
145
  },
190
146
  after() {
191
- vditorRef.value = vditor;
192
- ready.value = true;
193
- emit("load", vditor);
194
- props2.defaultOptions.after?.();
147
+ a.value = s, u.value = !0, t("load", s), e.defaultOptions.after?.();
195
148
  },
196
- input(value) {
197
- mitter.emit("input", value);
198
- props2.defaultOptions.input?.(value);
149
+ input(r) {
150
+ l.emit("input", r), e.defaultOptions.input?.(r);
199
151
  },
200
- ctrlEnter(value) {
201
- emit("update:modelValue", value);
202
- emit("ctrlEnter", value);
152
+ ctrlEnter(r) {
153
+ t("update:modelValue", r), t("ctrlEnter", r);
203
154
  },
204
- focus(v) {
205
- isTextareaFocus.value = true;
206
- props2.defaultOptions.focus?.(v);
155
+ focus(r) {
156
+ o.value = !0, e.defaultOptions.focus?.(r);
207
157
  },
208
- blur(v) {
209
- isTextareaFocus.value = false;
210
- props2.defaultOptions.blur?.(v);
158
+ blur(r) {
159
+ o.value = !1, e.defaultOptions.blur?.(r);
211
160
  },
212
- toolbar: props2.toolbar
161
+ toolbar: e.toolbar
213
162
  });
214
- });
215
- return {
216
- vditorNode,
217
- isTextareaFocus,
218
- ready
163
+ }), {
164
+ vditorNode: n,
165
+ isTextareaFocus: o,
166
+ ready: u
219
167
  };
220
168
  }
221
- });
222
-
223
- const _hoisted_1 = {
169
+ }), Q = {
224
170
  ref: "vditorNode",
225
171
  class: "vkf-vditor"
226
172
  };
227
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
228
- const _component_VkAsyncTeleport = resolveComponent("VkAsyncTeleport");
229
- const _component_HandleValue = resolveComponent("HandleValue");
230
- const _component_HandleFullscreen = resolveComponent("HandleFullscreen");
231
- return openBlock(), createElementBlock(
232
- Fragment,
233
- null,
234
- [
235
- createElementVNode(
236
- "div",
237
- _hoisted_1,
238
- null,
239
- 512
240
- /* NEED_PATCH */
241
- ),
242
- _ctx.ready ? (openBlock(), createBlock(_component_VkAsyncTeleport, {
243
- key: 0,
244
- to: _ctx.vditorNode
245
- }, {
246
- default: withCtx(() => [
247
- createElementVNode(
248
- "div",
249
- {
250
- class: normalizeClass(["vkf-vditor-footer", {
251
- "is-textarea-focus": _ctx.isTextareaFocus
252
- }])
253
- },
254
- [
255
- renderSlot(_ctx.$slots, "footer")
256
- ],
257
- 2
258
- /* CLASS */
259
- )
260
- ]),
261
- _: 3
262
- /* FORWARDED */
263
- }, 8, ["to"])) : createCommentVNode("v-if", true),
264
- _ctx.ready ? (openBlock(), createBlock(_component_HandleValue, {
265
- key: 1,
266
- "model-value": _ctx.modelValue,
267
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
268
- }, null, 8, ["model-value"])) : createCommentVNode("v-if", true),
269
- _ctx.ready ? (openBlock(), createBlock(_component_HandleFullscreen, {
270
- key: 2,
271
- fullscreen: _ctx.fullscreen,
272
- "onUpdate:fullscreen": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:fullscreen", $event))
273
- }, null, 8, ["fullscreen"])) : createCommentVNode("v-if", true),
274
- _ctx.ready ? renderSlot(_ctx.$slots, "default", { key: 3 }) : createCommentVNode("v-if", true)
275
- ],
276
- 64
277
- /* STABLE_FRAGMENT */
278
- );
173
+ function W(e, t, n, u, l, a) {
174
+ const o = m("VkAsyncTeleport"), s = m("HandleValue"), r = m("HandleFullscreen");
175
+ return d(), P(j, null, [
176
+ O("div", Q, null, 512),
177
+ e.ready ? (d(), p(o, {
178
+ key: 0,
179
+ to: e.vditorNode
180
+ }, {
181
+ default: B(() => [
182
+ O("div", {
183
+ class: H(["vkf-vditor-footer", {
184
+ "is-textarea-focus": e.isTextareaFocus
185
+ }])
186
+ }, [
187
+ E(e.$slots, "footer")
188
+ ], 2)
189
+ ]),
190
+ _: 3
191
+ }, 8, ["to"])) : i("", !0),
192
+ e.ready ? (d(), p(s, {
193
+ key: 1,
194
+ "model-value": e.modelValue,
195
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => e.$emit("update:modelValue", f))
196
+ }, null, 8, ["model-value"])) : i("", !0),
197
+ e.ready ? (d(), p(r, {
198
+ key: 2,
199
+ fullscreen: e.fullscreen,
200
+ "onUpdate:fullscreen": t[1] || (t[1] = (f) => e.$emit("update:fullscreen", f))
201
+ }, null, 8, ["fullscreen"])) : i("", !0),
202
+ e.ready ? E(e.$slots, "default", { key: 3 }) : i("", !0)
203
+ ], 64);
279
204
  }
280
- var VkVditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/vditor/src/index.vue"]]);
281
-
282
- var types = /*#__PURE__*/Object.freeze({
205
+ const V = /* @__PURE__ */ K(J, [["render", W]]), le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
283
206
  __proto__: null
284
- });
285
-
286
- VkVditor.install = (app) => {
287
- app.component(VkVditor.name || "VkVditor", VkVditor);
207
+ }, Symbol.toStringTag, { value: "Module" }));
208
+ V.install = (e) => {
209
+ e.component(V.name || "VkVditor", V);
210
+ };
211
+ export {
212
+ V as VkVditor,
213
+ re as _VkVditorCtx,
214
+ le as __VkVditor,
215
+ V as default
288
216
  };
289
-
290
- export { VkVditor, ctx as _VkVditorCtx, types as __VkVditor, VkVditor as default };
@@ -23,14 +23,14 @@ export declare const props: {
23
23
  default: boolean;
24
24
  };
25
25
  };
26
- export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"toolbar", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"fullscreen", keyof T2> | Extract<"defaultOptions", keyof T2>)[]>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"toolbar", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"fullscreen", keyof T2>, KE> | Exclude<Extract<"defaultOptions", keyof T2>, KE> : Extract<"toolbar", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"fullscreen", keyof T2> | Extract<"defaultOptions", keyof T2>]: { [k in Extract<"toolbar", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"fullscreen", keyof T2> | Extract<"defaultOptions", keyof T2>]: T2[k]; }[P]; }>;
26
+ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"toolbar", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"fullscreen", keyof T2> | Extract<"defaultOptions", keyof T2>)[]>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"toolbar", keyof T2>, KE> | Exclude<Extract<"placeholder", keyof T2>, KE> | Exclude<Extract<"modelValue", keyof T2>, KE> | Exclude<Extract<"fullscreen", keyof T2>, KE> | Exclude<Extract<"defaultOptions", keyof T2>, KE> : Extract<"toolbar", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"fullscreen", keyof T2> | Extract<"defaultOptions", keyof T2>]: { [k in Extract<"toolbar", keyof T2> | Extract<"placeholder", keyof T2> | Extract<"modelValue", keyof T2> | Extract<"fullscreen", keyof T2> | Extract<"defaultOptions", keyof T2>]: T2[k]; }[P]; }>;
27
27
  export declare const emits: {
28
28
  load: (e: Vditor) => Vditor;
29
29
  'update:modelValue': (e: string) => string;
30
30
  ctrlEnter: (e: string) => string;
31
31
  'update:fullscreen': (e: boolean) => boolean;
32
32
  };
33
- export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("load" | "update:modelValue" | "ctrlEnter" | "update:fullscreen")[]>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"load", KE> | Exclude<"update:modelValue", KE> | Exclude<"ctrlEnter", KE> | Exclude<"update:fullscreen", KE> : "load" | "update:modelValue" | "ctrlEnter" | "update:fullscreen"]: {
33
+ export declare const createOnEmits: <T2 extends import("@vunk/core").AnyFunc, EX extends ("load" | "update:modelValue" | "update:fullscreen" | "ctrlEnter")[]>(emit: T2, excludes?: EX | undefined) => { [P in EX extends (infer KE)[] ? Exclude<"load", KE> | Exclude<"update:modelValue", KE> | Exclude<"update:fullscreen", KE> | Exclude<"ctrlEnter", KE> : "load" | "update:modelValue" | "update:fullscreen" | "ctrlEnter"]: {
34
34
  load: (...e: import("@vunk/core").RestParameters<T2>) => void;
35
35
  'update:modelValue': (...e: import("@vunk/core").RestParameters<T2>) => void;
36
36
  ctrlEnter: (...e: import("@vunk/core").RestParameters<T2>) => void;
@@ -1,4 +1,6 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
4
  fullscreen: {
3
5
  type: BooleanConstructor;
4
6
  default: boolean;
@@ -15,4 +17,3 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
15
17
  }>, {
16
18
  fullscreen: boolean;
17
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
- export default _default;
@@ -1,4 +1,6 @@
1
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
4
  modelValue: {
3
5
  type: StringConstructor;
4
6
  default: string;
@@ -15,4 +17,3 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
15
17
  }>, {
16
18
  modelValue: string;
17
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
- export default _default;
@@ -1,6 +1,8 @@
1
1
  import Vditor from 'vditor';
2
2
  import { Ref } from 'vue';
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;
@@ -54,12 +56,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
54
56
  }>> & Readonly<{
55
57
  onLoad?: ((e: Vditor) => any) | undefined;
56
58
  "onUpdate:modelValue"?: ((e: string) => any) | undefined;
57
- onCtrlEnter?: ((e: string) => any) | undefined;
58
59
  "onUpdate:fullscreen"?: ((e: boolean) => any) | undefined;
60
+ onCtrlEnter?: ((e: string) => any) | undefined;
59
61
  }>, {
60
62
  toolbar: string[];
61
- modelValue: string;
62
63
  placeholder: string;
64
+ modelValue: string;
63
65
  fullscreen: boolean;
64
66
  defaultOptions: IOptions;
65
67
  }, {}, {
@@ -140,4 +142,3 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
140
142
  teleport: boolean;
141
143
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
142
144
  }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
143
- export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("xgplayer"),u={defaultOptions:{type:Object,default:()=>({})},url:{type:String,default:""},autoplay:{type:Boolean,default:!1}},s="_s_vk_xgplayer";function p(t){e.provide(s,t)}function d(){const t=e.inject(s);if(!t)throw new Error("usePlayer must be used after providePlayer");return t}const i=e.defineComponent({__name:"core",props:u,setup(t){const r=t,o=d();return e.watchEffect(()=>{o.url=r.url}),e.watchEffect(()=>{o.autoplay=r.autoplay}),(l,a)=>e.renderSlot(l.$slots,"default")}}),f=["id"],n=e.defineComponent({name:"VkXgplayer",__name:"index",props:u,setup(t){const r=t,o=e.useId(),l=e.ref(!1);return e.onMounted(()=>{const a=new c({id:o,url:r.url,autoplay:r.autoplay,height:"100%",width:"100%",...r.defaultOptions});p(a),l.value=!0}),(a,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{id:e.unref(o)},null,8,f),l.value?(e.openBlock(),e.createBlock(i,{key:0},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3})):e.createCommentVNode("",!0)],64))}}),y=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));n.install=t=>{t.component(n.name||"VkXgplayer",n)};exports.VkXgplayer=n;exports.__VkXgplayer=y;exports.default=n;
@@ -1,8 +1,6 @@
1
- import { provide, inject, defineComponent, watchEffect, renderSlot, useId, ref, onMounted, openBlock, createElementBlock, Fragment, createElementVNode, createBlock, withCtx, createCommentVNode } from 'vue';
2
- import Player from 'xgplayer';
3
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
4
-
5
- const props = {
1
+ import { provide as i, inject as y, defineComponent as p, watchEffect as n, renderSlot as s, useId as f, ref as _, onMounted as m, createElementBlock as g, openBlock as u, Fragment as h, createElementVNode as k, createBlock as v, createCommentVNode as w, unref as P, withCtx as V } from "vue";
2
+ import b from "xgplayer";
3
+ const c = {
6
4
  /**
7
5
  * @link https://v2.h5player.bytedance.com/config
8
6
  */
@@ -16,103 +14,64 @@ const props = {
16
14
  },
17
15
  autoplay: {
18
16
  type: Boolean,
19
- default: false
17
+ default: !1
20
18
  }
21
- };
22
-
23
- const provideKey = "_s_vk_xgplayer";
24
- function providePlayer(player) {
25
- provide(provideKey, player);
19
+ }, d = "_s_vk_xgplayer";
20
+ function O(e) {
21
+ i(d, e);
26
22
  }
27
- function usePlayer() {
28
- const player = inject(provideKey);
29
- if (!player) {
23
+ function j() {
24
+ const e = y(d);
25
+ if (!e)
30
26
  throw new Error("usePlayer must be used after providePlayer");
31
- }
32
- return player;
27
+ return e;
33
28
  }
34
-
35
- var _sfc_main$1 = /* @__PURE__ */ defineComponent({
29
+ const x = /* @__PURE__ */ p({
36
30
  __name: "core",
37
- props: props,
38
- setup(__props, { expose: __expose }) {
39
- __expose();
40
- const props = __props;
41
- const player = usePlayer();
42
- watchEffect(() => {
43
- player.url = props.url;
44
- });
45
- watchEffect(() => {
46
- player.autoplay = props.autoplay;
47
- });
48
- const __returned__ = { props, player };
49
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
50
- return __returned__;
31
+ props: c,
32
+ setup(e) {
33
+ const t = e, r = j();
34
+ return n(() => {
35
+ r.url = t.url;
36
+ }), n(() => {
37
+ r.autoplay = t.autoplay;
38
+ }), (o, a) => s(o.$slots, "default");
51
39
  }
52
- });
53
-
54
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
55
- return renderSlot(_ctx.$slots, "default");
56
- }
57
- var Core = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/xgplayer/src/core.vue"]]);
58
-
59
- var _sfc_main = /* @__PURE__ */ defineComponent({
60
- ...{
61
- name: "VkXgplayer"
62
- },
40
+ }), B = ["id"], l = /* @__PURE__ */ p({
41
+ name: "VkXgplayer",
63
42
  __name: "index",
64
- props: props,
65
- setup(__props, { expose: __expose }) {
66
- __expose();
67
- const props = __props;
68
- const id = useId();
69
- const ready = ref(false);
70
- onMounted(() => {
71
- const player = new Player({
72
- id,
43
+ props: c,
44
+ setup(e) {
45
+ const t = e, r = f(), o = _(!1);
46
+ return m(() => {
47
+ const a = new b({
48
+ id: r,
73
49
  // url: 'http://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/xgplayer-demo.mp4',
74
- url: props.url,
75
- autoplay: props.autoplay,
50
+ url: t.url,
51
+ autoplay: t.autoplay,
76
52
  height: "100%",
77
53
  width: "100%",
78
- ...props.defaultOptions
54
+ ...t.defaultOptions
79
55
  });
80
- providePlayer(player);
81
- ready.value = true;
82
- });
83
- const __returned__ = { props, id, ready, Core };
84
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
85
- return __returned__;
86
- }
87
- });
88
-
89
- const _hoisted_1 = ["id"];
90
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
91
- return openBlock(), createElementBlock(
92
- Fragment,
93
- null,
94
- [
95
- createElementVNode("div", { id: $setup.id }, null, 8, _hoisted_1),
96
- $setup.ready ? (openBlock(), createBlock($setup["Core"], { key: 0 }, {
97
- default: withCtx(() => [
98
- renderSlot(_ctx.$slots, "default")
56
+ O(a), o.value = !0;
57
+ }), (a, E) => (u(), g(h, null, [
58
+ k("div", { id: P(r) }, null, 8, B),
59
+ o.value ? (u(), v(x, { key: 0 }, {
60
+ default: V(() => [
61
+ s(a.$slots, "default")
99
62
  ]),
100
63
  _: 3
101
- /* FORWARDED */
102
- })) : createCommentVNode("v-if", true)
103
- ],
104
- 64
105
- /* STABLE_FRAGMENT */
106
- );
107
- }
108
- var VkXgplayer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/xgplayer/src/index.vue"]]);
109
-
110
- var types = /*#__PURE__*/Object.freeze({
64
+ })) : w("", !0)
65
+ ], 64));
66
+ }
67
+ }), C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
111
68
  __proto__: null
112
- });
113
-
114
- VkXgplayer.install = (app) => {
115
- app.component(VkXgplayer.name || "VkXgplayer", VkXgplayer);
69
+ }, Symbol.toStringTag, { value: "Module" }));
70
+ l.install = (e) => {
71
+ e.component(l.name || "VkXgplayer", l);
72
+ };
73
+ export {
74
+ l as VkXgplayer,
75
+ C as __VkXgplayer,
76
+ l as default
116
77
  };
117
-
118
- export { VkXgplayer, types as __VkXgplayer, VkXgplayer as default };