@tsparticles/interaction-external-pause 3.9.1 → 4.0.0-alpha.1

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/0.min.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 0.min.js.LICENSE.txt */
2
+ (this.webpackChunk_tsparticles_interaction_external_pause=this.webpackChunk_tsparticles_interaction_external_pause||[]).push([[0],[(e,t,a)=>{a.d(t,{Pauser:()=>n});var s=a(303);class n extends s.ExternalInteractorBase{constructor(e){super(e),this.handleClickMode=e=>{if("pause"!==e)return;const t=this.container;t.animationStatus?t.pause():t.play()}}clear(){}init(){}interact(){}isEnabled(){return!0}reset(){}}}]]);
@@ -0,0 +1 @@
1
+ /*! tsParticles Pause External Interaction v4.0.0-alpha.1 by Matteo Bruni */
package/browser/index.js CHANGED
@@ -1,7 +1,9 @@
1
- import { Pauser } from "./Pauser.js";
2
- export async function loadExternalPauseInteraction(engine, refresh = true) {
3
- engine.checkVersion("3.9.1");
4
- await engine.addInteractor("externalPause", container => {
5
- return Promise.resolve(new Pauser(container));
6
- }, refresh);
1
+ export function loadExternalPauseInteraction(engine) {
2
+ engine.checkVersion("4.0.0-alpha.1");
3
+ engine.register(e => {
4
+ e.addInteractor("externalPause", async (container) => {
5
+ const { Pauser } = await import("./Pauser.js");
6
+ return new Pauser(container);
7
+ });
8
+ });
7
9
  }
package/cjs/Pauser.js CHANGED
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Pauser = void 0;
4
- const engine_1 = require("@tsparticles/engine");
1
+ import { ExternalInteractorBase } from "@tsparticles/engine";
5
2
  const pauseMode = "pause";
6
- class Pauser extends engine_1.ExternalInteractorBase {
3
+ export class Pauser extends ExternalInteractorBase {
7
4
  constructor(container) {
8
5
  super(container);
9
6
  this.handleClickMode = (mode) => {
@@ -31,4 +28,3 @@ class Pauser extends engine_1.ExternalInteractorBase {
31
28
  reset() {
32
29
  }
33
30
  }
34
- exports.Pauser = Pauser;
package/cjs/index.js CHANGED
@@ -1,10 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.loadExternalPauseInteraction = loadExternalPauseInteraction;
4
- const Pauser_js_1 = require("./Pauser.js");
5
- async function loadExternalPauseInteraction(engine, refresh = true) {
6
- engine.checkVersion("3.9.1");
7
- await engine.addInteractor("externalPause", container => {
8
- return Promise.resolve(new Pauser_js_1.Pauser(container));
9
- }, refresh);
1
+ export function loadExternalPauseInteraction(engine) {
2
+ engine.checkVersion("4.0.0-alpha.1");
3
+ engine.register(e => {
4
+ e.addInteractor("externalPause", async (container) => {
5
+ const { Pauser } = await import("./Pauser.js");
6
+ return new Pauser(container);
7
+ });
8
+ });
10
9
  }
@@ -0,0 +1,30 @@
1
+ /*!
2
+ * Author : Matteo Bruni
3
+ * MIT license: https://opensource.org/licenses/MIT
4
+ * Demo / Generator : https://particles.js.org/
5
+ * GitHub : https://www.github.com/matteobruni/tsparticles
6
+ * How to use? : Check the GitHub README
7
+ * v4.0.0-alpha.1
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_interaction_external_pause"] = this["webpackChunk_tsparticles_interaction_external_pause"] || []).push([["dist_browser_Pauser_js"],{
19
+
20
+ /***/ "./dist/browser/Pauser.js"
21
+ /*!********************************!*\
22
+ !*** ./dist/browser/Pauser.js ***!
23
+ \********************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Pauser: () => (/* binding */ Pauser)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst pauseMode = \"pause\";\nclass Pauser extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = mode => {\n if (mode !== pauseMode) {\n return;\n }\n const container = this.container;\n if (container.animationStatus) {\n container.pause();\n } else {\n container.play();\n }\n };\n }\n clear() {}\n init() {}\n interact() {}\n isEnabled() {\n return true;\n }\n reset() {}\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-pause/./dist/browser/Pauser.js?\n}");
27
+
28
+ /***/ }
29
+
30
+ }]);
package/esm/index.js CHANGED
@@ -1,7 +1,9 @@
1
- import { Pauser } from "./Pauser.js";
2
- export async function loadExternalPauseInteraction(engine, refresh = true) {
3
- engine.checkVersion("3.9.1");
4
- await engine.addInteractor("externalPause", container => {
5
- return Promise.resolve(new Pauser(container));
6
- }, refresh);
1
+ export function loadExternalPauseInteraction(engine) {
2
+ engine.checkVersion("4.0.0-alpha.1");
3
+ engine.register(e => {
4
+ e.addInteractor("externalPause", async (container) => {
5
+ const { Pauser } = await import("./Pauser.js");
6
+ return new Pauser(container);
7
+ });
8
+ });
7
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/interaction-external-pause",
3
- "version": "3.9.1",
3
+ "version": "4.0.0-alpha.1",
4
4
  "description": "tsParticles pause external interaction",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -87,9 +87,10 @@
87
87
  "./package.json": "./package.json"
88
88
  },
89
89
  "dependencies": {
90
- "@tsparticles/engine": "3.9.1"
90
+ "@tsparticles/engine": "4.0.0-alpha.1"
91
91
  },
92
92
  "publishConfig": {
93
93
  "access": "public"
94
- }
94
+ },
95
+ "type": "module"
95
96
  }