@blocknote/ariakit 0.14.1 → 0.14.3
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-ariakit.js +137 -128
- package/dist/blocknote-ariakit.js.map +1 -1
- package/dist/blocknote-ariakit.umd.cjs +8 -8
- package/dist/blocknote-ariakit.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +4 -4
- package/src/ariakitStyles.css +2 -1
- package/src/index.tsx +12 -2
- package/src/style.css +12 -15
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Ae, { forwardRef as R, useRef as Tr, useEffect as _r } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { assertEmpty as x, mergeCSSClasses as T, isSafari as kr } from "@blocknote/core";
|
|
3
|
+
import { elementOverflow as Sr, mergeRefs as Pr, ComponentsContext as Cr, BlockNoteViewRaw as wr } from "@blocknote/react";
|
|
4
|
+
import { FormProvider as ne, FormLabel as Nr, FormInput as ae, Menu as Or, MenuButton as Le, MenuItem as Ne, MenuButtonArrow as Dr, CheckboxCheck as Oe, MenuGroupLabel as Ir, MenuSeparator as Fr, MenuProvider as Mr, TabProvider as Ar, TabList as Lr, Tab as $r, TabPanel as Wr, Button as oe, PopoverDisclosure as Yr, Popover as Vr, PopoverProvider as Br, Group as $e, Toolbar as Ur, TooltipProvider as Kr, TooltipAnchor as Gr, ToolbarItem as We, Tooltip as Jr, SelectProvider as qr, Select as Hr, SelectArrow as zr, SelectPopover as Xr, SelectItem as Zr, SelectItemCheck as Qr } from "@ariakit/react";
|
|
5
5
|
var te = { exports: {} }, W = {};
|
|
6
6
|
/**
|
|
7
7
|
* @license React
|
|
@@ -17,7 +17,7 @@ function et() {
|
|
|
17
17
|
if (De)
|
|
18
18
|
return W;
|
|
19
19
|
De = 1;
|
|
20
|
-
var a = Ae,
|
|
20
|
+
var a = Ae, o = Symbol.for("react.element"), i = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, l = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
21
|
function v(g, u, p) {
|
|
22
22
|
var y, _ = {}, w = null, V = null;
|
|
23
23
|
p !== void 0 && (w = "" + p), u.key !== void 0 && (w = "" + u.key), u.ref !== void 0 && (V = u.ref);
|
|
@@ -26,7 +26,7 @@ function et() {
|
|
|
26
26
|
if (g && g.defaultProps)
|
|
27
27
|
for (y in u = g.defaultProps, u)
|
|
28
28
|
_[y] === void 0 && (_[y] = u[y]);
|
|
29
|
-
return { $$typeof:
|
|
29
|
+
return { $$typeof: o, type: g, key: w, ref: V, props: _, _owner: l.current };
|
|
30
30
|
}
|
|
31
31
|
return W.Fragment = i, W.jsx = v, W.jsxs = v, W;
|
|
32
32
|
}
|
|
@@ -43,7 +43,7 @@ var Y = {};
|
|
|
43
43
|
var Ie;
|
|
44
44
|
function rt() {
|
|
45
45
|
return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
|
|
46
|
-
var a = Ae,
|
|
46
|
+
var a = Ae, o = Symbol.for("react.element"), i = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), g = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), V = Symbol.for("react.offscreen"), se = Symbol.iterator, Ye = "@@iterator";
|
|
47
47
|
function Ve(e) {
|
|
48
48
|
if (e === null || typeof e != "object")
|
|
49
49
|
return null;
|
|
@@ -425,7 +425,7 @@ function rt() {
|
|
|
425
425
|
var dr = function(e, r, t, c, b, h, m) {
|
|
426
426
|
var d = {
|
|
427
427
|
// This tag allows us to uniquely identify this as a React Element
|
|
428
|
-
$$typeof:
|
|
428
|
+
$$typeof: o,
|
|
429
429
|
// Built-in properties that belong on the element
|
|
430
430
|
type: e,
|
|
431
431
|
key: r,
|
|
@@ -480,7 +480,7 @@ function rt() {
|
|
|
480
480
|
var Q;
|
|
481
481
|
Q = !1;
|
|
482
482
|
function ee(e) {
|
|
483
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
483
|
+
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
484
484
|
}
|
|
485
485
|
function _e() {
|
|
486
486
|
{
|
|
@@ -597,7 +597,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
597
597
|
var S = mr(b);
|
|
598
598
|
S ? d += S : d += _e();
|
|
599
599
|
var j;
|
|
600
|
-
e === null ? j = "null" : z(e) ? j = "array" : e !== void 0 && e.$$typeof ===
|
|
600
|
+
e === null ? j = "null" : z(e) ? j = "array" : e !== void 0 && e.$$typeof === o ? (j = "<" + (N(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : j = typeof e, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", j, d);
|
|
601
601
|
}
|
|
602
602
|
var E = vr(e, r, t, b, h);
|
|
603
603
|
if (E == null)
|
|
@@ -643,11 +643,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
643
643
|
}()), Y;
|
|
644
644
|
}
|
|
645
645
|
process.env.NODE_ENV === "production" ? te.exports = et() : te.exports = rt();
|
|
646
|
-
var
|
|
646
|
+
var s = te.exports;
|
|
647
647
|
const tt = (a) => {
|
|
648
|
-
const { children:
|
|
649
|
-
return x(i), /* @__PURE__ */
|
|
650
|
-
}, nt = R((a,
|
|
648
|
+
const { children: o, ...i } = a;
|
|
649
|
+
return x(i), /* @__PURE__ */ s.jsx(ne, { children: o });
|
|
650
|
+
}, nt = R((a, o) => {
|
|
651
651
|
const {
|
|
652
652
|
className: i,
|
|
653
653
|
name: n,
|
|
@@ -661,15 +661,15 @@ const tt = (a) => {
|
|
|
661
661
|
onSubmit: _,
|
|
662
662
|
...w
|
|
663
663
|
} = a;
|
|
664
|
-
return x(w), /* @__PURE__ */
|
|
665
|
-
a.label && /* @__PURE__ */
|
|
666
|
-
/* @__PURE__ */
|
|
664
|
+
return x(w), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
665
|
+
a.label && /* @__PURE__ */ s.jsx(Nr, { name: n, children: l }),
|
|
666
|
+
/* @__PURE__ */ s.jsxs("div", { className: "bn-ak-input-wrapper", children: [
|
|
667
667
|
f,
|
|
668
|
-
/* @__PURE__ */
|
|
668
|
+
/* @__PURE__ */ s.jsx(
|
|
669
669
|
ae,
|
|
670
670
|
{
|
|
671
671
|
className: T("bn-ak-input", i || ""),
|
|
672
|
-
ref:
|
|
672
|
+
ref: o,
|
|
673
673
|
name: n,
|
|
674
674
|
value: v,
|
|
675
675
|
autoFocus: g,
|
|
@@ -683,23 +683,23 @@ const tt = (a) => {
|
|
|
683
683
|
] });
|
|
684
684
|
}), at = (a) => {
|
|
685
685
|
const {
|
|
686
|
-
children:
|
|
686
|
+
children: o,
|
|
687
687
|
onOpenChange: i,
|
|
688
688
|
position: n,
|
|
689
689
|
sub: l,
|
|
690
690
|
// unused
|
|
691
691
|
...f
|
|
692
692
|
} = a;
|
|
693
|
-
return x(f), /* @__PURE__ */
|
|
694
|
-
|
|
693
|
+
return x(f), /* @__PURE__ */ s.jsx(
|
|
694
|
+
Mr,
|
|
695
695
|
{
|
|
696
696
|
placement: n,
|
|
697
697
|
setOpen: i,
|
|
698
698
|
virtualFocus: !0,
|
|
699
|
-
children:
|
|
699
|
+
children: o
|
|
700
700
|
}
|
|
701
701
|
);
|
|
702
|
-
}, ot = R((a,
|
|
702
|
+
}, ot = R((a, o) => {
|
|
703
703
|
const {
|
|
704
704
|
className: i,
|
|
705
705
|
children: n,
|
|
@@ -707,67 +707,67 @@ const tt = (a) => {
|
|
|
707
707
|
// unused
|
|
708
708
|
...f
|
|
709
709
|
} = a;
|
|
710
|
-
return x(f), /* @__PURE__ */
|
|
711
|
-
|
|
710
|
+
return x(f), /* @__PURE__ */ s.jsx(
|
|
711
|
+
Or,
|
|
712
712
|
{
|
|
713
713
|
unmountOnHide: !0,
|
|
714
714
|
className: T("bn-ak-menu", i || ""),
|
|
715
|
-
ref:
|
|
715
|
+
ref: o,
|
|
716
716
|
children: n
|
|
717
717
|
}
|
|
718
718
|
);
|
|
719
|
-
}), st = R((a,
|
|
719
|
+
}), st = R((a, o) => {
|
|
720
720
|
const { className: i, children: n, icon: l, checked: f, subTrigger: v, onClick: g, ...u } = a;
|
|
721
|
-
return x(u), v ? /* @__PURE__ */
|
|
721
|
+
return x(u), v ? /* @__PURE__ */ s.jsxs(
|
|
722
722
|
Le,
|
|
723
723
|
{
|
|
724
|
-
render: /* @__PURE__ */
|
|
724
|
+
render: /* @__PURE__ */ s.jsx(Ne, {}),
|
|
725
725
|
className: T("bn-ak-menu-item", i || ""),
|
|
726
|
-
ref:
|
|
726
|
+
ref: o,
|
|
727
727
|
onClick: g,
|
|
728
728
|
children: [
|
|
729
729
|
l,
|
|
730
730
|
n,
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
f !== void 0 && /* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ s.jsx(Dr, {}),
|
|
732
|
+
f !== void 0 && /* @__PURE__ */ s.jsx(Oe, { checked: f })
|
|
733
733
|
]
|
|
734
734
|
}
|
|
735
|
-
) : /* @__PURE__ */
|
|
735
|
+
) : /* @__PURE__ */ s.jsxs(
|
|
736
736
|
Ne,
|
|
737
737
|
{
|
|
738
738
|
className: T("bn-ak-menu-item", i || ""),
|
|
739
|
-
ref:
|
|
739
|
+
ref: o,
|
|
740
740
|
onClick: g,
|
|
741
741
|
children: [
|
|
742
742
|
l,
|
|
743
743
|
n,
|
|
744
|
-
f !== void 0 && /* @__PURE__ */
|
|
744
|
+
f !== void 0 && /* @__PURE__ */ s.jsx(Oe, { checked: f })
|
|
745
745
|
]
|
|
746
746
|
}
|
|
747
747
|
);
|
|
748
|
-
}), it = R((a,
|
|
748
|
+
}), it = R((a, o) => {
|
|
749
749
|
const { className: i, children: n, ...l } = a;
|
|
750
|
-
return x(l), /* @__PURE__ */
|
|
751
|
-
|
|
750
|
+
return x(l), /* @__PURE__ */ s.jsx(
|
|
751
|
+
Ir,
|
|
752
752
|
{
|
|
753
753
|
className: T("bn-ak-group-label", i || ""),
|
|
754
|
-
ref:
|
|
754
|
+
ref: o,
|
|
755
755
|
children: n
|
|
756
756
|
}
|
|
757
757
|
);
|
|
758
758
|
}), lt = (a) => {
|
|
759
|
-
const { children:
|
|
760
|
-
return x(n), i ?
|
|
761
|
-
}, ct = R((a,
|
|
759
|
+
const { children: o, sub: i, ...n } = a;
|
|
760
|
+
return x(n), i ? o : /* @__PURE__ */ s.jsx(Le, { render: o });
|
|
761
|
+
}, ct = R((a, o) => {
|
|
762
762
|
const { className: i, ...n } = a;
|
|
763
|
-
return x(n), /* @__PURE__ */
|
|
764
|
-
|
|
763
|
+
return x(n), /* @__PURE__ */ s.jsx(
|
|
764
|
+
Fr,
|
|
765
765
|
{
|
|
766
766
|
className: T("bn-ak-separator", i || ""),
|
|
767
|
-
ref:
|
|
767
|
+
ref: o
|
|
768
768
|
}
|
|
769
769
|
);
|
|
770
|
-
}), ut = R((a,
|
|
770
|
+
}), ut = R((a, o) => {
|
|
771
771
|
const {
|
|
772
772
|
className: i,
|
|
773
773
|
tabs: n,
|
|
@@ -778,13 +778,13 @@ const tt = (a) => {
|
|
|
778
778
|
// TODO: implement loading
|
|
779
779
|
...u
|
|
780
780
|
} = a;
|
|
781
|
-
return x(u), /* @__PURE__ */
|
|
781
|
+
return x(u), /* @__PURE__ */ s.jsx(
|
|
782
782
|
"div",
|
|
783
783
|
{
|
|
784
784
|
className: T("bn-ak-wrapper", i || ""),
|
|
785
|
-
ref:
|
|
786
|
-
children: /* @__PURE__ */
|
|
787
|
-
|
|
785
|
+
ref: o,
|
|
786
|
+
children: /* @__PURE__ */ s.jsxs(
|
|
787
|
+
Ar,
|
|
788
788
|
{
|
|
789
789
|
defaultSelectedId: l,
|
|
790
790
|
selectedId: f,
|
|
@@ -792,32 +792,32 @@ const tt = (a) => {
|
|
|
792
792
|
p && v(p);
|
|
793
793
|
},
|
|
794
794
|
children: [
|
|
795
|
-
/* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ s.jsx(Lr, { className: "bn-ak-tab-list", children: n.map((p) => /* @__PURE__ */ s.jsx($r, { className: "bn-ak-tab", id: p.name, children: p.name }, p.name)) }),
|
|
796
|
+
/* @__PURE__ */ s.jsx("div", { className: "bn-ak-panels", children: n.map((p) => /* @__PURE__ */ s.jsx(Wr, { tabId: p.name, children: p.tabPanel }, p.name)) })
|
|
797
797
|
]
|
|
798
798
|
}
|
|
799
799
|
)
|
|
800
800
|
}
|
|
801
801
|
);
|
|
802
|
-
}), ft = R((a,
|
|
802
|
+
}), ft = R((a, o) => {
|
|
803
803
|
const { className: i, children: n, onClick: l, label: f, ...v } = a;
|
|
804
|
-
return x(v), /* @__PURE__ */
|
|
804
|
+
return x(v), /* @__PURE__ */ s.jsx(
|
|
805
805
|
oe,
|
|
806
806
|
{
|
|
807
807
|
className: T("bn-ak-button", i || ""),
|
|
808
808
|
onClick: l,
|
|
809
809
|
"aria-label": f,
|
|
810
|
-
ref:
|
|
810
|
+
ref: o,
|
|
811
811
|
children: n
|
|
812
812
|
}
|
|
813
813
|
);
|
|
814
|
-
}), dt = R((a,
|
|
814
|
+
}), dt = R((a, o) => {
|
|
815
815
|
const { className: i, accept: n, value: l, placeholder: f, onChange: v, ...g } = a;
|
|
816
|
-
return x(g), /* @__PURE__ */
|
|
816
|
+
return x(g), /* @__PURE__ */ s.jsx(ne, { children: /* @__PURE__ */ s.jsx(
|
|
817
817
|
ae,
|
|
818
818
|
{
|
|
819
819
|
className: i,
|
|
820
|
-
ref:
|
|
820
|
+
ref: o,
|
|
821
821
|
name: "panel-input",
|
|
822
822
|
type: "file",
|
|
823
823
|
accept: n,
|
|
@@ -826,12 +826,12 @@ const tt = (a) => {
|
|
|
826
826
|
placeholder: f
|
|
827
827
|
}
|
|
828
828
|
) });
|
|
829
|
-
}), vt = R((a,
|
|
829
|
+
}), vt = R((a, o) => {
|
|
830
830
|
const { className: i, children: n, ...l } = a;
|
|
831
|
-
return x(l), /* @__PURE__ */
|
|
832
|
-
}), mt = R((a,
|
|
831
|
+
return x(l), /* @__PURE__ */ s.jsx("div", { className: i, ref: o, children: n });
|
|
832
|
+
}), mt = R((a, o) => {
|
|
833
833
|
const { className: i, value: n, placeholder: l, onKeyDown: f, onChange: v, ...g } = a;
|
|
834
|
-
return x(g), /* @__PURE__ */
|
|
834
|
+
return x(g), /* @__PURE__ */ s.jsx(ne, { children: /* @__PURE__ */ s.jsx(
|
|
835
835
|
ae,
|
|
836
836
|
{
|
|
837
837
|
className: T("bn-ak-input", i || ""),
|
|
@@ -841,29 +841,29 @@ const tt = (a) => {
|
|
|
841
841
|
onChange: v,
|
|
842
842
|
onKeyDown: f,
|
|
843
843
|
"data-test": "embed-input",
|
|
844
|
-
ref:
|
|
844
|
+
ref: o
|
|
845
845
|
}
|
|
846
846
|
) });
|
|
847
|
-
}), pt = R((a,
|
|
847
|
+
}), pt = R((a, o) => {
|
|
848
848
|
const { children: i, ...n } = a;
|
|
849
|
-
return x(n), /* @__PURE__ */
|
|
850
|
-
}), bt = R((a,
|
|
849
|
+
return x(n), /* @__PURE__ */ s.jsx(Yr, { render: i, ref: o });
|
|
850
|
+
}), bt = R((a, o) => {
|
|
851
851
|
const { className: i, children: n, variant: l, ...f } = a;
|
|
852
|
-
return x(f), /* @__PURE__ */
|
|
853
|
-
|
|
852
|
+
return x(f), /* @__PURE__ */ s.jsx(
|
|
853
|
+
Vr,
|
|
854
854
|
{
|
|
855
855
|
className: T("bn-ak-popover", i || ""),
|
|
856
|
-
ref:
|
|
856
|
+
ref: o,
|
|
857
857
|
children: n
|
|
858
858
|
}
|
|
859
859
|
);
|
|
860
860
|
}), gt = (a) => {
|
|
861
|
-
const { children:
|
|
862
|
-
return x(l), /* @__PURE__ */
|
|
863
|
-
}, ht = R((a,
|
|
861
|
+
const { children: o, opened: i, position: n, ...l } = a;
|
|
862
|
+
return x(l), /* @__PURE__ */ s.jsx(Br, { open: i, placement: n, children: o });
|
|
863
|
+
}, ht = R((a, o) => {
|
|
864
864
|
const { className: i, children: n, ...l } = a;
|
|
865
|
-
return x(l, !1), /* @__PURE__ */
|
|
866
|
-
}), xt = R((a,
|
|
865
|
+
return x(l, !1), /* @__PURE__ */ s.jsx($e, { className: i, ref: o, ...l, children: n });
|
|
866
|
+
}), xt = R((a, o) => {
|
|
867
867
|
const {
|
|
868
868
|
className: i,
|
|
869
869
|
children: n,
|
|
@@ -875,7 +875,7 @@ const tt = (a) => {
|
|
|
875
875
|
draggable: p,
|
|
876
876
|
...y
|
|
877
877
|
} = a;
|
|
878
|
-
return x(y, !1), /* @__PURE__ */
|
|
878
|
+
return x(y, !1), /* @__PURE__ */ s.jsxs(
|
|
879
879
|
oe,
|
|
880
880
|
{
|
|
881
881
|
onDragEnd: g,
|
|
@@ -886,7 +886,7 @@ const tt = (a) => {
|
|
|
886
886
|
"bn-ak-button bn-ak-secondary",
|
|
887
887
|
i || ""
|
|
888
888
|
),
|
|
889
|
-
ref:
|
|
889
|
+
ref: o,
|
|
890
890
|
onClick: f,
|
|
891
891
|
...y,
|
|
892
892
|
children: [
|
|
@@ -895,38 +895,38 @@ const tt = (a) => {
|
|
|
895
895
|
]
|
|
896
896
|
}
|
|
897
897
|
);
|
|
898
|
-
}), yt = R((a,
|
|
898
|
+
}), yt = R((a, o) => {
|
|
899
899
|
const { className: i, children: n, id: l, ...f } = a;
|
|
900
|
-
return x(f), /* @__PURE__ */
|
|
900
|
+
return x(f), /* @__PURE__ */ s.jsx(
|
|
901
901
|
$e,
|
|
902
902
|
{
|
|
903
903
|
className: T("bn-ak-menu", i || ""),
|
|
904
904
|
id: l,
|
|
905
905
|
role: "listbox",
|
|
906
|
-
ref:
|
|
906
|
+
ref: o,
|
|
907
907
|
children: n
|
|
908
908
|
}
|
|
909
909
|
);
|
|
910
|
-
}), Rt = R((a,
|
|
910
|
+
}), Rt = R((a, o) => {
|
|
911
911
|
const { className: i, item: n, isSelected: l, onClick: f, id: v, ...g } = a;
|
|
912
912
|
x(g);
|
|
913
913
|
const u = Tr(null);
|
|
914
914
|
return _r(() => {
|
|
915
915
|
if (!u.current || !l)
|
|
916
916
|
return;
|
|
917
|
-
const p =
|
|
917
|
+
const p = Sr(u.current);
|
|
918
918
|
p === "top" ? u.current.scrollIntoView(!0) : p === "bottom" && u.current.scrollIntoView(!1);
|
|
919
|
-
}, [l]), /* @__PURE__ */
|
|
919
|
+
}, [l]), /* @__PURE__ */ s.jsxs(
|
|
920
920
|
"div",
|
|
921
921
|
{
|
|
922
922
|
className: T("bn-ak-menu-item", i || ""),
|
|
923
|
-
ref:
|
|
923
|
+
ref: Pr([o, u]),
|
|
924
924
|
id: v,
|
|
925
925
|
onClick: f,
|
|
926
926
|
role: "option",
|
|
927
927
|
"aria-selected": l || void 0,
|
|
928
928
|
children: [
|
|
929
|
-
n.icon && /* @__PURE__ */
|
|
929
|
+
n.icon && /* @__PURE__ */ s.jsx(
|
|
930
930
|
"div",
|
|
931
931
|
{
|
|
932
932
|
className: "bn-ak-suggestion-menu-item-section",
|
|
@@ -934,45 +934,45 @@ const tt = (a) => {
|
|
|
934
934
|
children: n.icon
|
|
935
935
|
}
|
|
936
936
|
),
|
|
937
|
-
/* @__PURE__ */
|
|
938
|
-
/* @__PURE__ */
|
|
939
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ s.jsxs("div", { className: "bn-ak-suggestion-menu-item-body", children: [
|
|
938
|
+
/* @__PURE__ */ s.jsx("div", { className: "bn-ak-suggestion-menu-item-title", children: n.title }),
|
|
939
|
+
/* @__PURE__ */ s.jsx("div", { className: "bn-ak-suggestion-menu-item-subtitle", children: n.subtext })
|
|
940
940
|
] }),
|
|
941
|
-
n.badge && /* @__PURE__ */
|
|
941
|
+
n.badge && /* @__PURE__ */ s.jsx(
|
|
942
942
|
"div",
|
|
943
943
|
{
|
|
944
944
|
"data-position": "right",
|
|
945
945
|
className: "bn-ak-suggestion-menu-item-section",
|
|
946
|
-
children: /* @__PURE__ */
|
|
946
|
+
children: /* @__PURE__ */ s.jsx("div", { children: n.badge })
|
|
947
947
|
}
|
|
948
948
|
)
|
|
949
949
|
]
|
|
950
950
|
}
|
|
951
951
|
);
|
|
952
|
-
}), jt = R((a,
|
|
952
|
+
}), jt = R((a, o) => {
|
|
953
953
|
const { className: i, children: n, ...l } = a;
|
|
954
|
-
return x(l), /* @__PURE__ */
|
|
954
|
+
return x(l), /* @__PURE__ */ s.jsx(
|
|
955
955
|
"div",
|
|
956
956
|
{
|
|
957
957
|
className: T("bn-ak-menu-item", i || ""),
|
|
958
|
-
ref:
|
|
959
|
-
children: /* @__PURE__ */
|
|
958
|
+
ref: o,
|
|
959
|
+
children: /* @__PURE__ */ s.jsx("div", { className: "bn-ak-suggestion-menu-item-label", children: n })
|
|
960
960
|
}
|
|
961
961
|
);
|
|
962
|
-
}), Et = R((a,
|
|
962
|
+
}), Et = R((a, o) => {
|
|
963
963
|
const { className: i, children: n, ...l } = a;
|
|
964
|
-
return x(l), /* @__PURE__ */
|
|
964
|
+
return x(l), /* @__PURE__ */ s.jsx(
|
|
965
965
|
"div",
|
|
966
966
|
{
|
|
967
967
|
className: T("bn-ak-group-label", i || ""),
|
|
968
|
-
ref:
|
|
968
|
+
ref: o,
|
|
969
969
|
children: n
|
|
970
970
|
}
|
|
971
971
|
);
|
|
972
|
-
}), Tt = R((a,
|
|
972
|
+
}), Tt = R((a, o) => {
|
|
973
973
|
const { className: i, children: n, ...l } = a;
|
|
974
|
-
return x(l), /* @__PURE__ */
|
|
975
|
-
}), _t = R((a,
|
|
974
|
+
return x(l), /* @__PURE__ */ s.jsx("div", { className: i, ref: o, children: n });
|
|
975
|
+
}), _t = R((a, o) => {
|
|
976
976
|
const {
|
|
977
977
|
className: i,
|
|
978
978
|
children: n,
|
|
@@ -983,14 +983,14 @@ const tt = (a) => {
|
|
|
983
983
|
label: u,
|
|
984
984
|
...p
|
|
985
985
|
} = a;
|
|
986
|
-
return x(p, !1), /* @__PURE__ */
|
|
986
|
+
return x(p, !1), /* @__PURE__ */ s.jsx(
|
|
987
987
|
oe,
|
|
988
988
|
{
|
|
989
989
|
className: T(
|
|
990
990
|
"bn-ak-button bn-ak-secondary",
|
|
991
991
|
i || ""
|
|
992
992
|
),
|
|
993
|
-
ref:
|
|
993
|
+
ref: o,
|
|
994
994
|
"aria-label": u,
|
|
995
995
|
draggable: l,
|
|
996
996
|
onDragStart: f,
|
|
@@ -1001,13 +1001,13 @@ const tt = (a) => {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
);
|
|
1003
1003
|
}), Fe = R(
|
|
1004
|
-
(a,
|
|
1004
|
+
(a, o) => {
|
|
1005
1005
|
const { className: i, children: n, onMouseEnter: l, onMouseLeave: f, ...v } = a;
|
|
1006
|
-
return x(v), /* @__PURE__ */
|
|
1007
|
-
|
|
1006
|
+
return x(v), /* @__PURE__ */ s.jsx(
|
|
1007
|
+
Ur,
|
|
1008
1008
|
{
|
|
1009
1009
|
className: T("bn-ak-toolbar", i || ""),
|
|
1010
|
-
ref:
|
|
1010
|
+
ref: o,
|
|
1011
1011
|
onMouseEnter: l,
|
|
1012
1012
|
onMouseLeave: f,
|
|
1013
1013
|
children: n
|
|
@@ -1015,7 +1015,7 @@ const tt = (a) => {
|
|
|
1015
1015
|
);
|
|
1016
1016
|
}
|
|
1017
1017
|
), Me = R(
|
|
1018
|
-
(a,
|
|
1018
|
+
(a, o) => {
|
|
1019
1019
|
const {
|
|
1020
1020
|
className: i,
|
|
1021
1021
|
children: n,
|
|
@@ -1028,12 +1028,12 @@ const tt = (a) => {
|
|
|
1028
1028
|
label: y,
|
|
1029
1029
|
..._
|
|
1030
1030
|
} = a;
|
|
1031
|
-
return x(_, !1), /* @__PURE__ */
|
|
1032
|
-
/* @__PURE__ */
|
|
1033
|
-
|
|
1031
|
+
return x(_, !1), /* @__PURE__ */ s.jsxs(Kr, { children: [
|
|
1032
|
+
/* @__PURE__ */ s.jsx(
|
|
1033
|
+
Gr,
|
|
1034
1034
|
{
|
|
1035
1035
|
className: "link",
|
|
1036
|
-
render: /* @__PURE__ */
|
|
1036
|
+
render: /* @__PURE__ */ s.jsxs(
|
|
1037
1037
|
We,
|
|
1038
1038
|
{
|
|
1039
1039
|
"aria-label": y,
|
|
@@ -1042,14 +1042,14 @@ const tt = (a) => {
|
|
|
1042
1042
|
i || ""
|
|
1043
1043
|
),
|
|
1044
1044
|
onMouseDown: (w) => {
|
|
1045
|
-
|
|
1045
|
+
kr() && w.currentTarget.focus();
|
|
1046
1046
|
},
|
|
1047
1047
|
onClick: p,
|
|
1048
1048
|
"aria-pressed": g,
|
|
1049
1049
|
"data-selected": g ? "true" : void 0,
|
|
1050
1050
|
"data-test": a.mainTooltip.slice(0, 1).toLowerCase() + a.mainTooltip.replace(/\s+/g, "").slice(1),
|
|
1051
1051
|
disabled: u || !1,
|
|
1052
|
-
ref:
|
|
1052
|
+
ref: o,
|
|
1053
1053
|
..._,
|
|
1054
1054
|
children: [
|
|
1055
1055
|
v,
|
|
@@ -1059,51 +1059,51 @@ const tt = (a) => {
|
|
|
1059
1059
|
)
|
|
1060
1060
|
}
|
|
1061
1061
|
),
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
/* @__PURE__ */
|
|
1064
|
-
f && /* @__PURE__ */
|
|
1062
|
+
/* @__PURE__ */ s.jsxs(Jr, { className: "bn-ak-tooltip", children: [
|
|
1063
|
+
/* @__PURE__ */ s.jsx("span", { children: l }),
|
|
1064
|
+
f && /* @__PURE__ */ s.jsx("span", { children: f })
|
|
1065
1065
|
] })
|
|
1066
1066
|
] });
|
|
1067
1067
|
}
|
|
1068
|
-
), kt = R((a,
|
|
1068
|
+
), kt = R((a, o) => {
|
|
1069
1069
|
const { className: i, items: n, isDisabled: l, ...f } = a;
|
|
1070
1070
|
x(f);
|
|
1071
1071
|
const v = a.items.filter((u) => u.isSelected)[0], g = (u) => {
|
|
1072
1072
|
var p, y;
|
|
1073
1073
|
(y = (p = n.find((_) => _.text === u)).onClick) == null || y.call(p);
|
|
1074
1074
|
};
|
|
1075
|
-
return /* @__PURE__ */
|
|
1076
|
-
/* @__PURE__ */
|
|
1077
|
-
|
|
1075
|
+
return /* @__PURE__ */ s.jsxs(qr, { value: v.text, setValue: g, children: [
|
|
1076
|
+
/* @__PURE__ */ s.jsxs(
|
|
1077
|
+
Hr,
|
|
1078
1078
|
{
|
|
1079
1079
|
className: "bn-ak-button bn-ak-secondary",
|
|
1080
1080
|
disabled: l,
|
|
1081
1081
|
"aria-label": "Text alignment",
|
|
1082
|
-
render: /* @__PURE__ */
|
|
1082
|
+
render: /* @__PURE__ */ s.jsx(We, {}),
|
|
1083
1083
|
children: [
|
|
1084
1084
|
v.icon,
|
|
1085
1085
|
" ",
|
|
1086
1086
|
v.text,
|
|
1087
1087
|
" ",
|
|
1088
|
-
/* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ s.jsx(zr, {})
|
|
1089
1089
|
]
|
|
1090
1090
|
}
|
|
1091
1091
|
),
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
-
|
|
1092
|
+
/* @__PURE__ */ s.jsx(
|
|
1093
|
+
Xr,
|
|
1094
1094
|
{
|
|
1095
1095
|
className: T("bn-ak-popover", i || ""),
|
|
1096
|
-
ref:
|
|
1096
|
+
ref: o,
|
|
1097
1097
|
gutter: 4,
|
|
1098
|
-
children: n.map((u) => /* @__PURE__ */
|
|
1099
|
-
|
|
1098
|
+
children: n.map((u) => /* @__PURE__ */ s.jsxs(
|
|
1099
|
+
Zr,
|
|
1100
1100
|
{
|
|
1101
1101
|
className: "bn-ak-select-item",
|
|
1102
1102
|
value: u.text,
|
|
1103
1103
|
children: [
|
|
1104
1104
|
u.icon,
|
|
1105
1105
|
u.text,
|
|
1106
|
-
u.text === v.text && /* @__PURE__ */
|
|
1106
|
+
u.text === v.text && /* @__PURE__ */ s.jsx(Qr, {})
|
|
1107
1107
|
]
|
|
1108
1108
|
},
|
|
1109
1109
|
u.text
|
|
@@ -1162,7 +1162,16 @@ const St = {
|
|
|
1162
1162
|
Content: bt
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
|
-
}, Ot = (a) =>
|
|
1165
|
+
}, Ot = (a) => {
|
|
1166
|
+
const { className: o, ...i } = a;
|
|
1167
|
+
return /* @__PURE__ */ s.jsx(Cr.Provider, { value: St, children: /* @__PURE__ */ s.jsx(
|
|
1168
|
+
wr,
|
|
1169
|
+
{
|
|
1170
|
+
className: T("bn-ariakit", o || ""),
|
|
1171
|
+
...i
|
|
1172
|
+
}
|
|
1173
|
+
) });
|
|
1174
|
+
};
|
|
1166
1175
|
export {
|
|
1167
1176
|
Ot as BlockNoteView,
|
|
1168
1177
|
St as components
|