Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shower/core

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shower/core - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

lib/modules/mouse.js

49

dist/shower.js
/**
* Core for Shower HTML presentation engine
* @shower/core v3.1.0, https://github.com/shower/core
* @shower/core v3.2.0, https://github.com/shower/core
* @copyright 2010–2021 Vadim Makeev, https://pepelsbey.net

@@ -39,2 +39,4 @@ * @license MIT

listModeClass: 'list',
mouseHiddenClass: 'pointless',
mouseInactivityTimeout: 5000,

@@ -600,2 +602,44 @@ slideSelector: '.slide',

var mouse = (shower) => {
const { mouseHiddenClass, mouseInactivityTimeout } = shower.options;
let hideMouseTimeoutId = null;
const cleanUp = () => {
shower.container.classList.remove(mouseHiddenClass);
clearTimeout(hideMouseTimeoutId);
hideMouseTimeoutId = null;
};
const hideMouseIfInactive = () => {
if (hideMouseTimeoutId !== null) {
cleanUp();
}
hideMouseTimeoutId = setTimeout(() => {
shower.container.classList.add(mouseHiddenClass);
}, mouseInactivityTimeout);
};
const initHideMouseIfInactiveModule = () => {
shower.container.addEventListener('mousemove', hideMouseIfInactive);
};
const destroyHideMouseIfInactiveModule = () => {
shower.container.removeEventListener('mousemove', hideMouseIfInactive);
cleanUp();
};
const handleModeChange = () => {
if (shower.isFullMode) {
initHideMouseIfInactiveModule();
} else {
destroyHideMouseIfInactiveModule();
}
};
shower.addEventListener('start', handleModeChange);
shower.addEventListener('modechange', handleModeChange);
};
var installModules = (shower) => {

@@ -611,2 +655,3 @@ a11y(shower);

touch(shower);
mouse(shower);

@@ -794,2 +839,2 @@ // maintains invariant: active slide always exists in `full` mode

}());
})();

@@ -7,2 +7,4 @@ export default {

listModeClass: 'list',
mouseHiddenClass: 'pointless',
mouseInactivityTimeout: 5000,

@@ -9,0 +11,0 @@ slideSelector: '.slide',

@@ -10,2 +10,3 @@ import a11y from './a11y';

import touch from './touch';
import mouse from './mouse';

@@ -22,2 +23,3 @@ export default (shower) => {

touch(shower);
mouse(shower);

@@ -24,0 +26,0 @@ // maintains invariant: active slide always exists in `full` mode

8

package.json
{
"name": "@shower/core",
"description": "Core for Shower HTML presentation engine",
"version": "3.2.0",
"version": "3.3.0",
"publishConfig": {

@@ -33,4 +33,4 @@ "access": "public"

"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^3.4.1",
"husky": "^4.3.8",

@@ -42,3 +42,3 @@ "lint-staged": "^10.5.4",

"puppeteer": "^3.3.0",
"rollup": "^2.52.2",
"rollup": "^2.58.0",
"sauce-connect-launcher": "^1.3.2",

@@ -45,0 +45,0 @@ "serve": "^11.3.2",

@@ -1,2 +0,2 @@

# Core of Shower [![Build Status](https://travis-ci.org/shower/core.svg?branch=master)](https://travis-ci.org/shower/core)
# Core of Shower [![Build Status](https://travis-ci.org/shower/core.svg?branch=main)](https://travis-ci.org/shower/core)

@@ -3,0 +3,0 @@ Core of the [Shower](https://github.com/shower/shower) presentation engine. Doesn’t include themes. [See it in action](https://shwr.me). Follow [@shower_me](https://twitter.com/shower_me) for support and updates, [file an issue] if you have any.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc