@blocknote/mantine 0.24.2 → 0.25.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/dist/blocknote-mantine.cjs +2 -0
- package/dist/blocknote-mantine.cjs.map +1 -0
- package/dist/blocknote-mantine.js +681 -478
- package/dist/blocknote-mantine.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +6 -6
- package/src/badge/Badge.tsx +87 -0
- package/src/comments/Card.tsx +34 -0
- package/src/comments/Comment.tsx +91 -0
- package/src/comments/Editor.tsx +47 -0
- package/src/components.tsx +23 -8
- package/src/menu/Button.tsx +60 -0
- package/src/menu/Menu.tsx +2 -4
- package/src/popover/Popover.tsx +1 -1
- package/src/style.css +155 -4
- package/src/toolbar/Toolbar.tsx +13 -5
- package/src/toolbar/ToolbarButton.tsx +85 -53
- package/types/src/badge/Badge.d.ts +15 -0
- package/types/src/comments/Card.d.ts +9 -0
- package/types/src/comments/Comment.d.ts +9 -0
- package/types/src/comments/Editor.d.ts +8 -0
- package/types/src/menu/Button.d.ts +15 -0
- package/types/src/toolbar/Toolbar.d.ts +1 -0
- package/types/src/toolbar/ToolbarButton.d.ts +2 -1
- package/LICENSE +0 -373
- package/dist/blocknote-mantine.umd.cjs +0 -2
- package/dist/blocknote-mantine.umd.cjs.map +0 -1
package/src/style.css
CHANGED
|
@@ -127,6 +127,14 @@
|
|
|
127
127
|
padding: 0;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
.bn-mantine .mantine-Tooltip-tooltip p:last-child {
|
|
131
|
+
white-space: pre-wrap;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.bn-mantine .mantine-Tooltip-tooltip p:first-child {
|
|
135
|
+
white-space: unset;
|
|
136
|
+
}
|
|
137
|
+
|
|
130
138
|
/* UI element styling */
|
|
131
139
|
|
|
132
140
|
/* Select styling */
|
|
@@ -495,14 +503,15 @@
|
|
|
495
503
|
|
|
496
504
|
/* Table Handle styling */
|
|
497
505
|
.bn-mantine .bn-table-handle,
|
|
498
|
-
.bn-mantine .bn-extend-button
|
|
506
|
+
.bn-mantine .bn-extend-button,
|
|
507
|
+
.bn-mantine .bn-table-cell-handle {
|
|
499
508
|
align-items: center;
|
|
500
509
|
background-color: var(--bn-colors-menu-background);
|
|
501
510
|
border: var(--bn-border);
|
|
502
511
|
border-radius: var(--bn-border-radius-small);
|
|
503
512
|
box-shadow: var(--bn-shadow-light);
|
|
504
513
|
color: var(--bn-colors-side-menu);
|
|
505
|
-
cursor:
|
|
514
|
+
cursor: grab;
|
|
506
515
|
display: flex;
|
|
507
516
|
height: fit-content;
|
|
508
517
|
justify-content: center;
|
|
@@ -510,14 +519,23 @@
|
|
|
510
519
|
padding: 0;
|
|
511
520
|
}
|
|
512
521
|
|
|
522
|
+
.bn-mantine .bn-table-cell-handle {
|
|
523
|
+
padding: 0 4px;
|
|
524
|
+
}
|
|
525
|
+
|
|
513
526
|
.bn-mantine .bn-table-handle svg {
|
|
514
527
|
margin-inline: -4px;
|
|
515
528
|
}
|
|
516
529
|
|
|
530
|
+
.bn-mantine .bn-table-handle-not-draggable {
|
|
531
|
+
cursor: pointer;
|
|
532
|
+
}
|
|
533
|
+
|
|
517
534
|
.bn-mantine .bn-table-handle:hover,
|
|
518
535
|
.bn-mantine .bn-table-handle-dragging,
|
|
519
536
|
.bn-mantine .bn-extend-button:hover,
|
|
520
|
-
.bn-mantine .bn-extend-button-editing
|
|
537
|
+
.bn-mantine .bn-extend-button-editing,
|
|
538
|
+
.bn-mantine .bn-table-cell-handle:hover {
|
|
521
539
|
background-color: var(--bn-colors-hovered-background);
|
|
522
540
|
}
|
|
523
541
|
|
|
@@ -536,7 +554,8 @@
|
|
|
536
554
|
}
|
|
537
555
|
|
|
538
556
|
/* Drag Handle & Table Handle Menu styling */
|
|
539
|
-
.bn-mantine .bn-drag-handle-menu
|
|
557
|
+
.bn-mantine .bn-drag-handle-menu,
|
|
558
|
+
.bn-mantine .bn-table-handle-menu {
|
|
540
559
|
overflow: visible;
|
|
541
560
|
}
|
|
542
561
|
|
|
@@ -564,3 +583,135 @@
|
|
|
564
583
|
display: flex;
|
|
565
584
|
justify-content: space-between;
|
|
566
585
|
}
|
|
586
|
+
|
|
587
|
+
/* Comment styling */
|
|
588
|
+
.bn-mantine .bn-thread {
|
|
589
|
+
background-color: var(--bn-colors-menu-background);
|
|
590
|
+
border: var(--bn-border);
|
|
591
|
+
border-radius: var(--bn-border-radius-medium);
|
|
592
|
+
box-shadow: var(--bn-shadow-medium);
|
|
593
|
+
color: var(--bn-colors-menu-text);
|
|
594
|
+
overflow: visible;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.bn-mantine .bn-thread-comments {
|
|
598
|
+
border-bottom: var(--bn-border);
|
|
599
|
+
display: flex;
|
|
600
|
+
flex-direction: column;
|
|
601
|
+
gap: 1rem;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.bn-mantine .bn-thread-comment {
|
|
605
|
+
align-items: flex-start;
|
|
606
|
+
flex-direction: column;
|
|
607
|
+
gap: 0.25rem;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.bn-mantine .bn-thread-comment > .mantine-Group-root {
|
|
611
|
+
gap: 12px;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.bn-mantine .bn-thread-comment p {
|
|
615
|
+
color: var(--bn-colors-menu-text);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.bn-mantine .bn-comment-actions-wrapper {
|
|
619
|
+
width: 100%;
|
|
620
|
+
display: flex;
|
|
621
|
+
justify-content: flex-end;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/* Comment action toolbar styling */
|
|
625
|
+
.bn-mantine .bn-action-toolbar {
|
|
626
|
+
align-self: flex-end;
|
|
627
|
+
background-color: var(--bn-colors-menu-background);
|
|
628
|
+
border: var(--bn-border);
|
|
629
|
+
border-radius: var(--bn-border-radius-medium);
|
|
630
|
+
gap: 0;
|
|
631
|
+
padding: 2px;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.bn-action-toolbar .mantine-Button-root,
|
|
635
|
+
.bn-action-toolbar .mantine-ActionIcon-root {
|
|
636
|
+
background-color: var(--bn-colors-menu-background);
|
|
637
|
+
border: none;
|
|
638
|
+
border-radius: var(--bn-border-radius-small);
|
|
639
|
+
color: var(--bn-colors-menu-text);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.bn-action-toolbar .mantine-Button-root:hover,
|
|
643
|
+
.bn-action-toolbar .mantine-ActionIcon-root:hover {
|
|
644
|
+
background-color: var(--bn-colors-hovered-background);
|
|
645
|
+
border: none;
|
|
646
|
+
color: var(--bn-colors-hovered-text);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.bn-action-toolbar .mantine-Button-root[data-selected],
|
|
650
|
+
.bn-action-toolbar .mantine-ActionIcon-root[data-selected] {
|
|
651
|
+
background-color: var(--bn-colors-selected-background);
|
|
652
|
+
border: none;
|
|
653
|
+
color: var(--bn-colors-selected-text);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.bn-action-toolbar .mantine-Button-root[data-disabled],
|
|
657
|
+
.bn-action-toolbar .mantine-ActionIcon-root[data-disabled] {
|
|
658
|
+
background-color: var(--bn-colors-disabled-background);
|
|
659
|
+
border: none;
|
|
660
|
+
color: var(--bn-colors-disabled-text);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.bn-mantine .bn-action-toolbar .mantine-Menu-itemLabel {
|
|
664
|
+
font-size: 12px;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/* Badge styling */
|
|
668
|
+
.bn-mantine .bn-badge-group {
|
|
669
|
+
display: flex;
|
|
670
|
+
gap: 4px;
|
|
671
|
+
justify-content: flex-start;
|
|
672
|
+
width: 100%;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.bn-mantine .bn-badge {
|
|
676
|
+
flex-grow: 0;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.bn-mantine .bn-badge .mantine-Chip-label {
|
|
680
|
+
padding: 0 8px;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.bn-mantine .bn-badge .mantine-Chip-label:not([data-checked="true"]) {
|
|
684
|
+
background-color: var(--bn-colors-menu-background);
|
|
685
|
+
border: var(--bn-border);
|
|
686
|
+
color: var(--bn-colors-menu-text);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
.bn-mantine .bn-badge .mantine-Chip-label:hover {
|
|
690
|
+
border: 1px solid var(--mantine-primary-color-filled-hover);
|
|
691
|
+
color: var(--mantine-primary-color-filled-hover);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.bn-mantine
|
|
695
|
+
.bn-badge
|
|
696
|
+
.mantine-Chip-label
|
|
697
|
+
> span:not(.mantine-Chip-iconWrapper) {
|
|
698
|
+
display: inline-flex;
|
|
699
|
+
gap: 4px;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.bn-mantine
|
|
703
|
+
.bn-badge
|
|
704
|
+
.mantine-Chip-label
|
|
705
|
+
> span:not(.mantine-Chip-iconWrapper)
|
|
706
|
+
> span {
|
|
707
|
+
align-items: center;
|
|
708
|
+
display: inline-flex;
|
|
709
|
+
justify-content: center;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/* We need to get rid of the checked icon - you can set the icon prop to an
|
|
713
|
+
empty element (<></>), but even so Mantine leaves extra space for the icon, so
|
|
714
|
+
we just don't display it in CSS instead. */
|
|
715
|
+
.bn-mantine .bn-badge .mantine-Chip-iconWrapper {
|
|
716
|
+
display: none;
|
|
717
|
+
}
|
package/src/toolbar/Toolbar.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flex } from "@mantine/core";
|
|
2
2
|
|
|
3
3
|
import { assertEmpty } from "@blocknote/core";
|
|
4
4
|
import { ComponentProps } from "@blocknote/react";
|
|
@@ -10,7 +10,14 @@ type ToolbarProps = ComponentProps["FormattingToolbar"]["Root"] &
|
|
|
10
10
|
|
|
11
11
|
export const Toolbar = forwardRef<HTMLDivElement, ToolbarProps>(
|
|
12
12
|
(props, ref) => {
|
|
13
|
-
const {
|
|
13
|
+
const {
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
onMouseEnter,
|
|
17
|
+
onMouseLeave,
|
|
18
|
+
variant,
|
|
19
|
+
...rest
|
|
20
|
+
} = props;
|
|
14
21
|
|
|
15
22
|
assertEmpty(rest);
|
|
16
23
|
|
|
@@ -22,15 +29,16 @@ export const Toolbar = forwardRef<HTMLDivElement, ToolbarProps>(
|
|
|
22
29
|
const combinedRef = mergeRefs(ref, focusRef, trapRef);
|
|
23
30
|
|
|
24
31
|
return (
|
|
25
|
-
<
|
|
32
|
+
<Flex
|
|
26
33
|
className={className}
|
|
27
34
|
ref={combinedRef}
|
|
28
35
|
role="toolbar"
|
|
29
36
|
// TODO: aria-label
|
|
30
37
|
onMouseEnter={onMouseEnter}
|
|
31
|
-
onMouseLeave={onMouseLeave}
|
|
38
|
+
onMouseLeave={onMouseLeave}
|
|
39
|
+
gap={variant === "action-toolbar" ? 2 : undefined}>
|
|
32
40
|
{children}
|
|
33
|
-
</
|
|
41
|
+
</Flex>
|
|
34
42
|
);
|
|
35
43
|
}
|
|
36
44
|
);
|
|
@@ -8,16 +8,20 @@ import {
|
|
|
8
8
|
|
|
9
9
|
import { assertEmpty, isSafari } from "@blocknote/core";
|
|
10
10
|
import { ComponentProps } from "@blocknote/react";
|
|
11
|
-
import { forwardRef } from "react";
|
|
11
|
+
import { forwardRef, useState } from "react";
|
|
12
12
|
|
|
13
13
|
export const TooltipContent = (props: {
|
|
14
14
|
mainTooltip: string;
|
|
15
15
|
secondaryTooltip?: string;
|
|
16
16
|
}) => (
|
|
17
17
|
<MantineStack gap={0} className={"bn-tooltip"}>
|
|
18
|
-
<MantineText size={"sm"}
|
|
18
|
+
<MantineText size={"sm"} lineClamp={5}>
|
|
19
|
+
{props.mainTooltip}
|
|
20
|
+
</MantineText>
|
|
19
21
|
{props.secondaryTooltip && (
|
|
20
|
-
<MantineText size={"xs"}
|
|
22
|
+
<MantineText size={"xs"} lineClamp={5}>
|
|
23
|
+
{props.secondaryTooltip}
|
|
24
|
+
</MantineText>
|
|
21
25
|
)}
|
|
22
26
|
</MantineStack>
|
|
23
27
|
);
|
|
@@ -40,6 +44,7 @@ export const ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>(
|
|
|
40
44
|
isDisabled,
|
|
41
45
|
onClick,
|
|
42
46
|
label,
|
|
47
|
+
variant,
|
|
43
48
|
...rest
|
|
44
49
|
} = props;
|
|
45
50
|
|
|
@@ -47,8 +52,84 @@ export const ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>(
|
|
|
47
52
|
// assertEmpty in this case is only used at typescript level, not runtime level
|
|
48
53
|
assertEmpty(rest, false);
|
|
49
54
|
|
|
55
|
+
const [hideTooltip, setHideTooltip] = useState(false);
|
|
56
|
+
|
|
57
|
+
const button = children ? (
|
|
58
|
+
<MantineButton
|
|
59
|
+
aria-label={label}
|
|
60
|
+
className={className}
|
|
61
|
+
// Needed as Safari doesn't focus button elements on mouse down
|
|
62
|
+
// unlike other browsers.
|
|
63
|
+
onMouseDown={(e) => {
|
|
64
|
+
if (isSafari()) {
|
|
65
|
+
(e.currentTarget as HTMLButtonElement).focus();
|
|
66
|
+
}
|
|
67
|
+
}}
|
|
68
|
+
onClick={(event) => {
|
|
69
|
+
setHideTooltip(true);
|
|
70
|
+
onClick?.(event);
|
|
71
|
+
}}
|
|
72
|
+
// Mantine Menu.Target elements block mouseleave events for some reason,
|
|
73
|
+
// but pointerleave events work fine.
|
|
74
|
+
onPointerLeave={() => setHideTooltip(false)}
|
|
75
|
+
aria-pressed={isSelected}
|
|
76
|
+
data-selected={isSelected || undefined}
|
|
77
|
+
data-test={
|
|
78
|
+
mainTooltip
|
|
79
|
+
? mainTooltip.slice(0, 1).toLowerCase() +
|
|
80
|
+
mainTooltip.replace(/\s+/g, "").slice(1)
|
|
81
|
+
: undefined
|
|
82
|
+
}
|
|
83
|
+
size={variant === "compact" ? "compact-xs" : "xs"}
|
|
84
|
+
disabled={isDisabled || false}
|
|
85
|
+
ref={ref}
|
|
86
|
+
{...rest}>
|
|
87
|
+
{children}
|
|
88
|
+
</MantineButton>
|
|
89
|
+
) : (
|
|
90
|
+
<MantineActionIcon
|
|
91
|
+
className={className}
|
|
92
|
+
aria-label={label}
|
|
93
|
+
// Needed as Safari doesn't focus button elements on mouse down
|
|
94
|
+
// unlike other browsers.
|
|
95
|
+
onMouseDown={(e) => {
|
|
96
|
+
if (isSafari()) {
|
|
97
|
+
(e.currentTarget as HTMLButtonElement).focus();
|
|
98
|
+
}
|
|
99
|
+
}}
|
|
100
|
+
onClick={(event) => {
|
|
101
|
+
// We manually hide the tooltip onclick, because the click event
|
|
102
|
+
// might open a popover which would then show both the tooltip and the popover
|
|
103
|
+
// this is similar to default behavior of shadcn / radix
|
|
104
|
+
setHideTooltip(true);
|
|
105
|
+
onClick?.(event);
|
|
106
|
+
}}
|
|
107
|
+
// Mantine Menu.Target elements block mouseleave events for some reason,
|
|
108
|
+
// but pointerleave events work fine.
|
|
109
|
+
onPointerLeave={() => setHideTooltip(false)}
|
|
110
|
+
aria-pressed={isSelected}
|
|
111
|
+
data-selected={isSelected || undefined}
|
|
112
|
+
data-test={
|
|
113
|
+
mainTooltip
|
|
114
|
+
? mainTooltip.slice(0, 1).toLowerCase() +
|
|
115
|
+
mainTooltip.replace(/\s+/g, "").slice(1)
|
|
116
|
+
: undefined
|
|
117
|
+
}
|
|
118
|
+
size={variant === "compact" ? 20 : 30}
|
|
119
|
+
disabled={isDisabled || false}
|
|
120
|
+
ref={ref}
|
|
121
|
+
{...rest}>
|
|
122
|
+
{icon}
|
|
123
|
+
</MantineActionIcon>
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
if (!mainTooltip) {
|
|
127
|
+
return button;
|
|
128
|
+
}
|
|
129
|
+
|
|
50
130
|
return (
|
|
51
131
|
<MantineTooltip
|
|
132
|
+
disabled={hideTooltip}
|
|
52
133
|
withinPortal={false}
|
|
53
134
|
label={
|
|
54
135
|
<TooltipContent
|
|
@@ -56,56 +137,7 @@ export const ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>(
|
|
|
56
137
|
secondaryTooltip={secondaryTooltip}
|
|
57
138
|
/>
|
|
58
139
|
}>
|
|
59
|
-
{
|
|
60
|
-
{children ? (
|
|
61
|
-
<MantineButton
|
|
62
|
-
aria-label={label}
|
|
63
|
-
className={className}
|
|
64
|
-
// Needed as Safari doesn't focus button elements on mouse down
|
|
65
|
-
// unlike other browsers.
|
|
66
|
-
onMouseDown={(e) => {
|
|
67
|
-
if (isSafari()) {
|
|
68
|
-
(e.currentTarget as HTMLButtonElement).focus();
|
|
69
|
-
}
|
|
70
|
-
}}
|
|
71
|
-
onClick={onClick}
|
|
72
|
-
aria-pressed={isSelected}
|
|
73
|
-
data-selected={isSelected || undefined}
|
|
74
|
-
data-test={
|
|
75
|
-
mainTooltip.slice(0, 1).toLowerCase() +
|
|
76
|
-
mainTooltip.replace(/\s+/g, "").slice(1)
|
|
77
|
-
}
|
|
78
|
-
size={"xs"}
|
|
79
|
-
disabled={isDisabled || false}
|
|
80
|
-
ref={ref}
|
|
81
|
-
{...rest}>
|
|
82
|
-
{children}
|
|
83
|
-
</MantineButton>
|
|
84
|
-
) : (
|
|
85
|
-
<MantineActionIcon
|
|
86
|
-
className={className}
|
|
87
|
-
aria-label={label}
|
|
88
|
-
// Needed as Safari doesn't focus button elements on mouse down
|
|
89
|
-
// unlike other browsers.
|
|
90
|
-
onMouseDown={(e) => {
|
|
91
|
-
if (isSafari()) {
|
|
92
|
-
(e.currentTarget as HTMLButtonElement).focus();
|
|
93
|
-
}
|
|
94
|
-
}}
|
|
95
|
-
onClick={onClick}
|
|
96
|
-
aria-pressed={isSelected}
|
|
97
|
-
data-selected={isSelected || undefined}
|
|
98
|
-
data-test={
|
|
99
|
-
mainTooltip.slice(0, 1).toLowerCase() +
|
|
100
|
-
mainTooltip.replace(/\s+/g, "").slice(1)
|
|
101
|
-
}
|
|
102
|
-
size={30}
|
|
103
|
-
disabled={isDisabled || false}
|
|
104
|
-
ref={ref}
|
|
105
|
-
{...rest}>
|
|
106
|
-
{icon}
|
|
107
|
-
</MantineActionIcon>
|
|
108
|
-
)}
|
|
140
|
+
{button}
|
|
109
141
|
</MantineTooltip>
|
|
110
142
|
);
|
|
111
143
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MouseEvent } from "react";
|
|
2
|
+
export declare const Badge: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
text: string;
|
|
5
|
+
icon?: import("react").ReactNode;
|
|
6
|
+
isSelected?: boolean | undefined;
|
|
7
|
+
mainTooltip?: string | undefined;
|
|
8
|
+
secondaryTooltip?: string | undefined;
|
|
9
|
+
onClick?: ((event: MouseEvent<Element, globalThis.MouseEvent>) => void) | undefined;
|
|
10
|
+
onMouseEnter?: (() => void) | undefined;
|
|
11
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
|
+
export declare const BadgeGroup: import("react").ForwardRefExoticComponent<{
|
|
13
|
+
className?: string | undefined;
|
|
14
|
+
children: import("react").ReactNode;
|
|
15
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Card: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const CardSection: import("react").ForwardRefExoticComponent<{
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
children?: import("react").ReactNode;
|
|
9
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Comment: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
authorInfo: "loading" | import("@blocknote/core/types/src/comments").User;
|
|
6
|
+
timeString: string;
|
|
7
|
+
actions?: import("react").ReactNode;
|
|
8
|
+
showActions?: boolean | "hover" | undefined;
|
|
9
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Editor: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
editable: boolean;
|
|
5
|
+
editor: import("@blocknote/core").BlockNoteEditor<any, any, any>;
|
|
6
|
+
onFocus?: (() => void) | undefined;
|
|
7
|
+
onBlur?: (() => void) | undefined;
|
|
8
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Button: 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>>;
|
|
@@ -4,4 +4,5 @@ export declare const Toolbar: import("react").ForwardRefExoticComponent<{
|
|
|
4
4
|
children?: import("react").ReactNode;
|
|
5
5
|
onMouseEnter?: (() => void) | undefined;
|
|
6
6
|
onMouseLeave?: (() => void) | undefined;
|
|
7
|
+
variant?: "default" | "action-toolbar" | undefined;
|
|
7
8
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -8,12 +8,13 @@ export declare const TooltipContent: (props: {
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const ToolbarButton: import("react").ForwardRefExoticComponent<({
|
|
10
10
|
className?: string | undefined;
|
|
11
|
-
mainTooltip
|
|
11
|
+
mainTooltip?: string | undefined;
|
|
12
12
|
secondaryTooltip?: string | undefined;
|
|
13
13
|
icon?: import("react").ReactNode;
|
|
14
14
|
onClick?: ((e: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
15
15
|
isSelected?: boolean | undefined;
|
|
16
16
|
isDisabled?: boolean | undefined;
|
|
17
|
+
variant?: "default" | "compact" | undefined;
|
|
17
18
|
} & ({
|
|
18
19
|
children: import("react").ReactNode;
|
|
19
20
|
label?: string | undefined;
|