@yurikilian/lex4 0.2.0 → 0.2.2

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.
@@ -1136,20 +1136,33 @@ const createLucideIcon = (iconName, iconNode) => {
1136
1136
  * This source code is licensed under the ISC license.
1137
1137
  * See the LICENSE file in the root directory of this source tree.
1138
1138
  */
1139
- const __iconNode$m = [
1139
+ const __iconNode$q = [
1140
+ ["path", { d: "m15 16 2.536-7.328a1.02 1.02 1 0 1 1.928 0L22 16", key: "xik6mr" }],
1141
+ ["path", { d: "M15.697 14h5.606", key: "1stdlc" }],
1142
+ ["path", { d: "m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16", key: "d5nyq2" }],
1143
+ ["path", { d: "M3.304 13h6.392", key: "1q3zxz" }]
1144
+ ];
1145
+ const ALargeSmall = createLucideIcon("a-large-small", __iconNode$q);
1146
+ /**
1147
+ * @license lucide-react v1.8.0 - ISC
1148
+ *
1149
+ * This source code is licensed under the ISC license.
1150
+ * See the LICENSE file in the root directory of this source tree.
1151
+ */
1152
+ const __iconNode$p = [
1140
1153
  [
1141
1154
  "path",
1142
1155
  { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
1143
1156
  ]
1144
1157
  ];
1145
- const Bold = createLucideIcon("bold", __iconNode$m);
1158
+ const Bold = createLucideIcon("bold", __iconNode$p);
1146
1159
  /**
1147
1160
  * @license lucide-react v1.8.0 - ISC
1148
1161
  *
1149
1162
  * This source code is licensed under the ISC license.
1150
1163
  * See the LICENSE file in the root directory of this source tree.
1151
1164
  */
1152
- const __iconNode$l = [
1165
+ const __iconNode$o = [
1153
1166
  [
1154
1167
  "path",
1155
1168
  { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
@@ -1162,27 +1175,35 @@ const __iconNode$l = [
1162
1175
  }
1163
1176
  ]
1164
1177
  ];
1165
- const Braces = createLucideIcon("braces", __iconNode$l);
1178
+ const Braces = createLucideIcon("braces", __iconNode$o);
1166
1179
  /**
1167
1180
  * @license lucide-react v1.8.0 - ISC
1168
1181
  *
1169
1182
  * This source code is licensed under the ISC license.
1170
1183
  * See the LICENSE file in the root directory of this source tree.
1171
1184
  */
1172
- const __iconNode$k = [
1185
+ const __iconNode$n = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
1186
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$n);
1187
+ /**
1188
+ * @license lucide-react v1.8.0 - ISC
1189
+ *
1190
+ * This source code is licensed under the ISC license.
1191
+ * See the LICENSE file in the root directory of this source tree.
1192
+ */
1193
+ const __iconNode$m = [
1173
1194
  ["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
1174
1195
  ["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
1175
1196
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1176
1197
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
1177
1198
  ];
1178
- const CopyPlus = createLucideIcon("copy-plus", __iconNode$k);
1199
+ const CopyPlus = createLucideIcon("copy-plus", __iconNode$m);
1179
1200
  /**
1180
1201
  * @license lucide-react v1.8.0 - ISC
1181
1202
  *
1182
1203
  * This source code is licensed under the ISC license.
1183
1204
  * See the LICENSE file in the root directory of this source tree.
1184
1205
  */
1185
- const __iconNode$j = [
1206
+ const __iconNode$l = [
1186
1207
  [
1187
1208
  "path",
1188
1209
  {
@@ -1192,65 +1213,52 @@ const __iconNode$j = [
1192
1213
  ],
1193
1214
  ["path", { d: "m5.082 11.09 8.828 8.828", key: "1wx5vj" }]
1194
1215
  ];
1195
- const Eraser = createLucideIcon("eraser", __iconNode$j);
1216
+ const Eraser = createLucideIcon("eraser", __iconNode$l);
1196
1217
  /**
1197
1218
  * @license lucide-react v1.8.0 - ISC
1198
1219
  *
1199
1220
  * This source code is licensed under the ISC license.
1200
1221
  * See the LICENSE file in the root directory of this source tree.
1201
1222
  */
1202
- const __iconNode$i = [
1203
- ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
1204
- ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
1205
- ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
1206
- ["line", { x1: "16", x2: "14", y1: "3", y2: "21", key: "weycgp" }]
1207
- ];
1208
- const Hash = createLucideIcon("hash", __iconNode$i);
1209
- /**
1210
- * @license lucide-react v1.8.0 - ISC
1211
- *
1212
- * This source code is licensed under the ISC license.
1213
- * See the LICENSE file in the root directory of this source tree.
1214
- */
1215
- const __iconNode$h = [
1223
+ const __iconNode$k = [
1216
1224
  ["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
1217
1225
  ["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
1218
1226
  ["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
1219
1227
  ];
1220
- const Italic = createLucideIcon("italic", __iconNode$h);
1228
+ const Italic = createLucideIcon("italic", __iconNode$k);
1221
1229
  /**
1222
1230
  * @license lucide-react v1.8.0 - ISC
1223
1231
  *
1224
1232
  * This source code is licensed under the ISC license.
1225
1233
  * See the LICENSE file in the root directory of this source tree.
1226
1234
  */
1227
- const __iconNode$g = [
1235
+ const __iconNode$j = [
1228
1236
  ["path", { d: "M21 5H11", key: "us1j55" }],
1229
1237
  ["path", { d: "M21 12H11", key: "wd7e0v" }],
1230
1238
  ["path", { d: "M21 19H11", key: "saa85w" }],
1231
1239
  ["path", { d: "m7 8-4 4 4 4", key: "o5hrat" }]
1232
1240
  ];
1233
- const ListIndentDecrease = createLucideIcon("list-indent-decrease", __iconNode$g);
1241
+ const ListIndentDecrease = createLucideIcon("list-indent-decrease", __iconNode$j);
1234
1242
  /**
1235
1243
  * @license lucide-react v1.8.0 - ISC
1236
1244
  *
1237
1245
  * This source code is licensed under the ISC license.
1238
1246
  * See the LICENSE file in the root directory of this source tree.
1239
1247
  */
1240
- const __iconNode$f = [
1248
+ const __iconNode$i = [
1241
1249
  ["path", { d: "M21 5H11", key: "us1j55" }],
1242
1250
  ["path", { d: "M21 12H11", key: "wd7e0v" }],
1243
1251
  ["path", { d: "M21 19H11", key: "saa85w" }],
1244
1252
  ["path", { d: "m3 8 4 4-4 4", key: "1a3j6y" }]
1245
1253
  ];
1246
- const ListIndentIncrease = createLucideIcon("list-indent-increase", __iconNode$f);
1254
+ const ListIndentIncrease = createLucideIcon("list-indent-increase", __iconNode$i);
1247
1255
  /**
1248
1256
  * @license lucide-react v1.8.0 - ISC
1249
1257
  *
1250
1258
  * This source code is licensed under the ISC license.
1251
1259
  * See the LICENSE file in the root directory of this source tree.
1252
1260
  */
1253
- const __iconNode$e = [
1261
+ const __iconNode$h = [
1254
1262
  ["path", { d: "M11 5h10", key: "1cz7ny" }],
1255
1263
  ["path", { d: "M11 12h10", key: "1438ji" }],
1256
1264
  ["path", { d: "M11 19h10", key: "11t30w" }],
@@ -1258,14 +1266,14 @@ const __iconNode$e = [
1258
1266
  ["path", { d: "M4 9h2", key: "r1h2o0" }],
1259
1267
  ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
1260
1268
  ];
1261
- const ListOrdered = createLucideIcon("list-ordered", __iconNode$e);
1269
+ const ListOrdered = createLucideIcon("list-ordered", __iconNode$h);
1262
1270
  /**
1263
1271
  * @license lucide-react v1.8.0 - ISC
1264
1272
  *
1265
1273
  * This source code is licensed under the ISC license.
1266
1274
  * See the LICENSE file in the root directory of this source tree.
1267
1275
  */
1268
- const __iconNode$d = [
1276
+ const __iconNode$g = [
1269
1277
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
1270
1278
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
1271
1279
  ["path", { d: "M3 19h.01", key: "noohij" }],
@@ -1273,127 +1281,168 @@ const __iconNode$d = [
1273
1281
  ["path", { d: "M8 12h13", key: "1za7za" }],
1274
1282
  ["path", { d: "M8 19h13", key: "m83p4d" }]
1275
1283
  ];
1276
- const List = createLucideIcon("list", __iconNode$d);
1284
+ const List = createLucideIcon("list", __iconNode$g);
1277
1285
  /**
1278
1286
  * @license lucide-react v1.8.0 - ISC
1279
1287
  *
1280
1288
  * This source code is licensed under the ISC license.
1281
1289
  * See the LICENSE file in the root directory of this source tree.
1282
1290
  */
1283
- const __iconNode$c = [
1291
+ const __iconNode$f = [
1284
1292
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
1285
1293
  ["path", { d: "M15 3v18", key: "14nvp0" }]
1286
1294
  ];
1287
- const PanelRight = createLucideIcon("panel-right", __iconNode$c);
1295
+ const PanelRight = createLucideIcon("panel-right", __iconNode$f);
1288
1296
  /**
1289
1297
  * @license lucide-react v1.8.0 - ISC
1290
1298
  *
1291
1299
  * This source code is licensed under the ISC license.
1292
1300
  * See the LICENSE file in the root directory of this source tree.
1293
1301
  */
1294
- const __iconNode$b = [
1302
+ const __iconNode$e = [
1295
1303
  ["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
1296
1304
  ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
1297
1305
  ];
1298
- const Redo2 = createLucideIcon("redo-2", __iconNode$b);
1306
+ const Redo2 = createLucideIcon("redo-2", __iconNode$e);
1299
1307
  /**
1300
1308
  * @license lucide-react v1.8.0 - ISC
1301
1309
  *
1302
1310
  * This source code is licensed under the ISC license.
1303
1311
  * See the LICENSE file in the root directory of this source tree.
1304
1312
  */
1305
- const __iconNode$a = [
1313
+ const __iconNode$d = [
1306
1314
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
1307
1315
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
1308
1316
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
1309
1317
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
1310
1318
  ];
1311
- const RefreshCw = createLucideIcon("refresh-cw", __iconNode$a);
1319
+ const RefreshCw = createLucideIcon("refresh-cw", __iconNode$d);
1312
1320
  /**
1313
1321
  * @license lucide-react v1.8.0 - ISC
1314
1322
  *
1315
1323
  * This source code is licensed under the ISC license.
1316
1324
  * See the LICENSE file in the root directory of this source tree.
1317
1325
  */
1318
- const __iconNode$9 = [
1326
+ const __iconNode$c = [
1327
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
1328
+ ["path", { d: "M21 9H3", key: "1338ky" }],
1329
+ ["path", { d: "M21 15H3", key: "9uk58r" }]
1330
+ ];
1331
+ const Rows3 = createLucideIcon("rows-3", __iconNode$c);
1332
+ /**
1333
+ * @license lucide-react v1.8.0 - ISC
1334
+ *
1335
+ * This source code is licensed under the ISC license.
1336
+ * See the LICENSE file in the root directory of this source tree.
1337
+ */
1338
+ const __iconNode$b = [
1319
1339
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
1320
1340
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
1321
1341
  ];
1322
- const Search = createLucideIcon("search", __iconNode$9);
1342
+ const Search = createLucideIcon("search", __iconNode$b);
1323
1343
  /**
1324
1344
  * @license lucide-react v1.8.0 - ISC
1325
1345
  *
1326
1346
  * This source code is licensed under the ISC license.
1327
1347
  * See the LICENSE file in the root directory of this source tree.
1328
1348
  */
1329
- const __iconNode$8 = [
1349
+ const __iconNode$a = [
1350
+ [
1351
+ "path",
1352
+ {
1353
+ d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
1354
+ key: "1i5ecw"
1355
+ }
1356
+ ],
1357
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
1358
+ ];
1359
+ const Settings = createLucideIcon("settings", __iconNode$a);
1360
+ /**
1361
+ * @license lucide-react v1.8.0 - ISC
1362
+ *
1363
+ * This source code is licensed under the ISC license.
1364
+ * See the LICENSE file in the root directory of this source tree.
1365
+ */
1366
+ const __iconNode$9 = [
1330
1367
  ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4", key: "43sutm" }],
1331
1368
  ["path", { d: "M14 12a4 4 0 0 1 0 8H6", key: "nlfj13" }],
1332
1369
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }]
1333
1370
  ];
1334
- const Strikethrough = createLucideIcon("strikethrough", __iconNode$8);
1371
+ const Strikethrough = createLucideIcon("strikethrough", __iconNode$9);
1335
1372
  /**
1336
1373
  * @license lucide-react v1.8.0 - ISC
1337
1374
  *
1338
1375
  * This source code is licensed under the ISC license.
1339
1376
  * See the LICENSE file in the root directory of this source tree.
1340
1377
  */
1341
- const __iconNode$7 = [
1378
+ const __iconNode$8 = [
1342
1379
  ["path", { d: "M21 5H3", key: "1fi0y6" }],
1343
1380
  ["path", { d: "M17 12H7", key: "16if0g" }],
1344
1381
  ["path", { d: "M19 19H5", key: "vjpgq2" }]
1345
1382
  ];
1346
- const TextAlignCenter = createLucideIcon("text-align-center", __iconNode$7);
1383
+ const TextAlignCenter = createLucideIcon("text-align-center", __iconNode$8);
1347
1384
  /**
1348
1385
  * @license lucide-react v1.8.0 - ISC
1349
1386
  *
1350
1387
  * This source code is licensed under the ISC license.
1351
1388
  * See the LICENSE file in the root directory of this source tree.
1352
1389
  */
1353
- const __iconNode$6 = [
1390
+ const __iconNode$7 = [
1354
1391
  ["path", { d: "M21 5H3", key: "1fi0y6" }],
1355
1392
  ["path", { d: "M21 12H9", key: "dn1m92" }],
1356
1393
  ["path", { d: "M21 19H7", key: "4cu937" }]
1357
1394
  ];
1358
- const TextAlignEnd = createLucideIcon("text-align-end", __iconNode$6);
1395
+ const TextAlignEnd = createLucideIcon("text-align-end", __iconNode$7);
1359
1396
  /**
1360
1397
  * @license lucide-react v1.8.0 - ISC
1361
1398
  *
1362
1399
  * This source code is licensed under the ISC license.
1363
1400
  * See the LICENSE file in the root directory of this source tree.
1364
1401
  */
1365
- const __iconNode$5 = [
1402
+ const __iconNode$6 = [
1366
1403
  ["path", { d: "M3 5h18", key: "1u36vt" }],
1367
1404
  ["path", { d: "M3 12h18", key: "1i2n21" }],
1368
1405
  ["path", { d: "M3 19h18", key: "awlh7x" }]
1369
1406
  ];
1370
- const TextAlignJustify = createLucideIcon("text-align-justify", __iconNode$5);
1407
+ const TextAlignJustify = createLucideIcon("text-align-justify", __iconNode$6);
1371
1408
  /**
1372
1409
  * @license lucide-react v1.8.0 - ISC
1373
1410
  *
1374
1411
  * This source code is licensed under the ISC license.
1375
1412
  * See the LICENSE file in the root directory of this source tree.
1376
1413
  */
1377
- const __iconNode$4 = [
1414
+ const __iconNode$5 = [
1378
1415
  ["path", { d: "M21 5H3", key: "1fi0y6" }],
1379
1416
  ["path", { d: "M15 12H3", key: "6jk70r" }],
1380
1417
  ["path", { d: "M17 19H3", key: "z6ezky" }]
1381
1418
  ];
1382
- const TextAlignStart = createLucideIcon("text-align-start", __iconNode$4);
1419
+ const TextAlignStart = createLucideIcon("text-align-start", __iconNode$5);
1383
1420
  /**
1384
1421
  * @license lucide-react v1.8.0 - ISC
1385
1422
  *
1386
1423
  * This source code is licensed under the ISC license.
1387
1424
  * See the LICENSE file in the root directory of this source tree.
1388
1425
  */
1389
- const __iconNode$3 = [
1426
+ const __iconNode$4 = [
1390
1427
  ["path", { d: "M10 11v6", key: "nco0om" }],
1391
1428
  ["path", { d: "M14 11v6", key: "outv1u" }],
1392
1429
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
1393
1430
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
1394
1431
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
1395
1432
  ];
1396
- const Trash2 = createLucideIcon("trash-2", __iconNode$3);
1433
+ const Trash2 = createLucideIcon("trash-2", __iconNode$4);
1434
+ /**
1435
+ * @license lucide-react v1.8.0 - ISC
1436
+ *
1437
+ * This source code is licensed under the ISC license.
1438
+ * See the LICENSE file in the root directory of this source tree.
1439
+ */
1440
+ const __iconNode$3 = [
1441
+ ["path", { d: "M12 4v16", key: "1654pz" }],
1442
+ ["path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2", key: "e0r10z" }],
1443
+ ["path", { d: "M9 20h6", key: "s66wpe" }]
1444
+ ];
1445
+ const Type = createLucideIcon("type", __iconNode$3);
1397
1446
  /**
1398
1447
  * @license lucide-react v1.8.0 - ISC
1399
1448
  *
@@ -1493,10 +1542,92 @@ const DEFAULT_TRANSLATIONS = {
1493
1542
  footer: {
1494
1543
  placeholder: "Footer"
1495
1544
  },
1545
+ body: {
1546
+ placeholder: "Start typing..."
1547
+ },
1548
+ headerFooter: {
1549
+ label: "Headers & Footers"
1550
+ },
1496
1551
  sidebar: {
1497
1552
  close: "Close sidebar"
1498
1553
  }
1499
1554
  };
1555
+ const PT_BR_TRANSLATIONS = {
1556
+ toolbar: {
1557
+ undo: "Desfazer",
1558
+ redo: "Refazer",
1559
+ bold: "Negrito (Ctrl+B)",
1560
+ italic: "Itálico (Ctrl+I)",
1561
+ underline: "Sublinhado (Ctrl+U)",
1562
+ strikethrough: "Tachado",
1563
+ alignLeft: "Alinhar à Esquerda",
1564
+ alignCenter: "Centralizar",
1565
+ alignRight: "Alinhar à Direita",
1566
+ justify: "Justificar",
1567
+ numberedList: "Lista Numerada",
1568
+ bulletList: "Lista com Marcadores",
1569
+ indent: "Aumentar Recuo",
1570
+ outdent: "Diminuir Recuo",
1571
+ openHistory: "Abrir Histórico",
1572
+ closeHistory: "Fechar Histórico"
1573
+ },
1574
+ history: {
1575
+ title: "Histórico",
1576
+ subtitle: "Histórico de sessão (últimas 100 ações)",
1577
+ empty: "Nenhum histórico ainda.",
1578
+ clearHistory: "Limpar Histórico",
1579
+ actions: {
1580
+ enabledHeadersFooters: "Cabeçalhos e rodapés ativados",
1581
+ disabledHeadersFooters: "Cabeçalhos e rodapés desativados",
1582
+ copiedHeaderToAll: "Cabeçalho copiado para todas as páginas",
1583
+ copiedFooterToAll: "Rodapé copiado para todas as páginas",
1584
+ clearedHeader: "Cabeçalho limpo",
1585
+ clearedFooter: "Rodapé limpo",
1586
+ clearedAllHeaders: "Todos os cabeçalhos limpos",
1587
+ clearedAllFooters: "Todos os rodapés limpos",
1588
+ pageCounterSet: "Contador de páginas definido como {{value}}",
1589
+ boldApplied: "Negrito aplicado",
1590
+ italicApplied: "Itálico aplicado",
1591
+ underlineApplied: "Sublinhado aplicado",
1592
+ strikethroughApplied: "Tachado aplicado",
1593
+ alignedLeft: "Alinhado à esquerda",
1594
+ alignedCenter: "Centralizado",
1595
+ alignedRight: "Alinhado à direita",
1596
+ justifiedText: "Texto justificado",
1597
+ insertedNumberedList: "Lista numerada inserida",
1598
+ insertedBulletList: "Lista com marcadores inserida",
1599
+ indentedContent: "Conteúdo recuado",
1600
+ outdentedContent: "Recuo reduzido",
1601
+ fontChanged: "Fonte alterada para {{value}}",
1602
+ fontSizeChanged: "Tamanho da fonte alterado para {{value}}pt"
1603
+ }
1604
+ },
1605
+ variables: {
1606
+ title: "Variáveis",
1607
+ available: "{{count}} disponíveis",
1608
+ refreshVariables: "Atualizar variáveis",
1609
+ searchPlaceholder: "Buscar variáveis...",
1610
+ noVariablesFound: "Nenhuma variável encontrada",
1611
+ insertVariable: "Inserir variável {{key}}",
1612
+ openPanel: "Abrir Variáveis",
1613
+ closePanel: "Fechar Variáveis"
1614
+ },
1615
+ header: {
1616
+ placeholder: "Cabeçalho"
1617
+ },
1618
+ footer: {
1619
+ placeholder: "Rodapé"
1620
+ },
1621
+ body: {
1622
+ placeholder: "Comece a digitar..."
1623
+ },
1624
+ headerFooter: {
1625
+ label: "Cabeçalhos e Rodapés"
1626
+ },
1627
+ sidebar: {
1628
+ close: "Fechar barra lateral"
1629
+ }
1630
+ };
1500
1631
  function deepMerge(target, source) {
1501
1632
  if (typeof target !== "object" || target === null) {
1502
1633
  return source ?? target;
@@ -1653,13 +1784,15 @@ const HeaderFooterToggle = ({
1653
1784
  enabled,
1654
1785
  onToggle
1655
1786
  }) => {
1787
+ const t = useTranslations();
1656
1788
  return /* @__PURE__ */ jsxRuntime.jsxs(
1657
1789
  "label",
1658
1790
  {
1659
1791
  className: "flex items-center gap-1.5 cursor-pointer select-none",
1660
1792
  "data-testid": "header-footer-toggle",
1661
1793
  children: [
1662
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-gray-600", children: "Headers & Footers" }),
1794
+ /* @__PURE__ */ jsxRuntime.jsx(Rows3, { size: 14, className: "text-gray-500" }),
1795
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-gray-600", children: t.headerFooter.label }),
1663
1796
  /* @__PURE__ */ jsxRuntime.jsx(
1664
1797
  "button",
1665
1798
  {
@@ -1690,6 +1823,12 @@ const HeaderFooterToggle = ({
1690
1823
  }
1691
1824
  );
1692
1825
  };
1826
+ const PAGE_COUNTER_OPTIONS = [
1827
+ { value: "none", label: "None" },
1828
+ { value: "header", label: "Header" },
1829
+ { value: "footer", label: "Footer" },
1830
+ { value: "both", label: "Both" }
1831
+ ];
1693
1832
  const HeaderFooterActions = ({
1694
1833
  activePageId,
1695
1834
  pageCounterMode,
@@ -1701,119 +1840,154 @@ const HeaderFooterActions = ({
1701
1840
  onClearAllHeaders,
1702
1841
  onClearAllFooters
1703
1842
  }) => {
1843
+ const [open, setOpen] = React.useState(false);
1844
+ const containerRef = React.useRef(null);
1704
1845
  const hasActivePage = activePageId !== null;
1705
- const handlePageCounterModeChange = (event) => {
1706
- const nextMode = event.target.value;
1707
- if (nextMode === "none" || nextMode === "header" || nextMode === "footer" || nextMode === "both") {
1708
- onPageCounterModeChange(nextMode);
1709
- }
1846
+ const close = React.useCallback(() => setOpen(false), []);
1847
+ React.useEffect(() => {
1848
+ if (!open) return;
1849
+ const handleClickOutside = (e) => {
1850
+ if (containerRef.current && !containerRef.current.contains(e.target)) {
1851
+ close();
1852
+ }
1853
+ };
1854
+ document.addEventListener("mousedown", handleClickOutside);
1855
+ return () => document.removeEventListener("mousedown", handleClickOutside);
1856
+ }, [open, close]);
1857
+ const handleAction = (action) => {
1858
+ action();
1859
+ close();
1710
1860
  };
1711
- return /* @__PURE__ */ jsxRuntime.jsxs(
1712
- "div",
1713
- {
1714
- className: "flex flex-wrap items-center gap-2 text-xs",
1715
- "data-testid": "header-footer-actions",
1716
- children: [
1717
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-1 text-gray-500", htmlFor: "page-counter-mode", children: [
1718
- /* @__PURE__ */ jsxRuntime.jsx(Hash, { size: 13, className: "text-gray-400" }),
1719
- /* @__PURE__ */ jsxRuntime.jsxs(
1720
- "select",
1861
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "relative", "data-testid": "header-footer-actions", children: [
1862
+ /* @__PURE__ */ jsxRuntime.jsxs(
1863
+ "button",
1864
+ {
1865
+ type: "button",
1866
+ onMouseDown: (e) => e.preventDefault(),
1867
+ onClick: () => setOpen(!open),
1868
+ className: `
1869
+ flex h-7 items-center gap-1 rounded px-1.5 text-xs transition-colors
1870
+ ${open ? "bg-blue-50 text-blue-600" : "text-gray-600 hover:bg-gray-100 hover:text-gray-900"}
1871
+ `,
1872
+ "data-testid": "header-footer-menu-trigger",
1873
+ "aria-expanded": open,
1874
+ "aria-haspopup": "true",
1875
+ children: [
1876
+ /* @__PURE__ */ jsxRuntime.jsx(Settings, { size: 14 }),
1877
+ /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, { size: 12 })
1878
+ ]
1879
+ }
1880
+ ),
1881
+ open && /* @__PURE__ */ jsxRuntime.jsxs(
1882
+ "div",
1883
+ {
1884
+ className: "absolute left-0 top-full mt-1 z-50 w-56 rounded-lg border border-gray-200 bg-white py-1 shadow-lg",
1885
+ role: "menu",
1886
+ "data-testid": "header-footer-menu",
1887
+ children: [
1888
+ /* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: "Page counter" }),
1889
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 pb-2 grid grid-cols-2 gap-1", "data-testid": "page-counter-mode", children: PAGE_COUNTER_OPTIONS.map(({ value, label }) => /* @__PURE__ */ jsxRuntime.jsx(
1890
+ "button",
1721
1891
  {
1722
- id: "page-counter-mode",
1723
- className: "h-6 rounded border border-gray-200 bg-white px-1.5 text-xs text-gray-600\n focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-400",
1724
- "data-testid": "page-counter-mode",
1725
- value: pageCounterMode,
1726
- onChange: handlePageCounterModeChange,
1727
- children: [
1728
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "none", children: "None" }),
1729
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "header", children: "Header" }),
1730
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "footer", children: "Footer" }),
1731
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "both", children: "Both" })
1732
- ]
1892
+ type: "button",
1893
+ role: "menuitemradio",
1894
+ "aria-checked": pageCounterMode === value,
1895
+ onMouseDown: (e) => e.preventDefault(),
1896
+ onClick: () => onPageCounterModeChange(value),
1897
+ className: `
1898
+ rounded px-2 py-1 text-xs text-left transition-colors
1899
+ ${pageCounterMode === value ? "bg-blue-50 text-blue-700 font-medium" : "text-gray-600 hover:bg-gray-100"}
1900
+ `,
1901
+ "data-testid": `page-counter-${value}`,
1902
+ children: label
1903
+ },
1904
+ value
1905
+ )) }),
1906
+ /* @__PURE__ */ jsxRuntime.jsx(MenuDivider, {}),
1907
+ /* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: "Header" }),
1908
+ /* @__PURE__ */ jsxRuntime.jsx(
1909
+ MenuItem,
1910
+ {
1911
+ icon: /* @__PURE__ */ jsxRuntime.jsx(CopyPlus, { size: 14 }),
1912
+ label: "Copy to all pages",
1913
+ onClick: () => handleAction(onCopyHeaderToAll),
1914
+ disabled: !hasActivePage,
1915
+ testId: "copy-header-all"
1916
+ }
1917
+ ),
1918
+ /* @__PURE__ */ jsxRuntime.jsx(
1919
+ MenuItem,
1920
+ {
1921
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Eraser, { size: 14 }),
1922
+ label: "Clear this page",
1923
+ onClick: () => handleAction(onClearHeader),
1924
+ disabled: !hasActivePage,
1925
+ testId: "clear-header"
1926
+ }
1927
+ ),
1928
+ /* @__PURE__ */ jsxRuntime.jsx(
1929
+ MenuItem,
1930
+ {
1931
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Trash2, { size: 14 }),
1932
+ label: "Clear all",
1933
+ onClick: () => handleAction(onClearAllHeaders),
1934
+ testId: "clear-all-headers"
1935
+ }
1936
+ ),
1937
+ /* @__PURE__ */ jsxRuntime.jsx(MenuDivider, {}),
1938
+ /* @__PURE__ */ jsxRuntime.jsx(SectionLabel, { children: "Footer" }),
1939
+ /* @__PURE__ */ jsxRuntime.jsx(
1940
+ MenuItem,
1941
+ {
1942
+ icon: /* @__PURE__ */ jsxRuntime.jsx(CopyPlus, { size: 14 }),
1943
+ label: "Copy to all pages",
1944
+ onClick: () => handleAction(onCopyFooterToAll),
1945
+ disabled: !hasActivePage,
1946
+ testId: "copy-footer-all"
1947
+ }
1948
+ ),
1949
+ /* @__PURE__ */ jsxRuntime.jsx(
1950
+ MenuItem,
1951
+ {
1952
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Eraser, { size: 14 }),
1953
+ label: "Clear this page",
1954
+ onClick: () => handleAction(onClearFooter),
1955
+ disabled: !hasActivePage,
1956
+ testId: "clear-footer"
1957
+ }
1958
+ ),
1959
+ /* @__PURE__ */ jsxRuntime.jsx(
1960
+ MenuItem,
1961
+ {
1962
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Trash2, { size: 14 }),
1963
+ label: "Clear all",
1964
+ onClick: () => handleAction(onClearAllFooters),
1965
+ testId: "clear-all-footers"
1733
1966
  }
1734
1967
  )
1735
- ] }),
1736
- /* @__PURE__ */ jsxRuntime.jsx(ActionDivider, {}),
1737
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400 font-medium", children: "Header" }),
1738
- /* @__PURE__ */ jsxRuntime.jsx(
1739
- ActionIconButton,
1740
- {
1741
- title: "Copy header to all pages",
1742
- icon: /* @__PURE__ */ jsxRuntime.jsx(CopyPlus, { size: 13 }),
1743
- onClick: onCopyHeaderToAll,
1744
- disabled: !hasActivePage,
1745
- testId: "copy-header-all"
1746
- }
1747
- ),
1748
- /* @__PURE__ */ jsxRuntime.jsx(
1749
- ActionIconButton,
1750
- {
1751
- title: "Clear header on this page",
1752
- icon: /* @__PURE__ */ jsxRuntime.jsx(Eraser, { size: 13 }),
1753
- onClick: onClearHeader,
1754
- disabled: !hasActivePage,
1755
- testId: "clear-header"
1756
- }
1757
- ),
1758
- /* @__PURE__ */ jsxRuntime.jsx(
1759
- ActionIconButton,
1760
- {
1761
- title: "Clear all headers",
1762
- icon: /* @__PURE__ */ jsxRuntime.jsx(Trash2, { size: 13 }),
1763
- onClick: onClearAllHeaders,
1764
- testId: "clear-all-headers"
1765
- }
1766
- ),
1767
- /* @__PURE__ */ jsxRuntime.jsx(ActionDivider, {}),
1768
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-400 font-medium", children: "Footer" }),
1769
- /* @__PURE__ */ jsxRuntime.jsx(
1770
- ActionIconButton,
1771
- {
1772
- title: "Copy footer to all pages",
1773
- icon: /* @__PURE__ */ jsxRuntime.jsx(CopyPlus, { size: 13 }),
1774
- onClick: onCopyFooterToAll,
1775
- disabled: !hasActivePage,
1776
- testId: "copy-footer-all"
1777
- }
1778
- ),
1779
- /* @__PURE__ */ jsxRuntime.jsx(
1780
- ActionIconButton,
1781
- {
1782
- title: "Clear footer on this page",
1783
- icon: /* @__PURE__ */ jsxRuntime.jsx(Eraser, { size: 13 }),
1784
- onClick: onClearFooter,
1785
- disabled: !hasActivePage,
1786
- testId: "clear-footer"
1787
- }
1788
- ),
1789
- /* @__PURE__ */ jsxRuntime.jsx(
1790
- ActionIconButton,
1791
- {
1792
- title: "Clear all footers",
1793
- icon: /* @__PURE__ */ jsxRuntime.jsx(Trash2, { size: 13 }),
1794
- onClick: onClearAllFooters,
1795
- testId: "clear-all-footers"
1796
- }
1797
- )
1798
- ]
1799
- }
1800
- );
1968
+ ]
1969
+ }
1970
+ )
1971
+ ] });
1801
1972
  };
1802
- const ActionIconButton = ({ title, icon, onClick, disabled, testId }) => /* @__PURE__ */ jsxRuntime.jsx(
1973
+ const SectionLabel = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 pt-2 pb-1 text-[10px] font-semibold uppercase tracking-wider text-gray-400", children });
1974
+ const MenuItem = ({ icon, label, onClick, disabled, testId }) => /* @__PURE__ */ jsxRuntime.jsxs(
1803
1975
  "button",
1804
1976
  {
1805
1977
  type: "button",
1806
- title,
1807
- "aria-label": title,
1978
+ role: "menuitem",
1808
1979
  onMouseDown: (e) => e.preventDefault(),
1809
1980
  onClick,
1810
1981
  disabled,
1811
- className: "flex h-6 w-6 items-center justify-center rounded text-gray-500 transition-colors\n hover:bg-gray-200/60 hover:text-gray-700\n disabled:cursor-not-allowed disabled:text-gray-300",
1982
+ className: "flex w-full items-center gap-2 px-3 py-1.5 text-xs text-gray-700 transition-colors\n hover:bg-gray-50 disabled:cursor-not-allowed disabled:text-gray-300",
1812
1983
  "data-testid": testId,
1813
- children: icon
1984
+ children: [
1985
+ icon,
1986
+ label
1987
+ ]
1814
1988
  }
1815
1989
  );
1816
- const ActionDivider = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-0.5 h-4 w-px bg-gray-300/60" });
1990
+ const MenuDivider = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "my-1 h-px bg-gray-100" });
1817
1991
  function resolveExtensions(extensions) {
1818
1992
  const resolved = {
1819
1993
  nodes: [],
@@ -1888,10 +2062,10 @@ function useExtensionContext(getDocument, getActiveEditor) {
1888
2062
  }), [getDocument, getActiveEditor, stateRef]);
1889
2063
  }
1890
2064
  const SUPPORTED_FONTS = [
2065
+ "Calibri",
1891
2066
  "Inter",
1892
2067
  "Times New Roman",
1893
2068
  "Arial",
1894
- "Calibri",
1895
2069
  "Georgia",
1896
2070
  "Courier New"
1897
2071
  ];
@@ -2155,87 +2329,107 @@ const Toolbar = () => {
2155
2329
  },
2156
2330
  [applyToBodyEditors, runToolbarAction, t.history.actions.fontSizeChanged]
2157
2331
  );
2158
- return /* @__PURE__ */ jsxRuntime.jsx(
2332
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2159
2333
  "div",
2160
2334
  {
2161
2335
  className: "lex4-toolbar sticky top-0 z-10 bg-white border-b border-gray-200",
2162
2336
  "data-testid": "toolbar",
2163
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 px-2 py-1.5", children: [
2164
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5", "data-testid": "history-controls", children: [
2165
- /* @__PURE__ */ jsxRuntime.jsx(
2337
+ children: [
2338
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 px-2 py-1.5", children: [
2339
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5", "data-testid": "history-controls", children: [
2340
+ /* @__PURE__ */ jsxRuntime.jsx(
2341
+ ToolbarIconButton,
2342
+ {
2343
+ title: t.toolbar.undo,
2344
+ testId: "btn-undo",
2345
+ disabled: !canUndo,
2346
+ onClick: undo,
2347
+ children: /* @__PURE__ */ jsxRuntime.jsx(Undo2, { size: 15 })
2348
+ }
2349
+ ),
2350
+ /* @__PURE__ */ jsxRuntime.jsx(
2351
+ ToolbarIconButton,
2352
+ {
2353
+ title: t.toolbar.redo,
2354
+ testId: "btn-redo",
2355
+ disabled: !canRedo,
2356
+ onClick: redo,
2357
+ children: /* @__PURE__ */ jsxRuntime.jsx(Redo2, { size: 15 })
2358
+ }
2359
+ )
2360
+ ] }),
2361
+ /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2362
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
2363
+ /* @__PURE__ */ jsxRuntime.jsx(Type, { size: 14, className: "text-gray-500" }),
2364
+ /* @__PURE__ */ jsxRuntime.jsx(
2365
+ "select",
2366
+ {
2367
+ className: "h-7 rounded border border-gray-200 bg-white px-2 text-xs text-gray-700\n focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-400",
2368
+ "data-testid": "font-selector",
2369
+ defaultValue: "Calibri",
2370
+ onChange: handleFontChange,
2371
+ children: SUPPORTED_FONTS.map((font) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: font, style: { fontFamily: font }, children: font }, font))
2372
+ }
2373
+ )
2374
+ ] }),
2375
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
2376
+ /* @__PURE__ */ jsxRuntime.jsx(ALargeSmall, { size: 14, className: "text-gray-500" }),
2377
+ /* @__PURE__ */ jsxRuntime.jsx(
2378
+ "select",
2379
+ {
2380
+ className: "h-7 w-16 rounded border border-gray-200 bg-white px-1 text-xs text-gray-700\n focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-400",
2381
+ "data-testid": "font-size-selector",
2382
+ defaultValue: "12",
2383
+ onChange: handleFontSizeChange,
2384
+ children: SUPPORTED_FONT_SIZES.map((size) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: size, children: size }, size))
2385
+ }
2386
+ )
2387
+ ] }),
2388
+ /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2389
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5", "data-testid": "format-group", children: [
2390
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.bold, testId: "btn-bold", onClick: handleBold, children: /* @__PURE__ */ jsxRuntime.jsx(Bold, { size: 15 }) }),
2391
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.italic, testId: "btn-italic", onClick: handleItalic, children: /* @__PURE__ */ jsxRuntime.jsx(Italic, { size: 15 }) }),
2392
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.underline, testId: "btn-underline", onClick: handleUnderline, children: /* @__PURE__ */ jsxRuntime.jsx(Underline, { size: 15 }) }),
2393
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.strikethrough, testId: "btn-strike", onClick: handleStrikethrough, children: /* @__PURE__ */ jsxRuntime.jsx(Strikethrough, { size: 15 }) })
2394
+ ] }),
2395
+ /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2396
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5", "data-testid": "align-group", children: [
2397
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.alignLeft, testId: "btn-align-left", onClick: handleAlignLeft, children: /* @__PURE__ */ jsxRuntime.jsx(TextAlignStart, { size: 15 }) }),
2398
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.alignCenter, testId: "btn-align-center", onClick: handleAlignCenter, children: /* @__PURE__ */ jsxRuntime.jsx(TextAlignCenter, { size: 15 }) }),
2399
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.alignRight, testId: "btn-align-right", onClick: handleAlignRight, children: /* @__PURE__ */ jsxRuntime.jsx(TextAlignEnd, { size: 15 }) }),
2400
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.justify, testId: "btn-align-justify", onClick: handleAlignJustify, children: /* @__PURE__ */ jsxRuntime.jsx(TextAlignJustify, { size: 15 }) })
2401
+ ] }),
2402
+ /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2403
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5", "data-testid": "list-group", children: [
2404
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.numberedList, testId: "btn-list-number", onClick: handleListNumber, children: /* @__PURE__ */ jsxRuntime.jsx(ListOrdered, { size: 15 }) }),
2405
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.bulletList, testId: "btn-list-bullet", onClick: handleListBullet, children: /* @__PURE__ */ jsxRuntime.jsx(List, { size: 15 }) }),
2406
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.indent, testId: "btn-indent", onClick: handleIndent, children: /* @__PURE__ */ jsxRuntime.jsx(ListIndentIncrease, { size: 15 }) }),
2407
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.outdent, testId: "btn-outdent", onClick: handleOutdent, children: /* @__PURE__ */ jsxRuntime.jsx(ListIndentDecrease, { size: 15 }) })
2408
+ ] }),
2409
+ toolbarItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2410
+ /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2411
+ toolbarItems.map((ToolbarItem, idx) => /* @__PURE__ */ jsxRuntime.jsx(ToolbarItem, {}, idx))
2412
+ ] }),
2413
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(
2166
2414
  ToolbarIconButton,
2167
2415
  {
2168
- title: t.toolbar.undo,
2169
- testId: "btn-undo",
2170
- disabled: !canUndo,
2171
- onClick: undo,
2172
- children: /* @__PURE__ */ jsxRuntime.jsx(Undo2, { size: 15 })
2416
+ title: historySidebarOpen ? t.toolbar.closeHistory : t.toolbar.openHistory,
2417
+ testId: "toggle-history-sidebar",
2418
+ active: historySidebarOpen,
2419
+ onClick: () => setHistorySidebarOpen(!historySidebarOpen),
2420
+ children: /* @__PURE__ */ jsxRuntime.jsx(PanelRight, { size: 15 })
2173
2421
  }
2174
- ),
2422
+ ) })
2423
+ ] }),
2424
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 px-2 py-1 border-t border-gray-100", children: [
2175
2425
  /* @__PURE__ */ jsxRuntime.jsx(
2176
- ToolbarIconButton,
2426
+ HeaderFooterToggle,
2177
2427
  {
2178
- title: t.toolbar.redo,
2179
- testId: "btn-redo",
2180
- disabled: !canRedo,
2181
- onClick: redo,
2182
- children: /* @__PURE__ */ jsxRuntime.jsx(Redo2, { size: 15 })
2428
+ enabled: document2.headerFooterEnabled,
2429
+ onToggle: handleToggle
2183
2430
  }
2184
- )
2185
- ] }),
2186
- /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2187
- /* @__PURE__ */ jsxRuntime.jsx(
2188
- "select",
2189
- {
2190
- className: "h-7 rounded border border-gray-200 bg-white px-2 text-xs text-gray-700\n focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-400",
2191
- "data-testid": "font-selector",
2192
- defaultValue: "Inter",
2193
- onChange: handleFontChange,
2194
- children: SUPPORTED_FONTS.map((font) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: font, style: { fontFamily: font }, children: font }, font))
2195
- }
2196
- ),
2197
- /* @__PURE__ */ jsxRuntime.jsx(
2198
- "select",
2199
- {
2200
- className: "h-7 w-16 rounded border border-gray-200 bg-white px-1 text-xs text-gray-700\n focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-400",
2201
- "data-testid": "font-size-selector",
2202
- defaultValue: "12",
2203
- onChange: handleFontSizeChange,
2204
- children: SUPPORTED_FONT_SIZES.map((size) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: size, children: size }, size))
2205
- }
2206
- ),
2207
- /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2208
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5", "data-testid": "format-group", children: [
2209
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.bold, testId: "btn-bold", onClick: handleBold, children: /* @__PURE__ */ jsxRuntime.jsx(Bold, { size: 15 }) }),
2210
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.italic, testId: "btn-italic", onClick: handleItalic, children: /* @__PURE__ */ jsxRuntime.jsx(Italic, { size: 15 }) }),
2211
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.underline, testId: "btn-underline", onClick: handleUnderline, children: /* @__PURE__ */ jsxRuntime.jsx(Underline, { size: 15 }) }),
2212
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.strikethrough, testId: "btn-strike", onClick: handleStrikethrough, children: /* @__PURE__ */ jsxRuntime.jsx(Strikethrough, { size: 15 }) })
2213
- ] }),
2214
- /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2215
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5", "data-testid": "align-group", children: [
2216
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.alignLeft, testId: "btn-align-left", onClick: handleAlignLeft, children: /* @__PURE__ */ jsxRuntime.jsx(TextAlignStart, { size: 15 }) }),
2217
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.alignCenter, testId: "btn-align-center", onClick: handleAlignCenter, children: /* @__PURE__ */ jsxRuntime.jsx(TextAlignCenter, { size: 15 }) }),
2218
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.alignRight, testId: "btn-align-right", onClick: handleAlignRight, children: /* @__PURE__ */ jsxRuntime.jsx(TextAlignEnd, { size: 15 }) }),
2219
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.justify, testId: "btn-align-justify", onClick: handleAlignJustify, children: /* @__PURE__ */ jsxRuntime.jsx(TextAlignJustify, { size: 15 }) })
2220
- ] }),
2221
- /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2222
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5", "data-testid": "list-group", children: [
2223
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.numberedList, testId: "btn-list-number", onClick: handleListNumber, children: /* @__PURE__ */ jsxRuntime.jsx(ListOrdered, { size: 15 }) }),
2224
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.bulletList, testId: "btn-list-bullet", onClick: handleListBullet, children: /* @__PURE__ */ jsxRuntime.jsx(List, { size: 15 }) }),
2225
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.indent, testId: "btn-indent", onClick: handleIndent, children: /* @__PURE__ */ jsxRuntime.jsx(ListIndentIncrease, { size: 15 }) }),
2226
- /* @__PURE__ */ jsxRuntime.jsx(ToolbarIconButton, { title: t.toolbar.outdent, testId: "btn-outdent", onClick: handleOutdent, children: /* @__PURE__ */ jsxRuntime.jsx(ListIndentDecrease, { size: 15 }) })
2227
- ] }),
2228
- /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2229
- /* @__PURE__ */ jsxRuntime.jsx(
2230
- HeaderFooterToggle,
2231
- {
2232
- enabled: document2.headerFooterEnabled,
2233
- onToggle: handleToggle
2234
- }
2235
- ),
2236
- document2.headerFooterEnabled && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2237
- /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2238
- /* @__PURE__ */ jsxRuntime.jsx(
2431
+ ),
2432
+ document2.headerFooterEnabled && /* @__PURE__ */ jsxRuntime.jsx(
2239
2433
  HeaderFooterActions,
2240
2434
  {
2241
2435
  activePageId,
@@ -2249,22 +2443,8 @@ const Toolbar = () => {
2249
2443
  onClearAllFooters: handleClearAllFooters
2250
2444
  }
2251
2445
  )
2252
- ] }),
2253
- toolbarItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2254
- /* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
2255
- toolbarItems.map((ToolbarItem, idx) => /* @__PURE__ */ jsxRuntime.jsx(ToolbarItem, {}, idx))
2256
- ] }),
2257
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(
2258
- ToolbarIconButton,
2259
- {
2260
- title: historySidebarOpen ? t.toolbar.closeHistory : t.toolbar.openHistory,
2261
- testId: "toggle-history-sidebar",
2262
- active: historySidebarOpen,
2263
- onClick: () => setHistorySidebarOpen(!historySidebarOpen),
2264
- children: /* @__PURE__ */ jsxRuntime.jsx(PanelRight, { size: 15 })
2265
- }
2266
- ) })
2267
- ] })
2446
+ ] })
2447
+ ]
2268
2448
  }
2269
2449
  );
2270
2450
  };
@@ -2533,7 +2713,7 @@ function usePagination(document2, dispatch) {
2533
2713
  }
2534
2714
  const lexicalTheme = {
2535
2715
  root: "lex4-root outline-none",
2536
- paragraph: "lex4-paragraph mb-1",
2716
+ paragraph: "lex4-paragraph text-justify",
2537
2717
  heading: {
2538
2718
  h1: "text-3xl font-bold mb-2",
2539
2719
  h2: "text-2xl font-bold mb-2",
@@ -3145,6 +3325,7 @@ const PageBody = ({
3145
3325
  readOnly = false
3146
3326
  }) => {
3147
3327
  const { nodes, bodyPlugins, themeOverrides } = useExtensions();
3328
+ const t = useTranslations();
3148
3329
  const config = React.useMemo(
3149
3330
  () => {
3150
3331
  var _a, _b;
@@ -3198,7 +3379,7 @@ const PageBody = ({
3198
3379
  style: { overflow: "visible" }
3199
3380
  }
3200
3381
  ),
3201
- placeholder: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 left-0 text-gray-400 pointer-events-none select-none", children: "Start typing..." }),
3382
+ placeholder: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 left-0 text-gray-400 pointer-events-none select-none", children: t.body.placeholder }),
3202
3383
  ErrorBoundary: LexicalErrorBoundary.LexicalErrorBoundary
3203
3384
  }
3204
3385
  ),
@@ -3338,10 +3519,10 @@ const PageHeader = ({
3338
3519
  LexicalContentEditable.ContentEditable,
3339
3520
  {
3340
3521
  ref: contentRef,
3341
- className: `outline-none p-2 text-sm text-gray-600 min-h-[24px] ${hasPageCounter ? "pr-24" : ""}`
3522
+ className: `outline-none p-2 text-gray-600 min-h-[24px] ${hasPageCounter ? "pr-24" : ""}`
3342
3523
  }
3343
3524
  ),
3344
- placeholder: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `absolute top-0 left-0 text-gray-400 pointer-events-none select-none p-2 text-sm ${hasPageCounter ? "pr-24" : ""}`, children: t.header.placeholder }),
3525
+ placeholder: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `absolute top-0 left-0 text-gray-400 pointer-events-none select-none p-2 ${hasPageCounter ? "pr-24" : ""}`, children: t.header.placeholder }),
3345
3526
  ErrorBoundary: LexicalErrorBoundary.LexicalErrorBoundary
3346
3527
  }
3347
3528
  ),
@@ -3418,10 +3599,10 @@ const PageFooter = ({
3418
3599
  LexicalContentEditable.ContentEditable,
3419
3600
  {
3420
3601
  ref: contentRef,
3421
- className: `outline-none p-2 text-sm text-gray-600 min-h-[24px] ${hasPageCounter ? "pr-24" : ""}`
3602
+ className: `outline-none p-2 text-gray-600 min-h-[24px] ${hasPageCounter ? "pr-24" : ""}`
3422
3603
  }
3423
3604
  ),
3424
- placeholder: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `absolute top-0 left-0 text-gray-400 pointer-events-none select-none p-2 text-sm ${hasPageCounter ? "pr-24" : ""}`, children: t.footer.placeholder }),
3605
+ placeholder: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `absolute top-0 left-0 text-gray-400 pointer-events-none select-none p-2 ${hasPageCounter ? "pr-24" : ""}`, children: t.footer.placeholder }),
3425
3606
  ErrorBoundary: LexicalErrorBoundary.LexicalErrorBoundary
3426
3607
  }
3427
3608
  ),
@@ -4354,6 +4535,36 @@ function astExtension() {
4354
4535
  }
4355
4536
  };
4356
4537
  }
4538
+ const EMPTY_CONTEXT = {
4539
+ definitions: [],
4540
+ refreshDefinitions: () => {
4541
+ },
4542
+ getDefinition: () => void 0
4543
+ };
4544
+ const VariableContext = React.createContext(EMPTY_CONTEXT);
4545
+ const VariableProvider = ({
4546
+ initialDefinitions = [],
4547
+ children
4548
+ }) => {
4549
+ const [definitions, setDefinitions] = React.useState(initialDefinitions);
4550
+ const refresh = React.useCallback((newDefinitions) => {
4551
+ setDefinitions(newDefinitions);
4552
+ }, []);
4553
+ const getDefinition = React.useCallback(
4554
+ (key) => {
4555
+ return definitions.find((d) => d.key === key);
4556
+ },
4557
+ [definitions]
4558
+ );
4559
+ const value = React.useMemo(
4560
+ () => ({ definitions, refreshDefinitions: refresh, getDefinition }),
4561
+ [definitions, refresh, getDefinition]
4562
+ );
4563
+ return /* @__PURE__ */ jsxRuntime.jsx(VariableContext.Provider, { value, children });
4564
+ };
4565
+ function useVariables() {
4566
+ return React.useContext(VariableContext);
4567
+ }
4357
4568
  class VariableNode extends lexical.DecoratorNode {
4358
4569
  constructor(variableKey, key) {
4359
4570
  super(key);
@@ -4413,17 +4624,23 @@ class VariableNode extends lexical.DecoratorNode {
4413
4624
  }
4414
4625
  // -- Rendering --
4415
4626
  decorate() {
4416
- return /* @__PURE__ */ jsxRuntime.jsx(
4417
- "span",
4418
- {
4419
- className: "lex4-variable-chip inline-flex items-center rounded bg-white px-1.5 py-0.5\n text-xs font-medium text-blue-700 border border-blue-300 select-none\n cursor-default whitespace-nowrap mx-0.5",
4420
- "data-testid": `variable-chip-${this.__variableKey}`,
4421
- title: this.__variableKey,
4422
- children: `{{${this.__variableKey}}}`
4423
- }
4424
- );
4627
+ return /* @__PURE__ */ jsxRuntime.jsx(VariableChip, { variableKey: this.__variableKey });
4425
4628
  }
4426
4629
  }
4630
+ function VariableChip({ variableKey }) {
4631
+ var _a;
4632
+ const { getDefinition } = useVariables();
4633
+ const label = ((_a = getDefinition(variableKey)) == null ? void 0 : _a.label) ?? variableKey;
4634
+ return /* @__PURE__ */ jsxRuntime.jsx(
4635
+ "span",
4636
+ {
4637
+ className: "lex4-variable-chip inline-flex items-center rounded-full border border-blue-300\n bg-white px-2 py-0.5 text-[11px] font-medium text-blue-700 select-none\n cursor-default whitespace-nowrap mx-0.5",
4638
+ "data-testid": `variable-chip-${variableKey}`,
4639
+ title: variableKey,
4640
+ children: label
4641
+ }
4642
+ );
4643
+ }
4427
4644
  function $createVariableNode(variableKey) {
4428
4645
  return lexical.$applyNodeReplacement(new VariableNode(variableKey));
4429
4646
  }
@@ -4450,36 +4667,6 @@ const VariablePlugin = () => {
4450
4667
  }, [editor]);
4451
4668
  return null;
4452
4669
  };
4453
- const EMPTY_CONTEXT = {
4454
- definitions: [],
4455
- refreshDefinitions: () => {
4456
- },
4457
- getDefinition: () => void 0
4458
- };
4459
- const VariableContext = React.createContext(EMPTY_CONTEXT);
4460
- const VariableProvider = ({
4461
- initialDefinitions = [],
4462
- children
4463
- }) => {
4464
- const [definitions, setDefinitions] = React.useState(initialDefinitions);
4465
- const refresh = React.useCallback((newDefinitions) => {
4466
- setDefinitions(newDefinitions);
4467
- }, []);
4468
- const getDefinition = React.useCallback(
4469
- (key) => {
4470
- return definitions.find((d) => d.key === key);
4471
- },
4472
- [definitions]
4473
- );
4474
- const value = React.useMemo(
4475
- () => ({ definitions, refreshDefinitions: refresh, getDefinition }),
4476
- [definitions, refresh, getDefinition]
4477
- );
4478
- return /* @__PURE__ */ jsxRuntime.jsx(VariableContext.Provider, { value, children });
4479
- };
4480
- function useVariables() {
4481
- return React.useContext(VariableContext);
4482
- }
4483
4670
  const VariablePicker = ({ onInsert, disabled = false }) => {
4484
4671
  const { definitions } = useVariables();
4485
4672
  const [open, setOpen] = React.useState(false);
@@ -4772,6 +4959,7 @@ exports.INSERT_VARIABLE_COMMAND = INSERT_VARIABLE_COMMAND;
4772
4959
  exports.Lex4Editor = Lex4Editor;
4773
4960
  exports.MAX_FOOTER_HEIGHT_PX = MAX_FOOTER_HEIGHT_PX;
4774
4961
  exports.MAX_HEADER_HEIGHT_PX = MAX_HEADER_HEIGHT_PX;
4962
+ exports.PT_BR_TRANSLATIONS = PT_BR_TRANSLATIONS;
4775
4963
  exports.VariableNode = VariableNode;
4776
4964
  exports.astExtension = astExtension;
4777
4965
  exports.buildSavePayload = buildSavePayload;