foss-design 0.6.1 → 0.8.0
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/cli.js +1337 -381
- package/dist/runtime/index.js +7 -2
- package/dist/viewer/assets/index-COUW2y60.js +158 -0
- package/dist/viewer/assets/index-CiqSYqfx.css +2 -0
- package/dist/viewer/index.html +2 -2
- package/dist/viewer-lib/index.js +83 -5
- package/dist/viewer-lib/styles.css +9 -0
- package/dist/viewer-lib/types/src/shared/types.d.ts +2 -0
- package/dist/viewer-lib/types/viewer/src/lib/source.d.ts +2 -0
- package/package.json +1 -1
- package/dist/viewer/assets/index-BL2Cxj98.css +0 -2
- package/dist/viewer/assets/index-D6sHcSw6.js +0 -158
package/dist/runtime/index.js
CHANGED
|
@@ -859,6 +859,11 @@ function boot() {
|
|
|
859
859
|
if (booted) return;
|
|
860
860
|
booted = true;
|
|
861
861
|
applyTheme(theme);
|
|
862
|
+
if (embedded) {
|
|
863
|
+
const style = document.createElement("style");
|
|
864
|
+
style.textContent = ":where(html, body) { overscroll-behavior: none; }";
|
|
865
|
+
document.head.prepend(style);
|
|
866
|
+
}
|
|
862
867
|
let inspector = null;
|
|
863
868
|
window.addEventListener("message", (event) => {
|
|
864
869
|
const data = event.data;
|
|
@@ -938,8 +943,8 @@ function boot() {
|
|
|
938
943
|
};
|
|
939
944
|
const whenBodyReady = () => {
|
|
940
945
|
if (embedded) watchSize();
|
|
941
|
-
const
|
|
942
|
-
void fonts.then(() => requestAnimationFrame(() => requestAnimationFrame(ready)));
|
|
946
|
+
const loaded2 = document.readyState === "complete" ? Promise.resolve() : new Promise((resolve) => window.addEventListener("load", () => resolve(), { once: true }));
|
|
947
|
+
void loaded2.then(() => document.fonts?.ready).then(() => requestAnimationFrame(() => requestAnimationFrame(ready)));
|
|
943
948
|
};
|
|
944
949
|
if (document.body) whenBodyReady();
|
|
945
950
|
else document.addEventListener("DOMContentLoaded", whenBodyReady, { once: true });
|