reactjs-tiptap-editor 0.0.3 → 0.0.5
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/lib/components/icons/DeleteColumn.d.ts +4 -0
- package/lib/components/icons/DeleteRow.d.ts +4 -0
- package/lib/components/menus/components/TableBubbleMenu.d.ts +2 -0
- package/lib/constants/index.d.ts +1 -1
- package/lib/extensions/Table/index.d.ts +3 -4
- package/lib/extensions/Table/table.d.ts +2 -2
- package/lib/locales/index.d.ts +14 -12
- package/lib/locales/zh-cn.d.ts +127 -0
- package/lib/reactjs-tiptap-editor.js +1 -1
- package/lib/reactjs-tiptap-editor.mjs +2167 -2430
- package/lib/style.css +1 -1
- package/lib/types.d.ts +1 -1
- package/lib/{vendor-IlByxugU.mjs → vendor-B_w0TZys.mjs} +135 -100
- package/lib/{vendor-D85xV5eE.js → vendor-DlmsfAkr.js} +96 -96
- package/package.json +3 -2
- package/lib/extensions/Table/cell.d.ts +0 -6
- package/lib/extensions/Table/header.d.ts +0 -5
- package/lib/extensions/Table/menus/TableBubbleMenu.d.ts +0 -5
- package/lib/extensions/Table/menus/TableCell/TableCellMenu.d.ts +0 -21
- package/lib/extensions/Table/menus/TableColumn/TableColumnMenu.d.ts +0 -20
- package/lib/extensions/Table/menus/TableRow/TableRowMenu.d.ts +0 -20
- package/lib/extensions/Table/row.d.ts +0 -2
- package/lib/extensions/Table/utils.d.ts +0 -67
package/lib/constants/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare const COLORS_LIST: readonly ["#000000", "#262626", "#595959", "#8
|
|
|
25
25
|
/** Default font size list */
|
|
26
26
|
export declare const DEFAULT_FONT_SIZE_LIST: readonly ["10px", "11px", "12px", "14px", "16px", "18px", "20px", "22px", "24px", "26px", "28px", "36px", "48px", "72px"];
|
|
27
27
|
/** Default font size value */
|
|
28
|
-
export declare const DEFAULT_FONT_SIZE_VALUE: "
|
|
28
|
+
export declare const DEFAULT_FONT_SIZE_VALUE: "default";
|
|
29
29
|
/** Options for setting image size in the bubble menu */
|
|
30
30
|
export declare enum IMAGE_SIZE {
|
|
31
31
|
'size-small' = 200,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { TableRowOptions } from '@tiptap/extension-table-row';
|
|
1
|
+
export { type TableRowOptions, TableRow } from '@tiptap/extension-table-row';
|
|
3
2
|
export { Table, type TableOptions } from './table';
|
|
3
|
+
export { TableCell, type TableCellOptions } from '@tiptap/extension-table-cell';
|
|
4
|
+
export { TableHeader, type TableHeaderOptions } from '@tiptap/extension-table-header';
|
|
4
5
|
export { TableCellBackground, type TableCellBackgroundOptions } from './cell-background';
|
|
5
|
-
export { TableHeader, type TableHeaderOptions } from './header';
|
|
6
|
-
export { TableRow } from './row';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { TableCellOptions } from '@tiptap/extension-table-cell';
|
|
2
|
+
import { TableHeaderOptions } from '@tiptap/extension-table-header';
|
|
1
3
|
import { TableRowOptions } from '@tiptap/extension-table-row';
|
|
2
4
|
import { GeneralOptions } from '../../types';
|
|
3
|
-
import { TableCellOptions } from './cell';
|
|
4
5
|
import { TableCellBackgroundOptions } from './cell-background';
|
|
5
|
-
import { TableHeaderOptions } from './header';
|
|
6
6
|
|
|
7
7
|
export interface TableOptions extends GeneralOptions<TableOptions> {
|
|
8
8
|
HTMLAttributes: Record<string, any>;
|
package/lib/locales/index.d.ts
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
+
type LanguageType = 'en' | 'vi' | 'zh_CN';
|
|
1
2
|
interface LocaleInterface {
|
|
2
|
-
lang:
|
|
3
|
-
message: Record<
|
|
3
|
+
lang: LanguageType;
|
|
4
|
+
message: Record<LanguageType, Record<string, string>>;
|
|
4
5
|
}
|
|
5
6
|
export declare const DEFAULT_LOCALE: LocaleInterface;
|
|
6
7
|
declare class Locale {
|
|
7
8
|
private emitter;
|
|
8
9
|
constructor();
|
|
9
|
-
get lang():
|
|
10
|
-
set lang(lang:
|
|
11
|
-
get message(): Record<
|
|
12
|
-
set message(message: Record<
|
|
13
|
-
loadLangMessage(lang:
|
|
10
|
+
get lang(): LanguageType;
|
|
11
|
+
set lang(lang: LanguageType);
|
|
12
|
+
get message(): Record<LanguageType, Record<string, string>>;
|
|
13
|
+
set message(message: Record<LanguageType, Record<string, string>>);
|
|
14
|
+
loadLangMessage(lang: LanguageType): Record<string, string>;
|
|
14
15
|
private isLangSupported;
|
|
15
|
-
setLang(lang:
|
|
16
|
-
registerWatchLang(hook: (lang:
|
|
16
|
+
setLang(lang: LanguageType): void;
|
|
17
|
+
registerWatchLang(hook: (lang: LanguageType) => void): {
|
|
17
18
|
unsubscribe: () => void;
|
|
18
19
|
};
|
|
19
|
-
setMessage(lang:
|
|
20
|
-
buildLocalesHandler(lang?:
|
|
20
|
+
setMessage(lang: LanguageType, message: Record<string, string>): void;
|
|
21
|
+
buildLocalesHandler(lang?: LanguageType): (path: string) => string;
|
|
21
22
|
}
|
|
22
23
|
declare const locale: Locale;
|
|
23
24
|
declare const useLocale: () => {
|
|
24
|
-
lang:
|
|
25
|
+
lang: LanguageType;
|
|
25
26
|
t: (path: string) => string;
|
|
26
27
|
};
|
|
27
28
|
declare const localeActions: {
|
|
@@ -31,3 +32,4 @@ export default locale;
|
|
|
31
32
|
export { Locale, useLocale, localeActions };
|
|
32
33
|
export { default as en } from './en';
|
|
33
34
|
export { default as vi } from './vi';
|
|
35
|
+
export { default as zh_CN } from './zh-cn';
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
declare const locale: {
|
|
2
|
+
'editor.remove': string;
|
|
3
|
+
'editor.copy': string;
|
|
4
|
+
'editor.words': string;
|
|
5
|
+
'editor.characters': string;
|
|
6
|
+
'editor.default': string;
|
|
7
|
+
'editor.recent': string;
|
|
8
|
+
'editor.nofill': string;
|
|
9
|
+
'editor.format': string;
|
|
10
|
+
'editor.draghandle.tooltip': string;
|
|
11
|
+
'editor.copyToClipboard': string;
|
|
12
|
+
'editor.importWord.tooltip': string;
|
|
13
|
+
'editor.slash': string;
|
|
14
|
+
'editor.slash.empty': string;
|
|
15
|
+
'editor.slash.format': string;
|
|
16
|
+
'editor.slash.insert': string;
|
|
17
|
+
'editor.slash.embed': string;
|
|
18
|
+
'editor.content': string;
|
|
19
|
+
'editor.fontFamily.tooltip': string;
|
|
20
|
+
'editor.fontFamily.default.tooltip': string;
|
|
21
|
+
'editor.moremark': string;
|
|
22
|
+
'editor.size.small.tooltip': string;
|
|
23
|
+
'editor.size.medium.tooltip': string;
|
|
24
|
+
'editor.size.large.tooltip': string;
|
|
25
|
+
'editor.bold.tooltip': string;
|
|
26
|
+
'editor.italic.tooltip': string;
|
|
27
|
+
'editor.underline.tooltip': string;
|
|
28
|
+
'editor.strike.tooltip': string;
|
|
29
|
+
'editor.color.tooltip': string;
|
|
30
|
+
'editor.color.more': string;
|
|
31
|
+
'editor.highlight.tooltip': string;
|
|
32
|
+
'editor.lineheight.tooltip': string;
|
|
33
|
+
'editor.heading.tooltip': string;
|
|
34
|
+
'editor.heading.h1.tooltip': string;
|
|
35
|
+
'editor.heading.h2.tooltip': string;
|
|
36
|
+
'editor.heading.h3.tooltip': string;
|
|
37
|
+
'editor.heading.h4.tooltip': string;
|
|
38
|
+
'editor.heading.h5.tooltip': string;
|
|
39
|
+
'editor.heading.h6.tooltip': string;
|
|
40
|
+
'editor.paragraph.tooltip': string;
|
|
41
|
+
'editor.textalign.tooltip': string;
|
|
42
|
+
'editor.textalign.left.tooltip': string;
|
|
43
|
+
'editor.textalign.center.tooltip': string;
|
|
44
|
+
'editor.textalign.right.tooltip': string;
|
|
45
|
+
'editor.textalign.justify.tooltip': string;
|
|
46
|
+
'editor.indent': string;
|
|
47
|
+
'editor.indent.indent': string;
|
|
48
|
+
'editor.indent.outdent': string;
|
|
49
|
+
'editor.fontSize.tooltip': string;
|
|
50
|
+
'editor.fontSize.default.tooltip': string;
|
|
51
|
+
'editor.superscript.tooltip': string;
|
|
52
|
+
'editor.subscript.tooltip': string;
|
|
53
|
+
'editor.bulletlist.tooltip': string;
|
|
54
|
+
'editor.orderedlist.tooltip': string;
|
|
55
|
+
'editor.tasklist.tooltip': string;
|
|
56
|
+
'editor.indent.tooltip': string;
|
|
57
|
+
'editor.outdent.tooltip': string;
|
|
58
|
+
'editor.columns.tooltip': string;
|
|
59
|
+
'editor.link.tooltip': string;
|
|
60
|
+
'editor.link.unlink.tooltip': string;
|
|
61
|
+
'editor.link.open.tooltip': string;
|
|
62
|
+
'editor.link.edit.tooltip': string;
|
|
63
|
+
'editor.link.dialog.title': string;
|
|
64
|
+
'editor.link.dialog.link': string;
|
|
65
|
+
'editor.link.dialog.text': string;
|
|
66
|
+
'editor.link.dialog.openInNewTab': string;
|
|
67
|
+
'editor.link.dialog.link.placeholder': string;
|
|
68
|
+
'editor.link.dialog.text.placeholder': string;
|
|
69
|
+
'editor.link.dialog.button.apply': string;
|
|
70
|
+
'editor.image.tooltip': string;
|
|
71
|
+
'editor.image.dragger.tooltip': string;
|
|
72
|
+
'editor.image.float.left.tooltip': string;
|
|
73
|
+
'editor.image.float.none.tooltip': string;
|
|
74
|
+
'editor.image.float.right.tooltip': string;
|
|
75
|
+
'editor.image.dialog.title': string;
|
|
76
|
+
'editor.image.dialog.tab.url': string;
|
|
77
|
+
'editor.image.dialog.tab.upload': string;
|
|
78
|
+
'editor.image.dialog.uploading': string;
|
|
79
|
+
'editor.image.dialog.form.link': string;
|
|
80
|
+
'editor.image.dialog.placeholder': string;
|
|
81
|
+
'editor.image.dialog.form.alt': string;
|
|
82
|
+
'editor.image.dialog.form.aspectRatio': string;
|
|
83
|
+
'editor.image.dialog.form.file': string;
|
|
84
|
+
'editor.image.dialog.button.apply': string;
|
|
85
|
+
'editor.video.tooltip': string;
|
|
86
|
+
'editor.video.dialog.tab.upload': string;
|
|
87
|
+
'editor.video.dialog.uploading': string;
|
|
88
|
+
'editor.video.dialog.title': string;
|
|
89
|
+
'editor.video.dialog.link': string;
|
|
90
|
+
'editor.video.dialog.placeholder': string;
|
|
91
|
+
'editor.video.dialog.button.apply': string;
|
|
92
|
+
'editor.table.tooltip': string;
|
|
93
|
+
'editor.table.menu.insert_table': string;
|
|
94
|
+
'editor.table.menu.insert_table.with_header_row': string;
|
|
95
|
+
'editor.table.menu.add_column_before': string;
|
|
96
|
+
'editor.table.menu.add_column_after': string;
|
|
97
|
+
'editor.table.menu.delete_column': string;
|
|
98
|
+
'editor.table.menu.add_row_before': string;
|
|
99
|
+
'editor.table.menu.add_row_after': string;
|
|
100
|
+
'editor.table.menu.delete_row': string;
|
|
101
|
+
'editor.table.menu.merge_or_split_cells': string;
|
|
102
|
+
'editor.table.menu.delete_table': string;
|
|
103
|
+
'editor.blockquote.tooltip': string;
|
|
104
|
+
'editor.horizontalrule.tooltip': string;
|
|
105
|
+
'editor.code.tooltip': string;
|
|
106
|
+
'editor.codeblock.tooltip': string;
|
|
107
|
+
'editor.clear.tooltip': string;
|
|
108
|
+
'editor.undo.tooltip': string;
|
|
109
|
+
'editor.redo.tooltip': string;
|
|
110
|
+
'editor.fullscreen.tooltip.fullscreen': string;
|
|
111
|
+
'editor.fullscreen.tooltip.exit': string;
|
|
112
|
+
'editor.imageUpload.fileTypeNotSupported': string;
|
|
113
|
+
'editor.imageUpload.fileSizeTooBig': string;
|
|
114
|
+
'editor.table.menu.insertColumnBefore': string;
|
|
115
|
+
'editor.table.menu.insertColumnAfter': string;
|
|
116
|
+
'editor.table.menu.deleteColumn': string;
|
|
117
|
+
'editor.table.menu.insertRowAbove': string;
|
|
118
|
+
'editor.table.menu.insertRowBelow': string;
|
|
119
|
+
'editor.table.menu.deleteRow': string;
|
|
120
|
+
'editor.table.menu.mergeCells': string;
|
|
121
|
+
'editor.table.menu.splitCells': string;
|
|
122
|
+
'editor.table.menu.deleteTable': string;
|
|
123
|
+
'editor.table.menu.setCellsBgColor': string;
|
|
124
|
+
'editor.emoji.tooltip': string;
|
|
125
|
+
'editor.iframe.tooltip': string;
|
|
126
|
+
};
|
|
127
|
+
export default locale;
|