fix(02): wire calendar-controls plugin and Zustand selectors
Bug A — navigation no-op: replace $app.calendarState private-API poking with the official @schedule-x/calendar-controls plugin. CalendarShell creates the plugin once via useState stable initialiser and passes it to ViewToolbar as `controls`. ViewToolbar calls controls.setDate(PlainDate) and controls.setView(id) for all navigation and view-switching. Step size matches the active view: day→±1 day, week→±1 week, month-*→±1 month. Bug B — popover-open calendar flash: replace the unselected useCalendarStore() destructuring in CalendarShell and ViewToolbar with per-field selectors. Neither component now subscribes to openEventId, so popover open/close no longer triggers a re-render that rebuilds the Schedule-X config. - Add @schedule-x/calendar-controls@4.6.0 dependency - Update CalendarShell.test.tsx: add vi.mock for calendar-controls - typecheck, vitest (37/37), build all pass
This commit is contained in:
Generated
+8
@@ -62,6 +62,9 @@ importers:
|
||||
'@schedule-x/calendar':
|
||||
specifier: 4.6.0
|
||||
version: 4.6.0(@preact/signals@2.9.1(preact@10.29.2))(preact@10.29.2)(temporal-polyfill@0.3.2)
|
||||
'@schedule-x/calendar-controls':
|
||||
specifier: 4.6.0
|
||||
version: 4.6.0
|
||||
'@schedule-x/event-modal':
|
||||
specifier: 4.6.0
|
||||
version: 4.6.0(@preact/signals@2.9.1(preact@10.29.2))(preact@10.29.2)
|
||||
@@ -863,6 +866,9 @@ packages:
|
||||
'@rolldown/pluginutils@1.0.1':
|
||||
resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==}
|
||||
|
||||
'@schedule-x/calendar-controls@4.6.0':
|
||||
resolution: {integrity: sha512-+VVmJ4AhZkAqTsz/U6L6mftuohBXSdJ10/HFWoMrO5coaoj0K5MExCdcG7UkFK3ZmoPz03koO0RnqRt5FKyXsg==}
|
||||
|
||||
'@schedule-x/calendar@4.6.0':
|
||||
resolution: {integrity: sha512-8Rf5bUf0DVphJB2BaudtG4IHkw21wgMJiiuk5o+7SIOq6YH4hkVJo+Kk12pWSfp2KTZ9mnnUuLV+szBVhiEPlg==}
|
||||
peerDependencies:
|
||||
@@ -2271,6 +2277,8 @@ snapshots:
|
||||
|
||||
'@rolldown/pluginutils@1.0.1': {}
|
||||
|
||||
'@schedule-x/calendar-controls@4.6.0': {}
|
||||
|
||||
'@schedule-x/calendar@4.6.0(@preact/signals@2.9.1(preact@10.29.2))(preact@10.29.2)(temporal-polyfill@0.3.2)':
|
||||
dependencies:
|
||||
'@preact/signals': 2.9.1(preact@10.29.2)
|
||||
|
||||
Reference in New Issue
Block a user