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