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
package/dist/index.d.ts CHANGED
@@ -10,5 +10,5 @@ export type { ContentPreviewProps } from './components/ContentPreview';
10
10
  export type { ReactNativeBridgeConfig, ReactNativeMessage, ReactNativeMessageType, } from './hooks/useReactNativeBridge';
11
11
  export { isReactNativeWebView, useReactNativeBridge, } from './hooks/useReactNativeBridge';
12
12
  export type { CurrentUser } from './Provider/EditorProvider';
13
- export type { EditorConfigTypes } from './types';
13
+ export type { EditorConfigTypes, ToolbarConfig } from './types';
14
14
  export { editorConfig as defaultEditorConfig } from './editorConfig';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { M as a, N as r, O as t, P as s, Q as o, R as d, U as v, V as u, Y as f, Z as n, _ as l, a0 as w } from "./index-CyxBhIG-.js";
1
+ import { M as a, N as r, O as t, P as s, Q as o, R as d, U as v, V as u, Y as f, Z as n, _ as l, a0 as w } from "./index-CU78ju_h.js";
2
2
  export {
3
3
  a as ConfigurableEditor,
4
4
  r as ConfigurableEditorWithAuth,
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { EditorConfigTypes } from '../../types';
2
+ import { EditorConfigTypes, ToolbarConfig } from '../../types';
3
3
  /**
4
4
  * Handles editor state changes, retrieving root and selection.
5
5
  */
@@ -21,7 +21,7 @@ interface ConfigurableEditorProps {
21
21
  initialContent?: string;
22
22
  onChange?: (html: string) => void;
23
23
  apiKey?: string;
24
- toolbarTopOffset?: number;
24
+ toolbarConfig?: ToolbarConfig;
25
25
  editorClassName?: string;
26
26
  editorStyle?: React.CSSProperties;
27
27
  }
@@ -6,6 +6,9 @@ export interface CustomHorizontalRulePayload {
6
6
  strokeWidth?: number;
7
7
  lineStyle?: LineStyle;
8
8
  }
9
+ export interface OpenHorizontalRuleDialogPayload {
10
+ editingNodeKey?: NodeKey;
11
+ }
9
12
  export type SerializedCustomHorizontalRuleNode = Spread<{
10
13
  color?: string;
11
14
  strokeWidth?: number;
@@ -13,7 +16,7 @@ export type SerializedCustomHorizontalRuleNode = Spread<{
13
16
  }, SerializedLexicalNode>;
14
17
  export declare const INSERT_CUSTOM_HORIZONTAL_RULE_COMMAND: LexicalCommand<CustomHorizontalRulePayload>;
15
18
  /** Opens the horizontal rule customization dialog (e.g. from slash menu). */
16
- export declare const OPEN_HORIZONTAL_RULE_DIALOG_COMMAND: LexicalCommand<void>;
19
+ export declare const OPEN_HORIZONTAL_RULE_DIALOG_COMMAND: LexicalCommand<OpenHorizontalRuleDialogPayload | undefined>;
17
20
  export declare class CustomHorizontalRuleNode extends BaseHorizontalRuleNode {
18
21
  __color?: string;
19
22
  __strokeWidth?: number;
@@ -1,9 +1,16 @@
1
- import { BaseSelection, LexicalEditor } from '../../../node_modules/lexical';
1
+ import { BaseSelection, LexicalEditor, NodeKey } from '../../../node_modules/lexical';
2
2
  import { default as React } from 'react';
3
+ import { LineStyle } from './CustomHorizontalRuleNode';
3
4
  interface HorizontalRuleCustomizationDialogProps {
4
5
  activeEditor: LexicalEditor;
5
6
  onClose: () => void;
6
7
  savedSelection?: BaseSelection | null;
8
+ editingNodeKey?: NodeKey | null;
9
+ initialValues?: {
10
+ color: string;
11
+ strokeWidth: number;
12
+ lineStyle: LineStyle;
13
+ } | null;
7
14
  }
8
15
  declare const HorizontalRuleCustomizationDialog: React.FC<HorizontalRuleCustomizationDialogProps>;
9
16
  export default HorizontalRuleCustomizationDialog;
package/dist/types.d.ts CHANGED
@@ -116,6 +116,14 @@ export interface EmojiPluginProps {
116
116
  onChange?: (emoji: EmojiClickData, event?: MouseEvent) => void;
117
117
  icon?: React.ReactElement<LucideProps>;
118
118
  }
119
+ export interface ToolbarConfig {
120
+ /** Sticky toolbar behavior mode. */
121
+ mode?: "sticky" | "static";
122
+ /** Top offset (px) used only when mode is "sticky". */
123
+ offset?: number;
124
+ /** z-index used only when mode is "sticky". */
125
+ zIndex?: number;
126
+ }
119
127
  export interface InsertFilePayload {
120
128
  linkText: string;
121
129
  src: string;
@@ -0,0 +1,2 @@
1
+ export declare const BLOCKED_FILE_TYPE_MESSAGE = "This file type is not allowed for security reasons.";
2
+ export declare const validateBlockedExtension: (file: File) => string | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eddyter",
3
3
  "private": false,
4
- "version": "1.4.4",
4
+ "version": "1.4.6",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@9.0.0",
7
7
  "keywords": [