eddyter 1.3.55 → 1.3.57
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/LICENSE +24 -24
- package/README.md +493 -493
- package/dist/App.d.ts +3 -2
- package/dist/Provider/EditorProvider.d.ts +32 -31
- package/dist/Provider/LexicalProvider.d.ts +6 -5
- package/dist/api/ai/index.d.ts +39 -83
- package/dist/api/analytics.d.ts +21 -21
- package/dist/api/auth.d.ts +108 -108
- package/dist/api/bugReport.d.ts +27 -27
- package/dist/api/config/axios.d.ts +2 -1
- package/dist/api/config/endpoints.d.ts +24 -27
- package/dist/api/featureSuggestion.d.ts +23 -23
- package/dist/api/feedback.d.ts +26 -26
- package/dist/api/linkPreview.d.ts +15 -15
- package/dist/api/transcript/index.d.ts +68 -68
- package/dist/assets/style.css +1 -1
- package/dist/babel-1c4a328b.js +7478 -0
- package/dist/components/AiPlugin/index.d.ts +6 -6
- package/dist/components/AlignMenu/AlignMenu.d.ts +9 -8
- package/dist/components/AlignMenu/AlignMenuDrop.d.ts +3 -2
- package/dist/components/AlignMenu/index.d.ts +1 -1
- package/dist/components/AutoExpandingDemo.d.ts +6 -5
- package/dist/components/BlockFormatMenu/BlockFormatMenu.d.ts +3 -2
- package/dist/components/BlockFormatMenu/constants.d.ts +14 -14
- package/dist/components/BlockFormatMenu/index.d.ts +1 -1
- package/dist/components/BugReportDialog/index.d.ts +6 -6
- package/dist/components/ChartEditDialog.d.ts +9 -8
- package/dist/components/ChartInsertDialog.d.ts +8 -7
- package/dist/components/CodeActionMenuPlugin/components/CopyButton/index.d.ts +7 -6
- package/dist/components/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +9 -8
- package/dist/components/CodeActionMenuPlugin/index.d.ts +5 -4
- package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +3 -2
- package/dist/components/ColorPicker/index.d.ts +1 -1
- package/dist/components/CommentSidebar/CommentSidebar.d.ts +8 -7
- package/dist/components/CommentSidebar/index.d.ts +1 -1
- package/dist/components/CommentToggle/CommentToggle.d.ts +8 -7
- package/dist/components/CommentToggle/index.d.ts +1 -1
- package/dist/components/CommentView/CommentView.d.ts +9 -8
- package/dist/components/CommentView/index.d.ts +1 -1
- package/dist/components/ConfigurableEditorWithAuth.d.ts +35 -34
- package/dist/components/ContentPreview/index.d.ts +37 -36
- package/dist/components/DatePicker/DatePickerWidget.d.ts +7 -6
- package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +3 -2
- package/dist/components/EmojiPickerWidget/index.d.ts +1 -1
- package/dist/components/FeatureSuggestionDialog/index.d.ts +6 -6
- package/dist/components/FeedbackDialog/index.d.ts +7 -7
- package/dist/components/FileUpload/InsertFileDialog.d.ts +7 -7
- package/dist/components/FileUpload/InsertFileUploadedDialogBody.d.ts +5 -4
- package/dist/components/FileView/index.d.ts +9 -8
- package/dist/components/FloatingHighlightColorPicker/index.d.ts +9 -8
- package/dist/components/FontFamilySelect/FontFamilyMenu.d.ts +7 -6
- package/dist/components/FontSizePicker/FontSizeControl.d.ts +3 -2
- package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +3 -2
- package/dist/components/FormatTextMenu/FormatTextMenuDrop.d.ts +3 -2
- package/dist/components/FormatTextMenu/index.d.ts +1 -1
- package/dist/components/HighlightColorPicker/HighlightColorPicker.d.ts +7 -6
- package/dist/components/HtmlViewDisplay.d.ts +3 -2
- package/dist/components/ImageComparisonDialog/index.d.ts +11 -10
- package/dist/components/ImageGenerationDialog/ImageGenerationManager.d.ts +11 -10
- package/dist/components/ImageGenerationDialog/index.d.ts +11 -10
- package/dist/components/ImageInsertTest.d.ts +3 -2
- package/dist/components/ImageView/ImageDialog/ImageUploadDialogBody.d.ts +9 -8
- package/dist/components/ImageView/ImageDialog/index.d.ts +6 -5
- package/dist/components/ImageView/ImageResizer.d.ts +16 -15
- package/dist/components/ImageView/index.d.ts +17 -16
- package/dist/components/InsertMenu/InsertMenu.d.ts +9 -8
- package/dist/components/InsertMenu/InsertMenuDrop.d.ts +9 -8
- package/dist/components/InsertMenu/index.d.ts +1 -1
- package/dist/components/LanguageSelectorDialog/index.d.ts +8 -7
- package/dist/components/LinkPreviewHover/index.d.ts +40 -40
- package/dist/components/NotePanelMenu/NotePanelMenu.d.ts +6 -5
- package/dist/components/NotePanelMenu/index.d.ts +1 -1
- package/dist/components/NotePanelView/NotePanelView.d.ts +9 -8
- package/dist/components/NotePanelView/index.d.ts +1 -1
- package/dist/components/Placeholder/Placeholder.d.ts +3 -2
- package/dist/components/Placeholder/index.d.ts +1 -1
- package/dist/components/Placeholder/styles.d.ts +1 -1
- package/dist/components/PreviewDialog/index.d.ts +10 -0
- package/dist/components/ScopedEditor.d.ts +8 -8
- package/dist/components/SignatureCaption/index.d.ts +6 -5
- package/dist/components/SpeechLanguageSelector/index.d.ts +9 -8
- package/dist/components/TableColorPicker/index.d.ts +8 -7
- package/dist/components/TableModal/TableModal.d.ts +10 -9
- package/dist/components/TextEnhanceDialog/index.d.ts +10 -9
- package/dist/components/ToneAdjustDialog/index.d.ts +8 -7
- package/dist/components/Toolbar/Toolbar.d.ts +3 -2
- package/dist/components/Toolbar/index.d.ts +1 -1
- package/dist/components/Toolbar/styles.d.ts +6 -6
- package/dist/components/VoiceTranscriptIcon/VoiceTranscriptIcon.d.ts +2 -1
- package/dist/components/VoiceTranscriptIcon/index.d.ts +1 -1
- package/dist/components/ui/avatar.d.ts +6 -6
- package/dist/components/ui/badge.d.ts +9 -8
- package/dist/components/ui/button.d.ts +11 -10
- package/dist/components/ui/calendar.d.ts +8 -7
- package/dist/components/ui/card.d.ts +8 -8
- package/dist/components/ui/checkbox.d.ts +4 -4
- package/dist/components/ui/dialog.d.ts +19 -19
- package/dist/components/ui/dropdown-menu.d.ts +27 -27
- package/dist/components/ui/input.d.ts +3 -3
- package/dist/components/ui/label.d.ts +4 -4
- package/dist/components/ui/popover.d.ts +7 -7
- package/dist/components/ui/select.d.ts +13 -13
- package/dist/components/ui/separator.d.ts +4 -4
- package/dist/components/ui/sheet.d.ts +24 -24
- package/dist/components/ui/skeleton.d.ts +3 -3
- package/dist/components/ui/tabs.d.ts +7 -7
- package/dist/components/ui/textarea.d.ts +3 -3
- package/dist/components/ui/tooltip.d.ts +7 -7
- package/dist/constants.d.ts +22 -21
- package/dist/context/CommentContext.d.ts +43 -42
- package/dist/context/HtmlViewContext.d.ts +17 -16
- package/dist/context/ToolbarContext.d.ts +56 -55
- package/dist/editorConfig.d.ts +70 -70
- package/dist/estree-2cbea43c.js +4667 -0
- package/dist/hooks/useAutoExpandingHeight.d.ts +15 -15
- package/dist/hooks/useBlockFormat.d.ts +17 -16
- package/dist/hooks/useColorPicker.d.ts +6 -6
- package/dist/hooks/useCustomCommands.d.ts +3 -2
- package/dist/hooks/useDebounce.d.ts +1 -1
- package/dist/hooks/useEditorToolbar.d.ts +10 -9
- package/dist/hooks/useFeedbackEligibility.d.ts +18 -18
- package/dist/hooks/useInsertMenu.d.ts +9 -9
- package/dist/hooks/useModal.d.ts +5 -5
- package/dist/hooks/useReactNativeBridge.d.ts +54 -54
- package/dist/hooks/useS3Uploader.d.ts +21 -21
- package/dist/hooks/useVoiceToText.d.ts +20 -20
- package/dist/html-c18fb60e.js +2841 -0
- package/dist/{html2pdf.bundle-bd00e24a.js → html2pdf.bundle-065f580a.js} +1 -1
- package/dist/{html2pdf.bundle.min-4dffe6d7.js → html2pdf.bundle.min-c9c3c4f0.js} +1 -1
- package/dist/{index-4f0e0157.js → index-39aec401.js} +14746 -16371
- package/dist/{index-5647e7d9.js → index-5b27923c.js} +4 -3
- package/dist/{index-4cfc35d0.js → index-a9f00b0b.js} +47 -46
- package/dist/index.d.ts +14 -14
- package/dist/index.js +14 -13
- package/dist/lib/utils.d.ts +2 -1
- package/dist/main.d.ts +1 -0
- package/dist/markdown-39c3822b.js +3547 -0
- package/dist/nodes/ChartNode.d.ts +41 -40
- package/dist/nodes/CommentNode.d.ts +34 -33
- package/dist/nodes/CommentedTextNode.d.ts +29 -28
- package/dist/nodes/EmbedNode.d.ts +32 -31
- package/dist/nodes/FileNode.d.ts +33 -32
- package/dist/nodes/ImageNode.d.ts +65 -64
- package/dist/nodes/MentionNode.d.ts +75 -74
- package/dist/nodes/NotePanelNode.d.ts +31 -30
- package/dist/nodes/UploadingFileNode.d.ts +30 -29
- package/dist/nodes/UploadingImageNode.d.ts +30 -29
- package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +25 -24
- package/dist/pages/ConfigurableEditor/index.d.ts +2 -2
- package/dist/pages/NotFound.d.ts +2 -2
- package/dist/pages/RichTextEditor.d.ts +6 -6
- package/dist/pages/TextareaEditor.d.ts +6 -6
- package/dist/pages/styles.d.ts +5 -5
- package/dist/plugins/AIChatPlugin.d.ts +11 -10
- package/dist/plugins/AndroidKeyboardFixPlugin.d.ts +16 -16
- package/dist/plugins/AutocompletePlugin.d.ts +22 -22
- package/dist/plugins/CodeBlockNormalizerPlugin.d.ts +8 -8
- package/dist/plugins/CodeBlockSelectAllPlugin.d.ts +8 -8
- package/dist/plugins/CodeHighlightPlugin.d.ts +3 -2
- package/dist/plugins/CombinedAutocompletGrammarPlugin.d.ts +21 -20
- package/dist/plugins/CommentBubblePlugin.d.ts +3 -2
- package/dist/plugins/CommentPlugin.d.ts +7 -6
- package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +29 -28
- package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRulePlugin.d.ts +3 -3
- package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +7 -6
- package/dist/plugins/CustomHorizontalRulePlugin/index.d.ts +3 -3
- package/dist/plugins/DragDropPastePlugin/index.d.ts +8 -8
- package/dist/plugins/DragDropPastePlugin/indexs.d.ts +1 -1
- package/dist/plugins/DraggableBlockPlugin/index.d.ts +4 -0
- package/dist/plugins/EmbedPreviewPlugin/FloatingEmbedMenuPlugin.d.ts +4 -3
- package/dist/plugins/EmbedPreviewPlugin/index.d.ts +6 -5
- package/dist/plugins/FilePlugin.d.ts +8 -7
- package/dist/plugins/FloatingLinkEditorPlugin/index.d.ts +6 -5
- package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +27 -26
- package/dist/plugins/GrammarCheckPlugin.d.ts +2 -1
- package/dist/plugins/HtmlCodeViewPlugin/index.d.ts +2 -2
- package/dist/plugins/HtmlImportPlugin.d.ts +5 -5
- package/dist/plugins/HtmlSyncPlugin.d.ts +3 -3
- package/dist/plugins/ImagePlugin.d.ts +7 -6
- package/dist/plugins/LinkPlugin/index.d.ts +6 -5
- package/dist/plugins/LinkPreviewPlugin/index.d.ts +4 -4
- package/dist/plugins/LocalStoragePlugin.d.ts +7 -6
- package/dist/plugins/MarkdownShortcutsPlugin/index.d.ts +20 -20
- package/dist/plugins/MentionsPlugin/index.d.ts +7 -6
- package/dist/plugins/NotePanelPlugin.d.ts +7 -6
- package/dist/plugins/PasteOptionsPlugin/index.d.ts +17 -17
- package/dist/plugins/RichTextPastePlugin/index.d.ts +6 -5
- package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasDialog.d.ts +6 -5
- package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +9 -9
- package/dist/plugins/SignatureCanvasPlugin/index.d.ts +2 -2
- package/dist/plugins/SlashCommandPlugin/index.d.ts +2 -2
- package/dist/plugins/TableActionMenuPlugin/index.d.ts +6 -5
- package/dist/plugins/TableCellResizer/index.d.ts +2 -1
- package/dist/plugins/TableHoverActionsPlugin/index.d.ts +4 -4
- package/dist/plugins/TablePlugin.d.ts +5 -4
- package/dist/plugins/Tableimageautoresizeplugin.d.ts +1 -1
- package/dist/plugins/TextEnhancePlugin.d.ts +6 -6
- package/dist/plugins/TreeViewPlugin.d.ts +3 -2
- package/dist/plugins/UsageTrackingPlugin.d.ts +15 -15
- package/dist/plugins/VoiceTranscriptPlugin.d.ts +25 -25
- package/dist/plugins/WordCountPlugin.d.ts +3 -2
- package/dist/postcss-bbcc713e.js +5151 -0
- package/dist/services/chartService.d.ts +19 -18
- package/dist/standalone-36ad3877.js +2600 -0
- package/dist/styles/PlaygroundEditorTheme.d.ts +3 -2
- package/dist/types.d.ts +205 -203
- package/dist/typescript-39d06710.js +13533 -0
- package/dist/ui/ColorPicker.d.ts +14 -13
- package/dist/ui/Icons.d.ts +84 -84
- package/dist/ui/TextInput.d.ts +11 -10
- package/dist/utils/dateFormats.d.ts +33 -33
- package/dist/utils/debounce.d.ts +6 -5
- package/dist/utils/editorStyleConverter.d.ts +17 -16
- package/dist/utils/export.d.ts +2 -1
- package/dist/utils/getDOMRangeRect.d.ts +13 -13
- package/dist/utils/getSelectedNode.d.ts +3 -2
- package/dist/utils/helper.d.ts +3 -3
- package/dist/utils/index.d.ts +4 -3
- package/dist/utils/invarient.d.ts +1 -1
- package/dist/utils/setFloatingElemPosition.d.ts +8 -8
- package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -1
- package/dist/utils/url.d.ts +9 -9
- package/package.json +149 -149
- package/dist/babel-2d5b260f.js +0 -7770
- package/dist/estree-28f5912a.js +0 -4920
- package/dist/html-3f297a3a.js +0 -3021
- package/dist/markdown-08edd93b.js +0 -3625
- package/dist/postcss-0e22bc25.js +0 -5187
- package/dist/standalone-83d5947a.js +0 -2728
- package/dist/typescript-0559ee85.js +0 -13660
|
@@ -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-
|
|
4
|
+
import { q as k, r as F, F as y, s as N, u as C, v as D } from "./index-39aec401.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "axios";
|
|
7
7
|
import "react-dom";
|
|
@@ -30,13 +30,14 @@ import "emoji-picker-react";
|
|
|
30
30
|
import "@lexical/react/LexicalLinkPlugin";
|
|
31
31
|
import "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
32
32
|
import "@lexical/react/useLexicalEditable";
|
|
33
|
+
import "@lexical/react/LexicalDraggableBlockPlugin";
|
|
33
34
|
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) => {
|
|
34
35
|
const o = t.split(".");
|
|
35
36
|
return o.length > 1 ? o[o.length - 1].toLowerCase() : "";
|
|
36
37
|
}, L = (t) => {
|
|
37
38
|
const o = E(t);
|
|
38
39
|
return ["pdf", "doc", "docx", "txt", "odt"].includes(o) ? /* @__PURE__ */ r(y, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-blue-500" }) : ["zip", "rar", "7z", "tar", "gz"].includes(o) ? /* @__PURE__ */ r(N, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-orange-500" }) : /* @__PURE__ */ r(C, { className: "cteditor-w-8 cteditor-h-8 cteditor-text-gray-500" });
|
|
39
|
-
},
|
|
40
|
+
}, at = ({ src: t, fileName: o, fileSize: n, nodeKey: s }) => {
|
|
40
41
|
const [x] = v();
|
|
41
42
|
if (!t || !o)
|
|
42
43
|
return console.error("FileView: Missing required props", { src: t, fileName: o, fileSize: n, nodeKey: s }), /* @__PURE__ */ r("div", { className: "cteditor-inline-flex cteditor-items-center cteditor-gap-3 cteditor-px-4 cteditor-py-3 cteditor-my-2 cteditor-border cteditor-border-destructive cteditor-rounded-lg cteditor-bg-destructive/10", children: /* @__PURE__ */ r("div", { className: "cteditor-text-sm cteditor-text-destructive", children: "Error loading file" }) });
|
|
@@ -107,5 +108,5 @@ const B = (t) => t ? t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFix
|
|
|
107
108
|
);
|
|
108
109
|
};
|
|
109
110
|
export {
|
|
110
|
-
|
|
111
|
+
at as default
|
|
111
112
|
};
|
|
@@ -13,9 +13,9 @@ import { RichTextPlugin as ze } from "@lexical/react/LexicalRichTextPlugin";
|
|
|
13
13
|
import { useLexicalEditable as at } from "@lexical/react/useLexicalEditable";
|
|
14
14
|
import { useLexicalNodeSelection as st } from "@lexical/react/useLexicalNodeSelection";
|
|
15
15
|
import { calculateZoomLevel as xe, mergeRegister as dt } from "@lexical/utils";
|
|
16
|
-
import { RootNode as Se, TextNode as Le, LineBreakNode as We, ParagraphNode as Ae, $getSelection as J, $isNodeSelection as X, $isParagraphNode as we, $setSelection as ce, $isRangeSelection as lt, SELECTION_CHANGE_COMMAND as
|
|
16
|
+
import { RootNode as Se, TextNode as Le, LineBreakNode as We, ParagraphNode as Ae, $getSelection as J, $isNodeSelection as X, $isParagraphNode as we, $setSelection as ce, $isRangeSelection as lt, SELECTION_CHANGE_COMMAND as mt, COMMAND_PRIORITY_LOW as M, CLICK_COMMAND as ut, DRAGSTART_COMMAND as gt, KEY_DELETE_COMMAND as ht, KEY_BACKSPACE_COMMAND as pt, KEY_ENTER_COMMAND as ft, KEY_ESCAPE_COMMAND as bt, createCommand as yt, $getNodeByKey as U } from "lexical";
|
|
17
17
|
import { useRef as T, useState as R, useEffect as ae, useCallback as W, Suspense as xt } from "react";
|
|
18
|
-
import { a as wt, D as Ct, b as Nt, d as vt, e as kt, f as Et, h as It, B as Ce, L as Me, i as $e, $ as F, W as Pt, j as Rt, A as Dt, k as zt, l as St, T as Lt, m as Wt, S as At, E as Mt, n as $t, t as $, o as _t, p as Ot, C as Ht } from "./index-
|
|
18
|
+
import { a as wt, D as Ct, b as Nt, d as vt, e as kt, f as Et, h as It, B as Ce, L as Me, i as $e, $ as F, W as Pt, j as Rt, A as Dt, k as zt, l as St, T as Lt, m as Wt, S as At, E as Mt, n as $t, t as $, o as _t, p as Ot, C as Ht } from "./index-39aec401.js";
|
|
19
19
|
import "axios";
|
|
20
20
|
import "react-dom";
|
|
21
21
|
import "@emotion/styled";
|
|
@@ -34,6 +34,7 @@ import "@lexical/react/LexicalDecoratorBlockNode";
|
|
|
34
34
|
import "emoji-picker-react";
|
|
35
35
|
import "@lexical/react/LexicalLinkPlugin";
|
|
36
36
|
import "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
37
|
+
import "@lexical/react/LexicalDraggableBlockPlugin";
|
|
37
38
|
/**
|
|
38
39
|
* @license lucide-react v0.344.0 - ISC
|
|
39
40
|
*
|
|
@@ -46,13 +47,13 @@ const Tt = wt("Link2", [
|
|
|
46
47
|
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
47
48
|
]);
|
|
48
49
|
const jt = ({
|
|
49
|
-
open:
|
|
50
|
+
open: u,
|
|
50
51
|
onOpenChange: f,
|
|
51
52
|
oldImageUrl: b,
|
|
52
53
|
newImageUrl: N,
|
|
53
54
|
onReplace: z,
|
|
54
55
|
onCancel: v
|
|
55
|
-
}) => /* @__PURE__ */ t(Ct, { open:
|
|
56
|
+
}) => /* @__PURE__ */ t(Ct, { open: u, onOpenChange: f, children: /* @__PURE__ */ h(Nt, { className: "sm:max-w-[800px] max-h-[90vh] overflow-y-auto", children: [
|
|
56
57
|
/* @__PURE__ */ h(vt, { children: [
|
|
57
58
|
/* @__PURE__ */ h(kt, { className: "flex items-center gap-2 text-xl", children: [
|
|
58
59
|
/* @__PURE__ */ t("span", { className: "text-2xl", children: "🔄" }),
|
|
@@ -103,12 +104,12 @@ const jt = ({
|
|
|
103
104
|
] })
|
|
104
105
|
] }) });
|
|
105
106
|
function Bt({
|
|
106
|
-
caption:
|
|
107
|
+
caption: u
|
|
107
108
|
}) {
|
|
108
109
|
return /* @__PURE__ */ t("div", { className: "signature-caption-container", children: /* @__PURE__ */ h(
|
|
109
110
|
Re,
|
|
110
111
|
{
|
|
111
|
-
initialEditor:
|
|
112
|
+
initialEditor: u,
|
|
112
113
|
initialNodes: [
|
|
113
114
|
Se,
|
|
114
115
|
Le,
|
|
@@ -149,8 +150,8 @@ function Bt({
|
|
|
149
150
|
}
|
|
150
151
|
) });
|
|
151
152
|
}
|
|
152
|
-
function se(
|
|
153
|
-
return Math.min(Math.max(
|
|
153
|
+
function se(u, f, b) {
|
|
154
|
+
return Math.min(Math.max(u, f), b);
|
|
154
155
|
}
|
|
155
156
|
const s = {
|
|
156
157
|
east: 1,
|
|
@@ -159,7 +160,7 @@ const s = {
|
|
|
159
160
|
west: 4
|
|
160
161
|
};
|
|
161
162
|
function Yt({
|
|
162
|
-
onResizeStart:
|
|
163
|
+
onResizeStart: u,
|
|
163
164
|
onResizeEnd: f,
|
|
164
165
|
buttonRef: b,
|
|
165
166
|
imageRef: N,
|
|
@@ -213,36 +214,36 @@ function Yt({
|
|
|
213
214
|
const o = N.current, D = j.current;
|
|
214
215
|
if (o !== null && D !== null) {
|
|
215
216
|
i.preventDefault();
|
|
216
|
-
const { width: C, height: P } = o.getBoundingClientRect(),
|
|
217
|
-
a.startWidth = C, a.startHeight = P, a.ratio = C / P, a.currentWidth = C, a.currentHeight = P, a.startX = i.clientX /
|
|
217
|
+
const { width: C, height: P } = o.getBoundingClientRect(), m = xe(o), a = l.current;
|
|
218
|
+
a.startWidth = C, a.startHeight = P, a.ratio = C / P, a.currentWidth = C, a.currentHeight = P, a.startX = i.clientX / m, a.startY = i.clientY / m, a.isResizing = !0, a.direction = d, _(d), u(), D.classList.add("image-control-wrapper--resizing"), o.style.height = `${P}px`, o.style.width = `${C}px`, document.addEventListener("pointermove", n), document.addEventListener("pointerup", O);
|
|
218
219
|
}
|
|
219
220
|
}, n = (i) => {
|
|
220
221
|
const d = N.current, o = l.current, D = o.direction & (s.east | s.west), C = o.direction & (s.south | s.north);
|
|
221
222
|
if (d !== null && o.isResizing) {
|
|
222
223
|
const P = xe(d);
|
|
223
224
|
if (D && C) {
|
|
224
|
-
let
|
|
225
|
-
|
|
225
|
+
let m = Math.floor(o.startX - i.clientX / P);
|
|
226
|
+
m = o.direction & s.east ? -m : m;
|
|
226
227
|
const a = se(
|
|
227
|
-
o.startWidth +
|
|
228
|
+
o.startWidth + m,
|
|
228
229
|
g,
|
|
229
230
|
x
|
|
230
231
|
), H = a / o.ratio;
|
|
231
232
|
d.style.width = `${a}px`, d.style.height = `${H}px`, o.currentHeight = H, o.currentWidth = a;
|
|
232
233
|
} else if (C) {
|
|
233
|
-
let
|
|
234
|
-
|
|
234
|
+
let m = Math.floor(o.startY - i.clientY / P);
|
|
235
|
+
m = o.direction & s.south ? -m : m;
|
|
235
236
|
const a = se(
|
|
236
|
-
o.startHeight +
|
|
237
|
+
o.startHeight + m,
|
|
237
238
|
E,
|
|
238
239
|
q
|
|
239
240
|
);
|
|
240
241
|
d.style.height = `${a}px`, o.currentHeight = a;
|
|
241
242
|
} else {
|
|
242
|
-
let
|
|
243
|
-
|
|
243
|
+
let m = Math.floor(o.startX - i.clientX / P);
|
|
244
|
+
m = o.direction & s.east ? -m : m;
|
|
244
245
|
const a = se(
|
|
245
|
-
o.startWidth +
|
|
246
|
+
o.startWidth + m,
|
|
246
247
|
g,
|
|
247
248
|
x
|
|
248
249
|
);
|
|
@@ -343,19 +344,19 @@ function Yt({
|
|
|
343
344
|
] });
|
|
344
345
|
}
|
|
345
346
|
const de = /* @__PURE__ */ new Set(), Ne = yt("RIGHT_CLICK_IMAGE_COMMAND");
|
|
346
|
-
function Kt(
|
|
347
|
-
if (!de.has(
|
|
347
|
+
function Kt(u) {
|
|
348
|
+
if (!de.has(u))
|
|
348
349
|
throw new Promise((f) => {
|
|
349
350
|
const b = new Image();
|
|
350
|
-
b.src =
|
|
351
|
-
de.add(
|
|
351
|
+
b.src = u, b.onload = () => {
|
|
352
|
+
de.add(u), f(null);
|
|
352
353
|
}, b.onerror = () => {
|
|
353
|
-
de.add(
|
|
354
|
+
de.add(u);
|
|
354
355
|
};
|
|
355
356
|
});
|
|
356
357
|
}
|
|
357
358
|
function Xt({
|
|
358
|
-
altText:
|
|
359
|
+
altText: u,
|
|
359
360
|
className: f,
|
|
360
361
|
imageRef: b,
|
|
361
362
|
src: N,
|
|
@@ -369,7 +370,7 @@ function Xt({
|
|
|
369
370
|
{
|
|
370
371
|
className: f || void 0,
|
|
371
372
|
src: N,
|
|
372
|
-
alt:
|
|
373
|
+
alt: u,
|
|
373
374
|
ref: b,
|
|
374
375
|
style: typeof z == "number" && typeof v == "number" ? {
|
|
375
376
|
// User has set a numeric size or original dimensions are provided
|
|
@@ -400,8 +401,8 @@ function Ft() {
|
|
|
400
401
|
}
|
|
401
402
|
);
|
|
402
403
|
}
|
|
403
|
-
function
|
|
404
|
-
src:
|
|
404
|
+
function Sr({
|
|
405
|
+
src: u,
|
|
405
406
|
altText: f,
|
|
406
407
|
nodeKey: b,
|
|
407
408
|
width: N,
|
|
@@ -417,7 +418,7 @@ function zr({
|
|
|
417
418
|
}) {
|
|
418
419
|
const x = T(null), q = T(null), [g, E, _] = st(b), [L, I] = R(!1);
|
|
419
420
|
nt();
|
|
420
|
-
const [n] = ct(), [O, i] = R(null), d = T(null), [o, D] = R(!1), C = at(), [P,
|
|
421
|
+
const [n] = ct(), [O, i] = R(null), d = T(null), [o, D] = R(!1), C = at(), [P, m] = R(!1), [a, H] = R(""), [B, le] = R(!1), [_e, Z] = R(!1), [me, Q] = R(""), [Oe, ee] = R(""), [He, ue] = R(!1), Y = T(null), [ge, Te] = R(0), je = ge > 0 && ge < 350;
|
|
421
422
|
ae(() => {
|
|
422
423
|
if (x.current) {
|
|
423
424
|
const e = () => {
|
|
@@ -493,12 +494,12 @@ function zr({
|
|
|
493
494
|
e && i(y.read(() => J()));
|
|
494
495
|
}),
|
|
495
496
|
n.registerCommand(
|
|
496
|
-
|
|
497
|
+
mt,
|
|
497
498
|
(y, w) => (d.current = w, !1),
|
|
498
499
|
M
|
|
499
500
|
),
|
|
500
501
|
n.registerCommand(
|
|
501
|
-
|
|
502
|
+
ut,
|
|
502
503
|
re,
|
|
503
504
|
M
|
|
504
505
|
),
|
|
@@ -560,7 +561,7 @@ function zr({
|
|
|
560
561
|
}, Ke = () => {
|
|
561
562
|
I(!0);
|
|
562
563
|
}, Xe = (e) => {
|
|
563
|
-
if (e.preventDefault(), e.stopPropagation(),
|
|
564
|
+
if (e.preventDefault(), e.stopPropagation(), u.startsWith("data:")) {
|
|
564
565
|
const r = window.open("", "_blank");
|
|
565
566
|
r && (r.document.write(`
|
|
566
567
|
<!DOCTYPE html>
|
|
@@ -584,12 +585,12 @@ function zr({
|
|
|
584
585
|
</style>
|
|
585
586
|
</head>
|
|
586
587
|
<body>
|
|
587
|
-
<img src="${
|
|
588
|
+
<img src="${u}" alt="${f || "Image"}" />
|
|
588
589
|
</body>
|
|
589
590
|
</html>
|
|
590
591
|
`), r.document.close());
|
|
591
592
|
} else
|
|
592
|
-
window.open(
|
|
593
|
+
window.open(u, "_blank");
|
|
593
594
|
}, Fe = (e) => {
|
|
594
595
|
e.preventDefault(), e.stopPropagation(), n.update(() => {
|
|
595
596
|
const r = U(b);
|
|
@@ -604,13 +605,13 @@ function zr({
|
|
|
604
605
|
F(c) && c.setPosition(r);
|
|
605
606
|
});
|
|
606
607
|
}, Ge = (e) => {
|
|
607
|
-
e.preventDefault(), e.stopPropagation(),
|
|
608
|
+
e.preventDefault(), e.stopPropagation(), m(!P);
|
|
608
609
|
}, qe = W(() => {
|
|
609
610
|
p && !g && (Y.current = setTimeout(() => {
|
|
610
|
-
|
|
611
|
+
ue(!0);
|
|
611
612
|
}, 300));
|
|
612
613
|
}, [p, g]), Ve = W(() => {
|
|
613
|
-
Y.current && (clearTimeout(Y.current), Y.current = null),
|
|
614
|
+
Y.current && (clearTimeout(Y.current), Y.current = null), ue(!1);
|
|
614
615
|
}, []), fe = W((e) => {
|
|
615
616
|
e.preventDefault(), e.stopPropagation(), p && window.open(p, "_blank", "noopener,noreferrer");
|
|
616
617
|
}, [p]);
|
|
@@ -644,7 +645,7 @@ function zr({
|
|
|
644
645
|
const tt = oe.src;
|
|
645
646
|
$.dismiss(e), $.success("Image refined successfully!", {
|
|
646
647
|
description: "Compare the images and choose which to keep."
|
|
647
|
-
}), Q(tt), ee(r), Z(!0), H(""),
|
|
648
|
+
}), Q(tt), ee(r), Z(!0), H(""), m(!1);
|
|
648
649
|
} catch (r) {
|
|
649
650
|
if ($.dismiss(e), r instanceof Ot) {
|
|
650
651
|
const c = r.code === "API_KEYS_DISABLED" ? "API Keys Disabled" : "API Key Required";
|
|
@@ -666,7 +667,7 @@ function zr({
|
|
|
666
667
|
n.update(() => {
|
|
667
668
|
const e = U(b);
|
|
668
669
|
if (F(e)) {
|
|
669
|
-
e.setSrc(
|
|
670
|
+
e.setSrc(me), e.setOriginalPrompt(Oe);
|
|
670
671
|
const r = J();
|
|
671
672
|
r && ce(r.clone());
|
|
672
673
|
}
|
|
@@ -719,7 +720,7 @@ function zr({
|
|
|
719
720
|
Xt,
|
|
720
721
|
{
|
|
721
722
|
className: ye ? `focused ${X(O) ? "draggable" : ""}` : p ? "cteditor-cursor-pointer" : null,
|
|
722
|
-
src:
|
|
723
|
+
src: u,
|
|
723
724
|
altText: f,
|
|
724
725
|
imageRef: x,
|
|
725
726
|
width: N,
|
|
@@ -882,7 +883,7 @@ function zr({
|
|
|
882
883
|
value: a,
|
|
883
884
|
onChange: (e) => H(e.target.value),
|
|
884
885
|
onKeyDown: (e) => {
|
|
885
|
-
e.stopPropagation(), e.key === "Enter" && a.trim() && !B && be(), e.key === "Escape" && (
|
|
886
|
+
e.stopPropagation(), e.key === "Enter" && a.trim() && !B && be(), e.key === "Escape" && (m(!1), H(""));
|
|
886
887
|
},
|
|
887
888
|
onKeyUp: (e) => {
|
|
888
889
|
e.stopPropagation();
|
|
@@ -915,7 +916,7 @@ function zr({
|
|
|
915
916
|
"button",
|
|
916
917
|
{
|
|
917
918
|
onClick: (e) => {
|
|
918
|
-
e.stopPropagation(),
|
|
919
|
+
e.stopPropagation(), m(!1), H("");
|
|
919
920
|
},
|
|
920
921
|
disabled: B,
|
|
921
922
|
className: "cteditor-px-3 cteditor-py-2 cteditor-text-sm cteditor-rounded-md cteditor-bg-background cteditor-border cteditor-border-border cteditor-text-foreground hover:cteditor-bg-accent disabled:cteditor-opacity-50 disabled:cteditor-cursor-not-allowed cteditor-transition-colors",
|
|
@@ -1000,8 +1001,8 @@ function zr({
|
|
|
1000
1001
|
{
|
|
1001
1002
|
open: _e,
|
|
1002
1003
|
onOpenChange: Z,
|
|
1003
|
-
oldImageUrl:
|
|
1004
|
-
newImageUrl:
|
|
1004
|
+
oldImageUrl: u,
|
|
1005
|
+
newImageUrl: me,
|
|
1005
1006
|
onReplace: Je,
|
|
1006
1007
|
onCancel: Ue
|
|
1007
1008
|
}
|
|
@@ -1010,5 +1011,5 @@ function zr({
|
|
|
1010
1011
|
}
|
|
1011
1012
|
export {
|
|
1012
1013
|
Ne as RIGHT_CLICK_IMAGE_COMMAND,
|
|
1013
|
-
|
|
1014
|
+
Sr as default
|
|
1014
1015
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { HtmlViewProvider, useHtmlView } from './context/HtmlViewContext';
|
|
2
|
-
export { EditorProvider, useEditor } from './Provider/EditorProvider';
|
|
3
|
-
export { default as ConfigurableEditorWithAuth } from './components/ConfigurableEditorWithAuth';
|
|
4
|
-
export { default as ConfigurableEditor } from './pages/ConfigurableEditor/ConfigurableEditor';
|
|
5
|
-
export { verifyApiKey } from './api/auth';
|
|
6
|
-
export { default as LinkPreviewHover } from './components/LinkPreviewHover';
|
|
7
|
-
export type { LinkPreviewHoverProps } from './components/LinkPreviewHover';
|
|
8
|
-
export { default as ContentPreview } from './components/ContentPreview';
|
|
9
|
-
export type { ContentPreviewProps } from './components/ContentPreview';
|
|
10
|
-
export type { ReactNativeBridgeConfig, ReactNativeMessage, ReactNativeMessageType, } from './hooks/useReactNativeBridge';
|
|
11
|
-
export { isReactNativeWebView, useReactNativeBridge, } from './hooks/useReactNativeBridge';
|
|
12
|
-
export type { CurrentUser } from './Provider/EditorProvider';
|
|
13
|
-
export type { EditorConfigTypes } from './types';
|
|
14
|
-
export { editorConfig as defaultEditorConfig } from './editorConfig';
|
|
1
|
+
export { HtmlViewProvider, useHtmlView } from './context/HtmlViewContext';
|
|
2
|
+
export { EditorProvider, useEditor } from './Provider/EditorProvider';
|
|
3
|
+
export { default as ConfigurableEditorWithAuth } from './components/ConfigurableEditorWithAuth';
|
|
4
|
+
export { default as ConfigurableEditor } from './pages/ConfigurableEditor/ConfigurableEditor';
|
|
5
|
+
export { verifyApiKey } from './api/auth';
|
|
6
|
+
export { default as LinkPreviewHover } from './components/LinkPreviewHover';
|
|
7
|
+
export type { LinkPreviewHoverProps } from './components/LinkPreviewHover';
|
|
8
|
+
export { default as ContentPreview } from './components/ContentPreview';
|
|
9
|
+
export type { ContentPreviewProps } from './components/ContentPreview';
|
|
10
|
+
export type { ReactNativeBridgeConfig, ReactNativeMessage, ReactNativeMessageType, } from './hooks/useReactNativeBridge';
|
|
11
|
+
export { isReactNativeWebView, useReactNativeBridge, } from './hooks/useReactNativeBridge';
|
|
12
|
+
export type { CurrentUser } from './Provider/EditorProvider';
|
|
13
|
+
export type { EditorConfigTypes } from './types';
|
|
14
|
+
export { editorConfig as defaultEditorConfig } from './editorConfig';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as
|
|
1
|
+
import { G as B, z as G, K as I, x as J, H as L, J as M, O, M as j, y as q, w as D, N as F, I as Q } from "./index-39aec401.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "axios";
|
|
@@ -30,17 +30,18 @@ import "emoji-picker-react";
|
|
|
30
30
|
import "@lexical/react/LexicalLinkPlugin";
|
|
31
31
|
import "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
32
32
|
import "@lexical/react/useLexicalEditable";
|
|
33
|
+
import "@lexical/react/LexicalDraggableBlockPlugin";
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
B as ConfigurableEditor,
|
|
36
|
+
G as ConfigurableEditorWithAuth,
|
|
37
|
+
I as ContentPreview,
|
|
38
|
+
J as EditorProvider,
|
|
39
|
+
L as HtmlViewProvider,
|
|
40
|
+
M as LinkPreviewHover,
|
|
41
|
+
O as defaultEditorConfig,
|
|
42
|
+
j as isReactNativeWebView,
|
|
43
|
+
q as useEditor,
|
|
44
|
+
D as useHtmlView,
|
|
45
|
+
F as useReactNativeBridge,
|
|
46
|
+
Q as verifyApiKey
|
|
46
47
|
};
|
package/dist/lib/utils.d.ts
CHANGED
package/dist/main.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|