@syntrologie/runtime-sdk 2.8.0-canary.176 → 2.8.0-canary.177

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.
@@ -134,6 +134,7 @@ export declare class SyntroBottomSheet extends LitElement {
134
134
  private _scrollEl;
135
135
  /** Saved body overflow value before we apply scroll lock. */
136
136
  private _savedBodyOverflow;
137
+ private _entryRafId;
137
138
  private _onDocumentMousedown;
138
139
  private _onScrimClick;
139
140
  createRenderRoot(): this;
@@ -158,6 +159,7 @@ export declare class SyntroBottomSheet extends LitElement {
158
159
  updated(changed: Map<string, unknown>): void;
159
160
  private _lockBodyScroll;
160
161
  private _unlockBodyScroll;
162
+ private _scheduleEntryTransition;
161
163
  /** Convert a vertical pointer delta (px, downward = positive) to a vh
162
164
  * offset. Used during drag and for velocity calculations. */
163
165
  private _pxToVh;
@@ -74,6 +74,7 @@ export declare class SyntroLauncher extends LitElement {
74
74
  colorPrimary: string;
75
75
  colorPrimaryHover: string;
76
76
  launcherConfig: LauncherElementConfig;
77
+ hasActiveTiles: boolean;
77
78
  _launcherPos: {
78
79
  x: number;
79
80
  y: number;
package/dist/index.js CHANGED
@@ -7698,6 +7698,7 @@ var SyntroBottomSheet = class extends LitElement6 {
7698
7698
  __publicField(this, "_scrollEl", null);
7699
7699
  /** Saved body overflow value before we apply scroll lock. */
7700
7700
  __publicField(this, "_savedBodyOverflow", null);
7701
+ __publicField(this, "_entryRafId", 0);
7701
7702
  // --- Outside-click-to-close (matches SyntroDrawer pattern) ---
7702
7703
  __publicField(this, "_onDocumentMousedown", (e) => {
7703
7704
  if (!this.isOpen) return;
@@ -7790,6 +7791,7 @@ var SyntroBottomSheet = class extends LitElement6 {
7790
7791
  disconnectedCallback() {
7791
7792
  super.disconnectedCallback();
7792
7793
  document.removeEventListener("mousedown", this._onDocumentMousedown);
7794
+ cancelAnimationFrame(this._entryRafId);
7793
7795
  this._unlockBodyScroll();
7794
7796
  }
7795
7797
  updated(changed) {
@@ -7799,6 +7801,7 @@ var SyntroBottomSheet = class extends LitElement6 {
7799
7801
  if (this.isOpen) {
7800
7802
  this.snap = "mid";
7801
7803
  this._lockBodyScroll();
7804
+ this._scheduleEntryTransition();
7802
7805
  } else {
7803
7806
  this._unlockBodyScroll();
7804
7807
  }
@@ -7821,6 +7824,22 @@ var SyntroBottomSheet = class extends LitElement6 {
7821
7824
  this._savedBodyOverflow = null;
7822
7825
  }
7823
7826
  }
7827
+ _scheduleEntryTransition() {
7828
+ if (typeof window === "undefined") return;
7829
+ cancelAnimationFrame(this._entryRafId);
7830
+ this._entryRafId = requestAnimationFrame(() => {
7831
+ const container = this.querySelector('[data-syntro-bottom-sheet="container"]');
7832
+ if (!container) return;
7833
+ const targetTransform = container.style.transform;
7834
+ const targetTransition = container.style.transition;
7835
+ container.style.transition = "none";
7836
+ container.style.transform = "translateY(100vh)";
7837
+ this._entryRafId = requestAnimationFrame(() => {
7838
+ container.style.transition = targetTransition;
7839
+ container.style.transform = targetTransform;
7840
+ });
7841
+ });
7842
+ }
7824
7843
  // ── Snap math ────────────────────────────────────────────────────────────
7825
7844
  /** Convert a vertical pointer delta (px, downward = positive) to a vh
7826
7845
  * offset. Used during drag and for velocity calculations. */
@@ -7889,6 +7908,7 @@ var SyntroBottomSheet = class extends LitElement6 {
7889
7908
  _onPointerDown(e, fromHandle) {
7890
7909
  var _a3, _b;
7891
7910
  if (this._activePointerId !== null) return;
7911
+ if (!fromHandle && this.snap !== "full") return;
7892
7912
  this._activePointerId = e.pointerId;
7893
7913
  this._dragStartY = e.clientY;
7894
7914
  this._dragStartSnap = this.snap;
@@ -8023,11 +8043,13 @@ var SyntroBottomSheet = class extends LitElement6 {
8023
8043
  borderRadius: "3px",
8024
8044
  background: "rgba(255, 255, 255, 0.4)"
8025
8045
  };
8046
+ const snapVh = this.snapPoints[this.snap];
8026
8047
  const scrollAreaStyles = {
8027
8048
  flex: "1 1 auto",
8028
8049
  overflowY: "auto",
8029
8050
  padding: "0 1rem 1rem",
8030
- touchAction: "pan-y"
8051
+ touchAction: "pan-y",
8052
+ maxHeight: `calc(${snapVh}dvh - 56px)`
8031
8053
  };
8032
8054
  return html6`
8033
8055
  <div data-syntro-bottom-sheet="root" style=${styleMap6(rootStyles)}>
@@ -9293,6 +9315,7 @@ var SyntroCanvasOverlay = class extends LitElement7 {
9293
9315
  .themeConfig=${this.themeConfig}
9294
9316
  .launcherIcon=${(_e2 = (_d = (_c = this.themeConfig) == null ? void 0 : _c.launcher) == null ? void 0 : _d.icon) != null ? _e2 : null}
9295
9317
  ?launcherAnimate=${this.launcherAnimate && !this.isOpen}
9318
+ .hasActiveTiles=${this.tiles.length > 0}
9296
9319
  @launcher-toggle=${this._onLauncherToggle}
9297
9320
  ></syntro-launcher>
9298
9321
  </div>
@@ -9508,7 +9531,7 @@ function error(prefix, message, data) {
9508
9531
  }
9509
9532
 
9510
9533
  // src/version.ts
9511
- var SDK_VERSION = "2.8.0-canary.176";
9534
+ var SDK_VERSION = "2.8.0-canary.177";
9512
9535
 
9513
9536
  // src/types.ts
9514
9537
  var SDK_SCHEMA_VERSION = "2.0";
@@ -10748,6 +10771,7 @@ var SyntroLauncher = class extends LitElement11 {
10748
10771
  __publicField(this, "colorPrimary", TOKEN_PURPLE_42);
10749
10772
  __publicField(this, "colorPrimaryHover", TOKEN_PURPLE_5);
10750
10773
  __publicField(this, "launcherConfig", {});
10774
+ __publicField(this, "hasActiveTiles", true);
10751
10775
  // --- Private reactive state ---
10752
10776
  __publicField(this, "_launcherPos", null);
10753
10777
  __publicField(this, "_hovered", false);
@@ -10910,7 +10934,8 @@ var SyntroLauncher = class extends LitElement11 {
10910
10934
  border: "none",
10911
10935
  backgroundColor: "var(--sc-launcher-background)",
10912
10936
  cursor: ((_a3 = this._drag) == null ? void 0 : _a3.dragged) ? "grabbing" : "pointer",
10913
- touchAction: "none"
10937
+ touchAction: "none",
10938
+ opacity: !this.hasActiveTiles && !this.isOpen ? "0.3" : void 0
10914
10939
  };
10915
10940
  const animateClass = this.launcherAnimate && !this.isOpen ? "syntro-launcher-animate" : "";
10916
10941
  const showBadge = !this.isOpen && this.notificationCount > 0;