@wikicasa-dev/components 2.5.6-alpha.6 → 2.5.6-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,4 +1,4 @@
1
- import '../../assets/swiper-keyboard.css';/* empty css */
1
+ import '../../assets/swiper-controller.css';/* empty css */
2
2
  import { Autoplay as p } from "swiper/modules";
3
3
  export {
4
4
  p as default
@@ -1,4 +1,4 @@
1
- import '../../assets/swiper-keyboard.css';/* empty css */
1
+ import '../../assets/swiper-controller.css';/* empty css */
2
2
  import { Controller as e } from "swiper/modules";
3
3
  export {
4
4
  e as default
@@ -1,4 +1,4 @@
1
- import '../../assets/swiper-keyboard.css';/* empty css */
1
+ import '../../assets/swiper-controller.css';/* empty css */
2
2
  import { Keyboard as e } from "swiper/modules";
3
3
  export {
4
4
  e as default
@@ -1,4 +1,4 @@
1
- import '../../assets/swiper-keyboard.css';/* empty css */
1
+ import '../../assets/swiper-controller.css';/* empty css */
2
2
  import { Thumbs as t } from "swiper/modules";
3
3
  export {
4
4
  t as default
@@ -1 +1 @@
1
- .no-transition[data-v-f8f3d52a]{transition-duration:0ms!important}.disable-select[data-v-f8f3d52a]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.swiper-button-disabled[data-v-f8f3d52a]{pointer-events:auto!important}
1
+ .swiper-pagination-bullet{--swiper-pagination-color: #ccc}.swiper-pagination-bullet-active{--swiper-pagination-color: #fff}
@@ -0,0 +1 @@
1
+ .no-transition[data-v-f8f3d52a]{transition-duration:0ms!important}.disable-select[data-v-f8f3d52a]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.swiper-button-disabled[data-v-f8f3d52a]{pointer-events:auto!important}
@@ -10,11 +10,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<In
10
10
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
11
11
  default?(_: {
12
12
  observer: IntersectionObserver | undefined;
13
- isVisible: boolean;
14
13
  }): any;
15
14
  default?(_: {
16
15
  observer: IntersectionObserver | undefined;
17
- isVisible: boolean;
18
16
  }): any;
19
17
  }>;
20
18
  export default _default;
@@ -1,8 +1,12 @@
1
1
  declare function __VLS_template(): {
2
2
  attrs: Partial<{}>;
3
3
  slots: {
4
- default?(_: {}): any;
5
- default?(_: {}): any;
4
+ default?(_: {
5
+ isVisible: boolean;
6
+ }): any;
7
+ default?(_: {
8
+ isVisible: true;
9
+ }): any;
6
10
  };
7
11
  refs: {
8
12
  root: HTMLDivElement;
@@ -1,4 +1,4 @@
1
1
  import { InjectionKey, ShallowRef } from 'vue';
2
2
  export declare const ObserverOnceKey: InjectionKey<boolean>;
3
3
  export declare const ObserverKey: InjectionKey<ShallowRef<IntersectionObserver | undefined>>;
4
- export declare const IsVisibleKey: InjectionKey<ShallowRef<boolean>>;
4
+ export declare const VisibleTargetsKey: InjectionKey<ShallowRef<Set<string>>>;
@@ -1,6 +1,6 @@
1
1
  const e = /* @__PURE__ */ Symbol(), o = /* @__PURE__ */ Symbol(), s = /* @__PURE__ */ Symbol();
2
2
  export {
3
- s as IsVisibleKey,
4
3
  o as ObserverKey,
5
- e as ObserverOnceKey
4
+ e as ObserverOnceKey,
5
+ s as VisibleTargetsKey
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import o from "../../../packages/components/lib/components/carousel/Primitive/SwiperPaginationPrimitive.vue.js";
2
- import '../../../assets/SwiperPaginationPrimitive.css';/* empty css */
2
+ import '../../../assets/SwiperCarousel.css';/* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import o from "../../packages/components/lib/components/carousel/SwiperCarousel.vue.js";
2
- import '../../assets/SwiperCarousel.css';import '../../assets/SwiperPaginationPrimitive.css';/* empty css */
2
+ import '../../assets/SwiperCarousel2.css';import '../../assets/SwiperCarousel.css';/* empty css */
3
3
  /* empty css */
4
4
  import r from "../../_virtual/_plugin-vue_export-helper.js";
5
5
  const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f8f3d52a"]]);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { default as P } from "./packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js";
2
2
  import { default as S } from "./packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js";
3
- import './assets/BaseCard.css';import './assets/SwiperSlideImagePrimitive.css';import './assets/SwiperPaginationPrimitive.css';import './assets/BaseSnackbar.css';import './assets/BaseModal.css';import './assets/BaseDropDown.css';import './assets/BaseBadge.css';import './assets/ClearableAutocomplete.css';import './assets/BaseAutocomplete.css';import './assets/BaseAlert.css';import './assets/AccessibleSelect.css';import './assets/RadioButtonItem.css';import './assets/BaseTabsIndicator.css';import './assets/BaseTabs.css';import './assets/CheckboxBtn.css';import './assets/BaseAccordionItem.css';/* empty css */
3
+ import './assets/BaseCard.css';import './assets/SwiperSlideImagePrimitive.css';import './assets/SwiperCarousel.css';import './assets/BaseSnackbar.css';import './assets/BaseModal.css';import './assets/BaseDropDown.css';import './assets/BaseBadge.css';import './assets/ClearableAutocomplete.css';import './assets/BaseAutocomplete.css';import './assets/BaseAlert.css';import './assets/AccessibleSelect.css';import './assets/RadioButtonItem.css';import './assets/BaseTabsIndicator.css';import './assets/BaseTabs.css';import './assets/CheckboxBtn.css';import './assets/BaseAccordionItem.css';/* empty css */
4
4
  import { default as I } from "./packages/components/lib/UIKit/Accordion/AccordionItemPrimitive.vue.js";
5
5
  import { default as h } from "./packages/components/lib/UIKit/Accordion/AccordionHeaderPrimitive.vue.js";
6
6
  import { default as w } from "./packages/components/lib/UIKit/Accordion/AccordionTriggerPrimitive.vue.js";
@@ -1,6 +1,6 @@
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({
1
+ import { defineComponent as O, shallowRef as i, provide as a, onBeforeMount as h, onBeforeUnmount as y, createElementBlock as k, renderSlot as c, openBlock as B, normalizeClass as g } from "vue";
2
+ import { ObserverOnceKey as p, ObserverKey as w, VisibleTargetsKey as E } from "../../../../../../components/IntersectionObserver/v2/types.js";
3
+ const S = /* @__PURE__ */ O({
4
4
  __name: "IntersectionObserverProvider",
5
5
  props: {
6
6
  observeOnce: { type: Boolean, default: !0 },
@@ -8,39 +8,38 @@ const $ = /* @__PURE__ */ d({
8
8
  threshold: { default: 0 }
9
9
  },
10
10
  emits: ["intersection"],
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));
11
+ setup(r, { emit: u }) {
12
+ const v = u, n = i(/* @__PURE__ */ new Set()), e = i(), d = (t) => {
13
+ r.skip || t.forEach(({ target: o, isIntersecting: m }) => {
14
+ const s = o.getAttribute("target-id");
15
+ if (!s) return;
16
+ const l = new Set(n.value);
17
+ m ? (l.add(s), v("intersection"), r.observeOnce && f(o)) : l.delete(s), n.value = l;
15
18
  });
16
- }, f = (r) => {
17
- e.value && e.value.unobserve(r);
19
+ }, f = (t) => {
20
+ e.value && e.value.unobserve(t);
18
21
  }, b = () => {
19
22
  e.value && e.value.disconnect();
20
23
  };
21
- return t(B, s.observeOnce), t(p, e), t(V, o), m(() => {
22
- e.value = new IntersectionObserver(c, {
24
+ return a(p, r.observeOnce), a(w, e), a(E, n), h(() => {
25
+ e.value = new IntersectionObserver(d, {
23
26
  root: null,
24
27
  //if the root is null, then we will check if the target is visible in the doc root!
25
- threshold: s.threshold
28
+ threshold: r.threshold
26
29
  });
27
- }), O(() => {
30
+ }), y(() => {
28
31
  b();
29
- }), (r, n) => s.observeOnce ? a(r.$slots, "default", {
32
+ }), (t, o) => r.observeOnce ? c(t.$slots, "default", {
30
33
  key: 1,
31
- observer: e.value,
32
- isVisible: o.value
33
- }) : (y(), h("div", {
34
+ observer: e.value
35
+ }) : (B(), k("div", {
34
36
  key: 0,
35
- class: k(r.$attrs["root-classes"])
37
+ class: g(t.$attrs["root-classes"])
36
38
  }, [
37
- a(r.$slots, "default", {
38
- observer: e.value,
39
- isVisible: o.value
40
- })
39
+ c(t.$slots, "default", { observer: e.value })
41
40
  ], 2));
42
41
  }
43
42
  });
44
43
  export {
45
- $ as default
44
+ S as default
46
45
  };
@@ -1,19 +1,24 @@
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 "../../../../../../components/IntersectionObserver/v2/types.js";
3
- const K = /* @__PURE__ */ i({
1
+ import { defineComponent as v, useTemplateRef as c, useId as d, inject as o, computed as f, onMounted as b, createElementBlock as m, renderSlot as n, unref as a, openBlock as p } from "vue";
2
+ import { ObserverOnceKey as _, ObserverKey as y, VisibleTargetsKey as g } from "../../../../../../components/IntersectionObserver/v2/types.js";
3
+ const k = ["target-id"], K = /* @__PURE__ */ v({
4
4
  __name: "IntersectionObserverTarget",
5
- setup(y) {
6
- const e = c("root"), l = r(m, void 0), s = r(p, void 0), a = r(b, void 0);
7
- return u(() => {
8
- !s?.value || !e.value || s?.value.observe(e.value);
9
- }), (o, _) => !n(l) || !n(a) ? (f(), v("div", {
5
+ setup(O) {
6
+ const e = c("root"), s = d(), l = o(_, void 0), r = o(y, void 0), u = o(g, void 0), t = f(
7
+ () => (e.value ? u?.value.has(s) : !1) || !1
8
+ );
9
+ return b(() => {
10
+ !r?.value || !e.value || r?.value.observe(e.value);
11
+ }), (i, T) => !a(l) || !t.value ? (p(), m("div", {
10
12
  key: 0,
11
13
  ref_key: "root",
12
14
  ref: e,
13
- class: d(o.$attrs["root-classes"])
15
+ "target-id": a(s)
14
16
  }, [
15
- t(o.$slots, "default")
16
- ], 2)) : t(o.$slots, "default", { key: 1 });
17
+ n(i.$slots, "default", { isVisible: t.value })
18
+ ], 8, k)) : n(i.$slots, "default", {
19
+ key: 1,
20
+ isVisible: t.value
21
+ });
17
22
  }
18
23
  });
19
24
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.5.6-alpha.6",
3
+ "version": "2.5.6-alpha.7",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1 +0,0 @@
1
- .swiper-pagination-bullet{--swiper-pagination-color: #ccc}.swiper-pagination-bullet-active{--swiper-pagination-color: #fff}