@vunk/plus 1.12.2 → 1.13.1
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.
- package/components/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/components/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/components/agent-chat-provider/index.cjs +1 -0
- package/components/agent-chat-provider/index.mjs +113 -187
- package/components/agent-chat-provider/src/index.vue.d.ts +3 -2
- package/components/avatar/index.cjs +1 -0
- package/components/avatar/index.mjs +25 -31
- package/components/avatar/src/index.vue.d.ts +40 -39
- package/components/broadcasting-markdown/__tests__/const.test.d.ts +1 -0
- package/components/broadcasting-markdown/__tests__/utils.test.d.ts +1 -0
- package/components/broadcasting-markdown/index.cjs +5 -0
- package/components/broadcasting-markdown/index.mjs +346 -4376
- package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +18 -24
- package/components/broadcasting-markdown/src/index.vue.d.ts +101 -51
- package/components/broadcasting-markdown/src/paragraph.vue.d.ts +17 -29
- package/components/broadcasting-markdown/src/speech-error.vue.d.ts +2 -59
- package/components/bubble-list/index.cjs +1 -0
- package/components/bubble-list/index.mjs +220 -302
- package/components/bubble-list/src/core/index.vue.d.ts +40 -885
- package/components/bubble-list/src/core/loading.vue.d.ts +3 -0
- package/components/bubble-list/src/index.vue.d.ts +29 -1321
- package/components/bubble-templates/index.cjs +1 -0
- package/components/bubble-templates/index.mjs +34 -49
- package/components/bubble-templates/src/index.vue.d.ts +3 -224
- package/components/chat-independent/index.cjs +1 -0
- package/components/chat-independent/index.mjs +105 -212
- package/components/chat-independent/src/index.vue.d.ts +20 -2712
- package/components/components.css +1 -0
- package/components/drawer/index.cjs +1 -0
- package/components/drawer/index.mjs +53 -94
- package/components/drawer/src/ctx.d.ts +22 -22
- package/components/drawer/src/index.vue.d.ts +84 -557
- package/components/index.cjs +1 -0
- package/components/index.d.ts +1 -0
- package/components/lottie-animation/index.cjs +1 -0
- package/components/lottie-animation/index.mjs +36 -55
- package/components/lottie-animation/src/index.vue.d.ts +3 -2
- package/components/metahuman-broadcasting/index.cjs +1 -0
- package/components/metahuman-broadcasting/index.mjs +89 -140
- package/components/metahuman-broadcasting/src/index.vue.d.ts +16 -718
- package/components/monaco-editor/index.cjs +1 -0
- package/components/monaco-editor/index.mjs +68 -95
- package/components/monaco-editor/src/index.vue.d.ts +3 -2
- package/components/monaco-environment/index.cjs +1 -0
- package/components/monaco-environment/index.mjs +23 -38
- package/components/monaco-environment/src/index.vue.d.ts +2 -1
- package/components/pixi-frame/index.cjs +1 -0
- package/components/pixi-frame/index.mjs +941 -1969
- package/components/pixi-frame/src/apng.vue.d.ts +17 -73
- package/components/pixi-frame/src/bitmap-generator.vue.d.ts +24 -66
- package/components/pixi-frame/src/bitmap.vue.d.ts +28 -80
- package/components/pixi-frame/src/buffer-image.vue.d.ts +29 -97
- package/components/pixi-frame/src/core.vue.d.ts +20 -75
- package/components/pixi-frame/src/index.vue.d.ts +302 -237
- package/components/pixi-frame/src/provider.vue.d.ts +12 -1
- package/components/pixi-frame/src/video.vue.d.ts +17 -71
- package/components/pixi-frame/src/view.vue.d.ts +4 -16
- package/components/recorder-button/index.cjs +1 -0
- package/components/recorder-button/index.mjs +140 -269
- package/components/recorder-button/src/index.vue.d.ts +67 -66
- package/components/routes-menu-content/index.cjs +1 -0
- package/components/routes-menu-content/index.mjs +150 -229
- package/components/routes-menu-content/src/index.vue.d.ts +27 -26
- package/components/routes-menu-content/src/item/core/index.vue.d.ts +27 -26
- package/components/routes-menu-content/src/item/index.vue.d.ts +27 -26
- package/components/scrollbar/index.cjs +1 -0
- package/components/scrollbar/index.mjs +288 -567
- package/components/scrollbar/src/bar.vue.d.ts +6 -133
- package/components/scrollbar/src/index.vue.d.ts +66 -337
- package/components/scrollbar/src/thumb.vue.d.ts +3 -80
- package/components/sender/index.cjs +1 -0
- package/components/sender/index.mjs +156 -285
- package/components/sender/src/SenderHeader.vue.d.ts +14 -221
- package/components/sender/src/index.vue.d.ts +16 -505
- package/components/speech-button/index.cjs +1 -0
- package/components/speech-button/index.mjs +98 -144
- package/components/speech-button/src/LoadingIcon.vue.d.ts +2 -1
- package/components/speech-button/src/RecordingIcon.vue.d.ts +2 -1
- package/components/speech-button/src/index.vue.d.ts +6 -5
- package/components/table-columns/index.cjs +1 -0
- package/components/table-columns/index.mjs +48 -78
- package/components/table-columns/src/ctx.d.ts +10 -10
- package/components/table-columns/src/el-ctx.d.ts +1 -1
- package/components/table-columns/src/index.vue.d.ts +24 -23
- package/components/tables-v1/index.cjs +1 -0
- package/components/tables-v1/index.mjs +99 -160
- package/components/tables-v1/src/ctx.d.ts +28 -28
- package/components/tables-v1/src/el-ctx.d.ts +2 -2
- package/components/tables-v1/src/index.vue.d.ts +88 -2243
- package/components/tables-v1-checkbox/index.cjs +98 -0
- package/components/tables-v1-checkbox/index.mjs +1594 -3735
- package/components/tables-v1-checkbox/src/ctx.d.ts +26 -26
- package/components/tables-v1-checkbox/src/index.vue.d.ts +176 -2330
- package/components/text/index.cjs +1 -0
- package/components/text/index.mjs +70 -108
- package/components/text/src/ctx.d.ts +31 -31
- package/components/text/src/index.vue.d.ts +92 -1819
- package/components/thinking/index.cjs +1 -0
- package/components/thinking/index.mjs +127 -227
- package/components/thinking/src/index.vue.d.ts +22 -2044
- package/components/typing-markdown/index.cjs +1 -0
- package/components/typing-markdown/index.mjs +61 -201
- package/components/typing-markdown/src/index.vue.d.ts +3 -2
- package/components/vditor/index.cjs +1 -0
- package/components/vditor/index.mjs +121 -195
- package/components/vditor/src/ctx.d.ts +2 -2
- package/components/vditor/src/handle-fullscreen.vue.d.ts +3 -2
- package/components/vditor/src/handle-value.vue.d.ts +3 -2
- package/components/vditor/src/index.vue.d.ts +5 -4
- package/components/xgplayer/index.cjs +1 -0
- package/components/xgplayer/index.mjs +49 -90
- package/components/xgplayer/src/core.vue.d.ts +13 -18
- package/components/xgplayer/src/index.vue.d.ts +13 -67
- package/composables/el-breakpoints/index.cjs +1 -0
- package/composables/el-breakpoints/index.d.ts +10 -10
- package/composables/el-breakpoints/index.mjs +10 -12
- package/composables/index.cjs +1 -0
- package/composables/index.d.ts +1 -0
- package/composables/recorder/index.cjs +1 -0
- package/composables/recorder/index.mjs +9172 -14803
- package/element/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/element/bubble/index.cjs +3 -0
- package/element/bubble/index.d.ts +1 -1
- package/element/bubble/index.mjs +1 -1
- package/element/bubble/src/index.vue.d.ts +22 -22
- package/element/index.css +1 -1
- package/element/thinking/index.cjs +1 -0
- package/element/thinking/index.d.ts +1 -1
- package/element/thinking/index.mjs +1 -1
- package/element/thinking/src/index.vue.d.ts +26 -26
- package/element/thinking/src/types.d.ts +10 -0
- package/icons/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/icons/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/icons/end/index.cjs +1 -0
- package/icons/end/index.mjs +21 -26
- package/icons/end/src/index.vue.d.ts +3 -0
- package/icons/keyboard/index.cjs +1 -0
- package/icons/keyboard/index.mjs +21 -26
- package/icons/keyboard/src/index.vue.d.ts +3 -0
- package/icons/start/index.cjs +1 -0
- package/icons/start/index.mjs +21 -26
- package/icons/start/src/index.vue.d.ts +3 -0
- package/icons/voice/index.cjs +1 -0
- package/icons/voice/index.mjs +26 -44
- package/icons/voice/src/index.vue.d.ts +2 -3
- package/index.css +2 -558
- package/index.d.ts +1 -0
- package/package.json +78 -87
- package/shared/data/index.cjs +1 -0
- package/shared/data/index.mjs +16 -22
- package/shared/types/index.cjs +1 -0
- package/shared/types/index.d.ts +1 -0
- package/components/LinkOutlined.mjs +0 -1321
- package/components/_commonjsHelpers.mjs +0 -7
- package/components/_plugin-vue_export-helper.mjs +0 -9
- package/components/bubble-list/index.css +0 -70
- package/components/bubble-templates/index.css +0 -4
- package/components/chat-independent/index.css +0 -47
- package/components/drawer/index.css +0 -124
- package/components/index2.mjs +0 -78
- package/components/lottie-animation/index.css +0 -4
- package/components/monaco-editor/index.css +0 -4
- package/components/pixi-frame/index.css +0 -4
- package/components/recorder-button/index.css +0 -69
- package/components/sender/index.css +0 -22
- package/components/speech-button/index.css +0 -10
- package/components/tables-v1/index.css +0 -7
- package/components/tables-v1-checkbox/index.css +0 -8
- package/components/thinking/index.css +0 -125
- package/components/typing-markdown/index.css +0 -31
- package/components/vditor/index.css +0 -12
- package/components/xgplayer/index.css +0 -1
- package/icons/_plugin-vue_export-helper.mjs +0 -9
|
@@ -1,339 +1,193 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, computed, onBeforeUnmount, toRef, openBlock
|
|
2
|
-
import { useEventListener, isClient, useResizeObserver, useMutationObserver, isObject } from
|
|
3
|
-
import { VkAsyncTeleport } from
|
|
4
|
-
import { scrollbarContextKey, useNamespace, BAR_MAP, renderThumbStyle, GAP, SCOPE
|
|
5
|
-
import { sleep } from
|
|
6
|
-
import {
|
|
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:
|
|
10
|
+
default: !0
|
|
12
11
|
},
|
|
13
12
|
minSize: {
|
|
14
13
|
type: Number,
|
|
15
|
-
required:
|
|
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:
|
|
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:
|
|
41
|
-
setup(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
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
|
|
72
|
-
|
|
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
|
-
|
|
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
|
|
83
|
-
if (!
|
|
60
|
+
function y(a) {
|
|
61
|
+
if (!v.value || !f.value || !u.wrapElement)
|
|
84
62
|
return;
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
);
|
|
88
|
-
|
|
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
|
|
93
|
-
|
|
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
|
|
103
|
-
if (!
|
|
104
|
-
return;
|
|
105
|
-
if (cursorDown === false)
|
|
71
|
+
function _(a) {
|
|
72
|
+
if (!f.value || !v.value || g === !1)
|
|
106
73
|
return;
|
|
107
|
-
const
|
|
108
|
-
if (!
|
|
74
|
+
const d = z.value[t.value.axis];
|
|
75
|
+
if (!d)
|
|
109
76
|
return;
|
|
110
|
-
const
|
|
111
|
-
|
|
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
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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
|
|
129
|
-
|
|
130
|
-
visible.value = !!props.size;
|
|
85
|
+
function W() {
|
|
86
|
+
s = !1, b.value = !!h.size;
|
|
131
87
|
}
|
|
132
|
-
function
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
144
|
-
|
|
145
|
-
document.removeEventListener("mouseup", mouseUpDocumentHandler);
|
|
93
|
+
re(() => {
|
|
94
|
+
I(), document.removeEventListener("mouseup", N);
|
|
146
95
|
});
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
document.onselectstart = originalOnSelectStart;
|
|
96
|
+
function I() {
|
|
97
|
+
document.onselectstart !== l && (document.onselectstart = l);
|
|
150
98
|
}
|
|
151
|
-
|
|
152
|
-
|
|
99
|
+
return X(
|
|
100
|
+
J(u, "scrollbarElement"),
|
|
153
101
|
"mousemove",
|
|
154
|
-
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
toRef(scrollbar, "scrollbarElement"),
|
|
102
|
+
W
|
|
103
|
+
), X(
|
|
104
|
+
J(u, "scrollbarElement"),
|
|
158
105
|
"mouseleave",
|
|
159
|
-
|
|
160
|
-
)
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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:
|
|
233
|
-
setup(
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
|
251
|
-
const
|
|
252
|
-
if (!
|
|
146
|
+
function c() {
|
|
147
|
+
const l = n?.wrapElement;
|
|
148
|
+
if (!l)
|
|
253
149
|
return;
|
|
254
|
-
const
|
|
255
|
-
|
|
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
|
-
|
|
266
|
-
handleScroll,
|
|
267
|
-
update
|
|
268
|
-
})
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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
|
-
|
|
288
|
-
move:
|
|
289
|
-
ratio:
|
|
290
|
-
size:
|
|
164
|
+
q(te, {
|
|
165
|
+
move: v.value,
|
|
166
|
+
ratio: g.value,
|
|
167
|
+
size: b.value,
|
|
291
168
|
vertical: "",
|
|
292
|
-
always:
|
|
293
|
-
"hide-after":
|
|
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
|
-
|
|
174
|
+
}), M = (r) => typeof r == "number";
|
|
175
|
+
function Be(r) {
|
|
176
|
+
return ie(r) ? !Number.isNaN(Number(r)) : !1;
|
|
320
177
|
}
|
|
321
|
-
function
|
|
322
|
-
if (!
|
|
178
|
+
function oe(r, h = "px") {
|
|
179
|
+
if (!r)
|
|
323
180
|
return "";
|
|
324
|
-
if (
|
|
325
|
-
return `${
|
|
326
|
-
|
|
327
|
-
return
|
|
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
|
-
...
|
|
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
|
-
...
|
|
345
|
-
contentInsufficient: (
|
|
198
|
+
...Me,
|
|
199
|
+
contentInsufficient: (r) => !0
|
|
346
200
|
},
|
|
347
|
-
setup(
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
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
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
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
|
|
222
|
+
const I = {
|
|
391
223
|
top: "bottom",
|
|
392
224
|
bottom: "top",
|
|
393
225
|
left: "right",
|
|
394
226
|
right: "left"
|
|
395
227
|
};
|
|
396
|
-
function
|
|
397
|
-
const
|
|
398
|
-
if (!
|
|
228
|
+
function a(e) {
|
|
229
|
+
const i = I[c];
|
|
230
|
+
if (!i)
|
|
399
231
|
return;
|
|
400
|
-
const
|
|
401
|
-
|
|
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
|
|
410
|
-
if (
|
|
411
|
-
|
|
412
|
-
const
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
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
|
-
|
|
423
|
-
scrollTop:
|
|
424
|
-
scrollLeft:
|
|
425
|
-
})
|
|
426
|
-
|
|
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
|
-
|
|
439
|
-
emit("end-reached", direction);
|
|
254
|
+
A[c] && f("end-reached", c);
|
|
440
255
|
}
|
|
441
256
|
}
|
|
442
|
-
function
|
|
443
|
-
|
|
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
|
|
450
|
-
if (!
|
|
451
|
-
console.warn(
|
|
260
|
+
function C(e) {
|
|
261
|
+
if (!M(e)) {
|
|
262
|
+
console.warn(le, "value must be a number");
|
|
452
263
|
return;
|
|
453
264
|
}
|
|
454
|
-
|
|
265
|
+
o.value.scrollTop = e;
|
|
455
266
|
}
|
|
456
|
-
function
|
|
457
|
-
if (!
|
|
458
|
-
console.warn(
|
|
267
|
+
function x(e) {
|
|
268
|
+
if (!M(e)) {
|
|
269
|
+
console.warn(le, "value must be a number");
|
|
459
270
|
return;
|
|
460
271
|
}
|
|
461
|
-
|
|
272
|
+
o.value.scrollLeft = e;
|
|
462
273
|
}
|
|
463
|
-
function
|
|
464
|
-
|
|
465
|
-
distanceScrollState[direction] = false;
|
|
466
|
-
checkContentInsufficient();
|
|
274
|
+
function H() {
|
|
275
|
+
S.value?.update(), l[c] = !1, G();
|
|
467
276
|
}
|
|
468
|
-
function
|
|
469
|
-
if (!
|
|
277
|
+
function G() {
|
|
278
|
+
if (!o.value)
|
|
470
279
|
return;
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
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
|
-
|
|
489
|
-
() =>
|
|
490
|
-
(
|
|
491
|
-
|
|
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:
|
|
502
|
-
)
|
|
503
|
-
|
|
504
|
-
() => [props.maxHeight, props.height],
|
|
293
|
+
{ immediate: !0 }
|
|
294
|
+
), Q(
|
|
295
|
+
() => [n.maxHeight, n.height],
|
|
505
296
|
() => {
|
|
506
|
-
|
|
507
|
-
|
|
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
|
-
|
|
536
|
-
|
|
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
|
-
|
|
539
|
-
checkContentInsufficient();
|
|
315
|
+
t = !1, G();
|
|
540
316
|
},
|
|
541
|
-
{ childList:
|
|
542
|
-
)
|
|
543
|
-
})
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
update();
|
|
317
|
+
{ childList: !0, subtree: !0 }
|
|
318
|
+
);
|
|
319
|
+
}), ye(() => {
|
|
320
|
+
D(() => {
|
|
321
|
+
H();
|
|
547
322
|
});
|
|
323
|
+
}), re(() => {
|
|
324
|
+
w?.();
|
|
548
325
|
});
|
|
549
|
-
|
|
550
|
-
|
|
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
|
-
...
|
|
330
|
+
...e
|
|
560
331
|
});
|
|
561
332
|
}
|
|
562
|
-
function
|
|
563
|
-
|
|
564
|
-
return;
|
|
565
|
-
}
|
|
566
|
-
scrollTo({
|
|
333
|
+
function ce(e) {
|
|
334
|
+
o.value && T({
|
|
567
335
|
top: 0,
|
|
568
336
|
behavior: "smooth",
|
|
569
|
-
...
|
|
337
|
+
...e
|
|
570
338
|
});
|
|
571
339
|
}
|
|
572
|
-
|
|
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
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
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
|
-
(
|
|
647
|
-
id:
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
"aria-
|
|
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:
|
|
656
|
-
|
|
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,
|
|
662
|
-
|
|
385
|
+
], 46, Ie),
|
|
386
|
+
e.native ? ze("", !0) : (P(), $(R(Le), {
|
|
663
387
|
key: 0,
|
|
664
|
-
disabled:
|
|
665
|
-
to:
|
|
388
|
+
disabled: !r.appendTo,
|
|
389
|
+
to: r.appendTo
|
|
666
390
|
}, {
|
|
667
|
-
default:
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
"
|
|
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
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
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
|
-
|
|
690
|
-
|
|
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 };
|