@underverse-ui/underverse 1.0.138 → 1.0.140
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/api-reference.json +1 -1
- package/dist/index.cjs +1418 -369
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +621 -0
- package/dist/index.d.ts +621 -0
- package/dist/index.js +1111 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1045,6 +1045,83 @@ var en_default = {
|
|
|
1045
1045
|
unnamed: "Unnamed file",
|
|
1046
1046
|
uploading: "(Uploading...)",
|
|
1047
1047
|
uploadFailed: "Upload failed"
|
|
1048
|
+
},
|
|
1049
|
+
menubar: {
|
|
1050
|
+
file: "File",
|
|
1051
|
+
edit: "Edit",
|
|
1052
|
+
view: "View",
|
|
1053
|
+
insert: "Insert",
|
|
1054
|
+
format: "Format",
|
|
1055
|
+
tools: "Tools",
|
|
1056
|
+
table: "Table",
|
|
1057
|
+
save: "Save",
|
|
1058
|
+
exportHtml: "Export HTML",
|
|
1059
|
+
undo: "Undo",
|
|
1060
|
+
undoShortcut: "Ctrl+Z",
|
|
1061
|
+
redo: "Redo",
|
|
1062
|
+
redoShortcut: "Ctrl+Y",
|
|
1063
|
+
cut: "Cut",
|
|
1064
|
+
cutShortcut: "Ctrl+X",
|
|
1065
|
+
copy: "Copy",
|
|
1066
|
+
copyShortcut: "Ctrl+C",
|
|
1067
|
+
paste: "Paste",
|
|
1068
|
+
pasteShortcut: "Ctrl+V",
|
|
1069
|
+
pasteAsText: "Paste as plain text",
|
|
1070
|
+
selectAll: "Select All",
|
|
1071
|
+
selectAllShortcut: "Ctrl+A",
|
|
1072
|
+
sourceCode: "Source code",
|
|
1073
|
+
preview: "Preview",
|
|
1074
|
+
fullscreen: "Fullscreen",
|
|
1075
|
+
fullscreenShortcut: "Ctrl+Shift+F",
|
|
1076
|
+
image: "Image",
|
|
1077
|
+
link: "Link",
|
|
1078
|
+
linkShortcut: "Ctrl+K",
|
|
1079
|
+
insertTable: "Table",
|
|
1080
|
+
horizontalRule: "Horizontal line",
|
|
1081
|
+
bold: "Bold",
|
|
1082
|
+
boldShortcut: "Ctrl+B",
|
|
1083
|
+
italic: "Italic",
|
|
1084
|
+
italicShortcut: "Ctrl+I",
|
|
1085
|
+
underline: "Underline",
|
|
1086
|
+
underlineShortcut: "Ctrl+U",
|
|
1087
|
+
strike: "Strikethrough",
|
|
1088
|
+
superscript: "Superscript",
|
|
1089
|
+
subscript: "Subscript",
|
|
1090
|
+
code: "Code",
|
|
1091
|
+
wrap: "Block",
|
|
1092
|
+
align: "Align",
|
|
1093
|
+
clearFormatting: "Clear formatting",
|
|
1094
|
+
paragraph: "Paragraph",
|
|
1095
|
+
heading1: "Heading 1",
|
|
1096
|
+
heading2: "Heading 2",
|
|
1097
|
+
heading3: "Heading 3",
|
|
1098
|
+
blockquote: "Blockquote",
|
|
1099
|
+
codeBlock: "Code block",
|
|
1100
|
+
taskList: "Task list",
|
|
1101
|
+
alignLeft: "Left",
|
|
1102
|
+
alignCenter: "Center",
|
|
1103
|
+
alignRight: "Right",
|
|
1104
|
+
alignJustify: "Justify",
|
|
1105
|
+
tableProperties: "Table properties",
|
|
1106
|
+
deleteTable: "Delete table",
|
|
1107
|
+
row: "Row",
|
|
1108
|
+
column: "Column",
|
|
1109
|
+
cell: "Cell",
|
|
1110
|
+
addRowBefore: "Insert row above",
|
|
1111
|
+
addRowAfter: "Insert row below",
|
|
1112
|
+
deleteRow: "Delete row",
|
|
1113
|
+
addColumnBefore: "Insert column left",
|
|
1114
|
+
addColumnAfter: "Insert column right",
|
|
1115
|
+
deleteColumn: "Delete column",
|
|
1116
|
+
mergeCells: "Merge cells",
|
|
1117
|
+
splitCell: "Split cell",
|
|
1118
|
+
imageUpload: "Upload Image",
|
|
1119
|
+
applySource: "Apply",
|
|
1120
|
+
closeDialog: "Close",
|
|
1121
|
+
copyHtml: "Copy HTML",
|
|
1122
|
+
exportDefault: "Export HTML",
|
|
1123
|
+
previewEmpty: "Nothing to preview.",
|
|
1124
|
+
sourceCodeHint: "Edit HTML directly and click Apply to update the editor."
|
|
1048
1125
|
}
|
|
1049
1126
|
}
|
|
1050
1127
|
};
|
|
@@ -1344,6 +1421,83 @@ var vi_default = {
|
|
|
1344
1421
|
unnamed: "T\u1EC7p kh\xF4ng t\xEAn",
|
|
1345
1422
|
uploading: "(\u0110ang t\u1EA3i l\xEAn...)",
|
|
1346
1423
|
uploadFailed: "T\u1EA3i l\xEAn th\u1EA5t b\u1EA1i"
|
|
1424
|
+
},
|
|
1425
|
+
menubar: {
|
|
1426
|
+
file: "T\u1EADp tin",
|
|
1427
|
+
edit: "S\u1EEDa",
|
|
1428
|
+
view: "Xem",
|
|
1429
|
+
insert: "Th\xEAm",
|
|
1430
|
+
format: "\u0110\u1ECBnh d\u1EA1ng",
|
|
1431
|
+
tools: "C\xF4ng c\u1EE5",
|
|
1432
|
+
table: "B\u1EA3ng",
|
|
1433
|
+
save: "L\u01B0u",
|
|
1434
|
+
exportHtml: "Xu\u1EA5t HTML",
|
|
1435
|
+
undo: "Hu\u1EF7 thao t\xE1c",
|
|
1436
|
+
undoShortcut: "Ctrl+Z",
|
|
1437
|
+
redo: "Ho\xE0n t\xE1c",
|
|
1438
|
+
redoShortcut: "Ctrl+Y",
|
|
1439
|
+
cut: "C\u1EAFt",
|
|
1440
|
+
cutShortcut: "Ctrl+X",
|
|
1441
|
+
copy: "Ch\xE9p",
|
|
1442
|
+
copyShortcut: "Ctrl+C",
|
|
1443
|
+
paste: "D\xE1n",
|
|
1444
|
+
pasteShortcut: "Ctrl+V",
|
|
1445
|
+
pasteAsText: "D\xE1n nh\u01B0 v\u0103n b\u1EA3n",
|
|
1446
|
+
selectAll: "Ch\u1ECDn t\u1EA5t c\u1EA3",
|
|
1447
|
+
selectAllShortcut: "Ctrl+A",
|
|
1448
|
+
sourceCode: "M\xE3 ngu\u1ED3n",
|
|
1449
|
+
preview: "Xem tr\u01B0\u1EDBc",
|
|
1450
|
+
fullscreen: "\u0110\u1EA7y m\xE0n h\xECnh",
|
|
1451
|
+
fullscreenShortcut: "Ctrl+Shift+F",
|
|
1452
|
+
image: "H\xECnh \u1EA3nh",
|
|
1453
|
+
link: "Li\xEAn k\u1EBFt",
|
|
1454
|
+
linkShortcut: "Ctrl+K",
|
|
1455
|
+
insertTable: "B\u1EA3ng",
|
|
1456
|
+
horizontalRule: "\u0110\u01B0\u1EDDng k\u1EBB ngang",
|
|
1457
|
+
bold: "T\xF4 \u0111\u1EADm",
|
|
1458
|
+
boldShortcut: "Ctrl+B",
|
|
1459
|
+
italic: "In nghi\xEAng",
|
|
1460
|
+
italicShortcut: "Ctrl+I",
|
|
1461
|
+
underline: "G\u1EA1ch d\u01B0\u1EDBi",
|
|
1462
|
+
underlineShortcut: "Ctrl+U",
|
|
1463
|
+
strike: "G\u1EA1ch ngang",
|
|
1464
|
+
superscript: "Tr\xEAn d\xF2ng",
|
|
1465
|
+
subscript: "D\u01B0\u1EDBi d\xF2ng",
|
|
1466
|
+
code: "M\xE3",
|
|
1467
|
+
wrap: "Bao",
|
|
1468
|
+
align: "C\u0103n ch\u1EC9nh",
|
|
1469
|
+
clearFormatting: "Xo\xE1 \u0111\u1ECBnh d\u1EA1ng",
|
|
1470
|
+
paragraph: "\u0110o\u1EA1n v\u0103n",
|
|
1471
|
+
heading1: "Ti\xEAu \u0111\u1EC1 1",
|
|
1472
|
+
heading2: "Ti\xEAu \u0111\u1EC1 2",
|
|
1473
|
+
heading3: "Ti\xEAu \u0111\u1EC1 3",
|
|
1474
|
+
blockquote: "Tr\xEDch d\u1EABn",
|
|
1475
|
+
codeBlock: "Kh\u1ED1i m\xE3",
|
|
1476
|
+
taskList: "Danh s\xE1ch vi\u1EC7c",
|
|
1477
|
+
alignLeft: "Tr\xE1i",
|
|
1478
|
+
alignCenter: "Gi\u1EEFa",
|
|
1479
|
+
alignRight: "Ph\u1EA3i",
|
|
1480
|
+
alignJustify: "\u0110\u1EC1u",
|
|
1481
|
+
tableProperties: "Thu\u1ED9c t\xEDnh b\u1EA3ng",
|
|
1482
|
+
deleteTable: "Xo\xE1 b\u1EA3ng",
|
|
1483
|
+
row: "D\xF2ng",
|
|
1484
|
+
column: "C\u1ED9t",
|
|
1485
|
+
cell: "\xD4",
|
|
1486
|
+
addRowBefore: "Th\xEAm h\xE0ng ph\xEDa tr\xEAn",
|
|
1487
|
+
addRowAfter: "Th\xEAm h\xE0ng ph\xEDa d\u01B0\u1EDBi",
|
|
1488
|
+
deleteRow: "Xo\xE1 h\xE0ng",
|
|
1489
|
+
addColumnBefore: "Th\xEAm c\u1ED9t b\xEAn tr\xE1i",
|
|
1490
|
+
addColumnAfter: "Th\xEAm c\u1ED9t b\xEAn ph\u1EA3i",
|
|
1491
|
+
deleteColumn: "Xo\xE1 c\u1ED9t",
|
|
1492
|
+
mergeCells: "G\u1ED9p \xF4",
|
|
1493
|
+
splitCell: "T\xE1ch \xF4",
|
|
1494
|
+
imageUpload: "T\u1EA3i \u1EA3nh l\xEAn",
|
|
1495
|
+
applySource: "\xC1p d\u1EE5ng",
|
|
1496
|
+
closeDialog: "\u0110\xF3ng",
|
|
1497
|
+
copyHtml: "Sao ch\xE9p HTML",
|
|
1498
|
+
exportDefault: "Xu\u1EA5t HTML",
|
|
1499
|
+
previewEmpty: "Kh\xF4ng c\xF3 n\u1ED9i dung \u0111\u1EC3 xem tr\u01B0\u1EDBc.",
|
|
1500
|
+
sourceCodeHint: "Ch\u1EC9nh s\u1EEDa HTML tr\u1EF1c ti\u1EBFp v\xE0 nh\u1EA5n \xC1p d\u1EE5ng \u0111\u1EC3 c\u1EADp nh\u1EADt n\u1ED9i dung."
|
|
1347
1501
|
}
|
|
1348
1502
|
}
|
|
1349
1503
|
};
|
|
@@ -1642,6 +1796,83 @@ var ko_default = {
|
|
|
1642
1796
|
unnamed: "\uC774\uB984 \uC5C6\uB294 \uD30C\uC77C",
|
|
1643
1797
|
uploading: "(\uC5C5\uB85C\uB4DC \uC911...)",
|
|
1644
1798
|
uploadFailed: "\uC5C5\uB85C\uB4DC \uC2E4\uD328"
|
|
1799
|
+
},
|
|
1800
|
+
menubar: {
|
|
1801
|
+
file: "\uD30C\uC77C",
|
|
1802
|
+
edit: "\uD3B8\uC9D1",
|
|
1803
|
+
view: "\uBCF4\uAE30",
|
|
1804
|
+
insert: "\uC0BD\uC785",
|
|
1805
|
+
format: "\uC11C\uC2DD",
|
|
1806
|
+
tools: "\uB3C4\uAD6C",
|
|
1807
|
+
table: "\uD45C",
|
|
1808
|
+
save: "\uC800\uC7A5",
|
|
1809
|
+
exportHtml: "HTML \uB0B4\uBCF4\uB0B4\uAE30",
|
|
1810
|
+
undo: "\uC2E4\uD589 \uCDE8\uC18C",
|
|
1811
|
+
undoShortcut: "Ctrl+Z",
|
|
1812
|
+
redo: "\uB2E4\uC2DC \uC2E4\uD589",
|
|
1813
|
+
redoShortcut: "Ctrl+Y",
|
|
1814
|
+
cut: "\uC798\uB77C\uB0B4\uAE30",
|
|
1815
|
+
cutShortcut: "Ctrl+X",
|
|
1816
|
+
copy: "\uBCF5\uC0AC",
|
|
1817
|
+
copyShortcut: "Ctrl+C",
|
|
1818
|
+
paste: "\uBD99\uC5EC\uB123\uAE30",
|
|
1819
|
+
pasteShortcut: "Ctrl+V",
|
|
1820
|
+
pasteAsText: "\uC77C\uBC18 \uD14D\uC2A4\uD2B8\uB85C \uBD99\uC5EC\uB123\uAE30",
|
|
1821
|
+
selectAll: "\uC804\uCCB4 \uC120\uD0DD",
|
|
1822
|
+
selectAllShortcut: "Ctrl+A",
|
|
1823
|
+
sourceCode: "\uC18C\uC2A4 \uCF54\uB4DC",
|
|
1824
|
+
preview: "\uBBF8\uB9AC\uBCF4\uAE30",
|
|
1825
|
+
fullscreen: "\uC804\uCCB4 \uD654\uBA74",
|
|
1826
|
+
fullscreenShortcut: "Ctrl+Shift+F",
|
|
1827
|
+
image: "\uC774\uBBF8\uC9C0",
|
|
1828
|
+
link: "\uB9C1\uD06C",
|
|
1829
|
+
linkShortcut: "Ctrl+K",
|
|
1830
|
+
insertTable: "\uD45C",
|
|
1831
|
+
horizontalRule: "\uAC00\uB85C\uC904",
|
|
1832
|
+
bold: "\uAD75\uAC8C",
|
|
1833
|
+
boldShortcut: "Ctrl+B",
|
|
1834
|
+
italic: "\uAE30\uC6B8\uC784\uAF34",
|
|
1835
|
+
italicShortcut: "Ctrl+I",
|
|
1836
|
+
underline: "\uBC11\uC904",
|
|
1837
|
+
underlineShortcut: "Ctrl+U",
|
|
1838
|
+
strike: "\uCDE8\uC18C\uC120",
|
|
1839
|
+
superscript: "\uC704 \uCCA8\uC790",
|
|
1840
|
+
subscript: "\uC544\uB798 \uCCA8\uC790",
|
|
1841
|
+
code: "\uCF54\uB4DC",
|
|
1842
|
+
wrap: "\uBE14\uB85D",
|
|
1843
|
+
align: "\uC815\uB82C",
|
|
1844
|
+
clearFormatting: "\uC11C\uC2DD \uC9C0\uC6B0\uAE30",
|
|
1845
|
+
paragraph: "\uB2E8\uB77D",
|
|
1846
|
+
heading1: "\uC81C\uBAA9 1",
|
|
1847
|
+
heading2: "\uC81C\uBAA9 2",
|
|
1848
|
+
heading3: "\uC81C\uBAA9 3",
|
|
1849
|
+
blockquote: "\uC778\uC6A9",
|
|
1850
|
+
codeBlock: "\uCF54\uB4DC \uBE14\uB85D",
|
|
1851
|
+
taskList: "\uC791\uC5C5 \uBAA9\uB85D",
|
|
1852
|
+
alignLeft: "\uC67C\uCABD",
|
|
1853
|
+
alignCenter: "\uAC00\uC6B4\uB370",
|
|
1854
|
+
alignRight: "\uC624\uB978\uCABD",
|
|
1855
|
+
alignJustify: "\uC591\uCABD",
|
|
1856
|
+
tableProperties: "\uD45C \uC18D\uC131",
|
|
1857
|
+
deleteTable: "\uD45C \uC0AD\uC81C",
|
|
1858
|
+
row: "\uD589",
|
|
1859
|
+
column: "\uC5F4",
|
|
1860
|
+
cell: "\uC140",
|
|
1861
|
+
addRowBefore: "\uC704\uC5D0 \uD589 \uC0BD\uC785",
|
|
1862
|
+
addRowAfter: "\uC544\uB798\uC5D0 \uD589 \uC0BD\uC785",
|
|
1863
|
+
deleteRow: "\uD589 \uC0AD\uC81C",
|
|
1864
|
+
addColumnBefore: "\uC67C\uCABD\uC5D0 \uC5F4 \uC0BD\uC785",
|
|
1865
|
+
addColumnAfter: "\uC624\uB978\uCABD\uC5D0 \uC5F4 \uC0BD\uC785",
|
|
1866
|
+
deleteColumn: "\uC5F4 \uC0AD\uC81C",
|
|
1867
|
+
mergeCells: "\uC140 \uBCD1\uD569",
|
|
1868
|
+
splitCell: "\uC140 \uBD84\uD560",
|
|
1869
|
+
imageUpload: "\uC774\uBBF8\uC9C0 \uC5C5\uB85C\uB4DC",
|
|
1870
|
+
applySource: "\uC801\uC6A9",
|
|
1871
|
+
closeDialog: "\uB2EB\uAE30",
|
|
1872
|
+
copyHtml: "HTML \uBCF5\uC0AC",
|
|
1873
|
+
exportDefault: "HTML \uB0B4\uBCF4\uB0B4\uAE30",
|
|
1874
|
+
previewEmpty: "\uBBF8\uB9AC\uBCFC \uB0B4\uC6A9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
1875
|
+
sourceCodeHint: "HTML\uC744 \uC9C1\uC811 \uD3B8\uC9D1\uD558\uACE0 \uC801\uC6A9\uC744 \uD074\uB9AD\uD558\uC5EC \uC5D0\uB514\uD130\uB97C \uC5C5\uB370\uC774\uD2B8\uD558\uC138\uC694."
|
|
1645
1876
|
}
|
|
1646
1877
|
}
|
|
1647
1878
|
};
|
|
@@ -1940,6 +2171,83 @@ var ja_default = {
|
|
|
1940
2171
|
unnamed: "\u540D\u524D\u306A\u3057\u30D5\u30A1\u30A4\u30EB",
|
|
1941
2172
|
uploading: "(\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u4E2D...)",
|
|
1942
2173
|
uploadFailed: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5931\u6557"
|
|
2174
|
+
},
|
|
2175
|
+
menubar: {
|
|
2176
|
+
file: "\u30D5\u30A1\u30A4\u30EB",
|
|
2177
|
+
edit: "\u7DE8\u96C6",
|
|
2178
|
+
view: "\u8868\u793A",
|
|
2179
|
+
insert: "\u633F\u5165",
|
|
2180
|
+
format: "\u66F8\u5F0F",
|
|
2181
|
+
tools: "\u30C4\u30FC\u30EB",
|
|
2182
|
+
table: "\u8868",
|
|
2183
|
+
save: "\u4FDD\u5B58",
|
|
2184
|
+
exportHtml: "HTML\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8",
|
|
2185
|
+
undo: "\u5143\u306B\u623B\u3059",
|
|
2186
|
+
undoShortcut: "Ctrl+Z",
|
|
2187
|
+
redo: "\u3084\u308A\u76F4\u3057",
|
|
2188
|
+
redoShortcut: "Ctrl+Y",
|
|
2189
|
+
cut: "\u5207\u308A\u53D6\u308A",
|
|
2190
|
+
cutShortcut: "Ctrl+X",
|
|
2191
|
+
copy: "\u30B3\u30D4\u30FC",
|
|
2192
|
+
copyShortcut: "Ctrl+C",
|
|
2193
|
+
paste: "\u8CBC\u308A\u4ED8\u3051",
|
|
2194
|
+
pasteShortcut: "Ctrl+V",
|
|
2195
|
+
pasteAsText: "\u30C6\u30AD\u30B9\u30C8\u3068\u3057\u3066\u8CBC\u308A\u4ED8\u3051",
|
|
2196
|
+
selectAll: "\u3059\u3079\u3066\u9078\u629E",
|
|
2197
|
+
selectAllShortcut: "Ctrl+A",
|
|
2198
|
+
sourceCode: "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9",
|
|
2199
|
+
preview: "\u30D7\u30EC\u30D3\u30E5\u30FC",
|
|
2200
|
+
fullscreen: "\u30D5\u30EB\u30B9\u30AF\u30EA\u30FC\u30F3",
|
|
2201
|
+
fullscreenShortcut: "Ctrl+Shift+F",
|
|
2202
|
+
image: "\u753B\u50CF",
|
|
2203
|
+
link: "\u30EA\u30F3\u30AF",
|
|
2204
|
+
linkShortcut: "Ctrl+K",
|
|
2205
|
+
insertTable: "\u8868",
|
|
2206
|
+
horizontalRule: "\u6C34\u5E73\u7DDA",
|
|
2207
|
+
bold: "\u592A\u5B57",
|
|
2208
|
+
boldShortcut: "Ctrl+B",
|
|
2209
|
+
italic: "\u659C\u4F53",
|
|
2210
|
+
italicShortcut: "Ctrl+I",
|
|
2211
|
+
underline: "\u4E0B\u7DDA",
|
|
2212
|
+
underlineShortcut: "Ctrl+U",
|
|
2213
|
+
strike: "\u53D6\u308A\u6D88\u3057\u7DDA",
|
|
2214
|
+
superscript: "\u4E0A\u4ED8\u304D\u6587\u5B57",
|
|
2215
|
+
subscript: "\u4E0B\u4ED8\u304D\u6587\u5B57",
|
|
2216
|
+
code: "\u30B3\u30FC\u30C9",
|
|
2217
|
+
wrap: "\u30D6\u30ED\u30C3\u30AF",
|
|
2218
|
+
align: "\u914D\u7F6E",
|
|
2219
|
+
clearFormatting: "\u66F8\u5F0F\u3092\u30AF\u30EA\u30A2",
|
|
2220
|
+
paragraph: "\u6BB5\u843D",
|
|
2221
|
+
heading1: "\u898B\u51FA\u3057 1",
|
|
2222
|
+
heading2: "\u898B\u51FA\u3057 2",
|
|
2223
|
+
heading3: "\u898B\u51FA\u3057 3",
|
|
2224
|
+
blockquote: "\u5F15\u7528",
|
|
2225
|
+
codeBlock: "\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF",
|
|
2226
|
+
taskList: "\u30BF\u30B9\u30AF\u30EA\u30B9\u30C8",
|
|
2227
|
+
alignLeft: "\u5DE6\u63C3\u3048",
|
|
2228
|
+
alignCenter: "\u4E2D\u592E\u63C3\u3048",
|
|
2229
|
+
alignRight: "\u53F3\u63C3\u3048",
|
|
2230
|
+
alignJustify: "\u4E21\u7AEF\u63C3\u3048",
|
|
2231
|
+
tableProperties: "\u8868\u306E\u30D7\u30ED\u30D1\u30C6\u30A3",
|
|
2232
|
+
deleteTable: "\u8868\u3092\u524A\u9664",
|
|
2233
|
+
row: "\u884C",
|
|
2234
|
+
column: "\u5217",
|
|
2235
|
+
cell: "\u30BB\u30EB",
|
|
2236
|
+
addRowBefore: "\u4E0A\u306B\u884C\u3092\u633F\u5165",
|
|
2237
|
+
addRowAfter: "\u4E0B\u306B\u884C\u3092\u633F\u5165",
|
|
2238
|
+
deleteRow: "\u884C\u3092\u524A\u9664",
|
|
2239
|
+
addColumnBefore: "\u5DE6\u306B\u5217\u3092\u633F\u5165",
|
|
2240
|
+
addColumnAfter: "\u53F3\u306B\u5217\u3092\u633F\u5165",
|
|
2241
|
+
deleteColumn: "\u5217\u3092\u524A\u9664",
|
|
2242
|
+
mergeCells: "\u30BB\u30EB\u3092\u7D50\u5408",
|
|
2243
|
+
splitCell: "\u30BB\u30EB\u3092\u5206\u5272",
|
|
2244
|
+
imageUpload: "\u753B\u50CF\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",
|
|
2245
|
+
applySource: "\u9069\u7528",
|
|
2246
|
+
closeDialog: "\u9589\u3058\u308B",
|
|
2247
|
+
copyHtml: "HTML\u3092\u30B3\u30D4\u30FC",
|
|
2248
|
+
exportDefault: "HTML\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8",
|
|
2249
|
+
previewEmpty: "\u30D7\u30EC\u30D3\u30E5\u30FC\u3059\u308B\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u3042\u308A\u307E\u305B\u3093\u3002",
|
|
2250
|
+
sourceCodeHint: "HTML\u3092\u76F4\u63A5\u7DE8\u96C6\u3057\u3001\u9069\u7528\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30A8\u30C7\u30A3\u30BF\u30FC\u3092\u66F4\u65B0\u3057\u307E\u3059\u3002"
|
|
1943
2251
|
}
|
|
1944
2252
|
}
|
|
1945
2253
|
};
|
|
@@ -7351,6 +7659,7 @@ var VerticalTabs = ({ sidebarWidth = "w-48", className, ...props }) => {
|
|
|
7351
7659
|
|
|
7352
7660
|
// src/components/DropdownMenu.tsx
|
|
7353
7661
|
var import_react14 = __toESM(require("react"), 1);
|
|
7662
|
+
var import_lucide_react13 = require("lucide-react");
|
|
7354
7663
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
7355
7664
|
function useResettingIndex(resetToken) {
|
|
7356
7665
|
const [state, setState] = import_react14.default.useState({ resetToken, index: -1 });
|
|
@@ -7545,6 +7854,32 @@ var DropdownMenuItem = ({
|
|
|
7545
7854
|
}
|
|
7546
7855
|
);
|
|
7547
7856
|
var DropdownMenuSeparator = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("h-px bg-border my-1", className) });
|
|
7857
|
+
var DropdownMenuSub = ({ label, icon: Icon, disabled, children }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
7858
|
+
DropdownMenu,
|
|
7859
|
+
{
|
|
7860
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
7861
|
+
"button",
|
|
7862
|
+
{
|
|
7863
|
+
type: "button",
|
|
7864
|
+
disabled,
|
|
7865
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
7866
|
+
className: cn(
|
|
7867
|
+
"flex w-full items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors cursor-pointer",
|
|
7868
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
7869
|
+
"focus:bg-accent focus:text-accent-foreground focus:outline-none",
|
|
7870
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
7871
|
+
),
|
|
7872
|
+
children: [
|
|
7873
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { className: "w-4 h-4 shrink-0 opacity-60" }),
|
|
7874
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "flex-1 text-left", children: label }),
|
|
7875
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.ChevronRight, { className: "w-3 h-3 opacity-50" })
|
|
7876
|
+
]
|
|
7877
|
+
}
|
|
7878
|
+
),
|
|
7879
|
+
placement: "right",
|
|
7880
|
+
children
|
|
7881
|
+
}
|
|
7882
|
+
);
|
|
7548
7883
|
var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
7549
7884
|
DropdownMenu,
|
|
7550
7885
|
{
|
|
@@ -7573,13 +7908,13 @@ var DropdownMenu_default = DropdownMenu;
|
|
|
7573
7908
|
|
|
7574
7909
|
// src/components/Pagination.tsx
|
|
7575
7910
|
var React27 = __toESM(require("react"), 1);
|
|
7576
|
-
var
|
|
7911
|
+
var import_lucide_react15 = require("lucide-react");
|
|
7577
7912
|
|
|
7578
7913
|
// src/components/Combobox.tsx
|
|
7579
7914
|
var React26 = __toESM(require("react"), 1);
|
|
7580
7915
|
var import_react15 = require("react");
|
|
7581
7916
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
7582
|
-
var
|
|
7917
|
+
var import_lucide_react14 = require("lucide-react");
|
|
7583
7918
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
7584
7919
|
var getOptionLabel = (option) => {
|
|
7585
7920
|
return typeof option === "string" ? option : option.label;
|
|
@@ -7848,7 +8183,7 @@ var Combobox = ({
|
|
|
7848
8183
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "block truncate", children: itemLabel }),
|
|
7849
8184
|
itemDescription && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: cn("block text-muted-foreground truncate mt-0.5", size === "sm" ? "text-[10px]" : "text-xs"), children: itemDescription })
|
|
7850
8185
|
] }),
|
|
7851
|
-
isSelected && showSelectedIcon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "shrink-0 ml-auto", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
8186
|
+
isSelected && showSelectedIcon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "shrink-0 ml-auto", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.Check, { className: cn(checkIconSizeStyles[size], "text-primary") }) })
|
|
7852
8187
|
]
|
|
7853
8188
|
}
|
|
7854
8189
|
)
|
|
@@ -7865,7 +8200,7 @@ var Combobox = ({
|
|
|
7865
8200
|
children: [
|
|
7866
8201
|
enableSearch && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("relative border-b border-border/30", size === "sm" ? "p-2" : size === "lg" ? "p-3" : "p-2.5"), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative", children: [
|
|
7867
8202
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
7868
|
-
|
|
8203
|
+
import_lucide_react14.Search,
|
|
7869
8204
|
{
|
|
7870
8205
|
className: cn(
|
|
7871
8206
|
"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground/60 transition-colors peer-focus:text-primary",
|
|
@@ -7921,7 +8256,7 @@ var Combobox = ({
|
|
|
7921
8256
|
scrollVirtualListToStart();
|
|
7922
8257
|
},
|
|
7923
8258
|
className: "absolute right-3 top-1/2 -translate-y-1/2 p-0.5 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",
|
|
7924
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
8259
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.X, { className: cn(size === "sm" ? "h-3 w-3" : size === "lg" ? "h-4 w-4" : "h-3.5 w-3.5") })
|
|
7925
8260
|
}
|
|
7926
8261
|
)
|
|
7927
8262
|
] }) }),
|
|
@@ -7939,7 +8274,7 @@ var Combobox = ({
|
|
|
7939
8274
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-10 h-10 rounded-full border-2 border-primary/20 border-t-primary animate-spin" }) }),
|
|
7940
8275
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-sm text-muted-foreground", children: loadingText })
|
|
7941
8276
|
] }) }) : shouldPromptForSearch ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
7942
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-12 h-12 rounded-full bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
8277
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-12 h-12 rounded-full bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.Search, { className: "h-6 w-6 text-muted-foreground/60" }) }),
|
|
7943
8278
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "block text-sm font-medium text-foreground", children: [
|
|
7944
8279
|
"Type at least ",
|
|
7945
8280
|
minSearchLength,
|
|
@@ -7968,7 +8303,7 @@ var Combobox = ({
|
|
|
7968
8303
|
}
|
|
7969
8304
|
)
|
|
7970
8305
|
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
7971
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-12 h-12 rounded-full bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
8306
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-12 h-12 rounded-full bg-muted/50 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.SearchX, { className: "h-6 w-6 text-muted-foreground/60" }) }),
|
|
7972
8307
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1", children: [
|
|
7973
8308
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "block text-sm font-medium text-foreground", children: emptyText }),
|
|
7974
8309
|
query && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "block text-xs text-muted-foreground", children: "Try a different search term" })
|
|
@@ -8061,11 +8396,11 @@ var Combobox = ({
|
|
|
8061
8396
|
"opacity-0 group-hover:opacity-100 transition-all duration-200",
|
|
8062
8397
|
"p-1 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive"
|
|
8063
8398
|
),
|
|
8064
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
8399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.X, { className: "h-3.5 w-3.5" })
|
|
8065
8400
|
}
|
|
8066
8401
|
),
|
|
8067
8402
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
8068
|
-
|
|
8403
|
+
import_lucide_react14.ChevronDown,
|
|
8069
8404
|
{
|
|
8070
8405
|
className: cn(
|
|
8071
8406
|
"h-4 w-4 text-muted-foreground transition-all duration-300 ease-out",
|
|
@@ -8264,7 +8599,7 @@ var Pagination = ({
|
|
|
8264
8599
|
),
|
|
8265
8600
|
title: labels?.firstPage || t("firstPage"),
|
|
8266
8601
|
"aria-label": labels?.firstPage || t("firstPage"),
|
|
8267
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8602
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronsLeft, { className: "h-4 w-4" })
|
|
8268
8603
|
}
|
|
8269
8604
|
),
|
|
8270
8605
|
showPrevNext && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -8279,7 +8614,7 @@ var Pagination = ({
|
|
|
8279
8614
|
),
|
|
8280
8615
|
title: labels?.previousPage || t("previousPage"),
|
|
8281
8616
|
"aria-label": labels?.previousPage || t("previousPage"),
|
|
8282
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronLeft, { className: "h-4 w-4" })
|
|
8283
8618
|
}
|
|
8284
8619
|
),
|
|
8285
8620
|
showPageNumbers && createCompactPageArray().map(
|
|
@@ -8313,7 +8648,7 @@ var Pagination = ({
|
|
|
8313
8648
|
),
|
|
8314
8649
|
title: labels?.nextPage || t("nextPage"),
|
|
8315
8650
|
"aria-label": labels?.nextPage || t("nextPage"),
|
|
8316
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronRight, { className: "h-4 w-4" })
|
|
8317
8652
|
}
|
|
8318
8653
|
),
|
|
8319
8654
|
showFirstLast && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -8328,7 +8663,7 @@ var Pagination = ({
|
|
|
8328
8663
|
),
|
|
8329
8664
|
title: labels?.lastPage || t("lastPage"),
|
|
8330
8665
|
"aria-label": labels?.lastPage || t("lastPage"),
|
|
8331
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8666
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronsRight, { className: "h-4 w-4" })
|
|
8332
8667
|
}
|
|
8333
8668
|
)
|
|
8334
8669
|
] }),
|
|
@@ -8394,7 +8729,7 @@ var SimplePagination = ({
|
|
|
8394
8729
|
disabled || page === 1 ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
8395
8730
|
),
|
|
8396
8731
|
"aria-label": t("previousPage"),
|
|
8397
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronLeft, { className: "h-4 w-4" })
|
|
8398
8733
|
}
|
|
8399
8734
|
),
|
|
8400
8735
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "px-2 tabular-nums font-medium text-foreground", children: [
|
|
@@ -8413,7 +8748,7 @@ var SimplePagination = ({
|
|
|
8413
8748
|
disabled || page === totalPages ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
8414
8749
|
),
|
|
8415
8750
|
"aria-label": t("nextPage"),
|
|
8416
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8751
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronRight, { className: "h-4 w-4" })
|
|
8417
8752
|
}
|
|
8418
8753
|
)
|
|
8419
8754
|
] }),
|
|
@@ -8435,7 +8770,7 @@ var CompactPagination = ({ page, totalPages, onChange, className, disabled = fal
|
|
|
8435
8770
|
),
|
|
8436
8771
|
title: t("firstPage"),
|
|
8437
8772
|
"aria-label": t("firstPage"),
|
|
8438
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8773
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronsLeft, { className: "h-3.5 w-3.5" })
|
|
8439
8774
|
}
|
|
8440
8775
|
),
|
|
8441
8776
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -8449,7 +8784,7 @@ var CompactPagination = ({ page, totalPages, onChange, className, disabled = fal
|
|
|
8449
8784
|
),
|
|
8450
8785
|
title: t("previousPage"),
|
|
8451
8786
|
"aria-label": t("previousPage"),
|
|
8452
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronLeft, { className: "h-3.5 w-3.5" })
|
|
8453
8788
|
}
|
|
8454
8789
|
),
|
|
8455
8790
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "px-1.5 tabular-nums", children: [
|
|
@@ -8468,7 +8803,7 @@ var CompactPagination = ({ page, totalPages, onChange, className, disabled = fal
|
|
|
8468
8803
|
),
|
|
8469
8804
|
title: t("nextPage"),
|
|
8470
8805
|
"aria-label": t("nextPage"),
|
|
8471
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8806
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronRight, { className: "h-3.5 w-3.5" })
|
|
8472
8807
|
}
|
|
8473
8808
|
),
|
|
8474
8809
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -8482,7 +8817,7 @@ var CompactPagination = ({ page, totalPages, onChange, className, disabled = fal
|
|
|
8482
8817
|
),
|
|
8483
8818
|
title: t("lastPage"),
|
|
8484
8819
|
"aria-label": t("lastPage"),
|
|
8485
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
8820
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ChevronsRight, { className: "h-3.5 w-3.5" })
|
|
8486
8821
|
}
|
|
8487
8822
|
)
|
|
8488
8823
|
] });
|
|
@@ -8873,7 +9208,7 @@ function parseDateString(str, locale = "en") {
|
|
|
8873
9208
|
}
|
|
8874
9209
|
|
|
8875
9210
|
// src/components/DatePicker.tsx
|
|
8876
|
-
var
|
|
9211
|
+
var import_lucide_react16 = require("lucide-react");
|
|
8877
9212
|
var React30 = __toESM(require("react"), 1);
|
|
8878
9213
|
var import_react19 = require("react");
|
|
8879
9214
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
@@ -9243,7 +9578,7 @@ var DatePicker = ({
|
|
|
9243
9578
|
"hover:scale-110 active:scale-95 hover:shadow-md",
|
|
9244
9579
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50"
|
|
9245
9580
|
),
|
|
9246
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
9581
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ChevronLeft, { className: "h-4 w-4" })
|
|
9247
9582
|
}
|
|
9248
9583
|
),
|
|
9249
9584
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
@@ -9283,7 +9618,7 @@ var DatePicker = ({
|
|
|
9283
9618
|
"hover:scale-110 active:scale-95 hover:shadow-md",
|
|
9284
9619
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50"
|
|
9285
9620
|
),
|
|
9286
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
9621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ChevronRight, { className: "h-4 w-4" })
|
|
9287
9622
|
}
|
|
9288
9623
|
)
|
|
9289
9624
|
] }),
|
|
@@ -9327,7 +9662,7 @@ var DatePicker = ({
|
|
|
9327
9662
|
isDateDisabled(/* @__PURE__ */ new Date()) && "opacity-50 cursor-not-allowed hover:scale-100 active:scale-100"
|
|
9328
9663
|
),
|
|
9329
9664
|
children: [
|
|
9330
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
9665
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Sparkles, { className: sizeStyles8[size].actionIcon }),
|
|
9331
9666
|
todayLabel || t("today")
|
|
9332
9667
|
]
|
|
9333
9668
|
}
|
|
@@ -9350,7 +9685,7 @@ var DatePicker = ({
|
|
|
9350
9685
|
sizeStyles8[size].actionButton
|
|
9351
9686
|
),
|
|
9352
9687
|
children: [
|
|
9353
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
9688
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.X, { className: sizeStyles8[size].actionIcon }),
|
|
9354
9689
|
clearLabel || t("clear")
|
|
9355
9690
|
]
|
|
9356
9691
|
}
|
|
@@ -9451,7 +9786,7 @@ var DatePicker = ({
|
|
|
9451
9786
|
"flex items-center justify-center transition-colors duration-300",
|
|
9452
9787
|
isOpen ? "text-primary" : "text-muted-foreground group-hover:text-primary"
|
|
9453
9788
|
),
|
|
9454
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
9789
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Calendar, { className: cn(sizeStyles8[size].calendarIcon, "transition-transform duration-300", isOpen && "scale-110") })
|
|
9455
9790
|
}
|
|
9456
9791
|
),
|
|
9457
9792
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
@@ -9506,7 +9841,7 @@ var DatePicker = ({
|
|
|
9506
9841
|
"text-muted-foreground hover:text-destructive hover:bg-destructive/10",
|
|
9507
9842
|
"transition-all duration-200 cursor-pointer hover:scale-110"
|
|
9508
9843
|
),
|
|
9509
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
9844
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.X, { className: "h-3.5 w-3.5" })
|
|
9510
9845
|
}
|
|
9511
9846
|
),
|
|
9512
9847
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
@@ -10002,7 +10337,7 @@ var DateRangePicker = ({
|
|
|
10002
10337
|
"hover:scale-110 active:scale-95 hover:shadow-md",
|
|
10003
10338
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50"
|
|
10004
10339
|
),
|
|
10005
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
10340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ChevronLeft, { className: sizeStyles8[size].navIcon })
|
|
10006
10341
|
}
|
|
10007
10342
|
),
|
|
10008
10343
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
@@ -10045,7 +10380,7 @@ var DateRangePicker = ({
|
|
|
10045
10380
|
"hover:scale-110 active:scale-95 hover:shadow-md",
|
|
10046
10381
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50"
|
|
10047
10382
|
),
|
|
10048
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
10383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ChevronRight, { className: sizeStyles8[size].navIcon })
|
|
10049
10384
|
}
|
|
10050
10385
|
)
|
|
10051
10386
|
] }),
|
|
@@ -10083,7 +10418,7 @@ var DateRangePicker = ({
|
|
|
10083
10418
|
isTodayUnavailable && "opacity-50 cursor-not-allowed hover:scale-100 active:scale-100"
|
|
10084
10419
|
),
|
|
10085
10420
|
children: [
|
|
10086
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
10421
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Sparkles, { className: sizeStyles8[size].actionIcon }),
|
|
10087
10422
|
t("today")
|
|
10088
10423
|
]
|
|
10089
10424
|
}
|
|
@@ -10102,7 +10437,7 @@ var DateRangePicker = ({
|
|
|
10102
10437
|
sizeStyles8[size].actionButton
|
|
10103
10438
|
),
|
|
10104
10439
|
children: [
|
|
10105
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
10440
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.X, { className: sizeStyles8[size].actionIcon }),
|
|
10106
10441
|
t("clear")
|
|
10107
10442
|
]
|
|
10108
10443
|
}
|
|
@@ -10199,7 +10534,7 @@ var DateRangePicker = ({
|
|
|
10199
10534
|
"flex items-center justify-center transition-colors duration-300",
|
|
10200
10535
|
effectiveError ? "text-destructive" : isOpen ? "text-primary" : "text-muted-foreground group-hover:text-primary"
|
|
10201
10536
|
),
|
|
10202
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
10537
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Calendar, { className: cn("transition-transform duration-300", sizeStyles8[size].calendarIcon, isOpen && "scale-110") })
|
|
10203
10538
|
}
|
|
10204
10539
|
),
|
|
10205
10540
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
@@ -10252,15 +10587,15 @@ var CompactDatePicker = ({ value, onChange, className }) => {
|
|
|
10252
10587
|
|
|
10253
10588
|
// src/components/DateTimePicker.tsx
|
|
10254
10589
|
var React34 = __toESM(require("react"), 1);
|
|
10255
|
-
var
|
|
10590
|
+
var import_lucide_react20 = require("lucide-react");
|
|
10256
10591
|
|
|
10257
10592
|
// src/components/Calendar.tsx
|
|
10258
|
-
var
|
|
10593
|
+
var import_lucide_react18 = require("lucide-react");
|
|
10259
10594
|
var React32 = __toESM(require("react"), 1);
|
|
10260
10595
|
|
|
10261
10596
|
// src/components/MonthYearPicker.tsx
|
|
10262
10597
|
var React31 = __toESM(require("react"), 1);
|
|
10263
|
-
var
|
|
10598
|
+
var import_lucide_react17 = require("lucide-react");
|
|
10264
10599
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
10265
10600
|
var DEFAULT_MONTH_NAMES = [
|
|
10266
10601
|
"January",
|
|
@@ -10911,7 +11246,7 @@ function MonthYearPicker({
|
|
|
10911
11246
|
"flex shrink-0 items-center justify-center transition-colors duration-300",
|
|
10912
11247
|
effectiveError ? "text-destructive" : success ? "text-success" : open ? "text-primary" : "text-muted-foreground group-hover:text-primary"
|
|
10913
11248
|
),
|
|
10914
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.Calendar, { className: cn(sz.icon, "transition-transform duration-300", open && "rotate-12") })
|
|
10915
11250
|
}
|
|
10916
11251
|
),
|
|
10917
11252
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
@@ -10922,7 +11257,7 @@ function MonthYearPicker({
|
|
|
10922
11257
|
}
|
|
10923
11258
|
)
|
|
10924
11259
|
] }),
|
|
10925
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: cn("ml-2 shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", open && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11260
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: cn("ml-2 shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", open && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.ChevronDown, { className: sz.icon }) })
|
|
10926
11261
|
]
|
|
10927
11262
|
}
|
|
10928
11263
|
);
|
|
@@ -10997,7 +11332,7 @@ function MonthYearPicker({
|
|
|
10997
11332
|
panelSz.actionPadding
|
|
10998
11333
|
),
|
|
10999
11334
|
children: [
|
|
11000
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11335
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.Calendar, { className: "w-3.5 h-3.5" }),
|
|
11001
11336
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "font-medium", children: "This Month" })
|
|
11002
11337
|
]
|
|
11003
11338
|
}
|
|
@@ -11016,7 +11351,7 @@ function MonthYearPicker({
|
|
|
11016
11351
|
panelSz.actionPadding
|
|
11017
11352
|
),
|
|
11018
11353
|
children: [
|
|
11019
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11354
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.X, { className: "w-3.5 h-3.5" }),
|
|
11020
11355
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "font-medium", children: "Clear" })
|
|
11021
11356
|
]
|
|
11022
11357
|
}
|
|
@@ -11035,7 +11370,7 @@ function MonthYearPicker({
|
|
|
11035
11370
|
panelSz.actionPadding
|
|
11036
11371
|
),
|
|
11037
11372
|
children: [
|
|
11038
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11373
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.Check, { className: "w-3.5 h-3.5" }),
|
|
11039
11374
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "font-medium", children: "Done" })
|
|
11040
11375
|
]
|
|
11041
11376
|
}
|
|
@@ -11575,7 +11910,7 @@ function Calendar3({
|
|
|
11575
11910
|
prevDisabled && "opacity-40 cursor-not-allowed hover:bg-transparent hover:shadow-none active:scale-100"
|
|
11576
11911
|
),
|
|
11577
11912
|
"aria-label": labels?.prev || (display === "week" ? "Previous week" : "Previous month"),
|
|
11578
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11913
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react18.ChevronLeft, { className: "h-4 w-4" })
|
|
11579
11914
|
}
|
|
11580
11915
|
),
|
|
11581
11916
|
showMonthYearPicker && cellMode === "events" && display !== "week" ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
@@ -11611,7 +11946,7 @@ function Calendar3({
|
|
|
11611
11946
|
nextDisabled && "opacity-40 cursor-not-allowed hover:bg-transparent hover:shadow-none active:scale-100"
|
|
11612
11947
|
),
|
|
11613
11948
|
"aria-label": labels?.next || (display === "week" ? "Next week" : "Next month"),
|
|
11614
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11949
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react18.ChevronRight, { className: "h-4 w-4" })
|
|
11615
11950
|
}
|
|
11616
11951
|
)
|
|
11617
11952
|
] }),
|
|
@@ -11770,7 +12105,7 @@ function Calendar3({
|
|
|
11770
12105
|
|
|
11771
12106
|
// src/components/TimePicker.tsx
|
|
11772
12107
|
var React33 = __toESM(require("react"), 1);
|
|
11773
|
-
var
|
|
12108
|
+
var import_lucide_react19 = require("lucide-react");
|
|
11774
12109
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
11775
12110
|
var pad = (n) => n.toString().padStart(2, "0");
|
|
11776
12111
|
var clamp4 = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
@@ -12216,10 +12551,10 @@ function isCompleteTimeInput(input, fmt, includeSeconds) {
|
|
|
12216
12551
|
return includeSeconds ? /^\d{1,2}:\d{2}:\d{2}$/.test(trimmed) : /^\d{1,2}:\d{2}$/.test(trimmed);
|
|
12217
12552
|
}
|
|
12218
12553
|
var PRESETS = {
|
|
12219
|
-
morning: { h: 9, m: 0, s: 0, icon:
|
|
12220
|
-
afternoon: { h: 14, m: 0, s: 0, icon:
|
|
12221
|
-
evening: { h: 18, m: 0, s: 0, icon:
|
|
12222
|
-
night: { h: 21, m: 0, s: 0, icon:
|
|
12554
|
+
morning: { h: 9, m: 0, s: 0, icon: import_lucide_react19.Coffee, label: "Morning", color: "from-amber-400 to-orange-400" },
|
|
12555
|
+
afternoon: { h: 14, m: 0, s: 0, icon: import_lucide_react19.Sun, label: "Afternoon", color: "from-yellow-400 to-amber-400" },
|
|
12556
|
+
evening: { h: 18, m: 0, s: 0, icon: import_lucide_react19.Sunset, label: "Evening", color: "from-orange-400 to-rose-400" },
|
|
12557
|
+
night: { h: 21, m: 0, s: 0, icon: import_lucide_react19.Moon, label: "Night", color: "from-indigo-400 to-purple-400" }
|
|
12223
12558
|
};
|
|
12224
12559
|
function TimePicker({
|
|
12225
12560
|
value,
|
|
@@ -12616,7 +12951,7 @@ function TimePicker({
|
|
|
12616
12951
|
"flex shrink-0 items-center justify-center transition-colors duration-300",
|
|
12617
12952
|
effectiveError ? "text-destructive" : success ? "text-success" : open ? "text-primary" : "text-muted-foreground group-hover:text-primary"
|
|
12618
12953
|
),
|
|
12619
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12954
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react19.Clock, { className: cn(sz.icon, "transition-transform duration-300", open && "rotate-12") })
|
|
12620
12955
|
}
|
|
12621
12956
|
),
|
|
12622
12957
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
@@ -12698,7 +13033,7 @@ function TimePicker({
|
|
|
12698
13033
|
className: "pl-9"
|
|
12699
13034
|
}
|
|
12700
13035
|
),
|
|
12701
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
13036
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react19.Clock, { className: cn("absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", panelSz.icon) })
|
|
12702
13037
|
] }),
|
|
12703
13038
|
showPresets && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("grid grid-cols-2 gap-2", compactPanel && "gap-1.5"), children: Object.keys(PRESETS).map((preset) => {
|
|
12704
13039
|
const { icon: Icon, label: label2, color } = PRESETS[preset];
|
|
@@ -12907,7 +13242,7 @@ function TimePicker({
|
|
|
12907
13242
|
},
|
|
12908
13243
|
"aria-label": gi18n.setCurrentTime ?? "Set current time",
|
|
12909
13244
|
children: [
|
|
12910
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
13245
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react19.Clock, { className: panelSz.icon }),
|
|
12911
13246
|
"Now"
|
|
12912
13247
|
]
|
|
12913
13248
|
}
|
|
@@ -12932,7 +13267,7 @@ function TimePicker({
|
|
|
12932
13267
|
},
|
|
12933
13268
|
"aria-label": gi18n.clearTime ?? "Clear selected time",
|
|
12934
13269
|
children: [
|
|
12935
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
13270
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react19.X, { className: panelSz.icon }),
|
|
12936
13271
|
"Clear"
|
|
12937
13272
|
]
|
|
12938
13273
|
}
|
|
@@ -13044,11 +13379,11 @@ function TimePicker({
|
|
|
13044
13379
|
),
|
|
13045
13380
|
(effectiveError || success || helperText) && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("mt-2 flex items-start gap-2", sz.label), children: [
|
|
13046
13381
|
effectiveError && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2 text-destructive bg-destructive/10 px-3 py-1.5 rounded-lg", children: [
|
|
13047
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
13382
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react19.X, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
13048
13383
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "font-medium", children: effectiveError })
|
|
13049
13384
|
] }),
|
|
13050
13385
|
success && !effectiveError && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2 text-success bg-success/10 px-3 py-1.5 rounded-lg", children: [
|
|
13051
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
13386
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react19.Check, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
13052
13387
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "font-medium", children: "Valid time selected" })
|
|
13053
13388
|
] }),
|
|
13054
13389
|
helperText && !effectiveError && !success && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-muted-foreground/80 italic", children: helperText })
|
|
@@ -13274,10 +13609,10 @@ var DateTimePicker = ({
|
|
|
13274
13609
|
setLocalRequiredError(void 0);
|
|
13275
13610
|
},
|
|
13276
13611
|
className: "hover:text-foreground p-0.5 rounded-md hover:bg-accent",
|
|
13277
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13612
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react20.X, { className: sizeStyles8[size].icon })
|
|
13278
13613
|
}
|
|
13279
13614
|
),
|
|
13280
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
13615
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react20.Calendar, { className: sizeStyles8[size].icon })
|
|
13281
13616
|
] })
|
|
13282
13617
|
]
|
|
13283
13618
|
}
|
|
@@ -13338,7 +13673,7 @@ var DateTimePicker = ({
|
|
|
13338
13673
|
|
|
13339
13674
|
// src/components/CalendarTimeline/CalendarTimeline.tsx
|
|
13340
13675
|
var React40 = __toESM(require("react"), 1);
|
|
13341
|
-
var
|
|
13676
|
+
var import_lucide_react24 = require("lucide-react");
|
|
13342
13677
|
|
|
13343
13678
|
// src/components/CalendarTimeline/date.ts
|
|
13344
13679
|
function toDate2(input) {
|
|
@@ -13927,13 +14262,13 @@ function resourcesById(resources) {
|
|
|
13927
14262
|
|
|
13928
14263
|
// src/components/CalendarTimeline/CalendarTimelineHeader.tsx
|
|
13929
14264
|
var React36 = __toESM(require("react"), 1);
|
|
13930
|
-
var
|
|
14265
|
+
var import_lucide_react21 = require("lucide-react");
|
|
13931
14266
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
13932
14267
|
var VIEW_ICONS = {
|
|
13933
|
-
month: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13934
|
-
week: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13935
|
-
day: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
13936
|
-
sprint: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
14268
|
+
month: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.CalendarRange, { className: "h-4 w-4" }),
|
|
14269
|
+
week: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.CalendarDays, { className: "h-4 w-4" }),
|
|
14270
|
+
day: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.Calendar, { className: "h-4 w-4" }),
|
|
14271
|
+
sprint: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.CalendarDays, { className: "h-4 w-4" })
|
|
13937
14272
|
};
|
|
13938
14273
|
function CalendarTimelineHeader(props) {
|
|
13939
14274
|
const {
|
|
@@ -14034,7 +14369,7 @@ function CalendarTimelineHeader(props) {
|
|
|
14034
14369
|
onClick: () => navigate(-1),
|
|
14035
14370
|
"aria-label": labels.prev,
|
|
14036
14371
|
className: cn(sizeConfig.controlButtonIconClass, "rounded-full hover:bg-card/80 transition-all duration-200"),
|
|
14037
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
14372
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.ChevronLeft, { className: "h-4 w-4" })
|
|
14038
14373
|
}
|
|
14039
14374
|
),
|
|
14040
14375
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
@@ -14129,7 +14464,7 @@ function CalendarTimelineHeader(props) {
|
|
|
14129
14464
|
onClick: () => navigate(1),
|
|
14130
14465
|
"aria-label": labels.next,
|
|
14131
14466
|
className: cn(sizeConfig.controlButtonIconClass, "rounded-full hover:bg-card/80 transition-all duration-200"),
|
|
14132
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
14467
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.ChevronRight, { className: "h-4 w-4" })
|
|
14133
14468
|
}
|
|
14134
14469
|
)
|
|
14135
14470
|
] }),
|
|
@@ -14141,7 +14476,7 @@ function CalendarTimelineHeader(props) {
|
|
|
14141
14476
|
{
|
|
14142
14477
|
variant: "default",
|
|
14143
14478
|
size: "sm",
|
|
14144
|
-
icon:
|
|
14479
|
+
icon: import_lucide_react21.Plus,
|
|
14145
14480
|
disabled: newEventDisabled,
|
|
14146
14481
|
onClick: onNewEventClick,
|
|
14147
14482
|
className: cn(sizeConfig.controlButtonTextClass, "rounded-full font-medium transition-all duration-200 gap-1.5"),
|
|
@@ -14192,7 +14527,7 @@ function CalendarTimelineHeader(props) {
|
|
|
14192
14527
|
onPointerDown: beginResizeColumn,
|
|
14193
14528
|
children: [
|
|
14194
14529
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-y-2 left-1/2 w-px -translate-x-1/2 bg-border/70" }),
|
|
14195
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 opacity-70", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
14530
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 opacity-70", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react21.GripVertical, { className: "h-4 w-4 text-muted-foreground" }) })
|
|
14196
14531
|
]
|
|
14197
14532
|
}
|
|
14198
14533
|
) : null
|
|
@@ -14205,7 +14540,7 @@ function CalendarTimelineHeader(props) {
|
|
|
14205
14540
|
}
|
|
14206
14541
|
|
|
14207
14542
|
// src/components/CalendarTimeline/CalendarTimelineRowCells.tsx
|
|
14208
|
-
var
|
|
14543
|
+
var import_lucide_react22 = require("lucide-react");
|
|
14209
14544
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
14210
14545
|
function DefaultGroupRow(props) {
|
|
14211
14546
|
const { group, collapsed, toggle, canToggle, ariaLabel, itemCount, sizeConfig } = props;
|
|
@@ -14230,7 +14565,7 @@ function DefaultGroupRow(props) {
|
|
|
14230
14565
|
"inline-flex items-center justify-center w-5 h-5 rounded-md bg-card/60 transition-transform duration-200",
|
|
14231
14566
|
collapsed ? "" : "rotate-180"
|
|
14232
14567
|
),
|
|
14233
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14568
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react22.ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
14234
14569
|
}
|
|
14235
14570
|
),
|
|
14236
14571
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "font-semibold text-foreground/90", children: group.label }),
|
|
@@ -14254,7 +14589,7 @@ function ResourceRowCell(props) {
|
|
|
14254
14589
|
"hover:from-muted/30 hover:to-muted/10 transition-all duration-200 group/uv-ct-row-header"
|
|
14255
14590
|
),
|
|
14256
14591
|
children: [
|
|
14257
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "shrink-0 opacity-0 group-hover/uv-ct-row-header:opacity-60 transition-opacity cursor-grab", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14592
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "shrink-0 opacity-0 group-hover/uv-ct-row-header:opacity-60 transition-opacity cursor-grab", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react22.GripVertical, { className: "h-4 w-4 text-muted-foreground" }) }),
|
|
14258
14593
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: cn("flex-1 min-w-0", resource.disabled && "opacity-50"), children: renderResource ? renderResource(resource) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "font-medium text-sm truncate block", children: resource.label }) }),
|
|
14259
14594
|
canResizeRow ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
14260
14595
|
"div",
|
|
@@ -14272,7 +14607,7 @@ function ResourceRowCell(props) {
|
|
|
14272
14607
|
onPointerDown: beginResizeResourceRow(resource.id),
|
|
14273
14608
|
children: [
|
|
14274
14609
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "absolute inset-x-3 top-1/2 h-px -translate-y-1/2 bg-border/70" }),
|
|
14275
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "absolute top-1/2 right-3 -translate-y-1/2 opacity-70", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
14610
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "absolute top-1/2 right-3 -translate-y-1/2 opacity-70", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react22.GripVertical, { className: "h-4 w-4 text-muted-foreground rotate-90" }) })
|
|
14276
14611
|
]
|
|
14277
14612
|
}
|
|
14278
14613
|
) : null
|
|
@@ -14333,7 +14668,7 @@ var CalendarTimelineGridOverlay = React37.memo(function CalendarTimelineGridOver
|
|
|
14333
14668
|
|
|
14334
14669
|
// src/components/CalendarTimeline/CalendarTimelineSlotHeaderCell.tsx
|
|
14335
14670
|
var React38 = __toESM(require("react"), 1);
|
|
14336
|
-
var
|
|
14671
|
+
var import_lucide_react23 = require("lucide-react");
|
|
14337
14672
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
14338
14673
|
var CalendarTimelineSlotHeaderCell = React38.memo(function CalendarTimelineSlotHeaderCell2(props) {
|
|
14339
14674
|
const { width, activeView, isToday: isToday2, label, ariaLabel, borderClassName, dayHeaderMarks, idx, className } = props;
|
|
@@ -14344,7 +14679,7 @@ var CalendarTimelineSlotHeaderCell = React38.memo(function CalendarTimelineSlotH
|
|
|
14344
14679
|
}
|
|
14345
14680
|
const normalizedLabel = typeof label === "string" || typeof label === "number" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "truncate whitespace-nowrap", children: label }) : label;
|
|
14346
14681
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn("flex flex-col items-center min-w-0 overflow-hidden", activeView !== "day" && isToday2 && "relative"), children: [
|
|
14347
|
-
activeView !== "day" && isToday2 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
14682
|
+
activeView !== "day" && isToday2 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react23.Dot, { className: "absolute -top-2.5 h-4 w-4 text-primary animate-pulse" }) : null,
|
|
14348
14683
|
normalizedLabel
|
|
14349
14684
|
] });
|
|
14350
14685
|
}, [activeView, dayHeaderMarks, idx, isToday2, label]);
|
|
@@ -16141,7 +16476,7 @@ function CalendarTimeline({
|
|
|
16141
16476
|
top: clamp5(Math.round(hoverCell.y - 10), 6, Math.max(6, h - 26))
|
|
16142
16477
|
},
|
|
16143
16478
|
"aria-hidden": true,
|
|
16144
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
16479
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react24.Plus, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
16145
16480
|
}
|
|
16146
16481
|
) : null,
|
|
16147
16482
|
canMore ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
@@ -16259,7 +16594,7 @@ function CalendarTimeline({
|
|
|
16259
16594
|
var React41 = __toESM(require("react"), 1);
|
|
16260
16595
|
var import_react20 = require("react");
|
|
16261
16596
|
var import_react_virtual2 = require("@tanstack/react-virtual");
|
|
16262
|
-
var
|
|
16597
|
+
var import_lucide_react25 = require("lucide-react");
|
|
16263
16598
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
16264
16599
|
var comboboxScrollClassName2 = [
|
|
16265
16600
|
"scrollbar-thin",
|
|
@@ -16563,7 +16898,7 @@ var MultiCombobox = ({
|
|
|
16563
16898
|
"shrink-0 w-5 h-5 flex items-center justify-center rounded-md border-2 transition-all duration-200",
|
|
16564
16899
|
isSelected ? "bg-primary border-primary text-primary-foreground" : "border-muted-foreground/30 bg-transparent"
|
|
16565
16900
|
),
|
|
16566
|
-
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
16901
|
+
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.Check, { className: "w-3 h-3" })
|
|
16567
16902
|
}
|
|
16568
16903
|
),
|
|
16569
16904
|
optionIcon && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "shrink-0 w-5 h-5 flex items-center justify-center text-muted-foreground", children: optionIcon }),
|
|
@@ -16592,14 +16927,14 @@ var MultiCombobox = ({
|
|
|
16592
16927
|
},
|
|
16593
16928
|
className: "text-xs text-muted-foreground hover:text-destructive transition-colors cursor-pointer flex items-center gap-1",
|
|
16594
16929
|
children: [
|
|
16595
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
16930
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.X, { className: "w-3 h-3" }),
|
|
16596
16931
|
gi18n.clearAll ?? "Clear all"
|
|
16597
16932
|
]
|
|
16598
16933
|
}
|
|
16599
16934
|
)
|
|
16600
16935
|
] }),
|
|
16601
16936
|
enableSearch && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "relative border-b border-border/40", children: [
|
|
16602
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
16937
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.Search, { className: cn("absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", sizeStyles8[size].icon) }),
|
|
16603
16938
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
16604
16939
|
"input",
|
|
16605
16940
|
{
|
|
@@ -16624,7 +16959,7 @@ var MultiCombobox = ({
|
|
|
16624
16959
|
scrollVirtualListToStart();
|
|
16625
16960
|
},
|
|
16626
16961
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",
|
|
16627
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
16962
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.X, { className: "w-4 h-4" })
|
|
16628
16963
|
}
|
|
16629
16964
|
)
|
|
16630
16965
|
] }),
|
|
@@ -16644,12 +16979,12 @@ var MultiCombobox = ({
|
|
|
16644
16979
|
),
|
|
16645
16980
|
children: loading2 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("li", { className: "px-3 py-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
16646
16981
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "relative", children: [
|
|
16647
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
16648
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
16982
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.Loader2, { className: "h-8 w-8 animate-spin text-primary" }),
|
|
16983
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.Sparkles, { className: "h-4 w-4 text-primary/60 absolute -top-1 -right-1 animate-pulse" })
|
|
16649
16984
|
] }),
|
|
16650
16985
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-muted-foreground font-medium", children: loadingText })
|
|
16651
16986
|
] }) }) : shouldPromptForSearch ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("li", { className: "px-3 py-8 text-center text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
16652
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
16987
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.Search, { className: "h-10 w-10 opacity-30 text-muted-foreground" }),
|
|
16653
16988
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "font-medium block text-foreground", children: [
|
|
16654
16989
|
"Type at least ",
|
|
16655
16990
|
minSearchLength,
|
|
@@ -16665,7 +17000,7 @@ var MultiCombobox = ({
|
|
|
16665
17000
|
// Render flat options
|
|
16666
17001
|
canVirtualize ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("li", { role: "presentation", className: "list-none p-0", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("ul", { className: "relative", style: { height: `${optionVirtualizer.getTotalSize()}px` }, children: virtualItems.map((virtualItem) => renderOptionItem(renderLimitedOptions[virtualItem.index], virtualItem.index, virtualItem)) }) }) : renderLimitedOptions.map((item, index) => renderOptionItem(item, index))
|
|
16667
17002
|
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("li", { className: cn("px-3 py-8 text-center text-muted-foreground"), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
16668
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
17003
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.SearchX, { className: "h-10 w-10 opacity-30 text-muted-foreground" }),
|
|
16669
17004
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-1", children: [
|
|
16670
17005
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "font-medium block", children: emptyText }),
|
|
16671
17006
|
query && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs opacity-60", children: "Try a different search term" })
|
|
@@ -16680,7 +17015,7 @@ var MultiCombobox = ({
|
|
|
16680
17015
|
},
|
|
16681
17016
|
className: "text-xs text-primary hover:underline flex items-center gap-1",
|
|
16682
17017
|
children: [
|
|
16683
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
17018
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.X, { className: "w-3 h-3" }),
|
|
16684
17019
|
"Clear search"
|
|
16685
17020
|
]
|
|
16686
17021
|
}
|
|
@@ -16755,7 +17090,7 @@ var MultiCombobox = ({
|
|
|
16755
17090
|
}
|
|
16756
17091
|
},
|
|
16757
17092
|
className: "hover:text-destructive transition-colors cursor-pointer select-none hover:bg-destructive/10 rounded-full p-0.5",
|
|
16758
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
17093
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.X, { className: "w-3 h-3" })
|
|
16759
17094
|
}
|
|
16760
17095
|
)
|
|
16761
17096
|
]
|
|
@@ -16779,11 +17114,11 @@ var MultiCombobox = ({
|
|
|
16779
17114
|
},
|
|
16780
17115
|
onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && handleClearAll(),
|
|
16781
17116
|
className: "opacity-0 group-hover:opacity-100 transition-all duration-200 p-1 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
|
|
16782
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
17117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react25.X, { className: "h-3.5 w-3.5" })
|
|
16783
17118
|
}
|
|
16784
17119
|
),
|
|
16785
17120
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
16786
|
-
|
|
17121
|
+
import_lucide_react25.ChevronDown,
|
|
16787
17122
|
{
|
|
16788
17123
|
className: cn(
|
|
16789
17124
|
"h-4 w-4 text-muted-foreground transition-all duration-300 ease-out",
|
|
@@ -17574,7 +17909,7 @@ var Slider = React43.forwardRef(
|
|
|
17574
17909
|
Slider.displayName = "Slider";
|
|
17575
17910
|
|
|
17576
17911
|
// src/components/OverlayControls.tsx
|
|
17577
|
-
var
|
|
17912
|
+
var import_lucide_react26 = require("lucide-react");
|
|
17578
17913
|
var import_react21 = __toESM(require("react"), 1);
|
|
17579
17914
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
17580
17915
|
function resolveKeyboardEventElement(target) {
|
|
@@ -17830,10 +18165,10 @@ function OverlayControls({
|
|
|
17830
18165
|
keyboardFeedback.type === "seek" && (keyboardFeedback.value ?? 0) > 0 ? "justify-end pr-32" : keyboardFeedback.type === "seek" && (keyboardFeedback.value ?? 0) < 0 ? "justify-start pl-32" : "justify-center"
|
|
17831
18166
|
),
|
|
17832
18167
|
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "bg-black/50 backdrop-blur-sm rounded-2xl px-6 py-4 shadow-xl border border-white/10 animate-in fade-in zoom-in duration-200", children: [
|
|
17833
|
-
keyboardFeedback.type === "play" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
17834
|
-
keyboardFeedback.type === "pause" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18168
|
+
keyboardFeedback.type === "play" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.Play, { className: "w-16 h-16 text-white", fill: "white" }),
|
|
18169
|
+
keyboardFeedback.type === "pause" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.Pause, { className: "w-16 h-16 text-white", fill: "white" }),
|
|
17835
18170
|
keyboardFeedback.type === "seek" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
17836
|
-
(keyboardFeedback.value ?? 0) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18171
|
+
(keyboardFeedback.value ?? 0) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.RotateCw, { className: "w-12 h-12 text-white" }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.RotateCcw, { className: "w-12 h-12 text-white" }),
|
|
17837
18172
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "text-3xl font-bold text-white", children: [
|
|
17838
18173
|
keyboardFeedback.value && keyboardFeedback.value > 0 ? "+" : "",
|
|
17839
18174
|
keyboardFeedback.value,
|
|
@@ -17841,7 +18176,7 @@ function OverlayControls({
|
|
|
17841
18176
|
] })
|
|
17842
18177
|
] }),
|
|
17843
18178
|
keyboardFeedback.type === "volume" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
17844
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18179
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.Volume2, { className: "w-12 h-12 text-white" }),
|
|
17845
18180
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
17846
18181
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "text-2xl font-bold text-white", children: [
|
|
17847
18182
|
keyboardFeedback.value,
|
|
@@ -17850,8 +18185,8 @@ function OverlayControls({
|
|
|
17850
18185
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-32 h-1.5 bg-white/30 rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-full bg-white rounded-full transition-all", style: { width: `${keyboardFeedback.value}%` } }) })
|
|
17851
18186
|
] })
|
|
17852
18187
|
] }),
|
|
17853
|
-
keyboardFeedback.type === "mute" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
17854
|
-
keyboardFeedback.type === "unmute" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18188
|
+
keyboardFeedback.type === "mute" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.VolumeX, { className: "w-16 h-16 text-white" }),
|
|
18189
|
+
keyboardFeedback.type === "unmute" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.Volume2, { className: "w-16 h-16 text-white" })
|
|
17855
18190
|
] })
|
|
17856
18191
|
}
|
|
17857
18192
|
),
|
|
@@ -17906,7 +18241,7 @@ function OverlayControls({
|
|
|
17906
18241
|
onClick: onTogglePlay,
|
|
17907
18242
|
title: playing ? "T\u1EA1m d\u1EEBng" : "Ph\xE1t",
|
|
17908
18243
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
17909
|
-
children: playing ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18244
|
+
children: playing ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.Pause, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.Play, { className: "w-4 h-4" })
|
|
17910
18245
|
}
|
|
17911
18246
|
),
|
|
17912
18247
|
onSkip && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
@@ -17917,7 +18252,7 @@ function OverlayControls({
|
|
|
17917
18252
|
onClick: () => onSkip(-skipSeconds),
|
|
17918
18253
|
title: `L\xF9i ${skipSeconds}s`,
|
|
17919
18254
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
17920
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.RotateCcw, { className: "w-4 h-4" })
|
|
17921
18256
|
}
|
|
17922
18257
|
),
|
|
17923
18258
|
onSkip && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
@@ -17928,7 +18263,7 @@ function OverlayControls({
|
|
|
17928
18263
|
onClick: () => onSkip(skipSeconds),
|
|
17929
18264
|
title: `Tua ${skipSeconds}s`,
|
|
17930
18265
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
17931
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.RotateCw, { className: "w-4 h-4" })
|
|
17932
18267
|
}
|
|
17933
18268
|
),
|
|
17934
18269
|
(showTime ?? true) && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "px-3 py-1 rounded-full text-xs font-mono bg-background/60 text-foreground shadow-sm border border-border/50 whitespace-nowrap", children: [
|
|
@@ -17945,7 +18280,7 @@ function OverlayControls({
|
|
|
17945
18280
|
onClick: onToggleMute,
|
|
17946
18281
|
title: muted ? "B\u1EADt ti\u1EBFng" : "T\u1EAFt ti\u1EBFng",
|
|
17947
18282
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
17948
|
-
children: muted || (volume ?? 1) === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18283
|
+
children: muted || (volume ?? 1) === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.VolumeX, { className: "w-4 h-4" }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.Volume2, { className: "w-4 h-4" })
|
|
17949
18284
|
}
|
|
17950
18285
|
),
|
|
17951
18286
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-24", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
@@ -17973,7 +18308,7 @@ function OverlayControls({
|
|
|
17973
18308
|
title: "Tr\u1EF1c ti\u1EBFp (v\u1EC1 Live)",
|
|
17974
18309
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
17975
18310
|
children: [
|
|
17976
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18311
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.Dot, { className: "w-10 h-10 text-destructive" }),
|
|
17977
18312
|
"Tr\u1EF1c ti\u1EBFp"
|
|
17978
18313
|
]
|
|
17979
18314
|
}
|
|
@@ -18017,7 +18352,7 @@ function OverlayControls({
|
|
|
18017
18352
|
onClick: onToggleFullscreen,
|
|
18018
18353
|
title: "To\xE0n m\xE0n h\xECnh",
|
|
18019
18354
|
className: "px-3 bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
18020
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
18355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react26.Maximize2, { className: "w-4 h-4" })
|
|
18021
18356
|
}
|
|
18022
18357
|
)
|
|
18023
18358
|
] })
|
|
@@ -18031,7 +18366,7 @@ function OverlayControls({
|
|
|
18031
18366
|
// src/components/CategoryTreeSelect.tsx
|
|
18032
18367
|
var import_react22 = require("react");
|
|
18033
18368
|
var import_react_virtual3 = require("@tanstack/react-virtual");
|
|
18034
|
-
var
|
|
18369
|
+
var import_lucide_react27 = require("lucide-react");
|
|
18035
18370
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
18036
18371
|
var defaultLabels = {
|
|
18037
18372
|
emptyText: "No categories",
|
|
@@ -18504,13 +18839,13 @@ function CategoryTreeSelect(props) {
|
|
|
18504
18839
|
shouldAutoExpandSearchResults && "opacity-60 cursor-not-allowed hover:scale-100 active:scale-100"
|
|
18505
18840
|
),
|
|
18506
18841
|
disabled: shouldAutoExpandSearchResults,
|
|
18507
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("transition-transform duration-200", isExpanded && "rotate-90"), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18842
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("transition-transform duration-200", isExpanded && "rotate-90"), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.ChevronRight, { className: "w-4 h-4" }) })
|
|
18508
18843
|
}
|
|
18509
18844
|
) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: TREE_EXPANDER_PLACEHOLDER_CLASS }),
|
|
18510
18845
|
viewOnly ? (
|
|
18511
18846
|
// View-only mode: just display the name with folder icon
|
|
18512
18847
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("flex min-w-0 items-center", TREE_NODE_GAP_CLASS), children: [
|
|
18513
|
-
category.icon ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "h-4 w-4 shrink-0 flex items-center justify-center text-muted-foreground/60", children: category.icon }) : hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18848
|
+
category.icon ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "h-4 w-4 shrink-0 flex items-center justify-center text-muted-foreground/60", children: category.icon }) : hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.FolderTree, { className: "h-4 w-4 shrink-0 text-muted-foreground/60" }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-muted-foreground/40" }),
|
|
18514
18849
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "min-w-0 text-sm font-medium leading-snug wrap-anywhere", children: category.name })
|
|
18515
18850
|
] })
|
|
18516
18851
|
) : (
|
|
@@ -18555,7 +18890,7 @@ function CategoryTreeSelect(props) {
|
|
|
18555
18890
|
const renderSearch = ({ sticky = true, className: className2 } = {}) => {
|
|
18556
18891
|
if (!isSearchEnabled) return null;
|
|
18557
18892
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn(sticky && "sticky top-0 z-10 pb-2", className2), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "relative", children: [
|
|
18558
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18893
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.Search, { className: "absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground/60 transition-colors peer-focus:text-primary" }),
|
|
18559
18894
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18560
18895
|
"input",
|
|
18561
18896
|
{
|
|
@@ -18592,26 +18927,26 @@ function CategoryTreeSelect(props) {
|
|
|
18592
18927
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50"
|
|
18593
18928
|
),
|
|
18594
18929
|
"aria-label": gi18n.clearSearch ?? "Clear search",
|
|
18595
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18930
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.X, { className: "h-4 w-4" })
|
|
18596
18931
|
}
|
|
18597
18932
|
)
|
|
18598
18933
|
] }) });
|
|
18599
18934
|
};
|
|
18600
18935
|
const renderTreeContent = () => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "space-y-0.5 overflow-x-hidden", children: shouldPromptForSearch ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
|
|
18601
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-12 h-12 rounded-2xl bg-muted/50 flex items-center justify-center mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18936
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-12 h-12 rounded-2xl bg-muted/50 flex items-center justify-center mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.Search, { className: "w-6 h-6 text-muted-foreground/50" }) }),
|
|
18602
18937
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
|
|
18603
18938
|
"Type at least ",
|
|
18604
18939
|
minSearchLength,
|
|
18605
18940
|
" characters to search"
|
|
18606
18941
|
] })
|
|
18607
18942
|
] }) : effectiveParentCategories.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
|
|
18608
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-12 h-12 rounded-2xl bg-muted/50 flex items-center justify-center mb-3", children: isSearchMode ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18943
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-12 h-12 rounded-2xl bg-muted/50 flex items-center justify-center mb-3", children: isSearchMode ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.SearchX, { className: "w-6 h-6 text-muted-foreground/50" }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.Layers, { className: "w-6 h-6 text-muted-foreground/50" }) }),
|
|
18609
18944
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-sm text-muted-foreground", children: isSearchMode ? mergedLabels.noResultsText : mergedLabels.emptyText })
|
|
18610
18945
|
] }) : effectiveParentCategories.map((cat) => renderCategoryRow(cat)) });
|
|
18611
18946
|
const renderVirtualTreeContent = () => {
|
|
18612
18947
|
if (shouldPromptForSearch) {
|
|
18613
18948
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
|
|
18614
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-12 h-12 rounded-2xl bg-muted/50 flex items-center justify-center mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18949
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-12 h-12 rounded-2xl bg-muted/50 flex items-center justify-center mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.Search, { className: "w-6 h-6 text-muted-foreground/50" }) }),
|
|
18615
18950
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "text-sm text-muted-foreground", children: [
|
|
18616
18951
|
"Type at least ",
|
|
18617
18952
|
minSearchLength,
|
|
@@ -18621,7 +18956,7 @@ function CategoryTreeSelect(props) {
|
|
|
18621
18956
|
}
|
|
18622
18957
|
if (flattenedRows.length === 0) {
|
|
18623
18958
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
|
|
18624
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-12 h-12 rounded-2xl bg-muted/50 flex items-center justify-center mb-3", children: isSearchMode ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
18959
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-12 h-12 rounded-2xl bg-muted/50 flex items-center justify-center mb-3", children: isSearchMode ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.SearchX, { className: "w-6 h-6 text-muted-foreground/50" }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.Layers, { className: "w-6 h-6 text-muted-foreground/50" }) }),
|
|
18625
18960
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-sm text-muted-foreground", children: isSearchMode ? mergedLabels.noResultsText : mergedLabels.emptyText })
|
|
18626
18961
|
] });
|
|
18627
18962
|
}
|
|
@@ -18889,7 +19224,7 @@ function CategoryTreeSelect(props) {
|
|
|
18889
19224
|
triggerSizeStyles[size].iconWrap,
|
|
18890
19225
|
isOpen ? "bg-primary/15 text-primary" : "bg-muted/50 text-muted-foreground group-hover:bg-primary/10 group-hover:text-primary"
|
|
18891
19226
|
),
|
|
18892
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19227
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.FolderTree, { className: cn(triggerSizeStyles[size].icon, "transition-transform duration-300", isOpen && "scale-110") })
|
|
18893
19228
|
}
|
|
18894
19229
|
),
|
|
18895
19230
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
@@ -18917,11 +19252,11 @@ function CategoryTreeSelect(props) {
|
|
|
18917
19252
|
"p-1 rounded-lg hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
|
|
18918
19253
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30"
|
|
18919
19254
|
),
|
|
18920
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.X, { className: triggerSizeStyles[size].clearIcon })
|
|
18921
19256
|
}
|
|
18922
19257
|
),
|
|
18923
19258
|
selectedCount > 0 && !singleSelect && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: cn("rounded-full bg-primary/15 font-bold text-primary", triggerSizeStyles[size].badge), children: selectedCount }),
|
|
18924
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
19259
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react27.ChevronDown, { className: triggerSizeStyles[size].actionIcon }) })
|
|
18925
19260
|
] })
|
|
18926
19261
|
]
|
|
18927
19262
|
}
|
|
@@ -18935,7 +19270,7 @@ function CategoryTreeSelect(props) {
|
|
|
18935
19270
|
|
|
18936
19271
|
// src/components/ImageUpload.tsx
|
|
18937
19272
|
var import_react23 = require("react");
|
|
18938
|
-
var
|
|
19273
|
+
var import_lucide_react28 = require("lucide-react");
|
|
18939
19274
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
18940
19275
|
function ImageUpload({
|
|
18941
19276
|
onUpload,
|
|
@@ -19085,11 +19420,11 @@ function ImageUpload({
|
|
|
19085
19420
|
onDrop: handleDrop,
|
|
19086
19421
|
children: [
|
|
19087
19422
|
uploading && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "absolute inset-0 bg-background/80 flex items-center justify-center rounded-2xl md:rounded-3xl", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
19088
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19423
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react28.Loader2, { className: "w-6 h-6 animate-spin text-primary" }),
|
|
19089
19424
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-sm font-medium", children: "Uploading..." })
|
|
19090
19425
|
] }) }),
|
|
19091
19426
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "space-y-4", children: [
|
|
19092
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mx-auto w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19427
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "mx-auto w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react28.Upload, { className: "w-6 h-6 text-primary" }) }),
|
|
19093
19428
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "space-y-2", children: [
|
|
19094
19429
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-muted-foreground", children: dragDropText || t("dragDropText") }),
|
|
19095
19430
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button_default, { type: "button", variant: "outline", size: "sm", onClick: handleBrowseClick, disabled: disabled || uploading, children: browseText || t("browseFiles") })
|
|
@@ -19121,7 +19456,7 @@ function ImageUpload({
|
|
|
19121
19456
|
size: "icon",
|
|
19122
19457
|
className: "absolute -top-2 -right-2 w-6 h-6 opacity-0 group-hover:opacity-100 transition-opacity z-10",
|
|
19123
19458
|
onClick: () => handleRemoveImage(image.id),
|
|
19124
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19459
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react28.X, { className: "w-3 h-3" })
|
|
19125
19460
|
}
|
|
19126
19461
|
),
|
|
19127
19462
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("mx-auto mb-2 overflow-hidden rounded-lg", previewSizes[previewSize]), children: [
|
|
@@ -19138,7 +19473,7 @@ function ImageUpload({
|
|
|
19138
19473
|
}
|
|
19139
19474
|
}
|
|
19140
19475
|
),
|
|
19141
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hidden w-full h-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19476
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hidden w-full h-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react28.Image, { className: "w-8 h-8 text-muted-foreground" }) })
|
|
19142
19477
|
] }),
|
|
19143
19478
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "space-y-1", children: [
|
|
19144
19479
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-xs font-medium truncate", title: image.originalName, children: image.originalName }),
|
|
@@ -19149,14 +19484,14 @@ function ImageUpload({
|
|
|
19149
19484
|
image.height
|
|
19150
19485
|
] })
|
|
19151
19486
|
] }),
|
|
19152
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "absolute top-1 left-1 w-5 h-5 bg-success rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
19487
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "absolute top-1 left-1 w-5 h-5 bg-success rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_lucide_react28.Check, { className: "w-3 h-3 text-success-foreground" }) })
|
|
19153
19488
|
] }, image.id)) })
|
|
19154
19489
|
] })
|
|
19155
19490
|
] });
|
|
19156
19491
|
}
|
|
19157
19492
|
|
|
19158
19493
|
// src/components/FileUpload.tsx
|
|
19159
|
-
var
|
|
19494
|
+
var import_lucide_react29 = require("lucide-react");
|
|
19160
19495
|
var import_react24 = require("react");
|
|
19161
19496
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
19162
19497
|
var formatFileSize = (bytes) => {
|
|
@@ -19167,14 +19502,14 @@ var formatFileSize = (bytes) => {
|
|
|
19167
19502
|
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
|
|
19168
19503
|
};
|
|
19169
19504
|
var getFileIcon = (mimeType, fileName) => {
|
|
19170
|
-
if (mimeType.startsWith("image/")) return
|
|
19171
|
-
if (mimeType.startsWith("video/")) return
|
|
19172
|
-
if (mimeType.startsWith("audio/")) return
|
|
19173
|
-
if (mimeType.includes("zip") || mimeType.includes("rar") || mimeType.includes("7z") || mimeType.includes("tar")) return
|
|
19174
|
-
if (mimeType.includes("pdf") || mimeType.includes("word") || mimeType.includes("document")) return
|
|
19175
|
-
if (mimeType.includes("sheet") || mimeType.includes("excel") || mimeType.includes("csv")) return
|
|
19505
|
+
if (mimeType.startsWith("image/")) return import_lucide_react29.FileImage;
|
|
19506
|
+
if (mimeType.startsWith("video/")) return import_lucide_react29.FileVideo;
|
|
19507
|
+
if (mimeType.startsWith("audio/")) return import_lucide_react29.FileAudio;
|
|
19508
|
+
if (mimeType.includes("zip") || mimeType.includes("rar") || mimeType.includes("7z") || mimeType.includes("tar")) return import_lucide_react29.FileArchive;
|
|
19509
|
+
if (mimeType.includes("pdf") || mimeType.includes("word") || mimeType.includes("document")) return import_lucide_react29.FileText;
|
|
19510
|
+
if (mimeType.includes("sheet") || mimeType.includes("excel") || mimeType.includes("csv")) return import_lucide_react29.FileSpreadsheet;
|
|
19176
19511
|
if (mimeType.includes("javascript") || mimeType.includes("json") || mimeType.includes("html") || mimeType.includes("css") || mimeType.includes("xml"))
|
|
19177
|
-
return
|
|
19512
|
+
return import_lucide_react29.FileCode;
|
|
19178
19513
|
const ext = fileName.split(".").pop()?.toLowerCase();
|
|
19179
19514
|
switch (ext) {
|
|
19180
19515
|
case "jpg":
|
|
@@ -19184,34 +19519,34 @@ var getFileIcon = (mimeType, fileName) => {
|
|
|
19184
19519
|
case "webp":
|
|
19185
19520
|
case "svg":
|
|
19186
19521
|
case "bmp":
|
|
19187
|
-
return
|
|
19522
|
+
return import_lucide_react29.FileImage;
|
|
19188
19523
|
case "mp4":
|
|
19189
19524
|
case "avi":
|
|
19190
19525
|
case "mov":
|
|
19191
19526
|
case "mkv":
|
|
19192
19527
|
case "webm":
|
|
19193
|
-
return
|
|
19528
|
+
return import_lucide_react29.FileVideo;
|
|
19194
19529
|
case "mp3":
|
|
19195
19530
|
case "wav":
|
|
19196
19531
|
case "ogg":
|
|
19197
19532
|
case "flac":
|
|
19198
|
-
return
|
|
19533
|
+
return import_lucide_react29.FileAudio;
|
|
19199
19534
|
case "zip":
|
|
19200
19535
|
case "rar":
|
|
19201
19536
|
case "7z":
|
|
19202
19537
|
case "tar":
|
|
19203
19538
|
case "gz":
|
|
19204
|
-
return
|
|
19539
|
+
return import_lucide_react29.FileArchive;
|
|
19205
19540
|
case "pdf":
|
|
19206
19541
|
case "doc":
|
|
19207
19542
|
case "docx":
|
|
19208
19543
|
case "txt":
|
|
19209
19544
|
case "rtf":
|
|
19210
|
-
return
|
|
19545
|
+
return import_lucide_react29.FileText;
|
|
19211
19546
|
case "xls":
|
|
19212
19547
|
case "xlsx":
|
|
19213
19548
|
case "csv":
|
|
19214
|
-
return
|
|
19549
|
+
return import_lucide_react29.FileSpreadsheet;
|
|
19215
19550
|
case "js":
|
|
19216
19551
|
case "ts":
|
|
19217
19552
|
case "jsx":
|
|
@@ -19223,9 +19558,9 @@ var getFileIcon = (mimeType, fileName) => {
|
|
|
19223
19558
|
case "java":
|
|
19224
19559
|
case "cpp":
|
|
19225
19560
|
case "c":
|
|
19226
|
-
return
|
|
19561
|
+
return import_lucide_react29.FileCode;
|
|
19227
19562
|
default:
|
|
19228
|
-
return
|
|
19563
|
+
return import_lucide_react29.File;
|
|
19229
19564
|
}
|
|
19230
19565
|
};
|
|
19231
19566
|
var getFileTypeColor = (mimeType) => {
|
|
@@ -19439,7 +19774,7 @@ function FileUpload({
|
|
|
19439
19774
|
[uploadHandler, processFiles, handleRemove]
|
|
19440
19775
|
);
|
|
19441
19776
|
const renderFileItem = (file) => {
|
|
19442
|
-
const IconComponent = showTypeIcons ? getFileIcon(file.type, file.name) :
|
|
19777
|
+
const IconComponent = showTypeIcons ? getFileIcon(file.type, file.name) : import_lucide_react29.File;
|
|
19443
19778
|
const iconColor = getFileTypeColor(file.type);
|
|
19444
19779
|
const isImage = file.type.startsWith("image/") && file.url;
|
|
19445
19780
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
@@ -19469,13 +19804,13 @@ function FileUpload({
|
|
|
19469
19804
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
19470
19805
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: cn("text-muted-foreground", size === "lg" ? "text-sm" : "text-xs"), children: file.formattedSize }),
|
|
19471
19806
|
file.status === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "flex items-center gap-1 text-primary text-xs", children: [
|
|
19472
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19807
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Loader2, { className: "w-3 h-3 animate-spin" }),
|
|
19473
19808
|
file.progress,
|
|
19474
19809
|
"%"
|
|
19475
19810
|
] }),
|
|
19476
|
-
file.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex items-center gap-1 text-success text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19811
|
+
file.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex items-center gap-1 text-success text-xs", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Check, { className: "w-3 h-3" }) }),
|
|
19477
19812
|
file.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "flex items-center gap-1 text-destructive text-xs", children: [
|
|
19478
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19813
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.AlertCircle, { className: "w-3 h-3" }),
|
|
19479
19814
|
file.error
|
|
19480
19815
|
] })
|
|
19481
19816
|
] }),
|
|
@@ -19488,7 +19823,7 @@ function FileUpload({
|
|
|
19488
19823
|
) })
|
|
19489
19824
|
] }),
|
|
19490
19825
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "shrink-0 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
19491
|
-
isImage && allowPreview && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { variant: "ghost", size: "icon", className: "w-7 h-7", onClick: () => window.open(file.url, "_blank"), title: gi18n.previewFile ?? "Preview", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19826
|
+
isImage && allowPreview && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { variant: "ghost", size: "icon", className: "w-7 h-7", onClick: () => window.open(file.url, "_blank"), title: gi18n.previewFile ?? "Preview", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Eye, { className: "w-4 h-4" }) }),
|
|
19492
19827
|
file.url && file.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19493
19828
|
Button_default,
|
|
19494
19829
|
{
|
|
@@ -19502,10 +19837,10 @@ function FileUpload({
|
|
|
19502
19837
|
link.click();
|
|
19503
19838
|
},
|
|
19504
19839
|
title: gi18n.download ?? "Download",
|
|
19505
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19840
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Download, { className: "w-4 h-4" })
|
|
19506
19841
|
}
|
|
19507
19842
|
),
|
|
19508
|
-
file.status === "error" && uploadHandler && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { variant: "ghost", size: "icon", className: "w-7 h-7 text-primary", onClick: () => handleRetry(file), title: gi18n.retryUpload ?? "Retry", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19843
|
+
file.status === "error" && uploadHandler && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { variant: "ghost", size: "icon", className: "w-7 h-7 text-primary", onClick: () => handleRetry(file), title: gi18n.retryUpload ?? "Retry", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Upload, { className: "w-4 h-4" }) }),
|
|
19509
19844
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19510
19845
|
Button_default,
|
|
19511
19846
|
{
|
|
@@ -19515,7 +19850,7 @@ function FileUpload({
|
|
|
19515
19850
|
onClick: () => handleRemove(file.id),
|
|
19516
19851
|
disabled: file.status === "uploading",
|
|
19517
19852
|
title: gi18n.removeFile ?? "Remove",
|
|
19518
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19853
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Trash2, { className: "w-4 h-4" })
|
|
19519
19854
|
}
|
|
19520
19855
|
)
|
|
19521
19856
|
] })
|
|
@@ -19566,7 +19901,7 @@ function FileUpload({
|
|
|
19566
19901
|
"ring-4 ring-primary/10",
|
|
19567
19902
|
currentSize.uploadIconSize
|
|
19568
19903
|
),
|
|
19569
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19904
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Upload, { className: cn("text-primary transition-transform duration-300", isDragging && "scale-110", currentSize.iconSize) })
|
|
19570
19905
|
}
|
|
19571
19906
|
),
|
|
19572
19907
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-2", children: [
|
|
@@ -19590,7 +19925,7 @@ function FileUpload({
|
|
|
19590
19925
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: cn("text-muted-foreground", size === "lg" ? "text-sm" : "text-xs"), children: supportedFormatsText || t("supportedFormats") || `Max ${maxSize}MB per file \u2022 Up to ${maxFiles} files` })
|
|
19591
19926
|
] }),
|
|
19592
19927
|
variant === "compact" && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
19593
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: cn("shrink-0 rounded-lg flex items-center justify-center", "bg-primary/10", currentSize.iconSize), children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19928
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: cn("shrink-0 rounded-lg flex items-center justify-center", "bg-primary/10", currentSize.iconSize), children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Upload, { className: cn("text-primary", size === "sm" ? "w-4 h-4" : "w-5 h-5") }) }),
|
|
19594
19929
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
19595
19930
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: cn("font-medium truncate", currentSize.text), children: dragDropText || t("dragDropText") || "Drop files here or" }),
|
|
19596
19931
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: cn("text-muted-foreground", size === "lg" ? "text-sm" : "text-xs"), children: supportedFormatsText || `Max ${maxSize}MB \u2022 ${maxFiles} files` })
|
|
@@ -19598,7 +19933,7 @@ function FileUpload({
|
|
|
19598
19933
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { type: "button", variant: "primary", size: size === "lg" ? "md" : "sm", onClick: handleBrowseClick, disabled, children: browseText || t("browseFiles") || "Browse" })
|
|
19599
19934
|
] }),
|
|
19600
19935
|
variant === "minimal" && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
19601
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19936
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Upload, { className: cn("text-primary", size === "sm" ? "w-4 h-4" : "w-5 h-5") }),
|
|
19602
19937
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: cn("text-primary font-medium", currentSize.text), children: browseText || t("uploadFiles") || "Upload files" })
|
|
19603
19938
|
] }),
|
|
19604
19939
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
@@ -19642,7 +19977,7 @@ function FileUpload({
|
|
|
19642
19977
|
onChange?.([]);
|
|
19643
19978
|
},
|
|
19644
19979
|
children: [
|
|
19645
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
19980
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react29.Trash2, { className: "w-4 h-4 mr-1" }),
|
|
19646
19981
|
t("clearAll") || "Clear all"
|
|
19647
19982
|
]
|
|
19648
19983
|
}
|
|
@@ -19655,7 +19990,7 @@ function FileUpload({
|
|
|
19655
19990
|
|
|
19656
19991
|
// src/components/Carousel.tsx
|
|
19657
19992
|
var React46 = __toESM(require("react"), 1);
|
|
19658
|
-
var
|
|
19993
|
+
var import_lucide_react30 = require("lucide-react");
|
|
19659
19994
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
19660
19995
|
function Carousel({
|
|
19661
19996
|
children,
|
|
@@ -20093,7 +20428,7 @@ function Carousel({
|
|
|
20093
20428
|
onClick: scrollPrev,
|
|
20094
20429
|
variant: "ghost",
|
|
20095
20430
|
size: "icon",
|
|
20096
|
-
icon:
|
|
20431
|
+
icon: import_lucide_react30.ChevronLeft,
|
|
20097
20432
|
noHoverOverlay: true,
|
|
20098
20433
|
disabled: !loop && currentIndex === 0,
|
|
20099
20434
|
className: cn(
|
|
@@ -20110,7 +20445,7 @@ function Carousel({
|
|
|
20110
20445
|
onClick: scrollNext,
|
|
20111
20446
|
variant: "ghost",
|
|
20112
20447
|
size: "icon",
|
|
20113
|
-
icon:
|
|
20448
|
+
icon: import_lucide_react30.ChevronRight,
|
|
20114
20449
|
noHoverOverlay: true,
|
|
20115
20450
|
disabled: !loop && currentIndex >= maxIndex,
|
|
20116
20451
|
className: cn(
|
|
@@ -20456,7 +20791,7 @@ function FallingIcons({
|
|
|
20456
20791
|
|
|
20457
20792
|
// src/components/List.tsx
|
|
20458
20793
|
var React48 = __toESM(require("react"), 1);
|
|
20459
|
-
var
|
|
20794
|
+
var import_lucide_react31 = require("lucide-react");
|
|
20460
20795
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
20461
20796
|
var SIZE_STYLES2 = {
|
|
20462
20797
|
xs: { label: "text-xs", desc: "text-[11px]", icon: "h-3.5 w-3.5", avatar: "h-6 w-6" },
|
|
@@ -20643,7 +20978,7 @@ var ListItem = React48.forwardRef(
|
|
|
20643
20978
|
"span",
|
|
20644
20979
|
{
|
|
20645
20980
|
className: cn("text-muted-foreground shrink-0 transition-transform cursor-pointer select-none", sz.icon, isExpanded && "rotate-90"),
|
|
20646
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
20981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react31.ChevronRight, { className: cn(sz.icon) })
|
|
20647
20982
|
}
|
|
20648
20983
|
) : Right && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: cn("text-muted-foreground shrink-0", sz.icon), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Right, { className: cn(sz.icon) }) })
|
|
20649
20984
|
] }),
|
|
@@ -20964,7 +21299,7 @@ var Watermark_default = Watermark;
|
|
|
20964
21299
|
|
|
20965
21300
|
// src/components/Timeline.tsx
|
|
20966
21301
|
var React50 = __toESM(require("react"), 1);
|
|
20967
|
-
var
|
|
21302
|
+
var import_lucide_react32 = require("lucide-react");
|
|
20968
21303
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
20969
21304
|
var SIZE_STYLE = {
|
|
20970
21305
|
sm: {
|
|
@@ -21132,7 +21467,7 @@ var TimelineItem = React50.forwardRef(
|
|
|
21132
21467
|
type: "button",
|
|
21133
21468
|
onClick: toggleExpanded,
|
|
21134
21469
|
className: cn("text-muted-foreground hover:text-foreground transition-transform p-1", isExpanded && "rotate-180"),
|
|
21135
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
21470
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react32.ChevronDown, { className: "h-4 w-4" })
|
|
21136
21471
|
}
|
|
21137
21472
|
)
|
|
21138
21473
|
] }),
|
|
@@ -21240,7 +21575,7 @@ var Timeline_default = Timeline;
|
|
|
21240
21575
|
|
|
21241
21576
|
// src/components/ColorPicker.tsx
|
|
21242
21577
|
var React51 = __toESM(require("react"), 1);
|
|
21243
|
-
var
|
|
21578
|
+
var import_lucide_react33 = require("lucide-react");
|
|
21244
21579
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
21245
21580
|
var clamp7 = (n, min, max) => Math.max(min, Math.min(max, n));
|
|
21246
21581
|
function hexToRgb(hex) {
|
|
@@ -21545,7 +21880,7 @@ function ColorPicker({
|
|
|
21545
21880
|
),
|
|
21546
21881
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "font-mono text-muted-foreground", children: text })
|
|
21547
21882
|
] }),
|
|
21548
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
21883
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Pipette, { className: cn(size === "sm" ? "w-3.5 h-3.5" : size === "lg" ? "w-5 h-5" : "w-4 h-4", "text-muted-foreground") })
|
|
21549
21884
|
]
|
|
21550
21885
|
}
|
|
21551
21886
|
);
|
|
@@ -21583,7 +21918,7 @@ function ColorPicker({
|
|
|
21583
21918
|
onClick: tryEyedropper,
|
|
21584
21919
|
className: cn("h-9 px-3 rounded-lg border border-border/50 text-xs hover:bg-accent/10 transition-colors flex items-center gap-1.5"),
|
|
21585
21920
|
children: [
|
|
21586
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
21921
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Pipette, { className: "w-3.5 h-3.5" }),
|
|
21587
21922
|
variant === "full" && "Pick"
|
|
21588
21923
|
]
|
|
21589
21924
|
}
|
|
@@ -21598,7 +21933,7 @@ function ColorPicker({
|
|
|
21598
21933
|
copied && "bg-success/10 border-success/30"
|
|
21599
21934
|
),
|
|
21600
21935
|
children: [
|
|
21601
|
-
copied ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
21936
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Check, { className: "w-3.5 h-3.5 text-success" }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Copy, { className: "w-3.5 h-3.5" }),
|
|
21602
21937
|
variant === "full" && (copied ? "Copied!" : "Copy")
|
|
21603
21938
|
]
|
|
21604
21939
|
}
|
|
@@ -21610,7 +21945,7 @@ function ColorPicker({
|
|
|
21610
21945
|
onClick: clear,
|
|
21611
21946
|
className: "ml-auto h-9 px-2 rounded-lg border border-border/50 text-xs hover:bg-destructive/10 transition-colors flex items-center gap-1",
|
|
21612
21947
|
children: [
|
|
21613
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
21948
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.X, { className: "w-3.5 h-3.5" }),
|
|
21614
21949
|
variant === "full" && "Clear"
|
|
21615
21950
|
]
|
|
21616
21951
|
}
|
|
@@ -21637,7 +21972,7 @@ function ColorPicker({
|
|
|
21637
21972
|
"h-9 w-9 rounded-lg border border-border/50 hover:bg-accent/10 transition-colors flex items-center justify-center",
|
|
21638
21973
|
copied && "bg-success/10 border-success/30"
|
|
21639
21974
|
),
|
|
21640
|
-
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
21975
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Check, { className: "w-3.5 h-3.5 text-success" }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Copy, { className: "w-3.5 h-3.5" })
|
|
21641
21976
|
}
|
|
21642
21977
|
)
|
|
21643
21978
|
] }),
|
|
@@ -21657,7 +21992,7 @@ function ColorPicker({
|
|
|
21657
21992
|
) }),
|
|
21658
21993
|
variant !== "minimal" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
21659
21994
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1.5", children: [
|
|
21660
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
21995
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.Palette, { className: "w-3.5 h-3.5" }),
|
|
21661
21996
|
" Presets"
|
|
21662
21997
|
] }),
|
|
21663
21998
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "grid grid-cols-8 gap-2", children: swatches.map((c) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
@@ -21678,7 +22013,7 @@ function ColorPicker({
|
|
|
21678
22013
|
] }),
|
|
21679
22014
|
showRecent && recentColors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
21680
22015
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1.5", children: [
|
|
21681
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
22016
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react33.History, { className: "w-3.5 h-3.5" }),
|
|
21682
22017
|
" Recent"
|
|
21683
22018
|
] }),
|
|
21684
22019
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex gap-2 flex-wrap", children: recentColors.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
@@ -21763,7 +22098,7 @@ function ColorPicker({
|
|
|
21763
22098
|
|
|
21764
22099
|
// src/components/MusicPlayer.tsx
|
|
21765
22100
|
var import_react26 = require("react");
|
|
21766
|
-
var
|
|
22101
|
+
var import_lucide_react34 = require("lucide-react");
|
|
21767
22102
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
21768
22103
|
var DEFAULT_PLAYLIST = [
|
|
21769
22104
|
{ id: 1, title: "Someone You Loved", artist: "Lewis Capaldi", duration: "3:07", audioUrl: "/music/full-playlist.mp3", startTime: 0, endTime: 187 },
|
|
@@ -22023,7 +22358,7 @@ var MusicPlayer = ({
|
|
|
22023
22358
|
{
|
|
22024
22359
|
onClick: playPrevious,
|
|
22025
22360
|
className: "w-12 h-12 flex items-center justify-center rounded-full bg-secondary hover:bg-secondary/80 transition-colors text-secondary-foreground",
|
|
22026
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
22361
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react34.SkipBack, { size: 24 })
|
|
22027
22362
|
}
|
|
22028
22363
|
),
|
|
22029
22364
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
@@ -22031,7 +22366,7 @@ var MusicPlayer = ({
|
|
|
22031
22366
|
{
|
|
22032
22367
|
onClick: togglePlay,
|
|
22033
22368
|
className: "w-16 h-16 flex items-center justify-center rounded-full bg-primary hover:bg-primary/90 transition-colors text-primary-foreground shadow-lg",
|
|
22034
|
-
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
22369
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react34.Pause, { size: 32 }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react34.Play, { size: 32, className: "ml-1" })
|
|
22035
22370
|
}
|
|
22036
22371
|
),
|
|
22037
22372
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
@@ -22039,12 +22374,12 @@ var MusicPlayer = ({
|
|
|
22039
22374
|
{
|
|
22040
22375
|
onClick: playNext,
|
|
22041
22376
|
className: "w-12 h-12 flex items-center justify-center rounded-full bg-secondary hover:bg-secondary/80 transition-colors text-secondary-foreground",
|
|
22042
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
22377
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react34.SkipForward, { size: 24 })
|
|
22043
22378
|
}
|
|
22044
22379
|
)
|
|
22045
22380
|
] }),
|
|
22046
22381
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
22047
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { onClick: toggleMute, className: "text-foreground hover:text-primary transition-colors", children: isMuted || volume === 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
22382
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("button", { onClick: toggleMute, className: "text-foreground hover:text-primary transition-colors", children: isMuted || volume === 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react34.VolumeX, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react34.Volume2, { size: 20 }) }),
|
|
22048
22383
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
22049
22384
|
"input",
|
|
22050
22385
|
{
|
|
@@ -22064,7 +22399,7 @@ var MusicPlayer = ({
|
|
|
22064
22399
|
onClick: () => setShowPlaylist(!showPlaylist),
|
|
22065
22400
|
className: "flex items-center gap-2 px-4 py-2 bg-secondary hover:bg-secondary/80 rounded-lg text-secondary-foreground transition-colors",
|
|
22066
22401
|
children: [
|
|
22067
|
-
showPlaylist ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
22402
|
+
showPlaylist ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react34.X, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react34.List, { size: 20 }),
|
|
22068
22403
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: showPlaylist ? "Hide Playlist" : "Show Playlist" })
|
|
22069
22404
|
]
|
|
22070
22405
|
}
|
|
@@ -22324,7 +22659,7 @@ function ClientOnly({ children, fallback = null }) {
|
|
|
22324
22659
|
}
|
|
22325
22660
|
|
|
22326
22661
|
// src/components/Loading.tsx
|
|
22327
|
-
var
|
|
22662
|
+
var import_lucide_react35 = require("lucide-react");
|
|
22328
22663
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
22329
22664
|
var LoadingSpinner = ({
|
|
22330
22665
|
size = "md",
|
|
@@ -22342,7 +22677,7 @@ var LoadingSpinner = ({
|
|
|
22342
22677
|
muted: "text-muted-foreground"
|
|
22343
22678
|
};
|
|
22344
22679
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
22345
|
-
|
|
22680
|
+
import_lucide_react35.Activity,
|
|
22346
22681
|
{
|
|
22347
22682
|
className: cn(
|
|
22348
22683
|
"animate-spin",
|
|
@@ -22637,7 +22972,7 @@ function DataTableBodyRows({
|
|
|
22637
22972
|
|
|
22638
22973
|
// src/components/DataTable/components/DataTableHeader.tsx
|
|
22639
22974
|
var import_react30 = __toESM(require("react"), 1);
|
|
22640
|
-
var
|
|
22975
|
+
var import_lucide_react36 = require("lucide-react");
|
|
22641
22976
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
22642
22977
|
function getColumnLabel(title) {
|
|
22643
22978
|
if (typeof title === "string" || typeof title === "number") {
|
|
@@ -22821,7 +23156,7 @@ function DataTableHeader({
|
|
|
22821
23156
|
filters[col.key] ? "bg-accent text-primary" : "text-muted-foreground"
|
|
22822
23157
|
),
|
|
22823
23158
|
"aria-label": gi18n.filterByColumn ? gi18n.filterByColumn(columnLabel) : `Filter by ${columnLabel}`,
|
|
22824
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
23159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react36.Filter, { className: "w-4 h-4" })
|
|
22825
23160
|
}
|
|
22826
23161
|
)
|
|
22827
23162
|
}
|
|
@@ -24102,7 +24437,7 @@ var FormSubmitButton = React65.forwardRef(
|
|
|
24102
24437
|
FormSubmitButton.displayName = "FormSubmitButton";
|
|
24103
24438
|
|
|
24104
24439
|
// src/components/NotificationModal.tsx
|
|
24105
|
-
var
|
|
24440
|
+
var import_lucide_react37 = require("lucide-react");
|
|
24106
24441
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
24107
24442
|
function NotificationModal({ isOpen, onClose, notification, titleText, openLinkText, closeText }) {
|
|
24108
24443
|
const t = useSmartTranslations("Common");
|
|
@@ -24134,7 +24469,7 @@ function NotificationModal({ isOpen, onClose, notification, titleText, openLinkT
|
|
|
24134
24469
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "text-xs text-muted-foreground border-t border-border/50 pt-2", children: formatTime3(notification.created_at) }),
|
|
24135
24470
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex gap-2 justify-end pt-2", children: [
|
|
24136
24471
|
hasLink && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Button_default, { variant: "primary", size: "sm", onClick: handleLinkClick, className: "gap-2", children: [
|
|
24137
|
-
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
24472
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_react37.ExternalLink, { className: "w-4 h-4" }),
|
|
24138
24473
|
openLinkText || t("openLink")
|
|
24139
24474
|
] }),
|
|
24140
24475
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Button_default, { variant: "ghost", size: "sm", onClick: onClose, children: closeText || t("close") })
|
|
@@ -24144,7 +24479,7 @@ function NotificationModal({ isOpen, onClose, notification, titleText, openLinkT
|
|
|
24144
24479
|
var NotificationModal_default = NotificationModal;
|
|
24145
24480
|
|
|
24146
24481
|
// src/components/AccessDenied.tsx
|
|
24147
|
-
var
|
|
24482
|
+
var import_lucide_react38 = require("lucide-react");
|
|
24148
24483
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
24149
24484
|
var VARIANT_STYLES = {
|
|
24150
24485
|
destructive: { bg: "bg-destructive/5", border: "border-destructive/20", text: "text-destructive" },
|
|
@@ -24152,9 +24487,9 @@ var VARIANT_STYLES = {
|
|
|
24152
24487
|
info: { bg: "bg-info/5", border: "border-info/20", text: "text-info" }
|
|
24153
24488
|
};
|
|
24154
24489
|
var DEFAULT_ICONS = {
|
|
24155
|
-
destructive:
|
|
24156
|
-
warning:
|
|
24157
|
-
info:
|
|
24490
|
+
destructive: import_lucide_react38.ShieldAlert,
|
|
24491
|
+
warning: import_lucide_react38.Ban,
|
|
24492
|
+
info: import_lucide_react38.Lock
|
|
24158
24493
|
};
|
|
24159
24494
|
function AccessDenied({
|
|
24160
24495
|
title = "Access Restricted",
|
|
@@ -24185,7 +24520,7 @@ function AccessDenied({
|
|
|
24185
24520
|
}
|
|
24186
24521
|
|
|
24187
24522
|
// src/components/ThemeToggleHeadless.tsx
|
|
24188
|
-
var
|
|
24523
|
+
var import_lucide_react39 = require("lucide-react");
|
|
24189
24524
|
var import_react39 = require("react");
|
|
24190
24525
|
var import_react_dom6 = require("react-dom");
|
|
24191
24526
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
@@ -24200,9 +24535,9 @@ function ThemeToggleHeadless({
|
|
|
24200
24535
|
const triggerRef = (0, import_react39.useRef)(null);
|
|
24201
24536
|
const [dropdownPosition, setDropdownPosition] = (0, import_react39.useState)(null);
|
|
24202
24537
|
const themes = [
|
|
24203
|
-
{ value: "light", label: labels?.light ?? "Light", icon:
|
|
24204
|
-
{ value: "dark", label: labels?.dark ?? "Dark", icon:
|
|
24205
|
-
{ value: "system", label: labels?.system ?? "System", icon:
|
|
24538
|
+
{ value: "light", label: labels?.light ?? "Light", icon: import_lucide_react39.Sun },
|
|
24539
|
+
{ value: "dark", label: labels?.dark ?? "Dark", icon: import_lucide_react39.Moon },
|
|
24540
|
+
{ value: "system", label: labels?.system ?? "System", icon: import_lucide_react39.Monitor }
|
|
24206
24541
|
];
|
|
24207
24542
|
const current = isHydrated ? themes.find((t) => t.value === theme) || themes[2] : themes[2];
|
|
24208
24543
|
const CurrentIcon = current.icon;
|
|
@@ -24289,7 +24624,7 @@ function ThemeToggleHeadless({
|
|
|
24289
24624
|
// src/components/LanguageSwitcherHeadless.tsx
|
|
24290
24625
|
var import_react40 = require("react");
|
|
24291
24626
|
var import_react_dom7 = require("react-dom");
|
|
24292
|
-
var
|
|
24627
|
+
var import_lucide_react40 = require("lucide-react");
|
|
24293
24628
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
24294
24629
|
function LanguageSwitcherHeadless({
|
|
24295
24630
|
locales,
|
|
@@ -24332,7 +24667,7 @@ function LanguageSwitcherHeadless({
|
|
|
24332
24667
|
"aria-expanded": isOpen,
|
|
24333
24668
|
"aria-label": labels?.heading ?? "Language",
|
|
24334
24669
|
title: labels?.heading ?? "Language",
|
|
24335
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
24670
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react40.Globe, { className: "h-5 w-5" })
|
|
24336
24671
|
}
|
|
24337
24672
|
),
|
|
24338
24673
|
isOpen && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
@@ -24436,8 +24771,8 @@ function useLocale2() {
|
|
|
24436
24771
|
}
|
|
24437
24772
|
|
|
24438
24773
|
// src/components/UEditor/UEditor.tsx
|
|
24439
|
-
var
|
|
24440
|
-
var
|
|
24774
|
+
var import_react69 = __toESM(require("react"), 1);
|
|
24775
|
+
var import_react70 = require("@tiptap/react");
|
|
24441
24776
|
|
|
24442
24777
|
// src/components/UEditor/extensions.ts
|
|
24443
24778
|
var import_core13 = require("@tiptap/core");
|
|
@@ -24598,7 +24933,7 @@ var import_react45 = require("@tiptap/react");
|
|
|
24598
24933
|
// src/components/UEditor/BookmarkView.tsx
|
|
24599
24934
|
var import_react43 = require("react");
|
|
24600
24935
|
var import_react44 = require("@tiptap/react");
|
|
24601
|
-
var
|
|
24936
|
+
var import_lucide_react41 = require("lucide-react");
|
|
24602
24937
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
24603
24938
|
var BookmarkView = ({ node, updateAttributes, selected, editor }) => {
|
|
24604
24939
|
const t = useSmartTranslations("UEditor");
|
|
@@ -24699,7 +25034,7 @@ var BookmarkView = ({ node, updateAttributes, selected, editor }) => {
|
|
|
24699
25034
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex-1 p-4 flex flex-col justify-between gap-1 min-w-0", children: [
|
|
24700
25035
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
24701
25036
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "text-xs text-muted-foreground font-medium flex items-center gap-1.5 truncate", children: [
|
|
24702
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
25037
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react41.Globe, { className: "h-3 w-3 flex-shrink-0" }),
|
|
24703
25038
|
displayPublisher
|
|
24704
25039
|
] }),
|
|
24705
25040
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("h4", { className: "text-sm font-semibold text-foreground line-clamp-1 break-all", children: title || url }),
|
|
@@ -24707,7 +25042,7 @@ var BookmarkView = ({ node, updateAttributes, selected, editor }) => {
|
|
|
24707
25042
|
] }),
|
|
24708
25043
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "text-[11px] text-primary/80 font-mono mt-2 truncate flex items-center gap-1", children: [
|
|
24709
25044
|
url,
|
|
24710
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
25045
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_lucide_react41.ExternalLink, { className: "h-3 w-3 flex-shrink-0" })
|
|
24711
25046
|
] })
|
|
24712
25047
|
] }),
|
|
24713
25048
|
image && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "relative w-full sm:w-44 h-32 sm:h-auto flex-shrink-0 bg-muted overflow-hidden border-t sm:border-t-0 sm:border-l border-border/50", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
@@ -24845,7 +25180,7 @@ var import_react48 = require("@tiptap/react");
|
|
|
24845
25180
|
// src/components/UEditor/FileCardView.tsx
|
|
24846
25181
|
var import_react46 = require("react");
|
|
24847
25182
|
var import_react47 = require("@tiptap/react");
|
|
24848
|
-
var
|
|
25183
|
+
var import_lucide_react42 = require("lucide-react");
|
|
24849
25184
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
24850
25185
|
function formatBytes(bytes, decimals = 1) {
|
|
24851
25186
|
if (!bytes || bytes <= 0) return "0 Bytes";
|
|
@@ -24857,11 +25192,11 @@ function formatBytes(bytes, decimals = 1) {
|
|
|
24857
25192
|
}
|
|
24858
25193
|
function getFileIcon2(type) {
|
|
24859
25194
|
const mime = (type || "").toLowerCase();
|
|
24860
|
-
if (mime.includes("pdf")) return
|
|
24861
|
-
if (mime.startsWith("image/")) return
|
|
24862
|
-
if (mime.startsWith("audio/")) return
|
|
24863
|
-
if (mime.startsWith("video/")) return
|
|
24864
|
-
return
|
|
25195
|
+
if (mime.includes("pdf")) return import_lucide_react42.FileText;
|
|
25196
|
+
if (mime.startsWith("image/")) return import_lucide_react42.Image;
|
|
25197
|
+
if (mime.startsWith("audio/")) return import_lucide_react42.Music;
|
|
25198
|
+
if (mime.startsWith("video/")) return import_lucide_react42.Video;
|
|
25199
|
+
return import_lucide_react42.File;
|
|
24865
25200
|
}
|
|
24866
25201
|
function dataURLtoFile(dataurl, filename, mimeType) {
|
|
24867
25202
|
try {
|
|
@@ -24964,7 +25299,7 @@ var FileCardView = ({ node, selected, editor, updateAttributes }) => {
|
|
|
24964
25299
|
type: "button",
|
|
24965
25300
|
onClick: handleDownload,
|
|
24966
25301
|
className: "flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-background text-muted-foreground hover:text-foreground hover:bg-muted active:scale-95 transition-all focus:outline-none",
|
|
24967
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
25302
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react42.Download, { className: "h-4 w-4" })
|
|
24968
25303
|
}
|
|
24969
25304
|
)
|
|
24970
25305
|
]
|
|
@@ -25075,7 +25410,7 @@ var import_core4 = require("@tiptap/core");
|
|
|
25075
25410
|
var import_suggestion = __toESM(require("@tiptap/suggestion"), 1);
|
|
25076
25411
|
var import_react49 = require("@tiptap/react");
|
|
25077
25412
|
var import_react50 = __toESM(require("react"), 1);
|
|
25078
|
-
var
|
|
25413
|
+
var import_lucide_react43 = require("lucide-react");
|
|
25079
25414
|
|
|
25080
25415
|
// src/components/UEditor/tippy-interop.ts
|
|
25081
25416
|
var import_tippy = __toESM(require("tippy.js"), 1);
|
|
@@ -25189,7 +25524,7 @@ function buildSlashCommandItems({
|
|
|
25189
25524
|
const run = (handler) => handler;
|
|
25190
25525
|
return [
|
|
25191
25526
|
{
|
|
25192
|
-
icon:
|
|
25527
|
+
icon: import_lucide_react43.Type,
|
|
25193
25528
|
title: messages.text,
|
|
25194
25529
|
description: messages.textDesc,
|
|
25195
25530
|
command: run(({ editor, range }) => {
|
|
@@ -25197,7 +25532,7 @@ function buildSlashCommandItems({
|
|
|
25197
25532
|
})
|
|
25198
25533
|
},
|
|
25199
25534
|
{
|
|
25200
|
-
icon:
|
|
25535
|
+
icon: import_lucide_react43.Heading1,
|
|
25201
25536
|
title: messages.heading1,
|
|
25202
25537
|
description: messages.heading1Desc,
|
|
25203
25538
|
command: run(({ editor, range }) => {
|
|
@@ -25205,7 +25540,7 @@ function buildSlashCommandItems({
|
|
|
25205
25540
|
})
|
|
25206
25541
|
},
|
|
25207
25542
|
{
|
|
25208
|
-
icon:
|
|
25543
|
+
icon: import_lucide_react43.Heading2,
|
|
25209
25544
|
title: messages.heading2,
|
|
25210
25545
|
description: messages.heading2Desc,
|
|
25211
25546
|
command: run(({ editor, range }) => {
|
|
@@ -25213,7 +25548,7 @@ function buildSlashCommandItems({
|
|
|
25213
25548
|
})
|
|
25214
25549
|
},
|
|
25215
25550
|
{
|
|
25216
|
-
icon:
|
|
25551
|
+
icon: import_lucide_react43.Heading3,
|
|
25217
25552
|
title: messages.heading3,
|
|
25218
25553
|
description: messages.heading3Desc,
|
|
25219
25554
|
command: run(({ editor, range }) => {
|
|
@@ -25221,7 +25556,7 @@ function buildSlashCommandItems({
|
|
|
25221
25556
|
})
|
|
25222
25557
|
},
|
|
25223
25558
|
{
|
|
25224
|
-
icon:
|
|
25559
|
+
icon: import_lucide_react43.List,
|
|
25225
25560
|
title: messages.bulletList,
|
|
25226
25561
|
description: messages.bulletListDesc,
|
|
25227
25562
|
command: run(({ editor, range }) => {
|
|
@@ -25229,7 +25564,7 @@ function buildSlashCommandItems({
|
|
|
25229
25564
|
})
|
|
25230
25565
|
},
|
|
25231
25566
|
{
|
|
25232
|
-
icon:
|
|
25567
|
+
icon: import_lucide_react43.ListOrdered,
|
|
25233
25568
|
title: messages.orderedList,
|
|
25234
25569
|
description: messages.orderedListDesc,
|
|
25235
25570
|
command: run(({ editor, range }) => {
|
|
@@ -25237,7 +25572,7 @@ function buildSlashCommandItems({
|
|
|
25237
25572
|
})
|
|
25238
25573
|
},
|
|
25239
25574
|
{
|
|
25240
|
-
icon:
|
|
25575
|
+
icon: import_lucide_react43.ListTodo,
|
|
25241
25576
|
title: messages.todoList,
|
|
25242
25577
|
description: messages.todoListDesc,
|
|
25243
25578
|
command: run(({ editor, range }) => {
|
|
@@ -25245,7 +25580,7 @@ function buildSlashCommandItems({
|
|
|
25245
25580
|
})
|
|
25246
25581
|
},
|
|
25247
25582
|
{
|
|
25248
|
-
icon:
|
|
25583
|
+
icon: import_lucide_react43.Quote,
|
|
25249
25584
|
title: messages.quote,
|
|
25250
25585
|
description: messages.quoteDesc,
|
|
25251
25586
|
command: run(({ editor, range }) => {
|
|
@@ -25253,7 +25588,7 @@ function buildSlashCommandItems({
|
|
|
25253
25588
|
})
|
|
25254
25589
|
},
|
|
25255
25590
|
{
|
|
25256
|
-
icon:
|
|
25591
|
+
icon: import_lucide_react43.FileCode,
|
|
25257
25592
|
title: messages.codeBlock,
|
|
25258
25593
|
description: messages.codeBlockDesc,
|
|
25259
25594
|
command: run(({ editor, range }) => {
|
|
@@ -25261,7 +25596,7 @@ function buildSlashCommandItems({
|
|
|
25261
25596
|
})
|
|
25262
25597
|
},
|
|
25263
25598
|
{
|
|
25264
|
-
icon:
|
|
25599
|
+
icon: import_lucide_react43.Minus,
|
|
25265
25600
|
title: messages.divider,
|
|
25266
25601
|
description: messages.dividerDesc,
|
|
25267
25602
|
command: run(({ editor, range }) => {
|
|
@@ -25269,7 +25604,7 @@ function buildSlashCommandItems({
|
|
|
25269
25604
|
})
|
|
25270
25605
|
},
|
|
25271
25606
|
{
|
|
25272
|
-
icon:
|
|
25607
|
+
icon: import_lucide_react43.Table,
|
|
25273
25608
|
title: messages.table,
|
|
25274
25609
|
description: messages.tableDesc,
|
|
25275
25610
|
command: run(({ editor, range }) => {
|
|
@@ -25277,7 +25612,7 @@ function buildSlashCommandItems({
|
|
|
25277
25612
|
})
|
|
25278
25613
|
},
|
|
25279
25614
|
{
|
|
25280
|
-
icon:
|
|
25615
|
+
icon: import_lucide_react43.Info,
|
|
25281
25616
|
title: messages.callout || "Callout",
|
|
25282
25617
|
description: messages.calloutDesc || "Highlight key info with a callout block",
|
|
25283
25618
|
command: run(({ editor, range }) => {
|
|
@@ -25285,7 +25620,7 @@ function buildSlashCommandItems({
|
|
|
25285
25620
|
})
|
|
25286
25621
|
},
|
|
25287
25622
|
{
|
|
25288
|
-
icon:
|
|
25623
|
+
icon: import_lucide_react43.Bookmark,
|
|
25289
25624
|
title: messages.bookmark || "Bookmark Card",
|
|
25290
25625
|
description: messages.bookmarkDesc || "Embed a link as a bookmark card",
|
|
25291
25626
|
command: run(({ editor, range }) => {
|
|
@@ -25296,7 +25631,7 @@ function buildSlashCommandItems({
|
|
|
25296
25631
|
})
|
|
25297
25632
|
},
|
|
25298
25633
|
{
|
|
25299
|
-
icon:
|
|
25634
|
+
icon: import_lucide_react43.Paperclip,
|
|
25300
25635
|
title: messages.fileCard || "File Attachment",
|
|
25301
25636
|
description: messages.fileCardDesc || "Upload a file card attachment",
|
|
25302
25637
|
command: run(({ editor, range }) => {
|
|
@@ -25614,7 +25949,7 @@ var import_suggestion2 = __toESM(require("@tiptap/suggestion"), 1);
|
|
|
25614
25949
|
var import_react51 = require("@tiptap/react");
|
|
25615
25950
|
var import_state3 = require("@tiptap/pm/state");
|
|
25616
25951
|
var import_react52 = __toESM(require("react"), 1);
|
|
25617
|
-
var
|
|
25952
|
+
var import_lucide_react44 = require("lucide-react");
|
|
25618
25953
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
25619
25954
|
function useResettingIndex3(resetToken) {
|
|
25620
25955
|
const [state, setState] = import_react52.default.useState({ resetToken, index: 0 });
|
|
@@ -25669,7 +26004,7 @@ var EmojiList = (0, import_react52.forwardRef)((props, ref) => {
|
|
|
25669
26004
|
}
|
|
25670
26005
|
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "w-80 max-h-80 overflow-y-auto bg-card border border-border/50 rounded-2xl shadow-lg", children: [
|
|
25671
26006
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "px-3 py-2 border-b bg-muted/30", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
25672
|
-
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
26007
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_lucide_react44.Smile, { className: "w-4 h-4 text-primary" }),
|
|
25673
26008
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: t("emojiSuggestion.title") })
|
|
25674
26009
|
] }) }),
|
|
25675
26010
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "p-3", children: [
|
|
@@ -26548,7 +26883,7 @@ var table_align_default = UEditorTable;
|
|
|
26548
26883
|
// src/components/UEditor/CodeBlockView.tsx
|
|
26549
26884
|
var import_react55 = __toESM(require("react"), 1);
|
|
26550
26885
|
var import_react56 = require("@tiptap/react");
|
|
26551
|
-
var
|
|
26886
|
+
var import_lucide_react45 = require("lucide-react");
|
|
26552
26887
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
26553
26888
|
var LANGUAGES = [
|
|
26554
26889
|
{ label: "Plain Text", value: "text" },
|
|
@@ -26613,7 +26948,7 @@ var CodeBlockView = ({
|
|
|
26613
26948
|
className: "flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1 text-xs text-muted-foreground hover:text-foreground hover:bg-muted active:scale-95 transition-all focus:outline-none",
|
|
26614
26949
|
children: [
|
|
26615
26950
|
currentLangLabel,
|
|
26616
|
-
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
26951
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react45.ChevronDown, { className: "h-3 w-3" })
|
|
26617
26952
|
]
|
|
26618
26953
|
}
|
|
26619
26954
|
),
|
|
@@ -26650,7 +26985,7 @@ var CodeBlockView = ({
|
|
|
26650
26985
|
onClick: handleCopy,
|
|
26651
26986
|
className: "flex h-7 w-7 items-center justify-center rounded-lg border border-border bg-background text-muted-foreground hover:text-foreground hover:bg-muted active:scale-95 transition-all focus:outline-none",
|
|
26652
26987
|
title: "Copy code",
|
|
26653
|
-
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
26988
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react45.Check, { className: "h-3.5 w-3.5 text-success animate-in fade-in-0 zoom-in-75" }) : /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react45.Copy, { className: "h-3.5 w-3.5" })
|
|
26654
26989
|
}
|
|
26655
26990
|
)
|
|
26656
26991
|
]
|
|
@@ -26965,11 +27300,11 @@ function buildUEditorExtensions({
|
|
|
26965
27300
|
// src/components/UEditor/toolbar.tsx
|
|
26966
27301
|
var import_react60 = __toESM(require("react"), 1);
|
|
26967
27302
|
var import_react61 = require("@tiptap/react");
|
|
26968
|
-
var
|
|
27303
|
+
var import_lucide_react48 = require("lucide-react");
|
|
26969
27304
|
|
|
26970
27305
|
// src/components/UEditor/colors.tsx
|
|
26971
27306
|
var import_react58 = require("react");
|
|
26972
|
-
var
|
|
27307
|
+
var import_lucide_react46 = require("lucide-react");
|
|
26973
27308
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
26974
27309
|
var TextColorIcon = ({ color }) => {
|
|
26975
27310
|
const underlineColor = color && color !== "inherit" ? color : "currentColor";
|
|
@@ -26988,7 +27323,7 @@ var TextColorIcon = ({ color }) => {
|
|
|
26988
27323
|
var HighlightColorIcon = ({ color }) => {
|
|
26989
27324
|
const underlineColor = color || "currentColor";
|
|
26990
27325
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "relative flex h-5 w-5 items-center justify-center leading-none", children: [
|
|
26991
|
-
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
27326
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react46.Highlighter, { className: "h-4 w-4" }),
|
|
26992
27327
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
26993
27328
|
"span",
|
|
26994
27329
|
{
|
|
@@ -27002,7 +27337,7 @@ var HighlightColorIcon = ({ color }) => {
|
|
|
27002
27337
|
var CellBgColorIcon = ({ color }) => {
|
|
27003
27338
|
const underlineColor = color && color !== "inherit" ? color : "currentColor";
|
|
27004
27339
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "relative flex h-5 w-5 items-center justify-center leading-none", children: [
|
|
27005
|
-
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
27340
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react46.Paintbrush, { className: "h-4 w-4" }),
|
|
27006
27341
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
27007
27342
|
"span",
|
|
27008
27343
|
{
|
|
@@ -27016,7 +27351,7 @@ var CellBgColorIcon = ({ color }) => {
|
|
|
27016
27351
|
var CellBorderIcon = ({ color }) => {
|
|
27017
27352
|
const underlineColor = color && color !== "inherit" ? color : "currentColor";
|
|
27018
27353
|
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "relative flex h-5 w-5 items-center justify-center leading-none", children: [
|
|
27019
|
-
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
27354
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react46.Grid, { className: "h-4 w-4" }),
|
|
27020
27355
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
27021
27356
|
"span",
|
|
27022
27357
|
{
|
|
@@ -27155,7 +27490,7 @@ var EditorColorPalette = ({
|
|
|
27155
27490
|
currentColor === automaticColor ? "border-primary text-primary" : "border-transparent text-foreground"
|
|
27156
27491
|
),
|
|
27157
27492
|
children: [
|
|
27158
|
-
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "flex h-5 w-5 items-center justify-center rounded border border-border bg-background", children: currentColor === automaticColor && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
27493
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "flex h-5 w-5 items-center justify-center rounded border border-border bg-background", children: currentColor === automaticColor && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react46.Check, { className: "h-3.5 w-3.5" }) }),
|
|
27159
27494
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "flex-1 text-center", children: t("colors.automatic") })
|
|
27160
27495
|
]
|
|
27161
27496
|
}
|
|
@@ -27172,7 +27507,7 @@ var EditorColorPalette = ({
|
|
|
27172
27507
|
currentColor === c.color ? "border-primary ring-2 ring-primary/25" : "border-border/70"
|
|
27173
27508
|
),
|
|
27174
27509
|
style: { backgroundColor: c.color || "transparent" },
|
|
27175
|
-
children: currentColor === c.color && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
27510
|
+
children: currentColor === c.color && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react46.Check, { className: "h-3.5 w-3.5 text-white drop-shadow-[0_1px_1px_rgba(0,0,0,0.8)]" }) })
|
|
27176
27511
|
}
|
|
27177
27512
|
) }, `${c.name}-${c.color}`)) }),
|
|
27178
27513
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
@@ -27194,7 +27529,7 @@ var EditorColorPalette = ({
|
|
|
27194
27529
|
}
|
|
27195
27530
|
),
|
|
27196
27531
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "flex-1 text-center", children: t("colors.moreColors") }),
|
|
27197
|
-
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
27532
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react46.Palette, { className: "h-4 w-4 text-muted-foreground" }),
|
|
27198
27533
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
27199
27534
|
"input",
|
|
27200
27535
|
{
|
|
@@ -27304,7 +27639,7 @@ function deleteSelectedImage(editor) {
|
|
|
27304
27639
|
|
|
27305
27640
|
// src/components/UEditor/inputs.tsx
|
|
27306
27641
|
var import_react59 = require("react");
|
|
27307
|
-
var
|
|
27642
|
+
var import_lucide_react47 = require("lucide-react");
|
|
27308
27643
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
27309
27644
|
function normalizeUrl(raw) {
|
|
27310
27645
|
return sanitizeUEditorUrl(raw, "link");
|
|
@@ -27338,8 +27673,8 @@ var LinkInput = ({
|
|
|
27338
27673
|
className: "flex-1 px-3 py-2 text-sm bg-muted/50 border-0 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20"
|
|
27339
27674
|
}
|
|
27340
27675
|
),
|
|
27341
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("button", { type: "submit", className: "p-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
27342
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("button", { type: "button", onClick: onCancel, className: "p-2 rounded-lg hover:bg-muted transition-colors text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
27676
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("button", { type: "submit", className: "p-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react47.Check, { className: "w-4 h-4" }) }),
|
|
27677
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("button", { type: "button", onClick: onCancel, className: "p-2 rounded-lg hover:bg-muted transition-colors text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_lucide_react47.X, { className: "w-4 h-4" }) })
|
|
27343
27678
|
] });
|
|
27344
27679
|
};
|
|
27345
27680
|
var ImageInput = ({ onSubmit, onCancel }) => {
|
|
@@ -27634,15 +27969,15 @@ var EditorToolbar = ({
|
|
|
27634
27969
|
};
|
|
27635
27970
|
if (variant === "minimal") {
|
|
27636
27971
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex items-center gap-1 border-b border-border/35 bg-muted/30 p-2", children: [
|
|
27637
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27638
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27972
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Bold, { className: "w-4 h-4" }) }),
|
|
27973
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Italic, { className: "w-4 h-4" }) }),
|
|
27639
27974
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27640
27975
|
ToolbarButton,
|
|
27641
27976
|
{
|
|
27642
27977
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
27643
27978
|
active: editor.isActive("bulletList"),
|
|
27644
27979
|
title: t("toolbar.bulletList"),
|
|
27645
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27980
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.List, { className: "w-4 h-4" })
|
|
27646
27981
|
}
|
|
27647
27982
|
)
|
|
27648
27983
|
] });
|
|
@@ -27653,15 +27988,15 @@ var EditorToolbar = ({
|
|
|
27653
27988
|
{
|
|
27654
27989
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
27655
27990
|
}, title: t("toolbar.fontFamily"), className: "px-1.5 w-auto gap-0.5", children: [
|
|
27656
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27657
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27991
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Baseline, { className: "w-4 h-4" }),
|
|
27992
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
|
|
27658
27993
|
] }),
|
|
27659
27994
|
contentClassName: "max-h-80 overflow-y-auto min-w-56 p-2",
|
|
27660
27995
|
children: [
|
|
27661
27996
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27662
27997
|
DropdownMenuItem,
|
|
27663
27998
|
{
|
|
27664
|
-
icon:
|
|
27999
|
+
icon: import_lucide_react48.Type,
|
|
27665
28000
|
label: t("toolbar.fontDefault"),
|
|
27666
28001
|
onClick: () => editor.chain().focus().unsetFontFamily().run(),
|
|
27667
28002
|
active: !currentFontFamily
|
|
@@ -27686,17 +28021,17 @@ var EditorToolbar = ({
|
|
|
27686
28021
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
27687
28022
|
}, title: t("toolbar.fontSize"), className: "px-1.5 w-auto gap-0.5", children: [
|
|
27688
28023
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex items-center gap-0.5", children: [
|
|
27689
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28024
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronsUpDown, { className: "h-3 w-3 text-muted-foreground", strokeWidth: 2.5 }),
|
|
27690
28025
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-xs font-bold leading-none", children: "A" })
|
|
27691
28026
|
] }),
|
|
27692
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28027
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
|
|
27693
28028
|
] }),
|
|
27694
28029
|
contentClassName: "max-h-80 overflow-y-auto min-w-32 p-2",
|
|
27695
28030
|
children: [
|
|
27696
28031
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27697
28032
|
DropdownMenuItem,
|
|
27698
28033
|
{
|
|
27699
|
-
icon:
|
|
28034
|
+
icon: import_lucide_react48.Type,
|
|
27700
28035
|
label: t("toolbar.sizeDefault"),
|
|
27701
28036
|
onClick: () => editor.chain().focus().unsetFontSize().run(),
|
|
27702
28037
|
active: !currentFontSize
|
|
@@ -27720,14 +28055,14 @@ var EditorToolbar = ({
|
|
|
27720
28055
|
contentClassName: "p-1",
|
|
27721
28056
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
27722
28057
|
}, title: t("toolbar.textStyle"), className: "px-1.5 w-auto gap-0.5", children: [
|
|
27723
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27724
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28058
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Type, { className: "w-4 h-4" }),
|
|
28059
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "h-3 w-3 text-muted-foreground" })
|
|
27725
28060
|
] }),
|
|
27726
28061
|
children: [
|
|
27727
28062
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27728
28063
|
DropdownMenuItem,
|
|
27729
28064
|
{
|
|
27730
|
-
icon:
|
|
28065
|
+
icon: import_lucide_react48.Type,
|
|
27731
28066
|
label: t("toolbar.normal"),
|
|
27732
28067
|
onClick: () => editor.chain().focus().setParagraph().run(),
|
|
27733
28068
|
active: editor.isActive("paragraph")
|
|
@@ -27736,7 +28071,7 @@ var EditorToolbar = ({
|
|
|
27736
28071
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27737
28072
|
DropdownMenuItem,
|
|
27738
28073
|
{
|
|
27739
|
-
icon:
|
|
28074
|
+
icon: import_lucide_react48.Heading1,
|
|
27740
28075
|
label: t("toolbar.heading1"),
|
|
27741
28076
|
onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
27742
28077
|
active: editor.isActive("heading", { level: 1 }),
|
|
@@ -27746,7 +28081,7 @@ var EditorToolbar = ({
|
|
|
27746
28081
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27747
28082
|
DropdownMenuItem,
|
|
27748
28083
|
{
|
|
27749
|
-
icon:
|
|
28084
|
+
icon: import_lucide_react48.Heading2,
|
|
27750
28085
|
label: t("toolbar.heading2"),
|
|
27751
28086
|
onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
27752
28087
|
active: editor.isActive("heading", { level: 2 }),
|
|
@@ -27756,7 +28091,7 @@ var EditorToolbar = ({
|
|
|
27756
28091
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27757
28092
|
DropdownMenuItem,
|
|
27758
28093
|
{
|
|
27759
|
-
icon:
|
|
28094
|
+
icon: import_lucide_react48.Heading3,
|
|
27760
28095
|
label: t("toolbar.heading3"),
|
|
27761
28096
|
onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
27762
28097
|
active: editor.isActive("heading", { level: 3 }),
|
|
@@ -27771,15 +28106,15 @@ var EditorToolbar = ({
|
|
|
27771
28106
|
{
|
|
27772
28107
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
27773
28108
|
}, title: t("toolbar.lineHeight"), className: "gap-0.5", children: [
|
|
27774
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27775
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28109
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ArrowUp, { className: "w-3 h-3" }),
|
|
28110
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ArrowDown, { className: "w-3 h-3" })
|
|
27776
28111
|
] }),
|
|
27777
28112
|
contentClassName: "max-h-72 overflow-y-auto p-1",
|
|
27778
28113
|
children: [
|
|
27779
28114
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27780
28115
|
DropdownMenuItem,
|
|
27781
28116
|
{
|
|
27782
|
-
icon:
|
|
28117
|
+
icon: import_lucide_react48.Type,
|
|
27783
28118
|
label: t("toolbar.lineHeightDefault"),
|
|
27784
28119
|
onClick: () => editor.chain().focus().unsetLineHeight().run(),
|
|
27785
28120
|
active: !currentLineHeight
|
|
@@ -27802,15 +28137,15 @@ var EditorToolbar = ({
|
|
|
27802
28137
|
{
|
|
27803
28138
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
27804
28139
|
}, title: t("toolbar.letterSpacing"), className: "gap-0.5", children: [
|
|
27805
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27806
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28140
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ArrowLeft, { className: "w-3 h-3" }),
|
|
28141
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ArrowRight, { className: "w-3 h-3" })
|
|
27807
28142
|
] }),
|
|
27808
28143
|
contentClassName: "max-h-72 overflow-y-auto p-1",
|
|
27809
28144
|
children: [
|
|
27810
28145
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27811
28146
|
DropdownMenuItem,
|
|
27812
28147
|
{
|
|
27813
|
-
icon:
|
|
28148
|
+
icon: import_lucide_react48.Type,
|
|
27814
28149
|
label: t("toolbar.letterSpacingDefault"),
|
|
27815
28150
|
onClick: () => editor.chain().focus().unsetLetterSpacing().run(),
|
|
27816
28151
|
active: !currentLetterSpacing
|
|
@@ -27829,26 +28164,26 @@ var EditorToolbar = ({
|
|
|
27829
28164
|
}
|
|
27830
28165
|
),
|
|
27831
28166
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarDivider, {}),
|
|
27832
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27833
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28167
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Bold, { className: "w-4 h-4" }) }),
|
|
28168
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Italic, { className: "w-4 h-4" }) }),
|
|
27834
28169
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27835
28170
|
ToolbarButton,
|
|
27836
28171
|
{
|
|
27837
28172
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
27838
28173
|
active: editor.isActive("underline"),
|
|
27839
28174
|
title: t("toolbar.underline"),
|
|
27840
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28175
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Underline, { className: "w-4 h-4" })
|
|
27841
28176
|
}
|
|
27842
28177
|
),
|
|
27843
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27844
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28178
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Strikethrough, { className: "w-4 h-4" }) }),
|
|
28179
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Code, { className: "w-4 h-4" }) }),
|
|
27845
28180
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27846
28181
|
ToolbarButton,
|
|
27847
28182
|
{
|
|
27848
28183
|
onClick: () => editor.chain().focus().toggleSubscript().run(),
|
|
27849
28184
|
active: editor.isActive("subscript"),
|
|
27850
28185
|
title: t("toolbar.subscript"),
|
|
27851
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28186
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Subscript, { className: "w-4 h-4" })
|
|
27852
28187
|
}
|
|
27853
28188
|
),
|
|
27854
28189
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
@@ -27857,14 +28192,14 @@ var EditorToolbar = ({
|
|
|
27857
28192
|
onClick: () => editor.chain().focus().toggleSuperscript().run(),
|
|
27858
28193
|
active: editor.isActive("superscript"),
|
|
27859
28194
|
title: t("toolbar.superscript"),
|
|
27860
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Superscript, { className: "w-4 h-4" })
|
|
27861
28196
|
}
|
|
27862
28197
|
),
|
|
27863
28198
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27864
28199
|
DropdownMenu,
|
|
27865
28200
|
{
|
|
27866
28201
|
contentClassName: "min-w-72",
|
|
27867
|
-
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28202
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => setShowLinkInput(!editor.isActive("link")), active: editor.isActive("link"), title: t("toolbar.link"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Link, { className: "w-4 h-4" }) }),
|
|
27868
28203
|
children: showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27869
28204
|
LinkInput,
|
|
27870
28205
|
{
|
|
@@ -27876,11 +28211,11 @@ var EditorToolbar = ({
|
|
|
27876
28211
|
onCancel: () => setShowLinkInput(false)
|
|
27877
28212
|
}
|
|
27878
28213
|
) : /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
27879
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { icon:
|
|
28214
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { icon: import_lucide_react48.Link, label: t("toolbar.link"), onClick: () => setShowLinkInput(true), active: editor.isActive("link") }),
|
|
27880
28215
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27881
28216
|
DropdownMenuItem,
|
|
27882
28217
|
{
|
|
27883
|
-
icon:
|
|
28218
|
+
icon: import_lucide_react48.Trash2,
|
|
27884
28219
|
label: t("toolbar.removeLink"),
|
|
27885
28220
|
onClick: () => editor.chain().focus().extendMarkRange("link").unsetLink().run(),
|
|
27886
28221
|
disabled: !editor.isActive("link"),
|
|
@@ -27897,7 +28232,7 @@ var EditorToolbar = ({
|
|
|
27897
28232
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
27898
28233
|
}, title: t("colors.textColor"), children: [
|
|
27899
28234
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TextColorIcon, { color: currentTextColor }),
|
|
27900
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28235
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "w-3 h-3" })
|
|
27901
28236
|
] }),
|
|
27902
28237
|
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27903
28238
|
EditorColorPalette,
|
|
@@ -27922,7 +28257,7 @@ var EditorToolbar = ({
|
|
|
27922
28257
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
27923
28258
|
}, active: editor.isActive("highlight"), title: t("colors.highlight"), children: [
|
|
27924
28259
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(HighlightColorIcon, { color: currentHighlightColor }),
|
|
27925
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28260
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "w-3 h-3" })
|
|
27926
28261
|
] }),
|
|
27927
28262
|
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27928
28263
|
EditorColorPalette,
|
|
@@ -27947,7 +28282,7 @@ var EditorToolbar = ({
|
|
|
27947
28282
|
{
|
|
27948
28283
|
contentClassName: "p-0 overflow-hidden",
|
|
27949
28284
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => {
|
|
27950
|
-
}, title: t("toolbar.emoji"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28285
|
+
}, title: t("toolbar.emoji"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Smile, { className: "w-4 h-4" }) }),
|
|
27951
28286
|
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27952
28287
|
EmojiPicker2,
|
|
27953
28288
|
{
|
|
@@ -27964,14 +28299,14 @@ var EditorToolbar = ({
|
|
|
27964
28299
|
{
|
|
27965
28300
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
27966
28301
|
}, title: t("toolbar.alignment"), children: [
|
|
27967
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27968
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28302
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.AlignLeft, { className: "w-4 h-4" }),
|
|
28303
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "w-3 h-3" })
|
|
27969
28304
|
] }),
|
|
27970
28305
|
children: [
|
|
27971
28306
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27972
28307
|
DropdownMenuItem,
|
|
27973
28308
|
{
|
|
27974
|
-
icon:
|
|
28309
|
+
icon: import_lucide_react48.AlignLeft,
|
|
27975
28310
|
label: t("toolbar.alignLeft"),
|
|
27976
28311
|
onClick: () => editor.chain().focus().setTextAlign("left").run(),
|
|
27977
28312
|
active: editor.isActive({ textAlign: "left" })
|
|
@@ -27980,7 +28315,7 @@ var EditorToolbar = ({
|
|
|
27980
28315
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27981
28316
|
DropdownMenuItem,
|
|
27982
28317
|
{
|
|
27983
|
-
icon:
|
|
28318
|
+
icon: import_lucide_react48.AlignCenter,
|
|
27984
28319
|
label: t("toolbar.alignCenter"),
|
|
27985
28320
|
onClick: () => editor.chain().focus().setTextAlign("center").run(),
|
|
27986
28321
|
active: editor.isActive({ textAlign: "center" })
|
|
@@ -27989,7 +28324,7 @@ var EditorToolbar = ({
|
|
|
27989
28324
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27990
28325
|
DropdownMenuItem,
|
|
27991
28326
|
{
|
|
27992
|
-
icon:
|
|
28327
|
+
icon: import_lucide_react48.AlignRight,
|
|
27993
28328
|
label: t("toolbar.alignRight"),
|
|
27994
28329
|
onClick: () => editor.chain().focus().setTextAlign("right").run(),
|
|
27995
28330
|
active: editor.isActive({ textAlign: "right" })
|
|
@@ -27998,7 +28333,7 @@ var EditorToolbar = ({
|
|
|
27998
28333
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
27999
28334
|
DropdownMenuItem,
|
|
28000
28335
|
{
|
|
28001
|
-
icon:
|
|
28336
|
+
icon: import_lucide_react48.AlignJustify,
|
|
28002
28337
|
label: t("toolbar.justify"),
|
|
28003
28338
|
onClick: () => editor.chain().focus().setTextAlign("justify").run(),
|
|
28004
28339
|
active: editor.isActive({ textAlign: "justify" })
|
|
@@ -28013,14 +28348,14 @@ var EditorToolbar = ({
|
|
|
28013
28348
|
{
|
|
28014
28349
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
28015
28350
|
}, title: t("toolbar.bulletList"), children: [
|
|
28016
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28017
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28351
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.List, { className: "w-4 h-4" }),
|
|
28352
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "w-3 h-3" })
|
|
28018
28353
|
] }),
|
|
28019
28354
|
children: [
|
|
28020
28355
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28021
28356
|
DropdownMenuItem,
|
|
28022
28357
|
{
|
|
28023
|
-
icon:
|
|
28358
|
+
icon: import_lucide_react48.List,
|
|
28024
28359
|
label: t("toolbar.bulletList"),
|
|
28025
28360
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
28026
28361
|
active: editor.isActive("bulletList"),
|
|
@@ -28030,7 +28365,7 @@ var EditorToolbar = ({
|
|
|
28030
28365
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28031
28366
|
DropdownMenuItem,
|
|
28032
28367
|
{
|
|
28033
|
-
icon:
|
|
28368
|
+
icon: import_lucide_react48.ListOrdered,
|
|
28034
28369
|
label: t("toolbar.orderedList"),
|
|
28035
28370
|
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
28036
28371
|
active: editor.isActive("orderedList"),
|
|
@@ -28040,7 +28375,7 @@ var EditorToolbar = ({
|
|
|
28040
28375
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28041
28376
|
DropdownMenuItem,
|
|
28042
28377
|
{
|
|
28043
|
-
icon:
|
|
28378
|
+
icon: import_lucide_react48.ListTodo,
|
|
28044
28379
|
label: t("toolbar.taskList"),
|
|
28045
28380
|
onClick: () => editor.chain().focus().toggleTaskList().run(),
|
|
28046
28381
|
active: editor.isActive("taskList"),
|
|
@@ -28055,14 +28390,14 @@ var EditorToolbar = ({
|
|
|
28055
28390
|
{
|
|
28056
28391
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
28057
28392
|
}, title: t("toolbar.quote"), children: [
|
|
28058
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28059
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28393
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Quote, { className: "w-4 h-4" }),
|
|
28394
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "w-3 h-3" })
|
|
28060
28395
|
] }),
|
|
28061
28396
|
children: [
|
|
28062
28397
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28063
28398
|
DropdownMenuItem,
|
|
28064
28399
|
{
|
|
28065
|
-
icon:
|
|
28400
|
+
icon: import_lucide_react48.Quote,
|
|
28066
28401
|
label: t("toolbar.quote"),
|
|
28067
28402
|
onClick: () => editor.chain().focus().toggleBlockquote().run(),
|
|
28068
28403
|
active: editor.isActive("blockquote"),
|
|
@@ -28072,7 +28407,7 @@ var EditorToolbar = ({
|
|
|
28072
28407
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28073
28408
|
DropdownMenuItem,
|
|
28074
28409
|
{
|
|
28075
|
-
icon:
|
|
28410
|
+
icon: import_lucide_react48.FileCode,
|
|
28076
28411
|
label: t("toolbar.codeBlock"),
|
|
28077
28412
|
onClick: () => editor.chain().focus().toggleCodeBlock().run(),
|
|
28078
28413
|
active: editor.isActive("codeBlock"),
|
|
@@ -28087,8 +28422,8 @@ var EditorToolbar = ({
|
|
|
28087
28422
|
{
|
|
28088
28423
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
28089
28424
|
}, title: t("toolbar.image"), children: [
|
|
28090
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28091
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28425
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Image, { className: "w-4 h-4" }),
|
|
28426
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "w-3 h-3" })
|
|
28092
28427
|
] }),
|
|
28093
28428
|
children: showImageInput ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28094
28429
|
ImageInput,
|
|
@@ -28100,11 +28435,11 @@ var EditorToolbar = ({
|
|
|
28100
28435
|
onCancel: () => setShowImageInput(false)
|
|
28101
28436
|
}
|
|
28102
28437
|
) : /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
|
|
28103
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { icon:
|
|
28438
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { icon: import_lucide_react48.Link, label: t("imageInput.addFromUrl"), onClick: () => setShowImageInput(true) }),
|
|
28104
28439
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28105
28440
|
DropdownMenuItem,
|
|
28106
28441
|
{
|
|
28107
|
-
icon:
|
|
28442
|
+
icon: import_lucide_react48.Upload,
|
|
28108
28443
|
label: isUploadingImage ? t("imageInput.uploading") : t("imageInput.uploadTab"),
|
|
28109
28444
|
disabled: isUploadingImage,
|
|
28110
28445
|
onClick: () => fileInputRef.current?.click()
|
|
@@ -28130,7 +28465,7 @@ var EditorToolbar = ({
|
|
|
28130
28465
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28131
28466
|
DropdownMenuItem,
|
|
28132
28467
|
{
|
|
28133
|
-
icon:
|
|
28468
|
+
icon: import_lucide_react48.AlignCenter,
|
|
28134
28469
|
label: t("toolbar.imageLayoutBlock"),
|
|
28135
28470
|
onClick: () => applyImageLayout(editor, "block"),
|
|
28136
28471
|
active: isImageSelected && imageLayout === "block",
|
|
@@ -28140,7 +28475,7 @@ var EditorToolbar = ({
|
|
|
28140
28475
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28141
28476
|
DropdownMenuItem,
|
|
28142
28477
|
{
|
|
28143
|
-
icon:
|
|
28478
|
+
icon: import_lucide_react48.AlignLeft,
|
|
28144
28479
|
label: t("toolbar.imageLayoutLeft"),
|
|
28145
28480
|
onClick: () => applyImageLayout(editor, "left"),
|
|
28146
28481
|
active: isImageSelected && imageLayout === "left",
|
|
@@ -28150,7 +28485,7 @@ var EditorToolbar = ({
|
|
|
28150
28485
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28151
28486
|
DropdownMenuItem,
|
|
28152
28487
|
{
|
|
28153
|
-
icon:
|
|
28488
|
+
icon: import_lucide_react48.AlignRight,
|
|
28154
28489
|
label: t("toolbar.imageLayoutRight"),
|
|
28155
28490
|
onClick: () => applyImageLayout(editor, "right"),
|
|
28156
28491
|
active: isImageSelected && imageLayout === "right",
|
|
@@ -28189,7 +28524,7 @@ var EditorToolbar = ({
|
|
|
28189
28524
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28190
28525
|
DropdownMenuItem,
|
|
28191
28526
|
{
|
|
28192
|
-
icon:
|
|
28527
|
+
icon: import_lucide_react48.RotateCcw,
|
|
28193
28528
|
label: t("toolbar.imageResetSize"),
|
|
28194
28529
|
onClick: () => resetImageSize(editor),
|
|
28195
28530
|
disabled: !isImageSelected
|
|
@@ -28198,7 +28533,7 @@ var EditorToolbar = ({
|
|
|
28198
28533
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28199
28534
|
DropdownMenuItem,
|
|
28200
28535
|
{
|
|
28201
|
-
icon:
|
|
28536
|
+
icon: import_lucide_react48.Trash2,
|
|
28202
28537
|
label: t("toolbar.imageDelete"),
|
|
28203
28538
|
onClick: () => deleteSelectedImage(editor),
|
|
28204
28539
|
disabled: !isImageSelected,
|
|
@@ -28218,8 +28553,8 @@ var EditorToolbar = ({
|
|
|
28218
28553
|
},
|
|
28219
28554
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(ToolbarButton, { onClick: () => {
|
|
28220
28555
|
}, title: t("toolbar.table"), children: [
|
|
28221
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28222
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28556
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Table, { className: "w-4 h-4" }),
|
|
28557
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.ChevronDown, { className: "w-3 h-3" })
|
|
28223
28558
|
] }),
|
|
28224
28559
|
contentClassName: "p-2 min-w-56",
|
|
28225
28560
|
children: [
|
|
@@ -28238,7 +28573,7 @@ var EditorToolbar = ({
|
|
|
28238
28573
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28239
28574
|
DropdownMenuItem,
|
|
28240
28575
|
{
|
|
28241
|
-
icon:
|
|
28576
|
+
icon: import_lucide_react48.AlignLeft,
|
|
28242
28577
|
label: t("tableMenu.alignLeft"),
|
|
28243
28578
|
onClick: () => applyTableAlignment(editor, "left", tableCommandAnchorPos),
|
|
28244
28579
|
active: hasTableContext && currentTableAlign === "left",
|
|
@@ -28248,7 +28583,7 @@ var EditorToolbar = ({
|
|
|
28248
28583
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28249
28584
|
DropdownMenuItem,
|
|
28250
28585
|
{
|
|
28251
|
-
icon:
|
|
28586
|
+
icon: import_lucide_react48.AlignCenter,
|
|
28252
28587
|
label: t("tableMenu.alignCenter"),
|
|
28253
28588
|
onClick: () => applyTableAlignment(editor, "center", tableCommandAnchorPos),
|
|
28254
28589
|
active: hasTableContext && currentTableAlign === "center",
|
|
@@ -28258,7 +28593,7 @@ var EditorToolbar = ({
|
|
|
28258
28593
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28259
28594
|
DropdownMenuItem,
|
|
28260
28595
|
{
|
|
28261
|
-
icon:
|
|
28596
|
+
icon: import_lucide_react48.AlignRight,
|
|
28262
28597
|
label: t("tableMenu.alignRight"),
|
|
28263
28598
|
onClick: () => applyTableAlignment(editor, "right", tableCommandAnchorPos),
|
|
28264
28599
|
active: hasTableContext && currentTableAlign === "right",
|
|
@@ -28269,7 +28604,7 @@ var EditorToolbar = ({
|
|
|
28269
28604
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28270
28605
|
DropdownMenuItem,
|
|
28271
28606
|
{
|
|
28272
|
-
icon:
|
|
28607
|
+
icon: import_lucide_react48.ArrowLeft,
|
|
28273
28608
|
label: t("tableMenu.addColumnBefore"),
|
|
28274
28609
|
onClick: () => editor.chain().focus().addColumnBefore().run(),
|
|
28275
28610
|
disabled: !hasTableContext || !editor.can().addColumnBefore()
|
|
@@ -28278,7 +28613,7 @@ var EditorToolbar = ({
|
|
|
28278
28613
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28279
28614
|
DropdownMenuItem,
|
|
28280
28615
|
{
|
|
28281
|
-
icon:
|
|
28616
|
+
icon: import_lucide_react48.ArrowDown,
|
|
28282
28617
|
label: t("tableMenu.addColumnAfter"),
|
|
28283
28618
|
onClick: () => editor.chain().focus().addColumnAfter().run(),
|
|
28284
28619
|
disabled: !hasTableContext || !editor.can().addColumnAfter()
|
|
@@ -28287,7 +28622,7 @@ var EditorToolbar = ({
|
|
|
28287
28622
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28288
28623
|
DropdownMenuItem,
|
|
28289
28624
|
{
|
|
28290
|
-
icon:
|
|
28625
|
+
icon: import_lucide_react48.ArrowUp,
|
|
28291
28626
|
label: t("tableMenu.addRowBefore"),
|
|
28292
28627
|
onClick: () => editor.chain().focus().addRowBefore().run(),
|
|
28293
28628
|
disabled: !hasTableContext || !editor.can().addRowBefore()
|
|
@@ -28296,7 +28631,7 @@ var EditorToolbar = ({
|
|
|
28296
28631
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28297
28632
|
DropdownMenuItem,
|
|
28298
28633
|
{
|
|
28299
|
-
icon:
|
|
28634
|
+
icon: import_lucide_react48.ArrowRight,
|
|
28300
28635
|
label: t("tableMenu.addRowAfter"),
|
|
28301
28636
|
onClick: () => editor.chain().focus().addRowAfter().run(),
|
|
28302
28637
|
disabled: !hasTableContext || !editor.can().addRowAfter()
|
|
@@ -28306,7 +28641,7 @@ var EditorToolbar = ({
|
|
|
28306
28641
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28307
28642
|
DropdownMenuItem,
|
|
28308
28643
|
{
|
|
28309
|
-
icon:
|
|
28644
|
+
icon: import_lucide_react48.Table,
|
|
28310
28645
|
label: t("tableMenu.toggleHeaderRow"),
|
|
28311
28646
|
onClick: () => editor.chain().focus().toggleHeaderRow().run(),
|
|
28312
28647
|
disabled: !hasTableContext || !editor.can().toggleHeaderRow()
|
|
@@ -28315,7 +28650,7 @@ var EditorToolbar = ({
|
|
|
28315
28650
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28316
28651
|
DropdownMenuItem,
|
|
28317
28652
|
{
|
|
28318
|
-
icon:
|
|
28653
|
+
icon: import_lucide_react48.Table,
|
|
28319
28654
|
label: t("tableMenu.toggleHeaderColumn"),
|
|
28320
28655
|
onClick: () => editor.chain().focus().toggleHeaderColumn().run(),
|
|
28321
28656
|
disabled: !hasTableContext || !editor.can().toggleHeaderColumn()
|
|
@@ -28325,7 +28660,7 @@ var EditorToolbar = ({
|
|
|
28325
28660
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28326
28661
|
DropdownMenuItem,
|
|
28327
28662
|
{
|
|
28328
|
-
icon:
|
|
28663
|
+
icon: import_lucide_react48.Trash2,
|
|
28329
28664
|
label: t("tableMenu.deleteColumn"),
|
|
28330
28665
|
onClick: () => editor.chain().focus().deleteColumn().run(),
|
|
28331
28666
|
disabled: !hasTableContext || !editor.can().deleteColumn()
|
|
@@ -28334,7 +28669,7 @@ var EditorToolbar = ({
|
|
|
28334
28669
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28335
28670
|
DropdownMenuItem,
|
|
28336
28671
|
{
|
|
28337
|
-
icon:
|
|
28672
|
+
icon: import_lucide_react48.Trash2,
|
|
28338
28673
|
label: t("tableMenu.deleteRow"),
|
|
28339
28674
|
onClick: () => editor.chain().focus().deleteRow().run(),
|
|
28340
28675
|
disabled: !hasTableContext || !editor.can().deleteRow()
|
|
@@ -28343,7 +28678,7 @@ var EditorToolbar = ({
|
|
|
28343
28678
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28344
28679
|
DropdownMenuItem,
|
|
28345
28680
|
{
|
|
28346
|
-
icon:
|
|
28681
|
+
icon: import_lucide_react48.Trash2,
|
|
28347
28682
|
label: t("tableMenu.deleteTable"),
|
|
28348
28683
|
onClick: () => editor.chain().focus().deleteTable().run(),
|
|
28349
28684
|
disabled: !hasTableContext || !editor.can().deleteTable()
|
|
@@ -28353,8 +28688,8 @@ var EditorToolbar = ({
|
|
|
28353
28688
|
}
|
|
28354
28689
|
),
|
|
28355
28690
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarDivider, {}),
|
|
28356
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28357
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
28691
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Undo, { className: "w-4 h-4" }) }),
|
|
28692
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_lucide_react48.Redo, { className: "w-4 h-4" }) })
|
|
28358
28693
|
] });
|
|
28359
28694
|
};
|
|
28360
28695
|
|
|
@@ -28363,7 +28698,7 @@ var import_react62 = require("react");
|
|
|
28363
28698
|
var import_react63 = require("@tiptap/react");
|
|
28364
28699
|
var import_tables2 = require("@tiptap/pm/tables");
|
|
28365
28700
|
var import_react_dom8 = require("react-dom");
|
|
28366
|
-
var
|
|
28701
|
+
var import_lucide_react49 = require("lucide-react");
|
|
28367
28702
|
|
|
28368
28703
|
// src/components/UEditor/table-cell-commands.ts
|
|
28369
28704
|
var import_state7 = require("@tiptap/pm/state");
|
|
@@ -28636,7 +28971,7 @@ var FloatingMenuContent = ({ editor }) => {
|
|
|
28636
28971
|
onClick: () => setShowCommands(true),
|
|
28637
28972
|
className: "flex items-center gap-1 px-2 py-1.5 rounded-lg hover:bg-accent transition-all group",
|
|
28638
28973
|
children: [
|
|
28639
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
28974
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Plus, { className: "w-4 h-4 text-muted-foreground group-hover:text-foreground" }),
|
|
28640
28975
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-sm text-muted-foreground group-hover:text-foreground", children: t("floatingMenu.addBlock") })
|
|
28641
28976
|
]
|
|
28642
28977
|
}
|
|
@@ -28879,22 +29214,22 @@ var BubbleMenuContent = ({
|
|
|
28879
29214
|
}
|
|
28880
29215
|
if (isImageSelected) {
|
|
28881
29216
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-0.5 p-1", children: [
|
|
28882
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "block"), active: imageLayout === "block", title: t("toolbar.imageLayoutBlock"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
28883
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "left"), active: imageLayout === "left", title: t("toolbar.imageLayoutLeft"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
28884
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "right"), active: imageLayout === "right", title: t("toolbar.imageLayoutRight"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29217
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "block"), active: imageLayout === "block", title: t("toolbar.imageLayoutBlock"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.AlignCenter, { className: "w-4 h-4" }) }),
|
|
29218
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "left"), active: imageLayout === "left", title: t("toolbar.imageLayoutLeft"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.AlignLeft, { className: "w-4 h-4" }) }),
|
|
29219
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => applyImageLayout(editor, "right"), active: imageLayout === "right", title: t("toolbar.imageLayoutRight"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.AlignRight, { className: "w-4 h-4" }) }),
|
|
28885
29220
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
|
|
28886
29221
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "sm"), active: imageWidthPreset === "sm", title: t("toolbar.imageWidthSm"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-[10px] font-semibold", children: "S" }) }),
|
|
28887
29222
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "md"), active: imageWidthPreset === "md", title: t("toolbar.imageWidthMd"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-[10px] font-semibold", children: "M" }) }),
|
|
28888
29223
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => applyImageWidthPreset(editor, "lg"), active: imageWidthPreset === "lg", title: t("toolbar.imageWidthLg"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-[10px] font-semibold", children: "L" }) }),
|
|
28889
29224
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
|
|
28890
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => resetImageSize(editor), title: t("toolbar.imageResetSize"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29225
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => resetImageSize(editor), title: t("toolbar.imageResetSize"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.RotateCcw, { className: "w-4 h-4" }) }),
|
|
28891
29226
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
28892
29227
|
ToolbarButton,
|
|
28893
29228
|
{
|
|
28894
29229
|
onClick: () => deleteSelectedImage(editor),
|
|
28895
29230
|
title: t("toolbar.imageDelete"),
|
|
28896
29231
|
className: "text-destructive hover:text-destructive",
|
|
28897
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29232
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Trash2, { className: "w-4 h-4" })
|
|
28898
29233
|
}
|
|
28899
29234
|
)
|
|
28900
29235
|
] });
|
|
@@ -28952,7 +29287,7 @@ var BubbleMenuContent = ({
|
|
|
28952
29287
|
"flex h-full w-9 items-center justify-center border-l border-border/50 transition-colors hover:bg-muted",
|
|
28953
29288
|
showFontSizeOptions && "bg-primary/10 text-primary"
|
|
28954
29289
|
),
|
|
28955
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29290
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.ChevronDown, { className: "h-4 w-4" })
|
|
28956
29291
|
}
|
|
28957
29292
|
)
|
|
28958
29293
|
] }),
|
|
@@ -29031,7 +29366,7 @@ var BubbleMenuContent = ({
|
|
|
29031
29366
|
editor.isActive("subscript") ? "bg-primary/10 text-primary" : "bg-muted/40 text-foreground"
|
|
29032
29367
|
),
|
|
29033
29368
|
children: [
|
|
29034
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29369
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Subscript, { className: "h-4 w-4" }),
|
|
29035
29370
|
t("toolbar.subscript")
|
|
29036
29371
|
]
|
|
29037
29372
|
}
|
|
@@ -29046,7 +29381,7 @@ var BubbleMenuContent = ({
|
|
|
29046
29381
|
editor.isActive("superscript") ? "bg-primary/10 text-primary" : "bg-muted/40 text-foreground"
|
|
29047
29382
|
),
|
|
29048
29383
|
children: [
|
|
29049
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29384
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Superscript, { className: "h-4 w-4" }),
|
|
29050
29385
|
t("toolbar.superscript")
|
|
29051
29386
|
]
|
|
29052
29387
|
}
|
|
@@ -29056,19 +29391,19 @@ var BubbleMenuContent = ({
|
|
|
29056
29391
|
] });
|
|
29057
29392
|
}
|
|
29058
29393
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-0.5 p-1", children: [
|
|
29059
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29060
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29394
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Bold, { className: "w-4 h-4" }) }),
|
|
29395
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Italic, { className: "w-4 h-4" }) }),
|
|
29061
29396
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29062
29397
|
ToolbarButton,
|
|
29063
29398
|
{
|
|
29064
29399
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
29065
29400
|
active: editor.isActive("underline"),
|
|
29066
29401
|
title: t("toolbar.underline"),
|
|
29067
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29402
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Underline, { className: "w-4 h-4" })
|
|
29068
29403
|
}
|
|
29069
29404
|
),
|
|
29070
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29071
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29405
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Strikethrough, { className: "w-4 h-4" }) }),
|
|
29406
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Code, { className: "w-4 h-4" }) }),
|
|
29072
29407
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
|
|
29073
29408
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29074
29409
|
ToolbarButton,
|
|
@@ -29081,7 +29416,7 @@ var BubbleMenuContent = ({
|
|
|
29081
29416
|
},
|
|
29082
29417
|
active: editor.isActive("link"),
|
|
29083
29418
|
title: t("toolbar.link"),
|
|
29084
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29419
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Link, { className: "w-4 h-4" })
|
|
29085
29420
|
}
|
|
29086
29421
|
),
|
|
29087
29422
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: () => setActiveColorPalette("text"), title: t("colors.textColor"), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextColorIcon, { color: currentTextColor }) }),
|
|
@@ -29125,7 +29460,7 @@ var BubbleMenuContent = ({
|
|
|
29125
29460
|
active: canSplitCell,
|
|
29126
29461
|
disabled: !canMergeCells && !canSplitCell,
|
|
29127
29462
|
title: canSplitCell ? t("tableMenu.splitCell") || "Split cell" : t("tableMenu.mergeCells") || "Merge cells",
|
|
29128
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29463
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.TableCellsMerge, { className: "w-4 h-4" })
|
|
29129
29464
|
}
|
|
29130
29465
|
)
|
|
29131
29466
|
] }),
|
|
@@ -29135,7 +29470,7 @@ var BubbleMenuContent = ({
|
|
|
29135
29470
|
onClick: () => setShowTypographyPanel(true),
|
|
29136
29471
|
active: Boolean(currentFontSize || currentLineHeight || editor.isActive("subscript") || editor.isActive("superscript")),
|
|
29137
29472
|
title: t("toolbar.textStyle"),
|
|
29138
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29473
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Type, { className: "w-4 h-4" })
|
|
29139
29474
|
}
|
|
29140
29475
|
)
|
|
29141
29476
|
] });
|
|
@@ -29152,9 +29487,9 @@ var LinkPreviewContent = ({ editor, onEdit }) => {
|
|
|
29152
29487
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-1 p-1 max-w-sm", children: [
|
|
29153
29488
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "text-xs text-muted-foreground font-mono px-2 truncate max-w-[180px]", children: url }),
|
|
29154
29489
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w-px h-6 bg-border/50 mx-1" }),
|
|
29155
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: handleOpen, title: t("linkPreview.open") || "Open link", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29156
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: onEdit, title: t("linkPreview.edit") || "Edit link", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29157
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: handleUnlink, title: t("linkPreview.unlink") || "Remove link", className: "text-destructive hover:text-destructive", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
29490
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: handleOpen, title: t("linkPreview.open") || "Open link", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.ExternalLink, { className: "w-4 h-4" }) }),
|
|
29491
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: onEdit, title: t("linkPreview.edit") || "Edit link", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Edit2, { className: "w-4 h-4" }) }),
|
|
29492
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ToolbarButton, { onClick: handleUnlink, title: t("linkPreview.unlink") || "Remove link", className: "text-destructive hover:text-destructive", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_lucide_react49.Unlink, { className: "w-4 h-4" }) })
|
|
29158
29493
|
] });
|
|
29159
29494
|
};
|
|
29160
29495
|
var CustomBubbleMenu = ({
|
|
@@ -33900,7 +34235,7 @@ function atEndOfCell(view, axis, dir) {
|
|
|
33900
34235
|
var columnResizingPluginKey = new PluginKey4("tableColumnResizing");
|
|
33901
34236
|
|
|
33902
34237
|
// src/components/UEditor/table-controls.tsx
|
|
33903
|
-
var
|
|
34238
|
+
var import_lucide_react52 = require("lucide-react");
|
|
33904
34239
|
|
|
33905
34240
|
// src/components/UEditor/table-hover-state.ts
|
|
33906
34241
|
var MENU_HOVER_PADDING = 18;
|
|
@@ -34155,7 +34490,7 @@ function TableAddRails({
|
|
|
34155
34490
|
}
|
|
34156
34491
|
|
|
34157
34492
|
// src/components/UEditor/table-control-menu.tsx
|
|
34158
|
-
var
|
|
34493
|
+
var import_lucide_react50 = require("lucide-react");
|
|
34159
34494
|
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
34160
34495
|
function TableControlMenu({
|
|
34161
34496
|
controlsVisible,
|
|
@@ -34207,7 +34542,7 @@ function TableControlMenu({
|
|
|
34207
34542
|
transform: shown ? "scale(1)" : "scale(0.82)",
|
|
34208
34543
|
pointerEvents: shown ? "auto" : "none"
|
|
34209
34544
|
},
|
|
34210
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
34545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_lucide_react50.MoreHorizontal, { className: "h-4 w-4" })
|
|
34211
34546
|
}
|
|
34212
34547
|
)
|
|
34213
34548
|
}
|
|
@@ -34219,7 +34554,7 @@ function TableControlMenu({
|
|
|
34219
34554
|
}
|
|
34220
34555
|
|
|
34221
34556
|
// src/components/UEditor/table-axis-handles.tsx
|
|
34222
|
-
var
|
|
34557
|
+
var import_lucide_react51 = require("lucide-react");
|
|
34223
34558
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
34224
34559
|
var IDLE_HANDLE_SCALE = "0.78";
|
|
34225
34560
|
function TableRowHandles({
|
|
@@ -34281,7 +34616,7 @@ function TableRowHandles({
|
|
|
34281
34616
|
transform: isShown ? "scale(1)" : `scale(${IDLE_HANDLE_SCALE})`,
|
|
34282
34617
|
pointerEvents: isShown ? "auto" : "none"
|
|
34283
34618
|
},
|
|
34284
|
-
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
34619
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react51.GripVertical, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "h-3 w-1 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
|
|
34285
34620
|
}
|
|
34286
34621
|
)
|
|
34287
34622
|
}
|
|
@@ -34352,7 +34687,7 @@ function TableColumnHandles({
|
|
|
34352
34687
|
transform: isShown ? "scale(1)" : `scale(${IDLE_HANDLE_SCALE})`,
|
|
34353
34688
|
pointerEvents: isShown ? "auto" : "none"
|
|
34354
34689
|
},
|
|
34355
|
-
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
34690
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_lucide_react51.GripHorizontal, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "h-1 w-3 rounded-full bg-muted-foreground/50 hover:bg-muted-foreground" })
|
|
34356
34691
|
}
|
|
34357
34692
|
)
|
|
34358
34693
|
}
|
|
@@ -34928,64 +35263,64 @@ function TableControls({ editor, containerRef }) {
|
|
|
34928
35263
|
return [
|
|
34929
35264
|
{
|
|
34930
35265
|
label: t("tableMenu.alignLeft"),
|
|
34931
|
-
icon:
|
|
35266
|
+
icon: import_lucide_react52.AlignLeft,
|
|
34932
35267
|
onClick: () => applyTableAlignment(editor, "left", layout.cellPos)
|
|
34933
35268
|
},
|
|
34934
35269
|
{
|
|
34935
35270
|
label: t("tableMenu.alignCenter"),
|
|
34936
|
-
icon:
|
|
35271
|
+
icon: import_lucide_react52.AlignCenter,
|
|
34937
35272
|
onClick: () => applyTableAlignment(editor, "center", layout.cellPos)
|
|
34938
35273
|
},
|
|
34939
35274
|
{
|
|
34940
35275
|
label: t("tableMenu.alignRight"),
|
|
34941
|
-
icon:
|
|
35276
|
+
icon: import_lucide_react52.AlignRight,
|
|
34942
35277
|
onClick: () => applyTableAlignment(editor, "right", layout.cellPos)
|
|
34943
35278
|
},
|
|
34944
35279
|
{
|
|
34945
35280
|
label: t("tableMenu.addColumnBefore"),
|
|
34946
|
-
icon:
|
|
35281
|
+
icon: import_lucide_react52.ArrowLeft,
|
|
34947
35282
|
onClick: () => runAtActiveCell((chain) => chain.addColumnBefore())
|
|
34948
35283
|
},
|
|
34949
35284
|
{
|
|
34950
35285
|
label: t("tableMenu.addColumnAfter"),
|
|
34951
|
-
icon:
|
|
35286
|
+
icon: import_lucide_react52.ArrowRight,
|
|
34952
35287
|
onClick: () => runAtActiveCell((chain) => chain.addColumnAfter())
|
|
34953
35288
|
},
|
|
34954
35289
|
{
|
|
34955
35290
|
label: t("tableMenu.addRowBefore"),
|
|
34956
|
-
icon:
|
|
35291
|
+
icon: import_lucide_react52.ArrowUp,
|
|
34957
35292
|
onClick: () => runAtActiveCell((chain) => chain.addRowBefore())
|
|
34958
35293
|
},
|
|
34959
35294
|
{
|
|
34960
35295
|
label: t("tableMenu.addRowAfter"),
|
|
34961
|
-
icon:
|
|
35296
|
+
icon: import_lucide_react52.ArrowDown,
|
|
34962
35297
|
onClick: () => runAtActiveCell((chain) => chain.addRowAfter())
|
|
34963
35298
|
},
|
|
34964
35299
|
{
|
|
34965
35300
|
label: t("tableMenu.toggleHeaderRow"),
|
|
34966
|
-
icon:
|
|
35301
|
+
icon: import_lucide_react52.Table,
|
|
34967
35302
|
onClick: () => runAtActiveCell((chain) => chain.toggleHeaderRow())
|
|
34968
35303
|
},
|
|
34969
35304
|
{
|
|
34970
35305
|
label: t("tableMenu.toggleHeaderColumn"),
|
|
34971
|
-
icon:
|
|
35306
|
+
icon: import_lucide_react52.Table,
|
|
34972
35307
|
onClick: () => runAtActiveCell((chain) => chain.toggleHeaderColumn())
|
|
34973
35308
|
},
|
|
34974
35309
|
{
|
|
34975
35310
|
label: t("tableMenu.deleteColumn"),
|
|
34976
|
-
icon:
|
|
35311
|
+
icon: import_lucide_react52.Trash2,
|
|
34977
35312
|
onClick: () => runAtActiveCell((chain) => chain.deleteColumn()),
|
|
34978
35313
|
destructive: true
|
|
34979
35314
|
},
|
|
34980
35315
|
{
|
|
34981
35316
|
label: t("tableMenu.deleteRow"),
|
|
34982
|
-
icon:
|
|
35317
|
+
icon: import_lucide_react52.Trash2,
|
|
34983
35318
|
onClick: () => runAtActiveCell((chain) => chain.deleteRow()),
|
|
34984
35319
|
destructive: true
|
|
34985
35320
|
},
|
|
34986
35321
|
{
|
|
34987
35322
|
label: t("tableMenu.deleteTable"),
|
|
34988
|
-
icon:
|
|
35323
|
+
icon: import_lucide_react52.Trash2,
|
|
34989
35324
|
onClick: () => runAtActiveCell((chain) => chain.deleteTable()),
|
|
34990
35325
|
destructive: true
|
|
34991
35326
|
}
|
|
@@ -34994,27 +35329,27 @@ function TableControls({ editor, containerRef }) {
|
|
|
34994
35329
|
const getRowHandleMenuItems = import_react64.default.useCallback((rowHandle) => [
|
|
34995
35330
|
{
|
|
34996
35331
|
label: t("tableMenu.addRowBefore"),
|
|
34997
|
-
icon:
|
|
35332
|
+
icon: import_lucide_react52.ArrowUp,
|
|
34998
35333
|
onClick: () => runAtCellPos(rowHandle.cellPos, (chain) => chain.addRowBefore())
|
|
34999
35334
|
},
|
|
35000
35335
|
{
|
|
35001
35336
|
label: t("tableMenu.addRowAfter"),
|
|
35002
|
-
icon:
|
|
35337
|
+
icon: import_lucide_react52.ArrowDown,
|
|
35003
35338
|
onClick: () => runAtCellPos(rowHandle.cellPos, (chain) => chain.addRowAfter())
|
|
35004
35339
|
},
|
|
35005
35340
|
{
|
|
35006
35341
|
label: t("tableMenu.duplicateRow"),
|
|
35007
|
-
icon:
|
|
35342
|
+
icon: import_lucide_react52.Copy,
|
|
35008
35343
|
onClick: () => duplicateRowAt(rowHandle.index, rowHandle.cellPos)
|
|
35009
35344
|
},
|
|
35010
35345
|
{
|
|
35011
35346
|
label: t("tableMenu.clearRowContents"),
|
|
35012
|
-
icon:
|
|
35347
|
+
icon: import_lucide_react52.Table,
|
|
35013
35348
|
onClick: () => clearRowAt(rowHandle.index, rowHandle.cellPos)
|
|
35014
35349
|
},
|
|
35015
35350
|
{
|
|
35016
35351
|
label: t("tableMenu.deleteRow"),
|
|
35017
|
-
icon:
|
|
35352
|
+
icon: import_lucide_react52.Trash2,
|
|
35018
35353
|
onClick: () => runAtCellPos(rowHandle.cellPos, (chain) => chain.deleteRow()),
|
|
35019
35354
|
destructive: true
|
|
35020
35355
|
}
|
|
@@ -35022,27 +35357,27 @@ function TableControls({ editor, containerRef }) {
|
|
|
35022
35357
|
const getColumnHandleMenuItems = import_react64.default.useCallback((columnHandle) => [
|
|
35023
35358
|
{
|
|
35024
35359
|
label: t("tableMenu.addColumnBefore"),
|
|
35025
|
-
icon:
|
|
35360
|
+
icon: import_lucide_react52.ArrowLeft,
|
|
35026
35361
|
onClick: () => runAtCellPos(columnHandle.cellPos, (chain) => chain.addColumnBefore())
|
|
35027
35362
|
},
|
|
35028
35363
|
{
|
|
35029
35364
|
label: t("tableMenu.addColumnAfter"),
|
|
35030
|
-
icon:
|
|
35365
|
+
icon: import_lucide_react52.ArrowRight,
|
|
35031
35366
|
onClick: () => runAtCellPos(columnHandle.cellPos, (chain) => chain.addColumnAfter())
|
|
35032
35367
|
},
|
|
35033
35368
|
{
|
|
35034
35369
|
label: t("tableMenu.duplicateColumn"),
|
|
35035
|
-
icon:
|
|
35370
|
+
icon: import_lucide_react52.Copy,
|
|
35036
35371
|
onClick: () => duplicateColumnAt(columnHandle.index, columnHandle.cellPos)
|
|
35037
35372
|
},
|
|
35038
35373
|
{
|
|
35039
35374
|
label: t("tableMenu.clearColumnContents"),
|
|
35040
|
-
icon:
|
|
35375
|
+
icon: import_lucide_react52.Table,
|
|
35041
35376
|
onClick: () => clearColumnAt(columnHandle.index, columnHandle.cellPos)
|
|
35042
35377
|
},
|
|
35043
35378
|
{
|
|
35044
35379
|
label: t("tableMenu.deleteColumn"),
|
|
35045
|
-
icon:
|
|
35380
|
+
icon: import_lucide_react52.Trash2,
|
|
35046
35381
|
onClick: () => runAtCellPos(columnHandle.cellPos, (chain) => chain.deleteColumn()),
|
|
35047
35382
|
destructive: true
|
|
35048
35383
|
}
|
|
@@ -35722,9 +36057,703 @@ function useUEditorTableInteractions(editor, editable = true) {
|
|
|
35722
36057
|
};
|
|
35723
36058
|
}
|
|
35724
36059
|
|
|
35725
|
-
// src/components/UEditor/
|
|
36060
|
+
// src/components/UEditor/menu-bar.tsx
|
|
36061
|
+
var import_react67 = __toESM(require("react"), 1);
|
|
36062
|
+
var import_react68 = require("@tiptap/react");
|
|
36063
|
+
var import_lucide_react53 = require("lucide-react");
|
|
35726
36064
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
35727
|
-
|
|
36065
|
+
function renderMenuItems(items) {
|
|
36066
|
+
return items.map((item, i) => {
|
|
36067
|
+
switch (item.type) {
|
|
36068
|
+
case "separator":
|
|
36069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DropdownMenuSeparator, {}, i);
|
|
36070
|
+
case "action":
|
|
36071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36072
|
+
DropdownMenuItem,
|
|
36073
|
+
{
|
|
36074
|
+
label: item.label,
|
|
36075
|
+
icon: item.icon,
|
|
36076
|
+
shortcut: item.shortcut,
|
|
36077
|
+
onClick: item.onClick,
|
|
36078
|
+
disabled: item.disabled,
|
|
36079
|
+
active: item.active,
|
|
36080
|
+
destructive: item.destructive
|
|
36081
|
+
},
|
|
36082
|
+
i
|
|
36083
|
+
);
|
|
36084
|
+
case "sub":
|
|
36085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DropdownMenuSub, { label: item.label, icon: item.icon, disabled: item.disabled, children: renderMenuItems(item.items) }, i);
|
|
36086
|
+
case "custom":
|
|
36087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react67.default.Fragment, { children: item.render() }, item.key);
|
|
36088
|
+
}
|
|
36089
|
+
});
|
|
36090
|
+
}
|
|
36091
|
+
function buildFileMenuItems(t, editor, { onSave, onExport }) {
|
|
36092
|
+
return [
|
|
36093
|
+
{
|
|
36094
|
+
type: "action",
|
|
36095
|
+
label: t("menubar.save"),
|
|
36096
|
+
shortcut: "Ctrl+S",
|
|
36097
|
+
onClick: () => onSave?.(),
|
|
36098
|
+
disabled: !onSave
|
|
36099
|
+
},
|
|
36100
|
+
{
|
|
36101
|
+
type: "action",
|
|
36102
|
+
label: t("menubar.exportHtml"),
|
|
36103
|
+
onClick: () => {
|
|
36104
|
+
if (onExport) {
|
|
36105
|
+
onExport();
|
|
36106
|
+
} else {
|
|
36107
|
+
const html = editor.getHTML();
|
|
36108
|
+
const blob = new Blob([`<!DOCTYPE html><html><body>${html}</body></html>`], { type: "text/html" });
|
|
36109
|
+
const url = URL.createObjectURL(blob);
|
|
36110
|
+
const a = document.createElement("a");
|
|
36111
|
+
a.href = url;
|
|
36112
|
+
a.download = "document.html";
|
|
36113
|
+
a.click();
|
|
36114
|
+
URL.revokeObjectURL(url);
|
|
36115
|
+
}
|
|
36116
|
+
}
|
|
36117
|
+
}
|
|
36118
|
+
];
|
|
36119
|
+
}
|
|
36120
|
+
function buildEditMenuItems(t, editor) {
|
|
36121
|
+
return [
|
|
36122
|
+
{
|
|
36123
|
+
type: "action",
|
|
36124
|
+
label: t("menubar.undo"),
|
|
36125
|
+
icon: import_lucide_react53.Undo,
|
|
36126
|
+
shortcut: t("menubar.undoShortcut"),
|
|
36127
|
+
onClick: () => editor.chain().focus().undo().run(),
|
|
36128
|
+
disabled: !editor.can().undo()
|
|
36129
|
+
},
|
|
36130
|
+
{
|
|
36131
|
+
type: "action",
|
|
36132
|
+
label: t("menubar.redo"),
|
|
36133
|
+
icon: import_lucide_react53.Redo,
|
|
36134
|
+
shortcut: t("menubar.redoShortcut"),
|
|
36135
|
+
onClick: () => editor.chain().focus().redo().run(),
|
|
36136
|
+
disabled: !editor.can().redo()
|
|
36137
|
+
},
|
|
36138
|
+
{ type: "separator" },
|
|
36139
|
+
{
|
|
36140
|
+
type: "action",
|
|
36141
|
+
label: t("menubar.cut"),
|
|
36142
|
+
icon: import_lucide_react53.Scissors,
|
|
36143
|
+
shortcut: t("menubar.cutShortcut"),
|
|
36144
|
+
onClick: () => document.execCommand("cut")
|
|
36145
|
+
},
|
|
36146
|
+
{
|
|
36147
|
+
type: "action",
|
|
36148
|
+
label: t("menubar.copy"),
|
|
36149
|
+
shortcut: t("menubar.copyShortcut"),
|
|
36150
|
+
onClick: () => document.execCommand("copy")
|
|
36151
|
+
},
|
|
36152
|
+
{
|
|
36153
|
+
type: "action",
|
|
36154
|
+
label: t("menubar.paste"),
|
|
36155
|
+
shortcut: t("menubar.pasteShortcut"),
|
|
36156
|
+
onClick: () => document.execCommand("paste")
|
|
36157
|
+
},
|
|
36158
|
+
{
|
|
36159
|
+
type: "action",
|
|
36160
|
+
label: t("menubar.pasteAsText"),
|
|
36161
|
+
onClick: async () => {
|
|
36162
|
+
try {
|
|
36163
|
+
const text = await navigator.clipboard.readText();
|
|
36164
|
+
editor.chain().focus().insertContent(text).run();
|
|
36165
|
+
} catch {
|
|
36166
|
+
document.execCommand("paste");
|
|
36167
|
+
}
|
|
36168
|
+
}
|
|
36169
|
+
},
|
|
36170
|
+
{ type: "separator" },
|
|
36171
|
+
{
|
|
36172
|
+
type: "action",
|
|
36173
|
+
label: t("menubar.selectAll"),
|
|
36174
|
+
shortcut: t("menubar.selectAllShortcut"),
|
|
36175
|
+
onClick: () => editor.chain().focus().selectAll().run()
|
|
36176
|
+
}
|
|
36177
|
+
];
|
|
36178
|
+
}
|
|
36179
|
+
function buildViewMenuItems(t, {
|
|
36180
|
+
containerRef,
|
|
36181
|
+
onSourceCode,
|
|
36182
|
+
openSourceDialog,
|
|
36183
|
+
onPreview,
|
|
36184
|
+
openPreviewDialog
|
|
36185
|
+
}) {
|
|
36186
|
+
return [
|
|
36187
|
+
{
|
|
36188
|
+
type: "action",
|
|
36189
|
+
label: t("menubar.sourceCode"),
|
|
36190
|
+
icon: import_lucide_react53.FileCode,
|
|
36191
|
+
onClick: () => onSourceCode ? onSourceCode() : openSourceDialog()
|
|
36192
|
+
},
|
|
36193
|
+
{
|
|
36194
|
+
type: "action",
|
|
36195
|
+
label: t("menubar.preview"),
|
|
36196
|
+
onClick: () => onPreview ? onPreview() : openPreviewDialog()
|
|
36197
|
+
},
|
|
36198
|
+
{ type: "separator" },
|
|
36199
|
+
{
|
|
36200
|
+
type: "action",
|
|
36201
|
+
label: t("menubar.fullscreen"),
|
|
36202
|
+
icon: import_lucide_react53.Maximize2,
|
|
36203
|
+
shortcut: t("menubar.fullscreenShortcut"),
|
|
36204
|
+
onClick: () => {
|
|
36205
|
+
const el = containerRef.current;
|
|
36206
|
+
if (!el) return;
|
|
36207
|
+
if (!document.fullscreenElement) {
|
|
36208
|
+
el.requestFullscreen?.();
|
|
36209
|
+
} else {
|
|
36210
|
+
document.exitFullscreen?.();
|
|
36211
|
+
}
|
|
36212
|
+
}
|
|
36213
|
+
}
|
|
36214
|
+
];
|
|
36215
|
+
}
|
|
36216
|
+
function buildFormatMenuItems(t, editor) {
|
|
36217
|
+
return [
|
|
36218
|
+
{
|
|
36219
|
+
type: "action",
|
|
36220
|
+
label: t("menubar.bold"),
|
|
36221
|
+
icon: import_lucide_react53.Bold,
|
|
36222
|
+
shortcut: t("menubar.boldShortcut"),
|
|
36223
|
+
active: editor.isActive("bold"),
|
|
36224
|
+
onClick: () => editor.chain().focus().toggleBold().run()
|
|
36225
|
+
},
|
|
36226
|
+
{
|
|
36227
|
+
type: "action",
|
|
36228
|
+
label: t("menubar.italic"),
|
|
36229
|
+
icon: import_lucide_react53.Italic,
|
|
36230
|
+
shortcut: t("menubar.italicShortcut"),
|
|
36231
|
+
active: editor.isActive("italic"),
|
|
36232
|
+
onClick: () => editor.chain().focus().toggleItalic().run()
|
|
36233
|
+
},
|
|
36234
|
+
{
|
|
36235
|
+
type: "action",
|
|
36236
|
+
label: t("menubar.underline"),
|
|
36237
|
+
icon: import_lucide_react53.Underline,
|
|
36238
|
+
shortcut: t("menubar.underlineShortcut"),
|
|
36239
|
+
active: editor.isActive("underline"),
|
|
36240
|
+
onClick: () => editor.chain().focus().toggleUnderline().run()
|
|
36241
|
+
},
|
|
36242
|
+
{
|
|
36243
|
+
type: "action",
|
|
36244
|
+
label: t("menubar.strike"),
|
|
36245
|
+
icon: import_lucide_react53.Strikethrough,
|
|
36246
|
+
active: editor.isActive("strike"),
|
|
36247
|
+
onClick: () => editor.chain().focus().toggleStrike().run()
|
|
36248
|
+
},
|
|
36249
|
+
{
|
|
36250
|
+
type: "action",
|
|
36251
|
+
label: t("menubar.superscript"),
|
|
36252
|
+
icon: import_lucide_react53.Superscript,
|
|
36253
|
+
active: editor.isActive("superscript"),
|
|
36254
|
+
onClick: () => editor.chain().focus().toggleSuperscript().run()
|
|
36255
|
+
},
|
|
36256
|
+
{
|
|
36257
|
+
type: "action",
|
|
36258
|
+
label: t("menubar.subscript"),
|
|
36259
|
+
icon: import_lucide_react53.Subscript,
|
|
36260
|
+
active: editor.isActive("subscript"),
|
|
36261
|
+
onClick: () => editor.chain().focus().toggleSubscript().run()
|
|
36262
|
+
},
|
|
36263
|
+
{
|
|
36264
|
+
type: "action",
|
|
36265
|
+
label: t("menubar.code"),
|
|
36266
|
+
icon: import_lucide_react53.Code,
|
|
36267
|
+
active: editor.isActive("code"),
|
|
36268
|
+
onClick: () => editor.chain().focus().toggleCode().run()
|
|
36269
|
+
},
|
|
36270
|
+
{ type: "separator" },
|
|
36271
|
+
{
|
|
36272
|
+
type: "sub",
|
|
36273
|
+
label: t("menubar.wrap"),
|
|
36274
|
+
items: [
|
|
36275
|
+
{
|
|
36276
|
+
type: "action",
|
|
36277
|
+
label: t("menubar.paragraph"),
|
|
36278
|
+
active: editor.isActive("paragraph"),
|
|
36279
|
+
onClick: () => editor.chain().focus().setParagraph().run()
|
|
36280
|
+
},
|
|
36281
|
+
{
|
|
36282
|
+
type: "action",
|
|
36283
|
+
label: t("menubar.heading1"),
|
|
36284
|
+
icon: import_lucide_react53.Heading1,
|
|
36285
|
+
active: editor.isActive("heading", { level: 1 }),
|
|
36286
|
+
onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run()
|
|
36287
|
+
},
|
|
36288
|
+
{
|
|
36289
|
+
type: "action",
|
|
36290
|
+
label: t("menubar.heading2"),
|
|
36291
|
+
icon: import_lucide_react53.Heading2,
|
|
36292
|
+
active: editor.isActive("heading", { level: 2 }),
|
|
36293
|
+
onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run()
|
|
36294
|
+
},
|
|
36295
|
+
{
|
|
36296
|
+
type: "action",
|
|
36297
|
+
label: t("menubar.heading3"),
|
|
36298
|
+
icon: import_lucide_react53.Heading3,
|
|
36299
|
+
active: editor.isActive("heading", { level: 3 }),
|
|
36300
|
+
onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run()
|
|
36301
|
+
},
|
|
36302
|
+
{ type: "separator" },
|
|
36303
|
+
{
|
|
36304
|
+
type: "action",
|
|
36305
|
+
label: t("menubar.blockquote"),
|
|
36306
|
+
icon: import_lucide_react53.Quote,
|
|
36307
|
+
active: editor.isActive("blockquote"),
|
|
36308
|
+
onClick: () => editor.chain().focus().toggleBlockquote().run()
|
|
36309
|
+
},
|
|
36310
|
+
{
|
|
36311
|
+
type: "action",
|
|
36312
|
+
label: t("menubar.codeBlock"),
|
|
36313
|
+
icon: import_lucide_react53.FileCode,
|
|
36314
|
+
active: editor.isActive("codeBlock"),
|
|
36315
|
+
onClick: () => editor.chain().focus().toggleCodeBlock().run()
|
|
36316
|
+
},
|
|
36317
|
+
{
|
|
36318
|
+
type: "action",
|
|
36319
|
+
label: t("menubar.taskList"),
|
|
36320
|
+
icon: import_lucide_react53.ListTodo,
|
|
36321
|
+
active: editor.isActive("taskList"),
|
|
36322
|
+
onClick: () => editor.chain().focus().toggleTaskList().run()
|
|
36323
|
+
}
|
|
36324
|
+
]
|
|
36325
|
+
},
|
|
36326
|
+
{
|
|
36327
|
+
type: "sub",
|
|
36328
|
+
label: t("menubar.align"),
|
|
36329
|
+
items: [
|
|
36330
|
+
{
|
|
36331
|
+
type: "action",
|
|
36332
|
+
label: t("menubar.alignLeft"),
|
|
36333
|
+
icon: import_lucide_react53.AlignLeft,
|
|
36334
|
+
active: editor.isActive({ textAlign: "left" }),
|
|
36335
|
+
onClick: () => editor.chain().focus().setTextAlign("left").run()
|
|
36336
|
+
},
|
|
36337
|
+
{
|
|
36338
|
+
type: "action",
|
|
36339
|
+
label: t("menubar.alignCenter"),
|
|
36340
|
+
icon: import_lucide_react53.AlignCenter,
|
|
36341
|
+
active: editor.isActive({ textAlign: "center" }),
|
|
36342
|
+
onClick: () => editor.chain().focus().setTextAlign("center").run()
|
|
36343
|
+
},
|
|
36344
|
+
{
|
|
36345
|
+
type: "action",
|
|
36346
|
+
label: t("menubar.alignRight"),
|
|
36347
|
+
icon: import_lucide_react53.AlignRight,
|
|
36348
|
+
active: editor.isActive({ textAlign: "right" }),
|
|
36349
|
+
onClick: () => editor.chain().focus().setTextAlign("right").run()
|
|
36350
|
+
},
|
|
36351
|
+
{
|
|
36352
|
+
type: "action",
|
|
36353
|
+
label: t("menubar.alignJustify"),
|
|
36354
|
+
icon: import_lucide_react53.AlignJustify,
|
|
36355
|
+
active: editor.isActive({ textAlign: "justify" }),
|
|
36356
|
+
onClick: () => editor.chain().focus().setTextAlign("justify").run()
|
|
36357
|
+
}
|
|
36358
|
+
]
|
|
36359
|
+
},
|
|
36360
|
+
{ type: "separator" },
|
|
36361
|
+
{
|
|
36362
|
+
type: "action",
|
|
36363
|
+
label: t("menubar.clearFormatting"),
|
|
36364
|
+
onClick: () => editor.chain().focus().unsetAllMarks().clearNodes().run()
|
|
36365
|
+
}
|
|
36366
|
+
];
|
|
36367
|
+
}
|
|
36368
|
+
function buildToolsMenuItems(t, { onSourceCode, openSourceDialog }) {
|
|
36369
|
+
return [
|
|
36370
|
+
{
|
|
36371
|
+
type: "action",
|
|
36372
|
+
label: t("menubar.sourceCode"),
|
|
36373
|
+
icon: import_lucide_react53.FileCode,
|
|
36374
|
+
onClick: () => onSourceCode ? onSourceCode() : openSourceDialog()
|
|
36375
|
+
}
|
|
36376
|
+
];
|
|
36377
|
+
}
|
|
36378
|
+
function buildTableMenuItems(t, editor, onInsertTable) {
|
|
36379
|
+
const inTable = getTableAnchorPos(editor) !== null;
|
|
36380
|
+
return [
|
|
36381
|
+
{
|
|
36382
|
+
type: "sub",
|
|
36383
|
+
label: t("menubar.insertTable"),
|
|
36384
|
+
icon: import_lucide_react53.Table,
|
|
36385
|
+
items: [
|
|
36386
|
+
{
|
|
36387
|
+
type: "custom",
|
|
36388
|
+
key: "table-insert-grid",
|
|
36389
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36390
|
+
TableInsertGrid,
|
|
36391
|
+
{
|
|
36392
|
+
insertLabel: t("tableMenu.insertTable"),
|
|
36393
|
+
previewTemplate: t("tableMenu.gridPreview"),
|
|
36394
|
+
onInsert: onInsertTable
|
|
36395
|
+
}
|
|
36396
|
+
)
|
|
36397
|
+
}
|
|
36398
|
+
]
|
|
36399
|
+
},
|
|
36400
|
+
{
|
|
36401
|
+
type: "action",
|
|
36402
|
+
label: t("menubar.tableProperties"),
|
|
36403
|
+
disabled: true,
|
|
36404
|
+
onClick: () => {
|
|
36405
|
+
}
|
|
36406
|
+
},
|
|
36407
|
+
{
|
|
36408
|
+
type: "action",
|
|
36409
|
+
label: t("menubar.deleteTable"),
|
|
36410
|
+
icon: import_lucide_react53.Trash2,
|
|
36411
|
+
destructive: true,
|
|
36412
|
+
disabled: !inTable,
|
|
36413
|
+
onClick: () => editor.chain().focus().deleteTable().run()
|
|
36414
|
+
},
|
|
36415
|
+
{ type: "separator" },
|
|
36416
|
+
{
|
|
36417
|
+
type: "sub",
|
|
36418
|
+
label: t("menubar.row"),
|
|
36419
|
+
disabled: !inTable,
|
|
36420
|
+
items: [
|
|
36421
|
+
{
|
|
36422
|
+
type: "action",
|
|
36423
|
+
label: t("menubar.addRowBefore"),
|
|
36424
|
+
onClick: () => editor.chain().focus().addRowBefore().run()
|
|
36425
|
+
},
|
|
36426
|
+
{
|
|
36427
|
+
type: "action",
|
|
36428
|
+
label: t("menubar.addRowAfter"),
|
|
36429
|
+
onClick: () => editor.chain().focus().addRowAfter().run()
|
|
36430
|
+
},
|
|
36431
|
+
{ type: "separator" },
|
|
36432
|
+
{
|
|
36433
|
+
type: "action",
|
|
36434
|
+
label: t("menubar.deleteRow"),
|
|
36435
|
+
destructive: true,
|
|
36436
|
+
onClick: () => editor.chain().focus().deleteRow().run()
|
|
36437
|
+
}
|
|
36438
|
+
]
|
|
36439
|
+
},
|
|
36440
|
+
{
|
|
36441
|
+
type: "sub",
|
|
36442
|
+
label: t("menubar.column"),
|
|
36443
|
+
disabled: !inTable,
|
|
36444
|
+
items: [
|
|
36445
|
+
{
|
|
36446
|
+
type: "action",
|
|
36447
|
+
label: t("menubar.addColumnBefore"),
|
|
36448
|
+
onClick: () => editor.chain().focus().addColumnBefore().run()
|
|
36449
|
+
},
|
|
36450
|
+
{
|
|
36451
|
+
type: "action",
|
|
36452
|
+
label: t("menubar.addColumnAfter"),
|
|
36453
|
+
onClick: () => editor.chain().focus().addColumnAfter().run()
|
|
36454
|
+
},
|
|
36455
|
+
{ type: "separator" },
|
|
36456
|
+
{
|
|
36457
|
+
type: "action",
|
|
36458
|
+
label: t("menubar.deleteColumn"),
|
|
36459
|
+
destructive: true,
|
|
36460
|
+
onClick: () => editor.chain().focus().deleteColumn().run()
|
|
36461
|
+
}
|
|
36462
|
+
]
|
|
36463
|
+
},
|
|
36464
|
+
{
|
|
36465
|
+
type: "sub",
|
|
36466
|
+
label: t("menubar.cell"),
|
|
36467
|
+
disabled: !inTable,
|
|
36468
|
+
items: [
|
|
36469
|
+
{
|
|
36470
|
+
type: "action",
|
|
36471
|
+
label: t("menubar.mergeCells"),
|
|
36472
|
+
onClick: () => editor.chain().focus().mergeCells().run(),
|
|
36473
|
+
disabled: !editor.can().mergeCells()
|
|
36474
|
+
},
|
|
36475
|
+
{
|
|
36476
|
+
type: "action",
|
|
36477
|
+
label: t("menubar.splitCell"),
|
|
36478
|
+
onClick: () => editor.chain().focus().splitCell().run(),
|
|
36479
|
+
disabled: !editor.can().splitCell()
|
|
36480
|
+
}
|
|
36481
|
+
]
|
|
36482
|
+
}
|
|
36483
|
+
];
|
|
36484
|
+
}
|
|
36485
|
+
var MenuBarTrigger = import_react67.default.forwardRef(
|
|
36486
|
+
({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36487
|
+
"button",
|
|
36488
|
+
{
|
|
36489
|
+
ref,
|
|
36490
|
+
type: "button",
|
|
36491
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
36492
|
+
className: cn(
|
|
36493
|
+
"px-2 py-0.5 rounded text-sm transition-colors cursor-pointer",
|
|
36494
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
36495
|
+
"focus:outline-none focus:bg-accent focus:text-accent-foreground",
|
|
36496
|
+
className
|
|
36497
|
+
),
|
|
36498
|
+
...props,
|
|
36499
|
+
children
|
|
36500
|
+
}
|
|
36501
|
+
)
|
|
36502
|
+
);
|
|
36503
|
+
MenuBarTrigger.displayName = "MenuBarTrigger";
|
|
36504
|
+
var MenuBar = ({
|
|
36505
|
+
editor,
|
|
36506
|
+
containerRef,
|
|
36507
|
+
uploadImage,
|
|
36508
|
+
imageInsertMode = "base64",
|
|
36509
|
+
maxImageFileSize = DEFAULT_UEDITOR_IMAGE_MAX_FILE_SIZE,
|
|
36510
|
+
allowedImageMimeTypes = DEFAULT_UEDITOR_IMAGE_MIME_TYPES,
|
|
36511
|
+
onSave,
|
|
36512
|
+
onExport,
|
|
36513
|
+
onSourceCode,
|
|
36514
|
+
onPreview
|
|
36515
|
+
}) => {
|
|
36516
|
+
const t = useSmartTranslations("UEditor");
|
|
36517
|
+
(0, import_react68.useEditorState)({
|
|
36518
|
+
editor,
|
|
36519
|
+
selector: ({ transactionNumber }) => transactionNumber
|
|
36520
|
+
});
|
|
36521
|
+
const fileInputRef = (0, import_react67.useRef)(null);
|
|
36522
|
+
const [showImageInput, setShowImageInput] = (0, import_react67.useState)(false);
|
|
36523
|
+
const [showLinkInput, setShowLinkInput] = (0, import_react67.useState)(false);
|
|
36524
|
+
const [isInsertMenuOpen, setIsInsertMenuOpen] = (0, import_react67.useState)(false);
|
|
36525
|
+
const [showSourceDialog, setShowSourceDialog] = (0, import_react67.useState)(false);
|
|
36526
|
+
const [sourceHtml, setSourceHtml] = (0, import_react67.useState)("");
|
|
36527
|
+
const [showPreviewDialog, setShowPreviewDialog] = (0, import_react67.useState)(false);
|
|
36528
|
+
const openSourceDialog = () => {
|
|
36529
|
+
setSourceHtml(editor.getHTML());
|
|
36530
|
+
setShowSourceDialog(true);
|
|
36531
|
+
};
|
|
36532
|
+
const openPreviewDialog = () => {
|
|
36533
|
+
setShowPreviewDialog(true);
|
|
36534
|
+
};
|
|
36535
|
+
const applySourceHtml = () => {
|
|
36536
|
+
editor.chain().focus().setContent(sourceHtml).run();
|
|
36537
|
+
setShowSourceDialog(false);
|
|
36538
|
+
};
|
|
36539
|
+
const closeInsertMenu = () => {
|
|
36540
|
+
setIsInsertMenuOpen(false);
|
|
36541
|
+
setShowImageInput(false);
|
|
36542
|
+
setShowLinkInput(false);
|
|
36543
|
+
};
|
|
36544
|
+
const handleImageUrl = (url, alt) => {
|
|
36545
|
+
const safe = sanitizeUEditorUrl(url, "image");
|
|
36546
|
+
if (safe) {
|
|
36547
|
+
editor.chain().focus().setImage({ src: safe, alt: alt ?? "" }).run();
|
|
36548
|
+
editor.commands.createParagraphNear();
|
|
36549
|
+
}
|
|
36550
|
+
closeInsertMenu();
|
|
36551
|
+
};
|
|
36552
|
+
const handleImageFiles = async (files) => {
|
|
36553
|
+
if (!files?.length) return;
|
|
36554
|
+
for (const file of Array.from(files)) {
|
|
36555
|
+
if (!file.type.startsWith("image/")) continue;
|
|
36556
|
+
if (file.size > maxImageFileSize) continue;
|
|
36557
|
+
if (allowedImageMimeTypes.length > 0 && !allowedImageMimeTypes.includes(file.type)) continue;
|
|
36558
|
+
try {
|
|
36559
|
+
const src = imageInsertMode === "upload" && uploadImage ? await uploadImage(file) : await fileToDataUrl2(file);
|
|
36560
|
+
const safe = sanitizeUEditorUrl(src, "image");
|
|
36561
|
+
if (!safe) continue;
|
|
36562
|
+
editor.chain().focus().setImage({ src: safe, alt: file.name }).run();
|
|
36563
|
+
editor.commands.createParagraphNear();
|
|
36564
|
+
} catch {
|
|
36565
|
+
}
|
|
36566
|
+
}
|
|
36567
|
+
setIsInsertMenuOpen(false);
|
|
36568
|
+
};
|
|
36569
|
+
const handleInsertTable = (rows, cols) => {
|
|
36570
|
+
editor.chain().focus().insertTable({ rows, cols, withHeaderRow: true }).run();
|
|
36571
|
+
closeInsertMenu();
|
|
36572
|
+
};
|
|
36573
|
+
const handleLinkSubmit = (url) => {
|
|
36574
|
+
editor.chain().focus().setLink({ href: url }).run();
|
|
36575
|
+
closeInsertMenu();
|
|
36576
|
+
};
|
|
36577
|
+
const insertMenuItems = [
|
|
36578
|
+
{
|
|
36579
|
+
type: "custom",
|
|
36580
|
+
key: "image",
|
|
36581
|
+
render: () => showImageInput ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(ImageInput, { onSubmit: handleImageUrl, onCancel: () => setShowImageInput(false) }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
36582
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DropdownMenuItem, { label: t("menubar.image"), icon: import_lucide_react53.Image, onClick: () => setShowImageInput(true) }),
|
|
36583
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36584
|
+
DropdownMenuItem,
|
|
36585
|
+
{
|
|
36586
|
+
label: t("menubar.imageUpload"),
|
|
36587
|
+
icon: import_lucide_react53.Upload,
|
|
36588
|
+
onClick: () => fileInputRef.current?.click()
|
|
36589
|
+
}
|
|
36590
|
+
)
|
|
36591
|
+
] })
|
|
36592
|
+
},
|
|
36593
|
+
{ type: "separator" },
|
|
36594
|
+
{
|
|
36595
|
+
type: "custom",
|
|
36596
|
+
key: "link",
|
|
36597
|
+
render: () => showLinkInput ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(LinkInput, { onSubmit: handleLinkSubmit, onCancel: () => setShowLinkInput(false), initialUrl: editor.getAttributes("link").href ?? "" }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36598
|
+
DropdownMenuItem,
|
|
36599
|
+
{
|
|
36600
|
+
label: t("menubar.link"),
|
|
36601
|
+
icon: import_lucide_react53.Link,
|
|
36602
|
+
shortcut: t("menubar.linkShortcut"),
|
|
36603
|
+
onClick: () => setShowLinkInput(true)
|
|
36604
|
+
}
|
|
36605
|
+
)
|
|
36606
|
+
},
|
|
36607
|
+
{ type: "separator" },
|
|
36608
|
+
{
|
|
36609
|
+
type: "sub",
|
|
36610
|
+
label: t("menubar.insertTable"),
|
|
36611
|
+
icon: import_lucide_react53.Table,
|
|
36612
|
+
items: [
|
|
36613
|
+
{
|
|
36614
|
+
type: "custom",
|
|
36615
|
+
key: "table-grid",
|
|
36616
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36617
|
+
TableInsertGrid,
|
|
36618
|
+
{
|
|
36619
|
+
insertLabel: t("tableMenu.insertTable"),
|
|
36620
|
+
previewTemplate: t("tableMenu.gridPreview"),
|
|
36621
|
+
onInsert: handleInsertTable
|
|
36622
|
+
}
|
|
36623
|
+
)
|
|
36624
|
+
}
|
|
36625
|
+
]
|
|
36626
|
+
},
|
|
36627
|
+
{ type: "separator" },
|
|
36628
|
+
{
|
|
36629
|
+
type: "action",
|
|
36630
|
+
label: t("menubar.horizontalRule"),
|
|
36631
|
+
onClick: () => editor.chain().focus().setHorizontalRule().run()
|
|
36632
|
+
}
|
|
36633
|
+
];
|
|
36634
|
+
const menus = [
|
|
36635
|
+
{
|
|
36636
|
+
label: t("menubar.file"),
|
|
36637
|
+
items: buildFileMenuItems(t, editor, { onSave, onExport }),
|
|
36638
|
+
open: void 0,
|
|
36639
|
+
onOpenChange: void 0
|
|
36640
|
+
},
|
|
36641
|
+
{ label: t("menubar.edit"), items: buildEditMenuItems(t, editor), open: void 0, onOpenChange: void 0 },
|
|
36642
|
+
{
|
|
36643
|
+
label: t("menubar.view"),
|
|
36644
|
+
items: buildViewMenuItems(t, { containerRef, onSourceCode, openSourceDialog, onPreview, openPreviewDialog }),
|
|
36645
|
+
open: void 0,
|
|
36646
|
+
onOpenChange: void 0
|
|
36647
|
+
},
|
|
36648
|
+
{
|
|
36649
|
+
label: t("menubar.insert"),
|
|
36650
|
+
items: insertMenuItems,
|
|
36651
|
+
open: isInsertMenuOpen,
|
|
36652
|
+
onOpenChange: (open) => {
|
|
36653
|
+
setIsInsertMenuOpen(open);
|
|
36654
|
+
if (!open) {
|
|
36655
|
+
setShowImageInput(false);
|
|
36656
|
+
setShowLinkInput(false);
|
|
36657
|
+
}
|
|
36658
|
+
}
|
|
36659
|
+
},
|
|
36660
|
+
{ label: t("menubar.format"), items: buildFormatMenuItems(t, editor), open: void 0, onOpenChange: void 0 },
|
|
36661
|
+
{
|
|
36662
|
+
label: t("menubar.tools"),
|
|
36663
|
+
items: buildToolsMenuItems(t, { onSourceCode, openSourceDialog }),
|
|
36664
|
+
open: void 0,
|
|
36665
|
+
onOpenChange: void 0
|
|
36666
|
+
},
|
|
36667
|
+
{ label: t("menubar.table"), items: buildTableMenuItems(t, editor, handleInsertTable), open: void 0, onOpenChange: void 0 }
|
|
36668
|
+
];
|
|
36669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
36670
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36671
|
+
"input",
|
|
36672
|
+
{
|
|
36673
|
+
ref: fileInputRef,
|
|
36674
|
+
type: "file",
|
|
36675
|
+
accept: allowedImageMimeTypes.join(","),
|
|
36676
|
+
multiple: true,
|
|
36677
|
+
className: "hidden",
|
|
36678
|
+
onChange: (e) => handleImageFiles(e.target.files)
|
|
36679
|
+
}
|
|
36680
|
+
),
|
|
36681
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "flex items-center gap-0.5 border-b border-border/35 bg-muted/20 px-1.5 py-0.5", children: menus.map(({ label, items, open, onOpenChange }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36682
|
+
DropdownMenu,
|
|
36683
|
+
{
|
|
36684
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(MenuBarTrigger, { children: label }),
|
|
36685
|
+
placement: "bottom-start",
|
|
36686
|
+
isOpen: open,
|
|
36687
|
+
onOpenChange,
|
|
36688
|
+
children: renderMenuItems(items)
|
|
36689
|
+
},
|
|
36690
|
+
label
|
|
36691
|
+
)) }),
|
|
36692
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36693
|
+
Modal_default,
|
|
36694
|
+
{
|
|
36695
|
+
isOpen: showSourceDialog,
|
|
36696
|
+
onClose: () => setShowSourceDialog(false),
|
|
36697
|
+
title: t("menubar.sourceCode"),
|
|
36698
|
+
size: "lg",
|
|
36699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "space-y-3", children: [
|
|
36700
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "text-xs text-muted-foreground", children: t("menubar.sourceCodeHint") }),
|
|
36701
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36702
|
+
"textarea",
|
|
36703
|
+
{
|
|
36704
|
+
"data-testid": "source-code-textarea",
|
|
36705
|
+
className: "w-full h-64 font-mono text-xs p-3 bg-muted rounded-lg border border-border resize-y focus:outline-none focus:ring-2 focus:ring-primary/20",
|
|
36706
|
+
value: sourceHtml,
|
|
36707
|
+
onChange: (e) => setSourceHtml(e.target.value),
|
|
36708
|
+
spellCheck: false
|
|
36709
|
+
}
|
|
36710
|
+
),
|
|
36711
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex gap-2 justify-end", children: [
|
|
36712
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36713
|
+
"button",
|
|
36714
|
+
{
|
|
36715
|
+
type: "button",
|
|
36716
|
+
onClick: applySourceHtml,
|
|
36717
|
+
className: "px-4 py-2 bg-primary text-primary-foreground rounded-lg text-sm hover:bg-primary/90 transition-colors",
|
|
36718
|
+
children: t("menubar.applySource")
|
|
36719
|
+
}
|
|
36720
|
+
),
|
|
36721
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36722
|
+
"button",
|
|
36723
|
+
{
|
|
36724
|
+
type: "button",
|
|
36725
|
+
onClick: () => setShowSourceDialog(false),
|
|
36726
|
+
className: "px-4 py-2 bg-muted rounded-lg text-sm hover:bg-accent transition-colors",
|
|
36727
|
+
children: t("menubar.closeDialog")
|
|
36728
|
+
}
|
|
36729
|
+
)
|
|
36730
|
+
] })
|
|
36731
|
+
] })
|
|
36732
|
+
}
|
|
36733
|
+
),
|
|
36734
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36735
|
+
Modal_default,
|
|
36736
|
+
{
|
|
36737
|
+
isOpen: showPreviewDialog,
|
|
36738
|
+
onClose: () => setShowPreviewDialog(false),
|
|
36739
|
+
title: t("menubar.preview"),
|
|
36740
|
+
size: "lg",
|
|
36741
|
+
children: editor.isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { className: "text-muted-foreground text-sm", children: t("menubar.previewEmpty") }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
36742
|
+
"div",
|
|
36743
|
+
{
|
|
36744
|
+
"data-testid": "preview-content",
|
|
36745
|
+
className: "prose prose-sm sm:prose dark:prose-invert max-w-none p-2",
|
|
36746
|
+
dangerouslySetInnerHTML: { __html: editor.getHTML() }
|
|
36747
|
+
}
|
|
36748
|
+
)
|
|
36749
|
+
}
|
|
36750
|
+
)
|
|
36751
|
+
] });
|
|
36752
|
+
};
|
|
36753
|
+
|
|
36754
|
+
// src/components/UEditor/UEditor.tsx
|
|
36755
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
36756
|
+
var UEditor = import_react69.default.forwardRef(({
|
|
35728
36757
|
content = "",
|
|
35729
36758
|
onChange,
|
|
35730
36759
|
onHtmlChange,
|
|
@@ -35756,13 +36785,18 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35756
36785
|
uploadFile,
|
|
35757
36786
|
uploadFileForSave,
|
|
35758
36787
|
collaborationOptions,
|
|
35759
|
-
extraExtensions
|
|
36788
|
+
extraExtensions,
|
|
36789
|
+
showMenuBar = false,
|
|
36790
|
+
onSave,
|
|
36791
|
+
onExport,
|
|
36792
|
+
onSourceCode,
|
|
36793
|
+
onPreview
|
|
35760
36794
|
}, ref) => {
|
|
35761
36795
|
const t = useSmartTranslations("UEditor");
|
|
35762
36796
|
const effectivePlaceholder = placeholder ?? t("placeholder");
|
|
35763
|
-
const inFlightPrepareRef = (0,
|
|
35764
|
-
const lastAppliedContentRef = (0,
|
|
35765
|
-
const resolvedUploadFile = (0,
|
|
36797
|
+
const inFlightPrepareRef = (0, import_react69.useRef)(null);
|
|
36798
|
+
const lastAppliedContentRef = (0, import_react69.useRef)(content ?? "");
|
|
36799
|
+
const resolvedUploadFile = (0, import_react69.useMemo)(() => {
|
|
35766
36800
|
if (uploadFile) return uploadFile;
|
|
35767
36801
|
if (uploadFileForSave) {
|
|
35768
36802
|
return async (file) => {
|
|
@@ -35772,7 +36806,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35772
36806
|
}
|
|
35773
36807
|
return uploadImage;
|
|
35774
36808
|
}, [uploadFile, uploadFileForSave, uploadImage]);
|
|
35775
|
-
const extensions = (0,
|
|
36809
|
+
const extensions = (0, import_react69.useMemo)(
|
|
35776
36810
|
() => [
|
|
35777
36811
|
...buildUEditorExtensions({
|
|
35778
36812
|
placeholder: effectivePlaceholder,
|
|
@@ -35791,7 +36825,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35791
36825
|
],
|
|
35792
36826
|
[effectivePlaceholder, t, maxCharacters, uploadImage, resolvedUploadFile, imageInsertMode, maxImageFileSize, allowedImageMimeTypes, fallbackToDataUrl, editable, fetchMetadata, extraExtensions]
|
|
35793
36827
|
);
|
|
35794
|
-
const editor = (0,
|
|
36828
|
+
const editor = (0, import_react70.useEditor)({
|
|
35795
36829
|
immediatelyRender: false,
|
|
35796
36830
|
extensions,
|
|
35797
36831
|
content,
|
|
@@ -35838,7 +36872,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35838
36872
|
tableRowGuideRef,
|
|
35839
36873
|
activeTableCellHighlightRef
|
|
35840
36874
|
} = useUEditorTableInteractions(editor, editable);
|
|
35841
|
-
(0,
|
|
36875
|
+
(0, import_react69.useImperativeHandle)(
|
|
35842
36876
|
ref,
|
|
35843
36877
|
() => ({
|
|
35844
36878
|
editor,
|
|
@@ -35863,7 +36897,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35863
36897
|
}),
|
|
35864
36898
|
[content, editor, uploadImageForSave, uploadFileForSave, uploadImageConcurrency]
|
|
35865
36899
|
);
|
|
35866
|
-
(0,
|
|
36900
|
+
(0, import_react69.useEffect)(() => {
|
|
35867
36901
|
if (!editor) return;
|
|
35868
36902
|
const nextContent = content ?? "";
|
|
35869
36903
|
if (lastAppliedContentRef.current === nextContent) return;
|
|
@@ -35877,7 +36911,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35877
36911
|
}
|
|
35878
36912
|
}, [content, editor]);
|
|
35879
36913
|
if (!editor) {
|
|
35880
|
-
return /* @__PURE__ */ (0,
|
|
36914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
35881
36915
|
"div",
|
|
35882
36916
|
{
|
|
35883
36917
|
className: cn("w-full rounded-lg border bg-background flex items-center justify-center text-muted-foreground", className),
|
|
@@ -35886,7 +36920,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35886
36920
|
}
|
|
35887
36921
|
);
|
|
35888
36922
|
}
|
|
35889
|
-
return /* @__PURE__ */ (0,
|
|
36923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
35890
36924
|
"div",
|
|
35891
36925
|
{
|
|
35892
36926
|
className: cn(
|
|
@@ -35901,7 +36935,22 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35901
36935
|
className
|
|
35902
36936
|
),
|
|
35903
36937
|
children: [
|
|
35904
|
-
editable &&
|
|
36938
|
+
editable && showMenuBar && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
36939
|
+
MenuBar,
|
|
36940
|
+
{
|
|
36941
|
+
editor,
|
|
36942
|
+
containerRef: editorContentRef,
|
|
36943
|
+
uploadImage,
|
|
36944
|
+
imageInsertMode,
|
|
36945
|
+
maxImageFileSize,
|
|
36946
|
+
allowedImageMimeTypes,
|
|
36947
|
+
onSave,
|
|
36948
|
+
onExport,
|
|
36949
|
+
onSourceCode,
|
|
36950
|
+
onPreview
|
|
36951
|
+
}
|
|
36952
|
+
),
|
|
36953
|
+
editable && showToolbar && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
35905
36954
|
EditorToolbar,
|
|
35906
36955
|
{
|
|
35907
36956
|
editor,
|
|
@@ -35916,7 +36965,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35916
36965
|
letterSpacings
|
|
35917
36966
|
}
|
|
35918
36967
|
),
|
|
35919
|
-
editable && showBubbleMenu && /* @__PURE__ */ (0,
|
|
36968
|
+
editable && showBubbleMenu && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
35920
36969
|
CustomBubbleMenu,
|
|
35921
36970
|
{
|
|
35922
36971
|
editor,
|
|
@@ -35924,8 +36973,8 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35924
36973
|
lineHeights
|
|
35925
36974
|
}
|
|
35926
36975
|
),
|
|
35927
|
-
editable && showFloatingMenu && /* @__PURE__ */ (0,
|
|
35928
|
-
/* @__PURE__ */ (0,
|
|
36976
|
+
editable && showFloatingMenu && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CustomFloatingMenu, { editor }),
|
|
36977
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
35929
36978
|
"div",
|
|
35930
36979
|
{
|
|
35931
36980
|
ref: editorContentRef,
|
|
@@ -35935,7 +36984,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35935
36984
|
maxHeight
|
|
35936
36985
|
},
|
|
35937
36986
|
children: [
|
|
35938
|
-
/* @__PURE__ */ (0,
|
|
36987
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
35939
36988
|
"span",
|
|
35940
36989
|
{
|
|
35941
36990
|
ref: tableColumnGuideRef,
|
|
@@ -35943,7 +36992,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35943
36992
|
className: "pointer-events-none absolute z-20 bg-primary opacity-0 transition-opacity duration-100"
|
|
35944
36993
|
}
|
|
35945
36994
|
),
|
|
35946
|
-
/* @__PURE__ */ (0,
|
|
36995
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
35947
36996
|
"span",
|
|
35948
36997
|
{
|
|
35949
36998
|
ref: tableRowGuideRef,
|
|
@@ -35951,7 +37000,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35951
37000
|
className: "pointer-events-none absolute z-20 bg-primary opacity-0 transition-opacity duration-100"
|
|
35952
37001
|
}
|
|
35953
37002
|
),
|
|
35954
|
-
/* @__PURE__ */ (0,
|
|
37003
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
35955
37004
|
"span",
|
|
35956
37005
|
{
|
|
35957
37006
|
ref: activeTableCellHighlightRef,
|
|
@@ -35960,9 +37009,9 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35960
37009
|
className: "pointer-events-none hidden absolute z-20 rounded-[2px] border-2 border-primary bg-primary/10 transition-[left,top,width,height] duration-100"
|
|
35961
37010
|
}
|
|
35962
37011
|
),
|
|
35963
|
-
editable && /* @__PURE__ */ (0,
|
|
35964
|
-
/* @__PURE__ */ (0,
|
|
35965
|
-
|
|
37012
|
+
editable && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(TableControls, { editor, containerRef: editorContentRef }),
|
|
37013
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
37014
|
+
import_react70.EditorContent,
|
|
35966
37015
|
{
|
|
35967
37016
|
editor,
|
|
35968
37017
|
className: "min-h-full"
|
|
@@ -35971,7 +37020,7 @@ var UEditor = import_react67.default.forwardRef(({
|
|
|
35971
37020
|
]
|
|
35972
37021
|
}
|
|
35973
37022
|
),
|
|
35974
|
-
showCharacterCount && /* @__PURE__ */ (0,
|
|
37023
|
+
showCharacterCount && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(CharacterCountDisplay, { editor, maxCharacters })
|
|
35975
37024
|
]
|
|
35976
37025
|
}
|
|
35977
37026
|
);
|