@wikicasa-dev/components 2.5.6-alpha.0 → 2.5.6-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.
- package/dist/Swiper/Autoplay/index.js +1 -1
- package/dist/Swiper/Controller/index.js +1 -1
- package/dist/Swiper/Keyboard/index.js +1 -1
- package/dist/Swiper/Thumbs/index.js +1 -1
- package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.d.ts +0 -4
- package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.js +2 -6
- package/dist/components/IntersectionObserver/v2/types.d.ts +4 -0
- package/dist/components/IntersectionObserver/v2/types.js +6 -0
- package/dist/packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js +20 -22
- package/dist/packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverTarget.vue.js +1 -1
- package/package.json +1 -1
- /package/dist/assets/{swiper-thumbs.css → swiper-autoplay.css} +0 -0
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { InjectionKey, ShallowRef } from 'vue';
|
|
2
|
-
export declare const ObserverOnceKey: InjectionKey<boolean>;
|
|
3
|
-
export declare const ObserverKey: InjectionKey<ShallowRef<IntersectionObserver | undefined>>;
|
|
4
|
-
export declare const IsVisibleKey: InjectionKey<ShallowRef<boolean>>;
|
|
5
1
|
export interface IntersectionObserverProviderProps {
|
|
6
2
|
observeOnce?: boolean;
|
|
7
3
|
skip?: boolean;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IsVisibleKey as f, ObserverKey as i, ObserverOnceKey as m } from "../../../packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js";
|
|
1
|
+
import f from "../../../packages/components/lib/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js";
|
|
3
2
|
export {
|
|
4
|
-
f as
|
|
5
|
-
i as ObserverKey,
|
|
6
|
-
m as ObserverOnceKey,
|
|
7
|
-
r as default
|
|
3
|
+
f as default
|
|
8
4
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InjectionKey, ShallowRef } from 'vue';
|
|
2
|
+
export declare const ObserverOnceKey: InjectionKey<boolean>;
|
|
3
|
+
export declare const ObserverKey: InjectionKey<ShallowRef<IntersectionObserver | undefined>>;
|
|
4
|
+
export declare const IsVisibleKey: InjectionKey<ShallowRef<boolean>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent as d, shallowRef as i, provide as t, onBeforeMount as m, onBeforeUnmount as O, createElementBlock as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as d, shallowRef as i, provide as t, onBeforeMount as m, onBeforeUnmount as O, createElementBlock as h, renderSlot as a, openBlock as y, normalizeClass as k } from "vue";
|
|
2
|
+
import { ObserverOnceKey as B, ObserverKey as p, IsVisibleKey as V } from "../../../../../../components/IntersectionObserver/v2/types.js";
|
|
3
|
+
const $ = /* @__PURE__ */ d({
|
|
3
4
|
__name: "IntersectionObserverProvider",
|
|
4
5
|
props: {
|
|
5
6
|
observeOnce: { type: Boolean, default: !0 },
|
|
@@ -7,42 +8,39 @@ const B = /* @__PURE__ */ Symbol(), p = /* @__PURE__ */ Symbol(), S = /* @__PURE
|
|
|
7
8
|
threshold: { default: 0 }
|
|
8
9
|
},
|
|
9
10
|
emits: ["intersection"],
|
|
10
|
-
setup(s, { emit:
|
|
11
|
-
const
|
|
12
|
-
s.skip ||
|
|
13
|
-
|
|
11
|
+
setup(s, { emit: u }) {
|
|
12
|
+
const v = u, o = i(!1), e = i(), c = (r) => {
|
|
13
|
+
s.skip || r.forEach(({ target: n, isIntersecting: l }) => {
|
|
14
|
+
o.value = l, l && (v("intersection"), s.observeOnce && f(n));
|
|
14
15
|
});
|
|
15
|
-
},
|
|
16
|
-
e.value && e.value.unobserve(
|
|
17
|
-
},
|
|
16
|
+
}, f = (r) => {
|
|
17
|
+
e.value && e.value.unobserve(r);
|
|
18
|
+
}, b = () => {
|
|
18
19
|
e.value && e.value.disconnect();
|
|
19
20
|
};
|
|
20
|
-
return t(B, s.observeOnce), t(p, e), t(
|
|
21
|
-
e.value = new IntersectionObserver(
|
|
21
|
+
return t(B, s.observeOnce), t(p, e), t(V, o), m(() => {
|
|
22
|
+
e.value = new IntersectionObserver(c, {
|
|
22
23
|
root: null,
|
|
23
24
|
//if the root is null, then we will check if the target is visible in the doc root!
|
|
24
25
|
threshold: s.threshold
|
|
25
26
|
});
|
|
26
27
|
}), O(() => {
|
|
27
|
-
|
|
28
|
-
}), (
|
|
28
|
+
b();
|
|
29
|
+
}), (r, n) => s.observeOnce ? a(r.$slots, "default", {
|
|
29
30
|
key: 1,
|
|
30
31
|
observer: e.value,
|
|
31
|
-
isVisible:
|
|
32
|
-
}) : (
|
|
32
|
+
isVisible: o.value
|
|
33
|
+
}) : (y(), h("div", {
|
|
33
34
|
key: 0,
|
|
34
|
-
class: k(
|
|
35
|
+
class: k(r.$attrs["root-classes"])
|
|
35
36
|
}, [
|
|
36
|
-
a(
|
|
37
|
+
a(r.$slots, "default", {
|
|
37
38
|
observer: e.value,
|
|
38
|
-
isVisible:
|
|
39
|
+
isVisible: o.value
|
|
39
40
|
})
|
|
40
41
|
], 2));
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
-
p as ObserverKey,
|
|
46
|
-
B as ObserverOnceKey,
|
|
47
|
-
E as default
|
|
45
|
+
$ as default
|
|
48
46
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, useTemplateRef as c, inject as r, onMounted as u, createElementBlock as v, renderSlot as t, unref as n, openBlock as f, normalizeClass as d } from "vue";
|
|
2
|
-
import { ObserverOnceKey as m, ObserverKey as p, IsVisibleKey as b } from "
|
|
2
|
+
import { ObserverOnceKey as m, ObserverKey as p, IsVisibleKey as b } from "../../../../../../components/IntersectionObserver/v2/types.js";
|
|
3
3
|
const K = /* @__PURE__ */ i({
|
|
4
4
|
__name: "IntersectionObserverTarget",
|
|
5
5
|
setup(y) {
|
package/package.json
CHANGED
|
File without changes
|