@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.
- package/dist/blocknote-mantine.cjs +1 -1
- package/dist/blocknote-mantine.cjs.map +1 -1
- package/dist/blocknote-mantine.js +416 -368
- package/dist/blocknote-mantine.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +4 -4
- package/src/comments/Card.tsx +56 -7
- package/src/comments/Comment.tsx +7 -3
- package/src/comments/Editor.tsx +3 -2
- package/src/components.tsx +4 -1
- package/src/style.css +35 -13
- package/types/src/comments/Card.d.ts +9 -0
- package/types/src/comments/Comment.d.ts +1 -0
- package/types/src/comments/Editor.d.ts +1 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { assertEmpty as d, isSafari as
|
|
3
|
-
import { mergeRefs as
|
|
4
|
-
import { Button as
|
|
5
|
-
import
|
|
6
|
-
import { useHover as
|
|
7
|
-
const
|
|
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,
|
|
10
|
-
for (const
|
|
11
|
-
const u =
|
|
12
|
-
typeof i[
|
|
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
|
-
},
|
|
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
|
-
},
|
|
87
|
-
/* @__PURE__ */ s(
|
|
88
|
-
e.secondaryTooltip && /* @__PURE__ */ s(
|
|
89
|
-
] }),
|
|
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:
|
|
97
|
-
isSelected:
|
|
96
|
+
icon: l,
|
|
97
|
+
isSelected: a,
|
|
98
98
|
isDisabled: u,
|
|
99
99
|
onClick: c,
|
|
100
100
|
label: g,
|
|
101
|
-
variant:
|
|
101
|
+
variant: h,
|
|
102
102
|
...p
|
|
103
103
|
} = e;
|
|
104
104
|
d(p, !1);
|
|
105
|
-
const [
|
|
106
|
-
|
|
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
|
-
|
|
111
|
+
B() && C.currentTarget.focus();
|
|
112
112
|
},
|
|
113
113
|
onClick: (C) => {
|
|
114
|
-
|
|
114
|
+
y(!0), c == null || c(C);
|
|
115
115
|
},
|
|
116
|
-
onPointerLeave: () =>
|
|
117
|
-
"aria-pressed":
|
|
118
|
-
"data-selected":
|
|
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:
|
|
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
|
-
|
|
127
|
+
z,
|
|
128
128
|
{
|
|
129
129
|
className: t,
|
|
130
130
|
"aria-label": g,
|
|
131
131
|
onMouseDown: (C) => {
|
|
132
|
-
|
|
132
|
+
B() && C.currentTarget.focus();
|
|
133
133
|
},
|
|
134
134
|
onClick: (C) => {
|
|
135
|
-
|
|
135
|
+
y(!0), c == null || c(C);
|
|
136
136
|
},
|
|
137
|
-
onPointerLeave: () =>
|
|
138
|
-
"aria-pressed":
|
|
139
|
-
"data-selected":
|
|
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:
|
|
141
|
+
size: h === "compact" ? 20 : 30,
|
|
142
142
|
disabled: u || !1,
|
|
143
143
|
ref: n,
|
|
144
144
|
...p,
|
|
145
|
-
children:
|
|
145
|
+
children: l
|
|
146
146
|
}
|
|
147
147
|
);
|
|
148
148
|
return r ? /* @__PURE__ */ s(
|
|
149
|
-
|
|
149
|
+
Z,
|
|
150
150
|
{
|
|
151
|
-
disabled:
|
|
151
|
+
disabled: N,
|
|
152
152
|
withinPortal: !1,
|
|
153
153
|
label: /* @__PURE__ */ s(
|
|
154
|
-
|
|
154
|
+
ne,
|
|
155
155
|
{
|
|
156
156
|
mainTooltip: r,
|
|
157
157
|
secondaryTooltip: i
|
|
158
158
|
}
|
|
159
159
|
),
|
|
160
|
-
children:
|
|
160
|
+
children: R
|
|
161
161
|
}
|
|
162
|
-
) :
|
|
162
|
+
) : R;
|
|
163
163
|
}
|
|
164
|
-
),
|
|
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:
|
|
171
|
-
secondaryTooltip:
|
|
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 [
|
|
178
|
-
|
|
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: (
|
|
186
|
-
p(!0), u == null || u(
|
|
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 !
|
|
199
|
-
|
|
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
|
-
|
|
204
|
+
ne,
|
|
205
205
|
{
|
|
206
|
-
mainTooltip:
|
|
207
|
-
secondaryTooltip:
|
|
206
|
+
mainTooltip: l,
|
|
207
|
+
secondaryTooltip: a
|
|
208
208
|
}
|
|
209
209
|
),
|
|
210
|
-
children:
|
|
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
|
|
215
|
+
return d(r), /* @__PURE__ */ s(b, { className: t, ref: n, children: o });
|
|
222
216
|
}), Be = m((e, n) => {
|
|
223
|
-
const {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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
|
-
|
|
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__ */
|
|
278
|
+
/* @__PURE__ */ v(x, { fz: "sm", fw: "bold", children: [
|
|
239
279
|
t.username,
|
|
240
|
-
/* @__PURE__ */
|
|
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
|
-
}),
|
|
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:
|
|
251
|
-
...
|
|
252
|
-
} = e, { hovered:
|
|
253
|
-
return d(
|
|
254
|
-
a && (o === !0 || o === void 0 || o === "hover" &&
|
|
255
|
-
|
|
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:
|
|
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(
|
|
268
|
-
|
|
312
|
+
/* @__PURE__ */ s(je, { ...e }),
|
|
313
|
+
u
|
|
269
314
|
] });
|
|
270
|
-
}),
|
|
271
|
-
const { className: t,
|
|
272
|
-
return d(
|
|
273
|
-
|
|
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:
|
|
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:
|
|
286
|
-
onBlur:
|
|
330
|
+
onFocus: r,
|
|
331
|
+
onBlur: i,
|
|
287
332
|
children: /* @__PURE__ */ s(
|
|
288
|
-
|
|
333
|
+
ce,
|
|
289
334
|
{
|
|
290
|
-
formattingToolbar:
|
|
335
|
+
formattingToolbar: _e
|
|
291
336
|
}
|
|
292
337
|
)
|
|
293
338
|
}
|
|
294
339
|
);
|
|
295
|
-
}),
|
|
296
|
-
const e =
|
|
340
|
+
}), _e = () => {
|
|
341
|
+
const e = ue([]).filter(
|
|
297
342
|
(n) => n.key !== "nestBlockButton" && n.key !== "unnestBlockButton"
|
|
298
343
|
);
|
|
299
|
-
return /* @__PURE__ */ s(
|
|
300
|
-
},
|
|
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:
|
|
307
|
-
autoFocus:
|
|
351
|
+
value: l,
|
|
352
|
+
autoFocus: a,
|
|
308
353
|
placeholder: u,
|
|
309
354
|
onKeyDown: c,
|
|
310
355
|
onChange: g,
|
|
311
|
-
onSubmit:
|
|
356
|
+
onSubmit: h,
|
|
312
357
|
...p
|
|
313
358
|
} = e;
|
|
314
359
|
return d(p), /* @__PURE__ */ s(
|
|
315
|
-
|
|
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:
|
|
324
|
-
autoFocus:
|
|
325
|
-
"data-autofocus":
|
|
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:
|
|
374
|
+
onSubmit: h
|
|
330
375
|
}
|
|
331
376
|
);
|
|
332
377
|
});
|
|
333
|
-
var
|
|
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
|
-
},
|
|
340
|
-
function
|
|
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 =
|
|
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
|
|
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
|
|
361
|
-
return
|
|
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
|
-
},
|
|
413
|
+
}, F.apply(this, arguments);
|
|
369
414
|
}
|
|
370
|
-
function
|
|
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
|
|
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 ?
|
|
384
|
-
|
|
385
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) :
|
|
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
|
|
392
|
-
return n =
|
|
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
|
|
395
|
-
var n =
|
|
439
|
+
function We(e) {
|
|
440
|
+
var n = qe(e, "string");
|
|
396
441
|
return typeof n == "symbol" ? n : n + "";
|
|
397
442
|
}
|
|
398
|
-
function
|
|
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
|
|
409
|
-
return e && e.map((n, t) => /* @__PURE__ */
|
|
453
|
+
function re(e) {
|
|
454
|
+
return e && e.map((n, t) => /* @__PURE__ */ w.createElement(n.tag, M({
|
|
410
455
|
key: t
|
|
411
|
-
}, n.attr),
|
|
456
|
+
}, n.attr), re(n.child)));
|
|
412
457
|
}
|
|
413
|
-
function
|
|
414
|
-
return (n) => /* @__PURE__ */
|
|
415
|
-
attr:
|
|
416
|
-
}, n),
|
|
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
|
|
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,
|
|
425
|
-
return t.className && (u = t.className), e.className && (u = (u ? u + " " : "") + e.className), /* @__PURE__ */
|
|
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,
|
|
474
|
+
}, t.attr, o, l, {
|
|
430
475
|
className: u,
|
|
431
|
-
style:
|
|
476
|
+
style: M(M({
|
|
432
477
|
color: e.color || t.color
|
|
433
478
|
}, t.style), e.style),
|
|
434
|
-
height:
|
|
435
|
-
width:
|
|
479
|
+
height: a,
|
|
480
|
+
width: a,
|
|
436
481
|
xmlns: "http://www.w3.org/2000/svg"
|
|
437
|
-
}), i && /* @__PURE__ */
|
|
482
|
+
}), i && /* @__PURE__ */ w.createElement("title", null, i), e.children);
|
|
438
483
|
};
|
|
439
|
-
return
|
|
484
|
+
return G !== void 0 ? /* @__PURE__ */ w.createElement(G.Consumer, null, (t) => n(t)) : n(oe);
|
|
440
485
|
}
|
|
441
|
-
function
|
|
442
|
-
return
|
|
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
|
|
445
|
-
return
|
|
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
|
|
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
|
-
...
|
|
499
|
+
...l
|
|
455
500
|
} = e;
|
|
456
|
-
d(
|
|
457
|
-
const [
|
|
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 =
|
|
506
|
+
}, []), p = E(() => {
|
|
462
507
|
g.current && clearTimeout(g.current), u(!0);
|
|
463
508
|
}, []);
|
|
464
509
|
return /* @__PURE__ */ s(
|
|
465
|
-
|
|
510
|
+
ie.Provider,
|
|
466
511
|
{
|
|
467
512
|
value: {
|
|
468
513
|
onMenuMouseOver: p,
|
|
469
|
-
onMenuMouseLeave:
|
|
514
|
+
onMenuMouseLeave: h
|
|
470
515
|
},
|
|
471
516
|
children: /* @__PURE__ */ s(
|
|
472
|
-
|
|
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:
|
|
522
|
+
onMouseLeave: h,
|
|
478
523
|
children: /* @__PURE__ */ s(
|
|
479
|
-
|
|
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:
|
|
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
|
-
}),
|
|
541
|
+
}), Ye = (e) => {
|
|
497
542
|
const { children: n, onOpenChange: t, position: o, sub: r, ...i } = e;
|
|
498
|
-
return d(i), r ? /* @__PURE__ */ s(
|
|
499
|
-
|
|
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
|
-
},
|
|
509
|
-
const { className: t, children: o, icon: r, checked: i, subTrigger:
|
|
510
|
-
return d(u, !1),
|
|
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(
|
|
565
|
+
/* @__PURE__ */ s(Qe, { size: 15 })
|
|
521
566
|
]
|
|
522
567
|
}
|
|
523
568
|
) : /* @__PURE__ */ s(
|
|
524
|
-
|
|
569
|
+
S.Item,
|
|
525
570
|
{
|
|
526
571
|
className: t,
|
|
527
572
|
ref: n,
|
|
528
573
|
leftSection: r,
|
|
529
|
-
rightSection: i ? /* @__PURE__ */ s(
|
|
530
|
-
onClick:
|
|
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
|
-
}),
|
|
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(
|
|
543
|
-
},
|
|
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
|
|
597
|
+
const l = Fe(ie);
|
|
553
598
|
return /* @__PURE__ */ s(
|
|
554
|
-
|
|
599
|
+
S.Dropdown,
|
|
555
600
|
{
|
|
556
601
|
className: t,
|
|
557
602
|
ref: n,
|
|
558
|
-
onMouseOver:
|
|
559
|
-
onMouseLeave:
|
|
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
|
-
}),
|
|
608
|
+
}), ot = m((e, n) => {
|
|
564
609
|
const { className: t, ...o } = e;
|
|
565
|
-
return d(o), /* @__PURE__ */ s(
|
|
566
|
-
}),
|
|
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(
|
|
569
|
-
}),
|
|
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:
|
|
576
|
-
onDragStart:
|
|
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
|
-
|
|
627
|
+
z,
|
|
583
628
|
{
|
|
584
629
|
size: 24,
|
|
585
630
|
className: t,
|
|
586
631
|
ref: n,
|
|
587
632
|
onClick: i,
|
|
588
|
-
onDragEnd:
|
|
589
|
-
onDragStart:
|
|
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
|
-
|
|
641
|
+
T,
|
|
597
642
|
{
|
|
598
643
|
className: t,
|
|
599
644
|
ref: n,
|
|
600
645
|
onClick: i,
|
|
601
|
-
onDragEnd:
|
|
602
|
-
onDragStart:
|
|
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
|
-
}),
|
|
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:
|
|
616
|
-
loading:
|
|
660
|
+
setOpenTab: l,
|
|
661
|
+
loading: a,
|
|
617
662
|
...u
|
|
618
663
|
} = e;
|
|
619
|
-
return d(u), /* @__PURE__ */ s(
|
|
620
|
-
|
|
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:
|
|
669
|
+
onChange: l,
|
|
625
670
|
children: [
|
|
626
|
-
|
|
627
|
-
/* @__PURE__ */ s(
|
|
628
|
-
|
|
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(
|
|
681
|
+
o.map((c) => /* @__PURE__ */ s(P.Panel, { value: c.name, children: c.tabPanel }, c.name))
|
|
637
682
|
]
|
|
638
683
|
}
|
|
639
684
|
) });
|
|
640
|
-
}),
|
|
641
|
-
const { className: t, children: o, onClick: r, label: i, ...
|
|
642
|
-
return d(
|
|
643
|
-
|
|
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
|
-
...
|
|
695
|
+
...l,
|
|
651
696
|
children: o
|
|
652
697
|
}
|
|
653
698
|
);
|
|
654
|
-
}),
|
|
655
|
-
const { className: t, accept: o, value: r, placeholder: i, onChange:
|
|
656
|
-
return d(
|
|
657
|
-
|
|
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:
|
|
666
|
-
...
|
|
710
|
+
onChange: l,
|
|
711
|
+
...a
|
|
667
712
|
}
|
|
668
713
|
);
|
|
669
|
-
}),
|
|
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
|
-
}),
|
|
673
|
-
const { className: t, value: o, placeholder: r, onKeyDown: i, onChange:
|
|
674
|
-
return d(
|
|
675
|
-
|
|
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:
|
|
729
|
+
onChange: l
|
|
685
730
|
}
|
|
686
731
|
);
|
|
687
|
-
}),
|
|
732
|
+
}), dt = (e) => {
|
|
688
733
|
const { opened: n, position: t, children: o, ...r } = e;
|
|
689
|
-
return d(r), /* @__PURE__ */ s(
|
|
690
|
-
},
|
|
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(
|
|
693
|
-
},
|
|
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(
|
|
702
|
-
}),
|
|
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
|
-
|
|
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
|
-
}),
|
|
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:
|
|
722
|
-
onDragStart:
|
|
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
|
-
|
|
773
|
+
z,
|
|
729
774
|
{
|
|
730
775
|
size: 24,
|
|
731
776
|
className: t,
|
|
732
777
|
ref: n,
|
|
733
778
|
onClick: i,
|
|
734
|
-
onDragEnd:
|
|
735
|
-
onDragStart:
|
|
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
|
-
|
|
787
|
+
T,
|
|
743
788
|
{
|
|
744
789
|
className: t,
|
|
745
790
|
ref: n,
|
|
746
791
|
onClick: i,
|
|
747
|
-
onDragEnd:
|
|
748
|
-
onDragStart:
|
|
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
|
-
}),
|
|
800
|
+
}), bt = m((e, n) => {
|
|
756
801
|
const { className: t, children: o, id: r, ...i } = e;
|
|
757
802
|
return d(i), /* @__PURE__ */ s(
|
|
758
|
-
|
|
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
|
-
}),
|
|
813
|
+
}), pt = m((e, n) => {
|
|
769
814
|
const { className: t, children: o, ...r } = e;
|
|
770
|
-
return d(r), /* @__PURE__ */ s(
|
|
771
|
-
}),
|
|
772
|
-
const { className: t, isSelected: o, onClick: r, item: i, id:
|
|
773
|
-
d(
|
|
774
|
-
const u =
|
|
775
|
-
return
|
|
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 =
|
|
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__ */
|
|
784
|
-
|
|
828
|
+
}, [o]), /* @__PURE__ */ v(
|
|
829
|
+
b,
|
|
785
830
|
{
|
|
786
831
|
gap: 0,
|
|
787
832
|
className: t,
|
|
788
833
|
ref: O(n, u),
|
|
789
|
-
id:
|
|
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
|
-
|
|
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__ */
|
|
803
|
-
/* @__PURE__ */ s(
|
|
804
|
-
/* @__PURE__ */ s(
|
|
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
|
-
|
|
852
|
+
b,
|
|
808
853
|
{
|
|
809
854
|
"data-position": "right",
|
|
810
855
|
className: "bn-mt-suggestion-menu-item-section",
|
|
811
|
-
children: /* @__PURE__ */ s(
|
|
856
|
+
children: /* @__PURE__ */ s(Te, { size: "xs", children: i.badge })
|
|
812
857
|
}
|
|
813
858
|
)
|
|
814
859
|
]
|
|
815
860
|
}
|
|
816
861
|
);
|
|
817
|
-
}),
|
|
862
|
+
}), St = m((e, n) => {
|
|
818
863
|
const { className: t, children: o, ...r } = e;
|
|
819
|
-
return d(r), /* @__PURE__ */ s(
|
|
820
|
-
}),
|
|
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(
|
|
828
|
-
}),
|
|
829
|
-
const { className: t, children: o, id: r, columns: i, ...
|
|
830
|
-
return d(
|
|
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
|
-
}),
|
|
886
|
+
}), Ct = m((e, n) => {
|
|
842
887
|
const { className: t, children: o, columns: r, ...i } = e;
|
|
843
888
|
return d(i), /* @__PURE__ */ s(
|
|
844
|
-
|
|
889
|
+
b,
|
|
845
890
|
{
|
|
846
891
|
className: t,
|
|
847
892
|
style: { gridColumn: `1 / ${r + 1}` },
|
|
848
893
|
ref: n,
|
|
849
|
-
children: /* @__PURE__ */ s(
|
|
894
|
+
children: /* @__PURE__ */ s(b, { className: "bn-mt-suggestion-menu-item-title", children: o })
|
|
850
895
|
}
|
|
851
896
|
);
|
|
852
|
-
}),
|
|
853
|
-
const { className: t, isSelected: o, onClick: r, item: i, id:
|
|
854
|
-
d(
|
|
855
|
-
const u =
|
|
856
|
-
return
|
|
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 =
|
|
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:
|
|
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
|
-
}),
|
|
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
|
-
|
|
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
|
-
}),
|
|
894
|
-
const { children: t, className: o, onMouseDown: r, onClick: i, ...
|
|
895
|
-
return d(
|
|
896
|
-
|
|
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
|
-
...
|
|
947
|
+
...l,
|
|
903
948
|
children: t
|
|
904
949
|
}
|
|
905
950
|
);
|
|
906
|
-
}),
|
|
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:
|
|
913
|
-
style:
|
|
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
|
-
|
|
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:
|
|
926
|
-
style:
|
|
970
|
+
onDragEnd: l,
|
|
971
|
+
style: a,
|
|
927
972
|
...c,
|
|
928
973
|
children: o
|
|
929
974
|
}
|
|
930
975
|
);
|
|
931
|
-
}),
|
|
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:
|
|
939
|
-
...
|
|
983
|
+
variant: l,
|
|
984
|
+
...a
|
|
940
985
|
} = e;
|
|
941
|
-
d(
|
|
942
|
-
const { ref: u, focused: c } =
|
|
986
|
+
d(a);
|
|
987
|
+
const { ref: u, focused: c } = ee(), g = Oe(c), h = O(n, u, g);
|
|
943
988
|
return /* @__PURE__ */ s(
|
|
944
|
-
|
|
989
|
+
Ne,
|
|
945
990
|
{
|
|
946
991
|
className: t,
|
|
947
|
-
ref:
|
|
992
|
+
ref: h,
|
|
948
993
|
role: "toolbar",
|
|
949
994
|
onMouseEnter: r,
|
|
950
995
|
onMouseLeave: i,
|
|
951
|
-
gap:
|
|
996
|
+
gap: l === "action-toolbar" ? 2 : void 0,
|
|
952
997
|
children: o
|
|
953
998
|
}
|
|
954
999
|
);
|
|
955
1000
|
}
|
|
956
|
-
),
|
|
1001
|
+
), L = m((e, n) => {
|
|
957
1002
|
const { className: t, items: o, isDisabled: r, ...i } = e;
|
|
958
1003
|
d(i);
|
|
959
|
-
const
|
|
960
|
-
return
|
|
961
|
-
|
|
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(
|
|
971
|
-
|
|
1015
|
+
/* @__PURE__ */ s(S.Target, { children: /* @__PURE__ */ s(
|
|
1016
|
+
T,
|
|
972
1017
|
{
|
|
973
|
-
onMouseDown: (
|
|
974
|
-
|
|
1018
|
+
onMouseDown: (a) => {
|
|
1019
|
+
B() && a.currentTarget.focus();
|
|
975
1020
|
},
|
|
976
|
-
leftSection:
|
|
977
|
-
rightSection: /* @__PURE__ */ s(
|
|
1021
|
+
leftSection: l.icon,
|
|
1022
|
+
rightSection: /* @__PURE__ */ s(Je, {}),
|
|
978
1023
|
size: "xs",
|
|
979
1024
|
variant: "subtle",
|
|
980
1025
|
disabled: r,
|
|
981
|
-
children:
|
|
1026
|
+
children: l.text
|
|
982
1027
|
}
|
|
983
1028
|
) }),
|
|
984
|
-
/* @__PURE__ */ s(
|
|
985
|
-
|
|
1029
|
+
/* @__PURE__ */ s(S.Dropdown, { className: t, ref: n, children: o.map((a) => /* @__PURE__ */ s(
|
|
1030
|
+
S.Item,
|
|
986
1031
|
{
|
|
987
|
-
onClick:
|
|
988
|
-
leftSection:
|
|
989
|
-
rightSection:
|
|
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:
|
|
994
|
-
children:
|
|
1038
|
+
disabled: a.isDisabled,
|
|
1039
|
+
children: a.text
|
|
995
1040
|
},
|
|
996
|
-
|
|
1041
|
+
a.text
|
|
997
1042
|
)) })
|
|
998
1043
|
]
|
|
999
1044
|
}
|
|
1000
1045
|
) : null;
|
|
1001
|
-
}),
|
|
1046
|
+
}), Pt = {
|
|
1002
1047
|
FormattingToolbar: {
|
|
1003
|
-
Root:
|
|
1004
|
-
Button:
|
|
1005
|
-
Select:
|
|
1048
|
+
Root: D,
|
|
1049
|
+
Button: I,
|
|
1050
|
+
Select: L
|
|
1006
1051
|
},
|
|
1007
1052
|
FilePanel: {
|
|
1008
|
-
Root:
|
|
1009
|
-
Button:
|
|
1010
|
-
FileInput:
|
|
1011
|
-
TabPanel:
|
|
1012
|
-
TextInput:
|
|
1053
|
+
Root: it,
|
|
1054
|
+
Button: at,
|
|
1055
|
+
FileInput: lt,
|
|
1056
|
+
TabPanel: ct,
|
|
1057
|
+
TextInput: ut
|
|
1013
1058
|
},
|
|
1014
1059
|
GridSuggestionMenu: {
|
|
1015
|
-
Root:
|
|
1016
|
-
Item:
|
|
1017
|
-
EmptyItem:
|
|
1018
|
-
Loader:
|
|
1060
|
+
Root: xt,
|
|
1061
|
+
Item: wt,
|
|
1062
|
+
EmptyItem: Ct,
|
|
1063
|
+
Loader: Tt
|
|
1019
1064
|
},
|
|
1020
1065
|
LinkToolbar: {
|
|
1021
|
-
Root:
|
|
1022
|
-
Button:
|
|
1066
|
+
Root: D,
|
|
1067
|
+
Button: I,
|
|
1068
|
+
Select: L
|
|
1023
1069
|
},
|
|
1024
1070
|
SideMenu: {
|
|
1025
|
-
Root:
|
|
1026
|
-
Button:
|
|
1071
|
+
Root: gt,
|
|
1072
|
+
Button: ht
|
|
1027
1073
|
},
|
|
1028
1074
|
SuggestionMenu: {
|
|
1029
|
-
Root:
|
|
1030
|
-
Item:
|
|
1031
|
-
EmptyItem:
|
|
1032
|
-
Label:
|
|
1033
|
-
Loader:
|
|
1075
|
+
Root: bt,
|
|
1076
|
+
Item: vt,
|
|
1077
|
+
EmptyItem: pt,
|
|
1078
|
+
Label: St,
|
|
1079
|
+
Loader: yt
|
|
1034
1080
|
},
|
|
1035
1081
|
TableHandle: {
|
|
1036
|
-
Root:
|
|
1037
|
-
ExtendButton:
|
|
1082
|
+
Root: kt,
|
|
1083
|
+
ExtendButton: Nt
|
|
1038
1084
|
},
|
|
1039
1085
|
Generic: {
|
|
1040
1086
|
Badge: {
|
|
1041
|
-
Root:
|
|
1042
|
-
Group:
|
|
1087
|
+
Root: De,
|
|
1088
|
+
Group: Le
|
|
1043
1089
|
},
|
|
1044
1090
|
Form: {
|
|
1045
1091
|
Root: (e) => /* @__PURE__ */ s("div", { children: e.children }),
|
|
1046
|
-
TextInput:
|
|
1092
|
+
TextInput: Ve
|
|
1047
1093
|
},
|
|
1048
1094
|
Menu: {
|
|
1049
|
-
Root:
|
|
1050
|
-
Trigger:
|
|
1051
|
-
Dropdown:
|
|
1052
|
-
Divider:
|
|
1053
|
-
Label:
|
|
1054
|
-
Item:
|
|
1055
|
-
Button:
|
|
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:
|
|
1059
|
-
Trigger:
|
|
1060
|
-
Content:
|
|
1104
|
+
Root: dt,
|
|
1105
|
+
Trigger: mt,
|
|
1106
|
+
Content: ft
|
|
1061
1107
|
},
|
|
1062
1108
|
Toolbar: {
|
|
1063
|
-
Root:
|
|
1064
|
-
Button:
|
|
1109
|
+
Root: D,
|
|
1110
|
+
Button: I,
|
|
1111
|
+
Select: L
|
|
1065
1112
|
}
|
|
1066
1113
|
},
|
|
1067
1114
|
Comments: {
|
|
1068
|
-
Comment:
|
|
1069
|
-
Editor:
|
|
1070
|
-
Card:
|
|
1071
|
-
CardSection:
|
|
1115
|
+
Comment: $e,
|
|
1116
|
+
Editor: Ae,
|
|
1117
|
+
Card: Be,
|
|
1118
|
+
CardSection: Ee,
|
|
1119
|
+
ExpandSectionsPrompt: ze
|
|
1072
1120
|
}
|
|
1073
|
-
},
|
|
1121
|
+
}, Ft = {
|
|
1074
1122
|
// Removes button press effect
|
|
1075
1123
|
activeClassName: ""
|
|
1076
|
-
},
|
|
1077
|
-
const { className: n, theme: t, ...o } = e, r =
|
|
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 && (
|
|
1127
|
+
if (c && (Ie(c), typeof t == "object")) {
|
|
1080
1128
|
if ("light" in t && "dark" in t) {
|
|
1081
|
-
|
|
1082
|
-
t[
|
|
1129
|
+
V(
|
|
1130
|
+
t[l === "dark" ? "dark" : "light"],
|
|
1083
1131
|
c
|
|
1084
1132
|
);
|
|
1085
1133
|
return;
|
|
1086
1134
|
}
|
|
1087
|
-
|
|
1135
|
+
V(t, c);
|
|
1088
1136
|
return;
|
|
1089
1137
|
}
|
|
1090
1138
|
},
|
|
1091
|
-
[
|
|
1092
|
-
), u = typeof t == "string" ? t :
|
|
1093
|
-
return /* @__PURE__ */ s(
|
|
1094
|
-
|
|
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:
|
|
1144
|
+
theme: Ft,
|
|
1097
1145
|
cssVariablesSelector: ".bn-mantine",
|
|
1098
1146
|
getRootElement: () => {
|
|
1099
1147
|
},
|
|
1100
1148
|
children: /* @__PURE__ */ s(
|
|
1101
|
-
|
|
1149
|
+
he,
|
|
1102
1150
|
{
|
|
1103
1151
|
"data-mantine-color-scheme": u,
|
|
1104
|
-
className:
|
|
1152
|
+
className: U("bn-mantine", n || ""),
|
|
1105
1153
|
theme: typeof t == "object" ? void 0 : t,
|
|
1106
1154
|
...o,
|
|
1107
|
-
ref:
|
|
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
|
-
],
|
|
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:
|
|
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
|
-
},
|
|
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:
|
|
1233
|
+
highlights: le
|
|
1186
1234
|
},
|
|
1187
|
-
borderRadius:
|
|
1188
|
-
fontFamily:
|
|
1235
|
+
borderRadius: K.borderRadius,
|
|
1236
|
+
fontFamily: K.fontFamily
|
|
1189
1237
|
};
|
|
1190
1238
|
export {
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1239
|
+
Mt as BlockNoteView,
|
|
1240
|
+
V as applyBlockNoteCSSVariablesFromTheme,
|
|
1241
|
+
Pt as components,
|
|
1242
|
+
Et as darkDefaultTheme,
|
|
1195
1243
|
f as defaultColorScheme,
|
|
1196
|
-
|
|
1197
|
-
|
|
1244
|
+
K as lightDefaultTheme,
|
|
1245
|
+
Ie as removeBlockNoteCSSVariables
|
|
1198
1246
|
};
|
|
1199
1247
|
//# sourceMappingURL=blocknote-mantine.js.map
|