eddyter 1.4.5 → 1.4.7

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 (24) hide show
  1. package/README.md +31 -6
  2. package/dist/{ImageResizer-Bt7kgv0a.js → ImageResizer-C5luyjPa.js} +68 -59
  3. package/dist/assets/style.css +1 -1
  4. package/dist/components/ConfigurableEditorWithAuth.d.ts +8 -6
  5. package/dist/components/LineHeightPicker/LineHeightControl.d.ts +3 -0
  6. package/dist/editor/components/FloatingToolbarManager.d.ts +3 -1
  7. package/dist/editor/hooks/useFloatingToolbar.d.ts +3 -2
  8. package/dist/{generateDocxThumbnail-CNLulV6U.js → generateDocxThumbnail-CsyiVRDN.js} +1 -1
  9. package/dist/{generatePdfThumbnail-BFSOSFAX.js → generatePdfThumbnail-DCt8gJMy.js} +1 -1
  10. package/dist/{generateXlsxThumbnail-CfJuOgEl.js → generateXlsxThumbnail-DgeyjjM-.js} +1 -1
  11. package/dist/hooks/useAutoExpandingHeight.d.ts +1 -1
  12. package/dist/{html2pdf.bundle.min-wRsYlGzo.js → html2pdf.bundle.min-Da_gEqE8.js} +1 -1
  13. package/dist/{index-Ct824Y4n.js → index-Bq1EWxza.js} +4 -4
  14. package/dist/{index-Dsv2sdJQ.js → index-CoO1ZeVi.js} +106 -109
  15. package/dist/{index-DMZDKMjN.js → index-Cs_v2OZr.js} +47393 -43616
  16. package/dist/{index-BJ5KLQGQ.js → index-DAqL9TB6.js} +66 -67
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +2 -2
  20. package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +4 -1
  21. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +8 -1
  22. package/dist/types.d.ts +8 -0
  23. package/dist/utils/fileUploadValidation.d.ts +2 -0
  24. package/package.json +1 -1
@@ -1,22 +1,21 @@
1
1
  import { jsx as r, jsxs as h, Fragment as Kt } from "react/jsx-runtime";
2
- import { I as _e } from "./ImageResizer-Bt7kgv0a.js";
3
- import { CodeNode as ee } from "@lexical/code";
4
- import { LinkNode as re } from "@lexical/link";
5
- import { AutoFocusPlugin as Oe } from "@lexical/react/LexicalAutoFocusPlugin";
6
- import { useCollaborationContext as He } from "@lexical/react/LexicalCollaborationContext";
7
- import { useLexicalComposerContext as Fe } from "@lexical/react/LexicalComposerContext";
8
- import { ContentEditable as oe } from "@lexical/react/LexicalContentEditable";
9
- import { LexicalErrorBoundary as ie } from "@lexical/react/LexicalErrorBoundary";
10
- import { HistoryPlugin as ae } from "@lexical/react/LexicalHistoryPlugin";
11
- import { LexicalNestedComposer as ne } from "@lexical/react/LexicalNestedComposer";
12
- import { OnChangePlugin as se } from "@lexical/react/LexicalOnChangePlugin";
13
- import { RichTextPlugin as de } from "@lexical/react/LexicalRichTextPlugin";
14
- import { useLexicalEditable as Xe } from "@lexical/react/useLexicalEditable";
15
- import { useLexicalNodeSelection as Be } from "@lexical/react/useLexicalNodeSelection";
16
- import { mergeRegister as Ue } from "@lexical/utils";
17
- import { RootNode as ce, TextNode as le, LineBreakNode as ue, ParagraphNode as me, $isNodeSelection as st, $getSelection as dt, $isParagraphNode as Yt, $setSelection as xt, $isRangeSelection as Ke, SELECTION_CHANGE_COMMAND as Ge, COMMAND_PRIORITY_LOW as tt, CLICK_COMMAND as qe, DRAGSTART_COMMAND as Ve, KEY_DELETE_COMMAND as Je, KEY_BACKSPACE_COMMAND as Qe, KEY_ENTER_COMMAND as Ze, KEY_ESCAPE_COMMAND as tr, $getNodeByKey as ct, createCommand as er } from "lexical";
18
- import wt, { useState as I, useRef as V, useMemo as Gt, useCallback as S, useEffect as rt, useLayoutEffect as qt, Suspense as rr } from "react";
19
- import { c as vt, D as ge, a as fe, b as he, d as pe, e as be, f as ye, B as Vt, L as xe, i as we, C as It, I as or, S as ir, u as ar, $ as et, t as M, g as nr, h as sr, j as dr, W as cr, k as lr, A as ur, l as mr, m as gr, T as fr, n as hr, o as pr, E as br, p as yr, X as xr, q as wr, r as vr, s as Cr } from "./index-DMZDKMjN.js";
2
+ import { I as _e } from "./ImageResizer-C5luyjPa.js";
3
+ import { c as vt, D as ee, a as re, b as oe, d as ie, e as ae, f as ne, B as Gt, M as se, L as de, i as ce, C as It, I as Oe, S as He, u as Fe, $ as tt, t as M, g as Xe, h as Be, j as Ue, W as Ke, k as Ge, A as qe, l as Ve, m as Je, T as Qe, n as Ze, o as tr, E as er, p as rr, X as or, q as ir, r as ar, s as nr } from "./index-Cs_v2OZr.js";
4
+ import { LinkNode as le } from "@lexical/link";
5
+ import { AutoFocusPlugin as sr } from "@lexical/react/LexicalAutoFocusPlugin";
6
+ import { useCollaborationContext as dr } from "@lexical/react/LexicalCollaborationContext";
7
+ import { useLexicalComposerContext as cr } from "@lexical/react/LexicalComposerContext";
8
+ import { ContentEditable as ue } from "@lexical/react/LexicalContentEditable";
9
+ import { LexicalErrorBoundary as me } from "@lexical/react/LexicalErrorBoundary";
10
+ import { HistoryPlugin as ge } from "@lexical/react/LexicalHistoryPlugin";
11
+ import { LexicalNestedComposer as fe } from "@lexical/react/LexicalNestedComposer";
12
+ import { OnChangePlugin as he } from "@lexical/react/LexicalOnChangePlugin";
13
+ import { RichTextPlugin as pe } from "@lexical/react/LexicalRichTextPlugin";
14
+ import { useLexicalEditable as lr } from "@lexical/react/useLexicalEditable";
15
+ import { useLexicalNodeSelection as ur } from "@lexical/react/useLexicalNodeSelection";
16
+ import { mergeRegister as mr } from "@lexical/utils";
17
+ import { RootNode as be, TextNode as ye, LineBreakNode as xe, ParagraphNode as we, $isNodeSelection as st, $getSelection as dt, $isParagraphNode as Yt, $setSelection as xt, $isRangeSelection as gr, SELECTION_CHANGE_COMMAND as fr, COMMAND_PRIORITY_LOW as et, CLICK_COMMAND as hr, DRAGSTART_COMMAND as pr, KEY_DELETE_COMMAND as br, KEY_BACKSPACE_COMMAND as yr, KEY_ENTER_COMMAND as xr, KEY_ESCAPE_COMMAND as wr, $getNodeByKey as ct, createCommand as vr } from "lexical";
18
+ import wt, { useState as I, useRef as V, useMemo as qt, useCallback as S, useEffect as rt, useLayoutEffect as Vt, Suspense as Cr } from "react";
20
19
  import "react-dom";
21
20
  const ve = vt("Crop", [
22
21
  ["path", { d: "M6 2v14a2 2 0 0 0 2 2h14", key: "ron5a4" }],
@@ -43,13 +42,13 @@ const kr = vt("RotateCcw", [
43
42
  newImageUrl: d,
44
43
  onReplace: N,
45
44
  onCancel: w
46
- }) => /* @__PURE__ */ r(ge, { open: i, onOpenChange: o, children: /* @__PURE__ */ h(fe, { className: "sm:max-w-[800px] max-h-[90vh] overflow-y-auto", children: [
47
- /* @__PURE__ */ h(he, { children: [
48
- /* @__PURE__ */ h(pe, { className: "flex items-center gap-2 text-xl", children: [
45
+ }) => /* @__PURE__ */ r(ee, { open: i, onOpenChange: o, children: /* @__PURE__ */ h(re, { className: "sm:max-w-[800px] max-h-[90vh] overflow-y-auto", children: [
46
+ /* @__PURE__ */ h(oe, { children: [
47
+ /* @__PURE__ */ h(ie, { className: "flex items-center gap-2 text-xl", children: [
49
48
  /* @__PURE__ */ r("span", { className: "text-2xl", children: "🔄" }),
50
49
  "Compare Images"
51
50
  ] }),
52
- /* @__PURE__ */ r(be, { className: "text-sm pt-1", children: "Choose whether to replace the original image with the refined version." })
51
+ /* @__PURE__ */ r(ae, { className: "text-sm pt-1", children: "Choose whether to replace the original image with the refined version." })
53
52
  ] }),
54
53
  /* @__PURE__ */ h("div", { className: "space-y-4 py-4", children: [
55
54
  /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-4", children: /* @__PURE__ */ h("div", { className: "space-y-2", children: [
@@ -71,9 +70,9 @@ const kr = vt("RotateCcw", [
71
70
  ' Clicking "Replace" will update the image in your document. This action cannot be undone.'
72
71
  ] }) })
73
72
  ] }),
74
- /* @__PURE__ */ h(ye, { className: "gap-2", children: [
73
+ /* @__PURE__ */ h(ne, { className: "gap-2", children: [
75
74
  /* @__PURE__ */ r(
76
- Vt,
75
+ Gt,
77
76
  {
78
77
  variant: "outline",
79
78
  onClick: w,
@@ -81,7 +80,7 @@ const kr = vt("RotateCcw", [
81
80
  }
82
81
  ),
83
82
  /* @__PURE__ */ h(
84
- Vt,
83
+ Gt,
85
84
  {
86
85
  onClick: N,
87
86
  className: "bg-blue-500 hover:bg-blue-600 text-white",
@@ -97,23 +96,23 @@ function Er({
97
96
  caption: i
98
97
  }) {
99
98
  return /* @__PURE__ */ r("div", { className: "signature-caption-container", children: /* @__PURE__ */ h(
100
- ne,
99
+ fe,
101
100
  {
102
101
  initialEditor: i,
103
102
  initialNodes: [
104
- ce,
103
+ be,
104
+ ye,
105
+ xe,
106
+ we,
105
107
  le,
106
- ue,
107
- me,
108
- re,
109
- ee
108
+ se
110
109
  ],
111
110
  children: [
112
111
  /* @__PURE__ */ r(
113
- de,
112
+ pe,
114
113
  {
115
114
  contentEditable: /* @__PURE__ */ r(
116
- oe,
115
+ ue,
117
116
  {
118
117
  "aria-placeholder": "Enter signature name...",
119
118
  placeholder: /* @__PURE__ */ r("div", { style: {
@@ -129,13 +128,13 @@ function Er({
129
128
  className: "signature-caption-editable"
130
129
  }
131
130
  ),
132
- ErrorBoundary: ie
131
+ ErrorBoundary: me
133
132
  }
134
133
  ),
135
- /* @__PURE__ */ r(se, { onChange: () => {
134
+ /* @__PURE__ */ r(he, { onChange: () => {
136
135
  } }),
137
- /* @__PURE__ */ r(ae, {}),
138
- /* @__PURE__ */ r(xe, { namespace: we.namespace })
136
+ /* @__PURE__ */ r(ge, {}),
137
+ /* @__PURE__ */ r(de, { namespace: ce.namespace })
139
138
  ]
140
139
  }
141
140
  ) });
@@ -379,7 +378,7 @@ function Wr({
379
378
  height: w,
380
379
  onCropApply: L
381
380
  }) {
382
- const [P, k] = I("freeform"), [v, E] = I(e), [c, C] = I(!1), y = V(null), D = V(null), [n, W] = I({ x: 0, y: 0, width: 0, height: 0 }), [R, $] = I({ x: 0, y: 0, width: 0, height: 0 }), ot = V(null), lt = Gt(() => typeof N == "number" && typeof w == "number" && w > 0 ? N / w : n.width > 0 && n.height > 0 ? n.width / n.height : null, [n.height, n.width, w, N]), pt = Gt(() => {
381
+ const [P, k] = I("freeform"), [v, E] = I(e), [c, C] = I(!1), y = V(null), D = V(null), [n, W] = I({ x: 0, y: 0, width: 0, height: 0 }), [R, $] = I({ x: 0, y: 0, width: 0, height: 0 }), ot = V(null), lt = qt(() => typeof N == "number" && typeof w == "number" && w > 0 ? N / w : n.width > 0 && n.height > 0 ? n.width / n.height : null, [n.height, n.width, w, N]), pt = qt(() => {
383
382
  switch (P) {
384
383
  case "original":
385
384
  return lt;
@@ -537,8 +536,8 @@ function Wr({
537
536
  j
538
537
  ]), rt(() => {
539
538
  i && bt(pt);
540
- }, [i, pt, n, bt]), /* @__PURE__ */ r(ge, { open: i, onOpenChange: o, children: /* @__PURE__ */ r(
541
- fe,
539
+ }, [i, pt, n, bt]), /* @__PURE__ */ r(ee, { open: i, onOpenChange: o, children: /* @__PURE__ */ r(
540
+ re,
542
541
  {
543
542
  className: "sm:cteditor-max-w-[860px] cteditor-max-w-[calc(100%-2rem)] cteditor-rounded-xl cteditor-overflow-hidden cteditor-p-0",
544
543
  onClick: (s) => s.stopPropagation(),
@@ -624,17 +623,17 @@ function Wr({
624
623
  }
625
624
  ) }),
626
625
  /* @__PURE__ */ h("div", { className: "cteditor-p-4 md:cteditor-p-5 cteditor-border-l cteditor-border-border cteditor-bg-background", children: [
627
- /* @__PURE__ */ h(he, { className: "cteditor-mb-4 cteditor-space-y-1", children: [
628
- /* @__PURE__ */ r(pe, { children: "Crop" }),
629
- /* @__PURE__ */ r(be, { children: "Choose an aspect ratio and adjust the crop area, then click Apply." })
626
+ /* @__PURE__ */ h(oe, { className: "cteditor-mb-4 cteditor-space-y-1", children: [
627
+ /* @__PURE__ */ r(ie, { children: "Crop" }),
628
+ /* @__PURE__ */ r(ae, { children: "Choose an aspect ratio and adjust the crop area, then click Apply." })
630
629
  ] }),
631
630
  /* @__PURE__ */ h("div", { className: "cteditor-space-y-4", children: [
632
631
  /* @__PURE__ */ h("div", { children: [
633
632
  /* @__PURE__ */ r("p", { className: "cteditor-text-sm cteditor-font-medium cteditor-mb-2", children: "Aspect ratio" }),
634
633
  /* @__PURE__ */ r("div", { className: "cteditor-grid cteditor-grid-cols-3 cteditor-gap-2", children: [
635
634
  { id: "freeform", label: "Freeform", icon: ve },
636
- { id: "original", label: "Original", icon: or },
637
- { id: "1:1", label: "1:1", icon: ir },
635
+ { id: "original", label: "Original", icon: Oe },
636
+ { id: "1:1", label: "1:1", icon: He },
638
637
  { id: "4:3", label: "4:3", icon: Jt },
639
638
  { id: "16:9", label: "16:9", icon: Jt },
640
639
  { id: "3:4", label: "3:4", icon: Qt },
@@ -674,7 +673,7 @@ function Wr({
674
673
  ] })
675
674
  ] })
676
675
  ] }),
677
- /* @__PURE__ */ h(ye, { className: "cteditor-gap-2 cteditor-mt-4", children: [
676
+ /* @__PURE__ */ h(ne, { className: "cteditor-gap-2 cteditor-mt-4", children: [
678
677
  /* @__PURE__ */ r(
679
678
  "button",
680
679
  {
@@ -710,7 +709,7 @@ function Wr({
710
709
  }
711
710
  ) });
712
711
  }
713
- const Et = /* @__PURE__ */ new Set(), te = er("RIGHT_CLICK_IMAGE_COMMAND");
712
+ const Et = /* @__PURE__ */ new Set(), te = vr("RIGHT_CLICK_IMAGE_COMMAND");
714
713
  function jr(i) {
715
714
  if (!Et.has(i))
716
715
  throw new Promise((o) => {
@@ -744,8 +743,6 @@ function Yr({
744
743
  ref: e,
745
744
  style: c ? {
746
745
  width: C,
747
- // Use height: auto + aspect-ratio so the image scales
748
- // proportionally when max-width constrains on small screens.
749
746
  height: "auto",
750
747
  aspectRatio: `${C} / ${y}`,
751
748
  maxWidth: "100%"
@@ -784,7 +781,7 @@ function _r() {
784
781
  }
785
782
  );
786
783
  }
787
- function co({
784
+ function so({
788
785
  src: i,
789
786
  altText: o,
790
787
  nodeKey: e,
@@ -799,8 +796,8 @@ function co({
799
796
  position: c = "none",
800
797
  linkUrl: C
801
798
  }) {
802
- const y = V(null), D = V(null), [n, W, R] = Be(e), [$, ot] = I(!1), lt = V(!1), { isCollabActive: pt } = He(), [m] = Fe(), [j, bt] = I(null), it = V(null), [J, Pt] = I(!1), St = Xe(), [s, p] = I(!1), [b, g] = I(""), [x, F] = I(!1), [ut, mt] = I(!1), [Q, K] = I(""), [at, _] = I(""), [G, A] = I(!1), O = V(null), [Z, X] = I(0), [B, gt] = I(!1), Ct = V(null), [Ne, yt] = I(null), [zt, Mt] = I(!1), Nt = ar()?.apiKey, At = Z > 0 && Z < 350;
803
- qt(() => {
799
+ const y = V(null), D = V(null), [n, W, R] = ur(e), [$, ot] = I(!1), lt = V(!1), { isCollabActive: pt } = dr(), [m] = cr(), [j, bt] = I(null), it = V(null), [J, Pt] = I(!1), St = lr(), [s, p] = I(!1), [b, g] = I(""), [x, F] = I(!1), [ut, mt] = I(!1), [Q, K] = I(""), [at, _] = I(""), [G, A] = I(!1), O = V(null), [Z, X] = I(0), [B, gt] = I(!1), Ct = V(null), [Ne, yt] = I(null), [zt, Mt] = I(!1), Nt = Fe()?.apiKey, At = Z > 0 && Z < 350;
800
+ Vt(() => {
804
801
  if (!n || !st(j) || J) {
805
802
  yt(null);
806
803
  return;
@@ -840,7 +837,7 @@ function co({
840
837
  const a = new ResizeObserver(t);
841
838
  return a.observe(y.current), () => a.disconnect();
842
839
  }
843
- }, [d, N, n]), qt(() => {
840
+ }, [d, N, n]), Vt(() => {
844
841
  if ((c === "left" || c === "right") && typeof d == "number" && y.current) {
845
842
  const t = y.current.closest(".editor-image"), a = t?.parentElement, l = m.getRootElement(), u = l ? l.getBoundingClientRect().width : d + 32, f = `${Math.min(d + 32, u)}px`;
846
843
  return t && (t.style.removeProperty("display"), t.style.setProperty("max-width", f, "important")), a && a.style.setProperty("max-width", f, "important"), () => {
@@ -853,7 +850,7 @@ function co({
853
850
  const a = dt();
854
851
  return n && st(a) && (t.preventDefault(), m.update(() => {
855
852
  a.getNodes().forEach((u) => {
856
- if (et(u)) {
853
+ if (tt(u)) {
857
854
  const f = u.getParent();
858
855
  u.remove(), f && Yt(f) && f.getChildrenSize() === 0 && f.setFormat("left");
859
856
  }
@@ -901,7 +898,7 @@ function co({
901
898
  (t) => {
902
899
  m.getEditorState().read(() => {
903
900
  const a = dt();
904
- t.target.tagName === "IMG" && Ke(a) && a.getNodes().length === 1 && m.dispatchCommand(
901
+ t.target.tagName === "IMG" && gr(a) && a.getNodes().length === 1 && m.dispatchCommand(
905
902
  te,
906
903
  t
907
904
  );
@@ -911,45 +908,45 @@ function co({
911
908
  );
912
909
  rt(() => {
913
910
  let t = !0;
914
- const a = m.getRootElement(), l = Ue(
911
+ const a = m.getRootElement(), l = mr(
915
912
  m.registerUpdateListener(({ editorState: u }) => {
916
913
  t && bt(u.read(() => dt()));
917
914
  }),
918
915
  m.registerCommand(
919
- Ge,
916
+ fr,
920
917
  (u, f) => (it.current = f, !1),
921
- tt
918
+ et
922
919
  ),
923
920
  m.registerCommand(
924
- qe,
921
+ hr,
925
922
  Lt,
926
- tt
923
+ et
927
924
  ),
928
925
  m.registerCommand(
929
926
  te,
930
927
  Lt,
931
- tt
928
+ et
932
929
  ),
933
930
  m.registerCommand(
934
- Ve,
931
+ pr,
935
932
  (u) => u.target === y.current ? (u.preventDefault(), !0) : !1,
936
- tt
933
+ et
937
934
  ),
938
935
  m.registerCommand(
939
- Je,
936
+ br,
940
937
  Dt,
941
- tt
938
+ et
942
939
  ),
943
940
  m.registerCommand(
944
- Qe,
941
+ yr,
945
942
  Dt,
946
- tt
943
+ et
947
944
  ),
948
- m.registerCommand(Ze, Ot, tt),
945
+ m.registerCommand(xr, Ot, et),
949
946
  m.registerCommand(
950
- tr,
947
+ wr,
951
948
  Ht,
952
- tt
949
+ et
953
950
  )
954
951
  );
955
952
  return a?.addEventListener("contextmenu", $t), () => {
@@ -971,14 +968,14 @@ function co({
971
968
  const ke = () => {
972
969
  m.update(() => {
973
970
  const t = ct(e);
974
- et(t) && t.setShowCaption(!0);
971
+ tt(t) && t.setShowCaption(!0);
975
972
  });
976
973
  }, Re = (t, a) => {
977
974
  lt.current = !1, setTimeout(() => {
978
975
  ot(!1);
979
976
  }, 200), m.update(() => {
980
977
  const l = ct(e);
981
- et(l) && l.setWidthAndHeight(t, a);
978
+ tt(l) && l.setWidthAndHeight(t, a);
982
979
  });
983
980
  }, Ee = () => {
984
981
  lt.current = !0, ot(!0);
@@ -1016,7 +1013,7 @@ function co({
1016
1013
  }, Pe = (t) => {
1017
1014
  t.preventDefault(), t.stopPropagation(), m.update(() => {
1018
1015
  const a = ct(e);
1019
- if (et(a)) {
1016
+ if (tt(a)) {
1020
1017
  const l = a.getParent();
1021
1018
  a.remove(), l && Yt(l) && l.getChildrenSize() === 0 && l.setFormat("left");
1022
1019
  }
@@ -1024,7 +1021,7 @@ function co({
1024
1021
  }, ft = (t, a) => {
1025
1022
  t.preventDefault(), t.stopPropagation(), m.update(() => {
1026
1023
  const l = ct(e);
1027
- if (et(l)) {
1024
+ if (tt(l)) {
1028
1025
  l.setPosition(a);
1029
1026
  const u = l.getParent();
1030
1027
  u && Yt(u) && (a === "left" ? u.setFormat("left") : a === "right" ? u.setFormat("right") : u.setFormat(""));
@@ -1043,7 +1040,7 @@ function co({
1043
1040
  m.update(
1044
1041
  () => {
1045
1042
  const z = ct(e);
1046
- if (!et(z))
1043
+ if (!tt(z))
1047
1044
  return;
1048
1045
  z.setSrc(a), z.setWidthAndHeight("inherit", "inherit");
1049
1046
  const T = dt();
@@ -1069,8 +1066,8 @@ function co({
1069
1066
  }
1070
1067
  const u = M.loading("Uploading image…");
1071
1068
  try {
1072
- a = (await nr.post(
1073
- sr.project.fileUploadFromUrl,
1069
+ a = (await Xe.post(
1070
+ Be.project.fileUploadFromUrl,
1074
1071
  { url: i, prefix: "uploads" },
1075
1072
  { headers: { "x-api-key": Nt } }
1076
1073
  )).data.fileUrl, M.dismiss(u);
@@ -1086,7 +1083,7 @@ function co({
1086
1083
  }
1087
1084
  Mt(!0), m.update(() => {
1088
1085
  const u = ct(e);
1089
- if (!et(u))
1086
+ if (!tt(u))
1090
1087
  return;
1091
1088
  u.setSrc(l), u.setWidthAndHeight(t.width, t.height);
1092
1089
  const f = dt();
@@ -1144,7 +1141,7 @@ function co({
1144
1141
  } else
1145
1142
  o && o !== "Generated image" && o.trim() && (z = o.trim());
1146
1143
  z ? a = `${z} with ${u}` : a = u;
1147
- const T = await fetch(`${wr}/agent/stream`, {
1144
+ const T = await fetch(`${ir}/agent/stream`, {
1148
1145
  method: "POST",
1149
1146
  headers: { "Content-Type": "application/json" },
1150
1147
  body: JSON.stringify({
@@ -1196,14 +1193,14 @@ function co({
1196
1193
  description: "Compare the images and choose which to keep."
1197
1194
  }), K(nt), _(a), mt(!0), g(""), p(!1);
1198
1195
  } catch (a) {
1199
- if (M.dismiss(t), a instanceof vr) {
1196
+ if (M.dismiss(t), a instanceof ar) {
1200
1197
  const l = a.code === "API_KEYS_DISABLED" ? "API Keys Disabled" : "API Key Required";
1201
1198
  M.error(l, {
1202
1199
  description: a.message,
1203
1200
  duration: 8e3
1204
1201
  });
1205
1202
  } else
1206
- a instanceof Cr ? M.error("Credits Issue", {
1203
+ a instanceof nr ? M.error("Credits Issue", {
1207
1204
  description: a.message,
1208
1205
  duration: 8e3
1209
1206
  }) : M.error("Failed to refine image", {
@@ -1215,7 +1212,7 @@ function co({
1215
1212
  }, $e = () => {
1216
1213
  m.update(() => {
1217
1214
  const t = ct(e);
1218
- if (et(t)) {
1215
+ if (tt(t)) {
1219
1216
  t.setSrc(Q), t.setOriginalPrompt(at);
1220
1217
  const a = dt();
1221
1218
  a && xt(a.clone());
@@ -1267,7 +1264,7 @@ function co({
1267
1264
  },
1268
1265
  [$, n, W, R]
1269
1266
  );
1270
- return /* @__PURE__ */ r(rr, { fallback: null, children: /* @__PURE__ */ h(Kt, { children: [
1267
+ return /* @__PURE__ */ r(Cr, { fallback: null, children: /* @__PURE__ */ h(Kt, { children: [
1271
1268
  /* @__PURE__ */ h(
1272
1269
  "div",
1273
1270
  {
@@ -1298,7 +1295,7 @@ function co({
1298
1295
  }
1299
1296
  ),
1300
1297
  /* @__PURE__ */ h("div", { className: "cteditor-absolute cteditor-inset-0 cteditor-flex cteditor-flex-col cteditor-items-center cteditor-justify-center cteditor-rounded-lg cteditor-bg-muted", children: [
1301
- /* @__PURE__ */ r(dr, { className: "cteditor-w-10 cteditor-h-10 cteditor-text-muted-foreground cteditor-animate-spin cteditor-mb-2", "aria-hidden": !0 }),
1298
+ /* @__PURE__ */ r(Ue, { className: "cteditor-w-10 cteditor-h-10 cteditor-text-muted-foreground cteditor-animate-spin cteditor-mb-2", "aria-hidden": !0 }),
1302
1299
  /* @__PURE__ */ r("span", { className: "cteditor-text-sm cteditor-font-medium cteditor-text-muted-foreground", children: "Applying crop…" })
1303
1300
  ] })
1304
1301
  ]
@@ -1350,7 +1347,7 @@ function co({
1350
1347
  className: ` cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-foreground/10 cteditor-transition-colors ${c === "left" ? "cteditor-bg-foreground/10" : ""}`,
1351
1348
  "aria-label": "Wrap text left",
1352
1349
  title: "Wrap text left",
1353
- children: /* @__PURE__ */ r(cr, {})
1350
+ children: /* @__PURE__ */ r(Ke, {})
1354
1351
  }
1355
1352
  ),
1356
1353
  /* @__PURE__ */ r(
@@ -1360,7 +1357,7 @@ function co({
1360
1357
  className: ` cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-foreground/10 cteditor-transition-colors ${c === "right" ? "cteditor-bg-foreground/10" : ""}`,
1361
1358
  "aria-label": "Wrap text right",
1362
1359
  title: "Wrap text right",
1363
- children: /* @__PURE__ */ r(lr, {})
1360
+ children: /* @__PURE__ */ r(Ge, {})
1364
1361
  }
1365
1362
  ),
1366
1363
  /* @__PURE__ */ r("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-foreground/10 cteditor-mx-0.5" }),
@@ -1371,7 +1368,7 @@ function co({
1371
1368
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-foreground/10 cteditor-transition-colors ${c === "inline-left" ? "cteditor-bg-foreground/10" : ""}`,
1372
1369
  "aria-label": "Align left",
1373
1370
  title: "Align left (no text wrap)",
1374
- children: /* @__PURE__ */ r(ur, {})
1371
+ children: /* @__PURE__ */ r(qe, {})
1375
1372
  }
1376
1373
  ),
1377
1374
  /* @__PURE__ */ r(
@@ -1381,7 +1378,7 @@ function co({
1381
1378
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-foreground/10 cteditor-transition-colors ${c === "inline-center" || c === "full" ? "cteditor-bg-foreground/10" : ""}`,
1382
1379
  "aria-label": "Align center",
1383
1380
  title: "Align center (no text wrap)",
1384
- children: /* @__PURE__ */ r(mr, {})
1381
+ children: /* @__PURE__ */ r(Ve, {})
1385
1382
  }
1386
1383
  ),
1387
1384
  /* @__PURE__ */ r(
@@ -1391,7 +1388,7 @@ function co({
1391
1388
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-foreground/10 cteditor-transition-colors ${c === "inline-right" ? "cteditor-bg-foreground/10" : ""}`,
1392
1389
  "aria-label": "Align right",
1393
1390
  title: "Align right (no text wrap)",
1394
- children: /* @__PURE__ */ r(gr, {})
1391
+ children: /* @__PURE__ */ r(Je, {})
1395
1392
  }
1396
1393
  ),
1397
1394
  /* @__PURE__ */ r("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-foreground/10 cteditor-mx-0.5" }),
@@ -1402,7 +1399,7 @@ function co({
1402
1399
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-foreground/10 cteditor-transition-colors ${c === "none" ? "cteditor-bg-foreground/10" : ""}`,
1403
1400
  "aria-label": "Inline",
1404
1401
  title: "Inline with text",
1405
- children: /* @__PURE__ */ r(fr, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
1402
+ children: /* @__PURE__ */ r(Qe, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
1406
1403
  }
1407
1404
  ),
1408
1405
  /* @__PURE__ */ r("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-foreground/10 cteditor-mx-0.5" }),
@@ -1436,7 +1433,7 @@ function co({
1436
1433
  className: " cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-accent hover:cteditor-bg-accent/95 cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-foreground/20",
1437
1434
  "aria-label": "Visit link",
1438
1435
  title: `Visit: ${C}`,
1439
- children: /* @__PURE__ */ r(hr, {})
1436
+ children: /* @__PURE__ */ r(Ze, {})
1440
1437
  }
1441
1438
  ),
1442
1439
  E && /* @__PURE__ */ r(
@@ -1448,7 +1445,7 @@ function co({
1448
1445
  className: " cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-accent hover:cteditor-bg-accent/90 cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-foreground/20",
1449
1446
  "aria-label": "Refine image",
1450
1447
  title: "Refine image",
1451
- children: /* @__PURE__ */ r(pr, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
1448
+ children: /* @__PURE__ */ r(tr, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
1452
1449
  }
1453
1450
  ),
1454
1451
  /* @__PURE__ */ r(
@@ -1460,7 +1457,7 @@ function co({
1460
1457
  className: " cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-accent hover:cteditor-bg-accent/90 cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-foreground/20",
1461
1458
  "aria-label": "Open image in new tab",
1462
1459
  title: "Open in new tab",
1463
- children: /* @__PURE__ */ r(br, {})
1460
+ children: /* @__PURE__ */ r(er, {})
1464
1461
  }
1465
1462
  ),
1466
1463
  /* @__PURE__ */ r(
@@ -1472,7 +1469,7 @@ function co({
1472
1469
  className: " cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-accent hover:cteditor-bg-destructive hover:cteditor-text-destructive-foreground cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-foreground/20",
1473
1470
  "aria-label": "Delete image",
1474
1471
  title: "Delete image",
1475
- children: /* @__PURE__ */ r(yr, {})
1472
+ children: /* @__PURE__ */ r(rr, {})
1476
1473
  }
1477
1474
  )
1478
1475
  ]
@@ -1532,7 +1529,7 @@ function co({
1532
1529
  },
1533
1530
  disabled: x,
1534
1531
  className: "cteditor-size-9 cteditor-flex cteditor-items-center cteditor-justify-center 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",
1535
- children: /* @__PURE__ */ r(xr, { size: 16 })
1532
+ children: /* @__PURE__ */ r(or, { size: 16 })
1536
1533
  }
1537
1534
  )
1538
1535
  ] })
@@ -1567,42 +1564,42 @@ function co({
1567
1564
  ...c === "inline-center" || c === "full" ? { margin: "0 auto" } : c === "inline-right" ? { marginLeft: "auto" } : c === "left" ? { float: "left", clear: "left" } : c === "right" ? { float: "right", clear: "right" } : {}
1568
1565
  },
1569
1566
  children: /* @__PURE__ */ h(
1570
- ne,
1567
+ fe,
1571
1568
  {
1572
1569
  initialEditor: k,
1573
1570
  initialNodes: [
1574
- ce,
1571
+ be,
1572
+ ye,
1573
+ xe,
1574
+ we,
1575
1575
  le,
1576
- ue,
1577
- me,
1578
- re,
1579
- ee
1576
+ se
1580
1577
  ],
1581
1578
  children: [
1582
- /* @__PURE__ */ r(Oe, {}),
1579
+ /* @__PURE__ */ r(sr, {}),
1583
1580
  /* @__PURE__ */ r(
1584
- de,
1581
+ pe,
1585
1582
  {
1586
1583
  contentEditable: /* @__PURE__ */ r(
1587
- oe,
1584
+ ue,
1588
1585
  {
1589
1586
  "aria-placeholder": "Enter a caption...",
1590
1587
  placeholder: () => /* @__PURE__ */ r("span", { className: "cteditor-text-xs cteditor-absolute cteditor-left-2 cteditor-top-[7px]", children: "Enter a caption..." }),
1591
1588
  className: " cteditor-outline-none !cteditor-shadow-none cteditor-bg-foreground/10 cteditor-border !cteditor-border-foreground/15 cteditor-py-1 cteditor-px-2 cteditor-rounded-sm cteditor-text-xs cteditor-relative"
1592
1589
  }
1593
1590
  ),
1594
- ErrorBoundary: ie
1591
+ ErrorBoundary: me
1595
1592
  }
1596
1593
  ),
1597
1594
  /* @__PURE__ */ r(
1598
- se,
1595
+ he,
1599
1596
  {
1600
1597
  onChange: () => {
1601
1598
  }
1602
1599
  }
1603
1600
  ),
1604
- /* @__PURE__ */ r(ae, {}),
1605
- /* @__PURE__ */ r(xe, { namespace: we.namespace })
1601
+ /* @__PURE__ */ r(ge, {}),
1602
+ /* @__PURE__ */ r(de, { namespace: ce.namespace })
1606
1603
  ]
1607
1604
  }
1608
1605
  )
@@ -1635,5 +1632,5 @@ function co({
1635
1632
  }
1636
1633
  export {
1637
1634
  te as RIGHT_CLICK_IMAGE_COMMAND,
1638
- co as default
1635
+ so as default
1639
1636
  };