@syntrologie/runtime-sdk 2.8.0-canary.175 → 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;
@@ -7914,10 +7934,15 @@ var SyntroBottomSheet = class extends LitElement6 {
7914
7934
  }
7915
7935
  if (!this._gestureCommitted) {
7916
7936
  if (Math.abs(dyPx) < 6) return;
7937
+ if (this.snap !== "full") {
7938
+ this._activePointerId = null;
7939
+ this._samples = [];
7940
+ return;
7941
+ }
7917
7942
  const draggingDown = dyPx > 0;
7918
7943
  const contentScrollTop = (_b = (_a3 = this._scrollEl) == null ? void 0 : _a3.scrollTop) != null ? _b : 0;
7919
7944
  const contentAtTop = contentScrollTop <= 0;
7920
- const shouldTakeOver = draggingDown ? contentAtTop : this.snap !== "full" && contentAtTop;
7945
+ const shouldTakeOver = draggingDown && contentAtTop;
7921
7946
  if (!shouldTakeOver) {
7922
7947
  this._activePointerId = null;
7923
7948
  this._samples = [];
@@ -8018,11 +8043,13 @@ var SyntroBottomSheet = class extends LitElement6 {
8018
8043
  borderRadius: "3px",
8019
8044
  background: "rgba(255, 255, 255, 0.4)"
8020
8045
  };
8046
+ const snapVh = this.snapPoints[this.snap];
8021
8047
  const scrollAreaStyles = {
8022
8048
  flex: "1 1 auto",
8023
8049
  overflowY: "auto",
8024
8050
  padding: "0 1rem 1rem",
8025
- touchAction: "pan-y"
8051
+ touchAction: "pan-y",
8052
+ maxHeight: `calc(${snapVh}dvh - 56px)`
8026
8053
  };
8027
8054
  return html6`
8028
8055
  <div data-syntro-bottom-sheet="root" style=${styleMap6(rootStyles)}>
@@ -9288,6 +9315,7 @@ var SyntroCanvasOverlay = class extends LitElement7 {
9288
9315
  .themeConfig=${this.themeConfig}
9289
9316
  .launcherIcon=${(_e2 = (_d = (_c = this.themeConfig) == null ? void 0 : _c.launcher) == null ? void 0 : _d.icon) != null ? _e2 : null}
9290
9317
  ?launcherAnimate=${this.launcherAnimate && !this.isOpen}
9318
+ .hasActiveTiles=${this.tiles.length > 0}
9291
9319
  @launcher-toggle=${this._onLauncherToggle}
9292
9320
  ></syntro-launcher>
9293
9321
  </div>
@@ -9503,7 +9531,7 @@ function error(prefix, message, data) {
9503
9531
  }
9504
9532
 
9505
9533
  // src/version.ts
9506
- var SDK_VERSION = "2.8.0-canary.175";
9534
+ var SDK_VERSION = "2.8.0-canary.177";
9507
9535
 
9508
9536
  // src/types.ts
9509
9537
  var SDK_SCHEMA_VERSION = "2.0";
@@ -10095,7 +10123,7 @@ var SmartCanvasElementLit = class extends LitElement9 {
10095
10123
  }
10096
10124
  // ---------- Render -------------------------------------------------------
10097
10125
  render() {
10098
- var _a3, _b, _c, _d;
10126
+ var _a3, _b, _c, _d, _e2, _f, _g;
10099
10127
  const hasContent = this._tiles.length > 0 && !this._error;
10100
10128
  const showSurface = this._isLoading || hasContent;
10101
10129
  if (this._displayMode === "inline") {
@@ -10109,7 +10137,8 @@ var SmartCanvasElementLit = class extends LitElement9 {
10109
10137
  ></syntro-inline-shell>
10110
10138
  `;
10111
10139
  }
10112
- if (!showSurface) return nothing8;
10140
+ const configHasTiles = ((_d = (_c = (_b = __privateGet(this, _rawConfig)) == null ? void 0 : _b.tiles) == null ? void 0 : _c.length) != null ? _d : 0) > 0;
10141
+ if (!showSurface && !configHasTiles) return nothing8;
10113
10142
  return html9`
10114
10143
  <syntro-canvas-overlay
10115
10144
  .isOpen=${this._isOpen}
@@ -10118,10 +10147,10 @@ var SmartCanvasElementLit = class extends LitElement9 {
10118
10147
  .error=${this._error}
10119
10148
  .canvasTitle=${this._canvasTitle}
10120
10149
  .displayMode=${this._displayMode}
10121
- .runtimeRef=${(_b = this.runtime) != null ? _b : null}
10122
- .telemetry=${(_c = this.telemetry) != null ? _c : null}
10150
+ .runtimeRef=${(_e2 = this.runtime) != null ? _e2 : null}
10151
+ .telemetry=${(_f = this.telemetry) != null ? _f : null}
10123
10152
  .themeConfig=${__privateGet(this, _themeCtrl).config}
10124
- ?launcherAnimate=${!!((_d = this._launcher) == null ? void 0 : _d.animate)}
10153
+ ?launcherAnimate=${!!((_g = this._launcher) == null ? void 0 : _g.animate)}
10125
10154
  @canvas-toggle=${__privateGet(this, _onCanvasToggle)}
10126
10155
  ></syntro-canvas-overlay>
10127
10156
  `;
@@ -10742,6 +10771,7 @@ var SyntroLauncher = class extends LitElement11 {
10742
10771
  __publicField(this, "colorPrimary", TOKEN_PURPLE_42);
10743
10772
  __publicField(this, "colorPrimaryHover", TOKEN_PURPLE_5);
10744
10773
  __publicField(this, "launcherConfig", {});
10774
+ __publicField(this, "hasActiveTiles", true);
10745
10775
  // --- Private reactive state ---
10746
10776
  __publicField(this, "_launcherPos", null);
10747
10777
  __publicField(this, "_hovered", false);
@@ -10904,7 +10934,8 @@ var SyntroLauncher = class extends LitElement11 {
10904
10934
  border: "none",
10905
10935
  backgroundColor: "var(--sc-launcher-background)",
10906
10936
  cursor: ((_a3 = this._drag) == null ? void 0 : _a3.dragged) ? "grabbing" : "pointer",
10907
- touchAction: "none"
10937
+ touchAction: "none",
10938
+ opacity: !this.hasActiveTiles && !this.isOpen ? "0.3" : void 0
10908
10939
  };
10909
10940
  const animateClass = this.launcherAnimate && !this.isOpen ? "syntro-launcher-animate" : "";
10910
10941
  const showBadge = !this.isOpen && this.notificationCount > 0;