@wyxos/vibe 3.1.23 → 3.1.24

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/lib/index.js CHANGED
@@ -3391,25 +3391,37 @@ function ri(e, t, n) {
3391
3391
  //#region src/components/viewer-core/useEdgeBoundary.ts
3392
3392
  var ii = 250, ai = 1e3;
3393
3393
  function oi(e) {
3394
- let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = 0, c = null;
3394
+ let t = D(!1), n = D(!1), r = D(0), i = D(0), a = D(!1), o = D(!1), s = D(!1), c = 0, l = null;
3395
3395
  x(() => {
3396
- y();
3396
+ S();
3397
3397
  });
3398
- function l() {
3399
- let r = t.value;
3398
+ function u(r = "layout") {
3399
+ let i = t.value;
3400
3400
  if (t.value = e.isAtBoundary(), !t.value) {
3401
- !a.value && !o.value && (n.value = !0);
3401
+ (!a.value && !o.value || r === "scroll") && (n.value = !0);
3402
3402
  return;
3403
3403
  }
3404
- !r && n.value && m();
3404
+ if (!i && n.value) {
3405
+ if (r === "scroll" && a.value) {
3406
+ s.value = !0;
3407
+ return;
3408
+ }
3409
+ h();
3410
+ }
3405
3411
  }
3406
- function u(t) {
3407
- if (!b(t) || !e.isAtBoundary()) return;
3412
+ function d(t) {
3413
+ if (!C(t) || !e.isAtBoundary()) return;
3408
3414
  let n = Date.now();
3409
- n < s || (s = n + ii, m());
3415
+ if (!(n < c)) {
3416
+ if (c = n + ii, a.value) {
3417
+ s.value = !0;
3418
+ return;
3419
+ }
3420
+ h();
3421
+ }
3410
3422
  }
3411
- function d() {
3412
- if (!g()) return;
3423
+ function f() {
3424
+ if (!_()) return;
3413
3425
  let t = e.requestPage.value;
3414
3426
  if (typeof t != "function") return;
3415
3427
  i.value = r.value, n.value = !1, a.value = !0, o.value = !0;
@@ -3417,48 +3429,57 @@ function oi(e) {
3417
3429
  try {
3418
3430
  s = t();
3419
3431
  } catch {
3420
- _();
3432
+ v();
3421
3433
  return;
3422
3434
  }
3423
3435
  Promise.resolve(s).catch(() => {}).finally(() => {
3424
- !e.loading.value && o.value && _();
3436
+ !e.loading.value && o.value && v();
3425
3437
  });
3426
3438
  }
3427
- function f(e) {
3428
- !e && o.value && _();
3429
- }
3430
- function p(t) {
3431
- !o.value || t <= 0 || (o.value = !1, v(e.getAnimationLockMs(t)));
3439
+ function p(e) {
3440
+ !e && o.value && v();
3432
3441
  }
3433
- function m() {
3434
- h() && (r.value += 1);
3442
+ function m(t) {
3443
+ !o.value || t <= 0 || (o.value = !1, y(e.getAnimationLockMs(t)));
3435
3444
  }
3436
3445
  function h() {
3437
- return e.hasPage.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
3446
+ g() && (r.value += 1);
3438
3447
  }
3439
3448
  function g() {
3440
- return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
3449
+ return e.hasPage.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
3441
3450
  }
3442
3451
  function _() {
3443
- o.value = !1, v(ai);
3452
+ return e.hasPage.value && t.value && r.value > i.value && !e.interactionLocked?.value && !e.loading.value && !a.value && typeof e.requestPage.value == "function";
3444
3453
  }
3445
- function v(e) {
3446
- y(), a.value = !0, c = setTimeout(() => {
3447
- c = null, a.value = !1;
3454
+ function v() {
3455
+ o.value = !1, y(ai);
3456
+ }
3457
+ function y(e) {
3458
+ S(), a.value = !0, l = setTimeout(() => {
3459
+ l = null, a.value = !1, b();
3448
3460
  }, Math.max(0, e));
3449
3461
  }
3450
- function y() {
3451
- c &&= (clearTimeout(c), null);
3462
+ function b() {
3463
+ if (s.value) {
3464
+ if (s.value = !1, !e.isAtBoundary()) {
3465
+ o.value || (n.value = !0);
3466
+ return;
3467
+ }
3468
+ t.value = !0, h(), f();
3469
+ }
3452
3470
  }
3453
- function b(t) {
3471
+ function S() {
3472
+ l &&= (clearTimeout(l), null);
3473
+ }
3474
+ function C(t) {
3454
3475
  return e.direction === "top" ? t.deltaY < 0 : t.deltaY > 0;
3455
3476
  }
3456
3477
  return {
3457
- maybeRequestPage: d,
3458
- onItemsMutated: p,
3459
- onLoadingChange: f,
3460
- onWheel: u,
3461
- syncBoundary: l
3478
+ maybeRequestPage: f,
3479
+ onItemsMutated: m,
3480
+ onLoadingChange: p,
3481
+ onWheel: d,
3482
+ syncBoundary: u
3462
3483
  };
3463
3484
  }
3464
3485
  //#endregion
@@ -3567,9 +3588,9 @@ function fi(e) {
3567
3588
  }
3568
3589
  //#endregion
3569
3590
  //#region src/components/viewer-core/useMasonryList.ts
3570
- var pi = 600, mi = 24, hi = 16, gi = 300, _i = 200, vi = 0, yi = mi + hi, bi = 200, xi = 500, Si = 1e3;
3571
- function Ci(e) {
3572
- let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || gi), o = D([]), s = D([]), c = D(/* @__PURE__ */ new Map()), l = D(0), u = D(/* @__PURE__ */ new Map()), d = D(null), f = si(), p = i(() => Math.max(gi, a.value - mi * 2)), m = i(() => Er(p.value, gi)), h = i(() => Dr(p.value, m.value, gi, hi)), g = i(() => ti(e.bottomLoadBufferPx.value)), v = i(() => wi(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => Ar({
3591
+ var pi = 600, mi = 24, hi = 16, gi = 300, _i = 200, vi = 0, yi = 1, bi = mi + hi, xi = 200, Si = 500, Ci = 1e3;
3592
+ function wi(e) {
3593
+ let t = D(null), n = D(0), r = D(typeof window > "u" ? 0 : window.innerHeight || 0), a = D(typeof window > "u" ? 0 : window.innerWidth || gi), o = D([]), s = D([]), c = D(/* @__PURE__ */ new Map()), l = D(0), u = D(/* @__PURE__ */ new Map()), d = D(null), f = si(), p = i(() => Math.max(gi, a.value - mi * 2)), m = i(() => Er(p.value, gi)), h = i(() => Dr(p.value, m.value, gi, hi)), g = i(() => ti(e.bottomLoadBufferPx.value)), v = i(() => Ti(e.activeIndex.value, 0, Math.max(0, e.items.value.length - 1))), y = i(() => Ar({
3573
3594
  itemCount: e.items.value.length,
3574
3595
  viewportHeight: r.value,
3575
3596
  scrollTop: n.value,
@@ -3581,7 +3602,7 @@ function Ci(e) {
3581
3602
  index: t
3582
3603
  }))), C = i(() => {
3583
3604
  let e = l.value + mi * 2, t = P.reservedContentHeight.value ?? 0;
3584
- return Math.max(e, t, r.value) + bi + g.value;
3605
+ return Math.max(e, t, r.value) + xi + g.value;
3585
3606
  }), w = i(() => e.hasNextPage.value || e.allowExhaustedNextPageRefresh.value), T = i(() => $r({
3586
3607
  active: e.active.value,
3587
3608
  maxScrollTop: Y(),
@@ -3592,7 +3613,7 @@ function Ci(e) {
3592
3613
  active: e.active.value,
3593
3614
  maxScrollTop: Y(),
3594
3615
  progressDistancePx: n.value,
3595
- thresholdPx: yi,
3616
+ thresholdPx: bi,
3596
3617
  triggerEnabled: e.hasPreviousPage.value
3597
3618
  })), k = ei({
3598
3619
  containerHeight: C,
@@ -3610,24 +3631,24 @@ function Ci(e) {
3610
3631
  }), j = oi({
3611
3632
  direction: "top",
3612
3633
  getAnimationLockMs(e) {
3613
- return Math.max(xi, zr(e)) + Si;
3634
+ return Math.max(Si, zr(e)) + Ci;
3614
3635
  },
3615
3636
  hasPage: e.hasPreviousPage,
3616
3637
  interactionLocked: f.isBoundaryInteractionLocked,
3617
3638
  isAtBoundary() {
3618
- return n.value <= yi;
3639
+ return n.value <= bi;
3619
3640
  },
3620
3641
  loading: e.loading,
3621
3642
  requestPage: e.requestPreviousPage
3622
3643
  }), M = oi({
3623
3644
  direction: "bottom",
3624
3645
  getAnimationLockMs(e) {
3625
- return zr(e) + Si;
3646
+ return zr(e) + Ci;
3626
3647
  },
3627
3648
  hasPage: w,
3628
3649
  interactionLocked: f.isBoundaryInteractionLocked,
3629
3650
  isAtBoundary() {
3630
- return J() <= vi;
3651
+ return J() <= yi;
3631
3652
  },
3632
3653
  loading: e.loading,
3633
3654
  requestPage: e.requestNextPage
@@ -3662,7 +3683,7 @@ function Ci(e) {
3662
3683
  previousItems: r ?? [],
3663
3684
  scrollTop: n.value
3664
3685
  });
3665
- i.shouldLockBoundaryInteractionForRemoval && f.lockBoundaryInteraction(Br() + Si), i.shouldResetScrollForEmptyRemoval && H(), R(), i.removedItems.length > 0 && A.markLeave(i.removedItems), i.addedItems.length > 0 && (A.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? j.onItemsMutated(i.addedItems.length) : M.onItemsMutated(i.addedItems.length)), A.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => Q(e))), i.isPrepend ? xi : void 0), i.anchorId ? (await _(), V(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && W();
3686
+ i.shouldLockBoundaryInteractionForRemoval && f.lockBoundaryInteraction(Br() + Ci), i.shouldResetScrollForEmptyRemoval && H(), R(), i.removedItems.length > 0 && A.markLeave(i.removedItems), i.addedItems.length > 0 && (A.markEnter(i.addedItems, i.isPrepend ? "top" : "bottom"), i.isPrepend ? j.onItemsMutated(i.addedItems.length) : M.onItemsMutated(i.addedItems.length)), A.playFlipMoveAnimation(i.oldPositionsById, new Set(i.addedItems.map((e) => Q(e))), i.isPrepend ? Si : void 0), i.anchorId ? (await _(), V(i.anchorId, i.oldPositionsById)) : e.active.value && i.previousIds.length > 0 && W();
3666
3687
  }, { immediate: !0 }), L([
3667
3688
  () => e.pendingAppendItems.value.map((e) => Q(e)),
3668
3689
  m,
@@ -3676,7 +3697,7 @@ function Ci(e) {
3676
3697
  }
3677
3698
  if (N.start(), !a || i !== !1 || d.value == null) return;
3678
3699
  await _();
3679
- let o = Math.max(0, C.value - r.value), s = wi(d.value, 0, o);
3700
+ let o = Math.max(0, C.value - r.value), s = Ti(d.value, 0, o);
3680
3701
  a.scrollTop = s, n.value = s, j.syncBoundary(), M.syncBoundary();
3681
3702
  }), L(() => e.loading.value, async (e) => {
3682
3703
  P.clearReservedHeightWhenIdle(e), j.onLoadingChange(e), M.onLoadingChange(e), await _();
@@ -3701,7 +3722,7 @@ function Ci(e) {
3701
3722
  })), s.value = t.heights, c.value = t.buckets, l.value = t.contentHeight, u.value = t.indexById;
3702
3723
  }
3703
3724
  function z() {
3704
- e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = K(), j.syncBoundary(), M.syncBoundary(), ne(), !W() && (I ||= requestAnimationFrame(() => {
3725
+ e.active.value && (n.value = t.value?.scrollTop ?? 0, r.value = K(), j.syncBoundary("scroll"), M.syncBoundary("scroll"), ne(), !W() && (I ||= requestAnimationFrame(() => {
3705
3726
  I = 0, U();
3706
3727
  })));
3707
3728
  }
@@ -3722,7 +3743,7 @@ function Ci(e) {
3722
3743
  let a = t.value, c = o.value[e], l = s.value[e];
3723
3744
  if (!a || !c || !l) return;
3724
3745
  let u = a.scrollTop, d = Math.max(0, C.value - r.value);
3725
- i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - mi : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + mi), a.scrollTop = wi(u, 0, d), n.value = a.scrollTop, U();
3746
+ i === "center" ? u = c.y - (r.value - l) / 2 : c.y < a.scrollTop ? u = c.y - mi : c.y + l > a.scrollTop + r.value && (u = c.y + l - r.value + mi), a.scrollTop = Ti(u, 0, d), n.value = a.scrollTop, U();
3726
3747
  }
3727
3748
  function V(e, r) {
3728
3749
  let i = t.value, a = r.get(e), s = u.value.get(e), c = s == null ? null : o.value[s];
@@ -3750,7 +3771,7 @@ function Ci(e) {
3750
3771
  e.setActiveIndex(i);
3751
3772
  }
3752
3773
  function W() {
3753
- let t = n.value <= yi, r = J() <= vi;
3774
+ let t = n.value <= bi, r = J() <= yi;
3754
3775
  return t ? (e.setActiveIndex(0), !0) : r ? (e.setActiveIndex(Math.max(0, e.items.value.length - 1)), !0) : !1;
3755
3776
  }
3756
3777
  function ne() {
@@ -3792,17 +3813,17 @@ function Ci(e) {
3792
3813
  scrollViewportRef: t
3793
3814
  };
3794
3815
  }
3795
- function wi(e, t, n) {
3816
+ function Ti(e, t, n) {
3796
3817
  return Math.min(Math.max(e, t), n);
3797
3818
  }
3798
3819
  //#endregion
3799
3820
  //#region src/components/viewer-core/listCardAsset.ts
3800
- function Ti(e) {
3821
+ function Ei(e) {
3801
3822
  if (e) try {
3802
3823
  e.removeAttribute("src"), e.src = "";
3803
3824
  } catch {}
3804
3825
  }
3805
- function Ei(e) {
3826
+ function Di(e) {
3806
3827
  if (e) {
3807
3828
  try {
3808
3829
  e.currentTime = 0;
@@ -3813,12 +3834,12 @@ function Ei(e) {
3813
3834
  } catch {}
3814
3835
  }
3815
3836
  }
3816
- function Di(e, t) {
3837
+ function Oi(e, t) {
3817
3838
  if (t) return e.bottom > t.top && e.top < t.bottom;
3818
3839
  let n = window.innerHeight || document.documentElement.clientHeight || 0;
3819
3840
  return e.bottom > 0 && e.top < n;
3820
3841
  }
3821
- function Oi(e) {
3842
+ function ki(e) {
3822
3843
  if (!e) return null;
3823
3844
  try {
3824
3845
  return new URL(e, window.location.href).href;
@@ -3828,9 +3849,9 @@ function Oi(e) {
3828
3849
  }
3829
3850
  //#endregion
3830
3851
  //#region src/components/viewer-core/listPreview.ts
3831
- var ki = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, Ai = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, ji = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
3832
- function Mi(e) {
3833
- let t = Ni(e), n = t?.url, r = Tr(e), i = e.title?.trim() || Ht(e.type);
3852
+ var Ai = /\.(avif|gif|jpe?g|png|svg|webp)(\?|#|$)/i, ji = /\.(m4v|mov|mp4|mpeg|ogg|ogv|webm)(\?|#|$)/i, Mi = /^(?:(?:https?:)?\/\/[^/]+)?\/api\/files\/[^/?#]+\/(?:preview|downloaded)(?:\?|#|$)/i;
3853
+ function Ni(e) {
3854
+ let t = Pi(e), n = t?.url, r = Tr(e), i = e.title?.trim() || Ht(e.type);
3834
3855
  return t?.mediaType === "video" && typeof n == "string" ? {
3835
3856
  kind: "video",
3836
3857
  url: n,
@@ -3849,13 +3870,13 @@ function Mi(e) {
3849
3870
  width: r.width,
3850
3871
  height: r.height,
3851
3872
  label: i
3852
- } : typeof n == "string" && Fi(e, n) ? {
3873
+ } : typeof n == "string" && Ii(e, n) ? {
3853
3874
  kind: "video",
3854
3875
  url: n,
3855
3876
  width: r.width,
3856
3877
  height: r.height,
3857
3878
  label: i
3858
- } : typeof n == "string" && Pi(e, n) ? {
3879
+ } : typeof n == "string" && Fi(e, n) ? {
3859
3880
  kind: "image",
3860
3881
  url: n,
3861
3882
  width: r.width,
@@ -3869,26 +3890,26 @@ function Mi(e) {
3869
3890
  label: i
3870
3891
  };
3871
3892
  }
3872
- function Ni(e) {
3893
+ function Pi(e) {
3873
3894
  return e.preview?.url ? e.preview : typeof e.url != "string" || e.url.trim() === "" ? null : { url: e.url };
3874
3895
  }
3875
- function Pi(e, t) {
3876
- return e.type !== "image" || typeof t != "string" ? !1 : ki.test(t) || Ii(t);
3877
- }
3878
3896
  function Fi(e, t) {
3879
- return e.type !== "video" || typeof t != "string" ? !1 : Ai.test(t) || Li(t);
3897
+ return e.type !== "image" || typeof t != "string" ? !1 : Ai.test(t) || Li(t);
3880
3898
  }
3881
- function Ii(e) {
3882
- return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
3899
+ function Ii(e, t) {
3900
+ return e.type !== "video" || typeof t != "string" ? !1 : ji.test(t) || Ri(t);
3883
3901
  }
3884
3902
  function Li(e) {
3885
- return ji.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3903
+ return /^(https?:\/\/|\/\/|\/(?!\/)|\.{1,2}\/|blob:|data:)/i.test(e);
3904
+ }
3905
+ function Ri(e) {
3906
+ return Mi.test(e) || /^blob:/i.test(e) || /^data:video\//i.test(e);
3886
3907
  }
3887
3908
  //#endregion
3888
3909
  //#region src/components/viewer-core/useListCardHealthCheck.ts
3889
- function Ri(e) {
3910
+ function zi(e) {
3890
3911
  let t = D(null), n = i(() => {
3891
- let t = typeof e.item.value.healthCheck?.url == "string" ? Oi(e.item.value.healthCheck.url) : null;
3912
+ let t = typeof e.item.value.healthCheck?.url == "string" ? ki(e.item.value.healthCheck.url) : null;
3892
3913
  return !t || t === e.attachedAssetUrl.value ? null : t;
3893
3914
  }), r = null, a = 0, o = /* @__PURE__ */ new Map();
3894
3915
  L(n, (e, n) => {
@@ -3966,14 +3987,14 @@ function Ri(e) {
3966
3987
  }
3967
3988
  //#endregion
3968
3989
  //#region src/components/ListCard.vue?vue&type=script&setup=true&lang.ts
3969
- var zi = ["aria-label"], Bi = {
3990
+ var Bi = ["aria-label"], Vi = {
3970
3991
  key: 0,
3971
3992
  "data-testid": "vibe-list-card-spinner",
3972
3993
  class: "pointer-events-none absolute inset-0 z-[4] grid place-items-center bg-black/18"
3973
- }, Vi = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Hi = ["src", "alt"], Ui = ["src"], Wi = ["data-kind"], Gi = { class: "grid justify-items-center gap-3 px-4 text-center" }, Ki = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, qi = {
3994
+ }, Hi = { class: "inline-flex h-12 w-12 items-center justify-center rounded-full bg-black/45 shadow-[0_18px_40px_-18px_rgba(0,0,0,0.85)] backdrop-blur-[18px]" }, Ui = ["src", "alt"], Wi = ["src"], Gi = ["data-kind"], Ki = { class: "grid justify-items-center gap-3 px-4 text-center" }, qi = { class: "text-[0.68rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, Ji = {
3974
3995
  key: 4,
3975
3996
  class: "grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.08),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
3976
- }, Ji = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Yi = { class: "pointer-events-none absolute inset-0 z-[3]" }, Xi = /* @__PURE__ */ d({
3997
+ }, Yi = { class: "inline-flex h-14 w-14 items-center justify-center border border-white/16 bg-black/20" }, Xi = { class: "pointer-events-none absolute inset-0 z-[3]" }, Zi = /* @__PURE__ */ d({
3977
3998
  __name: "ListCard",
3978
3999
  props: {
3979
4000
  active: {
@@ -3997,7 +4018,7 @@ var zi = ["aria-label"], Bi = {
3997
4018
  },
3998
4019
  emits: ["open"],
3999
4020
  setup(e, { emit: t }) {
4000
- let n = e, r = t, l = i(() => Mi(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), P = i(() => l.value.kind === "video" && !!E.value), F = Ri({
4021
+ let n = e, r = t, l = i(() => Ni(n.item)), d = D(!1), f = D(!1), p = D(!1), m = D(l.value.kind === "fallback"), h = D(!1), g = D(null), _ = D(null), y = D(null), b = D(null), C = D(null), T = D(l.value.kind === "fallback"), E = i(() => T.value ? n.surfaceActive ? d.value ? l.value.url : null : l.value.url : null), O = i(() => n.surfaceActive && d.value && (l.value.kind === "image" || l.value.kind === "video") && !!l.value.url), M = i(() => l.value.kind === "image" && !!E.value), P = i(() => l.value.kind === "video" && !!E.value), F = zi({
4001
4022
  attachedAssetUrl: E,
4002
4023
  getPriority: ue,
4003
4024
  isInView: d,
@@ -4117,7 +4138,7 @@ var zi = ["aria-label"], Bi = {
4117
4138
  d.value = !0;
4118
4139
  return;
4119
4140
  }
4120
- d.value = Di(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
4141
+ d.value = Oi(e?.boundingClientRect ?? t.getBoundingClientRect(), e?.rootBounds ?? b.value?.getBoundingClientRect() ?? null);
4121
4142
  }
4122
4143
  function ie(e) {
4123
4144
  if (!e) return;
@@ -4137,10 +4158,10 @@ var zi = ["aria-label"], Bi = {
4137
4158
  }), g.value = null, m.value = !1, T.value = !1, Y(), K();
4138
4159
  }
4139
4160
  function se() {
4140
- Ti(_.value);
4161
+ Ei(_.value);
4141
4162
  }
4142
4163
  function ce() {
4143
- Ei(C.value);
4164
+ Di(C.value);
4144
4165
  }
4145
4166
  function ue() {
4146
4167
  let e = y.value;
@@ -4154,8 +4175,8 @@ var zi = ["aria-label"], Bi = {
4154
4175
  return Math.abs((t.top + t.bottom) / 2 - n);
4155
4176
  }
4156
4177
  function X(e) {
4157
- let t = Oi(E.value);
4158
- return !e || !t ? !1 : Oi("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
4178
+ let t = ki(E.value);
4179
+ return !e || !t ? !1 : ki("currentSrc" in e && e.currentSrc || e.getAttribute("src")) === t;
4159
4180
  }
4160
4181
  function de() {
4161
4182
  r("open");
@@ -4183,8 +4204,8 @@ var zi = ["aria-label"], Bi = {
4183
4204
  class: "absolute inset-0 z-[1] block h-full w-full cursor-pointer text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#f7f1ea]",
4184
4205
  "aria-label": n.item.title || `Open item ${n.index + 1}`,
4185
4206
  onClick: de
4186
- }, null, 8, zi),
4187
- ee.value ? (w(), s("div", Bi, [c("span", Vi, [u(N(oe), {
4207
+ }, null, 8, Bi),
4208
+ ee.value ? (w(), s("div", Vi, [c("span", Hi, [u(N(oe), {
4188
4209
  class: "h-5 w-5 animate-spin stroke-[1.9] text-[#f7f1ea]/78",
4189
4210
  "aria-hidden": "true"
4190
4211
  })])])) : o("", !0),
@@ -4198,7 +4219,7 @@ var zi = ["aria-label"], Bi = {
4198
4219
  class: v(["block h-full w-full object-cover transition-opacity duration-300", m.value ? "pointer-events-none opacity-100" : "pointer-events-none opacity-0"]),
4199
4220
  onLoad: U,
4200
4221
  onError: W
4201
- }, null, 42, Hi)) : P.value && E.value && !R.value ? (w(), s("video", {
4222
+ }, null, 42, Ui)) : P.value && E.value && !R.value ? (w(), s("video", {
4202
4223
  key: 2,
4203
4224
  ref_key: "videoRef",
4204
4225
  ref: C,
@@ -4214,31 +4235,31 @@ var zi = ["aria-label"], Bi = {
4214
4235
  onPlaying: ne,
4215
4236
  onStalled: G,
4216
4237
  onWaiting: G
4217
- }, null, 42, Ui)) : R.value ? (w(), s("div", {
4238
+ }, null, 42, Wi)) : R.value ? (w(), s("div", {
4218
4239
  key: 3,
4219
4240
  "data-testid": "vibe-list-card-error",
4220
4241
  "data-kind": I.value,
4221
4242
  class: "pointer-events-none relative z-[2] grid h-full w-full place-items-center bg-[radial-gradient(circle_at_center,rgba(239,68,68,0.12),transparent_65%),linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.02))]"
4222
- }, [c("div", Gi, [
4243
+ }, [c("div", Ki, [
4223
4244
  u(N(le), {
4224
4245
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
4225
4246
  "aria-hidden": "true"
4226
4247
  }),
4227
- c("span", Ki, j(N(hn)(I.value)), 1),
4248
+ c("span", qi, j(N(hn)(I.value)), 1),
4228
4249
  z.value ? (w(), s("button", {
4229
4250
  key: 0,
4230
4251
  type: "button",
4231
4252
  class: "pointer-events-auto inline-flex items-center justify-center border border-white/14 bg-black/35 px-3 py-2 text-[0.62rem] font-bold uppercase tracking-[0.22em] text-[#f7f1ea]/82 backdrop-blur-[18px] transition hover:border-white/28 hover:bg-black/50",
4232
4253
  onClick: te(ae, ["stop"])
4233
4254
  }, " Retry ")) : o("", !0)
4234
- ])], 8, Wi)) : (w(), s("div", qi, [c("div", Ji, [k(e.$slots, "item-icon", {
4255
+ ])], 8, Gi)) : (w(), s("div", Ji, [c("div", Yi, [k(e.$slots, "item-icon", {
4235
4256
  icon: N(Vt)(n.item.type),
4236
4257
  item: n.item
4237
4258
  }, () => [(w(), a(A(N(Vt)(n.item.type)), {
4238
4259
  class: "h-6 w-6 stroke-[1.8] text-[#f7f1ea]/78",
4239
4260
  "aria-hidden": "true"
4240
4261
  }))])])])),
4241
- c("div", Yi, [k(e.$slots, "grid-item-overlay", {
4262
+ c("div", Xi, [k(e.$slots, "grid-item-overlay", {
4242
4263
  active: n.active,
4243
4264
  focused: f.value,
4244
4265
  hovered: p.value,
@@ -4248,24 +4269,24 @@ var zi = ["aria-label"], Bi = {
4248
4269
  })])
4249
4270
  ], 34));
4250
4271
  }
4251
- }), Zi = { class: "relative h-full min-h-0 bg-[radial-gradient(circle_at_top_center,rgba(255,255,255,0.04),transparent_28%),linear-gradient(180deg,#06070b,#05060a)]" }, Qi = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, $i = {
4272
+ }), Qi = { class: "relative h-full min-h-0 bg-[radial-gradient(circle_at_top_center,rgba(255,255,255,0.04),transparent_28%),linear-gradient(180deg,#06070b,#05060a)]" }, $i = { class: "pointer-events-none absolute inset-x-0 top-0 z-[2] flex justify-end p-6" }, ea = {
4252
4273
  "data-testid": "vibe-pagination",
4253
4274
  class: "inline-flex shrink-0 items-center gap-2 whitespace-nowrap border border-white/14 bg-black/40 px-3 py-2 text-[0.63rem] font-bold uppercase tracking-[0.12em] text-[#f7f1ea]/72 backdrop-blur-[18px] min-[721px]:gap-3 min-[721px]:px-4 min-[721px]:py-3 min-[721px]:text-[0.74rem] min-[721px]:tracking-[0.2em]"
4254
- }, ea = { class: "whitespace-nowrap" }, ta = {
4275
+ }, ta = { class: "whitespace-nowrap" }, na = {
4255
4276
  key: 0,
4256
4277
  class: "whitespace-nowrap border-l border-white/12 pl-2 text-[#f7f1ea]/56 min-[721px]:pl-3"
4257
- }, na = [
4278
+ }, ra = [
4258
4279
  "data-active",
4259
4280
  "data-index",
4260
4281
  "data-item-id",
4261
4282
  "data-occurrence-key"
4262
- ], ra = ["data-item-id"], ia = {
4283
+ ], ia = ["data-item-id"], aa = {
4263
4284
  key: 0,
4264
4285
  class: "pointer-events-none absolute inset-y-0 right-0 z-[3] hidden w-8 min-[1024px]:block"
4265
- }, aa = {
4286
+ }, oa = {
4266
4287
  key: 1,
4267
4288
  class: "pointer-events-none absolute inset-x-0 bottom-0 z-[2] px-5 pb-5 sm:px-6"
4268
- }, oa = { class: "mx-auto flex w-full justify-center" }, sa = /* @__PURE__ */ d({
4289
+ }, sa = { class: "mx-auto flex w-full justify-center" }, ca = /* @__PURE__ */ d({
4269
4290
  __name: "ListSurface",
4270
4291
  props: {
4271
4292
  active: {
@@ -4327,7 +4348,7 @@ var zi = ["aria-label"], Bi = {
4327
4348
  "update:activeIndex"
4328
4349
  ],
4329
4350
  setup(e, { expose: n, emit: r }) {
4330
- let d = e, f = F(), p = r, m = Ci({
4351
+ let d = e, f = F(), p = r, m = wi({
4331
4352
  active: M(d, "active"),
4332
4353
  allowExhaustedNextPageRefresh: M(d, "allowExhaustedNextPageRefresh"),
4333
4354
  bottomLoadBufferPx: M(d, "bottomLoadBufferPx"),
@@ -4375,8 +4396,8 @@ var zi = ["aria-label"], Bi = {
4375
4396
  nextBoundaryLoadProgress: e,
4376
4397
  previousBoundaryLoadProgress: t
4377
4398
  });
4378
- }, { immediate: !0 }), (e, n) => (w(), s("div", Zi, [
4379
- c("div", Qi, [c("span", $i, [c("span", ea, j(N(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", ta, j(d.paginationDetail), 1)) : o("", !0)])]),
4399
+ }, { immediate: !0 }), (e, n) => (w(), s("div", Qi, [
4400
+ c("div", $i, [c("span", ea, [c("span", ta, j(N(m).paginationLabel.value), 1), d.paginationDetail ? (w(), s("span", na, j(d.paginationDetail), 1)) : o("", !0)])]),
4380
4401
  c("div", {
4381
4402
  ref: N(m).scrollViewportRef,
4382
4403
  "data-testid": "vibe-list-scroll",
@@ -4397,7 +4418,7 @@ var zi = ["aria-label"], Bi = {
4397
4418
  "data-occurrence-key": N(Q)(t),
4398
4419
  class: "absolute will-change-transform",
4399
4420
  style: b(N(m).getCardStyle(n))
4400
- }, [u(Xi, {
4421
+ }, [u(Zi, {
4401
4422
  active: n === N(m).resolvedActiveIndex.value,
4402
4423
  index: n,
4403
4424
  item: t,
@@ -4421,14 +4442,14 @@ var zi = ["aria-label"], Bi = {
4421
4442
  "report-asset-load",
4422
4443
  "surface-active",
4423
4444
  "onOpen"
4424
- ])], 12, na))), 128)),
4445
+ ])], 12, ra))), 128)),
4425
4446
  (w(!0), s(t, null, O(N(m).leavingItems.value, (t) => (w(), s("article", {
4426
4447
  key: `leaving-${N(Q)(t.item)}`,
4427
4448
  "data-testid": "vibe-list-card-leaving",
4428
4449
  "data-item-id": t.item.id,
4429
4450
  class: "pointer-events-none absolute z-[2] will-change-[opacity,transform]",
4430
4451
  style: b(N(m).getLeavingCardStyle(t.item))
4431
- }, [u(Xi, {
4452
+ }, [u(Zi, {
4432
4453
  active: !1,
4433
4454
  index: -1,
4434
4455
  item: t.item,
@@ -4443,7 +4464,7 @@ var zi = ["aria-label"], Bi = {
4443
4464
  "item",
4444
4465
  "report-asset-error",
4445
4466
  "report-asset-load"
4446
- ])], 12, ra))), 128)),
4467
+ ])], 12, ia))), 128)),
4447
4468
  N(P) && N(E) ? (w(), a(Bn, {
4448
4469
  key: 0,
4449
4470
  message: N(E).message,
@@ -4458,12 +4479,12 @@ var zi = ["aria-label"], Bi = {
4458
4479
  "surface"
4459
4480
  ])) : o("", !0)
4460
4481
  ], 4)], 544),
4461
- N(m).showScrollbar.value ? (w(), s("div", ia, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
4482
+ N(m).showScrollbar.value ? (w(), s("div", aa, [n[2] ||= c("div", { class: "absolute bottom-6 right-3 top-6 w-px bg-white/8" }, null, -1), c("div", {
4462
4483
  "data-testid": "vibe-list-scrollbar-thumb",
4463
4484
  class: v(["absolute right-[0.625rem] w-1 bg-white/34 transition-[height,transform,background-color,opacity] duration-300 ease-out", d.loading ? "bg-white/52" : "bg-white/34"]),
4464
4485
  style: b(N(m).getScrollbarThumbStyle())
4465
4486
  }, null, 6)])) : o("", !0),
4466
- f["grid-footer"] ? (w(), s("div", aa, [c("div", oa, [k(e.$slots, "grid-footer")])])) : o("", !0),
4487
+ f["grid-footer"] ? (w(), s("div", oa, [c("div", sa, [k(e.$slots, "grid-footer")])])) : o("", !0),
4467
4488
  x.value ? (w(), s("div", {
4468
4489
  key: 2,
4469
4490
  class: v(["pointer-events-none absolute inset-x-0 bottom-0 z-[3] flex justify-center px-6", f["grid-footer"] ? "pb-24" : "pb-6"])
@@ -4489,13 +4510,13 @@ var zi = ["aria-label"], Bi = {
4489
4510
  ])) : o("", !0)
4490
4511
  ]));
4491
4512
  }
4492
- }), ca = ["data-surface-mode"], la = {
4513
+ }), la = ["data-surface-mode"], ua = {
4493
4514
  key: 1,
4494
4515
  class: "absolute left-5 top-5 z-30 border border-amber-400/45 bg-black/35 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-amber-100 backdrop-blur"
4495
- }, ua = ["data-visible", "inert"], da = ["data-visible", "inert"], fa = {
4516
+ }, da = ["data-visible", "inert"], fa = ["data-visible", "inert"], pa = {
4496
4517
  key: 3,
4497
4518
  class: "relative z-[1] grid h-full w-full content-center justify-items-center gap-6 px-[clamp(2rem,4vw,3rem)] py-[clamp(2rem,4vw,3rem)] text-center"
4498
- }, pa = /* @__PURE__ */ d({
4519
+ }, ma = /* @__PURE__ */ d({
4499
4520
  name: "VibeLayout",
4500
4521
  __name: "Layout",
4501
4522
  props: {
@@ -4563,7 +4584,7 @@ var zi = ["aria-label"], Bi = {
4563
4584
  type: "button",
4564
4585
  class: "absolute left-5 top-5 z-30 inline-flex items-center border border-rose-400/55 bg-rose-500/18 px-4 py-2 text-xs font-medium uppercase tracking-[0.24em] text-white backdrop-blur transition hover:bg-rose-500/28",
4565
4586
  onClick: n[0] ||= (...e) => N(h).retryInitialLoad && N(h).retryInitialLoad(...e)
4566
- }, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", la, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4587
+ }, " Retry ")) : N(h).errorMessage.value && N(h).items.value.length > 0 ? (w(), s("div", ua, j(N(h).errorMessage.value), 1)) : o("", !0), N(h).isDesktop.value ? (w(), s(t, { key: 2 }, [u(r, {
4567
4588
  appear: "",
4568
4589
  "enter-active-class": "transition-[opacity,transform] duration-300 ease-out",
4569
4590
  "enter-from-class": "translate-y-3 opacity-0",
@@ -4577,7 +4598,7 @@ var zi = ["aria-label"], Bi = {
4577
4598
  "data-visible": N(h).surfaceMode.value === "list" ? "true" : "false",
4578
4599
  inert: N(h).surfaceMode.value !== "list",
4579
4600
  class: "absolute inset-0 z-[2]"
4580
- }, [u(sa, {
4601
+ }, [u(ca, {
4581
4602
  ref_key: "listSurfaceRef",
4582
4603
  ref: g,
4583
4604
  active: N(h).surfaceMode.value === "list",
@@ -4651,7 +4672,7 @@ var zi = ["aria-label"], Bi = {
4651
4672
  "onBoundaryLoadProgress",
4652
4673
  "onOpenFullscreen",
4653
4674
  "onUpdate:activeIndex"
4654
- ])], 8, ua), [[I, N(h).surfaceMode.value === "list"]])]),
4675
+ ])], 8, da), [[I, N(h).surfaceMode.value === "list"]])]),
4655
4676
  _: 3
4656
4677
  }), u(r, {
4657
4678
  appear: "",
@@ -4736,9 +4757,9 @@ var zi = ["aria-label"], Bi = {
4736
4757
  "show-back-to-list",
4737
4758
  "onBackToList",
4738
4759
  "onUpdate:activeIndex"
4739
- ])], 8, da), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
4760
+ ])], 8, fa), [[I, N(h).surfaceMode.value === "fullscreen"]])]),
4740
4761
  _: 3
4741
- })], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", fa, [u(N(oe), {
4762
+ })], 64)) : N(h).items.value.length === 0 && N(h).loading.value ? (w(), s("div", pa, [u(N(oe), {
4742
4763
  class: "size-10 animate-spin text-[#f7f1ea]/82",
4743
4764
  "aria-hidden": "true"
4744
4765
  }), n[1] ||= c("p", { class: "m-0 text-[0.9rem] font-semibold uppercase tracking-[0.22em] text-[#f7f1ea]/72" }, " Loading... ", -1)])) : (w(), a(Sr, {
@@ -4809,10 +4830,10 @@ var zi = ["aria-label"], Bi = {
4809
4830
  "show-status-badges",
4810
4831
  "onBackToList",
4811
4832
  "onUpdate:activeIndex"
4812
- ]))], 8, ca));
4833
+ ]))], 8, la));
4813
4834
  }
4814
- }), ma = { install(e) {
4815
- e.component("VibeLayout", pa);
4835
+ }), ha = { install(e) {
4836
+ e.component("VibeLayout", ma);
4816
4837
  } };
4817
4838
  //#endregion
4818
- export { pa as VibeLayout, ma as VibePlugin, ma as default };
4839
+ export { ma as VibeLayout, ha as VibePlugin, ha as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyxos/vibe",
3
- "version": "3.1.23",
3
+ "version": "3.1.24",
4
4
  "description": "A Vue 3 media viewer for large feeds of image, video, audio, and mixed-content items.",
5
5
  "keywords": [
6
6
  "vue",