@blocknote/mantine 0.17.1 → 0.18.0

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,648 +1,19 @@
1
- import D, { forwardRef as R, createContext as Br, useState as Yr, useRef as Z, useCallback as fe, useContext as Ur, useEffect as He } from "react";
2
- import { assertEmpty as p, isSafari as ve, mergeCSSClasses as Gr } from "@blocknote/core";
3
- import { elementOverflow as Je, useBlockNoteContext as Kr, usePrefersColorScheme as qr, ComponentsContext as Hr, BlockNoteViewRaw as Jr } from "@blocknote/react";
4
- import { TextInput as Xe, Menu as O, CheckIcon as Ze, Group as F, Tabs as X, LoadingOverlay as Xr, Button as U, FileInput as Zr, Popover as Qr, PopoverTarget as et, PopoverDropdown as rt, ActionIcon as Qe, Loader as er, Stack as me, Text as Q, Badge as tt, Tooltip as nt, MantineProvider as ot } from "@mantine/core";
5
- import { mergeRefs as te, useFocusWithin as at, useFocusTrap as it } from "@mantine/hooks";
6
- var be = { exports: {} }, B = {};
7
- /**
8
- * @license React
9
- * react-jsx-runtime.production.min.js
10
- *
11
- * Copyright (c) Facebook, Inc. and its affiliates.
12
- *
13
- * This source code is licensed under the MIT license found in the
14
- * LICENSE file in the root directory of this source tree.
15
- */
16
- var We;
17
- function st() {
18
- if (We) return B;
19
- We = 1;
20
- var r = D, n = Symbol.for("react.element"), t = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
21
- function f(c, d, b) {
22
- var h, w = {}, T = null, G = null;
23
- b !== void 0 && (T = "" + b), d.key !== void 0 && (T = "" + d.key), d.ref !== void 0 && (G = d.ref);
24
- for (h in d) o.call(d, h) && !u.hasOwnProperty(h) && (w[h] = d[h]);
25
- if (c && c.defaultProps) for (h in d = c.defaultProps, d) w[h] === void 0 && (w[h] = d[h]);
26
- return { $$typeof: n, type: c, key: T, ref: G, props: w, _owner: i.current };
27
- }
28
- return B.Fragment = t, B.jsx = f, B.jsxs = f, B;
29
- }
30
- var Y = {};
31
- /**
32
- * @license React
33
- * react-jsx-runtime.development.js
34
- *
35
- * Copyright (c) Facebook, Inc. and its affiliates.
36
- *
37
- * This source code is licensed under the MIT license found in the
38
- * LICENSE file in the root directory of this source tree.
39
- */
40
- var Ve;
41
- function lt() {
42
- return Ve || (Ve = 1, process.env.NODE_ENV !== "production" && function() {
43
- var r = D, n = Symbol.for("react.element"), t = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), G = Symbol.for("react.offscreen"), ge = Symbol.iterator, ir = "@@iterator";
44
- function sr(e) {
45
- if (e === null || typeof e != "object")
46
- return null;
47
- var a = ge && e[ge] || e[ir];
48
- return typeof a == "function" ? a : null;
49
- }
50
- var L = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
- function k(e) {
52
- {
53
- for (var a = arguments.length, s = new Array(a > 1 ? a - 1 : 0), v = 1; v < a; v++)
54
- s[v - 1] = arguments[v];
55
- lr("error", e, s);
56
- }
57
- }
58
- function lr(e, a, s) {
59
- {
60
- var v = L.ReactDebugCurrentFrame, x = v.getStackAddendum();
61
- x !== "" && (a += "%s", s = s.concat([x]));
62
- var j = s.map(function(g) {
63
- return String(g);
64
- });
65
- j.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, j);
66
- }
67
- }
68
- var ur = !1, cr = !1, dr = !1, fr = !1, vr = !1, pe;
69
- pe = Symbol.for("react.module.reference");
70
- function br(e) {
71
- return !!(typeof e == "string" || typeof e == "function" || e === o || e === u || vr || e === i || e === b || e === h || fr || e === G || ur || cr || dr || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === w || e.$$typeof === f || e.$$typeof === c || e.$$typeof === d || // This needs to include all possible module reference object
72
- // types supported by any Flight configuration anywhere since
73
- // we don't know which Flight build this will end up being used
74
- // with.
75
- e.$$typeof === pe || e.getModuleId !== void 0));
76
- }
77
- function mr(e, a, s) {
78
- var v = e.displayName;
79
- if (v)
80
- return v;
81
- var x = a.displayName || a.name || "";
82
- return x !== "" ? s + "(" + x + ")" : s;
83
- }
84
- function he(e) {
85
- return e.displayName || "Context";
86
- }
87
- function N(e) {
88
- if (e == null)
89
- return null;
90
- 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")
91
- return e.displayName || e.name || null;
92
- if (typeof e == "string")
93
- return e;
94
- switch (e) {
95
- case o:
96
- return "Fragment";
97
- case t:
98
- return "Portal";
99
- case u:
100
- return "Profiler";
101
- case i:
102
- return "StrictMode";
103
- case b:
104
- return "Suspense";
105
- case h:
106
- return "SuspenseList";
107
- }
108
- if (typeof e == "object")
109
- switch (e.$$typeof) {
110
- case c:
111
- var a = e;
112
- return he(a) + ".Consumer";
113
- case f:
114
- var s = e;
115
- return he(s._context) + ".Provider";
116
- case d:
117
- return mr(e, e.render, "ForwardRef");
118
- case w:
119
- var v = e.displayName || null;
120
- return v !== null ? v : N(e.type) || "Memo";
121
- case T: {
122
- var x = e, j = x._payload, g = x._init;
123
- try {
124
- return N(g(j));
125
- } catch {
126
- return null;
127
- }
128
- }
129
- }
130
- return null;
131
- }
132
- var M = Object.assign, z = 0, xe, ye, je, Re, Ee, Se, we;
133
- function Te() {
134
- }
135
- Te.__reactDisabledLog = !0;
136
- function gr() {
137
- {
138
- if (z === 0) {
139
- xe = console.log, ye = console.info, je = console.warn, Re = console.error, Ee = console.group, Se = console.groupCollapsed, we = console.groupEnd;
140
- var e = {
141
- configurable: !0,
142
- enumerable: !0,
143
- value: Te,
144
- writable: !0
145
- };
146
- Object.defineProperties(console, {
147
- info: e,
148
- log: e,
149
- warn: e,
150
- error: e,
151
- group: e,
152
- groupCollapsed: e,
153
- groupEnd: e
154
- });
155
- }
156
- z++;
157
- }
158
- }
159
- function pr() {
160
- {
161
- if (z--, z === 0) {
162
- var e = {
163
- configurable: !0,
164
- enumerable: !0,
165
- writable: !0
166
- };
167
- Object.defineProperties(console, {
168
- log: M({}, e, {
169
- value: xe
170
- }),
171
- info: M({}, e, {
172
- value: ye
173
- }),
174
- warn: M({}, e, {
175
- value: je
176
- }),
177
- error: M({}, e, {
178
- value: Re
179
- }),
180
- group: M({}, e, {
181
- value: Ee
182
- }),
183
- groupCollapsed: M({}, e, {
184
- value: Se
185
- }),
186
- groupEnd: M({}, e, {
187
- value: we
188
- })
189
- });
190
- }
191
- z < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
- }
193
- }
194
- var ne = L.ReactCurrentDispatcher, oe;
195
- function K(e, a, s) {
196
- {
197
- if (oe === void 0)
198
- try {
199
- throw Error();
200
- } catch (x) {
201
- var v = x.stack.trim().match(/\n( *(at )?)/);
202
- oe = v && v[1] || "";
203
- }
204
- return `
205
- ` + oe + e;
206
- }
207
- }
208
- var ae = !1, q;
209
- {
210
- var hr = typeof WeakMap == "function" ? WeakMap : Map;
211
- q = new hr();
212
- }
213
- function ke(e, a) {
214
- if (!e || ae)
215
- return "";
216
- {
217
- var s = q.get(e);
218
- if (s !== void 0)
219
- return s;
220
- }
221
- var v;
222
- ae = !0;
223
- var x = Error.prepareStackTrace;
224
- Error.prepareStackTrace = void 0;
225
- var j;
226
- j = ne.current, ne.current = null, gr();
227
- try {
228
- if (a) {
229
- var g = function() {
230
- throw Error();
231
- };
232
- if (Object.defineProperty(g.prototype, "props", {
233
- set: function() {
234
- throw Error();
235
- }
236
- }), typeof Reflect == "object" && Reflect.construct) {
237
- try {
238
- Reflect.construct(g, []);
239
- } catch (_) {
240
- v = _;
241
- }
242
- Reflect.construct(e, [], g);
243
- } else {
244
- try {
245
- g.call();
246
- } catch (_) {
247
- v = _;
248
- }
249
- e.call(g.prototype);
250
- }
251
- } else {
252
- try {
253
- throw Error();
254
- } catch (_) {
255
- v = _;
256
- }
257
- e();
258
- }
259
- } catch (_) {
260
- if (_ && v && typeof _.stack == "string") {
261
- for (var m = _.stack.split(`
262
- `), P = v.stack.split(`
263
- `), E = m.length - 1, S = P.length - 1; E >= 1 && S >= 0 && m[E] !== P[S]; )
264
- S--;
265
- for (; E >= 1 && S >= 0; E--, S--)
266
- if (m[E] !== P[S]) {
267
- if (E !== 1 || S !== 1)
268
- do
269
- if (E--, S--, S < 0 || m[E] !== P[S]) {
270
- var C = `
271
- ` + m[E].replace(" at new ", " at ");
272
- return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, C), C;
273
- }
274
- while (E >= 1 && S >= 0);
275
- break;
276
- }
277
- }
278
- } finally {
279
- ae = !1, ne.current = j, pr(), Error.prepareStackTrace = x;
280
- }
281
- var $ = e ? e.displayName || e.name : "", I = $ ? K($) : "";
282
- return typeof e == "function" && q.set(e, I), I;
283
- }
284
- function xr(e, a, s) {
285
- return ke(e, !1);
286
- }
287
- function yr(e) {
288
- var a = e.prototype;
289
- return !!(a && a.isReactComponent);
290
- }
291
- function H(e, a, s) {
292
- if (e == null)
293
- return "";
294
- if (typeof e == "function")
295
- return ke(e, yr(e));
296
- if (typeof e == "string")
297
- return K(e);
298
- switch (e) {
299
- case b:
300
- return K("Suspense");
301
- case h:
302
- return K("SuspenseList");
303
- }
304
- if (typeof e == "object")
305
- switch (e.$$typeof) {
306
- case d:
307
- return xr(e.render);
308
- case w:
309
- return H(e.type, a, s);
310
- case T: {
311
- var v = e, x = v._payload, j = v._init;
312
- try {
313
- return H(j(x), a, s);
314
- } catch {
315
- }
316
- }
317
- }
318
- return "";
319
- }
320
- var W = Object.prototype.hasOwnProperty, Pe = {}, _e = L.ReactDebugCurrentFrame;
321
- function J(e) {
322
- if (e) {
323
- var a = e._owner, s = H(e.type, e._source, a ? a.type : null);
324
- _e.setExtraStackFrame(s);
325
- } else
326
- _e.setExtraStackFrame(null);
327
- }
328
- function jr(e, a, s, v, x) {
329
- {
330
- var j = Function.call.bind(W);
331
- for (var g in e)
332
- if (j(e, g)) {
333
- var m = void 0;
334
- try {
335
- if (typeof e[g] != "function") {
336
- var P = Error((v || "React class") + ": " + s + " type `" + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[g] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
- throw P.name = "Invariant Violation", P;
338
- }
339
- m = e[g](a, g, v, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
- } catch (E) {
341
- m = E;
342
- }
343
- m && !(m instanceof Error) && (J(x), 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).", v || "React class", s, g, typeof m), J(null)), m instanceof Error && !(m.message in Pe) && (Pe[m.message] = !0, J(x), k("Failed %s type: %s", s, m.message), J(null));
344
- }
345
- }
346
- }
347
- var Rr = Array.isArray;
348
- function ie(e) {
349
- return Rr(e);
350
- }
351
- function Er(e) {
352
- {
353
- var a = typeof Symbol == "function" && Symbol.toStringTag, s = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
354
- return s;
355
- }
356
- }
357
- function Sr(e) {
358
- try {
359
- return Ce(e), !1;
360
- } catch {
361
- return !0;
362
- }
363
- }
364
- function Ce(e) {
365
- return "" + e;
366
- }
367
- function Oe(e) {
368
- if (Sr(e))
369
- return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Er(e)), Ce(e);
370
- }
371
- var V = L.ReactCurrentOwner, wr = {
372
- key: !0,
373
- ref: !0,
374
- __self: !0,
375
- __source: !0
376
- }, Fe, Ne, se;
377
- se = {};
378
- function Tr(e) {
379
- if (W.call(e, "ref")) {
380
- var a = Object.getOwnPropertyDescriptor(e, "ref").get;
381
- if (a && a.isReactWarning)
382
- return !1;
383
- }
384
- return e.ref !== void 0;
385
- }
386
- function kr(e) {
387
- if (W.call(e, "key")) {
388
- var a = Object.getOwnPropertyDescriptor(e, "key").get;
389
- if (a && a.isReactWarning)
390
- return !1;
391
- }
392
- return e.key !== void 0;
393
- }
394
- function Pr(e, a) {
395
- if (typeof e.ref == "string" && V.current && a && V.current.stateNode !== a) {
396
- var s = N(V.current.type);
397
- se[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(V.current.type), e.ref), se[s] = !0);
398
- }
399
- }
400
- function _r(e, a) {
401
- {
402
- var s = function() {
403
- Fe || (Fe = !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)", a));
404
- };
405
- s.isReactWarning = !0, Object.defineProperty(e, "key", {
406
- get: s,
407
- configurable: !0
408
- });
409
- }
410
- }
411
- function Cr(e, a) {
412
- {
413
- var s = function() {
414
- Ne || (Ne = !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)", a));
415
- };
416
- s.isReactWarning = !0, Object.defineProperty(e, "ref", {
417
- get: s,
418
- configurable: !0
419
- });
420
- }
421
- }
422
- var Or = function(e, a, s, v, x, j, g) {
423
- var m = {
424
- // This tag allows us to uniquely identify this as a React Element
425
- $$typeof: n,
426
- // Built-in properties that belong on the element
427
- type: e,
428
- key: a,
429
- ref: s,
430
- props: g,
431
- // Record the component responsible for creating this element.
432
- _owner: j
433
- };
434
- return m._store = {}, Object.defineProperty(m._store, "validated", {
435
- configurable: !1,
436
- enumerable: !1,
437
- writable: !0,
438
- value: !1
439
- }), Object.defineProperty(m, "_self", {
440
- configurable: !1,
441
- enumerable: !1,
442
- writable: !1,
443
- value: v
444
- }), Object.defineProperty(m, "_source", {
445
- configurable: !1,
446
- enumerable: !1,
447
- writable: !1,
448
- value: x
449
- }), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
450
- };
451
- function Fr(e, a, s, v, x) {
452
- {
453
- var j, g = {}, m = null, P = null;
454
- s !== void 0 && (Oe(s), m = "" + s), kr(a) && (Oe(a.key), m = "" + a.key), Tr(a) && (P = a.ref, Pr(a, x));
455
- for (j in a)
456
- W.call(a, j) && !wr.hasOwnProperty(j) && (g[j] = a[j]);
457
- if (e && e.defaultProps) {
458
- var E = e.defaultProps;
459
- for (j in E)
460
- g[j] === void 0 && (g[j] = E[j]);
461
- }
462
- if (m || P) {
463
- var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
464
- m && _r(g, S), P && Cr(g, S);
465
- }
466
- return Or(e, m, P, x, v, V.current, g);
467
- }
468
- }
469
- var le = L.ReactCurrentOwner, De = L.ReactDebugCurrentFrame;
470
- function A(e) {
471
- if (e) {
472
- var a = e._owner, s = H(e.type, e._source, a ? a.type : null);
473
- De.setExtraStackFrame(s);
474
- } else
475
- De.setExtraStackFrame(null);
476
- }
477
- var ue;
478
- ue = !1;
479
- function ce(e) {
480
- return typeof e == "object" && e !== null && e.$$typeof === n;
481
- }
482
- function Me() {
483
- {
484
- if (le.current) {
485
- var e = N(le.current.type);
486
- if (e)
487
- return `
488
-
489
- Check the render method of \`` + e + "`.";
490
- }
491
- return "";
492
- }
493
- }
494
- function Nr(e) {
495
- return "";
496
- }
497
- var Ie = {};
498
- function Dr(e) {
499
- {
500
- var a = Me();
501
- if (!a) {
502
- var s = typeof e == "string" ? e : e.displayName || e.name;
503
- s && (a = `
504
-
505
- Check the top-level render call using <` + s + ">.");
506
- }
507
- return a;
508
- }
509
- }
510
- function Le(e, a) {
511
- {
512
- if (!e._store || e._store.validated || e.key != null)
513
- return;
514
- e._store.validated = !0;
515
- var s = Dr(a);
516
- if (Ie[s])
517
- return;
518
- Ie[s] = !0;
519
- var v = "";
520
- e && e._owner && e._owner !== le.current && (v = " It was passed a child from " + N(e._owner.type) + "."), A(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, v), A(null);
521
- }
522
- }
523
- function Ae(e, a) {
524
- {
525
- if (typeof e != "object")
526
- return;
527
- if (ie(e))
528
- for (var s = 0; s < e.length; s++) {
529
- var v = e[s];
530
- ce(v) && Le(v, a);
531
- }
532
- else if (ce(e))
533
- e._store && (e._store.validated = !0);
534
- else if (e) {
535
- var x = sr(e);
536
- if (typeof x == "function" && x !== e.entries)
537
- for (var j = x.call(e), g; !(g = j.next()).done; )
538
- ce(g.value) && Le(g.value, a);
539
- }
540
- }
541
- }
542
- function Mr(e) {
543
- {
544
- var a = e.type;
545
- if (a == null || typeof a == "string")
546
- return;
547
- var s;
548
- if (typeof a == "function")
549
- s = a.propTypes;
550
- else if (typeof a == "object" && (a.$$typeof === d || // Note: Memo only checks outer props here.
551
- // Inner props are checked in the reconciler.
552
- a.$$typeof === w))
553
- s = a.propTypes;
554
- else
555
- return;
556
- if (s) {
557
- var v = N(a);
558
- jr(s, e.props, "prop", v, e);
559
- } else if (a.PropTypes !== void 0 && !ue) {
560
- ue = !0;
561
- var x = N(a);
562
- k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", x || "Unknown");
563
- }
564
- typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
565
- }
566
- }
567
- function Ir(e) {
568
- {
569
- for (var a = Object.keys(e.props), s = 0; s < a.length; s++) {
570
- var v = a[s];
571
- if (v !== "children" && v !== "key") {
572
- A(e), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), A(null);
573
- break;
574
- }
575
- }
576
- e.ref !== null && (A(e), k("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
577
- }
578
- }
579
- var $e = {};
580
- function ze(e, a, s, v, x, j) {
581
- {
582
- var g = br(e);
583
- if (!g) {
584
- var m = "";
585
- (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.");
586
- var P = Nr();
587
- P ? m += P : m += Me();
588
- var E;
589
- e === null ? E = "null" : ie(e) ? E = "array" : e !== void 0 && e.$$typeof === n ? (E = "<" + (N(e.type) || "Unknown") + " />", m = " Did you accidentally export a JSX literal instead of a component?") : E = 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", E, m);
590
- }
591
- var S = Fr(e, a, s, x, j);
592
- if (S == null)
593
- return S;
594
- if (g) {
595
- var C = a.children;
596
- if (C !== void 0)
597
- if (v)
598
- if (ie(C)) {
599
- for (var $ = 0; $ < C.length; $++)
600
- Ae(C[$], e);
601
- Object.freeze && Object.freeze(C);
602
- } else
603
- 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.");
604
- else
605
- Ae(C, e);
606
- }
607
- if (W.call(a, "key")) {
608
- var I = N(e), _ = Object.keys(a).filter(function(Vr) {
609
- return Vr !== "key";
610
- }), de = _.length > 0 ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}";
611
- if (!$e[I + de]) {
612
- var Wr = _.length > 0 ? "{" + _.join(": ..., ") + ": ...}" : "{}";
613
- k(`A props object containing a "key" prop is being spread into JSX:
614
- let props = %s;
615
- <%s {...props} />
616
- React keys must be passed directly to JSX without using spread:
617
- let props = %s;
618
- <%s key={someKey} {...props} />`, de, I, Wr, I), $e[I + de] = !0;
619
- }
620
- }
621
- return e === o ? Ir(S) : Mr(S), S;
622
- }
623
- }
624
- function Lr(e, a, s) {
625
- return ze(e, a, s, !0);
626
- }
627
- function Ar(e, a, s) {
628
- return ze(e, a, s, !1);
629
- }
630
- var $r = Ar, zr = Lr;
631
- Y.Fragment = o, Y.jsx = $r, Y.jsxs = zr;
632
- }()), Y;
633
- }
634
- process.env.NODE_ENV === "production" ? be.exports = st() : be.exports = lt();
635
- var l = be.exports;
636
- const rr = (r, n, t = !1) => {
637
- const o = [];
638
- function i(u, f = "--bn") {
639
- for (const c in u) {
640
- const d = c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), b = `${f}-${d}`;
641
- typeof u[c] != "object" ? (typeof u[c] == "number" && (u[c] = `${u[c]}px`), t ? n.style.removeProperty(b) : n.style.setProperty(b, u[c].toString())) : i(u[c], b);
1
+ import { jsx as i, jsxs as y } from "react/jsx-runtime";
2
+ import { assertEmpty as d, isSafari as M, mergeCSSClasses as U } from "@blocknote/core";
3
+ import { elementOverflow as E, useBlockNoteContext as Z, usePrefersColorScheme as J, ComponentsContext as Q, BlockNoteViewRaw as X } from "@blocknote/react";
4
+ import { TextInput as B, Menu as f, CheckIcon as $, Group as p, Tabs as w, LoadingOverlay as Y, Button as k, FileInput as ee, Popover as te, PopoverTarget as ne, PopoverDropdown as re, ActionIcon as V, Loader as G, Stack as O, Text as S, Badge as oe, Tooltip as se, MantineProvider as ie } from "@mantine/core";
5
+ import x, { forwardRef as b, createContext as ae, useState as le, useRef as N, useCallback as F, useContext as ce, useEffect as _ } from "react";
6
+ import { mergeRefs as T, useFocusWithin as ue, useFocusTrap as de } from "@mantine/hooks";
7
+ const H = (e, n, t = !1) => {
8
+ const r = [];
9
+ function o(s, l = "--bn") {
10
+ for (const a in s) {
11
+ const c = a.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), u = `${l}-${c}`;
12
+ typeof s[a] != "object" ? (typeof s[a] == "number" && (s[a] = `${s[a]}px`), t ? n.style.removeProperty(u) : n.style.setProperty(u, s[a].toString())) : o(s[a], u);
642
13
  }
643
14
  }
644
- return i(r), o;
645
- }, Be = (r, n) => rr(r, n), ut = {
15
+ return o(e), r;
16
+ }, I = (e, n) => H(e, n), me = {
646
17
  colors: {
647
18
  editor: {
648
19
  text: void 0,
@@ -712,196 +83,196 @@ const rr = (r, n, t = !1) => {
712
83
  },
713
84
  borderRadius: void 0,
714
85
  fontFamily: void 0
715
- }, ct = (r) => rr(ut, r, !0), dt = R((r, n) => {
86
+ }, be = (e) => H(me, e, !0), ge = b((e, n) => {
716
87
  const {
717
88
  className: t,
718
- name: o,
719
- label: i,
720
- icon: u,
721
- value: f,
722
- autoFocus: c,
723
- placeholder: d,
724
- onKeyDown: b,
725
- onChange: h,
726
- onSubmit: w,
727
- ...T
728
- } = r;
729
- return p(T), /* @__PURE__ */ l.jsx(
730
- Xe,
89
+ name: r,
90
+ label: o,
91
+ icon: s,
92
+ value: l,
93
+ autoFocus: a,
94
+ placeholder: c,
95
+ onKeyDown: u,
96
+ onChange: g,
97
+ onSubmit: v,
98
+ ...h
99
+ } = e;
100
+ return d(h), /* @__PURE__ */ i(
101
+ B,
731
102
  {
732
103
  size: "xs",
733
104
  className: t,
734
105
  ref: n,
735
- name: o,
736
- label: i,
737
- leftSection: u,
738
- value: f,
739
- autoFocus: c,
740
- "data-autofocus": c ? "true" : void 0,
741
- placeholder: d,
742
- onKeyDown: b,
743
- onChange: h,
744
- onSubmit: w
106
+ name: r,
107
+ label: o,
108
+ leftSection: s,
109
+ value: l,
110
+ autoFocus: a,
111
+ "data-autofocus": a ? "true" : void 0,
112
+ placeholder: c,
113
+ onKeyDown: u,
114
+ onChange: g,
115
+ onSubmit: v
745
116
  }
746
117
  );
747
118
  });
748
- var tr = {
119
+ var A = {
749
120
  color: void 0,
750
121
  size: void 0,
751
122
  className: void 0,
752
123
  style: void 0,
753
124
  attr: void 0
754
- }, Ye = D.createContext && /* @__PURE__ */ D.createContext(tr), ft = ["attr", "size", "title"];
755
- function vt(r, n) {
756
- if (r == null) return {};
757
- var t = bt(r, n), o, i;
125
+ }, R = x.createContext && /* @__PURE__ */ x.createContext(A), fe = ["attr", "size", "title"];
126
+ function pe(e, n) {
127
+ if (e == null) return {};
128
+ var t = ve(e, n), r, o;
758
129
  if (Object.getOwnPropertySymbols) {
759
- var u = Object.getOwnPropertySymbols(r);
760
- for (i = 0; i < u.length; i++)
761
- o = u[i], !(n.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(r, o) && (t[o] = r[o]);
130
+ var s = Object.getOwnPropertySymbols(e);
131
+ for (o = 0; o < s.length; o++)
132
+ r = s[o], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
762
133
  }
763
134
  return t;
764
135
  }
765
- function bt(r, n) {
766
- if (r == null) return {};
136
+ function ve(e, n) {
137
+ if (e == null) return {};
767
138
  var t = {};
768
- for (var o in r)
769
- if (Object.prototype.hasOwnProperty.call(r, o)) {
770
- if (n.indexOf(o) >= 0) continue;
771
- t[o] = r[o];
139
+ for (var r in e)
140
+ if (Object.prototype.hasOwnProperty.call(e, r)) {
141
+ if (n.indexOf(r) >= 0) continue;
142
+ t[r] = e[r];
772
143
  }
773
144
  return t;
774
145
  }
775
- function ee() {
776
- return ee = Object.assign ? Object.assign.bind() : function(r) {
146
+ function C() {
147
+ return C = Object.assign ? Object.assign.bind() : function(e) {
777
148
  for (var n = 1; n < arguments.length; n++) {
778
149
  var t = arguments[n];
779
- for (var o in t)
780
- Object.prototype.hasOwnProperty.call(t, o) && (r[o] = t[o]);
150
+ for (var r in t)
151
+ Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
781
152
  }
782
- return r;
783
- }, ee.apply(this, arguments);
153
+ return e;
154
+ }, C.apply(this, arguments);
784
155
  }
785
- function Ue(r, n) {
786
- var t = Object.keys(r);
156
+ function D(e, n) {
157
+ var t = Object.keys(e);
787
158
  if (Object.getOwnPropertySymbols) {
788
- var o = Object.getOwnPropertySymbols(r);
789
- n && (o = o.filter(function(i) {
790
- return Object.getOwnPropertyDescriptor(r, i).enumerable;
791
- })), t.push.apply(t, o);
159
+ var r = Object.getOwnPropertySymbols(e);
160
+ n && (r = r.filter(function(o) {
161
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
162
+ })), t.push.apply(t, r);
792
163
  }
793
164
  return t;
794
165
  }
795
- function re(r) {
166
+ function P(e) {
796
167
  for (var n = 1; n < arguments.length; n++) {
797
168
  var t = arguments[n] != null ? arguments[n] : {};
798
- n % 2 ? Ue(Object(t), !0).forEach(function(o) {
799
- mt(r, o, t[o]);
800
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : Ue(Object(t)).forEach(function(o) {
801
- Object.defineProperty(r, o, Object.getOwnPropertyDescriptor(t, o));
169
+ n % 2 ? D(Object(t), !0).forEach(function(r) {
170
+ he(e, r, t[r]);
171
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : D(Object(t)).forEach(function(r) {
172
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
802
173
  });
803
174
  }
804
- return r;
175
+ return e;
805
176
  }
806
- function mt(r, n, t) {
807
- return n = gt(n), n in r ? Object.defineProperty(r, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : r[n] = t, r;
177
+ function he(e, n, t) {
178
+ return n = xe(n), n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
808
179
  }
809
- function gt(r) {
810
- var n = pt(r, "string");
180
+ function xe(e) {
181
+ var n = ye(e, "string");
811
182
  return typeof n == "symbol" ? n : n + "";
812
183
  }
813
- function pt(r, n) {
814
- if (typeof r != "object" || !r) return r;
815
- var t = r[Symbol.toPrimitive];
184
+ function ye(e, n) {
185
+ if (typeof e != "object" || !e) return e;
186
+ var t = e[Symbol.toPrimitive];
816
187
  if (t !== void 0) {
817
- var o = t.call(r, n || "default");
818
- if (typeof o != "object") return o;
188
+ var r = t.call(e, n || "default");
189
+ if (typeof r != "object") return r;
819
190
  throw new TypeError("@@toPrimitive must return a primitive value.");
820
191
  }
821
- return (n === "string" ? String : Number)(r);
192
+ return (n === "string" ? String : Number)(e);
822
193
  }
823
- function nr(r) {
824
- return r && r.map((n, t) => /* @__PURE__ */ D.createElement(n.tag, re({
194
+ function K(e) {
195
+ return e && e.map((n, t) => /* @__PURE__ */ x.createElement(n.tag, P({
825
196
  key: t
826
- }, n.attr), nr(n.child)));
197
+ }, n.attr), K(n.child)));
827
198
  }
828
- function or(r) {
829
- return (n) => /* @__PURE__ */ D.createElement(ht, ee({
830
- attr: re({}, r.attr)
831
- }, n), nr(r.child));
199
+ function W(e) {
200
+ return (n) => /* @__PURE__ */ x.createElement(ke, C({
201
+ attr: P({}, e.attr)
202
+ }, n), K(e.child));
832
203
  }
833
- function ht(r) {
204
+ function ke(e) {
834
205
  var n = (t) => {
835
206
  var {
836
- attr: o,
837
- size: i,
838
- title: u
839
- } = r, f = vt(r, ft), c = i || t.size || "1em", d;
840
- return t.className && (d = t.className), r.className && (d = (d ? d + " " : "") + r.className), /* @__PURE__ */ D.createElement("svg", ee({
207
+ attr: r,
208
+ size: o,
209
+ title: s
210
+ } = e, l = pe(e, fe), a = o || t.size || "1em", c;
211
+ return t.className && (c = t.className), e.className && (c = (c ? c + " " : "") + e.className), /* @__PURE__ */ x.createElement("svg", C({
841
212
  stroke: "currentColor",
842
213
  fill: "currentColor",
843
214
  strokeWidth: "0"
844
- }, t.attr, o, f, {
845
- className: d,
846
- style: re(re({
847
- color: r.color || t.color
848
- }, t.style), r.style),
849
- height: c,
850
- width: c,
215
+ }, t.attr, r, l, {
216
+ className: c,
217
+ style: P(P({
218
+ color: e.color || t.color
219
+ }, t.style), e.style),
220
+ height: a,
221
+ width: a,
851
222
  xmlns: "http://www.w3.org/2000/svg"
852
- }), u && /* @__PURE__ */ D.createElement("title", null, u), r.children);
223
+ }), s && /* @__PURE__ */ x.createElement("title", null, s), e.children);
853
224
  };
854
- return Ye !== void 0 ? /* @__PURE__ */ D.createElement(Ye.Consumer, null, (t) => n(t)) : n(tr);
225
+ return R !== void 0 ? /* @__PURE__ */ x.createElement(R.Consumer, null, (t) => n(t)) : n(A);
855
226
  }
856
- function xt(r) {
857
- return or({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", clipRule: "evenodd" }, child: [] }] })(r);
227
+ function we(e) {
228
+ return W({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", clipRule: "evenodd" }, child: [] }] })(e);
858
229
  }
859
- function yt(r) {
860
- return or({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", clipRule: "evenodd" }, child: [] }] })(r);
230
+ function Se(e) {
231
+ return W({ tag: "svg", attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", clipRule: "evenodd" }, child: [] }] })(e);
861
232
  }
862
- const ar = Br(void 0), jt = R((r, n) => {
233
+ const q = ae(void 0), Ne = b((e, n) => {
863
234
  const {
864
235
  children: t,
865
- onOpenChange: o,
866
- position: i,
867
- sub: u,
236
+ onOpenChange: r,
237
+ position: o,
238
+ sub: s,
868
239
  // not used
869
- ...f
870
- } = r;
871
- p(f);
872
- const [c, d] = Yr(!1), b = Z(null), h = Z(), w = fe(() => {
873
- h.current && clearTimeout(h.current), h.current = setTimeout(() => {
874
- d(!1);
240
+ ...l
241
+ } = e;
242
+ d(l);
243
+ const [a, c] = le(!1), u = N(null), g = N(), v = F(() => {
244
+ g.current && clearTimeout(g.current), g.current = setTimeout(() => {
245
+ c(!1);
875
246
  }, 250);
876
- }, []), T = fe(() => {
877
- h.current && clearTimeout(h.current), d(!0);
247
+ }, []), h = F(() => {
248
+ g.current && clearTimeout(g.current), c(!0);
878
249
  }, []);
879
- return /* @__PURE__ */ l.jsx(
880
- ar.Provider,
250
+ return /* @__PURE__ */ i(
251
+ q.Provider,
881
252
  {
882
253
  value: {
883
- onMenuMouseOver: T,
884
- onMenuMouseLeave: w
254
+ onMenuMouseOver: h,
255
+ onMenuMouseLeave: v
885
256
  },
886
- children: /* @__PURE__ */ l.jsx(
887
- O.Item,
257
+ children: /* @__PURE__ */ i(
258
+ f.Item,
888
259
  {
889
260
  className: "bn-menu-item bn-mt-sub-menu-item",
890
- ref: te(n, b),
891
- onMouseOver: T,
892
- onMouseLeave: w,
893
- children: /* @__PURE__ */ l.jsx(
894
- O,
261
+ ref: T(n, u),
262
+ onMouseOver: h,
263
+ onMouseLeave: v,
264
+ children: /* @__PURE__ */ i(
265
+ f,
895
266
  {
896
267
  portalProps: {
897
- target: b.current ? b.current.parentElement : void 0
268
+ target: u.current ? u.current.parentElement : void 0
898
269
  },
899
270
  middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
900
271
  trigger: "hover",
901
- opened: c,
902
- onClose: () => o == null ? void 0 : o(!1),
903
- onOpen: () => o == null ? void 0 : o(!0),
904
- position: i,
272
+ opened: a,
273
+ onClose: () => r == null ? void 0 : r(!1),
274
+ onOpen: () => r == null ? void 0 : r(!0),
275
+ position: o,
905
276
  children: t
906
277
  }
907
278
  )
@@ -909,519 +280,532 @@ const ar = Br(void 0), jt = R((r, n) => {
909
280
  )
910
281
  }
911
282
  );
912
- }), Rt = (r) => {
913
- const { children: n, onOpenChange: t, position: o, sub: i, ...u } = r;
914
- return p(u), i ? /* @__PURE__ */ l.jsx(jt, { ...r }) : /* @__PURE__ */ l.jsx(
915
- O,
283
+ }), Ce = (e) => {
284
+ const { children: n, onOpenChange: t, position: r, sub: o, ...s } = e;
285
+ return d(s), o ? /* @__PURE__ */ i(Ne, { ...e }) : /* @__PURE__ */ i(
286
+ f,
916
287
  {
917
288
  withinPortal: !1,
918
289
  middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
919
290
  onClose: () => t == null ? void 0 : t(!1),
920
291
  onOpen: () => t == null ? void 0 : t(!0),
921
- position: o,
292
+ position: r,
922
293
  children: n
923
294
  }
924
295
  );
925
- }, Et = R((r, n) => {
926
- const { className: t, children: o, icon: i, checked: u, subTrigger: f, onClick: c, ...d } = r;
927
- return p(d, !1), f ? /* @__PURE__ */ l.jsxs("div", { ref: n, ...d, children: [
928
- o,
929
- /* @__PURE__ */ l.jsx(yt, { size: 15 })
930
- ] }) : /* @__PURE__ */ l.jsx(
931
- O.Item,
296
+ }, Pe = b((e, n) => {
297
+ const { className: t, children: r, icon: o, checked: s, subTrigger: l, onClick: a, ...c } = e;
298
+ return d(c, !1), l ? /* @__PURE__ */ y("div", { ref: n, ...c, children: [
299
+ r,
300
+ /* @__PURE__ */ i(Se, { size: 15 })
301
+ ] }) : /* @__PURE__ */ i(
302
+ f.Item,
932
303
  {
933
304
  className: t,
934
305
  ref: n,
935
- leftSection: i,
936
- rightSection: u ? /* @__PURE__ */ l.jsx(Ze, { size: 10 }) : u === !1 ? /* @__PURE__ */ l.jsx("div", { className: "bn-tick-space" }) : null,
937
- onClick: c,
938
- ...d,
939
- children: o
306
+ leftSection: o,
307
+ rightSection: s ? /* @__PURE__ */ i($, { size: 10 }) : s === !1 ? /* @__PURE__ */ i("div", { className: "bn-tick-space" }) : null,
308
+ onClick: a,
309
+ ...c,
310
+ children: r
940
311
  }
941
312
  );
942
- }), St = (r) => {
313
+ }), Te = (e) => {
943
314
  const {
944
315
  children: n,
945
316
  sub: t,
946
317
  // unused
947
- ...o
948
- } = r;
949
- return p(o), /* @__PURE__ */ l.jsx(O.Target, { children: n });
950
- }, wt = R((r, n) => {
318
+ ...r
319
+ } = e;
320
+ return d(r), /* @__PURE__ */ i(f.Target, { children: n });
321
+ }, Me = b((e, n) => {
951
322
  const {
952
323
  className: t,
953
- children: o,
954
- sub: i,
324
+ children: r,
325
+ sub: o,
955
326
  //unused
956
- ...u
957
- } = r;
958
- p(u);
959
- const f = Ur(ar);
960
- return /* @__PURE__ */ l.jsx(
961
- O.Dropdown,
327
+ ...s
328
+ } = e;
329
+ d(s);
330
+ const l = ce(q);
331
+ return /* @__PURE__ */ i(
332
+ f.Dropdown,
962
333
  {
963
334
  className: t,
964
335
  ref: n,
965
- onMouseOver: f == null ? void 0 : f.onMenuMouseOver,
966
- onMouseLeave: f == null ? void 0 : f.onMenuMouseLeave,
967
- children: o
336
+ onMouseOver: l == null ? void 0 : l.onMenuMouseOver,
337
+ onMouseLeave: l == null ? void 0 : l.onMenuMouseLeave,
338
+ children: r
968
339
  }
969
340
  );
970
- }), Tt = R((r, n) => {
971
- const { className: t, ...o } = r;
972
- return p(o), /* @__PURE__ */ l.jsx(O.Divider, { className: t, ref: n });
973
- }), kt = R((r, n) => {
974
- const { className: t, children: o, ...i } = r;
975
- return p(i), /* @__PURE__ */ l.jsx(O.Label, { className: t, ref: n, children: o });
976
- }), Pt = R((r, n) => {
341
+ }), Fe = b((e, n) => {
342
+ const { className: t, ...r } = e;
343
+ return d(r), /* @__PURE__ */ i(f.Divider, { className: t, ref: n });
344
+ }), Oe = b((e, n) => {
345
+ const { className: t, children: r, ...o } = e;
346
+ return d(o), /* @__PURE__ */ i(f.Label, { className: t, ref: n, children: r });
347
+ }), Ie = b((e, n) => {
977
348
  const {
978
349
  className: t,
979
- tabs: o,
980
- defaultOpenTab: i,
981
- openTab: u,
982
- setOpenTab: f,
983
- loading: c,
984
- ...d
985
- } = r;
986
- return p(d), /* @__PURE__ */ l.jsx(F, { className: t, ref: n, children: /* @__PURE__ */ l.jsxs(
987
- X,
350
+ tabs: r,
351
+ defaultOpenTab: o,
352
+ openTab: s,
353
+ setOpenTab: l,
354
+ loading: a,
355
+ ...c
356
+ } = e;
357
+ return d(c), /* @__PURE__ */ i(p, { className: t, ref: n, children: /* @__PURE__ */ y(
358
+ w,
988
359
  {
989
- value: u,
990
- defaultValue: i,
991
- onChange: f,
360
+ value: s,
361
+ defaultValue: o,
362
+ onChange: l,
992
363
  children: [
993
- c && /* @__PURE__ */ l.jsx(Xr, { visible: c }),
994
- /* @__PURE__ */ l.jsx(X.List, { children: o.map((b) => /* @__PURE__ */ l.jsx(
995
- X.Tab,
364
+ a && /* @__PURE__ */ i(Y, { visible: a }),
365
+ /* @__PURE__ */ i(w.List, { children: r.map((u) => /* @__PURE__ */ i(
366
+ w.Tab,
996
367
  {
997
- "data-test": `${b.name.toLowerCase()}-tab`,
998
- value: b.name,
999
- children: b.name
368
+ "data-test": `${u.name.toLowerCase()}-tab`,
369
+ value: u.name,
370
+ children: u.name
1000
371
  },
1001
- b.name
372
+ u.name
1002
373
  )) }),
1003
- o.map((b) => /* @__PURE__ */ l.jsx(X.Panel, { value: b.name, children: b.tabPanel }, b.name))
374
+ r.map((u) => /* @__PURE__ */ i(w.Panel, { value: u.name, children: u.tabPanel }, u.name))
1004
375
  ]
1005
376
  }
1006
377
  ) });
1007
- }), _t = R((r, n) => {
1008
- const { className: t, children: o, onClick: i, label: u, ...f } = r;
1009
- return p(f), /* @__PURE__ */ l.jsx(
1010
- U,
378
+ }), Re = b((e, n) => {
379
+ const { className: t, children: r, onClick: o, label: s, ...l } = e;
380
+ return d(l), /* @__PURE__ */ i(
381
+ k,
1011
382
  {
1012
383
  size: "xs",
1013
- "aria-label": u,
384
+ "aria-label": s,
1014
385
  className: t,
1015
386
  ref: n,
1016
- onClick: i,
1017
- ...f,
1018
- children: o
387
+ onClick: o,
388
+ ...l,
389
+ children: r
1019
390
  }
1020
391
  );
1021
- }), Ct = R((r, n) => {
1022
- const { className: t, accept: o, value: i, placeholder: u, onChange: f, ...c } = r;
1023
- return p(c), /* @__PURE__ */ l.jsx(
1024
- Zr,
392
+ }), De = b((e, n) => {
393
+ const { className: t, accept: r, value: o, placeholder: s, onChange: l, ...a } = e;
394
+ return d(a), /* @__PURE__ */ i(
395
+ ee,
1025
396
  {
1026
397
  size: "xs",
1027
398
  className: t,
1028
399
  ref: n,
1029
- accept: o,
1030
- value: i,
1031
- placeholder: u,
1032
- onChange: f,
1033
- ...c
400
+ accept: r,
401
+ value: o,
402
+ placeholder: s,
403
+ onChange: l,
404
+ ...a
1034
405
  }
1035
406
  );
1036
- }), Ot = R((r, n) => {
1037
- const { className: t, children: o, ...i } = r;
1038
- return p(i), /* @__PURE__ */ l.jsx("div", { className: t, ref: n, children: o });
1039
- }), Ft = R((r, n) => {
1040
- const { className: t, value: o, placeholder: i, onKeyDown: u, onChange: f, ...c } = r;
1041
- return p(c), /* @__PURE__ */ l.jsx(
1042
- Xe,
407
+ }), je = b((e, n) => {
408
+ const { className: t, children: r, ...o } = e;
409
+ return d(o), /* @__PURE__ */ i("div", { className: t, ref: n, children: r });
410
+ }), ze = b((e, n) => {
411
+ const { className: t, value: r, placeholder: o, onKeyDown: s, onChange: l, ...a } = e;
412
+ return d(a), /* @__PURE__ */ i(
413
+ B,
1043
414
  {
1044
415
  size: "xs",
1045
416
  "data-test": "embed-input",
1046
417
  className: t,
1047
418
  ref: n,
1048
- value: o,
1049
- placeholder: i,
1050
- onKeyDown: u,
1051
- onChange: f
419
+ value: r,
420
+ placeholder: o,
421
+ onKeyDown: s,
422
+ onChange: l
1052
423
  }
1053
424
  );
1054
- }), Nt = (r) => {
1055
- const { children: n, opened: t, position: o, ...i } = r;
1056
- return p(i), /* @__PURE__ */ l.jsx(
1057
- Qr,
425
+ }), Le = (e) => {
426
+ const { children: n, opened: t, position: r, ...o } = e;
427
+ return d(o), /* @__PURE__ */ i(
428
+ te,
1058
429
  {
1059
430
  withinPortal: !1,
1060
431
  zIndex: 1e4,
1061
432
  opened: t,
1062
- position: o,
433
+ position: r,
1063
434
  children: n
1064
435
  }
1065
436
  );
1066
- }, Dt = (r) => {
1067
- const { children: n, ...t } = r;
1068
- return p(t), /* @__PURE__ */ l.jsx(et, { children: n });
1069
- }, Mt = R((r, n) => {
437
+ }, Ee = (e) => {
438
+ const { children: n, ...t } = e;
439
+ return d(t), /* @__PURE__ */ i(ne, { children: n });
440
+ }, Be = b((e, n) => {
1070
441
  const {
1071
442
  className: t,
1072
- children: o,
1073
- variant: i,
443
+ children: r,
444
+ variant: o,
1074
445
  // unused
1075
- ...u
1076
- } = r;
1077
- return p(u), /* @__PURE__ */ l.jsx(rt, { className: t, ref: n, children: o });
1078
- }), It = R((r, n) => {
1079
- const { className: t, children: o, ...i } = r;
1080
- return p(i, !1), /* @__PURE__ */ l.jsx(
1081
- F,
446
+ ...s
447
+ } = e;
448
+ return d(s), /* @__PURE__ */ i(re, { className: t, ref: n, children: r });
449
+ }), $e = b((e, n) => {
450
+ const { className: t, children: r, ...o } = e;
451
+ return d(o, !1), /* @__PURE__ */ i(
452
+ p,
1082
453
  {
1083
454
  align: "center",
1084
455
  gap: 0,
1085
456
  className: t,
1086
457
  ref: n,
1087
- ...i,
1088
- children: o
458
+ ...o,
459
+ children: r
1089
460
  }
1090
461
  );
1091
- }), Lt = R((r, n) => {
462
+ }), Ve = b((e, n) => {
1092
463
  const {
1093
464
  className: t,
1094
- children: o,
1095
- icon: i,
1096
- onClick: u,
1097
- onDragEnd: f,
1098
- onDragStart: c,
1099
- draggable: d,
1100
- label: b,
1101
- ...h
1102
- } = r;
1103
- return p(h, !1), i ? /* @__PURE__ */ l.jsx(
1104
- Qe,
465
+ children: r,
466
+ icon: o,
467
+ onClick: s,
468
+ onDragEnd: l,
469
+ onDragStart: a,
470
+ draggable: c,
471
+ label: u,
472
+ ...g
473
+ } = e;
474
+ return d(g, !1), o ? /* @__PURE__ */ i(
475
+ V,
1105
476
  {
1106
477
  size: 24,
1107
478
  className: t,
1108
479
  ref: n,
1109
- onClick: u,
1110
- onDragEnd: f,
1111
- onDragStart: c,
1112
- draggable: d,
1113
- "aria-label": b,
1114
- ...h,
1115
- children: i
480
+ onClick: s,
481
+ onDragEnd: l,
482
+ onDragStart: a,
483
+ draggable: c,
484
+ "aria-label": u,
485
+ ...g,
486
+ children: o
1116
487
  }
1117
- ) : /* @__PURE__ */ l.jsx(
1118
- U,
488
+ ) : /* @__PURE__ */ i(
489
+ k,
1119
490
  {
1120
491
  className: t,
1121
492
  ref: n,
1122
- onClick: u,
1123
- onDragEnd: f,
1124
- onDragStart: c,
1125
- draggable: d,
1126
- "aria-label": b,
1127
- ...h,
1128
- children: o
493
+ onClick: s,
494
+ onDragEnd: l,
495
+ onDragStart: a,
496
+ draggable: c,
497
+ "aria-label": u,
498
+ ...g,
499
+ children: r
1129
500
  }
1130
501
  );
1131
- }), At = R((r, n) => {
1132
- const { className: t, children: o, id: i, columns: u, ...f } = r;
1133
- return p(f), /* @__PURE__ */ l.jsx(
502
+ }), Ge = b((e, n) => {
503
+ const { className: t, children: r, id: o, columns: s, ...l } = e;
504
+ return d(l), /* @__PURE__ */ i(
1134
505
  "div",
1135
506
  {
1136
507
  className: t,
1137
- style: { gridTemplateColumns: `repeat(${u}, 1fr)` },
508
+ style: { gridTemplateColumns: `repeat(${s}, 1fr)` },
1138
509
  ref: n,
1139
- id: i,
510
+ id: o,
1140
511
  role: "grid",
1141
- children: o
512
+ children: r
1142
513
  }
1143
514
  );
1144
- }), $t = R((r, n) => {
1145
- const { className: t, children: o, columns: i, ...u } = r;
1146
- return p(u), /* @__PURE__ */ l.jsx(
1147
- F,
515
+ }), _e = b((e, n) => {
516
+ const { className: t, children: r, columns: o, ...s } = e;
517
+ return d(s), /* @__PURE__ */ i(
518
+ p,
1148
519
  {
1149
520
  className: t,
1150
- style: { gridColumn: `1 / ${i + 1}` },
521
+ style: { gridColumn: `1 / ${o + 1}` },
1151
522
  ref: n,
1152
- children: /* @__PURE__ */ l.jsx(F, { className: "bn-mt-suggestion-menu-item-title", children: o })
523
+ children: /* @__PURE__ */ i(p, { className: "bn-mt-suggestion-menu-item-title", children: r })
1153
524
  }
1154
525
  );
1155
- }), zt = R((r, n) => {
1156
- const { className: t, isSelected: o, onClick: i, item: u, id: f, ...c } = r;
1157
- p(c);
1158
- const d = Z(null);
1159
- return He(() => {
1160
- if (!d.current || !o)
526
+ }), He = b((e, n) => {
527
+ const { className: t, isSelected: r, onClick: o, item: s, id: l, ...a } = e;
528
+ d(a);
529
+ const c = N(null);
530
+ return _(() => {
531
+ if (!c.current || !r)
1161
532
  return;
1162
- const b = Je(
1163
- d.current,
533
+ const u = E(
534
+ c.current,
1164
535
  document.querySelector(".bn-grid-suggestion-menu")
1165
536
  );
1166
- b === "top" ? d.current.scrollIntoView(!0) : b === "bottom" && d.current.scrollIntoView(!1);
1167
- }, [o]), /* @__PURE__ */ l.jsx(
537
+ u === "top" ? c.current.scrollIntoView(!0) : u === "bottom" && c.current.scrollIntoView(!1);
538
+ }, [r]), /* @__PURE__ */ i(
1168
539
  "div",
1169
540
  {
1170
541
  className: t,
1171
- ref: te(n, d),
1172
- id: f,
542
+ ref: T(n, c),
543
+ id: l,
1173
544
  role: "option",
1174
- onClick: i,
1175
- "aria-selected": o || void 0,
1176
- children: u.icon
545
+ onClick: o,
546
+ "aria-selected": r || void 0,
547
+ children: s.icon
1177
548
  }
1178
549
  );
1179
- }), Wt = R((r, n) => {
550
+ }), Ae = b((e, n) => {
1180
551
  const {
1181
552
  className: t,
1182
- children: o,
553
+ children: r,
1183
554
  // unused, using "dots" instead
1184
- columns: i,
1185
- ...u
1186
- } = r;
1187
- return p(u), /* @__PURE__ */ l.jsx(
1188
- er,
555
+ columns: o,
556
+ ...s
557
+ } = e;
558
+ return d(s), /* @__PURE__ */ i(
559
+ G,
1189
560
  {
1190
561
  className: t,
1191
- style: { gridColumn: `1 / ${i + 1}` },
562
+ style: { gridColumn: `1 / ${o + 1}` },
1192
563
  type: "dots",
1193
564
  ref: n
1194
565
  }
1195
566
  );
1196
- }), Vt = R((r, n) => {
1197
- const { className: t, children: o, id: i, ...u } = r;
1198
- return p(u), /* @__PURE__ */ l.jsx(
1199
- me,
567
+ }), Ke = b((e, n) => {
568
+ const { className: t, children: r, id: o, ...s } = e;
569
+ return d(s), /* @__PURE__ */ i(
570
+ O,
1200
571
  {
1201
572
  gap: 0,
1202
573
  className: t,
1203
574
  ref: n,
1204
- id: i,
575
+ id: o,
1205
576
  role: "listbox",
1206
- children: o
577
+ children: r
1207
578
  }
1208
579
  );
1209
- }), Bt = R((r, n) => {
1210
- const { className: t, children: o, ...i } = r;
1211
- return p(i), /* @__PURE__ */ l.jsx(F, { className: t, ref: n, children: /* @__PURE__ */ l.jsx(F, { className: "bn-mt-suggestion-menu-item-title", children: o }) });
1212
- }), Yt = R((r, n) => {
1213
- const { className: t, isSelected: o, onClick: i, item: u, id: f, ...c } = r;
1214
- p(c);
1215
- const d = Z(null);
1216
- return He(() => {
1217
- if (!d.current || !o)
580
+ }), We = b((e, n) => {
581
+ const { className: t, children: r, ...o } = e;
582
+ return d(o), /* @__PURE__ */ i(p, { className: t, ref: n, children: /* @__PURE__ */ i(p, { className: "bn-mt-suggestion-menu-item-title", children: r }) });
583
+ }), qe = b((e, n) => {
584
+ const { className: t, isSelected: r, onClick: o, item: s, id: l, ...a } = e;
585
+ d(a);
586
+ const c = N(null);
587
+ return _(() => {
588
+ if (!c.current || !r)
1218
589
  return;
1219
- const b = Je(
1220
- d.current,
590
+ const u = E(
591
+ c.current,
1221
592
  document.querySelector(".bn-suggestion-menu")
1222
593
  );
1223
- b === "top" ? d.current.scrollIntoView(!0) : b === "bottom" && d.current.scrollIntoView(!1);
1224
- }, [o]), /* @__PURE__ */ l.jsxs(
1225
- F,
594
+ u === "top" ? c.current.scrollIntoView(!0) : u === "bottom" && c.current.scrollIntoView(!1);
595
+ }, [r]), /* @__PURE__ */ y(
596
+ p,
1226
597
  {
1227
598
  gap: 0,
1228
599
  className: t,
1229
- ref: te(n, d),
1230
- id: f,
600
+ ref: T(n, c),
601
+ id: l,
1231
602
  role: "option",
1232
- onClick: i,
1233
- "aria-selected": o || void 0,
603
+ onClick: o,
604
+ "aria-selected": r || void 0,
1234
605
  children: [
1235
- u.icon && /* @__PURE__ */ l.jsx(
1236
- F,
606
+ s.icon && /* @__PURE__ */ i(
607
+ p,
1237
608
  {
1238
609
  className: "bn-mt-suggestion-menu-item-section",
1239
610
  "data-position": "left",
1240
- children: u.icon
611
+ children: s.icon
1241
612
  }
1242
613
  ),
1243
- /* @__PURE__ */ l.jsxs(me, { gap: 0, className: "bn-mt-suggestion-menu-item-body", children: [
1244
- /* @__PURE__ */ l.jsx(Q, { className: "bn-mt-suggestion-menu-item-title", children: u.title }),
1245
- /* @__PURE__ */ l.jsx(Q, { className: "bn-mt-suggestion-menu-item-subtitle", children: u.subtext })
614
+ /* @__PURE__ */ y(O, { gap: 0, className: "bn-mt-suggestion-menu-item-body", children: [
615
+ /* @__PURE__ */ i(S, { className: "bn-mt-suggestion-menu-item-title", children: s.title }),
616
+ /* @__PURE__ */ i(S, { className: "bn-mt-suggestion-menu-item-subtitle", children: s.subtext })
1246
617
  ] }),
1247
- u.badge && /* @__PURE__ */ l.jsx(
1248
- F,
618
+ s.badge && /* @__PURE__ */ i(
619
+ p,
1249
620
  {
1250
621
  "data-position": "right",
1251
622
  className: "bn-mt-suggestion-menu-item-section",
1252
- children: /* @__PURE__ */ l.jsx(tt, { size: "xs", children: u.badge })
623
+ children: /* @__PURE__ */ i(oe, { size: "xs", children: s.badge })
1253
624
  }
1254
625
  )
1255
626
  ]
1256
627
  }
1257
628
  );
1258
- }), Ut = R((r, n) => {
1259
- const { className: t, children: o, ...i } = r;
1260
- return p(i), /* @__PURE__ */ l.jsx(F, { className: t, ref: n, children: o });
1261
- }), Gt = R((r, n) => {
629
+ }), Ue = b((e, n) => {
630
+ const { className: t, children: r, ...o } = e;
631
+ return d(o), /* @__PURE__ */ i(p, { className: t, ref: n, children: r });
632
+ }), Ze = b((e, n) => {
1262
633
  const {
1263
634
  className: t,
1264
- children: o,
635
+ children: r,
1265
636
  // unused, using "dots" instead
1266
- ...i
1267
- } = r;
1268
- return p(i), /* @__PURE__ */ l.jsx(er, { className: t, type: "dots", ref: n });
1269
- }), Kt = R((r, n) => {
637
+ ...o
638
+ } = e;
639
+ return d(o), /* @__PURE__ */ i(G, { className: t, type: "dots", ref: n });
640
+ }), Je = b((e, n) => {
1270
641
  const {
1271
642
  className: t,
1272
- children: o,
1273
- draggable: i,
1274
- onDragStart: u,
1275
- onDragEnd: f,
1276
- style: c,
1277
- label: d,
1278
- ...b
1279
- } = r;
1280
- return p(b, !1), /* @__PURE__ */ l.jsx(
1281
- U,
643
+ children: r,
644
+ draggable: o,
645
+ onDragStart: s,
646
+ onDragEnd: l,
647
+ style: a,
648
+ label: c,
649
+ ...u
650
+ } = e;
651
+ return d(u, !1), /* @__PURE__ */ i(
652
+ k,
1282
653
  {
1283
654
  className: t,
1284
655
  ref: n,
1285
- "aria-label": d,
1286
- draggable: i,
1287
- onDragStart: u,
1288
- onDragEnd: f,
1289
- style: c,
1290
- ...b,
1291
- children: o
656
+ "aria-label": c,
657
+ draggable: o,
658
+ onDragStart: s,
659
+ onDragEnd: l,
660
+ style: a,
661
+ ...u,
662
+ children: r
663
+ }
664
+ );
665
+ }), Qe = b((e, n) => {
666
+ const { children: t, className: r, onMouseDown: o, onClick: s, ...l } = e;
667
+ return d(l, !1), /* @__PURE__ */ i(
668
+ k,
669
+ {
670
+ className: r,
671
+ ref: n,
672
+ onMouseDown: o,
673
+ onClick: s,
674
+ ...l,
675
+ children: t
1292
676
  }
1293
677
  );
1294
- }), Ge = R(
1295
- (r, n) => {
1296
- const { className: t, children: o, onMouseEnter: i, onMouseLeave: u, ...f } = r;
1297
- p(f);
1298
- const { ref: c, focused: d } = at(), b = it(d), h = te(n, c, b);
1299
- return /* @__PURE__ */ l.jsx(
1300
- F,
678
+ }), j = b(
679
+ (e, n) => {
680
+ const { className: t, children: r, onMouseEnter: o, onMouseLeave: s, ...l } = e;
681
+ d(l);
682
+ const { ref: a, focused: c } = ue(), u = de(c), g = T(n, a, u);
683
+ return /* @__PURE__ */ i(
684
+ p,
1301
685
  {
1302
686
  className: t,
1303
- ref: h,
687
+ ref: g,
1304
688
  role: "toolbar",
1305
- onMouseEnter: i,
1306
- onMouseLeave: u,
1307
- children: o
689
+ onMouseEnter: o,
690
+ onMouseLeave: s,
691
+ children: r
1308
692
  }
1309
693
  );
1310
694
  }
1311
- ), qt = (r) => /* @__PURE__ */ l.jsxs(me, { gap: 0, className: "bn-tooltip", children: [
1312
- /* @__PURE__ */ l.jsx(Q, { size: "sm", children: r.mainTooltip }),
1313
- r.secondaryTooltip && /* @__PURE__ */ l.jsx(Q, { size: "xs", children: r.secondaryTooltip })
1314
- ] }), Ke = R(
1315
- (r, n) => {
695
+ ), Xe = (e) => /* @__PURE__ */ y(O, { gap: 0, className: "bn-tooltip", children: [
696
+ /* @__PURE__ */ i(S, { size: "sm", children: e.mainTooltip }),
697
+ e.secondaryTooltip && /* @__PURE__ */ i(S, { size: "xs", children: e.secondaryTooltip })
698
+ ] }), z = b(
699
+ (e, n) => {
1316
700
  const {
1317
701
  className: t,
1318
- children: o,
1319
- mainTooltip: i,
1320
- secondaryTooltip: u,
1321
- icon: f,
1322
- isSelected: c,
1323
- isDisabled: d,
1324
- onClick: b,
1325
- label: h,
1326
- ...w
1327
- } = r;
1328
- return p(w, !1), /* @__PURE__ */ l.jsx(
1329
- nt,
702
+ children: r,
703
+ mainTooltip: o,
704
+ secondaryTooltip: s,
705
+ icon: l,
706
+ isSelected: a,
707
+ isDisabled: c,
708
+ onClick: u,
709
+ label: g,
710
+ ...v
711
+ } = e;
712
+ return d(v, !1), /* @__PURE__ */ i(
713
+ se,
1330
714
  {
1331
715
  withinPortal: !1,
1332
- label: /* @__PURE__ */ l.jsx(
1333
- qt,
716
+ label: /* @__PURE__ */ i(
717
+ Xe,
1334
718
  {
1335
- mainTooltip: i,
1336
- secondaryTooltip: u
719
+ mainTooltip: o,
720
+ secondaryTooltip: s
1337
721
  }
1338
722
  ),
1339
- children: o ? /* @__PURE__ */ l.jsx(
1340
- U,
723
+ children: r ? /* @__PURE__ */ i(
724
+ k,
1341
725
  {
1342
- "aria-label": h,
726
+ "aria-label": g,
1343
727
  className: t,
1344
- onMouseDown: (T) => {
1345
- ve() && T.currentTarget.focus();
728
+ onMouseDown: (h) => {
729
+ M() && h.currentTarget.focus();
1346
730
  },
1347
- onClick: b,
1348
- "aria-pressed": c,
1349
- "data-selected": c || void 0,
1350
- "data-test": i.slice(0, 1).toLowerCase() + i.replace(/\s+/g, "").slice(1),
731
+ onClick: u,
732
+ "aria-pressed": a,
733
+ "data-selected": a || void 0,
734
+ "data-test": o.slice(0, 1).toLowerCase() + o.replace(/\s+/g, "").slice(1),
1351
735
  size: "xs",
1352
- disabled: d || !1,
736
+ disabled: c || !1,
1353
737
  ref: n,
1354
- ...w,
1355
- children: o
738
+ ...v,
739
+ children: r
1356
740
  }
1357
- ) : /* @__PURE__ */ l.jsx(
1358
- Qe,
741
+ ) : /* @__PURE__ */ i(
742
+ V,
1359
743
  {
1360
744
  className: t,
1361
- "aria-label": h,
1362
- onMouseDown: (T) => {
1363
- ve() && T.currentTarget.focus();
745
+ "aria-label": g,
746
+ onMouseDown: (h) => {
747
+ M() && h.currentTarget.focus();
1364
748
  },
1365
- onClick: b,
1366
- "aria-pressed": c,
1367
- "data-selected": c || void 0,
1368
- "data-test": i.slice(0, 1).toLowerCase() + i.replace(/\s+/g, "").slice(1),
749
+ onClick: u,
750
+ "aria-pressed": a,
751
+ "data-selected": a || void 0,
752
+ "data-test": o.slice(0, 1).toLowerCase() + o.replace(/\s+/g, "").slice(1),
1369
753
  size: 30,
1370
- disabled: d || !1,
754
+ disabled: c || !1,
1371
755
  ref: n,
1372
- ...w,
1373
- children: f
756
+ ...v,
757
+ children: l
1374
758
  }
1375
759
  )
1376
760
  }
1377
761
  );
1378
762
  }
1379
- ), Ht = R((r, n) => {
1380
- const { className: t, items: o, isDisabled: i, ...u } = r;
1381
- p(u);
1382
- const f = o.filter((c) => c.isSelected)[0];
1383
- return f ? /* @__PURE__ */ l.jsxs(
1384
- O,
763
+ ), Ye = b((e, n) => {
764
+ const { className: t, items: r, isDisabled: o, ...s } = e;
765
+ d(s);
766
+ const l = r.filter((a) => a.isSelected)[0];
767
+ return l ? /* @__PURE__ */ y(
768
+ f,
1385
769
  {
1386
770
  withinPortal: !1,
1387
771
  transitionProps: {
1388
772
  exitDuration: 0
1389
773
  },
1390
- disabled: i,
774
+ disabled: o,
1391
775
  middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
1392
776
  children: [
1393
- /* @__PURE__ */ l.jsx(O.Target, { children: /* @__PURE__ */ l.jsx(
1394
- U,
777
+ /* @__PURE__ */ i(f.Target, { children: /* @__PURE__ */ i(
778
+ k,
1395
779
  {
1396
- onMouseDown: (c) => {
1397
- ve() && c.currentTarget.focus();
780
+ onMouseDown: (a) => {
781
+ M() && a.currentTarget.focus();
1398
782
  },
1399
- leftSection: f.icon,
1400
- rightSection: /* @__PURE__ */ l.jsx(xt, {}),
783
+ leftSection: l.icon,
784
+ rightSection: /* @__PURE__ */ i(we, {}),
1401
785
  size: "xs",
1402
786
  variant: "subtle",
1403
- disabled: i,
1404
- children: f.text
787
+ disabled: o,
788
+ children: l.text
1405
789
  }
1406
790
  ) }),
1407
- /* @__PURE__ */ l.jsx(O.Dropdown, { className: t, ref: n, children: o.map((c) => /* @__PURE__ */ l.jsx(
1408
- O.Item,
791
+ /* @__PURE__ */ i(f.Dropdown, { className: t, ref: n, children: r.map((a) => /* @__PURE__ */ i(
792
+ f.Item,
1409
793
  {
1410
- onClick: c.onClick,
1411
- leftSection: c.icon,
1412
- rightSection: c.isSelected ? /* @__PURE__ */ l.jsx(Ze, { size: 10, className: "bn-tick-icon" }) : (
794
+ onClick: a.onClick,
795
+ leftSection: a.icon,
796
+ rightSection: a.isSelected ? /* @__PURE__ */ i($, { size: 10, className: "bn-tick-icon" }) : (
1413
797
  // Ensures space for tick even if item isn't currently selected.
1414
- /* @__PURE__ */ l.jsx("div", { className: "bn-tick-space" })
798
+ /* @__PURE__ */ i("div", { className: "bn-tick-space" })
1415
799
  ),
1416
- disabled: c.isDisabled,
1417
- children: c.text
800
+ disabled: a.isDisabled,
801
+ children: a.text
1418
802
  },
1419
- c.text
803
+ a.text
1420
804
  )) })
1421
805
  ]
1422
806
  }
1423
807
  ) : null;
1424
- }), y = [
808
+ }), m = [
1425
809
  "#FFFFFF",
1426
810
  "#EFEFEF",
1427
811
  "#CFCFCF",
@@ -1432,35 +816,35 @@ const ar = Br(void 0), jt = R((r, n) => {
1432
816
  "#161616",
1433
817
  "#0F0F0F",
1434
818
  "#000000"
1435
- ], qe = {
819
+ ], L = {
1436
820
  colors: {
1437
821
  editor: {
1438
- text: y[5],
1439
- background: y[0]
822
+ text: m[5],
823
+ background: m[0]
1440
824
  },
1441
825
  menu: {
1442
- text: y[5],
1443
- background: y[0]
826
+ text: m[5],
827
+ background: m[0]
1444
828
  },
1445
829
  tooltip: {
1446
- text: y[5],
1447
- background: y[1]
830
+ text: m[5],
831
+ background: m[1]
1448
832
  },
1449
833
  hovered: {
1450
- text: y[5],
1451
- background: y[1]
834
+ text: m[5],
835
+ background: m[1]
1452
836
  },
1453
837
  selected: {
1454
- text: y[0],
1455
- background: y[5]
838
+ text: m[0],
839
+ background: m[5]
1456
840
  },
1457
841
  disabled: {
1458
- text: y[3],
1459
- background: y[1]
842
+ text: m[3],
843
+ background: m[1]
1460
844
  },
1461
- shadow: y[2],
1462
- border: y[1],
1463
- sideMenu: y[2],
845
+ shadow: m[2],
846
+ border: m[1],
847
+ sideMenu: m[2],
1464
848
  highlights: {
1465
849
  gray: {
1466
850
  text: "#9b9a97",
@@ -1502,35 +886,35 @@ const ar = Br(void 0), jt = R((r, n) => {
1502
886
  },
1503
887
  borderRadius: 6,
1504
888
  fontFamily: '"Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif'
1505
- }, nn = {
889
+ }, lt = {
1506
890
  colors: {
1507
891
  editor: {
1508
- text: y[2],
1509
- background: y[6]
892
+ text: m[2],
893
+ background: m[6]
1510
894
  },
1511
895
  menu: {
1512
- text: y[2],
1513
- background: y[6]
896
+ text: m[2],
897
+ background: m[6]
1514
898
  },
1515
899
  tooltip: {
1516
- text: y[2],
1517
- background: y[7]
900
+ text: m[2],
901
+ background: m[7]
1518
902
  },
1519
903
  hovered: {
1520
- text: y[2],
1521
- background: y[7]
904
+ text: m[2],
905
+ background: m[7]
1522
906
  },
1523
907
  selected: {
1524
- text: y[2],
1525
- background: y[8]
908
+ text: m[2],
909
+ background: m[8]
1526
910
  },
1527
911
  disabled: {
1528
- text: y[5],
1529
- background: y[7]
912
+ text: m[5],
913
+ background: m[7]
1530
914
  },
1531
- shadow: y[8],
1532
- border: y[7],
1533
- sideMenu: y[4],
915
+ shadow: m[8],
916
+ border: m[7],
917
+ sideMenu: m[4],
1534
918
  highlights: {
1535
919
  gray: {
1536
920
  text: "#bebdb8",
@@ -1570,110 +954,111 @@ const ar = Br(void 0), jt = R((r, n) => {
1570
954
  }
1571
955
  }
1572
956
  },
1573
- borderRadius: qe.borderRadius,
1574
- fontFamily: qe.fontFamily
1575
- }, Jt = {
957
+ borderRadius: L.borderRadius,
958
+ fontFamily: L.fontFamily
959
+ }, et = {
1576
960
  FormattingToolbar: {
1577
- Root: Ge,
1578
- Button: Ke,
1579
- Select: Ht
961
+ Root: j,
962
+ Button: z,
963
+ Select: Ye
1580
964
  },
1581
965
  FilePanel: {
1582
- Root: Pt,
1583
- Button: _t,
1584
- FileInput: Ct,
1585
- TabPanel: Ot,
1586
- TextInput: Ft
966
+ Root: Ie,
967
+ Button: Re,
968
+ FileInput: De,
969
+ TabPanel: je,
970
+ TextInput: ze
1587
971
  },
1588
972
  GridSuggestionMenu: {
1589
- Root: At,
1590
- Item: zt,
1591
- EmptyItem: $t,
1592
- Loader: Wt
973
+ Root: Ge,
974
+ Item: He,
975
+ EmptyItem: _e,
976
+ Loader: Ae
1593
977
  },
1594
978
  LinkToolbar: {
1595
- Root: Ge,
1596
- Button: Ke
979
+ Root: j,
980
+ Button: z
1597
981
  },
1598
982
  SideMenu: {
1599
- Root: It,
1600
- Button: Lt
983
+ Root: $e,
984
+ Button: Ve
1601
985
  },
1602
986
  SuggestionMenu: {
1603
- Root: Vt,
1604
- Item: Yt,
1605
- EmptyItem: Bt,
1606
- Label: Ut,
1607
- Loader: Gt
987
+ Root: Ke,
988
+ Item: qe,
989
+ EmptyItem: We,
990
+ Label: Ue,
991
+ Loader: Ze
1608
992
  },
1609
993
  TableHandle: {
1610
- Root: Kt
994
+ Root: Je,
995
+ ExtendButton: Qe
1611
996
  },
1612
997
  Generic: {
1613
998
  Form: {
1614
- Root: (r) => /* @__PURE__ */ l.jsx("div", { children: r.children }),
1615
- TextInput: dt
999
+ Root: (e) => /* @__PURE__ */ i("div", { children: e.children }),
1000
+ TextInput: ge
1616
1001
  },
1617
1002
  Menu: {
1618
- Root: Rt,
1619
- Trigger: St,
1620
- Dropdown: wt,
1621
- Divider: Tt,
1622
- Label: kt,
1623
- Item: Et
1003
+ Root: Ce,
1004
+ Trigger: Te,
1005
+ Dropdown: Me,
1006
+ Divider: Fe,
1007
+ Label: Oe,
1008
+ Item: Pe
1624
1009
  },
1625
1010
  Popover: {
1626
- Root: Nt,
1627
- Trigger: Dt,
1628
- Content: Mt
1011
+ Root: Le,
1012
+ Trigger: Ee,
1013
+ Content: Be
1629
1014
  }
1630
1015
  }
1631
- }, Xt = {
1016
+ }, tt = {
1632
1017
  // Removes button press effect
1633
1018
  activeClassName: ""
1634
- }, on = (r) => {
1635
- const { className: n, theme: t, ...o } = r, i = Kr(), u = qr(), f = (i == null ? void 0 : i.colorSchemePreference) || u, c = fe(
1636
- (d) => {
1637
- if (d && (ct(d), typeof t == "object")) {
1019
+ }, ct = (e) => {
1020
+ const { className: n, theme: t, ...r } = e, o = Z(), s = J(), l = (o == null ? void 0 : o.colorSchemePreference) || s, a = F(
1021
+ (c) => {
1022
+ if (c && (be(c), typeof t == "object")) {
1638
1023
  if ("light" in t && "dark" in t) {
1639
- Be(
1640
- t[f === "dark" ? "dark" : "light"],
1641
- d
1024
+ I(
1025
+ t[l === "dark" ? "dark" : "light"],
1026
+ c
1642
1027
  );
1643
1028
  return;
1644
1029
  }
1645
- Be(t, d);
1030
+ I(t, c);
1646
1031
  return;
1647
1032
  }
1648
1033
  },
1649
- [f, t]
1034
+ [l, t]
1650
1035
  );
1651
- return /* @__PURE__ */ l.jsx(Hr.Provider, { value: Jt, children: /* @__PURE__ */ l.jsx(
1652
- ot,
1036
+ return /* @__PURE__ */ i(Q.Provider, { value: et, children: /* @__PURE__ */ i(
1037
+ ie,
1653
1038
  {
1654
- theme: Xt,
1039
+ theme: tt,
1655
1040
  cssVariablesSelector: ".bn-mantine",
1656
1041
  getRootElement: () => {
1657
1042
  },
1658
- children: /* @__PURE__ */ l.jsx(
1659
- Jr,
1043
+ children: /* @__PURE__ */ i(
1044
+ X,
1660
1045
  {
1661
- className: Gr("bn-mantine", n || ""),
1046
+ className: U("bn-mantine", n || ""),
1662
1047
  theme: typeof t == "object" ? void 0 : t,
1663
- ...o,
1664
- ref: c
1048
+ ...r,
1049
+ ref: a
1665
1050
  }
1666
1051
  )
1667
1052
  }
1668
1053
  ) });
1669
1054
  };
1670
1055
  export {
1671
- on as BlockNoteView,
1672
- Be as applyBlockNoteCSSVariablesFromTheme,
1673
- Jt as components,
1674
- nn as darkDefaultTheme,
1675
- y as defaultColorScheme,
1676
- qe as lightDefaultTheme,
1677
- ct as removeBlockNoteCSSVariables
1056
+ ct as BlockNoteView,
1057
+ I as applyBlockNoteCSSVariablesFromTheme,
1058
+ et as components,
1059
+ lt as darkDefaultTheme,
1060
+ m as defaultColorScheme,
1061
+ L as lightDefaultTheme,
1062
+ be as removeBlockNoteCSSVariables
1678
1063
  };
1679
1064
  //# sourceMappingURL=blocknote-mantine.js.map