@wikicasa-dev/components 2.5.3-alpha.6 → 2.5.3-alpha.7

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,27 +1,25 @@
1
- import { defineComponent as f, shallowRef as a, useTemplateRef as y, onMounted as k, provide as h, createElementBlock as S, openBlock as O, Fragment as P, withDirectives as V, renderSlot as u, createCommentVNode as b, createElementVNode as M, vShow as x, nextTick as B } from "vue";
2
- import { createSwiper as C } from "../../../../../../Swiper/factory.js";
3
- import { AutoplayModule as D } from "../../../../../../Swiper/Autoplay/factory.js";
4
- import { KeyboardModule as g } from "../../../../../../Swiper/Keyboard/factory.js";
5
- import { ZoomModule as E } from "../../../../../../Swiper/Zoom/factory.js";
6
- const I = {
7
- class: "swiper uikit-carousel",
8
- ref: "root"
9
- }, R = /* @__PURE__ */ Symbol(), A = /* @__PURE__ */ f({
1
+ import { defineComponent as y, useAttrs as k, shallowRef as l, useTemplateRef as h, onMounted as P, provide as S, createElementBlock as O, openBlock as V, Fragment as b, withDirectives as M, renderSlot as u, createCommentVNode as g, createElementVNode as x, mergeProps as B, unref as C, vShow as D, nextTick as A } from "vue";
2
+ import { createSwiper as E } from "../../../../../../Swiper/factory.js";
3
+ import { AutoplayModule as I } from "../../../../../../Swiper/Autoplay/factory.js";
4
+ import { KeyboardModule as R } from "../../../../../../Swiper/Keyboard/factory.js";
5
+ import { ZoomModule as T } from "../../../../../../Swiper/Zoom/factory.js";
6
+ const z = /* @__PURE__ */ Symbol(), U = /* @__PURE__ */ y({
7
+ inheritAttrs: !1,
10
8
  __name: "SwiperRootPrimitive",
11
9
  props: {
12
10
  swiperOptions: {}
13
11
  },
14
12
  emits: ["moved", "click", "init"],
15
- setup(o, { expose: d, emit: p }) {
16
- const s = p, t = a(null), n = y("root"), i = a(!1), c = !!o.swiperOptions?.keyboard, m = !!o.swiperOptions?.autoplay, l = [], v = async (e) => {
13
+ setup(t, { expose: p, emit: d }) {
14
+ const s = d, c = k(), o = l(null), n = h("root"), i = l(!1), m = !!t.swiperOptions?.keyboard, v = !!t.swiperOptions?.autoplay, a = [], f = async (e) => {
17
15
  console.log("DEBUG:swiperRootPrimitive:init", {
18
16
  swiperRootEl: e
19
- }), t.value = await C(
17
+ }), o.value = await E(
20
18
  e,
21
19
  {
22
20
  on: {
23
21
  init: () => {
24
- B(() => {
22
+ A(() => {
25
23
  i.value = !0, s("init");
26
24
  });
27
25
  },
@@ -29,38 +27,38 @@ const I = {
29
27
  s("moved", { activeIndex: r.activeIndex });
30
28
  }
31
29
  },
32
- ...o.swiperOptions
30
+ ...t.swiperOptions
33
31
  },
34
32
  [
35
- E(o.swiperOptions?.zoom),
36
- c ? g(o.swiperOptions?.keyboard) : void 0,
37
- m ? D(o.swiperOptions.autoplay) : void 0,
38
- ...l
33
+ T(t.swiperOptions?.zoom),
34
+ m ? R(t.swiperOptions?.keyboard) : void 0,
35
+ v ? I(t.swiperOptions.autoplay) : void 0,
36
+ ...a
39
37
  ].filter(Boolean)
40
38
  );
41
39
  };
42
- k(() => {
43
- n.value && setTimeout(() => v(n.value));
40
+ P(() => {
41
+ n.value && setTimeout(() => f(n.value));
44
42
  });
45
43
  const w = (e) => {
46
- !t.value || t.value.params.slidesPerView === e || (t.value.params.slidesPerView = e, t.value.update());
44
+ !o.value || o.value.params.slidesPerView === e || (o.value.params.slidesPerView = e, o.value.update());
47
45
  };
48
- return h(R, (e) => {
49
- e && l.push(e);
50
- }), d({
51
- swiper: t,
46
+ return S(z, (e) => {
47
+ e && a.push(e);
48
+ }), p({
49
+ swiper: o,
52
50
  updateSlidesPerView: w
53
- }), (e, r) => (O(), S(P, null, [
54
- V(M("div", I, [
51
+ }), (e, r) => (V(), O(b, null, [
52
+ M(x("div", B({ ref: "root" }, C(c), { class: "swiper uikit-carousel" }), [
55
53
  u(e.$slots, "default")
56
- ], 512), [
57
- [x, i.value]
54
+ ], 16), [
55
+ [D, i.value]
58
56
  ]),
59
- i.value ? b("", !0) : u(e.$slots, "placeholder", { key: 0 })
57
+ i.value ? g("", !0) : u(e.$slots, "placeholder", { key: 0 })
60
58
  ], 64));
61
59
  }
62
60
  });
63
61
  export {
64
- R as addModuleDescriptorKey,
65
- A as default
62
+ z as addModuleDescriptorKey,
63
+ U as default
66
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.5.3-alpha.6",
3
+ "version": "2.5.3-alpha.7",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",