@wikicasa-dev/components 2.6.5 → 2.6.7-alpha.0
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 +6 -6
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.vue.js +69 -78
- 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 +3 -3
- /package/dist/assets/{swiper-controller.css → swiper-keyboard.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.swiper.uikit-carousel[data-v-
|
|
1
|
+
.swiper.uikit-carousel[data-v-e1b586ab]{opacity:0}.swiper.uikit-carousel.is-initialized[data-v-e1b586ab]{opacity:1}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import o from "./SwiperRootPrimitive.vue.js";
|
|
2
|
-
import { addModuleDescriptorKey as
|
|
2
|
+
import { addModuleDescriptorKey as d, setLazyImagesLoaderKey as f } from "./SwiperRootPrimitive.vue.js";
|
|
3
3
|
import '../../../assets/SwiperRootPrimitive2.css';import '../../../assets/SwiperRootPrimitive.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
6
|
+
const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e1b586ab"]]);
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
d as addModuleDescriptorKey,
|
|
9
|
+
m as default,
|
|
10
|
+
f as setLazyImagesLoaderKey
|
|
11
11
|
};
|
|
@@ -1,121 +1,112 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { createSwiper as
|
|
3
|
-
import { AutoplayModule as
|
|
4
|
-
import { KeyboardModule as
|
|
5
|
-
import { ZoomModule as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as g, shallowRef as I, useTemplateRef as A, onMounted as N, provide as y, openBlock as w, createElementBlock as P, createElementVNode as q, normalizeClass as x, renderSlot as k, createCommentVNode as B } from "vue";
|
|
2
|
+
import { createSwiper as D } from "../../../lazyModules/Swiper/factory.js";
|
|
3
|
+
import { AutoplayModule as K } from "../../../lazyModules/Swiper/Autoplay/factory.js";
|
|
4
|
+
import { KeyboardModule as R } from "../../../lazyModules/Swiper/Keyboard/factory.js";
|
|
5
|
+
import { ZoomModule as U } from "../../../lazyModules/Swiper/Zoom/factory.js";
|
|
6
|
+
const $ = { class: "uikit-relative" }, F = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "uikit-absolute uikit-inset-0"
|
|
9
|
-
},
|
|
9
|
+
}, Z = /* @__PURE__ */ Symbol(), j = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ g({
|
|
10
10
|
__name: "SwiperRootPrimitive",
|
|
11
11
|
props: {
|
|
12
12
|
rootClasses: {},
|
|
13
13
|
swiperOptions: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["moved", "click", "init"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
let
|
|
19
|
-
const
|
|
16
|
+
setup(a, { expose: b, emit: h }) {
|
|
17
|
+
const c = h, i = I(null), u = A("root"), n = I(!1), S = !!a.swiperOptions?.keyboard, T = !!a.swiperOptions?.autoplay, m = [];
|
|
18
|
+
let p = !1;
|
|
19
|
+
const E = (e) => {
|
|
20
20
|
"requestIdleCallback" in window ? requestIdleCallback(e) : setTimeout(e, 200);
|
|
21
|
-
},
|
|
22
|
-
...e?.querySelectorAll("img[data-src]") ?? []
|
|
23
|
-
], u = (e) => {
|
|
21
|
+
}, v = (e, t = "img") => Array.from(e?.querySelectorAll(t) ?? []), d = (e) => {
|
|
24
22
|
e.src || (e.src = e.dataset.src || "", e.srcset = e.dataset.srcset || "", e.dataset.src = "", e.dataset.srcset = "", e.removeAttribute("lazy"));
|
|
25
|
-
},
|
|
26
|
-
const
|
|
27
|
-
for (let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
23
|
+
}, f = (e, t) => {
|
|
24
|
+
const o = e.params.lazyPreloadPrevNext ?? 0, r = v(e.slides[t]), l = [];
|
|
25
|
+
for (let s = t - o; s <= t + o; s++)
|
|
26
|
+
s !== t && (!e.params.loop && (s < 0 || s >= e.slides.length) || l.push(
|
|
27
|
+
...v(e.slides[s], "img[data-src]")
|
|
28
|
+
));
|
|
29
|
+
return { visibleImages: r, preloadImages: l };
|
|
30
|
+
}, C = (e) => {
|
|
31
|
+
const t = e.complete && e.src ? Promise.resolve() : new Promise((o) => {
|
|
32
|
+
e.addEventListener("load", () => o(), { once: !0 }), e.addEventListener("error", () => o(), {
|
|
33
|
+
once: !0
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
return d(e), t;
|
|
37
|
+
}, O = () => {
|
|
38
|
+
n.value = !0, c("init");
|
|
39
|
+
}, z = async (e) => {
|
|
40
|
+
i.value = await D(
|
|
34
41
|
e,
|
|
35
42
|
{
|
|
36
43
|
on: {
|
|
37
44
|
init: async (t) => {
|
|
38
|
-
|
|
39
|
-
const { visibleImages: a, preloadImages: l } = I(
|
|
45
|
+
const { visibleImages: o, preloadImages: r } = f(
|
|
40
46
|
t,
|
|
41
47
|
t.activeIndex
|
|
42
48
|
);
|
|
43
|
-
let
|
|
44
|
-
const
|
|
45
|
-
(
|
|
46
|
-
),
|
|
47
|
-
|
|
48
|
-
const g = i.complete && i.src ? Promise.resolve() : new Promise((w) => {
|
|
49
|
-
i.addEventListener(
|
|
50
|
-
"load",
|
|
51
|
-
() => w(),
|
|
52
|
-
{ once: !0 }
|
|
53
|
-
), i.addEventListener(
|
|
54
|
-
"error",
|
|
55
|
-
() => w(),
|
|
56
|
-
{
|
|
57
|
-
once: !0
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
});
|
|
61
|
-
return u(i), g;
|
|
62
|
-
})
|
|
49
|
+
let l;
|
|
50
|
+
const s = new Promise(
|
|
51
|
+
(V) => l = setTimeout(V, 6e3)
|
|
52
|
+
), M = Promise.all(
|
|
53
|
+
o.map(C)
|
|
63
54
|
).finally(() => {
|
|
64
|
-
clearTimeout(
|
|
55
|
+
clearTimeout(l);
|
|
65
56
|
});
|
|
66
|
-
await Promise.race([
|
|
67
|
-
|
|
68
|
-
}),
|
|
57
|
+
await Promise.race([M, s]), E(() => {
|
|
58
|
+
r.forEach(d);
|
|
59
|
+
}), O();
|
|
69
60
|
},
|
|
70
61
|
slideChange: (t) => {
|
|
71
|
-
|
|
72
|
-
const { visibleImages:
|
|
62
|
+
c("moved", { activeIndex: t.activeIndex });
|
|
63
|
+
const { visibleImages: o, preloadImages: r } = f(
|
|
73
64
|
t,
|
|
74
65
|
t.activeIndex
|
|
75
66
|
);
|
|
76
|
-
[...
|
|
77
|
-
|
|
67
|
+
[...o, ...r].forEach(
|
|
68
|
+
d
|
|
78
69
|
);
|
|
79
70
|
}
|
|
80
71
|
},
|
|
81
|
-
...
|
|
72
|
+
...a.swiperOptions
|
|
82
73
|
},
|
|
83
74
|
[
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
...
|
|
75
|
+
U(a.swiperOptions?.zoom),
|
|
76
|
+
S ? R(a.swiperOptions?.keyboard) : void 0,
|
|
77
|
+
T ? K(a.swiperOptions.autoplay) : void 0,
|
|
78
|
+
...m
|
|
88
79
|
].filter(Boolean)
|
|
89
80
|
);
|
|
90
81
|
};
|
|
91
|
-
|
|
92
|
-
|
|
82
|
+
N(() => {
|
|
83
|
+
u.value && setTimeout(() => z(u.value));
|
|
93
84
|
});
|
|
94
|
-
const
|
|
95
|
-
!
|
|
85
|
+
const L = (e) => {
|
|
86
|
+
!i.value || i.value.params.slidesPerView === e || (i.value.params.slidesPerView = e, i.value.update());
|
|
96
87
|
};
|
|
97
|
-
return
|
|
98
|
-
e &&
|
|
99
|
-
}),
|
|
100
|
-
e !==
|
|
101
|
-
}),
|
|
102
|
-
swiper:
|
|
103
|
-
updateSlidesPerView:
|
|
104
|
-
}), (e, t) => (
|
|
105
|
-
|
|
88
|
+
return y(j, (e) => {
|
|
89
|
+
e && m.push(e);
|
|
90
|
+
}), y(Z, (e) => {
|
|
91
|
+
e !== p && (p = e);
|
|
92
|
+
}), b({
|
|
93
|
+
swiper: i,
|
|
94
|
+
updateSlidesPerView: L
|
|
95
|
+
}), (e, t) => (w(), P("div", $, [
|
|
96
|
+
q("div", {
|
|
106
97
|
ref: "root",
|
|
107
|
-
class:
|
|
98
|
+
class: x(["swiper uikit-carousel", [{ "is-initialized": n.value }, a.rootClasses]])
|
|
108
99
|
}, [
|
|
109
|
-
|
|
100
|
+
k(e.$slots, "default", {}, void 0, !0)
|
|
110
101
|
], 2),
|
|
111
|
-
|
|
112
|
-
|
|
102
|
+
n.value ? B("", !0) : (w(), P("div", F, [
|
|
103
|
+
k(e.$slots, "placeholder", {}, void 0, !0)
|
|
113
104
|
]))
|
|
114
105
|
]));
|
|
115
106
|
}
|
|
116
107
|
});
|
|
117
108
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
109
|
+
j as addModuleDescriptorKey,
|
|
110
|
+
Y as default,
|
|
111
|
+
Z as setLazyImagesLoaderKey
|
|
121
112
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.7-alpha.0",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@wikicasa-dev/svg-icons": "1.3.6",
|
|
46
46
|
"@wikicasa-dev/types": "2.5.8",
|
|
47
|
-
"@wikicasa-dev/utilities": "1.2.
|
|
47
|
+
"@wikicasa-dev/utilities": "1.2.5",
|
|
48
48
|
"@wikicasa-dev/vue-composables": "0.1.6",
|
|
49
49
|
"date-fns": "^4.0.0",
|
|
50
50
|
"vue": "^3.5.0"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@wikicasa-dev/svg-icons": "^1.3.6",
|
|
66
66
|
"@wikicasa-dev/tailwind-plugins": "^0.0.6",
|
|
67
67
|
"@wikicasa-dev/types": "^2.5.8",
|
|
68
|
-
"@wikicasa-dev/utilities": "^1.2.
|
|
68
|
+
"@wikicasa-dev/utilities": "^1.2.5",
|
|
69
69
|
"@wikicasa-dev/vue-composables": "^0.1.6",
|
|
70
70
|
"autoprefixer": "^10.5.0",
|
|
71
71
|
"date-fns": "4.4.0",
|
|
File without changes
|