feat(mantine): upgrade @mantine/core and @mantine/hooks to v9.0.2#2655
feat(mantine): upgrade @mantine/core and @mantine/hooks to v9.0.2#2655nperez0111 wants to merge 2 commits intomainfrom
Conversation
Upgrades the @blocknote/mantine peer dependencies from Mantine v8 to v9 following the official 8.x → 9.x migration guide. - Bump @mantine/core, @mantine/hooks to ^9.0.2 across all packages, examples, playground, docs, tests/nextjs-test-app and the example template in dev-scripts - Drop unused @mantine/utils v6 dependency - Fix Loader ref-type regression: v9's Mantine Loader renders as an <svg>, so wrap it in a forwarded <div> in SuggestionMenuLoader and GridSuggestionMenuLoader to preserve the HTMLDivElement ref contract - Update template vite to ^8.0.3 / @vitejs/plugin-react to ^6.0.1 so regenerated examples no longer downgrade vite on gen:examples Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (28)
✅ Files skipped from review due to trivial changes (25)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughUpdated Mantine packages across examples, playground, templates, and package manifests to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 15
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/package.json`:
- Around line 42-43: Update the docs package dependency for "@mantine/core" to
match the bumped hooks version: change the "@mantine/core" entry in
docs/package.json from "^8.3.11" to "^9.0.2" so both "@mantine/core" and
"@mantine/hooks" use Mantine v9 and avoid peer dependency/version mismatch with
"@blocknote/mantine".
In
`@examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json`:
- Around line 19-20: The package.json currently mixes Mantine major versions:
"@mantine/hooks" is bumped to ^9.0.2 while "@mantine/core" remains ^8.3.11;
update the "@mantine/core" dependency to the matching Mantine v9 range (e.g.,
^9.0.0 or ^9.0.2 to match "@mantine/hooks"), then reinstall dependencies and run
the example build/test to ensure no breaking API changes; adjust any
import/usage in the example code if v9 API differences surface (look for usages
in the example referencing Mantine components/hooks).
In `@examples/06-custom-schema/01-alert-block/package.json`:
- Around line 19-20: Update the mismatched Mantine dependency in package.json by
bumping "@mantine/core" to the same major version as "@mantine/hooks" (v9) so
both dependencies align; locate the entries for "@mantine/core" and
"@mantine/hooks" and change the "@mantine/core" version from "^8.3.11" to the
matching "^9.0.x" range consistent with the PR (ensuring compatibility with
`@blocknote/mantine`).
In `@examples/06-custom-schema/04-pdf-file-block/package.json`:
- Around line 19-20: The package.json currently pins "@mantine/hooks" to
"^9.0.2" but leaves "@mantine/core" at "^8.3.11"; update the dependency entry
for "@mantine/core" to "^9.0.2" so core and hooks versions match (this prevents
duplicate packages/type/runtime mismatches with `@blocknote/mantine` v9). Locate
the "@mantine/core" string in package.json and change its version value to
"^9.0.2", then run install and quick type/build check to ensure no other
mismatches remain.
In `@examples/06-custom-schema/05-alert-block-full-ux/package.json`:
- Around line 19-20: The package.json has a Mantine version mismatch:
"@mantine/hooks" is bumped to ^9.0.2 while "@mantine/core" remains at ^8.3.11;
update the "@mantine/core" dependency to a v9-compatible range (e.g., ^9.x) to
match "@mantine/hooks" and the rest of the PR (and ensure compatibility with
"@blocknote/mantine" which peers on Mantine v9), then run install/lockfile
update to verify no peer conflicts.
In `@examples/07-collaboration/05-comments/package.json`:
- Around line 19-20: Update package.json so Mantine major versions are
consistent: change the `@mantine/core` dependency from ^8.3.11 to ^9.0.2 to match
`@mantine/hooks`. Edit the dependencies entry for "@mantine/core" in package.json
so both "@mantine/core" and "@mantine/hooks" use ^9.0.2.
In `@examples/07-collaboration/06-comments-with-sidebar/package.json`:
- Around line 19-20: Update the Mantine dependency versions so they use the same
major release: change "@mantine/core" to the v9 series to match "@mantine/hooks"
(e.g., set "@mantine/core": "^9.0.0" or the same careted version as
"@mantine/hooks"), ensuring both "@mantine/core" and "@mantine/hooks" are on
major version 9 to avoid incompatible hook/core APIs and peer dependency
warnings (also re-run install to verify no peer conflicts with
"@blocknote/mantine").
In `@examples/09-ai/01-minimal/package.json`:
- Around line 19-20: Update the mismatched Mantine dependency versions: change
the "@mantine/core" entry to the same version used for "@mantine/hooks" (bump
"@mantine/core" from "^8.3.11" to "^9.0.2") so both "@mantine/core" and
"@mantine/hooks" are on v9 and match the rest of the PR and peer deps; locate
and edit the package.json dependencies section where the "@mantine/core" and
"@mantine/hooks" keys appear and make the version numbers consistent.
In `@examples/09-ai/02-playground/package.json`:
- Around line 19-20: The package.json shows a Mantine version mismatch: update
"@mantine/core" to the same major version as "@mantine/hooks" (e.g., "^9.0.2")
to avoid peer dependency/runtime issues; ensure any other Mantine packages in
package.json share the same major version, then reinstall (npm/yarn/pnpm) and
commit the updated lockfile so the project dependencies are consistent.
In `@examples/09-ai/03-custom-ai-menu-items/package.json`:
- Around line 19-20: Multiple example package.json files have a mismatched
Mantine major version ( "@mantine/core": "^8.3.11" vs "@mantine/hooks": "^9.0.2"
) due to examples not being regenerated from the updated template; run the repo
script gen:examples to regenerate all examples (or manually update the 26
affected package.json files) so both dependencies are aligned to Mantine v9,
ensuring the template package.json.template.tsx changes are propagated; verify
updates by checking each example's package.json for matching major versions of
`@mantine/core` and `@mantine/hooks` and commit the regenerated files.
In `@examples/09-ai/04-with-collaboration/package.json`:
- Line 20: The package.json has mismatched Mantine versions: "@mantine/core" is
at v8 while "@mantine/hooks" is at v9; update the dependency entry for
"@mantine/core" to the v9 version to match "@mantine/hooks" (align both
"@mantine/core" and "@mantine/hooks" to v9) so the Mantine core and hooks
versions are consistent across the project.
In `@examples/09-ai/05-manual-execution/package.json`:
- Around line 19-20: The package.json has a Mantine major-version mismatch: keep
`@mantine/core` in sync with `@mantine/hooks` by updating the "@mantine/core"
dependency from "^8.3.11" to a matching major (e.g., "^9.0.2"), then reinstall
to update lockfile; ensure both "@mantine/core" and "@mantine/hooks" have the
same major version to avoid peer dependency/runtime issues.
In `@examples/09-ai/06-client-side-transport/package.json`:
- Around line 19-20: The package.json in this example has a Mantine version
mismatch: "@mantine/core" is still "^8.3.11" while "@mantine/hooks" is "^9.0.2";
update "@mantine/core" to "^9.0.2" so both Mantine packages share the same major
version required by `@blocknote/mantine` and other examples, ensuring
compatibility; locate the dependency entries for "@mantine/core" and
"@mantine/hooks" in package.json and change the core version to "^9.0.2", then
reinstall/update lockfile.
In `@examples/09-ai/07-server-persistence/package.json`:
- Line 20: The package.json shows a Mantine major-version mismatch:
"@mantine/hooks" is v9 while "@mantine/core" remains v8; update the
"@mantine/core" dependency to the matching v9 major (e.g., "^9.x") so both
packages use Mantine v9. Search other example package.json files that reference
"@mantine/core" and "@mantine/hooks" (e.g., examples under examples/09-ai/* and
the listed examples) and apply the same change to keep versions consistent
across the repo.
In `@packages/mantine/package.json`:
- Around line 82-87: The peerDependencies change in package.json narrows React
to "^19.2.0" and `@mantine/core` to "^9.0.2", which drops React 18 and will warn
for Mantine 9.0.0/9.0.1 users; update the release notes/changelog to explicitly
state the new minimum React requirement (React 19.2+) and rationale, and
consider loosening the `@mantine/core` peer range (e.g., to "^9.0.0") unless a
9.0.2-specific fix is required—locate the peerDeps block in package.json (keys:
"peerDependencies", "@mantine/core", "react") and either adjust the version
range or add a clear changelog entry describing the breaking peer change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: de39c271-697b-48e7-bea4-daceafcec430
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (94)
docs/package.jsonexamples/01-basic/01-minimal/package.jsonexamples/01-basic/02-block-objects/package.jsonexamples/01-basic/03-multi-column/package.jsonexamples/01-basic/04-default-blocks/package.jsonexamples/01-basic/05-removing-default-blocks/package.jsonexamples/01-basic/06-block-manipulation/package.jsonexamples/01-basic/07-selection-blocks/package.jsonexamples/01-basic/08-ariakit/package.jsonexamples/01-basic/09-shadcn/package.jsonexamples/01-basic/10-localization/package.jsonexamples/01-basic/11-custom-placeholder/package.jsonexamples/01-basic/12-multi-editor/package.jsonexamples/01-basic/13-custom-paste-handler/package.jsonexamples/01-basic/14-editor-scrollable/package.jsonexamples/01-basic/15-shadowdom/package.jsonexamples/01-basic/16-read-only-editor/package.jsonexamples/01-basic/testing/package.jsonexamples/02-backend/01-file-uploading/package.jsonexamples/02-backend/02-saving-loading/package.jsonexamples/02-backend/03-s3/package.jsonexamples/02-backend/04-rendering-static-documents/package.jsonexamples/03-ui-components/01-ui-elements-remove/package.jsonexamples/03-ui-components/02-formatting-toolbar-buttons/package.jsonexamples/03-ui-components/03-formatting-toolbar-block-type-items/package.jsonexamples/03-ui-components/04-side-menu-buttons/package.jsonexamples/03-ui-components/05-side-menu-drag-handle-items/package.jsonexamples/03-ui-components/06-suggestion-menus-slash-menu-items/package.jsonexamples/03-ui-components/07-suggestion-menus-slash-menu-component/package.jsonexamples/03-ui-components/08-suggestion-menus-emoji-picker-columns/package.jsonexamples/03-ui-components/09-suggestion-menus-emoji-picker-component/package.jsonexamples/03-ui-components/10-suggestion-menus-grid-mentions/package.jsonexamples/03-ui-components/11-uppy-file-panel/package.jsonexamples/03-ui-components/12-static-formatting-toolbar/package.jsonexamples/03-ui-components/13-custom-ui/package.jsonexamples/03-ui-components/14-experimental-mobile-formatting-toolbar/package.jsonexamples/03-ui-components/15-advanced-tables/package.jsonexamples/03-ui-components/16-link-toolbar-buttons/package.jsonexamples/03-ui-components/17-advanced-tables-2/package.jsonexamples/03-ui-components/18-drag-n-drop/package.jsonexamples/04-theming/01-theming-dom-attributes/package.jsonexamples/04-theming/02-changing-font/package.jsonexamples/04-theming/03-theming-css/package.jsonexamples/04-theming/04-theming-css-variables/package.jsonexamples/04-theming/05-theming-css-variables-code/package.jsonexamples/04-theming/06-code-block/package.jsonexamples/04-theming/07-custom-code-block/package.jsonexamples/05-interoperability/01-converting-blocks-to-html/package.jsonexamples/05-interoperability/02-converting-blocks-from-html/package.jsonexamples/05-interoperability/03-converting-blocks-to-md/package.jsonexamples/05-interoperability/04-converting-blocks-from-md/package.jsonexamples/05-interoperability/05-converting-blocks-to-pdf/package.jsonexamples/05-interoperability/06-converting-blocks-to-docx/package.jsonexamples/05-interoperability/07-converting-blocks-to-odt/package.jsonexamples/05-interoperability/08-converting-blocks-to-react-email/package.jsonexamples/05-interoperability/09-blocks-to-html-static-render/package.jsonexamples/05-interoperability/10-static-html-render/package.jsonexamples/06-custom-schema/01-alert-block/package.jsonexamples/06-custom-schema/02-suggestion-menus-mentions/package.jsonexamples/06-custom-schema/03-font-style/package.jsonexamples/06-custom-schema/04-pdf-file-block/package.jsonexamples/06-custom-schema/05-alert-block-full-ux/package.jsonexamples/06-custom-schema/06-toggleable-blocks/package.jsonexamples/06-custom-schema/07-configuring-blocks/package.jsonexamples/06-custom-schema/draggable-inline-content/package.jsonexamples/06-custom-schema/react-custom-blocks/package.jsonexamples/06-custom-schema/react-custom-inline-content/package.jsonexamples/06-custom-schema/react-custom-styles/package.jsonexamples/07-collaboration/01-partykit/package.jsonexamples/07-collaboration/02-liveblocks/package.jsonexamples/07-collaboration/03-y-sweet/package.jsonexamples/07-collaboration/04-electric-sql/package.jsonexamples/07-collaboration/05-comments/package.jsonexamples/07-collaboration/06-comments-with-sidebar/package.jsonexamples/07-collaboration/07-ghost-writer/package.jsonexamples/07-collaboration/08-forking/package.jsonexamples/08-extensions/01-tiptap-arrow-conversion/package.jsonexamples/09-ai/01-minimal/package.jsonexamples/09-ai/02-playground/package.jsonexamples/09-ai/03-custom-ai-menu-items/package.jsonexamples/09-ai/04-with-collaboration/package.jsonexamples/09-ai/05-manual-execution/package.jsonexamples/09-ai/06-client-side-transport/package.jsonexamples/09-ai/07-server-persistence/package.jsonexamples/vanilla-js/react-vanilla-custom-blocks/package.jsonexamples/vanilla-js/react-vanilla-custom-inline-content/package.jsonexamples/vanilla-js/react-vanilla-custom-styles/package.jsonpackages/dev-scripts/examples/template-react/package.json.template.tsxpackages/mantine/package.jsonpackages/mantine/src/suggestionMenu/SuggestionMenuLoader.tsxpackages/mantine/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsxplayground/package.jsontests/nextjs-test-app/package.jsontests/nextjs-test-app/setup.sh
| "peerDependencies": { | ||
| "@mantine/core": "^8.3.11", | ||
| "@mantine/hooks": "^8.3.11", | ||
| "@mantine/utils": "^6.0.22", | ||
| "react": "^18.0 || ^19.0 || >= 19.0.0-rc", | ||
| "react-dom": "^18.0 || ^19.0 || >= 19.0.0-rc" | ||
| "@mantine/core": "^9.0.2", | ||
| "@mantine/hooks": "^9.0.2", | ||
| "react": "^19.2.0", | ||
| "react-dom": "^19.2.0" | ||
| }, |
There was a problem hiding this comment.
Breaking peer change: React 18 support dropped — ensure it's documented in release notes.
The React peer was broadened previously to cover 18/19; tightening to ^19.2.0 removes React 18 (and React 19.0/19.1) support for @blocknote/mantine consumers. The PR description only highlights the Mantine v8→v9 bump — please also call out the React 19.2+ requirement in the changelog/release notes so downstream users aren't surprised by a peer-dep failure.
Separately, pinning the Mantine peer to ^9.0.2 rather than ^9.0.0 will emit peer-dep warnings for anyone on Mantine 9.0.0/9.0.1 even though they're API-compatible. Consider loosening unless 9.0.2 is specifically required:
♻️ Suggested loosening of peer ranges
"peerDependencies": {
- "@mantine/core": "^9.0.2",
- "@mantine/hooks": "^9.0.2",
- "react": "^19.2.0",
- "react-dom": "^19.2.0"
+ "@mantine/core": "^9.0.0",
+ "@mantine/hooks": "^9.0.0",
+ "react": "^19.2.0",
+ "react-dom": "^19.2.0"
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "peerDependencies": { | |
| "@mantine/core": "^8.3.11", | |
| "@mantine/hooks": "^8.3.11", | |
| "@mantine/utils": "^6.0.22", | |
| "react": "^18.0 || ^19.0 || >= 19.0.0-rc", | |
| "react-dom": "^18.0 || ^19.0 || >= 19.0.0-rc" | |
| "@mantine/core": "^9.0.2", | |
| "@mantine/hooks": "^9.0.2", | |
| "react": "^19.2.0", | |
| "react-dom": "^19.2.0" | |
| }, | |
| "peerDependencies": { | |
| "@mantine/core": "^9.0.0", | |
| "@mantine/hooks": "^9.0.0", | |
| "react": "^19.2.0", | |
| "react-dom": "^19.2.0" | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/mantine/package.json` around lines 82 - 87, The peerDependencies
change in package.json narrows React to "^19.2.0" and `@mantine/core` to "^9.0.2",
which drops React 18 and will warn for Mantine 9.0.0/9.0.1 users; update the
release notes/changelog to explicitly state the new minimum React requirement
(React 19.2+) and rationale, and consider loosening the `@mantine/core` peer range
(e.g., to "^9.0.0") unless a 9.0.2-specific fix is required—locate the peerDeps
block in package.json (keys: "peerDependencies", "@mantine/core", "react") and
either adjust the version range or add a clear changelog entry describing the
breaking peer change.
Several example .bnexample.json files and docs/package.json had pinned @mantine/core to ^8.3.11 as a per-project override, which escaped the prior sweep and left core v8 mixed with hooks v9. This produced peer-dep warnings and broke CI's frozen-lockfile install. Bumps @mantine/core to ^9.0.2 in: - docs/package.json - 13 .bnexample.json files (09-ai/*, 07-collaboration/05-06, 06-custom-schema/01,04,05, 03-ui-components/03) Regenerates affected example package.json files and playground examples.gen.tsx via pnpm gen:examples, and re-syncs pnpm-lock.yaml. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
Summary
Upgrades the
@blocknote/mantinepeer dependencies from Mantine v8 to v9 (stable9.0.2), following the official 8.x → 9.x migration guide.Rationale
Mantine v9 is the current stable line and is required to stay on supported releases (bug fixes, security updates, compatibility with React 19.2+). v8 is no longer receiving non-critical fixes.
Changes
@mantine/coreand@mantine/hooksto^9.0.2acrosspackages/mantine,playground,docs,tests/nextjs-test-app(both the tarballpackage.jsonand thesetup.shheredoc that regenerates it), and all 87 examplepackage.jsonfiles.@mantine/utilsv6 peer dep (Mantine v9 no longer ships it).<MantineLoader>renders an<svg>, which broke the consumer-facingHTMLDivElementref contract.SuggestionMenuLoaderandGridSuggestionMenuLoadernow wrap the Mantine Loader in a forwarded<div>.dev-scriptsexample template so regenerated examplepackage.jsonfiles keepvite ^8.0.3/@vitejs/plugin-react ^6.0.1instead of downgrading ongen:examples.pnpm-lock.yaml.Impact
@blocknote/mantineconsumers on Mantine v8 will need to upgrade to v9 when they pick up this release. No other BlockNote APIs change.<div>around the existing<svg>spinner inside the suggestion menus; no visual diff expected because the className and styles are preserved on the wrapper.Testing
pnpm install— clean (no new unmet peer warnings caused by this change).pnpm run build— all 18 projects build successfully, including@blocknote/mantine.pnpm run test— all suites pass except a known-flakypackages/coreperformance test (performance.test.ts) that times out under CPU contention during parallel test runs; it passes standalone and is not a migration regression.Checklist
🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Bug Fixes