beca-ui 2.0.13 → 2.0.14-beta.10
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/beca-ui.js +41781 -43412
- package/dist/components/TextEditor/BubbleMenu/TextEditorBubbleMenu.d.ts +25 -0
- package/dist/components/TextEditor/ColorPicker/ColorPicker.component.d.ts +6 -0
- package/dist/components/TextEditor/Menu/Menu.component.d.ts +6 -0
- package/dist/components/TextEditor/Menu/index.d.ts +1 -0
- package/dist/components/TextEditor/Table/Table.component.d.ts +1 -0
- package/dist/components/TextEditor/Table/TablePlugin.d.ts +1 -0
- package/dist/components/TextEditor/TableTools/TableTools.component.d.ts +11 -0
- package/dist/components/TextEditor/TextBubbleMenu/TextBubbleMenu.d.ts +6 -0
- package/dist/components/TextEditor/TextEditor.types.d.ts +3 -1
- package/dist/components/TextEditor/components/ActionButton.d.ts +0 -0
- package/dist/data/LocalesTexts/EnglishTexts.d.ts +13 -0
- package/dist/data/LocalesTexts/VietnameseTexts.d.ts +13 -0
- package/dist/hooks/LocaleHook.d.ts +13 -0
- package/dist/main.css +1 -1
- package/package.json +27 -25
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TextEditorMenuItem {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
title?: string;
|
|
7
|
+
}
|
|
8
|
+
interface BubbleMenuItemType {
|
|
9
|
+
subItems: TextEditorMenuItem[];
|
|
10
|
+
}
|
|
11
|
+
export interface BubbleMenuPosition {
|
|
12
|
+
top: number;
|
|
13
|
+
left: number;
|
|
14
|
+
}
|
|
15
|
+
interface TextEditorBubbleMenuProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
16
|
+
items: BubbleMenuItemType[];
|
|
17
|
+
visible: boolean;
|
|
18
|
+
position?: BubbleMenuPosition;
|
|
19
|
+
positionType?: "relative" | "absolute";
|
|
20
|
+
}
|
|
21
|
+
export declare const TextEditorBubbleMenu: (props: TextEditorBubbleMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const MenuButton: ({ item }: {
|
|
23
|
+
item: TextEditorMenuItem;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TextEditorMenuProps, MenuBarRefs } from "../TextEditor.types";
|
|
2
|
+
export declare const fonts: {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const MenuBar: import("react").ForwardRefExoticComponent<Omit<TextEditorMenuProps, "ref"> & import("react").RefAttributes<MenuBarRefs>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Menu.component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Editor } from "@tiptap/react";
|
|
2
|
+
export interface TablePosition {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
}
|
|
6
|
+
interface TableToolsProps {
|
|
7
|
+
editor?: Editor | null;
|
|
8
|
+
tablePosition?: TablePosition;
|
|
9
|
+
}
|
|
10
|
+
export declare const TableTools: ({ editor, tablePosition }: TableToolsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { EditorContentProps } from "@tiptap/react";
|
|
3
3
|
import { DataNode as AntDataNode } from "antd/lib/tree";
|
|
4
4
|
export interface TextEditorProps {
|
|
5
|
-
value?:
|
|
5
|
+
value?: any;
|
|
6
6
|
readingMode?: boolean;
|
|
7
7
|
editable?: boolean;
|
|
8
8
|
onChange?: (value: string) => any;
|
|
@@ -17,6 +17,7 @@ export interface TextEditorProps {
|
|
|
17
17
|
suggestionItems?: SuggesstionItem[];
|
|
18
18
|
onUploadImage?: (file: File | null, base64?: string) => string;
|
|
19
19
|
onEnter?: () => void;
|
|
20
|
+
fontSizeUnit?: "pt" | "px";
|
|
20
21
|
}
|
|
21
22
|
export interface SuggesstionItem {
|
|
22
23
|
id: React.Key;
|
|
@@ -31,6 +32,7 @@ export interface TextEditorMenuProps extends EditorContentProps {
|
|
|
31
32
|
toolkitUpper?: React.ReactNode;
|
|
32
33
|
toolkitLower?: React.ReactNode;
|
|
33
34
|
addImage: (imageUrl: string) => void;
|
|
35
|
+
fontSizeUnit?: "pt" | "px";
|
|
34
36
|
}
|
|
35
37
|
export interface GroupMenu {
|
|
36
38
|
menuItems: React.ReactNode[];
|
|
File without changes
|
|
@@ -17,5 +17,18 @@ declare const _default: {
|
|
|
17
17
|
pasteWithTextStylesConfirm: string;
|
|
18
18
|
paste: string;
|
|
19
19
|
format: string;
|
|
20
|
+
add1ColumnToTheLeft: string;
|
|
21
|
+
add1ColumnToTheRight: string;
|
|
22
|
+
removeColumn: string;
|
|
23
|
+
add1RowAbove: string;
|
|
24
|
+
add1RowBelow: string;
|
|
25
|
+
removeRow: string;
|
|
26
|
+
mergeCells: string;
|
|
27
|
+
splitCells: string;
|
|
28
|
+
removeTable: string;
|
|
29
|
+
undo: string;
|
|
30
|
+
redo: string;
|
|
31
|
+
refresh: string;
|
|
32
|
+
table: string;
|
|
20
33
|
};
|
|
21
34
|
export default _default;
|
|
@@ -17,5 +17,18 @@ declare const _default: {
|
|
|
17
17
|
pasteWithTextStylesConfirm: string;
|
|
18
18
|
paste: string;
|
|
19
19
|
format: string;
|
|
20
|
+
add1ColumnToTheLeft: string;
|
|
21
|
+
add1ColumnToTheRight: string;
|
|
22
|
+
removeColumn: string;
|
|
23
|
+
add1RowAbove: string;
|
|
24
|
+
add1RowBelow: string;
|
|
25
|
+
removeRow: string;
|
|
26
|
+
mergeCells: string;
|
|
27
|
+
splitCells: string;
|
|
28
|
+
removeTable: string;
|
|
29
|
+
undo: string;
|
|
30
|
+
redo: string;
|
|
31
|
+
refresh: string;
|
|
32
|
+
table: string;
|
|
20
33
|
};
|
|
21
34
|
export default _default;
|
|
@@ -19,5 +19,18 @@ export declare function useTranslation(): {
|
|
|
19
19
|
pasteWithTextStylesConfirm: string;
|
|
20
20
|
paste: string;
|
|
21
21
|
format: string;
|
|
22
|
+
add1ColumnToTheLeft: string;
|
|
23
|
+
add1ColumnToTheRight: string;
|
|
24
|
+
removeColumn: string;
|
|
25
|
+
add1RowAbove: string;
|
|
26
|
+
add1RowBelow: string;
|
|
27
|
+
removeRow: string;
|
|
28
|
+
mergeCells: string;
|
|
29
|
+
splitCells: string;
|
|
30
|
+
removeTable: string;
|
|
31
|
+
undo: string;
|
|
32
|
+
redo: string;
|
|
33
|
+
refresh: string;
|
|
34
|
+
table: string;
|
|
22
35
|
};
|
|
23
36
|
export {};
|