@wikicasa-dev/components 2.6.7-alpha.2 → 2.6.7-alpha.4

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