@blocknote/ariakit 0.30.0 → 0.31.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.
Files changed (38) hide show
  1. package/dist/blocknote-ariakit.cjs +1 -1
  2. package/dist/blocknote-ariakit.cjs.map +1 -1
  3. package/dist/blocknote-ariakit.js +224 -201
  4. package/dist/blocknote-ariakit.js.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/dist/webpack-stats.json +1 -1
  7. package/package.json +5 -4
  8. package/src/BlockNoteView.tsx +2 -2
  9. package/src/ariakitStyles.css +669 -670
  10. package/src/badge/Badge.tsx +5 -3
  11. package/src/comments/Card.tsx +8 -5
  12. package/src/comments/Comment.tsx +4 -2
  13. package/src/comments/Editor.tsx +3 -2
  14. package/src/input/TextInput.tsx +12 -1
  15. package/src/menu/Button.tsx +3 -2
  16. package/src/menu/Menu.tsx +11 -6
  17. package/src/panel/Panel.tsx +4 -2
  18. package/src/panel/PanelButton.tsx +2 -1
  19. package/src/popover/Popover.tsx +4 -3
  20. package/src/sideMenu/SideMenuButton.tsx +3 -2
  21. package/src/style.css +97 -7
  22. package/src/suggestionMenu/SuggestionMenu.tsx +2 -1
  23. package/src/suggestionMenu/SuggestionMenuEmptyItem.tsx +2 -1
  24. package/src/suggestionMenu/SuggestionMenuItem.tsx +8 -4
  25. package/src/suggestionMenu/SuggestionMenuLabel.tsx +2 -1
  26. package/src/suggestionMenu/SuggestionMenuLoader.tsx +11 -2
  27. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx +2 -1
  28. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx +2 -1
  29. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx +3 -2
  30. package/src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx +2 -1
  31. package/src/tableHandle/ExtendButton.tsx +3 -2
  32. package/src/tableHandle/TableHandle.tsx +3 -2
  33. package/src/toolbar/Toolbar.tsx +4 -4
  34. package/src/toolbar/ToolbarButton.tsx +5 -5
  35. package/src/toolbar/ToolbarSelect.tsx +6 -3
  36. package/types/src/input/TextInput.d.ts +5 -1
  37. package/types/src/suggestionMenu/SuggestionMenuItem.d.ts +1 -1
  38. package/types/src/suggestionMenu/SuggestionMenuLoader.d.ts +0 -1
@@ -1,46 +1,57 @@
1
- import { jsx as r, jsxs as h, Fragment as A } from "react/jsx-runtime";
2
- import { assertEmpty as i, mergeCSSClasses as b, isSafari as $ } from "@blocknote/core";
3
- import { elementOverflow as P, mergeRefs as B, useFocusWithin as V, FormattingToolbarController as O, getFormattingToolbarItems as H, FormattingToolbar as j, ComponentsContext as q, BlockNoteViewRaw as K } from "@blocknote/react";
4
- import { FormProvider as I, FormLabel as z, FormInput as y, MenuButton as w, MenuButtonArrow as U, CheckboxCheck as C, MenuItem as x, MenuGroupLabel as W, MenuSeparator as _, Menu as J, MenuProvider as Q, Button as f, TabProvider as X, TabList as Y, Tab as Z, TabPanel as ee, Popover as ne, PopoverDisclosure as te, PopoverProvider as ae, Group as N, Toolbar as se, TooltipProvider as F, TooltipAnchor as R, ToolbarItem as D, Tooltip as E, SelectProvider as re, Select as oe, SelectArrow as le, SelectPopover as ce, SelectItem as ie, SelectItemCheck as ue } from "@ariakit/react";
5
- import { forwardRef as u, useRef as L, useEffect as G, useState as de } from "react";
6
- const me = (n) => {
1
+ import { jsx as r, jsxs as h, Fragment as V } from "react/jsx-runtime";
2
+ import { assertEmpty as i, mergeCSSClasses as b, isSafari as O } from "@blocknote/core";
3
+ import { elementOverflow as B, mergeRefs as P, useFocusWithin as H, FormattingToolbarController as j, getFormattingToolbarItems as K, FormattingToolbar as Q, ComponentsContext as z, BlockNoteViewRaw as U } from "@blocknote/react";
4
+ import { FormProvider as I, FormLabel as W, FormInput as w, MenuButton as F, MenuButtonArrow as Z, CheckboxCheck as y, MenuItem as x, MenuGroupLabel as _, MenuSeparator as J, Menu as X, MenuProvider as Y, Button as f, TabProvider as ee, TabList as ne, Tab as te, TabPanel as ae, Popover as se, PopoverDisclosure as re, PopoverProvider as oe, Group as N, Toolbar as le, TooltipProvider as D, TooltipAnchor as R, ToolbarItem as E, Tooltip as L, SelectProvider as ce, Select as ie, SelectArrow as ue, SelectPopover as de, SelectItem as me, SelectItemCheck as be } from "@ariakit/react";
5
+ import { forwardRef as d, useRef as q, useEffect as G, useState as he } from "react";
6
+ const ge = (n) => {
7
7
  const { children: t, ...a } = n;
8
8
  return i(a), /* @__PURE__ */ r(I, { children: t });
9
- }, be = u((n, t) => {
9
+ }, pe = d((n, t) => {
10
10
  const {
11
11
  className: a,
12
12
  name: e,
13
13
  label: s,
14
- icon: o,
15
- value: c,
16
- autoFocus: m,
17
- placeholder: l,
18
- onKeyDown: d,
19
- onChange: p,
20
- onSubmit: g,
21
- ...k
14
+ variant: o,
15
+ icon: c,
16
+ value: m,
17
+ autoFocus: l,
18
+ placeholder: u,
19
+ disabled: g,
20
+ onKeyDown: p,
21
+ onChange: k,
22
+ onSubmit: v,
23
+ autoComplete: C,
24
+ rightSection: A,
25
+ ...$
22
26
  } = n;
23
- return i(k), /* @__PURE__ */ h(A, { children: [
24
- n.label && /* @__PURE__ */ r(z, { name: e, children: s }),
27
+ return i($), /* @__PURE__ */ h(V, { children: [
28
+ n.label && /* @__PURE__ */ r(W, { name: e, children: s }),
25
29
  /* @__PURE__ */ h("div", { className: "bn-ak-input-wrapper", children: [
26
- o,
30
+ c,
27
31
  /* @__PURE__ */ r(
28
- y,
32
+ w,
29
33
  {
30
- className: b("bn-ak-input", a || ""),
34
+ className: b(
35
+ "bn-ak-input",
36
+ a || "",
37
+ o === "large" ? "bn-ak-input-large" : ""
38
+ ),
31
39
  ref: t,
32
40
  name: e,
33
- value: c,
34
- autoFocus: m,
35
- placeholder: l,
36
- onKeyDown: d,
37
- onChange: p,
38
- onSubmit: g
41
+ value: m,
42
+ autoFocus: l,
43
+ placeholder: u,
44
+ disabled: g,
45
+ onKeyDown: p,
46
+ onChange: k,
47
+ onSubmit: v,
48
+ autoComplete: C
39
49
  }
40
- )
50
+ ),
51
+ A
41
52
  ] })
42
53
  ] });
43
- }), he = (n) => {
54
+ }), Ne = (n) => {
44
55
  const {
45
56
  children: t,
46
57
  onOpenChange: a,
@@ -50,7 +61,7 @@ const me = (n) => {
50
61
  ...o
51
62
  } = n;
52
63
  return i(o), /* @__PURE__ */ r(
53
- Q,
64
+ Y,
54
65
  {
55
66
  placement: e,
56
67
  setOpen: a,
@@ -58,7 +69,7 @@ const me = (n) => {
58
69
  children: t
59
70
  }
60
71
  );
61
- }, pe = u((n, t) => {
72
+ }, ke = d((n, t) => {
62
73
  const {
63
74
  className: a,
64
75
  children: e,
@@ -67,7 +78,7 @@ const me = (n) => {
67
78
  ...o
68
79
  } = n;
69
80
  return i(o), /* @__PURE__ */ r(
70
- J,
81
+ X,
71
82
  {
72
83
  unmountOnHide: !0,
73
84
  className: b("bn-ak-menu", a || ""),
@@ -75,10 +86,10 @@ const me = (n) => {
75
86
  children: e
76
87
  }
77
88
  );
78
- }), ge = u((n, t) => {
89
+ }), fe = d((n, t) => {
79
90
  const { className: a, children: e, icon: s, checked: o, subTrigger: c, onClick: m, ...l } = n;
80
91
  return i(l), c ? /* @__PURE__ */ h(
81
- w,
92
+ F,
82
93
  {
83
94
  render: /* @__PURE__ */ r(x, {}),
84
95
  className: b("bn-ak-menu-item", a || ""),
@@ -87,8 +98,8 @@ const me = (n) => {
87
98
  children: [
88
99
  s,
89
100
  e,
90
- /* @__PURE__ */ r(U, {}),
91
- o !== void 0 && /* @__PURE__ */ r(C, { checked: o })
101
+ /* @__PURE__ */ r(Z, {}),
102
+ o !== void 0 && /* @__PURE__ */ r(y, { checked: o })
92
103
  ]
93
104
  }
94
105
  ) : /* @__PURE__ */ h(
@@ -100,33 +111,33 @@ const me = (n) => {
100
111
  children: [
101
112
  s,
102
113
  e,
103
- o !== void 0 && /* @__PURE__ */ r(C, { checked: o })
114
+ o !== void 0 && /* @__PURE__ */ r(y, { checked: o })
104
115
  ]
105
116
  }
106
117
  );
107
- }), Ne = u((n, t) => {
118
+ }), ve = d((n, t) => {
108
119
  const { className: a, children: e, ...s } = n;
109
120
  return i(s), /* @__PURE__ */ r(
110
- W,
121
+ _,
111
122
  {
112
123
  className: b("bn-ak-group-label", a || ""),
113
124
  ref: t,
114
125
  children: e
115
126
  }
116
127
  );
117
- }), ke = (n) => {
128
+ }), Te = (n) => {
118
129
  const { children: t, sub: a, ...e } = n;
119
- return i(e), a ? t : /* @__PURE__ */ r(w, { render: t });
120
- }, fe = u((n, t) => {
130
+ return i(e), a ? t : /* @__PURE__ */ r(F, { render: t });
131
+ }, Se = d((n, t) => {
121
132
  const { className: a, ...e } = n;
122
133
  return i(e), /* @__PURE__ */ r(
123
- _,
134
+ J,
124
135
  {
125
136
  className: b("bn-ak-separator", a || ""),
126
137
  ref: t
127
138
  }
128
139
  );
129
- }), ve = u((n, t) => {
140
+ }), Me = d((n, t) => {
130
141
  const {
131
142
  className: a,
132
143
  children: e,
@@ -135,15 +146,15 @@ const me = (n) => {
135
146
  label: c,
136
147
  onDragEnd: m,
137
148
  onDragStart: l,
138
- draggable: d,
139
- ...p
149
+ draggable: u,
150
+ ...g
140
151
  } = n;
141
- return i(p, !1), /* @__PURE__ */ h(
152
+ return i(g, !1), /* @__PURE__ */ h(
142
153
  f,
143
154
  {
144
155
  onDragEnd: m,
145
156
  onDragStart: l,
146
- draggable: d,
157
+ draggable: u,
147
158
  "aria-label": c,
148
159
  className: b(
149
160
  "bn-ak-button bn-ak-secondary",
@@ -151,14 +162,14 @@ const me = (n) => {
151
162
  ),
152
163
  ref: t,
153
164
  onClick: o,
154
- ...p,
165
+ ...g,
155
166
  children: [
156
167
  s,
157
168
  e
158
169
  ]
159
170
  }
160
171
  );
161
- }), Se = u((n, t) => {
172
+ }), Ie = d((n, t) => {
162
173
  const {
163
174
  className: a,
164
175
  tabs: e,
@@ -175,22 +186,22 @@ const me = (n) => {
175
186
  className: b("bn-ak-wrapper", a || ""),
176
187
  ref: t,
177
188
  children: /* @__PURE__ */ h(
178
- X,
189
+ ee,
179
190
  {
180
191
  defaultSelectedId: s,
181
192
  selectedId: o,
182
- setActiveId: (d) => {
183
- d && c(d);
193
+ setActiveId: (u) => {
194
+ u && c(u);
184
195
  },
185
196
  children: [
186
- /* @__PURE__ */ r(Y, { className: "bn-ak-tab-list", children: e.map((d) => /* @__PURE__ */ r(Z, { className: "bn-ak-tab", id: d.name, children: d.name }, d.name)) }),
187
- /* @__PURE__ */ r("div", { className: "bn-ak-panels", children: e.map((d) => /* @__PURE__ */ r(ee, { tabId: d.name, children: d.tabPanel }, d.name)) })
197
+ /* @__PURE__ */ r(ne, { className: "bn-ak-tab-list", children: e.map((u) => /* @__PURE__ */ r(te, { className: "bn-ak-tab", id: u.name, children: u.name }, u.name)) }),
198
+ /* @__PURE__ */ r("div", { className: "bn-ak-panels", children: e.map((u) => /* @__PURE__ */ r(ae, { tabId: u.name, children: u.tabPanel }, u.name)) })
188
199
  ]
189
200
  }
190
201
  )
191
202
  }
192
203
  );
193
- }), Te = u((n, t) => {
204
+ }), we = d((n, t) => {
194
205
  const { className: a, children: e, onClick: s, label: o, ...c } = n;
195
206
  return i(c), /* @__PURE__ */ r(
196
207
  f,
@@ -202,10 +213,10 @@ const me = (n) => {
202
213
  children: e
203
214
  }
204
215
  );
205
- }), Me = u((n, t) => {
216
+ }), Ce = d((n, t) => {
206
217
  const { className: a, accept: e, value: s, placeholder: o, onChange: c, ...m } = n;
207
218
  return i(m), /* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(
208
- y,
219
+ w,
209
220
  {
210
221
  className: a,
211
222
  ref: t,
@@ -217,13 +228,13 @@ const me = (n) => {
217
228
  placeholder: o
218
229
  }
219
230
  ) });
220
- }), Ie = u((n, t) => {
231
+ }), ye = d((n, t) => {
221
232
  const { className: a, children: e, ...s } = n;
222
233
  return i(s), /* @__PURE__ */ r("div", { className: a, ref: t, children: e });
223
- }), ye = u((n, t) => {
234
+ }), xe = d((n, t) => {
224
235
  const { className: a, value: e, placeholder: s, onKeyDown: o, onChange: c, ...m } = n;
225
236
  return i(m), /* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(
226
- y,
237
+ w,
227
238
  {
228
239
  className: b("bn-ak-input", a || ""),
229
240
  name: "panel-input",
@@ -235,13 +246,13 @@ const me = (n) => {
235
246
  ref: t
236
247
  }
237
248
  ) });
238
- }), Ce = u((n, t) => {
249
+ }), Be = d((n, t) => {
239
250
  const { children: a, ...e } = n;
240
- return i(e), /* @__PURE__ */ r(te, { render: a, ref: t });
241
- }), xe = u((n, t) => {
251
+ return i(e), /* @__PURE__ */ r(re, { render: a, ref: t });
252
+ }), Pe = d((n, t) => {
242
253
  const { className: a, children: e, variant: s, ...o } = n;
243
254
  return i(o), /* @__PURE__ */ r(
244
- ne,
255
+ se,
245
256
  {
246
257
  className: b(
247
258
  "bn-ak-popover",
@@ -252,13 +263,13 @@ const me = (n) => {
252
263
  children: e
253
264
  }
254
265
  );
255
- }), Pe = (n) => {
266
+ }), Fe = (n) => {
256
267
  const { children: t, opened: a, position: e, ...s } = n;
257
- return i(s), /* @__PURE__ */ r(ae, { open: a, placement: e, children: t });
258
- }, Be = u((n, t) => {
268
+ return i(s), /* @__PURE__ */ r(oe, { open: a, placement: e, children: t });
269
+ }, De = d((n, t) => {
259
270
  const { className: a, children: e, ...s } = n;
260
271
  return i(s, !1), /* @__PURE__ */ r(N, { className: a, ref: t, ...s, children: e });
261
- }), we = u((n, t) => {
272
+ }), Re = d((n, t) => {
262
273
  const {
263
274
  className: a,
264
275
  children: e,
@@ -267,15 +278,15 @@ const me = (n) => {
267
278
  label: c,
268
279
  onDragEnd: m,
269
280
  onDragStart: l,
270
- draggable: d,
271
- ...p
281
+ draggable: u,
282
+ ...g
272
283
  } = n;
273
- return i(p, !1), /* @__PURE__ */ h(
284
+ return i(g, !1), /* @__PURE__ */ h(
274
285
  f,
275
286
  {
276
287
  onDragEnd: m,
277
288
  onDragStart: l,
278
- draggable: d,
289
+ draggable: u,
279
290
  "aria-label": c,
280
291
  className: b(
281
292
  "bn-ak-button bn-ak-secondary",
@@ -283,14 +294,14 @@ const me = (n) => {
283
294
  ),
284
295
  ref: t,
285
296
  onClick: o,
286
- ...p,
297
+ ...g,
287
298
  children: [
288
299
  s,
289
300
  e
290
301
  ]
291
302
  }
292
303
  );
293
- }), Fe = u((n, t) => {
304
+ }), Ee = d((n, t) => {
294
305
  const { className: a, children: e, id: s, columns: o, ...c } = n;
295
306
  return i(c), /* @__PURE__ */ r(
296
307
  "div",
@@ -303,7 +314,7 @@ const me = (n) => {
303
314
  children: e
304
315
  }
305
316
  );
306
- }), Re = u((n, t) => {
317
+ }), Le = d((n, t) => {
307
318
  const { className: a, children: e, columns: s, ...o } = n;
308
319
  return i(o), /* @__PURE__ */ r(
309
320
  "div",
@@ -314,23 +325,23 @@ const me = (n) => {
314
325
  children: /* @__PURE__ */ r("div", { className: "bn-ak-suggestion-menu-item-label", children: e })
315
326
  }
316
327
  );
317
- }), De = u((n, t) => {
328
+ }), qe = d((n, t) => {
318
329
  const { className: a, isSelected: e, onClick: s, item: o, id: c, ...m } = n;
319
330
  i(m);
320
- const l = L(null);
331
+ const l = q(null);
321
332
  return G(() => {
322
333
  if (!l.current || !e)
323
334
  return;
324
- const d = P(
335
+ const u = B(
325
336
  l.current,
326
337
  document.querySelector(".bn-grid-suggestion-menu")
327
338
  );
328
- d === "top" ? l.current.scrollIntoView(!0) : d === "bottom" && l.current.scrollIntoView(!1);
339
+ u === "top" ? l.current.scrollIntoView(!0) : u === "bottom" && l.current.scrollIntoView(!1);
329
340
  }, [e]), /* @__PURE__ */ r(
330
341
  "div",
331
342
  {
332
343
  className: a,
333
- ref: B([t, l]),
344
+ ref: P([t, l]),
334
345
  id: c,
335
346
  role: "option",
336
347
  onClick: s,
@@ -338,7 +349,7 @@ const me = (n) => {
338
349
  children: o.icon
339
350
  }
340
351
  );
341
- }), Ee = u((n, t) => {
352
+ }), Ge = d((n, t) => {
342
353
  const {
343
354
  className: a,
344
355
  children: e,
@@ -355,7 +366,7 @@ const me = (n) => {
355
366
  children: e
356
367
  }
357
368
  );
358
- }), Le = u((n, t) => {
369
+ }), Ae = d((n, t) => {
359
370
  const { className: a, children: e, id: s, ...o } = n;
360
371
  return i(o), /* @__PURE__ */ r(
361
372
  N,
@@ -367,7 +378,7 @@ const me = (n) => {
367
378
  children: e
368
379
  }
369
380
  );
370
- }), Ge = u((n, t) => {
381
+ }), $e = d((n, t) => {
371
382
  const { className: a, children: e, ...s } = n;
372
383
  return i(s), /* @__PURE__ */ r(
373
384
  "div",
@@ -377,24 +388,26 @@ const me = (n) => {
377
388
  children: /* @__PURE__ */ r("div", { className: "bn-ak-suggestion-menu-item-label", children: e })
378
389
  }
379
390
  );
380
- }), Ae = u((n, t) => {
391
+ }), Ve = d((n, t) => {
381
392
  const { className: a, item: e, isSelected: s, onClick: o, id: c, ...m } = n;
382
393
  i(m);
383
- const l = L(null);
394
+ const l = q(null);
384
395
  return G(() => {
385
396
  if (!l.current || !s)
386
397
  return;
387
- const d = P(
398
+ const u = B(
388
399
  l.current,
389
- document.querySelector(".bn-suggestion-menu")
400
+ document.querySelector(".bn-suggestion-menu, #ai-suggestion-menu")
401
+ // TODO
390
402
  );
391
- d === "top" ? l.current.scrollIntoView(!0) : d === "bottom" && l.current.scrollIntoView(!1);
403
+ u === "top" ? l.current.scrollIntoView(!0) : u === "bottom" && l.current.scrollIntoView(!1);
392
404
  }, [s]), /* @__PURE__ */ h(
393
405
  "div",
394
406
  {
395
407
  className: b("bn-ak-menu-item", a || ""),
396
- ref: B([t, l]),
408
+ ref: P([t, l]),
397
409
  id: c,
410
+ onMouseDown: (u) => u.preventDefault(),
398
411
  onClick: o,
399
412
  role: "option",
400
413
  "aria-selected": s || void 0,
@@ -422,7 +435,7 @@ const me = (n) => {
422
435
  ]
423
436
  }
424
437
  );
425
- }), $e = u((n, t) => {
438
+ }), Oe = d((n, t) => {
426
439
  const { className: a, children: e, ...s } = n;
427
440
  return i(s), /* @__PURE__ */ r(
428
441
  "div",
@@ -432,10 +445,20 @@ const me = (n) => {
432
445
  children: e
433
446
  }
434
447
  );
435
- }), Ve = u((n, t) => {
436
- const { className: a, children: e, ...s } = n;
437
- return i(s), /* @__PURE__ */ r("div", { className: a, ref: t, children: e });
438
- }), Oe = u((n, t) => {
448
+ }), He = d((n, t) => {
449
+ const { className: a, ...e } = n;
450
+ return i(e), /* @__PURE__ */ r("div", { className: a, ref: t, children: /* @__PURE__ */ r(
451
+ "svg",
452
+ {
453
+ xmlns: "http://www.w3.org/2000/svg",
454
+ height: "1em",
455
+ viewBox: "0 -960 960 960",
456
+ width: "1em",
457
+ fill: "#e8eaed",
458
+ children: /* @__PURE__ */ r("path", { d: "M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q17 0 28.5 11.5T520-840q0 17-11.5 28.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-17 11.5-28.5T840-520q17 0 28.5 11.5T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Z" })
459
+ }
460
+ ) });
461
+ }), je = d((n, t) => {
439
462
  const { children: a, className: e, onMouseDown: s, onClick: o, ...c } = n;
440
463
  return i(c, !1), /* @__PURE__ */ r(
441
464
  f,
@@ -451,7 +474,7 @@ const me = (n) => {
451
474
  children: a
452
475
  }
453
476
  );
454
- }), He = u((n, t) => {
477
+ }), Ke = d((n, t) => {
455
478
  const {
456
479
  className: a,
457
480
  children: e,
@@ -460,9 +483,9 @@ const me = (n) => {
460
483
  onDragEnd: c,
461
484
  style: m,
462
485
  label: l,
463
- ...d
486
+ ...u
464
487
  } = n;
465
- return i(d, !1), /* @__PURE__ */ r(
488
+ return i(u, !1), /* @__PURE__ */ r(
466
489
  f,
467
490
  {
468
491
  className: b(
@@ -475,11 +498,11 @@ const me = (n) => {
475
498
  onDragStart: o,
476
499
  onDragEnd: c,
477
500
  style: m,
478
- ...d,
501
+ ...u,
479
502
  children: e
480
503
  }
481
504
  );
482
- }), S = u(
505
+ }), T = d(
483
506
  (n, t) => {
484
507
  const {
485
508
  className: a,
@@ -490,7 +513,7 @@ const me = (n) => {
490
513
  ...m
491
514
  } = n;
492
515
  return i(m), /* @__PURE__ */ r(
493
- se,
516
+ le,
494
517
  {
495
518
  className: b("bn-ak-toolbar", a || ""),
496
519
  ref: t,
@@ -500,7 +523,7 @@ const me = (n) => {
500
523
  }
501
524
  );
502
525
  }
503
- ), T = u(
526
+ ), S = d(
504
527
  (n, t) => {
505
528
  const {
506
529
  className: a,
@@ -510,27 +533,27 @@ const me = (n) => {
510
533
  icon: c,
511
534
  isSelected: m,
512
535
  isDisabled: l,
513
- onClick: d,
514
- label: p,
515
- variant: g,
536
+ onClick: u,
537
+ label: g,
538
+ variant: p,
516
539
  ...k
517
540
  } = n;
518
- return i(k, !1), /* @__PURE__ */ h(F, { children: [
541
+ return i(k, !1), /* @__PURE__ */ h(D, { children: [
519
542
  /* @__PURE__ */ r(
520
543
  R,
521
544
  {
522
545
  render: /* @__PURE__ */ h(
523
- D,
546
+ E,
524
547
  {
525
- "aria-label": p,
548
+ "aria-label": g,
526
549
  className: b(
527
550
  "bn-ak-button bn-ak-secondary",
528
551
  a || ""
529
552
  ),
530
553
  onMouseDown: (v) => {
531
- $() && v.currentTarget.focus();
554
+ O() && v.currentTarget.focus();
532
555
  },
533
- onClick: d,
556
+ onClick: u,
534
557
  "aria-pressed": m,
535
558
  "data-selected": m ? "true" : void 0,
536
559
  disabled: l || !1,
@@ -544,51 +567,51 @@ const me = (n) => {
544
567
  )
545
568
  }
546
569
  ),
547
- /* @__PURE__ */ h(E, { className: "bn-ak-tooltip", portal: !1, children: [
570
+ /* @__PURE__ */ h(L, { className: "bn-ak-tooltip", portal: !1, children: [
548
571
  /* @__PURE__ */ r("span", { children: s }),
549
572
  o && /* @__PURE__ */ r("span", { children: o })
550
573
  ] })
551
574
  ] });
552
575
  }
553
- ), M = u((n, t) => {
576
+ ), M = d((n, t) => {
554
577
  const { className: a, items: e, isDisabled: s, ...o } = n;
555
578
  i(o);
556
579
  const c = n.items.filter((l) => l.isSelected)[0], m = (l) => {
557
- var d, p;
558
- (p = (d = e.find((g) => g.text === l)).onClick) == null || p.call(d);
580
+ var u, g;
581
+ (g = (u = e.find((p) => p.text === l)).onClick) == null || g.call(u);
559
582
  };
560
- return /* @__PURE__ */ h(re, { value: c.text, setValue: m, children: [
583
+ return /* @__PURE__ */ h(ce, { value: c.text, setValue: m, children: [
561
584
  /* @__PURE__ */ h(
562
- oe,
585
+ ie,
563
586
  {
564
587
  className: "bn-ak-button bn-ak-secondary",
565
588
  disabled: s,
566
589
  "aria-label": "Text alignment",
567
- render: /* @__PURE__ */ r(D, {}),
590
+ render: /* @__PURE__ */ r(E, {}),
568
591
  children: [
569
592
  c.icon,
570
593
  " ",
571
594
  c.text,
572
595
  " ",
573
- /* @__PURE__ */ r(le, {})
596
+ /* @__PURE__ */ r(ue, {})
574
597
  ]
575
598
  }
576
599
  ),
577
600
  /* @__PURE__ */ r(
578
- ce,
601
+ de,
579
602
  {
580
603
  className: b("bn-ak-popover", a || ""),
581
604
  ref: t,
582
605
  gutter: 4,
583
606
  children: e.map((l) => /* @__PURE__ */ h(
584
- ie,
607
+ me,
585
608
  {
586
609
  className: "bn-ak-select-item",
587
610
  value: l.text,
588
611
  children: [
589
612
  l.icon,
590
613
  l.text,
591
- l.text === c.text && /* @__PURE__ */ r(ue, {})
614
+ l.text === c.text && /* @__PURE__ */ r(be, {})
592
615
  ]
593
616
  },
594
617
  l.text
@@ -596,7 +619,7 @@ const me = (n) => {
596
619
  }
597
620
  )
598
621
  ] });
599
- }), je = u((n, t) => {
622
+ }), Qe = d((n, t) => {
600
623
  const {
601
624
  className: a,
602
625
  children: e,
@@ -605,9 +628,9 @@ const me = (n) => {
605
628
  onFocus: c,
606
629
  onBlur: m,
607
630
  tabIndex: l,
608
- ...d
631
+ ...u
609
632
  } = n;
610
- return i(d, !1), /* @__PURE__ */ h(
633
+ return i(u, !1), /* @__PURE__ */ h(
611
634
  N,
612
635
  {
613
636
  className: b(
@@ -625,7 +648,7 @@ const me = (n) => {
625
648
  ]
626
649
  }
627
650
  );
628
- }), qe = u((n, t) => {
651
+ }), ze = d((n, t) => {
629
652
  const { className: a, children: e, ...s } = n;
630
653
  return i(s, !1), /* @__PURE__ */ r(
631
654
  N,
@@ -635,7 +658,7 @@ const me = (n) => {
635
658
  children: e
636
659
  }
637
660
  );
638
- }), Ke = u((n, t) => {
661
+ }), Ue = d((n, t) => {
639
662
  const { className: a, children: e, ...s } = n;
640
663
  return i(s, !1), /* @__PURE__ */ r(
641
664
  f,
@@ -648,7 +671,7 @@ const me = (n) => {
648
671
  children: e
649
672
  }
650
673
  );
651
- }), ze = u((n, t) => {
674
+ }), We = d((n, t) => {
652
675
  const { authorInfo: a, timeString: e, edited: s, ...o } = n;
653
676
  return i(o, !1), a === "loading" ? /* @__PURE__ */ h(N, { className: "bn-ak-author-info", children: [
654
677
  /* @__PURE__ */ r("div", { className: "bn-ak-avatar bn-ak-skeleton" }),
@@ -671,7 +694,7 @@ const me = (n) => {
671
694
  ] })
672
695
  ] })
673
696
  ] });
674
- }), Ue = u((n, t) => {
697
+ }), Ze = d((n, t) => {
675
698
  const {
676
699
  className: a,
677
700
  showActions: e,
@@ -680,19 +703,19 @@ const me = (n) => {
680
703
  actions: c,
681
704
  children: m,
682
705
  edited: l,
683
- ...d
706
+ ...u
684
707
  } = n;
685
- i(d, !1);
686
- const [p, g] = de(!1), { focused: k, ref: v } = V();
708
+ i(u, !1);
709
+ const [g, p] = he(!1), { focused: k, ref: v } = H();
687
710
  return /* @__PURE__ */ h(
688
711
  N,
689
712
  {
690
713
  ref: t,
691
714
  className: a,
692
- onMouseEnter: () => g(!0),
693
- onMouseLeave: () => g(!1),
715
+ onMouseEnter: () => p(!0),
716
+ onMouseLeave: () => p(!1),
694
717
  children: [
695
- c && (e === !0 || e === void 0 || e === "hover" && p || k) ? /* @__PURE__ */ r(
718
+ c && (e === !0 || e === void 0 || e === "hover" && g || k) ? /* @__PURE__ */ r(
696
719
  N,
697
720
  {
698
721
  ref: v,
@@ -705,15 +728,15 @@ const me = (n) => {
705
728
  children: c
706
729
  }
707
730
  ) : null,
708
- /* @__PURE__ */ r(ze, { ...n }),
731
+ /* @__PURE__ */ r(We, { ...n }),
709
732
  m
710
733
  ]
711
734
  }
712
735
  );
713
- }), We = u((n, t) => {
736
+ }), _e = d((n, t) => {
714
737
  const { className: a, onFocus: e, onBlur: s, autoFocus: o, editor: c, editable: m, ...l } = n;
715
738
  return i(l, !1), /* @__PURE__ */ r(
716
- Ye,
739
+ nn,
717
740
  {
718
741
  autoFocus: o,
719
742
  className: a,
@@ -728,19 +751,19 @@ const me = (n) => {
728
751
  onFocus: e,
729
752
  onBlur: s,
730
753
  children: /* @__PURE__ */ r(
731
- O,
754
+ j,
732
755
  {
733
- formattingToolbar: _e
756
+ formattingToolbar: Je
734
757
  }
735
758
  )
736
759
  }
737
760
  );
738
- }), _e = () => {
739
- const n = H([]).filter(
761
+ }), Je = () => {
762
+ const n = K([]).filter(
740
763
  (t) => t.key !== "nestBlockButton" && t.key !== "unnestBlockButton"
741
764
  );
742
- return /* @__PURE__ */ r(j, { blockTypeSelectItems: [], children: n });
743
- }, Je = u((n, t) => {
765
+ return /* @__PURE__ */ r(Q, { blockTypeSelectItems: [], children: n });
766
+ }, Xe = d((n, t) => {
744
767
  const {
745
768
  className: a,
746
769
  text: e,
@@ -749,11 +772,11 @@ const me = (n) => {
749
772
  mainTooltip: c,
750
773
  secondaryTooltip: m,
751
774
  onClick: l,
752
- onMouseEnter: d,
753
- ...p
775
+ onMouseEnter: u,
776
+ ...g
754
777
  } = n;
755
- i(p, !1);
756
- const g = /* @__PURE__ */ h(
778
+ i(g, !1);
779
+ const p = /* @__PURE__ */ h(
757
780
  f,
758
781
  {
759
782
  className: b(
@@ -763,7 +786,7 @@ const me = (n) => {
763
786
  ),
764
787
  "aria-selected": o === !0,
765
788
  onClick: (k) => l == null ? void 0 : l(k),
766
- onMouseEnter: d,
789
+ onMouseEnter: u,
767
790
  ref: t,
768
791
  children: [
769
792
  /* @__PURE__ */ r("span", { children: s }),
@@ -771,14 +794,14 @@ const me = (n) => {
771
794
  ]
772
795
  }
773
796
  );
774
- return c ? /* @__PURE__ */ h(F, { children: [
775
- /* @__PURE__ */ r(R, { render: g }),
776
- /* @__PURE__ */ h(E, { className: "bn-ak-tooltip", portal: !1, children: [
797
+ return c ? /* @__PURE__ */ h(D, { children: [
798
+ /* @__PURE__ */ r(R, { render: p }),
799
+ /* @__PURE__ */ h(L, { className: "bn-ak-tooltip", portal: !1, children: [
777
800
  /* @__PURE__ */ r("span", { children: c }),
778
801
  m && /* @__PURE__ */ r("span", { children: m })
779
802
  ] })
780
- ] }) : g;
781
- }), Qe = u((n, t) => {
803
+ ] }) : p;
804
+ }), Ye = d((n, t) => {
782
805
  const { className: a, children: e, ...s } = n;
783
806
  return i(s), /* @__PURE__ */ r(
784
807
  N,
@@ -788,85 +811,85 @@ const me = (n) => {
788
811
  children: e
789
812
  }
790
813
  );
791
- }), Xe = {
814
+ }), en = {
792
815
  FormattingToolbar: {
793
- Root: S,
794
- Button: T,
816
+ Root: T,
817
+ Button: S,
795
818
  Select: M
796
819
  },
797
820
  FilePanel: {
798
- Root: Se,
799
- Button: Te,
800
- FileInput: Me,
801
- TabPanel: Ie,
802
- TextInput: ye
821
+ Root: Ie,
822
+ Button: we,
823
+ FileInput: Ce,
824
+ TabPanel: ye,
825
+ TextInput: xe
803
826
  },
804
827
  GridSuggestionMenu: {
805
- Root: Fe,
806
- Item: De,
807
- EmptyItem: Re,
808
- Loader: Ee
828
+ Root: Ee,
829
+ Item: qe,
830
+ EmptyItem: Le,
831
+ Loader: Ge
809
832
  },
810
833
  LinkToolbar: {
811
- Root: S,
812
- Button: T,
834
+ Root: T,
835
+ Button: S,
813
836
  Select: M
814
837
  },
815
838
  SideMenu: {
816
- Root: Be,
817
- Button: we
839
+ Root: De,
840
+ Button: Re
818
841
  },
819
842
  SuggestionMenu: {
820
- Root: Le,
821
- Item: Ae,
822
- EmptyItem: Ge,
823
- Label: $e,
824
- Loader: Ve
843
+ Root: Ae,
844
+ Item: Ve,
845
+ EmptyItem: $e,
846
+ Label: Oe,
847
+ Loader: He
825
848
  },
826
849
  TableHandle: {
827
- Root: He,
828
- ExtendButton: Oe
850
+ Root: Ke,
851
+ ExtendButton: je
829
852
  },
830
853
  Comments: {
831
- Comment: Ue,
832
- Editor: We,
833
- Card: je,
834
- CardSection: qe,
835
- ExpandSectionsPrompt: Ke
854
+ Comment: Ze,
855
+ Editor: _e,
856
+ Card: Qe,
857
+ CardSection: ze,
858
+ ExpandSectionsPrompt: Ue
836
859
  },
837
860
  Generic: {
838
861
  Badge: {
839
- Root: Je,
840
- Group: Qe
862
+ Root: Xe,
863
+ Group: Ye
841
864
  },
842
865
  Toolbar: {
843
- Root: S,
844
- Button: T,
866
+ Root: T,
867
+ Button: S,
845
868
  Select: M
846
869
  },
847
870
  Form: {
848
- Root: me,
849
- TextInput: be
871
+ Root: ge,
872
+ TextInput: pe
850
873
  },
851
874
  Menu: {
852
- Root: he,
853
- Trigger: ke,
854
- Dropdown: pe,
855
- Divider: fe,
856
- Label: Ne,
857
- Item: ge,
858
- Button: ve
875
+ Root: Ne,
876
+ Trigger: Te,
877
+ Dropdown: ke,
878
+ Divider: Se,
879
+ Label: ve,
880
+ Item: fe,
881
+ Button: Me
859
882
  },
860
883
  Popover: {
861
- Root: Pe,
862
- Trigger: Ce,
863
- Content: xe
884
+ Root: Fe,
885
+ Trigger: Be,
886
+ Content: Pe
864
887
  }
865
888
  }
866
- }, Ye = (n) => {
889
+ }, nn = (n) => {
867
890
  const { className: t, ...a } = n;
868
- return /* @__PURE__ */ r(q.Provider, { value: Xe, children: /* @__PURE__ */ r(
869
- K,
891
+ return /* @__PURE__ */ r(z.Provider, { value: en, children: /* @__PURE__ */ r(
892
+ U,
870
893
  {
871
894
  className: b("bn-ariakit", t || ""),
872
895
  ...a
@@ -874,7 +897,7 @@ const me = (n) => {
874
897
  ) });
875
898
  };
876
899
  export {
877
- Ye as BlockNoteView,
878
- Xe as components
900
+ nn as BlockNoteView,
901
+ en as components
879
902
  };
880
903
  //# sourceMappingURL=blocknote-ariakit.js.map