eddyter 1.3.56 → 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.
Files changed (231) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +493 -493
  3. package/dist/App.d.ts +3 -2
  4. package/dist/Provider/EditorProvider.d.ts +32 -31
  5. package/dist/Provider/LexicalProvider.d.ts +6 -5
  6. package/dist/api/ai/index.d.ts +39 -83
  7. package/dist/api/analytics.d.ts +21 -21
  8. package/dist/api/auth.d.ts +108 -108
  9. package/dist/api/bugReport.d.ts +27 -27
  10. package/dist/api/config/axios.d.ts +2 -1
  11. package/dist/api/config/endpoints.d.ts +24 -27
  12. package/dist/api/featureSuggestion.d.ts +23 -23
  13. package/dist/api/feedback.d.ts +26 -26
  14. package/dist/api/linkPreview.d.ts +15 -15
  15. package/dist/api/transcript/index.d.ts +68 -68
  16. package/dist/assets/style.css +1 -1
  17. package/dist/babel-1c4a328b.js +7478 -0
  18. package/dist/components/AiPlugin/index.d.ts +6 -6
  19. package/dist/components/AlignMenu/AlignMenu.d.ts +9 -8
  20. package/dist/components/AlignMenu/AlignMenuDrop.d.ts +3 -2
  21. package/dist/components/AlignMenu/index.d.ts +1 -1
  22. package/dist/components/AutoExpandingDemo.d.ts +6 -5
  23. package/dist/components/BlockFormatMenu/BlockFormatMenu.d.ts +3 -2
  24. package/dist/components/BlockFormatMenu/constants.d.ts +14 -14
  25. package/dist/components/BlockFormatMenu/index.d.ts +1 -1
  26. package/dist/components/BugReportDialog/index.d.ts +6 -6
  27. package/dist/components/ChartEditDialog.d.ts +9 -8
  28. package/dist/components/ChartInsertDialog.d.ts +8 -7
  29. package/dist/components/CodeActionMenuPlugin/components/CopyButton/index.d.ts +7 -6
  30. package/dist/components/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +9 -8
  31. package/dist/components/CodeActionMenuPlugin/index.d.ts +5 -4
  32. package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -1
  33. package/dist/components/ColorPicker/ColorPicker.d.ts +3 -2
  34. package/dist/components/ColorPicker/index.d.ts +1 -1
  35. package/dist/components/CommentSidebar/CommentSidebar.d.ts +8 -7
  36. package/dist/components/CommentSidebar/index.d.ts +1 -1
  37. package/dist/components/CommentToggle/CommentToggle.d.ts +8 -7
  38. package/dist/components/CommentToggle/index.d.ts +1 -1
  39. package/dist/components/CommentView/CommentView.d.ts +9 -8
  40. package/dist/components/CommentView/index.d.ts +1 -1
  41. package/dist/components/ConfigurableEditorWithAuth.d.ts +35 -34
  42. package/dist/components/ContentPreview/index.d.ts +37 -36
  43. package/dist/components/DatePicker/DatePickerWidget.d.ts +7 -6
  44. package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +3 -2
  45. package/dist/components/EmojiPickerWidget/index.d.ts +1 -1
  46. package/dist/components/FeatureSuggestionDialog/index.d.ts +6 -6
  47. package/dist/components/FeedbackDialog/index.d.ts +7 -7
  48. package/dist/components/FileUpload/InsertFileDialog.d.ts +7 -7
  49. package/dist/components/FileUpload/InsertFileUploadedDialogBody.d.ts +5 -4
  50. package/dist/components/FileView/index.d.ts +9 -8
  51. package/dist/components/FloatingHighlightColorPicker/index.d.ts +9 -8
  52. package/dist/components/FontFamilySelect/FontFamilyMenu.d.ts +7 -6
  53. package/dist/components/FontSizePicker/FontSizeControl.d.ts +3 -2
  54. package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +3 -2
  55. package/dist/components/FormatTextMenu/FormatTextMenuDrop.d.ts +3 -2
  56. package/dist/components/FormatTextMenu/index.d.ts +1 -1
  57. package/dist/components/HighlightColorPicker/HighlightColorPicker.d.ts +7 -6
  58. package/dist/components/HtmlViewDisplay.d.ts +3 -2
  59. package/dist/components/ImageComparisonDialog/index.d.ts +11 -10
  60. package/dist/components/ImageGenerationDialog/ImageGenerationManager.d.ts +11 -10
  61. package/dist/components/ImageGenerationDialog/index.d.ts +11 -10
  62. package/dist/components/ImageInsertTest.d.ts +3 -2
  63. package/dist/components/ImageView/ImageDialog/ImageUploadDialogBody.d.ts +9 -8
  64. package/dist/components/ImageView/ImageDialog/index.d.ts +6 -5
  65. package/dist/components/ImageView/ImageResizer.d.ts +16 -15
  66. package/dist/components/ImageView/index.d.ts +17 -16
  67. package/dist/components/InsertMenu/InsertMenu.d.ts +9 -8
  68. package/dist/components/InsertMenu/InsertMenuDrop.d.ts +9 -8
  69. package/dist/components/InsertMenu/index.d.ts +1 -1
  70. package/dist/components/LanguageSelectorDialog/index.d.ts +8 -7
  71. package/dist/components/LinkPreviewHover/index.d.ts +40 -40
  72. package/dist/components/NotePanelMenu/NotePanelMenu.d.ts +6 -5
  73. package/dist/components/NotePanelMenu/index.d.ts +1 -1
  74. package/dist/components/NotePanelView/NotePanelView.d.ts +9 -8
  75. package/dist/components/NotePanelView/index.d.ts +1 -1
  76. package/dist/components/Placeholder/Placeholder.d.ts +3 -2
  77. package/dist/components/Placeholder/index.d.ts +1 -1
  78. package/dist/components/Placeholder/styles.d.ts +1 -1
  79. package/dist/components/PreviewDialog/index.d.ts +10 -0
  80. package/dist/components/ScopedEditor.d.ts +8 -8
  81. package/dist/components/SignatureCaption/index.d.ts +6 -5
  82. package/dist/components/SpeechLanguageSelector/index.d.ts +9 -8
  83. package/dist/components/TableColorPicker/index.d.ts +8 -7
  84. package/dist/components/TableModal/TableModal.d.ts +10 -9
  85. package/dist/components/TextEnhanceDialog/index.d.ts +10 -9
  86. package/dist/components/ToneAdjustDialog/index.d.ts +8 -7
  87. package/dist/components/Toolbar/Toolbar.d.ts +3 -2
  88. package/dist/components/Toolbar/index.d.ts +1 -1
  89. package/dist/components/Toolbar/styles.d.ts +6 -6
  90. package/dist/components/VoiceTranscriptIcon/VoiceTranscriptIcon.d.ts +2 -1
  91. package/dist/components/VoiceTranscriptIcon/index.d.ts +1 -1
  92. package/dist/components/ui/avatar.d.ts +6 -6
  93. package/dist/components/ui/badge.d.ts +9 -8
  94. package/dist/components/ui/button.d.ts +11 -10
  95. package/dist/components/ui/calendar.d.ts +8 -7
  96. package/dist/components/ui/card.d.ts +8 -8
  97. package/dist/components/ui/checkbox.d.ts +4 -4
  98. package/dist/components/ui/dialog.d.ts +19 -19
  99. package/dist/components/ui/dropdown-menu.d.ts +27 -27
  100. package/dist/components/ui/input.d.ts +3 -3
  101. package/dist/components/ui/label.d.ts +4 -4
  102. package/dist/components/ui/popover.d.ts +7 -7
  103. package/dist/components/ui/select.d.ts +13 -13
  104. package/dist/components/ui/separator.d.ts +4 -4
  105. package/dist/components/ui/sheet.d.ts +24 -24
  106. package/dist/components/ui/skeleton.d.ts +3 -3
  107. package/dist/components/ui/tabs.d.ts +7 -7
  108. package/dist/components/ui/textarea.d.ts +3 -3
  109. package/dist/components/ui/tooltip.d.ts +7 -7
  110. package/dist/constants.d.ts +22 -21
  111. package/dist/context/CommentContext.d.ts +43 -42
  112. package/dist/context/HtmlViewContext.d.ts +17 -16
  113. package/dist/context/ToolbarContext.d.ts +56 -55
  114. package/dist/editorConfig.d.ts +70 -70
  115. package/dist/estree-2cbea43c.js +4667 -0
  116. package/dist/hooks/useAutoExpandingHeight.d.ts +15 -15
  117. package/dist/hooks/useBlockFormat.d.ts +17 -16
  118. package/dist/hooks/useColorPicker.d.ts +6 -6
  119. package/dist/hooks/useCustomCommands.d.ts +3 -2
  120. package/dist/hooks/useDebounce.d.ts +1 -1
  121. package/dist/hooks/useEditorToolbar.d.ts +10 -9
  122. package/dist/hooks/useFeedbackEligibility.d.ts +18 -18
  123. package/dist/hooks/useInsertMenu.d.ts +9 -9
  124. package/dist/hooks/useModal.d.ts +5 -5
  125. package/dist/hooks/useReactNativeBridge.d.ts +54 -54
  126. package/dist/hooks/useS3Uploader.d.ts +21 -21
  127. package/dist/hooks/useVoiceToText.d.ts +20 -20
  128. package/dist/html-c18fb60e.js +2841 -0
  129. package/dist/{html2pdf.bundle-5eb394ee.js → html2pdf.bundle-065f580a.js} +1 -1
  130. package/dist/{html2pdf.bundle.min-31a8b0db.js → html2pdf.bundle.min-c9c3c4f0.js} +1 -1
  131. package/dist/{index-66d9f716.js → index-39aec401.js} +14744 -16369
  132. package/dist/{index-953fe9ad.js → index-5b27923c.js} +4 -3
  133. package/dist/{index-969008d4.js → index-a9f00b0b.js} +47 -46
  134. package/dist/index.d.ts +14 -14
  135. package/dist/index.js +14 -13
  136. package/dist/lib/utils.d.ts +2 -1
  137. package/dist/main.d.ts +1 -0
  138. package/dist/markdown-39c3822b.js +3547 -0
  139. package/dist/nodes/ChartNode.d.ts +41 -40
  140. package/dist/nodes/CommentNode.d.ts +34 -33
  141. package/dist/nodes/CommentedTextNode.d.ts +29 -28
  142. package/dist/nodes/EmbedNode.d.ts +32 -31
  143. package/dist/nodes/FileNode.d.ts +33 -32
  144. package/dist/nodes/ImageNode.d.ts +65 -64
  145. package/dist/nodes/MentionNode.d.ts +75 -74
  146. package/dist/nodes/NotePanelNode.d.ts +31 -30
  147. package/dist/nodes/UploadingFileNode.d.ts +30 -29
  148. package/dist/nodes/UploadingImageNode.d.ts +30 -29
  149. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +25 -24
  150. package/dist/pages/ConfigurableEditor/index.d.ts +2 -2
  151. package/dist/pages/NotFound.d.ts +2 -2
  152. package/dist/pages/RichTextEditor.d.ts +6 -6
  153. package/dist/pages/TextareaEditor.d.ts +6 -6
  154. package/dist/pages/styles.d.ts +5 -5
  155. package/dist/plugins/AIChatPlugin.d.ts +11 -10
  156. package/dist/plugins/AndroidKeyboardFixPlugin.d.ts +16 -16
  157. package/dist/plugins/AutocompletePlugin.d.ts +22 -22
  158. package/dist/plugins/CodeBlockNormalizerPlugin.d.ts +8 -8
  159. package/dist/plugins/CodeBlockSelectAllPlugin.d.ts +8 -8
  160. package/dist/plugins/CodeHighlightPlugin.d.ts +3 -2
  161. package/dist/plugins/CombinedAutocompletGrammarPlugin.d.ts +21 -20
  162. package/dist/plugins/CommentBubblePlugin.d.ts +3 -2
  163. package/dist/plugins/CommentPlugin.d.ts +7 -6
  164. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +29 -28
  165. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRulePlugin.d.ts +3 -3
  166. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +7 -6
  167. package/dist/plugins/CustomHorizontalRulePlugin/index.d.ts +3 -3
  168. package/dist/plugins/DragDropPastePlugin/index.d.ts +8 -8
  169. package/dist/plugins/DragDropPastePlugin/indexs.d.ts +1 -1
  170. package/dist/plugins/DraggableBlockPlugin/index.d.ts +4 -0
  171. package/dist/plugins/EmbedPreviewPlugin/FloatingEmbedMenuPlugin.d.ts +4 -3
  172. package/dist/plugins/EmbedPreviewPlugin/index.d.ts +6 -5
  173. package/dist/plugins/FilePlugin.d.ts +8 -7
  174. package/dist/plugins/FloatingLinkEditorPlugin/index.d.ts +6 -5
  175. package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +27 -26
  176. package/dist/plugins/GrammarCheckPlugin.d.ts +2 -1
  177. package/dist/plugins/HtmlCodeViewPlugin/index.d.ts +2 -2
  178. package/dist/plugins/HtmlImportPlugin.d.ts +5 -5
  179. package/dist/plugins/HtmlSyncPlugin.d.ts +3 -3
  180. package/dist/plugins/ImagePlugin.d.ts +7 -6
  181. package/dist/plugins/LinkPlugin/index.d.ts +6 -5
  182. package/dist/plugins/LinkPreviewPlugin/index.d.ts +4 -4
  183. package/dist/plugins/LocalStoragePlugin.d.ts +7 -6
  184. package/dist/plugins/MarkdownShortcutsPlugin/index.d.ts +20 -20
  185. package/dist/plugins/MentionsPlugin/index.d.ts +7 -6
  186. package/dist/plugins/NotePanelPlugin.d.ts +7 -6
  187. package/dist/plugins/PasteOptionsPlugin/index.d.ts +17 -17
  188. package/dist/plugins/RichTextPastePlugin/index.d.ts +6 -5
  189. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasDialog.d.ts +6 -5
  190. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +9 -9
  191. package/dist/plugins/SignatureCanvasPlugin/index.d.ts +2 -2
  192. package/dist/plugins/SlashCommandPlugin/index.d.ts +2 -2
  193. package/dist/plugins/TableActionMenuPlugin/index.d.ts +6 -5
  194. package/dist/plugins/TableCellResizer/index.d.ts +2 -1
  195. package/dist/plugins/TableHoverActionsPlugin/index.d.ts +4 -4
  196. package/dist/plugins/TablePlugin.d.ts +5 -4
  197. package/dist/plugins/Tableimageautoresizeplugin.d.ts +1 -1
  198. package/dist/plugins/TextEnhancePlugin.d.ts +6 -6
  199. package/dist/plugins/TreeViewPlugin.d.ts +3 -2
  200. package/dist/plugins/UsageTrackingPlugin.d.ts +15 -15
  201. package/dist/plugins/VoiceTranscriptPlugin.d.ts +25 -25
  202. package/dist/plugins/WordCountPlugin.d.ts +3 -2
  203. package/dist/postcss-bbcc713e.js +5151 -0
  204. package/dist/services/chartService.d.ts +19 -18
  205. package/dist/standalone-36ad3877.js +2600 -0
  206. package/dist/styles/PlaygroundEditorTheme.d.ts +3 -2
  207. package/dist/types.d.ts +205 -203
  208. package/dist/typescript-39d06710.js +13533 -0
  209. package/dist/ui/ColorPicker.d.ts +14 -13
  210. package/dist/ui/Icons.d.ts +84 -84
  211. package/dist/ui/TextInput.d.ts +11 -10
  212. package/dist/utils/dateFormats.d.ts +33 -33
  213. package/dist/utils/debounce.d.ts +6 -5
  214. package/dist/utils/editorStyleConverter.d.ts +17 -16
  215. package/dist/utils/export.d.ts +2 -1
  216. package/dist/utils/getDOMRangeRect.d.ts +13 -13
  217. package/dist/utils/getSelectedNode.d.ts +3 -2
  218. package/dist/utils/helper.d.ts +3 -3
  219. package/dist/utils/index.d.ts +4 -3
  220. package/dist/utils/invarient.d.ts +1 -1
  221. package/dist/utils/setFloatingElemPosition.d.ts +8 -8
  222. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -1
  223. package/dist/utils/url.d.ts +9 -9
  224. package/package.json +149 -149
  225. package/dist/babel-2d5b260f.js +0 -7770
  226. package/dist/estree-28f5912a.js +0 -4920
  227. package/dist/html-3f297a3a.js +0 -3021
  228. package/dist/markdown-08edd93b.js +0 -3625
  229. package/dist/postcss-0e22bc25.js +0 -5187
  230. package/dist/standalone-83d5947a.js +0 -2728
  231. 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-66d9f716.js";
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
- }, lt = ({ src: t, fileName: o, fileSize: n, nodeKey: s }) => {
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
- lt as default
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 ut, COMMAND_PRIORITY_LOW as M, CLICK_COMMAND as mt, 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";
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-66d9f716.js";
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: m,
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: m, onOpenChange: f, children: /* @__PURE__ */ h(Nt, { className: "sm:max-w-[800px] max-h-[90vh] overflow-y-auto", children: [
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: m
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: m,
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(m, f, b) {
153
- return Math.min(Math.max(m, f), b);
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: m,
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(), u = xe(o), a = l.current;
217
- a.startWidth = C, a.startHeight = P, a.ratio = C / P, a.currentWidth = C, a.currentHeight = P, a.startX = i.clientX / u, a.startY = i.clientY / u, a.isResizing = !0, a.direction = d, _(d), m(), 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);
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 u = Math.floor(o.startX - i.clientX / P);
225
- u = o.direction & s.east ? -u : u;
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 + u,
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 u = Math.floor(o.startY - i.clientY / P);
234
- u = o.direction & s.south ? -u : u;
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 + u,
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 u = Math.floor(o.startX - i.clientX / P);
243
- u = o.direction & s.east ? -u : u;
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 + u,
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(m) {
347
- if (!de.has(m))
347
+ function Kt(u) {
348
+ if (!de.has(u))
348
349
  throw new Promise((f) => {
349
350
  const b = new Image();
350
- b.src = m, b.onload = () => {
351
- de.add(m), f(null);
351
+ b.src = u, b.onload = () => {
352
+ de.add(u), f(null);
352
353
  }, b.onerror = () => {
353
- de.add(m);
354
+ de.add(u);
354
355
  };
355
356
  });
356
357
  }
357
358
  function Xt({
358
- altText: m,
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: m,
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 zr({
404
- src: m,
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, u] = R(!1), [a, H] = R(""), [B, le] = R(!1), [_e, Z] = R(!1), [ue, Q] = R(""), [Oe, ee] = R(""), [He, me] = R(!1), Y = T(null), [ge, Te] = R(0), je = ge > 0 && ge < 350;
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
- ut,
497
+ mt,
497
498
  (y, w) => (d.current = w, !1),
498
499
  M
499
500
  ),
500
501
  n.registerCommand(
501
- mt,
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(), m.startsWith("data:")) {
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="${m}" alt="${f || "Image"}" />
588
+ <img src="${u}" alt="${f || "Image"}" />
588
589
  </body>
589
590
  </html>
590
591
  `), r.document.close());
591
592
  } else
592
- window.open(m, "_blank");
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(), u(!P);
608
+ e.preventDefault(), e.stopPropagation(), m(!P);
608
609
  }, qe = W(() => {
609
610
  p && !g && (Y.current = setTimeout(() => {
610
- me(!0);
611
+ ue(!0);
611
612
  }, 300));
612
613
  }, [p, g]), Ve = W(() => {
613
- Y.current && (clearTimeout(Y.current), Y.current = null), me(!1);
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(""), u(!1);
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(ue), e.setOriginalPrompt(Oe);
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: m,
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" && (u(!1), H(""));
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(), u(!1), H("");
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: m,
1004
- newImageUrl: ue,
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
- zr as default
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 z, z as B, K as G, x as I, H as J, J as L, O as M, M as O, y as j, w as q, N as D, I as F } from "./index-66d9f716.js";
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
- z as ConfigurableEditor,
35
- B as ConfigurableEditorWithAuth,
36
- G as ContentPreview,
37
- I as EditorProvider,
38
- J as HtmlViewProvider,
39
- L as LinkPreviewHover,
40
- M as defaultEditorConfig,
41
- O as isReactNativeWebView,
42
- j as useEditor,
43
- q as useHtmlView,
44
- D as useReactNativeBridge,
45
- F as verifyApiKey
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
  };
@@ -1,2 +1,3 @@
1
1
  import { ClassValue } from 'clsx';
2
- export declare function cn(...inputs: ClassValue[]): string;
2
+
3
+ export declare function cn(...inputs: ClassValue[]): string;
package/dist/main.d.ts CHANGED
@@ -0,0 +1 @@
1
+