@event-calendar/core 5.6.0 → 5.6.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
@@ -260,8 +260,8 @@ This bundle contains a version of the calendar that includes all plugins and is
260
260
 
261
261
  The first step is to include the following lines of code in the `<head>` section of your page:
262
262
  ```html
263
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.6.0/dist/event-calendar.min.css">
264
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.6.0/dist/event-calendar.min.js"></script>
263
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.6.1/dist/event-calendar.min.css">
264
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.6.1/dist/event-calendar.min.js"></script>
265
265
  ```
266
266
 
267
267
  <details>
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v5.6.0
2
+ * EventCalendar v5.6.1
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.6.0
2
+ * EventCalendar v5.6.1
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  import { getAbortSignal, getContext, mount, onMount, setContext, tick, unmount, untrack } from "svelte";
@@ -4119,10 +4119,10 @@ function Label($$anchor, $$props) {
4119
4119
  $.user_effect(() => {
4120
4120
  $.get(content);
4121
4121
  untrack(() => {
4122
- if (date()) $.set(ariaLabel, $.get(intlDayHeaderAL).format(date()) + ", " + $.get(el).innerText);
4122
+ if (date()) tick().then(() => $.set(ariaLabel, $.get(intlDayHeaderAL).format(date()) + ", " + $.get(el).innerText));
4123
4123
  else if (setLabel()) {
4124
4124
  $.set(ariaLabel, void 0);
4125
- setLabel()($.get(el).innerText);
4125
+ tick().then(() => setLabel()($.get(el).innerText));
4126
4126
  }
4127
4127
  });
4128
4128
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event-calendar/core",
3
- "version": "5.6.0",
3
+ "version": "5.6.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.55.0"
35
+ "svelte": "^5.55.2"
36
36
  }
37
37
  }
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import {getContext, onMount, untrack} from 'svelte';
2
+ import {getContext, onMount, tick, untrack} from 'svelte';
3
3
  import {contentFrom, toLocalDate, isFunction} from '#lib';
4
4
 
5
5
  let {resource, date = undefined, setLabel = undefined} = $props();
@@ -25,11 +25,12 @@
25
25
  $effect(() => {
26
26
  content;
27
27
  untrack(() => {
28
+ // Accessing innerText after tick significantly improves performance
28
29
  if (date) {
29
- ariaLabel = intlDayHeaderAL.format(date) + ', ' + el.innerText;
30
+ tick().then(() => ariaLabel = intlDayHeaderAL.format(date) + ', ' + el.innerText);
30
31
  } else if (setLabel) {
31
32
  ariaLabel = undefined;
32
- setLabel(el.innerText);
33
+ tick().then(() => setLabel(el.innerText));
33
34
  }
34
35
  });
35
36
  });