@wikicasa-dev/components 2.4.2-alpha.5 → 2.4.2-alpha.6

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,12 +1,34 @@
1
- const a = async (o, r, s) => {
2
- const t = s.map((e) => e.loader()), [{ Swiper: i }, ...c] = await Promise.all([
1
+ function s(t, e) {
2
+ if (t == null)
3
+ return e == null ? {} : { ...e };
4
+ if (e == null)
5
+ return { ...t };
6
+ const n = { ...t };
7
+ for (const o in e)
8
+ if (Object.prototype.hasOwnProperty.call(e, o)) {
9
+ const r = e[o], i = n[o];
10
+ p(r) && p(i) ? n[o] = s(i, r) : n[o] = r;
11
+ }
12
+ return n;
13
+ }
14
+ function p(t) {
15
+ return t !== null && typeof t == "object" && !Array.isArray(t) && typeof t != "function" && Object.prototype.toString.call(t) === "[object Object]";
16
+ }
17
+ const a = async (t, e, n) => {
18
+ const o = n.map((c) => c.loader()), [{ Swiper: r }, ...i] = await Promise.all([
3
19
  import("./index.js"),
4
- ...t
5
- ]), n = s.reduce(
6
- (e, p) => Object.assign(e, p.options),
7
- { ...r, modules: c }
20
+ ...o
21
+ ]), l = n.reduce(
22
+ (c, f) => s(c, f.options),
23
+ {
24
+ ...e,
25
+ modules: i
26
+ }
8
27
  );
9
- return console.log("DEBUG:createSwiper", o), new i(o, n);
28
+ return console.log("DEBUG:createSwiper", {
29
+ container: t,
30
+ options: l
31
+ }), new r(t, l);
10
32
  };
11
33
  export {
12
34
  a as createSwiper
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.4.2-alpha.5",
3
+ "version": "2.4.2-alpha.6",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",