Skip to content

Move to PrimeReact 11 and @cratis/components 3.0.0 - #18

Merged
einari merged 3 commits into
mainfrom
feature/primereact-11
Aug 16, 2026
Merged

Move to PrimeReact 11 and @cratis/components 3.0.0#18
einari merged 3 commits into
mainfrom
feature/primereact-11

Conversation

@einari

@einari einari commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

PrimeReact 11 ships 80 modules where 10.9.8 shipped 117, replaces monolithic components with compositional part namespaces, and ships no CSS at all. All four Scene JavaScript packages move together.

Important

PrimeReact 11 is not MIT. primereact, primeicons 8, @primereact/core, @primereact/headless, @primeuix/themes and @primeuix/styled are all under the commercial PrimeUI license, and a license key is required regardless of how you style — the check runs in PrimeReactProvider on mount with no condition on unstyled, on theme, or on NODE_ENV. Without a key, every page logs a warning and shows an "Invalid PrimeUI License" banner in development and production alike. See the migration page.

Changed

  • @cratis/scene.primereact, @cratis/scene.components, @cratis/scene.blueprint.default and @cratis/scene.blueprint.components now require primereact ^11.0.0, primeicons ^8.0.0 and @cratis/components ^3.0.0, and declare @primereact/core and @primereact/headless where they import them directly.
  • 13 abstract names follow a PrimeReact rename without changing their Scene name — dropdown is now Select, calendar is DatePicker, overlayPanel is Popover, tabView is Tabs, and so on.
  • multiSelect is re-expressed over Select's multiple; orderList and pickList over @primereact/headless hooks, which ship the behavior but no presentation.
  • Theming is rebuilt on @primeuix/themes presets. A theme is now an object handed to PrimeReactProvider rather than a stylesheet to load, so switching neither fetches nor flashes, and a theme name can no longer 404. usePrimeReactTheme returns the provider configuration instead of mutating the DOM.
  • The theme catalog is 24 themes across the Aura, Lara, Nora and Material families, replacing the 25 PrimeTek v10 themes. Their license is recorded as PrimeUI Commercial.
  • PrimeReactProvider is now mandatory anywhere Scene components render — PrimeReact 11 throws without it rather than falling back to a default configuration.

Added

  • 14 abstract names whose PrimeReact component was removed in v11 are now backed by Cratis-owned implementations: menubar, megaMenu, tieredMenu, panelMenu, tabMenu, steps, dock, splitButton, confirmDialog, column, treeSelect, blockUI, scrollTop and image.
  • MenuItem and TreeNode are exported from @cratis/scene.primereact. PrimeReact 11 removed primereact/menuitem and primereact/treenode, and the authored { label, icon, items } shape was always Scene's vocabulary.

Removed

  • cascadeSelect, inputMask, treeTable and virtualScroller are no longer declared. PrimeReact 11 removed all four with no equivalent and no headless hook. Use dropdown with grouped options or treeSelect instead of cascadeSelect, inputText with validation instead of inputMask, tree or dataTable instead of treeTable, and dataTable's own scrolling instead of virtualScroller.
  • applyPrimeReactTheme and primeReactThemeStylesheet are gone. They swapped and resolved a compiled theme stylesheet, and PrimeReact 11 has none — primeReactThemePreset resolves a theme name to a preset object instead.
  • 13 v10 themes have no v11 counterpart and are not carried over: saga-blue, vela-blue, arya-blue, bootstrap4-light-blue, bootstrap4-dark-blue, soho-light, soho-dark, viva-light, viva-dark, nano, mira, fluent-light and tailwind-light.

Deprecated

  • Reduced capabilities forced by PrimeReact 11: password loses feedback and toggleMask, colorPicker loses its overlay mode, rating loses cancel, listBox loses filter, multiSelect loses display and maxSelectedLabels, carousel loses numScroll, paginator loses rowsPerPageOptions, dataTable loses size='normal', and column no longer carries editor, frozen, footer, colSpan or expander.

Caution

Sidebar is not Sidebar. PrimeReact 10's Sidebar is v11's Drawer, and v11 gives the name Sidebar to an unrelated new app-shell primitive. A name-preserving port compiles cleanly and silently swaps an overlay for a static shell. Both affected sites — the sidebar adapter and the default blueprint's config panel — are on primereact/drawer.

🤖 Generated with Claude Code

einari and others added 2 commits August 16, 2026 17:16
PrimeReact 11 ships 80 modules where 10.9.8 shipped 117, is compositional
rather than monolithic, and ships no CSS at all. All four consuming packages
have to move together, so this is one change.

- Peer ranges move to primereact ^11.0.0, primeicons ^8.0.0 and
  @cratis/components ^3.0.0, and each package now declares @primereact/core
  and @primereact/headless where it imports them directly. The old ranges are
  what blocked downstream consumers from upgrading.
- 45 abstract names keep their component, 13 follow a rename, 2 are expressed
  over @primereact/headless hooks, and multiSelect is re-expressed over
  Select's `multiple`.
- 14 names lost their component with no equivalent, so the package now owns a
  replacement for each: menubar, megaMenu, tieredMenu, panelMenu, tabMenu,
  steps, dock, splitButton, confirmDialog, column, treeSelect, blockUI,
  scrollTop and image.
- cascadeSelect, inputMask, treeTable and virtualScroller are dropped from the
  manifest and the registry together; v11 removed them with no equivalent and
  no headless hook, and a faithful rebuild of each is a component in its own
  right. The manifest declares 83 names where it declared 87.
- MenuItem and TreeNode are Scene's own types now. primereact/menuitem and
  primereact/treenode are gone, and the authored `{ label, icon, items }` shape
  was always Scene's vocabulary rather than PrimeReact's.
- The theme layer is rebuilt on @primeuix/themes presets. A v10 theme was a
  compiled stylesheet, so switching meant swapping a <link>; a v11 theme is a
  preset object handed to PrimeReactProvider, so applyPrimeReactTheme and
  primeReactThemeStylesheet are gone and usePrimeReactTheme returns a value
  instead of performing a DOM side effect. Nothing is fetched, so a theme can
  no longer 404 or flash unstyled on switch.
- The 25 v10 themes become 24 across the four preset families, with token
  values generated by resolving each preset rather than transcribed by hand.
  Their license is recorded as PrimeUI Commercial, not MIT.
- The Scene token bridge got smaller: v11 emits one systematic --p-* namespace
  where v10 had an ad-hoc vocabulary that could only be learned by reading
  compiled stylesheets.
- Sidebar is Drawer. v11 gives the name Sidebar to a new app-shell primitive,
  so a name-preserving port compiles and silently swaps an overlay for a shell.
  Both sites - the sidebar adapter and the default blueprint's ConfigPanel -
  are on primereact/drawer.
- PrimeReactProvider is mandatory in v11: every component throws without it
  rather than falling back to a default configuration. Four specs and three
  Storybook previews now supply one.
- Removes two build workarounds that Components 3.0.0 made unnecessary: the
  esbuild cssMinify override, and the vitest deps.inline entry for the CSS
  that no longer sits in the JavaScript module graph.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
primereact-11-migration.md described the port as something that would happen
one day and told readers to keep importing from primereact/* only. It is now
the record: what each of the 87 imported modules became, and what was built,
converted or dropped for each of the 20 names that lost their component.

- theme-reference.md's attribution table matches the 24 themes actually
  shipped, and states the PrimeUI Commercial license rather than MIT. It also
  names the 13 v10 themes with no v11 counterpart, so a reader looking for
  soho-dark finds out it is gone rather than assuming a typo.
- component-reference.md is generated from the adapters' own imports, followed
  one level into a sibling component, so the "backed by" column cannot drift
  from what the code does.
- switch-themes-live.md drops the <link id="theme-link"> mechanism, which has
  nothing left to swap, and shows the provider-based wiring instead.
- Records that PrimeReact 11 is not MIT and that a license key is required
  regardless of styling path, because the check runs on provider mount with no
  condition on unstyled, theme or NODE_ENV.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@einari einari added major screen Screen/UI work: Screenplay UI constructs, Scene runtime, Stage rendering, Studio designers labels Aug 16, 2026
PrimeReact renamed one severity between v10 and v11 - `warning` became `warn` -
and the rename is silent in the worst way: the v11 prop types are string-literal
unions, so an unchanged `warning` arriving through `stringProperty` does not fail
to compile. It falls through to the default color, and a screen authored against
the old vocabulary loses its warning styling with nothing reporting a problem.

Six adapters were translating it inline, two of them repeating the same
component-prop union as a cast. `severityProperty` puts the translation with the
other property readers, which is the promise that file already makes: a property
is narrowed in exactly one place, so an unrecognized value behaves like an absent
one everywhere rather than like a broken one.

`PrimeSeverity` is a union rather than an enum, deliberately. The value goes
straight to props whose own types are string-literal unions, and a TypeScript
string enum member is not assignable to a string literal - an enum would buy
discoverability at the cost of a cast at every call site. Tag and Badge narrow
further because v11 gives neither a `help` variant.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@einari
einari merged commit 8897e80 into main Aug 16, 2026
2 checks passed
@einari
einari deleted the feature/primereact-11 branch August 16, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major screen Screen/UI work: Screenplay UI constructs, Scene runtime, Stage rendering, Studio designers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant