@wikicasa-dev/components 2.6.7-alpha.3 → 2.6.7-alpha.5

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