@cherrystudio/file-preview 0.1.2 → 0.1.3
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.
|
@@ -9,7 +9,7 @@ import { t as attachTouchPinch } from "./touchPinch-C4fl-9fg.js";
|
|
|
9
9
|
import { t as require_jszip_min } from "./jszip.min-uwqlc4KL.js";
|
|
10
10
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
//#region ../../node_modules/.pnpm/docx-preview@0.3.7_patch_hash=
|
|
12
|
+
//#region ../../node_modules/.pnpm/docx-preview@0.3.7_patch_hash=2a780ab6775f1223fd4fb6f344769f949bdf72d851058935b3f34e59b25cfabb/node_modules/docx-preview/dist/docx-preview.mjs
|
|
13
13
|
var import_jszip_min = /* @__PURE__ */ __toESM(require_jszip_min(), 1);
|
|
14
14
|
/*
|
|
15
15
|
* @license
|
|
@@ -437,7 +437,7 @@ function parseLineSpacing(elem, xml) {
|
|
|
437
437
|
before: xml.lengthAttr(elem, "before"),
|
|
438
438
|
after: xml.lengthAttr(elem, "after"),
|
|
439
439
|
line: xml.intAttr(elem, "line"),
|
|
440
|
-
lineRule: xml.attr(elem, "lineRule")
|
|
440
|
+
lineRule: xml.attr(elem, "lineRule") ?? "auto"
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
443
|
function parseRunProperties(elem, xml) {
|
|
@@ -2356,7 +2356,7 @@ var DocumentParser = class {
|
|
|
2356
2356
|
var before = globalXmlParser.lengthAttr(node, "before");
|
|
2357
2357
|
var after = globalXmlParser.lengthAttr(node, "after");
|
|
2358
2358
|
var line = globalXmlParser.intAttr(node, "line", null);
|
|
2359
|
-
var lineRule = globalXmlParser.attr(node, "lineRule");
|
|
2359
|
+
var lineRule = globalXmlParser.attr(node, "lineRule") ?? "auto";
|
|
2360
2360
|
if (before) style["margin-top"] = before;
|
|
2361
2361
|
if (after) style["margin-bottom"] = after;
|
|
2362
2362
|
if (line !== null) switch (lineRule) {
|
package/dist/react.js
CHANGED
|
@@ -52,7 +52,7 @@ var plugins = [
|
|
|
52
52
|
id: "word",
|
|
53
53
|
extensions: ["docx"],
|
|
54
54
|
mediaTypes: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
|
|
55
|
-
load: () => import("./WordFilePreview-
|
|
55
|
+
load: () => import("./WordFilePreview-Tvm-vK91.js"),
|
|
56
56
|
supportsSelectionReference: true
|
|
57
57
|
}
|
|
58
58
|
];
|
package/dist/styles.css
CHANGED
|
@@ -203,6 +203,10 @@
|
|
|
203
203
|
top: 50%;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
:where(.file-preview-root):is(.top-\[calc\(1rem\+var\(--image-preview-titlebar-height\,0px\)\)\]), :where(.file-preview-root) .top-\[calc\(1rem\+var\(--image-preview-titlebar-height\,0px\)\)\] {
|
|
207
|
+
top: calc(1rem + var(--image-preview-titlebar-height, 0px));
|
|
208
|
+
}
|
|
209
|
+
|
|
206
210
|
:where(.file-preview-root):is(.right-4), :where(.file-preview-root) .right-4 {
|
|
207
211
|
right: calc(var(--spacing) * 4);
|
|
208
212
|
}
|