@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.
@@ -1,7 +1,7 @@
1
1
  import Ae, { forwardRef as R, useRef as Tr, useEffect as _r } from "react";
2
- import { elementOverflow as kr, mergeRefs as Sr, ComponentsContext as Pr, BlockNoteViewRaw as Cr } from "@blocknote/react";
3
- import { FormProvider as ne, FormLabel as wr, FormInput as ae, Menu as Nr, MenuButton as Le, MenuItem as Ne, MenuButtonArrow as Or, CheckboxCheck as Oe, MenuGroupLabel as Dr, MenuSeparator as Ir, MenuProvider as Fr, TabProvider as Mr, TabList as Ar, Tab as Lr, TabPanel as $r, Button as oe, PopoverDisclosure as Wr, Popover as Yr, PopoverProvider as Vr, Group as $e, Toolbar as Br, TooltipProvider as Ur, TooltipAnchor as Kr, ToolbarItem as We, Tooltip as Gr, SelectProvider as Jr, Select as qr, SelectArrow as Hr, SelectPopover as zr, SelectItem as Xr, SelectItemCheck as Zr } from "@ariakit/react";
4
- import { assertEmpty as x, mergeCSSClasses as T, isSafari as Qr } from "@blocknote/core";
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, s = 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 };
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: s, type: g, key: w, ref: V, props: _, _owner: l.current };
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, s = 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";
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: s,
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 === s;
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 === s ? (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);
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 o = te.exports;
646
+ var s = te.exports;
647
647
  const tt = (a) => {
648
- const { children: s, ...i } = a;
649
- return x(i), /* @__PURE__ */ o.jsx(ne, { children: s });
650
- }, nt = R((a, s) => {
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__ */ o.jsxs(o.Fragment, { children: [
665
- a.label && /* @__PURE__ */ o.jsx(wr, { name: n, children: l }),
666
- /* @__PURE__ */ o.jsxs("div", { className: "bn-ak-input-wrapper", children: [
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__ */ o.jsx(
668
+ /* @__PURE__ */ s.jsx(
669
669
  ae,
670
670
  {
671
671
  className: T("bn-ak-input", i || ""),
672
- ref: s,
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: s,
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__ */ o.jsx(
694
- Fr,
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: s
699
+ children: o
700
700
  }
701
701
  );
702
- }, ot = R((a, s) => {
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__ */ o.jsx(
711
- Nr,
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: s,
715
+ ref: o,
716
716
  children: n
717
717
  }
718
718
  );
719
- }), st = R((a, s) => {
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__ */ o.jsxs(
721
+ return x(u), v ? /* @__PURE__ */ s.jsxs(
722
722
  Le,
723
723
  {
724
- render: /* @__PURE__ */ o.jsx(Ne, {}),
724
+ render: /* @__PURE__ */ s.jsx(Ne, {}),
725
725
  className: T("bn-ak-menu-item", i || ""),
726
- ref: s,
726
+ ref: o,
727
727
  onClick: g,
728
728
  children: [
729
729
  l,
730
730
  n,
731
- /* @__PURE__ */ o.jsx(Or, {}),
732
- f !== void 0 && /* @__PURE__ */ o.jsx(Oe, { checked: f })
731
+ /* @__PURE__ */ s.jsx(Dr, {}),
732
+ f !== void 0 && /* @__PURE__ */ s.jsx(Oe, { checked: f })
733
733
  ]
734
734
  }
735
- ) : /* @__PURE__ */ o.jsxs(
735
+ ) : /* @__PURE__ */ s.jsxs(
736
736
  Ne,
737
737
  {
738
738
  className: T("bn-ak-menu-item", i || ""),
739
- ref: s,
739
+ ref: o,
740
740
  onClick: g,
741
741
  children: [
742
742
  l,
743
743
  n,
744
- f !== void 0 && /* @__PURE__ */ o.jsx(Oe, { checked: f })
744
+ f !== void 0 && /* @__PURE__ */ s.jsx(Oe, { checked: f })
745
745
  ]
746
746
  }
747
747
  );
748
- }), it = R((a, s) => {
748
+ }), it = R((a, o) => {
749
749
  const { className: i, children: n, ...l } = a;
750
- return x(l), /* @__PURE__ */ o.jsx(
751
- Dr,
750
+ return x(l), /* @__PURE__ */ s.jsx(
751
+ Ir,
752
752
  {
753
753
  className: T("bn-ak-group-label", i || ""),
754
- ref: s,
754
+ ref: o,
755
755
  children: n
756
756
  }
757
757
  );
758
758
  }), lt = (a) => {
759
- const { children: s, sub: i, ...n } = a;
760
- return x(n), i ? s : /* @__PURE__ */ o.jsx(Le, { render: s });
761
- }, ct = R((a, s) => {
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__ */ o.jsx(
764
- Ir,
763
+ return x(n), /* @__PURE__ */ s.jsx(
764
+ Fr,
765
765
  {
766
766
  className: T("bn-ak-separator", i || ""),
767
- ref: s
767
+ ref: o
768
768
  }
769
769
  );
770
- }), ut = R((a, s) => {
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__ */ o.jsx(
781
+ return x(u), /* @__PURE__ */ s.jsx(
782
782
  "div",
783
783
  {
784
784
  className: T("bn-ak-wrapper", i || ""),
785
- ref: s,
786
- children: /* @__PURE__ */ o.jsxs(
787
- Mr,
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__ */ o.jsx(Ar, { className: "bn-ak-tab-list", children: n.map((p) => /* @__PURE__ */ o.jsx(Lr, { className: "bn-ak-tab", id: p.name, children: p.name }, p.name)) }),
796
- /* @__PURE__ */ o.jsx("div", { className: "bn-ak-panels", children: n.map((p) => /* @__PURE__ */ o.jsx($r, { tabId: p.name, children: p.tabPanel }, p.name)) })
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, s) => {
802
+ }), ft = R((a, o) => {
803
803
  const { className: i, children: n, onClick: l, label: f, ...v } = a;
804
- return x(v), /* @__PURE__ */ o.jsx(
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: s,
810
+ ref: o,
811
811
  children: n
812
812
  }
813
813
  );
814
- }), dt = R((a, s) => {
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__ */ o.jsx(ne, { children: /* @__PURE__ */ o.jsx(
816
+ return x(g), /* @__PURE__ */ s.jsx(ne, { children: /* @__PURE__ */ s.jsx(
817
817
  ae,
818
818
  {
819
819
  className: i,
820
- ref: s,
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, s) => {
829
+ }), vt = R((a, o) => {
830
830
  const { className: i, children: n, ...l } = a;
831
- return x(l), /* @__PURE__ */ o.jsx("div", { className: i, ref: s, children: n });
832
- }), mt = R((a, s) => {
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__ */ o.jsx(ne, { children: /* @__PURE__ */ o.jsx(
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: s
844
+ ref: o
845
845
  }
846
846
  ) });
847
- }), pt = R((a, s) => {
847
+ }), pt = R((a, o) => {
848
848
  const { children: i, ...n } = a;
849
- return x(n), /* @__PURE__ */ o.jsx(Wr, { render: i, ref: s });
850
- }), bt = R((a, s) => {
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__ */ o.jsx(
853
- Yr,
852
+ return x(f), /* @__PURE__ */ s.jsx(
853
+ Vr,
854
854
  {
855
855
  className: T("bn-ak-popover", i || ""),
856
- ref: s,
856
+ ref: o,
857
857
  children: n
858
858
  }
859
859
  );
860
860
  }), gt = (a) => {
861
- const { children: s, opened: i, position: n, ...l } = a;
862
- return x(l), /* @__PURE__ */ o.jsx(Vr, { open: i, placement: n, children: s });
863
- }, ht = R((a, s) => {
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__ */ o.jsx($e, { className: i, ref: s, ...l, children: n });
866
- }), xt = R((a, s) => {
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__ */ o.jsxs(
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: s,
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, s) => {
898
+ }), yt = R((a, o) => {
899
899
  const { className: i, children: n, id: l, ...f } = a;
900
- return x(f), /* @__PURE__ */ o.jsx(
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: s,
906
+ ref: o,
907
907
  children: n
908
908
  }
909
909
  );
910
- }), Rt = R((a, s) => {
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 = kr(u.current);
917
+ const p = Sr(u.current);
918
918
  p === "top" ? u.current.scrollIntoView(!0) : p === "bottom" && u.current.scrollIntoView(!1);
919
- }, [l]), /* @__PURE__ */ o.jsxs(
919
+ }, [l]), /* @__PURE__ */ s.jsxs(
920
920
  "div",
921
921
  {
922
922
  className: T("bn-ak-menu-item", i || ""),
923
- ref: Sr([s, u]),
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__ */ o.jsx(
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__ */ o.jsxs("div", { className: "bn-ak-suggestion-menu-item-body", children: [
938
- /* @__PURE__ */ o.jsx("div", { className: "bn-ak-suggestion-menu-item-title", children: n.title }),
939
- /* @__PURE__ */ o.jsx("div", { className: "bn-ak-suggestion-menu-item-subtitle", children: n.subtext })
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__ */ o.jsx(
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__ */ o.jsx("div", { children: n.badge })
946
+ children: /* @__PURE__ */ s.jsx("div", { children: n.badge })
947
947
  }
948
948
  )
949
949
  ]
950
950
  }
951
951
  );
952
- }), jt = R((a, s) => {
952
+ }), jt = R((a, o) => {
953
953
  const { className: i, children: n, ...l } = a;
954
- return x(l), /* @__PURE__ */ o.jsx(
954
+ return x(l), /* @__PURE__ */ s.jsx(
955
955
  "div",
956
956
  {
957
957
  className: T("bn-ak-menu-item", i || ""),
958
- ref: s,
959
- children: /* @__PURE__ */ o.jsx("div", { className: "bn-ak-suggestion-menu-item-label", children: n })
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, s) => {
962
+ }), Et = R((a, o) => {
963
963
  const { className: i, children: n, ...l } = a;
964
- return x(l), /* @__PURE__ */ o.jsx(
964
+ return x(l), /* @__PURE__ */ s.jsx(
965
965
  "div",
966
966
  {
967
967
  className: T("bn-ak-group-label", i || ""),
968
- ref: s,
968
+ ref: o,
969
969
  children: n
970
970
  }
971
971
  );
972
- }), Tt = R((a, s) => {
972
+ }), Tt = R((a, o) => {
973
973
  const { className: i, children: n, ...l } = a;
974
- return x(l), /* @__PURE__ */ o.jsx("div", { className: i, ref: s, children: n });
975
- }), _t = R((a, s) => {
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__ */ o.jsx(
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: s,
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, s) => {
1004
+ (a, o) => {
1005
1005
  const { className: i, children: n, onMouseEnter: l, onMouseLeave: f, ...v } = a;
1006
- return x(v), /* @__PURE__ */ o.jsx(
1007
- Br,
1006
+ return x(v), /* @__PURE__ */ s.jsx(
1007
+ Ur,
1008
1008
  {
1009
1009
  className: T("bn-ak-toolbar", i || ""),
1010
- ref: s,
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, s) => {
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__ */ o.jsxs(Ur, { children: [
1032
- /* @__PURE__ */ o.jsx(
1033
- Kr,
1031
+ return x(_, !1), /* @__PURE__ */ s.jsxs(Kr, { children: [
1032
+ /* @__PURE__ */ s.jsx(
1033
+ Gr,
1034
1034
  {
1035
1035
  className: "link",
1036
- render: /* @__PURE__ */ o.jsxs(
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
- Qr() && w.currentTarget.focus();
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: s,
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__ */ o.jsxs(Gr, { className: "bn-ak-tooltip", children: [
1063
- /* @__PURE__ */ o.jsx("span", { children: l }),
1064
- f && /* @__PURE__ */ o.jsx("span", { children: f })
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, s) => {
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__ */ o.jsxs(Jr, { value: v.text, setValue: g, children: [
1076
- /* @__PURE__ */ o.jsxs(
1077
- qr,
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__ */ o.jsx(We, {}),
1082
+ render: /* @__PURE__ */ s.jsx(We, {}),
1083
1083
  children: [
1084
1084
  v.icon,
1085
1085
  " ",
1086
1086
  v.text,
1087
1087
  " ",
1088
- /* @__PURE__ */ o.jsx(Hr, {})
1088
+ /* @__PURE__ */ s.jsx(zr, {})
1089
1089
  ]
1090
1090
  }
1091
1091
  ),
1092
- /* @__PURE__ */ o.jsx(
1093
- zr,
1092
+ /* @__PURE__ */ s.jsx(
1093
+ Xr,
1094
1094
  {
1095
1095
  className: T("bn-ak-popover", i || ""),
1096
- ref: s,
1096
+ ref: o,
1097
1097
  gutter: 4,
1098
- children: n.map((u) => /* @__PURE__ */ o.jsxs(
1099
- Xr,
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__ */ o.jsx(Zr, {})
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) => /* @__PURE__ */ o.jsx(Pr.Provider, { value: St, children: /* @__PURE__ */ o.jsx(Cr, { ...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