evo-vue-carousel 1.1.1 → 1.1.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.
@@ -68,11 +68,11 @@ var S = defineComponent({
68
68
  return () => (n.default && typeof n.default == "function" ? n.default() : []).map(a);
69
69
  }
70
70
  });
71
- function tryOnScopeDispose(e) {
72
- return getCurrentScope() ? (onScopeDispose(e), !0) : !1;
71
+ function tryOnScopeDispose(e, t) {
72
+ return getCurrentScope() ? (onScopeDispose(e, t), !0) : !1;
73
73
  }
74
- var localProvidedStateMap = /* @__PURE__ */ new WeakMap(), injectLocal = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
75
- let t = e[0], n = getCurrentInstance()?.proxy;
74
+ var localProvidedStateMap = /* @__PURE__ */ new WeakMap(), injectLocal = (...e) => {
75
+ let t = e[0], n = getCurrentInstance()?.proxy ?? getCurrentScope();
76
76
  if (n == null && !hasInjectionContext()) throw Error("injectLocal must be called in setup");
77
77
  return n && localProvidedStateMap.has(n) && t in localProvidedStateMap.get(n) ? localProvidedStateMap.get(n)[t] : inject(...e);
78
78
  }, isClient = typeof window < "u" && typeof document < "u";
@@ -123,26 +123,23 @@ function unrefElement(e) {
123
123
  return t?.$el ?? t;
124
124
  }
125
125
  function useEventListener(...e) {
126
- let t = [], n = () => {
127
- t.forEach((e) => e()), t.length = 0;
128
- }, r = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), a = computed(() => {
126
+ let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = computed(() => {
129
127
  let t = toArray$1(toValue(e[0])).filter((e) => e != null);
130
128
  return t.every((e) => typeof e != "string") ? t : void 0;
131
- }), s = watchImmediate(() => [
132
- a.value?.map((e) => unrefElement(e)) ?? [defaultWindow].filter((e) => e != null),
133
- toArray$1(toValue(a.value ? e[1] : e[0])),
134
- toArray$1(unref(a.value ? e[2] : e[1])),
135
- toValue(a.value ? e[3] : e[2])
136
- ], ([e, a, s, c]) => {
137
- if (n(), !e?.length || !a?.length || !s?.length) return;
138
- let l = isObject$1(c) ? { ...c } : c;
139
- t.push(...e.flatMap((e) => a.flatMap((t) => s.map((n) => r(e, t, n, l)))));
129
+ });
130
+ return watchImmediate(() => [
131
+ n.value?.map((e) => unrefElement(e)) ?? [defaultWindow].filter((e) => e != null),
132
+ toArray$1(toValue(n.value ? e[1] : e[0])),
133
+ toArray$1(unref(n.value ? e[2] : e[1])),
134
+ toValue(n.value ? e[3] : e[2])
135
+ ], ([e, n, r, a], s, c) => {
136
+ if (!e?.length || !n?.length || !r?.length) return;
137
+ let l = isObject$1(a) ? { ...a } : a, u = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, l))));
138
+ c(() => {
139
+ u.forEach((e) => e());
140
+ });
140
141
  }, { flush: "post" });
141
- return tryOnScopeDispose(n), () => {
142
- s(), n();
143
- };
144
142
  }
145
- /* @__NO_SIDE_EFFECTS__ */
146
143
  function useMounted() {
147
144
  let e = shallowRef(!1), t = getCurrentInstance();
148
145
  return t && onMounted(() => {
@@ -151,11 +148,11 @@ function useMounted() {
151
148
  }
152
149
  /* @__NO_SIDE_EFFECTS__ */
153
150
  function useSupported(e) {
154
- let t = /* @__PURE__ */ useMounted();
151
+ let t = useMounted();
155
152
  return computed(() => (t.value, !!e()));
156
153
  }
157
154
  function useMutationObserver(e, t, n = {}) {
158
- let { window: r = defaultWindow,...a } = n, s, l = /* @__PURE__ */ useSupported(() => r && "MutationObserver" in r), u = () => {
155
+ let { window: r = defaultWindow, ...a } = n, s, l = /* @__PURE__ */ useSupported(() => r && "MutationObserver" in r), u = () => {
159
156
  s &&= (s.disconnect(), void 0);
160
157
  }, d = watch(computed(() => {
161
158
  let t = toArray$1(toValue(e)).map(unrefElement).filter(notNullish);
@@ -199,7 +196,7 @@ function onElementRemoval(e, t, n = {}) {
199
196
  var ssrWidthSymbol = Symbol("vueuse-ssr-width");
200
197
  /* @__NO_SIDE_EFFECTS__ */
201
198
  function useSSRWidth() {
202
- let e = hasInjectionContext() ? /* @__PURE__ */ injectLocal(ssrWidthSymbol, null) : null;
199
+ let e = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
203
200
  return typeof e == "number" ? e : void 0;
204
201
  }
205
202
  function useMediaQuery(e, t = {}) {
@@ -218,7 +215,7 @@ function useMediaQuery(e, t = {}) {
218
215
  }, { passive: !0 }), computed(() => u.value);
219
216
  }
220
217
  function useResizeObserver(e, t, n = {}) {
221
- let { window: r = defaultWindow,...a } = n, s, l = /* @__PURE__ */ useSupported(() => r && "ResizeObserver" in r), u = () => {
218
+ let { window: r = defaultWindow, ...a } = n, s, l = /* @__PURE__ */ useSupported(() => r && "ResizeObserver" in r), u = () => {
222
219
  s &&= (s.disconnect(), void 0);
223
220
  }, d = watch(computed(() => {
224
221
  let t = toValue(e);
@@ -250,7 +247,10 @@ function useElementSize(e, t = {
250
247
  width: 0,
251
248
  height: 0
252
249
  }, n = {}) {
253
- let { window: r = defaultWindow, box: a = "content-box" } = n, s = computed(() => (unrefElement(e)?.namespaceURI)?.includes("svg")), l = shallowRef(t.width), u = shallowRef(t.height), { stop: d } = useResizeObserver(e, ([t]) => {
250
+ let { window: r = defaultWindow, box: a = "content-box" } = n, s = computed(() => {
251
+ var t;
252
+ return (t = unrefElement(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
253
+ }), l = shallowRef(t.width), u = shallowRef(t.height), { stop: d } = useResizeObserver(e, ([t]) => {
254
254
  let n = a === "border-box" ? t.borderBoxSize : a === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
255
255
  if (r && s.value) {
256
256
  let t = unrefElement(e);
@@ -279,7 +279,6 @@ function useElementSize(e, t = {
279
279
  stop: m
280
280
  };
281
281
  }
282
- /* @__NO_SIDE_EFFECTS__ */
283
282
  function useWindowSize(e = {}) {
284
283
  let { window: t = defaultWindow, initialWidth: n = Infinity, initialHeight: r = Infinity, listenOrientation: a = !0, includeScrollbar: s = !0, type: c = "inner" } = e, l = shallowRef(n), u = shallowRef(r), d = () => {
285
284
  if (t) if (c === "outer") l.value = t.outerWidth, u.value = t.outerHeight;
@@ -532,7 +531,7 @@ function processConfigValues(e, t) {
532
531
  }
533
532
  }
534
533
  const useResponsiveConfig = (e, t = !1) => {
535
- let { width: n } = /* @__PURE__ */ useWindowSize(), r = computed(() => pick(e, responsiveProperties)), a = computed(() => Object.entries(e.responsive).map(([e, t]) => [parseInt(e), pick(t, responsiveProperties)]).filter((e) => isNaN(e[0]) === !1).sort((e, t) => t[0] - e[0])), s = computed(() => {
534
+ let { width: n } = useWindowSize(), r = computed(() => pick(e, responsiveProperties)), a = computed(() => Object.entries(e.responsive).map(([e, t]) => [parseInt(e), pick(t, responsiveProperties)]).filter((e) => isNaN(e[0]) === !1).sort((e, t) => t[0] - e[0])), s = computed(() => {
536
535
  let e = a.value.find((e) => n.value >= e[0]);
537
536
  return e ? e[1] : {};
538
537
  });
@@ -934,7 +933,7 @@ function isMatchWith(e, t, n) {
934
933
  return typeof n == "function" ? isMatchWithInternal(e, t, function e(t, r, a, s, c, l) {
935
934
  let u = n(t, r, a, s, c, l);
936
935
  return u === void 0 ? isMatchWithInternal(t, r, e, l) : !!u;
937
- }, /* @__PURE__ */ new Map()) : isMatch(e, t);
936
+ }, /* @__PURE__ */ new Map()) : isMatchWith(e, t, () => void 0);
938
937
  }
939
938
  function isMatchWithInternal(e, t, n, r) {
940
939
  if (t === e) return !0;
@@ -950,10 +949,10 @@ function isObjectMatch(e, t, n, r) {
950
949
  if (t instanceof Map) return isMapMatch(e, t, n, r);
951
950
  if (t instanceof Set) return isSetMatch(e, t, n, r);
952
951
  let a = Object.keys(t);
953
- if (e == null) return a.length === 0;
952
+ if (e == null || isPrimitive(e)) return a.length === 0;
954
953
  if (a.length === 0) return !0;
955
- if (r && r.has(t)) return r.get(t) === e;
956
- r && r.set(t, e);
954
+ if (r?.has(t)) return r.get(t) === e;
955
+ r?.set(t, e);
957
956
  try {
958
957
  for (let s = 0; s < a.length; s++) {
959
958
  let c = a[s];
@@ -961,7 +960,7 @@ function isObjectMatch(e, t, n, r) {
961
960
  }
962
961
  return !0;
963
962
  } finally {
964
- r && r.delete(t);
963
+ r?.delete(t);
965
964
  }
966
965
  }
967
966
  function isMapMatch(e, t, n, r) {
@@ -1081,119 +1080,148 @@ function slice(e, t, n) {
1081
1080
  for (let n = 0; n < a; ++n) s[n] = e[t + n];
1082
1081
  return s;
1083
1082
  }
1084
- var CLASS_PART_SEPARATOR = "-", createClassGroupUtils = (e) => {
1083
+ var concatArrays = (e, t) => {
1084
+ let n = Array(e.length + t.length);
1085
+ for (let t = 0; t < e.length; t++) n[t] = e[t];
1086
+ for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
1087
+ return n;
1088
+ }, createClassValidatorObject = (e, t) => ({
1089
+ classGroupId: e,
1090
+ validator: t
1091
+ }), createClassPartObject = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
1092
+ nextPart: e,
1093
+ validators: t,
1094
+ classGroupId: n
1095
+ }), CLASS_PART_SEPARATOR = "-", EMPTY_CONFLICTS = [], ARBITRARY_PROPERTY_PREFIX = "arbitrary..", createClassGroupUtils = (e) => {
1085
1096
  let t = createClassMap(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
1086
1097
  return {
1087
1098
  getClassGroupId: (e) => {
1099
+ if (e.startsWith("[") && e.endsWith("]")) return getGroupIdForArbitraryProperty(e);
1088
1100
  let n = e.split(CLASS_PART_SEPARATOR);
1089
- return n[0] === "" && n.length !== 1 && n.shift(), getGroupRecursive(n, t) || getGroupIdForArbitraryProperty(e);
1101
+ return getGroupRecursive(n, n[0] === "" && n.length > 1 ? 1 : 0, t);
1090
1102
  },
1091
1103
  getConflictingClassGroupIds: (e, t) => {
1092
- let a = n[e] || [];
1093
- return t && r[e] ? [...a, ...r[e]] : a;
1104
+ if (t) {
1105
+ let t = r[e], a = n[e];
1106
+ return t ? a ? concatArrays(a, t) : t : a || EMPTY_CONFLICTS;
1107
+ }
1108
+ return n[e] || EMPTY_CONFLICTS;
1094
1109
  }
1095
1110
  };
1096
- }, getGroupRecursive = (e, t) => {
1097
- if (e.length === 0) return t.classGroupId;
1098
- let n = e[0], r = t.nextPart.get(n), a = r ? getGroupRecursive(e.slice(1), r) : void 0;
1099
- if (a) return a;
1100
- if (t.validators.length === 0) return;
1101
- let s = e.join(CLASS_PART_SEPARATOR);
1102
- return t.validators.find(({ validator: e }) => e(s))?.classGroupId;
1103
- }, arbitraryPropertyRegex = /^\[(.+)\]$/, getGroupIdForArbitraryProperty = (e) => {
1104
- if (arbitraryPropertyRegex.test(e)) {
1105
- let t = arbitraryPropertyRegex.exec(e)[1], n = t?.substring(0, t.indexOf(":"));
1106
- if (n) return "arbitrary.." + n;
1111
+ }, getGroupRecursive = (e, t, n) => {
1112
+ if (e.length - t === 0) return n.classGroupId;
1113
+ let r = e[t], a = n.nextPart.get(r);
1114
+ if (a) {
1115
+ let n = getGroupRecursive(e, t + 1, a);
1116
+ if (n) return n;
1107
1117
  }
1108
- }, createClassMap = (e) => {
1109
- let { theme: t, classGroups: n } = e, r = {
1110
- nextPart: /* @__PURE__ */ new Map(),
1111
- validators: []
1112
- };
1113
- for (let e in n) processClassesRecursively(n[e], r, e, t);
1114
- return r;
1118
+ let s = n.validators;
1119
+ if (s === null) return;
1120
+ let c = t === 0 ? e.join(CLASS_PART_SEPARATOR) : e.slice(t).join(CLASS_PART_SEPARATOR), l = s.length;
1121
+ for (let e = 0; e < l; e++) {
1122
+ let t = s[e];
1123
+ if (t.validator(c)) return t.classGroupId;
1124
+ }
1125
+ }, getGroupIdForArbitraryProperty = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
1126
+ let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
1127
+ return r ? ARBITRARY_PROPERTY_PREFIX + r : void 0;
1128
+ })(), createClassMap = (e) => {
1129
+ let { theme: t, classGroups: n } = e;
1130
+ return processClassGroups(n, t);
1131
+ }, processClassGroups = (e, t) => {
1132
+ let n = createClassPartObject();
1133
+ for (let r in e) {
1134
+ let a = e[r];
1135
+ processClassesRecursively(a, n, r, t);
1136
+ }
1137
+ return n;
1115
1138
  }, processClassesRecursively = (e, t, n, r) => {
1116
- e.forEach((e) => {
1117
- if (typeof e == "string") {
1118
- let r = e === "" ? t : getPart(t, e);
1119
- r.classGroupId = n;
1120
- return;
1121
- }
1122
- if (typeof e == "function") {
1123
- if (isThemeGetter(e)) {
1124
- processClassesRecursively(e(r), t, n, r);
1125
- return;
1126
- }
1127
- t.validators.push({
1128
- validator: e,
1129
- classGroupId: n
1130
- });
1131
- return;
1132
- }
1133
- Object.entries(e).forEach(([e, a]) => {
1134
- processClassesRecursively(a, getPart(t, e), n, r);
1135
- });
1136
- });
1139
+ let a = e.length;
1140
+ for (let s = 0; s < a; s++) {
1141
+ let a = e[s];
1142
+ processClassDefinition(a, t, n, r);
1143
+ }
1144
+ }, processClassDefinition = (e, t, n, r) => {
1145
+ if (typeof e == "string") {
1146
+ processStringDefinition(e, t, n);
1147
+ return;
1148
+ }
1149
+ if (typeof e == "function") {
1150
+ processFunctionDefinition(e, t, n, r);
1151
+ return;
1152
+ }
1153
+ processObjectDefinition(e, t, n, r);
1154
+ }, processStringDefinition = (e, t, n) => {
1155
+ let r = e === "" ? t : getPart(t, e);
1156
+ r.classGroupId = n;
1157
+ }, processFunctionDefinition = (e, t, n, r) => {
1158
+ if (isThemeGetter(e)) {
1159
+ processClassesRecursively(e(r), t, n, r);
1160
+ return;
1161
+ }
1162
+ t.validators === null && (t.validators = []), t.validators.push(createClassValidatorObject(n, e));
1163
+ }, processObjectDefinition = (e, t, n, r) => {
1164
+ let a = Object.entries(e), s = a.length;
1165
+ for (let e = 0; e < s; e++) {
1166
+ let [s, c] = a[e];
1167
+ processClassesRecursively(c, getPart(t, s), n, r);
1168
+ }
1137
1169
  }, getPart = (e, t) => {
1138
- let n = e;
1139
- return t.split(CLASS_PART_SEPARATOR).forEach((e) => {
1140
- n.nextPart.has(e) || n.nextPart.set(e, {
1141
- nextPart: /* @__PURE__ */ new Map(),
1142
- validators: []
1143
- }), n = n.nextPart.get(e);
1144
- }), n;
1145
- }, isThemeGetter = (e) => e.isThemeGetter, createLruCache = (e) => {
1170
+ let n = e, r = t.split(CLASS_PART_SEPARATOR), a = r.length;
1171
+ for (let e = 0; e < a; e++) {
1172
+ let t = r[e], a = n.nextPart.get(t);
1173
+ a || (a = createClassPartObject(), n.nextPart.set(t, a)), n = a;
1174
+ }
1175
+ return n;
1176
+ }, isThemeGetter = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, createLruCache = (e) => {
1146
1177
  if (e < 1) return {
1147
1178
  get: () => void 0,
1148
1179
  set: () => {}
1149
1180
  };
1150
- let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), a = (a, s) => {
1151
- n.set(a, s), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map());
1181
+ let t = 0, n = Object.create(null), r = Object.create(null), a = (a, s) => {
1182
+ n[a] = s, t++, t > e && (t = 0, r = n, n = Object.create(null));
1152
1183
  };
1153
1184
  return {
1154
1185
  get(e) {
1155
- let t = n.get(e);
1186
+ let t = n[e];
1156
1187
  if (t !== void 0) return t;
1157
- if ((t = r.get(e)) !== void 0) return a(e, t), t;
1188
+ if ((t = r[e]) !== void 0) return a(e, t), t;
1158
1189
  },
1159
1190
  set(e, t) {
1160
- n.has(e) ? n.set(e, t) : a(e, t);
1191
+ e in n ? n[e] = t : a(e, t);
1161
1192
  }
1162
1193
  };
1163
- }, IMPORTANT_MODIFIER = "!", MODIFIER_SEPARATOR = ":", MODIFIER_SEPARATOR_LENGTH = 1, createParseClassName = (e) => {
1194
+ }, IMPORTANT_MODIFIER = "!", MODIFIER_SEPARATOR = ":", EMPTY_MODIFIERS = [], createResultObject = (e, t, n, r, a) => ({
1195
+ modifiers: e,
1196
+ hasImportantModifier: t,
1197
+ baseClassName: n,
1198
+ maybePostfixModifierPosition: r,
1199
+ isExternal: a
1200
+ }), createParseClassName = (e) => {
1164
1201
  let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
1165
- let t = [], n = 0, r = 0, a = 0, s;
1166
- for (let c = 0; c < e.length; c++) {
1167
- let l = e[c];
1202
+ let t = [], n = 0, r = 0, a = 0, s, c = e.length;
1203
+ for (let l = 0; l < c; l++) {
1204
+ let c = e[l];
1168
1205
  if (n === 0 && r === 0) {
1169
- if (l === MODIFIER_SEPARATOR) {
1170
- t.push(e.slice(a, c)), a = c + MODIFIER_SEPARATOR_LENGTH;
1206
+ if (c === MODIFIER_SEPARATOR) {
1207
+ t.push(e.slice(a, l)), a = l + 1;
1171
1208
  continue;
1172
1209
  }
1173
- if (l === "/") {
1174
- s = c;
1210
+ if (c === "/") {
1211
+ s = l;
1175
1212
  continue;
1176
1213
  }
1177
1214
  }
1178
- l === "[" ? n++ : l === "]" ? n-- : l === "(" ? r++ : l === ")" && r--;
1215
+ c === "[" ? n++ : c === "]" ? n-- : c === "(" ? r++ : c === ")" && r--;
1179
1216
  }
1180
- let c = t.length === 0 ? e : e.substring(a), l = stripImportantModifier(c);
1181
- return {
1182
- modifiers: t,
1183
- hasImportantModifier: l !== c,
1184
- baseClassName: l,
1185
- maybePostfixModifierPosition: s && s > a ? s - a : void 0
1186
- };
1217
+ let l = t.length === 0 ? e : e.slice(a), u = l, d = !1;
1218
+ l.endsWith(IMPORTANT_MODIFIER) ? (u = l.slice(0, -1), d = !0) : l.startsWith(IMPORTANT_MODIFIER) && (u = l.slice(1), d = !0);
1219
+ let p = s && s > a ? s - a : void 0;
1220
+ return createResultObject(t, d, u, p);
1187
1221
  };
1188
1222
  if (t) {
1189
1223
  let e = t + MODIFIER_SEPARATOR, n = r;
1190
- r = (t) => t.startsWith(e) ? n(t.substring(e.length)) : {
1191
- isExternal: !0,
1192
- modifiers: [],
1193
- hasImportantModifier: !1,
1194
- baseClassName: t,
1195
- maybePostfixModifierPosition: void 0
1196
- };
1224
+ r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : createResultObject(EMPTY_MODIFIERS, !1, t, void 0, !0);
1197
1225
  }
1198
1226
  if (n) {
1199
1227
  let e = r;
@@ -1203,14 +1231,17 @@ var CLASS_PART_SEPARATOR = "-", createClassGroupUtils = (e) => {
1203
1231
  });
1204
1232
  }
1205
1233
  return r;
1206
- }, stripImportantModifier = (e) => e.endsWith(IMPORTANT_MODIFIER) ? e.substring(0, e.length - 1) : e.startsWith(IMPORTANT_MODIFIER) ? e.substring(1) : e, createSortModifiers = (e) => {
1207
- let t = Object.fromEntries(e.orderSensitiveModifiers.map((e) => [e, !0]));
1208
- return (e) => {
1209
- if (e.length <= 1) return e;
1234
+ }, createSortModifiers = (e) => {
1235
+ let t = /* @__PURE__ */ new Map();
1236
+ return e.orderSensitiveModifiers.forEach((e, n) => {
1237
+ t.set(e, 1e6 + n);
1238
+ }), (e) => {
1210
1239
  let n = [], r = [];
1211
- return e.forEach((e) => {
1212
- e[0] === "[" || t[e] ? (n.push(...r.sort(), e), r = []) : r.push(e);
1213
- }), n.push(...r.sort()), n;
1240
+ for (let a = 0; a < e.length; a++) {
1241
+ let s = e[a], c = s[0] === "[", l = t.has(s);
1242
+ c || l ? (r.length > 0 && (r.sort(), n.push(...r), r = []), n.push(s)) : r.push(s);
1243
+ }
1244
+ return r.length > 0 && (r.sort(), n.push(...r)), n;
1214
1245
  };
1215
1246
  }, createConfigUtils = (e) => ({
1216
1247
  cache: createLruCache(e.cacheSize),
@@ -1237,8 +1268,8 @@ var CLASS_PART_SEPARATOR = "-", createClassGroupUtils = (e) => {
1237
1268
  }
1238
1269
  x = !1;
1239
1270
  }
1240
- let w = s(p).join(":"), T = m ? w + IMPORTANT_MODIFIER : w, E = T + C;
1241
- if (c.includes(E)) continue;
1271
+ let w = p.length === 0 ? "" : p.length === 1 ? p[0] : s(p).join(":"), T = m ? w + IMPORTANT_MODIFIER : w, E = T + C;
1272
+ if (c.indexOf(E) > -1) continue;
1242
1273
  c.push(E);
1243
1274
  let D = a(C, x);
1244
1275
  for (let e = 0; e < D.length; ++e) {
@@ -1248,35 +1279,25 @@ var CLASS_PART_SEPARATOR = "-", createClassGroupUtils = (e) => {
1248
1279
  u = t + (u.length > 0 ? " " + u : u);
1249
1280
  }
1250
1281
  return u;
1251
- };
1252
- function twJoin() {
1253
- let e = 0, t, n, r = "";
1254
- for (; e < arguments.length;) (t = arguments[e++]) && (n = toValue$1(t)) && (r && (r += " "), r += n);
1255
- return r;
1256
- }
1257
- var toValue$1 = (e) => {
1282
+ }, twJoin = (...e) => {
1283
+ let t = 0, n, r, a = "";
1284
+ for (; t < e.length;) (n = e[t++]) && (r = toValue$1(n)) && (a && (a += " "), a += r);
1285
+ return a;
1286
+ }, toValue$1 = (e) => {
1258
1287
  if (typeof e == "string") return e;
1259
1288
  let t, n = "";
1260
1289
  for (let r = 0; r < e.length; r++) e[r] && (t = toValue$1(e[r])) && (n && (n += " "), n += t);
1261
1290
  return n;
1262
- };
1263
- function createTailwindMerge(e, ...t) {
1264
- let n, r, a, s = c;
1265
- function c(c) {
1266
- return n = createConfigUtils(t.reduce((e, t) => t(e), e())), r = n.cache.get, a = n.cache.set, s = l, l(c);
1267
- }
1268
- function l(e) {
1291
+ }, createTailwindMerge = (e, ...t) => {
1292
+ let n, r, a, s, c = (c) => (n = createConfigUtils(t.reduce((e, t) => t(e), e())), r = n.cache.get, a = n.cache.set, s = l, l(c)), l = (e) => {
1269
1293
  let t = r(e);
1270
1294
  if (t) return t;
1271
1295
  let s = mergeClassList(e, n);
1272
1296
  return a(e, s), s;
1273
- }
1274
- return function() {
1275
- return s(twJoin.apply(null, arguments));
1276
1297
  };
1277
- }
1278
- var fromTheme = (e) => {
1279
- let t = (t) => t[e] || [];
1298
+ return s = c, (...e) => s(twJoin(...e));
1299
+ }, fallbackThemeArr = [], fromTheme = (e) => {
1300
+ let t = (t) => t[e] || fallbackThemeArr;
1280
1301
  return t.isThemeGetter = !0, t;
1281
1302
  }, arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i, fractionRegex = /^\d+\/\d+$/, tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, isFraction = (e) => fractionRegex.test(e), isNumber = (e) => !!e && !Number.isNaN(Number(e)), isInteger = (e) => !!e && Number.isInteger(Number(e)), isPercent = (e) => e.endsWith("%") && isNumber(e.slice(0, -1)), isTshirtSize = (e) => tshirtUnitRegex.test(e), isAny = () => !0, isLengthOnly = (e) => lengthUnitRegex.test(e) && !colorFunctionRegex.test(e), isNever = () => !1, isShadow = (e) => shadowRegex.test(e), isImage = (e) => imageRegex.test(e), isAnyNonArbitrary = (e) => !isArbitraryValue(e) && !isArbitraryVariable(e), isArbitrarySize = (e) => getIsArbitraryValue(e, isLabelSize, isNever), isArbitraryValue = (e) => arbitraryValueRegex.test(e), isArbitraryLength = (e) => getIsArbitraryValue(e, isLabelLength, isLengthOnly), isArbitraryNumber = (e) => getIsArbitraryValue(e, isLabelNumber, isNumber), isArbitraryPosition = (e) => getIsArbitraryValue(e, isLabelPosition, isNever), isArbitraryImage = (e) => getIsArbitraryValue(e, isLabelImage, isImage), isArbitraryShadow = (e) => getIsArbitraryValue(e, isLabelShadow, isShadow), isArbitraryVariable = (e) => arbitraryVariableRegex.test(e), isArbitraryVariableLength = (e) => getIsArbitraryVariable(e, isLabelLength), isArbitraryVariableFamilyName = (e) => getIsArbitraryVariable(e, isLabelFamilyName), isArbitraryVariablePosition = (e) => getIsArbitraryVariable(e, isLabelPosition), isArbitraryVariableSize = (e) => getIsArbitraryVariable(e, isLabelSize), isArbitraryVariableImage = (e) => getIsArbitraryVariable(e, isLabelImage), isArbitraryVariableShadow = (e) => getIsArbitraryVariable(e, isLabelShadow, !0), getIsArbitraryValue = (e, t, n) => {
1282
1303
  let r = arbitraryValueRegex.exec(e);
@@ -1401,13 +1422,13 @@ var fromTheme = (e) => {
1401
1422
  isArbitraryVariablePosition,
1402
1423
  isArbitraryPosition,
1403
1424
  { position: [isArbitraryVariable, isArbitraryValue] }
1404
- ], ci = () => ["no-repeat", { repeat: [
1425
+ ], vi = () => ["no-repeat", { repeat: [
1405
1426
  "",
1406
1427
  "x",
1407
1428
  "y",
1408
1429
  "space",
1409
1430
  "round"
1410
- ] }], li = () => [
1431
+ ] }], yi = () => [
1411
1432
  "auto",
1412
1433
  "cover",
1413
1434
  "contain",
@@ -1435,7 +1456,7 @@ var fromTheme = (e) => {
1435
1456
  "dashed",
1436
1457
  "dotted",
1437
1458
  "double"
1438
- ], ui = () => [
1459
+ ], bi = () => [
1439
1460
  "normal",
1440
1461
  "multiply",
1441
1462
  "screen",
@@ -1457,7 +1478,7 @@ var fromTheme = (e) => {
1457
1478
  isPercent,
1458
1479
  isArbitraryVariablePosition,
1459
1480
  isArbitraryPosition
1460
- ], di = () => [
1481
+ ], xi = () => [
1461
1482
  "",
1462
1483
  "none",
1463
1484
  x,
@@ -1958,8 +1979,8 @@ var fromTheme = (e) => {
1958
1979
  "content"
1959
1980
  ] }],
1960
1981
  "bg-position": [{ bg: W() }],
1961
- "bg-repeat": [{ bg: ci() }],
1962
- "bg-size": [{ bg: li() }],
1982
+ "bg-repeat": [{ bg: vi() }],
1983
+ "bg-size": [{ bg: yi() }],
1963
1984
  "bg-image": [{ bg: [
1964
1985
  "none",
1965
1986
  {
@@ -2099,11 +2120,11 @@ var fromTheme = (e) => {
2099
2120
  isArbitraryValue
2100
2121
  ] }],
2101
2122
  "mix-blend": [{ "mix-blend": [
2102
- ...ui(),
2123
+ ...bi(),
2103
2124
  "plus-darker",
2104
2125
  "plus-lighter"
2105
2126
  ] }],
2106
- "bg-blend": [{ "bg-blend": ui() }],
2127
+ "bg-blend": [{ "bg-blend": bi() }],
2107
2128
  "mask-clip": [{ "mask-clip": [
2108
2129
  "border",
2109
2130
  "padding",
@@ -2177,8 +2198,8 @@ var fromTheme = (e) => {
2177
2198
  "view"
2178
2199
  ] }],
2179
2200
  "mask-position": [{ mask: W() }],
2180
- "mask-repeat": [{ mask: ci() }],
2181
- "mask-size": [{ mask: li() }],
2201
+ "mask-repeat": [{ mask: vi() }],
2202
+ "mask-size": [{ mask: yi() }],
2182
2203
  "mask-type": [{ "mask-type": ["alpha", "luminance"] }],
2183
2204
  "mask-image": [{ mask: [
2184
2205
  "none",
@@ -2191,7 +2212,7 @@ var fromTheme = (e) => {
2191
2212
  isArbitraryVariable,
2192
2213
  isArbitraryValue
2193
2214
  ] }],
2194
- blur: [{ blur: di() }],
2215
+ blur: [{ blur: xi() }],
2195
2216
  brightness: [{ brightness: [
2196
2217
  isNumber,
2197
2218
  isArbitraryVariable,
@@ -2244,7 +2265,7 @@ var fromTheme = (e) => {
2244
2265
  isArbitraryVariable,
2245
2266
  isArbitraryValue
2246
2267
  ] }],
2247
- "backdrop-blur": [{ "backdrop-blur": di() }],
2268
+ "backdrop-blur": [{ "backdrop-blur": xi() }],
2248
2269
  "backdrop-brightness": [{ "backdrop-brightness": [
2249
2270
  isNumber,
2250
2271
  isArbitraryVariable,
@@ -3106,8 +3127,10 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
3106
3127
  });
3107
3128
  }), () => h("div", {
3108
3129
  ref: n,
3109
- role: "group",
3110
- "aria-roledescription": "Slide"
3130
+ role: "listitem",
3131
+ "aria-roledescription": "slide",
3132
+ "aria-hidden": e.isClone,
3133
+ tabindex: e.isClone ? -1 : void 0
3111
3134
  }, t.default());
3112
3135
  }
3113
3136
  }, __plugin_vue_export_helper_default = (e, t) => {
@@ -3127,7 +3150,7 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
3127
3150
  }
3128
3151
  },
3129
3152
  setup(e) {
3130
- useCssVars((e) => ({ v2ba4c4bc: P.value }));
3153
+ useCssVars((e) => ({ v6ed04307: P.value }));
3131
3154
  let t = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, n = Object.freeze({
3132
3155
  element: !0,
3133
3156
  component: !0,
@@ -3175,11 +3198,11 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
3175
3198
  "evo-vue-carousel__slide-prefix": t === "prefix",
3176
3199
  "evo-vue-carousel__slide-suffix": t === "suffix"
3177
3200
  }]),
3178
- role: "option",
3179
3201
  style: {
3180
3202
  flexBasis: "var(--slide-width, 0px)",
3181
3203
  marginRight: `${e.gap}px`
3182
3204
  },
3205
+ ariaLabel: `Slide ${a}`,
3183
3206
  key: `slide_${a}${s}`,
3184
3207
  isClone: !!t
3185
3208
  }, { default: () => [n] })), n);
@@ -3194,6 +3217,7 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
3194
3217
  T.value ? "transition-none" : "transition-all motion-reduce:transition-none",
3195
3218
  a.value.slideTransitionTimingClass
3196
3219
  ]),
3220
+ role: "list",
3197
3221
  style: D.value,
3198
3222
  onTransitionstart: B,
3199
3223
  onTransitionend: V
@@ -3204,7 +3228,6 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
3204
3228
  ref_key: "viewportRef",
3205
3229
  ref: k,
3206
3230
  class: "evo-vue-carousel__viewport evo-vue-carousel__viewport--slider relative flex w-full h-full max-h-full overflow-hidden",
3207
- role: "listbox",
3208
3231
  "data-width": unref(j),
3209
3232
  "data-height": unref(N)
3210
3233
  }, [createVNode(unref(S), {
@@ -3215,7 +3238,7 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
3215
3238
  _: 1
3216
3239
  }, 8, ["slots"])], 8, _hoisted_1$1));
3217
3240
  }
3218
- }, [["__scopeId", "data-v-eb524f91"]]), _hoisted_1 = ["data-height"], Gallery_default = {
3241
+ }, [["__scopeId", "data-v-932c4d31"]]), _hoisted_1 = ["data-height"], Gallery_default = {
3219
3242
  __name: "Gallery",
3220
3243
  props: {
3221
3244
  totalSlides: {
@@ -3246,11 +3269,14 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
3246
3269
  let n = 0, r = replaceChildren(e, (e) => {
3247
3270
  let t = h(Slide_default, {
3248
3271
  class: normalizeClass(["evo-vue-carousel__slide evo-vue-carousel__slide--visible w-full h-full", { hidden: l.value.includes(n) === !1 }]),
3249
- role: "option"
3272
+ role: "listitem"
3250
3273
  }, { default: () => [e] });
3251
3274
  return n++, t;
3252
3275
  }, COMPONENTS_AND_ELEMENTS), c = concat(slice(r, s.value), slice(r, 0, s.value));
3253
- return h("div", { class: normalizeClass(["flex h-full overflow-hidden"]) }, c);
3276
+ return h("div", {
3277
+ role: "list",
3278
+ class: normalizeClass(["flex h-full overflow-hidden"])
3279
+ }, c);
3254
3280
  };
3255
3281
  } };
3256
3282
  return (e, t) => (openBlock(), createElementBlock("div", {
package/dist/main.css CHANGED
@@ -1 +1 @@
1
- .evo-vue-carousel__pagination{pointer-events:none}.evo-vue-carousel__pagination>*{pointer-events:auto}.evo-vue-carousel__navigation{pointer-events:none}.evo-vue-carousel__navigation>*{pointer-events:auto}.evo-vue-carousel__viewport-track[data-v-eb524f91]{--slide-width:var(--v2ba4c4bc)}
1
+ .evo-vue-carousel__pagination{pointer-events:none}.evo-vue-carousel__pagination>*{pointer-events:auto}.evo-vue-carousel__navigation{pointer-events:none}.evo-vue-carousel__navigation>*{pointer-events:auto}.evo-vue-carousel__viewport-track[data-v-932c4d31]{--slide-width:var(--v6ed04307)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo-vue-carousel",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "type": "module",
5
5
  "license": "GPL-3.0-only",
6
6
  "files": [
@@ -25,29 +25,35 @@
25
25
  "demo": "pnpm --filter='./demo' run dev",
26
26
  "demo:build": "pnpm --filter='./demo' run build",
27
27
  "demo:preview": "pnpm --filter='./demo' run preview",
28
- "prepublishOnly": "npm run build"
28
+ "prepublishOnly": "npm run build",
29
+ "test": "vitest"
29
30
  },
30
31
  "dependencies": {
31
32
  "@evomark/vue-forward-slots": "^6.2.2",
32
33
  "@skirtle/vue-vnode-utils": "^0.2.0",
33
- "@vueuse/core": "^13.9.0",
34
- "es-toolkit": "^1.40.0",
34
+ "@vueuse/core": "^14.1.0",
35
+ "es-toolkit": "^1.43.0",
35
36
  "vue3-icon": "^3.0.3"
36
37
  },
37
38
  "devDependencies": {
38
- "@eslint/js": "^9.37.0",
39
- "@vitejs/plugin-vue": "^6.0.1",
40
- "eslint": "^9.37.0",
39
+ "@eslint/js": "^9.39.2",
40
+ "@testing-library/vue": "^8.1.0",
41
+ "@vitejs/plugin-vue": "^6.0.3",
42
+ "@vue/test-utils": "^2.4.6",
43
+ "eslint": "^9.39.2",
41
44
  "eslint-config-prettier": "^10.1.8",
42
- "eslint-plugin-jsdoc": "^61.1.2",
43
- "eslint-plugin-vue": "^10.5.0",
44
- "globals": "^16.4.0",
45
- "prettier": "^3.6.2",
46
- "tailwind-merge": "^3.3.1",
47
- "tailwindcss": "^4.1.14",
48
- "vite": "npm:rolldown-vite@^7.1.16",
45
+ "eslint-plugin-jsdoc": "^62.0.0",
46
+ "eslint-plugin-vue": "^10.6.2",
47
+ "globals": "^17.0.0",
48
+ "jsdom": "^27.4.0",
49
+ "prettier": "^3.7.4",
50
+ "tailwind-merge": "^3.4.0",
51
+ "tailwindcss": "^4.1.18",
52
+ "vite": "npm:rolldown-vite@^7.3.1",
49
53
  "vite-plugin-lib-inject-css": "^2.2.2",
50
- "vue": "^3.5.22",
54
+ "vitest": "^4.0.17",
55
+ "vitest-axe": "^0.1.0",
56
+ "vue": "^3.5.26",
51
57
  "vue-eslint-parser": "^10.2.0"
52
58
  },
53
59
  "peerDependencies": {
@@ -55,4 +61,4 @@
55
61
  "vue": "^3.4.38"
56
62
  },
57
63
  "packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
58
- }
64
+ }