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.
Files changed (24) hide show
  1. package/README.md +31 -6
  2. package/dist/{ImageResizer-Bt7kgv0a.js → ImageResizer-C5luyjPa.js} +68 -59
  3. package/dist/assets/style.css +1 -1
  4. package/dist/components/ConfigurableEditorWithAuth.d.ts +8 -6
  5. package/dist/components/LineHeightPicker/LineHeightControl.d.ts +3 -0
  6. package/dist/editor/components/FloatingToolbarManager.d.ts +3 -1
  7. package/dist/editor/hooks/useFloatingToolbar.d.ts +3 -2
  8. package/dist/{generateDocxThumbnail-Bgj-d-T6.js → generateDocxThumbnail-BgIdOWg3.js} +1 -1
  9. package/dist/{generatePdfThumbnail-Cpk4bD2y.js → generatePdfThumbnail-DZ8_E1lJ.js} +1 -1
  10. package/dist/{generateXlsxThumbnail-BtZOKJ-7.js → generateXlsxThumbnail-B_vFMM-q.js} +1 -1
  11. package/dist/hooks/useAutoExpandingHeight.d.ts +1 -1
  12. package/dist/{html2pdf.bundle.min-CSXFMSR9.js → html2pdf.bundle.min-CDLnol6o.js} +1 -1
  13. package/dist/{index-D6hSgxWh.js → index-B6FDh2NJ.js} +4 -4
  14. package/dist/{index-CyxBhIG-.js → index-CU78ju_h.js} +26143 -25318
  15. package/dist/{index-Bc2smzDZ.js → index-CVkebuOP.js} +2 -2
  16. package/dist/{index-S-p1WVeV.js → index-DtbCbxgA.js} +448 -412
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +2 -2
  20. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +4 -1
  21. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +8 -1
  22. package/dist/types.d.ts +8 -0
  23. package/dist/utils/fileUploadValidation.d.ts +2 -0
  24. 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
- /** Additional style for the editor content area */
37
- editorStyle?: React.CSSProperties;
38
- /** Additional styles for the preview container (only used in preview mode) */
39
- previewStyle?: React.CSSProperties;
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
- /** Distance (px) the detached/floating toolbar keeps from the top of the viewport. Defaults to 20. */
50
- toolbarTopOffset?: number;
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;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ declare const LineHeightControl: FC;
3
+ export default LineHeightControl;
@@ -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 = 8;
4
- export declare function useFloatingToolbar(editorRef: RefObject<HTMLElement | null>, mountRef: RefObject<HTMLElement | null>, floatingRef: RefObject<HTMLElement | null>, topOffset?: number): {
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-CyxBhIG-.js";
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,4 +1,4 @@
1
- import { K as u, h as b } from "./index-CyxBhIG-.js";
1
+ import { K as u, h as b } from "./index-CU78ju_h.js";
2
2
  const m = "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174";
3
3
  let w = null;
4
4
  async function C() {
@@ -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-CyxBhIG-.js";
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) => {
@@ -1,4 +1,4 @@
1
- import { v as Ka, w as $u } from "./index-CyxBhIG-.js";
1
+ import { v as Ka, w as $u } from "./index-CU78ju_h.js";
2
2
  function tl(Qa, iu) {
3
3
  for (var jo = 0; jo < iu.length; jo++) {
4
4
  const qs = iu[jo];
@@ -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-CyxBhIG-.js";
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-Cpk4bD2y.js").then(({ generatePdfThumbnail: o }) => o(e)).then((o) => {
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-Bgj-d-T6.js").then(({ generateDocxThumbnail: o }) => o(e)).then((o) => {
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-BtZOKJ-7.js").then(({ generateXlsxThumbnail: o }) => o(e)).then((o) => {
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);