@bagelink/vue 0.0.893 → 0.0.897

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
- {"version":3,"file":"Carousel.vue.d.ts","sourceRoot":"","sources":["../../src/components/Carousel.vue"],"names":[],"mappings":"AAyYA,iBAAS,IAAI,SAIZ;AAED,iBAAS,IAAI,SAIZ;AAwCD,iBAAS,cAAc;;yBAsEM,GAAG;;;;YACN,GAAG;;;;YACH,GAAG;;;;;WAUf,OAAO,IAA6B;EAEjD;AA6BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAgBnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Carousel.vue.d.ts","sourceRoot":"","sources":["../../src/components/Carousel.vue"],"names":[],"mappings":"AA2ZA,iBAAS,IAAI,SAIZ;AAED,iBAAS,IAAI,SAIZ;AAwCD,iBAAS,cAAc;;yBAsEM,GAAG;;;;YACN,GAAG;;;;YACH,GAAG;;;;;WAUf,OAAO,IAA6B;EAEjD;AA6BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAgBnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
package/dist/index.cjs CHANGED
@@ -597,13 +597,21 @@ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
597
597
  child.addEventListener("click", preventDefaultClick);
598
598
  });
599
599
  }
600
- function updateHeight() {
601
- if (!props2.autoHeight || !bglSlider.value) return;
602
- setTimeout(() => {
603
- const children2 = Array.from(bglSlider.value.children[activeSlideIndex.value].children);
600
+ function calcHeight() {
601
+ if (!bglSlider.value) return;
602
+ try {
603
+ const slide = bglSlider.value.children[activeSlideIndex.value];
604
+ if (!slide) return;
605
+ const children2 = Array.from(slide.children);
604
606
  const totalHeight = children2.reduce((sum, el) => sum + el.clientHeight, 0);
605
607
  yHeight.value = `${totalHeight}px`;
606
- }, 200);
608
+ } catch (error) {
609
+ console.error(error);
610
+ }
611
+ }
612
+ function updateHeight() {
613
+ if (!props2.autoHeight) return;
614
+ setTimeout(calcHeight, 200);
607
615
  }
608
616
  function easeScroll(target, duration = 500) {
609
617
  if (!bglSlider.value || isPressed.value) return;
@@ -739,7 +747,7 @@ const _sfc_main$Q = /* @__PURE__ */ vue.defineComponent({
739
747
  };
740
748
  }
741
749
  });
742
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-ca63f224"]]);
750
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-98e36ac5"]]);
743
751
  function _isPlaceholder(a2) {
744
752
  return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
745
753
  }
package/dist/index.mjs CHANGED
@@ -595,13 +595,21 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
595
595
  child.addEventListener("click", preventDefaultClick);
596
596
  });
597
597
  }
598
- function updateHeight() {
599
- if (!props2.autoHeight || !bglSlider.value) return;
600
- setTimeout(() => {
601
- const children2 = Array.from(bglSlider.value.children[activeSlideIndex.value].children);
598
+ function calcHeight() {
599
+ if (!bglSlider.value) return;
600
+ try {
601
+ const slide = bglSlider.value.children[activeSlideIndex.value];
602
+ if (!slide) return;
603
+ const children2 = Array.from(slide.children);
602
604
  const totalHeight = children2.reduce((sum, el) => sum + el.clientHeight, 0);
603
605
  yHeight.value = `${totalHeight}px`;
604
- }, 200);
606
+ } catch (error) {
607
+ console.error(error);
608
+ }
609
+ }
610
+ function updateHeight() {
611
+ if (!props2.autoHeight) return;
612
+ setTimeout(calcHeight, 200);
605
613
  }
606
614
  function easeScroll(target, duration = 500) {
607
615
  if (!bglSlider.value || isPressed.value) return;
@@ -737,7 +745,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
737
745
  };
738
746
  }
739
747
  });
740
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-ca63f224"]]);
748
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-98e36ac5"]]);
741
749
  function _isPlaceholder(a2) {
742
750
  return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
743
751
  }
package/dist/style.css CHANGED
@@ -350,7 +350,7 @@ display: block;
350
350
  padding: 0;
351
351
  }
352
352
 
353
- .blocker[data-v-ca63f224] {
353
+ .blocker[data-v-98e36ac5] {
354
354
  position: fixed;
355
355
  top: 0;
356
356
  left: 0;
@@ -358,7 +358,7 @@ display: block;
358
358
  height: 100%;
359
359
  z-index: 100;
360
360
  }
361
- .bgl-slider[data-v-ca63f224] {
361
+ .bgl-slider[data-v-98e36ac5] {
362
362
  display: grid;
363
363
  position: relative;
364
364
  /* scroll-behavior: smooth; */
@@ -367,43 +367,43 @@ display: block;
367
367
  /* scroll-snap-type: x mandatory; */
368
368
  overflow-x: hidden;
369
369
  }
370
- .autoHeight[data-v-ca63f224] {
370
+ .autoHeight[data-v-98e36ac5] {
371
371
  transition: height ease 0.7s;
372
372
  }
373
- .bgl-slider.allowScroll[data-v-ca63f224] {
373
+ .bgl-slider.allowScroll[data-v-98e36ac5] {
374
374
  overflow-x: scroll;
375
375
  }
376
- .bgl-slider[data-v-ca63f224] {
376
+ .bgl-slider[data-v-98e36ac5] {
377
377
  grid-auto-columns: calc(100% / var(--item-count) - calc(var(--item-count) - 1) * 1%);
378
378
  gap: 1%;
379
379
  }
380
- .bgl-slider.odd[data-v-ca63f224] {
380
+ .bgl-slider.odd[data-v-98e36ac5] {
381
381
  grid-auto-columns: calc(100% / var(--item-count) - calc(var(--item-count) - 2) * 1%);
382
382
  }
383
- .bgl-slider.slides-1[data-v-ca63f224] {
383
+ .bgl-slider.slides-1[data-v-98e36ac5] {
384
384
  grid-auto-columns: 100%;
385
385
  gap: 0;
386
386
  }
387
- .bgl-slider[data-v-ca63f224]::-webkit-scrollbar {
387
+ .bgl-slider[data-v-98e36ac5]::-webkit-scrollbar {
388
388
  display: none;
389
389
  }
390
- .bgl-slider[data-v-ca63f224] * {
390
+ .bgl-slider[data-v-98e36ac5] * {
391
391
  scroll-snap-align: start;
392
392
  }
393
- .dragging.bgl-slider[data-v-ca63f224] {
393
+ .dragging.bgl-slider[data-v-98e36ac5] {
394
394
  cursor: grabbing;
395
395
  cursor: -webkit-grabbing;
396
396
  scroll-snap-type: unset;
397
397
  }
398
- .clicking.bgl-slider[data-v-ca63f224] {
398
+ .clicking.bgl-slider[data-v-98e36ac5] {
399
399
  scroll-behavior: unset;
400
400
  }
401
- .dragging.bgl-slider[data-v-ca63f224] * {
401
+ .dragging.bgl-slider[data-v-98e36ac5] * {
402
402
  scroll-snap-align: unset;
403
403
  user-select: none;
404
404
  }
405
405
  @media screen and (max-width: 600px) {
406
- .bgl-slider.slides-1[data-v-ca63f224]> * {
406
+ .bgl-slider.slides-1[data-v-98e36ac5]> * {
407
407
  margin-inline-start: 0%;
408
408
  }
409
409
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.893",
4
+ "version": "0.0.897",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -38,13 +38,22 @@ function disableDrag() {
38
38
  })
39
39
  }
40
40
 
41
- function updateHeight() {
42
- if (!props.autoHeight || !bglSlider) return
43
- setTimeout(() => {
44
- const children = Array.from(bglSlider.children[activeSlideIndex].children)
41
+ function calcHeight() {
42
+ if (!bglSlider) return
43
+ try {
44
+ const slide = bglSlider.children[activeSlideIndex]
45
+ if (!slide) return
46
+ const children = Array.from(slide.children)
45
47
  const totalHeight = children.reduce((sum, el) => sum + el.clientHeight, 0)
46
48
  yHeight = `${totalHeight}px`
47
- }, 200)
49
+ } catch (error) {
50
+ console.error(error)
51
+ }
52
+ }
53
+
54
+ function updateHeight() {
55
+ if (!props.autoHeight) return
56
+ setTimeout(calcHeight, 200)
48
57
  }
49
58
 
50
59
  function easeScroll(target: number, duration = 500) {