@mochabug/adapt-web 1.0.0-rc55 → 1.0.0-rc56

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 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
 
@@ -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();
@@ -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-rc55/cap_wasm.js",
7550
+ "https://cdn.mochabug.com/adapt/web/1.0.0-rc56/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
 
@@ -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();