eddyter 1.3.52 → 1.3.53

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 (224) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +489 -489
  3. package/dist/App.d.ts +2 -3
  4. package/dist/Provider/EditorProvider.d.ts +31 -32
  5. package/dist/Provider/LexicalProvider.d.ts +5 -6
  6. package/dist/api/ai/index.d.ts +83 -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 +1 -2
  11. package/dist/api/config/endpoints.d.ts +24 -24
  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 +21 -21
  16. package/dist/assets/style.css +1 -1
  17. package/dist/babel-2d5b260f.js +7770 -0
  18. package/dist/components/AiPlugin/index.d.ts +6 -6
  19. package/dist/components/AlignMenu/AlignMenu.d.ts +8 -9
  20. package/dist/components/AlignMenu/AlignMenuDrop.d.ts +2 -3
  21. package/dist/components/AlignMenu/index.d.ts +1 -1
  22. package/dist/components/AutoExpandingDemo.d.ts +5 -6
  23. package/dist/components/BlockFormatMenu/BlockFormatMenu.d.ts +2 -3
  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 +8 -9
  28. package/dist/components/ChartInsertDialog.d.ts +7 -8
  29. package/dist/components/CodeActionMenuPlugin/components/CopyButton/index.d.ts +6 -7
  30. package/dist/components/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +8 -9
  31. package/dist/components/CodeActionMenuPlugin/index.d.ts +4 -5
  32. package/dist/components/CodeActionMenuPlugin/utils.d.ts +1 -1
  33. package/dist/components/ColorPicker/ColorPicker.d.ts +2 -3
  34. package/dist/components/ColorPicker/index.d.ts +1 -1
  35. package/dist/components/CommentSidebar/CommentSidebar.d.ts +7 -8
  36. package/dist/components/CommentSidebar/index.d.ts +1 -1
  37. package/dist/components/CommentToggle/CommentToggle.d.ts +7 -8
  38. package/dist/components/CommentToggle/index.d.ts +1 -1
  39. package/dist/components/CommentView/CommentView.d.ts +8 -9
  40. package/dist/components/CommentView/index.d.ts +1 -1
  41. package/dist/components/ConfigurableEditorWithAuth.d.ts +34 -35
  42. package/dist/components/ContentPreview/index.d.ts +36 -37
  43. package/dist/components/DatePicker/DatePickerWidget.d.ts +6 -7
  44. package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +2 -3
  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 +4 -5
  50. package/dist/components/FileView/index.d.ts +8 -9
  51. package/dist/components/FontFamilySelect/FontFamilyMenu.d.ts +6 -7
  52. package/dist/components/FontSizePicker/FontSizeControl.d.ts +2 -3
  53. package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +2 -3
  54. package/dist/components/FormatTextMenu/FormatTextMenuDrop.d.ts +2 -3
  55. package/dist/components/FormatTextMenu/index.d.ts +1 -1
  56. package/dist/components/HighlightColorPicker/HighlightColorPicker.d.ts +6 -7
  57. package/dist/components/HtmlViewDisplay.d.ts +2 -3
  58. package/dist/components/ImageComparisonDialog/index.d.ts +10 -11
  59. package/dist/components/ImageGenerationDialog/ImageGenerationManager.d.ts +10 -11
  60. package/dist/components/ImageGenerationDialog/index.d.ts +10 -11
  61. package/dist/components/ImageInsertTest.d.ts +2 -3
  62. package/dist/components/ImageView/ImageDialog/ImageUploadDialogBody.d.ts +8 -9
  63. package/dist/components/ImageView/ImageDialog/index.d.ts +5 -6
  64. package/dist/components/ImageView/ImageResizer.d.ts +15 -16
  65. package/dist/components/ImageView/index.d.ts +16 -17
  66. package/dist/components/InsertMenu/InsertMenu.d.ts +8 -9
  67. package/dist/components/InsertMenu/InsertMenuDrop.d.ts +8 -9
  68. package/dist/components/InsertMenu/index.d.ts +1 -1
  69. package/dist/components/LanguageSelectorDialog/index.d.ts +7 -8
  70. package/dist/components/LinkPreviewHover/index.d.ts +40 -40
  71. package/dist/components/NotePanelMenu/NotePanelMenu.d.ts +5 -6
  72. package/dist/components/NotePanelMenu/index.d.ts +1 -1
  73. package/dist/components/NotePanelView/NotePanelView.d.ts +8 -9
  74. package/dist/components/NotePanelView/index.d.ts +1 -1
  75. package/dist/components/Placeholder/Placeholder.d.ts +2 -3
  76. package/dist/components/Placeholder/index.d.ts +1 -1
  77. package/dist/components/Placeholder/styles.d.ts +1 -1
  78. package/dist/components/ScopedEditor.d.ts +8 -8
  79. package/dist/components/SignatureCaption/index.d.ts +5 -6
  80. package/dist/components/TableColorPicker/index.d.ts +7 -8
  81. package/dist/components/TableModal/TableModal.d.ts +9 -10
  82. package/dist/components/TextEnhanceDialog/index.d.ts +9 -10
  83. package/dist/components/ToneAdjustDialog/index.d.ts +7 -8
  84. package/dist/components/Toolbar/Toolbar.d.ts +2 -3
  85. package/dist/components/Toolbar/index.d.ts +1 -1
  86. package/dist/components/Toolbar/styles.d.ts +6 -6
  87. package/dist/components/VoiceTranscriptIcon/VoiceTranscriptIcon.d.ts +1 -2
  88. package/dist/components/VoiceTranscriptIcon/index.d.ts +1 -1
  89. package/dist/components/ui/avatar.d.ts +6 -6
  90. package/dist/components/ui/badge.d.ts +8 -9
  91. package/dist/components/ui/button.d.ts +10 -11
  92. package/dist/components/ui/calendar.d.ts +7 -8
  93. package/dist/components/ui/card.d.ts +8 -8
  94. package/dist/components/ui/checkbox.d.ts +4 -4
  95. package/dist/components/ui/dialog.d.ts +19 -19
  96. package/dist/components/ui/dropdown-menu.d.ts +27 -27
  97. package/dist/components/ui/input.d.ts +3 -3
  98. package/dist/components/ui/label.d.ts +4 -4
  99. package/dist/components/ui/popover.d.ts +7 -7
  100. package/dist/components/ui/select.d.ts +13 -13
  101. package/dist/components/ui/separator.d.ts +4 -4
  102. package/dist/components/ui/sheet.d.ts +24 -24
  103. package/dist/components/ui/skeleton.d.ts +3 -3
  104. package/dist/components/ui/tabs.d.ts +7 -7
  105. package/dist/components/ui/textarea.d.ts +3 -3
  106. package/dist/components/ui/tooltip.d.ts +7 -7
  107. package/dist/constants.d.ts +21 -22
  108. package/dist/context/CommentContext.d.ts +42 -43
  109. package/dist/context/HtmlViewContext.d.ts +16 -17
  110. package/dist/context/ToolbarContext.d.ts +55 -56
  111. package/dist/editorConfig.d.ts +70 -70
  112. package/dist/estree-28f5912a.js +4920 -0
  113. package/dist/hooks/useAutoExpandingHeight.d.ts +15 -15
  114. package/dist/hooks/useBlockFormat.d.ts +16 -17
  115. package/dist/hooks/useColorPicker.d.ts +6 -6
  116. package/dist/hooks/useCustomCommands.d.ts +2 -3
  117. package/dist/hooks/useDebounce.d.ts +1 -1
  118. package/dist/hooks/useEditorToolbar.d.ts +9 -10
  119. package/dist/hooks/useFeedbackEligibility.d.ts +18 -18
  120. package/dist/hooks/useInsertMenu.d.ts +9 -9
  121. package/dist/hooks/useModal.d.ts +5 -5
  122. package/dist/hooks/useReactNativeBridge.d.ts +54 -54
  123. package/dist/hooks/useS3Uploader.d.ts +21 -21
  124. package/dist/hooks/useVoiceToText.d.ts +20 -20
  125. package/dist/html-3f297a3a.js +3021 -0
  126. package/dist/{html2pdf.bundle-ffb2feaa.js → html2pdf.bundle-fbac7142.js} +1 -1
  127. package/dist/{html2pdf.bundle.min-1455f5bc.js → html2pdf.bundle.min-13392d4b.js} +1 -1
  128. package/dist/{index-4b2cda16.js → index-006b2aae.js} +15308 -13445
  129. package/dist/{index-ed633fb3.js → index-a38293b8.js} +201 -189
  130. package/dist/{index-02397e44.js → index-ace45f64.js} +1 -1
  131. package/dist/index.d.ts +14 -14
  132. package/dist/index.js +1 -1
  133. package/dist/lib/utils.d.ts +1 -2
  134. package/dist/main.d.ts +0 -1
  135. package/dist/markdown-08edd93b.js +3625 -0
  136. package/dist/nodes/ChartNode.d.ts +40 -41
  137. package/dist/nodes/CommentNode.d.ts +33 -34
  138. package/dist/nodes/CommentedTextNode.d.ts +28 -29
  139. package/dist/nodes/EmbedNode.d.ts +31 -32
  140. package/dist/nodes/FileNode.d.ts +31 -32
  141. package/dist/nodes/ImageNode.d.ts +64 -65
  142. package/dist/nodes/MentionNode.d.ts +74 -75
  143. package/dist/nodes/NotePanelNode.d.ts +30 -31
  144. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +24 -25
  145. package/dist/pages/ConfigurableEditor/index.d.ts +2 -2
  146. package/dist/pages/NotFound.d.ts +2 -2
  147. package/dist/pages/RichTextEditor.d.ts +6 -6
  148. package/dist/pages/TextareaEditor.d.ts +6 -6
  149. package/dist/pages/styles.d.ts +5 -5
  150. package/dist/plugins/AIChatPlugin.d.ts +10 -11
  151. package/dist/plugins/AndroidKeyboardFixPlugin.d.ts +16 -16
  152. package/dist/plugins/AutocompletePlugin.d.ts +22 -22
  153. package/dist/plugins/CodeBlockNormalizerPlugin.d.ts +8 -8
  154. package/dist/plugins/CodeBlockSelectAllPlugin.d.ts +8 -8
  155. package/dist/plugins/CodeHighlightPlugin.d.ts +2 -3
  156. package/dist/plugins/CombinedAutocompletGrammarPlugin.d.ts +20 -21
  157. package/dist/plugins/CommentBubblePlugin.d.ts +2 -3
  158. package/dist/plugins/CommentPlugin.d.ts +6 -7
  159. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +28 -29
  160. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRulePlugin.d.ts +3 -3
  161. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +6 -7
  162. package/dist/plugins/CustomHorizontalRulePlugin/index.d.ts +3 -3
  163. package/dist/plugins/DragDropPastePlugin/index.d.ts +8 -8
  164. package/dist/plugins/EmbedPreviewPlugin/FloatingEmbedMenuPlugin.d.ts +3 -4
  165. package/dist/plugins/EmbedPreviewPlugin/index.d.ts +5 -6
  166. package/dist/plugins/FilePlugin.d.ts +7 -8
  167. package/dist/plugins/FloatingLinkEditorPlugin/index.d.ts +5 -6
  168. package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +26 -27
  169. package/dist/plugins/GrammarCheckPlugin.d.ts +1 -2
  170. package/dist/plugins/HtmlCodeViewPlugin/index.d.ts +2 -2
  171. package/dist/plugins/HtmlImportPlugin.d.ts +5 -5
  172. package/dist/plugins/HtmlSyncPlugin.d.ts +3 -3
  173. package/dist/plugins/ImagePlugin.d.ts +6 -7
  174. package/dist/plugins/LinkPlugin/index.d.ts +5 -6
  175. package/dist/plugins/LinkPreviewPlugin/index.d.ts +4 -4
  176. package/dist/plugins/LocalStoragePlugin.d.ts +6 -7
  177. package/dist/plugins/MarkdownShortcutsPlugin/index.d.ts +20 -20
  178. package/dist/plugins/MentionsPlugin/index.d.ts +6 -7
  179. package/dist/plugins/NotePanelPlugin.d.ts +6 -7
  180. package/dist/plugins/PasteOptionsPlugin/index.d.ts +17 -17
  181. package/dist/plugins/RichTextPastePlugin/index.d.ts +5 -6
  182. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasDialog.d.ts +5 -6
  183. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +9 -9
  184. package/dist/plugins/SignatureCanvasPlugin/index.d.ts +2 -2
  185. package/dist/plugins/SlashCommandPlugin/index.d.ts +2 -2
  186. package/dist/plugins/TableActionMenuPlugin/index.d.ts +5 -6
  187. package/dist/plugins/TableCellResizer/index.d.ts +1 -2
  188. package/dist/plugins/TableHoverActionsPlugin/index.d.ts +4 -4
  189. package/dist/plugins/TablePlugin.d.ts +4 -5
  190. package/dist/plugins/Tableimageautoresizeplugin.d.ts +1 -1
  191. package/dist/plugins/TextEnhancePlugin.d.ts +6 -6
  192. package/dist/plugins/TreeViewPlugin.d.ts +2 -3
  193. package/dist/plugins/UsageTrackingPlugin.d.ts +15 -15
  194. package/dist/plugins/VoiceTranscriptPlugin.d.ts +22 -22
  195. package/dist/plugins/WordCountPlugin.d.ts +2 -3
  196. package/dist/postcss-0e22bc25.js +5187 -0
  197. package/dist/services/chartService.d.ts +18 -19
  198. package/dist/standalone-83d5947a.js +2728 -0
  199. package/dist/styles/PlaygroundEditorTheme.d.ts +2 -3
  200. package/dist/types.d.ts +203 -204
  201. package/dist/typescript-0559ee85.js +13660 -0
  202. package/dist/ui/ColorPicker.d.ts +13 -14
  203. package/dist/ui/Icons.d.ts +84 -81
  204. package/dist/ui/TextInput.d.ts +10 -11
  205. package/dist/utils/dateFormats.d.ts +33 -33
  206. package/dist/utils/debounce.d.ts +5 -6
  207. package/dist/utils/editorStyleConverter.d.ts +16 -17
  208. package/dist/utils/export.d.ts +1 -2
  209. package/dist/utils/getDOMRangeRect.d.ts +13 -13
  210. package/dist/utils/getSelectedNode.d.ts +2 -3
  211. package/dist/utils/helper.d.ts +3 -3
  212. package/dist/utils/index.d.ts +3 -4
  213. package/dist/utils/invarient.d.ts +1 -1
  214. package/dist/utils/setFloatingElemPosition.d.ts +8 -8
  215. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -1
  216. package/dist/utils/url.d.ts +9 -9
  217. package/package.json +150 -150
  218. package/dist/babel-1c4a328b.js +0 -7478
  219. package/dist/estree-2cbea43c.js +0 -4667
  220. package/dist/html-c18fb60e.js +0 -2841
  221. package/dist/markdown-39c3822b.js +0 -3547
  222. package/dist/postcss-bbcc713e.js +0 -5151
  223. package/dist/standalone-36ad3877.js +0 -2600
  224. package/dist/typescript-39d06710.js +0 -13533
@@ -1,4 +1,4 @@
1
- import { jsx as t, jsxs as g, Fragment as it } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as h, Fragment as it } from "react/jsx-runtime";
2
2
  import { CodeNode as ve } from "@lexical/code";
3
3
  import { LinkNode as ke } from "@lexical/link";
4
4
  import { AutoFocusPlugin as ot } from "@lexical/react/LexicalAutoFocusPlugin";
@@ -12,10 +12,10 @@ import { OnChangePlugin as De } from "@lexical/react/LexicalOnChangePlugin";
12
12
  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
- import { calculateZoomLevel as we, 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 xe, $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";
17
- import { useRef as T, useState as R, useEffect as ae, useCallback as W, Suspense as wt } from "react";
18
- import { a as xt, 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-4b2cda16.js";
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";
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-006b2aae.js";
19
19
  import "axios";
20
20
  import "react-dom";
21
21
  import "@emotion/styled";
@@ -40,29 +40,29 @@ import "@lexical/react/LexicalTypeaheadMenuPlugin";
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
42
  */
43
- const Tt = xt("Link2", [
43
+ const Tt = wt("Link2", [
44
44
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
45
45
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
46
46
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
47
47
  ]);
48
48
  const jt = ({
49
- open: u,
50
- onOpenChange: p,
51
- oldImageUrl: f,
49
+ open: m,
50
+ onOpenChange: f,
51
+ oldImageUrl: b,
52
52
  newImageUrl: N,
53
53
  onReplace: z,
54
54
  onCancel: v
55
- }) => /* @__PURE__ */ t(Ct, { open: u, onOpenChange: p, children: /* @__PURE__ */ g(Nt, { className: "sm:max-w-[800px] max-h-[90vh] overflow-y-auto", children: [
56
- /* @__PURE__ */ g(vt, { children: [
57
- /* @__PURE__ */ g(kt, { className: "flex items-center gap-2 text-xl", children: [
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__ */ h(vt, { children: [
57
+ /* @__PURE__ */ h(kt, { className: "flex items-center gap-2 text-xl", children: [
58
58
  /* @__PURE__ */ t("span", { className: "text-2xl", children: "🔄" }),
59
59
  "Compare Images"
60
60
  ] }),
61
61
  /* @__PURE__ */ t(Et, { className: "text-sm pt-1", children: "Choose whether to replace the original image with the refined version." })
62
62
  ] }),
63
- /* @__PURE__ */ g("div", { className: "space-y-4 py-4", children: [
64
- /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ g("div", { className: "space-y-2", children: [
65
- /* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
63
+ /* @__PURE__ */ h("div", { className: "space-y-4 py-4", children: [
64
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ h("div", { className: "space-y-2", children: [
65
+ /* @__PURE__ */ h("div", { className: "flex items-center justify-between", children: [
66
66
  /* @__PURE__ */ t("span", { className: "text-sm font-semibold text-gray-700 dark:text-gray-300", children: "Refined Image" }),
67
67
  /* @__PURE__ */ t("span", { className: "text-xs px-2 py-1 rounded-full bg-blue-100 dark:bg-blue-950/30 text-blue-600 dark:text-blue-400", children: "New" })
68
68
  ] }),
@@ -75,12 +75,12 @@ const jt = ({
75
75
  }
76
76
  ) })
77
77
  ] }) }),
78
- /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800", children: /* @__PURE__ */ g("p", { className: "text-sm text-blue-800 dark:text-blue-200", children: [
78
+ /* @__PURE__ */ t("div", { className: "p-3 rounded-lg bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800", children: /* @__PURE__ */ h("p", { className: "text-sm text-blue-800 dark:text-blue-200", children: [
79
79
  /* @__PURE__ */ t("span", { className: "font-semibold", children: "Note:" }),
80
80
  ' Clicking "Replace" will update the image in your document. This action cannot be undone.'
81
81
  ] }) })
82
82
  ] }),
83
- /* @__PURE__ */ g(It, { className: "gap-2", children: [
83
+ /* @__PURE__ */ h(It, { className: "gap-2", children: [
84
84
  /* @__PURE__ */ t(
85
85
  Ce,
86
86
  {
@@ -89,7 +89,7 @@ const jt = ({
89
89
  children: "Keep Original"
90
90
  }
91
91
  ),
92
- /* @__PURE__ */ g(
92
+ /* @__PURE__ */ h(
93
93
  Ce,
94
94
  {
95
95
  onClick: z,
@@ -103,12 +103,12 @@ const jt = ({
103
103
  ] })
104
104
  ] }) });
105
105
  function Bt({
106
- caption: u
106
+ caption: m
107
107
  }) {
108
- return /* @__PURE__ */ t("div", { className: "signature-caption-container", children: /* @__PURE__ */ g(
108
+ return /* @__PURE__ */ t("div", { className: "signature-caption-container", children: /* @__PURE__ */ h(
109
109
  Re,
110
110
  {
111
- initialEditor: u,
111
+ initialEditor: m,
112
112
  initialNodes: [
113
113
  Se,
114
114
  Le,
@@ -149,8 +149,8 @@ function Bt({
149
149
  }
150
150
  ) });
151
151
  }
152
- function se(u, p, f) {
153
- return Math.min(Math.max(u, p), f);
152
+ function se(m, f, b) {
153
+ return Math.min(Math.max(m, f), b);
154
154
  }
155
155
  const s = {
156
156
  east: 1,
@@ -159,9 +159,9 @@ const s = {
159
159
  west: 4
160
160
  };
161
161
  function Yt({
162
- onResizeStart: u,
163
- onResizeEnd: p,
164
- buttonRef: f,
162
+ onResizeStart: m,
163
+ onResizeEnd: f,
164
+ buttonRef: b,
165
165
  imageRef: N,
166
166
  maxWidth: z,
167
167
  editor: v,
@@ -172,7 +172,7 @@ function Yt({
172
172
  const j = T(null), k = T({
173
173
  priority: "",
174
174
  value: "default"
175
- }), y = T({
175
+ }), l = T({
176
176
  currentHeight: 0,
177
177
  currentWidth: 0,
178
178
  direction: 0,
@@ -182,9 +182,9 @@ function Yt({
182
182
  startWidth: 0,
183
183
  startX: 0,
184
184
  startY: 0
185
- }), h = v.getRootElement(), w = h !== null ? h.getBoundingClientRect().width - 20 : 100, q = h !== null ? h.getBoundingClientRect().height - 20 : 100, m = 100, E = 100, _ = (i) => {
185
+ }), p = v.getRootElement(), x = p !== null ? p.getBoundingClientRect().width - 20 : 100, q = p !== null ? p.getBoundingClientRect().height - 20 : 100, g = 100, E = 100, _ = (i) => {
186
186
  const d = i === s.east || i === s.west, o = i === s.north || i === s.south, D = i & s.north && i & s.west || i & s.south && i & s.east, C = d ? "ew" : o ? "ns" : D ? "nwse" : "nesw";
187
- h !== null && h.style.setProperty(
187
+ p !== null && p.style.setProperty(
188
188
  "cursor",
189
189
  `${C}-resize`,
190
190
  "important"
@@ -202,7 +202,7 @@ function Yt({
202
202
  "important"
203
203
  ));
204
204
  }, L = () => {
205
- h !== null && h.style.setProperty("cursor", "text"), document.body !== null && (document.body.style.setProperty("cursor", "default"), document.body.style.setProperty(
205
+ p !== null && p.style.setProperty("cursor", "text"), document.body !== null && (document.body.style.setProperty("cursor", "default"), document.body.style.setProperty(
206
206
  "-webkit-user-select",
207
207
  k.current.value,
208
208
  k.current.priority
@@ -213,55 +213,55 @@ function Yt({
213
213
  const o = N.current, D = j.current;
214
214
  if (o !== null && D !== null) {
215
215
  i.preventDefault();
216
- const { width: C, height: P } = o.getBoundingClientRect(), l = we(o), a = y.current;
217
- a.startWidth = C, a.startHeight = P, a.ratio = C / P, a.currentWidth = C, a.currentHeight = P, a.startX = i.clientX / l, a.startY = i.clientY / l, 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);
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);
218
218
  }
219
219
  }, n = (i) => {
220
- const d = N.current, o = y.current, D = o.direction & (s.east | s.west), C = o.direction & (s.south | s.north);
220
+ const d = N.current, o = l.current, D = o.direction & (s.east | s.west), C = o.direction & (s.south | s.north);
221
221
  if (d !== null && o.isResizing) {
222
- const P = we(d);
222
+ const P = xe(d);
223
223
  if (D && C) {
224
- let l = Math.floor(o.startX - i.clientX / P);
225
- l = o.direction & s.east ? -l : l;
224
+ let u = Math.floor(o.startX - i.clientX / P);
225
+ u = o.direction & s.east ? -u : u;
226
226
  const a = se(
227
- o.startWidth + l,
228
- m,
229
- w
227
+ o.startWidth + u,
228
+ g,
229
+ x
230
230
  ), H = a / o.ratio;
231
231
  d.style.width = `${a}px`, d.style.height = `${H}px`, o.currentHeight = H, o.currentWidth = a;
232
232
  } else if (C) {
233
- let l = Math.floor(o.startY - i.clientY / P);
234
- l = o.direction & s.south ? -l : l;
233
+ let u = Math.floor(o.startY - i.clientY / P);
234
+ u = o.direction & s.south ? -u : u;
235
235
  const a = se(
236
- o.startHeight + l,
236
+ o.startHeight + u,
237
237
  E,
238
238
  q
239
239
  );
240
240
  d.style.height = `${a}px`, o.currentHeight = a;
241
241
  } else {
242
- let l = Math.floor(o.startX - i.clientX / P);
243
- l = o.direction & s.east ? -l : l;
242
+ let u = Math.floor(o.startX - i.clientX / P);
243
+ u = o.direction & s.east ? -u : u;
244
244
  const a = se(
245
- o.startWidth + l,
246
- m,
247
- w
245
+ o.startWidth + u,
246
+ g,
247
+ x
248
248
  );
249
249
  d.style.width = `${a}px`, o.currentWidth = a;
250
250
  }
251
251
  }
252
252
  }, O = () => {
253
- const i = N.current, d = y.current, o = j.current;
253
+ const i = N.current, d = l.current, o = j.current;
254
254
  if (i !== null && o !== null && d.isResizing) {
255
255
  const D = d.currentWidth, C = d.currentHeight;
256
- d.startWidth = 0, d.startHeight = 0, d.ratio = 0, d.startX = 0, d.startY = 0, d.currentWidth = 0, d.currentHeight = 0, d.isResizing = !1, o.classList.remove("image-control-wrapper--resizing"), L(), p(D, C), document.removeEventListener("pointermove", n), document.removeEventListener("pointerup", O);
256
+ d.startWidth = 0, d.startHeight = 0, d.ratio = 0, d.startX = 0, d.startY = 0, d.currentWidth = 0, d.currentHeight = 0, d.isResizing = !1, o.classList.remove("image-control-wrapper--resizing"), L(), f(D, C), document.removeEventListener("pointermove", n), document.removeEventListener("pointerup", O);
257
257
  }
258
258
  };
259
- return /* @__PURE__ */ g("div", { ref: j, children: [
259
+ return /* @__PURE__ */ h("div", { ref: j, children: [
260
260
  !G && S && /* @__PURE__ */ t(
261
261
  "button",
262
262
  {
263
263
  className: "image-caption-button",
264
- ref: f,
264
+ ref: b,
265
265
  onClick: () => {
266
266
  A(!G);
267
267
  },
@@ -343,21 +343,21 @@ function Yt({
343
343
  ] });
344
344
  }
345
345
  const de = /* @__PURE__ */ new Set(), Ne = yt("RIGHT_CLICK_IMAGE_COMMAND");
346
- function Kt(u) {
347
- if (!de.has(u))
348
- throw new Promise((p) => {
349
- const f = new Image();
350
- f.src = u, f.onload = () => {
351
- de.add(u), p(null);
352
- }, f.onerror = () => {
353
- de.add(u);
346
+ function Kt(m) {
347
+ if (!de.has(m))
348
+ throw new Promise((f) => {
349
+ const b = new Image();
350
+ b.src = m, b.onload = () => {
351
+ de.add(m), f(null);
352
+ }, b.onerror = () => {
353
+ de.add(m);
354
354
  };
355
355
  });
356
356
  }
357
357
  function Xt({
358
- altText: u,
359
- className: p,
360
- imageRef: f,
358
+ altText: m,
359
+ className: f,
360
+ imageRef: b,
361
361
  src: N,
362
362
  width: z,
363
363
  height: v,
@@ -367,10 +367,10 @@ function Xt({
367
367
  return Kt(N), /* @__PURE__ */ t(
368
368
  "img",
369
369
  {
370
- className: p || void 0,
370
+ className: f || void 0,
371
371
  src: N,
372
- alt: u,
373
- ref: f,
372
+ alt: m,
373
+ ref: b,
374
374
  style: typeof z == "number" && typeof v == "number" ? {
375
375
  // User has set a numeric size or original dimensions are provided
376
376
  width: typeof z == "number" ? z : "auto",
@@ -401,9 +401,9 @@ function Ft() {
401
401
  );
402
402
  }
403
403
  function zr({
404
- src: u,
405
- altText: p,
406
- nodeKey: f,
404
+ src: m,
405
+ altText: f,
406
+ nodeKey: b,
407
407
  width: N,
408
408
  height: z,
409
409
  maxWidth: v,
@@ -412,39 +412,39 @@ function zr({
412
412
  caption: S,
413
413
  captionsEnabled: j,
414
414
  originalPrompt: k,
415
- position: y = "none",
416
- linkUrl: h
415
+ position: l = "none",
416
+ linkUrl: p
417
417
  }) {
418
- const w = T(null), q = T(null), [m, E, _] = st(f), [L, I] = R(!1);
418
+ const x = T(null), q = T(null), [g, E, _] = st(b), [L, I] = R(!1);
419
419
  nt();
420
- const [n] = ct(), [O, i] = R(null), d = T(null), [o, D] = R(!1), C = at(), [P, l] = 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;
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
421
  ae(() => {
422
- if (w.current) {
422
+ if (x.current) {
423
423
  const e = () => {
424
- w.current && Te(w.current.offsetWidth);
424
+ x.current && Te(x.current.offsetWidth);
425
425
  };
426
426
  e();
427
427
  const r = new ResizeObserver(e);
428
- return r.observe(w.current), () => r.disconnect();
428
+ return r.observe(x.current), () => r.disconnect();
429
429
  }
430
- }, [N, z, m]);
430
+ }, [N, z, g]);
431
431
  const te = W(
432
432
  (e) => {
433
433
  const r = J();
434
- return m && X(r) && (e.preventDefault(), n.update(() => {
435
- r.getNodes().forEach((b) => {
436
- if (F(b)) {
437
- const x = b.getParent();
438
- b.remove(), x && xe(x) && x.getChildrenSize() === 0 && x.setFormat("left");
434
+ return g && X(r) && (e.preventDefault(), n.update(() => {
435
+ r.getNodes().forEach((y) => {
436
+ if (F(y)) {
437
+ const w = y.getParent();
438
+ y.remove(), w && we(w) && w.getChildrenSize() === 0 && w.setFormat("left");
439
439
  }
440
440
  });
441
441
  })), !1;
442
442
  },
443
- [n, m]
443
+ [n, g]
444
444
  ), he = W(
445
445
  (e) => {
446
446
  const r = J(), c = q.current;
447
- if (m && X(r) && r.getNodes().length === 1) {
447
+ if (g && X(r) && r.getNodes().length === 1) {
448
448
  if (A)
449
449
  return ce(null), e.preventDefault(), S.focus(), !0;
450
450
  if (c !== null && c !== document.activeElement)
@@ -452,7 +452,7 @@ function zr({
452
452
  }
453
453
  return !1;
454
454
  },
455
- [S, m, A]
455
+ [S, g, A]
456
456
  ), pe = W(
457
457
  (e) => d.current === S || q.current === e.target ? (ce(null), n.update(() => {
458
458
  E(!0);
@@ -465,15 +465,15 @@ function zr({
465
465
  const r = e;
466
466
  if (L)
467
467
  return !0;
468
- const b = r.target === w.current;
469
- let x = !1;
470
- if (!b && w.current) {
471
- const V = w.current.getBoundingClientRect();
472
- x = r.clientX >= V.left && r.clientX <= V.right && r.clientY >= V.top && r.clientY <= V.bottom;
468
+ const y = r.target === x.current;
469
+ let w = !1;
470
+ if (!y && x.current) {
471
+ const V = x.current.getBoundingClientRect();
472
+ w = r.clientX >= V.left && r.clientX <= V.right && r.clientY >= V.top && r.clientY <= V.bottom;
473
473
  }
474
- return b || x ? (r.shiftKey ? E(!m) : (_(), E(!0)), !0) : !1;
474
+ return y || w ? (r.shiftKey ? E(!g) : (_(), E(!0)), !0) : !1;
475
475
  },
476
- [L, m, E, _]
476
+ [L, g, E, _]
477
477
  ), ie = W(
478
478
  (e) => {
479
479
  n.getEditorState().read(() => {
@@ -489,12 +489,12 @@ function zr({
489
489
  ae(() => {
490
490
  let e = !0;
491
491
  const r = n.getRootElement(), c = dt(
492
- n.registerUpdateListener(({ editorState: b }) => {
493
- e && i(b.read(() => J()));
492
+ n.registerUpdateListener(({ editorState: y }) => {
493
+ e && i(y.read(() => J()));
494
494
  }),
495
495
  n.registerCommand(
496
496
  ut,
497
- (b, x) => (d.current = x, !1),
497
+ (y, w) => (d.current = w, !1),
498
498
  M
499
499
  ),
500
500
  n.registerCommand(
@@ -509,7 +509,7 @@ function zr({
509
509
  ),
510
510
  n.registerCommand(
511
511
  gt,
512
- (b) => b.target === w.current ? (b.preventDefault(), !0) : !1,
512
+ (y) => y.target === x.current ? (y.preventDefault(), !0) : !1,
513
513
  M
514
514
  ),
515
515
  n.registerCommand(
@@ -536,8 +536,8 @@ function zr({
536
536
  _,
537
537
  n,
538
538
  L,
539
- m,
540
- f,
539
+ g,
540
+ b,
541
541
  te,
542
542
  he,
543
543
  pe,
@@ -547,26 +547,26 @@ function zr({
547
547
  ]);
548
548
  const Be = () => {
549
549
  n.update(() => {
550
- const e = U(f);
550
+ const e = U(b);
551
551
  F(e) && e.setShowCaption(!0);
552
552
  });
553
553
  }, Ye = (e, r) => {
554
554
  setTimeout(() => {
555
555
  I(!1);
556
556
  }, 200), n.update(() => {
557
- const c = U(f);
557
+ const c = U(b);
558
558
  F(c) && c.setWidthAndHeight(e, r);
559
559
  });
560
560
  }, Ke = () => {
561
561
  I(!0);
562
562
  }, Xe = (e) => {
563
- if (e.preventDefault(), e.stopPropagation(), u.startsWith("data:")) {
563
+ if (e.preventDefault(), e.stopPropagation(), m.startsWith("data:")) {
564
564
  const r = window.open("", "_blank");
565
565
  r && (r.document.write(`
566
566
  <!DOCTYPE html>
567
567
  <html>
568
568
  <head>
569
- <title>${p || "Image"}</title>
569
+ <title>${f || "Image"}</title>
570
570
  <style>
571
571
  body {
572
572
  margin: 0;
@@ -584,36 +584,36 @@ function zr({
584
584
  </style>
585
585
  </head>
586
586
  <body>
587
- <img src="${u}" alt="${p || "Image"}" />
587
+ <img src="${m}" alt="${f || "Image"}" />
588
588
  </body>
589
589
  </html>
590
590
  `), r.document.close());
591
591
  } else
592
- window.open(u, "_blank");
592
+ window.open(m, "_blank");
593
593
  }, Fe = (e) => {
594
594
  e.preventDefault(), e.stopPropagation(), n.update(() => {
595
- const r = U(f);
595
+ const r = U(b);
596
596
  if (F(r)) {
597
597
  const c = r.getParent();
598
- r.remove(), c && xe(c) && c.getChildrenSize() === 0 && c.setFormat("left");
598
+ r.remove(), c && we(c) && c.getChildrenSize() === 0 && c.setFormat("left");
599
599
  }
600
600
  });
601
601
  }, K = (e, r) => {
602
602
  e.preventDefault(), e.stopPropagation(), n.update(() => {
603
- const c = U(f);
603
+ const c = U(b);
604
604
  F(c) && c.setPosition(r);
605
605
  });
606
606
  }, Ge = (e) => {
607
- e.preventDefault(), e.stopPropagation(), l(!P);
607
+ e.preventDefault(), e.stopPropagation(), u(!P);
608
608
  }, qe = W(() => {
609
- h && !m && (Y.current = setTimeout(() => {
609
+ p && !g && (Y.current = setTimeout(() => {
610
610
  me(!0);
611
611
  }, 300));
612
- }, [h, m]), Ve = W(() => {
612
+ }, [p, g]), Ve = W(() => {
613
613
  Y.current && (clearTimeout(Y.current), Y.current = null), me(!1);
614
614
  }, []), fe = W((e) => {
615
- e.preventDefault(), e.stopPropagation(), h && window.open(h, "_blank", "noopener,noreferrer");
616
- }, [h]);
615
+ e.preventDefault(), e.stopPropagation(), p && window.open(p, "_blank", "noopener,noreferrer");
616
+ }, [p]);
617
617
  ae(() => () => {
618
618
  Y.current && clearTimeout(Y.current);
619
619
  }, []);
@@ -629,22 +629,22 @@ function zr({
629
629
  if (k && k.trim()) {
630
630
  const ne = k.trim(), rt = a.trim().replace(/^(add|also add|include|with|and)\s+(some|a|an)\s+/gi, "").replace(/^(add|also add|include|with|and)\s+/gi, "").trim();
631
631
  r = `${ne} with ${rt}`;
632
- } else if (p && p !== "Generated image" && p.trim()) {
632
+ } else if (f && f !== "Generated image" && f.trim()) {
633
633
  const ne = a.trim().replace(/^(add|also add|include|with|and)\s+(some|a|an)\s+/gi, "").replace(/^(add|also add|include|with|and)\s+/gi, "").trim();
634
- r = `${p} with ${ne}`;
634
+ r = `${f} with ${ne}`;
635
635
  }
636
636
  const c = await _t({
637
637
  content: `Generate Image: ${r}`
638
- }), b = c == null ? void 0 : c.data;
639
- if (!b)
638
+ }), y = c == null ? void 0 : c.data;
639
+ if (!y)
640
640
  throw new Error("Failed to generate image - empty response");
641
- const oe = new DOMParser().parseFromString(b, "text/html").querySelector("img");
641
+ const oe = new DOMParser().parseFromString(y, "text/html").querySelector("img");
642
642
  if (!oe || !oe.src)
643
643
  throw new Error("No image found in response");
644
644
  const tt = oe.src;
645
645
  $.dismiss(e), $.success("Image refined successfully!", {
646
646
  description: "Compare the images and choose which to keep."
647
- }), Q(tt), ee(r), Z(!0), H(""), l(!1);
647
+ }), Q(tt), ee(r), Z(!0), H(""), u(!1);
648
648
  } catch (r) {
649
649
  if ($.dismiss(e), r instanceof Ot) {
650
650
  const c = r.code === "API_KEYS_DISABLED" ? "API Keys Disabled" : "API Key Required";
@@ -664,7 +664,7 @@ function zr({
664
664
  }
665
665
  }, Je = () => {
666
666
  n.update(() => {
667
- const e = U(f);
667
+ const e = U(b);
668
668
  if (F(e)) {
669
669
  e.setSrc(ue), e.setOriginalPrompt(Oe);
670
670
  const r = J();
@@ -675,16 +675,16 @@ function zr({
675
675
  });
676
676
  }, Ue = () => {
677
677
  Z(!1), Q(""), ee("");
678
- }, Ze = m && X(O) && !L, ye = (m || L) && C, Qe = () => y === "left" || y === "right" ? {
678
+ }, Ze = g && X(O) && !L, ye = (g || L) && C, Qe = () => l === "left" || l === "right" ? {
679
679
  position: "relative",
680
680
  display: "block",
681
681
  width: "100%"
682
682
  // Fill the floated container
683
- } : y === "full" ? {
683
+ } : l === "full" ? {
684
684
  position: "relative",
685
685
  display: "inline-block"
686
686
  // Use inline-block to respect text-align: center from parent
687
- } : y === "inline-left" || y === "inline-center" || y === "inline-right" ? {
687
+ } : l === "inline-left" || l === "inline-center" || l === "inline-right" ? {
688
688
  position: "relative",
689
689
  display: "inline-block"
690
690
  // Use inline-block to respect text-align from parent
@@ -695,18 +695,18 @@ function zr({
695
695
  (e) => {
696
696
  if (L || e.target.closest("button"))
697
697
  return;
698
- const c = e.target === w.current;
699
- let b = !1;
700
- if (!c && w.current) {
701
- const x = w.current.getBoundingClientRect();
702
- b = e.clientX >= x.left && e.clientX <= x.right && e.clientY >= x.top && e.clientY <= x.bottom;
698
+ const c = e.target === x.current;
699
+ let y = !1;
700
+ if (!c && x.current) {
701
+ const w = x.current.getBoundingClientRect();
702
+ y = e.clientX >= w.left && e.clientX <= w.right && e.clientY >= w.top && e.clientY <= w.bottom;
703
703
  }
704
- !c && !b || (e.stopPropagation(), e.shiftKey ? E(!m) : (_(), E(!0)));
704
+ !c && !y || (e.stopPropagation(), e.shiftKey ? E(!g) : (_(), E(!0)));
705
705
  },
706
- [L, m, E, _]
706
+ [L, g, E, _]
707
707
  );
708
- return /* @__PURE__ */ t(wt, { fallback: null, children: /* @__PURE__ */ g(it, { children: [
709
- /* @__PURE__ */ g(
708
+ return /* @__PURE__ */ t(xt, { fallback: null, children: /* @__PURE__ */ h(it, { children: [
709
+ /* @__PURE__ */ h(
710
710
  "div",
711
711
  {
712
712
  draggable: Ze,
@@ -718,24 +718,24 @@ function zr({
718
718
  o ? /* @__PURE__ */ t(Ft, {}) : /* @__PURE__ */ t(
719
719
  Xt,
720
720
  {
721
- className: ye ? `focused ${X(O) ? "draggable" : ""}` : h ? "cteditor-cursor-pointer" : null,
722
- src: u,
723
- altText: p,
724
- imageRef: w,
721
+ className: ye ? `focused ${X(O) ? "draggable" : ""}` : p ? "cteditor-cursor-pointer" : null,
722
+ src: m,
723
+ altText: f,
724
+ imageRef: x,
725
725
  width: N,
726
726
  height: z,
727
727
  maxWidth: v,
728
728
  onError: () => D(!0)
729
729
  }
730
730
  ),
731
- He && h && !m && /* @__PURE__ */ g(
731
+ He && p && !g && /* @__PURE__ */ h(
732
732
  "div",
733
733
  {
734
734
  className: "cteditor-absolute cteditor-bottom-2 cteditor-left-2 cteditor-right-2 cteditor-bg-background cteditor-rounded-lg cteditor-shadow-lg cteditor-border cteditor-border-border cteditor-p-2 cteditor-flex cteditor-items-center cteditor-gap-2",
735
735
  style: { zIndex: 10 },
736
736
  children: [
737
737
  /* @__PURE__ */ t(Tt, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-muted-foreground cteditor-flex-shrink-0" }),
738
- /* @__PURE__ */ t("span", { className: "cteditor-text-sm cteditor-text-foreground cteditor-truncate cteditor-flex-1", children: h }),
738
+ /* @__PURE__ */ t("span", { className: "cteditor-text-sm cteditor-text-foreground cteditor-truncate cteditor-flex-1", children: p }),
739
739
  /* @__PURE__ */ t(
740
740
  "button",
741
741
  {
@@ -747,17 +747,17 @@ function zr({
747
747
  ]
748
748
  }
749
749
  ),
750
- m && X(O) && !o && /* @__PURE__ */ g(
750
+ g && X(O) && !o && /* @__PURE__ */ h(
751
751
  "div",
752
752
  {
753
753
  className: `cteditor-absolute cteditor-flex cteditor-gap-1 z-10 ${je ? "cteditor-left-1/2 cteditor--translate-x-1/2 cteditor-bottom-0 cteditor-translate-y-full cteditor-mt-1" : "cteditor-top-2 cteditor-right-2"}`,
754
754
  children: [
755
- /* @__PURE__ */ g("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-0.5 cteditor-bg-background/80 cteditor-rounded-md cteditor-shadow-md cteditor-border cteditor-border-border cteditor-p-0.5", children: [
755
+ /* @__PURE__ */ h("div", { className: "cteditor-flex cteditor-items-center cteditor-gap-0.5 cteditor-bg-background/80 cteditor-rounded-md cteditor-shadow-md cteditor-border cteditor-border-border cteditor-p-0.5", children: [
756
756
  /* @__PURE__ */ t(
757
757
  "button",
758
758
  {
759
759
  onClick: (e) => K(e, "left"),
760
- className: ` cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${y === "left" ? "cteditor-bg-accent" : ""}`,
760
+ className: ` cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${l === "left" ? "cteditor-bg-accent" : ""}`,
761
761
  "aria-label": "Wrap text left",
762
762
  title: "Wrap text left",
763
763
  children: /* @__PURE__ */ t(Pt, {})
@@ -767,7 +767,7 @@ function zr({
767
767
  "button",
768
768
  {
769
769
  onClick: (e) => K(e, "right"),
770
- className: ` cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${y === "right" ? "cteditor-bg-accent" : ""}`,
770
+ className: ` cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${l === "right" ? "cteditor-bg-accent" : ""}`,
771
771
  "aria-label": "Wrap text right",
772
772
  title: "Wrap text right",
773
773
  children: /* @__PURE__ */ t(Rt, {})
@@ -778,7 +778,7 @@ function zr({
778
778
  "button",
779
779
  {
780
780
  onClick: (e) => K(e, "inline-left"),
781
- className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${y === "inline-left" ? "cteditor-bg-accent" : ""}`,
781
+ className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${l === "inline-left" ? "cteditor-bg-accent" : ""}`,
782
782
  "aria-label": "Align left",
783
783
  title: "Align left (no text wrap)",
784
784
  children: /* @__PURE__ */ t(Dt, {})
@@ -788,7 +788,7 @@ function zr({
788
788
  "button",
789
789
  {
790
790
  onClick: (e) => K(e, "inline-center"),
791
- className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${y === "inline-center" || y === "full" ? "cteditor-bg-accent" : ""}`,
791
+ className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${l === "inline-center" || l === "full" ? "cteditor-bg-accent" : ""}`,
792
792
  "aria-label": "Align center",
793
793
  title: "Align center (no text wrap)",
794
794
  children: /* @__PURE__ */ t(zt, {})
@@ -798,7 +798,7 @@ function zr({
798
798
  "button",
799
799
  {
800
800
  onClick: (e) => K(e, "inline-right"),
801
- className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${y === "inline-right" ? "cteditor-bg-accent" : ""}`,
801
+ className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${l === "inline-right" ? "cteditor-bg-accent" : ""}`,
802
802
  "aria-label": "Align right",
803
803
  title: "Align right (no text wrap)",
804
804
  children: /* @__PURE__ */ t(St, {})
@@ -809,20 +809,20 @@ function zr({
809
809
  "button",
810
810
  {
811
811
  onClick: (e) => K(e, "none"),
812
- className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${y === "none" ? "cteditor-bg-accent" : ""}`,
812
+ className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${l === "none" ? "cteditor-bg-accent" : ""}`,
813
813
  "aria-label": "Inline",
814
814
  title: "Inline with text",
815
815
  children: /* @__PURE__ */ t(Lt, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
816
816
  }
817
817
  )
818
818
  ] }),
819
- h && /* @__PURE__ */ t(
819
+ p && /* @__PURE__ */ t(
820
820
  "button",
821
821
  {
822
822
  onClick: fe,
823
823
  className: " cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-background/80 hover:cteditor-bg-accent cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-border",
824
824
  "aria-label": "Visit link",
825
- title: `Visit: ${h}`,
825
+ title: `Visit: ${p}`,
826
826
  children: /* @__PURE__ */ t(Wt, {})
827
827
  }
828
828
  ),
@@ -865,7 +865,7 @@ function zr({
865
865
  ]
866
866
  }
867
867
  ),
868
- P && m && !o && k && /* @__PURE__ */ t(
868
+ P && g && !o && k && /* @__PURE__ */ t(
869
869
  "div",
870
870
  {
871
871
  className: "cteditor-absolute cteditor-bottom-2 cteditor-left-2 cteditor-right-2 cteditor-bg-background cteditor-rounded-lg cteditor-shadow-xl cteditor-border cteditor-border-border cteditor-p-3",
@@ -873,7 +873,7 @@ function zr({
873
873
  onClick: (e) => e.stopPropagation(),
874
874
  onKeyDown: (e) => e.stopPropagation(),
875
875
  onKeyUp: (e) => e.stopPropagation(),
876
- children: /* @__PURE__ */ g("div", { className: "cteditor-flex cteditor-flex-col cteditor-gap-2", children: [
876
+ children: /* @__PURE__ */ h("div", { className: "cteditor-flex cteditor-flex-col cteditor-gap-2", children: [
877
877
  /* @__PURE__ */ t("label", { className: "cteditor-text-xs cteditor-font-medium cteditor-text-foreground", children: "What else do you want in this scene?" }),
878
878
  /* @__PURE__ */ t(
879
879
  "input",
@@ -882,7 +882,7 @@ function zr({
882
882
  value: a,
883
883
  onChange: (e) => H(e.target.value),
884
884
  onKeyDown: (e) => {
885
- e.stopPropagation(), e.key === "Enter" && a.trim() && !B && be(), e.key === "Escape" && (l(!1), H(""));
885
+ e.stopPropagation(), e.key === "Enter" && a.trim() && !B && be(), e.key === "Escape" && (u(!1), H(""));
886
886
  },
887
887
  onKeyUp: (e) => {
888
888
  e.stopPropagation();
@@ -896,7 +896,7 @@ function zr({
896
896
  autoFocus: !0
897
897
  }
898
898
  ),
899
- /* @__PURE__ */ g("div", { className: "cteditor-flex cteditor-gap-2", children: [
899
+ /* @__PURE__ */ h("div", { className: "cteditor-flex cteditor-gap-2", children: [
900
900
  /* @__PURE__ */ t(
901
901
  "button",
902
902
  {
@@ -905,7 +905,7 @@ function zr({
905
905
  },
906
906
  disabled: B || !a.trim(),
907
907
  className: "cteditor-flex-1 cteditor-px-3 cteditor-py-2 cteditor-text-sm cteditor-rounded-md cteditor-bg-blue-500 cteditor-text-white hover:cteditor-bg-blue-600 disabled:cteditor-opacity-50 disabled:cteditor-cursor-not-allowed cteditor-transition-colors",
908
- children: B ? /* @__PURE__ */ g("span", { className: "cteditor-flex cteditor-items-center cteditor-justify-center cteditor-gap-2", children: [
908
+ children: B ? /* @__PURE__ */ h("span", { className: "cteditor-flex cteditor-items-center cteditor-justify-center cteditor-gap-2", children: [
909
909
  /* @__PURE__ */ t("span", { className: "cteditor-inline-block cteditor-w-4 cteditor-h-4 cteditor-border-2 cteditor-border-white cteditor-border-t-transparent cteditor-rounded-full cteditor-animate-spin" }),
910
910
  "Refining..."
911
911
  ] }) : "Refine Image"
@@ -915,7 +915,7 @@ function zr({
915
915
  "button",
916
916
  {
917
917
  onClick: (e) => {
918
- e.stopPropagation(), l(!1), H("");
918
+ e.stopPropagation(), u(!1), H("");
919
919
  },
920
920
  disabled: B,
921
921
  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",
@@ -933,7 +933,7 @@ function zr({
933
933
  setShowCaption: Be,
934
934
  editor: n,
935
935
  buttonRef: q,
936
- imageRef: w,
936
+ imageRef: x,
937
937
  maxWidth: v,
938
938
  onResizeStart: Ke,
939
939
  onResizeEnd: Ye,
@@ -943,52 +943,64 @@ function zr({
943
943
  ]
944
944
  }
945
945
  ),
946
- A && (p.startsWith("Signature by") ? /* @__PURE__ */ t(Bt, { caption: S }) : /* @__PURE__ */ t("div", { className: "image-caption-container", children: /* @__PURE__ */ g(
947
- Re,
946
+ A && (f.startsWith("Signature by") ? /* @__PURE__ */ t(Bt, { caption: S }) : /* @__PURE__ */ t(
947
+ "div",
948
948
  {
949
- initialEditor: S,
950
- initialNodes: [
951
- Se,
952
- Le,
953
- We,
954
- Ae,
955
- ke,
956
- ve
957
- ],
958
- children: [
959
- /* @__PURE__ */ t(ot, {}),
960
- /* @__PURE__ */ t(
961
- ze,
962
- {
963
- contentEditable: /* @__PURE__ */ t(
964
- Ee,
949
+ className: "image-caption-container",
950
+ style: {
951
+ width: typeof N == "number" ? `${N}px` : "100%",
952
+ maxWidth: "100%",
953
+ // Match the image's alignment
954
+ ...l === "inline-center" || l === "full" ? { margin: "0 auto" } : l === "inline-right" ? { marginLeft: "auto" } : l === "left" ? { float: "left", clear: "left" } : l === "right" ? { float: "right", clear: "right" } : {}
955
+ },
956
+ children: /* @__PURE__ */ h(
957
+ Re,
958
+ {
959
+ initialEditor: S,
960
+ initialNodes: [
961
+ Se,
962
+ Le,
963
+ We,
964
+ Ae,
965
+ ke,
966
+ ve
967
+ ],
968
+ children: [
969
+ /* @__PURE__ */ t(ot, {}),
970
+ /* @__PURE__ */ t(
971
+ ze,
965
972
  {
966
- "aria-placeholder": "Enter a caption...",
967
- placeholder: () => /* @__PURE__ */ t("span", { className: "cteditor-text-xs", children: "Enter a caption..." }),
968
- className: "ImageNode__contentEditable"
973
+ contentEditable: /* @__PURE__ */ t(
974
+ Ee,
975
+ {
976
+ "aria-placeholder": "Enter a caption...",
977
+ placeholder: () => /* @__PURE__ */ t("span", { className: "cteditor-text-xs", children: "Enter a caption..." }),
978
+ className: "ImageNode__contentEditable"
979
+ }
980
+ ),
981
+ ErrorBoundary: Ie
969
982
  }
970
983
  ),
971
- ErrorBoundary: Ie
972
- }
973
- ),
974
- /* @__PURE__ */ t(
975
- De,
976
- {
977
- onChange: () => {
978
- }
979
- }
980
- ),
981
- /* @__PURE__ */ t(Pe, {}),
982
- /* @__PURE__ */ t(Me, { namespace: $e.namespace })
983
- ]
984
+ /* @__PURE__ */ t(
985
+ De,
986
+ {
987
+ onChange: () => {
988
+ }
989
+ }
990
+ ),
991
+ /* @__PURE__ */ t(Pe, {}),
992
+ /* @__PURE__ */ t(Me, { namespace: $e.namespace })
993
+ ]
994
+ }
995
+ )
984
996
  }
985
- ) })),
997
+ )),
986
998
  /* @__PURE__ */ t(
987
999
  jt,
988
1000
  {
989
1001
  open: _e,
990
1002
  onOpenChange: Z,
991
- oldImageUrl: u,
1003
+ oldImageUrl: m,
992
1004
  newImageUrl: ue,
993
1005
  onReplace: Je,
994
1006
  onCancel: Ue