@bimetal/calendar-svelte-components 0.32.0 → 0.34.0

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.
@@ -102,9 +102,14 @@
102
102
  const bound = untrack(() => controller !== undefined);
103
103
  const ctrl: CalendarController = controller ?? binding!.ctrl;
104
104
 
105
- // Snapshot is a `$state` refreshed on subscribe — one path for BOUND and
106
- // STANDALONE alike (both `ctrl.subscribe`/`getSnapshot` off the same contract).
107
- let snapshot = $state<CalendarControllerSnapshot>(untrack(() => ctrl.getSnapshot()));
105
+ // Snapshot is `$state.raw` refreshed on subscribe — one path for BOUND and STANDALONE
106
+ // alike (both `ctrl.subscribe`/`getSnapshot` off the same contract). MUST be `.raw`, NOT
107
+ // deep `$state`: the snapshot is an externally-owned, identity-stable value replaced
108
+ // WHOLESALE on each notify — never deep-mutated. Deep `$state` would proxy it and mint a
109
+ // FRESH proxy for every `snapshot.events[i]` on every notify, so unchanged events would
110
+ // get new refs and re-render EVERY event leaf (breaks the v0.30 per-leaf isolation:
111
+ // 1 event change ⇒ 1 leaf render). `.raw` passes the controller's stable refs through.
112
+ let snapshot = $state.raw<CalendarControllerSnapshot>(untrack(() => ctrl.getSnapshot()));
108
113
  onMount(() => {
109
114
  snapshot = ctrl.getSnapshot();
110
115
  return ctrl.subscribe(() => (snapshot = ctrl.getSnapshot()));
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.svelte.d.ts","sourceRoot":"","sources":["../../src/components/Calendar.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAQ5D,OAAO,KAAK,EACQ,mBAAmB,EAAE,oBAAoB,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EACrG,kBAAkB,EACnB,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B;6EACyE;IACzE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC,CAAC;AA8NJ,QAAA,MAAM,QAAQ,sDAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -23,7 +23,7 @@
23
23
  const config = getCalendarConfig();
24
24
  const eventTypeLabels = config.locale.historyEventTypes;
25
25
 
26
- const formatTime = (timestamp: number): string => formatHistoryTimestamp(timestamp, config.locale.code);
26
+ const formatTime = (timestamp: number): string => formatHistoryTimestamp(timestamp, config.locale.code, config.core.timezone);
27
27
 
28
28
  function getSummary(event: DomainEvent): string {
29
29
  const payload = event.payload as Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bimetal/calendar-svelte-components",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "Default Svelte 5 calendar UI components",
5
5
  "type": "module",
6
6
  "svelte": "./dist/index.js",
@@ -27,14 +27,14 @@
27
27
  "prepublishOnly": "npm run build"
28
28
  },
29
29
  "dependencies": {
30
- "@bimetal/svelte": "^0.32.0",
31
- "@bimetal/core": "^0.32.0",
32
- "@bimetal/calendar-core": "^0.32.0",
33
- "@bimetal/calendar-data": "^0.32.0",
34
- "@bimetal/calendar-headless": "^0.32.0",
35
- "@bimetal/a11y-dom": "^0.32.0",
36
- "@bimetal/calendar-rules": "^0.32.0",
37
- "@bimetal/calendar-themes": "^0.32.0"
30
+ "@bimetal/svelte": "^0.34.0",
31
+ "@bimetal/core": "^0.34.0",
32
+ "@bimetal/calendar-core": "^0.34.0",
33
+ "@bimetal/calendar-data": "^0.34.0",
34
+ "@bimetal/calendar-headless": "^0.34.0",
35
+ "@bimetal/a11y-dom": "^0.34.0",
36
+ "@bimetal/calendar-rules": "^0.34.0",
37
+ "@bimetal/calendar-themes": "^0.34.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "svelte": "^5.46.4"