Skip to content

@knitkode/react@3.0.1

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Oct 11:52
· 1 commit to main since this release
28a0bb8

Patch Changes

  • 113cd75 Thanks @kuus! - decodeForm only reads the encoded input names and ignores the plain (honeypot) ones explicitly, instead of relying on decode mangling them. It keeps working with the decode of this release, which leaves non encoded text as it is.

  • f1c0e3a Thanks @kuus! - Fix hooks, components and the calendar:

    • classed keeps the text after the last interpolation, and its ref and event handlers are typed with the element type.
    • createUseMediaQueryWidth supports the "@md" shorthand (same as "@min-md").
    • extendComponent applies its default props on React 19.
    • useMeasure reports the size changes of every instance's element, useFixedOffset computes the offset with the given selector, and both work where ResizeObserver is missing.
    • useSmoothScroll subtracts the fixed offset for numeric targets too, and never scrolls below 0.
    • NoJs swaps no-js for js without breaking the other classes. Its inline script changed: update its hash if a Content-Security-Policy allows it by hash.
    • Meta allows zooming when zoom is set.
    • useFocus returns a tuple and accepts the element type, useInterval accepts a null delay.
    • Calendar: hiding a calendar no longer hides the events of the other ones, the default components no longer pass $ props to the DOM (no more React warnings), multi-day events keep free rows (no more overlaps and duplicate keys), timed events show on their last day, all-day Google events show on the right day in every timezone, events of calendars missing from calendarsMap are shown instead of crashing, and the default navigation title is visible.
    • useCalendar merges the given events with the fetched ones, calls onError for failing calendars, shows the Google calendar names in calendarsMap, switches view from the displayed range, keeps the clicked event on "today" and no longer mutates the given calendars and dates.
  • Updated dependencies [a04e3ff, 113cd75, 89e3ba6, b131ad6]:

    • @knitkode/dom@3.0.1
    • @knitkode/utils@3.0.1