@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.cjs
CHANGED
|
@@ -2570,10 +2570,7 @@ function objectFit(fit) {
|
|
|
2570
2570
|
|
|
2571
2571
|
// src/plugins/video.ts
|
|
2572
2572
|
var mpegtsPackageName = "mpegts.js";
|
|
2573
|
-
var loadMpegts = () =>
|
|
2574
|
-
/* @vite-ignore */
|
|
2575
|
-
mpegtsPackageName
|
|
2576
|
-
);
|
|
2573
|
+
var loadMpegts = () => importOptionalModule(mpegtsPackageName);
|
|
2577
2574
|
var videoExtensions = /* @__PURE__ */ new Set([
|
|
2578
2575
|
"mp4",
|
|
2579
2576
|
"mpg",
|
|
@@ -2741,6 +2738,9 @@ function videoPlugin() {
|
|
|
2741
2738
|
}
|
|
2742
2739
|
};
|
|
2743
2740
|
}
|
|
2741
|
+
function importOptionalModule(packageName) {
|
|
2742
|
+
return new Function("packageName", "return import(packageName)")(packageName);
|
|
2743
|
+
}
|
|
2744
2744
|
function resolveMpegtsApi(module2) {
|
|
2745
2745
|
const api = module2.default || module2;
|
|
2746
2746
|
if (!api.Events || !api.isSupported || !api.createPlayer) {
|
|
@@ -12230,6 +12230,7 @@ var import_pako3 = __toESM(require("pako"), 1);
|
|
|
12230
12230
|
var libreDwgPromise;
|
|
12231
12231
|
var defaultLibreDwgWasmBaseUrl = "/vendor/libredwg-web";
|
|
12232
12232
|
var minReadableDrawingHeight = 420;
|
|
12233
|
+
var libreDwgPackageName = "@mlightcad/libredwg-web";
|
|
12233
12234
|
var svgNumberPattern = /-?\d*\.?\d+(?:e[-+]?\d+)?/gi;
|
|
12234
12235
|
async function renderLibreDwgPreview(ctx, options = {}) {
|
|
12235
12236
|
if (ctx.extension !== "dwg" || options.enabled === false) {
|
|
@@ -12351,9 +12352,12 @@ async function renderLibreDwgPreview(ctx, options = {}) {
|
|
|
12351
12352
|
}
|
|
12352
12353
|
}
|
|
12353
12354
|
function loadLibreDwg() {
|
|
12354
|
-
libreDwgPromise ||=
|
|
12355
|
+
libreDwgPromise ||= importOptionalModule2(libreDwgPackageName);
|
|
12355
12356
|
return libreDwgPromise;
|
|
12356
12357
|
}
|
|
12358
|
+
function importOptionalModule2(packageName) {
|
|
12359
|
+
return new Function("packageName", "return import(packageName)")(packageName);
|
|
12360
|
+
}
|
|
12357
12361
|
function createDwgStatusTitle(fileName, stats, reliability) {
|
|
12358
12362
|
const wrapper = document.createElement("span");
|
|
12359
12363
|
const title = document.createElement("strong");
|