@zero-library/common 3.2.0 → 3.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.
package/dist/index.d.mts CHANGED
@@ -1002,6 +1002,7 @@ declare const commonEnUS: {
1002
1002
  filePreview: {
1003
1003
  title: string;
1004
1004
  closePreview: string;
1005
+ htmlPreviewTitle: string;
1005
1006
  previewImageAlt: string;
1006
1007
  previewNotSupported: string;
1007
1008
  previewNotSupportedDownload: string;
@@ -1034,6 +1035,7 @@ declare const commonEnUS: {
1034
1035
  mainArea: string;
1035
1036
  unknown: string;
1036
1037
  toolbar: {
1038
+ toolbarAria: string;
1037
1039
  quote: string;
1038
1040
  annotation: string;
1039
1041
  excerpt: string;
@@ -1070,6 +1072,7 @@ declare const commonEnUS: {
1070
1072
  toggle: string;
1071
1073
  label: string;
1072
1074
  textLabel: string;
1075
+ colorOptionAria: string;
1073
1076
  removeBackground: string;
1074
1077
  removeHighlight: string;
1075
1078
  default: string;
@@ -1103,7 +1106,14 @@ declare const commonEnUS: {
1103
1106
  confirmDelete: string;
1104
1107
  empty: string;
1105
1108
  };
1109
+ themeToggle: {
1110
+ switchToLight: string;
1111
+ switchToDark: string;
1112
+ };
1106
1113
  upload: {
1114
+ clickToUpload: string;
1115
+ dragAndDrop: string;
1116
+ maxFileHint: string;
1107
1117
  noFile: string;
1108
1118
  canceled: string;
1109
1119
  fileSizeExceeded: string;
@@ -1189,6 +1199,7 @@ declare const commonJaJP: {
1189
1199
  filePreview: {
1190
1200
  title: string;
1191
1201
  closePreview: string;
1202
+ htmlPreviewTitle: string;
1192
1203
  previewImageAlt: string;
1193
1204
  previewNotSupported: string;
1194
1205
  previewNotSupportedDownload: string;
@@ -1221,6 +1232,7 @@ declare const commonJaJP: {
1221
1232
  mainArea: string;
1222
1233
  unknown: string;
1223
1234
  toolbar: {
1235
+ toolbarAria: string;
1224
1236
  quote: string;
1225
1237
  annotation: string;
1226
1238
  excerpt: string;
@@ -1257,6 +1269,7 @@ declare const commonJaJP: {
1257
1269
  toggle: string;
1258
1270
  label: string;
1259
1271
  textLabel: string;
1272
+ colorOptionAria: string;
1260
1273
  removeBackground: string;
1261
1274
  removeHighlight: string;
1262
1275
  default: string;
@@ -1290,7 +1303,14 @@ declare const commonJaJP: {
1290
1303
  confirmDelete: string;
1291
1304
  empty: string;
1292
1305
  };
1306
+ themeToggle: {
1307
+ switchToLight: string;
1308
+ switchToDark: string;
1309
+ };
1293
1310
  upload: {
1311
+ clickToUpload: string;
1312
+ dragAndDrop: string;
1313
+ maxFileHint: string;
1294
1314
  noFile: string;
1295
1315
  canceled: string;
1296
1316
  fileSizeExceeded: string;
@@ -1383,6 +1403,7 @@ declare const commonZhCN: {
1383
1403
  readonly filePreview: {
1384
1404
  readonly title: "文件预览";
1385
1405
  readonly closePreview: "关闭预览";
1406
+ readonly htmlPreviewTitle: "HTML 预览";
1386
1407
  readonly previewImageAlt: "预览图片";
1387
1408
  readonly previewNotSupported: "暂不支持 {{suffix}} 文件的预览";
1388
1409
  readonly previewNotSupportedDownload: "{{suffix}} 文件暂不支持在线预览,请下载打开";
@@ -1415,6 +1436,7 @@ declare const commonZhCN: {
1415
1436
  readonly mainArea: "主内容区域,开始输入文本...";
1416
1437
  readonly unknown: "未知";
1417
1438
  readonly toolbar: {
1439
+ readonly toolbarAria: "编辑器工具栏";
1418
1440
  readonly quote: "引用选中文本";
1419
1441
  readonly annotation: "批注";
1420
1442
  readonly excerpt: "摘录笔记";
@@ -1451,6 +1473,7 @@ declare const commonZhCN: {
1451
1473
  readonly toggle: "切换高亮显示 ({{color}})";
1452
1474
  readonly label: "背景色";
1453
1475
  readonly textLabel: "文本背景色";
1476
+ readonly colorOptionAria: "{{label}} 高亮颜色";
1454
1477
  readonly removeBackground: "移除背景";
1455
1478
  readonly removeHighlight: "移除高亮";
1456
1479
  readonly default: "默认背景";
@@ -1484,7 +1507,14 @@ declare const commonZhCN: {
1484
1507
  readonly confirmDelete: "确认删除当前摘录吗?";
1485
1508
  readonly empty: "暂无摘录";
1486
1509
  };
1510
+ readonly themeToggle: {
1511
+ readonly switchToLight: "切换到浅色模式";
1512
+ readonly switchToDark: "切换到深色模式";
1513
+ };
1487
1514
  readonly upload: {
1515
+ readonly clickToUpload: "点击上传";
1516
+ readonly dragAndDrop: "或拖拽到此处";
1517
+ readonly maxFileHint: "最多 {{limit}} 个文件,每个 {{size}}MB";
1488
1518
  readonly noFile: "未提供文件";
1489
1519
  readonly canceled: "上传已取消";
1490
1520
  readonly fileSizeExceeded: "文件大小超过最大限制 ({{max}}MB)";
@@ -1505,7 +1535,7 @@ type I18nResources = Record<string, Record<string, NamespaceResource>>;
1505
1535
  /** 语言存储键 */
1506
1536
  declare const LANG_KEY = "ns-lang";
1507
1537
  /**
1508
- * 按优先级获取语言:URL 参数 → localStorage → 默认 zh-CN
1538
+ * 按优先级获取语言:URL 参数 → localStorage → navigator.language → 默认 zh-CN
1509
1539
  * 命中 URL 参数时顺带持久化,避免跳转后语言回退
1510
1540
  */
1511
1541
  declare function getLang(): string;
package/dist/index.d.ts CHANGED
@@ -1002,6 +1002,7 @@ declare const commonEnUS: {
1002
1002
  filePreview: {
1003
1003
  title: string;
1004
1004
  closePreview: string;
1005
+ htmlPreviewTitle: string;
1005
1006
  previewImageAlt: string;
1006
1007
  previewNotSupported: string;
1007
1008
  previewNotSupportedDownload: string;
@@ -1034,6 +1035,7 @@ declare const commonEnUS: {
1034
1035
  mainArea: string;
1035
1036
  unknown: string;
1036
1037
  toolbar: {
1038
+ toolbarAria: string;
1037
1039
  quote: string;
1038
1040
  annotation: string;
1039
1041
  excerpt: string;
@@ -1070,6 +1072,7 @@ declare const commonEnUS: {
1070
1072
  toggle: string;
1071
1073
  label: string;
1072
1074
  textLabel: string;
1075
+ colorOptionAria: string;
1073
1076
  removeBackground: string;
1074
1077
  removeHighlight: string;
1075
1078
  default: string;
@@ -1103,7 +1106,14 @@ declare const commonEnUS: {
1103
1106
  confirmDelete: string;
1104
1107
  empty: string;
1105
1108
  };
1109
+ themeToggle: {
1110
+ switchToLight: string;
1111
+ switchToDark: string;
1112
+ };
1106
1113
  upload: {
1114
+ clickToUpload: string;
1115
+ dragAndDrop: string;
1116
+ maxFileHint: string;
1107
1117
  noFile: string;
1108
1118
  canceled: string;
1109
1119
  fileSizeExceeded: string;
@@ -1189,6 +1199,7 @@ declare const commonJaJP: {
1189
1199
  filePreview: {
1190
1200
  title: string;
1191
1201
  closePreview: string;
1202
+ htmlPreviewTitle: string;
1192
1203
  previewImageAlt: string;
1193
1204
  previewNotSupported: string;
1194
1205
  previewNotSupportedDownload: string;
@@ -1221,6 +1232,7 @@ declare const commonJaJP: {
1221
1232
  mainArea: string;
1222
1233
  unknown: string;
1223
1234
  toolbar: {
1235
+ toolbarAria: string;
1224
1236
  quote: string;
1225
1237
  annotation: string;
1226
1238
  excerpt: string;
@@ -1257,6 +1269,7 @@ declare const commonJaJP: {
1257
1269
  toggle: string;
1258
1270
  label: string;
1259
1271
  textLabel: string;
1272
+ colorOptionAria: string;
1260
1273
  removeBackground: string;
1261
1274
  removeHighlight: string;
1262
1275
  default: string;
@@ -1290,7 +1303,14 @@ declare const commonJaJP: {
1290
1303
  confirmDelete: string;
1291
1304
  empty: string;
1292
1305
  };
1306
+ themeToggle: {
1307
+ switchToLight: string;
1308
+ switchToDark: string;
1309
+ };
1293
1310
  upload: {
1311
+ clickToUpload: string;
1312
+ dragAndDrop: string;
1313
+ maxFileHint: string;
1294
1314
  noFile: string;
1295
1315
  canceled: string;
1296
1316
  fileSizeExceeded: string;
@@ -1383,6 +1403,7 @@ declare const commonZhCN: {
1383
1403
  readonly filePreview: {
1384
1404
  readonly title: "文件预览";
1385
1405
  readonly closePreview: "关闭预览";
1406
+ readonly htmlPreviewTitle: "HTML 预览";
1386
1407
  readonly previewImageAlt: "预览图片";
1387
1408
  readonly previewNotSupported: "暂不支持 {{suffix}} 文件的预览";
1388
1409
  readonly previewNotSupportedDownload: "{{suffix}} 文件暂不支持在线预览,请下载打开";
@@ -1415,6 +1436,7 @@ declare const commonZhCN: {
1415
1436
  readonly mainArea: "主内容区域,开始输入文本...";
1416
1437
  readonly unknown: "未知";
1417
1438
  readonly toolbar: {
1439
+ readonly toolbarAria: "编辑器工具栏";
1418
1440
  readonly quote: "引用选中文本";
1419
1441
  readonly annotation: "批注";
1420
1442
  readonly excerpt: "摘录笔记";
@@ -1451,6 +1473,7 @@ declare const commonZhCN: {
1451
1473
  readonly toggle: "切换高亮显示 ({{color}})";
1452
1474
  readonly label: "背景色";
1453
1475
  readonly textLabel: "文本背景色";
1476
+ readonly colorOptionAria: "{{label}} 高亮颜色";
1454
1477
  readonly removeBackground: "移除背景";
1455
1478
  readonly removeHighlight: "移除高亮";
1456
1479
  readonly default: "默认背景";
@@ -1484,7 +1507,14 @@ declare const commonZhCN: {
1484
1507
  readonly confirmDelete: "确认删除当前摘录吗?";
1485
1508
  readonly empty: "暂无摘录";
1486
1509
  };
1510
+ readonly themeToggle: {
1511
+ readonly switchToLight: "切换到浅色模式";
1512
+ readonly switchToDark: "切换到深色模式";
1513
+ };
1487
1514
  readonly upload: {
1515
+ readonly clickToUpload: "点击上传";
1516
+ readonly dragAndDrop: "或拖拽到此处";
1517
+ readonly maxFileHint: "最多 {{limit}} 个文件,每个 {{size}}MB";
1488
1518
  readonly noFile: "未提供文件";
1489
1519
  readonly canceled: "上传已取消";
1490
1520
  readonly fileSizeExceeded: "文件大小超过最大限制 ({{max}}MB)";
@@ -1505,7 +1535,7 @@ type I18nResources = Record<string, Record<string, NamespaceResource>>;
1505
1535
  /** 语言存储键 */
1506
1536
  declare const LANG_KEY = "ns-lang";
1507
1537
  /**
1508
- * 按优先级获取语言:URL 参数 → localStorage → 默认 zh-CN
1538
+ * 按优先级获取语言:URL 参数 → localStorage → navigator.language → 默认 zh-CN
1509
1539
  * 命中 URL 参数时顺带持久化,避免跳转后语言回退
1510
1540
  */
1511
1541
  declare function getLang(): string;
package/dist/index.esm.js CHANGED
@@ -1328,6 +1328,7 @@ var commonZhCN = {
1328
1328
  filePreview: {
1329
1329
  title: "\u6587\u4EF6\u9884\u89C8",
1330
1330
  closePreview: "\u5173\u95ED\u9884\u89C8",
1331
+ htmlPreviewTitle: "HTML \u9884\u89C8",
1331
1332
  previewImageAlt: "\u9884\u89C8\u56FE\u7247",
1332
1333
  previewNotSupported: "\u6682\u4E0D\u652F\u6301 {{suffix}} \u6587\u4EF6\u7684\u9884\u89C8",
1333
1334
  previewNotSupportedDownload: "{{suffix}} \u6587\u4EF6\u6682\u4E0D\u652F\u6301\u5728\u7EBF\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u6253\u5F00",
@@ -1362,6 +1363,7 @@ var commonZhCN = {
1362
1363
  unknown: "\u672A\u77E5",
1363
1364
  // 工具栏
1364
1365
  toolbar: {
1366
+ toolbarAria: "\u7F16\u8F91\u5668\u5DE5\u5177\u680F",
1365
1367
  quote: "\u5F15\u7528\u9009\u4E2D\u6587\u672C",
1366
1368
  annotation: "\u6279\u6CE8",
1367
1369
  excerpt: "\u6458\u5F55\u7B14\u8BB0",
@@ -1399,6 +1401,7 @@ var commonZhCN = {
1399
1401
  toggle: "\u5207\u6362\u9AD8\u4EAE\u663E\u793A ({{color}})",
1400
1402
  label: "\u80CC\u666F\u8272",
1401
1403
  textLabel: "\u6587\u672C\u80CC\u666F\u8272",
1404
+ colorOptionAria: "{{label}} \u9AD8\u4EAE\u989C\u8272",
1402
1405
  removeBackground: "\u79FB\u9664\u80CC\u666F",
1403
1406
  removeHighlight: "\u79FB\u9664\u9AD8\u4EAE",
1404
1407
  default: "\u9ED8\u8BA4\u80CC\u666F",
@@ -1435,7 +1438,14 @@ var commonZhCN = {
1435
1438
  empty: "\u6682\u65E0\u6458\u5F55"
1436
1439
  },
1437
1440
  // 文件 / 图片上传
1441
+ themeToggle: {
1442
+ switchToLight: "\u5207\u6362\u5230\u6D45\u8272\u6A21\u5F0F",
1443
+ switchToDark: "\u5207\u6362\u5230\u6DF1\u8272\u6A21\u5F0F"
1444
+ },
1438
1445
  upload: {
1446
+ clickToUpload: "\u70B9\u51FB\u4E0A\u4F20",
1447
+ dragAndDrop: "\u6216\u62D6\u62FD\u5230\u6B64\u5904",
1448
+ maxFileHint: "\u6700\u591A {{limit}} \u4E2A\u6587\u4EF6\uFF0C\u6BCF\u4E2A {{size}}MB",
1439
1449
  noFile: "\u672A\u63D0\u4F9B\u6587\u4EF6",
1440
1450
  canceled: "\u4E0A\u4F20\u5DF2\u53D6\u6D88",
1441
1451
  fileSizeExceeded: "\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u9650\u5236 ({{max}}MB)",
@@ -1517,6 +1527,7 @@ var commonEnUS = {
1517
1527
  filePreview: {
1518
1528
  title: "File Preview",
1519
1529
  closePreview: "Close preview",
1530
+ htmlPreviewTitle: "HTML Preview",
1520
1531
  previewImageAlt: "Preview image",
1521
1532
  previewNotSupported: "Preview of {{suffix}} files is not supported",
1522
1533
  previewNotSupportedDownload: "{{suffix}} files cannot be previewed online, please download and open",
@@ -1549,6 +1560,7 @@ var commonEnUS = {
1549
1560
  mainArea: "Main content area, start typing...",
1550
1561
  unknown: "Unknown",
1551
1562
  toolbar: {
1563
+ toolbarAria: "Editor toolbar",
1552
1564
  quote: "Quote Selected Text",
1553
1565
  annotation: "Annotate",
1554
1566
  excerpt: "Excerpt Note",
@@ -1585,6 +1597,7 @@ var commonEnUS = {
1585
1597
  toggle: "Toggle highlight ({{color}})",
1586
1598
  label: "Background color",
1587
1599
  textLabel: "Text background color",
1600
+ colorOptionAria: "{{label}} highlight color",
1588
1601
  removeBackground: "Remove background",
1589
1602
  removeHighlight: "Remove highlight",
1590
1603
  default: "Default background",
@@ -1618,7 +1631,14 @@ var commonEnUS = {
1618
1631
  confirmDelete: "Delete this excerpt?",
1619
1632
  empty: "No excerpts"
1620
1633
  },
1634
+ themeToggle: {
1635
+ switchToLight: "Switch to light mode",
1636
+ switchToDark: "Switch to dark mode"
1637
+ },
1621
1638
  upload: {
1639
+ clickToUpload: "Click to upload",
1640
+ dragAndDrop: "or drag and drop",
1641
+ maxFileHint: "Maximum {{limit}} files, {{size}}MB each",
1622
1642
  noFile: "No file provided",
1623
1643
  canceled: "Upload canceled",
1624
1644
  fileSizeExceeded: "File size exceeds the maximum limit ({{max}}MB)",
@@ -1709,6 +1729,7 @@ var commonJaJP = {
1709
1729
  filePreview: {
1710
1730
  title: "\u30D5\u30A1\u30A4\u30EB\u30D7\u30EC\u30D3\u30E5\u30FC",
1711
1731
  closePreview: "\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u9589\u3058\u308B",
1732
+ htmlPreviewTitle: "HTML \u30D7\u30EC\u30D3\u30E5\u30FC",
1712
1733
  previewImageAlt: "\u30D7\u30EC\u30D3\u30E5\u30FC\u753B\u50CF",
1713
1734
  previewNotSupported: "{{suffix}}\u30D5\u30A1\u30A4\u30EB\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u306F\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093",
1714
1735
  previewNotSupportedDownload: "{{suffix}}\u30D5\u30A1\u30A4\u30EB\u306F\u30AA\u30F3\u30E9\u30A4\u30F3\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3066\u958B\u3044\u3066\u304F\u3060\u3055\u3044",
@@ -1743,6 +1764,7 @@ var commonJaJP = {
1743
1764
  unknown: "\u4E0D\u660E",
1744
1765
  // ツールバー
1745
1766
  toolbar: {
1767
+ toolbarAria: "\u30A8\u30C7\u30A3\u30BF\u30FC\u30C4\u30FC\u30EB\u30D0\u30FC",
1746
1768
  quote: "\u9078\u629E\u30C6\u30AD\u30B9\u30C8\u3092\u5F15\u7528",
1747
1769
  annotation: "\u6CE8\u91C8",
1748
1770
  excerpt: "\u629C\u7C8B\u30E1\u30E2",
@@ -1780,6 +1802,7 @@ var commonJaJP = {
1780
1802
  toggle: "\u30CF\u30A4\u30E9\u30A4\u30C8\u8868\u793A\u3092\u5207\u308A\u66FF\u3048 ({{color}})",
1781
1803
  label: "\u80CC\u666F\u8272",
1782
1804
  textLabel: "\u30C6\u30AD\u30B9\u30C8\u80CC\u666F\u8272",
1805
+ colorOptionAria: "{{label}} \u306E\u30CF\u30A4\u30E9\u30A4\u30C8\u8272",
1783
1806
  removeBackground: "\u80CC\u666F\u3092\u524A\u9664",
1784
1807
  removeHighlight: "\u30CF\u30A4\u30E9\u30A4\u30C8\u3092\u524A\u9664",
1785
1808
  default: "\u30C7\u30D5\u30A9\u30EB\u30C8\u80CC\u666F",
@@ -1816,7 +1839,14 @@ var commonJaJP = {
1816
1839
  empty: "\u629C\u7C8B\u306F\u3042\u308A\u307E\u305B\u3093"
1817
1840
  },
1818
1841
  // ファイル / 画像アップロード
1842
+ themeToggle: {
1843
+ switchToLight: "\u30E9\u30A4\u30C8\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",
1844
+ switchToDark: "\u30C0\u30FC\u30AF\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048"
1845
+ },
1819
1846
  upload: {
1847
+ clickToUpload: "\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",
1848
+ dragAndDrop: "\u307E\u305F\u306F\u30C9\u30E9\u30C3\u30B0\uFF06\u30C9\u30ED\u30C3\u30D7",
1849
+ maxFileHint: "\u6700\u5927 {{limit}} \u4EF6\u3001\u5404 {{size}}MB \u307E\u3067",
1820
1850
  noFile: "\u30D5\u30A1\u30A4\u30EB\u304C\u63D0\u4F9B\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
1821
1851
  canceled: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306F\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F",
1822
1852
  fileSizeExceeded: "\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u6700\u5927\u5236\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059 ({{max}}MB)",
@@ -1846,10 +1876,21 @@ var LocaleProvider = ({ children, ...rest }) => {
1846
1876
 
1847
1877
  // src/i18n/index.ts
1848
1878
  var DEFAULT_LNG = "zh-CN";
1879
+ function normalizeLang(lng) {
1880
+ const normalized = String(lng || "").trim().toLowerCase();
1881
+ if (!normalized) return DEFAULT_LNG;
1882
+ if (normalized.startsWith("zh")) return "zh-CN";
1883
+ if (normalized.startsWith("en")) return "en-US";
1884
+ if (normalized.startsWith("ja")) return "ja-JP";
1885
+ }
1886
+ function getNavigatorLang() {
1887
+ if (typeof navigator === "undefined") return DEFAULT_LNG;
1888
+ return normalizeLang(navigator.language);
1889
+ }
1849
1890
  var LANG_KEY = "ns-lang";
1850
1891
  var langManager = createTokenManager({ key: LANG_KEY });
1851
1892
  function getLang() {
1852
- return langManager.get() || DEFAULT_LNG;
1893
+ return langManager.get() || getNavigatorLang();
1853
1894
  }
1854
1895
  var i18n = createInstance({
1855
1896
  lng: DEFAULT_LNG,
@@ -1874,11 +1915,12 @@ function initI18n(options = {}) {
1874
1915
  return i18n;
1875
1916
  }
1876
1917
  function switchLang(lng, reload = false) {
1877
- langManager.set(lng);
1918
+ const nextLang = normalizeLang(lng);
1919
+ langManager.set(nextLang);
1878
1920
  if (reload) {
1879
1921
  window?.top?.location.reload();
1880
1922
  } else {
1881
- i18n.changeLanguage(lng);
1923
+ i18n.changeLanguage(nextLang);
1882
1924
  }
1883
1925
  }
1884
1926
  function useTranslation(namespace) {
@@ -3457,7 +3499,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
3457
3499
  var CodePreview_default = CodePreview;
3458
3500
  var { Text } = Typography;
3459
3501
  pdfjsLib.GlobalWorkerOptions.workerSrc = "https://unpkg.com/pdfjs-dist@5.4.296/legacy/build/pdf.worker.min.mjs";
3460
- var MIN_SCALE = 0.6;
3502
+ var MIN_SCALE = 0.1;
3461
3503
  var MAX_SCALE = 1.5;
3462
3504
  var SCALE_STEP = 0.1;
3463
3505
  var PdfPage = React3__default.memo(({ pdf, pageNumber, scale, scrollContainerRef, defaultSize }) => {
@@ -3803,7 +3845,7 @@ var HtmlPreview = ({ fileUrl }) => {
3803
3845
  srcDoc: content,
3804
3846
  style: { width: "100%", height: "100%", border: "none" },
3805
3847
  sandbox: "allow-scripts allow-same-origin allow-popups allow-forms",
3806
- title: "HTML Preview"
3848
+ title: t2("filePreview.htmlPreviewTitle")
3807
3849
  }
3808
3850
  ) : null });
3809
3851
  };
@@ -5997,13 +6039,14 @@ var Toolbar = forwardRef(
5997
6039
  ({ children, className, variant = "fixed", ...props }, ref) => {
5998
6040
  const toolbarRef = useRef(null);
5999
6041
  const composedRef = useComposedRef(toolbarRef, ref);
6042
+ const { t: t2 } = useTranslation(NS_COMMON);
6000
6043
  useToolbarNavigation(toolbarRef);
6001
6044
  return /* @__PURE__ */ jsx(
6002
6045
  "div",
6003
6046
  {
6004
6047
  ref: composedRef,
6005
6048
  role: "toolbar",
6006
- "aria-label": "toolbar",
6049
+ "aria-label": t2("markdownEditor.toolbar.toolbarAria"),
6007
6050
  "data-variant": variant,
6008
6051
  className: cn("tiptap-toolbar", className),
6009
6052
  ...props,
@@ -6993,7 +7036,7 @@ function ColorHighlightPopoverContent({
6993
7036
  editor,
6994
7037
  highlightColor: color.value,
6995
7038
  tooltip: t2(color.labelKey),
6996
- "aria-label": `${t2(color.labelKey)} highlight color`,
7039
+ "aria-label": t2("markdownEditor.highlight.colorOptionAria", { label: t2(color.labelKey) }),
6997
7040
  tabIndex: index === selectedIndex ? 0 : -1,
6998
7041
  "data-highlighted": selectedIndex === index
6999
7042
  },
@@ -7565,7 +7608,7 @@ var HeadingDropdownMenu = forwardRef(
7565
7608
  tabIndex: -1,
7566
7609
  disabled: !canToggle3,
7567
7610
  "data-disabled": !canToggle3,
7568
- "aria-label": "Format text as heading",
7611
+ "aria-label": t2("markdownEditor.toolbar.heading"),
7569
7612
  "aria-pressed": isActive,
7570
7613
  tooltip: t2("markdownEditor.toolbar.heading"),
7571
7614
  ...buttonProps,