@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,17 +1,14 @@
1
- import { openBlock, createElementBlock, createStaticVNode, defineComponent, ref, onMounted, watch, computed, resolveComponent, createVNode, withCtx, Fragment, renderList, createBlock, normalizeClass, createSlots, renderSlot, withDirectives, createElementVNode, normalizeStyle, createCommentVNode, vShow, mergeProps, normalizeProps, guardReactiveProps } from 'vue';
2
- import { VkBubbleRenderer, VkBubbleRenderTemplates, VkBubbleTemplates } from '@vunk/plus/components/bubble-templates';
3
- import { ElAutoResizer } from 'element-plus';
4
- import { a as arrow_down_bold_default } from '../index2.mjs';
5
- import { useResizeObserver } from '@vueuse/core';
6
- import { VkScrollbar } from '@vunk/plus/components/scrollbar';
7
- import { Bubble } from '@vunk/plus/element/bubble';
8
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
9
- import { noop } from '@vunk/shared/function';
10
- export { Role } from '@vunk/plus/components/agent-chat-provider';
11
-
12
- const _sfc_main$2 = {};
13
-
14
- const _hoisted_1$1 = {
1
+ import { createElementBlock as B, openBlock as p, createStaticVNode as E, defineComponent as _, ref as S, onMounted as $, watch as N, computed as T, resolveComponent as G, createVNode as u, withDirectives as L, unref as d, withCtx as l, Fragment as H, renderList as I, createBlock as w, normalizeClass as C, createSlots as z, renderSlot as s, createElementVNode as M, normalizeStyle as R, createCommentVNode as j, vShow as D, mergeProps as O, normalizeProps as m, guardReactiveProps as v } from "vue";
2
+ import { VkBubbleRenderTemplates as Z, VkBubbleRenderer as q, VkBubbleTemplates as U } from "@vunk/plus/components/bubble-templates";
3
+ import { ElAutoResizer as W } from "element-plus";
4
+ import { ArrowDownBold as J } from "@element-plus/icons-vue";
5
+ import { useResizeObserver as K } from "@vueuse/core";
6
+ import { VkScrollbar as Q } from "@vunk/plus/components/scrollbar";
7
+ import { Bubble as X } from "@vunk/plus/element/bubble";
8
+ import { _ as Y } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
9
+ import { noop as ee } from "@vunk/shared/function";
10
+ import { Role as Be } from "@vunk/plus/components/agent-chat-provider";
11
+ const te = {}, oe = {
15
12
  xmlns: "http://www.w3.org/2000/svg",
16
13
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
17
14
  version: "1.1",
@@ -19,15 +16,12 @@ const _hoisted_1$1 = {
19
16
  height: "704",
20
17
  viewBox: "0 0 704 704"
21
18
  };
22
-
23
- function _sfc_render$2(_ctx, _cache) {
24
- return (openBlock(), createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [
25
- createStaticVNode("<defs><filter id=\"master_svg0_62_10054\" filterUnits=\"objectBoundingBox\" color-interpolation-filters=\"sRGB\" x=\"-0.030120481927710843\" y=\"-0.030120481927710843\" width=\"1.0602409638554218\" height=\"1.0602409638554218\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"5\" result=\"effect1_foregroundBlur\"></feGaussianBlur></filter><linearGradient id=\"master_svg1_62_10082\" x1=\"0.5\" y1=\"-0.13192443549633026\" x2=\"0.42319029569625854\" y2=\"1.368432641029358\"><stop offset=\"9.145302325487137%\" stop-color=\"currentColor\" stop-opacity=\"1\"></stop><stop offset=\"13.636428117752075%\" stop-color=\"currentColor\" stop-opacity=\"0.07539999485015869\"></stop><stop offset=\"16.968481242656708%\" stop-color=\"currentColor\" stop-opacity=\"0\"></stop></linearGradient></defs><g transform=\"matrix(0,1,-1,0,704,-664)\" filter=\"url(#master_svg0_62_10054)\"><path d=\"M1016,684C1199.359,684,1348,535.359,1348,352C1348,168.641,1199.359,20,1016,20C832.641,20,684,168.641,684,352C684,535.359,832.641,684,1016,684ZM1016,32C1192.731,32,1336,175.269,1336,352C1336,528.731,1192.731,672,1016,672C839.269,672,696,528.731,696,352C696,175.269,839.269,32,1016,32Z\" fill-rule=\"evenodd\" fill=\"url(#master_svg1_62_10082)\" fill-opacity=\"1\"></path></g>", 2)
26
- ])))
19
+ function le(i, o) {
20
+ return p(), B("svg", oe, o[0] || (o[0] = [
21
+ E('<defs><filter id="master_svg0_62_10054" filterUnits="objectBoundingBox" color-interpolation-filters="sRGB" x="-0.030120481927710843" y="-0.030120481927710843" width="1.0602409638554218" height="1.0602409638554218"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur stdDeviation="5" result="effect1_foregroundBlur"></feGaussianBlur></filter><linearGradient id="master_svg1_62_10082" x1="0.5" y1="-0.13192443549633026" x2="0.42319029569625854" y2="1.368432641029358"><stop offset="9.145302325487137%" stop-color="currentColor" stop-opacity="1"></stop><stop offset="13.636428117752075%" stop-color="currentColor" stop-opacity="0.07539999485015869"></stop><stop offset="16.968481242656708%" stop-color="currentColor" stop-opacity="0"></stop></linearGradient></defs><g transform="matrix(0,1,-1,0,704,-664)" filter="url(#master_svg0_62_10054)"><path d="M1016,684C1199.359,684,1348,535.359,1348,352C1348,168.641,1199.359,20,1016,20C832.641,20,684,168.641,684,352C684,535.359,832.641,684,1016,684ZM1016,32C1192.731,32,1336,175.269,1336,352C1336,528.731,1192.731,672,1016,672C839.269,672,696,528.731,696,352C696,175.269,839.269,32,1016,32Z" fill-rule="evenodd" fill="url(#master_svg1_62_10082)" fill-opacity="1"></path></g>', 2)
22
+ ]));
27
23
  }
28
- var loadingBg = /*#__PURE__*/_export_sfc(_sfc_main$2, [['render',_sfc_render$2],['__file',"/home/runner/work/vunk-plus/vunk-plus/packages/components/bubble-list/src/core/loading.vue"]]);
29
-
30
- var _sfc_main$1 = /* @__PURE__ */ defineComponent({
24
+ const ae = /* @__PURE__ */ Y(te, [["render", le]]), re = { class: "vk-bubble-list-wrapper" }, ne = /* @__PURE__ */ _({
31
25
  __name: "index",
32
26
  props: {
33
27
  list: {
@@ -36,7 +30,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
36
30
  },
37
31
  autoScroll: {
38
32
  type: Boolean,
39
- default: true
33
+ default: !0
40
34
  },
41
35
  autoScrollThreshold: {
42
36
  type: Number,
@@ -48,7 +42,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
48
42
  },
49
43
  alwaysShowScrollbar: {
50
44
  type: Boolean,
51
- default: false
45
+ default: !1
52
46
  },
53
47
  backButtonThreshold: {
54
48
  type: Number,
@@ -56,17 +50,15 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
56
50
  },
57
51
  showBackButton: {
58
52
  type: Boolean,
59
- default: true
53
+ default: !0
60
54
  },
61
55
  backButtonPosition: {
62
56
  type: Object,
63
- default: () => {
64
- return { bottom: "20px", left: "calc(50% - 19px)" };
65
- }
57
+ default: () => ({ bottom: "20px", left: "calc(50% - 19px)" })
66
58
  },
67
59
  btnLoading: {
68
60
  type: Boolean,
69
- default: true
61
+ default: !0
70
62
  },
71
63
  btnColor: {
72
64
  type: String,
@@ -84,332 +76,258 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
84
76
  emits: {
85
77
  complete: null
86
78
  },
87
- setup(__props, { expose: __expose }) {
88
- const props = __props;
89
- const scrollbarRef = ref();
90
- function initStyle() {
79
+ setup(i, { expose: o }) {
80
+ const r = i, c = S();
81
+ function a() {
91
82
  document.documentElement.style.setProperty(
92
83
  "--el-bubble-list-max-height",
93
- props.maxHeight || "100%"
94
- );
95
- document.documentElement.style.setProperty(
84
+ r.maxHeight || "100%"
85
+ ), document.documentElement.style.setProperty(
96
86
  "--el-bubble-list-btn-size",
97
- `${props.btnIconSize}px`
87
+ `${r.btnIconSize}px`
98
88
  );
99
89
  }
100
- onMounted(() => {
101
- initStyle();
102
- });
103
- watch(
104
- () => [props.maxHeight, props.btnIconSize],
90
+ $(() => {
91
+ a();
92
+ }), N(
93
+ () => [r.maxHeight, r.btnIconSize],
105
94
  () => {
106
- initStyle();
95
+ a();
107
96
  }
108
97
  );
109
- const distanceToBottom = ref();
110
- const scrollViewEl = computed(() => scrollbarRef.value?.wrapRef?.firstElementChild);
111
- const btnShow = computed(() => {
112
- return props.showBackButton && distanceToBottom.value !== void 0 && distanceToBottom.value > props.backButtonThreshold;
98
+ const f = S(), V = T(() => c.value?.wrapRef?.firstElementChild), A = T(() => r.showBackButton && f.value !== void 0 && f.value > r.backButtonThreshold);
99
+ $(() => {
100
+ setTimeout(h);
113
101
  });
114
- onMounted(() => {
115
- setTimeout(getDistanceToBottom);
116
- });
117
- function getDistanceToBottom() {
118
- const el = scrollbarRef.value?.$el;
119
- const wrap = scrollbarRef.value?.wrapRef;
120
- if (!el || !wrap) {
121
- return;
122
- }
123
- distanceToBottom.value = wrap.scrollHeight - wrap.scrollTop - wrap.clientHeight;
124
- return distanceToBottom.value;
102
+ function h() {
103
+ const t = c.value?.$el, n = c.value?.wrapRef;
104
+ if (!(!t || !n))
105
+ return f.value = n.scrollHeight - n.scrollTop - n.clientHeight, f.value;
125
106
  }
126
- function scrollToBottom(...args) {
127
- scrollbarRef.value?.scrollToBottom(...args);
107
+ function g(...t) {
108
+ c.value?.scrollToBottom(...t);
128
109
  }
129
- function scrollToTop(...args) {
130
- scrollbarRef.value?.scrollToTop(...args);
110
+ function x(...t) {
111
+ c.value?.scrollToTop(...t);
131
112
  }
132
- if (props.autoScroll) {
133
- useResizeObserver(scrollViewEl, () => {
134
- const distance = getDistanceToBottom();
135
- if (distance !== void 0 && distance > props.autoScrollThreshold) {
136
- return;
137
- }
138
- scrollToBottom();
139
- });
140
- }
141
- function scrollToBubble(index) {
142
- const container = scrollbarRef.value?.wrapRef;
143
- if (!container)
113
+ r.autoScroll && K(V, () => {
114
+ const t = h();
115
+ t !== void 0 && t > r.autoScrollThreshold || g();
116
+ });
117
+ function F(t) {
118
+ const n = c.value?.wrapRef;
119
+ if (!n)
144
120
  return;
145
- const bubbles = container.querySelectorAll(".el-bubble");
146
- if (index >= bubbles.length)
121
+ const b = n.querySelectorAll(".el-bubble");
122
+ if (t >= b.length)
147
123
  return;
148
- const targetBubble = bubbles[index];
149
- const containerRect = container.getBoundingClientRect();
150
- const bubbleRect = targetBubble.getBoundingClientRect();
151
- const scrollPosition = bubbleRect.top - containerRect.top + container.scrollTop;
152
- container.scrollTo({
153
- top: scrollPosition,
124
+ const e = b[t], y = n.getBoundingClientRect(), P = e.getBoundingClientRect().top - y.top + n.scrollTop;
125
+ n.scrollTo({
126
+ top: P,
154
127
  behavior: "smooth"
155
128
  });
156
129
  }
157
- __expose({
158
- scrollToTop,
159
- scrollToBottom,
160
- scrollToBubble
161
- });
162
- const __returned__ = { props, scrollbarRef, initStyle, distanceToBottom, scrollViewEl, btnShow, getDistanceToBottom, scrollToBottom, scrollToTop, scrollToBubble, get ArrowDownBold() {
163
- return arrow_down_bold_default;
164
- }, get VkScrollbar() {
165
- return VkScrollbar;
166
- }, get Bubble() {
167
- return Bubble;
168
- }, loadingBg };
169
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
170
- return __returned__;
171
- }
172
- });
173
-
174
- const _hoisted_1 = { class: "vk-bubble-list-wrapper" };
175
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
176
- const _component_el_icon = resolveComponent("el-icon");
177
- return openBlock(), createElementBlock("div", _hoisted_1, [
178
- createVNode($setup["VkScrollbar"], {
179
- ref: "scrollbarRef",
180
- class: "vk-bubble-list",
181
- "append-to": $props.scrollbarAppendTo,
182
- always: $props.alwaysShowScrollbar,
183
- "hide-after": 800,
184
- onScroll: $setup.getDistanceToBottom
185
- }, {
186
- default: withCtx(() => [
187
- (openBlock(true), createElementBlock(
188
- Fragment,
189
- null,
190
- renderList($props.list, (item, index) => {
191
- return openBlock(), createBlock($setup["Bubble"], {
192
- key: item.key || index,
193
- content: item.content,
194
- placement: item.placement,
195
- loading: item.loading,
196
- shape: item.shape,
197
- variant: item.variant,
198
- "is-markdown": item.isMarkdown,
199
- "is-fog": item.isFog,
200
- typing: item.typing,
201
- "max-width": item.maxWidth,
202
- avatar: item.avatar,
203
- "avatar-size": item.avatarSize,
204
- "avatar-gap": item.avatarGap,
205
- "avatar-shape": item.avatarShape,
206
- "avatar-src-set": item.avatarSrcSet,
207
- "avatar-alt": item.avatarAlt,
208
- "avatar-fit": item.avatarFit,
209
- "no-style": item.noStyle,
210
- class: normalizeClass({
211
- [`is-${item.role}`]: true
130
+ return o({
131
+ scrollToTop: x,
132
+ scrollToBottom: g,
133
+ scrollToBubble: F
134
+ }), (t, n) => {
135
+ const b = G("el-icon");
136
+ return p(), B("div", re, [
137
+ u(d(Q), {
138
+ ref_key: "scrollbarRef",
139
+ ref: c,
140
+ class: "vk-bubble-list",
141
+ "append-to": i.scrollbarAppendTo,
142
+ always: i.alwaysShowScrollbar,
143
+ "hide-after": 800,
144
+ onScroll: h
145
+ }, {
146
+ default: l(() => [
147
+ (p(!0), B(H, null, I(i.list, (e, y) => (p(), w(d(X), {
148
+ key: e.key || y,
149
+ content: e.content,
150
+ placement: e.placement,
151
+ loading: e.loading,
152
+ shape: e.shape,
153
+ variant: e.variant,
154
+ "is-markdown": e.isMarkdown,
155
+ "is-fog": e.isFog,
156
+ typing: e.typing,
157
+ "max-width": e.maxWidth,
158
+ avatar: e.avatar,
159
+ "avatar-size": e.avatarSize,
160
+ "avatar-gap": e.avatarGap,
161
+ "avatar-shape": e.avatarShape,
162
+ "avatar-src-set": e.avatarSrcSet,
163
+ "avatar-alt": e.avatarAlt,
164
+ "avatar-fit": e.avatarFit,
165
+ "no-style": e.noStyle,
166
+ class: C({
167
+ [`is-${e.role}`]: !0
212
168
  })
213
- }, createSlots({
214
- _: 2
215
- /* DYNAMIC */
216
- }, [
217
- _ctx.$slots.avatar ? {
169
+ }, z({ _: 2 }, [
170
+ t.$slots.avatar ? {
218
171
  name: "avatar",
219
- fn: withCtx(() => [
220
- renderSlot(_ctx.$slots, "avatar", { item })
172
+ fn: l(() => [
173
+ s(t.$slots, "avatar", { item: e })
221
174
  ]),
222
175
  key: "0"
223
176
  } : void 0,
224
- _ctx.$slots.header ? {
177
+ t.$slots.header ? {
225
178
  name: "header",
226
- fn: withCtx(() => [
227
- renderSlot(_ctx.$slots, "header", { item })
179
+ fn: l(() => [
180
+ s(t.$slots, "header", { item: e })
228
181
  ]),
229
182
  key: "1"
230
183
  } : void 0,
231
- _ctx.$slots.content ? {
184
+ t.$slots.content ? {
232
185
  name: "content",
233
- fn: withCtx(() => [
234
- renderSlot(_ctx.$slots, "content", { item })
186
+ fn: l(() => [
187
+ s(t.$slots, "content", { item: e })
235
188
  ]),
236
189
  key: "2"
237
190
  } : void 0,
238
- _ctx.$slots.footer ? {
191
+ t.$slots.footer ? {
239
192
  name: "footer",
240
- fn: withCtx(() => [
241
- renderSlot(_ctx.$slots, "footer", { item })
193
+ fn: l(() => [
194
+ s(t.$slots, "footer", { item: e })
242
195
  ]),
243
196
  key: "3"
244
197
  } : void 0,
245
- _ctx.$slots.loading ? {
198
+ t.$slots.loading ? {
246
199
  name: "loading",
247
- fn: withCtx(() => [
248
- renderSlot(_ctx.$slots, "loading", { item })
200
+ fn: l(() => [
201
+ s(t.$slots, "loading", { item: e })
249
202
  ]),
250
203
  key: "4"
251
204
  } : void 0
252
- ]), 1032, ["content", "placement", "loading", "shape", "variant", "is-markdown", "is-fog", "typing", "max-width", "avatar", "avatar-size", "avatar-gap", "avatar-shape", "avatar-src-set", "avatar-alt", "avatar-fit", "no-style", "class"]);
205
+ ]), 1032, ["content", "placement", "loading", "shape", "variant", "is-markdown", "is-fog", "typing", "max-width", "avatar", "avatar-size", "avatar-gap", "avatar-shape", "avatar-src-set", "avatar-alt", "avatar-fit", "no-style", "class"]))), 128))
206
+ ]),
207
+ _: 3
208
+ }, 8, ["append-to", "always"]),
209
+ L(M("div", {
210
+ class: C(["vk-bubble-list-default-back-button", {
211
+ "vk-bubble-list-back-to-bottom-solt": t.$slots.backToBottom
212
+ }]),
213
+ style: R({
214
+ bottom: i.backButtonPosition.bottom,
215
+ left: i.backButtonPosition.left
253
216
  }),
254
- 128
255
- /* KEYED_FRAGMENT */
256
- ))
257
- ]),
258
- _: 3
259
- /* FORWARDED */
260
- }, 8, ["append-to", "always"]),
261
- withDirectives(createElementVNode(
262
- "div",
263
- {
264
- class: normalizeClass(["vk-bubble-list-default-back-button", {
265
- "vk-bubble-list-back-to-bottom-solt": _ctx.$slots.backToBottom
266
- }]),
267
- style: normalizeStyle({
268
- bottom: $props.backButtonPosition.bottom,
269
- left: $props.backButtonPosition.left
270
- }),
271
- onClick: $setup.scrollToBottom
272
- },
273
- [
274
- renderSlot(_ctx.$slots, "backToBottom", {}, () => [
275
- createVNode(_component_el_icon, {
276
- class: "vk-bubble-list-back-to-bottom-icon",
277
- style: normalizeStyle({ color: $setup.props.btnColor })
278
- }, {
279
- default: withCtx(() => [
280
- createVNode($setup["ArrowDownBold"]),
281
- $setup.props.btnLoading ? (openBlock(), createBlock($setup["loadingBg"], {
282
- key: 0,
283
- class: "back-to-bottom-loading-svg-bg"
284
- })) : createCommentVNode("v-if", true)
285
- ]),
286
- _: 1
287
- /* STABLE */
288
- }, 8, ["style"])
217
+ onClick: g
218
+ }, [
219
+ s(t.$slots, "backToBottom", {}, () => [
220
+ u(b, {
221
+ class: "vk-bubble-list-back-to-bottom-icon",
222
+ style: R({ color: r.btnColor })
223
+ }, {
224
+ default: l(() => [
225
+ u(d(J)),
226
+ r.btnLoading ? (p(), w(ae, {
227
+ key: 0,
228
+ class: "back-to-bottom-loading-svg-bg"
229
+ })) : j("", !0)
230
+ ]),
231
+ _: 1
232
+ }, 8, ["style"])
233
+ ])
234
+ ], 6), [
235
+ [D, A.value]
289
236
  ])
290
- ],
291
- 6
292
- /* CLASS, STYLE */
293
- ), [
294
- [vShow, $setup.btnShow]
295
- ])
296
- ]);
297
- }
298
- var BubbleList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/bubble-list/src/core/index.vue"]]);
299
-
300
- const props = {
237
+ ]);
238
+ };
239
+ }
240
+ }), se = {
301
241
  items: {
302
242
  type: Array,
303
243
  default: () => []
304
244
  },
305
245
  elRef: {
306
246
  type: Function,
307
- default: noop
247
+ default: ee
308
248
  },
309
249
  scrollbarAppendTo: null,
310
250
  autoScrollThreshold: {
311
251
  type: Number,
312
252
  default: 200
313
253
  }
314
- };
315
-
316
- var _sfc_main = /* @__PURE__ */ defineComponent({
317
- ...{
318
- name: "VkBubbleList",
319
- inheritAttrs: false
320
- },
254
+ }, k = /* @__PURE__ */ _({
255
+ name: "VkBubbleList",
256
+ inheritAttrs: !1,
321
257
  __name: "index",
322
- props: props,
323
- setup(__props, { expose: __expose }) {
324
- __expose();
325
- const __returned__ = { get VkBubbleRenderer() {
326
- return VkBubbleRenderer;
327
- }, get VkBubbleRenderTemplates() {
328
- return VkBubbleRenderTemplates;
329
- }, get VkBubbleTemplates() {
330
- return VkBubbleTemplates;
331
- }, get ElAutoResizer() {
332
- return ElAutoResizer;
333
- }, BubbleList };
334
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
335
- return __returned__;
336
- }
337
- });
338
-
339
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
340
- return openBlock(), createBlock($setup["VkBubbleRenderTemplates"], null, {
341
- placeholder: withCtx(() => [
342
- createVNode($setup["VkBubbleTemplates"])
343
- ]),
344
- default: withCtx(() => [
345
- renderSlot(_ctx.$slots, "renderer"),
346
- createVNode($setup["ElAutoResizer"], null, {
347
- default: withCtx(({ height }) => [
348
- createVNode($setup["BubbleList"], mergeProps({
349
- ref: _ctx.elRef,
350
- "btn-icon-size": 18,
351
- "max-height": `${height}px`,
352
- "scrollbar-append-to": _ctx.scrollbarAppendTo,
353
- "auto-scroll-threshold": _ctx.autoScrollThreshold,
354
- style: {
355
- "--el-bubble-list-max-height": `${height}px`
356
- },
357
- list: _ctx.items
358
- }, _ctx.$attrs), createSlots({
359
- content: withCtx(({ item }) => [
360
- createVNode($setup["VkBubbleRenderer"], {
361
- source: [item]
362
- }, null, 8, ["source"])
363
- ]),
364
- _: 2
365
- /* DYNAMIC */
366
- }, [
367
- _ctx.$slots.avatar ? {
368
- name: "avatar",
369
- fn: withCtx((e) => [
370
- renderSlot(_ctx.$slots, "avatar", normalizeProps(guardReactiveProps(e)))
371
- ]),
372
- key: "0"
373
- } : void 0,
374
- _ctx.$slots.header ? {
375
- name: "header",
376
- fn: withCtx((e) => [
377
- renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(e)))
378
- ]),
379
- key: "1"
380
- } : void 0,
381
- _ctx.$slots.loading ? {
382
- name: "loading",
383
- fn: withCtx((e) => [
384
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(e)))
385
- ]),
386
- key: "2"
387
- } : void 0,
388
- _ctx.$slots.footer ? {
389
- name: "footer",
390
- fn: withCtx((e) => [
391
- renderSlot(_ctx.$slots, "footer", normalizeProps(guardReactiveProps(e)))
258
+ props: se,
259
+ setup(i) {
260
+ return (o, r) => (p(), w(d(Z), null, {
261
+ placeholder: l(() => [
262
+ u(d(U))
263
+ ]),
264
+ default: l(() => [
265
+ s(o.$slots, "renderer"),
266
+ u(d(W), null, {
267
+ default: l(({ height: c }) => [
268
+ u(ne, O({
269
+ ref: o.elRef,
270
+ "btn-icon-size": 18,
271
+ "max-height": `${c}px`,
272
+ "scrollbar-append-to": o.scrollbarAppendTo,
273
+ "auto-scroll-threshold": o.autoScrollThreshold,
274
+ style: {
275
+ "--el-bubble-list-max-height": `${c}px`
276
+ },
277
+ list: o.items
278
+ }, o.$attrs), z({
279
+ content: l(({ item: a }) => [
280
+ u(d(q), {
281
+ source: [a]
282
+ }, null, 8, ["source"])
392
283
  ]),
393
- key: "3"
394
- } : void 0
395
- ]), 1040, ["max-height", "scrollbar-append-to", "auto-scroll-threshold", "style", "list"])
396
- ]),
397
- _: 3
398
- /* FORWARDED */
399
- })
400
- ]),
401
- _: 3
402
- /* FORWARDED */
403
- });
404
- }
405
- var VkBubbleList = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/bubble-list/src/index.vue"]]);
406
-
407
- var types = /*#__PURE__*/Object.freeze({
284
+ _: 2
285
+ }, [
286
+ o.$slots.avatar ? {
287
+ name: "avatar",
288
+ fn: l((a) => [
289
+ s(o.$slots, "avatar", m(v(a)))
290
+ ]),
291
+ key: "0"
292
+ } : void 0,
293
+ o.$slots.header ? {
294
+ name: "header",
295
+ fn: l((a) => [
296
+ s(o.$slots, "header", m(v(a)))
297
+ ]),
298
+ key: "1"
299
+ } : void 0,
300
+ o.$slots.loading ? {
301
+ name: "loading",
302
+ fn: l((a) => [
303
+ s(o.$slots, "loading", m(v(a)))
304
+ ]),
305
+ key: "2"
306
+ } : void 0,
307
+ o.$slots.footer ? {
308
+ name: "footer",
309
+ fn: l((a) => [
310
+ s(o.$slots, "footer", m(v(a)))
311
+ ]),
312
+ key: "3"
313
+ } : void 0
314
+ ]), 1040, ["max-height", "scrollbar-append-to", "auto-scroll-threshold", "style", "list"])
315
+ ]),
316
+ _: 3
317
+ })
318
+ ]),
319
+ _: 3
320
+ }));
321
+ }
322
+ }), ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
408
323
  __proto__: null
409
- });
410
-
411
- VkBubbleList.install = (app) => {
412
- app.component(VkBubbleList.name || "VkBubbleList", VkBubbleList);
324
+ }, Symbol.toStringTag, { value: "Module" }));
325
+ k.install = (i) => {
326
+ i.component(k.name || "VkBubbleList", k);
327
+ };
328
+ export {
329
+ Be as Role,
330
+ k as VkBubbleList,
331
+ ge as __VkBubbleList,
332
+ k as default
413
333
  };
414
-
415
- export { VkBubbleList, types as __VkBubbleList, VkBubbleList as default };