@blocknote/ariakit 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/blocknote-ariakit.cjs +1 -1
- package/dist/blocknote-ariakit.cjs.map +1 -1
- package/dist/blocknote-ariakit.js +177 -174
- package/dist/blocknote-ariakit.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +3 -3
- package/src/BlockNoteView.tsx +4 -6
- package/src/comments/Editor.tsx +4 -0
- package/types/src/BlockNoteView.d.ts +2 -2
package/src/BlockNoteView.tsx
CHANGED
|
@@ -4,11 +4,7 @@ import {
|
|
|
4
4
|
mergeCSSClasses,
|
|
5
5
|
StyleSchema,
|
|
6
6
|
} from "@blocknote/core";
|
|
7
|
-
import {
|
|
8
|
-
BlockNoteViewProps,
|
|
9
|
-
BlockNoteViewRaw,
|
|
10
|
-
ComponentsContext,
|
|
11
|
-
} from "@blocknote/react";
|
|
7
|
+
import { BlockNoteViewRaw, ComponentsContext } from "@blocknote/react";
|
|
12
8
|
import { components } from "./components.js";
|
|
13
9
|
|
|
14
10
|
export const BlockNoteView = <
|
|
@@ -16,7 +12,9 @@ export const BlockNoteView = <
|
|
|
16
12
|
ISchema extends InlineContentSchema,
|
|
17
13
|
SSchema extends StyleSchema,
|
|
18
14
|
>(
|
|
19
|
-
props:
|
|
15
|
+
props: React.ComponentProps<
|
|
16
|
+
typeof BlockNoteViewRaw<BSchema, ISchema, SSchema>
|
|
17
|
+
>,
|
|
20
18
|
) => {
|
|
21
19
|
const { className, ...rest } = props;
|
|
22
20
|
|
package/src/comments/Editor.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
FormattingToolbar,
|
|
5
5
|
FormattingToolbarController,
|
|
6
6
|
getFormattingToolbarItems,
|
|
7
|
+
useBlockNoteContext,
|
|
7
8
|
} from "@blocknote/react";
|
|
8
9
|
import { forwardRef } from "react";
|
|
9
10
|
import { BlockNoteView } from "../BlockNoteView.js";
|
|
@@ -17,6 +18,8 @@ export const Editor = forwardRef<
|
|
|
17
18
|
|
|
18
19
|
assertEmpty(rest, false);
|
|
19
20
|
|
|
21
|
+
const blockNoteContext = useBlockNoteContext();
|
|
22
|
+
|
|
20
23
|
return (
|
|
21
24
|
<BlockNoteView
|
|
22
25
|
autoFocus={autoFocus}
|
|
@@ -28,6 +31,7 @@ export const Editor = forwardRef<
|
|
|
28
31
|
filePanel={false}
|
|
29
32
|
formattingToolbar={false}
|
|
30
33
|
editable={editable}
|
|
34
|
+
theme={blockNoteContext?.colorSchemePreference}
|
|
31
35
|
ref={ref}
|
|
32
36
|
onFocus={onFocus}
|
|
33
37
|
onBlur={onBlur}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BlockSchema, InlineContentSchema, StyleSchema } from "@blocknote/core";
|
|
2
|
-
import {
|
|
3
|
-
export declare const BlockNoteView: <BSchema extends BlockSchema, ISchema extends InlineContentSchema, SSchema extends StyleSchema>(props:
|
|
2
|
+
import { BlockNoteViewRaw } from "@blocknote/react";
|
|
3
|
+
export declare const BlockNoteView: <BSchema extends BlockSchema, ISchema extends InlineContentSchema, SSchema extends StyleSchema>(props: React.ComponentProps<typeof BlockNoteViewRaw<BSchema, ISchema, SSchema>>) => import("react/jsx-runtime.js").JSX.Element;
|