@fileverse-dev/ddoc 2.4.23 → 2.4.24-patch-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/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-CnFBfHaw.mjs";
1
+ import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-CZ7zQ17g.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as Editor,
@@ -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>;
@@ -2,7 +2,6 @@ import { SyncMachineContext, SyncMachinEvent } from '../types';
2
2
  import { SocketClient } from '../socketClient';
3
3
 
4
4
  import * as awarenessProtocol from 'y-protocols/awareness';
5
- export declare const awarenessUpdateHandler: (context: SyncMachineContext, event: SyncMachinEvent) => {};
6
5
  export declare const initAwarenessHandler: (context: SyncMachineContext) => {
7
6
  awareness: awarenessProtocol.Awareness;
8
7
  _awarenessUpdateHandler: ({ added, updated, removed, }: {