@file-viewer/docx 0.3.41 → 0.3.42
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/docx-preview.js +56 -12
- package/dist/docx-preview.min.js +1 -1
- package/dist/docx-preview.min.mjs +1 -1
- package/dist/docx-preview.mjs +56 -12
- package/dist/docx-preview.worker.js +15436 -15547
- package/dist/font-scripts.d.ts +4 -0
- package/dist/html-renderer.d.ts +15 -1
- package/package.json +3 -5
package/dist/html-renderer.d.ts
CHANGED
|
@@ -143,6 +143,7 @@ export declare class HtmlRenderer {
|
|
|
143
143
|
currentTabs: any[];
|
|
144
144
|
anchorLayouts: Map<string, AnchorPosition>;
|
|
145
145
|
currentParagraph: WmlParagraph;
|
|
146
|
+
private currentRunFont;
|
|
146
147
|
currentParagraphTabIndex: number;
|
|
147
148
|
currentParagraphTabCount: number;
|
|
148
149
|
commentHighlight: any;
|
|
@@ -244,7 +245,20 @@ export declare class HtmlRenderer {
|
|
|
244
245
|
textBoxAutospace(elem: WmlParagraph, style: IDomStyle, supports?: (value: string) => boolean): string;
|
|
245
246
|
applyTextBoxFontInheritance(elem: OpenXmlElement, style: IDomStyle, result: HTMLElement): void;
|
|
246
247
|
/** 字体槽独立继承;不改解析树、文字节点或 display target 的对应关系。 */
|
|
247
|
-
|
|
248
|
+
resolveRunFontSlots(elem: OpenXmlElement, style: IDomStyle): {
|
|
249
|
+
fontFamily: string;
|
|
250
|
+
eastAsianFontFamily: string;
|
|
251
|
+
splitEastAsia: boolean;
|
|
252
|
+
complexFontSize: string;
|
|
253
|
+
previousEastAsian: boolean;
|
|
254
|
+
};
|
|
255
|
+
applyRunFontSlots(elem: OpenXmlElement, style: IDomStyle, result: HTMLElement, font?: {
|
|
256
|
+
fontFamily: string;
|
|
257
|
+
eastAsianFontFamily: string;
|
|
258
|
+
splitEastAsia: boolean;
|
|
259
|
+
complexFontSize: string;
|
|
260
|
+
previousEastAsian: boolean;
|
|
261
|
+
}): void;
|
|
248
262
|
isInsideTableCell(elem: OpenXmlElement): boolean;
|
|
249
263
|
paragraphSnapToGrid(elem: WmlParagraph, style: IDomStyle): string;
|
|
250
264
|
paragraphUsesDocumentGrid(elem: WmlParagraph, style: IDomStyle): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@file-viewer/docx",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.42",
|
|
4
4
|
"description": "Pure HTML DOCX renderer fork for browser-based Word previews.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -35,15 +35,13 @@
|
|
|
35
35
|
"rollup": "^4.9.1",
|
|
36
36
|
"@types/node": "24.19.1",
|
|
37
37
|
"@rollup/plugin-terser": "^1.0.0",
|
|
38
|
-
"@rollup/plugin-typescript": "^12.1.4",
|
|
39
38
|
"terser": "^5.43.1",
|
|
40
39
|
"jasmine-core": "^5.1.0",
|
|
41
40
|
"playwright": "1.61.1",
|
|
42
41
|
"tslib": "^2.4.0",
|
|
43
42
|
"typescript": "^5.0.3",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"jsdom": "^27.4.0"
|
|
43
|
+
"jsdom": "^27.4.0",
|
|
44
|
+
"esbuild": "0.28.2"
|
|
47
45
|
},
|
|
48
46
|
"overrides": {
|
|
49
47
|
"brace-expansion": "1.1.21",
|