@3cr/viewer-browser 0.0.137 → 0.0.139
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/README.md +11 -0
- package/dist/Viewer3CR.js +1 -1
- package/dist/Viewer3CR.mjs +7 -13
- package/dist/Viewer3CR.umd.js +1 -1
- package/index.ts +9 -9
- package/package.json +1 -1
package/dist/Viewer3CR.mjs
CHANGED
|
@@ -20369,14 +20369,8 @@ const nb = J({
|
|
|
20369
20369
|
]));
|
|
20370
20370
|
}
|
|
20371
20371
|
}), Lb = "__3cr-viewer-injected-style__";
|
|
20372
|
-
let Ks, Lf =
|
|
20373
|
-
function zb(
|
|
20374
|
-
return "10000000-1000-4000-8000-100000000000".replace(
|
|
20375
|
-
/[018]/g,
|
|
20376
|
-
(e) => (+e ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> +e / 4).toString(16)
|
|
20377
|
-
);
|
|
20378
|
-
}
|
|
20379
|
-
async function Hb(e, t = {
|
|
20372
|
+
let Ks, Lf = "__modal_set__";
|
|
20373
|
+
async function zb(e, t = {
|
|
20380
20374
|
disableTheme: !1
|
|
20381
20375
|
}) {
|
|
20382
20376
|
const n = document.createElement("div");
|
|
@@ -20384,14 +20378,14 @@ async function Hb(e, t = {
|
|
|
20384
20378
|
const r = J1(Mb);
|
|
20385
20379
|
t.disableTheme && (o2.value = !0), Pv(r), Ks = r.mount(n), await zf(e);
|
|
20386
20380
|
}
|
|
20387
|
-
async function
|
|
20381
|
+
async function Hb(e = void 0, t = Qi) {
|
|
20388
20382
|
if (!Ks)
|
|
20389
20383
|
throw new Error(
|
|
20390
20384
|
"Please call `registerViewer(version: string, idSelector: string)` first"
|
|
20391
20385
|
);
|
|
20392
20386
|
await Ks.loadInstance(e, t);
|
|
20393
20387
|
}
|
|
20394
|
-
async function
|
|
20388
|
+
async function Bb() {
|
|
20395
20389
|
console.log("Ejected Viewer");
|
|
20396
20390
|
const e = document.getElementById(Lf), t = document.getElementById(Lb);
|
|
20397
20391
|
e?.remove(), t?.remove();
|
|
@@ -20400,7 +20394,7 @@ if (globalThis.Viewer3CR)
|
|
|
20400
20394
|
for (const e of Object.keys(globalThis.Viewer3CR))
|
|
20401
20395
|
globalThis[e] = globalThis.Viewer3CR[e];
|
|
20402
20396
|
export {
|
|
20403
|
-
|
|
20404
|
-
|
|
20405
|
-
|
|
20397
|
+
Bb as ejectViewer,
|
|
20398
|
+
Hb as loadViewer,
|
|
20399
|
+
zb as registerViewer
|
|
20406
20400
|
};
|