@zero-library/common 2.1.5 → 2.1.7
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 +45 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +368 -24
- package/dist/index.d.ts +368 -24
- package/dist/index.esm.js +45 -15
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -2
package/dist/index.cjs.js
CHANGED
|
@@ -152,7 +152,7 @@ var FileIcon_default = ({ suffix, fontSize = 22 }) => {
|
|
|
152
152
|
return /* @__PURE__ */ jsxRuntime.jsx(icons.FileZipOutlined, {});
|
|
153
153
|
case "CATALOG":
|
|
154
154
|
return /* @__PURE__ */ jsxRuntime.jsx("i", { style: styles, className: "iconfont icon-wenjianjia" });
|
|
155
|
-
//
|
|
155
|
+
// 文件夹图标
|
|
156
156
|
default:
|
|
157
157
|
return /* @__PURE__ */ jsxRuntime.jsx(icons.FileUnknownOutlined, {});
|
|
158
158
|
}
|
|
@@ -1317,7 +1317,7 @@ var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumb
|
|
|
1317
1317
|
}, 500);
|
|
1318
1318
|
onSetPageNo?.(currentPage + 1);
|
|
1319
1319
|
}, [currentPage]);
|
|
1320
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: embedRef, className: styles_module_default.nsPreviewPdf, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.Worker, { workerUrl:
|
|
1320
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: embedRef, className: styles_module_default.nsPreviewPdf, children: /* @__PURE__ */ jsxRuntime.jsx(core$1.Worker, { workerUrl: `//logosdata.cn/public/pdf/pdf.worker.min.js`, children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Splitter, { onResize: setSizes, children: [
|
|
1321
1321
|
isHasThumbnails && /* @__PURE__ */ jsxRuntime.jsx(antd.Splitter.Panel, { resizable: false, size: sizes[0], min: 250, max: 500, collapsible: true, children: /* @__PURE__ */ jsxRuntime.jsx(Thumbnails, {}) }),
|
|
1322
1322
|
/* @__PURE__ */ jsxRuntime.jsx(antd.Splitter.Panel, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "height-full", children: [
|
|
1323
1323
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1338,13 +1338,13 @@ var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumb
|
|
|
1338
1338
|
// 启用 CMap 支持,解决中文字体显示问题
|
|
1339
1339
|
// cMapUrl: 指定 CMap 文件的 URL,用于处理非拉丁字符(如中文)
|
|
1340
1340
|
// cMapPacked: 使用压缩的 CMap 文件以提高性能
|
|
1341
|
-
cMapUrl: "logosdata.cn/public/pdf/pdfjs-dist@3.2.146/cmaps/",
|
|
1341
|
+
cMapUrl: "//logosdata.cn/public/pdf/pdfjs-dist@3.2.146/cmaps/",
|
|
1342
1342
|
// 使用可用的源
|
|
1343
1343
|
cMapPacked: true,
|
|
1344
1344
|
// 禁用字体子集化,确保完整字体加载
|
|
1345
1345
|
disableFontFace: false,
|
|
1346
1346
|
// 启用标准字体支持
|
|
1347
|
-
standardFontDataUrl: "logosdata.cn/public/pdf/pdfjs-dist@3.2.146/standard_fonts/",
|
|
1347
|
+
standardFontDataUrl: "//logosdata.cn/public/pdf/pdfjs-dist@3.2.146/standard_fonts/",
|
|
1348
1348
|
// 设置字体回退策略
|
|
1349
1349
|
fallbackFontName: "Helvetica"
|
|
1350
1350
|
});
|
|
@@ -1396,18 +1396,38 @@ var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue }
|
|
|
1396
1396
|
}, [suffix, fileUrl, pdfParams]);
|
|
1397
1397
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { justify: "center", align: "center", className: "height-full", children: Preview });
|
|
1398
1398
|
};
|
|
1399
|
-
var FilePreviewDrawer_default = ({
|
|
1400
|
-
|
|
1401
|
-
|
|
1399
|
+
var FilePreviewDrawer_default = ({
|
|
1400
|
+
open,
|
|
1401
|
+
fileUrl,
|
|
1402
|
+
suffix,
|
|
1403
|
+
title = "\u6587\u4EF6\u9884\u89C8",
|
|
1404
|
+
onClose,
|
|
1405
|
+
password,
|
|
1406
|
+
fileParams,
|
|
1407
|
+
pdfParams,
|
|
1408
|
+
onSetPassSuccess
|
|
1409
|
+
}) => {
|
|
1410
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1411
|
+
antd.Drawer,
|
|
1402
1412
|
{
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1413
|
+
title,
|
|
1414
|
+
push: false,
|
|
1415
|
+
width: "100%",
|
|
1416
|
+
open,
|
|
1417
|
+
onClose,
|
|
1418
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1419
|
+
FilePreview_default,
|
|
1420
|
+
{
|
|
1421
|
+
fileUrl,
|
|
1422
|
+
suffix,
|
|
1423
|
+
password,
|
|
1424
|
+
fileParams,
|
|
1425
|
+
pdfParams,
|
|
1426
|
+
onSetPassSuccess
|
|
1427
|
+
}
|
|
1428
|
+
)
|
|
1409
1429
|
}
|
|
1410
|
-
)
|
|
1430
|
+
);
|
|
1411
1431
|
};
|
|
1412
1432
|
|
|
1413
1433
|
// src/components/Iframe/styles.module.less
|
|
@@ -4982,7 +5002,17 @@ var MobileToolbarContent = ({ type, onBack }) => /* @__PURE__ */ jsxRuntime.jsxs
|
|
|
4982
5002
|
/* @__PURE__ */ jsxRuntime.jsx(ToolbarSeparator, {}),
|
|
4983
5003
|
type === "highlighter" ? /* @__PURE__ */ jsxRuntime.jsx(HighlightContent, {}) : /* @__PURE__ */ jsxRuntime.jsx(LinkContent, {})
|
|
4984
5004
|
] });
|
|
4985
|
-
var MarkdownEditor_default = ({
|
|
5005
|
+
var MarkdownEditor_default = ({
|
|
5006
|
+
value = "",
|
|
5007
|
+
onChange,
|
|
5008
|
+
onScrollPage,
|
|
5009
|
+
searchValue,
|
|
5010
|
+
disabled,
|
|
5011
|
+
extraNav,
|
|
5012
|
+
showToolbar = true,
|
|
5013
|
+
onQuote,
|
|
5014
|
+
onDownloadFile
|
|
5015
|
+
}) => {
|
|
4986
5016
|
const isMobile = useMobile();
|
|
4987
5017
|
const windowSize = useWindowSize();
|
|
4988
5018
|
const lastContentRef = React16.useRef("");
|