@syntrologie/runtime-sdk 2.8.0-canary.179 → 2.8.0-canary.180
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/components/SyntroBottomSheet.d.ts +9 -0
- package/dist/index.js +34 -4
- package/dist/index.js.map +2 -2
- package/dist/smart-canvas.esm.js +4 -4
- package/dist/smart-canvas.esm.js.map +2 -2
- package/dist/smart-canvas.js +35 -5
- package/dist/smart-canvas.js.map +2 -2
- package/dist/smart-canvas.min.js +4 -4
- package/dist/smart-canvas.min.js.map +2 -2
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -107,6 +107,9 @@ export declare class SyntroBottomSheet extends LitElement {
|
|
|
107
107
|
isDragging: {
|
|
108
108
|
attribute: boolean;
|
|
109
109
|
};
|
|
110
|
+
_visible: {
|
|
111
|
+
attribute: boolean;
|
|
112
|
+
};
|
|
110
113
|
};
|
|
111
114
|
isOpen: boolean;
|
|
112
115
|
tiles: TileConfig[];
|
|
@@ -121,6 +124,9 @@ export declare class SyntroBottomSheet extends LitElement {
|
|
|
121
124
|
* during an in-progress drag. Reset to 0 on release. */
|
|
122
125
|
dragOffsetVh: number;
|
|
123
126
|
isDragging: boolean;
|
|
127
|
+
/** Keeps the DOM alive during exit transition. Set true on open,
|
|
128
|
+
* set false after exit animation completes or times out. */
|
|
129
|
+
_visible: boolean;
|
|
124
130
|
private _activePointerId;
|
|
125
131
|
private _dragStartY;
|
|
126
132
|
private _dragStartSnap;
|
|
@@ -137,6 +143,7 @@ export declare class SyntroBottomSheet extends LitElement {
|
|
|
137
143
|
/** Saved body overflow value before we apply scroll lock. */
|
|
138
144
|
private _savedBodyOverflow;
|
|
139
145
|
private _entryRafId;
|
|
146
|
+
private _exitTimer;
|
|
140
147
|
private _onDocumentMousedown;
|
|
141
148
|
private _onScrimClick;
|
|
142
149
|
createRenderRoot(): this;
|
|
@@ -162,6 +169,8 @@ export declare class SyntroBottomSheet extends LitElement {
|
|
|
162
169
|
private _lockBodyScroll;
|
|
163
170
|
private _unlockBodyScroll;
|
|
164
171
|
private _scheduleEntryTransition;
|
|
172
|
+
private _scheduleExitTransition;
|
|
173
|
+
private _cancelExitTransition;
|
|
165
174
|
/** Convert a vertical pointer delta (px, downward = positive) to a vh
|
|
166
175
|
* offset. Used during drag and for velocity calculations. */
|
|
167
176
|
private _pxToVh;
|
package/dist/index.js
CHANGED
|
@@ -7682,6 +7682,9 @@ var SyntroBottomSheet = class extends LitElement6 {
|
|
|
7682
7682
|
* during an in-progress drag. Reset to 0 on release. */
|
|
7683
7683
|
__publicField(this, "dragOffsetVh", 0);
|
|
7684
7684
|
__publicField(this, "isDragging", false);
|
|
7685
|
+
/** Keeps the DOM alive during exit transition. Set true on open,
|
|
7686
|
+
* set false after exit animation completes or times out. */
|
|
7687
|
+
__publicField(this, "_visible", false);
|
|
7685
7688
|
// --- Drag tracking (non-reactive) ---
|
|
7686
7689
|
__publicField(this, "_activePointerId", null);
|
|
7687
7690
|
__publicField(this, "_dragStartY", 0);
|
|
@@ -7699,6 +7702,7 @@ var SyntroBottomSheet = class extends LitElement6 {
|
|
|
7699
7702
|
/** Saved body overflow value before we apply scroll lock. */
|
|
7700
7703
|
__publicField(this, "_savedBodyOverflow", null);
|
|
7701
7704
|
__publicField(this, "_entryRafId", 0);
|
|
7705
|
+
__publicField(this, "_exitTimer", null);
|
|
7702
7706
|
// --- Outside-click-to-close (matches SyntroDrawer pattern) ---
|
|
7703
7707
|
__publicField(this, "_onDocumentMousedown", (e) => {
|
|
7704
7708
|
if (!this.isOpen) return;
|
|
@@ -7792,6 +7796,10 @@ var SyntroBottomSheet = class extends LitElement6 {
|
|
|
7792
7796
|
super.disconnectedCallback();
|
|
7793
7797
|
document.removeEventListener("mousedown", this._onDocumentMousedown);
|
|
7794
7798
|
cancelAnimationFrame(this._entryRafId);
|
|
7799
|
+
if (this._exitTimer !== null) {
|
|
7800
|
+
clearTimeout(this._exitTimer);
|
|
7801
|
+
this._exitTimer = null;
|
|
7802
|
+
}
|
|
7795
7803
|
this._unlockBodyScroll();
|
|
7796
7804
|
}
|
|
7797
7805
|
updated(changed) {
|
|
@@ -7799,10 +7807,13 @@ var SyntroBottomSheet = class extends LitElement6 {
|
|
|
7799
7807
|
this._scrollEl = (_a3 = this.querySelector('[data-syntro-bottom-sheet="scroll-area"]')) != null ? _a3 : null;
|
|
7800
7808
|
if (changed.has("isOpen")) {
|
|
7801
7809
|
if (this.isOpen) {
|
|
7810
|
+
this._cancelExitTransition();
|
|
7811
|
+
this._visible = true;
|
|
7802
7812
|
this.snap = "mid";
|
|
7803
7813
|
this._lockBodyScroll();
|
|
7804
7814
|
this._scheduleEntryTransition();
|
|
7805
|
-
} else {
|
|
7815
|
+
} else if (this._visible) {
|
|
7816
|
+
this._scheduleExitTransition();
|
|
7806
7817
|
this._unlockBodyScroll();
|
|
7807
7818
|
}
|
|
7808
7819
|
this.dragOffsetVh = 0;
|
|
@@ -7840,6 +7851,24 @@ var SyntroBottomSheet = class extends LitElement6 {
|
|
|
7840
7851
|
});
|
|
7841
7852
|
});
|
|
7842
7853
|
}
|
|
7854
|
+
_scheduleExitTransition() {
|
|
7855
|
+
const container = this.querySelector('[data-syntro-bottom-sheet="container"]');
|
|
7856
|
+
if (!container) {
|
|
7857
|
+
this._visible = false;
|
|
7858
|
+
return;
|
|
7859
|
+
}
|
|
7860
|
+
container.style.transform = "translateY(100svh)";
|
|
7861
|
+
this._exitTimer = setTimeout(() => {
|
|
7862
|
+
this._exitTimer = null;
|
|
7863
|
+
this._visible = false;
|
|
7864
|
+
}, 350);
|
|
7865
|
+
}
|
|
7866
|
+
_cancelExitTransition() {
|
|
7867
|
+
if (this._exitTimer !== null) {
|
|
7868
|
+
clearTimeout(this._exitTimer);
|
|
7869
|
+
this._exitTimer = null;
|
|
7870
|
+
}
|
|
7871
|
+
}
|
|
7843
7872
|
// ── Snap math ────────────────────────────────────────────────────────────
|
|
7844
7873
|
/** Convert a vertical pointer delta (px, downward = positive) to a vh
|
|
7845
7874
|
* offset. Used during drag and for velocity calculations. */
|
|
@@ -7988,7 +8017,7 @@ var SyntroBottomSheet = class extends LitElement6 {
|
|
|
7988
8017
|
}
|
|
7989
8018
|
// ── Render ───────────────────────────────────────────────────────────────
|
|
7990
8019
|
render() {
|
|
7991
|
-
if (!this.
|
|
8020
|
+
if (!this._visible) return nothing5;
|
|
7992
8021
|
const dur = this._duration;
|
|
7993
8022
|
const ease = this._easing;
|
|
7994
8023
|
const topEdgeVh = this._topEdgeVh;
|
|
@@ -8131,7 +8160,8 @@ __publicField(SyntroBottomSheet, "properties", {
|
|
|
8131
8160
|
// reactive without that quirk.
|
|
8132
8161
|
snap: { attribute: false },
|
|
8133
8162
|
dragOffsetVh: { attribute: false },
|
|
8134
|
-
isDragging: { attribute: false }
|
|
8163
|
+
isDragging: { attribute: false },
|
|
8164
|
+
_visible: { attribute: false }
|
|
8135
8165
|
});
|
|
8136
8166
|
customElements.define("syntro-bottom-sheet", SyntroBottomSheet);
|
|
8137
8167
|
|
|
@@ -9547,7 +9577,7 @@ function error(prefix, message, data) {
|
|
|
9547
9577
|
}
|
|
9548
9578
|
|
|
9549
9579
|
// src/version.ts
|
|
9550
|
-
var SDK_VERSION = "2.8.0-canary.
|
|
9580
|
+
var SDK_VERSION = "2.8.0-canary.180";
|
|
9551
9581
|
|
|
9552
9582
|
// src/types.ts
|
|
9553
9583
|
var SDK_SCHEMA_VERSION = "2.0";
|