foss-design 0.8.0 → 0.8.1
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 +4 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3819,8 +3819,8 @@ async function openFrame(page, url, options = {}) {
|
|
|
3819
3819
|
});
|
|
3820
3820
|
let ready = false;
|
|
3821
3821
|
let reloads = 0;
|
|
3822
|
-
const onNavigate = (
|
|
3823
|
-
|
|
3822
|
+
const onNavigate = () => {
|
|
3823
|
+
reloads++;
|
|
3824
3824
|
};
|
|
3825
3825
|
for (let attempt = 0; attempt < 2; attempt++) {
|
|
3826
3826
|
errors = [];
|
|
@@ -3830,7 +3830,7 @@ async function openFrame(page, url, options = {}) {
|
|
|
3830
3830
|
outdated = () => resolve("outdated");
|
|
3831
3831
|
});
|
|
3832
3832
|
await page.goto(url, { waitUntil: "load", timeout: options.timeoutMs ?? 3e4 });
|
|
3833
|
-
page.on("
|
|
3833
|
+
page.on("load", onNavigate);
|
|
3834
3834
|
if (!ready) {
|
|
3835
3835
|
const signal = page.waitForFunction(() => window.__DESIGN_READY__ === true, null, {
|
|
3836
3836
|
timeout: options.timeoutMs ?? 2e4
|
|
@@ -3840,7 +3840,7 @@ async function openFrame(page, url, options = {}) {
|
|
|
3840
3840
|
ready = await Promise.race([signal, turnedAway]).catch(() => null) === "ready";
|
|
3841
3841
|
}
|
|
3842
3842
|
if (ready || options.waitForReady === false) await page.waitForTimeout(options.settleMs ?? 700);
|
|
3843
|
-
page.off("
|
|
3843
|
+
page.off("load", onNavigate);
|
|
3844
3844
|
if (!reloads && !errors.some((error) => OUTDATED_DEP.test(error))) break;
|
|
3845
3845
|
}
|
|
3846
3846
|
if (reloads) errors.push(`the page reloaded itself ${reloads === 1 ? "once" : `${reloads} times`} while it loaded`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foss-design",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Design canvases and design systems for coding agents: live, animated, clickable screens on an infinite canvas, served locally from a .design folder.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|