@syntrologie/runtime-sdk 2.8.0-canary.170 → 2.8.0-canary.171

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.
@@ -132,6 +132,8 @@ export declare class SyntroBottomSheet extends LitElement {
132
132
  /** Cached scroll container ref so we can check ``scrollTop`` cheaply
133
133
  * during pointermove without re-querying. */
134
134
  private _scrollEl;
135
+ /** Saved body overflow value before we apply scroll lock. */
136
+ private _savedBodyOverflow;
135
137
  private _onDocumentMousedown;
136
138
  private _onScrimClick;
137
139
  createRenderRoot(): this;
@@ -150,6 +152,8 @@ export declare class SyntroBottomSheet extends LitElement {
150
152
  connectedCallback(): void;
151
153
  disconnectedCallback(): void;
152
154
  updated(changed: Map<string, unknown>): void;
155
+ private _lockBodyScroll;
156
+ private _unlockBodyScroll;
153
157
  /** Convert a vertical pointer delta (px, downward = positive) to a vh
154
158
  * offset. Used during drag and for velocity calculations. */
155
159
  private _pxToVh;
package/dist/index.js CHANGED
@@ -7696,6 +7696,8 @@ var SyntroBottomSheet = class extends LitElement6 {
7696
7696
  /** Cached scroll container ref so we can check ``scrollTop`` cheaply
7697
7697
  * during pointermove without re-querying. */
7698
7698
  __publicField(this, "_scrollEl", null);
7699
+ /** Saved body overflow value before we apply scroll lock. */
7700
+ __publicField(this, "_savedBodyOverflow", null);
7699
7701
  // --- Outside-click-to-close (matches SyntroDrawer pattern) ---
7700
7702
  __publicField(this, "_onDocumentMousedown", (e) => {
7701
7703
  if (!this.isOpen) return;
@@ -7775,6 +7777,7 @@ var SyntroBottomSheet = class extends LitElement6 {
7775
7777
  disconnectedCallback() {
7776
7778
  super.disconnectedCallback();
7777
7779
  document.removeEventListener("mousedown", this._onDocumentMousedown);
7780
+ this._unlockBodyScroll();
7778
7781
  }
7779
7782
  updated(changed) {
7780
7783
  var _a3;
@@ -7782,6 +7785,9 @@ var SyntroBottomSheet = class extends LitElement6 {
7782
7785
  if (changed.has("isOpen")) {
7783
7786
  if (this.isOpen) {
7784
7787
  this.snap = "mid";
7788
+ this._lockBodyScroll();
7789
+ } else {
7790
+ this._unlockBodyScroll();
7785
7791
  }
7786
7792
  this.dragOffsetVh = 0;
7787
7793
  this.isDragging = false;
@@ -7789,6 +7795,19 @@ var SyntroBottomSheet = class extends LitElement6 {
7789
7795
  this._samples = [];
7790
7796
  }
7791
7797
  }
7798
+ // ── Body scroll lock ─────────────────────────────────────────────────────
7799
+ _lockBodyScroll() {
7800
+ if (typeof document === "undefined") return;
7801
+ this._savedBodyOverflow = document.body.style.overflow;
7802
+ document.body.style.overflow = "hidden";
7803
+ }
7804
+ _unlockBodyScroll() {
7805
+ if (typeof document === "undefined") return;
7806
+ if (this._savedBodyOverflow !== null) {
7807
+ document.body.style.overflow = this._savedBodyOverflow;
7808
+ this._savedBodyOverflow = null;
7809
+ }
7810
+ }
7792
7811
  // ── Snap math ────────────────────────────────────────────────────────────
7793
7812
  /** Convert a vertical pointer delta (px, downward = positive) to a vh
7794
7813
  * offset. Used during drag and for velocity calculations. */
@@ -9471,7 +9490,7 @@ function error(prefix, message, data) {
9471
9490
  }
9472
9491
 
9473
9492
  // src/version.ts
9474
- var SDK_VERSION = "2.8.0-canary.170";
9493
+ var SDK_VERSION = "2.8.0-canary.171";
9475
9494
 
9476
9495
  // src/types.ts
9477
9496
  var SDK_SCHEMA_VERSION = "2.0";