@blocknote/ariakit 0.30.1 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocknote-ariakit.cjs +1 -1
- package/dist/blocknote-ariakit.cjs.map +1 -1
- package/dist/blocknote-ariakit.js +224 -201
- package/dist/blocknote-ariakit.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +4 -4
- package/src/input/TextInput.tsx +12 -1
- package/src/style.css +84 -1
- package/src/suggestionMenu/SuggestionMenuItem.tsx +2 -1
- package/src/suggestionMenu/SuggestionMenuLoader.tsx +11 -2
- package/src/toolbar/Toolbar.tsx +1 -2
- package/src/toolbar/ToolbarButton.tsx +1 -2
- package/types/src/input/TextInput.d.ts +5 -1
- package/types/src/suggestionMenu/SuggestionMenuItem.d.ts +1 -1
- package/types/src/suggestionMenu/SuggestionMenuLoader.d.ts +0 -1
|
@@ -1,46 +1,57 @@
|
|
|
1
|
-
import { jsx as r, jsxs as h, Fragment as
|
|
2
|
-
import { assertEmpty as i, mergeCSSClasses as b, isSafari as
|
|
3
|
-
import { elementOverflow as
|
|
4
|
-
import { FormProvider as I, FormLabel as
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
const
|
|
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
|
-
},
|
|
9
|
+
}, pe = d((n, t) => {
|
|
10
10
|
const {
|
|
11
11
|
className: a,
|
|
12
12
|
name: e,
|
|
13
13
|
label: s,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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(
|
|
24
|
-
n.label && /* @__PURE__ */ r(
|
|
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
|
-
|
|
30
|
+
c,
|
|
27
31
|
/* @__PURE__ */ r(
|
|
28
|
-
|
|
32
|
+
w,
|
|
29
33
|
{
|
|
30
|
-
className: b(
|
|
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:
|
|
34
|
-
autoFocus:
|
|
35
|
-
placeholder:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
}),
|
|
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
|
-
|
|
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
|
-
},
|
|
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
|
-
|
|
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
|
-
}),
|
|
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
|
-
|
|
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(
|
|
91
|
-
o !== void 0 && /* @__PURE__ */ r(
|
|
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(
|
|
114
|
+
o !== void 0 && /* @__PURE__ */ r(y, { checked: o })
|
|
104
115
|
]
|
|
105
116
|
}
|
|
106
117
|
);
|
|
107
|
-
}),
|
|
118
|
+
}), ve = d((n, t) => {
|
|
108
119
|
const { className: a, children: e, ...s } = n;
|
|
109
120
|
return i(s), /* @__PURE__ */ r(
|
|
110
|
-
|
|
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
|
-
}),
|
|
128
|
+
}), Te = (n) => {
|
|
118
129
|
const { children: t, sub: a, ...e } = n;
|
|
119
|
-
return i(e), a ? t : /* @__PURE__ */ r(
|
|
120
|
-
},
|
|
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
|
-
}),
|
|
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:
|
|
139
|
-
...
|
|
149
|
+
draggable: u,
|
|
150
|
+
...g
|
|
140
151
|
} = n;
|
|
141
|
-
return i(
|
|
152
|
+
return i(g, !1), /* @__PURE__ */ h(
|
|
142
153
|
f,
|
|
143
154
|
{
|
|
144
155
|
onDragEnd: m,
|
|
145
156
|
onDragStart: l,
|
|
146
|
-
draggable:
|
|
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
|
-
...
|
|
165
|
+
...g,
|
|
155
166
|
children: [
|
|
156
167
|
s,
|
|
157
168
|
e
|
|
158
169
|
]
|
|
159
170
|
}
|
|
160
171
|
);
|
|
161
|
-
}),
|
|
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
|
-
|
|
189
|
+
ee,
|
|
179
190
|
{
|
|
180
191
|
defaultSelectedId: s,
|
|
181
192
|
selectedId: o,
|
|
182
|
-
setActiveId: (
|
|
183
|
-
|
|
193
|
+
setActiveId: (u) => {
|
|
194
|
+
u && c(u);
|
|
184
195
|
},
|
|
185
196
|
children: [
|
|
186
|
-
/* @__PURE__ */ r(
|
|
187
|
-
/* @__PURE__ */ r("div", { className: "bn-ak-panels", children: e.map((
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
|
|
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
|
-
}),
|
|
249
|
+
}), Be = d((n, t) => {
|
|
239
250
|
const { children: a, ...e } = n;
|
|
240
|
-
return i(e), /* @__PURE__ */ r(
|
|
241
|
-
}),
|
|
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
|
-
|
|
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
|
-
}),
|
|
266
|
+
}), Fe = (n) => {
|
|
256
267
|
const { children: t, opened: a, position: e, ...s } = n;
|
|
257
|
-
return i(s), /* @__PURE__ */ r(
|
|
258
|
-
},
|
|
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
|
-
}),
|
|
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:
|
|
271
|
-
...
|
|
281
|
+
draggable: u,
|
|
282
|
+
...g
|
|
272
283
|
} = n;
|
|
273
|
-
return i(
|
|
284
|
+
return i(g, !1), /* @__PURE__ */ h(
|
|
274
285
|
f,
|
|
275
286
|
{
|
|
276
287
|
onDragEnd: m,
|
|
277
288
|
onDragStart: l,
|
|
278
|
-
draggable:
|
|
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
|
-
...
|
|
297
|
+
...g,
|
|
287
298
|
children: [
|
|
288
299
|
s,
|
|
289
300
|
e
|
|
290
301
|
]
|
|
291
302
|
}
|
|
292
303
|
);
|
|
293
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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 =
|
|
331
|
+
const l = q(null);
|
|
321
332
|
return G(() => {
|
|
322
333
|
if (!l.current || !e)
|
|
323
334
|
return;
|
|
324
|
-
const
|
|
335
|
+
const u = B(
|
|
325
336
|
l.current,
|
|
326
337
|
document.querySelector(".bn-grid-suggestion-menu")
|
|
327
338
|
);
|
|
328
|
-
|
|
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:
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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 =
|
|
394
|
+
const l = q(null);
|
|
384
395
|
return G(() => {
|
|
385
396
|
if (!l.current || !s)
|
|
386
397
|
return;
|
|
387
|
-
const
|
|
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
|
-
|
|
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:
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
436
|
-
const { className: a,
|
|
437
|
-
return i(
|
|
438
|
-
|
|
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
|
-
}),
|
|
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
|
-
...
|
|
486
|
+
...u
|
|
464
487
|
} = n;
|
|
465
|
-
return i(
|
|
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
|
-
...
|
|
501
|
+
...u,
|
|
479
502
|
children: e
|
|
480
503
|
}
|
|
481
504
|
);
|
|
482
|
-
}),
|
|
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
|
-
|
|
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
|
-
),
|
|
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:
|
|
514
|
-
label:
|
|
515
|
-
variant:
|
|
536
|
+
onClick: u,
|
|
537
|
+
label: g,
|
|
538
|
+
variant: p,
|
|
516
539
|
...k
|
|
517
540
|
} = n;
|
|
518
|
-
return i(k, !1), /* @__PURE__ */ h(
|
|
541
|
+
return i(k, !1), /* @__PURE__ */ h(D, { children: [
|
|
519
542
|
/* @__PURE__ */ r(
|
|
520
543
|
R,
|
|
521
544
|
{
|
|
522
545
|
render: /* @__PURE__ */ h(
|
|
523
|
-
|
|
546
|
+
E,
|
|
524
547
|
{
|
|
525
|
-
"aria-label":
|
|
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
|
-
|
|
554
|
+
O() && v.currentTarget.focus();
|
|
532
555
|
},
|
|
533
|
-
onClick:
|
|
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(
|
|
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 =
|
|
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
|
|
558
|
-
(
|
|
580
|
+
var u, g;
|
|
581
|
+
(g = (u = e.find((p) => p.text === l)).onClick) == null || g.call(u);
|
|
559
582
|
};
|
|
560
|
-
return /* @__PURE__ */ h(
|
|
583
|
+
return /* @__PURE__ */ h(ce, { value: c.text, setValue: m, children: [
|
|
561
584
|
/* @__PURE__ */ h(
|
|
562
|
-
|
|
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(
|
|
590
|
+
render: /* @__PURE__ */ r(E, {}),
|
|
568
591
|
children: [
|
|
569
592
|
c.icon,
|
|
570
593
|
" ",
|
|
571
594
|
c.text,
|
|
572
595
|
" ",
|
|
573
|
-
/* @__PURE__ */ r(
|
|
596
|
+
/* @__PURE__ */ r(ue, {})
|
|
574
597
|
]
|
|
575
598
|
}
|
|
576
599
|
),
|
|
577
600
|
/* @__PURE__ */ r(
|
|
578
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
}),
|
|
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
|
-
...
|
|
631
|
+
...u
|
|
609
632
|
} = n;
|
|
610
|
-
return i(
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
...
|
|
706
|
+
...u
|
|
684
707
|
} = n;
|
|
685
|
-
i(
|
|
686
|
-
const [
|
|
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: () =>
|
|
693
|
-
onMouseLeave: () =>
|
|
715
|
+
onMouseEnter: () => p(!0),
|
|
716
|
+
onMouseLeave: () => p(!1),
|
|
694
717
|
children: [
|
|
695
|
-
c && (e === !0 || e === void 0 || e === "hover" &&
|
|
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(
|
|
731
|
+
/* @__PURE__ */ r(We, { ...n }),
|
|
709
732
|
m
|
|
710
733
|
]
|
|
711
734
|
}
|
|
712
735
|
);
|
|
713
|
-
}),
|
|
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
|
-
|
|
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
|
-
|
|
754
|
+
j,
|
|
732
755
|
{
|
|
733
|
-
formattingToolbar:
|
|
756
|
+
formattingToolbar: Je
|
|
734
757
|
}
|
|
735
758
|
)
|
|
736
759
|
}
|
|
737
760
|
);
|
|
738
|
-
}),
|
|
739
|
-
const n =
|
|
761
|
+
}), Je = () => {
|
|
762
|
+
const n = K([]).filter(
|
|
740
763
|
(t) => t.key !== "nestBlockButton" && t.key !== "unnestBlockButton"
|
|
741
764
|
);
|
|
742
|
-
return /* @__PURE__ */ r(
|
|
743
|
-
},
|
|
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:
|
|
753
|
-
...
|
|
775
|
+
onMouseEnter: u,
|
|
776
|
+
...g
|
|
754
777
|
} = n;
|
|
755
|
-
i(
|
|
756
|
-
const
|
|
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:
|
|
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(
|
|
775
|
-
/* @__PURE__ */ r(R, { render:
|
|
776
|
-
/* @__PURE__ */ h(
|
|
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
|
-
] }) :
|
|
781
|
-
}),
|
|
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
|
-
}),
|
|
814
|
+
}), en = {
|
|
792
815
|
FormattingToolbar: {
|
|
793
|
-
Root:
|
|
794
|
-
Button:
|
|
816
|
+
Root: T,
|
|
817
|
+
Button: S,
|
|
795
818
|
Select: M
|
|
796
819
|
},
|
|
797
820
|
FilePanel: {
|
|
798
|
-
Root:
|
|
799
|
-
Button:
|
|
800
|
-
FileInput:
|
|
801
|
-
TabPanel:
|
|
802
|
-
TextInput:
|
|
821
|
+
Root: Ie,
|
|
822
|
+
Button: we,
|
|
823
|
+
FileInput: Ce,
|
|
824
|
+
TabPanel: ye,
|
|
825
|
+
TextInput: xe
|
|
803
826
|
},
|
|
804
827
|
GridSuggestionMenu: {
|
|
805
|
-
Root:
|
|
806
|
-
Item:
|
|
807
|
-
EmptyItem:
|
|
808
|
-
Loader:
|
|
828
|
+
Root: Ee,
|
|
829
|
+
Item: qe,
|
|
830
|
+
EmptyItem: Le,
|
|
831
|
+
Loader: Ge
|
|
809
832
|
},
|
|
810
833
|
LinkToolbar: {
|
|
811
|
-
Root:
|
|
812
|
-
Button:
|
|
834
|
+
Root: T,
|
|
835
|
+
Button: S,
|
|
813
836
|
Select: M
|
|
814
837
|
},
|
|
815
838
|
SideMenu: {
|
|
816
|
-
Root:
|
|
817
|
-
Button:
|
|
839
|
+
Root: De,
|
|
840
|
+
Button: Re
|
|
818
841
|
},
|
|
819
842
|
SuggestionMenu: {
|
|
820
|
-
Root:
|
|
821
|
-
Item:
|
|
822
|
-
EmptyItem:
|
|
823
|
-
Label:
|
|
824
|
-
Loader:
|
|
843
|
+
Root: Ae,
|
|
844
|
+
Item: Ve,
|
|
845
|
+
EmptyItem: $e,
|
|
846
|
+
Label: Oe,
|
|
847
|
+
Loader: He
|
|
825
848
|
},
|
|
826
849
|
TableHandle: {
|
|
827
|
-
Root:
|
|
828
|
-
ExtendButton:
|
|
850
|
+
Root: Ke,
|
|
851
|
+
ExtendButton: je
|
|
829
852
|
},
|
|
830
853
|
Comments: {
|
|
831
|
-
Comment:
|
|
832
|
-
Editor:
|
|
833
|
-
Card:
|
|
834
|
-
CardSection:
|
|
835
|
-
ExpandSectionsPrompt:
|
|
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:
|
|
840
|
-
Group:
|
|
862
|
+
Root: Xe,
|
|
863
|
+
Group: Ye
|
|
841
864
|
},
|
|
842
865
|
Toolbar: {
|
|
843
|
-
Root:
|
|
844
|
-
Button:
|
|
866
|
+
Root: T,
|
|
867
|
+
Button: S,
|
|
845
868
|
Select: M
|
|
846
869
|
},
|
|
847
870
|
Form: {
|
|
848
|
-
Root:
|
|
849
|
-
TextInput:
|
|
871
|
+
Root: ge,
|
|
872
|
+
TextInput: pe
|
|
850
873
|
},
|
|
851
874
|
Menu: {
|
|
852
|
-
Root:
|
|
853
|
-
Trigger:
|
|
854
|
-
Dropdown:
|
|
855
|
-
Divider:
|
|
856
|
-
Label:
|
|
857
|
-
Item:
|
|
858
|
-
Button:
|
|
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:
|
|
862
|
-
Trigger:
|
|
863
|
-
Content:
|
|
884
|
+
Root: Fe,
|
|
885
|
+
Trigger: Be,
|
|
886
|
+
Content: Pe
|
|
864
887
|
}
|
|
865
888
|
}
|
|
866
|
-
},
|
|
889
|
+
}, nn = (n) => {
|
|
867
890
|
const { className: t, ...a } = n;
|
|
868
|
-
return /* @__PURE__ */ r(
|
|
869
|
-
|
|
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
|
-
|
|
878
|
-
|
|
900
|
+
nn as BlockNoteView,
|
|
901
|
+
en as components
|
|
879
902
|
};
|
|
880
903
|
//# sourceMappingURL=blocknote-ariakit.js.map
|