@fileverse-dev/ddoc 2.4.23-patch-24 → 2.4.23-patch-2
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-CoaifnaW.mjs → ccip-C6jVz3UU.mjs} +1 -1
- package/dist/{index-Ba4QLziE.mjs → index-C01YGTly.mjs} +18537 -18298
- package/dist/index.es.js +1 -1
- package/dist/package/components/editor-utils.d.ts +22 -0
- package/dist/package/extensions/line-height.d.ts +17 -0
- package/dist/package/hooks/use-editor-states.d.ts +2 -0
- package/dist/package/hooks/use-visibility.d.ts +2 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -25,6 +25,21 @@ export declare const getFontSizeOptions: (editor?: Editor) => {
|
|
|
25
25
|
isActive: () => boolean | undefined;
|
|
26
26
|
}[];
|
|
27
27
|
export declare const getCurrentFontSize: (editor: Editor | null, currentSize: string) => string;
|
|
28
|
+
export declare const uiValueToPercentage: (uiValue: string) => string;
|
|
29
|
+
export declare const percentageToUiValue: (percentage: string) => string;
|
|
30
|
+
export declare const LINE_HEIGHT_OPTIONS: {
|
|
31
|
+
value: string;
|
|
32
|
+
label: string;
|
|
33
|
+
uiValue: string;
|
|
34
|
+
description: string;
|
|
35
|
+
}[];
|
|
36
|
+
export declare const getLineHeightOptions: () => {
|
|
37
|
+
value: string;
|
|
38
|
+
label: string;
|
|
39
|
+
uiValue: string;
|
|
40
|
+
description: string;
|
|
41
|
+
}[];
|
|
42
|
+
export declare const getCurrentLineHeight: (editor: Editor | null, currentLineHeight?: string) => string;
|
|
28
43
|
export declare const ERR_MSG_MAP: {
|
|
29
44
|
IMAGE_SIZE: string;
|
|
30
45
|
};
|
|
@@ -133,6 +148,13 @@ export declare const FontSizePicker: ({ editor, setVisibility, elementRef, curre
|
|
|
133
148
|
currentSize?: string;
|
|
134
149
|
onSetFontSize: (fontSize: string) => void;
|
|
135
150
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
151
|
+
export declare const LineHeightPicker: ({ setVisibility, elementRef, currentLineHeight, onSetLineHeight, }: {
|
|
152
|
+
editor: Editor;
|
|
153
|
+
elementRef: React.RefObject<HTMLDivElement>;
|
|
154
|
+
setVisibility: Dispatch<SetStateAction<IEditorTool>>;
|
|
155
|
+
currentLineHeight?: string;
|
|
156
|
+
onSetLineHeight: (lineHeight: string) => void;
|
|
157
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
136
158
|
export declare const TextFormatingPopup: ({ editor, isOpen, setIsOpen, setToolVisibility, }: {
|
|
137
159
|
editor: Editor | null;
|
|
138
160
|
isOpen: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Extension } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
declare module '@tiptap/core' {
|
|
4
|
+
interface Commands<ReturnType> {
|
|
5
|
+
lineHeight: {
|
|
6
|
+
/**
|
|
7
|
+
* Set the line height
|
|
8
|
+
*/
|
|
9
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
10
|
+
/**
|
|
11
|
+
* Unset the line height
|
|
12
|
+
*/
|
|
13
|
+
unsetLineHeight: () => ReturnType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export declare const LineHeight: Extension<any, any>;
|
|
@@ -2,5 +2,7 @@ import { Editor } from '@tiptap/react';
|
|
|
2
2
|
|
|
3
3
|
export declare const useEditorStates: (editor: Editor | null) => {
|
|
4
4
|
onSetFontSize: (size: string) => void;
|
|
5
|
+
onSetLineHeight: (lineHeight: string) => void;
|
|
5
6
|
currentSize: string | undefined;
|
|
7
|
+
currentLineHeight: string | undefined;
|
|
6
8
|
};
|
|
@@ -11,7 +11,8 @@ export declare enum IEditorTool {
|
|
|
11
11
|
TEXT_COLOR_PICKER = 9,
|
|
12
12
|
LINK_POPUP = 10,
|
|
13
13
|
SCRIPTS = 11,
|
|
14
|
-
FONT_SIZE = 12
|
|
14
|
+
FONT_SIZE = 12,
|
|
15
|
+
LINE_HEIGHT = 13
|
|
15
16
|
}
|
|
16
17
|
export default function useComponentVisibility(initialIsVisible: boolean): {
|
|
17
18
|
ref: import('react').RefObject<HTMLDivElement>;
|