@event-calendar/core 4.3.0 → 4.3.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/README.md CHANGED
@@ -227,8 +227,8 @@ This bundle contains a version of the calendar that includes all plugins and is
227
227
 
228
228
  The first step is to include the following lines of code in the `<head>` section of your page:
229
229
  ```html
230
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.3.0/dist/event-calendar.min.css">
231
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.3.0/dist/event-calendar.min.js"></script>
230
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.3.1/dist/event-calendar.min.css">
231
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@4.3.1/dist/event-calendar.min.js"></script>
232
232
  ```
233
233
 
234
234
  <details>
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v4.3.0
2
+ * EventCalendar v4.3.1
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  .ec {
@@ -733,7 +733,6 @@
733
733
  border-top: var(--ec-now-indicator-color) solid 2px;
734
734
  }
735
735
  .ec-timeline .ec-now-indicator {
736
- height: 100%;
737
736
  border-left: var(--ec-now-indicator-color) solid 2px;
738
737
  will-change: transform;
739
738
  }
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v4.3.0
2
+ * EventCalendar v4.3.1
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  import { tick, getContext, untrack, setContext, onMount, mount, unmount } from "svelte";
@@ -299,13 +299,14 @@ function ancestor(el, up) {
299
299
  function height(el) {
300
300
  return rect(el).height;
301
301
  }
302
- function getElementWithPayload(x, y, root2 = document) {
302
+ function getElementWithPayload(x, y, root2 = document, processed = []) {
303
+ processed.push(root2);
303
304
  for (let el of root2.elementsFromPoint(x, y)) {
304
305
  if (hasPayload(el)) {
305
306
  return el;
306
307
  }
307
- if (el.shadowRoot && el.shadowRoot !== root2) {
308
- let shadowEl = getElementWithPayload(x, y, el.shadowRoot);
308
+ if (el.shadowRoot && !processed.includes(el.shadowRoot)) {
309
+ let shadowEl = getElementWithPayload(x, y, el.shadowRoot, processed);
309
310
  if (shadowEl) {
310
311
  return shadowEl;
311
312
  }
@@ -1240,12 +1241,12 @@ function filterOpts(opts, state) {
1240
1241
  function validKey(key, state) {
1241
1242
  return state.hasOwnProperty(key) && key[0] !== "_";
1242
1243
  }
1243
- var root_2$7 = $.template(`<h2></h2>`);
1244
- var root_4$3 = $.template(`<button><i></i></button>`);
1245
- var root_6$1 = $.template(`<button><i></i></button>`);
1246
- var root_8$1 = $.template(`<button> </button>`);
1247
- var root_10$1 = $.template(`<button></button>`);
1248
- var root_12$1 = $.template(`<button> </button>`);
1244
+ var root_2$7 = $.from_html(`<h2></h2>`);
1245
+ var root_4$3 = $.from_html(`<button><i></i></button>`);
1246
+ var root_6$1 = $.from_html(`<button><i></i></button>`);
1247
+ var root_8$1 = $.from_html(`<button> </button>`);
1248
+ var root_10$1 = $.from_html(`<button></button>`);
1249
+ var root_12$1 = $.from_html(`<button> </button>`);
1249
1250
  function Buttons($$anchor, $$props) {
1250
1251
  $.push($$props, false);
1251
1252
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -1464,9 +1465,9 @@ function Buttons($$anchor, $$props) {
1464
1465
  $.pop();
1465
1466
  $$cleanup();
1466
1467
  }
1467
- var root_3$5 = $.template(`<div><!></div>`);
1468
- var root_1$d = $.template(`<div></div>`);
1469
- var root$r = $.template(`<nav></nav>`);
1468
+ var root_3$5 = $.from_html(`<div><!></div>`);
1469
+ var root_1$d = $.from_html(`<div></div>`);
1470
+ var root$r = $.from_html(`<nav></nav>`);
1470
1471
  function Toolbar($$anchor, $$props) {
1471
1472
  $.push($$props, true);
1472
1473
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -1600,7 +1601,7 @@ function Auxiliary$1($$anchor, $$props) {
1600
1601
  $.pop();
1601
1602
  $$cleanup();
1602
1603
  }
1603
- var root$q = $.template(`<div><!> <!></div> <!>`, 1);
1604
+ var root$q = $.from_html(`<div><!> <!></div> <!>`, 1);
1604
1605
  function Calendar($$anchor, $$props) {
1605
1606
  $.push($$props, true);
1606
1607
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -1772,8 +1773,8 @@ function days(state) {
1772
1773
  return days2;
1773
1774
  });
1774
1775
  }
1775
- var root_1$c = $.template(`<div role="columnheader"><span></span></div>`);
1776
- var root$p = $.template(`<div><div role="row"></div> <div></div></div>`);
1776
+ var root_1$c = $.from_html(`<div role="columnheader"><span></span></div>`);
1777
+ var root$p = $.from_html(`<div><div role="row"></div> <div></div></div>`);
1777
1778
  function Header$1($$anchor, $$props) {
1778
1779
  $.push($$props, false);
1779
1780
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -1823,8 +1824,8 @@ function Header$1($$anchor, $$props) {
1823
1824
  $.pop();
1824
1825
  $$cleanup();
1825
1826
  }
1826
- var root_1$b = $.template(`<div></div>`);
1827
- var root$o = $.template(`<article><!></article>`);
1827
+ var root_1$b = $.from_html(`<div></div>`);
1828
+ var root$o = $.from_html(`<article><!></article>`);
1828
1829
  function BaseEvent($$anchor, $$props) {
1829
1830
  $.push($$props, true);
1830
1831
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -1871,7 +1872,7 @@ function BaseEvent($$anchor, $$props) {
1871
1872
  bgEvent($.get(display)) ? $theme().bgEvent : $theme().event,
1872
1873
  ...createEventClasses($eventClassNames(), $.get(event), $_view())
1873
1874
  ]).join(" "));
1874
- let $$d = $.derived(() => createEventContent($$props.chunk, $displayEventEnd(), $eventContent(), $theme(), $_intlEventTime(), $_view())), timeText = $.derived(() => $.get($$d)[0]), content = $.derived(() => $.get($$d)[1]);
1875
+ let $$d = $.derived(() => createEventContent($$props.chunk, $displayEventEnd(), $eventContent(), $theme(), $_intlEventTime(), $_view())), $$array = $.derived(() => $.to_array($.get($$d), 2)), timeText = $.derived(() => $.get($$array)[0]), content = $.derived(() => $.get($$array)[1]);
1875
1876
  onMount(() => {
1876
1877
  if (isFunction($eventDidMount())) {
1877
1878
  $eventDidMount()({
@@ -2141,7 +2142,7 @@ function Event$4($$anchor, $$props) {
2141
2142
  $$cleanup();
2142
2143
  return $$pop;
2143
2144
  }
2144
- var root$n = $.template(`<div><div><time></time> <a role="button" tabindex="0">&times;</a></div> <div></div></div>`);
2145
+ var root$n = $.from_html(`<div><div><time></time> <a role="button" tabindex="0">&times;</a></div> <div></div></div>`);
2145
2146
  function Popup($$anchor, $$props) {
2146
2147
  $.push($$props, true);
2147
2148
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -2268,12 +2269,12 @@ function Popup($$anchor, $$props) {
2268
2269
  $$cleanup();
2269
2270
  }
2270
2271
  $.delegate(["pointerdown", "click", "keydown"]);
2271
- var root_1$a = $.template(`<span></span>`);
2272
- var root_5$1 = $.template(`<div><!></div>`);
2273
- var root_6 = $.template(`<div><!></div>`);
2274
- var root_4$2 = $.template(`<!> <!>`, 1);
2275
- var root_10 = $.template(`<a role="button" tabindex="0" aria-haspopup="true"></a>`);
2276
- var root$m = $.template(`<div role="cell"><div><time></time> <!></div> <div><!></div> <!> <div><!></div> <!> <div><!></div></div>`);
2272
+ var root_1$a = $.from_html(`<span></span>`);
2273
+ var root_5$1 = $.from_html(`<div><!></div>`);
2274
+ var root_6 = $.from_html(`<div><!></div>`);
2275
+ var root_4$2 = $.from_html(`<!> <!>`, 1);
2276
+ var root_10 = $.from_html(`<a role="button" tabindex="0" aria-haspopup="true"></a>`);
2277
+ var root$m = $.from_html(`<div role="cell"><div><time></time> <!></div> <div><!></div> <!> <div><!></div> <!> <div><!></div></div>`);
2277
2278
  function Day$4($$anchor, $$props) {
2278
2279
  $.push($$props, true);
2279
2280
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -2570,7 +2571,7 @@ function Day$4($$anchor, $$props) {
2570
2571
  return $$pop;
2571
2572
  }
2572
2573
  $.delegate(["pointerdown", "click", "keydown"]);
2573
- var root$l = $.template(`<div role="row"></div>`);
2574
+ var root$l = $.from_html(`<div role="row"></div>`);
2574
2575
  function Week$1($$anchor, $$props) {
2575
2576
  $.push($$props, true);
2576
2577
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -2611,7 +2612,7 @@ function Week$1($$anchor, $$props) {
2611
2612
  prepareEventChunks$1(bgChunks2, $hiddenDays());
2612
2613
  let longChunks2 = prepareEventChunks$1(chunks2, $hiddenDays());
2613
2614
  return [chunks2, bgChunks2, longChunks2];
2614
- }), chunks = $.derived(() => $.get($$d)[0]), bgChunks = $.derived(() => $.get($$d)[1]), longChunks = $.derived(() => $.get($$d)[2]);
2615
+ }), $$array = $.derived(() => $.to_array($.get($$d), 3)), chunks = $.derived(() => $.get($$array)[0]), bgChunks = $.derived(() => $.get($$array)[1]), longChunks = $.derived(() => $.get($$array)[2]);
2615
2616
  let iChunks = $.derived(() => $_iEvents().map((event) => {
2616
2617
  let chunk;
2617
2618
  if (event && eventIntersects(event, $.get(start), $.get(end))) {
@@ -2660,7 +2661,7 @@ function Week$1($$anchor, $$props) {
2660
2661
  $$cleanup();
2661
2662
  return $$pop;
2662
2663
  }
2663
- var root$k = $.template(`<div><div></div></div>`);
2664
+ var root$k = $.from_html(`<div><div></div></div>`);
2664
2665
  function Body$3($$anchor, $$props) {
2665
2666
  $.push($$props, true);
2666
2667
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -2735,7 +2736,7 @@ function Body$3($$anchor, $$props) {
2735
2736
  $.pop();
2736
2737
  $$cleanup();
2737
2738
  }
2738
- var root$j = $.template(`<!> <!>`, 1);
2739
+ var root$j = $.from_html(`<!> <!>`, 1);
2739
2740
  function View$4($$anchor) {
2740
2741
  var fragment = root$j();
2741
2742
  var node = $.first_child(fragment);
@@ -3487,9 +3488,9 @@ function Pointer($$anchor, $$props) {
3487
3488
  $$cleanup();
3488
3489
  return $$pop;
3489
3490
  }
3490
- var root_1$9 = $.template(`<div></div>`);
3491
- var root_2$6 = $.template(`<div></div>`);
3492
- var root$i = $.template(`<!> <!> <!>`, 1);
3491
+ var root_1$9 = $.from_html(`<div></div>`);
3492
+ var root_2$6 = $.from_html(`<div></div>`);
3493
+ var root$i = $.from_html(`<!> <!> <!>`, 1);
3493
3494
  function Resizer($$anchor, $$props) {
3494
3495
  $.push($$props, true);
3495
3496
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -3555,7 +3556,7 @@ function Resizer($$anchor, $$props) {
3555
3556
  $$cleanup();
3556
3557
  }
3557
3558
  $.delegate(["pointerdown"]);
3558
- var root$h = $.template(`<!> <!>`, 1);
3559
+ var root$h = $.from_html(`<!> <!>`, 1);
3559
3560
  function Auxiliary($$anchor, $$props) {
3560
3561
  $.push($$props, true);
3561
3562
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -3663,7 +3664,7 @@ const index$3 = {
3663
3664
  state._auxiliary.update(($_auxiliary) => [...$_auxiliary, Auxiliary]);
3664
3665
  }
3665
3666
  };
3666
- var root_1$8 = $.template(`<div></div> <!>`, 1);
3667
+ var root_1$8 = $.from_html(`<div></div> <!>`, 1);
3667
3668
  function Event$3($$anchor, $$props) {
3668
3669
  $.push($$props, true);
3669
3670
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -3709,7 +3710,7 @@ function Event$3($$anchor, $$props) {
3709
3710
  $.pop();
3710
3711
  $$cleanup();
3711
3712
  }
3712
- var root_1$7 = $.template(`<div role="listitem"><h4><time></time> <time></time></h4> <!></div>`);
3713
+ var root_1$7 = $.from_html(`<div role="listitem"><h4><time></time> <time></time></h4> <!></div>`);
3713
3714
  function Day$3($$anchor, $$props) {
3714
3715
  $.push($$props, true);
3715
3716
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -3825,8 +3826,8 @@ function onclick$1(jsEvent, $noEventsClick, noEventsClick, $_view, _view) {
3825
3826
  });
3826
3827
  }
3827
3828
  }
3828
- var root_1$6 = $.template(`<div></div>`);
3829
- var root$g = $.template(`<div><div><!></div></div>`);
3829
+ var root_1$6 = $.from_html(`<div></div>`);
3830
+ var root$g = $.from_html(`<div><div><!></div></div>`);
3830
3831
  function Body$2($$anchor, $$props) {
3831
3832
  $.push($$props, true);
3832
3833
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -4015,8 +4016,8 @@ function createAllDayContent(allDayContent) {
4015
4016
  }
4016
4017
  return content;
4017
4018
  }
4018
- var root_1$5 = $.template(`<time></time>`);
4019
- var root$f = $.template(`<div><div></div> <!></div> <div role="row"><div><!></div> <!></div>`, 1);
4019
+ var root_1$5 = $.from_html(`<time></time>`);
4020
+ var root$f = $.from_html(`<div><div></div> <!></div> <div role="row"><div><!></div> <!></div>`, 1);
4020
4021
  function Section($$anchor, $$props) {
4021
4022
  $.push($$props, true);
4022
4023
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -4085,8 +4086,8 @@ function Section($$anchor, $$props) {
4085
4086
  $.pop();
4086
4087
  $$cleanup();
4087
4088
  }
4088
- var root_2$5 = $.template(`<div></div>`);
4089
- var root$e = $.template(`<div><div><!></div></div>`);
4089
+ var root_2$5 = $.from_html(`<div></div>`);
4090
+ var root$e = $.from_html(`<div><div><!></div></div>`);
4090
4091
  function Body$1($$anchor, $$props) {
4091
4092
  $.push($$props, true);
4092
4093
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -4199,7 +4200,7 @@ function Event$2($$anchor, $$props) {
4199
4200
  $.pop();
4200
4201
  $$cleanup();
4201
4202
  }
4202
- var root$d = $.template(`<div></div>`);
4203
+ var root$d = $.from_html(`<div></div>`);
4203
4204
  function NowIndicator$1($$anchor, $$props) {
4204
4205
  $.push($$props, true);
4205
4206
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -4232,8 +4233,8 @@ function NowIndicator$1($$anchor, $$props) {
4232
4233
  $.pop();
4233
4234
  $$cleanup();
4234
4235
  }
4235
- var root_3$4 = $.template(`<!> <!> <!>`, 1);
4236
- var root$c = $.template(`<div role="cell"><div><!></div> <div><!></div> <div><!></div></div>`);
4236
+ var root_3$4 = $.from_html(`<!> <!> <!>`, 1);
4237
+ var root$c = $.from_html(`<div role="cell"><div><!></div> <div><!></div> <div><!></div></div>`);
4237
4238
  function Day$2($$anchor, $$props) {
4238
4239
  $.push($$props, true);
4239
4240
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -4293,7 +4294,7 @@ function Day$2($$anchor, $$props) {
4293
4294
  }
4294
4295
  groupEventChunks(chunks2);
4295
4296
  return [chunks2, bgChunks2];
4296
- }), chunks = $.derived(() => $.get($$d)[0]), bgChunks = $.derived(() => $.get($$d)[1]);
4297
+ }), $$array = $.derived(() => $.to_array($.get($$d), 2)), chunks = $.derived(() => $.get($$array)[0]), bgChunks = $.derived(() => $.get($$array)[1]);
4297
4298
  let iChunks = $.derived(() => {
4298
4299
  if ($.get(disabled)) {
4299
4300
  return [];
@@ -4468,8 +4469,8 @@ function Event$1($$anchor, $$props) {
4468
4469
  });
4469
4470
  return $.pop({ reposition });
4470
4471
  }
4471
- var root_3$3 = $.template(`<div><!></div>`);
4472
- var root$b = $.template(`<div role="cell"><div><!></div> <!> <div><!></div></div>`);
4472
+ var root_3$3 = $.from_html(`<div><!></div>`);
4473
+ var root$b = $.from_html(`<div role="cell"><div><!></div> <!> <div><!></div></div>`);
4473
4474
  function Day$1($$anchor, $$props) {
4474
4475
  $.push($$props, true);
4475
4476
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -4637,7 +4638,7 @@ function Week($$anchor, $$props) {
4637
4638
  prepareEventChunks$1(bgChunks2, $hiddenDays());
4638
4639
  let longChunks2 = prepareEventChunks$1(chunks2, $hiddenDays());
4639
4640
  return [chunks2, bgChunks2, longChunks2];
4640
- }), chunks = $.derived(() => $.get($$d)[0]), bgChunks = $.derived(() => $.get($$d)[1]), longChunks = $.derived(() => $.get($$d)[2]);
4641
+ }), $$array = $.derived(() => $.to_array($.get($$d), 3)), chunks = $.derived(() => $.get($$array)[0]), bgChunks = $.derived(() => $.get($$array)[1]), longChunks = $.derived(() => $.get($$array)[2]);
4641
4642
  function reposition() {
4642
4643
  runReposition(refs, $$props.dates);
4643
4644
  }
@@ -4689,9 +4690,9 @@ function Week($$anchor, $$props) {
4689
4690
  $.pop();
4690
4691
  $$cleanup();
4691
4692
  }
4692
- var root_2$4 = $.template(`<div role="columnheader"><time></time></div>`);
4693
- var root_3$2 = $.template(`<div><div><!> <div></div></div></div>`);
4694
- var root$a = $.template(`<div><!> <div></div></div> <!> <!>`, 1);
4693
+ var root_2$4 = $.from_html(`<div role="columnheader"><time></time></div>`);
4694
+ var root_3$2 = $.from_html(`<div><div><!> <div></div></div></div>`);
4695
+ var root$a = $.from_html(`<div><!> <div></div></div> <!> <!>`, 1);
4695
4696
  function View$2($$anchor, $$props) {
4696
4697
  $.push($$props, false);
4697
4698
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -4826,7 +4827,7 @@ const TimeGrid = {
4826
4827
  state._times = times(state);
4827
4828
  }
4828
4829
  };
4829
- var root$9 = $.template(`<span></span>`);
4830
+ var root$9 = $.from_html(`<span></span>`);
4830
4831
  function Label$1($$anchor, $$props) {
4831
4832
  $.push($$props, true);
4832
4833
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -4879,17 +4880,17 @@ function Label$1($$anchor, $$props) {
4879
4880
  $.pop();
4880
4881
  $$cleanup();
4881
4882
  }
4882
- var root_3$1 = $.template(`<div><time></time></div>`);
4883
- var root_4$1 = $.template(`<div><!></div>`);
4884
- var root_7 = $.template(`<div role="columnheader"><!></div>`);
4885
- var root_8 = $.template(`<div role="columnheader"><time></time></div>`);
4886
- var root_5 = $.template(`<div></div>`);
4887
- var root_2$3 = $.template(`<div><!> <!></div>`);
4888
- var root_12 = $.template(`<div></div>`);
4889
- var root_15 = $.template(`<div><!></div>`);
4890
- var root_9 = $.template(`<div><div><!> <div></div></div></div>`);
4891
- var root_17 = $.template(`<div></div>`);
4892
- var root$8 = $.template(`<div><!> <div></div></div> <!> <!>`, 1);
4883
+ var root_3$1 = $.from_html(`<div><time></time></div>`);
4884
+ var root_4$1 = $.from_html(`<div><!></div>`);
4885
+ var root_7 = $.from_html(`<div role="columnheader"><!></div>`);
4886
+ var root_8 = $.from_html(`<div role="columnheader"><time></time></div>`);
4887
+ var root_5 = $.from_html(`<div></div>`);
4888
+ var root_2$3 = $.from_html(`<div><!> <!></div>`);
4889
+ var root_12 = $.from_html(`<div></div>`);
4890
+ var root_15 = $.from_html(`<div><!></div>`);
4891
+ var root_9 = $.from_html(`<div><div><!> <div></div></div></div>`);
4892
+ var root_17 = $.from_html(`<div></div>`);
4893
+ var root$8 = $.from_html(`<div><!> <div></div></div> <!> <!>`, 1);
4893
4894
  function View$1($$anchor, $$props) {
4894
4895
  $.push($$props, true);
4895
4896
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -5209,7 +5210,7 @@ function dayTimes(state) {
5209
5210
  function nestedResources(state) {
5210
5211
  return derived(state.resources, ($resources) => $resources.some((resource) => getPayload(resource).children.length));
5211
5212
  }
5212
- var root$7 = $.template(`<span></span>`);
5213
+ var root$7 = $.from_html(`<span></span>`);
5213
5214
  function Label($$anchor, $$props) {
5214
5215
  $.push($$props, true);
5215
5216
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -5250,9 +5251,9 @@ function onclick(_, expanded, payload, toggle, resources) {
5250
5251
  toggle($.get(payload).children, $.get(expanded));
5251
5252
  resources.update(identity);
5252
5253
  }
5253
- var root_1$4 = $.template(`<span></span>`);
5254
- var root_2$2 = $.template(`<button><!></button>`);
5255
- var root$6 = $.template(`<!> <span><!></span>`, 1);
5254
+ var root_1$4 = $.from_html(`<span></span>`);
5255
+ var root_2$2 = $.from_html(`<button><!></button>`);
5256
+ var root$6 = $.from_html(`<!> <span><!></span>`, 1);
5256
5257
  function Expander($$anchor, $$props) {
5257
5258
  $.push($$props, true);
5258
5259
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -5323,8 +5324,8 @@ function Expander($$anchor, $$props) {
5323
5324
  $$cleanup();
5324
5325
  }
5325
5326
  $.delegate(["click"]);
5326
- var root_1$3 = $.template(`<div role="rowheader"><!> <!></div>`);
5327
- var root$5 = $.template(`<div><div></div> <div></div></div>`);
5327
+ var root_1$3 = $.from_html(`<div role="rowheader"><!> <!></div>`);
5328
+ var root$5 = $.from_html(`<div><div></div> <div></div></div>`);
5328
5329
  function Sidebar($$anchor, $$props) {
5329
5330
  $.push($$props, false);
5330
5331
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -5399,11 +5400,11 @@ function Sidebar($$anchor, $$props) {
5399
5400
  $.pop();
5400
5401
  $$cleanup();
5401
5402
  }
5402
- var root_3 = $.template(`<div role="columnheader"><time></time></div>`);
5403
- var root_2$1 = $.template(`<div><time></time></div> <div></div>`, 1);
5404
- var root_4 = $.template(`<div role="columnheader"><time></time></div>`);
5405
- var root_1$2 = $.template(`<div><!></div>`);
5406
- var root$4 = $.template(`<div><div role="row"></div> <div></div></div>`);
5403
+ var root_3 = $.from_html(`<div role="columnheader"><time></time></div>`);
5404
+ var root_2$1 = $.from_html(`<div><time></time></div> <div></div>`, 1);
5405
+ var root_4 = $.from_html(`<div role="columnheader"><time></time></div>`);
5406
+ var root_1$2 = $.from_html(`<div><!></div>`);
5407
+ var root$4 = $.from_html(`<div><div role="row"></div> <div></div></div>`);
5407
5408
  function Header($$anchor, $$props) {
5408
5409
  $.push($$props, false);
5409
5410
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -5702,8 +5703,8 @@ function Event($$anchor, $$props) {
5702
5703
  $$cleanup();
5703
5704
  return $$pop;
5704
5705
  }
5705
- var root_1$1 = $.template(`<!> <!> <!> <!>`, 1);
5706
- var root$3 = $.template(`<div role="cell"><div><!></div></div>`);
5706
+ var root_1$1 = $.from_html(`<!> <!> <!> <!>`, 1);
5707
+ var root$3 = $.from_html(`<div role="cell"><div><!></div></div>`);
5707
5708
  function Day($$anchor, $$props) {
5708
5709
  $.push($$props, true);
5709
5710
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -5853,7 +5854,7 @@ function Day($$anchor, $$props) {
5853
5854
  return $$pop;
5854
5855
  }
5855
5856
  $.delegate(["pointerdown"]);
5856
- var root$2 = $.template(`<div role="row"></div>`);
5857
+ var root$2 = $.from_html(`<div role="row"></div>`);
5857
5858
  function Days($$anchor, $$props) {
5858
5859
  $.push($$props, true);
5859
5860
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -5889,7 +5890,7 @@ function Days($$anchor, $$props) {
5889
5890
  addDay(end2);
5890
5891
  }
5891
5892
  return [start2, end2];
5892
- }), start = $.derived(() => $.get($$d)[0]), end = $.derived(() => $.get($$d)[1]);
5893
+ }), $$array = $.derived(() => $.to_array($.get($$d), 2)), start = $.derived(() => $.get($$array)[0]), end = $.derived(() => $.get($$array)[1]);
5893
5894
  let $$d_1 = $.derived(() => {
5894
5895
  let chunks2 = [];
5895
5896
  let bgChunks2 = [];
@@ -5907,7 +5908,7 @@ function Days($$anchor, $$props) {
5907
5908
  [bgChunks2] = prepareEventChunks(bgChunks2, $_viewDates(), $_dayTimeLimits(), $slotDuration());
5908
5909
  [chunks2, longChunks2] = prepareEventChunks(chunks2, $_viewDates(), $_dayTimeLimits(), $slotDuration());
5909
5910
  return [chunks2, bgChunks2, longChunks2];
5910
- }), chunks = $.derived(() => $.get($$d_1)[0]), bgChunks = $.derived(() => $.get($$d_1)[1]), longChunks = $.derived(() => $.get($$d_1)[2]);
5911
+ }), $$array_3 = $.derived(() => $.to_array($.get($$d_1), 3)), chunks = $.derived(() => $.get($$array_3)[0]), bgChunks = $.derived(() => $.get($$array_3)[1]), longChunks = $.derived(() => $.get($$array_3)[2]);
5911
5912
  let iChunks = $.derived(() => $_iEvents().map((event) => {
5912
5913
  let chunk;
5913
5914
  if (event && eventIntersects(event, $.get(start), $.get(end), $$props.resource)) {
@@ -5964,8 +5965,8 @@ function Days($$anchor, $$props) {
5964
5965
  $$cleanup();
5965
5966
  return $$pop;
5966
5967
  }
5967
- var root_2 = $.template(`<div></div>`);
5968
- var root$1 = $.template(`<div><div><div></div> <!></div></div>`);
5968
+ var root_2 = $.from_html(`<div></div>`);
5969
+ var root$1 = $.from_html(`<div><div><div></div> <!></div></div>`);
5969
5970
  function Body($$anchor, $$props) {
5970
5971
  $.push($$props, true);
5971
5972
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -6073,7 +6074,7 @@ function Body($$anchor, $$props) {
6073
6074
  $.pop();
6074
6075
  $$cleanup();
6075
6076
  }
6076
- var root_1 = $.template(`<div></div>`);
6077
+ var root_1 = $.from_html(`<div></div>`);
6077
6078
  function NowIndicator($$anchor, $$props) {
6078
6079
  $.push($$props, true);
6079
6080
  const [$$stores, $$cleanup] = $.setup_stores();
@@ -6145,7 +6146,7 @@ function NowIndicator($$anchor, $$props) {
6145
6146
  $.pop();
6146
6147
  $$cleanup();
6147
6148
  }
6148
- var root = $.template(`<div><!> <div><!> <!> <!></div></div>`);
6149
+ var root = $.from_html(`<div><!> <div><!> <!> <!></div></div>`);
6149
6150
  function View($$anchor, $$props) {
6150
6151
  $.push($$props, false);
6151
6152
  const [$$stores, $$cleanup] = $.setup_stores();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event-calendar/core",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "title": "Event Calendar Core package",
5
5
  "description": "Full-sized drag & drop event calendar with resource & timeline views",
6
6
  "keywords": [
@@ -32,6 +32,6 @@
32
32
  "#components": "./src/lib/components/index.js"
33
33
  },
34
34
  "dependencies": {
35
- "svelte": "^5.28.6"
35
+ "svelte": "^5.33.14"
36
36
  }
37
37
  }
package/src/lib/dom.js CHANGED
@@ -35,14 +35,15 @@ export function height(el) {
35
35
  return rect(el).height;
36
36
  }
37
37
 
38
- export function getElementWithPayload(x, y, root = document) {
38
+ export function getElementWithPayload(x, y, root = document, processed = []) {
39
+ processed.push(root);
39
40
  for (let el of root.elementsFromPoint(x, y)) {
40
41
  if (hasPayload(el)) {
41
42
  return el;
42
43
  }
43
44
  /** @see https://github.com/vkurko/calendar/issues/142 */
44
- if (el.shadowRoot && el.shadowRoot !== root) {
45
- let shadowEl = getElementWithPayload(x, y, el.shadowRoot);
45
+ if (el.shadowRoot && !processed.includes(el.shadowRoot)) {
46
+ let shadowEl = getElementWithPayload(x, y, el.shadowRoot, processed);
46
47
  if (shadowEl) {
47
48
  return shadowEl;
48
49
  }
@@ -503,7 +503,6 @@
503
503
  border-top: var(--ec-now-indicator-color) solid 2px;
504
504
  }
505
505
  .ec-timeline & {
506
- height: 100%;
507
506
  border-left: var(--ec-now-indicator-color) solid 2px;
508
507
  will-change: transform;
509
508
  }