reifyui 0.13.5 → 0.13.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 +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilePreview.jsx +5 -4
package/dist/index.js
CHANGED
|
@@ -2255,7 +2255,11 @@ var LANG = {
|
|
|
2255
2255
|
lua: "lua",
|
|
2256
2256
|
pl: "perl",
|
|
2257
2257
|
dockerfile: "dockerfile",
|
|
2258
|
-
diff: "diff"
|
|
2258
|
+
diff: "diff",
|
|
2259
|
+
md: "markdown",
|
|
2260
|
+
txt: "plaintext",
|
|
2261
|
+
log: "plaintext",
|
|
2262
|
+
csv: "plaintext"
|
|
2259
2263
|
};
|
|
2260
2264
|
var OFFICE = /* @__PURE__ */ new Set(["pptx", "ppt", "pptm", "odp", "doc", "docx", "odt", "rtf"]);
|
|
2261
2265
|
var SHEET = /* @__PURE__ */ new Set(["xls", "xlsx", "xlsm", "xlsb", "ods"]);
|
|
@@ -2335,7 +2339,7 @@ function FilePreview({
|
|
|
2335
2339
|
const kind = kindOf(name, mime);
|
|
2336
2340
|
if (kind === "office") {
|
|
2337
2341
|
if (!officePdfUrl) {
|
|
2338
|
-
setSt({ kind: "binary", error: "This format has no
|
|
2342
|
+
setSt({ kind: "binary", error: "This format has no preview here. Download it to open it." });
|
|
2339
2343
|
return;
|
|
2340
2344
|
}
|
|
2341
2345
|
const r = await get(officePdfUrl(url));
|
|
@@ -2346,7 +2350,7 @@ function FilePreview({
|
|
|
2346
2350
|
}
|
|
2347
2351
|
if (kind === "sheet") {
|
|
2348
2352
|
if (!parseWorkbook) {
|
|
2349
|
-
setSt({ kind: "binary", error: "This format has no
|
|
2353
|
+
setSt({ kind: "binary", error: "This format has no preview here. Download it to open it." });
|
|
2350
2354
|
return;
|
|
2351
2355
|
}
|
|
2352
2356
|
try {
|
|
@@ -2429,8 +2433,8 @@ function FilePreview({
|
|
|
2429
2433
|
st.kind === "video" && st.objUrl && /* @__PURE__ */ jsx13("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsx13("video", { className: "uic-fp-media", src: st.objUrl, controls: true }) }),
|
|
2430
2434
|
st.kind === "audio" && st.objUrl && /* @__PURE__ */ jsx13("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsx13("audio", { src: st.objUrl, controls: true }) }),
|
|
2431
2435
|
st.kind === "markdown" && /* @__PURE__ */ jsx13("div", { className: "uic-fp-doc", children: renderMarkdown ? renderMarkdown(st.text || "") : /* @__PURE__ */ jsx13("pre", { className: "uic-fp-pre", children: st.text }) }),
|
|
2432
|
-
st.kind === "code" && /* @__PURE__ */ jsx13(CodeBlock, { code: st.text || "",
|
|
2433
|
-
st.kind === "html" && view === "source" && /* @__PURE__ */ jsx13(CodeBlock, { code: st.text || "",
|
|
2436
|
+
st.kind === "code" && /* @__PURE__ */ jsx13(CodeBlock, { code: st.text || "", language: LANG[extOf(name)] || "plaintext" }),
|
|
2437
|
+
st.kind === "html" && view === "source" && /* @__PURE__ */ jsx13(CodeBlock, { code: st.text || "", language: "xml" }),
|
|
2434
2438
|
st.kind === "html" && view === "preview" && // The page runs in its own origin with scripts only: a mockup's own script and styles
|
|
2435
2439
|
// work, and nothing in it can read the host page, its cookies or its storage.
|
|
2436
2440
|
/* @__PURE__ */ jsx13("iframe", { className: "uic-fp-frame", title: name, sandbox: "allow-scripts", srcDoc: st.text || "" }),
|