@michaelyagi/shoji 0.1.0-beta.7 → 0.1.0-beta.9
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/core/shoji-core.js +0 -21
- package/dist/core/shoji-core.js.map +1 -1
- package/dist/core/shoji-core.min.js +1 -1
- package/dist/core/shoji-core.min.js.map +1 -1
- package/dist/esm/core/Gallery.d.ts +0 -8
- package/dist/esm/core/index.js +0 -21
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/shoji.js +1 -22
- package/dist/shoji.js.map +1 -1
- package/dist/shoji.min.js +1 -1
- package/dist/shoji.min.js.map +1 -1
- package/package.json +1 -1
package/dist/core/shoji-core.js
CHANGED
|
@@ -1902,19 +1902,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
1902
1902
|
__publicField(this, "captureGestureStartState", () => {
|
|
1903
1903
|
this.controlsHiddenAtGestureStart = this.autoHidden;
|
|
1904
1904
|
});
|
|
1905
|
-
/**
|
|
1906
|
-
* A real mobile bug (DESIGN.md §2.6a): after scrolling far enough to
|
|
1907
|
-
* collapse a mobile browser's own URL bar, `window.innerHeight` grows
|
|
1908
|
-
* but `.shoji-outer`'s painted size didn't follow, off-centering the
|
|
1909
|
-
* photo. `visualViewport.height` reflects the true visible area;
|
|
1910
|
-
* `window`'s `resize` is the fallback where it's unsupported.
|
|
1911
|
-
*/
|
|
1912
|
-
__publicField(this, "syncViewportHeight", () => {
|
|
1913
|
-
var _a;
|
|
1914
|
-
if (!this.dom) return;
|
|
1915
|
-
const height = ((_a = window.visualViewport) == null ? void 0 : _a.height) ?? window.innerHeight;
|
|
1916
|
-
this.dom.outer.style.height = `${height}px`;
|
|
1917
|
-
});
|
|
1918
1905
|
__publicField(this, "onKeydown", (event) => {
|
|
1919
1906
|
if (document.activeElement instanceof HTMLVideoElement && event.key !== "Escape") return;
|
|
1920
1907
|
this.onActivity();
|
|
@@ -2952,10 +2939,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
2952
2939
|
naturalSize && !((_a = this.itemList[index]) == null ? void 0 : _a.video) ? this.resolveOpenPlaceholderSrc(this.itemList[index], origin) : void 0
|
|
2953
2940
|
);
|
|
2954
2941
|
this.dom.outer.classList.add("shoji-open");
|
|
2955
|
-
this.syncViewportHeight();
|
|
2956
|
-
if (window.visualViewport)
|
|
2957
|
-
window.visualViewport.addEventListener("resize", this.syncViewportHeight);
|
|
2958
|
-
else window.addEventListener("resize", this.syncViewportHeight);
|
|
2959
2942
|
document.addEventListener("keydown", this.onKeydown);
|
|
2960
2943
|
this.focusTrap.activate(this.dom.dialog);
|
|
2961
2944
|
this.scheduleAutoHide();
|
|
@@ -3180,12 +3163,8 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3180
3163
|
this.opened = false;
|
|
3181
3164
|
unlockBodyScroll();
|
|
3182
3165
|
document.removeEventListener("keydown", this.onKeydown);
|
|
3183
|
-
if (window.visualViewport)
|
|
3184
|
-
window.visualViewport.removeEventListener("resize", this.syncViewportHeight);
|
|
3185
|
-
else window.removeEventListener("resize", this.syncViewportHeight);
|
|
3186
3166
|
this.focusTrap.deactivate();
|
|
3187
3167
|
(_a = this.dom) == null ? void 0 : _a.outer.classList.remove("shoji-open");
|
|
3188
|
-
if (this.dom) this.dom.outer.style.height = "";
|
|
3189
3168
|
if (this.dom) this.dom.backdrop.style.opacity = "";
|
|
3190
3169
|
if (this.autoHideTimer !== null) {
|
|
3191
3170
|
clearTimeout(this.autoHideTimer);
|