@blocknote/mantine 0.25.2 → 0.26.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,19 +1,19 @@
1
- import { jsx as s, jsxs as y } from "react/jsx-runtime";
2
- import { assertEmpty as d, isSafari as D, mergeCSSClasses as re, COLORS_DEFAULT as se, COLORS_DARK_MODE_DEFAULT as ie } from "@blocknote/core";
3
- import { mergeRefs as ae, FormattingToolbarController as le, getFormattingToolbarItems as ce, FormattingToolbar as ue, elementOverflow as H, useBlockNoteContext as de, usePrefersColorScheme as me, ComponentsContext as fe, BlockNoteViewRaw as ge } from "@blocknote/react";
4
- import { Button as w, ActionIcon as B, Tooltip as K, Stack as E, Text as N, Group as h, Chip as he, Card as U, Skeleton as $, Avatar as be, TextInput as W, Menu as v, CheckIcon as q, Tabs as k, LoadingOverlay as pe, FileInput as ve, Popover as ye, PopoverTarget as Se, PopoverDropdown as Ce, Badge as xe, Loader as Z, Flex as we, MantineProvider as Te } from "@mantine/core";
5
- import x, { forwardRef as m, useState as z, createContext as Ne, useRef as P, useCallback as L, useContext as ke, useEffect as J } from "react";
6
- import { useHover as Pe, useFocusWithin as Q, mergeRefs as O, useFocusTrap as Me } from "@mantine/hooks";
7
- const X = (e, n, t = !1) => {
1
+ import { jsx as s, jsxs as v } from "react/jsx-runtime";
2
+ import { assertEmpty as d, isSafari as B, mergeCSSClasses as U, COLORS_DEFAULT as ae, COLORS_DARK_MODE_DEFAULT as le } from "@blocknote/core";
3
+ import { mergeRefs as W, FormattingToolbarController as ce, getFormattingToolbarItems as ue, FormattingToolbar as de, elementOverflow as q, useBlockNoteContext as me, usePrefersColorScheme as fe, ComponentsContext as ge, BlockNoteViewRaw as he } from "@blocknote/react";
4
+ import { Button as T, ActionIcon as z, Tooltip as Z, Stack as j, Text as x, Group as b, Chip as be, Card as J, Divider as pe, Skeleton as _, Avatar as ve, TextInput as Q, Menu as S, CheckIcon as X, Tabs as P, LoadingOverlay as Se, FileInput as ye, Popover as xe, PopoverTarget as Ce, PopoverDropdown as we, Badge as Te, Loader as Y, Flex as Ne, MantineProvider as ke } from "@mantine/core";
5
+ import w, { forwardRef as m, useState as $, useRef as k, useEffect as A, createContext as Pe, useCallback as E, useContext as Fe } from "react";
6
+ import { useHover as Me, useFocusWithin as ee, mergeRefs as O, useFocusTrap as Oe } from "@mantine/hooks";
7
+ const te = (e, n, t = !1) => {
8
8
  const o = [];
9
- function r(i, a = "--bn") {
10
- for (const l in i) {
11
- const u = l.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), c = `${a}-${u}`;
12
- typeof i[l] != "object" ? (typeof i[l] == "number" && (i[l] = `${i[l]}px`), t ? n.style.removeProperty(c) : n.style.setProperty(c, i[l].toString())) : r(i[l], c);
9
+ function r(i, l = "--bn") {
10
+ for (const a in i) {
11
+ const u = a.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), c = `${l}-${u}`;
12
+ typeof i[a] != "object" ? (typeof i[a] == "number" && (i[a] = `${i[a]}px`), t ? n.style.removeProperty(c) : n.style.setProperty(c, i[a].toString())) : r(i[a], c);
13
13
  }
14
14
  }
15
15
  return r(e), o;
16
- }, A = (e, n) => X(e, n), Fe = {
16
+ }, V = (e, n) => te(e, n), Re = {
17
17
  colors: {
18
18
  editor: {
19
19
  text: void 0,
@@ -83,107 +83,107 @@ const X = (e, n, t = !1) => {
83
83
  },
84
84
  borderRadius: void 0,
85
85
  fontFamily: void 0
86
- }, Oe = (e) => X(Fe, e, !0), Y = (e) => /* @__PURE__ */ y(E, { gap: 0, className: "bn-tooltip", children: [
87
- /* @__PURE__ */ s(N, { size: "sm", lineClamp: 5, children: e.mainTooltip }),
88
- e.secondaryTooltip && /* @__PURE__ */ s(N, { size: "xs", lineClamp: 5, children: e.secondaryTooltip })
89
- ] }), R = m(
86
+ }, Ie = (e) => te(Re, e, !0), ne = (e) => /* @__PURE__ */ v(j, { gap: 0, className: "bn-tooltip", children: [
87
+ /* @__PURE__ */ s(x, { size: "sm", lineClamp: 5, children: e.mainTooltip }),
88
+ e.secondaryTooltip && /* @__PURE__ */ s(x, { size: "xs", lineClamp: 5, children: e.secondaryTooltip })
89
+ ] }), I = m(
90
90
  (e, n) => {
91
91
  const {
92
92
  className: t,
93
93
  children: o,
94
94
  mainTooltip: r,
95
95
  secondaryTooltip: i,
96
- icon: a,
97
- isSelected: l,
96
+ icon: l,
97
+ isSelected: a,
98
98
  isDisabled: u,
99
99
  onClick: c,
100
100
  label: g,
101
- variant: b,
101
+ variant: h,
102
102
  ...p
103
103
  } = e;
104
104
  d(p, !1);
105
- const [T, S] = z(!1), j = o ? /* @__PURE__ */ s(
106
- w,
105
+ const [N, y] = $(!1), R = o ? /* @__PURE__ */ s(
106
+ T,
107
107
  {
108
108
  "aria-label": g,
109
109
  className: t,
110
110
  onMouseDown: (C) => {
111
- D() && C.currentTarget.focus();
111
+ B() && C.currentTarget.focus();
112
112
  },
113
113
  onClick: (C) => {
114
- S(!0), c == null || c(C);
114
+ y(!0), c == null || c(C);
115
115
  },
116
- onPointerLeave: () => S(!1),
117
- "aria-pressed": l,
118
- "data-selected": l || void 0,
116
+ onPointerLeave: () => y(!1),
117
+ "aria-pressed": a,
118
+ "data-selected": a || void 0,
119
119
  "data-test": r ? r.slice(0, 1).toLowerCase() + r.replace(/\s+/g, "").slice(1) : void 0,
120
- size: b === "compact" ? "compact-xs" : "xs",
120
+ size: h === "compact" ? "compact-xs" : "xs",
121
121
  disabled: u || !1,
122
122
  ref: n,
123
123
  ...p,
124
124
  children: o
125
125
  }
126
126
  ) : /* @__PURE__ */ s(
127
- B,
127
+ z,
128
128
  {
129
129
  className: t,
130
130
  "aria-label": g,
131
131
  onMouseDown: (C) => {
132
- D() && C.currentTarget.focus();
132
+ B() && C.currentTarget.focus();
133
133
  },
134
134
  onClick: (C) => {
135
- S(!0), c == null || c(C);
135
+ y(!0), c == null || c(C);
136
136
  },
137
- onPointerLeave: () => S(!1),
138
- "aria-pressed": l,
139
- "data-selected": l || void 0,
137
+ onPointerLeave: () => y(!1),
138
+ "aria-pressed": a,
139
+ "data-selected": a || void 0,
140
140
  "data-test": r ? r.slice(0, 1).toLowerCase() + r.replace(/\s+/g, "").slice(1) : void 0,
141
- size: b === "compact" ? 20 : 30,
141
+ size: h === "compact" ? 20 : 30,
142
142
  disabled: u || !1,
143
143
  ref: n,
144
144
  ...p,
145
- children: a
145
+ children: l
146
146
  }
147
147
  );
148
148
  return r ? /* @__PURE__ */ s(
149
- K,
149
+ Z,
150
150
  {
151
- disabled: T,
151
+ disabled: N,
152
152
  withinPortal: !1,
153
153
  label: /* @__PURE__ */ s(
154
- Y,
154
+ ne,
155
155
  {
156
156
  mainTooltip: r,
157
157
  secondaryTooltip: i
158
158
  }
159
159
  ),
160
- children: j
160
+ children: R
161
161
  }
162
- ) : j;
162
+ ) : R;
163
163
  }
164
- ), Re = m((e, n) => {
164
+ ), De = m((e, n) => {
165
165
  const {
166
166
  className: t,
167
167
  text: o,
168
168
  icon: r,
169
169
  isSelected: i,
170
- mainTooltip: a,
171
- secondaryTooltip: l,
170
+ mainTooltip: l,
171
+ secondaryTooltip: a,
172
172
  onClick: u,
173
173
  onMouseEnter: c,
174
174
  ...g
175
175
  } = e;
176
176
  d(g, !1);
177
- const [b, p] = z(!1), T = /* @__PURE__ */ y(
178
- he,
177
+ const [h, p] = $(!1), N = /* @__PURE__ */ v(
178
+ be,
179
179
  {
180
180
  className: t,
181
181
  checked: i === !0,
182
182
  wrapperProps: {
183
183
  onMouseEnter: c,
184
184
  onMouseLeave: () => p(!1),
185
- onClick: (S) => {
186
- p(!0), u == null || u(S);
185
+ onClick: (y) => {
186
+ p(!0), u == null || u(y);
187
187
  }
188
188
  },
189
189
  variant: "light",
@@ -195,38 +195,78 @@ const X = (e, n, t = !1) => {
195
195
  ]
196
196
  }
197
197
  );
198
- return !a || b ? T : /* @__PURE__ */ s(
199
- K,
198
+ return !l || h ? N : /* @__PURE__ */ s(
199
+ Z,
200
200
  {
201
201
  refProp: "rootRef",
202
202
  withinPortal: !1,
203
203
  label: /* @__PURE__ */ s(
204
- Y,
204
+ ne,
205
205
  {
206
- mainTooltip: a,
207
- secondaryTooltip: l
206
+ mainTooltip: l,
207
+ secondaryTooltip: a
208
208
  }
209
209
  ),
210
- children: T
210
+ children: N
211
211
  }
212
212
  );
213
- }), Ie = m((e, n) => {
214
- const { className: t, children: o, ...r } = e;
215
- return d(r), /* @__PURE__ */ s(h, { className: t, ref: n, children: o });
216
- }), De = m((e, n) => {
217
- const { className: t, children: o, ...r } = e;
218
- return d(r, !1), /* @__PURE__ */ s(U, { w: 350, p: "md", className: t, ref: n, children: o });
219
213
  }), Le = m((e, n) => {
220
214
  const { className: t, children: o, ...r } = e;
221
- return d(r, !1), /* @__PURE__ */ s(U.Section, { p: "md", className: t, ref: n, children: o });
215
+ return d(r), /* @__PURE__ */ s(b, { className: t, ref: n, children: o });
222
216
  }), Be = m((e, n) => {
223
- const { authorInfo: t, timeString: o, ...r } = e;
224
- return d(r, !1), t === "loading" ? /* @__PURE__ */ y(h, { children: [
225
- /* @__PURE__ */ s($, { height: 24, width: 24 }),
226
- /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s($, { height: 12, width: 100 }) })
227
- ] }) : /* @__PURE__ */ y(h, { children: [
217
+ const {
218
+ className: t,
219
+ children: o,
220
+ headerText: r,
221
+ selected: i,
222
+ onFocus: l,
223
+ onBlur: a,
224
+ tabIndex: u,
225
+ ...c
226
+ } = e;
227
+ d(c, !1);
228
+ const g = k(null);
229
+ return A(() => {
230
+ var h;
231
+ i && ((h = g.current) == null || h.scrollIntoView({
232
+ behavior: "smooth",
233
+ block: "center"
234
+ }));
235
+ }, [i]), /* @__PURE__ */ v(
236
+ J,
237
+ {
238
+ className: U(t, i ? "selected" : ""),
239
+ onFocus: l,
240
+ onBlur: a,
241
+ tabIndex: u,
242
+ ref: W([n, g]),
243
+ children: [
244
+ r && /* @__PURE__ */ s(x, { className: "bn-header-text", children: r }),
245
+ o
246
+ ]
247
+ }
248
+ );
249
+ }), Ee = m((e, n) => {
250
+ const { className: t, children: o, ...r } = e;
251
+ return d(r, !1), /* @__PURE__ */ s(J.Section, { className: t, ref: n, children: o });
252
+ }), ze = m((e, n) => {
253
+ const { className: t, children: o, ...r } = e;
254
+ return d(r, !1), /* @__PURE__ */ s(
255
+ pe,
256
+ {
257
+ className: t,
258
+ label: /* @__PURE__ */ s(x, { children: o }),
259
+ ref: n
260
+ }
261
+ );
262
+ }), je = m((e, n) => {
263
+ const { authorInfo: t, timeString: o, edited: r, ...i } = e;
264
+ return d(i, !1), t === "loading" ? /* @__PURE__ */ v(b, { children: [
265
+ /* @__PURE__ */ s(_, { height: 24, width: 24 }),
266
+ /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(_, { height: 12, width: 100 }) })
267
+ ] }) : /* @__PURE__ */ v(b, { children: [
228
268
  /* @__PURE__ */ s(
229
- be,
269
+ ve,
230
270
  {
231
271
  src: t.avatarUrl,
232
272
  alt: t.username,
@@ -235,26 +275,31 @@ const X = (e, n, t = !1) => {
235
275
  color: "initials"
236
276
  }
237
277
  ),
238
- /* @__PURE__ */ y(N, { fz: "sm", fw: "bold", children: [
278
+ /* @__PURE__ */ v(x, { fz: "sm", fw: "bold", children: [
239
279
  t.username,
240
- /* @__PURE__ */ s(N, { fz: "xs", c: "dimmed", span: !0, ml: "xs", children: o })
280
+ /* @__PURE__ */ v(x, { fz: "xs", c: "dimmed", span: !0, ml: "xs", children: [
281
+ o,
282
+ " ",
283
+ r && "(edited)"
284
+ ] })
241
285
  ] })
242
286
  ] });
243
- }), Ee = m((e, n) => {
287
+ }), $e = m((e, n) => {
244
288
  const {
245
289
  className: t,
246
290
  showActions: o,
247
291
  authorInfo: r,
248
292
  timeString: i,
293
+ edited: l,
249
294
  actions: a,
250
- children: l,
251
- ...u
252
- } = e, { hovered: c, ref: g } = Pe(), { focused: b, ref: p } = Q(), T = ae([n, g]);
253
- return d(u, !1), /* @__PURE__ */ y(h, { pos: "relative", ref: T, className: t, children: [
254
- a && (o === !0 || o === void 0 || o === "hover" && c || b) ? /* @__PURE__ */ s(
255
- h,
295
+ children: u,
296
+ ...c
297
+ } = e, { hovered: g, ref: h } = Me(), { focused: p, ref: N } = ee(), y = W([n, h]);
298
+ return d(c, !1), /* @__PURE__ */ v(b, { pos: "relative", ref: y, className: t, children: [
299
+ a && (o === !0 || o === void 0 || o === "hover" && g || p) ? /* @__PURE__ */ s(
300
+ b,
256
301
  {
257
- ref: p,
302
+ ref: N,
258
303
  style: {
259
304
  position: "absolute",
260
305
  right: 0,
@@ -264,15 +309,15 @@ const X = (e, n, t = !1) => {
264
309
  children: a
265
310
  }
266
311
  ) : null,
267
- /* @__PURE__ */ s(Be, { ...e }),
268
- l
312
+ /* @__PURE__ */ s(je, { ...e }),
313
+ u
269
314
  ] });
270
- }), ze = m((e, n) => {
271
- const { className: t, onFocus: o, onBlur: r, editor: i, editable: a, ...l } = e;
272
- return d(l, !1), /* @__PURE__ */ s(
273
- Pt,
315
+ }), Ae = m((e, n) => {
316
+ const { className: t, autoFocus: o, onFocus: r, onBlur: i, editor: l, editable: a, ...u } = e;
317
+ return d(u, !1), /* @__PURE__ */ s(
318
+ Mt,
274
319
  {
275
- autoFocus: !0,
320
+ autoFocus: o,
276
321
  className: t,
277
322
  editor: e.editor,
278
323
  sideMenu: !1,
@@ -282,37 +327,37 @@ const X = (e, n, t = !1) => {
282
327
  formattingToolbar: !1,
283
328
  editable: a,
284
329
  ref: n,
285
- onFocus: o,
286
- onBlur: r,
330
+ onFocus: r,
331
+ onBlur: i,
287
332
  children: /* @__PURE__ */ s(
288
- le,
333
+ ce,
289
334
  {
290
- formattingToolbar: je
335
+ formattingToolbar: _e
291
336
  }
292
337
  )
293
338
  }
294
339
  );
295
- }), je = () => {
296
- const e = ce([]).filter(
340
+ }), _e = () => {
341
+ const e = ue([]).filter(
297
342
  (n) => n.key !== "nestBlockButton" && n.key !== "unnestBlockButton"
298
343
  );
299
- return /* @__PURE__ */ s(ue, { blockTypeSelectItems: [], children: e });
300
- }, $e = m((e, n) => {
344
+ return /* @__PURE__ */ s(de, { blockTypeSelectItems: [], children: e });
345
+ }, Ve = m((e, n) => {
301
346
  const {
302
347
  className: t,
303
348
  name: o,
304
349
  label: r,
305
350
  icon: i,
306
- value: a,
307
- autoFocus: l,
351
+ value: l,
352
+ autoFocus: a,
308
353
  placeholder: u,
309
354
  onKeyDown: c,
310
355
  onChange: g,
311
- onSubmit: b,
356
+ onSubmit: h,
312
357
  ...p
313
358
  } = e;
314
359
  return d(p), /* @__PURE__ */ s(
315
- W,
360
+ Q,
316
361
  {
317
362
  size: "xs",
318
363
  className: t,
@@ -320,26 +365,26 @@ const X = (e, n, t = !1) => {
320
365
  name: o,
321
366
  label: r,
322
367
  leftSection: i,
323
- value: a,
324
- autoFocus: l,
325
- "data-autofocus": l ? "true" : void 0,
368
+ value: l,
369
+ autoFocus: a,
370
+ "data-autofocus": a ? "true" : void 0,
326
371
  placeholder: u,
327
372
  onKeyDown: c,
328
373
  onChange: g,
329
- onSubmit: b
374
+ onSubmit: h
330
375
  }
331
376
  );
332
377
  });
333
- var ee = {
378
+ var oe = {
334
379
  color: void 0,
335
380
  size: void 0,
336
381
  className: void 0,
337
382
  style: void 0,
338
383
  attr: void 0
339
- }, _ = x.createContext && /* @__PURE__ */ x.createContext(ee), Ae = ["attr", "size", "title"];
340
- function _e(e, n) {
384
+ }, G = w.createContext && /* @__PURE__ */ w.createContext(oe), Ge = ["attr", "size", "title"];
385
+ function He(e, n) {
341
386
  if (e == null) return {};
342
- var t = Ve(e, n), o, r;
387
+ var t = Ke(e, n), o, r;
343
388
  if (Object.getOwnPropertySymbols) {
344
389
  var i = Object.getOwnPropertySymbols(e);
345
390
  for (r = 0; r < i.length; r++)
@@ -347,7 +392,7 @@ function _e(e, n) {
347
392
  }
348
393
  return t;
349
394
  }
350
- function Ve(e, n) {
395
+ function Ke(e, n) {
351
396
  if (e == null) return {};
352
397
  var t = {};
353
398
  for (var o in e)
@@ -357,17 +402,17 @@ function Ve(e, n) {
357
402
  }
358
403
  return t;
359
404
  }
360
- function M() {
361
- return M = Object.assign ? Object.assign.bind() : function(e) {
405
+ function F() {
406
+ return F = Object.assign ? Object.assign.bind() : function(e) {
362
407
  for (var n = 1; n < arguments.length; n++) {
363
408
  var t = arguments[n];
364
409
  for (var o in t)
365
410
  Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
366
411
  }
367
412
  return e;
368
- }, M.apply(this, arguments);
413
+ }, F.apply(this, arguments);
369
414
  }
370
- function V(e, n) {
415
+ function H(e, n) {
371
416
  var t = Object.keys(e);
372
417
  if (Object.getOwnPropertySymbols) {
373
418
  var o = Object.getOwnPropertySymbols(e);
@@ -377,25 +422,25 @@ function V(e, n) {
377
422
  }
378
423
  return t;
379
424
  }
380
- function F(e) {
425
+ function M(e) {
381
426
  for (var n = 1; n < arguments.length; n++) {
382
427
  var t = arguments[n] != null ? arguments[n] : {};
383
- n % 2 ? V(Object(t), !0).forEach(function(o) {
384
- Ge(e, o, t[o]);
385
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : V(Object(t)).forEach(function(o) {
428
+ n % 2 ? H(Object(t), !0).forEach(function(o) {
429
+ Ue(e, o, t[o]);
430
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : H(Object(t)).forEach(function(o) {
386
431
  Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
387
432
  });
388
433
  }
389
434
  return e;
390
435
  }
391
- function Ge(e, n, t) {
392
- return n = He(n), n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
436
+ function Ue(e, n, t) {
437
+ return n = We(n), n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
393
438
  }
394
- function He(e) {
395
- var n = Ke(e, "string");
439
+ function We(e) {
440
+ var n = qe(e, "string");
396
441
  return typeof n == "symbol" ? n : n + "";
397
442
  }
398
- function Ke(e, n) {
443
+ function qe(e, n) {
399
444
  if (typeof e != "object" || !e) return e;
400
445
  var t = e[Symbol.toPrimitive];
401
446
  if (t !== void 0) {
@@ -405,85 +450,85 @@ function Ke(e, n) {
405
450
  }
406
451
  return (n === "string" ? String : Number)(e);
407
452
  }
408
- function te(e) {
409
- return e && e.map((n, t) => /* @__PURE__ */ x.createElement(n.tag, F({
453
+ function re(e) {
454
+ return e && e.map((n, t) => /* @__PURE__ */ w.createElement(n.tag, M({
410
455
  key: t
411
- }, n.attr), te(n.child)));
456
+ }, n.attr), re(n.child)));
412
457
  }
413
- function ne(e) {
414
- return (n) => /* @__PURE__ */ x.createElement(Ue, M({
415
- attr: F({}, e.attr)
416
- }, n), te(e.child));
458
+ function se(e) {
459
+ return (n) => /* @__PURE__ */ w.createElement(Ze, F({
460
+ attr: M({}, e.attr)
461
+ }, n), re(e.child));
417
462
  }
418
- function Ue(e) {
463
+ function Ze(e) {
419
464
  var n = (t) => {
420
465
  var {
421
466
  attr: o,
422
467
  size: r,
423
468
  title: i
424
- } = e, a = _e(e, Ae), l = r || t.size || "1em", u;
425
- return t.className && (u = t.className), e.className && (u = (u ? u + " " : "") + e.className), /* @__PURE__ */ x.createElement("svg", M({
469
+ } = e, l = He(e, Ge), a = r || t.size || "1em", u;
470
+ return t.className && (u = t.className), e.className && (u = (u ? u + " " : "") + e.className), /* @__PURE__ */ w.createElement("svg", F({
426
471
  stroke: "currentColor",
427
472
  fill: "currentColor",
428
473
  strokeWidth: "0"
429
- }, t.attr, o, a, {
474
+ }, t.attr, o, l, {
430
475
  className: u,
431
- style: F(F({
476
+ style: M(M({
432
477
  color: e.color || t.color
433
478
  }, t.style), e.style),
434
- height: l,
435
- width: l,
479
+ height: a,
480
+ width: a,
436
481
  xmlns: "http://www.w3.org/2000/svg"
437
- }), i && /* @__PURE__ */ x.createElement("title", null, i), e.children);
482
+ }), i && /* @__PURE__ */ w.createElement("title", null, i), e.children);
438
483
  };
439
- return _ !== void 0 ? /* @__PURE__ */ x.createElement(_.Consumer, null, (t) => n(t)) : n(ee);
484
+ return G !== void 0 ? /* @__PURE__ */ w.createElement(G.Consumer, null, (t) => n(t)) : n(oe);
440
485
  }
441
- function We(e) {
442
- return ne({ 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);
486
+ function Je(e) {
487
+ return se({ 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);
443
488
  }
444
- function qe(e) {
445
- return ne({ 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);
489
+ function Qe(e) {
490
+ return se({ 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);
446
491
  }
447
- const oe = Ne(void 0), Ze = m((e, n) => {
492
+ const ie = Pe(void 0), Xe = m((e, n) => {
448
493
  const {
449
494
  children: t,
450
495
  onOpenChange: o,
451
496
  position: r,
452
497
  sub: i,
453
498
  // not used
454
- ...a
499
+ ...l
455
500
  } = e;
456
- d(a);
457
- const [l, u] = z(!1), c = P(null), g = P(), b = L(() => {
501
+ d(l);
502
+ const [a, u] = $(!1), c = k(null), g = k(), h = E(() => {
458
503
  g.current && clearTimeout(g.current), g.current = setTimeout(() => {
459
504
  u(!1);
460
505
  }, 250);
461
- }, []), p = L(() => {
506
+ }, []), p = E(() => {
462
507
  g.current && clearTimeout(g.current), u(!0);
463
508
  }, []);
464
509
  return /* @__PURE__ */ s(
465
- oe.Provider,
510
+ ie.Provider,
466
511
  {
467
512
  value: {
468
513
  onMenuMouseOver: p,
469
- onMenuMouseLeave: b
514
+ onMenuMouseLeave: h
470
515
  },
471
516
  children: /* @__PURE__ */ s(
472
- v.Item,
517
+ S.Item,
473
518
  {
474
519
  className: "bn-menu-item bn-mt-sub-menu-item",
475
520
  ref: O(n, c),
476
521
  onMouseOver: p,
477
- onMouseLeave: b,
522
+ onMouseLeave: h,
478
523
  children: /* @__PURE__ */ s(
479
- v,
524
+ S,
480
525
  {
481
526
  portalProps: {
482
527
  target: c.current ? c.current.parentElement : void 0
483
528
  },
484
529
  middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
485
530
  trigger: "hover",
486
- opened: l,
531
+ opened: a,
487
532
  onChange: o,
488
533
  position: r,
489
534
  children: t
@@ -493,10 +538,10 @@ const oe = Ne(void 0), Ze = m((e, n) => {
493
538
  )
494
539
  }
495
540
  );
496
- }), Je = (e) => {
541
+ }), Ye = (e) => {
497
542
  const { children: n, onOpenChange: t, position: o, sub: r, ...i } = e;
498
- return d(i), r ? /* @__PURE__ */ s(Ze, { ...e }) : /* @__PURE__ */ s(
499
- v,
543
+ return d(i), r ? /* @__PURE__ */ s(Xe, { ...e }) : /* @__PURE__ */ s(
544
+ S,
500
545
  {
501
546
  withinPortal: !1,
502
547
  middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
@@ -505,9 +550,9 @@ const oe = Ne(void 0), Ze = m((e, n) => {
505
550
  children: n
506
551
  }
507
552
  );
508
- }, Qe = m((e, n) => {
509
- const { className: t, children: o, icon: r, checked: i, subTrigger: a, onClick: l, ...u } = e;
510
- return d(u, !1), a ? /* @__PURE__ */ y(
553
+ }, et = m((e, n) => {
554
+ const { className: t, children: o, icon: r, checked: i, subTrigger: l, onClick: a, ...u } = e;
555
+ return d(u, !1), l ? /* @__PURE__ */ v(
511
556
  "div",
512
557
  {
513
558
  onClick: (c) => {
@@ -517,30 +562,30 @@ const oe = Ne(void 0), Ze = m((e, n) => {
517
562
  ...u,
518
563
  children: [
519
564
  o,
520
- /* @__PURE__ */ s(qe, { size: 15 })
565
+ /* @__PURE__ */ s(Qe, { size: 15 })
521
566
  ]
522
567
  }
523
568
  ) : /* @__PURE__ */ s(
524
- v.Item,
569
+ S.Item,
525
570
  {
526
571
  className: t,
527
572
  ref: n,
528
573
  leftSection: r,
529
- rightSection: i ? /* @__PURE__ */ s(q, { size: 10 }) : i === !1 ? /* @__PURE__ */ s("div", { className: "bn-tick-space" }) : null,
530
- onClick: l,
574
+ rightSection: i ? /* @__PURE__ */ s(X, { size: 10 }) : i === !1 ? /* @__PURE__ */ s("div", { className: "bn-tick-space" }) : null,
575
+ onClick: a,
531
576
  ...u,
532
577
  children: o
533
578
  }
534
579
  );
535
- }), Xe = (e) => {
580
+ }), tt = (e) => {
536
581
  const {
537
582
  children: n,
538
583
  sub: t,
539
584
  // unused
540
585
  ...o
541
586
  } = e;
542
- return d(o), /* @__PURE__ */ s(v.Target, { children: n });
543
- }, Ye = m((e, n) => {
587
+ return d(o), /* @__PURE__ */ s(S.Target, { children: n });
588
+ }, nt = m((e, n) => {
544
589
  const {
545
590
  className: t,
546
591
  children: o,
@@ -549,83 +594,83 @@ const oe = Ne(void 0), Ze = m((e, n) => {
549
594
  ...i
550
595
  } = e;
551
596
  d(i);
552
- const a = ke(oe);
597
+ const l = Fe(ie);
553
598
  return /* @__PURE__ */ s(
554
- v.Dropdown,
599
+ S.Dropdown,
555
600
  {
556
601
  className: t,
557
602
  ref: n,
558
- onMouseOver: a == null ? void 0 : a.onMenuMouseOver,
559
- onMouseLeave: a == null ? void 0 : a.onMenuMouseLeave,
603
+ onMouseOver: l == null ? void 0 : l.onMenuMouseOver,
604
+ onMouseLeave: l == null ? void 0 : l.onMenuMouseLeave,
560
605
  children: o
561
606
  }
562
607
  );
563
- }), et = m((e, n) => {
608
+ }), ot = m((e, n) => {
564
609
  const { className: t, ...o } = e;
565
- return d(o), /* @__PURE__ */ s(v.Divider, { className: t, ref: n });
566
- }), tt = m((e, n) => {
610
+ return d(o), /* @__PURE__ */ s(S.Divider, { className: t, ref: n });
611
+ }), rt = m((e, n) => {
567
612
  const { className: t, children: o, ...r } = e;
568
- return d(r), /* @__PURE__ */ s(v.Label, { className: t, ref: n, children: o });
569
- }), nt = m((e, n) => {
613
+ return d(r), /* @__PURE__ */ s(S.Label, { className: t, ref: n, children: o });
614
+ }), st = m((e, n) => {
570
615
  const {
571
616
  className: t,
572
617
  children: o,
573
618
  icon: r,
574
619
  onClick: i,
575
- onDragEnd: a,
576
- onDragStart: l,
620
+ onDragEnd: l,
621
+ onDragStart: a,
577
622
  draggable: u,
578
623
  label: c,
579
624
  ...g
580
625
  } = e;
581
626
  return d(g, !1), r ? /* @__PURE__ */ s(
582
- B,
627
+ z,
583
628
  {
584
629
  size: 24,
585
630
  className: t,
586
631
  ref: n,
587
632
  onClick: i,
588
- onDragEnd: a,
589
- onDragStart: l,
633
+ onDragEnd: l,
634
+ onDragStart: a,
590
635
  draggable: u,
591
636
  "aria-label": c,
592
637
  ...g,
593
638
  children: r
594
639
  }
595
640
  ) : /* @__PURE__ */ s(
596
- w,
641
+ T,
597
642
  {
598
643
  className: t,
599
644
  ref: n,
600
645
  onClick: i,
601
- onDragEnd: a,
602
- onDragStart: l,
646
+ onDragEnd: l,
647
+ onDragStart: a,
603
648
  draggable: u,
604
649
  "aria-label": c,
605
650
  ...g,
606
651
  children: o
607
652
  }
608
653
  );
609
- }), ot = m((e, n) => {
654
+ }), it = m((e, n) => {
610
655
  const {
611
656
  className: t,
612
657
  tabs: o,
613
658
  defaultOpenTab: r,
614
659
  openTab: i,
615
- setOpenTab: a,
616
- loading: l,
660
+ setOpenTab: l,
661
+ loading: a,
617
662
  ...u
618
663
  } = e;
619
- return d(u), /* @__PURE__ */ s(h, { className: t, ref: n, children: /* @__PURE__ */ y(
620
- k,
664
+ return d(u), /* @__PURE__ */ s(b, { className: t, ref: n, children: /* @__PURE__ */ v(
665
+ P,
621
666
  {
622
667
  value: i,
623
668
  defaultValue: r,
624
- onChange: a,
669
+ onChange: l,
625
670
  children: [
626
- l && /* @__PURE__ */ s(pe, { visible: l }),
627
- /* @__PURE__ */ s(k.List, { children: o.map((c) => /* @__PURE__ */ s(
628
- k.Tab,
671
+ a && /* @__PURE__ */ s(Se, { visible: a }),
672
+ /* @__PURE__ */ s(P.List, { children: o.map((c) => /* @__PURE__ */ s(
673
+ P.Tab,
629
674
  {
630
675
  "data-test": `${c.name.toLowerCase()}-tab`,
631
676
  value: c.name,
@@ -633,28 +678,28 @@ const oe = Ne(void 0), Ze = m((e, n) => {
633
678
  },
634
679
  c.name
635
680
  )) }),
636
- o.map((c) => /* @__PURE__ */ s(k.Panel, { value: c.name, children: c.tabPanel }, c.name))
681
+ o.map((c) => /* @__PURE__ */ s(P.Panel, { value: c.name, children: c.tabPanel }, c.name))
637
682
  ]
638
683
  }
639
684
  ) });
640
- }), rt = m((e, n) => {
641
- const { className: t, children: o, onClick: r, label: i, ...a } = e;
642
- return d(a), /* @__PURE__ */ s(
643
- w,
685
+ }), at = m((e, n) => {
686
+ const { className: t, children: o, onClick: r, label: i, ...l } = e;
687
+ return d(l), /* @__PURE__ */ s(
688
+ T,
644
689
  {
645
690
  size: "xs",
646
691
  "aria-label": i,
647
692
  className: t,
648
693
  ref: n,
649
694
  onClick: r,
650
- ...a,
695
+ ...l,
651
696
  children: o
652
697
  }
653
698
  );
654
- }), st = m((e, n) => {
655
- const { className: t, accept: o, value: r, placeholder: i, onChange: a, ...l } = e;
656
- return d(l), /* @__PURE__ */ s(
657
- ve,
699
+ }), lt = m((e, n) => {
700
+ const { className: t, accept: o, value: r, placeholder: i, onChange: l, ...a } = e;
701
+ return d(a), /* @__PURE__ */ s(
702
+ ye,
658
703
  {
659
704
  size: "xs",
660
705
  className: t,
@@ -662,17 +707,17 @@ const oe = Ne(void 0), Ze = m((e, n) => {
662
707
  accept: o,
663
708
  value: r,
664
709
  placeholder: i,
665
- onChange: a,
666
- ...l
710
+ onChange: l,
711
+ ...a
667
712
  }
668
713
  );
669
- }), it = m((e, n) => {
714
+ }), ct = m((e, n) => {
670
715
  const { className: t, children: o, ...r } = e;
671
716
  return d(r), /* @__PURE__ */ s("div", { className: t, ref: n, children: o });
672
- }), at = m((e, n) => {
673
- const { className: t, value: o, placeholder: r, onKeyDown: i, onChange: a, ...l } = e;
674
- return d(l), /* @__PURE__ */ s(
675
- W,
717
+ }), ut = m((e, n) => {
718
+ const { className: t, value: o, placeholder: r, onKeyDown: i, onChange: l, ...a } = e;
719
+ return d(a), /* @__PURE__ */ s(
720
+ Q,
676
721
  {
677
722
  size: "xs",
678
723
  "data-test": "embed-input",
@@ -681,16 +726,16 @@ const oe = Ne(void 0), Ze = m((e, n) => {
681
726
  value: o,
682
727
  placeholder: r,
683
728
  onKeyDown: i,
684
- onChange: a
729
+ onChange: l
685
730
  }
686
731
  );
687
- }), lt = (e) => {
732
+ }), dt = (e) => {
688
733
  const { opened: n, position: t, children: o, ...r } = e;
689
- return d(r), /* @__PURE__ */ s(ye, { withinPortal: !1, opened: n, position: t, children: o });
690
- }, ct = (e) => {
734
+ return d(r), /* @__PURE__ */ s(xe, { withinPortal: !1, opened: n, position: t, children: o });
735
+ }, mt = (e) => {
691
736
  const { children: n, ...t } = e;
692
- return d(t), /* @__PURE__ */ s(Se, { children: n });
693
- }, ut = m((e, n) => {
737
+ return d(t), /* @__PURE__ */ s(Ce, { children: n });
738
+ }, ft = m((e, n) => {
694
739
  const {
695
740
  className: t,
696
741
  children: o,
@@ -698,11 +743,11 @@ const oe = Ne(void 0), Ze = m((e, n) => {
698
743
  // unused
699
744
  ...i
700
745
  } = e;
701
- return d(i), /* @__PURE__ */ s(Ce, { className: t, ref: n, children: o });
702
- }), dt = m((e, n) => {
746
+ return d(i), /* @__PURE__ */ s(we, { className: t, ref: n, children: o });
747
+ }), gt = m((e, n) => {
703
748
  const { className: t, children: o, ...r } = e;
704
749
  return d(r, !1), /* @__PURE__ */ s(
705
- h,
750
+ b,
706
751
  {
707
752
  align: "center",
708
753
  gap: 0,
@@ -712,50 +757,50 @@ const oe = Ne(void 0), Ze = m((e, n) => {
712
757
  children: o
713
758
  }
714
759
  );
715
- }), mt = m((e, n) => {
760
+ }), ht = m((e, n) => {
716
761
  const {
717
762
  className: t,
718
763
  children: o,
719
764
  icon: r,
720
765
  onClick: i,
721
- onDragEnd: a,
722
- onDragStart: l,
766
+ onDragEnd: l,
767
+ onDragStart: a,
723
768
  draggable: u,
724
769
  label: c,
725
770
  ...g
726
771
  } = e;
727
772
  return d(g, !1), r ? /* @__PURE__ */ s(
728
- B,
773
+ z,
729
774
  {
730
775
  size: 24,
731
776
  className: t,
732
777
  ref: n,
733
778
  onClick: i,
734
- onDragEnd: a,
735
- onDragStart: l,
779
+ onDragEnd: l,
780
+ onDragStart: a,
736
781
  draggable: u,
737
782
  "aria-label": c,
738
783
  ...g,
739
784
  children: r
740
785
  }
741
786
  ) : /* @__PURE__ */ s(
742
- w,
787
+ T,
743
788
  {
744
789
  className: t,
745
790
  ref: n,
746
791
  onClick: i,
747
- onDragEnd: a,
748
- onDragStart: l,
792
+ onDragEnd: l,
793
+ onDragStart: a,
749
794
  draggable: u,
750
795
  "aria-label": c,
751
796
  ...g,
752
797
  children: o
753
798
  }
754
799
  );
755
- }), ft = m((e, n) => {
800
+ }), bt = m((e, n) => {
756
801
  const { className: t, children: o, id: r, ...i } = e;
757
802
  return d(i), /* @__PURE__ */ s(
758
- E,
803
+ j,
759
804
  {
760
805
  gap: 0,
761
806
  className: t,
@@ -765,69 +810,69 @@ const oe = Ne(void 0), Ze = m((e, n) => {
765
810
  children: o
766
811
  }
767
812
  );
768
- }), gt = m((e, n) => {
813
+ }), pt = m((e, n) => {
769
814
  const { className: t, children: o, ...r } = e;
770
- return d(r), /* @__PURE__ */ s(h, { className: t, ref: n, children: /* @__PURE__ */ s(h, { className: "bn-mt-suggestion-menu-item-title", children: o }) });
771
- }), ht = m((e, n) => {
772
- const { className: t, isSelected: o, onClick: r, item: i, id: a, ...l } = e;
773
- d(l);
774
- const u = P(null);
775
- return J(() => {
815
+ return d(r), /* @__PURE__ */ s(b, { className: t, ref: n, children: /* @__PURE__ */ s(b, { className: "bn-mt-suggestion-menu-item-title", children: o }) });
816
+ }), vt = m((e, n) => {
817
+ const { className: t, isSelected: o, onClick: r, item: i, id: l, ...a } = e;
818
+ d(a);
819
+ const u = k(null);
820
+ return A(() => {
776
821
  if (!u.current || !o)
777
822
  return;
778
- const c = H(
823
+ const c = q(
779
824
  u.current,
780
825
  document.querySelector(".bn-suggestion-menu")
781
826
  );
782
827
  c === "top" ? u.current.scrollIntoView(!0) : c === "bottom" && u.current.scrollIntoView(!1);
783
- }, [o]), /* @__PURE__ */ y(
784
- h,
828
+ }, [o]), /* @__PURE__ */ v(
829
+ b,
785
830
  {
786
831
  gap: 0,
787
832
  className: t,
788
833
  ref: O(n, u),
789
- id: a,
834
+ id: l,
790
835
  role: "option",
791
836
  onClick: r,
792
837
  "aria-selected": o || void 0,
793
838
  children: [
794
839
  i.icon && /* @__PURE__ */ s(
795
- h,
840
+ b,
796
841
  {
797
842
  className: "bn-mt-suggestion-menu-item-section",
798
843
  "data-position": "left",
799
844
  children: i.icon
800
845
  }
801
846
  ),
802
- /* @__PURE__ */ y(E, { gap: 0, className: "bn-mt-suggestion-menu-item-body", children: [
803
- /* @__PURE__ */ s(N, { className: "bn-mt-suggestion-menu-item-title", children: i.title }),
804
- /* @__PURE__ */ s(N, { className: "bn-mt-suggestion-menu-item-subtitle", children: i.subtext })
847
+ /* @__PURE__ */ v(j, { gap: 0, className: "bn-mt-suggestion-menu-item-body", children: [
848
+ /* @__PURE__ */ s(x, { className: "bn-mt-suggestion-menu-item-title", children: i.title }),
849
+ /* @__PURE__ */ s(x, { className: "bn-mt-suggestion-menu-item-subtitle", children: i.subtext })
805
850
  ] }),
806
851
  i.badge && /* @__PURE__ */ s(
807
- h,
852
+ b,
808
853
  {
809
854
  "data-position": "right",
810
855
  className: "bn-mt-suggestion-menu-item-section",
811
- children: /* @__PURE__ */ s(xe, { size: "xs", children: i.badge })
856
+ children: /* @__PURE__ */ s(Te, { size: "xs", children: i.badge })
812
857
  }
813
858
  )
814
859
  ]
815
860
  }
816
861
  );
817
- }), bt = m((e, n) => {
862
+ }), St = m((e, n) => {
818
863
  const { className: t, children: o, ...r } = e;
819
- return d(r), /* @__PURE__ */ s(h, { className: t, ref: n, children: o });
820
- }), pt = m((e, n) => {
864
+ return d(r), /* @__PURE__ */ s(b, { className: t, ref: n, children: o });
865
+ }), yt = m((e, n) => {
821
866
  const {
822
867
  className: t,
823
868
  children: o,
824
869
  // unused, using "dots" instead
825
870
  ...r
826
871
  } = e;
827
- return d(r), /* @__PURE__ */ s(Z, { className: t, type: "dots", ref: n });
828
- }), vt = m((e, n) => {
829
- const { className: t, children: o, id: r, columns: i, ...a } = e;
830
- return d(a), /* @__PURE__ */ s(
872
+ return d(r), /* @__PURE__ */ s(Y, { className: t, type: "dots", ref: n });
873
+ }), xt = m((e, n) => {
874
+ const { className: t, children: o, id: r, columns: i, ...l } = e;
875
+ return d(l), /* @__PURE__ */ s(
831
876
  "div",
832
877
  {
833
878
  className: t,
@@ -838,25 +883,25 @@ const oe = Ne(void 0), Ze = m((e, n) => {
838
883
  children: o
839
884
  }
840
885
  );
841
- }), yt = m((e, n) => {
886
+ }), Ct = m((e, n) => {
842
887
  const { className: t, children: o, columns: r, ...i } = e;
843
888
  return d(i), /* @__PURE__ */ s(
844
- h,
889
+ b,
845
890
  {
846
891
  className: t,
847
892
  style: { gridColumn: `1 / ${r + 1}` },
848
893
  ref: n,
849
- children: /* @__PURE__ */ s(h, { className: "bn-mt-suggestion-menu-item-title", children: o })
894
+ children: /* @__PURE__ */ s(b, { className: "bn-mt-suggestion-menu-item-title", children: o })
850
895
  }
851
896
  );
852
- }), St = m((e, n) => {
853
- const { className: t, isSelected: o, onClick: r, item: i, id: a, ...l } = e;
854
- d(l);
855
- const u = P(null);
856
- return J(() => {
897
+ }), wt = m((e, n) => {
898
+ const { className: t, isSelected: o, onClick: r, item: i, id: l, ...a } = e;
899
+ d(a);
900
+ const u = k(null);
901
+ return A(() => {
857
902
  if (!u.current || !o)
858
903
  return;
859
- const c = H(
904
+ const c = q(
860
905
  u.current,
861
906
  document.querySelector(".bn-grid-suggestion-menu")
862
907
  );
@@ -866,14 +911,14 @@ const oe = Ne(void 0), Ze = m((e, n) => {
866
911
  {
867
912
  className: t,
868
913
  ref: O(n, u),
869
- id: a,
914
+ id: l,
870
915
  role: "option",
871
916
  onClick: r,
872
917
  "aria-selected": o || void 0,
873
918
  children: i.icon
874
919
  }
875
920
  );
876
- }), Ct = m((e, n) => {
921
+ }), Tt = m((e, n) => {
877
922
  const {
878
923
  className: t,
879
924
  children: o,
@@ -882,7 +927,7 @@ const oe = Ne(void 0), Ze = m((e, n) => {
882
927
  ...i
883
928
  } = e;
884
929
  return d(i), /* @__PURE__ */ s(
885
- Z,
930
+ Y,
886
931
  {
887
932
  className: t,
888
933
  style: { gridColumn: `1 / ${r + 1}` },
@@ -890,75 +935,75 @@ const oe = Ne(void 0), Ze = m((e, n) => {
890
935
  ref: n
891
936
  }
892
937
  );
893
- }), xt = m((e, n) => {
894
- const { children: t, className: o, onMouseDown: r, onClick: i, ...a } = e;
895
- return d(a, !1), /* @__PURE__ */ s(
896
- w,
938
+ }), Nt = m((e, n) => {
939
+ const { children: t, className: o, onMouseDown: r, onClick: i, ...l } = e;
940
+ return d(l, !1), /* @__PURE__ */ s(
941
+ T,
897
942
  {
898
943
  className: o,
899
944
  ref: n,
900
945
  onMouseDown: r,
901
946
  onClick: i,
902
- ...a,
947
+ ...l,
903
948
  children: t
904
949
  }
905
950
  );
906
- }), wt = m((e, n) => {
951
+ }), kt = m((e, n) => {
907
952
  const {
908
953
  className: t,
909
954
  children: o,
910
955
  draggable: r,
911
956
  onDragStart: i,
912
- onDragEnd: a,
913
- style: l,
957
+ onDragEnd: l,
958
+ style: a,
914
959
  label: u,
915
960
  ...c
916
961
  } = e;
917
962
  return d(c, !1), /* @__PURE__ */ s(
918
- w,
963
+ T,
919
964
  {
920
965
  className: t,
921
966
  ref: n,
922
967
  "aria-label": u,
923
968
  draggable: r,
924
969
  onDragStart: i,
925
- onDragEnd: a,
926
- style: l,
970
+ onDragEnd: l,
971
+ style: a,
927
972
  ...c,
928
973
  children: o
929
974
  }
930
975
  );
931
- }), I = m(
976
+ }), D = m(
932
977
  (e, n) => {
933
978
  const {
934
979
  className: t,
935
980
  children: o,
936
981
  onMouseEnter: r,
937
982
  onMouseLeave: i,
938
- variant: a,
939
- ...l
983
+ variant: l,
984
+ ...a
940
985
  } = e;
941
- d(l);
942
- const { ref: u, focused: c } = Q(), g = Me(c), b = O(n, u, g);
986
+ d(a);
987
+ const { ref: u, focused: c } = ee(), g = Oe(c), h = O(n, u, g);
943
988
  return /* @__PURE__ */ s(
944
- we,
989
+ Ne,
945
990
  {
946
991
  className: t,
947
- ref: b,
992
+ ref: h,
948
993
  role: "toolbar",
949
994
  onMouseEnter: r,
950
995
  onMouseLeave: i,
951
- gap: a === "action-toolbar" ? 2 : void 0,
996
+ gap: l === "action-toolbar" ? 2 : void 0,
952
997
  children: o
953
998
  }
954
999
  );
955
1000
  }
956
- ), Tt = m((e, n) => {
1001
+ ), L = m((e, n) => {
957
1002
  const { className: t, items: o, isDisabled: r, ...i } = e;
958
1003
  d(i);
959
- const a = o.filter((l) => l.isSelected)[0];
960
- return a ? /* @__PURE__ */ y(
961
- v,
1004
+ const l = o.filter((a) => a.isSelected)[0];
1005
+ return l ? /* @__PURE__ */ v(
1006
+ S,
962
1007
  {
963
1008
  withinPortal: !1,
964
1009
  transitionProps: {
@@ -967,144 +1012,147 @@ const oe = Ne(void 0), Ze = m((e, n) => {
967
1012
  disabled: r,
968
1013
  middlewares: { flip: !0, shift: !0, inline: !1, size: !0 },
969
1014
  children: [
970
- /* @__PURE__ */ s(v.Target, { children: /* @__PURE__ */ s(
971
- w,
1015
+ /* @__PURE__ */ s(S.Target, { children: /* @__PURE__ */ s(
1016
+ T,
972
1017
  {
973
- onMouseDown: (l) => {
974
- D() && l.currentTarget.focus();
1018
+ onMouseDown: (a) => {
1019
+ B() && a.currentTarget.focus();
975
1020
  },
976
- leftSection: a.icon,
977
- rightSection: /* @__PURE__ */ s(We, {}),
1021
+ leftSection: l.icon,
1022
+ rightSection: /* @__PURE__ */ s(Je, {}),
978
1023
  size: "xs",
979
1024
  variant: "subtle",
980
1025
  disabled: r,
981
- children: a.text
1026
+ children: l.text
982
1027
  }
983
1028
  ) }),
984
- /* @__PURE__ */ s(v.Dropdown, { className: t, ref: n, children: o.map((l) => /* @__PURE__ */ s(
985
- v.Item,
1029
+ /* @__PURE__ */ s(S.Dropdown, { className: t, ref: n, children: o.map((a) => /* @__PURE__ */ s(
1030
+ S.Item,
986
1031
  {
987
- onClick: l.onClick,
988
- leftSection: l.icon,
989
- rightSection: l.isSelected ? /* @__PURE__ */ s(q, { size: 10, className: "bn-tick-icon" }) : (
1032
+ onClick: a.onClick,
1033
+ leftSection: a.icon,
1034
+ rightSection: a.isSelected ? /* @__PURE__ */ s(X, { size: 10, className: "bn-tick-icon" }) : (
990
1035
  // Ensures space for tick even if item isn't currently selected.
991
1036
  /* @__PURE__ */ s("div", { className: "bn-tick-space" })
992
1037
  ),
993
- disabled: l.isDisabled,
994
- children: l.text
1038
+ disabled: a.isDisabled,
1039
+ children: a.text
995
1040
  },
996
- l.text
1041
+ a.text
997
1042
  )) })
998
1043
  ]
999
1044
  }
1000
1045
  ) : null;
1001
- }), Nt = {
1046
+ }), Pt = {
1002
1047
  FormattingToolbar: {
1003
- Root: I,
1004
- Button: R,
1005
- Select: Tt
1048
+ Root: D,
1049
+ Button: I,
1050
+ Select: L
1006
1051
  },
1007
1052
  FilePanel: {
1008
- Root: ot,
1009
- Button: rt,
1010
- FileInput: st,
1011
- TabPanel: it,
1012
- TextInput: at
1053
+ Root: it,
1054
+ Button: at,
1055
+ FileInput: lt,
1056
+ TabPanel: ct,
1057
+ TextInput: ut
1013
1058
  },
1014
1059
  GridSuggestionMenu: {
1015
- Root: vt,
1016
- Item: St,
1017
- EmptyItem: yt,
1018
- Loader: Ct
1060
+ Root: xt,
1061
+ Item: wt,
1062
+ EmptyItem: Ct,
1063
+ Loader: Tt
1019
1064
  },
1020
1065
  LinkToolbar: {
1021
- Root: I,
1022
- Button: R
1066
+ Root: D,
1067
+ Button: I,
1068
+ Select: L
1023
1069
  },
1024
1070
  SideMenu: {
1025
- Root: dt,
1026
- Button: mt
1071
+ Root: gt,
1072
+ Button: ht
1027
1073
  },
1028
1074
  SuggestionMenu: {
1029
- Root: ft,
1030
- Item: ht,
1031
- EmptyItem: gt,
1032
- Label: bt,
1033
- Loader: pt
1075
+ Root: bt,
1076
+ Item: vt,
1077
+ EmptyItem: pt,
1078
+ Label: St,
1079
+ Loader: yt
1034
1080
  },
1035
1081
  TableHandle: {
1036
- Root: wt,
1037
- ExtendButton: xt
1082
+ Root: kt,
1083
+ ExtendButton: Nt
1038
1084
  },
1039
1085
  Generic: {
1040
1086
  Badge: {
1041
- Root: Re,
1042
- Group: Ie
1087
+ Root: De,
1088
+ Group: Le
1043
1089
  },
1044
1090
  Form: {
1045
1091
  Root: (e) => /* @__PURE__ */ s("div", { children: e.children }),
1046
- TextInput: $e
1092
+ TextInput: Ve
1047
1093
  },
1048
1094
  Menu: {
1049
- Root: Je,
1050
- Trigger: Xe,
1051
- Dropdown: Ye,
1052
- Divider: et,
1053
- Label: tt,
1054
- Item: Qe,
1055
- Button: nt
1095
+ Root: Ye,
1096
+ Trigger: tt,
1097
+ Dropdown: nt,
1098
+ Divider: ot,
1099
+ Label: rt,
1100
+ Item: et,
1101
+ Button: st
1056
1102
  },
1057
1103
  Popover: {
1058
- Root: lt,
1059
- Trigger: ct,
1060
- Content: ut
1104
+ Root: dt,
1105
+ Trigger: mt,
1106
+ Content: ft
1061
1107
  },
1062
1108
  Toolbar: {
1063
- Root: I,
1064
- Button: R
1109
+ Root: D,
1110
+ Button: I,
1111
+ Select: L
1065
1112
  }
1066
1113
  },
1067
1114
  Comments: {
1068
- Comment: Ee,
1069
- Editor: ze,
1070
- Card: De,
1071
- CardSection: Le
1115
+ Comment: $e,
1116
+ Editor: Ae,
1117
+ Card: Be,
1118
+ CardSection: Ee,
1119
+ ExpandSectionsPrompt: ze
1072
1120
  }
1073
- }, kt = {
1121
+ }, Ft = {
1074
1122
  // Removes button press effect
1075
1123
  activeClassName: ""
1076
- }, Pt = (e) => {
1077
- const { className: n, theme: t, ...o } = e, r = de(), i = me(), a = (r == null ? void 0 : r.colorSchemePreference) || i, l = L(
1124
+ }, Mt = (e) => {
1125
+ const { className: n, theme: t, ...o } = e, r = me(), i = fe(), l = (r == null ? void 0 : r.colorSchemePreference) || i, a = E(
1078
1126
  (c) => {
1079
- if (c && (Oe(c), typeof t == "object")) {
1127
+ if (c && (Ie(c), typeof t == "object")) {
1080
1128
  if ("light" in t && "dark" in t) {
1081
- A(
1082
- t[a === "dark" ? "dark" : "light"],
1129
+ V(
1130
+ t[l === "dark" ? "dark" : "light"],
1083
1131
  c
1084
1132
  );
1085
1133
  return;
1086
1134
  }
1087
- A(t, c);
1135
+ V(t, c);
1088
1136
  return;
1089
1137
  }
1090
1138
  },
1091
- [a, t]
1092
- ), u = typeof t == "string" ? t : a !== "no-preference" ? a : "light";
1093
- return /* @__PURE__ */ s(fe.Provider, { value: Nt, children: /* @__PURE__ */ s(
1094
- Te,
1139
+ [l, t]
1140
+ ), u = typeof t == "string" ? t : l !== "no-preference" ? l : "light";
1141
+ return /* @__PURE__ */ s(ge.Provider, { value: Pt, children: /* @__PURE__ */ s(
1142
+ ke,
1095
1143
  {
1096
- theme: kt,
1144
+ theme: Ft,
1097
1145
  cssVariablesSelector: ".bn-mantine",
1098
1146
  getRootElement: () => {
1099
1147
  },
1100
1148
  children: /* @__PURE__ */ s(
1101
- ge,
1149
+ he,
1102
1150
  {
1103
1151
  "data-mantine-color-scheme": u,
1104
- className: re("bn-mantine", n || ""),
1152
+ className: U("bn-mantine", n || ""),
1105
1153
  theme: typeof t == "object" ? void 0 : t,
1106
1154
  ...o,
1107
- ref: l
1155
+ ref: a
1108
1156
  }
1109
1157
  )
1110
1158
  }
@@ -1120,7 +1168,7 @@ const oe = Ne(void 0), Ze = m((e, n) => {
1120
1168
  "#161616",
1121
1169
  "#0F0F0F",
1122
1170
  "#000000"
1123
- ], G = {
1171
+ ], K = {
1124
1172
  colors: {
1125
1173
  editor: {
1126
1174
  text: f[5],
@@ -1149,11 +1197,11 @@ const oe = Ne(void 0), Ze = m((e, n) => {
1149
1197
  shadow: f[2],
1150
1198
  border: f[1],
1151
1199
  sideMenu: f[2],
1152
- highlights: se
1200
+ highlights: ae
1153
1201
  },
1154
1202
  borderRadius: 6,
1155
1203
  fontFamily: '"Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Open Sans", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif'
1156
- }, Lt = {
1204
+ }, Et = {
1157
1205
  colors: {
1158
1206
  editor: {
1159
1207
  text: f[2],
@@ -1182,18 +1230,18 @@ const oe = Ne(void 0), Ze = m((e, n) => {
1182
1230
  shadow: f[8],
1183
1231
  border: f[7],
1184
1232
  sideMenu: f[4],
1185
- highlights: ie
1233
+ highlights: le
1186
1234
  },
1187
- borderRadius: G.borderRadius,
1188
- fontFamily: G.fontFamily
1235
+ borderRadius: K.borderRadius,
1236
+ fontFamily: K.fontFamily
1189
1237
  };
1190
1238
  export {
1191
- Pt as BlockNoteView,
1192
- A as applyBlockNoteCSSVariablesFromTheme,
1193
- Nt as components,
1194
- Lt as darkDefaultTheme,
1239
+ Mt as BlockNoteView,
1240
+ V as applyBlockNoteCSSVariablesFromTheme,
1241
+ Pt as components,
1242
+ Et as darkDefaultTheme,
1195
1243
  f as defaultColorScheme,
1196
- G as lightDefaultTheme,
1197
- Oe as removeBlockNoteCSSVariables
1244
+ K as lightDefaultTheme,
1245
+ Ie as removeBlockNoteCSSVariables
1198
1246
  };
1199
1247
  //# sourceMappingURL=blocknote-mantine.js.map