@blocknote/ariakit 0.13.5 → 0.14.1

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