@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/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as d, P as r, h as s, u as t } from "./index-u7cmOfe6.mjs";
1
+ import { D as d, P as r, h as s, u as t } from "./index-BCafzkGV.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as PreviewDdocEditor,
@@ -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';
@@ -0,0 +1,6 @@
1
+ import { Editor } from '@tiptap/react';
2
+
3
+ export declare const useEditorStates: (editor: Editor | null) => {
4
+ onSetFontSize: (size: string) => void;
5
+ currentSize: string | undefined;
6
+ };
@@ -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>;