@shower/core 3.5.1 → 3.5.2
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/index.js +9 -7
- package/lib/modules/install.js +0 -5
- package/lib/modules/location.js +4 -1
- package/lib/shower.js +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Core for Shower HTML presentation engine
|
|
3
|
-
* @shower/core v3.5.
|
|
3
|
+
* @shower/core v3.5.2, https://github.com/shower/shower/tree/main/packages/core
|
|
4
4
|
* @copyright 2010–2026 Vadim Makeev, https://pepelsbey.dev
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -350,7 +350,10 @@
|
|
|
350
350
|
applyURLSlide();
|
|
351
351
|
};
|
|
352
352
|
|
|
353
|
-
|
|
353
|
+
// slide before mode, so full mode finds it instead of defaulting to first
|
|
354
|
+
applyURLSlide();
|
|
355
|
+
applyURLMode();
|
|
356
|
+
|
|
354
357
|
window.addEventListener('popstate', applyURL);
|
|
355
358
|
|
|
356
359
|
shower.addEventListener('start', () => {
|
|
@@ -661,11 +664,6 @@
|
|
|
661
664
|
view(shower);
|
|
662
665
|
touch(shower);
|
|
663
666
|
mouse(shower);
|
|
664
|
-
|
|
665
|
-
// maintains invariant: active slide always exists in `full` mode
|
|
666
|
-
if (shower.isFullMode && !shower.activeSlide) {
|
|
667
|
-
shower.first();
|
|
668
|
-
}
|
|
669
667
|
};
|
|
670
668
|
|
|
671
669
|
class Shower extends EventTarget {
|
|
@@ -772,6 +770,10 @@
|
|
|
772
770
|
* @emits Shower#modechange
|
|
773
771
|
*/
|
|
774
772
|
enterFullMode() {
|
|
773
|
+
if (!this.activeSlide) {
|
|
774
|
+
this.first();
|
|
775
|
+
}
|
|
776
|
+
|
|
775
777
|
this._setMode('full');
|
|
776
778
|
}
|
|
777
779
|
|
package/lib/modules/install.js
CHANGED
package/lib/modules/location.js
CHANGED
|
@@ -33,7 +33,10 @@ export default (shower) => {
|
|
|
33
33
|
applyURLSlide();
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
// slide before mode, so full mode finds it instead of defaulting to first
|
|
37
|
+
applyURLSlide();
|
|
38
|
+
applyURLMode();
|
|
39
|
+
|
|
37
40
|
window.addEventListener('popstate', applyURL);
|
|
38
41
|
|
|
39
42
|
shower.addEventListener('start', () => {
|
package/lib/shower.js
CHANGED