@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.
@@ -1 +1 @@
1
- .swiper.uikit-carousel[data-v-df5f7205]{opacity:0}.swiper.uikit-carousel.is-initialized[data-v-df5f7205]{opacity:1}
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-df5f7205"]]);
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 = { class: "uikit-relative" }, b = {
8
+ var y = {
9
9
  key: 0,
10
10
  class: "uikit-absolute uikit-inset-0"
11
- }, x = Symbol(), S = Symbol(), C = /*@__PURE__*/ u({
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: C, emit: w }) {
24
- let T = w, E = _(null), D = v("root"), O = _(!1), k = !!u.swiperOptions?.keyboard, A = !!u.swiperOptions?.autoplay, j = [], M = !1, N = (e) => {
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
- }, P = (e, t) => e.params.loop ? e.slides[(t % e.slides.length + e.slides.length) % e.slides.length] : e.slides[t], F = (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(P(e, t)), c = [], l = [];
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(P(e, s), "img[data-src]");
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
- }, I = (e) => {
39
- O.value = !0, T("init", e);
40
- }, L = async (e) => {
41
- let { visibleImages: t, inViewImages: n, preloadImages: r } = F(e, e.activeIndex), i, s = new Promise((e) => i = setTimeout(e, 6e3)), c = Promise.all(t.map(o)).finally(() => {
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), N(() => {
44
+ await Promise.race([c, s]), n.forEach(a), M(() => {
45
45
  r.forEach(a);
46
- }), I(e);
47
- }, R = (e) => {
48
- let { visibleImages: t, inViewImages: n, preloadImages: r } = F(e, e.activeIndex);
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
- }, z = async (i) => {
55
- E.value = await e(i, {
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), L(e)),
59
+ init: (e) => (u.swiperOptions?.on?.init?.(e), I(e)),
60
60
  slideChange: (e) => {
61
- T("moved", { activeIndex: e.activeIndex }), R(e), u.swiperOptions?.on?.slideChange?.(e);
61
+ w("moved", { activeIndex: e.activeIndex }), L(e), u.swiperOptions?.on?.slideChange?.(e);
62
62
  },
63
63
  slidesUpdated: (e) => {
64
- O.value && R(e), u.swiperOptions?.on?.slidesUpdated?.(e);
64
+ D.value && L(e), u.swiperOptions?.on?.slidesUpdated?.(e);
65
65
  }
66
66
  }
67
67
  }, [
68
68
  r(u.swiperOptions?.zoom),
69
- k ? n(u.swiperOptions?.keyboard) : void 0,
70
- A ? t(u.swiperOptions.autoplay) : void 0,
71
- ...j
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
- D.value && setTimeout(() => z(D.value));
75
+ E.value && setTimeout(() => R(E.value));
76
76
  }), f(() => {
77
- let e = E.value;
78
- E.value = null, e?.destroy(!0, !1);
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 !== M && (M = e);
83
- }), C({
84
- swiper: E,
80
+ e && A.push(e);
81
+ }), h(b, (e) => {
82
+ e !== j && (j = e);
83
+ }), S({
84
+ swiper: T,
85
85
  updateSlidesPerView: (e) => {
86
- E.value && E.value.params.slidesPerView !== e && (E.value.params.slidesPerView = e, E.value.update());
86
+ T.value && T.value.params.slidesPerView !== e && (T.value.params.slidesPerView = e, T.value.update());
87
87
  }
88
- }), (e, t) => (m(), c("div", y, [
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", [{ "is-initialized": O.value }, u.rootClasses]])
91
+ class: d(["swiper uikit-carousel", u.rootClasses])
92
92
  }, [g(e.$slots, "default", {}, void 0, !0)], 2),
93
- O.value ? s("", !0) : (m(), c("div", b, [g(e.$slots, "placeholder", {}, void 0, !0)])),
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 { S as addModuleDescriptorKey, C as default, x as setLazyImagesLoaderKey };
99
+ export { x as addModuleDescriptorKey, S as default, b as setLazyImagesLoaderKey };
@@ -1,3 +1,3 @@
1
- import '../../../assets/swiper-thumbs.css';/* empty css */
1
+ import '../../../assets/swiper-controller.css';/* empty css */
2
2
  import { Autoplay as e } from "swiper/modules";
3
3
  export { e as default };
@@ -1,3 +1,3 @@
1
- import '../../../assets/swiper-thumbs.css';/* empty css */
1
+ import '../../../assets/swiper-controller.css';/* empty css */
2
2
  import { Controller as e } from "swiper/modules";
3
3
  export { e as default };
@@ -1,3 +1,3 @@
1
- import '../../../assets/swiper-thumbs.css';/* empty css */
1
+ import '../../../assets/swiper-controller.css';/* empty css */
2
2
  import { Keyboard as e } from "swiper/modules";
3
3
  export { e as default };
@@ -1,3 +1,3 @@
1
- import '../../../assets/swiper-thumbs.css';/* empty css */
1
+ import '../../../assets/swiper-controller.css';/* empty css */
2
2
  import { Thumbs as e } from "swiper/modules";
3
3
  export { e as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.8.2-alpha.0",
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/vue-composables": "0.2.0",
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": {