diff --git a/docs/package.json b/docs/package.json
index 2f0d32ccd9..f3b187a93f 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -140,4 +140,4 @@
"y-partykit": "^0.0.33",
"yjs": "^13.6.27"
}
-}
+}
\ No newline at end of file
diff --git a/examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json b/examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json
index f75f779b5c..7d28e02765 100644
--- a/examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json
+++ b/examples/03-ui-components/03-formatting-toolbar-block-type-items/package.json
@@ -26,4 +26,4 @@
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.4"
}
-}
+}
\ No newline at end of file
diff --git a/examples/06-custom-schema/01-alert-block/package.json b/examples/06-custom-schema/01-alert-block/package.json
index cd052badbc..436274fd5c 100644
--- a/examples/06-custom-schema/01-alert-block/package.json
+++ b/examples/06-custom-schema/01-alert-block/package.json
@@ -26,4 +26,4 @@
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.4"
}
-}
+}
\ No newline at end of file
diff --git a/examples/06-custom-schema/04-pdf-file-block/package.json b/examples/06-custom-schema/04-pdf-file-block/package.json
index 34431972e7..efa4f81848 100644
--- a/examples/06-custom-schema/04-pdf-file-block/package.json
+++ b/examples/06-custom-schema/04-pdf-file-block/package.json
@@ -26,4 +26,4 @@
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.4"
}
-}
+}
\ No newline at end of file
diff --git a/examples/06-custom-schema/05-alert-block-full-ux/package.json b/examples/06-custom-schema/05-alert-block-full-ux/package.json
index 2cdb8ac432..fffb43e270 100644
--- a/examples/06-custom-schema/05-alert-block-full-ux/package.json
+++ b/examples/06-custom-schema/05-alert-block-full-ux/package.json
@@ -26,4 +26,4 @@
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.4"
}
-}
+}
\ No newline at end of file
diff --git a/examples/09-ai/01-minimal/package.json b/examples/09-ai/01-minimal/package.json
index b4305dcf23..78957c9886 100644
--- a/examples/09-ai/01-minimal/package.json
+++ b/examples/09-ai/01-minimal/package.json
@@ -29,4 +29,4 @@
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.4"
}
-}
+}
\ No newline at end of file
diff --git a/examples/09-ai/02-playground/package.json b/examples/09-ai/02-playground/package.json
index ddd11a96cc..3e8f2880cb 100644
--- a/examples/09-ai/02-playground/package.json
+++ b/examples/09-ai/02-playground/package.json
@@ -34,4 +34,4 @@
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.4"
}
-}
+}
\ No newline at end of file
diff --git a/examples/09-ai/03-custom-ai-menu-items/package.json b/examples/09-ai/03-custom-ai-menu-items/package.json
index e3abe3eb84..681aa35934 100644
--- a/examples/09-ai/03-custom-ai-menu-items/package.json
+++ b/examples/09-ai/03-custom-ai-menu-items/package.json
@@ -31,4 +31,4 @@
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.4"
}
-}
+}
\ No newline at end of file
diff --git a/examples/09-ai/04-with-collaboration/package.json b/examples/09-ai/04-with-collaboration/package.json
index 7825bec420..a5dee74797 100644
--- a/examples/09-ai/04-with-collaboration/package.json
+++ b/examples/09-ai/04-with-collaboration/package.json
@@ -31,4 +31,4 @@
"@vitejs/plugin-react": "^4.3.1",
"vite": "^5.3.4"
}
-}
+}
\ No newline at end of file
diff --git a/packages/mantine/src/BlockNoteView.tsx b/packages/mantine/src/BlockNoteView.tsx
index 09948c3ab9..37f40a1728 100644
--- a/packages/mantine/src/BlockNoteView.tsx
+++ b/packages/mantine/src/BlockNoteView.tsx
@@ -10,8 +10,8 @@ import {
useBlockNoteContext,
usePrefersColorScheme,
} from "@blocknote/react";
-import { MantineProvider } from "@mantine/core";
-import React, { useCallback } from "react";
+import { MantineContext, MantineProvider } from "@mantine/core";
+import React, { useCallback, useContext } from "react";
import {
applyBlockNoteCSSVariablesFromTheme,
removeBlockNoteCSSVariables,
@@ -20,11 +20,6 @@ import {
import { components } from "./components.js";
import "./style.css";
-const mantineTheme = {
- // Removes button press effect
- activeClassName: "",
-};
-
export const BlockNoteView = <
BSchema extends BlockSchema,
ISchema extends InlineContentSchema,
@@ -76,6 +71,8 @@ export const BlockNoteView = <
[defaultColorScheme, theme],
);
+ const mantineContext = useContext(MantineContext);
+
const finalTheme =
typeof theme === "string"
? theme
@@ -83,27 +80,34 @@ export const BlockNoteView = <
? defaultColorScheme
: "light";
- return (
+ const view = (
- undefined}
- >
-
-
+
);
+
+ if (mantineContext) {
+ return view;
+ }
+
+ return (
+ undefined}
+ >
+ {view}
+
+ );
};
diff --git a/packages/mantine/src/style.css b/packages/mantine/src/style.css
index c97e713432..8c9c2be3c0 100644
--- a/packages/mantine/src/style.css
+++ b/packages/mantine/src/style.css
@@ -3,6 +3,11 @@
/* Mantine base styles*/
+/* Removes Mantine active styles */
+.bn-mantine .mantine-active:active {
+ transform: none;
+}
+
/* Mantine Badge component base styles */
.bn-mantine .mantine-Badge-root {
background-color: var(--bn-colors-tooltip-background);
@@ -38,7 +43,8 @@
}
/* Mantine Menu component base styles */
-.bn-mantine .mantine-Menu-dropdown {
+.bn-mantine .mantine-Menu-dropdown,
+.bn-mantine .bn-menu-dropdown {
background-color: var(--bn-colors-menu-background);
border: var(--bn-border);
border-radius: var(--bn-border-radius-medium);
diff --git a/playground/src/examples.gen.tsx b/playground/src/examples.gen.tsx
index 2928ad3acf..8fce984f51 100644
--- a/playground/src/examples.gen.tsx
+++ b/playground/src/examples.gen.tsx
@@ -417,7 +417,7 @@
"Custom Schemas"
],
"dependencies": {
- "@mantine/core": "^7.17.3",
+ "@mantine/core": "^8.3.2",
"react-icons": "^5.2.1"
} as any
},
@@ -1142,7 +1142,7 @@
"Slash Menu"
],
"dependencies": {
- "@mantine/core": "^7.17.3",
+ "@mantine/core": "^8.3.2",
"react-icons": "^5.2.1"
} as any
},
@@ -1216,7 +1216,7 @@
"Slash Menu"
],
"dependencies": {
- "@mantine/core": "^7.17.3",
+ "@mantine/core": "^8.3.2",
"react-icons": "^5.2.1"
} as any,
"pro": true
@@ -1245,7 +1245,7 @@
"Slash Menu"
],
"dependencies": {
- "@mantine/core": "^7.17.3",
+ "@mantine/core": "^8.3.2",
"react-icons": "^5.2.1"
} as any
},
@@ -1576,7 +1576,7 @@
],
"dependencies": {
"@blocknote/xl-ai": "latest",
- "@mantine/core": "^7.17.3",
+ "@mantine/core": "^8.3.2",
"ai": "^4.3.15",
"@ai-sdk/groq": "^1.2.9",
"zustand": "^5.0.3"
@@ -1603,7 +1603,7 @@
],
"dependencies": {
"@blocknote/xl-ai": "latest",
- "@mantine/core": "^7.17.3",
+ "@mantine/core": "^8.3.2",
"ai": "^4.3.15",
"@ai-sdk/google": "^1.2.20",
"@ai-sdk/openai": "^1.3.22",
@@ -1635,7 +1635,7 @@
],
"dependencies": {
"@blocknote/xl-ai": "latest",
- "@mantine/core": "^7.17.3",
+ "@mantine/core": "^8.3.2",
"ai": "^4.1.0",
"@ai-sdk/openai": "^1.1.0",
"@ai-sdk/groq": "^1.1.0",
@@ -1664,7 +1664,7 @@
],
"dependencies": {
"@blocknote/xl-ai": "latest",
- "@mantine/core": "^7.17.3",
+ "@mantine/core": "^8.3.2",
"ai": "^4.3.15",
"@ai-sdk/groq": "^1.2.9",
"y-partykit": "^0.0.25",