@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,339 +1,193 @@
1
- import { defineComponent, inject, ref, computed, onBeforeUnmount, toRef, openBlock, createBlock, Transition, withCtx, withDirectives, createElementVNode, normalizeClass, withModifiers, normalizeStyle, vShow, createElementBlock, Fragment, createVNode, watch, nextTick, provide, reactive, onActivated, onMounted, onUpdated, resolveDynamicComponent, renderSlot, createCommentVNode } from 'vue';
2
- import { useEventListener, isClient, useResizeObserver, useMutationObserver, isObject } from '@vueuse/core';
3
- import { VkAsyncTeleport } from '@vunk/core/components/async-teleport';
4
- import { scrollbarContextKey, useNamespace, BAR_MAP, renderThumbStyle, GAP, SCOPE, scrollbarProps, scrollbarEmits } from 'element-plus';
5
- import { sleep } from '@vunk/shared/promise';
6
- import { _ as _export_sfc } from '../_plugin-vue_export-helper.mjs';
7
-
8
- const barProps = {
1
+ import { defineComponent as Y, inject as ne, ref as p, computed as L, onBeforeUnmount as re, toRef as J, createBlock as $, openBlock as P, Transition as ve, unref as R, withCtx as j, withDirectives as me, createElementVNode as K, withModifiers as de, normalizeClass as O, normalizeStyle as U, vShow as pe, createElementBlock as ae, Fragment as he, createVNode as q, watch as Q, nextTick as D, provide as be, reactive as ge, onActivated as we, onMounted as Se, onUpdated as ye, createCommentVNode as ze, resolveDynamicComponent as Ee, renderSlot as Te } from "vue";
2
+ import { useEventListener as X, isClient as He, useResizeObserver as Z, useMutationObserver as ke, isObject as Re } from "@vueuse/core";
3
+ import { VkAsyncTeleport as Le } from "@vunk/core/components/async-teleport";
4
+ import { scrollbarContextKey as F, useNamespace as se, BAR_MAP as Ne, renderThumbStyle as Ce, GAP as k, SCOPE as Ae, scrollbarEmits as Me, scrollbarProps as Pe } from "element-plus";
5
+ import { sleep as ee } from "@vunk/shared/promise";
6
+ import { isString as ie } from "@vue/shared";
7
+ const Oe = {
9
8
  always: {
10
9
  type: Boolean,
11
- default: true
10
+ default: !0
12
11
  },
13
12
  minSize: {
14
13
  type: Number,
15
- required: true
14
+ required: !0
16
15
  },
17
16
  hideAfter: {
18
17
  type: Number,
19
18
  default: 0
20
19
  }
21
- };
22
-
23
- const thumbProps = {
20
+ }, _e = {
24
21
  vertical: Boolean,
25
22
  size: String,
26
23
  move: Number,
27
24
  ratio: {
28
25
  type: Number,
29
- required: true
26
+ required: !0
30
27
  },
31
28
  always: Boolean,
32
29
  hideAfter: {
33
30
  type: Number,
34
31
  default: 0
35
32
  }
36
- };
37
-
38
- var _sfc_main$2 = /* @__PURE__ */ defineComponent({
33
+ }, te = /* @__PURE__ */ Y({
39
34
  __name: "thumb",
40
- props: thumbProps,
41
- setup(__props, { expose: __expose }) {
42
- __expose();
43
- const props = __props;
44
- const scrollbar = inject(scrollbarContextKey);
45
- const ns = useNamespace("scrollbar");
46
- const instance = ref();
47
- const thumb = ref();
48
- const thumbState = ref({});
49
- const visible = ref(false);
50
- let cursorDown = false;
51
- let cursorLeave = false;
52
- let baseScrollHeight = 0;
53
- let baseScrollWidth = 0;
54
- let originalOnSelectStart = isClient ? document.onselectstart : null;
55
- const bar = computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
56
- const thumbStyle = computed(
57
- () => renderThumbStyle({
58
- size: props.size,
59
- move: props.move,
60
- bar: bar.value
35
+ props: _e,
36
+ setup(r) {
37
+ const h = r, u = ne(F), n = se("scrollbar"), f = p(), v = p(), z = p({}), b = p(!1);
38
+ let g = !1, s = !1, m = 0, c = 0, l = He ? document.onselectstart : null;
39
+ const t = L(() => Ne[h.vertical ? "vertical" : "horizontal"]), w = L(
40
+ () => Ce({
41
+ size: h.size,
42
+ move: h.move,
43
+ bar: t.value
61
44
  })
62
- );
63
- const offsetRatio = computed(
45
+ ), E = L(
64
46
  () => (
65
47
  // offsetRatioX = original width of thumb / current width of thumb / ratioX
66
48
  // offsetRatioY = original height of thumb / current height of thumb / ratioY
67
49
  // instance height = wrap height - GAP
68
- instance.value[bar.value.offset] ** 2 / scrollbar.wrapElement[bar.value.scrollSize] / props.ratio / thumb.value[bar.value.offset]
50
+ f.value[t.value.offset] ** 2 / u.wrapElement[t.value.scrollSize] / h.ratio / v.value[t.value.offset]
69
51
  )
70
52
  );
71
- function clickThumbHandler(e) {
72
- e.stopPropagation();
73
- if (e.ctrlKey || [1, 2].includes(e.button))
74
- return;
75
- window.getSelection()?.removeAllRanges();
76
- startDrag(e);
77
- const el = e.currentTarget;
78
- if (!el)
53
+ function o(a) {
54
+ if (a.stopPropagation(), a.ctrlKey || [1, 2].includes(a.button))
79
55
  return;
80
- thumbState.value[bar.value.axis] = el[bar.value.offset] - (e[bar.value.client] - el.getBoundingClientRect()[bar.value.direction]);
56
+ window.getSelection()?.removeAllRanges(), S(a);
57
+ const d = a.currentTarget;
58
+ d && (z.value[t.value.axis] = d[t.value.offset] - (a[t.value.client] - d.getBoundingClientRect()[t.value.direction]));
81
59
  }
82
- function clickTrackHandler(e) {
83
- if (!thumb.value || !instance.value || !scrollbar.wrapElement)
60
+ function y(a) {
61
+ if (!v.value || !f.value || !u.wrapElement)
84
62
  return;
85
- const offset = Math.abs(
86
- e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]
87
- );
88
- const thumbHalf = thumb.value[bar.value.offset] / 2;
89
- const thumbPositionPercentage = (offset - thumbHalf) * 100 * offsetRatio.value / instance.value[bar.value.offset];
90
- scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * scrollbar.wrapElement[bar.value.scrollSize] / 100;
63
+ const d = Math.abs(
64
+ a.target.getBoundingClientRect()[t.value.direction] - a[t.value.client]
65
+ ), T = v.value[t.value.offset] / 2, C = (d - T) * 100 * E.value / f.value[t.value.offset];
66
+ u.wrapElement[t.value.scroll] = C * u.wrapElement[t.value.scrollSize] / 100;
91
67
  }
92
- function startDrag(e) {
93
- e.stopImmediatePropagation();
94
- cursorDown = true;
95
- baseScrollHeight = scrollbar.wrapElement.scrollHeight;
96
- baseScrollWidth = scrollbar.wrapElement.scrollWidth;
97
- document.addEventListener("mousemove", mouseMoveDocumentHandler);
98
- document.addEventListener("mouseup", mouseUpDocumentHandler);
99
- originalOnSelectStart = document.onselectstart;
100
- document.onselectstart = () => false;
68
+ function S(a) {
69
+ a.stopImmediatePropagation(), g = !0, m = u.wrapElement.scrollHeight, c = u.wrapElement.scrollWidth, document.addEventListener("mousemove", _), document.addEventListener("mouseup", N), l = document.onselectstart, document.onselectstart = () => !1;
101
70
  }
102
- function mouseMoveDocumentHandler(e) {
103
- if (!instance.value || !thumb.value)
104
- return;
105
- if (cursorDown === false)
71
+ function _(a) {
72
+ if (!f.value || !v.value || g === !1)
106
73
  return;
107
- const prevPage = thumbState.value[bar.value.axis];
108
- if (!prevPage)
74
+ const d = z.value[t.value.axis];
75
+ if (!d)
109
76
  return;
110
- const offset = (instance.value.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]) * -1;
111
- const thumbClickPosition = thumb.value[bar.value.offset] - prevPage;
112
- const thumbPositionPercentage = (offset - thumbClickPosition) * 100 * offsetRatio.value / instance.value[bar.value.offset];
113
- if (bar.value.scroll === "scrollLeft") {
114
- scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollWidth / 100;
115
- } else {
116
- scrollbar.wrapElement[bar.value.scroll] = thumbPositionPercentage * baseScrollHeight / 100;
117
- }
77
+ const T = (f.value.getBoundingClientRect()[t.value.direction] - a[t.value.client]) * -1, C = v.value[t.value.offset] - d, x = (T - C) * 100 * E.value / f.value[t.value.offset];
78
+ t.value.scroll === "scrollLeft" ? u.wrapElement[t.value.scroll] = x * c / 100 : u.wrapElement[t.value.scroll] = x * m / 100;
118
79
  }
119
- function mouseUpDocumentHandler() {
120
- cursorDown = false;
121
- thumbState.value[bar.value.axis] = 0;
122
- document.removeEventListener("mousemove", mouseMoveDocumentHandler);
123
- document.removeEventListener("mouseup", mouseUpDocumentHandler);
124
- restoreOnselectstart();
125
- const hidden = () => cursorLeave && (visible.value = false);
126
- sleep(props.hideAfter).then(hidden);
80
+ function N() {
81
+ g = !1, z.value[t.value.axis] = 0, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", N), I();
82
+ const a = () => s && (b.value = !1);
83
+ ee(h.hideAfter).then(a);
127
84
  }
128
- function mouseMoveScrollbarHandler() {
129
- cursorLeave = false;
130
- visible.value = !!props.size;
85
+ function W() {
86
+ s = !1, b.value = !!h.size;
131
87
  }
132
- function mouseLeaveScrollbarHandler() {
133
- cursorLeave = true;
134
- if (cursorDown) {
135
- visible.value = true;
136
- } else {
137
- sleep(props.hideAfter).then(() => {
138
- if (cursorLeave)
139
- visible.value = false;
140
- });
141
- }
88
+ function B() {
89
+ s = !0, g ? b.value = !0 : ee(h.hideAfter).then(() => {
90
+ s && (b.value = !1);
91
+ });
142
92
  }
143
- onBeforeUnmount(() => {
144
- restoreOnselectstart();
145
- document.removeEventListener("mouseup", mouseUpDocumentHandler);
93
+ re(() => {
94
+ I(), document.removeEventListener("mouseup", N);
146
95
  });
147
- function restoreOnselectstart() {
148
- if (document.onselectstart !== originalOnSelectStart)
149
- document.onselectstart = originalOnSelectStart;
96
+ function I() {
97
+ document.onselectstart !== l && (document.onselectstart = l);
150
98
  }
151
- useEventListener(
152
- toRef(scrollbar, "scrollbarElement"),
99
+ return X(
100
+ J(u, "scrollbarElement"),
153
101
  "mousemove",
154
- mouseMoveScrollbarHandler
155
- );
156
- useEventListener(
157
- toRef(scrollbar, "scrollbarElement"),
102
+ W
103
+ ), X(
104
+ J(u, "scrollbarElement"),
158
105
  "mouseleave",
159
- mouseLeaveScrollbarHandler
160
- );
161
- const __returned__ = { props, scrollbar, ns, instance, thumb, thumbState, visible, get cursorDown() {
162
- return cursorDown;
163
- }, set cursorDown(v) {
164
- cursorDown = v;
165
- }, get cursorLeave() {
166
- return cursorLeave;
167
- }, set cursorLeave(v) {
168
- cursorLeave = v;
169
- }, get baseScrollHeight() {
170
- return baseScrollHeight;
171
- }, set baseScrollHeight(v) {
172
- baseScrollHeight = v;
173
- }, get baseScrollWidth() {
174
- return baseScrollWidth;
175
- }, set baseScrollWidth(v) {
176
- baseScrollWidth = v;
177
- }, get originalOnSelectStart() {
178
- return originalOnSelectStart;
179
- }, set originalOnSelectStart(v) {
180
- originalOnSelectStart = v;
181
- }, bar, thumbStyle, offsetRatio, clickThumbHandler, clickTrackHandler, startDrag, mouseMoveDocumentHandler, mouseUpDocumentHandler, mouseMoveScrollbarHandler, mouseLeaveScrollbarHandler, restoreOnselectstart };
182
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
183
- return __returned__;
184
- }
185
- });
186
-
187
- function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
188
- return openBlock(), createBlock(Transition, {
189
- name: $setup.ns.b("fade"),
190
- persisted: ""
191
- }, {
192
- default: withCtx(() => [
193
- withDirectives(createElementVNode(
194
- "div",
195
- {
196
- ref: "instance",
197
- class: normalizeClass([$setup.ns.e("bar"), $setup.ns.is($setup.bar.key)]),
198
- onMousedown: $setup.clickTrackHandler,
199
- onMousemove: $setup.mouseMoveScrollbarHandler,
200
- onMouseleave: $setup.mouseLeaveScrollbarHandler,
201
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {
106
+ B
107
+ ), (a, d) => (P(), $(ve, {
108
+ name: R(n).b("fade")
109
+ }, {
110
+ default: j(() => [
111
+ me(K("div", {
112
+ ref_key: "instance",
113
+ ref: f,
114
+ class: O([R(n).e("bar"), R(n).is(t.value.key)]),
115
+ onMousedown: y,
116
+ onMousemove: W,
117
+ onMouseleave: B,
118
+ onClick: d[0] || (d[0] = de(() => {
202
119
  }, ["stop"]))
203
- },
204
- [
205
- createElementVNode(
206
- "div",
207
- {
208
- ref: "thumb",
209
- class: normalizeClass($setup.ns.e("thumb")),
210
- style: normalizeStyle($setup.thumbStyle),
211
- onMousedown: $setup.clickThumbHandler
212
- },
213
- null,
214
- 38
215
- /* CLASS, STYLE, NEED_HYDRATION */
216
- )
217
- ],
218
- 34
219
- /* CLASS, NEED_HYDRATION */
220
- ), [
221
- [vShow, _ctx.always || $setup.visible]
222
- ])
223
- ]),
224
- _: 1
225
- /* STABLE */
226
- }, 8, ["name"]);
227
- }
228
- var Thumb = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/scrollbar/src/thumb.vue"]]);
229
-
230
- var _sfc_main$1 = /* @__PURE__ */ defineComponent({
120
+ }, [
121
+ K("div", {
122
+ ref_key: "thumb",
123
+ ref: v,
124
+ class: O(R(n).e("thumb")),
125
+ style: U(w.value),
126
+ onMousedown: o
127
+ }, null, 38)
128
+ ], 34), [
129
+ [pe, a.always || b.value]
130
+ ])
131
+ ]),
132
+ _: 1
133
+ }, 8, ["name"]));
134
+ }
135
+ }), We = /* @__PURE__ */ Y({
231
136
  __name: "bar",
232
- props: barProps,
233
- setup(__props, { expose: __expose }) {
234
- const props = __props;
235
- const scrollbar = inject(scrollbarContextKey);
236
- const moveX = ref(0);
237
- const moveY = ref(0);
238
- const sizeWidth = ref("");
239
- const sizeHeight = ref("");
240
- const ratioY = ref(1);
241
- const ratioX = ref(1);
242
- function handleScroll(wrap) {
243
- if (wrap) {
244
- const offsetHeight = wrap.offsetHeight - GAP;
245
- const offsetWidth = wrap.offsetWidth - GAP;
246
- moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
247
- moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
137
+ props: Oe,
138
+ setup(r, { expose: h }) {
139
+ const u = r, n = ne(F), f = p(0), v = p(0), z = p(""), b = p(""), g = p(1), s = p(1);
140
+ function m(l) {
141
+ if (l) {
142
+ const t = l.offsetHeight - k, w = l.offsetWidth - k;
143
+ v.value = l.scrollTop * 100 / t * g.value, f.value = l.scrollLeft * 100 / w * s.value;
248
144
  }
249
145
  }
250
- function update() {
251
- const wrap = scrollbar?.wrapElement;
252
- if (!wrap)
146
+ function c() {
147
+ const l = n?.wrapElement;
148
+ if (!l)
253
149
  return;
254
- const offsetHeight = wrap.offsetHeight - GAP;
255
- const offsetWidth = wrap.offsetWidth - GAP;
256
- const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
257
- const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
258
- const height = Math.max(originalHeight, props.minSize);
259
- const width = Math.max(originalWidth, props.minSize);
260
- ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
261
- ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
262
- sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : "";
263
- sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : "";
150
+ const t = l.offsetHeight - k, w = l.offsetWidth - k, E = t ** 2 / l.scrollHeight, o = w ** 2 / l.scrollWidth, y = Math.max(E, u.minSize), S = Math.max(o, u.minSize);
151
+ g.value = E / (t - E) / (y / (t - y)), s.value = o / (w - o) / (S / (w - S)), b.value = y + k < t ? `${y}px` : "", z.value = S + k < w ? `${S}px` : "";
264
152
  }
265
- __expose({
266
- handleScroll,
267
- update
268
- });
269
- const __returned__ = { props, scrollbar, moveX, moveY, sizeWidth, sizeHeight, ratioY, ratioX, handleScroll, update, Thumb };
270
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
271
- return __returned__;
272
- }
273
- });
274
-
275
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
276
- return openBlock(), createElementBlock(
277
- Fragment,
278
- null,
279
- [
280
- createVNode($setup["Thumb"], {
281
- move: $setup.moveX,
282
- ratio: $setup.ratioX,
283
- size: $setup.sizeWidth,
284
- always: _ctx.always,
285
- "hide-after": _ctx.hideAfter
153
+ return h({
154
+ handleScroll: m,
155
+ update: c
156
+ }), (l, t) => (P(), ae(he, null, [
157
+ q(te, {
158
+ move: f.value,
159
+ ratio: s.value,
160
+ size: z.value,
161
+ always: l.always,
162
+ "hide-after": l.hideAfter
286
163
  }, null, 8, ["move", "ratio", "size", "always", "hide-after"]),
287
- createVNode($setup["Thumb"], {
288
- move: $setup.moveY,
289
- ratio: $setup.ratioY,
290
- size: $setup.sizeHeight,
164
+ q(te, {
165
+ move: v.value,
166
+ ratio: g.value,
167
+ size: b.value,
291
168
  vertical: "",
292
- always: _ctx.always,
293
- "hide-after": _ctx.hideAfter
169
+ always: l.always,
170
+ "hide-after": l.hideAfter
294
171
  }, null, 8, ["move", "ratio", "size", "always", "hide-after"])
295
- ],
296
- 64
297
- /* STABLE_FRAGMENT */
298
- );
299
- }
300
- var Bar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/scrollbar/src/bar.vue"]]);
301
-
302
- /**
303
- * @vue/shared v3.5.13
304
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
305
- * @license MIT
306
- **/
307
-
308
-
309
-
310
- !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
311
- !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
312
- const isString = (val) => typeof val === "string";
313
-
314
- const isNumber = (val) => typeof val === "number";
315
- function isStringNumber(val) {
316
- if (!isString(val)) {
317
- return false;
172
+ ], 64));
318
173
  }
319
- return !Number.isNaN(Number(val));
174
+ }), M = (r) => typeof r == "number";
175
+ function Be(r) {
176
+ return ie(r) ? !Number.isNaN(Number(r)) : !1;
320
177
  }
321
- function addUnit(value, defaultUnit = "px") {
322
- if (!value)
178
+ function oe(r, h = "px") {
179
+ if (!r)
323
180
  return "";
324
- if (isNumber(value) || isStringNumber(value)) {
325
- return `${value}${defaultUnit}`;
326
- } else if (isString(value)) {
327
- return value;
328
- }
329
- console.warn(SCOPE, "binding value must be a string or number");
181
+ if (M(r) || Be(r))
182
+ return `${r}${h}`;
183
+ if (ie(r))
184
+ return r;
185
+ console.warn(Ae, "binding value must be a string or number");
330
186
  }
331
-
332
- const COMPONENT_NAME = "ElScrollbar";
333
- var _sfc_main = /* @__PURE__ */ defineComponent({
187
+ const Ie = ["tabindex"], le = "ElScrollbar", V = /* @__PURE__ */ Y({
334
188
  __name: "index",
335
189
  props: {
336
- ...scrollbarProps,
190
+ ...Pe,
337
191
  appendTo: null,
338
192
  hideAfter: {
339
193
  type: Number,
@@ -341,353 +195,220 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
341
195
  }
342
196
  },
343
197
  emits: {
344
- ...scrollbarEmits,
345
- contentInsufficient: (_) => true
198
+ ...Me,
199
+ contentInsufficient: (r) => !0
346
200
  },
347
- setup(__props, { expose: __expose, emit: __emit }) {
348
- const props = __props;
349
- const emit = __emit;
350
- const ns = useNamespace("scrollbar");
351
- let stopResizeObserver;
352
- let stopWrapResizeObserver;
353
- let stopResizeListener;
354
- let wrapScrollTop = 0;
355
- let wrapScrollLeft = 0;
356
- let direction = "";
357
- const distanceScrollState = {
358
- bottom: false,
359
- top: false,
360
- right: false,
361
- left: false
201
+ setup(r, { expose: h, emit: u }) {
202
+ const n = r, f = u, v = se("scrollbar");
203
+ let z, b, g, s = 0, m = 0, c = "";
204
+ const l = {
205
+ bottom: !1,
206
+ top: !1,
207
+ right: !1,
208
+ left: !1
362
209
  };
363
- let hasEmittedInsufficient = false;
364
- let stopContentMutationObserver;
365
- const scrollbarRef = ref();
366
- const wrapRef = ref();
367
- const resizeRef = ref();
368
- const barRef = ref();
369
- const wrapStyle = computed(() => {
370
- const style = {};
371
- if (props.height)
372
- style.height = addUnit(props.height);
373
- if (props.maxHeight)
374
- style.maxHeight = addUnit(props.maxHeight);
375
- return [props.wrapStyle, style];
376
- });
377
- const wrapKls = computed(() => {
378
- return [
379
- props.wrapClass,
380
- ns.e("wrap"),
381
- { [ns.em("wrap", "hidden-default")]: !props.native }
382
- ];
383
- });
384
- const resizeKls = computed(() => {
385
- return [ns.e("view"), props.viewClass];
386
- });
387
- function shouldSkipDirection(direction2) {
388
- return distanceScrollState[direction2] ?? false;
210
+ let t = !1, w;
211
+ const E = p(), o = p(), y = p(), S = p(), _ = L(() => {
212
+ const e = {};
213
+ return n.height && (e.height = oe(n.height)), n.maxHeight && (e.maxHeight = oe(n.maxHeight)), [n.wrapStyle, e];
214
+ }), N = L(() => [
215
+ n.wrapClass,
216
+ v.e("wrap"),
217
+ { [v.em("wrap", "hidden-default")]: !n.native }
218
+ ]), W = L(() => [v.e("view"), n.viewClass]);
219
+ function B(e) {
220
+ return l[e] ?? !1;
389
221
  }
390
- const DIRECTION_PAIRS = {
222
+ const I = {
391
223
  top: "bottom",
392
224
  bottom: "top",
393
225
  left: "right",
394
226
  right: "left"
395
227
  };
396
- function updateTriggerStatus(arrivedStates) {
397
- const oppositeDirection = DIRECTION_PAIRS[direction];
398
- if (!oppositeDirection)
228
+ function a(e) {
229
+ const i = I[c];
230
+ if (!i)
399
231
  return;
400
- const arrived = arrivedStates[direction];
401
- const oppositeArrived = arrivedStates[oppositeDirection];
402
- if (arrived && !distanceScrollState[direction]) {
403
- distanceScrollState[direction] = true;
404
- }
405
- if (!oppositeArrived && distanceScrollState[oppositeDirection]) {
406
- distanceScrollState[oppositeDirection] = false;
407
- }
232
+ const A = e[c], fe = e[i];
233
+ A && !l[c] && (l[c] = !0), !fe && l[i] && (l[i] = !1);
408
234
  }
409
- function handleScroll() {
410
- if (wrapRef.value) {
411
- barRef.value?.handleScroll(wrapRef.value);
412
- const prevTop = wrapScrollTop;
413
- const prevLeft = wrapScrollLeft;
414
- wrapScrollTop = wrapRef.value.scrollTop;
415
- wrapScrollLeft = wrapRef.value.scrollLeft;
416
- const arrivedStates = {
417
- bottom: wrapScrollTop + wrapRef.value.clientHeight >= wrapRef.value.scrollHeight - props.distance,
418
- top: wrapScrollTop <= props.distance && prevTop !== 0,
419
- right: wrapScrollLeft + wrapRef.value.clientWidth >= wrapRef.value.scrollWidth - props.distance && prevLeft !== wrapScrollLeft,
420
- left: wrapScrollLeft <= props.distance && prevLeft !== 0
235
+ function d() {
236
+ if (o.value) {
237
+ S.value?.handleScroll(o.value);
238
+ const e = s, i = m;
239
+ s = o.value.scrollTop, m = o.value.scrollLeft;
240
+ const A = {
241
+ bottom: s + o.value.clientHeight >= o.value.scrollHeight - n.distance,
242
+ top: s <= n.distance && e !== 0,
243
+ right: m + o.value.clientWidth >= o.value.scrollWidth - n.distance && i !== m,
244
+ left: m <= n.distance && i !== 0
421
245
  };
422
- emit("scroll", {
423
- scrollTop: wrapScrollTop,
424
- scrollLeft: wrapScrollLeft
425
- });
426
- if (prevTop !== wrapScrollTop) {
427
- direction = wrapScrollTop > prevTop ? "bottom" : "top";
428
- }
429
- if (prevLeft !== wrapScrollLeft) {
430
- direction = wrapScrollLeft > prevLeft ? "right" : "left";
431
- }
432
- if (props.distance > 0) {
433
- if (shouldSkipDirection(direction)) {
246
+ if (f("scroll", {
247
+ scrollTop: s,
248
+ scrollLeft: m
249
+ }), e !== s && (c = s > e ? "bottom" : "top"), i !== m && (c = m > i ? "right" : "left"), n.distance > 0) {
250
+ if (B(c))
434
251
  return;
435
- }
436
- updateTriggerStatus(arrivedStates);
252
+ a(A);
437
253
  }
438
- if (arrivedStates[direction])
439
- emit("end-reached", direction);
254
+ A[c] && f("end-reached", c);
440
255
  }
441
256
  }
442
- function scrollTo(arg1, arg2) {
443
- if (isObject(arg1)) {
444
- wrapRef.value.scrollTo(arg1);
445
- } else if (isNumber(arg1) && isNumber(arg2)) {
446
- wrapRef.value.scrollTo(arg1, arg2);
447
- }
257
+ function T(e, i) {
258
+ Re(e) ? o.value.scrollTo(e) : M(e) && M(i) && o.value.scrollTo(e, i);
448
259
  }
449
- function setScrollTop(value) {
450
- if (!isNumber(value)) {
451
- console.warn(COMPONENT_NAME, "value must be a number");
260
+ function C(e) {
261
+ if (!M(e)) {
262
+ console.warn(le, "value must be a number");
452
263
  return;
453
264
  }
454
- wrapRef.value.scrollTop = value;
265
+ o.value.scrollTop = e;
455
266
  }
456
- function setScrollLeft(value) {
457
- if (!isNumber(value)) {
458
- console.warn(COMPONENT_NAME, "value must be a number");
267
+ function x(e) {
268
+ if (!M(e)) {
269
+ console.warn(le, "value must be a number");
459
270
  return;
460
271
  }
461
- wrapRef.value.scrollLeft = value;
272
+ o.value.scrollLeft = e;
462
273
  }
463
- function update() {
464
- barRef.value?.update();
465
- distanceScrollState[direction] = false;
466
- checkContentInsufficient();
274
+ function H() {
275
+ S.value?.update(), l[c] = !1, G();
467
276
  }
468
- function checkContentInsufficient() {
469
- if (!wrapRef.value)
277
+ function G() {
278
+ if (!o.value)
470
279
  return;
471
- const verticalInsufficient = wrapRef.value.scrollHeight <= wrapRef.value.clientHeight;
472
- const horizontalInsufficient = wrapRef.value.scrollWidth <= wrapRef.value.clientWidth;
473
- const isInsufficient = verticalInsufficient || horizontalInsufficient;
474
- if (isInsufficient) {
475
- if (!hasEmittedInsufficient) {
476
- hasEmittedInsufficient = true;
477
- nextTick(() => {
478
- emit("contentInsufficient", {
479
- vertical: verticalInsufficient,
480
- horizontal: horizontalInsufficient
481
- });
482
- });
483
- }
484
- } else {
485
- hasEmittedInsufficient = false;
486
- }
280
+ const e = o.value.scrollHeight <= o.value.clientHeight, i = o.value.scrollWidth <= o.value.clientWidth;
281
+ e || i ? t || (t = !0, D(() => {
282
+ f("contentInsufficient", {
283
+ vertical: e,
284
+ horizontal: i
285
+ });
286
+ })) : t = !1;
487
287
  }
488
- watch(
489
- () => props.noresize,
490
- (noresize) => {
491
- if (noresize) {
492
- stopResizeObserver?.();
493
- stopWrapResizeObserver?.();
494
- stopResizeListener?.();
495
- } else {
496
- ({ stop: stopResizeObserver } = useResizeObserver(resizeRef, update));
497
- ({ stop: stopWrapResizeObserver } = useResizeObserver(wrapRef, update));
498
- stopResizeListener = useEventListener("resize", update);
499
- }
288
+ Q(
289
+ () => n.noresize,
290
+ (e) => {
291
+ e ? (z?.(), b?.(), g?.()) : ({ stop: z } = Z(y, H), { stop: b } = Z(o, H), g = X("resize", H));
500
292
  },
501
- { immediate: true }
502
- );
503
- watch(
504
- () => [props.maxHeight, props.height],
293
+ { immediate: !0 }
294
+ ), Q(
295
+ () => [n.maxHeight, n.height],
505
296
  () => {
506
- if (!props.native) {
507
- nextTick(() => {
508
- update();
509
- if (wrapRef.value) {
510
- barRef.value?.handleScroll(wrapRef.value);
511
- }
512
- });
513
- }
514
- }
515
- );
516
- provide(
517
- scrollbarContextKey,
518
- reactive({
519
- scrollbarElement: scrollbarRef,
520
- wrapElement: wrapRef
521
- })
522
- );
523
- onActivated(() => {
524
- if (wrapRef.value) {
525
- wrapRef.value.scrollTop = wrapScrollTop;
526
- wrapRef.value.scrollLeft = wrapScrollLeft;
527
- }
528
- });
529
- onMounted(() => {
530
- if (!props.native) {
531
- nextTick(() => {
532
- update();
297
+ n.native || D(() => {
298
+ H(), o.value && S.value?.handleScroll(o.value);
533
299
  });
534
300
  }
535
- ({ stop: stopContentMutationObserver } = useMutationObserver(
536
- resizeRef,
301
+ ), be(
302
+ F,
303
+ ge({
304
+ scrollbarElement: E,
305
+ wrapElement: o
306
+ })
307
+ ), we(() => {
308
+ o.value && (o.value.scrollTop = s, o.value.scrollLeft = m);
309
+ }), Se(() => {
310
+ n.native || D(() => {
311
+ H();
312
+ }), { stop: w } = ke(
313
+ y,
537
314
  () => {
538
- hasEmittedInsufficient = false;
539
- checkContentInsufficient();
315
+ t = !1, G();
540
316
  },
541
- { childList: true, subtree: true }
542
- ));
543
- });
544
- onUpdated(() => {
545
- nextTick(() => {
546
- update();
317
+ { childList: !0, subtree: !0 }
318
+ );
319
+ }), ye(() => {
320
+ D(() => {
321
+ H();
547
322
  });
323
+ }), re(() => {
324
+ w?.();
548
325
  });
549
- onBeforeUnmount(() => {
550
- stopContentMutationObserver?.();
551
- });
552
- function scrollToBottom(options) {
553
- if (!wrapRef.value) {
554
- return;
555
- }
556
- scrollTo({
557
- top: wrapRef.value.scrollHeight,
326
+ function ue(e) {
327
+ o.value && T({
328
+ top: o.value.scrollHeight,
558
329
  behavior: "smooth",
559
- ...options
330
+ ...e
560
331
  });
561
332
  }
562
- function scrollToTop(options) {
563
- if (!wrapRef.value) {
564
- return;
565
- }
566
- scrollTo({
333
+ function ce(e) {
334
+ o.value && T({
567
335
  top: 0,
568
336
  behavior: "smooth",
569
- ...options
337
+ ...e
570
338
  });
571
339
  }
572
- __expose({
340
+ return h({
573
341
  /** @description scrollToTop method */
574
- scrollToTop,
342
+ scrollToTop: ce,
575
343
  /** @description scrollToBottom method */
576
- scrollToBottom,
344
+ scrollToBottom: ue,
577
345
  /** @description scrollbar wrap ref */
578
- wrapRef,
346
+ wrapRef: o,
579
347
  /** @description update scrollbar state manually */
580
- update,
348
+ update: H,
581
349
  /** @description scrolls to a particular set of coordinates */
582
- scrollTo,
350
+ scrollTo: T,
583
351
  /** @description set distance to scroll top */
584
- setScrollTop,
352
+ setScrollTop: C,
585
353
  /** @description set distance to scroll left */
586
- setScrollLeft,
354
+ setScrollLeft: x,
587
355
  /** @description handle scroll event */
588
- handleScroll
589
- });
590
- const __returned__ = { props, emit, COMPONENT_NAME, ns, get stopResizeObserver() {
591
- return stopResizeObserver;
592
- }, set stopResizeObserver(v) {
593
- stopResizeObserver = v;
594
- }, get stopWrapResizeObserver() {
595
- return stopWrapResizeObserver;
596
- }, set stopWrapResizeObserver(v) {
597
- stopWrapResizeObserver = v;
598
- }, get stopResizeListener() {
599
- return stopResizeListener;
600
- }, set stopResizeListener(v) {
601
- stopResizeListener = v;
602
- }, get wrapScrollTop() {
603
- return wrapScrollTop;
604
- }, set wrapScrollTop(v) {
605
- wrapScrollTop = v;
606
- }, get wrapScrollLeft() {
607
- return wrapScrollLeft;
608
- }, set wrapScrollLeft(v) {
609
- wrapScrollLeft = v;
610
- }, get direction() {
611
- return direction;
612
- }, set direction(v) {
613
- direction = v;
614
- }, distanceScrollState, get hasEmittedInsufficient() {
615
- return hasEmittedInsufficient;
616
- }, set hasEmittedInsufficient(v) {
617
- hasEmittedInsufficient = v;
618
- }, get stopContentMutationObserver() {
619
- return stopContentMutationObserver;
620
- }, set stopContentMutationObserver(v) {
621
- stopContentMutationObserver = v;
622
- }, scrollbarRef, wrapRef, resizeRef, barRef, wrapStyle, wrapKls, resizeKls, shouldSkipDirection, DIRECTION_PAIRS, updateTriggerStatus, handleScroll, scrollTo, setScrollTop, setScrollLeft, update, checkContentInsufficient, scrollToBottom, scrollToTop, get VkAsyncTeleport() {
623
- return VkAsyncTeleport;
624
- }, Bar };
625
- Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
626
- return __returned__;
627
- }
628
- });
629
-
630
- const _hoisted_1 = ["tabindex"];
631
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
632
- return openBlock(), createElementBlock(
633
- "div",
634
- {
635
- ref: "scrollbarRef",
636
- class: normalizeClass($setup.ns.b())
637
- },
638
- [
639
- createElementVNode("div", {
640
- ref: "wrapRef",
641
- class: normalizeClass($setup.wrapKls),
642
- style: normalizeStyle($setup.wrapStyle),
643
- tabindex: _ctx.tabindex,
644
- onScroll: $setup.handleScroll
356
+ handleScroll: d
357
+ }), (e, i) => (P(), ae("div", {
358
+ ref_key: "scrollbarRef",
359
+ ref: E,
360
+ class: O(R(v).b())
361
+ }, [
362
+ K("div", {
363
+ ref_key: "wrapRef",
364
+ ref: o,
365
+ class: O(N.value),
366
+ style: U(_.value),
367
+ tabindex: e.tabindex,
368
+ onScroll: d
645
369
  }, [
646
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
647
- id: _ctx.id,
648
- ref: "resizeRef",
649
- class: normalizeClass($setup.resizeKls),
650
- style: normalizeStyle(_ctx.viewStyle),
651
- role: _ctx.role,
652
- "aria-label": _ctx.ariaLabel,
653
- "aria-orientation": _ctx.ariaOrientation
370
+ (P(), $(Ee(e.tag), {
371
+ id: e.id,
372
+ ref_key: "resizeRef",
373
+ ref: y,
374
+ class: O(W.value),
375
+ style: U(e.viewStyle),
376
+ role: e.role,
377
+ "aria-label": e.ariaLabel,
378
+ "aria-orientation": e.ariaOrientation
654
379
  }, {
655
- default: withCtx(() => [
656
- renderSlot(_ctx.$slots, "default")
380
+ default: j(() => [
381
+ Te(e.$slots, "default")
657
382
  ]),
658
383
  _: 3
659
- /* FORWARDED */
660
384
  }, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
661
- ], 46, _hoisted_1),
662
- !_ctx.native ? (openBlock(), createBlock($setup["VkAsyncTeleport"], {
385
+ ], 46, Ie),
386
+ e.native ? ze("", !0) : (P(), $(R(Le), {
663
387
  key: 0,
664
- disabled: !$props.appendTo,
665
- to: $props.appendTo
388
+ disabled: !r.appendTo,
389
+ to: r.appendTo
666
390
  }, {
667
- default: withCtx(() => [
668
- createVNode($setup["Bar"], {
669
- ref: "barRef",
670
- always: _ctx.always,
671
- "min-size": _ctx.minSize,
672
- "hide-after": $props.hideAfter
391
+ default: j(() => [
392
+ q(We, {
393
+ ref_key: "barRef",
394
+ ref: S,
395
+ always: e.always,
396
+ "min-size": e.minSize,
397
+ "hide-after": r.hideAfter
673
398
  }, null, 8, ["always", "min-size", "hide-after"])
674
399
  ]),
675
400
  _: 1
676
- /* STABLE */
677
- }, 8, ["disabled", "to"])) : createCommentVNode("v-if", true)
678
- ],
679
- 2
680
- /* CLASS */
681
- );
682
- }
683
- var VkScrollbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/vunk-plus/vunk-plus/packages/components/scrollbar/src/index.vue"]]);
684
-
685
- var types = /*#__PURE__*/Object.freeze({
401
+ }, 8, ["disabled", "to"]))
402
+ ], 2));
403
+ }
404
+ }), Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
686
405
  __proto__: null
687
- });
688
-
689
- VkScrollbar.install = (app) => {
690
- app.component(VkScrollbar.name || "VkScrollbar", VkScrollbar);
406
+ }, Symbol.toStringTag, { value: "Module" }));
407
+ V.install = (r) => {
408
+ r.component(V.name || "VkScrollbar", V);
409
+ };
410
+ export {
411
+ V as VkScrollbar,
412
+ Ue as __VkScrollbar,
413
+ V as default
691
414
  };
692
-
693
- export { VkScrollbar, types as __VkScrollbar, VkScrollbar as default };