@douxcode/vue-spring-bottom-sheet 3.0.0-next.2 → 3.0.0-next.3

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.
@@ -11,7 +11,6 @@ declare function __VLS_template(): {
11
11
  sheet: HTMLDivElement;
12
12
  sheetHeader: HTMLDivElement;
13
13
  sheetScroll: HTMLDivElement;
14
- sheetContentWrapper: HTMLDivElement;
15
14
  sheetContent: HTMLDivElement;
16
15
  sheetFooter: HTMLDivElement;
17
16
  };
@@ -22,12 +21,28 @@ declare const __VLS_component: import('vue').DefineComponent<BottomSheetProps, {
22
21
  open: () => Promise<void>;
23
22
  close: () => void;
24
23
  snapToPoint: (index: number) => void;
25
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
- [x: string]: any;
27
- } & {
28
- [x: string]: any;
24
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
25
+ opened: () => any;
26
+ "opening-started": () => any;
27
+ closed: () => any;
28
+ "closing-started": () => any;
29
+ ready: () => any;
30
+ "dragging-up": () => any;
31
+ "dragging-down": () => any;
32
+ snapped: (snapPointIndex?: number | undefined) => any;
33
+ instinctHeight: (instinctHeight: number) => any;
34
+ "update:modelValue": () => any;
29
35
  }, string, import('vue').PublicProps, Readonly<BottomSheetProps> & Readonly<{
30
- [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
36
+ onOpened?: (() => any) | undefined;
37
+ "onOpening-started"?: (() => any) | undefined;
38
+ onClosed?: (() => any) | undefined;
39
+ "onClosing-started"?: (() => any) | undefined;
40
+ onReady?: (() => any) | undefined;
41
+ "onDragging-up"?: (() => any) | undefined;
42
+ "onDragging-down"?: (() => any) | undefined;
43
+ onSnapped?: ((snapPointIndex?: number | undefined) => any) | undefined;
44
+ onInstinctHeight?: ((instinctHeight: number) => any) | undefined;
45
+ "onUpdate:modelValue"?: (() => any) | undefined;
31
46
  }>, {
32
47
  duration: number;
33
48
  blocking: boolean;
@@ -41,7 +56,6 @@ declare const __VLS_component: import('vue').DefineComponent<BottomSheetProps, {
41
56
  sheet: HTMLDivElement;
42
57
  sheetHeader: HTMLDivElement;
43
58
  sheetScroll: HTMLDivElement;
44
- sheetContentWrapper: HTMLDivElement;
45
59
  sheetContent: HTMLDivElement;
46
60
  sheetFooter: HTMLDivElement;
47
61
  }, any>;
package/dist/index.mjs CHANGED
@@ -1,14 +1,14 @@
1
- import { ref as g, computed as I, defineComponent as Ve, useCssVars as Ne, watch as Z, onMounted as We, toRefs as qe, nextTick as Se, onUnmounted as ze, createElementBlock as oe, openBlock as q, Fragment as Qe, createBlock as Ce, Teleport as ye, createVNode as Pe, Transition as Te, withCtx as xe, createCommentVNode as ke, unref as ue, normalizeStyle as je, createElementVNode as z, normalizeClass as se, renderSlot as re } from "vue";
2
- import { useVModel as Ge, useWindowSize as Ke, useElementBounding as ee, useScrollLock as Ye } from "@vueuse/core";
3
- import { useFocusTrap as Ue } from "@vueuse/integrations/useFocusTrap";
4
- function Q(o, l) {
5
- const s = parseFloat(o);
6
- return l * s / 100;
1
+ import { ref as m, computed as $, defineComponent as qe, useCssVars as ze, watch as ee, onMounted as We, toRefs as Qe, nextTick as Se, onUnmounted as je, createElementBlock as ue, openBlock as Q, Fragment as Ge, createBlock as Ce, Teleport as xe, createVNode as ye, Transition as Pe, withCtx as Te, createCommentVNode as ke, unref as se, normalizeStyle as Ke, createElementVNode as j, normalizeClass as re, renderSlot as ie } from "vue";
2
+ import { useVModel as Ue, useWindowSize as Je, useElementBounding as te, useScrollLock as Ye } from "@vueuse/core";
3
+ import { useFocusTrap as Xe } from "@vueuse/integrations/useFocusTrap";
4
+ function G(a, o) {
5
+ const s = parseFloat(a);
6
+ return o * s / 100;
7
7
  }
8
- function Je(o, l, s) {
9
- const t = g(0), v = I(() => o.value.map((C) => typeof C == "string" ? Q(C, s.value) : C)), S = I(() => Math.min(...v.value)), i = I(() => Math.max(...v.value)), y = I(() => {
8
+ function Ze(a, o, s) {
9
+ const t = m(0), v = $(() => a.value.map((C) => typeof C == "string" ? G(C, s.value) : C)), S = $(() => Math.min(...v.value)), i = $(() => Math.max(...v.value)), x = $(() => {
10
10
  const C = v.value.reduce(
11
- (P, w) => Math.abs(w - l.value) < Math.abs(P - l.value) ? w : P
11
+ (y, h) => Math.abs(h - o.value) < Math.abs(y - o.value) ? h : y
12
12
  );
13
13
  return v.value.indexOf(C);
14
14
  });
@@ -17,96 +17,98 @@ function Je(o, l, s) {
17
17
  flattenedSnapPoints: v,
18
18
  minSnapPoint: S,
19
19
  maxSnapPoint: i,
20
- closestSnapPointIndex: y
20
+ closestSnapPointIndex: x
21
21
  };
22
22
  }
23
- function Xe(o = {}) {
24
- const { velocityThreshold: l = 0.5 } = o, s = g(0), t = g(0), v = g(0), S = g(0), i = g([]);
23
+ function _e(a = {}) {
24
+ const { velocityThreshold: o = 0.5 } = a, s = m(0), t = m(0), v = m(0), S = m(0), i = m([]);
25
25
  return {
26
- start: (w) => {
27
- const b = performance.now();
28
- s.value = w, t.value = b, v.value = w, S.value = b, i.value = [{ y: w, time: b }];
26
+ start: (h) => {
27
+ const w = performance.now();
28
+ s.value = h, t.value = w, v.value = h, S.value = w, i.value = [{ y: h, time: w }];
29
29
  },
30
- update: (w) => {
31
- const b = performance.now();
32
- v.value = w, S.value = b, i.value.push({ y: w, time: b });
33
- const M = b - 100;
34
- i.value = i.value.filter((d) => d.time > M).slice(-5);
30
+ update: (h) => {
31
+ const w = performance.now();
32
+ v.value = h, S.value = w, i.value.push({ y: h, time: w });
33
+ const f = w - 100;
34
+ i.value = i.value.filter((d) => d.time > f).slice(-5);
35
35
  },
36
36
  end: () => {
37
- const w = i.value;
38
- let b = 0;
39
- if (w.length >= 2) {
40
- const h = w[0], E = w[w.length - 1], F = E.y - h.y, R = E.time - h.time;
41
- R > 0 && (b = F / R);
37
+ const h = i.value;
38
+ let w = 0;
39
+ if (h.length >= 2) {
40
+ const M = h[0], O = h[h.length - 1];
41
+ if (M && O) {
42
+ const F = O.y - M.y, L = O.time - M.time;
43
+ L > 0 && (w = F / L);
44
+ }
42
45
  }
43
- const M = Math.abs(b) >= l;
46
+ const f = Math.abs(w) >= o;
44
47
  let d = "none";
45
- return M && (d = b < 0 ? "up" : "down"), i.value = [], {
48
+ return f && (d = w < 0 ? "up" : "down"), i.value = [], {
46
49
  direction: d,
47
- velocity: Math.abs(b),
48
- isSwipe: M
50
+ velocity: Math.abs(w),
51
+ isSwipe: f
49
52
  };
50
53
  }
51
54
  };
52
55
  }
53
- function Ze(o, l, s) {
54
- let t = (v) => o(v, ...l);
55
- return s === void 0 ? t : Object.assign(t, { lazy: s, lazyArgs: l });
56
+ function et(a, o, s) {
57
+ let t = (v) => a(v, ...o);
58
+ return s === void 0 ? t : Object.assign(t, { lazy: s, lazyArgs: o });
59
+ }
60
+ function tt(a, o, s) {
61
+ let t = a.length - o.length;
62
+ if (t === 0) return a(...o);
63
+ if (t === 1) return et(a, o, s);
64
+ throw Error("Wrong number of arguments");
56
65
  }
57
- function et(o, l, s) {
58
- let t = o.length - l.length;
59
- if (t === 0) return o(...l);
60
- if (t === 1) return Ze(o, l, s);
61
- throw new Error("Wrong number of arguments");
66
+ function P(...a) {
67
+ return tt(nt, a);
62
68
  }
63
- function tt(o, { triggerAt: l = "end", minQuietPeriodMs: s, maxBurstDurationMs: t, minGapMs: v, reducer: S = at }) {
64
- let i, y, C, P, w = () => {
69
+ const nt = (a, { min: o, max: s }) => o !== void 0 && a < o ? o : s !== void 0 && a > s ? s : a, Ee = /* @__PURE__ */ Symbol("funnel/voidReducer"), at = () => Ee;
70
+ function lt(a, { triggerAt: o = "end", minQuietPeriodMs: s, maxBurstDurationMs: t, minGapMs: v, reducer: S = at }) {
71
+ let i, x, C, y, h = () => {
65
72
  let d = C;
66
- d !== void 0 && (C = void 0, o(d), v !== void 0 && (y = setTimeout(b, v)));
67
- }, b = () => {
68
- clearTimeout(y), y = void 0, i === void 0 && w();
69
- }, M = () => {
70
- clearTimeout(i), i = void 0, P = void 0, y === void 0 && w();
73
+ d !== void 0 && (C = void 0, d === Ee ? a() : a(d), v !== void 0 && (x = setTimeout(w, v)));
74
+ }, w = () => {
75
+ clearTimeout(x), x = void 0, i === void 0 && h();
76
+ }, f = () => {
77
+ clearTimeout(i), i = void 0, y = void 0, x === void 0 && h();
71
78
  };
72
79
  return { call: (...d) => {
73
- let h = i === void 0 && y === void 0;
74
- if ((l !== "start" || h) && (C = S(C, ...d)), !(i === void 0 && !h)) {
80
+ let M = i === void 0 && x === void 0;
81
+ if ((o !== "start" || M) && (C = S(C, ...d)), !(i === void 0 && !M)) {
75
82
  if (s !== void 0 || t !== void 0 || v === void 0) {
76
83
  clearTimeout(i);
77
- let E = Date.now();
78
- P ?? (P = E);
79
- let F = t === void 0 ? s ?? 0 : Math.min(s ?? t, t - (E - P));
80
- i = setTimeout(M, F);
84
+ let O = Date.now();
85
+ y ??= O;
86
+ let F = t === void 0 ? s ?? 0 : Math.min(s ?? t, t - (O - y));
87
+ i = setTimeout(f, F);
81
88
  }
82
- l !== "end" && h && w();
89
+ o !== "end" && M && h();
83
90
  }
84
91
  }, cancel: () => {
85
- clearTimeout(i), i = void 0, P = void 0, clearTimeout(y), y = void 0, C = void 0;
92
+ clearTimeout(i), i = void 0, y = void 0, clearTimeout(x), x = void 0, C = void 0;
86
93
  }, flush: () => {
87
- M(), b();
94
+ f(), w();
88
95
  }, get isIdle() {
89
- return i === void 0 && y === void 0;
96
+ return i === void 0 && x === void 0;
90
97
  } };
91
98
  }
92
- var at = () => "";
93
- function T(...o) {
94
- return et(nt, o);
99
+ function ot(a, o, s) {
100
+ return Math.max(o, Math.min(a, s));
95
101
  }
96
- var nt = (o, { min: l, max: s }) => l !== void 0 && o < l ? l : s !== void 0 && o > s ? s : o;
97
- function lt(o, l, s) {
98
- return Math.max(l, Math.min(o, s));
102
+ function ut(a, o) {
103
+ return Math.pow(a, o * 5);
99
104
  }
100
- function ot(o, l) {
101
- return Math.pow(o, l * 5);
105
+ function Me(a, o, s) {
106
+ return o === 0 || Math.abs(o) === 1 / 0 ? ut(a, s) : a * o * s / (o + s * a);
102
107
  }
103
- function Me(o, l, s) {
104
- return l === 0 || Math.abs(l) === 1 / 0 ? ot(o, s) : o * l * s / (l + s * o);
108
+ function ve(a, o, s, t = 0.15) {
109
+ return t === 0 ? ot(a, o, s) : a < o ? -Me(o - a, s - o, t) + o : a > s ? +Me(a - s, s - o, t) + s : a;
105
110
  }
106
- function ie(o, l, s, t = 0.15) {
107
- return t === 0 ? lt(o, l, s) : o < l ? -Me(l - o, s - l, t) + l : o > s ? +Me(o - s, s - l, t) + s : o;
108
- }
109
- const ut = ["data-vsbs-shadow", "data-vsbs-sheet-show"], st = /* @__PURE__ */ Ve({
111
+ const st = ["data-vsbs-shadow", "data-vsbs-sheet-show"], rt = /* @__PURE__ */ qe({
110
112
  __name: "BottomSheet",
111
113
  props: {
112
114
  duration: { default: 250 },
@@ -125,399 +127,404 @@ const ut = ["data-vsbs-shadow", "data-vsbs-sheet-show"], st = /* @__PURE__ */ Ve
125
127
  footerClass: {}
126
128
  },
127
129
  emits: ["opened", "opening-started", "closed", "closing-started", "ready", "dragging-up", "dragging-down", "snapped", "instinctHeight", "update:modelValue"],
128
- setup(o, { expose: l, emit: s }) {
129
- Ne((e) => ({
130
- "0a9ba53d": Ee.value
130
+ setup(a, { expose: o, emit: s }) {
131
+ ze((e) => ({
132
+ v6f938e48: Oe.value
131
133
  }));
132
- const t = o, v = s, S = Ge(t, "modelValue", v, {
134
+ const t = a, v = s, S = Ue(t, "modelValue", v, {
133
135
  passive: !0
134
136
  });
135
- Z(S, (e) => {
136
- e && ne();
137
+ ee(S, (e) => {
138
+ e && le();
137
139
  }), We(() => {
138
- S.value && ne();
140
+ S.value && le();
139
141
  });
140
- const i = g(null), y = g(null), C = g(null), P = g(null), w = g(null), b = g(null), M = g(null), d = g(t.expandOnContentDrag), { height: h } = Ke(), { height: E } = ee(i), { height: F } = ee(y), { height: R } = ee(b), { height: ve } = ee(C), te = I({
142
+ const i = m(null), x = m(null), C = m(null), y = m(null), h = m(null), w = m(null), f = m(t.expandOnContentDrag), { height: d } = Je(), { height: M } = te(i), { height: O } = te(x), { height: F } = te(h), { height: L } = te(C), ne = $({
141
143
  get() {
142
- return T(
143
- Math.ceil(R.value + F.value + ve.value),
144
+ return P(
145
+ Math.ceil(F.value + O.value + L.value),
144
146
  {
145
- max: h.value
147
+ max: d.value
146
148
  }
147
149
  );
148
150
  },
149
151
  set(e) {
150
- [F.value, R.value, ve.value] = e;
152
+ O.value = e[0], F.value = e[1], L.value = e[2];
151
153
  }
152
- }), n = g(0), u = g(0), Ee = I(() => t.duration + "ms"), { snapPoints: Oe } = qe(t), p = I(() => Oe.value ?? [te.value]), {
153
- flattenedSnapPoints: k,
154
- currentSnapPointIndex: D,
155
- closestSnapPointIndex: $,
156
- minSnapPoint: O,
157
- maxSnapPoint: L
158
- } = Je(p, n, h), j = Ye(document.body), G = Ye(document.documentElement), B = g(!1), _ = g(0), K = g(0), U = g(0), H = g(0), J = g(!0), A = Xe({ velocityThreshold: 0.5 }), V = Ue([i, M], {
154
+ }), l = m(0), u = m(0), Oe = $(() => t.duration + "ms"), { snapPoints: De } = Qe(t), Y = $(() => De.value ?? [ne.value]), {
155
+ flattenedSnapPoints: E,
156
+ currentSnapPointIndex: B,
157
+ closestSnapPointIndex: A,
158
+ minSnapPoint: D,
159
+ maxSnapPoint: V
160
+ } = Ze(Y, l, d), K = Ye(document.body), U = Ye(document.documentElement), H = m(!1), N = m(0), J = m(0), X = m(0), I = m(0), Z = m(!0), R = _e({ velocityThreshold: 0.5 }), q = Xe([i, w], {
159
161
  immediate: !1,
160
162
  fallbackFocus: () => i.value || document.body
161
163
  });
162
- let N = null;
163
- const De = () => {
164
- i.value && (N = new MutationObserver((e) => {
165
- var a;
166
- for (const r of e)
167
- r.type === "attributes" && r.attributeName === "aria-expanded" && (r.target.getAttribute("aria-expanded") === "true" ? V.pause() : (a = i.value) != null && a.querySelector('[aria-expanded="true"]') || V.unpause());
168
- }), N.observe(i.value, {
164
+ let z = null;
165
+ const Be = () => {
166
+ i.value && (z = new MutationObserver((e) => {
167
+ for (const n of e)
168
+ n.type === "attributes" && n.attributeName === "aria-expanded" && (n.target.getAttribute("aria-expanded") === "true" ? q.pause() : i.value?.querySelector('[aria-expanded="true"]') || q.unpause());
169
+ }), z.observe(i.value, {
169
170
  attributes: !0,
170
171
  attributeFilter: ["aria-expanded"],
171
172
  subtree: !0
172
173
  }));
173
174
  }, ce = () => {
174
- N && (N.disconnect(), N = null);
175
+ z && (z.disconnect(), z = null);
175
176
  };
176
177
  function de(e) {
177
- d.value = !0, fe(e);
178
+ f.value = !0, fe(e);
178
179
  }
179
180
  function fe(e) {
180
- d.value && e.preventDefault();
181
+ f.value && e.preventDefault();
181
182
  }
182
183
  const pe = (e) => {
183
- e.key === "Escape" && Y();
184
- }, Be = () => {
185
- t.canBackdropClose && Y();
184
+ e.key === "Escape" && T();
185
+ }, He = () => {
186
+ t.canBackdropClose && T();
186
187
  };
187
188
  let ae = !1;
188
- const ne = async () => {
189
+ const le = async () => {
189
190
  if (ae) return;
190
- S.value = !0, ae = !0, v("opening-started"), t.blocking && (j.value = !0, G.value = !0), await Se();
191
+ S.value = !0, ae = !0, v("opening-started"), t.blocking && (K.value = !0, U.value = !0), await Se();
191
192
  const e = i.value;
192
- E.value = e.getBoundingClientRect().height;
193
- const a = e.querySelector("[data-vsbs-content]"), r = e.querySelector("[data-vsbs-header]"), c = e.querySelector("[data-vsbs-footer]");
194
- if (te.value = [
193
+ M.value = e.getBoundingClientRect().height;
194
+ const n = e.querySelector("[data-vsbs-content]"), r = e.querySelector("[data-vsbs-header]"), c = e.querySelector("[data-vsbs-footer]");
195
+ if (ne.value = [
195
196
  r.getBoundingClientRect().height,
196
- a.getBoundingClientRect().height,
197
+ n.getBoundingClientRect().height,
197
198
  c.getBoundingClientRect().height
198
- ], await Se(), D.value = k.value.findIndex(
199
- (f) => f === O.value
199
+ ], await Se(), B.value = E.value.findIndex(
200
+ (p) => p === D.value
200
201
  ), t.initialSnapPoint) {
201
- const f = t.initialSnapPoint;
202
- if (f < 0 || f >= p.value.length) {
202
+ const p = t.initialSnapPoint;
203
+ if (p < 0 || p >= Y.value.length) {
203
204
  console.warn("Index out of bounds");
204
205
  return;
205
206
  }
206
- let m;
207
- typeof p.value[f] == "number" ? m = T(p.value[f], {
208
- max: h.value
209
- }) : m = Q(p.value[f], h.value), n.value = m;
207
+ const g = Y.value[p];
208
+ if (!g) return;
209
+ let b;
210
+ typeof g == "number" ? b = P(g, {
211
+ max: d.value
212
+ }) : b = G(g, d.value), l.value = b;
210
213
  } else
211
- n.value = T(O.value, {
212
- max: h.value
214
+ l.value = P(D.value, {
215
+ max: d.value
213
216
  });
214
- u.value = n.value, requestAnimationFrame(() => {
217
+ u.value = l.value, requestAnimationFrame(() => {
215
218
  u.value = 0, t.blocking && setTimeout(() => {
216
- S.value && (v("opened"), V.activate(), De());
219
+ S.value && (v("opened"), q.activate(), Be());
217
220
  }, t.duration);
218
221
  }), window.addEventListener("keydown", pe), ae = !1;
219
222
  };
220
- let le = !1;
221
- const Y = () => {
222
- le || (S.value = !1, le = !0, v("closing-started"), t.blocking && (j.value = !1, G.value = !1), window.removeEventListener("keydown", pe), ce(), t.blocking && V.deactivate(), u.value = n.value, setTimeout(() => {
223
- v("closed"), le = !1;
223
+ let oe = !1;
224
+ const T = () => {
225
+ oe || (S.value = !1, oe = !0, v("closing-started"), t.blocking && (K.value = !1, U.value = !1), window.removeEventListener("keydown", pe), ce(), t.blocking && q.deactivate(), u.value = l.value, setTimeout(() => {
226
+ v("closed"), oe = !1;
224
227
  }, t.duration));
225
228
  }, he = (e) => {
226
- if (!p.value) return;
227
- if (e < 0 || e >= p.value.length) {
229
+ if (!Y.value) return;
230
+ if (e < 0 || e >= Y.value.length) {
228
231
  console.warn("Index out of bounds");
229
232
  return;
230
233
  }
231
- D.value = e;
232
- let a;
233
- typeof p.value[e] == "number" ? a = T(p.value[e], {
234
- max: h.value
235
- }) : a = Q(p.value[e], h.value), n.value = a, v("snapped", p.value.indexOf(p.value[e]));
234
+ B.value = e;
235
+ const n = Y.value[e];
236
+ if (!n) return;
237
+ let r;
238
+ typeof n == "number" ? r = P(n, {
239
+ max: d.value
240
+ }) : r = G(n, d.value), l.value = r, v("snapped", Y.value.indexOf(n));
236
241
  };
237
242
  function me(e) {
238
243
  e > 0 ? v("dragging-down") : e < 0 && v("dragging-up");
239
244
  }
240
245
  const ge = (e) => {
241
246
  if (!i.value) return;
242
- const a = window.getComputedStyle(i.value), r = parseFloat(a.height);
247
+ const n = window.getComputedStyle(i.value), r = parseFloat(n.height);
243
248
  let c = 0;
244
- a.transform && a.transform !== "none" && (c = new DOMMatrix(a.transform).m42), n.value = r, u.value = c, B.value = !0, _.value = e.clientY, K.value = n.value, U.value = u.value, H.value = e.clientY, A.start(e.clientY), e.target.setPointerCapture(e.pointerId);
249
+ n.transform && n.transform !== "none" && (c = new DOMMatrix(n.transform).m42), l.value = r, u.value = c, H.value = !0, N.value = e.clientY, J.value = l.value, X.value = u.value, I.value = e.clientY, R.start(e.clientY), e.target.setPointerCapture(e.pointerId);
245
250
  }, we = (e) => {
246
- if (!B.value) return;
247
- const a = e.clientY - _.value, r = e.clientY;
248
- u.value <= 0 && (n.value = K.value - a), n.value <= O.value && (n.value = O.value, u.value = U.value + a, t.canSwipeClose ? u.value = T(u.value, { min: 0 }) : u.value = T(
249
- ie(u.value, -E.value, 0, 0.5),
251
+ if (!H.value) return;
252
+ const n = e.clientY - N.value, r = e.clientY;
253
+ u.value <= 0 && (l.value = J.value - n), l.value <= D.value && (l.value = D.value, u.value = X.value + n, t.canSwipeClose ? u.value = P(u.value, { min: 0 }) : u.value = P(
254
+ ve(u.value, -M.value, 0, 0.5),
250
255
  { min: 0 }
251
- )), n.value = T(ie(n.value, 0, L.value, 0.25), {
256
+ )), l.value = P(ve(l.value, 0, V.value, 0.25), {
252
257
  min: 0,
253
- max: h.value
254
- }), me(e.clientY - H.value), A.update(e.clientY), H.value = r;
255
- }, X = (e) => {
256
- if (B.value = !1, e.target.releasePointerCapture(e.pointerId), t.canSwipeClose) {
257
- let f = n.value / 2;
258
- if (t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "number" && (f = t.swipeCloseThreshold), t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "string" && t.swipeCloseThreshold.includes("%") && (f = n.value * (Number(t.swipeCloseThreshold.replace("%", "")) / 100)), u.value > f) {
259
- u.value = n.value, Y();
258
+ max: d.value
259
+ }), me(e.clientY - I.value), R.update(e.clientY), I.value = r;
260
+ }, _ = (e) => {
261
+ if (H.value = !1, e.target.releasePointerCapture(e.pointerId), t.canSwipeClose) {
262
+ let g = l.value / 2;
263
+ if (t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "number" && (g = t.swipeCloseThreshold), t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "string" && t.swipeCloseThreshold.includes("%") && (g = l.value * (Number(t.swipeCloseThreshold.replace("%", "")) / 100)), u.value > g) {
264
+ u.value = l.value, T();
260
265
  return;
261
266
  }
262
267
  } else
263
268
  u.value = 0;
264
- if (u.value === n.value) {
265
- u.value = 0, Y();
269
+ if (u.value === l.value) {
270
+ u.value = 0, T();
266
271
  return;
267
272
  }
268
- const a = A.end();
269
- if (a.isSwipe && a.direction === "down" && t.canSwipeClose && n.value <= O.value + 10) {
270
- u.value = n.value, Y();
273
+ const n = R.end();
274
+ if (n.isSwipe && n.direction === "down" && t.canSwipeClose && l.value <= D.value + 10) {
275
+ u.value = l.value, T();
271
276
  return;
272
277
  }
273
278
  let r;
274
- if (a.isSwipe && k.value.length > 1) {
275
- const f = [...k.value].sort((m, x) => m - x);
276
- if (a.direction === "up") {
277
- const m = f.find((x) => x > n.value + 1);
278
- r = m !== void 0 ? k.value.indexOf(m) : $.value;
279
+ if (n.isSwipe && E.value.length > 1) {
280
+ const g = [...E.value].sort((b, k) => b - k);
281
+ if (n.direction === "up") {
282
+ const b = g.find((k) => k > l.value + 1);
283
+ r = b !== void 0 ? E.value.indexOf(b) : A.value;
279
284
  } else {
280
- const m = [...f].reverse().find((x) => x < n.value - 1);
281
- r = m !== void 0 ? k.value.indexOf(m) : $.value;
285
+ const b = [...g].reverse().find((k) => k < l.value - 1);
286
+ r = b !== void 0 ? E.value.indexOf(b) : A.value;
282
287
  }
283
288
  } else
284
- r = $.value;
285
- D.value = r;
286
- let c;
287
- if (typeof p.value[r] == "number" ? c = T(p.value[r], {
288
- max: h.value
289
- }) : c = Q(
290
- p.value[r],
291
- h.value
292
- ), c === 0) {
293
- Y();
289
+ r = A.value;
290
+ B.value = r;
291
+ const c = Y.value[r];
292
+ if (!c) {
293
+ T();
294
+ return;
295
+ }
296
+ let p;
297
+ if (typeof c == "number" ? p = P(c, {
298
+ max: d.value
299
+ }) : p = G(c, d.value), p === 0) {
300
+ T();
294
301
  return;
295
302
  }
296
- n.value = c, u.value = 0, v("snapped", p.value.indexOf(p.value[r]));
297
- }, He = (e) => {
298
- if (!P.value) return;
299
- const a = P.value.scrollTop === 0, r = e > 0, c = k.value.length === 1, f = 0.5 > Math.abs(n.value - L.value);
303
+ l.value = p, u.value = 0, v("snapped", Y.value.indexOf(c));
304
+ }, Ie = (e) => {
305
+ if (!y.value) return;
306
+ const n = y.value.scrollTop === 0, r = e > 0, c = E.value.length === 1, p = 0.5 > Math.abs(l.value - V.value);
300
307
  if (c) {
301
308
  if (!t.expandOnContentDrag) {
302
- d.value = !1;
309
+ f.value = !1;
303
310
  return;
304
311
  }
305
- u.value === 0 && a && r && (d.value = !0), u.value === 0 && a && !r && (d.value = !1);
312
+ u.value === 0 && n && r && (f.value = !0), u.value === 0 && n && !r && (f.value = !1);
306
313
  } else {
307
314
  if (!t.expandOnContentDrag) {
308
- d.value = !1;
315
+ f.value = !1;
309
316
  return;
310
317
  }
311
- d.value = !0, f && (r && a && (d.value = !0), !r && a && (d.value = !1), a || (d.value = !1));
318
+ f.value = !0, p && (r && n && (f.value = !0), !r && n && (f.value = !1), n || (f.value = !1));
312
319
  }
313
- }, Ie = (e) => {
320
+ }, $e = (e) => {
314
321
  if (!i.value) return;
315
- const a = window.getComputedStyle(i.value), r = parseFloat(a.height);
322
+ const n = window.getComputedStyle(i.value), r = parseFloat(n.height);
316
323
  let c = 0;
317
- a.transform && a.transform !== "none" && (c = new DOMMatrix(a.transform).m42), n.value = r, u.value = c, B.value = !0, _.value = e.clientY, K.value = n.value, U.value = u.value, H.value = e.clientY, J.value = !0, A.start(e.clientY), e.target.setPointerCapture(e.pointerId);
324
+ n.transform && n.transform !== "none" && (c = new DOMMatrix(n.transform).m42), l.value = r, u.value = c, H.value = !0, N.value = e.clientY, J.value = l.value, X.value = u.value, I.value = e.clientY, Z.value = !0, R.start(e.clientY), e.target.setPointerCapture(e.pointerId);
318
325
  }, Fe = (e) => {
319
- if (!B.value) return;
326
+ if (!H.value) return;
320
327
  if (!t.expandOnContentDrag) {
321
- d.value = !1;
328
+ f.value = !1;
322
329
  return;
323
330
  }
324
- const a = e.clientY - _.value, r = e.clientY, c = e.clientY - H.value;
325
- if (J.value) {
326
- const m = e.clientY - _.value;
327
- if (Math.abs(m) > 3)
328
- J.value = !1, He(m);
331
+ const n = e.clientY - N.value, r = e.clientY, c = e.clientY - I.value;
332
+ if (Z.value) {
333
+ const g = e.clientY - N.value;
334
+ if (Math.abs(g) > 3)
335
+ Z.value = !1, Ie(g);
329
336
  else {
330
- H.value = r;
337
+ I.value = r;
331
338
  return;
332
339
  }
333
340
  }
334
- u.value === 0 && d.value && t.expandOnContentDrag && (n.value = K.value - a), n.value <= O.value && (n.value = O.value, d.value && t.expandOnContentDrag && (u.value = U.value + a), u.value = T(u.value, { min: 0, max: O.value }), t.canSwipeClose ? u.value = T(u.value, { min: 0 }) : u.value = T(
335
- ie(u.value, -E.value, 0, 0.5),
341
+ u.value === 0 && f.value && t.expandOnContentDrag && (l.value = J.value - n), l.value <= D.value && (l.value = D.value, f.value && t.expandOnContentDrag && (u.value = X.value + n), u.value = P(u.value, { min: 0, max: D.value }), t.canSwipeClose ? u.value = P(u.value, { min: 0 }) : u.value = P(
342
+ ve(u.value, -M.value, 0, 0.5),
336
343
  { min: 0 }
337
- )), n.value > L.value && (n.value = L.value), n.value = T(n.value, { max: h.value }), k.value.length === 1 || n.value === L.value && (d.value = !1), me(c), A.update(e.clientY), H.value = r;
344
+ )), l.value > V.value && (l.value = V.value), l.value = P(l.value, { max: d.value }), E.value.length === 1 || l.value === V.value && (f.value = !1), me(c), R.update(e.clientY), I.value = r;
338
345
  }, be = (e) => {
339
- if (B.value = !1, J.value = !0, e.target.releasePointerCapture(e.pointerId), t.canSwipeClose) {
340
- let m = n.value / 2;
341
- if (t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "number" && (m = t.swipeCloseThreshold), t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "string" && t.swipeCloseThreshold.includes("%") && (m = n.value * (Number(t.swipeCloseThreshold.replace("%", "")) / 100)), u.value > m) {
342
- u.value = n.value, Y();
346
+ if (H.value = !1, Z.value = !0, e.target.releasePointerCapture(e.pointerId), t.canSwipeClose) {
347
+ let b = l.value / 2;
348
+ if (t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "number" && (b = t.swipeCloseThreshold), t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "string" && t.swipeCloseThreshold.includes("%") && (b = l.value * (Number(t.swipeCloseThreshold.replace("%", "")) / 100)), u.value > b) {
349
+ u.value = l.value, T();
343
350
  return;
344
351
  }
345
352
  } else
346
353
  u.value = 0;
347
- if (u.value === n.value) {
348
- u.value = 0, Y();
354
+ if (u.value === l.value) {
355
+ u.value = 0, T();
349
356
  return;
350
357
  }
351
- const a = A.end(), r = d.value;
352
- if (r && a.isSwipe && a.direction === "down" && t.canSwipeClose && n.value <= O.value + 10) {
353
- u.value = n.value, Y();
358
+ const n = R.end(), r = f.value;
359
+ if (r && n.isSwipe && n.direction === "down" && t.canSwipeClose && l.value <= D.value + 10) {
360
+ u.value = l.value, T();
354
361
  return;
355
362
  }
356
363
  let c;
357
- if (r && a.isSwipe && k.value.length > 1) {
358
- const m = [...k.value].sort((x, W) => x - W);
359
- if (a.direction === "up") {
360
- const x = m.find((W) => W > n.value + 1);
361
- c = x !== void 0 ? k.value.indexOf(x) : $.value;
364
+ if (r && n.isSwipe && E.value.length > 1) {
365
+ const b = [...E.value].sort((k, W) => k - W);
366
+ if (n.direction === "up") {
367
+ const k = b.find((W) => W > l.value + 1);
368
+ c = k !== void 0 ? E.value.indexOf(k) : A.value;
362
369
  } else {
363
- const x = [...m].reverse().find((W) => W < n.value - 1);
364
- c = x !== void 0 ? k.value.indexOf(x) : $.value;
370
+ const k = [...b].reverse().find((W) => W < l.value - 1);
371
+ c = k !== void 0 ? E.value.indexOf(k) : A.value;
365
372
  }
366
373
  } else
367
- c = $.value;
368
- D.value = c;
369
- let f;
370
- if (typeof p.value[c] == "number" ? f = T(p.value[c], {
371
- max: h.value
372
- }) : f = Q(
373
- p.value[c],
374
- h.value
375
- ), f === 0) {
376
- Y();
374
+ c = A.value;
375
+ B.value = c;
376
+ const p = Y.value[c];
377
+ if (!p) {
378
+ T();
379
+ return;
380
+ }
381
+ let g;
382
+ if (typeof p == "number" ? g = P(p, {
383
+ max: d.value
384
+ }) : g = G(p, d.value), g === 0) {
385
+ T();
377
386
  return;
378
387
  }
379
- n.value = f, u.value = 0, v("snapped", p.value.indexOf(p.value[c]));
380
- }, $e = () => {
381
- t.blocking || (j.value = !0, G.value = !0);
388
+ l.value = g, u.value = 0, v("snapped", Y.value.indexOf(p));
382
389
  }, Ae = () => {
383
- t.blocking || (j.value = !1, G.value = !1);
390
+ t.blocking || (K.value = !0, U.value = !0);
384
391
  }, Re = () => {
385
- if (!P.value) return;
386
- const e = P.value.scrollTop === 0;
387
- d.value = e;
388
- }, Le = tt((e) => he(e), {
392
+ t.blocking || (K.value = !1, U.value = !1);
393
+ }, Le = () => {
394
+ if (!y.value) return;
395
+ const e = y.value.scrollTop === 0;
396
+ f.value = e;
397
+ }, Ve = lt((e) => he(e), {
389
398
  minQuietPeriodMs: t.duration,
390
- reducer: (e, a) => a
399
+ reducer: (e, n) => n
391
400
  });
392
- Z(p, (e, a) => {
393
- if (S.value === !1 || !e || !a) return;
394
- const r = e[D.value], c = a[D.value];
395
- typeof r != "string" && typeof c != "string" && (n.value = T(r, {
396
- max: h.value
401
+ ee(Y, (e, n) => {
402
+ if (S.value === !1 || !e || !n) return;
403
+ const r = e[B.value], c = n[B.value];
404
+ !r || typeof r == "string" || !c || typeof c == "string" || (l.value = P(r, {
405
+ max: d.value
397
406
  }));
398
- }), Z(h, () => {
399
- Le.call(D.value);
400
- }), Z(te, (e) => {
407
+ }), ee(d, () => {
408
+ Ve.call(B.value);
409
+ }), ee(ne, (e) => {
401
410
  v("instinctHeight", e);
402
- }), ze(() => {
403
- ce(), V.deactivate();
411
+ }), je(() => {
412
+ ce(), q.deactivate();
404
413
  });
405
- const _e = (e) => {
406
- const a = e;
407
- a.style.transition = `transform ${t.duration}ms ease, height ${t.duration}ms ease`, a.style.transform = `translateY(${n.value}px)`;
414
+ const Ne = (e) => {
415
+ const n = e;
416
+ n.style.transition = `transform ${t.duration}ms ease, height ${t.duration}ms ease`, n.style.transform = `translateY(${l.value}px)`;
408
417
  };
409
- return l({ open: ne, close: Y, snapToPoint: he }), (e, a) => (q(), oe(Qe, null, [
410
- (q(), Ce(ye, {
411
- to: e.teleportTo,
412
- defer: e.teleportDefer
418
+ return o({ open: le, close: T, snapToPoint: he }), (e, n) => (Q(), ue(Ge, null, [
419
+ (Q(), Ce(xe, {
420
+ to: a.teleportTo,
421
+ defer: a.teleportDefer
413
422
  }, [
414
- Pe(Te, { name: "vsbs-backdrop" }, {
415
- default: xe(() => [
416
- ue(S) && e.blocking ? (q(), oe("div", {
423
+ ye(Pe, { name: "vsbs-backdrop" }, {
424
+ default: Te(() => [
425
+ se(S) && a.blocking ? (Q(), ue("div", {
417
426
  key: 0,
418
427
  ref_key: "backdrop",
419
- ref: M,
428
+ ref: w,
420
429
  "data-vsbs-backdrop": "",
421
- onClick: a[0] || (a[0] = (r) => Be())
430
+ onClick: n[0] || (n[0] = (r) => He())
422
431
  }, null, 512)) : ke("", !0)
423
432
  ]),
424
433
  _: 1
425
434
  })
426
435
  ], 8, ["to", "defer"])),
427
- (q(), Ce(ye, {
428
- to: e.teleportTo,
429
- defer: e.teleportDefer
436
+ (Q(), Ce(xe, {
437
+ to: a.teleportTo,
438
+ defer: a.teleportDefer
430
439
  }, [
431
- Pe(Te, {
440
+ ye(Pe, {
432
441
  name: "vsbs-sheet",
433
- onLeave: _e
442
+ onLeave: Ne
434
443
  }, {
435
- default: xe(() => [
436
- ue(S) ? (q(), oe("div", {
444
+ default: Te(() => [
445
+ se(S) ? (Q(), ue("div", {
437
446
  key: 0,
438
447
  ref_key: "sheet",
439
448
  ref: i,
440
- style: je({
449
+ style: Ke({
441
450
  transform: `translateY(${u.value}px)`,
442
- height: `${n.value}px`,
443
- transition: B.value ? "none" : `transform ${e.duration}ms ease, height ${e.duration}ms ease`
451
+ height: `${l.value}px`,
452
+ transition: H.value ? "none" : `transform ${a.duration}ms ease, height ${a.duration}ms ease`
444
453
  }),
445
- "data-vsbs-shadow": !e.blocking,
446
- "data-vsbs-sheet-show": ue(S),
454
+ "data-vsbs-shadow": !a.blocking,
455
+ "data-vsbs-sheet-show": se(S),
447
456
  "aria-modal": "true",
448
457
  "data-vsbs-sheet": "",
449
458
  tabindex: "-1",
450
- onTouchstart: $e,
451
- onTouchend: Ae
459
+ onTouchstart: Ae,
460
+ onTouchend: Re
452
461
  }, [
453
- z("div", {
462
+ j("div", {
454
463
  ref_key: "sheetHeader",
455
- ref: y,
464
+ ref: x,
456
465
  "data-vsbs-header": "",
457
466
  onPointerdown: ge,
458
467
  onPointermove: we,
459
- onPointerup: X,
460
- onPointercancel: X,
468
+ onPointerup: _,
469
+ onPointercancel: _,
461
470
  onTouchmove: de,
462
- class: se(e.headerClass),
471
+ class: re(a.headerClass),
463
472
  style: { "touch-action": "none" }
464
473
  }, [
465
- re(e.$slots, "header", {}, void 0, !0)
474
+ ie(e.$slots, "header", {}, void 0, !0)
466
475
  ], 34),
467
- z("div", {
476
+ j("div", {
468
477
  ref_key: "sheetScroll",
469
- ref: P,
478
+ ref: y,
470
479
  "data-vsbs-scroll": "",
471
- onScrollend: Re
480
+ onScrollend: Le
472
481
  }, [
473
- z("div", {
474
- ref_key: "sheetContentWrapper",
475
- ref: w,
482
+ j("div", {
476
483
  "data-vsbs-content-wrapper": "",
477
- onPointerdown: Ie,
484
+ onPointerdown: $e,
478
485
  onPointermove: Fe,
479
486
  onPointerup: be,
480
487
  onPointercancel: be,
481
488
  onTouchmove: fe,
482
489
  style: { touchAction: "pan-y" }
483
490
  }, [
484
- z("div", {
491
+ j("div", {
485
492
  ref_key: "sheetContent",
486
- ref: b,
493
+ ref: h,
487
494
  "data-vsbs-content": "",
488
- class: se(e.contentClass)
495
+ class: re(a.contentClass)
489
496
  }, [
490
- re(e.$slots, "default", {}, void 0, !0)
497
+ ie(e.$slots, "default", {}, void 0, !0)
491
498
  ], 2)
492
- ], 544)
499
+ ], 32)
493
500
  ], 544),
494
- z("div", {
501
+ j("div", {
495
502
  ref_key: "sheetFooter",
496
503
  ref: C,
497
504
  "data-vsbs-footer": "",
498
505
  onPointerdown: ge,
499
506
  onPointermove: we,
500
- onPointerup: X,
501
- onPointercancel: X,
507
+ onPointerup: _,
508
+ onPointercancel: _,
502
509
  onTouchmove: de,
503
- class: se(e.footerClass),
510
+ class: re(a.footerClass),
504
511
  style: { "touch-action": "none" }
505
512
  }, [
506
- re(e.$slots, "footer", {}, void 0, !0)
513
+ ie(e.$slots, "footer", {}, void 0, !0)
507
514
  ], 34)
508
- ], 44, ut)) : ke("", !0)
515
+ ], 44, st)) : ke("", !0)
509
516
  ]),
510
517
  _: 3
511
518
  })
512
519
  ], 8, ["to", "defer"]))
513
520
  ], 64));
514
521
  }
515
- }), rt = (o, l) => {
516
- const s = o.__vccOpts || o;
517
- for (const [t, v] of l)
522
+ }), it = (a, o) => {
523
+ const s = a.__vccOpts || a;
524
+ for (const [t, v] of o)
518
525
  s[t] = v;
519
526
  return s;
520
- }, dt = /* @__PURE__ */ rt(st, [["__scopeId", "data-v-01259485"]]);
527
+ }, ft = /* @__PURE__ */ it(rt, [["__scopeId", "data-v-1827f711"]]);
521
528
  export {
522
- dt as default
529
+ ft as default
523
530
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- [data-vsbs-backdrop][data-v-01259485]{background-color:var(--vsbs-backdrop-bg, rgba(0, 0, 0, .5));top:0;right:0;bottom:0;left:0;pointer-events:auto;position:fixed;-webkit-user-select:none;user-select:none;will-change:opacity;--vsbs-duration: var(--0a9ba53d)}[data-vsbs-shadow=true][data-v-01259485]:before{content:"";z-index:-1;position:absolute;top:0;height:100lvh;width:100%;border-radius:var(--vsbs-border-radius, 16px);box-shadow:0 -5px 60px 0 var(--vsbs-shadow-color, rgba(89, 89, 89, .2))}[data-vsbs-sheet][data-v-01259485]{background-color:var(--vsbs-background, #fff);border-top-left-radius:var(--vsbs-border-radius, 16px);border-top-right-radius:var(--vsbs-border-radius, 16px);border-right:1px solid var(--vsbs-outer-border-color, transparent);border-left:1px solid var(--vsbs-outer-border-color, transparent);bottom:0;display:flex;flex-direction:column;left:0;margin-left:auto;margin-right:auto;max-width:var(--vsbs-max-width, 640px);pointer-events:all;position:fixed;right:0;width:100%;will-change:height,transform}[data-vsbs-sheet-show=true][data-v-01259485]{visibility:visible}[data-vsbs-header][data-v-01259485]{box-shadow:0 1px 0 var(--vsbs-border-color, rgba(46, 59, 66, .125));flex-shrink:0;padding:20px var(--vsbs-padding-x, 16px) 8px;-webkit-user-select:none;user-select:none;z-index:3;border-top-left-radius:var(--vsbs-border-radius, 16px);border-top-right-radius:var(--vsbs-border-radius, 16px);border-top:1px solid var(--vsbs-outer-border-color, transparent)}[data-vsbs-header][data-v-01259485]:before{background-color:var(--vsbs-handle-background, rgba(0, 0, 0, .28));border-radius:2px;content:"";display:block;height:4px;left:50%;position:absolute;top:8px;transform:translate(-50%);width:36px}[data-vsbs-header][data-v-01259485]:empty{box-shadow:none;padding:14px var(--vsbs-padding-x, 16px) 10px}[data-vsbs-footer][data-v-01259485]{box-shadow:0 -1px 0 var(--vsbs-border-color, rgba(46, 59, 66, .125));flex-grow:0;flex-shrink:0;padding:16px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}[data-vsbs-footer][data-v-01259485]:empty{display:none}[data-vsbs-scroll][data-v-01259485]{flex-grow:1;overflow-y:auto;overscroll-behavior:none}[data-vsbs-content-wrapper][data-v-01259485]{height:100%}[data-vsbs-content][data-v-01259485]{display:grid;padding:8px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}.vsbs-backdrop-enter-active[data-v-01259485],.vsbs-backdrop-leave-active[data-v-01259485]{transition:opacity var(--vsbs-duration) ease}.vsbs-backdrop-enter-from[data-v-01259485],.vsbs-backdrop-leave-to[data-v-01259485]{opacity:0}
1
+ [data-vsbs-backdrop][data-v-1827f711]{background-color:var(--vsbs-backdrop-bg, rgba(0, 0, 0, .5));inset:0;pointer-events:auto;position:fixed;-webkit-user-select:none;user-select:none;will-change:opacity;--vsbs-duration: var(--v6f938e48)}[data-vsbs-shadow=true][data-v-1827f711]:before{content:"";z-index:-1;position:absolute;top:0;height:100lvh;width:100%;border-radius:var(--vsbs-border-radius, 16px);box-shadow:0 -5px 60px 0 var(--vsbs-shadow-color, rgba(89, 89, 89, .2))}[data-vsbs-sheet][data-v-1827f711]{background-color:var(--vsbs-background, #fff);border-top-left-radius:var(--vsbs-border-radius, 16px);border-top-right-radius:var(--vsbs-border-radius, 16px);border-right:1px solid var(--vsbs-outer-border-color, transparent);border-left:1px solid var(--vsbs-outer-border-color, transparent);bottom:0;display:flex;flex-direction:column;left:0;margin-left:auto;margin-right:auto;max-width:var(--vsbs-max-width, 640px);pointer-events:all;position:fixed;right:0;width:100%;will-change:height,transform}[data-vsbs-sheet-show=true][data-v-1827f711]{visibility:visible}[data-vsbs-header][data-v-1827f711]{box-shadow:0 1px 0 var(--vsbs-border-color, rgba(46, 59, 66, .125));flex-shrink:0;padding:20px var(--vsbs-padding-x, 16px) 8px;-webkit-user-select:none;user-select:none;z-index:3;border-top-left-radius:var(--vsbs-border-radius, 16px);border-top-right-radius:var(--vsbs-border-radius, 16px);border-top:1px solid var(--vsbs-outer-border-color, transparent)}[data-vsbs-header][data-v-1827f711]:before{background-color:var(--vsbs-handle-background, rgba(0, 0, 0, .28));border-radius:2px;content:"";display:block;height:4px;left:50%;position:absolute;top:8px;transform:translate(-50%);width:36px}[data-vsbs-header][data-v-1827f711]:empty{box-shadow:none;padding:14px var(--vsbs-padding-x, 16px) 10px}[data-vsbs-footer][data-v-1827f711]{box-shadow:0 -1px 0 var(--vsbs-border-color, rgba(46, 59, 66, .125));flex-grow:0;flex-shrink:0;padding:16px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}[data-vsbs-footer][data-v-1827f711]:empty{display:none}[data-vsbs-scroll][data-v-1827f711]{flex-grow:1;overflow-y:auto;overscroll-behavior:none}[data-vsbs-content-wrapper][data-v-1827f711]{height:100%}[data-vsbs-content][data-v-1827f711]{display:grid;padding:8px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}.vsbs-backdrop-enter-active[data-v-1827f711],.vsbs-backdrop-leave-active[data-v-1827f711]{transition:opacity var(--vsbs-duration) ease}.vsbs-backdrop-enter-from[data-v-1827f711],.vsbs-backdrop-leave-to[data-v-1827f711]{opacity:0}
package/package.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "url": "https://github.com/megaarmos/vue-spring-bottom-sheet/issues"
33
33
  },
34
34
  "private": false,
35
- "version": "3.0.0-next.2",
35
+ "version": "3.0.0-next.3",
36
36
  "type": "module",
37
37
  "exports": {
38
38
  ".": {
@@ -61,26 +61,26 @@
61
61
  "vue": ">=3.3"
62
62
  },
63
63
  "dependencies": {
64
- "@vueuse/core": "^13.2.0",
65
- "@vueuse/integrations": "^13.2.0",
66
- "focus-trap": "^7.6.4",
67
- "remeda": "^2.21.6",
68
- "vue": "^3.5.14"
64
+ "@vueuse/core": "^14.1.0",
65
+ "@vueuse/integrations": "^14.1.0",
66
+ "focus-trap": "^7.8.0",
67
+ "remeda": "^2.33.3",
68
+ "vue": "^3.5.26"
69
69
  },
70
70
  "devDependencies": {
71
- "@types/node": "^22.15.18",
72
- "@vitejs/plugin-vue": "^5.2.4",
71
+ "@types/node": "^25.0.8",
72
+ "@vitejs/plugin-vue": "^6.0.3",
73
73
  "@vue/eslint-config-prettier": "^10.2.0",
74
- "@vue/eslint-config-typescript": "^14.5.0",
75
- "@vue/tsconfig": "^0.7.0",
74
+ "@vue/eslint-config-typescript": "^14.6.0",
75
+ "@vue/tsconfig": "^0.8.1",
76
76
  "ajv": "^8.17.1",
77
- "eslint": "^9.27.0",
78
- "eslint-plugin-vue": "^10.1.0",
79
- "prettier": "^3.5.3",
80
- "typescript": "~5.6.3",
81
- "vite": "^6.3.5",
82
- "vite-plugin-dts": "4.5.3",
83
- "vue-tsc": "^2.2.10"
77
+ "eslint": "^9.39.2",
78
+ "eslint-plugin-vue": "^10.6.2",
79
+ "prettier": "^3.7.4",
80
+ "typescript": "~5.9.3",
81
+ "vite": "^7.3.1",
82
+ "vite-plugin-dts": "4.5.4",
83
+ "vue-tsc": "^3.2.2"
84
84
  },
85
85
  "files": [
86
86
  "dist",