eddyter 1.4.4 → 1.4.6
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/README.md +31 -6
- package/dist/{ImageResizer-Bt7kgv0a.js → ImageResizer-C5luyjPa.js} +68 -59
- package/dist/assets/style.css +1 -1
- package/dist/components/ConfigurableEditorWithAuth.d.ts +8 -6
- package/dist/components/LineHeightPicker/LineHeightControl.d.ts +3 -0
- package/dist/editor/components/FloatingToolbarManager.d.ts +3 -1
- package/dist/editor/hooks/useFloatingToolbar.d.ts +3 -2
- package/dist/{generateDocxThumbnail-Bgj-d-T6.js → generateDocxThumbnail-BgIdOWg3.js} +1 -1
- package/dist/{generatePdfThumbnail-Cpk4bD2y.js → generatePdfThumbnail-DZ8_E1lJ.js} +1 -1
- package/dist/{generateXlsxThumbnail-BtZOKJ-7.js → generateXlsxThumbnail-B_vFMM-q.js} +1 -1
- package/dist/hooks/useAutoExpandingHeight.d.ts +1 -1
- package/dist/{html2pdf.bundle.min-CSXFMSR9.js → html2pdf.bundle.min-CDLnol6o.js} +1 -1
- package/dist/{index-D6hSgxWh.js → index-B6FDh2NJ.js} +4 -4
- package/dist/{index-CyxBhIG-.js → index-CU78ju_h.js} +26143 -25318
- package/dist/{index-Bc2smzDZ.js → index-CVkebuOP.js} +2 -2
- package/dist/{index-S-p1WVeV.js → index-DtbCbxgA.js} +448 -412
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +2 -2
- package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +4 -1
- package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +8 -1
- package/dist/types.d.ts +8 -0
- package/dist/utils/fileUploadValidation.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ApiResponse } from '../api/auth';
|
|
3
|
+
import { ToolbarConfig } from '../types';
|
|
3
4
|
interface ConfigurableEditorWithAuthProps {
|
|
4
5
|
apiKey: string;
|
|
5
6
|
initialContent?: string;
|
|
@@ -33,10 +34,11 @@ interface ConfigurableEditorWithAuthProps {
|
|
|
33
34
|
style?: React.CSSProperties;
|
|
34
35
|
/** Additional class name for the editor content area */
|
|
35
36
|
editorClassName?: string;
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
/** Editor container options */
|
|
38
|
+
editor?: {
|
|
39
|
+
/** Max height for editor content area / preview content */
|
|
40
|
+
maxHeight?: React.CSSProperties["maxHeight"];
|
|
41
|
+
};
|
|
40
42
|
/** Click handler for preview mode (useful for switching to edit mode) */
|
|
41
43
|
onPreviewClick?: () => void;
|
|
42
44
|
/**
|
|
@@ -46,8 +48,8 @@ interface ConfigurableEditorWithAuthProps {
|
|
|
46
48
|
* - `undefined` (default): Auto-detect from host app's `<html>` or `<body>` "dark" class
|
|
47
49
|
*/
|
|
48
50
|
darkMode?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
|
|
51
|
+
/** Toolbar behavior config: sticky/static mode with sticky offset and z-index. */
|
|
52
|
+
toolbar?: ToolbarConfig;
|
|
51
53
|
}
|
|
52
54
|
declare const ConfigurableEditorWithAuth: React.FC<ConfigurableEditorWithAuthProps>;
|
|
53
55
|
export default ConfigurableEditorWithAuth;
|
|
@@ -2,7 +2,9 @@ import { default as React } from 'react';
|
|
|
2
2
|
interface FloatingToolbarManagerProps {
|
|
3
3
|
editorRef: React.RefObject<HTMLElement | null>;
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
+
mode?: "sticky" | "static";
|
|
5
6
|
topOffset?: number;
|
|
7
|
+
zIndex?: number;
|
|
6
8
|
}
|
|
7
|
-
export default function FloatingToolbarManager({ editorRef, children, topOffset, }: FloatingToolbarManagerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default function FloatingToolbarManager({ editorRef, children, mode, topOffset, zIndex, }: FloatingToolbarManagerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
/** Default gap (px) from top when toolbar is detached. Single source of truth for default. */
|
|
3
|
-
export declare const DEFAULT_TOP_OFFSET =
|
|
4
|
-
export declare
|
|
3
|
+
export declare const DEFAULT_TOP_OFFSET = 20;
|
|
4
|
+
export declare const DEFAULT_Z_INDEX = 1000;
|
|
5
|
+
export declare function useFloatingToolbar(editorRef: RefObject<HTMLElement | null>, mountRef: RefObject<HTMLElement | null>, floatingRef: RefObject<HTMLElement | null>, enabled?: boolean, topOffset?: number, zIndex?: number): {
|
|
5
6
|
isFloating: boolean;
|
|
6
7
|
placeholderHeight: number;
|
|
7
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as Tt, w as Se, K as Ce, h as xe } from "./index-
|
|
1
|
+
import { v as Tt, w as Se, K as Ce, h as xe } from "./index-CU78ju_h.js";
|
|
2
2
|
import { h as Ee } from "./html2canvas.esm-C2wu93Kq.js";
|
|
3
3
|
function Ft(c) {
|
|
4
4
|
throw new Error('Could not dynamically require "' + c + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as Ci } from "./html2canvas.esm-C2wu93Kq.js";
|
|
2
|
-
import { K as yi, h as Di } from "./index-
|
|
2
|
+
import { K as yi, h as Di } from "./index-CU78ju_h.js";
|
|
3
3
|
var In = 1252, Oi = [874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1e4], Zt = {
|
|
4
4
|
/*::[*/
|
|
5
5
|
0: 1252,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface UseAutoExpandingHeightOptions {
|
|
2
2
|
minHeight?: number;
|
|
3
|
-
maxHeight?: number;
|
|
3
|
+
maxHeight?: number | null;
|
|
4
4
|
transitionDuration?: number;
|
|
5
5
|
}
|
|
6
6
|
export declare const useAutoExpandingHeight: ({ minHeight, maxHeight, transitionDuration }?: UseAutoExpandingHeightOptions) => {
|
|
@@ -2,7 +2,7 @@ import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { useLexicalComposerContext as B } from "@lexical/react/LexicalComposerContext";
|
|
3
3
|
import { $getNodeByKey as b } from "lexical";
|
|
4
4
|
import { useState as E, useEffect as N } from "react";
|
|
5
|
-
import { x as y, y as k, z as I, F as x, G as T, H as W } from "./index-
|
|
5
|
+
import { x as y, y as k, z as I, F as x, G as T, H as W } from "./index-CU78ju_h.js";
|
|
6
6
|
function $(e, t) {
|
|
7
7
|
const c = e.split(".").pop()?.toLowerCase();
|
|
8
8
|
return c === "pdf" || t.startsWith("data:application/pdf") ? "pdf" : c === "docx" || t.startsWith("data:application/vnd.openxmlformats") && e.toLowerCase().endsWith(".docx") ? "docx" : c === "xlsx" || c === "xls" || t.startsWith("data:application/vnd.openxmlformats-officedocument.spreadsheetml") || t.startsWith("data:application/vnd.ms-excel") ? "xlsx" : null;
|
|
@@ -16,15 +16,15 @@ function z(e, t) {
|
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
let l = !1;
|
|
19
|
-
return d === "pdf" ? import("./generatePdfThumbnail-
|
|
19
|
+
return d === "pdf" ? import("./generatePdfThumbnail-DZ8_E1lJ.js").then(({ generatePdfThumbnail: o }) => o(e)).then((o) => {
|
|
20
20
|
l || n(o);
|
|
21
21
|
}).catch(() => {
|
|
22
22
|
l || n(null);
|
|
23
|
-
}) : d === "docx" ? import("./generateDocxThumbnail-
|
|
23
|
+
}) : d === "docx" ? import("./generateDocxThumbnail-BgIdOWg3.js").then(({ generateDocxThumbnail: o }) => o(e)).then((o) => {
|
|
24
24
|
l || n(o);
|
|
25
25
|
}).catch(() => {
|
|
26
26
|
l || n(null);
|
|
27
|
-
}) : d === "xlsx" && import("./generateXlsxThumbnail-
|
|
27
|
+
}) : d === "xlsx" && import("./generateXlsxThumbnail-B_vFMM-q.js").then(({ generateXlsxThumbnail: o }) => o(e)).then((o) => {
|
|
28
28
|
l || n(o);
|
|
29
29
|
}).catch(() => {
|
|
30
30
|
l || n(null);
|