eddyter 1.4.12-beta.1 → 1.4.13

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.
@@ -5,7 +5,7 @@ import { mergeRegister as ce, $wrapNodeInElement as J } from "@lexical/utils";
5
5
  import { $isTableCellNode as ae } from "@lexical/table";
6
6
  import { $getNodeByKey as T, $createNodeSelection as G, $setSelection as H, $getSelection as S, $isNodeSelection as te, SELECTION_CHANGE_COMMAND as de, COMMAND_PRIORITY_LOW as ne, KEY_ENTER_COMMAND as le, $createParagraphNode as W, $isRootOrShadowRoot as V, PASTE_COMMAND as ue, $isRangeSelection as U, COMMAND_PRIORITY_CRITICAL as me } from "lexical";
7
7
  import { useState as M, useEffect as E, useCallback as _, useRef as Q } from "react";
8
- import { c as fe, E as k, L as pe, a as N, I as ge, C as he, W as be, b as ye, A as xe, d as Ee, e as Ce, f as ve, T as Ne, $ as Z } from "./index-BMOkFC_x.js";
8
+ import { c as fe, E as k, L as pe, a as N, I as ge, C as he, W as be, b as ye, A as xe, d as Ee, e as Ce, f as ve, T as Ne, $ as Z } from "./index-DFEFJp4J.js";
9
9
  import { createPortal as ke } from "react-dom";
10
10
  const Ae = fe("Copy", [
11
11
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
@@ -1,21 +1,22 @@
1
1
  import { jsxs as N, Fragment as rt, jsx as i } from "react/jsx-runtime";
2
2
  import { I as it } from "./ImageResizer-BVwxL4Eh.js";
3
- import { V as x, W as ot, b as nt, A as ct, d as lt, e as at, H as dt, T as st, N as ut, O as ft, P as gt } from "./index-BMOkFC_x.js";
4
- import { LinkNode as mt } from "@lexical/link";
5
- import { AutoFocusPlugin as pt } from "@lexical/react/LexicalAutoFocusPlugin";
6
- import { useLexicalComposerContext as ht } from "@lexical/react/LexicalComposerContext";
7
- import { ContentEditable as bt } from "@lexical/react/LexicalContentEditable";
8
- import { LexicalErrorBoundary as Ct } from "@lexical/react/LexicalErrorBoundary";
9
- import { HistoryPlugin as Nt } from "@lexical/react/LexicalHistoryPlugin";
10
- import { LexicalNestedComposer as xt } from "@lexical/react/LexicalNestedComposer";
11
- import { OnChangePlugin as vt } from "@lexical/react/LexicalOnChangePlugin";
12
- import { RichTextPlugin as Et } from "@lexical/react/LexicalRichTextPlugin";
13
- import { useLexicalEditable as yt } from "@lexical/react/useLexicalEditable";
14
- import { useLexicalNodeSelection as Rt } from "@lexical/react/useLexicalNodeSelection";
15
- import { mergeRegister as At } from "@lexical/utils";
16
- import { $getSelection as P, $isNodeSelection as p, $setSelection as W, SELECTION_CHANGE_COMMAND as kt, COMMAND_PRIORITY_LOW as f, CLICK_COMMAND as St, DRAGSTART_COMMAND as Dt, KEY_DELETE_COMMAND as Pt, KEY_BACKSPACE_COMMAND as Mt, KEY_ENTER_COMMAND as Lt, KEY_ESCAPE_COMMAND as _t, RootNode as $t, TextNode as zt, LineBreakNode as It, ParagraphNode as Ot, $getNodeByKey as A, $isParagraphNode as T } from "lexical";
17
- import { useRef as M, useState as w, useCallback as v, useEffect as Wt } from "react";
18
- function re({
3
+ import { CodeNode as ot } from "@lexical/code";
4
+ import { LinkNode as nt } from "@lexical/link";
5
+ import { AutoFocusPlugin as ct } from "@lexical/react/LexicalAutoFocusPlugin";
6
+ import { useLexicalComposerContext as lt } from "@lexical/react/LexicalComposerContext";
7
+ import { ContentEditable as at } from "@lexical/react/LexicalContentEditable";
8
+ import { LexicalErrorBoundary as dt } from "@lexical/react/LexicalErrorBoundary";
9
+ import { HistoryPlugin as st } from "@lexical/react/LexicalHistoryPlugin";
10
+ import { LexicalNestedComposer as ut } from "@lexical/react/LexicalNestedComposer";
11
+ import { OnChangePlugin as ft } from "@lexical/react/LexicalOnChangePlugin";
12
+ import { RichTextPlugin as gt } from "@lexical/react/LexicalRichTextPlugin";
13
+ import { useLexicalEditable as mt } from "@lexical/react/useLexicalEditable";
14
+ import { useLexicalNodeSelection as pt } from "@lexical/react/useLexicalNodeSelection";
15
+ import { mergeRegister as ht } from "@lexical/utils";
16
+ import { $getSelection as P, $isNodeSelection as p, $setSelection as W, SELECTION_CHANGE_COMMAND as bt, COMMAND_PRIORITY_LOW as f, CLICK_COMMAND as Ct, DRAGSTART_COMMAND as Nt, KEY_DELETE_COMMAND as xt, KEY_BACKSPACE_COMMAND as vt, KEY_ENTER_COMMAND as Et, KEY_ESCAPE_COMMAND as yt, RootNode as Rt, TextNode as At, LineBreakNode as kt, ParagraphNode as St, $getNodeByKey as A, $isParagraphNode as T } from "lexical";
17
+ import { useRef as L, useState as w, useCallback as x, useEffect as Dt } from "react";
18
+ import { U as v, W as Pt, b as Lt, A as Mt, d as _t, e as $t, H as zt, T as It, N as Ot, O as Wt } from "./index-DFEFJp4J.js";
19
+ function ie({
19
20
  src: j,
20
21
  nodeKey: g,
21
22
  width: h,
@@ -24,21 +25,21 @@ function re({
24
25
  resizable: Y,
25
26
  showCaption: E,
26
27
  caption: b,
27
- captionsEnabled: V,
28
- controls: F = !0,
28
+ captionsEnabled: F,
29
+ controls: V = !0,
29
30
  position: n = "none"
30
31
  }) {
31
- const a = M(null), S = M(null), [l, d, C] = Rt(g), [s, L] = w(!1), [o] = ht(), [y, H] = w(null), _ = M(null), K = yt(), D = v(
32
+ const a = L(null), S = L(null), [l, d, C] = pt(g), [s, M] = w(!1), [o] = lt(), [y, H] = w(null), _ = L(null), K = mt(), D = x(
32
33
  (t) => {
33
34
  const r = P();
34
35
  return l && p(r) && (t.preventDefault(), o.update(() => {
35
36
  r.getNodes().forEach((c) => {
36
- x(c) && c.remove();
37
+ v(c) && c.remove();
37
38
  });
38
39
  })), !1;
39
40
  },
40
41
  [o, l]
41
- ), $ = v(
42
+ ), $ = x(
42
43
  (t) => {
43
44
  const r = P(), e = S.current;
44
45
  if (l && p(r) && r.getNodes().length === 1) {
@@ -50,14 +51,14 @@ function re({
50
51
  return !1;
51
52
  },
52
53
  [b, l, E]
53
- ), z = v(
54
+ ), z = x(
54
55
  (t) => _.current === b || S.current === t.target ? (W(null), o.update(() => {
55
56
  d(!0);
56
57
  const r = o.getRootElement();
57
58
  r !== null && r.focus();
58
59
  }), !0) : !1,
59
60
  [b, o, d]
60
- ), I = v(
61
+ ), I = x(
61
62
  (t) => {
62
63
  const r = t;
63
64
  if (s)
@@ -75,40 +76,40 @@ function re({
75
76
  },
76
77
  [s, l, d, C]
77
78
  );
78
- Wt(() => {
79
+ Dt(() => {
79
80
  let t = !0;
80
- const r = At(
81
+ const r = ht(
81
82
  o.registerUpdateListener(({ editorState: e }) => {
82
83
  t && H(e.read(() => P()));
83
84
  }),
84
85
  o.registerCommand(
85
- kt,
86
+ bt,
86
87
  (e, c) => (_.current = c, !1),
87
88
  f
88
89
  ),
89
90
  o.registerCommand(
90
- St,
91
+ Ct,
91
92
  I,
92
93
  f
93
94
  ),
94
95
  o.registerCommand(
95
- Dt,
96
+ Nt,
96
97
  (e) => e.target === a.current ? (e.preventDefault(), !0) : !1,
97
98
  f
98
99
  ),
99
100
  o.registerCommand(
100
- Pt,
101
+ xt,
101
102
  D,
102
103
  f
103
104
  ),
104
105
  o.registerCommand(
105
- Mt,
106
+ vt,
106
107
  D,
107
108
  f
108
109
  ),
109
- o.registerCommand(Lt, $, f),
110
+ o.registerCommand(Et, $, f),
110
111
  o.registerCommand(
111
- _t,
112
+ yt,
112
113
  z,
113
114
  f
114
115
  )
@@ -131,21 +132,21 @@ function re({
131
132
  const X = () => {
132
133
  o.update(() => {
133
134
  const t = A(g);
134
- x(t) && t.setShowCaption(!0);
135
+ v(t) && t.setShowCaption(!0);
135
136
  });
136
137
  }, G = (t, r) => {
137
138
  setTimeout(() => {
138
- L(!1);
139
+ M(!1);
139
140
  }, 200), o.update(() => {
140
141
  const e = A(g);
141
- x(e) && e.setWidthAndHeight(t, r);
142
+ v(e) && e.setWidthAndHeight(t, r);
142
143
  });
143
144
  }, U = () => {
144
- L(!0);
145
+ M(!0);
145
146
  }, q = (t) => {
146
147
  t.preventDefault(), t.stopPropagation(), o.update(() => {
147
148
  const r = A(g);
148
- if (x(r)) {
149
+ if (v(r)) {
149
150
  const e = r.getParent();
150
151
  r.remove(), e && T(e) && e.getChildrenSize() === 0 && e.setFormat("left");
151
152
  }
@@ -153,13 +154,13 @@ function re({
153
154
  }, m = (t, r) => {
154
155
  t.preventDefault(), t.stopPropagation(), o.update(() => {
155
156
  const e = A(g);
156
- if (x(e)) {
157
+ if (v(e)) {
157
158
  e.setPosition(r);
158
159
  const c = e.getParent();
159
160
  c && T(c) && (r === "left" ? c.setFormat("left") : r === "right" ? c.setFormat("right") : c.setFormat(""));
160
161
  }
161
162
  });
162
- }, J = v(
163
+ }, J = x(
163
164
  (t) => {
164
165
  if (s || t.target.closest("button"))
165
166
  return;
@@ -213,7 +214,7 @@ function re({
213
214
  {
214
215
  ref: a,
215
216
  src: j,
216
- controls: F,
217
+ controls: V,
217
218
  preload: "metadata",
218
219
  className: O ? `focused ${p(y) ? "draggable" : ""}` : void 0,
219
220
  style: Z ? {
@@ -237,7 +238,7 @@ function re({
237
238
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${n === "left" ? "cteditor-bg-accent" : ""}`,
238
239
  "aria-label": "Wrap text left",
239
240
  title: "Wrap text left",
240
- children: /* @__PURE__ */ i(ot, {})
241
+ children: /* @__PURE__ */ i(Pt, {})
241
242
  }
242
243
  ),
243
244
  /* @__PURE__ */ i(
@@ -248,7 +249,7 @@ function re({
248
249
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${n === "right" ? "cteditor-bg-accent" : ""}`,
249
250
  "aria-label": "Wrap text right",
250
251
  title: "Wrap text right",
251
- children: /* @__PURE__ */ i(nt, {})
252
+ children: /* @__PURE__ */ i(Lt, {})
252
253
  }
253
254
  ),
254
255
  /* @__PURE__ */ i("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-border cteditor-mx-0.5" }),
@@ -260,7 +261,7 @@ function re({
260
261
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${n === "inline-left" ? "cteditor-bg-accent" : ""}`,
261
262
  "aria-label": "Align left",
262
263
  title: "Align left (no text wrap)",
263
- children: /* @__PURE__ */ i(ct, {})
264
+ children: /* @__PURE__ */ i(Mt, {})
264
265
  }
265
266
  ),
266
267
  /* @__PURE__ */ i(
@@ -271,7 +272,7 @@ function re({
271
272
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${n === "inline-center" || n === "full" ? "cteditor-bg-accent" : ""}`,
272
273
  "aria-label": "Align center",
273
274
  title: "Align center (no text wrap)",
274
- children: /* @__PURE__ */ i(lt, {})
275
+ children: /* @__PURE__ */ i(_t, {})
275
276
  }
276
277
  ),
277
278
  /* @__PURE__ */ i(
@@ -282,7 +283,7 @@ function re({
282
283
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${n === "inline-right" ? "cteditor-bg-accent" : ""}`,
283
284
  "aria-label": "Align right",
284
285
  title: "Align right (no text wrap)",
285
- children: /* @__PURE__ */ i(at, {})
286
+ children: /* @__PURE__ */ i($t, {})
286
287
  }
287
288
  ),
288
289
  /* @__PURE__ */ i("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-border cteditor-mx-0.5" }),
@@ -294,7 +295,7 @@ function re({
294
295
  className: `cteditor-size-6 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded hover:cteditor-bg-accent cteditor-transition-colors ${n === "none" ? "cteditor-bg-accent" : ""}`,
295
296
  "aria-label": "Inline",
296
297
  title: "Inline with text",
297
- children: /* @__PURE__ */ i(dt, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
298
+ children: /* @__PURE__ */ i(zt, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
298
299
  }
299
300
  )
300
301
  ] }),
@@ -308,7 +309,7 @@ function re({
308
309
  className: "cteditor-size-8 cteditor-flex cteditor-items-center cteditor-justify-center cteditor-rounded-md cteditor-bg-background/80 hover:cteditor-bg-destructive hover:cteditor-text-destructive-foreground cteditor-transition-colors cteditor-shadow-md cteditor-border cteditor-border-border",
309
310
  "aria-label": "Delete video",
310
311
  title: "Delete video",
311
- children: /* @__PURE__ */ i(st, { className: "cteditor-w-4 cteditor-h-4" })
312
+ children: /* @__PURE__ */ i(It, { className: "cteditor-w-4 cteditor-h-4" })
312
313
  }
313
314
  )
314
315
  ] }),
@@ -323,7 +324,7 @@ function re({
323
324
  maxWidth: B,
324
325
  onResizeStart: U,
325
326
  onResizeEnd: G,
326
- captionsEnabled: V
327
+ captionsEnabled: F
327
328
  }
328
329
  )
329
330
  ]
@@ -339,42 +340,42 @@ function re({
339
340
  ...n === "inline-center" || n === "full" ? { margin: "0 auto" } : n === "inline-right" ? { marginLeft: "auto" } : n === "left" ? { float: "left", clear: "left" } : n === "right" ? { float: "right", clear: "right" } : {}
340
341
  },
341
342
  children: /* @__PURE__ */ N(
342
- xt,
343
+ ut,
343
344
  {
344
345
  initialEditor: b,
345
346
  initialNodes: [
346
- $t,
347
- zt,
348
- It,
349
- Ot,
350
- mt,
351
- ut
347
+ Rt,
348
+ At,
349
+ kt,
350
+ St,
351
+ nt,
352
+ ot
352
353
  ],
353
354
  children: [
354
- /* @__PURE__ */ i(pt, {}),
355
+ /* @__PURE__ */ i(ct, {}),
355
356
  /* @__PURE__ */ i(
356
- Et,
357
+ gt,
357
358
  {
358
359
  contentEditable: /* @__PURE__ */ i(
359
- bt,
360
+ at,
360
361
  {
361
362
  "aria-placeholder": "Enter a caption...",
362
363
  placeholder: () => /* @__PURE__ */ i("span", { className: "cteditor-text-xs", children: "Enter a caption..." }),
363
364
  className: "ImageNode__contentEditable"
364
365
  }
365
366
  ),
366
- ErrorBoundary: Ct
367
+ ErrorBoundary: dt
367
368
  }
368
369
  ),
369
370
  /* @__PURE__ */ i(
370
- vt,
371
+ ft,
371
372
  {
372
373
  onChange: () => {
373
374
  }
374
375
  }
375
376
  ),
376
- /* @__PURE__ */ i(Nt, {}),
377
- /* @__PURE__ */ i(ft, { namespace: gt.namespace })
377
+ /* @__PURE__ */ i(st, {}),
378
+ /* @__PURE__ */ i(Ot, { namespace: Wt.namespace })
378
379
  ]
379
380
  }
380
381
  )
@@ -383,5 +384,5 @@ function re({
383
384
  ] });
384
385
  }
385
386
  export {
386
- re as default
387
+ ie as default
387
388
  };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Z as i, _ as r, a0 as t, a1 as s, a2 as o, a3 as d, a4 as v, a5 as u, a6 as f, a7 as n, a8 as l, a9 as w } from "./index-BMOkFC_x.js";
1
+ import { Y as i, Z as r, _ as t, a0 as s, a1 as o, a2 as d, a3 as v, a4 as u, a5 as f, a6 as n, a7 as l, a8 as w } from "./index-DFEFJp4J.js";
2
2
  export {
3
3
  i as ConfigurableEditor,
4
4
  r as ConfigurableEditorWithAuth,
@@ -22,7 +22,7 @@ interface ConfigurableEditorProps {
22
22
  onChange?: (html: string) => void;
23
23
  apiKey?: string;
24
24
  toolbarConfig?: ToolbarConfig;
25
- editorClassName?: string;
25
+ contentClassName?: string;
26
26
  editorStyle?: React.CSSProperties;
27
27
  }
28
28
  declare const ConfigurableEditor: React.FC<ConfigurableEditorProps>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eddyter",
3
3
  "private": false,
4
- "version": "1.4.12-beta.1",
4
+ "version": "1.4.13",
5
5
  "description": "Plug and Play AI Rich Text Editor for any website, blog, CRM, ERP, or web app. Built on Lexical with AI writing assistance, dark mode, and real-time collaboration.",
6
6
  "homepage": "https://www.eddyter.com",
7
7
  "repository": {