lakelib 0.2.4 → 0.2.6
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 +3 -3
- package/dist/lake.css +102 -79
- package/dist/lake.min.js +34 -49
- package/dist/lake.min.js.map +1 -1
- package/lib/{types/css → css}/index.d.ts +2 -0
- package/lib/{types/editor.d.ts → editor.d.ts} +1 -1
- package/lib/{types/i18n/ja → i18n/en-US}/index.d.ts +11 -0
- package/lib/{types/i18n/en-US → i18n/ja}/index.d.ts +11 -0
- package/lib/{types/i18n → i18n}/ko/index.d.ts +11 -0
- package/lib/{types/i18n → i18n}/types.d.ts +98 -9
- package/lib/{types/i18n → i18n}/zh-CN/index.d.ts +11 -0
- package/lib/lake.css +102 -79
- package/lib/lake.js +4947 -4609
- package/lib/lake.js.map +1 -1
- package/lib/{types/models → models}/box.d.ts +5 -3
- package/lib/types/corner-toolbar.d.ts +7 -0
- package/lib/types/{types/object.d.ts → object.d.ts} +3 -3
- package/lib/ui/corner-toolbar.d.ts +18 -0
- package/lib/ui/floating-toolbar.d.ts +16 -0
- package/lib/{types/ui → ui}/link-popup.d.ts +2 -2
- package/lib/{types/ui/box-resizer.d.ts → ui/resizer.d.ts} +6 -8
- package/lib/{types/ui → ui}/toolbar.d.ts +2 -2
- package/lib/{types/utils → utils}/index.d.ts +1 -1
- package/lib/utils/is-visible.d.ts +8 -0
- package/package.json +20 -20
- package/lib/types/types/box-toolbar.d.ts +0 -22
- package/lib/types/ui/box-toolbar.d.ts +0 -30
- package/lib/types/utils/node-position.d.ts +0 -9
- /package/lib/{types/boxes → boxes}/code-block.d.ts +0 -0
- /package/lib/{types/boxes → boxes}/emoji.d.ts +0 -0
- /package/lib/{types/boxes → boxes}/equation.d.ts +0 -0
- /package/lib/{types/boxes → boxes}/file.d.ts +0 -0
- /package/lib/{types/boxes → boxes}/hr.d.ts +0 -0
- /package/lib/{types/boxes → boxes}/image.d.ts +0 -0
- /package/lib/{types/boxes → boxes}/mention.d.ts +0 -0
- /package/lib/{types/boxes → boxes}/video.d.ts +0 -0
- /package/lib/{types/config → config}/element-rules.d.ts +0 -0
- /package/lib/{types/config → config}/menu-items.d.ts +0 -0
- /package/lib/{types/config → config}/slash-items.d.ts +0 -0
- /package/lib/{types/config → config}/tag-names.d.ts +0 -0
- /package/lib/{types/config → config}/toolbar-items.d.ts +0 -0
- /package/lib/{types/elements → elements}/bookmark.d.ts +0 -0
- /package/lib/{types/elements → elements}/box.d.ts +0 -0
- /package/lib/{types/i18n → i18n}/index.d.ts +0 -0
- /package/lib/{types/icons → icons}/index.d.ts +0 -0
- /package/lib/{types/index.d.ts → index.d.ts} +0 -0
- /package/lib/{types/managers → managers}/box-manager.d.ts +0 -0
- /package/lib/{types/managers → managers}/command.d.ts +0 -0
- /package/lib/{types/managers → managers}/history.d.ts +0 -0
- /package/lib/{types/managers → managers}/keystroke.d.ts +0 -0
- /package/lib/{types/managers → managers}/plugin.d.ts +0 -0
- /package/lib/{types/managers → managers}/selection.d.ts +0 -0
- /package/lib/{types/models → models}/fragment.d.ts +0 -0
- /package/lib/{types/models → models}/nodes.d.ts +0 -0
- /package/lib/{types/models → models}/range.d.ts +0 -0
- /package/lib/{types/operations → operations}/add-mark.d.ts +0 -0
- /package/lib/{types/operations → operations}/delete-contents.d.ts +0 -0
- /package/lib/{types/operations → operations}/fix-list.d.ts +0 -0
- /package/lib/{types/operations → operations}/insert-bookmark.d.ts +0 -0
- /package/lib/{types/operations → operations}/insert-box.d.ts +0 -0
- /package/lib/{types/operations → operations}/insert-fragment.d.ts +0 -0
- /package/lib/{types/operations → operations}/insert-link.d.ts +0 -0
- /package/lib/{types/operations → operations}/insert-node.d.ts +0 -0
- /package/lib/{types/operations → operations}/remove-box.d.ts +0 -0
- /package/lib/{types/operations → operations}/remove-mark.d.ts +0 -0
- /package/lib/{types/operations → operations}/set-blocks.d.ts +0 -0
- /package/lib/{types/operations → operations}/split-block.d.ts +0 -0
- /package/lib/{types/operations → operations}/split-marks.d.ts +0 -0
- /package/lib/{types/operations → operations}/to-bookmark.d.ts +0 -0
- /package/lib/{types/parsers → parsers}/html-parser.d.ts +0 -0
- /package/lib/{types/parsers → parsers}/text-parser.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/align.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/arrow-keys.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/backspace-key.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/block-quote.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/bold.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/code-block.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/code.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/copy.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/cut.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/delete-key.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/drop.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/emoji.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/enter-key.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/equation.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/escape-key.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/file.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/font-color.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/font-family.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/font-size.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/format-painter.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/heading.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/highlight.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/hr.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/image.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/indent.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/italic.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/link.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/list.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/markdown.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/mention.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/paste.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/redo.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/remove-format.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/select-all.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/shift-enter-key.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/slash.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/special-character.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/strikethrough.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/subscript.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/superscript.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/tab-key.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/underline.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/undo.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/unlink.d.ts +0 -0
- /package/lib/{types/plugins → plugins}/video.d.ts +0 -0
- /package/lib/{types/storage → storage}/box-instances.d.ts +0 -0
- /package/lib/{types/storage → storage}/boxes.d.ts +0 -0
- /package/lib/{types/storage → storage}/editors.d.ts +0 -0
- /package/lib/types/{types/box.d.ts → box.d.ts} +0 -0
- /package/lib/types/{types/dropdown.d.ts → dropdown.d.ts} +0 -0
- /package/lib/types/{types/mention.d.ts → mention.d.ts} +0 -0
- /package/lib/types/{types/native.d.ts → native.d.ts} +0 -0
- /package/lib/types/{types/node.d.ts → node.d.ts} +0 -0
- /package/lib/types/{types/plugin.d.ts → plugin.d.ts} +0 -0
- /package/lib/types/{types/request.d.ts → request.d.ts} +0 -0
- /package/lib/types/{types/slash.d.ts → slash.d.ts} +0 -0
- /package/lib/types/{types/toolbar.d.ts → toolbar.d.ts} +0 -0
- /package/lib/{types/ui → ui}/button.d.ts +0 -0
- /package/lib/{types/ui → ui}/dropdown.d.ts +0 -0
- /package/lib/{types/ui → ui}/mention-menu.d.ts +0 -0
- /package/lib/{types/ui → ui}/menu.d.ts +0 -0
- /package/lib/{types/ui → ui}/slash-menu.d.ts +0 -0
- /package/lib/{types/utils → utils}/append-break.d.ts +0 -0
- /package/lib/{types/utils → utils}/camel-case.d.ts +0 -0
- /package/lib/{types/utils → utils}/change-tag-name.d.ts +0 -0
- /package/lib/{types/utils → utils}/debug.d.ts +0 -0
- /package/lib/{types/utils → utils}/denormalize-value.d.ts +0 -0
- /package/lib/{types/utils → utils}/encode.d.ts +0 -0
- /package/lib/{types/utils → utils}/file-size.d.ts +0 -0
- /package/lib/{types/utils → utils}/fix-numbered-list.d.ts +0 -0
- /package/lib/{types/utils → utils}/from-base64.d.ts +0 -0
- /package/lib/{types/utils → utils}/get-box.d.ts +0 -0
- /package/lib/{types/utils → utils}/get-css.d.ts +0 -0
- /package/lib/{types/utils → utils}/get-deep-element.d.ts +0 -0
- /package/lib/{types/utils → utils}/in-string.d.ts +0 -0
- /package/lib/{types/utils → utils}/merge-nodes.d.ts +0 -0
- /package/lib/{types/utils → utils}/modifier-text.d.ts +0 -0
- /package/lib/{types/utils → utils}/morph.d.ts +0 -0
- /package/lib/{types/utils → utils}/normalize-value.d.ts +0 -0
- /package/lib/{types/utils → utils}/parse-style.d.ts +0 -0
- /package/lib/{types/utils → utils}/query.d.ts +0 -0
- /package/lib/{types/utils → utils}/remove-break.d.ts +0 -0
- /package/lib/{types/utils → utils}/remove-zws.d.ts +0 -0
- /package/lib/{types/utils → utils}/request.d.ts +0 -0
- /package/lib/{types/utils → utils}/safe-template.d.ts +0 -0
- /package/lib/{types/utils → utils}/scroll-to-node.d.ts +0 -0
- /package/lib/{types/utils → utils}/set-block-indent.d.ts +0 -0
- /package/lib/{types/utils → utils}/split-nodes.d.ts +0 -0
- /package/lib/{types/utils → utils}/template.d.ts +0 -0
- /package/lib/{types/utils → utils}/to-base64.d.ts +0 -0
- /package/lib/{types/utils → utils}/to-hex.d.ts +0 -0
- /package/lib/{types/utils → utils}/to-node-list.d.ts +0 -0
- /package/lib/{types/utils → utils}/upload-file.d.ts +0 -0
- /package/lib/{types/utils → utils}/wrap-node-list.d.ts +0 -0
|
@@ -8,6 +8,7 @@ import './dropdown.css';
|
|
|
8
8
|
import './popup.css';
|
|
9
9
|
import './menu.css';
|
|
10
10
|
import './resizer.css';
|
|
11
|
+
import './corner-toolbar.css';
|
|
11
12
|
import './format-painter.css';
|
|
12
13
|
import './heading.css';
|
|
13
14
|
import './link.css';
|
|
@@ -24,3 +25,4 @@ import './equation.css';
|
|
|
24
25
|
import './mention.css';
|
|
25
26
|
import './slash.css';
|
|
26
27
|
import './toolbar.css';
|
|
28
|
+
import './floating-toolbar.css';
|
|
@@ -73,6 +73,7 @@ export declare class Editor {
|
|
|
73
73
|
private resetUnsavedInputData;
|
|
74
74
|
private handleInputEvent;
|
|
75
75
|
private bindInputEvents;
|
|
76
|
+
private removeBoxGarbage;
|
|
76
77
|
private bindHistoryEvents;
|
|
77
78
|
get hasFocus(): boolean;
|
|
78
79
|
get locale(): TranslationFunctions;
|
|
@@ -80,7 +81,6 @@ export declare class Editor {
|
|
|
80
81
|
setPluginConfig(name: string, config: {
|
|
81
82
|
[key: string]: any;
|
|
82
83
|
}): void;
|
|
83
|
-
removeBoxGarbage(): void;
|
|
84
84
|
renderBoxes(): void;
|
|
85
85
|
focus(): void;
|
|
86
86
|
blur(): void;
|
|
@@ -102,6 +102,17 @@ declare const _default: {
|
|
|
102
102
|
loadingError: string;
|
|
103
103
|
zoomOut: string;
|
|
104
104
|
zoomIn: string;
|
|
105
|
+
align: string;
|
|
106
|
+
alignLeft: string;
|
|
107
|
+
alignCenter: string;
|
|
108
|
+
alignRight: string;
|
|
109
|
+
resize: string;
|
|
110
|
+
pageWidth: string;
|
|
111
|
+
originalWidth: string;
|
|
112
|
+
imageWidth: string;
|
|
113
|
+
open: string;
|
|
114
|
+
caption: string;
|
|
115
|
+
captionPlaceholder: string;
|
|
105
116
|
};
|
|
106
117
|
file: {
|
|
107
118
|
download: string;
|
|
@@ -102,6 +102,17 @@ declare const _default: {
|
|
|
102
102
|
loadingError: string;
|
|
103
103
|
zoomOut: string;
|
|
104
104
|
zoomIn: string;
|
|
105
|
+
align: string;
|
|
106
|
+
alignLeft: string;
|
|
107
|
+
alignCenter: string;
|
|
108
|
+
alignRight: string;
|
|
109
|
+
resize: string;
|
|
110
|
+
pageWidth: string;
|
|
111
|
+
originalWidth: string;
|
|
112
|
+
imageWidth: "{0} 画像サイズ";
|
|
113
|
+
open: string;
|
|
114
|
+
caption: string;
|
|
115
|
+
captionPlaceholder: string;
|
|
105
116
|
};
|
|
106
117
|
file: {
|
|
107
118
|
download: string;
|
|
@@ -102,6 +102,17 @@ declare const _default: {
|
|
|
102
102
|
loadingError: string;
|
|
103
103
|
zoomOut: string;
|
|
104
104
|
zoomIn: string;
|
|
105
|
+
align: string;
|
|
106
|
+
alignLeft: string;
|
|
107
|
+
alignCenter: string;
|
|
108
|
+
alignRight: string;
|
|
109
|
+
resize: string;
|
|
110
|
+
pageWidth: string;
|
|
111
|
+
originalWidth: string;
|
|
112
|
+
imageWidth: "{0} 이미지 크기";
|
|
113
|
+
open: string;
|
|
114
|
+
caption: string;
|
|
115
|
+
captionPlaceholder: string;
|
|
105
116
|
};
|
|
106
117
|
file: {
|
|
107
118
|
download: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseTranslation as BaseTranslationType, LocalizedString } from 'typesafe-i18n';
|
|
1
|
+
import type { BaseTranslation as BaseTranslationType, LocalizedString, RequiredParams } from 'typesafe-i18n';
|
|
2
2
|
export type BaseTranslation = BaseTranslationType;
|
|
3
3
|
export type BaseLocale = 'en-US';
|
|
4
4
|
export type Locales = 'en-US' | 'ja' | 'ko' | 'zh-CN';
|
|
@@ -51,7 +51,7 @@ type RootTranslation = {
|
|
|
51
51
|
*/
|
|
52
52
|
alignRight: string;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Justify
|
|
55
55
|
*/
|
|
56
56
|
alignJustify: string;
|
|
57
57
|
/**
|
|
@@ -343,7 +343,7 @@ type RootTranslation = {
|
|
|
343
343
|
*/
|
|
344
344
|
url: string;
|
|
345
345
|
/**
|
|
346
|
-
*
|
|
346
|
+
* Text to display
|
|
347
347
|
*/
|
|
348
348
|
title: string;
|
|
349
349
|
/**
|
|
@@ -385,7 +385,7 @@ type RootTranslation = {
|
|
|
385
385
|
*/
|
|
386
386
|
close: string;
|
|
387
387
|
/**
|
|
388
|
-
*
|
|
388
|
+
* Unable to load image.
|
|
389
389
|
*/
|
|
390
390
|
loadingError: string;
|
|
391
391
|
/**
|
|
@@ -396,6 +396,51 @@ type RootTranslation = {
|
|
|
396
396
|
* Zoom in
|
|
397
397
|
*/
|
|
398
398
|
zoomIn: string;
|
|
399
|
+
/**
|
|
400
|
+
* Alignment
|
|
401
|
+
*/
|
|
402
|
+
align: string;
|
|
403
|
+
/**
|
|
404
|
+
* Align left
|
|
405
|
+
*/
|
|
406
|
+
alignLeft: string;
|
|
407
|
+
/**
|
|
408
|
+
* Align center
|
|
409
|
+
*/
|
|
410
|
+
alignCenter: string;
|
|
411
|
+
/**
|
|
412
|
+
* Align right
|
|
413
|
+
*/
|
|
414
|
+
alignRight: string;
|
|
415
|
+
/**
|
|
416
|
+
* Resize image
|
|
417
|
+
*/
|
|
418
|
+
resize: string;
|
|
419
|
+
/**
|
|
420
|
+
* Page width
|
|
421
|
+
*/
|
|
422
|
+
pageWidth: string;
|
|
423
|
+
/**
|
|
424
|
+
* Original image width
|
|
425
|
+
*/
|
|
426
|
+
originalWidth: string;
|
|
427
|
+
/**
|
|
428
|
+
* {0} image width
|
|
429
|
+
* @param {unknown} 0
|
|
430
|
+
*/
|
|
431
|
+
imageWidth: RequiredParams<'0'>;
|
|
432
|
+
/**
|
|
433
|
+
* Open image in new tab
|
|
434
|
+
*/
|
|
435
|
+
open: string;
|
|
436
|
+
/**
|
|
437
|
+
* Caption
|
|
438
|
+
*/
|
|
439
|
+
caption: string;
|
|
440
|
+
/**
|
|
441
|
+
* Write a caption...
|
|
442
|
+
*/
|
|
443
|
+
captionPlaceholder: string;
|
|
399
444
|
};
|
|
400
445
|
file: {
|
|
401
446
|
/**
|
|
@@ -441,7 +486,7 @@ type RootTranslation = {
|
|
|
441
486
|
*/
|
|
442
487
|
save: string;
|
|
443
488
|
/**
|
|
444
|
-
*
|
|
489
|
+
* Supported functions
|
|
445
490
|
*/
|
|
446
491
|
help: string;
|
|
447
492
|
/**
|
|
@@ -497,7 +542,7 @@ export type TranslationFunctions = {
|
|
|
497
542
|
*/
|
|
498
543
|
alignRight: () => LocalizedString;
|
|
499
544
|
/**
|
|
500
|
-
*
|
|
545
|
+
* Justify
|
|
501
546
|
*/
|
|
502
547
|
alignJustify: () => LocalizedString;
|
|
503
548
|
/**
|
|
@@ -789,7 +834,7 @@ export type TranslationFunctions = {
|
|
|
789
834
|
*/
|
|
790
835
|
url: () => LocalizedString;
|
|
791
836
|
/**
|
|
792
|
-
*
|
|
837
|
+
* Text to display
|
|
793
838
|
*/
|
|
794
839
|
title: () => LocalizedString;
|
|
795
840
|
/**
|
|
@@ -831,7 +876,7 @@ export type TranslationFunctions = {
|
|
|
831
876
|
*/
|
|
832
877
|
close: () => LocalizedString;
|
|
833
878
|
/**
|
|
834
|
-
*
|
|
879
|
+
* Unable to load image.
|
|
835
880
|
*/
|
|
836
881
|
loadingError: () => LocalizedString;
|
|
837
882
|
/**
|
|
@@ -842,6 +887,50 @@ export type TranslationFunctions = {
|
|
|
842
887
|
* Zoom in
|
|
843
888
|
*/
|
|
844
889
|
zoomIn: () => LocalizedString;
|
|
890
|
+
/**
|
|
891
|
+
* Alignment
|
|
892
|
+
*/
|
|
893
|
+
align: () => LocalizedString;
|
|
894
|
+
/**
|
|
895
|
+
* Align left
|
|
896
|
+
*/
|
|
897
|
+
alignLeft: () => LocalizedString;
|
|
898
|
+
/**
|
|
899
|
+
* Align center
|
|
900
|
+
*/
|
|
901
|
+
alignCenter: () => LocalizedString;
|
|
902
|
+
/**
|
|
903
|
+
* Align right
|
|
904
|
+
*/
|
|
905
|
+
alignRight: () => LocalizedString;
|
|
906
|
+
/**
|
|
907
|
+
* Resize image
|
|
908
|
+
*/
|
|
909
|
+
resize: () => LocalizedString;
|
|
910
|
+
/**
|
|
911
|
+
* Page width
|
|
912
|
+
*/
|
|
913
|
+
pageWidth: () => LocalizedString;
|
|
914
|
+
/**
|
|
915
|
+
* Original image width
|
|
916
|
+
*/
|
|
917
|
+
originalWidth: () => LocalizedString;
|
|
918
|
+
/**
|
|
919
|
+
* {0} image width
|
|
920
|
+
*/
|
|
921
|
+
imageWidth: (arg0: unknown) => LocalizedString;
|
|
922
|
+
/**
|
|
923
|
+
* Open image in new tab
|
|
924
|
+
*/
|
|
925
|
+
open: () => LocalizedString;
|
|
926
|
+
/**
|
|
927
|
+
* Caption
|
|
928
|
+
*/
|
|
929
|
+
caption: () => LocalizedString;
|
|
930
|
+
/**
|
|
931
|
+
* Write a caption...
|
|
932
|
+
*/
|
|
933
|
+
captionPlaceholder: () => LocalizedString;
|
|
845
934
|
};
|
|
846
935
|
file: {
|
|
847
936
|
/**
|
|
@@ -887,7 +976,7 @@ export type TranslationFunctions = {
|
|
|
887
976
|
*/
|
|
888
977
|
save: () => LocalizedString;
|
|
889
978
|
/**
|
|
890
|
-
*
|
|
979
|
+
* Supported functions
|
|
891
980
|
*/
|
|
892
981
|
help: () => LocalizedString;
|
|
893
982
|
/**
|
|
@@ -102,6 +102,17 @@ declare const _default: {
|
|
|
102
102
|
loadingError: string;
|
|
103
103
|
zoomOut: string;
|
|
104
104
|
zoomIn: string;
|
|
105
|
+
align: string;
|
|
106
|
+
alignLeft: string;
|
|
107
|
+
alignCenter: string;
|
|
108
|
+
alignRight: string;
|
|
109
|
+
resize: string;
|
|
110
|
+
pageWidth: string;
|
|
111
|
+
originalWidth: string;
|
|
112
|
+
imageWidth: "{0} 图片大小";
|
|
113
|
+
open: string;
|
|
114
|
+
caption: string;
|
|
115
|
+
captionPlaceholder: string;
|
|
105
116
|
};
|
|
106
117
|
file: {
|
|
107
118
|
download: string;
|
package/lib/lake.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
/*
|
|
2
|
+
/* common */
|
|
3
3
|
--lake-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
|
|
4
|
-
|
|
4
|
+
--lake-font-size: 16px;
|
|
5
5
|
--lake-text-color: #000000e0;
|
|
6
6
|
--lake-secondary-text-color: #000000a6;
|
|
7
7
|
--lake-border-color: #d9d9d9;
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
--lake-success-color: #52c41a;
|
|
11
11
|
--lake-warning-color: #faad14;
|
|
12
12
|
--lake-error-color: #ff4d4f;
|
|
13
|
-
/* z-index */
|
|
14
|
-
--lake-z-index-popup: 822;
|
|
15
13
|
/* selection */
|
|
16
14
|
--lake-selection-background-color: #1ba2e333;
|
|
17
15
|
/* link */
|
|
@@ -21,12 +19,16 @@
|
|
|
21
19
|
--lake-box-border-color: #d9d9d9;
|
|
22
20
|
--lake-box-border-focus-color: #1677ff;
|
|
23
21
|
--lake-box-background-color: #f6f8fa;
|
|
22
|
+
/* popup */
|
|
23
|
+
--lake-popup-z-index: 822;
|
|
24
|
+
--lake-popup-font-size: 14px;
|
|
25
|
+
--lake-popup-border-color: #d9d9d9;
|
|
26
|
+
--lake-popup-shadow: 0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d;
|
|
24
27
|
/* button */
|
|
28
|
+
--lake-button-font-size: 14px;
|
|
25
29
|
--lake-button-shadow: 0 2px 0 #00000005;
|
|
26
30
|
--lake-button-outline: 2px solid #69b1ff;
|
|
27
|
-
/*
|
|
28
|
-
--lake-popup-shadow: 0 6px 16px 0 #00000014, 0 3px 6px -4px #0000001f, 0 9px 28px 8px #0000000d;
|
|
29
|
-
/* input form */
|
|
31
|
+
/* input element, text field */
|
|
30
32
|
--lake-input-border-color: #d9d9d9;
|
|
31
33
|
--lake-input-border-hover-color: #69b1ff;
|
|
32
34
|
--lake-input-outline: 2px solid #69b1ff;
|
|
@@ -47,7 +49,7 @@
|
|
|
47
49
|
.lake-container {
|
|
48
50
|
box-sizing: border-box;
|
|
49
51
|
font-family: var(--lake-font-family);
|
|
50
|
-
font-size:
|
|
52
|
+
font-size: var(--lake-font-size);
|
|
51
53
|
font-weight: normal;
|
|
52
54
|
line-height: 1.45;
|
|
53
55
|
padding: 16px 24px;
|
|
@@ -156,73 +158,20 @@ lake-box .lake-box-container {
|
|
|
156
158
|
display: block;
|
|
157
159
|
align-self: center;
|
|
158
160
|
}
|
|
159
|
-
|
|
160
|
-
lake-box .lake-box-
|
|
161
|
-
lake-box .lake-box-
|
|
162
|
-
lake-box .lake-box-activated .lake-button-group {
|
|
161
|
+
lake-box .lake-box-hovered .lake-corner-toolbar,
|
|
162
|
+
lake-box .lake-box-focused .lake-corner-toolbar,
|
|
163
|
+
lake-box .lake-box-activated .lake-corner-toolbar {
|
|
163
164
|
display: flex;
|
|
164
165
|
}
|
|
165
166
|
lake-box .lake-box-focused .lake-resizer {
|
|
166
167
|
display: block;
|
|
167
168
|
}
|
|
168
|
-
lake-box .lake-button-group {
|
|
169
|
-
position: absolute;
|
|
170
|
-
top: 8px;
|
|
171
|
-
right: 8px;
|
|
172
|
-
z-index: 2;
|
|
173
|
-
border-radius: 4px;
|
|
174
|
-
background-color: rgba(0, 0, 0, .4);
|
|
175
|
-
line-height: 0;
|
|
176
|
-
display: flex;
|
|
177
|
-
align-items: center;
|
|
178
|
-
padding: 0 6px;
|
|
179
|
-
display: none;
|
|
180
|
-
}
|
|
181
|
-
lake-box .lake-button-group button {
|
|
182
|
-
border-radius: 5px;
|
|
183
|
-
border: 0;
|
|
184
|
-
color: var(--lake-text-color);
|
|
185
|
-
background-color: transparent;
|
|
186
|
-
padding: 0;
|
|
187
|
-
margin: 0;
|
|
188
|
-
line-height: 0;
|
|
189
|
-
cursor: pointer;
|
|
190
|
-
user-select: none;
|
|
191
|
-
}
|
|
192
|
-
lake-box .lake-button-group button svg {
|
|
193
|
-
fill: #fff;
|
|
194
|
-
width: 16px;
|
|
195
|
-
height: 16px;
|
|
196
|
-
margin: 6px;
|
|
197
|
-
}
|
|
198
|
-
/* box toolbar */
|
|
199
|
-
.lake-box-toolbar {
|
|
200
|
-
position: absolute;
|
|
201
|
-
top: 0;
|
|
202
|
-
left: 0;
|
|
203
|
-
z-index: var(--lake-z-index-popup);
|
|
204
|
-
border: 1px solid var(--lake-border-color);
|
|
205
|
-
border-radius: 5px;
|
|
206
|
-
background-color: #fff;
|
|
207
|
-
box-shadow: 0 2px 0 #00000005;
|
|
208
|
-
padding: 4px;
|
|
209
|
-
display: flex;
|
|
210
|
-
flex-wrap: wrap;
|
|
211
|
-
align-items: center;
|
|
212
|
-
}
|
|
213
|
-
.lake-box-toolbar .lake-toolbar-divider {
|
|
214
|
-
width: 1px;
|
|
215
|
-
height: 20px;
|
|
216
|
-
margin: 0 4px;
|
|
217
|
-
border-left: 1px solid var(--lake-border-color);
|
|
218
|
-
user-select: none;
|
|
219
|
-
}
|
|
220
169
|
|
|
221
170
|
button.lake-button {
|
|
222
171
|
border-radius: 5px;
|
|
223
172
|
border: 0;
|
|
224
173
|
font-family: Arial;
|
|
225
|
-
font-size:
|
|
174
|
+
font-size: var(--lake-button-font-size);
|
|
226
175
|
color: var(--lake-text-color);
|
|
227
176
|
background-color: #fff;
|
|
228
177
|
padding: 0;
|
|
@@ -287,14 +236,14 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
287
236
|
position: relative;
|
|
288
237
|
font-family: var(--lake-font-family);
|
|
289
238
|
color: var(--lake-text-color);
|
|
290
|
-
font-size:
|
|
239
|
+
font-size: var(--lake-button-font-size);
|
|
291
240
|
user-select: none;
|
|
292
241
|
}
|
|
293
242
|
.lake-dropdown button.lake-dropdown-title {
|
|
294
243
|
border-radius: 5px;
|
|
295
244
|
border: 0;
|
|
296
245
|
font-family: Arial;
|
|
297
|
-
font-size:
|
|
246
|
+
font-size: var(--lake-button-font-size);
|
|
298
247
|
color: var(--lake-text-color);
|
|
299
248
|
background-color: #fff;
|
|
300
249
|
padding: 0;
|
|
@@ -366,11 +315,11 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
366
315
|
position: absolute;
|
|
367
316
|
top: 30px;
|
|
368
317
|
left: 0;
|
|
369
|
-
z-index: var(--lake-z-index
|
|
318
|
+
z-index: var(--lake-popup-z-index);
|
|
370
319
|
list-style: none;
|
|
371
320
|
margin: 0;
|
|
372
321
|
padding: 6px 0;
|
|
373
|
-
border: 1px solid var(--lake-border-color);
|
|
322
|
+
border: 1px solid var(--lake-popup-border-color);
|
|
374
323
|
border-radius: 5px;
|
|
375
324
|
background-color: #fff;
|
|
376
325
|
box-shadow: var(--lake-popup-shadow);
|
|
@@ -536,7 +485,7 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
536
485
|
}
|
|
537
486
|
.lake-color-dropdown-menu li:first-child .lake-dropdown-menu-text {
|
|
538
487
|
width: 100%;
|
|
539
|
-
font-size:
|
|
488
|
+
font-size: var(--lake-button-font-size);
|
|
540
489
|
border: 1px solid transparent;
|
|
541
490
|
height: auto;
|
|
542
491
|
}
|
|
@@ -544,7 +493,7 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
544
493
|
.lake-popup {
|
|
545
494
|
box-sizing: border-box;
|
|
546
495
|
font-family: var(--lake-font-family);
|
|
547
|
-
font-size:
|
|
496
|
+
font-size: var(--lake-popup-font-size);
|
|
548
497
|
font-weight: normal;
|
|
549
498
|
line-height: normal;
|
|
550
499
|
color: var(--lake-text-color);
|
|
@@ -554,12 +503,12 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
554
503
|
.lake-popup ::after {
|
|
555
504
|
box-sizing: border-box;
|
|
556
505
|
}
|
|
557
|
-
.lake-popup button {
|
|
506
|
+
.lake-popup .lake-text-button {
|
|
558
507
|
box-shadow: var(--lake-button-shadow);
|
|
559
508
|
}
|
|
560
509
|
.lake-popup input[type="text"] {
|
|
561
510
|
font-family: var(--lake-font-family);
|
|
562
|
-
font-size:
|
|
511
|
+
font-size: var(--lake-popup-font-size);
|
|
563
512
|
color: var(--lake-text-color);
|
|
564
513
|
border-radius: 5px;
|
|
565
514
|
border: 1px solid var(--lake-input-border-color);
|
|
@@ -580,9 +529,9 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
580
529
|
position: absolute;
|
|
581
530
|
top: 0;
|
|
582
531
|
left: 0;
|
|
583
|
-
z-index: var(--lake-z-index
|
|
532
|
+
z-index: var(--lake-popup-z-index);
|
|
584
533
|
list-style: none;
|
|
585
|
-
border: 1px solid var(--lake-border-color);
|
|
534
|
+
border: 1px solid var(--lake-popup-border-color);
|
|
586
535
|
border-radius: 5px;
|
|
587
536
|
margin: 0;
|
|
588
537
|
padding: 4px 8px;
|
|
@@ -660,6 +609,37 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
660
609
|
display: none;
|
|
661
610
|
}
|
|
662
611
|
|
|
612
|
+
.lake-corner-toolbar {
|
|
613
|
+
position: absolute;
|
|
614
|
+
top: 8px;
|
|
615
|
+
right: 8px;
|
|
616
|
+
z-index: 2;
|
|
617
|
+
border-radius: 4px;
|
|
618
|
+
background-color: rgba(0, 0, 0, .4);
|
|
619
|
+
line-height: 0;
|
|
620
|
+
display: flex;
|
|
621
|
+
align-items: center;
|
|
622
|
+
padding: 0 6px;
|
|
623
|
+
display: none;
|
|
624
|
+
}
|
|
625
|
+
.lake-corner-toolbar button {
|
|
626
|
+
border-radius: 5px;
|
|
627
|
+
border: 0;
|
|
628
|
+
color: var(--lake-text-color);
|
|
629
|
+
background-color: transparent;
|
|
630
|
+
padding: 0;
|
|
631
|
+
margin: 0;
|
|
632
|
+
line-height: 0;
|
|
633
|
+
cursor: pointer;
|
|
634
|
+
user-select: none;
|
|
635
|
+
}
|
|
636
|
+
.lake-corner-toolbar button svg {
|
|
637
|
+
fill: #fff;
|
|
638
|
+
width: 16px;
|
|
639
|
+
height: 16px;
|
|
640
|
+
margin: 6px;
|
|
641
|
+
}
|
|
642
|
+
|
|
663
643
|
.lake-container.lake-format-painter {
|
|
664
644
|
/* file: ../svg/format-painter-cursor.svg */
|
|
665
645
|
cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='20' viewBox='0 0 600 400'%3E%3Cpath fill='none' d='M397 401H1V1h600v400H397m27.39-160.456v-37.606h5.963c41.821 0 83.642.024 125.463-.016 10.848-.01 17.325-6 17.358-16.286.096-30.823.1-61.648 0-92.471-.034-10.554-5.94-16.103-16.674-16.16-6.45-.035-12.899-.007-19.657-.007 0-8.783.063-17.08-.018-25.374-.079-7.94-3.319-11.204-11.29-11.207-73.81-.03-147.621-.034-221.432.004-8.106.004-11.091 3.142-11.096 11.293-.02 32.99-.02 65.98-.003 98.97.005 8.202 3.26 11.461 11.504 11.463 73.644.015 147.289.016 220.933-.002 8.157-.002 11.373-3.312 11.393-11.649.036-14.662.003-29.324.02-43.986.002-1.608.14-3.216.215-4.84h11.502v75.804h-5.843c-41.487 0-82.975-.005-124.462.003-12.796.002-18.147 5.394-18.162 18.306-.017 14.662.002 29.324-.015 43.987-.002 1.432-.153 2.865-.249 4.53-5.076 0-9.73.089-14.38-.027-3.776-.095-5.384 1.436-5.371 5.34.099 29.489-.097 58.98.155 88.468.142 16.617 14.312 30.632 30.552 30.954 17.736.352 32.858-12.285 33.16-29.098.542-30.313.202-60.641.302-90.963.011-3.525-1.706-4.728-4.922-4.686-3.832.05-7.676-.172-11.493.067-3.036.19-3.824-1.148-3.452-4.81M98.997 123.5v81.255H76.999v22.088h21.982c0 2.045.005 3.674 0 5.303-.087 25.83-.49 51.664-.091 77.487.143 9.23-2.38 16.953-7.836 24.049-.913 1.187-1.723 2.452-2.59 3.675-9.838 13.893-23.103 21.722-40.24 22.51-4.767.218-9.553.032-14.914.032v22.282c32.478 3.01 58.566-8.283 76.789-36.428 17.756 26.721 48.899 40.773 78.248 36.027l-1.083-21.66c-2.256 0-3.75-.08-5.232.012-21.104 1.302-37.87-6.871-50.84-23.287-6.506-8.233-10.772-16.802-10.401-28.137.833-25.47.26-50.985.26-76.482v-5.482h21.96v-22.25h-21.96v-5.966c0-32.329.294-64.663-.185-96.985-.141-9.484 1.949-17.494 7.541-25.066 12.268-16.61 27.766-26.975 49.095-26.868 3.12.015 6.24.002 10.04.002V27.314c-15.008-.802-29.72-.048-43.6 7.157-13.625 7.073-25.309 16.192-33.954 29.838-8.595-13.434-19.139-23.646-33.21-30.154-14.041-6.495-28.642-7.867-43.307-6.781V49.62c4.253 0 7.742.003 11.23 0 7.756-.006 14.966 1.724 22.189 4.873 10.95 4.774 18.144 12.992 24.784 22.4 5.426 7.69 8.207 15.646 7.43 25.118-.555 6.787-.107 13.657-.107 21.489z'/%3E%3Cpath fill='%23020202' d='M424.39 241.051c-.371 3.156.417 4.494 3.453 4.304 3.817-.239 7.661-.017 11.493-.067 3.216-.042 4.933 1.161 4.922 4.686-.1 30.322.24 60.65-.303 90.963-.3 16.813-15.423 29.45-33.159 29.098-16.24-.322-30.41-14.337-30.552-30.954-.252-29.488-.056-58.98-.155-88.469-.013-3.903 1.595-5.434 5.371-5.34 4.65.117 9.304.028 14.38.028.096-1.665.247-3.098.249-4.53.017-14.663-.002-29.325.015-43.987.015-12.912 5.366-18.304 18.162-18.306 41.487-.008 82.975-.003 124.462-.003h5.843V102.67H537.07c-.075 1.624-.213 3.232-.215 4.84-.017 14.662.016 29.324-.02 43.986-.02 8.337-3.236 11.647-11.393 11.649-73.644.018-147.289.017-220.933.002-8.244-.002-11.5-3.261-11.504-11.462-.016-32.99-.017-65.98.003-98.97.005-8.152 2.99-11.29 11.096-11.294 73.81-.038 147.622-.034 221.433-.004 7.97.003 11.21 3.266 11.289 11.207.081 8.295.018 16.59.018 25.374 6.758 0 13.208-.028 19.657.006 10.734.058 16.64 5.607 16.674 16.16.1 30.824.096 61.649 0 92.472-.033 10.286-6.51 16.275-17.358 16.286-41.821.04-83.642.016-125.463.016h-5.962v38.113z'/%3E%3Cpath fill='%23040404' d='M98.997 123c0-7.332-.448-14.202.108-20.989.776-9.472-2.005-17.429-7.431-25.118-6.64-9.408-13.834-17.626-24.784-22.4-7.223-3.15-14.433-4.879-22.189-4.873-3.488.003-6.977 0-11.23 0V27.374c14.665-1.086 29.266.286 43.307 6.78 14.071 6.51 24.615 16.72 33.21 30.155 8.645-13.646 20.33-22.765 33.954-29.838 13.88-7.205 28.592-7.959 43.6-7.157V49.61c-3.8 0-6.92.013-10.04-.002-21.329-.107-36.827 10.259-49.095 26.868-5.592 7.572-7.682 15.582-7.541 25.066.479 32.322.185 64.656.186 96.985v5.966h21.958v22.25h-21.958v5.482c0 25.497.572 51.013-.261 76.482-.37 11.335 3.895 19.904 10.4 28.137 12.97 16.416 29.737 24.589 50.84 23.287 1.483-.092 2.977-.012 5.233-.012l1.083 21.66c-29.349 4.746-60.492-9.306-78.248-36.027-18.223 28.145-44.31 39.438-76.79 36.428v-22.282c5.362 0 10.148.186 14.914-.033 17.138-.787 30.403-8.616 40.242-22.509.866-1.223 1.676-2.488 2.589-3.675 5.455-7.096 7.979-14.82 7.836-24.05-.4-25.822.004-51.656.09-77.486.006-1.63 0-3.258 0-5.303H77v-22.088h21.997V123z'/%3E%3C/svg%3E") 2 2, text;
|
|
@@ -714,8 +694,8 @@ button.lake-primary-button.lake-button-hovered {
|
|
|
714
694
|
position: absolute;
|
|
715
695
|
top: 0;
|
|
716
696
|
left: 0;
|
|
717
|
-
z-index: var(--lake-z-index
|
|
718
|
-
border: 1px solid var(--lake-border-color);
|
|
697
|
+
z-index: var(--lake-popup-z-index);
|
|
698
|
+
border: 1px solid var(--lake-popup-border-color);
|
|
719
699
|
border-radius: 5px;
|
|
720
700
|
padding: 16px;
|
|
721
701
|
width: fit-content;
|
|
@@ -1043,6 +1023,28 @@ lake-box[name="codeBlock"] .lake-box-activated .lake-code-block .lake-dropdown {
|
|
|
1043
1023
|
lake-box[name="image"] .lake-box-focused .lake-image {
|
|
1044
1024
|
border-color: var(--lake-box-border-focus-color);
|
|
1045
1025
|
}
|
|
1026
|
+
.lake-image-caption {
|
|
1027
|
+
-webkit-user-modify: read-write-plaintext-only;
|
|
1028
|
+
position: relative;
|
|
1029
|
+
font-size: 14px;
|
|
1030
|
+
line-height: normal;
|
|
1031
|
+
text-align: start;
|
|
1032
|
+
color: var(--lake-secondary-text-color);
|
|
1033
|
+
padding-top: 2px;
|
|
1034
|
+
padding-bottom: 8px;
|
|
1035
|
+
display: none;
|
|
1036
|
+
}
|
|
1037
|
+
.lake-image-caption:focus {
|
|
1038
|
+
outline: 0;
|
|
1039
|
+
}
|
|
1040
|
+
.lake-image-caption.lake-placeholder::before {
|
|
1041
|
+
position: absolute;
|
|
1042
|
+
top: 2px;
|
|
1043
|
+
left: 0;
|
|
1044
|
+
color: var(--lake-secondary-text-color);
|
|
1045
|
+
content: attr(placeholder);
|
|
1046
|
+
pointer-events: none;
|
|
1047
|
+
}
|
|
1046
1048
|
/* uploading status */
|
|
1047
1049
|
.lake-image-uploading .lake-image-img {
|
|
1048
1050
|
opacity: 0.5;
|
|
@@ -1160,7 +1162,7 @@ lake-box[name="video"] .lake-box-hovered .lake-resizer {
|
|
|
1160
1162
|
|
|
1161
1163
|
.lake-file {
|
|
1162
1164
|
position: relative;
|
|
1163
|
-
font-size:
|
|
1165
|
+
font-size: var(--lake-font-size);
|
|
1164
1166
|
font-weight: normal;
|
|
1165
1167
|
line-height: 0;
|
|
1166
1168
|
border: 1px solid transparent;
|
|
@@ -1312,7 +1314,7 @@ lake-box[name="equation"] .lake-box-activated .lake-equation-form {
|
|
|
1312
1314
|
border: 1px solid transparent;
|
|
1313
1315
|
border-radius: 2px;
|
|
1314
1316
|
}
|
|
1315
|
-
.lake-container[
|
|
1317
|
+
.lake-container[readonly="false"] .lake-mention a:hover {
|
|
1316
1318
|
color: var(--lake-link-color);
|
|
1317
1319
|
text-decoration: none;
|
|
1318
1320
|
}
|
|
@@ -1403,3 +1405,24 @@ lake-box[name="mention"] .lake-box-focused .lake-mention {
|
|
|
1403
1405
|
.lake-toolbar .lake-upload input[type="file"] {
|
|
1404
1406
|
display: none;
|
|
1405
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
|
+
}
|