@event-calendar/core 5.0.5 → 5.0.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.
package/README.md CHANGED
@@ -245,8 +245,8 @@ This bundle contains a version of the calendar that includes all plugins and is
245
245
 
246
246
  The first step is to include the following lines of code in the `<head>` section of your page:
247
247
  ```html
248
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.0.4/dist/event-calendar.min.css">
249
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.0.4/dist/event-calendar.min.js"></script>
248
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.0.6/dist/event-calendar.min.css">
249
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.0.6/dist/event-calendar.min.js"></script>
250
250
  ```
251
251
 
252
252
  <details>
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v5.0.5
2
+ * EventCalendar v5.0.6
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  .ec {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v5.0.5
2
+ * EventCalendar v5.0.6
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  import { tick, getContext, untrack, setContext, onMount, mount, unmount } from "svelte";
@@ -2510,9 +2510,6 @@ function View$3($$anchor, $$props) {
2510
2510
  start: prevClosestDay(start, $firstDay()),
2511
2511
  end: nextClosestDay(end, $firstDay())
2512
2512
  }));
2513
- return () => {
2514
- $.store_set(_activeRangeExt, identity);
2515
- };
2516
2513
  });
2517
2514
  let refs = [];
2518
2515
  function reposition() {
@@ -3680,6 +3677,7 @@ function View$2($$anchor, $$props) {
3680
3677
  const $theme = () => $.store_get(theme, "$theme", $$stores);
3681
3678
  const [$$stores, $$cleanup] = $.setup_stores();
3682
3679
  let {
3680
+ _activeRangeExt,
3683
3681
  _mainEl,
3684
3682
  _filteredEvents,
3685
3683
  _view,
@@ -3688,6 +3686,9 @@ function View$2($$anchor, $$props) {
3688
3686
  noEventsContent,
3689
3687
  theme
3690
3688
  } = getContext("state");
3689
+ $.user_pre_effect(() => {
3690
+ $.store_set(_activeRangeExt, identity);
3691
+ });
3691
3692
  let noEvents = $.derived(() => {
3692
3693
  let noEvents2 = true;
3693
3694
  if ($_viewDates().length) {
@@ -4359,9 +4360,6 @@ function View$1($$anchor, $$props) {
4359
4360
  }
4360
4361
  return { start, end };
4361
4362
  });
4362
- return () => {
4363
- $.store_set(_activeRangeExt, identity);
4364
- };
4365
4363
  });
4366
4364
  $.user_effect(() => {
4367
4365
  $_viewDates();
@@ -5388,9 +5386,6 @@ function View($$anchor, $$props) {
5388
5386
  }
5389
5387
  return { start, end };
5390
5388
  });
5391
- return () => {
5392
- $.store_set(_activeRangeExt, identity);
5393
- };
5394
5389
  });
5395
5390
  $.user_effect(() => {
5396
5391
  $_viewDates();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event-calendar/core",
3
- "version": "5.0.5",
3
+ "version": "5.0.6",
4
4
  "title": "Event Calendar Core package",
5
5
  "description": "Full-sized drag & drop event calendar with resource & timeline views",
6
6
  "keywords": [
@@ -20,9 +20,6 @@
20
20
  start: prevClosestDay(start, $firstDay),
21
21
  end: nextClosestDay(end, $firstDay)
22
22
  });
23
- return () => {
24
- $_activeRangeExt = identity;
25
- };
26
23
  });
27
24
 
28
25
  // Events reposition
@@ -1,9 +1,13 @@
1
1
  <script>
2
2
  import {getContext} from 'svelte';
3
- import {addDay, cloneDate, toViewWithLocalDates, contentFrom, bgEvent, isFunction} from '#lib';
3
+ import {addDay, cloneDate, identity, contentFrom, bgEvent, isFunction, toViewWithLocalDates} from '#lib';
4
4
  import Day from './Day.svelte';
5
5
 
6
- let {_mainEl, _filteredEvents, _view, _viewDates, noEventsClick, noEventsContent, theme} = getContext('state');
6
+ let {_activeRangeExt, _mainEl, _filteredEvents, _view, _viewDates, noEventsClick, noEventsContent, theme} = getContext('state');
7
+
8
+ $effect.pre(() => {
9
+ $_activeRangeExt = identity;
10
+ });
7
11
 
8
12
  let noEvents = $derived.by(() => {
9
13
  let noEvents = true;
@@ -33,9 +33,6 @@
33
33
  }
34
34
  return {start, end};
35
35
  };
36
- return () => {
37
- $_activeRangeExt = identity;
38
- };
39
36
  });
40
37
 
41
38
  // Handle scrollTime
@@ -1,8 +1,7 @@
1
1
  <script>
2
2
  import {getContext, tick} from 'svelte';
3
3
  import {
4
- addDuration, cloneDate, contentFrom, DAY_IN_SECONDS, identity, resizeObserver, runReposition, subtractDay,
5
- toSeconds
4
+ addDuration, cloneDate, contentFrom, DAY_IN_SECONDS, resizeObserver, runReposition, subtractDay, toSeconds
6
5
  } from '#lib';
7
6
  import {createAllDayContent, createGrid, createEventChunks, createIEventChunks} from './lib.js';
8
7
  import {ColHead, DayHeader} from '#components';
@@ -35,9 +34,6 @@
35
34
  }
36
35
  return {start, end};
37
36
  };
38
- return () => {
39
- $_activeRangeExt = identity;
40
- };
41
37
  });
42
38
 
43
39
  // Handle scrollTime