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.
- package/README.md +31 -6
- package/dist/{ImageResizer-Bt7kgv0a.js → ImageResizer-C5luyjPa.js} +68 -59
- package/dist/assets/style.css +1 -1
- package/dist/components/ConfigurableEditorWithAuth.d.ts +8 -6
- package/dist/components/LineHeightPicker/LineHeightControl.d.ts +3 -0
- package/dist/editor/components/FloatingToolbarManager.d.ts +3 -1
- package/dist/editor/hooks/useFloatingToolbar.d.ts +3 -2
- package/dist/{generateDocxThumbnail-CNLulV6U.js → generateDocxThumbnail-CsyiVRDN.js} +1 -1
- package/dist/{generatePdfThumbnail-BFSOSFAX.js → generatePdfThumbnail-DCt8gJMy.js} +1 -1
- package/dist/{generateXlsxThumbnail-CfJuOgEl.js → generateXlsxThumbnail-DgeyjjM-.js} +1 -1
- package/dist/hooks/useAutoExpandingHeight.d.ts +1 -1
- package/dist/{html2pdf.bundle.min-wRsYlGzo.js → html2pdf.bundle.min-Da_gEqE8.js} +1 -1
- package/dist/{index-Ct824Y4n.js → index-Bq1EWxza.js} +4 -4
- package/dist/{index-Dsv2sdJQ.js → index-CoO1ZeVi.js} +106 -109
- package/dist/{index-DMZDKMjN.js → index-Cs_v2OZr.js} +47393 -43616
- package/dist/{index-BJ5KLQGQ.js → index-DAqL9TB6.js} +66 -67
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +2 -2
- package/dist/plugins/CustomHorizontalRulePlugin/CustomHorizontalRuleNode.d.ts +4 -1
- package/dist/plugins/CustomHorizontalRulePlugin/HorizontalRuleCustomizationDialog.d.ts +8 -1
- package/dist/types.d.ts +8 -0
- package/dist/utils/fileUploadValidation.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { I as it } from "./ImageResizer-
|
|
3
|
-
import {
|
|
4
|
-
import { LinkNode as
|
|
5
|
-
import { AutoFocusPlugin as
|
|
6
|
-
import { useLexicalComposerContext as
|
|
7
|
-
import { ContentEditable as
|
|
8
|
-
import { LexicalErrorBoundary as
|
|
9
|
-
import { HistoryPlugin as
|
|
10
|
-
import { LexicalNestedComposer as
|
|
11
|
-
import { OnChangePlugin as
|
|
12
|
-
import { RichTextPlugin as
|
|
13
|
-
import { useLexicalEditable as
|
|
14
|
-
import { useLexicalNodeSelection as
|
|
15
|
-
import { mergeRegister as
|
|
16
|
-
import { $getSelection as L, $isNodeSelection as h, $setSelection as O, SELECTION_CHANGE_COMMAND as
|
|
17
|
-
import { useRef as
|
|
18
|
-
|
|
19
|
-
function ie({
|
|
1
|
+
import { jsxs as x, Fragment as rt, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { I as it } from "./ImageResizer-C5luyjPa.js";
|
|
3
|
+
import { J as N, W as ot, k as nt, A as ct, l as lt, m as at, T as dt, z as st, M as ut, L as ft, i as gt } from "./index-Cs_v2OZr.js";
|
|
4
|
+
import { LinkNode as mt } from "@lexical/link";
|
|
5
|
+
import { AutoFocusPlugin as ht } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
6
|
+
import { useLexicalComposerContext as pt } 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 xt } from "@lexical/react/LexicalHistoryPlugin";
|
|
10
|
+
import { LexicalNestedComposer as Nt } 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 Rt } from "@lexical/react/useLexicalEditable";
|
|
14
|
+
import { useLexicalNodeSelection as kt } from "@lexical/react/useLexicalNodeSelection";
|
|
15
|
+
import { mergeRegister as yt } from "@lexical/utils";
|
|
16
|
+
import { $getSelection as L, $isNodeSelection as h, $setSelection as O, SELECTION_CHANGE_COMMAND as At, COMMAND_PRIORITY_LOW as f, CLICK_COMMAND as St, DRAGSTART_COMMAND as Dt, KEY_DELETE_COMMAND as Lt, KEY_BACKSPACE_COMMAND as Mt, KEY_ENTER_COMMAND as Pt, KEY_ESCAPE_COMMAND as _t, RootNode as $t, TextNode as zt, LineBreakNode as It, ParagraphNode as Wt, $getNodeByKey as y, $isParagraphNode as T } from "lexical";
|
|
17
|
+
import { useRef as M, useState as w, useCallback as v, useEffect as Ot } from "react";
|
|
18
|
+
function re({
|
|
20
19
|
src: j,
|
|
21
20
|
nodeKey: g,
|
|
22
21
|
width: p,
|
|
@@ -29,17 +28,17 @@ function ie({
|
|
|
29
28
|
controls: V = !0,
|
|
30
29
|
position: n = "none"
|
|
31
30
|
}) {
|
|
32
|
-
const a =
|
|
31
|
+
const a = M(null), S = M(null), [l, d, C] = kt(g), [s, P] = w(!1), [o] = pt(), [R, H] = w(null), _ = M(null), K = Rt(), D = v(
|
|
33
32
|
(t) => {
|
|
34
33
|
const r = L();
|
|
35
34
|
return l && h(r) && (t.preventDefault(), o.update(() => {
|
|
36
35
|
r.getNodes().forEach((c) => {
|
|
37
|
-
|
|
36
|
+
N(c) && c.remove();
|
|
38
37
|
});
|
|
39
38
|
})), !1;
|
|
40
39
|
},
|
|
41
40
|
[o, l]
|
|
42
|
-
), $ =
|
|
41
|
+
), $ = v(
|
|
43
42
|
(t) => {
|
|
44
43
|
const r = L(), e = S.current;
|
|
45
44
|
if (l && h(r) && r.getNodes().length === 1) {
|
|
@@ -51,14 +50,14 @@ function ie({
|
|
|
51
50
|
return !1;
|
|
52
51
|
},
|
|
53
52
|
[b, l, E]
|
|
54
|
-
), z =
|
|
53
|
+
), z = v(
|
|
55
54
|
(t) => _.current === b || S.current === t.target ? (O(null), o.update(() => {
|
|
56
55
|
d(!0);
|
|
57
56
|
const r = o.getRootElement();
|
|
58
57
|
r !== null && r.focus();
|
|
59
58
|
}), !0) : !1,
|
|
60
59
|
[b, o, d]
|
|
61
|
-
), I =
|
|
60
|
+
), I = v(
|
|
62
61
|
(t) => {
|
|
63
62
|
const r = t;
|
|
64
63
|
if (s)
|
|
@@ -76,40 +75,40 @@ function ie({
|
|
|
76
75
|
},
|
|
77
76
|
[s, l, d, C]
|
|
78
77
|
);
|
|
79
|
-
|
|
78
|
+
Ot(() => {
|
|
80
79
|
let t = !0;
|
|
81
|
-
const r =
|
|
80
|
+
const r = yt(
|
|
82
81
|
o.registerUpdateListener(({ editorState: e }) => {
|
|
83
82
|
t && H(e.read(() => L()));
|
|
84
83
|
}),
|
|
85
84
|
o.registerCommand(
|
|
86
|
-
|
|
85
|
+
At,
|
|
87
86
|
(e, c) => (_.current = c, !1),
|
|
88
87
|
f
|
|
89
88
|
),
|
|
90
89
|
o.registerCommand(
|
|
91
|
-
|
|
90
|
+
St,
|
|
92
91
|
I,
|
|
93
92
|
f
|
|
94
93
|
),
|
|
95
94
|
o.registerCommand(
|
|
96
|
-
|
|
95
|
+
Dt,
|
|
97
96
|
(e) => e.target === a.current ? (e.preventDefault(), !0) : !1,
|
|
98
97
|
f
|
|
99
98
|
),
|
|
100
99
|
o.registerCommand(
|
|
101
|
-
|
|
100
|
+
Lt,
|
|
102
101
|
D,
|
|
103
102
|
f
|
|
104
103
|
),
|
|
105
104
|
o.registerCommand(
|
|
106
|
-
|
|
105
|
+
Mt,
|
|
107
106
|
D,
|
|
108
107
|
f
|
|
109
108
|
),
|
|
110
|
-
o.registerCommand(
|
|
109
|
+
o.registerCommand(Pt, $, f),
|
|
111
110
|
o.registerCommand(
|
|
112
|
-
|
|
111
|
+
_t,
|
|
113
112
|
z,
|
|
114
113
|
f
|
|
115
114
|
)
|
|
@@ -132,21 +131,21 @@ function ie({
|
|
|
132
131
|
const X = () => {
|
|
133
132
|
o.update(() => {
|
|
134
133
|
const t = y(g);
|
|
135
|
-
|
|
134
|
+
N(t) && t.setShowCaption(!0);
|
|
136
135
|
});
|
|
137
136
|
}, G = (t, r) => {
|
|
138
137
|
setTimeout(() => {
|
|
139
|
-
|
|
138
|
+
P(!1);
|
|
140
139
|
}, 200), o.update(() => {
|
|
141
140
|
const e = y(g);
|
|
142
|
-
|
|
141
|
+
N(e) && e.setWidthAndHeight(t, r);
|
|
143
142
|
});
|
|
144
143
|
}, J = () => {
|
|
145
|
-
|
|
144
|
+
P(!0);
|
|
146
145
|
}, U = (t) => {
|
|
147
146
|
t.preventDefault(), t.stopPropagation(), o.update(() => {
|
|
148
147
|
const r = y(g);
|
|
149
|
-
if (
|
|
148
|
+
if (N(r)) {
|
|
150
149
|
const e = r.getParent();
|
|
151
150
|
r.remove(), e && T(e) && e.getChildrenSize() === 0 && e.setFormat("left");
|
|
152
151
|
}
|
|
@@ -154,13 +153,13 @@ function ie({
|
|
|
154
153
|
}, m = (t, r) => {
|
|
155
154
|
t.preventDefault(), t.stopPropagation(), o.update(() => {
|
|
156
155
|
const e = y(g);
|
|
157
|
-
if (
|
|
156
|
+
if (N(e)) {
|
|
158
157
|
e.setPosition(r);
|
|
159
158
|
const c = e.getParent();
|
|
160
159
|
c && T(c) && (r === "left" ? c.setFormat("left") : r === "right" ? c.setFormat("right") : c.setFormat(""));
|
|
161
160
|
}
|
|
162
161
|
});
|
|
163
|
-
}, q =
|
|
162
|
+
}, q = v(
|
|
164
163
|
(t) => {
|
|
165
164
|
if (s || t.target.closest("button"))
|
|
166
165
|
return;
|
|
@@ -174,8 +173,8 @@ function ie({
|
|
|
174
173
|
},
|
|
175
174
|
[s, l, d, C]
|
|
176
175
|
), Q = l && h(R) && !s, W = (l || s) && K, Z = typeof p == "number" && typeof A == "number", tt = typeof p == "number" ? p : "auto", et = typeof A == "number" ? A : "auto";
|
|
177
|
-
return /* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */
|
|
176
|
+
return /* @__PURE__ */ x(rt, { children: [
|
|
177
|
+
/* @__PURE__ */ x(
|
|
179
178
|
"div",
|
|
180
179
|
{
|
|
181
180
|
draggable: Q,
|
|
@@ -228,8 +227,8 @@ function ie({
|
|
|
228
227
|
draggable: "false"
|
|
229
228
|
}
|
|
230
229
|
),
|
|
231
|
-
l && h(R) && /* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
230
|
+
l && h(R) && /* @__PURE__ */ x("div", { className: "cteditor-absolute cteditor-top-2 cteditor-right-2 cteditor-flex cteditor-gap-1 cteditor-z-10", children: [
|
|
231
|
+
/* @__PURE__ */ x("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: [
|
|
233
232
|
/* @__PURE__ */ i(
|
|
234
233
|
"button",
|
|
235
234
|
{
|
|
@@ -237,7 +236,7 @@ function ie({
|
|
|
237
236
|
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
237
|
"aria-label": "Wrap text left",
|
|
239
238
|
title: "Wrap text left",
|
|
240
|
-
children: /* @__PURE__ */ i(
|
|
239
|
+
children: /* @__PURE__ */ i(ot, {})
|
|
241
240
|
}
|
|
242
241
|
),
|
|
243
242
|
/* @__PURE__ */ i(
|
|
@@ -247,7 +246,7 @@ function ie({
|
|
|
247
246
|
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" : ""}`,
|
|
248
247
|
"aria-label": "Wrap text right",
|
|
249
248
|
title: "Wrap text right",
|
|
250
|
-
children: /* @__PURE__ */ i(
|
|
249
|
+
children: /* @__PURE__ */ i(nt, {})
|
|
251
250
|
}
|
|
252
251
|
),
|
|
253
252
|
/* @__PURE__ */ i("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-border cteditor-mx-0.5" }),
|
|
@@ -258,7 +257,7 @@ function ie({
|
|
|
258
257
|
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" : ""}`,
|
|
259
258
|
"aria-label": "Align left",
|
|
260
259
|
title: "Align left (no text wrap)",
|
|
261
|
-
children: /* @__PURE__ */ i(
|
|
260
|
+
children: /* @__PURE__ */ i(ct, {})
|
|
262
261
|
}
|
|
263
262
|
),
|
|
264
263
|
/* @__PURE__ */ i(
|
|
@@ -268,7 +267,7 @@ function ie({
|
|
|
268
267
|
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" : ""}`,
|
|
269
268
|
"aria-label": "Align center",
|
|
270
269
|
title: "Align center (no text wrap)",
|
|
271
|
-
children: /* @__PURE__ */ i(
|
|
270
|
+
children: /* @__PURE__ */ i(lt, {})
|
|
272
271
|
}
|
|
273
272
|
),
|
|
274
273
|
/* @__PURE__ */ i(
|
|
@@ -278,7 +277,7 @@ function ie({
|
|
|
278
277
|
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" : ""}`,
|
|
279
278
|
"aria-label": "Align right",
|
|
280
279
|
title: "Align right (no text wrap)",
|
|
281
|
-
children: /* @__PURE__ */ i(
|
|
280
|
+
children: /* @__PURE__ */ i(at, {})
|
|
282
281
|
}
|
|
283
282
|
),
|
|
284
283
|
/* @__PURE__ */ i("div", { className: "cteditor-w-px cteditor-h-5 cteditor-bg-border cteditor-mx-0.5" }),
|
|
@@ -289,7 +288,7 @@ function ie({
|
|
|
289
288
|
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" : ""}`,
|
|
290
289
|
"aria-label": "Inline",
|
|
291
290
|
title: "Inline with text",
|
|
292
|
-
children: /* @__PURE__ */ i(
|
|
291
|
+
children: /* @__PURE__ */ i(dt, { className: "cteditor-w-4 cteditor-h-4 cteditor-text-foreground" })
|
|
293
292
|
}
|
|
294
293
|
)
|
|
295
294
|
] }),
|
|
@@ -302,7 +301,7 @@ function ie({
|
|
|
302
301
|
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",
|
|
303
302
|
"aria-label": "Delete video",
|
|
304
303
|
title: "Delete video",
|
|
305
|
-
children: /* @__PURE__ */ i(
|
|
304
|
+
children: /* @__PURE__ */ i(st, { className: "cteditor-w-4 cteditor-h-4" })
|
|
306
305
|
}
|
|
307
306
|
)
|
|
308
307
|
] }),
|
|
@@ -332,43 +331,43 @@ function ie({
|
|
|
332
331
|
maxWidth: "100%",
|
|
333
332
|
...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" } : {}
|
|
334
333
|
},
|
|
335
|
-
children: /* @__PURE__ */
|
|
336
|
-
|
|
334
|
+
children: /* @__PURE__ */ x(
|
|
335
|
+
Nt,
|
|
337
336
|
{
|
|
338
337
|
initialEditor: b,
|
|
339
338
|
initialNodes: [
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
339
|
+
$t,
|
|
340
|
+
zt,
|
|
341
|
+
It,
|
|
342
|
+
Wt,
|
|
343
|
+
mt,
|
|
344
|
+
ut
|
|
346
345
|
],
|
|
347
346
|
children: [
|
|
348
|
-
/* @__PURE__ */ i(
|
|
347
|
+
/* @__PURE__ */ i(ht, {}),
|
|
349
348
|
/* @__PURE__ */ i(
|
|
350
|
-
|
|
349
|
+
Et,
|
|
351
350
|
{
|
|
352
351
|
contentEditable: /* @__PURE__ */ i(
|
|
353
|
-
|
|
352
|
+
bt,
|
|
354
353
|
{
|
|
355
354
|
"aria-placeholder": "Enter a caption...",
|
|
356
355
|
placeholder: () => /* @__PURE__ */ i("span", { className: "cteditor-text-xs", children: "Enter a caption..." }),
|
|
357
356
|
className: "ImageNode__contentEditable"
|
|
358
357
|
}
|
|
359
358
|
),
|
|
360
|
-
ErrorBoundary:
|
|
359
|
+
ErrorBoundary: Ct
|
|
361
360
|
}
|
|
362
361
|
),
|
|
363
362
|
/* @__PURE__ */ i(
|
|
364
|
-
|
|
363
|
+
vt,
|
|
365
364
|
{
|
|
366
365
|
onChange: () => {
|
|
367
366
|
}
|
|
368
367
|
}
|
|
369
368
|
),
|
|
370
|
-
/* @__PURE__ */ i(
|
|
371
|
-
/* @__PURE__ */ i(
|
|
369
|
+
/* @__PURE__ */ i(xt, {}),
|
|
370
|
+
/* @__PURE__ */ i(ft, { namespace: gt.namespace })
|
|
372
371
|
]
|
|
373
372
|
}
|
|
374
373
|
)
|
|
@@ -377,5 +376,5 @@ function ie({
|
|
|
377
376
|
] });
|
|
378
377
|
}
|
|
379
378
|
export {
|
|
380
|
-
|
|
379
|
+
re as default
|
|
381
380
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export type { ContentPreviewProps } from './components/ContentPreview';
|
|
|
10
10
|
export type { ReactNativeBridgeConfig, ReactNativeMessage, ReactNativeMessageType, } from './hooks/useReactNativeBridge';
|
|
11
11
|
export { isReactNativeWebView, useReactNativeBridge, } from './hooks/useReactNativeBridge';
|
|
12
12
|
export type { CurrentUser } from './Provider/EditorProvider';
|
|
13
|
-
export type { EditorConfigTypes } from './types';
|
|
13
|
+
export type { EditorConfigTypes, ToolbarConfig } from './types';
|
|
14
14
|
export { editorConfig as defaultEditorConfig } from './editorConfig';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as a, O as r, P as t, Q as s, R as o, U as d, V as v, Y as u, Z as f, _ as n, a0 as l, a1 as w } from "./index-Cs_v2OZr.js";
|
|
2
2
|
export {
|
|
3
3
|
a as ConfigurableEditor,
|
|
4
4
|
r as ConfigurableEditorWithAuth,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { EditorConfigTypes } from '../../types';
|
|
2
|
+
import { EditorConfigTypes, ToolbarConfig } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Handles editor state changes, retrieving root and selection.
|
|
5
5
|
*/
|
|
@@ -21,7 +21,7 @@ interface ConfigurableEditorProps {
|
|
|
21
21
|
initialContent?: string;
|
|
22
22
|
onChange?: (html: string) => void;
|
|
23
23
|
apiKey?: string;
|
|
24
|
-
|
|
24
|
+
toolbarConfig?: ToolbarConfig;
|
|
25
25
|
editorClassName?: string;
|
|
26
26
|
editorStyle?: React.CSSProperties;
|
|
27
27
|
}
|
|
@@ -6,6 +6,9 @@ export interface CustomHorizontalRulePayload {
|
|
|
6
6
|
strokeWidth?: number;
|
|
7
7
|
lineStyle?: LineStyle;
|
|
8
8
|
}
|
|
9
|
+
export interface OpenHorizontalRuleDialogPayload {
|
|
10
|
+
editingNodeKey?: NodeKey;
|
|
11
|
+
}
|
|
9
12
|
export type SerializedCustomHorizontalRuleNode = Spread<{
|
|
10
13
|
color?: string;
|
|
11
14
|
strokeWidth?: number;
|
|
@@ -13,7 +16,7 @@ export type SerializedCustomHorizontalRuleNode = Spread<{
|
|
|
13
16
|
}, SerializedLexicalNode>;
|
|
14
17
|
export declare const INSERT_CUSTOM_HORIZONTAL_RULE_COMMAND: LexicalCommand<CustomHorizontalRulePayload>;
|
|
15
18
|
/** Opens the horizontal rule customization dialog (e.g. from slash menu). */
|
|
16
|
-
export declare const OPEN_HORIZONTAL_RULE_DIALOG_COMMAND: LexicalCommand<
|
|
19
|
+
export declare const OPEN_HORIZONTAL_RULE_DIALOG_COMMAND: LexicalCommand<OpenHorizontalRuleDialogPayload | undefined>;
|
|
17
20
|
export declare class CustomHorizontalRuleNode extends BaseHorizontalRuleNode {
|
|
18
21
|
__color?: string;
|
|
19
22
|
__strokeWidth?: number;
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { BaseSelection, LexicalEditor } from '../../../node_modules/lexical';
|
|
1
|
+
import { BaseSelection, LexicalEditor, NodeKey } from '../../../node_modules/lexical';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
+
import { LineStyle } from './CustomHorizontalRuleNode';
|
|
3
4
|
interface HorizontalRuleCustomizationDialogProps {
|
|
4
5
|
activeEditor: LexicalEditor;
|
|
5
6
|
onClose: () => void;
|
|
6
7
|
savedSelection?: BaseSelection | null;
|
|
8
|
+
editingNodeKey?: NodeKey | null;
|
|
9
|
+
initialValues?: {
|
|
10
|
+
color: string;
|
|
11
|
+
strokeWidth: number;
|
|
12
|
+
lineStyle: LineStyle;
|
|
13
|
+
} | null;
|
|
7
14
|
}
|
|
8
15
|
declare const HorizontalRuleCustomizationDialog: React.FC<HorizontalRuleCustomizationDialogProps>;
|
|
9
16
|
export default HorizontalRuleCustomizationDialog;
|
package/dist/types.d.ts
CHANGED
|
@@ -116,6 +116,14 @@ export interface EmojiPluginProps {
|
|
|
116
116
|
onChange?: (emoji: EmojiClickData, event?: MouseEvent) => void;
|
|
117
117
|
icon?: React.ReactElement<LucideProps>;
|
|
118
118
|
}
|
|
119
|
+
export interface ToolbarConfig {
|
|
120
|
+
/** Sticky toolbar behavior mode. */
|
|
121
|
+
mode?: "sticky" | "static";
|
|
122
|
+
/** Top offset (px) used only when mode is "sticky". */
|
|
123
|
+
offset?: number;
|
|
124
|
+
/** z-index used only when mode is "sticky". */
|
|
125
|
+
zIndex?: number;
|
|
126
|
+
}
|
|
119
127
|
export interface InsertFilePayload {
|
|
120
128
|
linkText: string;
|
|
121
129
|
src: string;
|