@zero-library/common 3.2.0 → 3.2.1

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.cjs.js CHANGED
@@ -1378,6 +1378,7 @@ var commonZhCN = {
1378
1378
  filePreview: {
1379
1379
  title: "\u6587\u4EF6\u9884\u89C8",
1380
1380
  closePreview: "\u5173\u95ED\u9884\u89C8",
1381
+ htmlPreviewTitle: "HTML \u9884\u89C8",
1381
1382
  previewImageAlt: "\u9884\u89C8\u56FE\u7247",
1382
1383
  previewNotSupported: "\u6682\u4E0D\u652F\u6301 {{suffix}} \u6587\u4EF6\u7684\u9884\u89C8",
1383
1384
  previewNotSupportedDownload: "{{suffix}} \u6587\u4EF6\u6682\u4E0D\u652F\u6301\u5728\u7EBF\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u6253\u5F00",
@@ -1412,6 +1413,7 @@ var commonZhCN = {
1412
1413
  unknown: "\u672A\u77E5",
1413
1414
  // 工具栏
1414
1415
  toolbar: {
1416
+ toolbarAria: "\u7F16\u8F91\u5668\u5DE5\u5177\u680F",
1415
1417
  quote: "\u5F15\u7528\u9009\u4E2D\u6587\u672C",
1416
1418
  annotation: "\u6279\u6CE8",
1417
1419
  excerpt: "\u6458\u5F55\u7B14\u8BB0",
@@ -1449,6 +1451,7 @@ var commonZhCN = {
1449
1451
  toggle: "\u5207\u6362\u9AD8\u4EAE\u663E\u793A ({{color}})",
1450
1452
  label: "\u80CC\u666F\u8272",
1451
1453
  textLabel: "\u6587\u672C\u80CC\u666F\u8272",
1454
+ colorOptionAria: "{{label}} \u9AD8\u4EAE\u989C\u8272",
1452
1455
  removeBackground: "\u79FB\u9664\u80CC\u666F",
1453
1456
  removeHighlight: "\u79FB\u9664\u9AD8\u4EAE",
1454
1457
  default: "\u9ED8\u8BA4\u80CC\u666F",
@@ -1485,7 +1488,14 @@ var commonZhCN = {
1485
1488
  empty: "\u6682\u65E0\u6458\u5F55"
1486
1489
  },
1487
1490
  // 文件 / 图片上传
1491
+ themeToggle: {
1492
+ switchToLight: "\u5207\u6362\u5230\u6D45\u8272\u6A21\u5F0F",
1493
+ switchToDark: "\u5207\u6362\u5230\u6DF1\u8272\u6A21\u5F0F"
1494
+ },
1488
1495
  upload: {
1496
+ clickToUpload: "\u70B9\u51FB\u4E0A\u4F20",
1497
+ dragAndDrop: "\u6216\u62D6\u62FD\u5230\u6B64\u5904",
1498
+ maxFileHint: "\u6700\u591A {{limit}} \u4E2A\u6587\u4EF6\uFF0C\u6BCF\u4E2A {{size}}MB",
1489
1499
  noFile: "\u672A\u63D0\u4F9B\u6587\u4EF6",
1490
1500
  canceled: "\u4E0A\u4F20\u5DF2\u53D6\u6D88",
1491
1501
  fileSizeExceeded: "\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u9650\u5236 ({{max}}MB)",
@@ -1567,6 +1577,7 @@ var commonEnUS = {
1567
1577
  filePreview: {
1568
1578
  title: "File Preview",
1569
1579
  closePreview: "Close preview",
1580
+ htmlPreviewTitle: "HTML Preview",
1570
1581
  previewImageAlt: "Preview image",
1571
1582
  previewNotSupported: "Preview of {{suffix}} files is not supported",
1572
1583
  previewNotSupportedDownload: "{{suffix}} files cannot be previewed online, please download and open",
@@ -1599,6 +1610,7 @@ var commonEnUS = {
1599
1610
  mainArea: "Main content area, start typing...",
1600
1611
  unknown: "Unknown",
1601
1612
  toolbar: {
1613
+ toolbarAria: "Editor toolbar",
1602
1614
  quote: "Quote Selected Text",
1603
1615
  annotation: "Annotate",
1604
1616
  excerpt: "Excerpt Note",
@@ -1635,6 +1647,7 @@ var commonEnUS = {
1635
1647
  toggle: "Toggle highlight ({{color}})",
1636
1648
  label: "Background color",
1637
1649
  textLabel: "Text background color",
1650
+ colorOptionAria: "{{label}} highlight color",
1638
1651
  removeBackground: "Remove background",
1639
1652
  removeHighlight: "Remove highlight",
1640
1653
  default: "Default background",
@@ -1668,7 +1681,14 @@ var commonEnUS = {
1668
1681
  confirmDelete: "Delete this excerpt?",
1669
1682
  empty: "No excerpts"
1670
1683
  },
1684
+ themeToggle: {
1685
+ switchToLight: "Switch to light mode",
1686
+ switchToDark: "Switch to dark mode"
1687
+ },
1671
1688
  upload: {
1689
+ clickToUpload: "Click to upload",
1690
+ dragAndDrop: "or drag and drop",
1691
+ maxFileHint: "Maximum {{limit}} files, {{size}}MB each",
1672
1692
  noFile: "No file provided",
1673
1693
  canceled: "Upload canceled",
1674
1694
  fileSizeExceeded: "File size exceeds the maximum limit ({{max}}MB)",
@@ -1759,6 +1779,7 @@ var commonJaJP = {
1759
1779
  filePreview: {
1760
1780
  title: "\u30D5\u30A1\u30A4\u30EB\u30D7\u30EC\u30D3\u30E5\u30FC",
1761
1781
  closePreview: "\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u9589\u3058\u308B",
1782
+ htmlPreviewTitle: "HTML \u30D7\u30EC\u30D3\u30E5\u30FC",
1762
1783
  previewImageAlt: "\u30D7\u30EC\u30D3\u30E5\u30FC\u753B\u50CF",
1763
1784
  previewNotSupported: "{{suffix}}\u30D5\u30A1\u30A4\u30EB\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u306F\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093",
1764
1785
  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",
@@ -1793,6 +1814,7 @@ var commonJaJP = {
1793
1814
  unknown: "\u4E0D\u660E",
1794
1815
  // ツールバー
1795
1816
  toolbar: {
1817
+ toolbarAria: "\u30A8\u30C7\u30A3\u30BF\u30FC\u30C4\u30FC\u30EB\u30D0\u30FC",
1796
1818
  quote: "\u9078\u629E\u30C6\u30AD\u30B9\u30C8\u3092\u5F15\u7528",
1797
1819
  annotation: "\u6CE8\u91C8",
1798
1820
  excerpt: "\u629C\u7C8B\u30E1\u30E2",
@@ -1830,6 +1852,7 @@ var commonJaJP = {
1830
1852
  toggle: "\u30CF\u30A4\u30E9\u30A4\u30C8\u8868\u793A\u3092\u5207\u308A\u66FF\u3048 ({{color}})",
1831
1853
  label: "\u80CC\u666F\u8272",
1832
1854
  textLabel: "\u30C6\u30AD\u30B9\u30C8\u80CC\u666F\u8272",
1855
+ colorOptionAria: "{{label}} \u306E\u30CF\u30A4\u30E9\u30A4\u30C8\u8272",
1833
1856
  removeBackground: "\u80CC\u666F\u3092\u524A\u9664",
1834
1857
  removeHighlight: "\u30CF\u30A4\u30E9\u30A4\u30C8\u3092\u524A\u9664",
1835
1858
  default: "\u30C7\u30D5\u30A9\u30EB\u30C8\u80CC\u666F",
@@ -1866,7 +1889,14 @@ var commonJaJP = {
1866
1889
  empty: "\u629C\u7C8B\u306F\u3042\u308A\u307E\u305B\u3093"
1867
1890
  },
1868
1891
  // ファイル / 画像アップロード
1892
+ themeToggle: {
1893
+ switchToLight: "\u30E9\u30A4\u30C8\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048",
1894
+ switchToDark: "\u30C0\u30FC\u30AF\u30E2\u30FC\u30C9\u306B\u5207\u308A\u66FF\u3048"
1895
+ },
1869
1896
  upload: {
1897
+ clickToUpload: "\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",
1898
+ dragAndDrop: "\u307E\u305F\u306F\u30C9\u30E9\u30C3\u30B0\uFF06\u30C9\u30ED\u30C3\u30D7",
1899
+ maxFileHint: "\u6700\u5927 {{limit}} \u4EF6\u3001\u5404 {{size}}MB \u307E\u3067",
1870
1900
  noFile: "\u30D5\u30A1\u30A4\u30EB\u304C\u63D0\u4F9B\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
1871
1901
  canceled: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306F\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F",
1872
1902
  fileSizeExceeded: "\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u6700\u5927\u5236\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059 ({{max}}MB)",
@@ -3507,7 +3537,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
3507
3537
  var CodePreview_default = CodePreview;
3508
3538
  var { Text } = antd.Typography;
3509
3539
  pdfjsLib__namespace.GlobalWorkerOptions.workerSrc = "https://unpkg.com/pdfjs-dist@5.4.296/legacy/build/pdf.worker.min.mjs";
3510
- var MIN_SCALE = 0.6;
3540
+ var MIN_SCALE = 0.1;
3511
3541
  var MAX_SCALE = 1.5;
3512
3542
  var SCALE_STEP = 0.1;
3513
3543
  var PdfPage = React3__namespace.default.memo(({ pdf, pageNumber, scale, scrollContainerRef, defaultSize }) => {
@@ -3853,7 +3883,7 @@ var HtmlPreview = ({ fileUrl }) => {
3853
3883
  srcDoc: content,
3854
3884
  style: { width: "100%", height: "100%", border: "none" },
3855
3885
  sandbox: "allow-scripts allow-same-origin allow-popups allow-forms",
3856
- title: "HTML Preview"
3886
+ title: t2("filePreview.htmlPreviewTitle")
3857
3887
  }
3858
3888
  ) : null });
3859
3889
  };
@@ -6047,13 +6077,14 @@ var Toolbar = React3.forwardRef(
6047
6077
  ({ children, className, variant = "fixed", ...props }, ref) => {
6048
6078
  const toolbarRef = React3.useRef(null);
6049
6079
  const composedRef = useComposedRef(toolbarRef, ref);
6080
+ const { t: t2 } = useTranslation(NS_COMMON);
6050
6081
  useToolbarNavigation(toolbarRef);
6051
6082
  return /* @__PURE__ */ jsxRuntime.jsx(
6052
6083
  "div",
6053
6084
  {
6054
6085
  ref: composedRef,
6055
6086
  role: "toolbar",
6056
- "aria-label": "toolbar",
6087
+ "aria-label": t2("markdownEditor.toolbar.toolbarAria"),
6057
6088
  "data-variant": variant,
6058
6089
  className: cn("tiptap-toolbar", className),
6059
6090
  ...props,
@@ -7043,7 +7074,7 @@ function ColorHighlightPopoverContent({
7043
7074
  editor,
7044
7075
  highlightColor: color.value,
7045
7076
  tooltip: t2(color.labelKey),
7046
- "aria-label": `${t2(color.labelKey)} highlight color`,
7077
+ "aria-label": t2("markdownEditor.highlight.colorOptionAria", { label: t2(color.labelKey) }),
7047
7078
  tabIndex: index === selectedIndex ? 0 : -1,
7048
7079
  "data-highlighted": selectedIndex === index
7049
7080
  },
@@ -7615,7 +7646,7 @@ var HeadingDropdownMenu = React3.forwardRef(
7615
7646
  tabIndex: -1,
7616
7647
  disabled: !canToggle3,
7617
7648
  "data-disabled": !canToggle3,
7618
- "aria-label": "Format text as heading",
7649
+ "aria-label": t2("markdownEditor.toolbar.heading"),
7619
7650
  "aria-pressed": isActive,
7620
7651
  tooltip: t2("markdownEditor.toolbar.heading"),
7621
7652
  ...buttonProps,