Move to PrimeReact 11 and @cratis/components 3.0.0 - #18
Merged
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,primeicons8,@primereact/core,@primereact/headless,@primeuix/themesand@primeuix/styledare all under the commercial PrimeUI license, and a license key is required regardless of how you style — the check runs inPrimeReactProvideron mount with no condition onunstyled, ontheme, or onNODE_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.defaultand@cratis/scene.blueprint.componentsnow requireprimereact ^11.0.0,primeicons ^8.0.0and@cratis/components ^3.0.0, and declare@primereact/coreand@primereact/headlesswhere they import them directly.dropdownis nowSelect,calendarisDatePicker,overlayPanelisPopover,tabViewisTabs, and so on.multiSelectis re-expressed overSelect'smultiple;orderListandpickListover@primereact/headlesshooks, which ship the behavior but no presentation.@primeuix/themespresets. A theme is now an object handed toPrimeReactProviderrather than a stylesheet to load, so switching neither fetches nor flashes, and a theme name can no longer 404.usePrimeReactThemereturns the provider configuration instead of mutating the DOM.PrimeReactProvideris now mandatory anywhere Scene components render — PrimeReact 11 throws without it rather than falling back to a default configuration.Added
menubar,megaMenu,tieredMenu,panelMenu,tabMenu,steps,dock,splitButton,confirmDialog,column,treeSelect,blockUI,scrollTopandimage.MenuItemandTreeNodeare exported from@cratis/scene.primereact. PrimeReact 11 removedprimereact/menuitemandprimereact/treenode, and the authored{ label, icon, items }shape was always Scene's vocabulary.Removed
cascadeSelect,inputMask,treeTableandvirtualScrollerare no longer declared. PrimeReact 11 removed all four with no equivalent and no headless hook. Usedropdownwith grouped options ortreeSelectinstead ofcascadeSelect,inputTextwith validation instead ofinputMask,treeordataTableinstead oftreeTable, anddataTable's own scrolling instead ofvirtualScroller.applyPrimeReactThemeandprimeReactThemeStylesheetare gone. They swapped and resolved a compiled theme stylesheet, and PrimeReact 11 has none —primeReactThemePresetresolves a theme name to a preset object instead.saga-blue,vela-blue,arya-blue,bootstrap4-light-blue,bootstrap4-dark-blue,soho-light,soho-dark,viva-light,viva-dark,nano,mira,fluent-lightandtailwind-light.Deprecated
passwordlosesfeedbackandtoggleMask,colorPickerloses its overlay mode,ratinglosescancel,listBoxlosesfilter,multiSelectlosesdisplayandmaxSelectedLabels,carousellosesnumScroll,paginatorlosesrowsPerPageOptions,dataTablelosessize='normal', andcolumnno longer carrieseditor,frozen,footer,colSpanorexpander.Caution
Sidebaris notSidebar. PrimeReact 10'sSidebaris v11'sDrawer, and v11 gives the nameSidebarto an unrelated new app-shell primitive. A name-preserving port compiles cleanly and silently swaps an overlay for a static shell. Both affected sites — thesidebaradapter and the default blueprint's config panel — are onprimereact/drawer.🤖 Generated with Claude Code