@kennethmakjw/appflowy-editor-react19 0.0.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 +306 -0
- package/dist/ar-SA-B3W2Oswh.cjs +8 -0
- package/dist/ar-SA-CaPcPWVS.js +8 -0
- package/dist/ca-ES-DehQhAeM.js +8 -0
- package/dist/ca-ES-WjpoQZs5.cjs +8 -0
- package/dist/ckb-KU-Cc13dwJI.cjs +8 -0
- package/dist/ckb-KU-DXz5rZMu.js +8 -0
- package/dist/components/Leaf.d.ts +3 -0
- package/dist/components/element/BulletedList.d.ts +3 -0
- package/dist/components/element/Checkbox.d.ts +3 -0
- package/dist/components/element/CodeBlock/index.d.ts +3 -0
- package/dist/components/element/CodeBlock/useDecorate.d.ts +3 -0
- package/dist/components/element/CodeBlock/utils.d.ts +2 -0
- package/dist/components/element/Divider.d.ts +3 -0
- package/dist/components/element/Element.d.ts +3 -0
- package/dist/components/element/Heading.d.ts +3 -0
- package/dist/components/element/Image.d.ts +3 -0
- package/dist/components/element/LinkPreview.d.ts +3 -0
- package/dist/components/element/NumberedList.d.ts +3 -0
- package/dist/components/element/Quote.d.ts +3 -0
- package/dist/components/element/Table.d.ts +3 -0
- package/dist/components/element/TableCell.d.ts +3 -0
- package/dist/components/element/TableRow.d.ts +3 -0
- package/dist/components/element/index.d.ts +1 -0
- package/dist/components/fixed-toolbar/Aa.d.ts +2 -0
- package/dist/components/fixed-toolbar/BIUS.d.ts +4 -0
- package/dist/components/fixed-toolbar/Color.d.ts +2 -0
- package/dist/components/fixed-toolbar/FixedToolbar.d.ts +2 -0
- package/dist/components/fixed-toolbar/List.d.ts +2 -0
- package/dist/components/fixed-toolbar/index.d.ts +1 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/button.d.ts +15 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/loading-dots.d.ts +4 -0
- package/dist/components/ui/popover.d.ts +12 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/cs-CZ-B7cFODNF.js +8 -0
- package/dist/cs-CZ-BiGttx8Y.cjs +8 -0
- package/dist/de-DE-3L1r5Sau.cjs +8 -0
- package/dist/de-DE-CJLJMQlm.js +8 -0
- package/dist/dev/App.d.ts +1 -0
- package/dist/dev/MarkdownDemo.d.ts +2 -0
- package/dist/dev/i18n.d.ts +1 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/editor/Editor.d.ts +3 -0
- package/dist/editor/RichText.d.ts +12 -0
- package/dist/editor/context.d.ts +6 -0
- package/dist/editor/index.d.ts +2 -0
- package/dist/editor/useEditor.d.ts +5 -0
- package/dist/editor/useKeydown.d.ts +3 -0
- package/dist/es-VE-IXYuj5s7.js +8 -0
- package/dist/es-VE-ZvJoouw6.cjs +8 -0
- package/dist/eu-ES-BGs4iMYs.js +8 -0
- package/dist/eu-ES-DjInTP04.cjs +8 -0
- package/dist/fa-BCkDldDE.js +8 -0
- package/dist/fa-BsZBNwW8.cjs +8 -0
- package/dist/fr-CA-BlpVaep8.cjs +8 -0
- package/dist/fr-CA-v0JzOPW4.js +8 -0
- package/dist/fr-FR-CiKan-7_.cjs +8 -0
- package/dist/fr-FR-DsF3n-KY.js +8 -0
- package/dist/he-BwXJVdkh.cjs +8 -0
- package/dist/he-DtMbntw2.js +8 -0
- package/dist/hu-HU-B6cP2C9b.cjs +8 -0
- package/dist/hu-HU-BIfnlWEM.js +8 -0
- package/dist/i18n/config.d.ts +3 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/id-ID-AOveF0gP.js +8 -0
- package/dist/id-ID-cZS98QKP.cjs +8 -0
- package/dist/index.css +1593 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10266 -0
- package/dist/index.mjs +10250 -0
- package/dist/it-IT-DN-rTKuB.js +8 -0
- package/dist/it-IT-rGclB8nF.cjs +8 -0
- package/dist/ja-JP-BT23Z2YG.js +8 -0
- package/dist/ja-JP-DaiwUIKv.cjs +8 -0
- package/dist/ko-KR-CBlhTpPW.cjs +8 -0
- package/dist/ko-KR-DYwSdomr.js +8 -0
- package/dist/lib/color.d.ts +50 -0
- package/dist/lib/editor.d.ts +11 -0
- package/dist/lib/hotkeys.d.ts +66 -0
- package/dist/lib/list.d.ts +6 -0
- package/dist/lib/markdown.d.ts +3 -0
- package/dist/lib/mdast.d.ts +5 -0
- package/dist/lib/mdast.test.d.ts +1 -0
- package/dist/lib/transform.d.ts +7 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/locales/ar-SA.json +17 -0
- package/dist/locales/ca-ES.json +17 -0
- package/dist/locales/ckb-KU.json +5 -0
- package/dist/locales/cs-CZ.json +17 -0
- package/dist/locales/de-DE.json +17 -0
- package/dist/locales/en.json +38 -0
- package/dist/locales/es-VE.json +17 -0
- package/dist/locales/eu-ES.json +17 -0
- package/dist/locales/fa.json +17 -0
- package/dist/locales/fr-CA.json +17 -0
- package/dist/locales/fr-FR.json +17 -0
- package/dist/locales/he.json +17 -0
- package/dist/locales/hu-HU.json +17 -0
- package/dist/locales/id-ID.json +17 -0
- package/dist/locales/it-IT.json +17 -0
- package/dist/locales/ja-JP.json +17 -0
- package/dist/locales/ko-KR.json +17 -0
- package/dist/locales/pl-PL.json +17 -0
- package/dist/locales/pt-BR.json +17 -0
- package/dist/locales/pt-PT.json +17 -0
- package/dist/locales/ru-RU.json +17 -0
- package/dist/locales/sv-SE.json +17 -0
- package/dist/locales/th-TH.json +17 -0
- package/dist/locales/tr-TR.json +17 -0
- package/dist/locales/uk-UA.json +17 -0
- package/dist/locales/vi-VN.json +17 -0
- package/dist/locales/vi.json +17 -0
- package/dist/locales/zh-CN.json +17 -0
- package/dist/locales/zh-TW.json +17 -0
- package/dist/markdown-BidIaSbx.cjs +3274 -0
- package/dist/markdown-CeG0xHLH.js +3275 -0
- package/dist/pl-PL-C_wxsekf.js +8 -0
- package/dist/pl-PL-DBrdwSfX.cjs +8 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/withMarkdown.d.ts +2 -0
- package/dist/plugins/withPasted.d.ts +18 -0
- package/dist/pt-BR-CcIBbs5v.js +8 -0
- package/dist/pt-BR-CpCH-0Ym.cjs +8 -0
- package/dist/pt-PT-2DJTSiTI.js +8 -0
- package/dist/pt-PT-CuvXqmHX.cjs +8 -0
- package/dist/ru-RU-BcrEOraZ.cjs +8 -0
- package/dist/ru-RU-DZ-BGTMT.js +8 -0
- package/dist/sv-SE-B-1TVV6s.js +8 -0
- package/dist/sv-SE-EHxWN7g5.cjs +8 -0
- package/dist/th-TH-B2osIZz0.cjs +8 -0
- package/dist/th-TH-HhkGXVcg.js +8 -0
- package/dist/tr-TR-DKzjnjXz.js +8 -0
- package/dist/tr-TR-DPok6TDa.cjs +8 -0
- package/dist/types/element.d.ts +10 -0
- package/dist/types/index.d.ts +53 -0
- package/dist/uk-UA-CvadWbnH.cjs +8 -0
- package/dist/uk-UA-Us4Zq40s.js +8 -0
- package/dist/vi-DGchnzC4.cjs +8 -0
- package/dist/vi-DV4OvZ5s.js +8 -0
- package/dist/vi-VN-BZdQFzYv.js +8 -0
- package/dist/vi-VN-DzF53ZQz.cjs +8 -0
- package/dist/zh-CN-D7lPKvRq.js +8 -0
- package/dist/zh-CN-FWhRTZFL.cjs +8 -0
- package/dist/zh-TW-D24z6DBg.js +8 -0
- package/dist/zh-TW-DSEvmJwy.cjs +8 -0
- package/package.json +103 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Napisz coś...", "fontColorDefault": "Domyślny", "fontColorRed": "Czerwony", "fontColorGreen": "Zielony", "fontColorBlue": "Niebieski", "fontColorYellow": "Żółty", "fontColorOrange": "Pomarańczowy", "fontColorPurple": "Fioletowy", "fontColorPink": "Różowy", "fontColorBrown": "Brązowy", "fontColorGray": "Szary", "backgroundColorDefault": "Domyślny", "backgroundColorRed": "Czerwony" };
|
|
2
|
+
const plPL = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
plPL as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Napisz coś...", "fontColorDefault": "Domyślny", "fontColorRed": "Czerwony", "fontColorGreen": "Zielony", "fontColorBlue": "Niebieski", "fontColorYellow": "Żółty", "fontColorOrange": "Pomarańczowy", "fontColorPurple": "Fioletowy", "fontColorPink": "Różowy", "fontColorBrown": "Brązowy", "fontColorGray": "Szary", "backgroundColorDefault": "Domyślny", "backgroundColorRed": "Czerwony" };
|
|
4
|
+
const plPL = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = plPL;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactEditor } from 'slate-react';
|
|
2
|
+
import { Node, Text } from 'slate';
|
|
3
|
+
export declare const withPasted: (editor: ReactEditor) => ReactEditor;
|
|
4
|
+
interface AppFlowyFragment {
|
|
5
|
+
type: string;
|
|
6
|
+
data: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
};
|
|
9
|
+
children: [
|
|
10
|
+
{
|
|
11
|
+
type: 'text';
|
|
12
|
+
children: Text[];
|
|
13
|
+
},
|
|
14
|
+
...AppFlowyFragment[]
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
export declare function convertSlateFragmentTo(parsed: AppFlowyFragment[]): Node[];
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Escreva alguma coisa...", "fontColorDefault": "Padrão", "fontColorRed": "Vermelho", "fontColorGreen": "Verde", "fontColorBlue": "Azul", "fontColorYellow": "Amarelo", "fontColorOrange": "Laranja", "fontColorPurple": "Roxo", "fontColorPink": "Rosa", "fontColorBrown": "Marrom", "fontColorGray": "Cinza", "backgroundColorDefault": "Padrão", "backgroundColorRed": "Vermelho" };
|
|
2
|
+
const ptBR = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
ptBR as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Escreva alguma coisa...", "fontColorDefault": "Padrão", "fontColorRed": "Vermelho", "fontColorGreen": "Verde", "fontColorBlue": "Azul", "fontColorYellow": "Amarelo", "fontColorOrange": "Laranja", "fontColorPurple": "Roxo", "fontColorPink": "Rosa", "fontColorBrown": "Marrom", "fontColorGray": "Cinza", "backgroundColorDefault": "Padrão", "backgroundColorRed": "Vermelho" };
|
|
4
|
+
const ptBR = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = ptBR;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Escreva alguma coisa...", "fontColorDefault": "Padrão", "fontColorRed": "Vermelho", "fontColorGreen": "Verde", "fontColorBlue": "Azul", "fontColorYellow": "Amarelo", "fontColorOrange": "Laranja", "fontColorPurple": "Roxo", "fontColorPink": "Rosa", "fontColorBrown": "Marrom", "fontColorGray": "Cinza", "backgroundColorDefault": "Padrão", "backgroundColorRed": "Vermelho" };
|
|
2
|
+
const ptPT = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
ptPT as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Escreva alguma coisa...", "fontColorDefault": "Padrão", "fontColorRed": "Vermelho", "fontColorGreen": "Verde", "fontColorBlue": "Azul", "fontColorYellow": "Amarelo", "fontColorOrange": "Laranja", "fontColorPurple": "Roxo", "fontColorPink": "Rosa", "fontColorBrown": "Marrom", "fontColorGray": "Cinza", "backgroundColorDefault": "Padrão", "backgroundColorRed": "Vermelho" };
|
|
4
|
+
const ptPT = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = ptPT;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Напишите что-нибудь...", "fontColorDefault": "По умолчанию", "fontColorRed": "Красный", "fontColorGreen": "Зеленый", "fontColorBlue": "Синий", "fontColorYellow": "Желтый", "fontColorOrange": "Апельсин", "fontColorPurple": "Фиолетовый", "fontColorPink": "Розовый", "fontColorBrown": "Коричневый", "fontColorGray": "Серый", "backgroundColorDefault": "По умолчанию", "backgroundColorRed": "Красный" };
|
|
4
|
+
const ruRU = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = ruRU;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Напишите что-нибудь...", "fontColorDefault": "По умолчанию", "fontColorRed": "Красный", "fontColorGreen": "Зеленый", "fontColorBlue": "Синий", "fontColorYellow": "Желтый", "fontColorOrange": "Апельсин", "fontColorPurple": "Фиолетовый", "fontColorPink": "Розовый", "fontColorBrown": "Коричневый", "fontColorGray": "Серый", "backgroundColorDefault": "По умолчанию", "backgroundColorRed": "Красный" };
|
|
2
|
+
const ruRU = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
ruRU as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Skriv något...", "fontColorDefault": "Standard", "fontColorRed": "Röd", "fontColorGreen": "Grön", "fontColorBlue": "Blå", "fontColorYellow": "Gul", "fontColorOrange": "Orange", "fontColorPurple": "Purpur", "fontColorPink": "Rosa", "fontColorBrown": "Brun", "fontColorGray": "Grå", "backgroundColorDefault": "Standard", "backgroundColorRed": "Röd" };
|
|
2
|
+
const svSE = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
svSE as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Skriv något...", "fontColorDefault": "Standard", "fontColorRed": "Röd", "fontColorGreen": "Grön", "fontColorBlue": "Blå", "fontColorYellow": "Gul", "fontColorOrange": "Orange", "fontColorPurple": "Purpur", "fontColorPink": "Rosa", "fontColorBrown": "Brun", "fontColorGray": "Grå", "backgroundColorDefault": "Standard", "backgroundColorRed": "Röd" };
|
|
4
|
+
const svSE = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = svSE;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "เขียนอะไรบางอย่าง...", "fontColorDefault": "ค่าเริ่มต้น", "fontColorRed": "สีแดง", "fontColorGreen": "สีเขียว", "fontColorBlue": "สีฟ้า", "fontColorYellow": "สีเหลือง", "fontColorOrange": "ส้ม", "fontColorPurple": "สีม่วง", "fontColorPink": "สีชมพู", "fontColorBrown": "สีน้ำตาล", "fontColorGray": "สีเทา", "backgroundColorDefault": "ค่าเริ่มต้น", "backgroundColorRed": "สีแดง" };
|
|
4
|
+
const thTH = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = thTH;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "เขียนอะไรบางอย่าง...", "fontColorDefault": "ค่าเริ่มต้น", "fontColorRed": "สีแดง", "fontColorGreen": "สีเขียว", "fontColorBlue": "สีฟ้า", "fontColorYellow": "สีเหลือง", "fontColorOrange": "ส้ม", "fontColorPurple": "สีม่วง", "fontColorPink": "สีชมพู", "fontColorBrown": "สีน้ำตาล", "fontColorGray": "สีเทา", "backgroundColorDefault": "ค่าเริ่มต้น", "backgroundColorRed": "สีแดง" };
|
|
2
|
+
const thTH = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
thTH as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Bir şeyler yaz...", "fontColorDefault": "Varsayılan", "fontColorRed": "Kırmızı", "fontColorGreen": "Yeşil", "fontColorBlue": "Mavi", "fontColorYellow": "Sarı", "fontColorOrange": "Turuncu", "fontColorPurple": "Mor", "fontColorPink": "Pembe", "fontColorBrown": "Kahverengi", "fontColorGray": "Gri", "backgroundColorDefault": "Varsayılan", "backgroundColorRed": "Kırmızı" };
|
|
2
|
+
const trTR = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
trTR as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Bir şeyler yaz...", "fontColorDefault": "Varsayılan", "fontColorRed": "Kırmızı", "fontColorGreen": "Yeşil", "fontColorBlue": "Mavi", "fontColorYellow": "Sarı", "fontColorOrange": "Turuncu", "fontColorPurple": "Mor", "fontColorPink": "Pembe", "fontColorBrown": "Kahverengi", "fontColorGray": "Gri", "backgroundColorDefault": "Varsayılan", "backgroundColorRed": "Kırmızı" };
|
|
4
|
+
const trTR = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = trTR;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ElementData } from '../@types/editor';
|
|
2
|
+
export interface HeadingData extends ElementData {
|
|
3
|
+
level: number;
|
|
4
|
+
}
|
|
5
|
+
export interface CheckboxData extends ElementData {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface NumberedListData extends ElementData {
|
|
9
|
+
number?: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Op } from 'quill-delta';
|
|
3
|
+
export * from './element';
|
|
4
|
+
export interface AppFlowyEditor {
|
|
5
|
+
applyData: (data: EditorData) => void;
|
|
6
|
+
applyMarkdown: (markdown: string) => void;
|
|
7
|
+
getData: () => EditorData;
|
|
8
|
+
}
|
|
9
|
+
export declare enum NodeType {
|
|
10
|
+
Paragraph = "paragraph",
|
|
11
|
+
Heading = "heading",
|
|
12
|
+
NestedBlock = "nested-block",
|
|
13
|
+
Todo = "todo_list",
|
|
14
|
+
NumberedList = "numbered_list",
|
|
15
|
+
BulletedList = "bulleted_list",
|
|
16
|
+
Quote = "quote",
|
|
17
|
+
Code = "code",
|
|
18
|
+
LinkPreview = "link_preview",
|
|
19
|
+
Image = "image",
|
|
20
|
+
Divider = "divider",
|
|
21
|
+
Table = "simple_table",
|
|
22
|
+
TableRow = "simple_table_row",
|
|
23
|
+
TableCell = "simple_table_cell"
|
|
24
|
+
}
|
|
25
|
+
export declare enum InlineType {
|
|
26
|
+
Bold = "bold",
|
|
27
|
+
Italic = "italic",
|
|
28
|
+
Underline = "underline",
|
|
29
|
+
Strikethrough = "strikethrough",
|
|
30
|
+
FontColor = "font_color",
|
|
31
|
+
BgColor = "bg_color",
|
|
32
|
+
Href = "href"
|
|
33
|
+
}
|
|
34
|
+
export interface EditorNode {
|
|
35
|
+
type: NodeType;
|
|
36
|
+
children: EditorNode[];
|
|
37
|
+
data?: Record<string, unknown>;
|
|
38
|
+
delta?: Op[];
|
|
39
|
+
}
|
|
40
|
+
export type EditorData = EditorNode[];
|
|
41
|
+
export interface EditorLocale {
|
|
42
|
+
lang: string;
|
|
43
|
+
resources?: Record<string, string>;
|
|
44
|
+
}
|
|
45
|
+
export interface EditorProps {
|
|
46
|
+
initialValue?: EditorData;
|
|
47
|
+
onChange?: (value: EditorData) => void;
|
|
48
|
+
locale?: EditorLocale;
|
|
49
|
+
theme?: 'light' | 'dark';
|
|
50
|
+
readOnly?: boolean;
|
|
51
|
+
modalZIndex?: number;
|
|
52
|
+
ToolbarComponent?: FC;
|
|
53
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Напиши щось...", "fontColorDefault": "За замовчуванням", "fontColorRed": "Червоний", "fontColorGreen": "Зелений", "fontColorBlue": "Синій", "fontColorYellow": "Жовтий", "fontColorOrange": "Помаранчевий", "fontColorPurple": "Фіолетовий", "fontColorPink": "Рожевий", "fontColorBrown": "Коричневий", "fontColorGray": "Сірий", "backgroundColorDefault": "За замовчуванням", "backgroundColorRed": "Червоний" };
|
|
4
|
+
const ukUA = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = ukUA;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Напиши щось...", "fontColorDefault": "За замовчуванням", "fontColorRed": "Червоний", "fontColorGreen": "Зелений", "fontColorBlue": "Синій", "fontColorYellow": "Жовтий", "fontColorOrange": "Помаранчевий", "fontColorPurple": "Фіолетовий", "fontColorPink": "Рожевий", "fontColorBrown": "Коричневий", "fontColorGray": "Сірий", "backgroundColorDefault": "За замовчуванням", "backgroundColorRed": "Червоний" };
|
|
2
|
+
const ukUA = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
ukUA as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Viết gì đó...", "fontColorDefault": "Mặc định", "fontColorRed": "Màu đỏ", "fontColorGreen": "Màu xanh lá", "fontColorBlue": "Màu xanh da trời", "fontColorYellow": "Màu vàng", "fontColorOrange": "Quả cam", "fontColorPurple": "Màu tím", "fontColorPink": "Hồng", "fontColorBrown": "Màu nâu", "fontColorGray": "Xám", "backgroundColorDefault": "Mặc định", "backgroundColorRed": "Màu đỏ" };
|
|
4
|
+
const vi = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = vi;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Viết gì đó...", "fontColorDefault": "Mặc định", "fontColorRed": "Màu đỏ", "fontColorGreen": "Màu xanh lá", "fontColorBlue": "Màu xanh da trời", "fontColorYellow": "Màu vàng", "fontColorOrange": "Quả cam", "fontColorPurple": "Màu tím", "fontColorPink": "Hồng", "fontColorBrown": "Màu nâu", "fontColorGray": "Xám", "backgroundColorDefault": "Mặc định", "backgroundColorRed": "Màu đỏ" };
|
|
2
|
+
const vi = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
vi as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "Viết gì đó...", "fontColorDefault": "Mặc định", "fontColorRed": "Màu đỏ", "fontColorGreen": "Màu xanh lá", "fontColorBlue": "Màu xanh da trời", "fontColorYellow": "Màu vàng", "fontColorOrange": "Quả cam", "fontColorPurple": "Màu tím", "fontColorPink": "Hồng", "fontColorBrown": "Màu nâu", "fontColorGray": "Xám", "backgroundColorDefault": "Mặc định", "backgroundColorRed": "Màu đỏ" };
|
|
2
|
+
const viVN = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
viVN as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "Viết gì đó...", "fontColorDefault": "Mặc định", "fontColorRed": "Màu đỏ", "fontColorGreen": "Màu xanh lá", "fontColorBlue": "Màu xanh da trời", "fontColorYellow": "Màu vàng", "fontColorOrange": "Quả cam", "fontColorPurple": "Màu tím", "fontColorPink": "Hồng", "fontColorBrown": "Màu nâu", "fontColorGray": "Xám", "backgroundColorDefault": "Mặc định", "backgroundColorRed": "Màu đỏ" };
|
|
4
|
+
const viVN = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = viVN;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "写点东西...", "fontColorDefault": "默认", "fontColorRed": "红色的", "fontColorGreen": "绿色的", "fontColorBlue": "蓝色的", "fontColorYellow": "黄色的", "fontColorOrange": "橙子", "fontColorPurple": "紫色的", "fontColorPink": "粉色的", "fontColorBrown": "棕色的", "fontColorGray": "灰色的", "backgroundColorDefault": "默认", "backgroundColorRed": "红色的" };
|
|
2
|
+
const zhCN = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
zhCN as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "写点东西...", "fontColorDefault": "默认", "fontColorRed": "红色的", "fontColorGreen": "绿色的", "fontColorBlue": "蓝色的", "fontColorYellow": "黄色的", "fontColorOrange": "橙子", "fontColorPurple": "紫色的", "fontColorPink": "粉色的", "fontColorBrown": "棕色的", "fontColorGray": "灰色的", "backgroundColorDefault": "默认", "backgroundColorRed": "红色的" };
|
|
4
|
+
const zhCN = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = zhCN;
|
|
8
|
+
exports.editor = editor;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const editor = { "placeholder": "寫點東西...", "fontColorDefault": "預設", "fontColorRed": "紅色的", "fontColorGreen": "綠色的", "fontColorBlue": "藍色的", "fontColorYellow": "黃色的", "fontColorOrange": "橘子", "fontColorPurple": "紫色的", "fontColorPink": "粉紅色的", "fontColorBrown": "棕色的", "fontColorGray": "灰色的", "backgroundColorDefault": "預設", "backgroundColorRed": "紅色的" };
|
|
2
|
+
const zhTW = {
|
|
3
|
+
editor
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
zhTW as default,
|
|
7
|
+
editor
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const editor = { "placeholder": "寫點東西...", "fontColorDefault": "預設", "fontColorRed": "紅色的", "fontColorGreen": "綠色的", "fontColorBlue": "藍色的", "fontColorYellow": "黃色的", "fontColorOrange": "橘子", "fontColorPurple": "紫色的", "fontColorPink": "粉紅色的", "fontColorBrown": "棕色的", "fontColorGray": "灰色的", "backgroundColorDefault": "預設", "backgroundColorRed": "紅色的" };
|
|
4
|
+
const zhTW = {
|
|
5
|
+
editor
|
|
6
|
+
};
|
|
7
|
+
exports.default = zhTW;
|
|
8
|
+
exports.editor = editor;
|
package/package.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kennethmakjw/appflowy-editor-react19",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "AppFlowy Web Editor",
|
|
8
|
+
"author": "Appflowy",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/AppFlowy-IO/AppFlowy-Web-Editor.git"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"module": "dist/index.mjs",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"style": "./dist/index.css",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.mjs",
|
|
27
|
+
"require": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./locales/*": "./dist/locales/*",
|
|
30
|
+
"./style": "./dist/index.css"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"i18next": "^22.4.10 || ^26.0.0",
|
|
34
|
+
"i18next-resources-to-backend": "^1.2.1",
|
|
35
|
+
"react": "^18.3.1 || ^19.0.0",
|
|
36
|
+
"react-dom": "^18.3.1 || ^19.0.0",
|
|
37
|
+
"react-i18next": "^14.1.0",
|
|
38
|
+
"slate": "^0.112.0",
|
|
39
|
+
"slate-history": "^0.109.0 || ^0.110.3",
|
|
40
|
+
"slate-react": "^0.112.0"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@radix-ui/react-label": "^2.1.1",
|
|
44
|
+
"@radix-ui/react-popover": "^1.1.4",
|
|
45
|
+
"@radix-ui/react-select": "^2.1.4",
|
|
46
|
+
"@radix-ui/react-separator": "^1.1.1",
|
|
47
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
48
|
+
"@radix-ui/react-switch": "^1.1.2",
|
|
49
|
+
"@radix-ui/react-tooltip": "^1.1.6",
|
|
50
|
+
"class-variance-authority": "^0.7.1",
|
|
51
|
+
"clsx": "^2.1.1",
|
|
52
|
+
"is-hotkey": "^0.2.0",
|
|
53
|
+
"lucide-react": "^0.468.0",
|
|
54
|
+
"mdast-util-from-markdown": "^2.0.2",
|
|
55
|
+
"mdast-util-gfm": "^3.1.0",
|
|
56
|
+
"mdast-util-gfm-table": "^2.0.0",
|
|
57
|
+
"micromark-extension-gfm": "^3.0.0",
|
|
58
|
+
"micromark-extension-gfm-table": "^2.1.1",
|
|
59
|
+
"prismjs": "^1.29.0",
|
|
60
|
+
"quill-delta": "^5.1.0",
|
|
61
|
+
"sass": "^1.83.0",
|
|
62
|
+
"tailwind-merge": "^2.5.5",
|
|
63
|
+
"tailwindcss": "^3.4.16",
|
|
64
|
+
"tailwindcss-animate": "^1.0.7"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@eslint/js": "^9.15.0",
|
|
68
|
+
"@types/is-hotkey": "^0.1.10",
|
|
69
|
+
"@types/jest": "^30.0.0",
|
|
70
|
+
"@types/mdast": "^4.0.4",
|
|
71
|
+
"@types/node": "^22.10.2",
|
|
72
|
+
"@types/prismjs": "^1.26.5",
|
|
73
|
+
"@types/react": "^18.3.12 || ^19.0.0",
|
|
74
|
+
"@types/react-dom": "^18.3.1 || ^19.0.0",
|
|
75
|
+
"react": "^18.3.1 || ^19.0.0",
|
|
76
|
+
"react-dom": "^18.3.1 || ^19.0.0",
|
|
77
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
78
|
+
"autoprefixer": "^10.4.20",
|
|
79
|
+
"eslint": "^9.15.0",
|
|
80
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
81
|
+
"eslint-plugin-react-refresh": "^0.4.14",
|
|
82
|
+
"globals": "^15.12.0",
|
|
83
|
+
"jest": "^30.0.3",
|
|
84
|
+
"postcss": "^8.4.49",
|
|
85
|
+
"rollup-plugin-visualizer": "^5.12.0",
|
|
86
|
+
"ts-jest": "^29.4.0",
|
|
87
|
+
"typescript": "5.8.3",
|
|
88
|
+
"typescript-eslint": "^8.15.0",
|
|
89
|
+
"vite": "^6.0.1",
|
|
90
|
+
"vite-plugin-dts": "^4.3.0",
|
|
91
|
+
"vite-plugin-svgr": "^4.3.0"
|
|
92
|
+
},
|
|
93
|
+
"scripts": {
|
|
94
|
+
"build": "vite build",
|
|
95
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
96
|
+
"dev": "vite",
|
|
97
|
+
"lint": "eslint -c eslint.config.js",
|
|
98
|
+
"analyze": "ANALYZE_MODE=true vite build",
|
|
99
|
+
"test": "jest",
|
|
100
|
+
"test:watch": "jest --watch",
|
|
101
|
+
"test:coverage": "jest --coverage"
|
|
102
|
+
}
|
|
103
|
+
}
|