@open-file-viewer/core 0.1.10 → 0.1.11
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/dist/index.js
CHANGED
|
@@ -2517,10 +2517,7 @@ function objectFit(fit) {
|
|
|
2517
2517
|
|
|
2518
2518
|
// src/plugins/video.ts
|
|
2519
2519
|
var mpegtsPackageName = "mpegts.js";
|
|
2520
|
-
var loadMpegts = () =>
|
|
2521
|
-
/* @vite-ignore */
|
|
2522
|
-
mpegtsPackageName
|
|
2523
|
-
);
|
|
2520
|
+
var loadMpegts = () => importOptionalModule(mpegtsPackageName);
|
|
2524
2521
|
var videoExtensions = /* @__PURE__ */ new Set([
|
|
2525
2522
|
"mp4",
|
|
2526
2523
|
"mpg",
|
|
@@ -2688,6 +2685,9 @@ function videoPlugin() {
|
|
|
2688
2685
|
}
|
|
2689
2686
|
};
|
|
2690
2687
|
}
|
|
2688
|
+
function importOptionalModule(packageName) {
|
|
2689
|
+
return new Function("packageName", "return import(packageName)")(packageName);
|
|
2690
|
+
}
|
|
2691
2691
|
function resolveMpegtsApi(module) {
|
|
2692
2692
|
const api = module.default || module;
|
|
2693
2693
|
if (!api.Events || !api.isSupported || !api.createPlayer) {
|
|
@@ -12177,6 +12177,7 @@ import pako3 from "pako";
|
|
|
12177
12177
|
var libreDwgPromise;
|
|
12178
12178
|
var defaultLibreDwgWasmBaseUrl = "/vendor/libredwg-web";
|
|
12179
12179
|
var minReadableDrawingHeight = 420;
|
|
12180
|
+
var libreDwgPackageName = "@mlightcad/libredwg-web";
|
|
12180
12181
|
var svgNumberPattern = /-?\d*\.?\d+(?:e[-+]?\d+)?/gi;
|
|
12181
12182
|
async function renderLibreDwgPreview(ctx, options = {}) {
|
|
12182
12183
|
if (ctx.extension !== "dwg" || options.enabled === false) {
|
|
@@ -12298,9 +12299,12 @@ async function renderLibreDwgPreview(ctx, options = {}) {
|
|
|
12298
12299
|
}
|
|
12299
12300
|
}
|
|
12300
12301
|
function loadLibreDwg() {
|
|
12301
|
-
libreDwgPromise ||=
|
|
12302
|
+
libreDwgPromise ||= importOptionalModule2(libreDwgPackageName);
|
|
12302
12303
|
return libreDwgPromise;
|
|
12303
12304
|
}
|
|
12305
|
+
function importOptionalModule2(packageName) {
|
|
12306
|
+
return new Function("packageName", "return import(packageName)")(packageName);
|
|
12307
|
+
}
|
|
12304
12308
|
function createDwgStatusTitle(fileName, stats, reliability) {
|
|
12305
12309
|
const wrapper = document.createElement("span");
|
|
12306
12310
|
const title = document.createElement("strong");
|