@mochabug/adapt-web 1.0.0-rc55 → 1.0.0-rc57
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/esm/index.js +22 -3
- package/dist/umd/adapt-web.js +16 -2
- package/dist/umd/adapt-web.min.js +7 -6
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -427,6 +427,7 @@ const DEFAULT_STYLES = `
|
|
|
427
427
|
.mb-adapt__frame--has-toolbar .mb-adapt__iframe {
|
|
428
428
|
flex: 1;
|
|
429
429
|
height: auto;
|
|
430
|
+
width: auto;
|
|
430
431
|
margin: 8px;
|
|
431
432
|
}
|
|
432
433
|
|
|
@@ -1368,12 +1369,12 @@ export class AdaptWebClient {
|
|
|
1368
1369
|
else {
|
|
1369
1370
|
this.updateSideBySideVisibility();
|
|
1370
1371
|
}
|
|
1372
|
+
// Fire synthetic STATUS_RUNNING immediately — subscribe() blocks on the
|
|
1373
|
+
// SSE stream for-await loop and won't resolve while the session is active
|
|
1374
|
+
handlers.onSession?.({ status: "STATUS_RUNNING" });
|
|
1371
1375
|
// Now reconnect the stream — if it fails, reset everything and fall through
|
|
1372
1376
|
try {
|
|
1373
1377
|
await this.client.subscribe(state.token, handlers);
|
|
1374
|
-
// Fire synthetic STATUS_RUNNING so consumers don't need to distinguish
|
|
1375
|
-
// hydration from a fresh start
|
|
1376
|
-
handlers.onSession?.({ status: "STATUS_RUNNING" });
|
|
1377
1378
|
}
|
|
1378
1379
|
catch {
|
|
1379
1380
|
this.clearState();
|
|
@@ -1628,6 +1629,17 @@ export class AdaptWebClient {
|
|
|
1628
1629
|
this.currentFork = null;
|
|
1629
1630
|
this.activateNextFork();
|
|
1630
1631
|
}
|
|
1632
|
+
else if (this.forkDisplay.mode === "side-by-side") {
|
|
1633
|
+
// Current fork is active — re-expand if user had previously minimized
|
|
1634
|
+
if (this.isResponsiveMode() && this.responsiveShowMain) {
|
|
1635
|
+
this.responsiveShowMain = false;
|
|
1636
|
+
this.updateSideBySideVisibility();
|
|
1637
|
+
}
|
|
1638
|
+
else if (this.splitPercentage >= 100) {
|
|
1639
|
+
this.splitPercentage = this.forkDisplay.split ?? 50;
|
|
1640
|
+
this.updateSideBySideVisibility();
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1631
1643
|
}
|
|
1632
1644
|
activateNextFork() {
|
|
1633
1645
|
if (this.forkQueue.length === 0)
|
|
@@ -1645,6 +1657,13 @@ export class AdaptWebClient {
|
|
|
1645
1657
|
this.updateDialogVisibility();
|
|
1646
1658
|
}
|
|
1647
1659
|
else {
|
|
1660
|
+
// Ensure fork panel is expanded when activating a new fork
|
|
1661
|
+
if (this.isResponsiveMode()) {
|
|
1662
|
+
this.responsiveShowMain = false;
|
|
1663
|
+
}
|
|
1664
|
+
else if (this.splitPercentage >= 100) {
|
|
1665
|
+
this.splitPercentage = this.forkDisplay.split ?? 50;
|
|
1666
|
+
}
|
|
1648
1667
|
this.updateSideBySideVisibility();
|
|
1649
1668
|
}
|
|
1650
1669
|
this.saveState();
|
package/dist/umd/adapt-web.js
CHANGED
|
@@ -7547,7 +7547,7 @@ var MbAdapt = (() => {
|
|
|
7547
7547
|
// src/index.ts
|
|
7548
7548
|
if (typeof window !== "undefined" && true && !window.CAP_CUSTOM_WASM_URL) {
|
|
7549
7549
|
window.CAP_CUSTOM_WASM_URL = new URL(
|
|
7550
|
-
"https://cdn.mochabug.com/adapt/web/1.0.0-
|
|
7550
|
+
"https://cdn.mochabug.com/adapt/web/1.0.0-rc57/cap_wasm.js",
|
|
7551
7551
|
window.location.href
|
|
7552
7552
|
).href;
|
|
7553
7553
|
}
|
|
@@ -7949,6 +7949,7 @@ var MbAdapt = (() => {
|
|
|
7949
7949
|
.mb-adapt__frame--has-toolbar .mb-adapt__iframe {
|
|
7950
7950
|
flex: 1;
|
|
7951
7951
|
height: auto;
|
|
7952
|
+
width: auto;
|
|
7952
7953
|
margin: 8px;
|
|
7953
7954
|
}
|
|
7954
7955
|
|
|
@@ -8738,9 +8739,9 @@ cap-widget::part(attribution) {
|
|
|
8738
8739
|
} else {
|
|
8739
8740
|
this.updateSideBySideVisibility();
|
|
8740
8741
|
}
|
|
8742
|
+
handlers.onSession?.({ status: "STATUS_RUNNING" });
|
|
8741
8743
|
try {
|
|
8742
8744
|
await this.client.subscribe(state.token, handlers);
|
|
8743
|
-
handlers.onSession?.({ status: "STATUS_RUNNING" });
|
|
8744
8745
|
} catch {
|
|
8745
8746
|
this.clearState();
|
|
8746
8747
|
this.sessionToken = null;
|
|
@@ -8957,6 +8958,14 @@ cap-widget::part(attribution) {
|
|
|
8957
8958
|
if (!this.currentFork || this.currentFork.completed) {
|
|
8958
8959
|
this.currentFork = null;
|
|
8959
8960
|
this.activateNextFork();
|
|
8961
|
+
} else if (this.forkDisplay.mode === "side-by-side") {
|
|
8962
|
+
if (this.isResponsiveMode() && this.responsiveShowMain) {
|
|
8963
|
+
this.responsiveShowMain = false;
|
|
8964
|
+
this.updateSideBySideVisibility();
|
|
8965
|
+
} else if (this.splitPercentage >= 100) {
|
|
8966
|
+
this.splitPercentage = this.forkDisplay.split ?? 50;
|
|
8967
|
+
this.updateSideBySideVisibility();
|
|
8968
|
+
}
|
|
8960
8969
|
}
|
|
8961
8970
|
}
|
|
8962
8971
|
activateNextFork() {
|
|
@@ -8970,6 +8979,11 @@ cap-widget::part(attribution) {
|
|
|
8970
8979
|
if (this.forkDisplay.mode === "dialog") {
|
|
8971
8980
|
this.updateDialogVisibility();
|
|
8972
8981
|
} else {
|
|
8982
|
+
if (this.isResponsiveMode()) {
|
|
8983
|
+
this.responsiveShowMain = false;
|
|
8984
|
+
} else if (this.splitPercentage >= 100) {
|
|
8985
|
+
this.splitPercentage = this.forkDisplay.split ?? 50;
|
|
8986
|
+
}
|
|
8973
8987
|
this.updateSideBySideVisibility();
|
|
8974
8988
|
}
|
|
8975
8989
|
this.saveState();
|