@windoc/react 0.3.2 → 0.3.4
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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1133 -410
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1133 -410
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/styles/editor.css +1 -1
package/dist/index.js
CHANGED
|
@@ -115,23 +115,29 @@ function FooterProvider({
|
|
|
115
115
|
const [rowNo, setRowNo] = (0, import_react2.useState)(0);
|
|
116
116
|
const [colNo, setColNo] = (0, import_react2.useState)(0);
|
|
117
117
|
const [pageScale, setPageScale] = (0, import_react2.useState)(100);
|
|
118
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
119
|
+
FooterContext.Provider,
|
|
120
|
+
{
|
|
121
|
+
value: {
|
|
122
|
+
pageNoList,
|
|
123
|
+
pageNo,
|
|
124
|
+
pageSize,
|
|
125
|
+
wordCount,
|
|
126
|
+
rowNo,
|
|
127
|
+
colNo,
|
|
128
|
+
pageScale,
|
|
129
|
+
setPageNoList,
|
|
130
|
+
setPageNo,
|
|
131
|
+
setPageSize,
|
|
132
|
+
setWordCount,
|
|
133
|
+
setRowNo,
|
|
134
|
+
setColNo,
|
|
135
|
+
setPageScale,
|
|
136
|
+
handleToggleCatalogAction
|
|
137
|
+
},
|
|
138
|
+
children
|
|
139
|
+
}
|
|
140
|
+
);
|
|
135
141
|
}
|
|
136
142
|
function useFooter() {
|
|
137
143
|
const ctx = (0, import_react2.useContext)(FooterContext);
|
|
@@ -194,32 +200,39 @@ function ColumnTool() {
|
|
|
194
200
|
setGap(clampedValue);
|
|
195
201
|
editorRef.current?.command.executeColumnGap(clampedValue);
|
|
196
202
|
};
|
|
197
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
{
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
204
|
+
"div",
|
|
205
|
+
{
|
|
206
|
+
className: "menu-item__column",
|
|
207
|
+
onClick: () => optionsRef.current?.classList.toggle("visible"),
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "select", title: "Column Layout", children: currentColumns === 1 ? "1 Column" : `${currentColumns} Columns` }),
|
|
210
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "options", ref: optionsRef, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { onClick: (e) => e.stopPropagation(), children: [
|
|
211
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("ul", { children: [
|
|
212
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { onClick: () => handleColumn(1), children: "1 Column" }),
|
|
213
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { onClick: () => handleColumn(2), children: "2 Columns" })
|
|
214
|
+
] }),
|
|
215
|
+
currentColumns > 1 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
216
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "option-divider" }),
|
|
217
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "option-row", children: [
|
|
218
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { children: "Gap (px)" }),
|
|
219
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
220
|
+
"input",
|
|
221
|
+
{
|
|
222
|
+
type: "number",
|
|
223
|
+
min: 0,
|
|
224
|
+
max: 100,
|
|
225
|
+
value: gap,
|
|
226
|
+
onChange: (e) => handleGapChange(Number(e.target.value)),
|
|
227
|
+
onClick: (e) => e.stopPropagation()
|
|
228
|
+
}
|
|
229
|
+
)
|
|
230
|
+
] })
|
|
231
|
+
] })
|
|
232
|
+
] }) })
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
);
|
|
223
236
|
}
|
|
224
237
|
|
|
225
238
|
// src/toolbar/TableTool.tsx
|
|
@@ -253,7 +266,14 @@ function TableTool() {
|
|
|
253
266
|
setHoverCol(0);
|
|
254
267
|
};
|
|
255
268
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { ref: containerRef, className: "menu-item__table", title: "Table", children: [
|
|
256
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
269
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
270
|
+
import_lucide_react3.Table,
|
|
271
|
+
{
|
|
272
|
+
size: 16,
|
|
273
|
+
onClick: () => setVisible(!visible),
|
|
274
|
+
style: { cursor: "pointer" }
|
|
275
|
+
}
|
|
276
|
+
),
|
|
257
277
|
visible && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "table-dropdown", children: [
|
|
258
278
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "table-dropdown-header", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: hoverRow > 0 ? `${hoverRow} \xD7 ${hoverCol}` : "Insert Table" }) }),
|
|
259
279
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "table-dropdown-grid", onClick: handleInsertTable, children: Array.from({ length: 8 }).map((_, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "table-dropdown-row", children: Array.from({ length: 8 }).map((_2, colIdx) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -291,19 +311,26 @@ function TitleTool() {
|
|
|
291
311
|
const handleTitle = (level) => {
|
|
292
312
|
editorRef.current?.command.executeTitle(level);
|
|
293
313
|
};
|
|
294
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
"
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
315
|
+
"div",
|
|
316
|
+
{
|
|
317
|
+
className: "menu-item__title",
|
|
318
|
+
onClick: () => optionsRef.current?.classList.toggle("visible"),
|
|
319
|
+
children: [
|
|
320
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "select", title: "Toggle Heading", children: activeLabel }),
|
|
321
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "options", ref: optionsRef, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { children: LEVELS.map(({ level, label }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
322
|
+
"li",
|
|
323
|
+
{
|
|
324
|
+
className: activeLevel === level ? "active" : "",
|
|
325
|
+
...level ? { "data-level": level } : {},
|
|
326
|
+
onClick: () => handleTitle(level),
|
|
327
|
+
children: label
|
|
328
|
+
},
|
|
329
|
+
label
|
|
330
|
+
)) }) })
|
|
331
|
+
]
|
|
332
|
+
}
|
|
333
|
+
);
|
|
307
334
|
}
|
|
308
335
|
|
|
309
336
|
// src/toolbar/FontTool.tsx
|
|
@@ -327,20 +354,27 @@ function FontTool() {
|
|
|
327
354
|
const handleFont = (family) => {
|
|
328
355
|
editorRef.current?.command.executeFont(family);
|
|
329
356
|
};
|
|
330
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
"
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
358
|
+
"div",
|
|
359
|
+
{
|
|
360
|
+
className: "menu-item__font",
|
|
361
|
+
onClick: () => optionsRef.current?.classList.toggle("visible"),
|
|
362
|
+
children: [
|
|
363
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "select", title: "Font", children: activeLabel }),
|
|
364
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "options", ref: optionsRef, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("ul", { children: FONTS.map(({ family, label }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
365
|
+
"li",
|
|
366
|
+
{
|
|
367
|
+
"data-family": family,
|
|
368
|
+
className: activeFont === family ? "active" : "",
|
|
369
|
+
style: { fontFamily: family },
|
|
370
|
+
onClick: () => handleFont(family),
|
|
371
|
+
children: label
|
|
372
|
+
},
|
|
373
|
+
family
|
|
374
|
+
)) }) })
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
);
|
|
344
378
|
}
|
|
345
379
|
|
|
346
380
|
// src/toolbar/FontSizeTool.tsx
|
|
@@ -354,18 +388,25 @@ function FontSizeTool() {
|
|
|
354
388
|
const handleSize = (size) => {
|
|
355
389
|
editorRef.current?.command.executeSize(size);
|
|
356
390
|
};
|
|
357
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
"
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
children: size
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
392
|
+
"div",
|
|
393
|
+
{
|
|
394
|
+
className: "menu-item__size",
|
|
395
|
+
onClick: () => optionsRef.current?.classList.toggle("visible"),
|
|
396
|
+
children: [
|
|
397
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "select", title: "Font Size", children: activeSize }),
|
|
398
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "options", ref: optionsRef, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ul", { children: SIZES.map((size) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
399
|
+
"li",
|
|
400
|
+
{
|
|
401
|
+
className: activeSize === size ? "active" : "",
|
|
402
|
+
onClick: () => handleSize(size),
|
|
403
|
+
children: size
|
|
404
|
+
},
|
|
405
|
+
size
|
|
406
|
+
)) }) })
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
);
|
|
369
410
|
}
|
|
370
411
|
|
|
371
412
|
// src/toolbar/LineHeightTool.tsx
|
|
@@ -380,18 +421,25 @@ function LineHeightTool() {
|
|
|
380
421
|
const handleLineHeight = (value) => {
|
|
381
422
|
editorRef.current?.command.executeRowMargin(Number(value));
|
|
382
423
|
};
|
|
383
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
"
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
children: h
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
425
|
+
"div",
|
|
426
|
+
{
|
|
427
|
+
className: "menu-item__line-height",
|
|
428
|
+
onClick: () => optionsRef.current?.classList.toggle("visible"),
|
|
429
|
+
children: [
|
|
430
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "select", title: "Line Height", children: activeLabel }),
|
|
431
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "options", ref: optionsRef, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("ul", { children: LINE_HEIGHTS.map((h) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
432
|
+
"li",
|
|
433
|
+
{
|
|
434
|
+
className: String(activeMargin) === h || activeLabel === h ? "active" : "",
|
|
435
|
+
onClick: () => handleLineHeight(h),
|
|
436
|
+
children: h
|
|
437
|
+
},
|
|
438
|
+
h
|
|
439
|
+
)) }) })
|
|
440
|
+
]
|
|
441
|
+
}
|
|
442
|
+
);
|
|
395
443
|
}
|
|
396
444
|
|
|
397
445
|
// src/toolbar/ColorTool.tsx
|
|
@@ -399,14 +447,102 @@ var import_react9 = require("react");
|
|
|
399
447
|
var import_lucide_react4 = require("lucide-react");
|
|
400
448
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
401
449
|
var COLOR_PALETTE = [
|
|
402
|
-
[
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
450
|
+
[
|
|
451
|
+
"#000000",
|
|
452
|
+
"#434343",
|
|
453
|
+
"#666666",
|
|
454
|
+
"#999999",
|
|
455
|
+
"#b7b7b7",
|
|
456
|
+
"#cccccc",
|
|
457
|
+
"#d9d9d9",
|
|
458
|
+
"#efefef",
|
|
459
|
+
"#f3f3f3",
|
|
460
|
+
"#ffffff"
|
|
461
|
+
],
|
|
462
|
+
[
|
|
463
|
+
"#980000",
|
|
464
|
+
"#ff0000",
|
|
465
|
+
"#ff9900",
|
|
466
|
+
"#ffff00",
|
|
467
|
+
"#00ff00",
|
|
468
|
+
"#00ffff",
|
|
469
|
+
"#4a86e8",
|
|
470
|
+
"#0000ff",
|
|
471
|
+
"#9900ff",
|
|
472
|
+
"#ff00ff"
|
|
473
|
+
],
|
|
474
|
+
[
|
|
475
|
+
"#e6b8af",
|
|
476
|
+
"#f4cccc",
|
|
477
|
+
"#fce5cd",
|
|
478
|
+
"#fff2cc",
|
|
479
|
+
"#d9ead3",
|
|
480
|
+
"#d0e0e3",
|
|
481
|
+
"#c9daf8",
|
|
482
|
+
"#cfe2f3",
|
|
483
|
+
"#d9d2e9",
|
|
484
|
+
"#ead1dc"
|
|
485
|
+
],
|
|
486
|
+
[
|
|
487
|
+
"#dd7e6b",
|
|
488
|
+
"#ea9999",
|
|
489
|
+
"#f9cb9c",
|
|
490
|
+
"#ffe599",
|
|
491
|
+
"#b6d7a8",
|
|
492
|
+
"#a2c4c9",
|
|
493
|
+
"#a4c2f4",
|
|
494
|
+
"#9fc5e8",
|
|
495
|
+
"#b4a7d6",
|
|
496
|
+
"#d5a6bd"
|
|
497
|
+
],
|
|
498
|
+
[
|
|
499
|
+
"#cc4125",
|
|
500
|
+
"#e06666",
|
|
501
|
+
"#f6b26b",
|
|
502
|
+
"#ffd966",
|
|
503
|
+
"#93c47d",
|
|
504
|
+
"#76a5af",
|
|
505
|
+
"#6d9eeb",
|
|
506
|
+
"#6fa8dc",
|
|
507
|
+
"#8e7cc3",
|
|
508
|
+
"#c27ba0"
|
|
509
|
+
],
|
|
510
|
+
[
|
|
511
|
+
"#a61c00",
|
|
512
|
+
"#cc0000",
|
|
513
|
+
"#e69138",
|
|
514
|
+
"#f1c232",
|
|
515
|
+
"#6aa84f",
|
|
516
|
+
"#45818e",
|
|
517
|
+
"#3c78d8",
|
|
518
|
+
"#3d85c6",
|
|
519
|
+
"#674ea7",
|
|
520
|
+
"#a64d79"
|
|
521
|
+
],
|
|
522
|
+
[
|
|
523
|
+
"#85200c",
|
|
524
|
+
"#990000",
|
|
525
|
+
"#b45f06",
|
|
526
|
+
"#bf9000",
|
|
527
|
+
"#38761d",
|
|
528
|
+
"#134f5c",
|
|
529
|
+
"#1155cc",
|
|
530
|
+
"#0b5394",
|
|
531
|
+
"#351c75",
|
|
532
|
+
"#741b47"
|
|
533
|
+
],
|
|
534
|
+
[
|
|
535
|
+
"#5b0f00",
|
|
536
|
+
"#660000",
|
|
537
|
+
"#783f04",
|
|
538
|
+
"#7f6000",
|
|
539
|
+
"#274e13",
|
|
540
|
+
"#0c343d",
|
|
541
|
+
"#1c4587",
|
|
542
|
+
"#073763",
|
|
543
|
+
"#20124d",
|
|
544
|
+
"#4c1130"
|
|
545
|
+
]
|
|
410
546
|
];
|
|
411
547
|
function ColorTool() {
|
|
412
548
|
const { editorRef, rangeStyle } = useEditor();
|
|
@@ -418,27 +554,35 @@ function ColorTool() {
|
|
|
418
554
|
const handleReset = () => {
|
|
419
555
|
editorRef.current?.command.executeColor(null);
|
|
420
556
|
};
|
|
421
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
"div",
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
558
|
+
"div",
|
|
559
|
+
{
|
|
560
|
+
className: "menu-item__color",
|
|
561
|
+
title: "Font Color",
|
|
562
|
+
onClick: () => dropdownRef.current?.classList.toggle("visible"),
|
|
563
|
+
children: [
|
|
564
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Baseline, { size: 16 }),
|
|
565
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { style: { backgroundColor: activeColor } }),
|
|
566
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("input", { id: "color", type: "color", readOnly: true, tabIndex: -1 }),
|
|
567
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "color-palette-dropdown", ref: dropdownRef, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { onClick: (e) => e.stopPropagation(), children: [
|
|
568
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("button", { className: "color-palette-reset", onClick: handleReset, children: [
|
|
569
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.RotateCcw, { size: 12 }),
|
|
570
|
+
"Reset"
|
|
571
|
+
] }),
|
|
572
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "color-palette-grid", children: COLOR_PALETTE.map((row, ri) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "color-palette-row", children: row.map((color) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
573
|
+
"div",
|
|
574
|
+
{
|
|
575
|
+
className: `color-palette-swatch${activeColor.toLowerCase() === color.toLowerCase() ? " active" : ""}`,
|
|
576
|
+
style: { backgroundColor: color },
|
|
577
|
+
onClick: () => handleColor(color),
|
|
578
|
+
title: color
|
|
579
|
+
},
|
|
580
|
+
color
|
|
581
|
+
)) }, ri)) })
|
|
582
|
+
] }) })
|
|
583
|
+
]
|
|
584
|
+
}
|
|
585
|
+
);
|
|
442
586
|
}
|
|
443
587
|
|
|
444
588
|
// src/toolbar/HighlightTool.tsx
|
|
@@ -446,14 +590,102 @@ var import_react10 = require("react");
|
|
|
446
590
|
var import_lucide_react5 = require("lucide-react");
|
|
447
591
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
448
592
|
var HIGHLIGHT_PALETTE = [
|
|
449
|
-
[
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
593
|
+
[
|
|
594
|
+
"#000000",
|
|
595
|
+
"#434343",
|
|
596
|
+
"#666666",
|
|
597
|
+
"#999999",
|
|
598
|
+
"#b7b7b7",
|
|
599
|
+
"#cccccc",
|
|
600
|
+
"#d9d9d9",
|
|
601
|
+
"#efefef",
|
|
602
|
+
"#f3f3f3",
|
|
603
|
+
"#ffffff"
|
|
604
|
+
],
|
|
605
|
+
[
|
|
606
|
+
"#980000",
|
|
607
|
+
"#ff0000",
|
|
608
|
+
"#ff9900",
|
|
609
|
+
"#ffff00",
|
|
610
|
+
"#00ff00",
|
|
611
|
+
"#00ffff",
|
|
612
|
+
"#4a86e8",
|
|
613
|
+
"#0000ff",
|
|
614
|
+
"#9900ff",
|
|
615
|
+
"#ff00ff"
|
|
616
|
+
],
|
|
617
|
+
[
|
|
618
|
+
"#e6b8af",
|
|
619
|
+
"#f4cccc",
|
|
620
|
+
"#fce5cd",
|
|
621
|
+
"#fff2cc",
|
|
622
|
+
"#d9ead3",
|
|
623
|
+
"#d0e0e3",
|
|
624
|
+
"#c9daf8",
|
|
625
|
+
"#cfe2f3",
|
|
626
|
+
"#d9d2e9",
|
|
627
|
+
"#ead1dc"
|
|
628
|
+
],
|
|
629
|
+
[
|
|
630
|
+
"#dd7e6b",
|
|
631
|
+
"#ea9999",
|
|
632
|
+
"#f9cb9c",
|
|
633
|
+
"#ffe599",
|
|
634
|
+
"#b6d7a8",
|
|
635
|
+
"#a2c4c9",
|
|
636
|
+
"#a4c2f4",
|
|
637
|
+
"#9fc5e8",
|
|
638
|
+
"#b4a7d6",
|
|
639
|
+
"#d5a6bd"
|
|
640
|
+
],
|
|
641
|
+
[
|
|
642
|
+
"#cc4125",
|
|
643
|
+
"#e06666",
|
|
644
|
+
"#f6b26b",
|
|
645
|
+
"#ffd966",
|
|
646
|
+
"#93c47d",
|
|
647
|
+
"#76a5af",
|
|
648
|
+
"#6d9eeb",
|
|
649
|
+
"#6fa8dc",
|
|
650
|
+
"#8e7cc3",
|
|
651
|
+
"#c27ba0"
|
|
652
|
+
],
|
|
653
|
+
[
|
|
654
|
+
"#a61c00",
|
|
655
|
+
"#cc0000",
|
|
656
|
+
"#e69138",
|
|
657
|
+
"#f1c232",
|
|
658
|
+
"#6aa84f",
|
|
659
|
+
"#45818e",
|
|
660
|
+
"#3c78d8",
|
|
661
|
+
"#3d85c6",
|
|
662
|
+
"#674ea7",
|
|
663
|
+
"#a64d79"
|
|
664
|
+
],
|
|
665
|
+
[
|
|
666
|
+
"#85200c",
|
|
667
|
+
"#990000",
|
|
668
|
+
"#b45f06",
|
|
669
|
+
"#bf9000",
|
|
670
|
+
"#38761d",
|
|
671
|
+
"#134f5c",
|
|
672
|
+
"#1155cc",
|
|
673
|
+
"#0b5394",
|
|
674
|
+
"#351c75",
|
|
675
|
+
"#741b47"
|
|
676
|
+
],
|
|
677
|
+
[
|
|
678
|
+
"#5b0f00",
|
|
679
|
+
"#660000",
|
|
680
|
+
"#783f04",
|
|
681
|
+
"#7f6000",
|
|
682
|
+
"#274e13",
|
|
683
|
+
"#0c343d",
|
|
684
|
+
"#1c4587",
|
|
685
|
+
"#073763",
|
|
686
|
+
"#20124d",
|
|
687
|
+
"#4c1130"
|
|
688
|
+
]
|
|
457
689
|
];
|
|
458
690
|
function HighlightTool() {
|
|
459
691
|
const { editorRef, rangeStyle } = useEditor();
|
|
@@ -465,27 +697,35 @@ function HighlightTool() {
|
|
|
465
697
|
const handleReset = () => {
|
|
466
698
|
editorRef.current?.command.executeHighlight(null);
|
|
467
699
|
};
|
|
468
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
"div",
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
701
|
+
"div",
|
|
702
|
+
{
|
|
703
|
+
className: "menu-item__highlight",
|
|
704
|
+
title: "Highlight",
|
|
705
|
+
onClick: () => dropdownRef.current?.classList.toggle("visible"),
|
|
706
|
+
children: [
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.Highlighter, { size: 16 }),
|
|
708
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { style: { backgroundColor: activeColor || "#ffff00" } }),
|
|
709
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { id: "highlight", type: "color", readOnly: true, tabIndex: -1 }),
|
|
710
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "color-palette-dropdown", ref: dropdownRef, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { onClick: (e) => e.stopPropagation(), children: [
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("button", { className: "color-palette-reset", onClick: handleReset, children: [
|
|
712
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.RotateCcw, { size: 12 }),
|
|
713
|
+
"None"
|
|
714
|
+
] }),
|
|
715
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "color-palette-grid", children: HIGHLIGHT_PALETTE.map((row, ri) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "color-palette-row", children: row.map((color) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
716
|
+
"div",
|
|
717
|
+
{
|
|
718
|
+
className: `color-palette-swatch${activeColor && activeColor.toLowerCase() === color.toLowerCase() ? " active" : ""}`,
|
|
719
|
+
style: { backgroundColor: color },
|
|
720
|
+
onClick: () => handleColor(color),
|
|
721
|
+
title: color
|
|
722
|
+
},
|
|
723
|
+
color
|
|
724
|
+
)) }, ri)) })
|
|
725
|
+
] }) })
|
|
726
|
+
]
|
|
727
|
+
}
|
|
728
|
+
);
|
|
489
729
|
}
|
|
490
730
|
|
|
491
731
|
// src/toolbar/BoldTool.tsx
|
|
@@ -494,7 +734,15 @@ var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
|
494
734
|
function BoldTool() {
|
|
495
735
|
const { editorRef, isApple, rangeStyle } = useEditor();
|
|
496
736
|
const isActive = rangeStyle?.bold === true;
|
|
497
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
738
|
+
"div",
|
|
739
|
+
{
|
|
740
|
+
className: `menu-item__bold ${isActive ? "active" : ""}`,
|
|
741
|
+
title: `Bold(${isApple ? "\u2318" : "Ctrl"}+B)`,
|
|
742
|
+
onClick: () => editorRef.current?.command.executeBold(),
|
|
743
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Bold, { size: 16 })
|
|
744
|
+
}
|
|
745
|
+
);
|
|
498
746
|
}
|
|
499
747
|
|
|
500
748
|
// src/toolbar/ItalicTool.tsx
|
|
@@ -503,7 +751,15 @@ var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
|
503
751
|
function ItalicTool() {
|
|
504
752
|
const { editorRef, isApple, rangeStyle } = useEditor();
|
|
505
753
|
const isActive = rangeStyle?.italic === true;
|
|
506
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
755
|
+
"div",
|
|
756
|
+
{
|
|
757
|
+
className: `menu-item__italic ${isActive ? "active" : ""}`,
|
|
758
|
+
title: `Italic(${isApple ? "\u2318" : "Ctrl"}+I)`,
|
|
759
|
+
onClick: () => editorRef.current?.command.executeItalic(),
|
|
760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.Italic, { size: 16 })
|
|
761
|
+
}
|
|
762
|
+
);
|
|
507
763
|
}
|
|
508
764
|
|
|
509
765
|
// src/toolbar/UnderlineTool.tsx
|
|
@@ -515,13 +771,41 @@ function UnderlineTool() {
|
|
|
515
771
|
const { editorRef, isApple, rangeStyle } = useEditor();
|
|
516
772
|
const optionsRef = (0, import_react11.useRef)(null);
|
|
517
773
|
const isActive = rangeStyle?.underline === true;
|
|
518
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
775
|
+
"div",
|
|
776
|
+
{
|
|
777
|
+
className: `menu-item__underline ${isActive ? "active" : ""}`,
|
|
778
|
+
title: `Underline(${isApple ? "\u2318" : "Ctrl"}+U)`,
|
|
779
|
+
children: [
|
|
780
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
781
|
+
import_lucide_react8.Underline,
|
|
782
|
+
{
|
|
783
|
+
size: 16,
|
|
784
|
+
onClick: () => editorRef.current?.command.executeUnderline(),
|
|
785
|
+
style: { cursor: "pointer" }
|
|
786
|
+
}
|
|
787
|
+
),
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
789
|
+
"span",
|
|
790
|
+
{
|
|
791
|
+
className: "select",
|
|
792
|
+
onClick: () => optionsRef.current?.classList.toggle("visible")
|
|
793
|
+
}
|
|
794
|
+
),
|
|
795
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "options", ref: optionsRef, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { children: STYLES.map((style) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
796
|
+
"li",
|
|
797
|
+
{
|
|
798
|
+
"data-decoration-style": style,
|
|
799
|
+
onClick: () => {
|
|
800
|
+
editorRef.current?.command.executeUnderline({ style });
|
|
801
|
+
},
|
|
802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("i", {})
|
|
803
|
+
},
|
|
804
|
+
style
|
|
805
|
+
)) }) })
|
|
806
|
+
]
|
|
807
|
+
}
|
|
808
|
+
);
|
|
525
809
|
}
|
|
526
810
|
|
|
527
811
|
// src/toolbar/StrikeoutTool.tsx
|
|
@@ -530,7 +814,15 @@ var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
|
530
814
|
function StrikeoutTool() {
|
|
531
815
|
const { editorRef, rangeStyle } = useEditor();
|
|
532
816
|
const isActive = rangeStyle?.strikeout === true;
|
|
533
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
818
|
+
"div",
|
|
819
|
+
{
|
|
820
|
+
className: `menu-item__strikeout ${isActive ? "active" : ""}`,
|
|
821
|
+
title: "Strikethrough",
|
|
822
|
+
onClick: () => editorRef.current?.command.executeStrikeout(),
|
|
823
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.Strikethrough, { size: 16 })
|
|
824
|
+
}
|
|
825
|
+
);
|
|
534
826
|
}
|
|
535
827
|
|
|
536
828
|
// src/toolbar/LeftAlignTool.tsx
|
|
@@ -539,7 +831,15 @@ var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
|
539
831
|
function LeftAlignTool() {
|
|
540
832
|
const { editorRef, isApple, rangeStyle } = useEditor();
|
|
541
833
|
const isActive = !rangeStyle?.rowFlex || rangeStyle.rowFlex === "left";
|
|
542
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
835
|
+
"div",
|
|
836
|
+
{
|
|
837
|
+
className: `menu-item__left ${isActive ? "active" : ""}`,
|
|
838
|
+
title: `Left align(${isApple ? "\u2318" : "Ctrl"}+L)`,
|
|
839
|
+
onClick: () => editorRef.current?.command.executeRowFlex("left"),
|
|
840
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.AlignLeft, { size: 16 })
|
|
841
|
+
}
|
|
842
|
+
);
|
|
543
843
|
}
|
|
544
844
|
|
|
545
845
|
// src/toolbar/CenterAlignTool.tsx
|
|
@@ -548,7 +848,15 @@ var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
|
548
848
|
function CenterAlignTool() {
|
|
549
849
|
const { editorRef, isApple, rangeStyle } = useEditor();
|
|
550
850
|
const isActive = rangeStyle?.rowFlex === "center";
|
|
551
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
852
|
+
"div",
|
|
853
|
+
{
|
|
854
|
+
className: `menu-item__center ${isActive ? "active" : ""}`,
|
|
855
|
+
title: `Center align(${isApple ? "\u2318" : "Ctrl"}+E)`,
|
|
856
|
+
onClick: () => editorRef.current?.command.executeRowFlex("center"),
|
|
857
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react11.AlignCenter, { size: 16 })
|
|
858
|
+
}
|
|
859
|
+
);
|
|
552
860
|
}
|
|
553
861
|
|
|
554
862
|
// src/toolbar/RightAlignTool.tsx
|
|
@@ -557,7 +865,15 @@ var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
|
557
865
|
function RightAlignTool() {
|
|
558
866
|
const { editorRef, isApple, rangeStyle } = useEditor();
|
|
559
867
|
const isActive = rangeStyle?.rowFlex === "right";
|
|
560
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
869
|
+
"div",
|
|
870
|
+
{
|
|
871
|
+
className: `menu-item__right ${isActive ? "active" : ""}`,
|
|
872
|
+
title: `Right align(${isApple ? "\u2318" : "Ctrl"}+R)`,
|
|
873
|
+
onClick: () => editorRef.current?.command.executeRowFlex("right"),
|
|
874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react12.AlignRight, { size: 16 })
|
|
875
|
+
}
|
|
876
|
+
);
|
|
561
877
|
}
|
|
562
878
|
|
|
563
879
|
// src/toolbar/JustifyTool.tsx
|
|
@@ -566,7 +882,15 @@ var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
|
566
882
|
function JustifyTool() {
|
|
567
883
|
const { editorRef, isApple, rangeStyle } = useEditor();
|
|
568
884
|
const isActive = rangeStyle?.rowFlex === "justify" || rangeStyle?.rowFlex === "alignment";
|
|
569
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
className: `menu-item__justify ${isActive ? "active" : ""}`,
|
|
889
|
+
title: `Distribute(${isApple ? "\u2318" : "Ctrl"}+Shift+J)`,
|
|
890
|
+
onClick: () => editorRef.current?.command.executeRowFlex("justify"),
|
|
891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react13.AlignJustify, { size: 16 })
|
|
892
|
+
}
|
|
893
|
+
);
|
|
570
894
|
}
|
|
571
895
|
|
|
572
896
|
// src/toolbar/ListTool.tsx
|
|
@@ -589,19 +913,22 @@ var UL_PRESETS = [
|
|
|
589
913
|
{ preset: "ulStar", label: "Star", preview: ["\u2605", "\u25CB", "\u25A0"] },
|
|
590
914
|
{ preset: "ulCheckArr", label: "Check Arrow", preview: ["\u27A4", "\u25CB", "\u25A0"] }
|
|
591
915
|
];
|
|
592
|
-
function PresetCell({
|
|
593
|
-
|
|
916
|
+
function PresetCell({
|
|
917
|
+
option,
|
|
918
|
+
onClick
|
|
919
|
+
}) {
|
|
920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { onClick, className: "list-preset-cell", title: option.label, children: option.preview.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
594
921
|
"div",
|
|
595
922
|
{
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
children: option.preview.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "list-preset-line", style: { paddingLeft: `${i * 10}px` }, children: [
|
|
923
|
+
className: "list-preset-line",
|
|
924
|
+
style: { paddingLeft: `${i * 10}px` },
|
|
925
|
+
children: [
|
|
600
926
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "list-preset-marker", children: item }),
|
|
601
927
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "list-preset-text" })
|
|
602
|
-
]
|
|
603
|
-
}
|
|
604
|
-
|
|
928
|
+
]
|
|
929
|
+
},
|
|
930
|
+
i
|
|
931
|
+
)) });
|
|
605
932
|
}
|
|
606
933
|
function ListTool() {
|
|
607
934
|
const { editorRef, isApple, rangeStyle } = useEditor();
|
|
@@ -627,51 +954,109 @@ function ListTool() {
|
|
|
627
954
|
editorRef.current?.command.executeListOutdent();
|
|
628
955
|
close();
|
|
629
956
|
};
|
|
630
|
-
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
958
|
+
"div",
|
|
959
|
+
{
|
|
960
|
+
className: `menu-item__list ${isActive ? "active" : ""}`,
|
|
961
|
+
title: `List(${isApple ? "\u2318" : "Ctrl"}+Shift+U)`,
|
|
962
|
+
children: [
|
|
634
963
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
635
|
-
|
|
964
|
+
import_lucide_react14.List,
|
|
636
965
|
{
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
966
|
+
size: 16,
|
|
967
|
+
onClick: () => optionsRef.current?.classList.toggle("visible"),
|
|
968
|
+
style: { cursor: "pointer" }
|
|
640
969
|
}
|
|
641
970
|
),
|
|
642
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "options", ref: optionsRef, style: { width: "320px" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { padding: "8px" }, children: [
|
|
972
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { display: "flex", gap: "4px", marginBottom: "8px" }, children: [
|
|
973
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
974
|
+
"button",
|
|
975
|
+
{
|
|
976
|
+
onClick: () => handleList("ul", "checkbox"),
|
|
977
|
+
className: "list-quick-btn",
|
|
978
|
+
children: "Checkbox"
|
|
979
|
+
}
|
|
980
|
+
),
|
|
981
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
982
|
+
"button",
|
|
983
|
+
{
|
|
984
|
+
onClick: handleIndent,
|
|
985
|
+
className: "list-quick-btn",
|
|
986
|
+
title: "Indent (Tab)",
|
|
987
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react14.Indent, { size: 14 })
|
|
988
|
+
}
|
|
989
|
+
),
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
991
|
+
"button",
|
|
992
|
+
{
|
|
993
|
+
onClick: handleOutdent,
|
|
994
|
+
className: "list-quick-btn",
|
|
995
|
+
title: "Outdent (Shift+Tab)",
|
|
996
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react14.Outdent, { size: 14 })
|
|
997
|
+
}
|
|
998
|
+
)
|
|
999
|
+
] }),
|
|
1000
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { marginBottom: "8px" }, children: [
|
|
1001
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1002
|
+
"div",
|
|
1003
|
+
{
|
|
1004
|
+
style: {
|
|
1005
|
+
display: "flex",
|
|
1006
|
+
alignItems: "center",
|
|
1007
|
+
gap: "4px",
|
|
1008
|
+
fontSize: "11px",
|
|
1009
|
+
color: "#667085",
|
|
1010
|
+
marginBottom: "6px",
|
|
1011
|
+
fontWeight: 500
|
|
1012
|
+
},
|
|
1013
|
+
children: [
|
|
1014
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react14.ListOrdered, { size: 12 }),
|
|
1015
|
+
"Ordered List"
|
|
1016
|
+
]
|
|
1017
|
+
}
|
|
1018
|
+
),
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "list-preset-grid", children: OL_PRESETS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1020
|
+
PresetCell,
|
|
1021
|
+
{
|
|
1022
|
+
option,
|
|
1023
|
+
onClick: () => handlePreset("ol", option.preset)
|
|
1024
|
+
},
|
|
1025
|
+
option.preset
|
|
1026
|
+
)) })
|
|
1027
|
+
] }),
|
|
1028
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
|
|
1029
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1030
|
+
"div",
|
|
1031
|
+
{
|
|
1032
|
+
style: {
|
|
1033
|
+
display: "flex",
|
|
1034
|
+
alignItems: "center",
|
|
1035
|
+
gap: "4px",
|
|
1036
|
+
fontSize: "11px",
|
|
1037
|
+
color: "#667085",
|
|
1038
|
+
marginBottom: "6px",
|
|
1039
|
+
fontWeight: 500
|
|
1040
|
+
},
|
|
1041
|
+
children: [
|
|
1042
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react14.List, { size: 12 }),
|
|
1043
|
+
"Unordered List"
|
|
1044
|
+
]
|
|
1045
|
+
}
|
|
1046
|
+
),
|
|
1047
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "list-preset-grid", children: UL_PRESETS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1048
|
+
PresetCell,
|
|
1049
|
+
{
|
|
1050
|
+
option,
|
|
1051
|
+
onClick: () => handlePreset("ul", option.preset)
|
|
1052
|
+
},
|
|
1053
|
+
option.preset
|
|
1054
|
+
)) })
|
|
1055
|
+
] })
|
|
1056
|
+
] }) })
|
|
1057
|
+
]
|
|
1058
|
+
}
|
|
1059
|
+
);
|
|
675
1060
|
}
|
|
676
1061
|
|
|
677
1062
|
// src/toolbar/ImageTool.tsx
|
|
@@ -697,10 +1082,25 @@ function ImageTool() {
|
|
|
697
1082
|
};
|
|
698
1083
|
e.target.value = "";
|
|
699
1084
|
};
|
|
700
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
1085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1086
|
+
"div",
|
|
1087
|
+
{
|
|
1088
|
+
className: "menu-item__image",
|
|
1089
|
+
onClick: () => document.getElementById("image")?.click(),
|
|
1090
|
+
children: [
|
|
1091
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react15.Image, { size: 16 }),
|
|
1092
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1093
|
+
"input",
|
|
1094
|
+
{
|
|
1095
|
+
type: "file",
|
|
1096
|
+
id: "image",
|
|
1097
|
+
accept: ".png, .jpg, .jpeg, .svg, .gif",
|
|
1098
|
+
onChange: handleImageUpload
|
|
1099
|
+
}
|
|
1100
|
+
)
|
|
1101
|
+
]
|
|
1102
|
+
}
|
|
1103
|
+
);
|
|
704
1104
|
}
|
|
705
1105
|
|
|
706
1106
|
// src/toolbar/SeparatorTool.tsx
|
|
@@ -725,62 +1125,138 @@ function SeparatorTool() {
|
|
|
725
1125
|
const lineColor = "#344054";
|
|
726
1126
|
const handleSeparator = (e, dashArray) => {
|
|
727
1127
|
e.stopPropagation();
|
|
728
|
-
editorRef.current?.command.executeSeparator(dashArray, {
|
|
1128
|
+
editorRef.current?.command.executeSeparator(dashArray, {
|
|
1129
|
+
lineWidth: selectedWidth
|
|
1130
|
+
});
|
|
729
1131
|
optionsRef.current?.classList.remove("visible");
|
|
730
1132
|
};
|
|
731
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "menu-item", title: "Separator", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
]
|
|
754
|
-
},
|
|
755
|
-
label
|
|
756
|
-
)) }),
|
|
757
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { borderTop: "1px solid #e4e7ec", marginTop: "8px", paddingTop: "8px" }, children: [
|
|
758
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { fontSize: "11px", color: "#667085", marginBottom: "6px", fontWeight: 500 }, children: "Line Width" }),
|
|
759
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { display: "flex", gap: "4px" }, children: LINE_WIDTHS.map(({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
760
|
-
"button",
|
|
1133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "menu-item", title: "Separator", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1134
|
+
"span",
|
|
1135
|
+
{
|
|
1136
|
+
className: "menu-item__separator",
|
|
1137
|
+
onClick: () => optionsRef.current?.classList.toggle("visible"),
|
|
1138
|
+
style: {
|
|
1139
|
+
display: "flex",
|
|
1140
|
+
alignItems: "center",
|
|
1141
|
+
justifyContent: "center",
|
|
1142
|
+
width: "28px",
|
|
1143
|
+
height: "28px",
|
|
1144
|
+
cursor: "pointer",
|
|
1145
|
+
margin: "0 2px",
|
|
1146
|
+
borderRadius: "8px",
|
|
1147
|
+
color: "#475467",
|
|
1148
|
+
transition: "all 0.2s",
|
|
1149
|
+
position: "relative"
|
|
1150
|
+
},
|
|
1151
|
+
children: [
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react16.Minus, { size: 16 }),
|
|
1153
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1154
|
+
"div",
|
|
761
1155
|
{
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
},
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
1156
|
+
className: "options",
|
|
1157
|
+
ref: optionsRef,
|
|
1158
|
+
style: { width: "220px", height: "auto" },
|
|
1159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { style: { padding: "8px 10px 10px" }, children: [
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { style: { margin: 0, padding: 0, listStyle: "none" }, children: DASH_STYLES.map(({ label, dashArray }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1161
|
+
"li",
|
|
1162
|
+
{
|
|
1163
|
+
onClick: (e) => handleSeparator(e, dashArray),
|
|
1164
|
+
style: {
|
|
1165
|
+
display: "flex",
|
|
1166
|
+
alignItems: "center",
|
|
1167
|
+
gap: "10px",
|
|
1168
|
+
padding: "5px 6px",
|
|
1169
|
+
cursor: "pointer",
|
|
1170
|
+
borderRadius: "4px"
|
|
1171
|
+
},
|
|
1172
|
+
children: [
|
|
1173
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1174
|
+
"svg",
|
|
1175
|
+
{
|
|
1176
|
+
style: { flex: 1, minWidth: 0, overflow: "hidden" },
|
|
1177
|
+
height: "8",
|
|
1178
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1179
|
+
"line",
|
|
1180
|
+
{
|
|
1181
|
+
x1: "0",
|
|
1182
|
+
y1: "4",
|
|
1183
|
+
x2: "100%",
|
|
1184
|
+
y2: "4",
|
|
1185
|
+
stroke: lineColor,
|
|
1186
|
+
strokeWidth: selectedWidth,
|
|
1187
|
+
strokeDasharray: dashArray.length ? dashArray.join(",") : "none"
|
|
1188
|
+
}
|
|
1189
|
+
)
|
|
1190
|
+
}
|
|
1191
|
+
),
|
|
1192
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1193
|
+
"span",
|
|
1194
|
+
{
|
|
1195
|
+
style: {
|
|
1196
|
+
fontSize: "11px",
|
|
1197
|
+
color: "#475467",
|
|
1198
|
+
whiteSpace: "nowrap",
|
|
1199
|
+
flexShrink: 0
|
|
1200
|
+
},
|
|
1201
|
+
children: label
|
|
1202
|
+
}
|
|
1203
|
+
)
|
|
1204
|
+
]
|
|
1205
|
+
},
|
|
1206
|
+
label
|
|
1207
|
+
)) }),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1209
|
+
"div",
|
|
1210
|
+
{
|
|
1211
|
+
style: {
|
|
1212
|
+
borderTop: "1px solid #e4e7ec",
|
|
1213
|
+
marginTop: "8px",
|
|
1214
|
+
paddingTop: "8px"
|
|
1215
|
+
},
|
|
1216
|
+
children: [
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1218
|
+
"div",
|
|
1219
|
+
{
|
|
1220
|
+
style: {
|
|
1221
|
+
fontSize: "11px",
|
|
1222
|
+
color: "#667085",
|
|
1223
|
+
marginBottom: "6px",
|
|
1224
|
+
fontWeight: 500
|
|
1225
|
+
},
|
|
1226
|
+
children: "Line Width"
|
|
1227
|
+
}
|
|
1228
|
+
),
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { display: "flex", gap: "4px" }, children: LINE_WIDTHS.map(({ label, value }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1230
|
+
"button",
|
|
1231
|
+
{
|
|
1232
|
+
onClick: (e) => {
|
|
1233
|
+
e.stopPropagation();
|
|
1234
|
+
setSelectedWidth(value);
|
|
1235
|
+
},
|
|
1236
|
+
style: {
|
|
1237
|
+
flex: 1,
|
|
1238
|
+
padding: "3px 6px",
|
|
1239
|
+
fontSize: "11px",
|
|
1240
|
+
border: `1px solid ${selectedWidth === value ? "#3b82f6" : "#d0d5dd"}`,
|
|
1241
|
+
borderRadius: "4px",
|
|
1242
|
+
background: selectedWidth === value ? "#eff6ff" : "#fff",
|
|
1243
|
+
color: selectedWidth === value ? "#3b82f6" : "#475467",
|
|
1244
|
+
cursor: "pointer",
|
|
1245
|
+
fontWeight: selectedWidth === value ? 600 : 400
|
|
1246
|
+
},
|
|
1247
|
+
children: label
|
|
1248
|
+
},
|
|
1249
|
+
value
|
|
1250
|
+
)) })
|
|
1251
|
+
]
|
|
1252
|
+
}
|
|
1253
|
+
)
|
|
1254
|
+
] })
|
|
1255
|
+
}
|
|
1256
|
+
)
|
|
1257
|
+
]
|
|
1258
|
+
}
|
|
1259
|
+
) });
|
|
784
1260
|
}
|
|
785
1261
|
|
|
786
1262
|
// src/toolbar/WatermarkTool.tsx
|
|
@@ -798,10 +1274,17 @@ function InsertElementTool() {
|
|
|
798
1274
|
}
|
|
799
1275
|
editorRef.current.command.executeSetZone("header");
|
|
800
1276
|
};
|
|
801
|
-
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
1277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1278
|
+
"div",
|
|
1279
|
+
{
|
|
1280
|
+
className: "menu-item__insert-element",
|
|
1281
|
+
onClick: () => optionsRef.current?.classList.toggle("visible"),
|
|
1282
|
+
children: [
|
|
1283
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("i", { title: "Insert Element" }),
|
|
1284
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "options", ref: optionsRef, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("li", { onClick: handleHeader, children: "Add Header" }) }) })
|
|
1285
|
+
]
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
805
1288
|
}
|
|
806
1289
|
|
|
807
1290
|
// src/toolbar/PageBreakTool.tsx
|
|
@@ -884,7 +1367,15 @@ function EditorToolbar() {
|
|
|
884
1367
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
885
1368
|
function CatalogToggleTool() {
|
|
886
1369
|
const { handleToggleCatalogAction } = useFooter();
|
|
887
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1371
|
+
"div",
|
|
1372
|
+
{
|
|
1373
|
+
className: "catalog-mode",
|
|
1374
|
+
title: "Catalog",
|
|
1375
|
+
onClick: handleToggleCatalogAction,
|
|
1376
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("i", {})
|
|
1377
|
+
}
|
|
1378
|
+
);
|
|
888
1379
|
}
|
|
889
1380
|
|
|
890
1381
|
// src/footer/PageModeTool.tsx
|
|
@@ -972,14 +1463,30 @@ function EditorModeTool() {
|
|
|
972
1463
|
}
|
|
973
1464
|
});
|
|
974
1465
|
};
|
|
975
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1467
|
+
"div",
|
|
1468
|
+
{
|
|
1469
|
+
className: "editor-mode",
|
|
1470
|
+
title: "Click to change mode",
|
|
1471
|
+
onClick: handleModeChange,
|
|
1472
|
+
children: editorMode
|
|
1473
|
+
}
|
|
1474
|
+
);
|
|
976
1475
|
}
|
|
977
1476
|
|
|
978
1477
|
// src/footer/PageScaleMinusTool.tsx
|
|
979
1478
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
980
1479
|
function PageScaleMinusTool() {
|
|
981
1480
|
const { editorRef } = useEditor();
|
|
982
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1482
|
+
"div",
|
|
1483
|
+
{
|
|
1484
|
+
className: "page-scale-minus",
|
|
1485
|
+
title: "Zoom Out (Ctrl+-)",
|
|
1486
|
+
onClick: () => editorRef.current?.command.executePageScaleMinus(),
|
|
1487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("i", {})
|
|
1488
|
+
}
|
|
1489
|
+
);
|
|
983
1490
|
}
|
|
984
1491
|
|
|
985
1492
|
// src/footer/PageScalePercentageTool.tsx
|
|
@@ -987,17 +1494,33 @@ var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
|
987
1494
|
function PageScalePercentageTool() {
|
|
988
1495
|
const { editorRef } = useEditor();
|
|
989
1496
|
const { pageScale } = useFooter();
|
|
990
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1498
|
+
"span",
|
|
1499
|
+
{
|
|
1500
|
+
className: "page-scale-percentage",
|
|
1501
|
+
title: "Zoom Level",
|
|
1502
|
+
onClick: () => editorRef.current?.command.executePageScaleRecovery(),
|
|
1503
|
+
children: [
|
|
1504
|
+
pageScale,
|
|
1505
|
+
"%"
|
|
1506
|
+
]
|
|
1507
|
+
}
|
|
1508
|
+
);
|
|
994
1509
|
}
|
|
995
1510
|
|
|
996
1511
|
// src/footer/PageScaleAddTool.tsx
|
|
997
1512
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
998
1513
|
function PageScaleAddTool() {
|
|
999
1514
|
const { editorRef } = useEditor();
|
|
1000
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1516
|
+
"div",
|
|
1517
|
+
{
|
|
1518
|
+
className: "page-scale-add",
|
|
1519
|
+
title: "Zoom In (Ctrl+=)",
|
|
1520
|
+
onClick: () => editorRef.current?.command.executePageScaleAdd(),
|
|
1521
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("i", {})
|
|
1522
|
+
}
|
|
1523
|
+
);
|
|
1001
1524
|
}
|
|
1002
1525
|
|
|
1003
1526
|
// src/footer/PaperSizeTool.tsx
|
|
@@ -1018,7 +1541,15 @@ function PaperSizeTool() {
|
|
|
1018
1541
|
};
|
|
1019
1542
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "paper-size", onClick: () => setVisible(!visible), children: [
|
|
1020
1543
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("i", { title: "Paper Type" }),
|
|
1021
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `options ${visible ? "visible" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { children: SIZES2.map(({ label, width, height, active }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `options ${visible ? "visible" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { children: SIZES2.map(({ label, width, height, active }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1545
|
+
"li",
|
|
1546
|
+
{
|
|
1547
|
+
onClick: () => handlePaperSize(width, height),
|
|
1548
|
+
className: active ? "active" : "",
|
|
1549
|
+
children: label
|
|
1550
|
+
},
|
|
1551
|
+
label
|
|
1552
|
+
)) }) })
|
|
1022
1553
|
] });
|
|
1023
1554
|
}
|
|
1024
1555
|
|
|
@@ -1035,7 +1566,14 @@ function PaperDirectionTool() {
|
|
|
1035
1566
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "paper-direction", onClick: () => setVisible(!visible), children: [
|
|
1036
1567
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("i", { title: "Paper Direction" }),
|
|
1037
1568
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: `options ${visible ? "visible" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("ul", { children: [
|
|
1038
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1570
|
+
"li",
|
|
1571
|
+
{
|
|
1572
|
+
onClick: () => handlePaperDirection("vertical"),
|
|
1573
|
+
className: "active",
|
|
1574
|
+
children: "Portrait"
|
|
1575
|
+
}
|
|
1576
|
+
),
|
|
1039
1577
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("li", { onClick: () => handlePaperDirection("horizontal"), children: "Landscape" })
|
|
1040
1578
|
] }) })
|
|
1041
1579
|
] });
|
|
@@ -1053,10 +1591,38 @@ function PaperMarginTool() {
|
|
|
1053
1591
|
new Dialog({
|
|
1054
1592
|
title: "Page Margins",
|
|
1055
1593
|
data: [
|
|
1056
|
-
{
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1594
|
+
{
|
|
1595
|
+
type: "text",
|
|
1596
|
+
label: "Top Margin (cm)",
|
|
1597
|
+
name: "top",
|
|
1598
|
+
required: true,
|
|
1599
|
+
value: `${(0, import_core.pxToCm)(topMargin)}`,
|
|
1600
|
+
placeholder: "e.g. 2.54"
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
type: "text",
|
|
1604
|
+
label: "Bottom Margin (cm)",
|
|
1605
|
+
name: "bottom",
|
|
1606
|
+
required: true,
|
|
1607
|
+
value: `${(0, import_core.pxToCm)(bottomMargin)}`,
|
|
1608
|
+
placeholder: "e.g. 2.54"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
type: "text",
|
|
1612
|
+
label: "Left Margin (cm)",
|
|
1613
|
+
name: "left",
|
|
1614
|
+
required: true,
|
|
1615
|
+
value: `${(0, import_core.pxToCm)(leftMargin)}`,
|
|
1616
|
+
placeholder: "e.g. 2.54"
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
type: "text",
|
|
1620
|
+
label: "Right Margin (cm)",
|
|
1621
|
+
name: "right",
|
|
1622
|
+
required: true,
|
|
1623
|
+
value: `${(0, import_core.pxToCm)(rightMargin)}`,
|
|
1624
|
+
placeholder: "e.g. 2.54"
|
|
1625
|
+
}
|
|
1060
1626
|
],
|
|
1061
1627
|
onConfirm: (payload) => {
|
|
1062
1628
|
const top = payload.find((p) => p.name === "top")?.value;
|
|
@@ -1076,7 +1642,15 @@ function PaperMarginTool() {
|
|
|
1076
1642
|
}
|
|
1077
1643
|
});
|
|
1078
1644
|
};
|
|
1079
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1646
|
+
"div",
|
|
1647
|
+
{
|
|
1648
|
+
className: "paper-margin",
|
|
1649
|
+
title: "Page Margins",
|
|
1650
|
+
onClick: handlePaperMargin,
|
|
1651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("i", {})
|
|
1652
|
+
}
|
|
1653
|
+
);
|
|
1080
1654
|
}
|
|
1081
1655
|
|
|
1082
1656
|
// src/footer/FullscreenTool.tsx
|
|
@@ -1121,7 +1695,15 @@ function EditorOptionTool() {
|
|
|
1121
1695
|
}
|
|
1122
1696
|
});
|
|
1123
1697
|
};
|
|
1124
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1699
|
+
"div",
|
|
1700
|
+
{
|
|
1701
|
+
className: "editor-option",
|
|
1702
|
+
title: "Editor Settings",
|
|
1703
|
+
onClick: handleEditorOption,
|
|
1704
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("i", {})
|
|
1705
|
+
}
|
|
1706
|
+
);
|
|
1125
1707
|
}
|
|
1126
1708
|
|
|
1127
1709
|
// src/footer/WatermarkFooterTool.tsx
|
|
@@ -1176,30 +1758,33 @@ function WatermarkFooterTool() {
|
|
|
1176
1758
|
el.style.left = `${-rect.left + 4}px`;
|
|
1177
1759
|
}
|
|
1178
1760
|
}, [visible]);
|
|
1179
|
-
const handleFileUpload = (0, import_react20.useCallback)(
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1761
|
+
const handleFileUpload = (0, import_react20.useCallback)(
|
|
1762
|
+
(e) => {
|
|
1763
|
+
const file = e.target.files?.[0];
|
|
1764
|
+
if (!file) return;
|
|
1765
|
+
const reader = new FileReader();
|
|
1766
|
+
reader.onload = () => {
|
|
1767
|
+
const result = reader.result;
|
|
1768
|
+
setImageData(result);
|
|
1769
|
+
const img = new Image();
|
|
1770
|
+
img.onload = () => {
|
|
1771
|
+
const maxDim = 300;
|
|
1772
|
+
let w = img.naturalWidth;
|
|
1773
|
+
let h = img.naturalHeight;
|
|
1774
|
+
if (w > maxDim || h > maxDim) {
|
|
1775
|
+
const ratio = Math.min(maxDim / w, maxDim / h);
|
|
1776
|
+
w = Math.round(w * ratio);
|
|
1777
|
+
h = Math.round(h * ratio);
|
|
1778
|
+
}
|
|
1779
|
+
setImgWidth(w);
|
|
1780
|
+
setImgHeight(h);
|
|
1781
|
+
};
|
|
1782
|
+
img.src = result;
|
|
1198
1783
|
};
|
|
1199
|
-
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1784
|
+
reader.readAsDataURL(file);
|
|
1785
|
+
},
|
|
1786
|
+
[]
|
|
1787
|
+
);
|
|
1203
1788
|
const handleApply = () => {
|
|
1204
1789
|
if (!editorRef.current) return;
|
|
1205
1790
|
if (tab === "text") {
|
|
@@ -1232,100 +1817,238 @@ function WatermarkFooterTool() {
|
|
|
1232
1817
|
editorRef.current?.command.executeDeleteWatermark();
|
|
1233
1818
|
setVisible(false);
|
|
1234
1819
|
};
|
|
1235
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1244
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
{
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1821
|
+
"div",
|
|
1822
|
+
{
|
|
1823
|
+
className: "watermark-footer",
|
|
1824
|
+
ref: containerRef,
|
|
1825
|
+
onClick: () => setVisible(!visible),
|
|
1826
|
+
children: [
|
|
1827
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("i", { title: "Watermark" }),
|
|
1828
|
+
visible && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1830
|
+
"div",
|
|
1831
|
+
{
|
|
1832
|
+
className: "wm-panel-mask",
|
|
1833
|
+
onClick: (e) => {
|
|
1834
|
+
e.stopPropagation();
|
|
1835
|
+
setVisible(false);
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
),
|
|
1839
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1840
|
+
"div",
|
|
1841
|
+
{
|
|
1842
|
+
className: "watermark-footer-panel",
|
|
1843
|
+
ref: panelRef,
|
|
1844
|
+
onClick: (e) => e.stopPropagation(),
|
|
1845
|
+
children: [
|
|
1846
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-title", children: [
|
|
1847
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: "Watermark" }),
|
|
1848
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("i", { onClick: () => setVisible(false) })
|
|
1849
|
+
] }),
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-tabs", children: [
|
|
1851
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1852
|
+
"button",
|
|
1853
|
+
{
|
|
1854
|
+
className: `wm-panel-tab ${tab === "text" ? "active" : ""}`,
|
|
1855
|
+
onClick: () => setTab("text"),
|
|
1856
|
+
children: "Text"
|
|
1857
|
+
}
|
|
1858
|
+
),
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1860
|
+
"button",
|
|
1861
|
+
{
|
|
1862
|
+
className: `wm-panel-tab ${tab === "image" ? "active" : ""}`,
|
|
1863
|
+
onClick: () => setTab("image"),
|
|
1864
|
+
children: "Image"
|
|
1865
|
+
}
|
|
1866
|
+
)
|
|
1867
|
+
] }),
|
|
1868
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-body", children: [
|
|
1869
|
+
tab === "text" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
1870
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field", children: [
|
|
1871
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("label", { children: "Text" }),
|
|
1872
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1873
|
+
"input",
|
|
1874
|
+
{
|
|
1875
|
+
type: "text",
|
|
1876
|
+
value: text,
|
|
1877
|
+
onChange: (e) => setText(e.target.value),
|
|
1878
|
+
placeholder: "Watermark text"
|
|
1879
|
+
}
|
|
1880
|
+
)
|
|
1881
|
+
] }),
|
|
1882
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field", children: [
|
|
1883
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("label", { children: "Font" }),
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1885
|
+
"select",
|
|
1886
|
+
{
|
|
1887
|
+
value: font,
|
|
1888
|
+
onChange: (e) => setFont(e.target.value),
|
|
1889
|
+
children: FONTS2.map((f) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: f.family, children: f.label }, f.family))
|
|
1890
|
+
}
|
|
1891
|
+
)
|
|
1892
|
+
] }),
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field", children: [
|
|
1894
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("label", { children: "Color" }),
|
|
1895
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "wm-panel-colors", children: COLOR_PALETTE2.flat().map((c) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1896
|
+
"div",
|
|
1897
|
+
{
|
|
1898
|
+
className: `wm-panel-color ${color.toLowerCase() === c.toLowerCase() ? "active" : ""}`,
|
|
1899
|
+
style: { backgroundColor: c },
|
|
1900
|
+
onClick: () => setColor(c)
|
|
1901
|
+
},
|
|
1902
|
+
c
|
|
1903
|
+
)) })
|
|
1904
|
+
] })
|
|
1905
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
1906
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field", children: [
|
|
1907
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("label", { children: "Image" }),
|
|
1908
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1909
|
+
"div",
|
|
1910
|
+
{
|
|
1911
|
+
style: {
|
|
1912
|
+
display: "flex",
|
|
1913
|
+
alignItems: "center",
|
|
1914
|
+
gap: "6px"
|
|
1915
|
+
},
|
|
1916
|
+
children: [
|
|
1917
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1918
|
+
"button",
|
|
1919
|
+
{
|
|
1920
|
+
className: "wm-panel-upload",
|
|
1921
|
+
onClick: () => fileInputRef.current?.click(),
|
|
1922
|
+
children: "Choose File"
|
|
1923
|
+
}
|
|
1924
|
+
),
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1926
|
+
"input",
|
|
1927
|
+
{
|
|
1928
|
+
ref: fileInputRef,
|
|
1929
|
+
type: "file",
|
|
1930
|
+
accept: "image/*",
|
|
1931
|
+
style: { display: "none" },
|
|
1932
|
+
onChange: handleFileUpload
|
|
1933
|
+
}
|
|
1934
|
+
),
|
|
1935
|
+
imageData && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { style: { fontSize: "11px", color: "#667085" }, children: "Loaded" })
|
|
1936
|
+
]
|
|
1937
|
+
}
|
|
1938
|
+
)
|
|
1939
|
+
] }),
|
|
1940
|
+
imageData && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "wm-panel-field", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "wm-panel-preview", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1941
|
+
"img",
|
|
1942
|
+
{
|
|
1943
|
+
src: imageData,
|
|
1944
|
+
alt: "preview",
|
|
1945
|
+
style: {
|
|
1946
|
+
maxWidth: "100%",
|
|
1947
|
+
maxHeight: "48px",
|
|
1948
|
+
objectFit: "contain"
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
) }) }),
|
|
1952
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field-row", children: [
|
|
1953
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field wm-panel-field-half", children: [
|
|
1954
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("label", { children: "W" }),
|
|
1955
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1956
|
+
"input",
|
|
1957
|
+
{
|
|
1958
|
+
type: "number",
|
|
1959
|
+
value: imgWidth,
|
|
1960
|
+
min: 10,
|
|
1961
|
+
onChange: (e) => setImgWidth(Number(e.target.value))
|
|
1962
|
+
}
|
|
1963
|
+
)
|
|
1964
|
+
] }),
|
|
1965
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field wm-panel-field-half", children: [
|
|
1966
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("label", { children: "H" }),
|
|
1967
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1968
|
+
"input",
|
|
1969
|
+
{
|
|
1970
|
+
type: "number",
|
|
1971
|
+
value: imgHeight,
|
|
1972
|
+
min: 10,
|
|
1973
|
+
onChange: (e) => setImgHeight(Number(e.target.value))
|
|
1974
|
+
}
|
|
1975
|
+
)
|
|
1976
|
+
] })
|
|
1977
|
+
] })
|
|
1978
|
+
] }),
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field", children: [
|
|
1980
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
|
|
1981
|
+
"Opacity ",
|
|
1982
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "wm-panel-value", children: [
|
|
1983
|
+
opacity,
|
|
1984
|
+
"%"
|
|
1985
|
+
] })
|
|
1986
|
+
] }),
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1988
|
+
"input",
|
|
1989
|
+
{
|
|
1990
|
+
type: "range",
|
|
1991
|
+
min: 0,
|
|
1992
|
+
max: 100,
|
|
1993
|
+
value: opacity,
|
|
1994
|
+
onChange: (e) => setOpacity(Number(e.target.value)),
|
|
1995
|
+
className: "wm-panel-slider"
|
|
1996
|
+
}
|
|
1997
|
+
)
|
|
1998
|
+
] }),
|
|
1999
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field", children: [
|
|
2000
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { children: [
|
|
2001
|
+
"Rotation ",
|
|
2002
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "wm-panel-value", children: [
|
|
2003
|
+
rotation,
|
|
2004
|
+
"\xB0"
|
|
2005
|
+
] })
|
|
2006
|
+
] }),
|
|
2007
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2008
|
+
"input",
|
|
2009
|
+
{
|
|
2010
|
+
type: "range",
|
|
2011
|
+
min: -90,
|
|
2012
|
+
max: 90,
|
|
2013
|
+
value: rotation,
|
|
2014
|
+
onChange: (e) => setRotation(Number(e.target.value)),
|
|
2015
|
+
className: "wm-panel-slider"
|
|
2016
|
+
}
|
|
2017
|
+
)
|
|
2018
|
+
] }),
|
|
2019
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-field", children: [
|
|
2020
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("label", { children: "Position" }),
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-toggle", children: [
|
|
2022
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2023
|
+
"button",
|
|
2024
|
+
{
|
|
2025
|
+
className: !inFront ? "active" : "",
|
|
2026
|
+
onClick: () => setInFront(false),
|
|
2027
|
+
children: "Behind"
|
|
2028
|
+
}
|
|
2029
|
+
),
|
|
2030
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2031
|
+
"button",
|
|
2032
|
+
{
|
|
2033
|
+
className: inFront ? "active" : "",
|
|
2034
|
+
onClick: () => setInFront(true),
|
|
2035
|
+
children: "In Front"
|
|
2036
|
+
}
|
|
2037
|
+
)
|
|
2038
|
+
] })
|
|
2039
|
+
] })
|
|
2040
|
+
] }),
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "wm-panel-actions", children: [
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { className: "wm-panel-btn-delete", onClick: handleDelete, children: "Remove" }),
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("button", { className: "wm-panel-btn-apply", onClick: handleApply, children: "Apply" })
|
|
2044
|
+
] })
|
|
2045
|
+
]
|
|
2046
|
+
}
|
|
2047
|
+
)
|
|
1325
2048
|
] })
|
|
1326
|
-
]
|
|
1327
|
-
|
|
1328
|
-
|
|
2049
|
+
]
|
|
2050
|
+
}
|
|
2051
|
+
);
|
|
1329
2052
|
}
|
|
1330
2053
|
|
|
1331
2054
|
// src/EditorFooter.tsx
|