eddyter 1.3.63 → 1.3.64

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 (35) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +493 -493
  3. package/dist/ImageResizer-CbtUYHip.js +199 -0
  4. package/dist/api/auth.d.ts +4 -2
  5. package/dist/assets/style.css +1 -1
  6. package/dist/{babel-B9hn44Wo.js → babel-CCPWkrf4.js} +1302 -726
  7. package/dist/components/LockedFeature/LockedFeature.d.ts +23 -0
  8. package/dist/components/LockedFeature/index.d.ts +2 -0
  9. package/dist/components/UnifiedColorPicker/UnifiedColorPicker.d.ts +14 -0
  10. package/dist/components/VideoView/index.d.ts +13 -0
  11. package/dist/constants.d.ts +3 -1
  12. package/dist/editorConfig.d.ts +2 -3
  13. package/dist/{estree-CocPn_Md.js → estree-CxUPh9wa.js} +917 -529
  14. package/dist/{html-CxCicOef.js → html-CmniStvG.js} +589 -350
  15. package/dist/{html2pdf.bundle-Bc2h6DHT.js → html2pdf.bundle-C1B1lr_T.js} +3796 -2777
  16. package/dist/{html2pdf.bundle.min-BvakEXhX.js → html2pdf.bundle.min-kPviTsNx.js} +5223 -3407
  17. package/dist/index-BL8HWCRw.js +816 -0
  18. package/dist/index-BpsoOKOs.js +274 -0
  19. package/dist/{index-C2a6-XFM.js → index-DHKx5grA.js} +4 -4
  20. package/dist/{index-DoJIKSPF.js → index-FZVNbwSO.js} +12356 -11290
  21. package/dist/index.js +3 -3
  22. package/dist/{markdown-BUjgWFLu.js → markdown-B0mEGGfQ.js} +1015 -578
  23. package/dist/nodes/UploadingVideoNode.d.ts +30 -0
  24. package/dist/nodes/VideoNode.d.ts +47 -0
  25. package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +2 -1
  26. package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +1 -1
  27. package/dist/plugins/VideoPlugin.d.ts +17 -0
  28. package/dist/{postcss-CGIcwj_g.js → postcss-B0bxXf7u.js} +1065 -615
  29. package/dist/{standalone-C0qguT38.js → standalone-DmuJV5rn.js} +596 -350
  30. package/dist/types.d.ts +4 -6
  31. package/dist/{typescript-BM7wk6k-.js → typescript-DZlC_9M8.js} +1805 -1113
  32. package/dist/ui/Icons.d.ts +2 -1
  33. package/dist/utils/uploadManager.d.ts +17 -0
  34. package/package.json +151 -151
  35. package/dist/index-B0VTEqfr.js +0 -985
@@ -0,0 +1,199 @@
1
+ import { jsxs as Y, jsx as c } from "react/jsx-runtime";
2
+ import { calculateZoomLevel as N } from "@lexical/utils";
3
+ import { useRef as z } from "react";
4
+ function v(m, g, p) {
5
+ return Math.min(Math.max(m, g), p);
6
+ }
7
+ const r = {
8
+ east: 1,
9
+ north: 8,
10
+ south: 2,
11
+ west: 4
12
+ };
13
+ function S({
14
+ onResizeStart: m,
15
+ onResizeEnd: g,
16
+ buttonRef: p,
17
+ imageRef: w,
18
+ maxWidth: k,
19
+ editor: P,
20
+ showCaption: W,
21
+ setShowCaption: C,
22
+ captionsEnabled: E
23
+ }) {
24
+ const y = z(null), d = z({
25
+ priority: "",
26
+ value: "default"
27
+ }), f = z({
28
+ currentHeight: 0,
29
+ currentWidth: 0,
30
+ direction: 0,
31
+ isResizing: !1,
32
+ ratio: 0,
33
+ startHeight: 0,
34
+ startWidth: 0,
35
+ startX: 0,
36
+ startY: 0
37
+ }), a = P.getRootElement(), b = a !== null ? a.getBoundingClientRect().width - 20 : 100, X = a !== null ? a.getBoundingClientRect().height - 20 : 100, x = 100, $ = 100, L = (t) => {
38
+ const i = t === r.east || t === r.west, e = t === r.north || t === r.south, u = t & r.north && t & r.west || t & r.south && t & r.east, o = i ? "ew" : e ? "ns" : u ? "nwse" : "nesw";
39
+ a !== null && a.style.setProperty(
40
+ "cursor",
41
+ `${o}-resize`,
42
+ "important"
43
+ ), document.body !== null && (document.body.style.setProperty(
44
+ "cursor",
45
+ `${o}-resize`,
46
+ "important"
47
+ ), d.current.value = document.body.style.getPropertyValue(
48
+ "-webkit-user-select"
49
+ ), d.current.priority = document.body.style.getPropertyPriority(
50
+ "-webkit-user-select"
51
+ ), document.body.style.setProperty(
52
+ "-webkit-user-select",
53
+ "none",
54
+ "important"
55
+ ));
56
+ }, M = () => {
57
+ a !== null && a.style.setProperty("cursor", "text"), document.body !== null && (document.body.style.setProperty("cursor", "default"), document.body.style.setProperty(
58
+ "-webkit-user-select",
59
+ d.current.value,
60
+ d.current.priority
61
+ ));
62
+ }, l = (t, i) => {
63
+ if (!P.isEditable())
64
+ return;
65
+ const e = w.current, u = y.current;
66
+ if (e !== null && u !== null) {
67
+ t.preventDefault();
68
+ const { width: o, height: h } = e.getBoundingClientRect(), s = N(e), n = f.current;
69
+ n.startWidth = o, n.startHeight = h, n.ratio = o / h, n.currentWidth = o, n.currentHeight = h, n.startX = t.clientX / s, n.startY = t.clientY / s, n.isResizing = !0, n.direction = i, L(i), m(), u.classList.add("image-control-wrapper--resizing"), e.style.height = `${h}px`, e.style.width = `${o}px`, document.addEventListener("pointermove", H), document.addEventListener("pointerup", D);
70
+ }
71
+ }, H = (t) => {
72
+ const i = w.current, e = f.current, u = e.direction & (r.east | r.west), o = e.direction & (r.south | r.north);
73
+ if (i !== null && e.isResizing) {
74
+ const h = N(i);
75
+ if (u && o) {
76
+ let s = Math.floor(e.startX - t.clientX / h);
77
+ s = e.direction & r.east ? -s : s;
78
+ const n = v(
79
+ e.startWidth + s,
80
+ x,
81
+ b
82
+ ), R = n / e.ratio;
83
+ i.style.width = `${n}px`, i.style.height = `${R}px`, e.currentHeight = R, e.currentWidth = n;
84
+ } else if (o) {
85
+ let s = Math.floor(e.startY - t.clientY / h);
86
+ s = e.direction & r.south ? -s : s;
87
+ const n = v(
88
+ e.startHeight + s,
89
+ $,
90
+ X
91
+ );
92
+ i.style.height = `${n}px`, e.currentHeight = n;
93
+ } else {
94
+ let s = Math.floor(e.startX - t.clientX / h);
95
+ s = e.direction & r.east ? -s : s;
96
+ const n = v(
97
+ e.startWidth + s,
98
+ x,
99
+ b
100
+ );
101
+ i.style.width = `${n}px`, e.currentWidth = n;
102
+ }
103
+ }
104
+ }, D = () => {
105
+ const t = w.current, i = f.current, e = y.current;
106
+ if (t !== null && e !== null && i.isResizing) {
107
+ const u = i.currentWidth, o = i.currentHeight;
108
+ 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"), M(), g(u, o), document.removeEventListener("pointermove", H), document.removeEventListener("pointerup", D);
109
+ }
110
+ };
111
+ return /* @__PURE__ */ Y("div", { ref: y, children: [
112
+ !W && E && /* @__PURE__ */ c(
113
+ "button",
114
+ {
115
+ className: "image-caption-button",
116
+ ref: p,
117
+ onClick: () => {
118
+ C(!W);
119
+ },
120
+ children: "Add Caption"
121
+ }
122
+ ),
123
+ /* @__PURE__ */ c(
124
+ "div",
125
+ {
126
+ className: "image-resizer image-resizer-n",
127
+ onPointerDown: (t) => {
128
+ l(t, r.north);
129
+ }
130
+ }
131
+ ),
132
+ /* @__PURE__ */ c(
133
+ "div",
134
+ {
135
+ className: "image-resizer image-resizer-ne",
136
+ onPointerDown: (t) => {
137
+ l(t, r.north | r.east);
138
+ }
139
+ }
140
+ ),
141
+ /* @__PURE__ */ c(
142
+ "div",
143
+ {
144
+ className: "image-resizer image-resizer-e",
145
+ onPointerDown: (t) => {
146
+ l(t, r.east);
147
+ }
148
+ }
149
+ ),
150
+ /* @__PURE__ */ c(
151
+ "div",
152
+ {
153
+ className: "image-resizer image-resizer-se",
154
+ onPointerDown: (t) => {
155
+ l(t, r.south | r.east);
156
+ }
157
+ }
158
+ ),
159
+ /* @__PURE__ */ c(
160
+ "div",
161
+ {
162
+ className: "image-resizer image-resizer-s",
163
+ onPointerDown: (t) => {
164
+ l(t, r.south);
165
+ }
166
+ }
167
+ ),
168
+ /* @__PURE__ */ c(
169
+ "div",
170
+ {
171
+ className: "image-resizer image-resizer-sw",
172
+ onPointerDown: (t) => {
173
+ l(t, r.south | r.west);
174
+ }
175
+ }
176
+ ),
177
+ /* @__PURE__ */ c(
178
+ "div",
179
+ {
180
+ className: "image-resizer image-resizer-w",
181
+ onPointerDown: (t) => {
182
+ l(t, r.west);
183
+ }
184
+ }
185
+ ),
186
+ /* @__PURE__ */ c(
187
+ "div",
188
+ {
189
+ className: "image-resizer image-resizer-nw",
190
+ onPointerDown: (t) => {
191
+ l(t, r.north | r.west);
192
+ }
193
+ }
194
+ )
195
+ ] });
196
+ }
197
+ export {
198
+ S as I
199
+ };
@@ -8,7 +8,7 @@ export interface EditorConfig {
8
8
  enableFontControls: boolean;
9
9
  enableTableOptions: boolean;
10
10
  enableInsertMenu: boolean;
11
- enableColorPicker: boolean;
11
+ enableColors: boolean;
12
12
  enableClearOptions: boolean;
13
13
  enableEmojiPicker: boolean;
14
14
  enableLinks: boolean;
@@ -36,6 +36,7 @@ export interface EditorConfig {
36
36
  aiChat: boolean;
37
37
  comment: boolean;
38
38
  improve: boolean;
39
+ colors: boolean;
39
40
  };
40
41
  };
41
42
  expiresAt: string;
@@ -56,7 +57,7 @@ export interface ProjectData {
56
57
  enableFontControls: boolean;
57
58
  enableTableOptions: boolean;
58
59
  enableInsertMenu: boolean;
59
- enableColorPicker: boolean;
60
+ enableColors: boolean;
60
61
  enableClearOptions: boolean;
61
62
  enableEmojiPicker: boolean;
62
63
  enableLinks: boolean;
@@ -83,6 +84,7 @@ export interface ProjectData {
83
84
  aiChat: boolean;
84
85
  comment: boolean;
85
86
  improve: boolean;
87
+ colors: boolean;
86
88
  };
87
89
  };
88
90
  expiresAt: string;