Skip to content

Release v3.0.0

Choose a tag to compare

@github-actions github-actions released this 16 Aug 13:32
c335d72

Summary

Ships @cratis/components 3.0.0 on PrimeReact 11.1.0. This carries the finished state of #107 forward onto today's main (rather than rebasing its 42 commits through the drift), re-expresses on v11's compositional primitives every workaround that landed on main in the meantime, and closes the two release blockers — the @cratis/arc.react typecheck failure that made the publish job emit nothing, and the packaging defect that made every published subpath unloadable in Node.

Consumers have three things to do: install PrimeReact themselves, import the stylesheets explicitly, and choose a theming path. Source/MIGRATION.md is the guide.

Added

  • @cratis/components/NotificationsToaster, the imperative toast, and toastCommandResult(result) mapping an Arc ICommandResult to the right toast (validation → per-field messages, exceptions → generic, never stack traces)
  • @cratis/components/DisplayTag, Badge, Chip, Skeleton, Avatar, ProgressBar
  • @cratis/components/theme — a license-free Cratis baseline theme (light + dark) that skins every component from the token layer without a PrimeUI key
  • PasswordField, ToggleSwitchField and RatingField for CommandForm
  • Column (with per-column filter menus), StepperPanel and ActionMenubar as Cratis-owned replacements for the primereact modules v11 removed
  • Per-column filter menus, a global search box and a paginator range report on the data tables
  • dismissable and closeAriaLabel on Dialog
  • Source/MIGRATION.md — the consumer upgrade guide

Changed

  • primereact, @primereact/core, @primereact/headless and primeicons are now peer dependencies. Previously primereact was a regular dependency, so an app that also depended on it could resolve two copies — and two copies means two PrimeReactProvider contexts, which makes overlays stack wrongly and pt/unstyled silently not apply, with no error. Apps that carried a resolutions/overrides pin to work around this can delete it (#118)
  • Component CSS now ships through the @cratis/components/styles entry point instead of being imported by each component. Apps must import '@cratis/components/tokens' and import '@cratis/components/styles' explicitly. ./styles also vendors the allotment stylesheet DataPage needs, so that no longer has to be imported separately (#118)
  • Theming is token-based. PrimeReact 11 ships no CSS; primereact/resources/themes/*.css is gone. Supply a @primeuix/themes preset through CratisComponentsProvider (value={{ theme: { preset } }}), use the new license-free baseline theme, or stay unstyled-first
  • The package is ESM-only — the CommonJS build is gone, as PrimeReact 11 is ESM-only
  • Import Column from @cratis/components/DataTables and StepperPanel from @cratis/components/CommandDialog; the authoring model is unchanged
  • Data-table selection reports a DataTableSelectionChangeEvent (event.value unchanged), replacing the removed DataTableSelectionSingleChangeEvent
  • The published-exports check is now a real gate rather than reporting-only, because the failures it was reproducing are fixed (#131, #118)
  • Arc peer range stays >=20.3.1 <22 — Arc 20 and 21 both remain supported (#114)

Fixed

  • DataTableForObservableQuery no longer fails to typecheck against @cratis/arc.react newer than 21.0.2. The publish build is tsc -b && rollup -c && copy-css, so this short-circuited the && and the publish job produced nothing (#135)
  • Every published export subpath now loads in Node — 29 failures across 21 subpaths, 0 across 24. No .css file remains in the JavaScript module graph (#118)

Removed

  • useOverlayZIndex. PrimeReact 11 portals overlay panels to the document body and stacks a later-opened overlay above the dialog it was opened from, so the hook had nothing left to do. Verified rather than assumed, and pinned by a new spec (#117, #115)
  • The CommonJS build
  • The primereact/resources/themes/*.css theming model