@blocknote/mantine 0.13.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.
Files changed (54) hide show
  1. package/LICENSE +373 -0
  2. package/dist/blocknote-mantine.js +1532 -0
  3. package/dist/blocknote-mantine.js.map +1 -0
  4. package/dist/blocknote-mantine.umd.cjs +28 -0
  5. package/dist/blocknote-mantine.umd.cjs.map +1 -0
  6. package/dist/style.css +1 -0
  7. package/dist/webpack-stats.json +1 -0
  8. package/package.json +88 -0
  9. package/src/BlockNoteTheme.ts +153 -0
  10. package/src/defaultThemes.ts +159 -0
  11. package/src/form/TextInput.tsx +44 -0
  12. package/src/index.tsx +172 -0
  13. package/src/mantineStyles.css +138 -0
  14. package/src/menu/Menu.tsx +252 -0
  15. package/src/panel/Panel.tsx +50 -0
  16. package/src/panel/PanelButton.tsx +26 -0
  17. package/src/panel/PanelFileInput.tsx +26 -0
  18. package/src/panel/PanelTab.tsx +18 -0
  19. package/src/panel/PanelTextInput.tsx +27 -0
  20. package/src/popover/Popover.tsx +53 -0
  21. package/src/sideMenu/SideMenu.tsx +20 -0
  22. package/src/sideMenu/SideMenuButton.tsx +57 -0
  23. package/src/style.css +490 -0
  24. package/src/suggestionMenu/SuggestionMenu.tsx +25 -0
  25. package/src/suggestionMenu/SuggestionMenuEmptyItem.tsx +22 -0
  26. package/src/suggestionMenu/SuggestionMenuItem.tsx +47 -0
  27. package/src/suggestionMenu/SuggestionMenuLabel.tsx +20 -0
  28. package/src/suggestionMenu/SuggestionMenuLoader.tsx +20 -0
  29. package/src/tableHandle/TableHandle.tsx +37 -0
  30. package/src/toolbar/Toolbar.tsx +36 -0
  31. package/src/toolbar/ToolbarButton.tsx +106 -0
  32. package/src/toolbar/ToolbarSelect.tsx +69 -0
  33. package/types/src/BlockNoteTheme.d.ts +33 -0
  34. package/types/src/defaultThemes.d.ts +143 -0
  35. package/types/src/form/TextInput.d.ts +13 -0
  36. package/types/src/index.d.ts +14 -0
  37. package/types/src/menu/Menu.d.ts +24 -0
  38. package/types/src/panel/Panel.d.ts +12 -0
  39. package/types/src/panel/PanelButton.d.ts +11 -0
  40. package/types/src/panel/PanelFileInput.d.ts +7 -0
  41. package/types/src/panel/PanelTab.d.ts +5 -0
  42. package/types/src/panel/PanelTextInput.d.ts +8 -0
  43. package/types/src/popover/Popover.d.ts +9 -0
  44. package/types/src/sideMenu/SideMenu.d.ts +5 -0
  45. package/types/src/sideMenu/SideMenuButton.d.ts +15 -0
  46. package/types/src/suggestionMenu/SuggestionMenu.d.ts +6 -0
  47. package/types/src/suggestionMenu/SuggestionMenuEmptyItem.d.ts +5 -0
  48. package/types/src/suggestionMenu/SuggestionMenuItem.d.ts +8 -0
  49. package/types/src/suggestionMenu/SuggestionMenuLabel.d.ts +5 -0
  50. package/types/src/suggestionMenu/SuggestionMenuLoader.d.ts +5 -0
  51. package/types/src/tableHandle/TableHandle.d.ts +14 -0
  52. package/types/src/toolbar/Toolbar.d.ts +10 -0
  53. package/types/src/toolbar/ToolbarButton.d.ts +12 -0
  54. package/types/src/toolbar/ToolbarSelect.d.ts +12 -0
@@ -0,0 +1,106 @@
1
+ import * as Mantine from "@mantine/core";
2
+
3
+ import { assertEmpty, isSafari } from "@blocknote/core";
4
+ import { ComponentProps } from "@blocknote/react";
5
+ import { forwardRef } from "react";
6
+
7
+ export const TooltipContent = (props: {
8
+ mainTooltip: string;
9
+ secondaryTooltip?: string;
10
+ }) => (
11
+ <Mantine.Stack gap={0} className={"bn-tooltip"}>
12
+ <Mantine.Text size={"sm"}>{props.mainTooltip}</Mantine.Text>
13
+ {props.secondaryTooltip && (
14
+ <Mantine.Text size={"xs"}>{props.secondaryTooltip}</Mantine.Text>
15
+ )}
16
+ </Mantine.Stack>
17
+ );
18
+
19
+ type ToolbarButtonProps = ComponentProps["FormattingToolbar"]["Button"] &
20
+ ComponentProps["LinkToolbar"]["Button"];
21
+
22
+ /**
23
+ * Helper for basic buttons that show in the formatting toolbar.
24
+ */
25
+ export const ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>(
26
+ (props, ref) => {
27
+ const {
28
+ className,
29
+ children,
30
+ mainTooltip,
31
+ secondaryTooltip,
32
+ icon,
33
+ isSelected,
34
+ isDisabled,
35
+ onClick,
36
+ label,
37
+ ...rest
38
+ } = props;
39
+
40
+ // false, because rest props can be added by mantine when button is used as a trigger
41
+ // assertEmpty in this case is only used at typescript level, not runtime level
42
+ assertEmpty(rest, false);
43
+
44
+ return (
45
+ <Mantine.Tooltip
46
+ withinPortal={false}
47
+ label={
48
+ <TooltipContent
49
+ mainTooltip={mainTooltip}
50
+ secondaryTooltip={secondaryTooltip}
51
+ />
52
+ }>
53
+ {/*Creates an ActionIcon instead of a Button if only an icon is provided as content.*/}
54
+ {children ? (
55
+ <Mantine.Button
56
+ aria-label={label}
57
+ className={className}
58
+ // Needed as Safari doesn't focus button elements on mouse down
59
+ // unlike other browsers.
60
+ onMouseDown={(e) => {
61
+ if (isSafari()) {
62
+ (e.currentTarget as HTMLButtonElement).focus();
63
+ }
64
+ }}
65
+ onClick={onClick}
66
+ aria-pressed={isSelected}
67
+ data-selected={isSelected || undefined}
68
+ data-test={
69
+ mainTooltip.slice(0, 1).toLowerCase() +
70
+ mainTooltip.replace(/\s+/g, "").slice(1)
71
+ }
72
+ size={"xs"}
73
+ disabled={isDisabled || false}
74
+ ref={ref}
75
+ {...rest}>
76
+ {children}
77
+ </Mantine.Button>
78
+ ) : (
79
+ <Mantine.ActionIcon
80
+ className={className}
81
+ aria-label={label}
82
+ // Needed as Safari doesn't focus button elements on mouse down
83
+ // unlike other browsers.
84
+ onMouseDown={(e) => {
85
+ if (isSafari()) {
86
+ (e.currentTarget as HTMLButtonElement).focus();
87
+ }
88
+ }}
89
+ onClick={onClick}
90
+ aria-pressed={isSelected}
91
+ data-selected={isSelected || undefined}
92
+ data-test={
93
+ mainTooltip.slice(0, 1).toLowerCase() +
94
+ mainTooltip.replace(/\s+/g, "").slice(1)
95
+ }
96
+ size={30}
97
+ disabled={isDisabled || false}
98
+ ref={ref}
99
+ {...rest}>
100
+ {icon}
101
+ </Mantine.ActionIcon>
102
+ )}
103
+ </Mantine.Tooltip>
104
+ );
105
+ }
106
+ );
@@ -0,0 +1,69 @@
1
+ import * as Mantine from "@mantine/core";
2
+
3
+ import { assertEmpty, isSafari } from "@blocknote/core";
4
+ import { ComponentProps } from "@blocknote/react";
5
+ import { forwardRef } from "react";
6
+ import { HiChevronDown } from "react-icons/hi";
7
+
8
+ // TODO: Turn into select?
9
+ export const ToolbarSelect = forwardRef<
10
+ HTMLDivElement,
11
+ ComponentProps["FormattingToolbar"]["Select"]
12
+ >((props, ref) => {
13
+ const { className, items, isDisabled, ...rest } = props;
14
+
15
+ assertEmpty(rest);
16
+
17
+ const selectedItem = items.filter((p) => p.isSelected)[0];
18
+
19
+ if (!selectedItem) {
20
+ return null;
21
+ }
22
+
23
+ return (
24
+ <Mantine.Menu
25
+ withinPortal={false}
26
+ transitionProps={{
27
+ exitDuration: 0,
28
+ }}
29
+ disabled={isDisabled}
30
+ middlewares={{ flip: true, shift: true, inline: false, size: true }}>
31
+ <Mantine.Menu.Target>
32
+ <Mantine.Button
33
+ // Needed as Safari doesn't focus button elements on mouse down
34
+ // unlike other browsers.
35
+ onMouseDown={(e) => {
36
+ if (isSafari()) {
37
+ (e.currentTarget as HTMLButtonElement).focus();
38
+ }
39
+ }}
40
+ leftSection={selectedItem.icon}
41
+ rightSection={<HiChevronDown />}
42
+ size={"xs"}
43
+ variant={"subtle"}
44
+ disabled={isDisabled}>
45
+ {selectedItem.text}
46
+ </Mantine.Button>
47
+ </Mantine.Menu.Target>
48
+ <Mantine.Menu.Dropdown className={className} ref={ref}>
49
+ {items.map((item) => (
50
+ <Mantine.Menu.Item
51
+ key={item.text}
52
+ onClick={item.onClick}
53
+ leftSection={item.icon}
54
+ rightSection={
55
+ item.isSelected ? (
56
+ <Mantine.CheckIcon size={10} className={"bn-tick-icon"} />
57
+ ) : (
58
+ // Ensures space for tick even if item isn't currently selected.
59
+ <div className={"bn-tick-space"} />
60
+ )
61
+ }
62
+ disabled={item.isDisabled}>
63
+ {item.text}
64
+ </Mantine.Menu.Item>
65
+ ))}
66
+ </Mantine.Menu.Dropdown>
67
+ </Mantine.Menu>
68
+ );
69
+ });
@@ -0,0 +1,33 @@
1
+ export type CombinedColor = Partial<{
2
+ text: string;
3
+ background: string;
4
+ }>;
5
+ export type ColorScheme = Partial<{
6
+ editor: CombinedColor;
7
+ menu: CombinedColor;
8
+ tooltip: CombinedColor;
9
+ hovered: CombinedColor;
10
+ selected: CombinedColor;
11
+ disabled: CombinedColor;
12
+ shadow: string;
13
+ border: string;
14
+ sideMenu: string;
15
+ highlights: Partial<{
16
+ gray: CombinedColor;
17
+ brown: CombinedColor;
18
+ red: CombinedColor;
19
+ orange: CombinedColor;
20
+ yellow: CombinedColor;
21
+ green: CombinedColor;
22
+ blue: CombinedColor;
23
+ purple: CombinedColor;
24
+ pink: CombinedColor;
25
+ }>;
26
+ }>;
27
+ export type Theme = Partial<{
28
+ colors: ColorScheme;
29
+ borderRadius: number;
30
+ fontFamily: string;
31
+ }>;
32
+ export declare const applyBlockNoteCSSVariablesFromTheme: (theme: Theme, editorDOM: HTMLElement) => string[];
33
+ export declare const removeBlockNoteCSSVariables: (editorDOM: HTMLElement) => string[];
@@ -0,0 +1,143 @@
1
+ export declare const defaultColorScheme: string[];
2
+ export declare const lightDefaultTheme: {
3
+ colors: {
4
+ editor: {
5
+ text: string;
6
+ background: string;
7
+ };
8
+ menu: {
9
+ text: string;
10
+ background: string;
11
+ };
12
+ tooltip: {
13
+ text: string;
14
+ background: string;
15
+ };
16
+ hovered: {
17
+ text: string;
18
+ background: string;
19
+ };
20
+ selected: {
21
+ text: string;
22
+ background: string;
23
+ };
24
+ disabled: {
25
+ text: string;
26
+ background: string;
27
+ };
28
+ shadow: string;
29
+ border: string;
30
+ sideMenu: string;
31
+ highlights: {
32
+ gray: {
33
+ text: string;
34
+ background: string;
35
+ };
36
+ brown: {
37
+ text: string;
38
+ background: string;
39
+ };
40
+ red: {
41
+ text: string;
42
+ background: string;
43
+ };
44
+ orange: {
45
+ text: string;
46
+ background: string;
47
+ };
48
+ yellow: {
49
+ text: string;
50
+ background: string;
51
+ };
52
+ green: {
53
+ text: string;
54
+ background: string;
55
+ };
56
+ blue: {
57
+ text: string;
58
+ background: string;
59
+ };
60
+ purple: {
61
+ text: string;
62
+ background: string;
63
+ };
64
+ pink: {
65
+ text: string;
66
+ background: string;
67
+ };
68
+ };
69
+ };
70
+ borderRadius: number;
71
+ fontFamily: string;
72
+ };
73
+ export declare const darkDefaultTheme: {
74
+ colors: {
75
+ editor: {
76
+ text: string;
77
+ background: string;
78
+ };
79
+ menu: {
80
+ text: string;
81
+ background: string;
82
+ };
83
+ tooltip: {
84
+ text: string;
85
+ background: string;
86
+ };
87
+ hovered: {
88
+ text: string;
89
+ background: string;
90
+ };
91
+ selected: {
92
+ text: string;
93
+ background: string;
94
+ };
95
+ disabled: {
96
+ text: string;
97
+ background: string;
98
+ };
99
+ shadow: string;
100
+ border: string;
101
+ sideMenu: string;
102
+ highlights: {
103
+ gray: {
104
+ text: string;
105
+ background: string;
106
+ };
107
+ brown: {
108
+ text: string;
109
+ background: string;
110
+ };
111
+ red: {
112
+ text: string;
113
+ background: string;
114
+ };
115
+ orange: {
116
+ text: string;
117
+ background: string;
118
+ };
119
+ yellow: {
120
+ text: string;
121
+ background: string;
122
+ };
123
+ green: {
124
+ text: string;
125
+ background: string;
126
+ };
127
+ blue: {
128
+ text: string;
129
+ background: string;
130
+ };
131
+ purple: {
132
+ text: string;
133
+ background: string;
134
+ };
135
+ pink: {
136
+ text: string;
137
+ background: string;
138
+ };
139
+ };
140
+ };
141
+ borderRadius: number;
142
+ fontFamily: string;
143
+ };
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export declare const TextInput: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ name: string;
5
+ label?: string | undefined;
6
+ icon: import("react").ReactNode;
7
+ autoFocus?: boolean | undefined;
8
+ placeholder: string;
9
+ value: string;
10
+ onKeyDown: (event: import("react").KeyboardEvent<HTMLInputElement>) => void;
11
+ onChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
12
+ onSubmit?: (() => void) | undefined;
13
+ } & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,14 @@
1
+ import { InlineContentSchema, StyleSchema } from "@blocknote/core";
2
+ import { BlockNoteViewRaw, Components } from "@blocknote/react";
3
+ import { ComponentProps } from "react";
4
+ import { Theme } from "./BlockNoteTheme";
5
+ import "./style.css";
6
+ export * from "./BlockNoteTheme";
7
+ export * from "./defaultThemes";
8
+ export declare const components: Components;
9
+ export declare const BlockNoteView: <BSchema extends Record<string, import("@blocknote/core").BlockConfig>, ISchema extends InlineContentSchema, SSchema extends StyleSchema>(props: Omit<ComponentProps<typeof BlockNoteViewRaw<BSchema, ISchema, SSchema>>, "theme"> & {
10
+ theme?: "light" | "dark" | Theme | {
11
+ light: Theme;
12
+ dark: Theme;
13
+ };
14
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import { ComponentProps } from "@blocknote/react";
3
+ export declare const Menu: (props: ComponentProps["Generic"]["Menu"]["Root"]) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const MenuItem: import("react").ForwardRefExoticComponent<{
5
+ className?: string | undefined;
6
+ children?: import("react").ReactNode;
7
+ subTrigger?: boolean | undefined;
8
+ icon?: import("react").ReactNode;
9
+ checked?: boolean | undefined;
10
+ onClick?: (() => void) | undefined;
11
+ } & import("react").RefAttributes<HTMLButtonElement & HTMLDivElement>>;
12
+ export declare const MenuTrigger: (props: ComponentProps["Generic"]["Menu"]["Trigger"]) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const MenuDropdown: import("react").ForwardRefExoticComponent<{
14
+ className?: string | undefined;
15
+ children?: import("react").ReactNode;
16
+ sub?: boolean | undefined;
17
+ } & import("react").RefAttributes<HTMLDivElement>>;
18
+ export declare const MenuDivider: import("react").ForwardRefExoticComponent<{
19
+ className?: string | undefined;
20
+ } & import("react").RefAttributes<HTMLDivElement>>;
21
+ export declare const MenuLabel: import("react").ForwardRefExoticComponent<{
22
+ className?: string | undefined;
23
+ children?: import("react").ReactNode;
24
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ export declare const Panel: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ tabs: {
5
+ name: string;
6
+ tabPanel: import("react").ReactNode;
7
+ }[];
8
+ openTab: string;
9
+ setOpenTab: (name: string) => void;
10
+ defaultOpenTab: string;
11
+ loading: boolean;
12
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export declare const PanelButton: import("react").ForwardRefExoticComponent<({
3
+ className?: string | undefined;
4
+ onClick: () => void;
5
+ } & ({
6
+ children: import("react").ReactNode;
7
+ label?: string | undefined;
8
+ } | {
9
+ children?: undefined;
10
+ label: string;
11
+ })) & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const PanelFileInput: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ value: File | null;
5
+ placeholder: string;
6
+ onChange: (payload: File | null) => void;
7
+ } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const PanelTab: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ children?: import("react").ReactNode;
5
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export declare const PanelTextInput: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ value: string;
5
+ placeholder: string;
6
+ onChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
7
+ onKeyDown: (event: import("react").KeyboardEvent<Element>) => void;
8
+ } & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ComponentProps } from "@blocknote/react";
3
+ export declare const Popover: (props: ComponentProps["Generic"]["Popover"]["Root"]) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const PopoverTrigger: (props: ComponentProps["Generic"]["Popover"]["Trigger"]) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const PopoverContent: import("react").ForwardRefExoticComponent<{
6
+ className?: string | undefined;
7
+ variant: "form-popover" | "panel-popover";
8
+ children?: import("react").ReactNode;
9
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const SideMenu: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ children?: import("react").ReactNode;
5
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export declare const SideMenuButton: import("react").ForwardRefExoticComponent<({
3
+ className?: string | undefined;
4
+ onClick?: ((e: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
5
+ icon?: import("react").ReactNode;
6
+ onDragStart?: ((e: import("react").DragEvent<Element>) => void) | undefined;
7
+ onDragEnd?: ((e: import("react").DragEvent<Element>) => void) | undefined;
8
+ draggable?: boolean | undefined;
9
+ } & ({
10
+ children: import("react").ReactNode;
11
+ label?: string | undefined;
12
+ } | {
13
+ children?: undefined;
14
+ label: string;
15
+ })) & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const SuggestionMenu: import("react").ForwardRefExoticComponent<{
3
+ id: string;
4
+ className?: string | undefined;
5
+ children?: import("react").ReactNode;
6
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const SuggestionMenuEmptyItem: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ children?: import("react").ReactNode;
5
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export declare const SuggestionMenuItem: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ id: string;
5
+ isSelected: boolean;
6
+ onClick: () => void;
7
+ item: import("@blocknote/react").DefaultReactSuggestionItem;
8
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const SuggestionMenuLabel: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ children?: import("react").ReactNode;
5
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const SuggestionMenuLoader: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ children?: import("react").ReactNode;
5
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ export declare const TableHandle: import("react").ForwardRefExoticComponent<({
3
+ className?: string | undefined;
4
+ draggable: boolean;
5
+ onDragStart: (e: import("react").DragEvent<Element>) => void;
6
+ onDragEnd: () => void;
7
+ style?: import("react").CSSProperties | undefined;
8
+ } & ({
9
+ children: import("react").ReactNode;
10
+ label?: string | undefined;
11
+ } | {
12
+ children?: undefined;
13
+ label: string;
14
+ })) & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export declare const Toolbar: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ children?: import("react").ReactNode;
5
+ } & {
6
+ className?: string | undefined;
7
+ children?: import("react").ReactNode;
8
+ onMouseEnter?: (() => void) | undefined;
9
+ onMouseLeave?: (() => void) | undefined;
10
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { ComponentProps } from "@blocknote/react";
3
+ export declare const TooltipContent: (props: {
4
+ mainTooltip: string;
5
+ secondaryTooltip?: string;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ type ToolbarButtonProps = ComponentProps["FormattingToolbar"]["Button"] & ComponentProps["LinkToolbar"]["Button"];
8
+ /**
9
+ * Helper for basic buttons that show in the formatting toolbar.
10
+ */
11
+ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<ToolbarButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ export declare const ToolbarSelect: import("react").ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ items: {
5
+ text: string;
6
+ icon: import("react").ReactNode;
7
+ onClick: () => void;
8
+ isSelected: boolean;
9
+ isDisabled?: boolean | undefined;
10
+ }[];
11
+ isDisabled?: boolean | undefined;
12
+ } & import("react").RefAttributes<HTMLDivElement>>;