eddyter 1.3.73 → 1.3.75

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 (29) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +478 -478
  3. package/dist/EddyterIcon.svg +24 -24
  4. package/dist/{ImageResizer-FrE13F54.js → ImageResizer-o0eMm1Mg.js} +56 -50
  5. package/dist/api/ai/aiAgentService.d.ts +22 -1
  6. package/dist/api/config/endpoints.d.ts +3 -0
  7. package/dist/assets/style.css +1 -1
  8. package/dist/{babel-CCPWkrf4.js → babel-B9hn44Wo.js} +726 -1302
  9. package/dist/components/VideoView/index.d.ts +3 -1
  10. package/dist/constants.d.ts +2 -1
  11. package/dist/{estree-CxUPh9wa.js → estree-CocPn_Md.js} +529 -917
  12. package/dist/hooks/useBlockFormat.d.ts +1 -0
  13. package/dist/{html-CmniStvG.js → html-CxCicOef.js} +350 -589
  14. package/dist/{html2pdf.bundle-CQue4YDW.js → html2pdf.bundle-CVq-OpZt.js} +2778 -3797
  15. package/dist/{html2pdf.bundle.min-BEj2NT3U.js → html2pdf.bundle.min-BxzIoi3T.js} +3405 -5221
  16. package/dist/{index-CX3cfSUQ.js → index-CtPRZTab.js} +27 -18
  17. package/dist/index-Cuv9ugJL.js +381 -0
  18. package/dist/{index-CfRDm1jv.js → index-DxEP36zG.js} +12228 -12186
  19. package/dist/{index-BO5ICrpG.js → index-eRyVFO7x.js} +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/{markdown-B0mEGGfQ.js → markdown-BUjgWFLu.js} +578 -1015
  22. package/dist/nodes/GeneratingImageNode.d.ts +30 -0
  23. package/dist/nodes/VideoNode.d.ts +10 -3
  24. package/dist/{postcss-B0bxXf7u.js → postcss-CGIcwj_g.js} +615 -1065
  25. package/dist/{standalone-DmuJV5rn.js → standalone-C0qguT38.js} +350 -596
  26. package/dist/{typescript-DZlC_9M8.js → typescript-BM7wk6k-.js} +1114 -1806
  27. package/dist/ui/Icons.d.ts +2 -1
  28. package/package.json +149 -152
  29. package/dist/index-Buj5fA92.js +0 -274
@@ -1,24 +1,24 @@
1
- <svg width="621" height="665" viewBox="0 0 621 665" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M338.062 405.907C416.398 543.243 440.118 577.099 589.378 545.12C591.595 544.645 592.13 541.662 590.148 540.561L341.351 402.458C339.174 401.249 336.828 403.744 338.062 405.907Z" fill="white"/>
3
- <path d="M302.175 399.431C304.013 557.527 308.321 598.641 454.344 643.121C456.513 643.781 458.43 641.433 457.23 639.509L306.724 398.012C305.407 395.899 302.146 396.941 302.175 399.431Z" fill="white"/>
4
- <path d="M274.009 376.372C198.889 515.493 182.702 553.53 288.787 663.29C290.362 664.92 293.178 663.796 293.063 661.532L278.676 377.339C278.55 374.852 275.193 374.181 274.009 376.372Z" fill="white"/>
5
- <path d="M260.601 342.543C127.402 427.722 94.7879 453.124 134.272 600.577C134.859 602.766 137.866 603.15 138.864 601.115L264.212 345.654C265.309 343.418 262.699 341.201 260.601 342.543Z" fill="white"/>
6
- <path d="M265.244 306.434C107.444 316.264 66.6005 322.645 29.5602 470.73C29.0101 472.93 31.4528 474.725 33.3137 473.43L266.892 310.906C268.936 309.484 267.73 306.279 265.244 306.434Z" fill="white"/>
7
- <path d="M286.823 277.121C144.082 209.131 105.274 194.888 1.01888 306.387C-0.529463 308.043 0.735046 310.798 2.99049 310.569L286.093 281.831C288.57 281.58 289.071 278.192 286.823 277.121Z" fill="white"/>
8
- <path d="M319.975 261.978C228.171 133.256 201.152 101.968 55.8848 148.857C53.7274 149.553 53.4959 152.576 55.579 153.47L317.052 265.742C319.34 266.724 321.421 264.006 319.975 261.978Z" fill="white"/>
9
- <path d="M356.232 264.8C338.436 107.699 329.998 67.2301 180.229 37.7244C178.005 37.2862 176.336 39.8166 177.723 41.6096L351.848 266.672C353.372 268.642 356.512 267.275 356.232 264.8Z" fill="white"/>
10
- <path d="M386.584 284.893C447.271 138.898 459.534 99.4196 342.906 0.93483C341.174 -0.52781 338.486 0.874383 338.829 3.11537L381.844 284.403C382.22 286.864 385.628 287.193 386.584 284.893Z" fill="white"/>
11
- <path d="M403.369 317.189C527.286 218.993 557.167 190.427 502.993 47.7164C502.189 45.597 499.158 45.5185 498.37 47.6442L399.463 314.459C398.597 316.794 401.418 318.735 403.369 317.189Z" fill="white"/>
12
- <path d="M402.421 353.581C558.422 327.865 598.412 317.392 620.308 166.323C620.633 164.079 618.021 162.54 616.301 164.016L400.33 349.298C398.44 350.919 399.964 353.986 402.421 353.581Z" fill="white"/>
13
- <path d="M338.062 405.907C416.398 543.243 440.118 577.099 589.378 545.12C591.595 544.645 592.13 541.662 590.148 540.561L341.351 402.458C339.174 401.249 336.828 403.744 338.062 405.907Z" stroke="white" stroke-width="0.675776"/>
14
- <path d="M302.175 399.431C304.013 557.527 308.321 598.641 454.344 643.121C456.513 643.781 458.43 641.433 457.23 639.509L306.724 398.012C305.407 395.899 302.146 396.941 302.175 399.431Z" stroke="white" stroke-width="0.675776"/>
15
- <path d="M274.009 376.372C198.889 515.493 182.702 553.53 288.787 663.29C290.362 664.92 293.178 663.796 293.063 661.532L278.676 377.339C278.55 374.852 275.193 374.181 274.009 376.372Z" stroke="white" stroke-width="0.675776"/>
16
- <path d="M260.601 342.543C127.402 427.722 94.7879 453.124 134.272 600.577C134.859 602.766 137.866 603.15 138.864 601.115L264.212 345.654C265.309 343.418 262.699 341.201 260.601 342.543Z" stroke="white" stroke-width="0.675776"/>
17
- <path d="M265.244 306.434C107.444 316.264 66.6005 322.645 29.5602 470.73C29.0101 472.93 31.4528 474.725 33.3137 473.43L266.892 310.906C268.936 309.484 267.73 306.279 265.244 306.434Z" stroke="white" stroke-width="0.675776"/>
18
- <path d="M286.823 277.121C144.082 209.131 105.274 194.888 1.01888 306.387C-0.529463 308.043 0.735046 310.798 2.99049 310.569L286.093 281.831C288.57 281.58 289.071 278.192 286.823 277.121Z" stroke="white" stroke-width="0.675776"/>
19
- <path d="M319.975 261.978C228.171 133.256 201.152 101.968 55.8848 148.857C53.7274 149.553 53.4959 152.576 55.579 153.47L317.052 265.742C319.34 266.724 321.421 264.006 319.975 261.978Z" stroke="white" stroke-width="0.675776"/>
20
- <path d="M356.232 264.8C338.436 107.699 329.998 67.2301 180.229 37.7244C178.005 37.2862 176.336 39.8166 177.723 41.6096L351.848 266.672C353.372 268.642 356.512 267.275 356.232 264.8Z" stroke="white" stroke-width="0.675776"/>
21
- <path d="M386.584 284.893C447.271 138.898 459.534 99.4196 342.906 0.93483C341.174 -0.52781 338.486 0.874383 338.829 3.11537L381.844 284.403C382.22 286.864 385.628 287.193 386.584 284.893Z" stroke="white" stroke-width="0.675776"/>
22
- <path d="M403.369 317.189C527.286 218.993 557.167 190.427 502.993 47.7164C502.189 45.597 499.158 45.5185 498.37 47.6442L399.463 314.459C398.597 316.794 401.418 318.735 403.369 317.189Z" stroke="white" stroke-width="0.675776"/>
23
- <path d="M402.421 353.581C558.422 327.865 598.412 317.392 620.308 166.323C620.633 164.079 618.021 162.54 616.301 164.016L400.33 349.298C398.44 350.919 399.964 353.986 402.421 353.581Z" stroke="white" stroke-width="0.675776"/>
24
- </svg>
1
+ <svg width="621" height="665" viewBox="0 0 621 665" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M338.062 405.907C416.398 543.243 440.118 577.099 589.378 545.12C591.595 544.645 592.13 541.662 590.148 540.561L341.351 402.458C339.174 401.249 336.828 403.744 338.062 405.907Z" fill="white"/>
3
+ <path d="M302.175 399.431C304.013 557.527 308.321 598.641 454.344 643.121C456.513 643.781 458.43 641.433 457.23 639.509L306.724 398.012C305.407 395.899 302.146 396.941 302.175 399.431Z" fill="white"/>
4
+ <path d="M274.009 376.372C198.889 515.493 182.702 553.53 288.787 663.29C290.362 664.92 293.178 663.796 293.063 661.532L278.676 377.339C278.55 374.852 275.193 374.181 274.009 376.372Z" fill="white"/>
5
+ <path d="M260.601 342.543C127.402 427.722 94.7879 453.124 134.272 600.577C134.859 602.766 137.866 603.15 138.864 601.115L264.212 345.654C265.309 343.418 262.699 341.201 260.601 342.543Z" fill="white"/>
6
+ <path d="M265.244 306.434C107.444 316.264 66.6005 322.645 29.5602 470.73C29.0101 472.93 31.4528 474.725 33.3137 473.43L266.892 310.906C268.936 309.484 267.73 306.279 265.244 306.434Z" fill="white"/>
7
+ <path d="M286.823 277.121C144.082 209.131 105.274 194.888 1.01888 306.387C-0.529463 308.043 0.735046 310.798 2.99049 310.569L286.093 281.831C288.57 281.58 289.071 278.192 286.823 277.121Z" fill="white"/>
8
+ <path d="M319.975 261.978C228.171 133.256 201.152 101.968 55.8848 148.857C53.7274 149.553 53.4959 152.576 55.579 153.47L317.052 265.742C319.34 266.724 321.421 264.006 319.975 261.978Z" fill="white"/>
9
+ <path d="M356.232 264.8C338.436 107.699 329.998 67.2301 180.229 37.7244C178.005 37.2862 176.336 39.8166 177.723 41.6096L351.848 266.672C353.372 268.642 356.512 267.275 356.232 264.8Z" fill="white"/>
10
+ <path d="M386.584 284.893C447.271 138.898 459.534 99.4196 342.906 0.93483C341.174 -0.52781 338.486 0.874383 338.829 3.11537L381.844 284.403C382.22 286.864 385.628 287.193 386.584 284.893Z" fill="white"/>
11
+ <path d="M403.369 317.189C527.286 218.993 557.167 190.427 502.993 47.7164C502.189 45.597 499.158 45.5185 498.37 47.6442L399.463 314.459C398.597 316.794 401.418 318.735 403.369 317.189Z" fill="white"/>
12
+ <path d="M402.421 353.581C558.422 327.865 598.412 317.392 620.308 166.323C620.633 164.079 618.021 162.54 616.301 164.016L400.33 349.298C398.44 350.919 399.964 353.986 402.421 353.581Z" fill="white"/>
13
+ <path d="M338.062 405.907C416.398 543.243 440.118 577.099 589.378 545.12C591.595 544.645 592.13 541.662 590.148 540.561L341.351 402.458C339.174 401.249 336.828 403.744 338.062 405.907Z" stroke="white" stroke-width="0.675776"/>
14
+ <path d="M302.175 399.431C304.013 557.527 308.321 598.641 454.344 643.121C456.513 643.781 458.43 641.433 457.23 639.509L306.724 398.012C305.407 395.899 302.146 396.941 302.175 399.431Z" stroke="white" stroke-width="0.675776"/>
15
+ <path d="M274.009 376.372C198.889 515.493 182.702 553.53 288.787 663.29C290.362 664.92 293.178 663.796 293.063 661.532L278.676 377.339C278.55 374.852 275.193 374.181 274.009 376.372Z" stroke="white" stroke-width="0.675776"/>
16
+ <path d="M260.601 342.543C127.402 427.722 94.7879 453.124 134.272 600.577C134.859 602.766 137.866 603.15 138.864 601.115L264.212 345.654C265.309 343.418 262.699 341.201 260.601 342.543Z" stroke="white" stroke-width="0.675776"/>
17
+ <path d="M265.244 306.434C107.444 316.264 66.6005 322.645 29.5602 470.73C29.0101 472.93 31.4528 474.725 33.3137 473.43L266.892 310.906C268.936 309.484 267.73 306.279 265.244 306.434Z" stroke="white" stroke-width="0.675776"/>
18
+ <path d="M286.823 277.121C144.082 209.131 105.274 194.888 1.01888 306.387C-0.529463 308.043 0.735046 310.798 2.99049 310.569L286.093 281.831C288.57 281.58 289.071 278.192 286.823 277.121Z" stroke="white" stroke-width="0.675776"/>
19
+ <path d="M319.975 261.978C228.171 133.256 201.152 101.968 55.8848 148.857C53.7274 149.553 53.4959 152.576 55.579 153.47L317.052 265.742C319.34 266.724 321.421 264.006 319.975 261.978Z" stroke="white" stroke-width="0.675776"/>
20
+ <path d="M356.232 264.8C338.436 107.699 329.998 67.2301 180.229 37.7244C178.005 37.2862 176.336 39.8166 177.723 41.6096L351.848 266.672C353.372 268.642 356.512 267.275 356.232 264.8Z" stroke="white" stroke-width="0.675776"/>
21
+ <path d="M386.584 284.893C447.271 138.898 459.534 99.4196 342.906 0.93483C341.174 -0.52781 338.486 0.874383 338.829 3.11537L381.844 284.403C382.22 286.864 385.628 287.193 386.584 284.893Z" stroke="white" stroke-width="0.675776"/>
22
+ <path d="M403.369 317.189C527.286 218.993 557.167 190.427 502.993 47.7164C502.189 45.597 499.158 45.5185 498.37 47.6442L399.463 314.459C398.597 316.794 401.418 318.735 403.369 317.189Z" stroke="white" stroke-width="0.675776"/>
23
+ <path d="M402.421 353.581C558.422 327.865 598.412 317.392 620.308 166.323C620.633 164.079 618.021 162.54 616.301 164.016L400.33 349.298C398.44 350.919 399.964 353.986 402.421 353.581Z" stroke="white" stroke-width="0.675776"/>
24
+ </svg>
@@ -1,6 +1,6 @@
1
- import { jsxs as B, jsx as p } from "react/jsx-runtime";
1
+ import { jsxs as B, jsx as m } from "react/jsx-runtime";
2
2
  import { calculateZoomLevel as C } from "@lexical/utils";
3
- import { useRef as P } from "react";
3
+ import { useRef as w } from "react";
4
4
  function $(f, x, z) {
5
5
  return Math.min(Math.max(f, x), z);
6
6
  }
@@ -10,7 +10,7 @@ const r = {
10
10
  south: 2,
11
11
  west: 4
12
12
  };
13
- function Z({
13
+ function F({
14
14
  onResizeStart: f,
15
15
  onResizeEnd: x,
16
16
  buttonRef: z,
@@ -19,12 +19,12 @@ function Z({
19
19
  editor: H,
20
20
  showCaption: R,
21
21
  setShowCaption: X,
22
- captionsEnabled: L
22
+ captionsEnabled: I
23
23
  }) {
24
- const W = P(null), g = P({
24
+ const W = w(null), g = w({
25
25
  priority: "",
26
26
  value: "default"
27
- }), b = P({
27
+ }), b = w({
28
28
  currentHeight: 0,
29
29
  currentWidth: 0,
30
30
  direction: 0,
@@ -34,9 +34,9 @@ function Z({
34
34
  startWidth: 0,
35
35
  startX: 0,
36
36
  startY: 0
37
- }), w = P({ imageWrapper: null, editorImageSpan: null, parentParagraph: null }), m = H.getRootElement(), c = m !== null ? m.getBoundingClientRect().width - 20 : 100, I = m !== null ? m.getBoundingClientRect().height - 20 : 100, D = 100, M = 100, S = (t) => {
38
- const i = t === r.east || t === r.west, e = t === r.north || t === r.south, d = t & r.north && t & r.west || t & r.south && t & r.east, l = i ? "ew" : e ? "ns" : d ? "nwse" : "nesw";
39
- m !== null && m.style.setProperty(
37
+ }), P = w({ imageWrapper: null, editorImageSpan: null, parentParagraph: null }), u = H.getRootElement(), c = u !== null ? u.getBoundingClientRect().width - 20 : 100, L = u !== null ? u.getBoundingClientRect().height - 20 : 100, D = 100, S = 100, M = (t) => {
38
+ const i = t === r.east || t === r.west, e = t === r.north || t === r.south, h = t & r.north && t & r.west || t & r.south && t & r.east, l = i ? "ew" : e ? "ns" : h ? "nwse" : "nesw";
39
+ u !== null && u.style.setProperty(
40
40
  "cursor",
41
41
  `${l}-resize`,
42
42
  "important"
@@ -54,27 +54,27 @@ function Z({
54
54
  "important"
55
55
  ));
56
56
  }, Y = () => {
57
- m !== null && m.style.setProperty("cursor", "text"), document.body !== null && (document.body.style.setProperty("cursor", "default"), document.body.style.setProperty(
57
+ u !== null && u.style.setProperty("cursor", "text"), document.body !== null && (document.body.style.setProperty("cursor", "default"), document.body.style.setProperty(
58
58
  "-webkit-user-select",
59
59
  g.current.value,
60
60
  g.current.priority
61
61
  ));
62
- }, u = (t, i) => {
62
+ }, d = (t, i) => {
63
63
  if (!H.isEditable())
64
64
  return;
65
- const e = v.current, d = W.current;
66
- if (e !== null && d !== null) {
65
+ const e = v.current, h = W.current;
66
+ if (e !== null && h !== null) {
67
67
  t.preventDefault();
68
- const { width: l, height: o } = e.getBoundingClientRect(), y = C(e), s = b.current;
69
- s.startWidth = l, s.startHeight = o, s.ratio = l / o, s.currentWidth = l, s.currentHeight = o, s.startX = t.clientX / y, s.startY = t.clientY / y, s.isResizing = !0, s.direction = i, S(i), f(), d.classList.add("image-control-wrapper--resizing"), e.style.setProperty(
68
+ const { width: l, height: s } = e.getBoundingClientRect(), p = C(e), o = b.current;
69
+ o.startWidth = l, o.startHeight = s, o.ratio = l / s, o.currentWidth = l, o.currentHeight = s, o.startX = t.clientX / p, o.startY = t.clientY / p, o.isResizing = !0, o.direction = i, M(i), f(), h.classList.add("image-control-wrapper--resizing"), e.style.setProperty(
70
70
  "max-width",
71
71
  `${c}px`,
72
72
  "important"
73
73
  );
74
- const h = e.parentElement, n = e.closest(
74
+ const y = e.parentElement, n = e.closest(
75
75
  ".editor-image"
76
76
  ), a = n?.parentElement ?? null;
77
- w.current = { imageWrapper: h, editorImageSpan: n, parentParagraph: a }, h && (h.style.setProperty("display", "inline-block", "important"), h.style.setProperty("width", "auto", "important"), h.style.setProperty(
77
+ P.current = { imageWrapper: y, editorImageSpan: n, parentParagraph: a }, y && (y.style.setProperty("display", "inline-block", "important"), y.style.setProperty("width", "auto", "important"), y.style.setProperty(
78
78
  "max-width",
79
79
  `${c}px`,
80
80
  "important"
@@ -86,30 +86,30 @@ function Z({
86
86
  "max-width",
87
87
  `${c}px`,
88
88
  "important"
89
- ), e.style.setProperty("height", `${o}px`, "important"), e.style.setProperty("width", `${l}px`, "important"), document.addEventListener("pointermove", E), document.addEventListener("pointerup", k);
89
+ ), e.style.setProperty("height", `${s}px`, "important"), e.style.setProperty("width", `${l}px`, "important"), document.addEventListener("pointermove", E), document.addEventListener("pointerup", k);
90
90
  }
91
91
  }, E = (t) => {
92
- const i = v.current, e = b.current, d = e.direction & (r.east | r.west), l = e.direction & (r.south | r.north);
92
+ const i = v.current, e = b.current, h = e.direction & (r.east | r.west), l = e.direction & (r.south | r.north);
93
93
  if (i !== null && e.isResizing) {
94
- const o = C(i), { imageWrapper: y, editorImageSpan: s, parentParagraph: h } = w.current;
94
+ const s = C(i), { imageWrapper: p, editorImageSpan: o, parentParagraph: y } = P.current;
95
95
  if (i.style.setProperty(
96
96
  "max-width",
97
97
  `${c}px`,
98
98
  "important"
99
- ), y && (y.style.setProperty("display", "inline-block", "important"), y.style.setProperty("width", "auto", "important"), y.style.setProperty(
99
+ ), p && (p.style.setProperty("display", "inline-block", "important"), p.style.setProperty("width", "auto", "important"), p.style.setProperty(
100
100
  "max-width",
101
101
  `${c}px`,
102
102
  "important"
103
- )), s && (s.style.setProperty("display", "inline-block", "important"), s.style.setProperty(
103
+ )), o && (o.style.setProperty("display", "inline-block", "important"), o.style.setProperty(
104
104
  "max-width",
105
105
  `${c}px`,
106
106
  "important"
107
- )), h && h.style.setProperty(
107
+ )), y && y.style.setProperty(
108
108
  "max-width",
109
109
  `${c}px`,
110
110
  "important"
111
- ), d && l) {
112
- let n = Math.floor(e.startX - t.clientX / o);
111
+ ), h && l) {
112
+ let n = Math.floor(e.startX - t.clientX / s);
113
113
  n = e.direction & r.east ? -n : n;
114
114
  const a = $(
115
115
  e.startWidth + n,
@@ -118,16 +118,16 @@ function Z({
118
118
  ), N = a / e.ratio;
119
119
  i.style.setProperty("width", `${a}px`, "important"), i.style.setProperty("height", `${N}px`, "important"), e.currentHeight = N, e.currentWidth = a;
120
120
  } else if (l) {
121
- let n = Math.floor(e.startY - t.clientY / o);
121
+ let n = Math.floor(e.startY - t.clientY / s);
122
122
  n = e.direction & r.south ? -n : n;
123
123
  const a = $(
124
124
  e.startHeight + n,
125
- M,
126
- I
125
+ S,
126
+ L
127
127
  );
128
128
  i.style.setProperty("height", `${a}px`, "important"), e.currentHeight = a;
129
129
  } else {
130
- let n = Math.floor(e.startX - t.clientX / o);
130
+ let n = Math.floor(e.startX - t.clientX / s);
131
131
  n = e.direction & r.east ? -n : n;
132
132
  const a = $(
133
133
  e.startWidth + n,
@@ -140,14 +140,20 @@ function Z({
140
140
  }, k = () => {
141
141
  const t = v.current, i = b.current, e = W.current;
142
142
  if (t !== null && e !== null && i.isResizing) {
143
- const d = i.currentWidth, l = i.currentHeight;
143
+ const h = i.currentWidth, l = i.currentHeight;
144
144
  i.startWidth = 0, i.startHeight = 0, i.ratio = 0, i.startX = 0, i.startY = 0, i.currentWidth = 0, i.currentHeight = 0, i.isResizing = !1, e.classList.remove("image-control-wrapper--resizing");
145
- const { imageWrapper: o } = w.current;
146
- o && (o.style.removeProperty("display"), o.style.removeProperty("width"), o.style.removeProperty("max-width")), w.current = { imageWrapper: null, editorImageSpan: null, parentParagraph: null }, Y(), x(d, l), document.removeEventListener("pointermove", E), document.removeEventListener("pointerup", k);
145
+ const { imageWrapper: s, editorImageSpan: p, parentParagraph: o } = P.current;
146
+ s && (s.style.removeProperty("display"), s.style.removeProperty("width"), s.style.removeProperty("max-width")), Y(), x(h, l), requestAnimationFrame(() => {
147
+ t.style.removeProperty("max-width"), p && (p.style.removeProperty("display"), p.style.removeProperty("max-width")), o && o.style.removeProperty("max-width");
148
+ }), P.current = {
149
+ imageWrapper: null,
150
+ editorImageSpan: null,
151
+ parentParagraph: null
152
+ }, document.removeEventListener("pointermove", E), document.removeEventListener("pointerup", k);
147
153
  }
148
154
  };
149
155
  return /* @__PURE__ */ B("div", { ref: W, children: [
150
- !R && L && /* @__PURE__ */ p(
156
+ !R && I && /* @__PURE__ */ m(
151
157
  "button",
152
158
  {
153
159
  className: "image-caption-button",
@@ -158,80 +164,80 @@ function Z({
158
164
  children: "Add Caption"
159
165
  }
160
166
  ),
161
- /* @__PURE__ */ p(
167
+ /* @__PURE__ */ m(
162
168
  "div",
163
169
  {
164
170
  className: "image-resizer image-resizer-n",
165
171
  onPointerDown: (t) => {
166
- u(t, r.north);
172
+ d(t, r.north);
167
173
  }
168
174
  }
169
175
  ),
170
- /* @__PURE__ */ p(
176
+ /* @__PURE__ */ m(
171
177
  "div",
172
178
  {
173
179
  className: "image-resizer image-resizer-ne",
174
180
  onPointerDown: (t) => {
175
- u(t, r.north | r.east);
181
+ d(t, r.north | r.east);
176
182
  }
177
183
  }
178
184
  ),
179
- /* @__PURE__ */ p(
185
+ /* @__PURE__ */ m(
180
186
  "div",
181
187
  {
182
188
  className: "image-resizer image-resizer-e",
183
189
  onPointerDown: (t) => {
184
- u(t, r.east);
190
+ d(t, r.east);
185
191
  }
186
192
  }
187
193
  ),
188
- /* @__PURE__ */ p(
194
+ /* @__PURE__ */ m(
189
195
  "div",
190
196
  {
191
197
  className: "image-resizer image-resizer-se",
192
198
  onPointerDown: (t) => {
193
- u(t, r.south | r.east);
199
+ d(t, r.south | r.east);
194
200
  }
195
201
  }
196
202
  ),
197
- /* @__PURE__ */ p(
203
+ /* @__PURE__ */ m(
198
204
  "div",
199
205
  {
200
206
  className: "image-resizer image-resizer-s",
201
207
  onPointerDown: (t) => {
202
- u(t, r.south);
208
+ d(t, r.south);
203
209
  }
204
210
  }
205
211
  ),
206
- /* @__PURE__ */ p(
212
+ /* @__PURE__ */ m(
207
213
  "div",
208
214
  {
209
215
  className: "image-resizer image-resizer-sw",
210
216
  onPointerDown: (t) => {
211
- u(t, r.south | r.west);
217
+ d(t, r.south | r.west);
212
218
  }
213
219
  }
214
220
  ),
215
- /* @__PURE__ */ p(
221
+ /* @__PURE__ */ m(
216
222
  "div",
217
223
  {
218
224
  className: "image-resizer image-resizer-w",
219
225
  onPointerDown: (t) => {
220
- u(t, r.west);
226
+ d(t, r.west);
221
227
  }
222
228
  }
223
229
  ),
224
- /* @__PURE__ */ p(
230
+ /* @__PURE__ */ m(
225
231
  "div",
226
232
  {
227
233
  className: "image-resizer image-resizer-nw",
228
234
  onPointerDown: (t) => {
229
- u(t, r.north | r.west);
235
+ d(t, r.north | r.west);
230
236
  }
231
237
  }
232
238
  )
233
239
  ] });
234
240
  }
235
241
  export {
236
- Z as I
242
+ F as I
237
243
  };
@@ -1,13 +1,26 @@
1
1
  import { LexicalEditor, RangeSelection } from '../../../node_modules/lexical';
2
2
  export type AIProvider = "chatgpt" | "claude" | "grok" | "gemini" | "deepseek";
3
3
  export type AIStatus = "idle" | "loading" | "success" | "error";
4
+ export type SavedSelection = RangeSelection | {
5
+ anchor: {
6
+ key: string;
7
+ offset: number;
8
+ type: "text" | "element";
9
+ };
10
+ focus: {
11
+ key: string;
12
+ offset: number;
13
+ type: "text" | "element";
14
+ };
15
+ };
4
16
  export interface AIAgentConfig {
5
17
  editor: LexicalEditor;
6
18
  query: string;
7
19
  model: AIProvider;
8
20
  apiKey: string;
9
21
  type?: string;
10
- savedSelection?: RangeSelection | null;
22
+ savedSelection?: SavedSelection | null;
23
+ originalPrompt?: string;
11
24
  onStatusChange?: (status: AIStatus) => void;
12
25
  onLoadingChange?: (isLoading: boolean) => void;
13
26
  onStreamStart?: () => void;
@@ -42,3 +55,11 @@ export declare function processAITransformation(config: AITransformConfig): Prom
42
55
  export declare function processAIRequest(config: AIAgentConfig & {
43
56
  secondaryPrompt?: string;
44
57
  }): Promise<void>;
58
+ /**
59
+ * Fetch the user's last 3 AI prompt history entries.
60
+ */
61
+ export declare function getAIPromptHistory(apiKey: string): Promise<Array<{
62
+ id: string;
63
+ prompt: string;
64
+ createdAt: string;
65
+ }>>;
@@ -22,4 +22,7 @@ export declare const apiEndpoints: {
22
22
  linkPreview: {
23
23
  getPreview: string;
24
24
  };
25
+ promptHistory: {
26
+ list: string;
27
+ };
25
28
  };