@fileverse-dev/ddoc 2.2.3 → 2.2.4
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/{ccip-C3QVsn_V.mjs → ccip-BQPvzeSW.mjs} +1 -1
- package/dist/{index-u7cmOfe6.mjs → index-BCafzkGV.mjs} +19657 -19438
- package/dist/index.es.js +1 -1
- package/dist/package/components/editor-utils.d.ts +16 -0
- package/dist/package/extensions/font-size/font-size.d.ts +13 -0
- package/dist/package/extensions/font-size/index.d.ts +1 -0
- package/dist/package/hooks/use-editor-states.d.ts +6 -0
- package/dist/package/hooks/use-visibility.d.ts +2 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -14,6 +14,15 @@ export declare const fonts: {
|
|
14
14
|
value: string;
|
15
15
|
command: (editor: Editor) => void;
|
16
16
|
}[];
|
17
|
+
export declare const FONT_SIZES: readonly [8, 9, 10, 11, 12, 14, 16, 18, 24, 30, 32, 36, 48, 60, 72, 96];
|
18
|
+
export declare const getFontSizeOptions: (editor?: Editor) => {
|
19
|
+
title: string;
|
20
|
+
value: string;
|
21
|
+
label: string;
|
22
|
+
command: (editor: Editor) => void;
|
23
|
+
isActive: () => boolean | undefined;
|
24
|
+
}[];
|
25
|
+
export declare const getCurrentFontSize: (editor: Editor | null, currentSize: string) => string;
|
17
26
|
export declare const ERR_MSG_MAP: {
|
18
27
|
IMAGE_SIZE: string;
|
19
28
|
};
|
@@ -107,6 +116,13 @@ export declare const TextHeading: ({ editor, setVisibility, elementRef, }: {
|
|
107
116
|
elementRef: React.RefObject<HTMLDivElement>;
|
108
117
|
setVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
109
118
|
}) => import("react/jsx-runtime").JSX.Element;
|
119
|
+
export declare const FontSizePicker: ({ editor, setVisibility, elementRef, currentSize, onSetFontSize, }: {
|
120
|
+
editor: Editor;
|
121
|
+
elementRef: React.RefObject<HTMLDivElement>;
|
122
|
+
setVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
123
|
+
currentSize?: string;
|
124
|
+
onSetFontSize: (fontSize: string) => void;
|
125
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
110
126
|
export declare const TextFormatingPopup: ({ editor, isOpen, setIsOpen, setToolVisibility, }: {
|
111
127
|
editor: Editor | null;
|
112
128
|
isOpen: boolean;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
2
|
+
|
3
|
+
declare module '@tiptap/core' {
|
4
|
+
interface Commands<ReturnType> {
|
5
|
+
fontSize: {
|
6
|
+
setFontSize: (size: string) => ReturnType;
|
7
|
+
unsetFontSize: () => ReturnType;
|
8
|
+
increaseFontSize: () => ReturnType;
|
9
|
+
decreaseFontSize: () => ReturnType;
|
10
|
+
};
|
11
|
+
}
|
12
|
+
}
|
13
|
+
export declare const FontSize: Extension<any, any>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './font-size';
|
@@ -10,7 +10,8 @@ export declare enum IEditorTool {
|
|
10
10
|
TEXT_FORMATING = 8,
|
11
11
|
TEXT_COLOR_PICKER = 9,
|
12
12
|
LINK_POPUP = 10,
|
13
|
-
SCRIPTS = 11
|
13
|
+
SCRIPTS = 11,
|
14
|
+
FONT_SIZE = 12
|
14
15
|
}
|
15
16
|
export default function useComponentVisibility(initialIsVisible: boolean): {
|
16
17
|
ref: import('react').RefObject<HTMLDivElement>;
|