lakelib 0.2.6 → 0.3.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/README.md +6 -6
- package/dist/lake.css +377 -363
- package/dist/lake.min.js +40 -40
- package/dist/lake.min.js.map +1 -1
- package/lib/css/index.d.ts +0 -11
- package/lib/editor.d.ts +19 -19
- package/lib/i18n/en-US/index.d.ts +24 -0
- package/lib/i18n/ja/index.d.ts +24 -0
- package/lib/i18n/ko/index.d.ts +24 -0
- package/lib/i18n/types.d.ts +182 -2
- package/lib/i18n/zh-CN/index.d.ts +24 -0
- package/lib/index.d.ts +8 -8
- package/lib/lake.css +126 -112
- package/lib/lake.js +5709 -4679
- package/lib/lake.js.map +1 -1
- package/lib/managers/command.d.ts +4 -4
- package/lib/managers/selection.d.ts +6 -10
- package/lib/operations/insert-block.d.ts +3 -0
- package/lib/operations/insert-contents.d.ts +4 -0
- package/lib/operations/split-block.d.ts +1 -1
- package/lib/operations/split-marks.d.ts +1 -1
- package/lib/plugins/align.d.ts +1 -1
- package/lib/plugins/arrow-keys.d.ts +1 -1
- package/lib/plugins/backspace-key.d.ts +1 -1
- package/lib/plugins/block-quote.d.ts +1 -1
- package/lib/plugins/bold.d.ts +1 -1
- package/lib/plugins/code-block/code-block-box.d.ts +4 -0
- package/lib/plugins/code-block/index.d.ts +5 -0
- package/lib/plugins/code.d.ts +1 -1
- package/lib/plugins/copy.d.ts +1 -1
- package/lib/plugins/cut.d.ts +1 -1
- package/lib/plugins/delete-key.d.ts +1 -1
- package/lib/plugins/drop.d.ts +1 -1
- package/lib/plugins/emoji/emoji-box.d.ts +4 -0
- package/lib/plugins/emoji/index.d.ts +5 -0
- package/lib/plugins/enter-key.d.ts +1 -1
- package/lib/plugins/equation/equation-box.d.ts +4 -0
- package/lib/plugins/equation/index.d.ts +5 -0
- package/lib/plugins/escape-key.d.ts +1 -1
- package/lib/plugins/file/file-box.d.ts +4 -0
- package/lib/plugins/file/index.d.ts +5 -0
- package/lib/plugins/font-color.d.ts +1 -1
- package/lib/plugins/font-family.d.ts +1 -1
- package/lib/plugins/font-size.d.ts +1 -1
- package/lib/plugins/format-painter.d.ts +1 -1
- package/lib/plugins/heading.d.ts +1 -1
- package/lib/plugins/highlight.d.ts +1 -1
- package/lib/plugins/hr/hr-box.d.ts +4 -0
- package/lib/plugins/hr/index.d.ts +5 -0
- package/lib/{boxes/image.d.ts → plugins/image/image-box.d.ts} +2 -1
- package/lib/plugins/image/index.d.ts +5 -0
- package/lib/plugins/indent.d.ts +1 -1
- package/lib/plugins/italic.d.ts +1 -1
- package/lib/plugins/{link.d.ts → link/index.d.ts} +1 -1
- package/lib/plugins/link/insert-link.d.ts +3 -0
- package/lib/{ui → plugins/link}/link-popup.d.ts +3 -2
- package/lib/plugins/list.d.ts +1 -1
- package/lib/plugins/markdown.d.ts +1 -1
- package/lib/plugins/mention/index.d.ts +5 -0
- package/lib/plugins/mention/mention-box.d.ts +4 -0
- package/lib/{ui → plugins/mention}/mention-menu.d.ts +4 -3
- package/lib/plugins/paste.d.ts +1 -1
- package/lib/plugins/redo.d.ts +1 -1
- package/lib/plugins/remove-format.d.ts +1 -1
- package/lib/plugins/select-all.d.ts +1 -1
- package/lib/plugins/shift-enter-key.d.ts +1 -1
- package/lib/plugins/{mention.d.ts → slash/index.d.ts} +1 -1
- package/lib/{config → plugins/slash}/slash-items.d.ts +1 -1
- package/lib/{ui → plugins/slash}/slash-menu.d.ts +5 -4
- package/lib/{types/slash.d.ts → plugins/slash/types.d.ts} +2 -2
- package/lib/plugins/special-character.d.ts +1 -1
- package/lib/plugins/strikethrough.d.ts +1 -1
- package/lib/plugins/subscript.d.ts +1 -1
- package/lib/plugins/superscript.d.ts +1 -1
- package/lib/plugins/tab-key.d.ts +1 -1
- package/lib/plugins/table/delete-column.d.ts +2 -0
- package/lib/plugins/table/delete-row.d.ts +2 -0
- package/lib/plugins/table/delete-table.d.ts +2 -0
- package/lib/plugins/{slash.d.ts → table/index.d.ts} +2 -1
- package/lib/plugins/table/insert-column.d.ts +4 -0
- package/lib/plugins/table/insert-row.d.ts +4 -0
- package/lib/plugins/table/insert-table.d.ts +3 -0
- package/lib/plugins/table/merge-cells.d.ts +3 -0
- package/lib/plugins/table/split-cell.d.ts +3 -0
- package/lib/plugins/table/utils.d.ts +6 -0
- package/lib/plugins/underline.d.ts +1 -1
- package/lib/plugins/undo.d.ts +1 -1
- package/lib/plugins/unlink.d.ts +1 -1
- package/lib/plugins/video/index.d.ts +5 -0
- package/lib/plugins/video/video-box.d.ts +4 -0
- package/lib/storage/editors.d.ts +1 -1
- package/lib/types/dropdown.d.ts +1 -0
- package/lib/types/native.d.ts +0 -8
- package/lib/types/node.d.ts +12 -0
- package/lib/types/object.d.ts +0 -24
- package/lib/types/selection.d.ts +14 -0
- package/lib/types/toolbar.d.ts +5 -5
- package/lib/ui/toolbar.d.ts +2 -2
- package/lib/utils/indent-block.d.ts +2 -0
- package/lib/utils/remove-empty-marks.d.ts +2 -0
- package/lib/utils/unsafe-template.d.ts +1 -0
- package/lib/utils/visible-info.d.ts +10 -0
- package/package.json +19 -18
- package/lib/boxes/code-block.d.ts +0 -3
- package/lib/boxes/emoji.d.ts +0 -3
- package/lib/boxes/equation.d.ts +0 -3
- package/lib/boxes/file.d.ts +0 -3
- package/lib/boxes/hr.d.ts +0 -3
- package/lib/boxes/mention.d.ts +0 -3
- package/lib/boxes/video.d.ts +0 -3
- package/lib/operations/fix-list.d.ts +0 -2
- package/lib/operations/insert-fragment.d.ts +0 -3
- package/lib/operations/insert-link.d.ts +0 -3
- package/lib/operations/insert-node.d.ts +0 -3
- package/lib/plugins/code-block.d.ts +0 -3
- package/lib/plugins/emoji.d.ts +0 -3
- package/lib/plugins/equation.d.ts +0 -3
- package/lib/plugins/file.d.ts +0 -3
- package/lib/plugins/hr.d.ts +0 -3
- package/lib/plugins/image.d.ts +0 -3
- package/lib/plugins/video.d.ts +0 -3
- package/lib/utils/index.d.ts +0 -33
- package/lib/utils/is-visible.d.ts +0 -8
- package/lib/utils/safe-template.d.ts +0 -1
- package/lib/utils/set-block-indent.d.ts +0 -2
- /package/lib/{types/mention.d.ts → plugins/mention/types.d.ts} +0 -0
package/lib/lake.css
CHANGED
|
@@ -83,6 +83,14 @@
|
|
|
83
83
|
padding: 0;
|
|
84
84
|
margin-bottom: 8px;
|
|
85
85
|
}
|
|
86
|
+
.lake-container a {
|
|
87
|
+
color: var(--lake-link-color);
|
|
88
|
+
text-decoration: none;
|
|
89
|
+
}
|
|
90
|
+
.lake-container a:hover {
|
|
91
|
+
color: var(--lake-link-hover-color);
|
|
92
|
+
text-decoration: underline;
|
|
93
|
+
}
|
|
86
94
|
.lake-drop-indication {
|
|
87
95
|
position: absolute;
|
|
88
96
|
height: 2px;
|
|
@@ -682,53 +690,6 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
682
690
|
margin-bottom: 8px;
|
|
683
691
|
}
|
|
684
692
|
|
|
685
|
-
.lake-container a {
|
|
686
|
-
color: var(--lake-link-color);
|
|
687
|
-
text-decoration: none;
|
|
688
|
-
}
|
|
689
|
-
.lake-container a:hover {
|
|
690
|
-
color: var(--lake-link-hover-color);
|
|
691
|
-
text-decoration: underline;
|
|
692
|
-
}
|
|
693
|
-
.lake-link-popup {
|
|
694
|
-
position: absolute;
|
|
695
|
-
top: 0;
|
|
696
|
-
left: 0;
|
|
697
|
-
z-index: var(--lake-popup-z-index);
|
|
698
|
-
border: 1px solid var(--lake-popup-border-color);
|
|
699
|
-
border-radius: 5px;
|
|
700
|
-
padding: 16px;
|
|
701
|
-
width: fit-content;
|
|
702
|
-
background-color: #fff;
|
|
703
|
-
box-shadow: var(--lake-popup-shadow);
|
|
704
|
-
display: none;
|
|
705
|
-
}
|
|
706
|
-
.lake-link-popup .lake-url-row {
|
|
707
|
-
display: flex;
|
|
708
|
-
align-items: center;
|
|
709
|
-
}
|
|
710
|
-
.lake-link-popup .lake-button-row {
|
|
711
|
-
padding-top: 16px;
|
|
712
|
-
display: flex;
|
|
713
|
-
align-items: center;
|
|
714
|
-
justify-content: space-between;
|
|
715
|
-
}
|
|
716
|
-
.lake-link-popup input[type="text"] {
|
|
717
|
-
width: 220px;
|
|
718
|
-
margin-right: 4px;
|
|
719
|
-
}
|
|
720
|
-
.lake-link-popup button[name="copy"] svg:first-child {
|
|
721
|
-
display: inline;
|
|
722
|
-
}
|
|
723
|
-
.lake-link-popup button[name="copy"] svg:nth-child(2) {
|
|
724
|
-
display: none;
|
|
725
|
-
fill: var(--lake-success-color);
|
|
726
|
-
}
|
|
727
|
-
.lake-link-popup button[name="copy"] svg:last-child {
|
|
728
|
-
display: none;
|
|
729
|
-
fill: var(--lake-error-color);
|
|
730
|
-
}
|
|
731
|
-
|
|
732
693
|
.lake-container ol,
|
|
733
694
|
.lake-container ul {
|
|
734
695
|
list-style: none;
|
|
@@ -886,17 +847,120 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
886
847
|
background-color: #f43f5e24;
|
|
887
848
|
}
|
|
888
849
|
|
|
850
|
+
.lake-toolbar {
|
|
851
|
+
box-sizing: border-box;
|
|
852
|
+
font-family: var(--lake-font-family);
|
|
853
|
+
font-size: 14px;
|
|
854
|
+
font-weight: normal;
|
|
855
|
+
line-height: normal;
|
|
856
|
+
padding: 4px;
|
|
857
|
+
display: flex;
|
|
858
|
+
flex-wrap: wrap;
|
|
859
|
+
align-items: center;
|
|
860
|
+
}
|
|
861
|
+
.lake-toolbar *,
|
|
862
|
+
.lake-toolbar ::before,
|
|
863
|
+
.lake-toolbar ::after {
|
|
864
|
+
box-sizing: border-box;
|
|
865
|
+
}
|
|
866
|
+
.lake-toolbar .lake-toolbar-divider {
|
|
867
|
+
width: 1px;
|
|
868
|
+
height: 20px;
|
|
869
|
+
margin: 0 4px;
|
|
870
|
+
border-left: 1px solid var(--lake-border-color);
|
|
871
|
+
user-select: none;
|
|
872
|
+
}
|
|
873
|
+
.lake-toolbar .lake-upload {
|
|
874
|
+
line-height: 0;
|
|
875
|
+
}
|
|
876
|
+
.lake-toolbar .lake-upload input[type="file"] {
|
|
877
|
+
display: none;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.lake-floating-toolbar {
|
|
881
|
+
position: absolute;
|
|
882
|
+
top: 0;
|
|
883
|
+
left: 0;
|
|
884
|
+
z-index: var(--lake-popup-z-index);
|
|
885
|
+
border: 1px solid var(--lake-border-color);
|
|
886
|
+
border-radius: 5px;
|
|
887
|
+
background-color: #fff;
|
|
888
|
+
box-shadow: var(--lake-button-shadow);
|
|
889
|
+
padding: 4px;
|
|
890
|
+
display: flex;
|
|
891
|
+
align-items: center;
|
|
892
|
+
}
|
|
893
|
+
.lake-floating-toolbar .lake-toolbar-divider {
|
|
894
|
+
width: 1px;
|
|
895
|
+
height: 20px;
|
|
896
|
+
margin: 0 4px;
|
|
897
|
+
border-left: 1px solid var(--lake-border-color);
|
|
898
|
+
user-select: none;
|
|
899
|
+
}
|
|
900
|
+
|
|
889
901
|
.lake-container table {
|
|
890
|
-
display:
|
|
902
|
+
display: table;
|
|
891
903
|
border-collapse: collapse;
|
|
892
904
|
border: 0;
|
|
893
905
|
margin: 20px 0;
|
|
894
|
-
overflow
|
|
906
|
+
overflow: visible;
|
|
907
|
+
}
|
|
908
|
+
.lake-container table tr,
|
|
909
|
+
.lake-container table tr:nth-child(n) {
|
|
910
|
+
border: 0;
|
|
911
|
+
background-color: transparent;
|
|
895
912
|
}
|
|
896
913
|
.lake-container table td {
|
|
914
|
+
font-size: var(--lake-font-size);
|
|
897
915
|
padding: 8px 16px;
|
|
916
|
+
min-width: 33px;
|
|
898
917
|
border: 1px solid var(--lake-border-color);
|
|
899
918
|
}
|
|
919
|
+
.lake-container table td p {
|
|
920
|
+
margin-bottom: 0;
|
|
921
|
+
}
|
|
922
|
+
.lake-container table td.lake-td-focused {
|
|
923
|
+
outline: var(--lake-input-outline);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.lake-link-popup {
|
|
927
|
+
position: absolute;
|
|
928
|
+
top: 0;
|
|
929
|
+
left: 0;
|
|
930
|
+
z-index: var(--lake-popup-z-index);
|
|
931
|
+
border: 1px solid var(--lake-popup-border-color);
|
|
932
|
+
border-radius: 5px;
|
|
933
|
+
padding: 16px;
|
|
934
|
+
width: fit-content;
|
|
935
|
+
background-color: #fff;
|
|
936
|
+
box-shadow: var(--lake-popup-shadow);
|
|
937
|
+
display: none;
|
|
938
|
+
}
|
|
939
|
+
.lake-link-popup .lake-url-row {
|
|
940
|
+
display: flex;
|
|
941
|
+
align-items: center;
|
|
942
|
+
}
|
|
943
|
+
.lake-link-popup .lake-button-row {
|
|
944
|
+
padding-top: 16px;
|
|
945
|
+
display: flex;
|
|
946
|
+
align-items: center;
|
|
947
|
+
justify-content: space-between;
|
|
948
|
+
}
|
|
949
|
+
.lake-link-popup input[type="text"] {
|
|
950
|
+
width: 220px;
|
|
951
|
+
margin-right: 4px;
|
|
952
|
+
}
|
|
953
|
+
.lake-link-popup button[name="copy"] svg:first-child {
|
|
954
|
+
display: inline;
|
|
955
|
+
}
|
|
956
|
+
.lake-link-popup button[name="copy"] svg:nth-child(2) {
|
|
957
|
+
display: none;
|
|
958
|
+
fill: var(--lake-success-color);
|
|
959
|
+
}
|
|
960
|
+
.lake-link-popup button[name="copy"] svg:last-child {
|
|
961
|
+
display: none;
|
|
962
|
+
fill: var(--lake-error-color);
|
|
963
|
+
}
|
|
900
964
|
|
|
901
965
|
lake-box[name="hr"] {
|
|
902
966
|
margin-bottom: 8px;
|
|
@@ -1310,18 +1374,6 @@ lake-box[name="equation"] .lake-box-activated .lake-equation-form {
|
|
|
1310
1374
|
background-color: var(--lake-box-background-color);
|
|
1311
1375
|
}
|
|
1312
1376
|
|
|
1313
|
-
.lake-mention {
|
|
1314
|
-
border: 1px solid transparent;
|
|
1315
|
-
border-radius: 2px;
|
|
1316
|
-
}
|
|
1317
|
-
.lake-container[readonly="false"] .lake-mention a:hover {
|
|
1318
|
-
color: var(--lake-link-color);
|
|
1319
|
-
text-decoration: none;
|
|
1320
|
-
}
|
|
1321
|
-
lake-box[name="mention"] .lake-box-focused .lake-mention {
|
|
1322
|
-
border-color: var(--lake-selection-background-color);
|
|
1323
|
-
background-color: var(--lake-selection-background-color);
|
|
1324
|
-
}
|
|
1325
1377
|
.lake-mention-menu {
|
|
1326
1378
|
max-height: 208px;
|
|
1327
1379
|
}
|
|
@@ -1344,6 +1396,19 @@ lake-box[name="mention"] .lake-box-focused .lake-mention {
|
|
|
1344
1396
|
color: #8c8c8c;
|
|
1345
1397
|
}
|
|
1346
1398
|
|
|
1399
|
+
.lake-mention {
|
|
1400
|
+
border: 1px solid transparent;
|
|
1401
|
+
border-radius: 2px;
|
|
1402
|
+
}
|
|
1403
|
+
.lake-container[readonly="false"] .lake-mention a:hover {
|
|
1404
|
+
color: var(--lake-link-color);
|
|
1405
|
+
text-decoration: none;
|
|
1406
|
+
}
|
|
1407
|
+
lake-box[name="mention"] .lake-box-focused .lake-mention {
|
|
1408
|
+
border-color: var(--lake-selection-background-color);
|
|
1409
|
+
background-color: var(--lake-selection-background-color);
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1347
1412
|
.lake-slash-menu {
|
|
1348
1413
|
max-height: 330px;
|
|
1349
1414
|
}
|
|
@@ -1375,54 +1440,3 @@ lake-box[name="mention"] .lake-box-focused .lake-mention {
|
|
|
1375
1440
|
.lake-slash-menu .lake-slash-description {
|
|
1376
1441
|
color: #8c8c8c;
|
|
1377
1442
|
}
|
|
1378
|
-
|
|
1379
|
-
.lake-toolbar {
|
|
1380
|
-
box-sizing: border-box;
|
|
1381
|
-
font-family: var(--lake-font-family);
|
|
1382
|
-
font-size: 14px;
|
|
1383
|
-
font-weight: normal;
|
|
1384
|
-
line-height: normal;
|
|
1385
|
-
padding: 4px;
|
|
1386
|
-
display: flex;
|
|
1387
|
-
flex-wrap: wrap;
|
|
1388
|
-
align-items: center;
|
|
1389
|
-
}
|
|
1390
|
-
.lake-toolbar *,
|
|
1391
|
-
.lake-toolbar ::before,
|
|
1392
|
-
.lake-toolbar ::after {
|
|
1393
|
-
box-sizing: border-box;
|
|
1394
|
-
}
|
|
1395
|
-
.lake-toolbar .lake-toolbar-divider {
|
|
1396
|
-
width: 1px;
|
|
1397
|
-
height: 20px;
|
|
1398
|
-
margin: 0 4px;
|
|
1399
|
-
border-left: 1px solid var(--lake-border-color);
|
|
1400
|
-
user-select: none;
|
|
1401
|
-
}
|
|
1402
|
-
.lake-toolbar .lake-upload {
|
|
1403
|
-
line-height: 0;
|
|
1404
|
-
}
|
|
1405
|
-
.lake-toolbar .lake-upload input[type="file"] {
|
|
1406
|
-
display: none;
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
.lake-floating-toolbar {
|
|
1410
|
-
position: absolute;
|
|
1411
|
-
top: 0;
|
|
1412
|
-
left: 0;
|
|
1413
|
-
z-index: var(--lake-popup-z-index);
|
|
1414
|
-
border: 1px solid var(--lake-border-color);
|
|
1415
|
-
border-radius: 5px;
|
|
1416
|
-
background-color: #fff;
|
|
1417
|
-
box-shadow: 0 2px 0 #00000005;
|
|
1418
|
-
padding: 4px;
|
|
1419
|
-
display: flex;
|
|
1420
|
-
align-items: center;
|
|
1421
|
-
}
|
|
1422
|
-
.lake-floating-toolbar .lake-toolbar-divider {
|
|
1423
|
-
width: 1px;
|
|
1424
|
-
height: 20px;
|
|
1425
|
-
margin: 0 4px;
|
|
1426
|
-
border-left: 1px solid var(--lake-border-color);
|
|
1427
|
-
user-select: none;
|
|
1428
|
-
}
|