@blocknote/ariakit 0.15.3 → 0.15.5

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 y, useRef as Le, useEffect as $e } from "react";
2
2
  import { assertEmpty as b, mergeCSSClasses as E, isSafari as Pr } from "@blocknote/core";
3
3
  import { elementOverflow as We, mergeRefs as Ve, 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 Ye, MenuItem as Ne, MenuButtonArrow as Ir, CheckboxCheck as Oe, MenuGroupLabel as Dr, MenuSeparator as Mr, MenuProvider as Fr, TabProvider as Ar, TabList as Lr, Tab as $r, TabPanel as Wr, Button as se, PopoverDisclosure as Vr, Popover as Yr, PopoverProvider as Br, Group as Be, Toolbar as Ur, TooltipProvider as Gr, TooltipAnchor as Kr, ToolbarItem as Ue, Tooltip as Jr, SelectProvider as qr, Select as Hr, SelectArrow as zr, SelectPopover as Xr, SelectItem as Zr, SelectItemCheck as Qr } from "@ariakit/react";
4
+ import { FormProvider as ne, FormLabel as Nr, FormInput as ae, Menu as Or, MenuButton as Ye, MenuItem as Ne, MenuButtonArrow as Ir, CheckboxCheck as Oe, MenuGroupLabel as Dr, MenuSeparator as Mr, MenuProvider as Fr, TabProvider as Ar, TabList as Lr, Tab as $r, TabPanel as Wr, Button as se, PopoverDisclosure as Vr, Popover as Yr, PopoverProvider as Br, Group as Be, Toolbar as Ur, TooltipProvider as Gr, TooltipAnchor as qr, ToolbarItem as Ue, Tooltip as Kr, SelectProvider as Jr, 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
@@ -40,7 +40,7 @@ var De;
40
40
  function rt() {
41
41
  return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
42
42
  var n = Ae, a = Symbol.for("react.element"), o = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), g = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), oe = Symbol.iterator, Ge = "@@iterator";
43
- function Ke(e) {
43
+ function qe(e) {
44
44
  if (e === null || typeof e != "object")
45
45
  return null;
46
46
  var r = oe && e[oe] || e[Ge];
@@ -51,10 +51,10 @@ function rt() {
51
51
  {
52
52
  for (var r = arguments.length, s = new Array(r > 1 ? r - 1 : 0), f = 1; f < r; f++)
53
53
  s[f - 1] = arguments[f];
54
- Je("error", e, s);
54
+ Ke("error", e, s);
55
55
  }
56
56
  }
57
- function Je(e, r, s) {
57
+ function Ke(e, r, s) {
58
58
  {
59
59
  var f = D.ReactDebugCurrentFrame, h = f.getStackAddendum();
60
60
  h !== "" && (r += "%s", s = s.concat([h]));
@@ -64,10 +64,10 @@ function rt() {
64
64
  x.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, x);
65
65
  }
66
66
  }
67
- var qe = !1, He = !1, ze = !1, Xe = !1, Ze = !1, ie;
67
+ var Je = !1, He = !1, ze = !1, Xe = !1, Ze = !1, ie;
68
68
  ie = Symbol.for("react.module.reference");
69
69
  function Qe(e) {
70
- return !!(typeof e == "string" || typeof e == "function" || e === t || e === u || Ze || e === l || e === v || e === j || Xe || e === Y || qe || He || ze || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === _ || e.$$typeof === d || e.$$typeof === g || e.$$typeof === c || // This needs to include all possible module reference object
70
+ return !!(typeof e == "string" || typeof e == "function" || e === t || e === u || Ze || e === l || e === v || e === j || Xe || e === Y || Je || He || ze || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === _ || e.$$typeof === d || e.$$typeof === g || e.$$typeof === c || // This needs to include all possible module reference object
71
71
  // types supported by any Flight configuration anywhere since
72
72
  // we don't know which Flight build this will end up being used
73
73
  // with.
@@ -190,18 +190,18 @@ function rt() {
190
190
  A < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
191
191
  }
192
192
  }
193
- var J = D.ReactCurrentDispatcher, q;
193
+ var K = D.ReactCurrentDispatcher, J;
194
194
  function B(e, r, s) {
195
195
  {
196
- if (q === void 0)
196
+ if (J === void 0)
197
197
  try {
198
198
  throw Error();
199
199
  } catch (h) {
200
200
  var f = h.stack.trim().match(/\n( *(at )?)/);
201
- q = f && f[1] || "";
201
+ J = f && f[1] || "";
202
202
  }
203
203
  return `
204
- ` + q + e;
204
+ ` + J + e;
205
205
  }
206
206
  }
207
207
  var H = !1, U;
@@ -222,7 +222,7 @@ function rt() {
222
222
  var h = Error.prepareStackTrace;
223
223
  Error.prepareStackTrace = void 0;
224
224
  var x;
225
- x = J.current, J.current = null, rr();
225
+ x = K.current, K.current = null, rr();
226
226
  try {
227
227
  if (r) {
228
228
  var p = function() {
@@ -275,7 +275,7 @@ function rt() {
275
275
  }
276
276
  }
277
277
  } finally {
278
- H = !1, J.current = x, tr(), Error.prepareStackTrace = h;
278
+ H = !1, K.current = x, tr(), Error.prepareStackTrace = h;
279
279
  }
280
280
  var F = e ? e.displayName || e.name : "", I = F ? B(F) : "";
281
281
  return typeof e == "function" && U.set(e, I), I;
@@ -317,7 +317,7 @@ function rt() {
317
317
  return "";
318
318
  }
319
319
  var L = Object.prototype.hasOwnProperty, he = {}, xe = D.ReactDebugCurrentFrame;
320
- function K(e) {
320
+ function q(e) {
321
321
  if (e) {
322
322
  var r = e._owner, s = G(e.type, e._source, r ? r.type : null);
323
323
  xe.setExtraStackFrame(s);
@@ -339,7 +339,7 @@ function rt() {
339
339
  } catch (R) {
340
340
  m = R;
341
341
  }
342
- m && !(m instanceof Error) && (K(h), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", f || "React class", s, p, typeof m), K(null)), m instanceof Error && !(m.message in he) && (he[m.message] = !0, K(h), k("Failed %s type: %s", s, m.message), K(null));
342
+ m && !(m instanceof Error) && (q(h), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", f || "React class", s, p, typeof m), q(null)), m instanceof Error && !(m.message in he) && (he[m.message] = !0, q(h), k("Failed %s type: %s", s, m.message), q(null));
343
343
  }
344
344
  }
345
345
  }
@@ -531,7 +531,7 @@ Check the top-level render call using <` + s + ">.");
531
531
  else if (ee(e))
532
532
  e._store && (e._store.validated = !0);
533
533
  else if (e) {
534
- var h = Ke(e);
534
+ var h = qe(e);
535
535
  if (typeof h == "function" && h !== e.entries)
536
536
  for (var x = h.call(e), p; !(p = x.next()).done; )
537
537
  ee(p.value) && Se(p.value, r);
@@ -666,7 +666,10 @@ const tt = (n) => {
666
666
  return $e(() => {
667
667
  if (!c.current || !t)
668
668
  return;
669
- const v = We(c.current);
669
+ const v = We(
670
+ c.current,
671
+ document.querySelector(".bn-grid-suggestion-menu")
672
+ );
670
673
  v === "top" ? c.current.scrollIntoView(!0) : v === "bottom" && c.current.scrollIntoView(!1);
671
674
  }, [t]), /* @__PURE__ */ i.jsx(
672
675
  "div",
@@ -964,7 +967,10 @@ const tt = (n) => {
964
967
  return $e(() => {
965
968
  if (!c.current || !l)
966
969
  return;
967
- const v = We(c.current);
970
+ const v = We(
971
+ c.current,
972
+ document.querySelector(".bn-suggestion-menu")
973
+ );
968
974
  v === "top" ? c.current.scrollIntoView(!0) : v === "bottom" && c.current.scrollIntoView(!1);
969
975
  }, [l]), /* @__PURE__ */ i.jsxs(
970
976
  "div",
@@ -1080,7 +1086,7 @@ const tt = (n) => {
1080
1086
  } = n;
1081
1087
  return b(_, !1), /* @__PURE__ */ i.jsxs(Gr, { children: [
1082
1088
  /* @__PURE__ */ i.jsx(
1083
- Kr,
1089
+ qr,
1084
1090
  {
1085
1091
  className: "link",
1086
1092
  render: /* @__PURE__ */ i.jsxs(
@@ -1109,7 +1115,7 @@ const tt = (n) => {
1109
1115
  )
1110
1116
  }
1111
1117
  ),
1112
- /* @__PURE__ */ i.jsxs(Jr, { className: "bn-ak-tooltip", children: [
1118
+ /* @__PURE__ */ i.jsxs(Kr, { className: "bn-ak-tooltip", children: [
1113
1119
  /* @__PURE__ */ i.jsx("span", { children: l }),
1114
1120
  u && /* @__PURE__ */ i.jsx("span", { children: u })
1115
1121
  ] })
@@ -1122,7 +1128,7 @@ const tt = (n) => {
1122
1128
  var v, j;
1123
1129
  (j = (v = t.find((_) => _.text === c)).onClick) == null || j.call(v);
1124
1130
  };
1125
- return /* @__PURE__ */ i.jsxs(qr, { value: d.text, setValue: g, children: [
1131
+ return /* @__PURE__ */ i.jsxs(Jr, { value: d.text, setValue: g, children: [
1126
1132
  /* @__PURE__ */ i.jsxs(
1127
1133
  Hr,
1128
1134
  {