lakelib 0.4.2 → 0.4.3
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/lake.min.css +4 -4
- package/dist/lake.min.js +28 -28
- package/dist/lake.min.js.map +1 -1
- package/lib/lake.css +25 -6
- package/lib/lake.d.ts +685 -7
- package/lib/lake.js +88 -34
- package/lib/lake.js.map +1 -1
- package/package.json +6 -5
package/lib/lake.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EventEmitter from 'eventemitter3';
|
|
2
|
-
import { LocalizedString } from 'typesafe-i18n';
|
|
2
|
+
import { LocalizedString, RequiredParams } from 'typesafe-i18n';
|
|
3
3
|
|
|
4
4
|
type KeyValue = Record<string, string>;
|
|
5
5
|
|
|
@@ -377,6 +377,654 @@ interface SelectionState {
|
|
|
377
377
|
selectedValuesMap?: Map<string, string[]>;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
+
type Translation = RootTranslation;
|
|
381
|
+
type RootTranslation = {
|
|
382
|
+
toolbar: {
|
|
383
|
+
/**
|
|
384
|
+
* Undo (mod+Z)
|
|
385
|
+
*/
|
|
386
|
+
undo: string;
|
|
387
|
+
/**
|
|
388
|
+
* Redo (mod+Y)
|
|
389
|
+
*/
|
|
390
|
+
redo: string;
|
|
391
|
+
/**
|
|
392
|
+
* Select all (mod+A)
|
|
393
|
+
*/
|
|
394
|
+
selectAll: string;
|
|
395
|
+
/**
|
|
396
|
+
* Paragraph
|
|
397
|
+
*/
|
|
398
|
+
paragraph: string;
|
|
399
|
+
/**
|
|
400
|
+
* Block quotation
|
|
401
|
+
*/
|
|
402
|
+
blockQuote: string;
|
|
403
|
+
/**
|
|
404
|
+
* Numbered list
|
|
405
|
+
*/
|
|
406
|
+
numberedList: string;
|
|
407
|
+
/**
|
|
408
|
+
* Bulleted list
|
|
409
|
+
*/
|
|
410
|
+
bulletedList: string;
|
|
411
|
+
/**
|
|
412
|
+
* Checklist
|
|
413
|
+
*/
|
|
414
|
+
checklist: string;
|
|
415
|
+
/**
|
|
416
|
+
* Align left
|
|
417
|
+
*/
|
|
418
|
+
alignLeft: string;
|
|
419
|
+
/**
|
|
420
|
+
* Align center
|
|
421
|
+
*/
|
|
422
|
+
alignCenter: string;
|
|
423
|
+
/**
|
|
424
|
+
* Align right
|
|
425
|
+
*/
|
|
426
|
+
alignRight: string;
|
|
427
|
+
/**
|
|
428
|
+
* Justify
|
|
429
|
+
*/
|
|
430
|
+
alignJustify: string;
|
|
431
|
+
/**
|
|
432
|
+
* Increase indent
|
|
433
|
+
*/
|
|
434
|
+
increaseIndent: string;
|
|
435
|
+
/**
|
|
436
|
+
* Decrease indent
|
|
437
|
+
*/
|
|
438
|
+
decreaseIndent: string;
|
|
439
|
+
/**
|
|
440
|
+
* Bold (mod+B)
|
|
441
|
+
*/
|
|
442
|
+
bold: string;
|
|
443
|
+
/**
|
|
444
|
+
* Italic (mod+I)
|
|
445
|
+
*/
|
|
446
|
+
italic: string;
|
|
447
|
+
/**
|
|
448
|
+
* Underline (mod+U)
|
|
449
|
+
*/
|
|
450
|
+
underline: string;
|
|
451
|
+
/**
|
|
452
|
+
* Strikethrough
|
|
453
|
+
*/
|
|
454
|
+
strikethrough: string;
|
|
455
|
+
/**
|
|
456
|
+
* Superscript
|
|
457
|
+
*/
|
|
458
|
+
superscript: string;
|
|
459
|
+
/**
|
|
460
|
+
* Subscript
|
|
461
|
+
*/
|
|
462
|
+
subscript: string;
|
|
463
|
+
/**
|
|
464
|
+
* Inline code
|
|
465
|
+
*/
|
|
466
|
+
code: string;
|
|
467
|
+
/**
|
|
468
|
+
* Remove format
|
|
469
|
+
*/
|
|
470
|
+
removeFormat: string;
|
|
471
|
+
/**
|
|
472
|
+
* Format painter
|
|
473
|
+
*/
|
|
474
|
+
formatPainter: string;
|
|
475
|
+
/**
|
|
476
|
+
* Link
|
|
477
|
+
*/
|
|
478
|
+
link: string;
|
|
479
|
+
/**
|
|
480
|
+
* Horizontal line
|
|
481
|
+
*/
|
|
482
|
+
hr: string;
|
|
483
|
+
/**
|
|
484
|
+
* Video
|
|
485
|
+
*/
|
|
486
|
+
video: string;
|
|
487
|
+
/**
|
|
488
|
+
* Code block
|
|
489
|
+
*/
|
|
490
|
+
codeBlock: string;
|
|
491
|
+
/**
|
|
492
|
+
* Heading
|
|
493
|
+
*/
|
|
494
|
+
heading: string;
|
|
495
|
+
/**
|
|
496
|
+
* Heading 1
|
|
497
|
+
*/
|
|
498
|
+
heading1: string;
|
|
499
|
+
/**
|
|
500
|
+
* Heading 2
|
|
501
|
+
*/
|
|
502
|
+
heading2: string;
|
|
503
|
+
/**
|
|
504
|
+
* Heading 3
|
|
505
|
+
*/
|
|
506
|
+
heading3: string;
|
|
507
|
+
/**
|
|
508
|
+
* Heading 4
|
|
509
|
+
*/
|
|
510
|
+
heading4: string;
|
|
511
|
+
/**
|
|
512
|
+
* Heading 5
|
|
513
|
+
*/
|
|
514
|
+
heading5: string;
|
|
515
|
+
/**
|
|
516
|
+
* Heading 6
|
|
517
|
+
*/
|
|
518
|
+
heading6: string;
|
|
519
|
+
/**
|
|
520
|
+
* List
|
|
521
|
+
*/
|
|
522
|
+
list: string;
|
|
523
|
+
/**
|
|
524
|
+
* Table
|
|
525
|
+
*/
|
|
526
|
+
table: string;
|
|
527
|
+
/**
|
|
528
|
+
* Alignment
|
|
529
|
+
*/
|
|
530
|
+
align: string;
|
|
531
|
+
/**
|
|
532
|
+
* Indent
|
|
533
|
+
*/
|
|
534
|
+
indent: string;
|
|
535
|
+
/**
|
|
536
|
+
* Font family
|
|
537
|
+
*/
|
|
538
|
+
fontFamily: string;
|
|
539
|
+
/**
|
|
540
|
+
* Font size
|
|
541
|
+
*/
|
|
542
|
+
fontSize: string;
|
|
543
|
+
/**
|
|
544
|
+
* More style
|
|
545
|
+
*/
|
|
546
|
+
moreStyle: string;
|
|
547
|
+
/**
|
|
548
|
+
* Font color
|
|
549
|
+
*/
|
|
550
|
+
fontColor: string;
|
|
551
|
+
/**
|
|
552
|
+
* Highlight
|
|
553
|
+
*/
|
|
554
|
+
highlight: string;
|
|
555
|
+
/**
|
|
556
|
+
* Image
|
|
557
|
+
*/
|
|
558
|
+
image: string;
|
|
559
|
+
/**
|
|
560
|
+
* File
|
|
561
|
+
*/
|
|
562
|
+
file: string;
|
|
563
|
+
/**
|
|
564
|
+
* Emoji
|
|
565
|
+
*/
|
|
566
|
+
emoji: string;
|
|
567
|
+
/**
|
|
568
|
+
* Mathematical formula
|
|
569
|
+
*/
|
|
570
|
+
equation: string;
|
|
571
|
+
/**
|
|
572
|
+
* X (Twitter)
|
|
573
|
+
*/
|
|
574
|
+
twitter: string;
|
|
575
|
+
/**
|
|
576
|
+
* Remove color
|
|
577
|
+
*/
|
|
578
|
+
removeColor: string;
|
|
579
|
+
};
|
|
580
|
+
slash: {
|
|
581
|
+
/**
|
|
582
|
+
* Heading 1
|
|
583
|
+
*/
|
|
584
|
+
heading1: string;
|
|
585
|
+
/**
|
|
586
|
+
* Create a heading level 1
|
|
587
|
+
*/
|
|
588
|
+
heading1Desc: string;
|
|
589
|
+
/**
|
|
590
|
+
* Heading 2
|
|
591
|
+
*/
|
|
592
|
+
heading2: string;
|
|
593
|
+
/**
|
|
594
|
+
* Create a heading level 2
|
|
595
|
+
*/
|
|
596
|
+
heading2Desc: string;
|
|
597
|
+
/**
|
|
598
|
+
* Heading 3
|
|
599
|
+
*/
|
|
600
|
+
heading3: string;
|
|
601
|
+
/**
|
|
602
|
+
* Create a heading level 3
|
|
603
|
+
*/
|
|
604
|
+
heading3Desc: string;
|
|
605
|
+
/**
|
|
606
|
+
* Heading 4
|
|
607
|
+
*/
|
|
608
|
+
heading4: string;
|
|
609
|
+
/**
|
|
610
|
+
* Create a heading level 4
|
|
611
|
+
*/
|
|
612
|
+
heading4Desc: string;
|
|
613
|
+
/**
|
|
614
|
+
* Heading 5
|
|
615
|
+
*/
|
|
616
|
+
heading5: string;
|
|
617
|
+
/**
|
|
618
|
+
* Create a heading level 5
|
|
619
|
+
*/
|
|
620
|
+
heading5Desc: string;
|
|
621
|
+
/**
|
|
622
|
+
* Heading 6
|
|
623
|
+
*/
|
|
624
|
+
heading6: string;
|
|
625
|
+
/**
|
|
626
|
+
* Create a heading level 6
|
|
627
|
+
*/
|
|
628
|
+
heading6Desc: string;
|
|
629
|
+
/**
|
|
630
|
+
* Paragraph
|
|
631
|
+
*/
|
|
632
|
+
paragraph: string;
|
|
633
|
+
/**
|
|
634
|
+
* Create a paragraph
|
|
635
|
+
*/
|
|
636
|
+
paragraphDesc: string;
|
|
637
|
+
/**
|
|
638
|
+
* Block quotation
|
|
639
|
+
*/
|
|
640
|
+
blockQuote: string;
|
|
641
|
+
/**
|
|
642
|
+
* Create a block quotation
|
|
643
|
+
*/
|
|
644
|
+
blockQuoteDesc: string;
|
|
645
|
+
/**
|
|
646
|
+
* Numbered list
|
|
647
|
+
*/
|
|
648
|
+
numberedList: string;
|
|
649
|
+
/**
|
|
650
|
+
* Create a numbered list
|
|
651
|
+
*/
|
|
652
|
+
numberedListDesc: string;
|
|
653
|
+
/**
|
|
654
|
+
* Bulleted list
|
|
655
|
+
*/
|
|
656
|
+
bulletedList: string;
|
|
657
|
+
/**
|
|
658
|
+
* Create a bulleted list
|
|
659
|
+
*/
|
|
660
|
+
bulletedListDesc: string;
|
|
661
|
+
/**
|
|
662
|
+
* Checklist
|
|
663
|
+
*/
|
|
664
|
+
checklist: string;
|
|
665
|
+
/**
|
|
666
|
+
* Create a checklist
|
|
667
|
+
*/
|
|
668
|
+
checklistDesc: string;
|
|
669
|
+
/**
|
|
670
|
+
* Table
|
|
671
|
+
*/
|
|
672
|
+
table: string;
|
|
673
|
+
/**
|
|
674
|
+
* Insert a table
|
|
675
|
+
*/
|
|
676
|
+
tableDesc: string;
|
|
677
|
+
/**
|
|
678
|
+
* Info alert
|
|
679
|
+
*/
|
|
680
|
+
infoAlert: string;
|
|
681
|
+
/**
|
|
682
|
+
* Create an info alert
|
|
683
|
+
*/
|
|
684
|
+
infoAlertDesc: string;
|
|
685
|
+
/**
|
|
686
|
+
* Tip alert
|
|
687
|
+
*/
|
|
688
|
+
tipAlert: string;
|
|
689
|
+
/**
|
|
690
|
+
* Create a tip alert
|
|
691
|
+
*/
|
|
692
|
+
tipAlertDesc: string;
|
|
693
|
+
/**
|
|
694
|
+
* Warning alert
|
|
695
|
+
*/
|
|
696
|
+
warningAlert: string;
|
|
697
|
+
/**
|
|
698
|
+
* Create a warning alert
|
|
699
|
+
*/
|
|
700
|
+
warningAlertDesc: string;
|
|
701
|
+
/**
|
|
702
|
+
* Danger alert
|
|
703
|
+
*/
|
|
704
|
+
dangerAlert: string;
|
|
705
|
+
/**
|
|
706
|
+
* Create a danger alert
|
|
707
|
+
*/
|
|
708
|
+
dangerAlertDesc: string;
|
|
709
|
+
/**
|
|
710
|
+
* Horizontal line
|
|
711
|
+
*/
|
|
712
|
+
hr: string;
|
|
713
|
+
/**
|
|
714
|
+
* Insert a horizontal line
|
|
715
|
+
*/
|
|
716
|
+
hrDesc: string;
|
|
717
|
+
/**
|
|
718
|
+
* Code block
|
|
719
|
+
*/
|
|
720
|
+
codeBlock: string;
|
|
721
|
+
/**
|
|
722
|
+
* Insert a code block
|
|
723
|
+
*/
|
|
724
|
+
codeBlockDesc: string;
|
|
725
|
+
/**
|
|
726
|
+
* Video
|
|
727
|
+
*/
|
|
728
|
+
video: string;
|
|
729
|
+
/**
|
|
730
|
+
* Insert a video from YouTube
|
|
731
|
+
*/
|
|
732
|
+
videoDesc: string;
|
|
733
|
+
/**
|
|
734
|
+
* Mathematical formula
|
|
735
|
+
*/
|
|
736
|
+
equation: string;
|
|
737
|
+
/**
|
|
738
|
+
* Insert a TeX expression
|
|
739
|
+
*/
|
|
740
|
+
equationDesc: string;
|
|
741
|
+
/**
|
|
742
|
+
* Twitter
|
|
743
|
+
*/
|
|
744
|
+
twitter: string;
|
|
745
|
+
/**
|
|
746
|
+
* Insert a post from X (Twitter)
|
|
747
|
+
*/
|
|
748
|
+
twitterDesc: string;
|
|
749
|
+
/**
|
|
750
|
+
* Image
|
|
751
|
+
*/
|
|
752
|
+
image: string;
|
|
753
|
+
/**
|
|
754
|
+
* Upload an image
|
|
755
|
+
*/
|
|
756
|
+
imageDesc: string;
|
|
757
|
+
/**
|
|
758
|
+
* File
|
|
759
|
+
*/
|
|
760
|
+
file: string;
|
|
761
|
+
/**
|
|
762
|
+
* Upload a file
|
|
763
|
+
*/
|
|
764
|
+
fileDesc: string;
|
|
765
|
+
};
|
|
766
|
+
link: {
|
|
767
|
+
/**
|
|
768
|
+
* New link
|
|
769
|
+
*/
|
|
770
|
+
newLink: string;
|
|
771
|
+
/**
|
|
772
|
+
* Link URL
|
|
773
|
+
*/
|
|
774
|
+
url: string;
|
|
775
|
+
/**
|
|
776
|
+
* Text to display
|
|
777
|
+
*/
|
|
778
|
+
title: string;
|
|
779
|
+
/**
|
|
780
|
+
* Copy link to clipboard
|
|
781
|
+
*/
|
|
782
|
+
copy: string;
|
|
783
|
+
/**
|
|
784
|
+
* Open link in new tab
|
|
785
|
+
*/
|
|
786
|
+
open: string;
|
|
787
|
+
/**
|
|
788
|
+
* Save
|
|
789
|
+
*/
|
|
790
|
+
save: string;
|
|
791
|
+
/**
|
|
792
|
+
* Remove link
|
|
793
|
+
*/
|
|
794
|
+
unlink: string;
|
|
795
|
+
};
|
|
796
|
+
table: {
|
|
797
|
+
/**
|
|
798
|
+
* Fit table to page width
|
|
799
|
+
*/
|
|
800
|
+
fitTable: string;
|
|
801
|
+
/**
|
|
802
|
+
* Cell background color
|
|
803
|
+
*/
|
|
804
|
+
cellBackground: string;
|
|
805
|
+
/**
|
|
806
|
+
* Column
|
|
807
|
+
*/
|
|
808
|
+
column: string;
|
|
809
|
+
/**
|
|
810
|
+
* Insert column left
|
|
811
|
+
*/
|
|
812
|
+
insertColumnLeft: string;
|
|
813
|
+
/**
|
|
814
|
+
* Insert column right
|
|
815
|
+
*/
|
|
816
|
+
insertColumnRight: string;
|
|
817
|
+
/**
|
|
818
|
+
* Delete column
|
|
819
|
+
*/
|
|
820
|
+
deleteColumn: string;
|
|
821
|
+
/**
|
|
822
|
+
* Row
|
|
823
|
+
*/
|
|
824
|
+
row: string;
|
|
825
|
+
/**
|
|
826
|
+
* Insert row above
|
|
827
|
+
*/
|
|
828
|
+
insertRowAbove: string;
|
|
829
|
+
/**
|
|
830
|
+
* Insert row below
|
|
831
|
+
*/
|
|
832
|
+
insertRowBelow: string;
|
|
833
|
+
/**
|
|
834
|
+
* Delete row
|
|
835
|
+
*/
|
|
836
|
+
deleteRow: string;
|
|
837
|
+
/**
|
|
838
|
+
* Merge cells
|
|
839
|
+
*/
|
|
840
|
+
merge: string;
|
|
841
|
+
/**
|
|
842
|
+
* Merge cell up
|
|
843
|
+
*/
|
|
844
|
+
mergeUp: string;
|
|
845
|
+
/**
|
|
846
|
+
* Merge cell right
|
|
847
|
+
*/
|
|
848
|
+
mergeRight: string;
|
|
849
|
+
/**
|
|
850
|
+
* Merge cell down
|
|
851
|
+
*/
|
|
852
|
+
mergeDown: string;
|
|
853
|
+
/**
|
|
854
|
+
* Merge cell left
|
|
855
|
+
*/
|
|
856
|
+
mergeLeft: string;
|
|
857
|
+
/**
|
|
858
|
+
* Split cell
|
|
859
|
+
*/
|
|
860
|
+
split: string;
|
|
861
|
+
/**
|
|
862
|
+
* Split cell left and right
|
|
863
|
+
*/
|
|
864
|
+
splitLeftRight: string;
|
|
865
|
+
/**
|
|
866
|
+
* Split cell top and bottom
|
|
867
|
+
*/
|
|
868
|
+
splitTopBottom: string;
|
|
869
|
+
/**
|
|
870
|
+
* Remove table
|
|
871
|
+
*/
|
|
872
|
+
remove: string;
|
|
873
|
+
};
|
|
874
|
+
image: {
|
|
875
|
+
/**
|
|
876
|
+
* Full screen
|
|
877
|
+
*/
|
|
878
|
+
view: string;
|
|
879
|
+
/**
|
|
880
|
+
* Delete
|
|
881
|
+
*/
|
|
882
|
+
remove: string;
|
|
883
|
+
/**
|
|
884
|
+
* Previous
|
|
885
|
+
*/
|
|
886
|
+
previous: string;
|
|
887
|
+
/**
|
|
888
|
+
* Next
|
|
889
|
+
*/
|
|
890
|
+
next: string;
|
|
891
|
+
/**
|
|
892
|
+
* Close (Esc)
|
|
893
|
+
*/
|
|
894
|
+
close: string;
|
|
895
|
+
/**
|
|
896
|
+
* Unable to load image.
|
|
897
|
+
*/
|
|
898
|
+
loadingError: string;
|
|
899
|
+
/**
|
|
900
|
+
* Zoom out
|
|
901
|
+
*/
|
|
902
|
+
zoomOut: string;
|
|
903
|
+
/**
|
|
904
|
+
* Zoom in
|
|
905
|
+
*/
|
|
906
|
+
zoomIn: string;
|
|
907
|
+
/**
|
|
908
|
+
* Alignment
|
|
909
|
+
*/
|
|
910
|
+
align: string;
|
|
911
|
+
/**
|
|
912
|
+
* Align left
|
|
913
|
+
*/
|
|
914
|
+
alignLeft: string;
|
|
915
|
+
/**
|
|
916
|
+
* Align center
|
|
917
|
+
*/
|
|
918
|
+
alignCenter: string;
|
|
919
|
+
/**
|
|
920
|
+
* Align right
|
|
921
|
+
*/
|
|
922
|
+
alignRight: string;
|
|
923
|
+
/**
|
|
924
|
+
* Resize image
|
|
925
|
+
*/
|
|
926
|
+
resize: string;
|
|
927
|
+
/**
|
|
928
|
+
* Page width
|
|
929
|
+
*/
|
|
930
|
+
pageWidth: string;
|
|
931
|
+
/**
|
|
932
|
+
* Original image width
|
|
933
|
+
*/
|
|
934
|
+
originalWidth: string;
|
|
935
|
+
/**
|
|
936
|
+
* {0} image width
|
|
937
|
+
* @param {unknown} 0
|
|
938
|
+
*/
|
|
939
|
+
imageWidth: RequiredParams<'0'>;
|
|
940
|
+
/**
|
|
941
|
+
* Open image in new tab
|
|
942
|
+
*/
|
|
943
|
+
open: string;
|
|
944
|
+
/**
|
|
945
|
+
* Caption
|
|
946
|
+
*/
|
|
947
|
+
caption: string;
|
|
948
|
+
/**
|
|
949
|
+
* Write a caption...
|
|
950
|
+
*/
|
|
951
|
+
captionPlaceholder: string;
|
|
952
|
+
};
|
|
953
|
+
file: {
|
|
954
|
+
/**
|
|
955
|
+
* Download
|
|
956
|
+
*/
|
|
957
|
+
download: string;
|
|
958
|
+
/**
|
|
959
|
+
* Delete
|
|
960
|
+
*/
|
|
961
|
+
remove: string;
|
|
962
|
+
};
|
|
963
|
+
video: {
|
|
964
|
+
/**
|
|
965
|
+
* Embed video
|
|
966
|
+
*/
|
|
967
|
+
embed: string;
|
|
968
|
+
/**
|
|
969
|
+
* Delete
|
|
970
|
+
*/
|
|
971
|
+
remove: string;
|
|
972
|
+
/**
|
|
973
|
+
* Paste a link to embed a video from YouTube.
|
|
974
|
+
*/
|
|
975
|
+
description: string;
|
|
976
|
+
/**
|
|
977
|
+
* Link
|
|
978
|
+
*/
|
|
979
|
+
url: string;
|
|
980
|
+
/**
|
|
981
|
+
* Please enter a valid link.
|
|
982
|
+
*/
|
|
983
|
+
urlError: string;
|
|
984
|
+
};
|
|
985
|
+
codeBlock: {
|
|
986
|
+
/**
|
|
987
|
+
* Select language
|
|
988
|
+
*/
|
|
989
|
+
langType: string;
|
|
990
|
+
};
|
|
991
|
+
equation: {
|
|
992
|
+
/**
|
|
993
|
+
* Done
|
|
994
|
+
*/
|
|
995
|
+
save: string;
|
|
996
|
+
/**
|
|
997
|
+
* Supported functions
|
|
998
|
+
*/
|
|
999
|
+
help: string;
|
|
1000
|
+
/**
|
|
1001
|
+
* Type a TeX expression...
|
|
1002
|
+
*/
|
|
1003
|
+
placeholder: string;
|
|
1004
|
+
};
|
|
1005
|
+
twitter: {
|
|
1006
|
+
/**
|
|
1007
|
+
* Embed Tweet
|
|
1008
|
+
*/
|
|
1009
|
+
embed: string;
|
|
1010
|
+
/**
|
|
1011
|
+
* Delete
|
|
1012
|
+
*/
|
|
1013
|
+
remove: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* Paste a link to embed a post from X.
|
|
1016
|
+
*/
|
|
1017
|
+
description: string;
|
|
1018
|
+
/**
|
|
1019
|
+
* Link
|
|
1020
|
+
*/
|
|
1021
|
+
url: string;
|
|
1022
|
+
/**
|
|
1023
|
+
* Please enter a valid link.
|
|
1024
|
+
*/
|
|
1025
|
+
urlError: string;
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
380
1028
|
type TranslationFunctions = {
|
|
381
1029
|
toolbar: {
|
|
382
1030
|
/**
|
|
@@ -1024,6 +1672,21 @@ type TranslationFunctions = {
|
|
|
1024
1672
|
};
|
|
1025
1673
|
};
|
|
1026
1674
|
|
|
1675
|
+
/**
|
|
1676
|
+
* The LocaleManager interface manages a collection of Translation objects.
|
|
1677
|
+
* It allows you to add and retrieve the names of locales.
|
|
1678
|
+
*/
|
|
1679
|
+
declare class LocaleManager {
|
|
1680
|
+
/**
|
|
1681
|
+
* Adds a Translation to the collection.
|
|
1682
|
+
*/
|
|
1683
|
+
add(locale: string, translation: Translation): void;
|
|
1684
|
+
/**
|
|
1685
|
+
* Returns a list of all locale names.
|
|
1686
|
+
*/
|
|
1687
|
+
getNames(): string[];
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1027
1690
|
type NativeRange = Range;
|
|
1028
1691
|
|
|
1029
1692
|
/**
|
|
@@ -1671,6 +2334,10 @@ interface ToolbarConfig {
|
|
|
1671
2334
|
root?: string | Node | Nodes;
|
|
1672
2335
|
items?: (string | ToolbarItem)[];
|
|
1673
2336
|
placement?: ToolbarPlacement;
|
|
2337
|
+
fontFamily?: {
|
|
2338
|
+
defaultValue: string;
|
|
2339
|
+
menuItems: DropdownMenuItem[];
|
|
2340
|
+
};
|
|
1674
2341
|
}
|
|
1675
2342
|
/**
|
|
1676
2343
|
* The Toolbar interface provides properties and methods for rendering and manipulating the toolbar.
|
|
@@ -1678,6 +2345,7 @@ interface ToolbarConfig {
|
|
|
1678
2345
|
declare class Toolbar {
|
|
1679
2346
|
private items;
|
|
1680
2347
|
private placement;
|
|
2348
|
+
private toolbarItemMap;
|
|
1681
2349
|
private allMenuMap;
|
|
1682
2350
|
private buttonItemList;
|
|
1683
2351
|
private dropdownItemList;
|
|
@@ -1758,6 +2426,10 @@ declare class Editor {
|
|
|
1758
2426
|
* The current version of Lake.
|
|
1759
2427
|
*/
|
|
1760
2428
|
static readonly version: string;
|
|
2429
|
+
/**
|
|
2430
|
+
* A LocaleManager object that manages the locale translations.
|
|
2431
|
+
*/
|
|
2432
|
+
static readonly locale: LocaleManager;
|
|
1761
2433
|
/**
|
|
1762
2434
|
* A BoxManager object that manages the box components.
|
|
1763
2435
|
*/
|
|
@@ -1909,6 +2581,10 @@ declare class Editor {
|
|
|
1909
2581
|
* Returns the editor's content.
|
|
1910
2582
|
*/
|
|
1911
2583
|
getValue(): string;
|
|
2584
|
+
/**
|
|
2585
|
+
* Returns the editor's content in HTML format.
|
|
2586
|
+
*/
|
|
2587
|
+
getHTML(): string;
|
|
1912
2588
|
/**
|
|
1913
2589
|
* Renders an editing area and sets default content to it.
|
|
1914
2590
|
*/
|
|
@@ -1996,14 +2672,14 @@ declare class Box {
|
|
|
1996
2672
|
|
|
1997
2673
|
type BoxType = 'inline' | 'block';
|
|
1998
2674
|
type BoxValue = Record<string, any>;
|
|
1999
|
-
type
|
|
2000
|
-
type
|
|
2675
|
+
type RenderBox = (box: Box) => Nodes | string | void;
|
|
2676
|
+
type RenderBoxHTML = (box: Box) => string;
|
|
2001
2677
|
interface BoxComponent {
|
|
2002
2678
|
type: BoxType;
|
|
2003
2679
|
name: string;
|
|
2004
2680
|
value?: BoxValue;
|
|
2005
|
-
render:
|
|
2006
|
-
html?:
|
|
2681
|
+
render: RenderBox;
|
|
2682
|
+
html?: RenderBoxHTML;
|
|
2007
2683
|
}
|
|
2008
2684
|
|
|
2009
2685
|
interface MentionItem {
|
|
@@ -2132,6 +2808,8 @@ interface IframeBoxConfig {
|
|
|
2132
2808
|
*/
|
|
2133
2809
|
declare function createIframeBox(config: IframeBoxConfig): BoxComponent;
|
|
2134
2810
|
|
|
2811
|
+
declare function modifierText(value: string, userAgent?: string): string;
|
|
2812
|
+
|
|
2135
2813
|
/**
|
|
2136
2814
|
* The HTMLParser interface provides the ability to parse an HTML string according to specified rules.
|
|
2137
2815
|
*/
|
|
@@ -2263,5 +2941,5 @@ declare class Dropdown {
|
|
|
2263
2941
|
unmount(): void;
|
|
2264
2942
|
}
|
|
2265
2943
|
|
|
2266
|
-
export { Box, Button, Dropdown, Editor, Fragment, HTMLParser, Nodes, Range$1 as Range, TextParser, Toolbar, addMark, createIframeBox, deleteContents, getBox, getContentRules, icons, insertBlock, insertBookmark, insertBox, insertContents, query, removeBox, removeMark, setBlocks, splitBlock, splitMarks, template, toBookmark, toHex };
|
|
2267
|
-
export type { ActiveItem, BoxComponent, BoxValue, CommandItem, ContentRules, DropdownItem, DropdownMenuItem, EditorConfig, InitializePlugin, KeyValue, MentionItem, NodePath, SelectionState, SlashButtonItem, SlashItem, SlashUploadItem, ToolbarButtonItem, ToolbarConfig, ToolbarDropdownItem, ToolbarItem, ToolbarUploadItem, UnmountPlugin };
|
|
2944
|
+
export { Box, Button, Dropdown, Editor, Fragment, HTMLParser, Nodes, Range$1 as Range, TextParser, Toolbar, addMark, createIframeBox, deleteContents, getBox, getContentRules, icons, insertBlock, insertBookmark, insertBox, insertContents, modifierText, query, removeBox, removeMark, setBlocks, splitBlock, splitMarks, template, toBookmark, toHex };
|
|
2945
|
+
export type { ActiveItem, BoxComponent, BoxValue, CommandItem, ContentRules, DropdownItem, DropdownMenuItem, EditorConfig, InitializePlugin, KeyValue, MentionItem, NodePath, SelectionState, SlashButtonItem, SlashItem, SlashUploadItem, ToolbarButtonItem, ToolbarConfig, ToolbarDropdownItem, ToolbarItem, ToolbarUploadItem, Translation, UnmountPlugin };
|