eddyter 1.3.63 → 1.3.65

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
2
  import { useLexicalComposerContext as v } from "@lexical/react/LexicalComposerContext";
3
3
  import { $getNodeByKey as w } from "lexical";
4
- import { q as k, r as F, F as y, s as N, u as C, v as D } from "./index-DoJIKSPF.js";
4
+ import { q as k, r as F, F as y, s as N, v as C, w as D } from "./index-DWw_26Wr.js";
5
5
  const B = (t) => t ? t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : t < 1024 * 1024 * 1024 ? `${(t / (1024 * 1024)).toFixed(1)} MB` : `${(t / (1024 * 1024 * 1024)).toFixed(1)} GB` : "", E = (t) => {
6
6
  const o = t.split(".");
7
7
  return o.length > 1 ? o[o.length - 1].toLowerCase() : "";
@@ -16,11 +16,11 @@ const B = (t) => t ? t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFix
16
16
  i.preventDefault(), i.stopPropagation();
17
17
  try {
18
18
  if (t.startsWith("data:")) {
19
- const e = t.split(","), u = e[0].match(/:(.*?);/), g = u ? u[1] : "application/octet-stream", m = atob(e[1]);
20
- let c = m.length;
19
+ const e = t.split(","), m = e[0].match(/:(.*?);/), g = m ? m[1] : "application/octet-stream", u = atob(e[1]);
20
+ let c = u.length;
21
21
  const p = new Uint8Array(c);
22
22
  for (; c--; )
23
- p[c] = m.charCodeAt(c);
23
+ p[c] = u.charCodeAt(c);
24
24
  const b = new Blob([p], { type: g }), h = URL.createObjectURL(b), d = document.createElement("a");
25
25
  d.href = h, d.download = o, d.style.display = "none", document.body.appendChild(d), d.click(), document.body.removeChild(d), setTimeout(() => URL.revokeObjectURL(h), 100);
26
26
  } else {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { w as a, x as r, y as t, z as s, H as o, G as d, I as v, J as u, K as f, M as n, N as w, O as l } from "./index-DoJIKSPF.js";
1
+ import { y as a, z as r, G as t, H as s, I as o, J as d, K as v, M as u, N as f, O as n, P as l, Q as w } from "./index-DWw_26Wr.js";
2
2
  export {
3
3
  a as ConfigurableEditor,
4
4
  r as ConfigurableEditorWithAuth,
@@ -10,6 +10,6 @@ export {
10
10
  u as isReactNativeWebView,
11
11
  f as useEditor,
12
12
  n as useHtmlView,
13
- w as useReactNativeBridge,
14
- l as verifyApiKey
13
+ l as useReactNativeBridge,
14
+ w as verifyApiKey
15
15
  };
@@ -0,0 +1,30 @@
1
+ import { DecoratorNode, DOMExportOutput, EditorConfig, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from '../../node_modules/lexical';
2
+ export interface UploadingVideoPayload {
3
+ fileName: string;
4
+ fileSize?: number;
5
+ key?: NodeKey;
6
+ }
7
+ export type SerializedUploadingVideoNode = Spread<{
8
+ fileName: string;
9
+ fileSize?: number;
10
+ }, SerializedLexicalNode>;
11
+ export declare class UploadingVideoNode extends DecoratorNode<JSX.Element> {
12
+ __fileName: string;
13
+ __fileSize?: number;
14
+ __progress: number;
15
+ __error?: string;
16
+ static getType(): string;
17
+ static clone(node: UploadingVideoNode): UploadingVideoNode;
18
+ static importJSON(serializedNode: SerializedUploadingVideoNode): UploadingVideoNode;
19
+ exportDOM(): DOMExportOutput;
20
+ constructor(fileName: string, fileSize?: number, progress?: number, error?: string, key?: NodeKey);
21
+ exportJSON(): SerializedUploadingVideoNode;
22
+ createDOM(config: EditorConfig): HTMLElement;
23
+ updateDOM(): false;
24
+ setProgress(progress: number): void;
25
+ setError(error: string): void;
26
+ getProgress(): number;
27
+ decorate(): JSX.Element;
28
+ }
29
+ export declare function $createUploadingVideoNode({ fileName, fileSize, key, }: UploadingVideoPayload): UploadingVideoNode;
30
+ export declare function $isUploadingVideoNode(node: LexicalNode | null | undefined): node is UploadingVideoNode;
@@ -0,0 +1,47 @@
1
+ import { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedEditor, SerializedLexicalNode, Spread, DecoratorNode } from '../../node_modules/lexical';
2
+ export interface VideoPayload {
3
+ src: string;
4
+ caption?: LexicalEditor;
5
+ height?: number;
6
+ key?: NodeKey;
7
+ maxWidth?: number;
8
+ showCaption?: boolean;
9
+ width?: number;
10
+ captionsEnabled?: boolean;
11
+ controls?: boolean;
12
+ }
13
+ export type SerializedVideoNode = Spread<{
14
+ caption: SerializedEditor;
15
+ height?: number;
16
+ maxWidth: number;
17
+ showCaption: boolean;
18
+ src: string;
19
+ width?: number;
20
+ controls: boolean;
21
+ }, SerializedLexicalNode>;
22
+ export declare class VideoNode extends DecoratorNode<JSX.Element> {
23
+ __src: string;
24
+ __width: "inherit" | number;
25
+ __height: "inherit" | number;
26
+ __maxWidth: number;
27
+ __showCaption: boolean;
28
+ __caption: LexicalEditor;
29
+ __captionsEnabled: boolean;
30
+ __controls: boolean;
31
+ static getType(): string;
32
+ static clone(node: VideoNode): VideoNode;
33
+ static importJSON(serializedNode: SerializedVideoNode): VideoNode;
34
+ exportDOM(): DOMExportOutput;
35
+ static importDOM(): DOMConversionMap | null;
36
+ constructor(src: string, maxWidth: number, width?: "inherit" | number, height?: "inherit" | number, showCaption?: boolean, caption?: LexicalEditor, captionsEnabled?: boolean, controls?: boolean, key?: NodeKey);
37
+ exportJSON(): SerializedVideoNode;
38
+ setWidthAndHeight(width: "inherit" | number, height: "inherit" | number): void;
39
+ setShowCaption(showCaption: boolean): void;
40
+ createDOM(config: EditorConfig): HTMLElement;
41
+ updateDOM(): false;
42
+ getSrc(): string;
43
+ setSrc(src: string): void;
44
+ decorate(): JSX.Element;
45
+ }
46
+ export declare function $createVideoNode({ height, maxWidth, captionsEnabled, src, width, showCaption, caption, key, controls, }: VideoPayload): VideoNode;
47
+ export declare function $isVideoNode(node: LexicalNode | null | undefined): node is VideoNode;
@@ -1,8 +1,9 @@
1
- import { LexicalEditor } from '../../../node_modules/lexical';
1
+ import { BaseSelection, LexicalEditor } from '../../../node_modules/lexical';
2
2
  import { default as React } from 'react';
3
3
  interface HorizontalRuleCustomizationDialogProps {
4
4
  activeEditor: LexicalEditor;
5
5
  onClose: () => void;
6
+ savedSelection?: BaseSelection | null;
6
7
  }
7
8
  declare const HorizontalRuleCustomizationDialog: React.FC<HorizontalRuleCustomizationDialogProps>;
8
9
  export default HorizontalRuleCustomizationDialog;
@@ -17,7 +17,7 @@ type FormatFeatures = {
17
17
  aiChat?: boolean;
18
18
  comment?: boolean;
19
19
  improve?: boolean;
20
- highlight?: boolean;
20
+ colors?: boolean;
21
21
  };
22
22
  export default function FloatingTextFormatToolbarPlugin({ anchorElem, setIsLinkEditMode, features, }: {
23
23
  anchorElem?: HTMLElement;
@@ -0,0 +1,17 @@
1
+ import { LexicalCommand } from '../../node_modules/lexical';
2
+ import { FC } from 'react';
3
+ export interface InsertVideoPayload {
4
+ src: string;
5
+ width?: number;
6
+ height?: number;
7
+ maxWidth?: number;
8
+ showCaption?: boolean;
9
+ captionsEnabled?: boolean;
10
+ controls?: boolean;
11
+ }
12
+ interface VideoPluginProps {
13
+ captionsEnabled?: boolean;
14
+ }
15
+ export declare const INSERT_VIDEO_COMMAND: LexicalCommand<InsertVideoPayload>;
16
+ declare const VideoPlugin: FC<VideoPluginProps>;
17
+ export default VideoPlugin;
package/dist/types.d.ts CHANGED
@@ -24,7 +24,7 @@ export interface ToolbarProps {
24
24
  enableTableOptions?: boolean;
25
25
  enableImageOptions?: boolean;
26
26
  enableInsertMenu?: boolean;
27
- enableColorPicker?: boolean;
27
+ enableColors?: boolean;
28
28
  enableClearOptions?: boolean;
29
29
  enableEmojiPicker?: boolean;
30
30
  enableDatePicker?: boolean;
@@ -43,7 +43,6 @@ export interface ToolbarProps {
43
43
  enableImageUpload?: boolean;
44
44
  enableWordCount?: boolean;
45
45
  enableCharts?: boolean;
46
- enableHighlight?: boolean;
47
46
  enableAutoCorrection?: boolean;
48
47
  enablePdfExport?: boolean;
49
48
  enableSpeechToText?: boolean;
@@ -126,7 +125,7 @@ export interface EditorConfigTypes {
126
125
  enableTableOptions: boolean;
127
126
  enableImageOptions?: boolean;
128
127
  enableInsertMenu: boolean;
129
- enableColorPicker: boolean;
128
+ enableColors: boolean;
130
129
  enableClearOptions: boolean;
131
130
  enableEmojiPicker: boolean;
132
131
  enableDatePicker: boolean;
@@ -145,7 +144,6 @@ export interface EditorConfigTypes {
145
144
  enableImageUpload: boolean;
146
145
  enableWordCount: boolean;
147
146
  enableCharts: boolean;
148
- enableHighlight: boolean;
149
147
  enableAutoCorrection: boolean;
150
148
  enablePdfExport: boolean;
151
149
  enableSpeechToText: boolean;
@@ -181,7 +179,7 @@ export interface EditorConfigTypes {
181
179
  aiChat: boolean;
182
180
  comment: boolean;
183
181
  improve: boolean;
184
- highlight: boolean;
182
+ colors: boolean;
185
183
  };
186
184
  enableAutocomplete?: boolean;
187
185
  autocompleteOptions?: {
@@ -190,7 +188,7 @@ export interface EditorConfigTypes {
190
188
  };
191
189
  }
192
190
  export type EditorActionType = "insert_text" | "create_table" | "change_font" | "apply_formatting" | "change_block_type" | "change_alignment" | "unknown";
193
- export type FormattingOptions = "bold" | "italic" | "strikethrough" | "underline" | "code" | "highlight" | "subscript" | "superscript" | "bullet" | "number" | "check" | "quote";
191
+ export type FormattingOptions = "bold" | "italic" | "strikethrough" | "underline" | "code" | "highlight" | "subscript" | "superscript" | "bullet" | "number" | "check" | "quote" | "codeBlock";
194
192
  export type BlockType = "paragraph" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "bullet" | "number" | "check" | "quote" | "code";
195
193
  export type TextAlignment = "left" | "center" | "right" | "justify";
196
194
  export interface EditorAction {
@@ -81,4 +81,5 @@ declare const ExternalLinkIcon: () => import("react/jsx-runtime").JSX.Element;
81
81
  declare const WrapTextLeftIcon: () => import("react/jsx-runtime").JSX.Element;
82
82
  declare const WrapTextRightIcon: () => import("react/jsx-runtime").JSX.Element;
83
83
  declare const BugIcon: () => import("react/jsx-runtime").JSX.Element;
84
- export { AddCommentIcon, AddImageIcon, AdjustToneIcon, AIChatIcon, AIIcon, AlignBottomIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignMiddleIcon, AlignRightIcon, AlignTopIcon, BoldIcon, BugIcon, BulletListIcon, ChartBarIcon, CheckBoxIcon, CheckIcon, ChevronDownIcon, CodeIcon, CompleteSentenceIcon, DisableIcon, EmojifyIcon, FaceSmileIcon, FileIcon, FixGrammarIcon, GenerateImageIcon, Heading1Icon, Heading2Icon, Heading3Icon, Heading4Icon, Heading5Icon, Heading6Icon, HorizontalRuleIcon, HtmlViewIcon, ImageIcon, ItalicIcon, LinkIcon, MagicoonIcon, MakeLongerIcon, MakeShorterIcon, MenuAltIcon, MessageEditIcon, MicrophoneIcon, NoteIcon, NumberListIcon, PauseCircleIcon, ParagraphIcon, PenLineIcon, PerspectiveIcon, PlayCircleIcon, PlusIcon, QuoteIcon, RecordingIcon, RedoIcon, SearchTextIcon, SearchTextIcon2, SendIcon, SignatureIcon, SimplifyIcon, SparkleIcon, StopCircleIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, TodoIcon, TranslateIcon, TypeCapitalizeIcon, TypeLowercaseIcon, TypeUppercaseIcon, UnderlineIcon, UndoIcon, UploadIcon, TableIcon, HighlighterIcon, LightbulbIcon, ClearFormattingIcon, CrossIcon, DownloadIcon, TrashIcon, ExternalLinkIcon, WrapTextLeftIcon, WrapTextRightIcon };
84
+ declare const LockIcon: () => import("react/jsx-runtime").JSX.Element;
85
+ export { AddCommentIcon, AddImageIcon, AdjustToneIcon, AIChatIcon, AIIcon, AlignBottomIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignMiddleIcon, AlignRightIcon, AlignTopIcon, BoldIcon, BugIcon, BulletListIcon, ChartBarIcon, CheckBoxIcon, CheckIcon, ChevronDownIcon, CodeIcon, CompleteSentenceIcon, DisableIcon, EmojifyIcon, FaceSmileIcon, FileIcon, FixGrammarIcon, GenerateImageIcon, Heading1Icon, Heading2Icon, Heading3Icon, Heading4Icon, Heading5Icon, Heading6Icon, HorizontalRuleIcon, HtmlViewIcon, ImageIcon, ItalicIcon, LinkIcon, LockIcon, MagicoonIcon, MakeLongerIcon, MakeShorterIcon, MenuAltIcon, MessageEditIcon, MicrophoneIcon, NoteIcon, NumberListIcon, PauseCircleIcon, ParagraphIcon, PenLineIcon, PerspectiveIcon, PlayCircleIcon, PlusIcon, QuoteIcon, RecordingIcon, RedoIcon, SearchTextIcon, SearchTextIcon2, SendIcon, SignatureIcon, SimplifyIcon, SparkleIcon, StopCircleIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, TodoIcon, TranslateIcon, TypeCapitalizeIcon, TypeLowercaseIcon, TypeUppercaseIcon, UnderlineIcon, UndoIcon, UploadIcon, TableIcon, HighlighterIcon, LightbulbIcon, ClearFormattingIcon, CrossIcon, DownloadIcon, TrashIcon, ExternalLinkIcon, WrapTextLeftIcon, WrapTextRightIcon };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Register an AbortController for a given node key.
3
+ * Called when starting an upload.
4
+ */
5
+ export declare function registerUpload(nodeKey: string, controller: AbortController): void;
6
+ /**
7
+ * Cancel an in-flight upload by node key.
8
+ * Aborts the axios request, which cascades to the backend
9
+ * via a closed connection (triggering req.on('close')).
10
+ * Returns true if the upload was found and aborted.
11
+ */
12
+ export declare function cancelUpload(nodeKey: string): boolean;
13
+ /**
14
+ * Remove an AbortController from the registry.
15
+ * Called on upload completion (success or error) to clean up.
16
+ */
17
+ export declare function cleanupUpload(nodeKey: string): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eddyter",
3
3
  "private": false,
4
- "version": "1.3.63",
4
+ "version": "1.3.65",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@9.0.0",
7
7
  "keywords": [