Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 15 Jun 02:39
decc682

2.0.0 (2026-06-15)

⚠ BREAKING CHANGES

  • the render-prop RootState (state.root) now exposes
    all selection values as Temporal.PlainDate instead of the configured
    value format. The format-typed values still flow via
    value/defaultValue/onValueChange; RootState is for rendering
    (e.g. selected?.toLocaleString(locale)). focused/viewing were
    already Temporal. RootState is now non-generic.

Fixes two runtime lies the audit flagged:

  • MonthView built selectedDates/rangeStart/rangeEnd with as any
    (PlainDate behind a format type) and selected as the format value;
    now all are honest PlainDate.
  • WeeksView's MonthViewState shims used {} as RootState, so every
    state.root field read undefined inside WeeksView. Now both the
    WeeksView-root and inner-Grid shims expose a real, populated rootState.

The selection part of rootState is built once in CalendarProvider
(baseRootState, on the calendar state context) and spread by each view,
which adds its own focused/viewing — so MonthView and WeeksView are
identical. selected is the first committed date (the PlainDate behind
the old selected DateValueObject).

Because the date fields are no longer format-typed, RootState and the
~15 leaf component State/Props types that referenced RootState<F> lose
their now-unused <F> generic (the leaf display components become
non-generic). Genuinely format-generic types (Root/MonthView/WeeksView/
CalendarProvider, DateRange, RawValueForFormat) keep F. Removes ~12
as any and 2 {} as RootState casts; format subpaths regenerated.

Adds regression tests: MonthView rootState exposes PlainDate under
format="Date" (was a JS Date); WeeksView shim rootState is populated
(was all undefined).

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

  • fix: add repository field to package.json for npm provenance

The semantic-release publish failed npm provenance validation
("repository.url" is "", expected to match the GitHub repo). Add the
repository (with monorepo directory), homepage, and bugs fields so the
published package's provenance bundle validates.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

Bug Fixes

  • expose honest Temporal values in RootState (remove type lies) (#18) (decc682)