Skip to content

Release v2.0.0

Choose a tag to compare

@github-actions github-actions released this 30 May 00:11
d310b0c

Summary

Makes styling in @cratis/components explicit and consumer-controlled. Consumers can use a PrimeReact theme, apply a custom palette on top of a PrimeReact theme, or run fully unstyled with their own pt preset.

Also moves PrimeReact packages to peer dependencies, adds a Cratis provider and token layer, forwards PrimeReact customization props through the wrappers, and updates the documentation around the new setup model.

The token layer is also version-spanning: every --cratis-* token resolves PrimeReact v11 design tokens (@primeuix/themes) first and falls back to v10, so the same build works on PrimeReact 10 and 11 and a 10 → 11 upgrade needs no styling changes. This covers the theming surface only — full PrimeReact 11 component compatibility (prop and pt-slot changes) is a separate follow-up, and the primereact peer stays at ^10.9.0 for now.

Added

  • Added CratisComponentsProvider as the single setup point for PrimeReact global options such as unstyled, pt, ptOptions, locale, ripple, and overlay config.
  • Added a --cratis-* CSS variable token layer for Cratis-owned surfaces, themed out of the box from whichever PrimeReact theme is loaded.
  • Added PrimeReact 10 and 11 compatibility for the token layer — each --cratis-* token resolves the PrimeReact v11 design token (@primeuix/themes) first and falls back to the v10 theme variable, so the same build works across both majors.
  • Added pt, ptOptions, unstyled, and className forwarding on single-widget wrappers.
  • Added per-slot pass-through props on composite wrappers, including dialogPt, tablePt, menubarPt, and paginatorPt.
  • Added root className support on large composites where per-slot forwarding is not practical.
  • Added subpath exports for ObjectContentEditor, ObjectNavigationalBar, SchemaEditor, and tokens.
  • Added Styling documentation for using a PrimeReact theme, applying a custom palette, using fully unstyled mode, combining styling setups, Cratis tokens, and PrimeReact pass-through props.
  • Added a migration guide covering peer dependency changes, visual changes, provider setup, and optional styling capabilities.
  • Added a Storybook Styling toolbar with previews for Lara Dark Blue, Lara Light Blue, Custom palette, Unstyled bare, and Unstyled + Tailwind pt.
  • Added sideEffects: ["**/*.css"] so bundlers can tree-shake unused JS while preserving CSS imports.

Changed

  • Changed primereact and primeicons from runtime dependencies to peer dependencies; consumers must declare them directly after upgrading.
  • Changed pixi.js, framer-motion, and allotment to optional peer dependencies so consumers only install them when using the matching components.
  • Changed FormElement addon styling to use stable Cratis CSS classes and --cratis-* tokens instead of PrimeReact p-inputgroup-addon classes.
  • Changed ObjectNavigationalBar and SchemaEditor bottom borders to render through Cratis CSS instead of PrimeFlex utility classes.
  • Changed internal PrimeReact class hooks such as p-button-text, p-button-sm, p-button-danger, and p-error to typed PrimeReact props or Cratis token-driven styling.
  • Changed the README styling section to describe consumer setup choices instead of internal styling terminology.
  • Changed public component JSDoc to document Arc integration, wrapper behavior, and the exposed PrimeReact customization surface.
  • Changed workspace dependency declarations by removing unused dev dependencies, deduplicating Storybook, and moving @cratis/arc.vite to dev dependencies.

Fixed

  • Fixed the @cratis/components/CommandStepper subpath export so it resolves to the emitted build output.
  • Fixed the documented subpath list by removing @cratis/components/EventModeling, which never existed.
  • Fixed the README pass-through description so it accurately distinguishes single-widget wrappers, multi-slot composites, and large composites.
  • Fixed FormElement documentation that described props the component never had.

Removed

  • Removed unused runtime dependencies on react-router-dom and usehooks-ts.
  • Removed the obsolete Storybook 8 @storybook/addon-storysource registration from the Storybook 10 setup.