evo-vue-carousel 1.0.11 → 1.0.12

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as Jr, computed as w, h as M, ref as O, provide as oe, readonly as ie, inject as te, isRef as Qr, watch as z, onMounted as lr, nextTick as ur, toValue as V, getCurrentScope as en, onScopeDispose as tn, getCurrentInstance as Fe, hasInjectionContext as cr, watchEffect as dr, shallowRef as rn, unref as y, createElementBlock as me, openBlock as L, normalizeClass as N, createElementVNode as ve, createBlock as ge, createCommentVNode as ze, createVNode as U, withCtx as ae, renderSlot as se, mergeProps as fr, Fragment as ft, renderList as nn, cloneVNode as on, isVNode as De, createTextVNode as an, Text as pr, Comment as sn, Static as ln, useId as un, onUnmounted as cn, useCssVars as dn, Transition as fn } from "vue";
1
+ import { defineComponent as Jr, computed as w, h as M, ref as O, provide as oe, readonly as ie, inject as te, isRef as Qr, watch as L, onMounted as lr, nextTick as ur, toValue as V, getCurrentScope as en, onScopeDispose as tn, getCurrentInstance as Fe, hasInjectionContext as cr, watchEffect as dr, shallowRef as rn, unref as y, createElementBlock as me, openBlock as j, normalizeClass as N, createElementVNode as ve, createBlock as ge, createCommentVNode as ze, createVNode as U, withCtx as ae, renderSlot as se, mergeProps as fr, Fragment as ft, renderList as nn, cloneVNode as on, isVNode as De, createTextVNode as an, Text as pr, Comment as sn, Static as ln, useId as un, onUnmounted as cn, useCssVars as dn, Transition as fn } from "vue";
2
2
  import './main.css';function Tt(e) {
3
3
  return typeof e == "string" || e instanceof RegExp || Array.isArray(e);
4
4
  }
@@ -1094,7 +1094,7 @@ function Cs(e, t = 1e3, r = {}) {
1094
1094
  c <= 0 || (s.value = !0, i && e(), a(), s.value && (o = setInterval(e, c)));
1095
1095
  }
1096
1096
  if (n && ut && u(), Qr(t) || typeof t == "function") {
1097
- const c = z(t, () => {
1097
+ const c = L(t, () => {
1098
1098
  s.value && ut && u();
1099
1099
  });
1100
1100
  be(c);
@@ -1106,7 +1106,7 @@ function Cs(e, t = 1e3, r = {}) {
1106
1106
  };
1107
1107
  }
1108
1108
  function As(e, t, r) {
1109
- return z(
1109
+ return L(
1110
1110
  e,
1111
1111
  t,
1112
1112
  {
@@ -1174,7 +1174,7 @@ function Ts(e, t, r = {}) {
1174
1174
  }, l = w(() => {
1175
1175
  const f = V(e), g = Te(f).map(G).filter(ys);
1176
1176
  return new Set(g);
1177
- }), u = z(
1177
+ }), u = L(
1178
1178
  () => l.value,
1179
1179
  (f) => {
1180
1180
  a(), s.value && f.size && (o = new MutationObserver(t), f.forEach((g) => o.observe(g, i)));
@@ -1252,7 +1252,7 @@ function Ns(e, t, r = {}) {
1252
1252
  }, l = w(() => {
1253
1253
  const d = V(e);
1254
1254
  return Array.isArray(d) ? d.map((f) => G(f)) : [G(d)];
1255
- }), u = z(
1255
+ }), u = L(
1256
1256
  l,
1257
1257
  (d) => {
1258
1258
  if (a(), s.value && n) {
@@ -1313,7 +1313,7 @@ function _t(e, t = { width: 0, height: 0 }, r = {}) {
1313
1313
  const d = G(e);
1314
1314
  d && (s.value = "offsetWidth" in d ? d.offsetWidth : t.width, a.value = "offsetHeight" in d ? d.offsetHeight : t.height);
1315
1315
  });
1316
- const u = z(
1316
+ const u = L(
1317
1317
  () => G(e),
1318
1318
  (d) => {
1319
1319
  s.value = d ? t.width : 0, a.value = d ? t.height : 0;
@@ -1349,7 +1349,7 @@ function Ms(e = {}) {
1349
1349
  const c = { passive: !0 };
1350
1350
  if ($e("resize", u, c), t && s === "visual" && t.visualViewport && $e(t.visualViewport, "resize", u, c), i) {
1351
1351
  const d = Es("(orientation: portrait)");
1352
- z(d, () => u());
1352
+ L(d, () => u());
1353
1353
  }
1354
1354
  return { width: a, height: l };
1355
1355
  }
@@ -1405,7 +1405,7 @@ const js = (e) => {
1405
1405
  const n = O(!1), i = O(!1), o = js(e), s = O(0), a = Rs(r, {
1406
1406
  delayEnter: +e.hoverDelayEnter,
1407
1407
  delayLeave: +e.hoverDelayLeave
1408
- }), l = z(
1408
+ }), l = L(
1409
1409
  t,
1410
1410
  async (p) => {
1411
1411
  p > 0 && (s.value = ct(+e.initialIndex, p, o), s.value > p && (s.value = p - 1), n.value = !0, await ur(), l());
@@ -1612,18 +1612,8 @@ const js = (e) => {
1612
1612
  }
1613
1613
  },
1614
1614
  setup(e) {
1615
- const t = e, r = O(null), { slideCount: n, isInit: i } = hs();
1616
- z(
1617
- n,
1618
- (a) => {
1619
- console.log(a);
1620
- },
1621
- {
1622
- immediate: !0
1623
- }
1624
- );
1625
- const { config: o, isHovered: s } = Ls(t, n, r);
1626
- return (a, l) => (L(), me("div", {
1615
+ const t = e, r = O(null), { slideCount: n, isInit: i } = hs(), { config: o, isHovered: s } = Ls(t, n, r);
1616
+ return (a, l) => (j(), me("div", {
1627
1617
  ref_key: "sliderRef",
1628
1618
  ref: r,
1629
1619
  class: N(["evo-vue-carousel relative max-h-full", {
@@ -1636,11 +1626,11 @@ const js = (e) => {
1636
1626
  only: ["default"]
1637
1627
  }, {
1638
1628
  default: ae(() => [
1639
- y(o).mode === "gallery" ? (L(), ge(y(kl), {
1629
+ y(o).mode === "gallery" ? (j(), ge(y(kl), {
1640
1630
  key: 0,
1641
1631
  "total-slides": y(n),
1642
1632
  "is-init": y(i)
1643
- }, null, 8, ["total-slides", "is-init"])) : (L(), ge(y(Ll), {
1633
+ }, null, 8, ["total-slides", "is-init"])) : (j(), ge(y(Ll), {
1644
1634
  key: 1,
1645
1635
  class: N(t.viewportClass),
1646
1636
  "total-slides": y(n),
@@ -1649,10 +1639,10 @@ const js = (e) => {
1649
1639
  ]),
1650
1640
  _: 1
1651
1641
  }, 8, ["slots"]),
1652
- a.$slots.overlay ? (L(), me("div", ks, [
1642
+ a.$slots.overlay ? (j(), me("div", ks, [
1653
1643
  se(a.$slots, "overlay")
1654
1644
  ])) : ze("", !0),
1655
- y(o).hideNavigation !== !0 ? (L(), ge(y(Ae), {
1645
+ y(o).hideNavigation !== !0 ? (j(), ge(y(Ae), {
1656
1646
  key: 1,
1657
1647
  slots: a.$slots,
1658
1648
  only: ["navigation-prev", "navigation-next", "navigation"]
@@ -1671,7 +1661,7 @@ const js = (e) => {
1671
1661
  _: 1
1672
1662
  }, 8, ["slots"])) : ze("", !0)
1673
1663
  ]),
1674
- y(o).hidePagination !== !0 ? (L(), ge(y(Ae), {
1664
+ y(o).hidePagination !== !0 ? (j(), ge(y(Ae), {
1675
1665
  key: 0,
1676
1666
  slots: a.$slots,
1677
1667
  only: ["pagination", "pagination-item"]
@@ -1924,7 +1914,7 @@ const A = (e) => {
1924
1914
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
1925
1915
  rl.test(e) && !nl.test(e)
1926
1916
  ), Vr = () => !1, gl = (e) => ol.test(e), vl = (e) => il.test(e), hl = () => {
1927
- const e = A("colors"), t = A("spacing"), r = A("blur"), n = A("brightness"), i = A("borderColor"), o = A("borderRadius"), s = A("borderSpacing"), a = A("borderWidth"), l = A("contrast"), u = A("grayscale"), c = A("hueRotate"), d = A("invert"), f = A("gap"), g = A("gradientColorStops"), p = A("gradientColorStopPositions"), m = A("inset"), h = A("margin"), v = A("opacity"), x = A("padding"), $ = A("saturate"), C = A("scale"), P = A("sepia"), S = A("skew"), E = A("space"), k = A("translate"), Z = () => ["auto", "contain", "none"], T = () => ["auto", "hidden", "clip", "visible", "scroll"], j = () => ["auto", b, t], _ = () => [b, t], J = () => ["", H, Q], R = () => ["auto", he, b], we = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], pe = () => ["solid", "dashed", "dotted", "double", "none"], Re = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Xe = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], xe = () => ["", "0", b], It = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [he, b];
1917
+ const e = A("colors"), t = A("spacing"), r = A("blur"), n = A("brightness"), i = A("borderColor"), o = A("borderRadius"), s = A("borderSpacing"), a = A("borderWidth"), l = A("contrast"), u = A("grayscale"), c = A("hueRotate"), d = A("invert"), f = A("gap"), g = A("gradientColorStops"), p = A("gradientColorStopPositions"), m = A("inset"), h = A("margin"), v = A("opacity"), x = A("padding"), $ = A("saturate"), C = A("scale"), P = A("sepia"), S = A("skew"), E = A("space"), k = A("translate"), Z = () => ["auto", "contain", "none"], T = () => ["auto", "hidden", "clip", "visible", "scroll"], z = () => ["auto", b, t], _ = () => [b, t], J = () => ["", H, Q], R = () => ["auto", he, b], we = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], pe = () => ["solid", "dashed", "dotted", "double", "none"], Re = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], Xe = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], xe = () => ["", "0", b], It = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [he, b];
1928
1918
  return {
1929
1919
  cacheSize: 500,
1930
1920
  separator: ":",
@@ -1944,8 +1934,8 @@ const A = (e) => {
1944
1934
  gap: _(),
1945
1935
  gradientColorStops: [e],
1946
1936
  gradientColorStopPositions: [al, Q],
1947
- inset: j(),
1948
- margin: j(),
1937
+ inset: z(),
1938
+ margin: z(),
1949
1939
  opacity: W(),
1950
1940
  padding: _(),
1951
1941
  saturate: W(),
@@ -2177,7 +2167,7 @@ const A = (e) => {
2177
2167
  * @see https://tailwindcss.com/docs/flex-basis
2178
2168
  */
2179
2169
  basis: [{
2180
- basis: j()
2170
+ basis: z()
2181
2171
  }],
2182
2172
  /**
2183
2173
  * Flex Direction
@@ -4071,7 +4061,7 @@ const A = (e) => {
4071
4061
  return l;
4072
4062
  });
4073
4063
  }), o = (s) => us(i.value, (l) => l.includes(r.value)) === s;
4074
- return (s, a) => (L(), me("div", {
4064
+ return (s, a) => (j(), me("div", {
4075
4065
  class: N(["evo-vue-carousel__pagination", t.backgroundClass])
4076
4066
  }, [
4077
4067
  se(s.$slots, "pagination", {
@@ -4079,7 +4069,7 @@ const A = (e) => {
4079
4069
  isCurrentPage: o,
4080
4070
  isNavigating: y(n)
4081
4071
  }, () => [
4082
- (L(!0), me(ft, null, nn(i.value, (l, u) => (L(), ge(y(Ae), {
4072
+ (j(!0), me(ft, null, nn(i.value, (l, u) => (j(), ge(y(Ae), {
4083
4073
  key: l,
4084
4074
  slots: s.$slots,
4085
4075
  only: "pagination-item"
@@ -4447,7 +4437,7 @@ const El = /* @__PURE__ */ Kr({
4447
4437
  const r = O(null), n = un(), i = Fe(), { width: o, height: s, stop: a } = _t(r), { registerSlide: l, updateSlide: u, unregisterSlide: c } = ms();
4448
4438
  return e.isClone === !1 ? l(n, i) : a(), cn(() => {
4449
4439
  e.isClone === !1 && c(n);
4450
- }), z([o, s], ([d, f]) => {
4440
+ }), L([o, s], ([d, f]) => {
4451
4441
  e.isClone === !1 && u(n, { width: d, height: f });
4452
4442
  }), () => M(
4453
4443
  "div",
@@ -4494,24 +4484,24 @@ const El = /* @__PURE__ */ Kr({
4494
4484
  pauseAutoplay: u,
4495
4485
  resumeAutoplay: c,
4496
4486
  autoplayIsActive: d
4497
- } = Ne(), f = O(!0), g = (T, j) => T / j * 100, p = w(() => ({
4487
+ } = Ne(), f = O(!0), g = (T, z) => T / z * 100, p = w(() => ({
4498
4488
  transform: `translate3d(${C.value}px, 0, 0)`,
4499
4489
  transitionDuration: `${g(S.value, n.value.transitionSpeed)}ms`
4500
4490
  })), m = (T) => {
4501
- const j = parseFloat($.value), _ = n.value.wrap ? r.totalSlides + T : T;
4502
- return (j + n.value.gap) * _ * -1;
4491
+ const z = parseFloat($.value), _ = n.value.wrap ? r.totalSlides + T : T;
4492
+ return (z + n.value.gap) * _ * -1;
4503
4493
  }, h = O(null), { width: v, height: x } = _t(h), $ = w(() => {
4504
4494
  const T = n.value.gap > 0 ? n.value.gap * (n.value.perPage - 1) : 0;
4505
4495
  return (v.value - T) / n.value.perPage + "px";
4506
4496
  }), C = O(0), P = O(0);
4507
- z(
4497
+ L(
4508
4498
  () => r.isInit,
4509
4499
  async (T) => {
4510
4500
  T && (C.value = m(i.value), await je(2), f.value = !1);
4511
4501
  }
4512
4502
  );
4513
4503
  const S = w(() => Math.abs(C.value - P.value));
4514
- z(i, (T) => {
4504
+ L(i, (T) => {
4515
4505
  a.value === !1 && (P.value = C.value), C.value = m(T);
4516
4506
  });
4517
4507
  const E = () => {
@@ -4521,7 +4511,7 @@ const El = /* @__PURE__ */ Kr({
4521
4511
  const T = r.totalSlides;
4522
4512
  o(Ur(i.value, 0, T)), await je(), f.value = !1, l(!1);
4523
4513
  };
4524
- z(s, (T) => {
4514
+ L(s, (T) => {
4525
4515
  n.value.pauseOnHover === !0 && (T ? u() : c());
4526
4516
  });
4527
4517
  const Z = {
@@ -4531,10 +4521,10 @@ const El = /* @__PURE__ */ Kr({
4531
4521
  default: 0
4532
4522
  }
4533
4523
  },
4534
- setup(T, { slots: j }) {
4524
+ setup(T, { slots: z }) {
4535
4525
  const _ = () => {
4536
4526
  var R;
4537
- return ((R = j.default) == null ? void 0 : R.call(j)) || [];
4527
+ return ((R = z.default) == null ? void 0 : R.call(z)) || [];
4538
4528
  }, J = (R) => {
4539
4529
  let we = 0;
4540
4530
  const pe = R ? `_${R}` : "";
@@ -4586,7 +4576,7 @@ const El = /* @__PURE__ */ Kr({
4586
4576
  );
4587
4577
  }
4588
4578
  };
4589
- return (T, j) => (L(), me("div", {
4579
+ return (T, z) => (j(), me("div", {
4590
4580
  ref_key: "viewportRef",
4591
4581
  ref: h,
4592
4582
  class: "evo-vue-carousel__viewport evo-vue-carousel__viewport--slider relative flex w-full h-full max-h-full overflow-hidden",
@@ -4621,7 +4611,7 @@ const El = /* @__PURE__ */ Kr({
4621
4611
  },
4622
4612
  setup(e) {
4623
4613
  const t = e, { config: r, currentIndex: n, isNavigating: i, isHovered: o, setIsNavigating: s, pauseAutoplay: a, resumeAutoplay: l } = Ne(), u = O(null), { height: c } = _t(u);
4624
- z(o, (g) => {
4614
+ L(o, (g) => {
4625
4615
  g ? a() : l();
4626
4616
  });
4627
4617
  function d(g, p, m) {
@@ -4675,7 +4665,7 @@ const El = /* @__PURE__ */ Kr({
4675
4665
  };
4676
4666
  }
4677
4667
  };
4678
- return (g, p) => (L(), me("div", {
4668
+ return (g, p) => (j(), me("div", {
4679
4669
  ref_key: "galleryRef",
4680
4670
  ref: u,
4681
4671
  class: N(["evo-vue-carousel__viewport evo-vue-carousel__viewport--gallery min-h-12 h-full relative w-full overflow-hidden", {
@@ -4692,7 +4682,7 @@ const El = /* @__PURE__ */ Kr({
4692
4682
  onAfterLeave: p[1] || (p[1] = (m) => y(s)(!1))
4693
4683
  }, {
4694
4684
  default: ae(() => [
4695
- (L(), ge(f, { key: y(n) }, {
4685
+ (j(), ge(f, { key: y(n) }, {
4696
4686
  default: ae(() => [
4697
4687
  se(g.$slots, "default")
4698
4688
  ]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo-vue-carousel",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "type": "module",
5
5
  "license": "GPL-3.0-only",
6
6
  "files": [