evo-vue-carousel 1.1.0 → 1.1.2
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/dist/evo-vue-carousel.js +21 -19
- package/dist/main.css +1 -1
- package/package.json +19 -12
- package/tailwind.source.css +2 -0
package/dist/evo-vue-carousel.js
CHANGED
|
@@ -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 =
|
|
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";
|
|
@@ -142,7 +142,6 @@ function useEventListener(...e) {
|
|
|
142
142
|
s(), n();
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
146
145
|
function useMounted() {
|
|
147
146
|
let e = shallowRef(!1), t = getCurrentInstance();
|
|
148
147
|
return t && onMounted(() => {
|
|
@@ -151,7 +150,7 @@ function useMounted() {
|
|
|
151
150
|
}
|
|
152
151
|
/* @__NO_SIDE_EFFECTS__ */
|
|
153
152
|
function useSupported(e) {
|
|
154
|
-
let t =
|
|
153
|
+
let t = useMounted();
|
|
155
154
|
return computed(() => (t.value, !!e()));
|
|
156
155
|
}
|
|
157
156
|
function useMutationObserver(e, t, n = {}) {
|
|
@@ -199,7 +198,7 @@ function onElementRemoval(e, t, n = {}) {
|
|
|
199
198
|
var ssrWidthSymbol = Symbol("vueuse-ssr-width");
|
|
200
199
|
/* @__NO_SIDE_EFFECTS__ */
|
|
201
200
|
function useSSRWidth() {
|
|
202
|
-
let e = hasInjectionContext() ?
|
|
201
|
+
let e = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;
|
|
203
202
|
return typeof e == "number" ? e : void 0;
|
|
204
203
|
}
|
|
205
204
|
function useMediaQuery(e, t = {}) {
|
|
@@ -250,7 +249,10 @@ function useElementSize(e, t = {
|
|
|
250
249
|
width: 0,
|
|
251
250
|
height: 0
|
|
252
251
|
}, n = {}) {
|
|
253
|
-
let { window: r = defaultWindow, box: a = "content-box" } = n, s = computed(() =>
|
|
252
|
+
let { window: r = defaultWindow, box: a = "content-box" } = n, s = computed(() => {
|
|
253
|
+
var t;
|
|
254
|
+
return (t = unrefElement(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
|
|
255
|
+
}), l = shallowRef(t.width), u = shallowRef(t.height), { stop: d } = useResizeObserver(e, ([t]) => {
|
|
254
256
|
let n = a === "border-box" ? t.borderBoxSize : a === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
255
257
|
if (r && s.value) {
|
|
256
258
|
let t = unrefElement(e);
|
|
@@ -279,7 +281,6 @@ function useElementSize(e, t = {
|
|
|
279
281
|
stop: m
|
|
280
282
|
};
|
|
281
283
|
}
|
|
282
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
283
284
|
function useWindowSize(e = {}) {
|
|
284
285
|
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
286
|
if (t) if (c === "outer") l.value = t.outerWidth, u.value = t.outerHeight;
|
|
@@ -532,7 +533,7 @@ function processConfigValues(e, t) {
|
|
|
532
533
|
}
|
|
533
534
|
}
|
|
534
535
|
const useResponsiveConfig = (e, t = !1) => {
|
|
535
|
-
let { width: n } =
|
|
536
|
+
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
537
|
let e = a.value.find((e) => n.value >= e[0]);
|
|
537
538
|
return e ? e[1] : {};
|
|
538
539
|
});
|
|
@@ -934,7 +935,7 @@ function isMatchWith(e, t, n) {
|
|
|
934
935
|
return typeof n == "function" ? isMatchWithInternal(e, t, function e(t, r, a, s, c, l) {
|
|
935
936
|
let u = n(t, r, a, s, c, l);
|
|
936
937
|
return u === void 0 ? isMatchWithInternal(t, r, e, l) : !!u;
|
|
937
|
-
}, /* @__PURE__ */ new Map()) :
|
|
938
|
+
}, /* @__PURE__ */ new Map()) : isMatchWith(e, t, () => void 0);
|
|
938
939
|
}
|
|
939
940
|
function isMatchWithInternal(e, t, n, r) {
|
|
940
941
|
if (t === e) return !0;
|
|
@@ -952,8 +953,8 @@ function isObjectMatch(e, t, n, r) {
|
|
|
952
953
|
let a = Object.keys(t);
|
|
953
954
|
if (e == null) return a.length === 0;
|
|
954
955
|
if (a.length === 0) return !0;
|
|
955
|
-
if (r
|
|
956
|
-
r
|
|
956
|
+
if (r?.has(t)) return r.get(t) === e;
|
|
957
|
+
r?.set(t, e);
|
|
957
958
|
try {
|
|
958
959
|
for (let s = 0; s < a.length; s++) {
|
|
959
960
|
let c = a[s];
|
|
@@ -961,7 +962,7 @@ function isObjectMatch(e, t, n, r) {
|
|
|
961
962
|
}
|
|
962
963
|
return !0;
|
|
963
964
|
} finally {
|
|
964
|
-
r
|
|
965
|
+
r?.delete(t);
|
|
965
966
|
}
|
|
966
967
|
}
|
|
967
968
|
function isMapMatch(e, t, n, r) {
|
|
@@ -3107,7 +3108,9 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3107
3108
|
}), () => h("div", {
|
|
3108
3109
|
ref: n,
|
|
3109
3110
|
role: "group",
|
|
3110
|
-
"aria-roledescription": "
|
|
3111
|
+
"aria-roledescription": "slide",
|
|
3112
|
+
"aria-hidden": e.isClone,
|
|
3113
|
+
tabindex: e.isClone ? -1 : void 0
|
|
3111
3114
|
}, t.default());
|
|
3112
3115
|
}
|
|
3113
3116
|
}, __plugin_vue_export_helper_default = (e, t) => {
|
|
@@ -3127,7 +3130,7 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3127
3130
|
}
|
|
3128
3131
|
},
|
|
3129
3132
|
setup(e) {
|
|
3130
|
-
useCssVars((e) => ({
|
|
3133
|
+
useCssVars((e) => ({ v219904f5: P.value }));
|
|
3131
3134
|
let t = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, n = Object.freeze({
|
|
3132
3135
|
element: !0,
|
|
3133
3136
|
component: !0,
|
|
@@ -3175,11 +3178,11 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3175
3178
|
"evo-vue-carousel__slide-prefix": t === "prefix",
|
|
3176
3179
|
"evo-vue-carousel__slide-suffix": t === "suffix"
|
|
3177
3180
|
}]),
|
|
3178
|
-
role: "option",
|
|
3179
3181
|
style: {
|
|
3180
3182
|
flexBasis: "var(--slide-width, 0px)",
|
|
3181
3183
|
marginRight: `${e.gap}px`
|
|
3182
3184
|
},
|
|
3185
|
+
ariaLabel: `Slide ${a}`,
|
|
3183
3186
|
key: `slide_${a}${s}`,
|
|
3184
3187
|
isClone: !!t
|
|
3185
3188
|
}, { default: () => [n] })), n);
|
|
@@ -3204,7 +3207,6 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3204
3207
|
ref_key: "viewportRef",
|
|
3205
3208
|
ref: k,
|
|
3206
3209
|
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
3210
|
"data-width": unref(j),
|
|
3209
3211
|
"data-height": unref(N)
|
|
3210
3212
|
}, [createVNode(unref(S), {
|
|
@@ -3215,7 +3217,7 @@ var COMPONENTS_AND_ELEMENTS = /* @__PURE__ */ freeze({
|
|
|
3215
3217
|
_: 1
|
|
3216
3218
|
}, 8, ["slots"])], 8, _hoisted_1$1));
|
|
3217
3219
|
}
|
|
3218
|
-
}, [["__scopeId", "data-v-
|
|
3220
|
+
}, [["__scopeId", "data-v-ba78f683"]]), _hoisted_1 = ["data-height"], Gallery_default = {
|
|
3219
3221
|
__name: "Gallery",
|
|
3220
3222
|
props: {
|
|
3221
3223
|
totalSlides: {
|
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-
|
|
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-ba78f683]{--slide-width:var(--v219904f5)}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evo-vue-carousel",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"files": [
|
|
7
|
-
"dist"
|
|
7
|
+
"dist",
|
|
8
|
+
"tailwind.source.css"
|
|
8
9
|
],
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
@@ -24,28 +25,34 @@
|
|
|
24
25
|
"demo": "pnpm --filter='./demo' run dev",
|
|
25
26
|
"demo:build": "pnpm --filter='./demo' run build",
|
|
26
27
|
"demo:preview": "pnpm --filter='./demo' run preview",
|
|
27
|
-
"prepublishOnly": "npm run build"
|
|
28
|
+
"prepublishOnly": "npm run build",
|
|
29
|
+
"test": "vitest"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|
|
30
32
|
"@evomark/vue-forward-slots": "^6.2.2",
|
|
31
33
|
"@skirtle/vue-vnode-utils": "^0.2.0",
|
|
32
|
-
"@vueuse/core": "^
|
|
33
|
-
"es-toolkit": "^1.
|
|
34
|
+
"@vueuse/core": "^14.0.0",
|
|
35
|
+
"es-toolkit": "^1.41.0",
|
|
34
36
|
"vue3-icon": "^3.0.3"
|
|
35
37
|
},
|
|
36
38
|
"devDependencies": {
|
|
37
|
-
"@eslint/js": "^9.
|
|
39
|
+
"@eslint/js": "^9.39.1",
|
|
40
|
+
"@testing-library/vue": "^8.1.0",
|
|
38
41
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
39
|
-
"
|
|
42
|
+
"@vue/test-utils": "^2.4.6",
|
|
43
|
+
"eslint": "^9.39.1",
|
|
40
44
|
"eslint-config-prettier": "^10.1.8",
|
|
41
|
-
"eslint-plugin-jsdoc": "^61.1.
|
|
42
|
-
"eslint-plugin-vue": "^10.5.
|
|
43
|
-
"globals": "^16.
|
|
45
|
+
"eslint-plugin-jsdoc": "^61.1.12",
|
|
46
|
+
"eslint-plugin-vue": "^10.5.1",
|
|
47
|
+
"globals": "^16.5.0",
|
|
48
|
+
"jsdom": "^27.1.0",
|
|
44
49
|
"prettier": "^3.6.2",
|
|
45
50
|
"tailwind-merge": "^3.3.1",
|
|
46
|
-
"tailwindcss": "^4.1.
|
|
47
|
-
"vite": "npm:rolldown-vite@^7.
|
|
51
|
+
"tailwindcss": "^4.1.16",
|
|
52
|
+
"vite": "npm:rolldown-vite@^7.2.0",
|
|
48
53
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
54
|
+
"vitest": "^4.0.7",
|
|
55
|
+
"vitest-axe": "^0.1.0",
|
|
49
56
|
"vue": "^3.5.22",
|
|
50
57
|
"vue-eslint-parser": "^10.2.0"
|
|
51
58
|
},
|