@blocknote/ariakit 0.14.6 → 0.15.2

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 (37) hide show
  1. package/dist/blocknote-ariakit.js +616 -561
  2. package/dist/blocknote-ariakit.js.map +1 -1
  3. package/dist/blocknote-ariakit.umd.cjs +10 -12
  4. package/dist/blocknote-ariakit.umd.cjs.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/dist/webpack-stats.json +1 -1
  7. package/package.json +7 -7
  8. package/src/index.tsx +10 -0
  9. package/src/style.css +105 -52
  10. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx +23 -0
  11. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx +21 -0
  12. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx +40 -0
  13. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx +26 -0
  14. package/types/src/index.d.ts +2 -2
  15. package/types/src/input/TextInput.d.ts +4 -5
  16. package/types/src/menu/Menu.d.ts +8 -9
  17. package/types/src/panel/Panel.d.ts +1 -2
  18. package/types/src/panel/PanelButton.d.ts +2 -3
  19. package/types/src/panel/PanelFileInput.d.ts +1 -2
  20. package/types/src/panel/PanelTab.d.ts +1 -2
  21. package/types/src/panel/PanelTextInput.d.ts +2 -3
  22. package/types/src/popover/Popover.d.ts +1 -2
  23. package/types/src/sideMenu/SideMenu.d.ts +1 -2
  24. package/types/src/sideMenu/SideMenuButton.d.ts +6 -7
  25. package/types/src/suggestionMenu/SuggestionMenu.d.ts +1 -2
  26. package/types/src/suggestionMenu/SuggestionMenuEmptyItem.d.ts +1 -2
  27. package/types/src/suggestionMenu/SuggestionMenuItem.d.ts +1 -2
  28. package/types/src/suggestionMenu/SuggestionMenuLabel.d.ts +1 -2
  29. package/types/src/suggestionMenu/SuggestionMenuLoader.d.ts +1 -2
  30. package/types/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.d.ts +6 -0
  31. package/types/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.d.ts +5 -0
  32. package/types/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.d.ts +7 -0
  33. package/types/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.d.ts +5 -0
  34. package/types/src/tableHandle/TableHandle.d.ts +4 -5
  35. package/types/src/toolbar/Toolbar.d.ts +4 -5
  36. package/types/src/toolbar/ToolbarButton.d.ts +0 -1
  37. package/types/src/toolbar/ToolbarSelect.d.ts +3 -4
@@ -1,7 +1,7 @@
1
- import Ae, { forwardRef as R, useRef as Tr, useEffect as _r } from "react";
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";
1
+ import Ae, { forwardRef as y, useRef as Le, useEffect as $e } from "react";
2
+ import { assertEmpty as b, mergeCSSClasses as E, isSafari as Pr } from "@blocknote/core";
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";
5
5
  var te = { exports: {} }, W = {};
6
6
  /**
7
7
  * @license React
@@ -12,25 +12,21 @@ var te = { exports: {} }, W = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var De;
15
+ var Ie;
16
16
  function et() {
17
- if (De)
18
- return W;
19
- De = 1;
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
- function v(g, u, p) {
22
- var y, _ = {}, w = null, V = null;
23
- p !== void 0 && (w = "" + p), u.key !== void 0 && (w = "" + u.key), u.ref !== void 0 && (V = u.ref);
24
- for (y in u)
25
- n.call(u, y) && !f.hasOwnProperty(y) && (_[y] = u[y]);
26
- if (g && g.defaultProps)
27
- for (y in u = g.defaultProps, u)
28
- _[y] === void 0 && (_[y] = u[y]);
29
- return { $$typeof: o, type: g, key: w, ref: V, props: _, _owner: l.current };
17
+ if (Ie) return W;
18
+ Ie = 1;
19
+ var n = Ae, a = Symbol.for("react.element"), o = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, l = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
20
+ function d(g, c, v) {
21
+ var j, _ = {}, w = null, Y = null;
22
+ v !== void 0 && (w = "" + v), c.key !== void 0 && (w = "" + c.key), c.ref !== void 0 && (Y = c.ref);
23
+ for (j in c) t.call(c, j) && !u.hasOwnProperty(j) && (_[j] = c[j]);
24
+ if (g && g.defaultProps) for (j in c = g.defaultProps, c) _[j] === void 0 && (_[j] = c[j]);
25
+ return { $$typeof: a, type: g, key: w, ref: Y, props: _, _owner: l.current };
30
26
  }
31
- return W.Fragment = i, W.jsx = v, W.jsxs = v, W;
27
+ return W.Fragment = o, W.jsx = d, W.jsxs = d, W;
32
28
  }
33
- var Y = {};
29
+ var V = {};
34
30
  /**
35
31
  * @license React
36
32
  * react-jsx-runtime.development.js
@@ -40,49 +36,49 @@ var Y = {};
40
36
  * This source code is licensed under the MIT license found in the
41
37
  * LICENSE file in the root directory of this source tree.
42
38
  */
43
- var Ie;
39
+ var De;
44
40
  function rt() {
45
- return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
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
- function Ve(e) {
41
+ return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
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) {
48
44
  if (e === null || typeof e != "object")
49
45
  return null;
50
- var r = se && e[se] || e[Ye];
46
+ var r = oe && e[oe] || e[Ge];
51
47
  return typeof r == "function" ? r : null;
52
48
  }
53
- var I = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
49
+ var D = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
54
50
  function k(e) {
55
51
  {
56
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
57
- t[c - 1] = arguments[c];
58
- Be("error", e, t);
52
+ for (var r = arguments.length, s = new Array(r > 1 ? r - 1 : 0), f = 1; f < r; f++)
53
+ s[f - 1] = arguments[f];
54
+ Je("error", e, s);
59
55
  }
60
56
  }
61
- function Be(e, r, t) {
57
+ function Je(e, r, s) {
62
58
  {
63
- var c = I.ReactDebugCurrentFrame, b = c.getStackAddendum();
64
- b !== "" && (r += "%s", t = t.concat([b]));
65
- var h = t.map(function(m) {
66
- return String(m);
59
+ var f = D.ReactDebugCurrentFrame, h = f.getStackAddendum();
60
+ h !== "" && (r += "%s", s = s.concat([h]));
61
+ var x = s.map(function(p) {
62
+ return String(p);
67
63
  });
68
- h.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, h);
64
+ x.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, x);
69
65
  }
70
66
  }
71
- var Ue = !1, Ke = !1, Ge = !1, Je = !1, qe = !1, ie;
67
+ var qe = !1, He = !1, ze = !1, Xe = !1, Ze = !1, ie;
72
68
  ie = Symbol.for("react.module.reference");
73
- function He(e) {
74
- return !!(typeof e == "string" || typeof e == "function" || e === n || e === f || qe || e === l || e === p || e === y || Je || e === V || Ue || Ke || Ge || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === g || e.$$typeof === u || // This needs to include all possible module reference object
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
75
71
  // types supported by any Flight configuration anywhere since
76
72
  // we don't know which Flight build this will end up being used
77
73
  // with.
78
74
  e.$$typeof === ie || e.getModuleId !== void 0));
79
75
  }
80
- function ze(e, r, t) {
81
- var c = e.displayName;
82
- if (c)
83
- return c;
84
- var b = r.displayName || r.name || "";
85
- return b !== "" ? t + "(" + b + ")" : t;
76
+ function er(e, r, s) {
77
+ var f = e.displayName;
78
+ if (f)
79
+ return f;
80
+ var h = r.displayName || r.name || "";
81
+ return h !== "" ? s + "(" + h + ")" : s;
86
82
  }
87
83
  function le(e) {
88
84
  return e.displayName || "Context";
@@ -95,17 +91,17 @@ function rt() {
95
91
  if (typeof e == "string")
96
92
  return e;
97
93
  switch (e) {
98
- case n:
94
+ case t:
99
95
  return "Fragment";
100
- case i:
96
+ case o:
101
97
  return "Portal";
102
- case f:
98
+ case u:
103
99
  return "Profiler";
104
100
  case l:
105
101
  return "StrictMode";
106
- case p:
102
+ case v:
107
103
  return "Suspense";
108
- case y:
104
+ case j:
109
105
  return "SuspenseList";
110
106
  }
111
107
  if (typeof e == "object")
@@ -113,18 +109,18 @@ function rt() {
113
109
  case g:
114
110
  var r = e;
115
111
  return le(r) + ".Consumer";
116
- case v:
117
- var t = e;
118
- return le(t._context) + ".Provider";
119
- case u:
120
- return ze(e, e.render, "ForwardRef");
112
+ case d:
113
+ var s = e;
114
+ return le(s._context) + ".Provider";
115
+ case c:
116
+ return er(e, e.render, "ForwardRef");
121
117
  case _:
122
- var c = e.displayName || null;
123
- return c !== null ? c : N(e.type) || "Memo";
118
+ var f = e.displayName || null;
119
+ return f !== null ? f : N(e.type) || "Memo";
124
120
  case w: {
125
- var b = e, h = b._payload, m = b._init;
121
+ var h = e, x = h._payload, p = h._init;
126
122
  try {
127
- return N(m(h));
123
+ return N(p(x));
128
124
  } catch {
129
125
  return null;
130
126
  }
@@ -132,14 +128,14 @@ function rt() {
132
128
  }
133
129
  return null;
134
130
  }
135
- var O = Object.assign, A = 0, ce, ue, fe, de, ve, me, pe;
131
+ var O = Object.assign, A = 0, ce, ue, fe, de, me, ve, pe;
136
132
  function be() {
137
133
  }
138
134
  be.__reactDisabledLog = !0;
139
- function Xe() {
135
+ function rr() {
140
136
  {
141
137
  if (A === 0) {
142
- ce = console.log, ue = console.info, fe = console.warn, de = console.error, ve = console.group, me = console.groupCollapsed, pe = console.groupEnd;
138
+ ce = console.log, ue = console.info, fe = console.warn, de = console.error, me = console.group, ve = console.groupCollapsed, pe = console.groupEnd;
143
139
  var e = {
144
140
  configurable: !0,
145
141
  enumerable: !0,
@@ -159,7 +155,7 @@ function rt() {
159
155
  A++;
160
156
  }
161
157
  }
162
- function Ze() {
158
+ function tr() {
163
159
  {
164
160
  if (A--, A === 0) {
165
161
  var e = {
@@ -181,10 +177,10 @@ function rt() {
181
177
  value: de
182
178
  }),
183
179
  group: O({}, e, {
184
- value: ve
180
+ value: me
185
181
  }),
186
182
  groupCollapsed: O({}, e, {
187
- value: me
183
+ value: ve
188
184
  }),
189
185
  groupEnd: O({}, e, {
190
186
  value: pe
@@ -194,15 +190,15 @@ function rt() {
194
190
  A < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
195
191
  }
196
192
  }
197
- var J = I.ReactCurrentDispatcher, q;
198
- function B(e, r, t) {
193
+ var J = D.ReactCurrentDispatcher, q;
194
+ function B(e, r, s) {
199
195
  {
200
196
  if (q === void 0)
201
197
  try {
202
198
  throw Error();
203
- } catch (b) {
204
- var c = b.stack.trim().match(/\n( *(at )?)/);
205
- q = c && c[1] || "";
199
+ } catch (h) {
200
+ var f = h.stack.trim().match(/\n( *(at )?)/);
201
+ q = f && f[1] || "";
206
202
  }
207
203
  return `
208
204
  ` + q + e;
@@ -210,154 +206,154 @@ function rt() {
210
206
  }
211
207
  var H = !1, U;
212
208
  {
213
- var Qe = typeof WeakMap == "function" ? WeakMap : Map;
214
- U = new Qe();
209
+ var nr = typeof WeakMap == "function" ? WeakMap : Map;
210
+ U = new nr();
215
211
  }
216
212
  function ge(e, r) {
217
213
  if (!e || H)
218
214
  return "";
219
215
  {
220
- var t = U.get(e);
221
- if (t !== void 0)
222
- return t;
216
+ var s = U.get(e);
217
+ if (s !== void 0)
218
+ return s;
223
219
  }
224
- var c;
220
+ var f;
225
221
  H = !0;
226
- var b = Error.prepareStackTrace;
222
+ var h = Error.prepareStackTrace;
227
223
  Error.prepareStackTrace = void 0;
228
- var h;
229
- h = J.current, J.current = null, Xe();
224
+ var x;
225
+ x = J.current, J.current = null, rr();
230
226
  try {
231
227
  if (r) {
232
- var m = function() {
228
+ var p = function() {
233
229
  throw Error();
234
230
  };
235
- if (Object.defineProperty(m.prototype, "props", {
231
+ if (Object.defineProperty(p.prototype, "props", {
236
232
  set: function() {
237
233
  throw Error();
238
234
  }
239
235
  }), typeof Reflect == "object" && Reflect.construct) {
240
236
  try {
241
- Reflect.construct(m, []);
237
+ Reflect.construct(p, []);
242
238
  } catch (P) {
243
- c = P;
239
+ f = P;
244
240
  }
245
- Reflect.construct(e, [], m);
241
+ Reflect.construct(e, [], p);
246
242
  } else {
247
243
  try {
248
- m.call();
244
+ p.call();
249
245
  } catch (P) {
250
- c = P;
246
+ f = P;
251
247
  }
252
- e.call(m.prototype);
248
+ e.call(p.prototype);
253
249
  }
254
250
  } else {
255
251
  try {
256
252
  throw Error();
257
253
  } catch (P) {
258
- c = P;
254
+ f = P;
259
255
  }
260
256
  e();
261
257
  }
262
258
  } catch (P) {
263
- if (P && c && typeof P.stack == "string") {
264
- for (var d = P.stack.split(`
265
- `), S = c.stack.split(`
266
- `), j = d.length - 1, E = S.length - 1; j >= 1 && E >= 0 && d[j] !== S[E]; )
267
- E--;
268
- for (; j >= 1 && E >= 0; j--, E--)
269
- if (d[j] !== S[E]) {
270
- if (j !== 1 || E !== 1)
259
+ if (P && f && typeof P.stack == "string") {
260
+ for (var m = P.stack.split(`
261
+ `), S = f.stack.split(`
262
+ `), R = m.length - 1, T = S.length - 1; R >= 1 && T >= 0 && m[R] !== S[T]; )
263
+ T--;
264
+ for (; R >= 1 && T >= 0; R--, T--)
265
+ if (m[R] !== S[T]) {
266
+ if (R !== 1 || T !== 1)
271
267
  do
272
- if (j--, E--, E < 0 || d[j] !== S[E]) {
268
+ if (R--, T--, T < 0 || m[R] !== S[T]) {
273
269
  var C = `
274
- ` + d[j].replace(" at new ", " at ");
270
+ ` + m[R].replace(" at new ", " at ");
275
271
  return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && U.set(e, C), C;
276
272
  }
277
- while (j >= 1 && E >= 0);
273
+ while (R >= 1 && T >= 0);
278
274
  break;
279
275
  }
280
276
  }
281
277
  } finally {
282
- H = !1, J.current = h, Ze(), Error.prepareStackTrace = b;
278
+ H = !1, J.current = x, tr(), Error.prepareStackTrace = h;
283
279
  }
284
- var M = e ? e.displayName || e.name : "", D = M ? B(M) : "";
285
- return typeof e == "function" && U.set(e, D), D;
280
+ var F = e ? e.displayName || e.name : "", I = F ? B(F) : "";
281
+ return typeof e == "function" && U.set(e, I), I;
286
282
  }
287
- function er(e, r, t) {
283
+ function ar(e, r, s) {
288
284
  return ge(e, !1);
289
285
  }
290
- function rr(e) {
286
+ function sr(e) {
291
287
  var r = e.prototype;
292
288
  return !!(r && r.isReactComponent);
293
289
  }
294
- function K(e, r, t) {
290
+ function G(e, r, s) {
295
291
  if (e == null)
296
292
  return "";
297
293
  if (typeof e == "function")
298
- return ge(e, rr(e));
294
+ return ge(e, sr(e));
299
295
  if (typeof e == "string")
300
296
  return B(e);
301
297
  switch (e) {
302
- case p:
298
+ case v:
303
299
  return B("Suspense");
304
- case y:
300
+ case j:
305
301
  return B("SuspenseList");
306
302
  }
307
303
  if (typeof e == "object")
308
304
  switch (e.$$typeof) {
309
- case u:
310
- return er(e.render);
305
+ case c:
306
+ return ar(e.render);
311
307
  case _:
312
- return K(e.type, r, t);
308
+ return G(e.type, r, s);
313
309
  case w: {
314
- var c = e, b = c._payload, h = c._init;
310
+ var f = e, h = f._payload, x = f._init;
315
311
  try {
316
- return K(h(b), r, t);
312
+ return G(x(h), r, s);
317
313
  } catch {
318
314
  }
319
315
  }
320
316
  }
321
317
  return "";
322
318
  }
323
- var L = Object.prototype.hasOwnProperty, he = {}, xe = I.ReactDebugCurrentFrame;
324
- function G(e) {
319
+ var L = Object.prototype.hasOwnProperty, he = {}, xe = D.ReactDebugCurrentFrame;
320
+ function K(e) {
325
321
  if (e) {
326
- var r = e._owner, t = K(e.type, e._source, r ? r.type : null);
327
- xe.setExtraStackFrame(t);
322
+ var r = e._owner, s = G(e.type, e._source, r ? r.type : null);
323
+ xe.setExtraStackFrame(s);
328
324
  } else
329
325
  xe.setExtraStackFrame(null);
330
326
  }
331
- function tr(e, r, t, c, b) {
327
+ function or(e, r, s, f, h) {
332
328
  {
333
- var h = Function.call.bind(L);
334
- for (var m in e)
335
- if (h(e, m)) {
336
- var d = void 0;
329
+ var x = Function.call.bind(L);
330
+ for (var p in e)
331
+ if (x(e, p)) {
332
+ var m = void 0;
337
333
  try {
338
- if (typeof e[m] != "function") {
339
- var S = Error((c || "React class") + ": " + t + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
+ if (typeof e[p] != "function") {
335
+ var S = Error((f || "React class") + ": " + s + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
340
336
  throw S.name = "Invariant Violation", S;
341
337
  }
342
- d = e[m](r, m, c, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
343
- } catch (j) {
344
- d = j;
338
+ m = e[p](r, p, f, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
339
+ } catch (R) {
340
+ m = R;
345
341
  }
346
- d && !(d instanceof Error) && (G(b), 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).", c || "React class", t, m, typeof d), G(null)), d instanceof Error && !(d.message in he) && (he[d.message] = !0, G(b), k("Failed %s type: %s", t, d.message), G(null));
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));
347
343
  }
348
344
  }
349
345
  }
350
- var nr = Array.isArray;
346
+ var ir = Array.isArray;
351
347
  function z(e) {
352
- return nr(e);
348
+ return ir(e);
353
349
  }
354
- function ar(e) {
350
+ function lr(e) {
355
351
  {
356
- var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
357
- return t;
352
+ var r = typeof Symbol == "function" && Symbol.toStringTag, s = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
353
+ return s;
358
354
  }
359
355
  }
360
- function or(e) {
356
+ function cr(e) {
361
357
  try {
362
358
  return ye(e), !1;
363
359
  } catch {
@@ -367,18 +363,18 @@ function rt() {
367
363
  function ye(e) {
368
364
  return "" + e;
369
365
  }
370
- function Re(e) {
371
- if (or(e))
372
- return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ar(e)), ye(e);
366
+ function je(e) {
367
+ if (cr(e))
368
+ return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", lr(e)), ye(e);
373
369
  }
374
- var $ = I.ReactCurrentOwner, sr = {
370
+ var $ = D.ReactCurrentOwner, ur = {
375
371
  key: !0,
376
372
  ref: !0,
377
373
  __self: !0,
378
374
  __source: !0
379
- }, je, Ee, X;
375
+ }, Re, Ee, X;
380
376
  X = {};
381
- function ir(e) {
377
+ function fr(e) {
382
378
  if (L.call(e, "ref")) {
383
379
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
384
380
  if (r && r.isReactWarning)
@@ -386,7 +382,7 @@ function rt() {
386
382
  }
387
383
  return e.ref !== void 0;
388
384
  }
389
- function lr(e) {
385
+ function dr(e) {
390
386
  if (L.call(e, "key")) {
391
387
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
392
388
  if (r && r.isReactWarning)
@@ -394,93 +390,93 @@ function rt() {
394
390
  }
395
391
  return e.key !== void 0;
396
392
  }
397
- function cr(e, r) {
393
+ function mr(e, r) {
398
394
  if (typeof e.ref == "string" && $.current && r && $.current.stateNode !== r) {
399
- var t = N($.current.type);
400
- X[t] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', N($.current.type), e.ref), X[t] = !0);
395
+ var s = N($.current.type);
396
+ X[s] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', N($.current.type), e.ref), X[s] = !0);
401
397
  }
402
398
  }
403
- function ur(e, r) {
399
+ function vr(e, r) {
404
400
  {
405
- var t = function() {
406
- je || (je = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
401
+ var s = function() {
402
+ Re || (Re = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
407
403
  };
408
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
409
- get: t,
404
+ s.isReactWarning = !0, Object.defineProperty(e, "key", {
405
+ get: s,
410
406
  configurable: !0
411
407
  });
412
408
  }
413
409
  }
414
- function fr(e, r) {
410
+ function pr(e, r) {
415
411
  {
416
- var t = function() {
412
+ var s = function() {
417
413
  Ee || (Ee = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
418
414
  };
419
- t.isReactWarning = !0, Object.defineProperty(e, "ref", {
420
- get: t,
415
+ s.isReactWarning = !0, Object.defineProperty(e, "ref", {
416
+ get: s,
421
417
  configurable: !0
422
418
  });
423
419
  }
424
420
  }
425
- var dr = function(e, r, t, c, b, h, m) {
426
- var d = {
421
+ var br = function(e, r, s, f, h, x, p) {
422
+ var m = {
427
423
  // This tag allows us to uniquely identify this as a React Element
428
- $$typeof: o,
424
+ $$typeof: a,
429
425
  // Built-in properties that belong on the element
430
426
  type: e,
431
427
  key: r,
432
- ref: t,
433
- props: m,
428
+ ref: s,
429
+ props: p,
434
430
  // Record the component responsible for creating this element.
435
- _owner: h
431
+ _owner: x
436
432
  };
437
- return d._store = {}, Object.defineProperty(d._store, "validated", {
433
+ return m._store = {}, Object.defineProperty(m._store, "validated", {
438
434
  configurable: !1,
439
435
  enumerable: !1,
440
436
  writable: !0,
441
437
  value: !1
442
- }), Object.defineProperty(d, "_self", {
438
+ }), Object.defineProperty(m, "_self", {
443
439
  configurable: !1,
444
440
  enumerable: !1,
445
441
  writable: !1,
446
- value: c
447
- }), Object.defineProperty(d, "_source", {
442
+ value: f
443
+ }), Object.defineProperty(m, "_source", {
448
444
  configurable: !1,
449
445
  enumerable: !1,
450
446
  writable: !1,
451
- value: b
452
- }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
447
+ value: h
448
+ }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
453
449
  };
454
- function vr(e, r, t, c, b) {
450
+ function gr(e, r, s, f, h) {
455
451
  {
456
- var h, m = {}, d = null, S = null;
457
- t !== void 0 && (Re(t), d = "" + t), lr(r) && (Re(r.key), d = "" + r.key), ir(r) && (S = r.ref, cr(r, b));
458
- for (h in r)
459
- L.call(r, h) && !sr.hasOwnProperty(h) && (m[h] = r[h]);
452
+ var x, p = {}, m = null, S = null;
453
+ s !== void 0 && (je(s), m = "" + s), dr(r) && (je(r.key), m = "" + r.key), fr(r) && (S = r.ref, mr(r, h));
454
+ for (x in r)
455
+ L.call(r, x) && !ur.hasOwnProperty(x) && (p[x] = r[x]);
460
456
  if (e && e.defaultProps) {
461
- var j = e.defaultProps;
462
- for (h in j)
463
- m[h] === void 0 && (m[h] = j[h]);
457
+ var R = e.defaultProps;
458
+ for (x in R)
459
+ p[x] === void 0 && (p[x] = R[x]);
464
460
  }
465
- if (d || S) {
466
- var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
467
- d && ur(m, E), S && fr(m, E);
461
+ if (m || S) {
462
+ var T = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
463
+ m && vr(p, T), S && pr(p, T);
468
464
  }
469
- return dr(e, d, S, b, c, $.current, m);
465
+ return br(e, m, S, h, f, $.current, p);
470
466
  }
471
467
  }
472
- var Z = I.ReactCurrentOwner, Te = I.ReactDebugCurrentFrame;
473
- function F(e) {
468
+ var Z = D.ReactCurrentOwner, Te = D.ReactDebugCurrentFrame;
469
+ function M(e) {
474
470
  if (e) {
475
- var r = e._owner, t = K(e.type, e._source, r ? r.type : null);
476
- Te.setExtraStackFrame(t);
471
+ var r = e._owner, s = G(e.type, e._source, r ? r.type : null);
472
+ Te.setExtraStackFrame(s);
477
473
  } else
478
474
  Te.setExtraStackFrame(null);
479
475
  }
480
476
  var Q;
481
477
  Q = !1;
482
478
  function ee(e) {
483
- return typeof e == "object" && e !== null && e.$$typeof === o;
479
+ return typeof e == "object" && e !== null && e.$$typeof === a;
484
480
  }
485
481
  function _e() {
486
482
  {
@@ -494,26 +490,18 @@ Check the render method of \`` + e + "`.";
494
490
  return "";
495
491
  }
496
492
  }
497
- function mr(e) {
498
- {
499
- if (e !== void 0) {
500
- var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
501
- return `
502
-
503
- Check your code at ` + r + ":" + t + ".";
504
- }
505
- return "";
506
- }
493
+ function hr(e) {
494
+ return "";
507
495
  }
508
496
  var ke = {};
509
- function pr(e) {
497
+ function xr(e) {
510
498
  {
511
499
  var r = _e();
512
500
  if (!r) {
513
- var t = typeof e == "string" ? e : e.displayName || e.name;
514
- t && (r = `
501
+ var s = typeof e == "string" ? e : e.displayName || e.name;
502
+ s && (r = `
515
503
 
516
- Check the top-level render call using <` + t + ">.");
504
+ Check the top-level render call using <` + s + ">.");
517
505
  }
518
506
  return r;
519
507
  }
@@ -523,12 +511,12 @@ Check the top-level render call using <` + t + ">.");
523
511
  if (!e._store || e._store.validated || e.key != null)
524
512
  return;
525
513
  e._store.validated = !0;
526
- var t = pr(r);
527
- if (ke[t])
514
+ var s = xr(r);
515
+ if (ke[s])
528
516
  return;
529
- ke[t] = !0;
530
- var c = "";
531
- e && e._owner && e._owner !== Z.current && (c = " It was passed a child from " + N(e._owner.type) + "."), F(e), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, c), F(null);
517
+ ke[s] = !0;
518
+ var f = "";
519
+ e && e._owner && e._owner !== Z.current && (f = " It was passed a child from " + N(e._owner.type) + "."), M(e), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, f), M(null);
532
520
  }
533
521
  }
534
522
  function Pe(e, r) {
@@ -536,79 +524,79 @@ Check the top-level render call using <` + t + ">.");
536
524
  if (typeof e != "object")
537
525
  return;
538
526
  if (z(e))
539
- for (var t = 0; t < e.length; t++) {
540
- var c = e[t];
541
- ee(c) && Se(c, r);
527
+ for (var s = 0; s < e.length; s++) {
528
+ var f = e[s];
529
+ ee(f) && Se(f, r);
542
530
  }
543
531
  else if (ee(e))
544
532
  e._store && (e._store.validated = !0);
545
533
  else if (e) {
546
- var b = Ve(e);
547
- if (typeof b == "function" && b !== e.entries)
548
- for (var h = b.call(e), m; !(m = h.next()).done; )
549
- ee(m.value) && Se(m.value, r);
534
+ var h = Ke(e);
535
+ if (typeof h == "function" && h !== e.entries)
536
+ for (var x = h.call(e), p; !(p = x.next()).done; )
537
+ ee(p.value) && Se(p.value, r);
550
538
  }
551
539
  }
552
540
  }
553
- function br(e) {
541
+ function yr(e) {
554
542
  {
555
543
  var r = e.type;
556
544
  if (r == null || typeof r == "string")
557
545
  return;
558
- var t;
546
+ var s;
559
547
  if (typeof r == "function")
560
- t = r.propTypes;
561
- else if (typeof r == "object" && (r.$$typeof === u || // Note: Memo only checks outer props here.
548
+ s = r.propTypes;
549
+ else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here.
562
550
  // Inner props are checked in the reconciler.
563
551
  r.$$typeof === _))
564
- t = r.propTypes;
552
+ s = r.propTypes;
565
553
  else
566
554
  return;
567
- if (t) {
568
- var c = N(r);
569
- tr(t, e.props, "prop", c, e);
555
+ if (s) {
556
+ var f = N(r);
557
+ or(s, e.props, "prop", f, e);
570
558
  } else if (r.PropTypes !== void 0 && !Q) {
571
559
  Q = !0;
572
- var b = N(r);
573
- k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
560
+ var h = N(r);
561
+ k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown");
574
562
  }
575
563
  typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
576
564
  }
577
565
  }
578
- function gr(e) {
566
+ function jr(e) {
579
567
  {
580
- for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
581
- var c = r[t];
582
- if (c !== "children" && c !== "key") {
583
- F(e), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), F(null);
568
+ for (var r = Object.keys(e.props), s = 0; s < r.length; s++) {
569
+ var f = r[s];
570
+ if (f !== "children" && f !== "key") {
571
+ M(e), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), M(null);
584
572
  break;
585
573
  }
586
574
  }
587
- e.ref !== null && (F(e), k("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
575
+ e.ref !== null && (M(e), k("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
588
576
  }
589
577
  }
590
578
  var Ce = {};
591
- function we(e, r, t, c, b, h) {
579
+ function we(e, r, s, f, h, x) {
592
580
  {
593
- var m = He(e);
594
- if (!m) {
595
- var d = "";
596
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
597
- var S = mr(b);
598
- S ? d += S : d += _e();
599
- var j;
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);
581
+ var p = Qe(e);
582
+ if (!p) {
583
+ var m = "";
584
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (m += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
585
+ var S = hr();
586
+ S ? m += S : m += _e();
587
+ var R;
588
+ e === null ? R = "null" : z(e) ? R = "array" : e !== void 0 && e.$$typeof === a ? (R = "<" + (N(e.type) || "Unknown") + " />", m = " Did you accidentally export a JSX literal instead of a component?") : R = 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", R, m);
601
589
  }
602
- var E = vr(e, r, t, b, h);
603
- if (E == null)
604
- return E;
605
- if (m) {
590
+ var T = gr(e, r, s, h, x);
591
+ if (T == null)
592
+ return T;
593
+ if (p) {
606
594
  var C = r.children;
607
595
  if (C !== void 0)
608
- if (c)
596
+ if (f)
609
597
  if (z(C)) {
610
- for (var M = 0; M < C.length; M++)
611
- Pe(C[M], e);
598
+ for (var F = 0; F < C.length; F++)
599
+ Pe(C[F], e);
612
600
  Object.freeze && Object.freeze(C);
613
601
  } else
614
602
  k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
@@ -616,564 +604,631 @@ Check the top-level render call using <` + t + ">.");
616
604
  Pe(C, e);
617
605
  }
618
606
  if (L.call(r, "key")) {
619
- var D = N(e), P = Object.keys(r).filter(function(Er) {
620
- return Er !== "key";
607
+ var I = N(e), P = Object.keys(r).filter(function(Sr) {
608
+ return Sr !== "key";
621
609
  }), re = P.length > 0 ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}";
622
- if (!Ce[D + re]) {
623
- var jr = P.length > 0 ? "{" + P.join(": ..., ") + ": ...}" : "{}";
610
+ if (!Ce[I + re]) {
611
+ var kr = P.length > 0 ? "{" + P.join(": ..., ") + ": ...}" : "{}";
624
612
  k(`A props object containing a "key" prop is being spread into JSX:
625
613
  let props = %s;
626
614
  <%s {...props} />
627
615
  React keys must be passed directly to JSX without using spread:
628
616
  let props = %s;
629
- <%s key={someKey} {...props} />`, re, D, jr, D), Ce[D + re] = !0;
617
+ <%s key={someKey} {...props} />`, re, I, kr, I), Ce[I + re] = !0;
630
618
  }
631
619
  }
632
- return e === n ? gr(E) : br(E), E;
620
+ return e === t ? jr(T) : yr(T), T;
633
621
  }
634
622
  }
635
- function hr(e, r, t) {
636
- return we(e, r, t, !0);
623
+ function Rr(e, r, s) {
624
+ return we(e, r, s, !0);
637
625
  }
638
- function xr(e, r, t) {
639
- return we(e, r, t, !1);
626
+ function Er(e, r, s) {
627
+ return we(e, r, s, !1);
640
628
  }
641
- var yr = xr, Rr = hr;
642
- Y.Fragment = n, Y.jsx = yr, Y.jsxs = Rr;
643
- }()), Y;
629
+ var Tr = Er, _r = Rr;
630
+ V.Fragment = t, V.jsx = Tr, V.jsxs = _r;
631
+ }()), V;
644
632
  }
645
633
  process.env.NODE_ENV === "production" ? te.exports = et() : te.exports = rt();
646
- var s = te.exports;
647
- const tt = (a) => {
648
- const { children: o, ...i } = a;
649
- return x(i), /* @__PURE__ */ s.jsx(ne, { children: o });
650
- }, nt = R((a, o) => {
634
+ var i = te.exports;
635
+ const tt = (n) => {
636
+ const { children: a, ...o } = n;
637
+ return b(o), /* @__PURE__ */ i.jsx(ne, { children: a });
638
+ }, nt = y((n, a) => {
639
+ const { className: o, children: t, id: l, columns: u, ...d } = n;
640
+ return b(d), /* @__PURE__ */ i.jsx(
641
+ "div",
642
+ {
643
+ className: o,
644
+ style: { gridTemplateColumns: `repeat(${u}, 1fr)` },
645
+ ref: a,
646
+ id: l,
647
+ role: "grid",
648
+ children: t
649
+ }
650
+ );
651
+ }), at = y((n, a) => {
652
+ const { className: o, children: t, columns: l, ...u } = n;
653
+ return b(u), /* @__PURE__ */ i.jsx(
654
+ "div",
655
+ {
656
+ className: E("bn-ak-menu-item", o || ""),
657
+ style: { gridColumn: `1 / ${l + 1}` },
658
+ ref: a,
659
+ children: /* @__PURE__ */ i.jsx("div", { className: "bn-ak-suggestion-menu-item-label", children: t })
660
+ }
661
+ );
662
+ }), st = y((n, a) => {
663
+ const { className: o, isSelected: t, onClick: l, item: u, id: d, ...g } = n;
664
+ b(g);
665
+ const c = Le(null);
666
+ return $e(() => {
667
+ if (!c.current || !t)
668
+ return;
669
+ const v = We(c.current);
670
+ v === "top" ? c.current.scrollIntoView(!0) : v === "bottom" && c.current.scrollIntoView(!1);
671
+ }, [t]), /* @__PURE__ */ i.jsx(
672
+ "div",
673
+ {
674
+ className: o,
675
+ ref: Ve([a, c]),
676
+ id: d,
677
+ role: "option",
678
+ onClick: l,
679
+ "aria-selected": t || void 0,
680
+ children: u.icon
681
+ }
682
+ );
683
+ }), ot = y((n, a) => {
651
684
  const {
652
- className: i,
653
- name: n,
685
+ className: o,
686
+ children: t,
687
+ // unused, using "dots" instead
688
+ columns: l,
689
+ ...u
690
+ } = n;
691
+ return b(u), /* @__PURE__ */ i.jsx(
692
+ "div",
693
+ {
694
+ className: o,
695
+ style: { gridColumn: `1 / ${l + 1}` },
696
+ ref: a,
697
+ children: t
698
+ }
699
+ );
700
+ }), it = y((n, a) => {
701
+ const {
702
+ className: o,
703
+ name: t,
654
704
  label: l,
655
- icon: f,
656
- value: v,
705
+ icon: u,
706
+ value: d,
657
707
  autoFocus: g,
658
- placeholder: u,
659
- onKeyDown: p,
660
- onChange: y,
708
+ placeholder: c,
709
+ onKeyDown: v,
710
+ onChange: j,
661
711
  onSubmit: _,
662
712
  ...w
663
- } = a;
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
- f,
668
- /* @__PURE__ */ s.jsx(
713
+ } = n;
714
+ return b(w), /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
715
+ n.label && /* @__PURE__ */ i.jsx(Nr, { name: t, children: l }),
716
+ /* @__PURE__ */ i.jsxs("div", { className: "bn-ak-input-wrapper", children: [
717
+ u,
718
+ /* @__PURE__ */ i.jsx(
669
719
  ae,
670
720
  {
671
- className: T("bn-ak-input", i || ""),
672
- ref: o,
673
- name: n,
674
- value: v,
721
+ className: E("bn-ak-input", o || ""),
722
+ ref: a,
723
+ name: t,
724
+ value: d,
675
725
  autoFocus: g,
676
- placeholder: u,
677
- onKeyDown: p,
678
- onChange: y,
726
+ placeholder: c,
727
+ onKeyDown: v,
728
+ onChange: j,
679
729
  onSubmit: _
680
730
  }
681
731
  )
682
732
  ] })
683
733
  ] });
684
- }), at = (a) => {
734
+ }), lt = (n) => {
685
735
  const {
686
- children: o,
687
- onOpenChange: i,
688
- position: n,
736
+ children: a,
737
+ onOpenChange: o,
738
+ position: t,
689
739
  sub: l,
690
740
  // unused
691
- ...f
692
- } = a;
693
- return x(f), /* @__PURE__ */ s.jsx(
694
- Mr,
741
+ ...u
742
+ } = n;
743
+ return b(u), /* @__PURE__ */ i.jsx(
744
+ Fr,
695
745
  {
696
- placement: n,
697
- setOpen: i,
746
+ placement: t,
747
+ setOpen: o,
698
748
  virtualFocus: !0,
699
- children: o
749
+ children: a
700
750
  }
701
751
  );
702
- }, ot = R((a, o) => {
752
+ }, ct = y((n, a) => {
703
753
  const {
704
- className: i,
705
- children: n,
754
+ className: o,
755
+ children: t,
706
756
  sub: l,
707
757
  // unused
708
- ...f
709
- } = a;
710
- return x(f), /* @__PURE__ */ s.jsx(
758
+ ...u
759
+ } = n;
760
+ return b(u), /* @__PURE__ */ i.jsx(
711
761
  Or,
712
762
  {
713
763
  unmountOnHide: !0,
714
- className: T("bn-ak-menu", i || ""),
715
- ref: o,
716
- children: n
764
+ className: E("bn-ak-menu", o || ""),
765
+ ref: a,
766
+ children: t
717
767
  }
718
768
  );
719
- }), st = R((a, o) => {
720
- const { className: i, children: n, icon: l, checked: f, subTrigger: v, onClick: g, ...u } = a;
721
- return x(u), v ? /* @__PURE__ */ s.jsxs(
722
- Le,
769
+ }), ut = y((n, a) => {
770
+ const { className: o, children: t, icon: l, checked: u, subTrigger: d, onClick: g, ...c } = n;
771
+ return b(c), d ? /* @__PURE__ */ i.jsxs(
772
+ Ye,
723
773
  {
724
- render: /* @__PURE__ */ s.jsx(Ne, {}),
725
- className: T("bn-ak-menu-item", i || ""),
726
- ref: o,
774
+ render: /* @__PURE__ */ i.jsx(Ne, {}),
775
+ className: E("bn-ak-menu-item", o || ""),
776
+ ref: a,
727
777
  onClick: g,
728
778
  children: [
729
779
  l,
730
- n,
731
- /* @__PURE__ */ s.jsx(Dr, {}),
732
- f !== void 0 && /* @__PURE__ */ s.jsx(Oe, { checked: f })
780
+ t,
781
+ /* @__PURE__ */ i.jsx(Ir, {}),
782
+ u !== void 0 && /* @__PURE__ */ i.jsx(Oe, { checked: u })
733
783
  ]
734
784
  }
735
- ) : /* @__PURE__ */ s.jsxs(
785
+ ) : /* @__PURE__ */ i.jsxs(
736
786
  Ne,
737
787
  {
738
- className: T("bn-ak-menu-item", i || ""),
739
- ref: o,
788
+ className: E("bn-ak-menu-item", o || ""),
789
+ ref: a,
740
790
  onClick: g,
741
791
  children: [
742
792
  l,
743
- n,
744
- f !== void 0 && /* @__PURE__ */ s.jsx(Oe, { checked: f })
793
+ t,
794
+ u !== void 0 && /* @__PURE__ */ i.jsx(Oe, { checked: u })
745
795
  ]
746
796
  }
747
797
  );
748
- }), it = R((a, o) => {
749
- const { className: i, children: n, ...l } = a;
750
- return x(l), /* @__PURE__ */ s.jsx(
751
- Ir,
798
+ }), ft = y((n, a) => {
799
+ const { className: o, children: t, ...l } = n;
800
+ return b(l), /* @__PURE__ */ i.jsx(
801
+ Dr,
752
802
  {
753
- className: T("bn-ak-group-label", i || ""),
754
- ref: o,
755
- children: n
803
+ className: E("bn-ak-group-label", o || ""),
804
+ ref: a,
805
+ children: t
756
806
  }
757
807
  );
758
- }), lt = (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
- const { className: i, ...n } = a;
763
- return x(n), /* @__PURE__ */ s.jsx(
764
- Fr,
808
+ }), dt = (n) => {
809
+ const { children: a, sub: o, ...t } = n;
810
+ return b(t), o ? a : /* @__PURE__ */ i.jsx(Ye, { render: a });
811
+ }, mt = y((n, a) => {
812
+ const { className: o, ...t } = n;
813
+ return b(t), /* @__PURE__ */ i.jsx(
814
+ Mr,
765
815
  {
766
- className: T("bn-ak-separator", i || ""),
767
- ref: o
816
+ className: E("bn-ak-separator", o || ""),
817
+ ref: a
768
818
  }
769
819
  );
770
- }), ut = R((a, o) => {
820
+ }), vt = y((n, a) => {
771
821
  const {
772
- className: i,
773
- tabs: n,
822
+ className: o,
823
+ tabs: t,
774
824
  defaultOpenTab: l,
775
- openTab: f,
776
- setOpenTab: v,
825
+ openTab: u,
826
+ setOpenTab: d,
777
827
  loading: g,
778
828
  // TODO: implement loading
779
- ...u
780
- } = a;
781
- return x(u), /* @__PURE__ */ s.jsx(
829
+ ...c
830
+ } = n;
831
+ return b(c), /* @__PURE__ */ i.jsx(
782
832
  "div",
783
833
  {
784
- className: T("bn-ak-wrapper", i || ""),
785
- ref: o,
786
- children: /* @__PURE__ */ s.jsxs(
834
+ className: E("bn-ak-wrapper", o || ""),
835
+ ref: a,
836
+ children: /* @__PURE__ */ i.jsxs(
787
837
  Ar,
788
838
  {
789
839
  defaultSelectedId: l,
790
- selectedId: f,
791
- setActiveId: (p) => {
792
- p && v(p);
840
+ selectedId: u,
841
+ setActiveId: (v) => {
842
+ v && d(v);
793
843
  },
794
844
  children: [
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)) })
845
+ /* @__PURE__ */ i.jsx(Lr, { className: "bn-ak-tab-list", children: t.map((v) => /* @__PURE__ */ i.jsx($r, { className: "bn-ak-tab", id: v.name, children: v.name }, v.name)) }),
846
+ /* @__PURE__ */ i.jsx("div", { className: "bn-ak-panels", children: t.map((v) => /* @__PURE__ */ i.jsx(Wr, { tabId: v.name, children: v.tabPanel }, v.name)) })
797
847
  ]
798
848
  }
799
849
  )
800
850
  }
801
851
  );
802
- }), ft = R((a, o) => {
803
- const { className: i, children: n, onClick: l, label: f, ...v } = a;
804
- return x(v), /* @__PURE__ */ s.jsx(
805
- oe,
852
+ }), pt = y((n, a) => {
853
+ const { className: o, children: t, onClick: l, label: u, ...d } = n;
854
+ return b(d), /* @__PURE__ */ i.jsx(
855
+ se,
806
856
  {
807
- className: T("bn-ak-button", i || ""),
857
+ className: E("bn-ak-button", o || ""),
808
858
  onClick: l,
809
- "aria-label": f,
810
- ref: o,
811
- children: n
859
+ "aria-label": u,
860
+ ref: a,
861
+ children: t
812
862
  }
813
863
  );
814
- }), dt = R((a, o) => {
815
- const { className: i, accept: n, value: l, placeholder: f, onChange: v, ...g } = a;
816
- return x(g), /* @__PURE__ */ s.jsx(ne, { children: /* @__PURE__ */ s.jsx(
864
+ }), bt = y((n, a) => {
865
+ const { className: o, accept: t, value: l, placeholder: u, onChange: d, ...g } = n;
866
+ return b(g), /* @__PURE__ */ i.jsx(ne, { children: /* @__PURE__ */ i.jsx(
817
867
  ae,
818
868
  {
819
- className: i,
820
- ref: o,
869
+ className: o,
870
+ ref: a,
821
871
  name: "panel-input",
822
872
  type: "file",
823
- accept: n,
873
+ accept: t,
824
874
  value: l ? l.name : void 0,
825
- onChange: async (u) => v == null ? void 0 : v(u.target.files[0]),
826
- placeholder: f
875
+ onChange: async (c) => d == null ? void 0 : d(c.target.files[0]),
876
+ placeholder: u
827
877
  }
828
878
  ) });
829
- }), vt = R((a, o) => {
830
- const { className: i, children: n, ...l } = a;
831
- return x(l), /* @__PURE__ */ s.jsx("div", { className: i, ref: o, children: n });
832
- }), mt = R((a, o) => {
833
- const { className: i, value: n, placeholder: l, onKeyDown: f, onChange: v, ...g } = a;
834
- return x(g), /* @__PURE__ */ s.jsx(ne, { children: /* @__PURE__ */ s.jsx(
879
+ }), gt = y((n, a) => {
880
+ const { className: o, children: t, ...l } = n;
881
+ return b(l), /* @__PURE__ */ i.jsx("div", { className: o, ref: a, children: t });
882
+ }), ht = y((n, a) => {
883
+ const { className: o, value: t, placeholder: l, onKeyDown: u, onChange: d, ...g } = n;
884
+ return b(g), /* @__PURE__ */ i.jsx(ne, { children: /* @__PURE__ */ i.jsx(
835
885
  ae,
836
886
  {
837
- className: T("bn-ak-input", i || ""),
887
+ className: E("bn-ak-input", o || ""),
838
888
  name: "panel-input",
839
- value: n,
889
+ value: t,
840
890
  placeholder: l,
841
- onChange: v,
842
- onKeyDown: f,
891
+ onChange: d,
892
+ onKeyDown: u,
843
893
  "data-test": "embed-input",
844
- ref: o
894
+ ref: a
845
895
  }
846
896
  ) });
847
- }), pt = R((a, o) => {
848
- const { children: i, ...n } = a;
849
- return x(n), /* @__PURE__ */ s.jsx(Yr, { render: i, ref: o });
850
- }), bt = R((a, o) => {
851
- const { className: i, children: n, variant: l, ...f } = a;
852
- return x(f), /* @__PURE__ */ s.jsx(
853
- Vr,
897
+ }), xt = y((n, a) => {
898
+ const { children: o, ...t } = n;
899
+ return b(t), /* @__PURE__ */ i.jsx(Vr, { render: o, ref: a });
900
+ }), yt = y((n, a) => {
901
+ const { className: o, children: t, variant: l, ...u } = n;
902
+ return b(u), /* @__PURE__ */ i.jsx(
903
+ Yr,
854
904
  {
855
- className: T("bn-ak-popover", i || ""),
856
- ref: o,
857
- children: n
905
+ className: E("bn-ak-popover", o || ""),
906
+ ref: a,
907
+ children: t
858
908
  }
859
909
  );
860
- }), gt = (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
- const { className: i, children: n, ...l } = a;
865
- return x(l, !1), /* @__PURE__ */ s.jsx($e, { className: i, ref: o, ...l, children: n });
866
- }), xt = R((a, o) => {
910
+ }), jt = (n) => {
911
+ const { children: a, opened: o, position: t, ...l } = n;
912
+ return b(l), /* @__PURE__ */ i.jsx(Br, { open: o, placement: t, children: a });
913
+ }, Rt = y((n, a) => {
914
+ const { className: o, children: t, ...l } = n;
915
+ return b(l, !1), /* @__PURE__ */ i.jsx(Be, { className: o, ref: a, ...l, children: t });
916
+ }), Et = y((n, a) => {
867
917
  const {
868
- className: i,
869
- children: n,
918
+ className: o,
919
+ children: t,
870
920
  icon: l,
871
- onClick: f,
872
- label: v,
921
+ onClick: u,
922
+ label: d,
873
923
  onDragEnd: g,
874
- onDragStart: u,
875
- draggable: p,
876
- ...y
877
- } = a;
878
- return x(y, !1), /* @__PURE__ */ s.jsxs(
879
- oe,
924
+ onDragStart: c,
925
+ draggable: v,
926
+ ...j
927
+ } = n;
928
+ return b(j, !1), /* @__PURE__ */ i.jsxs(
929
+ se,
880
930
  {
881
931
  onDragEnd: g,
882
- onDragStart: u,
883
- draggable: p,
884
- "aria-label": v,
885
- className: T(
932
+ onDragStart: c,
933
+ draggable: v,
934
+ "aria-label": d,
935
+ className: E(
886
936
  "bn-ak-button bn-ak-secondary",
887
- i || ""
937
+ o || ""
888
938
  ),
889
- ref: o,
890
- onClick: f,
891
- ...y,
939
+ ref: a,
940
+ onClick: u,
941
+ ...j,
892
942
  children: [
893
943
  l,
894
- n
944
+ t
895
945
  ]
896
946
  }
897
947
  );
898
- }), yt = R((a, o) => {
899
- const { className: i, children: n, id: l, ...f } = a;
900
- return x(f), /* @__PURE__ */ s.jsx(
901
- $e,
948
+ }), Tt = y((n, a) => {
949
+ const { className: o, children: t, id: l, ...u } = n;
950
+ return b(u), /* @__PURE__ */ i.jsx(
951
+ Be,
902
952
  {
903
- className: T("bn-ak-menu", i || ""),
953
+ className: E("bn-ak-menu", o || ""),
904
954
  id: l,
905
955
  role: "listbox",
906
- ref: o,
907
- children: n
956
+ ref: a,
957
+ children: t
908
958
  }
909
959
  );
910
- }), Rt = R((a, o) => {
911
- const { className: i, item: n, isSelected: l, onClick: f, id: v, ...g } = a;
912
- x(g);
913
- const u = Tr(null);
914
- return _r(() => {
915
- if (!u.current || !l)
960
+ }), _t = y((n, a) => {
961
+ const { className: o, item: t, isSelected: l, onClick: u, id: d, ...g } = n;
962
+ b(g);
963
+ const c = Le(null);
964
+ return $e(() => {
965
+ if (!c.current || !l)
916
966
  return;
917
- const p = Sr(u.current);
918
- p === "top" ? u.current.scrollIntoView(!0) : p === "bottom" && u.current.scrollIntoView(!1);
919
- }, [l]), /* @__PURE__ */ s.jsxs(
967
+ const v = We(c.current);
968
+ v === "top" ? c.current.scrollIntoView(!0) : v === "bottom" && c.current.scrollIntoView(!1);
969
+ }, [l]), /* @__PURE__ */ i.jsxs(
920
970
  "div",
921
971
  {
922
- className: T("bn-ak-menu-item", i || ""),
923
- ref: Pr([o, u]),
924
- id: v,
925
- onClick: f,
972
+ className: E("bn-ak-menu-item", o || ""),
973
+ ref: Ve([a, c]),
974
+ id: d,
975
+ onClick: u,
926
976
  role: "option",
927
977
  "aria-selected": l || void 0,
928
978
  children: [
929
- n.icon && /* @__PURE__ */ s.jsx(
979
+ t.icon && /* @__PURE__ */ i.jsx(
930
980
  "div",
931
981
  {
932
982
  className: "bn-ak-suggestion-menu-item-section",
933
983
  "data-position": "left",
934
- children: n.icon
984
+ children: t.icon
935
985
  }
936
986
  ),
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 })
987
+ /* @__PURE__ */ i.jsxs("div", { className: "bn-ak-suggestion-menu-item-body", children: [
988
+ /* @__PURE__ */ i.jsx("div", { className: "bn-ak-suggestion-menu-item-title", children: t.title }),
989
+ /* @__PURE__ */ i.jsx("div", { className: "bn-ak-suggestion-menu-item-subtitle", children: t.subtext })
940
990
  ] }),
941
- n.badge && /* @__PURE__ */ s.jsx(
991
+ t.badge && /* @__PURE__ */ i.jsx(
942
992
  "div",
943
993
  {
944
994
  "data-position": "right",
945
995
  className: "bn-ak-suggestion-menu-item-section",
946
- children: /* @__PURE__ */ s.jsx("div", { children: n.badge })
996
+ children: /* @__PURE__ */ i.jsx("div", { children: t.badge })
947
997
  }
948
998
  )
949
999
  ]
950
1000
  }
951
1001
  );
952
- }), jt = R((a, o) => {
953
- const { className: i, children: n, ...l } = a;
954
- return x(l), /* @__PURE__ */ s.jsx(
1002
+ }), kt = y((n, a) => {
1003
+ const { className: o, children: t, ...l } = n;
1004
+ return b(l), /* @__PURE__ */ i.jsx(
955
1005
  "div",
956
1006
  {
957
- className: T("bn-ak-menu-item", i || ""),
958
- ref: o,
959
- children: /* @__PURE__ */ s.jsx("div", { className: "bn-ak-suggestion-menu-item-label", children: n })
1007
+ className: E("bn-ak-menu-item", o || ""),
1008
+ ref: a,
1009
+ children: /* @__PURE__ */ i.jsx("div", { className: "bn-ak-suggestion-menu-item-label", children: t })
960
1010
  }
961
1011
  );
962
- }), Et = R((a, o) => {
963
- const { className: i, children: n, ...l } = a;
964
- return x(l), /* @__PURE__ */ s.jsx(
1012
+ }), St = y((n, a) => {
1013
+ const { className: o, children: t, ...l } = n;
1014
+ return b(l), /* @__PURE__ */ i.jsx(
965
1015
  "div",
966
1016
  {
967
- className: T("bn-ak-group-label", i || ""),
968
- ref: o,
969
- children: n
1017
+ className: E("bn-ak-group-label", o || ""),
1018
+ ref: a,
1019
+ children: t
970
1020
  }
971
1021
  );
972
- }), Tt = R((a, o) => {
973
- const { className: i, children: n, ...l } = a;
974
- return x(l), /* @__PURE__ */ s.jsx("div", { className: i, ref: o, children: n });
975
- }), _t = R((a, o) => {
1022
+ }), Pt = y((n, a) => {
1023
+ const { className: o, children: t, ...l } = n;
1024
+ return b(l), /* @__PURE__ */ i.jsx("div", { className: o, ref: a, children: t });
1025
+ }), Ct = y((n, a) => {
976
1026
  const {
977
- className: i,
978
- children: n,
1027
+ className: o,
1028
+ children: t,
979
1029
  draggable: l,
980
- onDragStart: f,
981
- onDragEnd: v,
1030
+ onDragStart: u,
1031
+ onDragEnd: d,
982
1032
  style: g,
983
- label: u,
984
- ...p
985
- } = a;
986
- return x(p, !1), /* @__PURE__ */ s.jsx(
987
- oe,
1033
+ label: c,
1034
+ ...v
1035
+ } = n;
1036
+ return b(v, !1), /* @__PURE__ */ i.jsx(
1037
+ se,
988
1038
  {
989
- className: T(
1039
+ className: E(
990
1040
  "bn-ak-button bn-ak-secondary",
991
- i || ""
1041
+ o || ""
992
1042
  ),
993
- ref: o,
994
- "aria-label": u,
1043
+ ref: a,
1044
+ "aria-label": c,
995
1045
  draggable: l,
996
- onDragStart: f,
997
- onDragEnd: v,
1046
+ onDragStart: u,
1047
+ onDragEnd: d,
998
1048
  style: g,
999
- ...p,
1000
- children: n
1049
+ ...v,
1050
+ children: t
1001
1051
  }
1002
1052
  );
1003
- }), Fe = R(
1004
- (a, o) => {
1005
- const { className: i, children: n, onMouseEnter: l, onMouseLeave: f, ...v } = a;
1006
- return x(v), /* @__PURE__ */ s.jsx(
1053
+ }), Me = y(
1054
+ (n, a) => {
1055
+ const { className: o, children: t, onMouseEnter: l, onMouseLeave: u, ...d } = n;
1056
+ return b(d), /* @__PURE__ */ i.jsx(
1007
1057
  Ur,
1008
1058
  {
1009
- className: T("bn-ak-toolbar", i || ""),
1010
- ref: o,
1059
+ className: E("bn-ak-toolbar", o || ""),
1060
+ ref: a,
1011
1061
  onMouseEnter: l,
1012
- onMouseLeave: f,
1013
- children: n
1062
+ onMouseLeave: u,
1063
+ children: t
1014
1064
  }
1015
1065
  );
1016
1066
  }
1017
- ), Me = R(
1018
- (a, o) => {
1067
+ ), Fe = y(
1068
+ (n, a) => {
1019
1069
  const {
1020
- className: i,
1021
- children: n,
1070
+ className: o,
1071
+ children: t,
1022
1072
  mainTooltip: l,
1023
- secondaryTooltip: f,
1024
- icon: v,
1073
+ secondaryTooltip: u,
1074
+ icon: d,
1025
1075
  isSelected: g,
1026
- isDisabled: u,
1027
- onClick: p,
1028
- label: y,
1076
+ isDisabled: c,
1077
+ onClick: v,
1078
+ label: j,
1029
1079
  ..._
1030
- } = a;
1031
- return x(_, !1), /* @__PURE__ */ s.jsxs(Kr, { children: [
1032
- /* @__PURE__ */ s.jsx(
1033
- Gr,
1080
+ } = n;
1081
+ return b(_, !1), /* @__PURE__ */ i.jsxs(Gr, { children: [
1082
+ /* @__PURE__ */ i.jsx(
1083
+ Kr,
1034
1084
  {
1035
1085
  className: "link",
1036
- render: /* @__PURE__ */ s.jsxs(
1037
- We,
1086
+ render: /* @__PURE__ */ i.jsxs(
1087
+ Ue,
1038
1088
  {
1039
- "aria-label": y,
1040
- className: T(
1089
+ "aria-label": j,
1090
+ className: E(
1041
1091
  "bn-ak-button bn-ak-secondary",
1042
- i || ""
1092
+ o || ""
1043
1093
  ),
1044
1094
  onMouseDown: (w) => {
1045
- kr() && w.currentTarget.focus();
1095
+ Pr() && w.currentTarget.focus();
1046
1096
  },
1047
- onClick: p,
1097
+ onClick: v,
1048
1098
  "aria-pressed": g,
1049
1099
  "data-selected": g ? "true" : void 0,
1050
- "data-test": a.mainTooltip.slice(0, 1).toLowerCase() + a.mainTooltip.replace(/\s+/g, "").slice(1),
1051
- disabled: u || !1,
1052
- ref: o,
1100
+ "data-test": n.mainTooltip.slice(0, 1).toLowerCase() + n.mainTooltip.replace(/\s+/g, "").slice(1),
1101
+ disabled: c || !1,
1102
+ ref: a,
1053
1103
  ..._,
1054
1104
  children: [
1055
- v,
1056
- n
1105
+ d,
1106
+ t
1057
1107
  ]
1058
1108
  }
1059
1109
  )
1060
1110
  }
1061
1111
  ),
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 })
1112
+ /* @__PURE__ */ i.jsxs(Jr, { className: "bn-ak-tooltip", children: [
1113
+ /* @__PURE__ */ i.jsx("span", { children: l }),
1114
+ u && /* @__PURE__ */ i.jsx("span", { children: u })
1065
1115
  ] })
1066
1116
  ] });
1067
1117
  }
1068
- ), kt = R((a, o) => {
1069
- const { className: i, items: n, isDisabled: l, ...f } = a;
1070
- x(f);
1071
- const v = a.items.filter((u) => u.isSelected)[0], g = (u) => {
1072
- var p, y;
1073
- (y = (p = n.find((_) => _.text === u)).onClick) == null || y.call(p);
1118
+ ), wt = y((n, a) => {
1119
+ const { className: o, items: t, isDisabled: l, ...u } = n;
1120
+ b(u);
1121
+ const d = n.items.filter((c) => c.isSelected)[0], g = (c) => {
1122
+ var v, j;
1123
+ (j = (v = t.find((_) => _.text === c)).onClick) == null || j.call(v);
1074
1124
  };
1075
- return /* @__PURE__ */ s.jsxs(qr, { value: v.text, setValue: g, children: [
1076
- /* @__PURE__ */ s.jsxs(
1125
+ return /* @__PURE__ */ i.jsxs(qr, { value: d.text, setValue: g, children: [
1126
+ /* @__PURE__ */ i.jsxs(
1077
1127
  Hr,
1078
1128
  {
1079
1129
  className: "bn-ak-button bn-ak-secondary",
1080
1130
  disabled: l,
1081
1131
  "aria-label": "Text alignment",
1082
- render: /* @__PURE__ */ s.jsx(We, {}),
1132
+ render: /* @__PURE__ */ i.jsx(Ue, {}),
1083
1133
  children: [
1084
- v.icon,
1134
+ d.icon,
1085
1135
  " ",
1086
- v.text,
1136
+ d.text,
1087
1137
  " ",
1088
- /* @__PURE__ */ s.jsx(zr, {})
1138
+ /* @__PURE__ */ i.jsx(zr, {})
1089
1139
  ]
1090
1140
  }
1091
1141
  ),
1092
- /* @__PURE__ */ s.jsx(
1142
+ /* @__PURE__ */ i.jsx(
1093
1143
  Xr,
1094
1144
  {
1095
- className: T("bn-ak-popover", i || ""),
1096
- ref: o,
1145
+ className: E("bn-ak-popover", o || ""),
1146
+ ref: a,
1097
1147
  gutter: 4,
1098
- children: n.map((u) => /* @__PURE__ */ s.jsxs(
1148
+ children: t.map((c) => /* @__PURE__ */ i.jsxs(
1099
1149
  Zr,
1100
1150
  {
1101
1151
  className: "bn-ak-select-item",
1102
- value: u.text,
1152
+ value: c.text,
1103
1153
  children: [
1104
- u.icon,
1105
- u.text,
1106
- u.text === v.text && /* @__PURE__ */ s.jsx(Qr, {})
1154
+ c.icon,
1155
+ c.text,
1156
+ c.text === d.text && /* @__PURE__ */ i.jsx(Qr, {})
1107
1157
  ]
1108
1158
  },
1109
- u.text
1159
+ c.text
1110
1160
  ))
1111
1161
  }
1112
1162
  )
1113
1163
  ] });
1114
- });
1115
- const St = {
1164
+ }), Nt = {
1116
1165
  FormattingToolbar: {
1117
- Root: Fe,
1118
- Button: Me,
1119
- Select: kt
1166
+ Root: Me,
1167
+ Button: Fe,
1168
+ Select: wt
1120
1169
  },
1121
1170
  FilePanel: {
1122
- Root: ut,
1123
- Button: ft,
1124
- FileInput: dt,
1125
- TabPanel: vt,
1126
- TextInput: mt
1171
+ Root: vt,
1172
+ Button: pt,
1173
+ FileInput: bt,
1174
+ TabPanel: gt,
1175
+ TextInput: ht
1176
+ },
1177
+ GridSuggestionMenu: {
1178
+ Root: nt,
1179
+ Item: st,
1180
+ EmptyItem: at,
1181
+ Loader: ot
1127
1182
  },
1128
1183
  LinkToolbar: {
1129
- Root: Fe,
1130
- Button: Me
1184
+ Root: Me,
1185
+ Button: Fe
1131
1186
  },
1132
1187
  SideMenu: {
1133
- Root: ht,
1134
- Button: xt
1188
+ Root: Rt,
1189
+ Button: Et
1135
1190
  },
1136
1191
  SuggestionMenu: {
1137
- Root: yt,
1138
- Item: Rt,
1139
- EmptyItem: jt,
1140
- Label: Et,
1141
- Loader: Tt
1192
+ Root: Tt,
1193
+ Item: _t,
1194
+ EmptyItem: kt,
1195
+ Label: St,
1196
+ Loader: Pt
1142
1197
  },
1143
1198
  TableHandle: {
1144
- Root: _t
1199
+ Root: Ct
1145
1200
  },
1146
1201
  Generic: {
1147
1202
  Form: {
1148
1203
  Root: tt,
1149
- TextInput: nt
1204
+ TextInput: it
1150
1205
  },
1151
1206
  Menu: {
1152
- Root: at,
1153
- Trigger: lt,
1154
- Dropdown: ot,
1155
- Divider: ct,
1156
- Label: it,
1157
- Item: st
1207
+ Root: lt,
1208
+ Trigger: dt,
1209
+ Dropdown: ct,
1210
+ Divider: mt,
1211
+ Label: ft,
1212
+ Item: ut
1158
1213
  },
1159
1214
  Popover: {
1160
- Root: gt,
1161
- Trigger: pt,
1162
- Content: bt
1215
+ Root: jt,
1216
+ Trigger: xt,
1217
+ Content: yt
1163
1218
  }
1164
1219
  }
1165
- }, Ot = (a) => {
1166
- const { className: o, ...i } = a;
1167
- return /* @__PURE__ */ s.jsx(Cr.Provider, { value: St, children: /* @__PURE__ */ s.jsx(
1220
+ }, Ft = (n) => {
1221
+ const { className: a, ...o } = n;
1222
+ return /* @__PURE__ */ i.jsx(Cr.Provider, { value: Nt, children: /* @__PURE__ */ i.jsx(
1168
1223
  wr,
1169
1224
  {
1170
- className: T("bn-ariakit", o || ""),
1171
- ...i
1225
+ className: E("bn-ariakit", a || ""),
1226
+ ...o
1172
1227
  }
1173
1228
  ) });
1174
1229
  };
1175
1230
  export {
1176
- Ot as BlockNoteView,
1177
- St as components
1231
+ Ft as BlockNoteView,
1232
+ Nt as components
1178
1233
  };
1179
1234
  //# sourceMappingURL=blocknote-ariakit.js.map