eddyter 1.3.81 → 1.4.0

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 (28) hide show
  1. package/README.md +14 -0
  2. package/dist/api/ai/aiAgentService.d.ts +2 -0
  3. package/dist/assets/style.css +1 -1
  4. package/dist/components/ConfigurableEditorWithAuth.d.ts +2 -0
  5. package/dist/context/EditorThemeContext.d.ts +8 -0
  6. package/dist/context/HtmlViewContext.d.ts +2 -0
  7. package/dist/context/VoiceRecordingContext.d.ts +30 -0
  8. package/dist/editor/components/FloatingToolbarManager.d.ts +8 -0
  9. package/dist/editor/components/FloatingToolbarPortal.d.ts +6 -0
  10. package/dist/editor/components/ToolbarMount.d.ts +9 -0
  11. package/dist/editor/hooks/useFloatingToolbar.d.ts +7 -0
  12. package/dist/{generateDocxThumbnail-DCh0DpQm.js → generateDocxThumbnail-Bh5xHzEB.js} +1 -1
  13. package/dist/{generatePdfThumbnail-D8k_mO4q.js → generatePdfThumbnail-Dlhq91Bf.js} +1 -1
  14. package/dist/{generateXlsxThumbnail-Db5nhXLN.js → generateXlsxThumbnail-DSRkPI7J.js} +1 -1
  15. package/dist/hooks/useVoiceRecording.d.ts +15 -0
  16. package/dist/{html2pdf.bundle.min-CYrTiP9i.js → html2pdf.bundle.min-9HpAwgiB.js} +1 -1
  17. package/dist/index-BO5Zqvun.js +87321 -0
  18. package/dist/{index-CQWxSXxG.js → index-CUZB8Gle.js} +23 -23
  19. package/dist/{index-Bgccl9jH.js → index-CYT6zzrr.js} +538 -502
  20. package/dist/{index-DYduXrLZ.js → index-y3tqAwBk.js} +4 -4
  21. package/dist/index.js +1 -1
  22. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +1 -0
  23. package/dist/plugins/VoiceTranscriptPlugin.d.ts +2 -16
  24. package/dist/ui/Icons.d.ts +2 -1
  25. package/dist/utils/fontLoader.d.ts +1 -1
  26. package/dist/utils/htmlFormat.d.ts +5 -3
  27. package/package.json +4 -1
  28. package/dist/index-20I04v1t.js +0 -41317
@@ -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 { v as y, w as k, x as I, F as x, y as T, z as W } from "./index-20I04v1t.js";
5
+ import { w as y, x as k, y as I, F as x, z as T, G as W } from "./index-BO5Zqvun.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-D8k_mO4q.js").then(({ generatePdfThumbnail: o }) => o(e)).then((o) => {
19
+ return d === "pdf" ? import("./generatePdfThumbnail-Dlhq91Bf.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-DCh0DpQm.js").then(({ generateDocxThumbnail: o }) => o(e)).then((o) => {
23
+ }) : d === "docx" ? import("./generateDocxThumbnail-Bh5xHzEB.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-Db5nhXLN.js").then(({ generateXlsxThumbnail: o }) => o(e)).then((o) => {
27
+ }) : d === "xlsx" && import("./generateXlsxThumbnail-DSRkPI7J.js").then(({ generateXlsxThumbnail: o }) => o(e)).then((o) => {
28
28
  l || n(o);
29
29
  }).catch(() => {
30
30
  l || n(null);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { J as a, K as r, M as t, N as s, O as o, P as d, Q as v, R as u, U as f, V as n, X as l, Y as w } from "./index-20I04v1t.js";
1
+ import { K as a, M as r, N as t, O as s, P as o, Q as d, R as v, U as u, V as f, X as n, Y as l, Z as w } from "./index-BO5Zqvun.js";
2
2
  export {
3
3
  a as ConfigurableEditor,
4
4
  r as ConfigurableEditorWithAuth,
@@ -21,6 +21,7 @@ interface ConfigurableEditorProps {
21
21
  initialContent?: string;
22
22
  onChange?: (html: string) => void;
23
23
  apiKey?: string;
24
+ toolbarTopOffset?: number;
24
25
  }
25
26
  declare const ConfigurableEditor: React.FC<ConfigurableEditorProps>;
26
27
  export default ConfigurableEditor;
@@ -2,22 +2,8 @@ export declare const TOGGLE_VOICE_TRANSCRIPT_COMMAND: import('../../node_modules
2
2
  export declare const INSERT_TRANSCRIPT_COMMAND: import('../../node_modules/lexical').LexicalCommand<{
3
3
  text: string;
4
4
  }>;
5
- export declare const useVoiceRecording: (apiKey?: string, language?: string) => {
6
- isRecording: boolean;
7
- isPaused: boolean;
8
- isLoading: boolean;
9
- isProcessing: boolean;
10
- processingStatus: string;
11
- isBatchMode: boolean;
12
- error: string | null;
13
- isConnected: boolean;
14
- elapsedTime: number;
15
- toggleRecording: () => Promise<void>;
16
- pauseRecording: () => void;
17
- resumeRecording: () => void;
18
- setEditor: (editor: any) => void;
19
- };
20
- export declare const VoiceTranscriptButton: ({ editor, apiKey }: {
5
+ export { useVoiceRecording } from '../hooks/useVoiceRecording';
6
+ export declare const VoiceTranscriptButton: ({ editor, apiKey, }: {
21
7
  editor: any;
22
8
  apiKey?: string;
23
9
  }) => import("react/jsx-runtime").JSX.Element;
@@ -84,4 +84,5 @@ declare const BugIcon: () => import("react/jsx-runtime").JSX.Element;
84
84
  declare const LockIcon: () => import("react/jsx-runtime").JSX.Element;
85
85
  declare const AiSparkle: () => import("react/jsx-runtime").JSX.Element;
86
86
  declare const CodeSquare: () => import("react/jsx-runtime").JSX.Element;
87
- 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, AiSparkle, CodeSquare };
87
+ declare const InlineAutocomplete: () => import("react/jsx-runtime").JSX.Element;
88
+ 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, AiSparkle, CodeSquare, InlineAutocomplete };
@@ -2,7 +2,7 @@
2
2
  * Dynamic font loader for the editor package.
3
3
  *
4
4
  * When the editor is integrated into an external project, that project may not
5
- * load the Google Fonts the editor uses (Geist for UI, Inter/Manrope/etc. for
5
+ * load the Google Fonts the editor uses (Geist for UI, Geist/Poppins/Inter/Manrope/etc. for
6
6
  * content). This utility detects which fonts are missing and injects a single
7
7
  * <link> to the Google Fonts API so they become available everywhere in the
8
8
  * editor — toolbars, dropdowns, slash-commands, content area, etc.
@@ -1,5 +1,7 @@
1
+ export declare function formatHtmlForCodeView(html: string): string;
1
2
  /**
2
- * Simple HTML formatter for the code view: breaks tags onto separate lines
3
- * so minified/single-line HTML is readable. Safe to run on any HTML string.
3
+ * Collapse formatting whitespace (newlines, indentation) between tags so that
4
+ * when we parse this HTML back into the editor we don't get extra text nodes.
5
+ * Use this before applying HTML from the code view to preserve structure.
4
6
  */
5
- export declare function formatHtmlForCodeView(html: string): string;
7
+ export declare function normalizeHtmlBeforeApply(html: string): string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eddyter",
3
3
  "private": false,
4
- "version": "1.3.81",
4
+ "version": "1.4.0",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@9.0.0",
7
7
  "keywords": [
@@ -58,6 +58,7 @@
58
58
  "prepublishOnly": "pnpm build"
59
59
  },
60
60
  "dependencies": {
61
+ "@codemirror/theme-one-dark": "^6.1.3",
61
62
  "@lexical/clipboard": "^0.24.0",
62
63
  "@lexical/code": "^0.24.0",
63
64
  "@lexical/dragon": "^0.24.0",
@@ -84,6 +85,8 @@
84
85
  "@radix-ui/react-tabs": "^1.1.3",
85
86
  "@radix-ui/react-tooltip": "^1.1.8",
86
87
  "@types/react-signature-canvas": "^1.0.7",
88
+ "@uiw/codemirror-extensions-langs": "^4.25.7",
89
+ "@uiw/react-codemirror": "^4.25.7",
87
90
  "axios": "^1.8.1",
88
91
  "class-variance-authority": "^0.7.1",
89
92
  "clsx": "^2.1.1",