@wikicasa-dev/components 2.8.2-alpha.0 → 2.9.0-alpha.1
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/assets/SwiperRootPrimitive2.css +1 -1
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.js +1 -1
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.vue.js +37 -37
- package/dist/lazyModules/Swiper/Autoplay/index.js +1 -1
- package/dist/lazyModules/Swiper/Controller/index.js +1 -1
- package/dist/lazyModules/Swiper/Keyboard/index.js +1 -1
- package/dist/lazyModules/Swiper/Thumbs/index.js +1 -1
- package/package.json +5 -5
- /package/dist/assets/{swiper-thumbs.css → swiper-controller.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.swiper.uikit-carousel[data-v-
|
|
1
|
+
.swiper.uikit-carousel[data-v-fa1745f2]{opacity:0}.is-initialized>.swiper.uikit-carousel[data-v-fa1745f2]{opacity:1}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t, { addModuleDescriptorKey as n, setLazyImagesLoaderKey as r } from "./SwiperRootPrimitive.vue.js";
|
|
3
3
|
//#region lib/components/carousel/Primitive/SwiperRootPrimitive.vue
|
|
4
|
-
var i = /*#__PURE__*/ e(t, [["__scopeId", "data-v-
|
|
4
|
+
var i = /*#__PURE__*/ e(t, [["__scopeId", "data-v-fa1745f2"]]);
|
|
5
5
|
//#endregion
|
|
6
6
|
export { n as addModuleDescriptorKey, i as default, r as setLazyImagesLoaderKey };
|
|
@@ -5,10 +5,10 @@ import { ZoomModule as r } from "../../../lazyModules/Swiper/Zoom/factory.js";
|
|
|
5
5
|
import { collectSlideImages as i, startDeferredImageLoad as a, waitForImageLoad as o } from "./deferredImages.js";
|
|
6
6
|
import { createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, normalizeClass as d, onBeforeUnmount as f, onMounted as p, openBlock as m, provide as h, renderSlot as g, shallowRef as _, useTemplateRef as v } from "vue";
|
|
7
7
|
import '../../../assets/SwiperRootPrimitive2.css';import '../../../assets/SwiperRootPrimitive.css';//#region lib/components/carousel/Primitive/SwiperRootPrimitive.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var y = {
|
|
8
|
+
var y = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "uikit-absolute uikit-inset-0"
|
|
11
|
-
},
|
|
11
|
+
}, b = Symbol(), x = Symbol(), S = /*@__PURE__*/ u({
|
|
12
12
|
__name: "SwiperRootPrimitive",
|
|
13
13
|
props: {
|
|
14
14
|
rootClasses: {},
|
|
@@ -20,14 +20,14 @@ var y = { class: "uikit-relative" }, b = {
|
|
|
20
20
|
"click",
|
|
21
21
|
"init"
|
|
22
22
|
],
|
|
23
|
-
setup(u, { expose:
|
|
24
|
-
let
|
|
23
|
+
setup(u, { expose: S, emit: C }) {
|
|
24
|
+
let w = C, T = _(null), E = v("root"), D = _(!1), O = !!u.swiperOptions?.keyboard, k = !!u.swiperOptions?.autoplay, A = [], j = !1, M = (e) => {
|
|
25
25
|
"requestIdleCallback" in window ? requestIdleCallback(e) : setTimeout(e, 200);
|
|
26
|
-
},
|
|
27
|
-
let { params: n } = e, r = u.preloadCount ?? n.lazyPreloadPrevNext ?? 0, a = Math.ceil(typeof n.slidesPerView == "number" ? n.slidesPerView : e.slidesPerViewDynamic()), o = n.centeredSlides ? Math.floor(a / 2) : 0, s = i(
|
|
26
|
+
}, N = (e, t) => e.params.loop ? e.slides[(t % e.slides.length + e.slides.length) % e.slides.length] : e.slides[t], P = (e, t) => {
|
|
27
|
+
let { params: n } = e, r = u.preloadCount ?? n.lazyPreloadPrevNext ?? 0, a = Math.ceil(typeof n.slidesPerView == "number" ? n.slidesPerView : e.slidesPerViewDynamic()), o = n.centeredSlides ? Math.floor(a / 2) : 0, s = i(N(e, t)), c = [], l = [];
|
|
28
28
|
for (let s = t - o - r; s <= t + a - 1 - o + r; s++) {
|
|
29
29
|
if (s === t || !n.loop && (s < 0 || s >= e.slides.length)) continue;
|
|
30
|
-
let r = i(
|
|
30
|
+
let r = i(N(e, s), "img[data-src]");
|
|
31
31
|
(s >= t - o && s < t + a - o ? c : l).push(...r);
|
|
32
32
|
}
|
|
33
33
|
return {
|
|
@@ -35,65 +35,65 @@ var y = { class: "uikit-relative" }, b = {
|
|
|
35
35
|
inViewImages: c,
|
|
36
36
|
preloadImages: l
|
|
37
37
|
};
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
let { visibleImages: t, inViewImages: n, preloadImages: r } =
|
|
38
|
+
}, F = (e) => {
|
|
39
|
+
D.value = !0, w("init", e);
|
|
40
|
+
}, I = async (e) => {
|
|
41
|
+
let { visibleImages: t, inViewImages: n, preloadImages: r } = P(e, e.activeIndex), i, s = new Promise((e) => i = setTimeout(e, 6e3)), c = Promise.all(t.map(o)).finally(() => {
|
|
42
42
|
clearTimeout(i);
|
|
43
43
|
});
|
|
44
|
-
await Promise.race([c, s]), n.forEach(a),
|
|
44
|
+
await Promise.race([c, s]), n.forEach(a), M(() => {
|
|
45
45
|
r.forEach(a);
|
|
46
|
-
}),
|
|
47
|
-
},
|
|
48
|
-
let { visibleImages: t, inViewImages: n, preloadImages: r } =
|
|
46
|
+
}), F(e);
|
|
47
|
+
}, L = (e) => {
|
|
48
|
+
let { visibleImages: t, inViewImages: n, preloadImages: r } = P(e, e.activeIndex);
|
|
49
49
|
[
|
|
50
50
|
...t,
|
|
51
51
|
...n,
|
|
52
52
|
...r
|
|
53
53
|
].forEach(a);
|
|
54
|
-
},
|
|
55
|
-
|
|
54
|
+
}, R = async (i) => {
|
|
55
|
+
T.value = await e(i, {
|
|
56
56
|
...u.swiperOptions,
|
|
57
57
|
on: {
|
|
58
58
|
...u.swiperOptions?.on,
|
|
59
|
-
init: (e) => (u.swiperOptions?.on?.init?.(e),
|
|
59
|
+
init: (e) => (u.swiperOptions?.on?.init?.(e), I(e)),
|
|
60
60
|
slideChange: (e) => {
|
|
61
|
-
|
|
61
|
+
w("moved", { activeIndex: e.activeIndex }), L(e), u.swiperOptions?.on?.slideChange?.(e);
|
|
62
62
|
},
|
|
63
63
|
slidesUpdated: (e) => {
|
|
64
|
-
|
|
64
|
+
D.value && L(e), u.swiperOptions?.on?.slidesUpdated?.(e);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}, [
|
|
68
68
|
r(u.swiperOptions?.zoom),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
...
|
|
69
|
+
O ? n(u.swiperOptions?.keyboard) : void 0,
|
|
70
|
+
k ? t(u.swiperOptions.autoplay) : void 0,
|
|
71
|
+
...A
|
|
72
72
|
].filter(Boolean));
|
|
73
73
|
};
|
|
74
74
|
return p(() => {
|
|
75
|
-
|
|
75
|
+
E.value && setTimeout(() => R(E.value));
|
|
76
76
|
}), f(() => {
|
|
77
|
-
let e =
|
|
78
|
-
|
|
79
|
-
}), h(S, (e) => {
|
|
80
|
-
e && j.push(e);
|
|
77
|
+
let e = T.value;
|
|
78
|
+
T.value = null, e?.destroy(!0, !1);
|
|
81
79
|
}), h(x, (e) => {
|
|
82
|
-
e
|
|
83
|
-
}),
|
|
84
|
-
|
|
80
|
+
e && A.push(e);
|
|
81
|
+
}), h(b, (e) => {
|
|
82
|
+
e !== j && (j = e);
|
|
83
|
+
}), S({
|
|
84
|
+
swiper: T,
|
|
85
85
|
updateSlidesPerView: (e) => {
|
|
86
|
-
|
|
86
|
+
T.value && T.value.params.slidesPerView !== e && (T.value.params.slidesPerView = e, T.value.update());
|
|
87
87
|
}
|
|
88
|
-
}), (e, t) => (m(), c("div",
|
|
88
|
+
}), (e, t) => (m(), c("div", { class: d(["uikit-relative", { "is-initialized": D.value }]) }, [
|
|
89
89
|
l("div", {
|
|
90
90
|
ref: "root",
|
|
91
|
-
class: d(["swiper uikit-carousel",
|
|
91
|
+
class: d(["swiper uikit-carousel", u.rootClasses])
|
|
92
92
|
}, [g(e.$slots, "default", {}, void 0, !0)], 2),
|
|
93
|
-
|
|
93
|
+
D.value ? s("", !0) : (m(), c("div", y, [g(e.$slots, "placeholder", {}, void 0, !0)])),
|
|
94
94
|
g(e.$slots, "thumbs", {}, void 0, !0)
|
|
95
|
-
]));
|
|
95
|
+
], 2));
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
//#endregion
|
|
99
|
-
export {
|
|
99
|
+
export { x as addModuleDescriptorKey, S as default, b as setLazyImagesLoaderKey };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0-alpha.1",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"vue": "^3.5.41",
|
|
84
84
|
"vue-router": "^5.1.0",
|
|
85
85
|
"vue-tsc": "^3.3.3",
|
|
86
|
-
"@wikicasa-dev/tsconfig": "0.0.0",
|
|
87
|
-
"@wikicasa-dev/tailwind-plugins": "0.0.7",
|
|
88
86
|
"@wikicasa-dev/eslint-config": "0.0.0",
|
|
87
|
+
"@wikicasa-dev/tsconfig": "0.0.0",
|
|
89
88
|
"@wikicasa-dev/svg-icons": "1.3.7",
|
|
90
|
-
"@wikicasa-dev/
|
|
89
|
+
"@wikicasa-dev/tailwind-plugins": "0.0.7",
|
|
91
90
|
"@wikicasa-dev/types": "2.8.0",
|
|
92
|
-
"@wikicasa-dev/utilities": "1.2.11"
|
|
91
|
+
"@wikicasa-dev/utilities": "1.2.11",
|
|
92
|
+
"@wikicasa-dev/vue-composables": "0.2.0"
|
|
93
93
|
},
|
|
94
94
|
"readme": "ERROR: No README data found!",
|
|
95
95
|
"scripts": {
|
|
File without changes
|