@tsparticles/interaction-external-push 3.9.0 → 4.0.0-alpha.0
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/611.min.js +2 -0
- package/611.min.js.LICENSE.txt +1 -0
- package/browser/Pusher.js +2 -4
- package/browser/index.js +8 -7
- package/cjs/Options/Classes/Push.js +6 -10
- package/cjs/Options/Interfaces/IPush.js +1 -2
- package/cjs/Pusher.js +7 -13
- package/cjs/Types.js +1 -2
- package/cjs/index.js +9 -25
- package/dist_browser_Pusher_js.js +30 -0
- package/esm/Pusher.js +2 -4
- package/esm/index.js +8 -7
- package/package.json +4 -3
- package/report.html +5 -4
- package/tsparticles.interaction.external.push.js +213 -34
- package/tsparticles.interaction.external.push.min.js +1 -1
- package/tsparticles.interaction.external.push.min.js.LICENSE.txt +1 -1
- package/types/index.d.ts +2 -2
- package/umd/Pusher.js +2 -4
- package/umd/index.js +32 -8
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
*
|
|
7
|
+
* v4.0.0-alpha.0
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -28,45 +28,35 @@ return /******/ (() => { // webpackBootstrap
|
|
|
28
28
|
/******/ "use strict";
|
|
29
29
|
/******/ var __webpack_modules__ = ({
|
|
30
30
|
|
|
31
|
-
/***/ "./dist/browser/Options/Classes/Push.js"
|
|
31
|
+
/***/ "./dist/browser/Options/Classes/Push.js"
|
|
32
32
|
/*!**********************************************!*\
|
|
33
33
|
!*** ./dist/browser/Options/Classes/Push.js ***!
|
|
34
34
|
\**********************************************/
|
|
35
|
-
|
|
35
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
36
36
|
|
|
37
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Push: () => (/* binding */ Push)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n
|
|
37
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Push: () => (/* binding */ Push)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass Push {\n constructor() {\n this.default = true;\n this.groups = [];\n this.quantity = 4;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.default !== undefined) {\n this.default = data.default;\n }\n if (data.groups !== undefined) {\n this.groups = data.groups.map(t => t);\n }\n if (!this.groups.length) {\n this.default = true;\n }\n const quantity = data.quantity;\n if (quantity !== undefined) {\n this.quantity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(quantity);\n }\n this.particles = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.executeOnSingleOrMultiple)(data.particles, particles => {\n return (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, particles);\n });\n }\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-push/./dist/browser/Options/Classes/Push.js?\n}");
|
|
38
38
|
|
|
39
|
-
/***/ }
|
|
39
|
+
/***/ },
|
|
40
40
|
|
|
41
|
-
/***/ "./dist/browser/
|
|
42
|
-
/*!********************************!*\
|
|
43
|
-
!*** ./dist/browser/Pusher.js ***!
|
|
44
|
-
\********************************/
|
|
45
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
46
|
-
|
|
47
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Pusher: () => (/* binding */ Pusher)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Options_Classes_Push_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Push.js */ \"./dist/browser/Options/Classes/Push.js\");\n\n\nconst pushMode = \"push\",\n minQuantity = 0;\nclass Pusher extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = mode => {\n if (mode !== pushMode) {\n return;\n }\n const container = this.container,\n options = container.actualOptions,\n pushOptions = options.interactivity.modes.push;\n if (!pushOptions) {\n return;\n }\n const quantity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(pushOptions.quantity);\n if (quantity <= minQuantity) {\n return;\n }\n const group = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromArray)([undefined, ...pushOptions.groups]),\n groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined,\n particlesOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.itemFromSingleOrMultiple)(pushOptions.particles),\n overrideOptions = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)(groupOptions, particlesOptions);\n void container.particles.push(quantity, container.interactivity.mouse, overrideOptions, group);\n };\n }\n clear() {}\n init() {}\n interact() {}\n isEnabled() {\n return true;\n }\n loadModeOptions(options, ...sources) {\n if (!options.push) {\n options.push = new _Options_Classes_Push_js__WEBPACK_IMPORTED_MODULE_1__.Push();\n }\n for (const source of sources) {\n options.push.load(source?.push);\n }\n }\n reset() {}\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-external-push/./dist/browser/Pusher.js?\n}");
|
|
48
|
-
|
|
49
|
-
/***/ }),
|
|
50
|
-
|
|
51
|
-
/***/ "./dist/browser/index.js":
|
|
41
|
+
/***/ "./dist/browser/index.js"
|
|
52
42
|
/*!*******************************!*\
|
|
53
43
|
!*** ./dist/browser/index.js ***!
|
|
54
44
|
\*******************************/
|
|
55
|
-
|
|
45
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
56
46
|
|
|
57
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Push: () => (/* reexport safe */
|
|
47
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Push: () => (/* reexport safe */ _Options_Classes_Push_js__WEBPACK_IMPORTED_MODULE_0__.Push),\n/* harmony export */ loadExternalPushInteraction: () => (/* binding */ loadExternalPushInteraction)\n/* harmony export */ });\n/* harmony import */ var _Options_Classes_Push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Options/Classes/Push.js */ \"./dist/browser/Options/Classes/Push.js\");\nfunction loadExternalPushInteraction(engine) {\n engine.checkVersion(\"4.0.0-alpha.0\");\n engine.register(e => {\n e.addInteractor(\"externalPush\", async container => {\n const {\n Pusher\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_Pusher_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./Pusher.js */ \"./dist/browser/Pusher.js\"));\n return new Pusher(container);\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/interaction-external-push/./dist/browser/index.js?\n}");
|
|
58
48
|
|
|
59
|
-
/***/ }
|
|
49
|
+
/***/ },
|
|
60
50
|
|
|
61
|
-
/***/ "@tsparticles/engine"
|
|
51
|
+
/***/ "@tsparticles/engine"
|
|
62
52
|
/*!*********************************************************************************************************************************!*\
|
|
63
53
|
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
64
54
|
\*********************************************************************************************************************************/
|
|
65
|
-
|
|
55
|
+
(module) {
|
|
66
56
|
|
|
67
57
|
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
68
58
|
|
|
69
|
-
/***/ }
|
|
59
|
+
/***/ }
|
|
70
60
|
|
|
71
61
|
/******/ });
|
|
72
62
|
/************************************************************************/
|
|
@@ -80,6 +70,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
80
70
|
/******/ if (cachedModule !== undefined) {
|
|
81
71
|
/******/ return cachedModule.exports;
|
|
82
72
|
/******/ }
|
|
73
|
+
/******/ // Check if module exists (development only)
|
|
74
|
+
/******/ if (__webpack_modules__[moduleId] === undefined) {
|
|
75
|
+
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
76
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
77
|
+
/******/ throw e;
|
|
78
|
+
/******/ }
|
|
83
79
|
/******/ // Create a new module (and put it into the cache)
|
|
84
80
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
85
81
|
/******/ // no module.id needed
|
|
@@ -94,19 +90,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
94
90
|
/******/ return module.exports;
|
|
95
91
|
/******/ }
|
|
96
92
|
/******/
|
|
97
|
-
|
|
98
|
-
/******/
|
|
99
|
-
/******/ (() => {
|
|
100
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
101
|
-
/******/ __webpack_require__.n = (module) => {
|
|
102
|
-
/******/ var getter = module && module.__esModule ?
|
|
103
|
-
/******/ () => (module['default']) :
|
|
104
|
-
/******/ () => (module);
|
|
105
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
106
|
-
/******/ return getter;
|
|
107
|
-
/******/ };
|
|
108
|
-
/******/ })();
|
|
93
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
94
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
|
109
95
|
/******/
|
|
96
|
+
/************************************************************************/
|
|
110
97
|
/******/ /* webpack/runtime/define property getters */
|
|
111
98
|
/******/ (() => {
|
|
112
99
|
/******/ // define getter functions for harmony exports
|
|
@@ -119,11 +106,90 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
119
106
|
/******/ };
|
|
120
107
|
/******/ })();
|
|
121
108
|
/******/
|
|
109
|
+
/******/ /* webpack/runtime/ensure chunk */
|
|
110
|
+
/******/ (() => {
|
|
111
|
+
/******/ __webpack_require__.f = {};
|
|
112
|
+
/******/ // This file contains only the entry chunk.
|
|
113
|
+
/******/ // The chunk loading function for additional chunks
|
|
114
|
+
/******/ __webpack_require__.e = (chunkId) => {
|
|
115
|
+
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
116
|
+
/******/ __webpack_require__.f[key](chunkId, promises);
|
|
117
|
+
/******/ return promises;
|
|
118
|
+
/******/ }, []));
|
|
119
|
+
/******/ };
|
|
120
|
+
/******/ })();
|
|
121
|
+
/******/
|
|
122
|
+
/******/ /* webpack/runtime/get javascript chunk filename */
|
|
123
|
+
/******/ (() => {
|
|
124
|
+
/******/ // This function allow to reference async chunks
|
|
125
|
+
/******/ __webpack_require__.u = (chunkId) => {
|
|
126
|
+
/******/ // return url for filenames based on template
|
|
127
|
+
/******/ return "" + chunkId + ".js";
|
|
128
|
+
/******/ };
|
|
129
|
+
/******/ })();
|
|
130
|
+
/******/
|
|
131
|
+
/******/ /* webpack/runtime/global */
|
|
132
|
+
/******/ (() => {
|
|
133
|
+
/******/ __webpack_require__.g = (function() {
|
|
134
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
135
|
+
/******/ try {
|
|
136
|
+
/******/ return this || new Function('return this')();
|
|
137
|
+
/******/ } catch (e) {
|
|
138
|
+
/******/ if (typeof window === 'object') return window;
|
|
139
|
+
/******/ }
|
|
140
|
+
/******/ })();
|
|
141
|
+
/******/ })();
|
|
142
|
+
/******/
|
|
122
143
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
123
144
|
/******/ (() => {
|
|
124
145
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
125
146
|
/******/ })();
|
|
126
147
|
/******/
|
|
148
|
+
/******/ /* webpack/runtime/load script */
|
|
149
|
+
/******/ (() => {
|
|
150
|
+
/******/ var inProgress = {};
|
|
151
|
+
/******/ var dataWebpackPrefix = "@tsparticles/interaction-external-push:";
|
|
152
|
+
/******/ // loadScript function to load a script via script tag
|
|
153
|
+
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
|
154
|
+
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
|
155
|
+
/******/ var script, needAttach;
|
|
156
|
+
/******/ if(key !== undefined) {
|
|
157
|
+
/******/ var scripts = document.getElementsByTagName("script");
|
|
158
|
+
/******/ for(var i = 0; i < scripts.length; i++) {
|
|
159
|
+
/******/ var s = scripts[i];
|
|
160
|
+
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
|
161
|
+
/******/ }
|
|
162
|
+
/******/ }
|
|
163
|
+
/******/ if(!script) {
|
|
164
|
+
/******/ needAttach = true;
|
|
165
|
+
/******/ script = document.createElement('script');
|
|
166
|
+
/******/
|
|
167
|
+
/******/ script.charset = 'utf-8';
|
|
168
|
+
/******/ if (__webpack_require__.nc) {
|
|
169
|
+
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
|
170
|
+
/******/ }
|
|
171
|
+
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
|
172
|
+
/******/
|
|
173
|
+
/******/ script.src = url;
|
|
174
|
+
/******/ }
|
|
175
|
+
/******/ inProgress[url] = [done];
|
|
176
|
+
/******/ var onScriptComplete = (prev, event) => {
|
|
177
|
+
/******/ // avoid mem leaks in IE.
|
|
178
|
+
/******/ script.onerror = script.onload = null;
|
|
179
|
+
/******/ clearTimeout(timeout);
|
|
180
|
+
/******/ var doneFns = inProgress[url];
|
|
181
|
+
/******/ delete inProgress[url];
|
|
182
|
+
/******/ script.parentNode && script.parentNode.removeChild(script);
|
|
183
|
+
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
|
|
184
|
+
/******/ if(prev) return prev(event);
|
|
185
|
+
/******/ }
|
|
186
|
+
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
|
187
|
+
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
188
|
+
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
|
189
|
+
/******/ needAttach && document.head.appendChild(script);
|
|
190
|
+
/******/ };
|
|
191
|
+
/******/ })();
|
|
192
|
+
/******/
|
|
127
193
|
/******/ /* webpack/runtime/make namespace object */
|
|
128
194
|
/******/ (() => {
|
|
129
195
|
/******/ // define __esModule on exports
|
|
@@ -135,6 +201,119 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
135
201
|
/******/ };
|
|
136
202
|
/******/ })();
|
|
137
203
|
/******/
|
|
204
|
+
/******/ /* webpack/runtime/publicPath */
|
|
205
|
+
/******/ (() => {
|
|
206
|
+
/******/ var scriptUrl;
|
|
207
|
+
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
208
|
+
/******/ var document = __webpack_require__.g.document;
|
|
209
|
+
/******/ if (!scriptUrl && document) {
|
|
210
|
+
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
211
|
+
/******/ scriptUrl = document.currentScript.src;
|
|
212
|
+
/******/ if (!scriptUrl) {
|
|
213
|
+
/******/ var scripts = document.getElementsByTagName("script");
|
|
214
|
+
/******/ if(scripts.length) {
|
|
215
|
+
/******/ var i = scripts.length - 1;
|
|
216
|
+
/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
|
|
217
|
+
/******/ }
|
|
218
|
+
/******/ }
|
|
219
|
+
/******/ }
|
|
220
|
+
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
|
221
|
+
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
|
222
|
+
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
|
223
|
+
/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
224
|
+
/******/ __webpack_require__.p = scriptUrl;
|
|
225
|
+
/******/ })();
|
|
226
|
+
/******/
|
|
227
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
228
|
+
/******/ (() => {
|
|
229
|
+
/******/ // no baseURI
|
|
230
|
+
/******/
|
|
231
|
+
/******/ // object to store loaded and loading chunks
|
|
232
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
233
|
+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
234
|
+
/******/ var installedChunks = {
|
|
235
|
+
/******/ "tsparticles.interaction.external.push": 0
|
|
236
|
+
/******/ };
|
|
237
|
+
/******/
|
|
238
|
+
/******/ __webpack_require__.f.j = (chunkId, promises) => {
|
|
239
|
+
/******/ // JSONP chunk loading for javascript
|
|
240
|
+
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
241
|
+
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
|
242
|
+
/******/
|
|
243
|
+
/******/ // a Promise means "currently loading".
|
|
244
|
+
/******/ if(installedChunkData) {
|
|
245
|
+
/******/ promises.push(installedChunkData[2]);
|
|
246
|
+
/******/ } else {
|
|
247
|
+
/******/ if(true) { // all chunks have JS
|
|
248
|
+
/******/ // setup Promise in chunk cache
|
|
249
|
+
/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
|
250
|
+
/******/ promises.push(installedChunkData[2] = promise);
|
|
251
|
+
/******/
|
|
252
|
+
/******/ // start chunk loading
|
|
253
|
+
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
254
|
+
/******/ // create error before stack unwound to get useful stacktrace later
|
|
255
|
+
/******/ var error = new Error();
|
|
256
|
+
/******/ var loadingEnded = (event) => {
|
|
257
|
+
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
|
|
258
|
+
/******/ installedChunkData = installedChunks[chunkId];
|
|
259
|
+
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
260
|
+
/******/ if(installedChunkData) {
|
|
261
|
+
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
262
|
+
/******/ var realSrc = event && event.target && event.target.src;
|
|
263
|
+
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
|
264
|
+
/******/ error.name = 'ChunkLoadError';
|
|
265
|
+
/******/ error.type = errorType;
|
|
266
|
+
/******/ error.request = realSrc;
|
|
267
|
+
/******/ installedChunkData[1](error);
|
|
268
|
+
/******/ }
|
|
269
|
+
/******/ }
|
|
270
|
+
/******/ };
|
|
271
|
+
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
|
272
|
+
/******/ }
|
|
273
|
+
/******/ }
|
|
274
|
+
/******/ }
|
|
275
|
+
/******/ };
|
|
276
|
+
/******/
|
|
277
|
+
/******/ // no prefetching
|
|
278
|
+
/******/
|
|
279
|
+
/******/ // no preloaded
|
|
280
|
+
/******/
|
|
281
|
+
/******/ // no HMR
|
|
282
|
+
/******/
|
|
283
|
+
/******/ // no HMR manifest
|
|
284
|
+
/******/
|
|
285
|
+
/******/ // no on chunks loaded
|
|
286
|
+
/******/
|
|
287
|
+
/******/ // install a JSONP callback for chunk loading
|
|
288
|
+
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
289
|
+
/******/ var [chunkIds, moreModules, runtime] = data;
|
|
290
|
+
/******/ // add "moreModules" to the modules object,
|
|
291
|
+
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
292
|
+
/******/ var moduleId, chunkId, i = 0;
|
|
293
|
+
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
294
|
+
/******/ for(moduleId in moreModules) {
|
|
295
|
+
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
296
|
+
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
297
|
+
/******/ }
|
|
298
|
+
/******/ }
|
|
299
|
+
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
300
|
+
/******/ }
|
|
301
|
+
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
302
|
+
/******/ for(;i < chunkIds.length; i++) {
|
|
303
|
+
/******/ chunkId = chunkIds[i];
|
|
304
|
+
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
305
|
+
/******/ installedChunks[chunkId][0]();
|
|
306
|
+
/******/ }
|
|
307
|
+
/******/ installedChunks[chunkId] = 0;
|
|
308
|
+
/******/ }
|
|
309
|
+
/******/
|
|
310
|
+
/******/ }
|
|
311
|
+
/******/
|
|
312
|
+
/******/ var chunkLoadingGlobal = this["webpackChunk_tsparticles_interaction_external_push"] = this["webpackChunk_tsparticles_interaction_external_push"] || [];
|
|
313
|
+
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
314
|
+
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
315
|
+
/******/ })();
|
|
316
|
+
/******/
|
|
138
317
|
/************************************************************************/
|
|
139
318
|
/******/
|
|
140
319
|
/******/ // startup
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.interaction.external.push.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(this,(e=>(()=>{var t,r,n={303(t){t.exports=e},602(e,t,r){r.d(t,{$:()=>o});var n=r(303);class o{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(e){if((0,n.isNull)(e))return;void 0!==e.default&&(this.default=e.default),void 0!==e.groups&&(this.groups=e.groups.map((e=>e))),this.groups.length||(this.default=!0);const t=e.quantity;void 0!==t&&(this.quantity=(0,n.setRangeValue)(t)),this.particles=(0,n.executeOnSingleOrMultiple)(e.particles,(e=>(0,n.deepExtend)({},e)))}}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.m=n,i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>e+".min.js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="@tsparticles/interaction-external-push:",i.l=(e,n,o,a)=>{if(t[e])t[e].push(n);else{var s,u;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var p=l[c];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==r+o){s=p;break}}s||(u=!0,(s=document.createElement("script")).charset="utf-8",i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",r+o),s.src=e),t[e]=[n];var d=(r,n)=>{s.onerror=s.onload=null,clearTimeout(f);var o=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(n))),r)return r(n)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),u&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={134:0};i.f.j=(t,r)=>{var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=o);var a=i.p+i.u(t),s=new Error;i.l(a,(r=>{if(i.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,n[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,o,[a,s,u]=r,l=0;if(a.some((t=>0!==e[t]))){for(n in s)i.o(s,n)&&(i.m[n]=s[n]);if(u)u(i)}for(t&&t(r);l<a.length;l++)o=a[l],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=this.webpackChunk_tsparticles_interaction_external_push=this.webpackChunk_tsparticles_interaction_external_push||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};i.r(a),i.d(a,{Push:()=>s.$,loadExternalPushInteraction:()=>u});var s=i(602);function u(e){e.checkVersion("4.0.0-alpha.0"),e.register((e=>{e.addInteractor("externalPush",(async e=>{const{Pusher:t}=await i.e(611).then(i.bind(i,611));return new t(e)}))}))}return a})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Push External Interaction
|
|
1
|
+
/*! tsParticles Push External Interaction v4.0.0-alpha.0 by Matteo Bruni */
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type Engine } from "@tsparticles/engine";
|
|
2
|
-
export declare function loadExternalPushInteraction(engine: Engine
|
|
2
|
+
export declare function loadExternalPushInteraction(engine: Engine): void;
|
|
3
3
|
export * from "./Options/Classes/Push.js";
|
|
4
|
-
export * from "./Options/Interfaces/IPush.js";
|
|
4
|
+
export type * from "./Options/Interfaces/IPush.js";
|
package/umd/Pusher.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
const group = (0, engine_1.itemFromArray)([undefined, ...pushOptions.groups]), groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined, particlesOptions = (0, engine_1.itemFromSingleOrMultiple)(pushOptions.particles), overrideOptions = (0, engine_1.deepExtend)(groupOptions, particlesOptions);
|
|
32
|
-
|
|
32
|
+
container.particles.push(quantity, container.interactivity.mouse, overrideOptions, group);
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
clear() {
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
return true;
|
|
43
43
|
}
|
|
44
44
|
loadModeOptions(options, ...sources) {
|
|
45
|
-
|
|
46
|
-
options.push = new Push_js_1.Push();
|
|
47
|
-
}
|
|
45
|
+
options.push ??= new Push_js_1.Push();
|
|
48
46
|
for (const source of sources) {
|
|
49
47
|
options.push.load(source?.push);
|
|
50
48
|
}
|
package/umd/index.js
CHANGED
|
@@ -9,6 +9,28 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
9
9
|
if (k2 === undefined) k2 = k;
|
|
10
10
|
o[k2] = m[k];
|
|
11
11
|
}));
|
|
12
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
+
}) : function(o, v) {
|
|
15
|
+
o["default"] = v;
|
|
16
|
+
});
|
|
17
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
18
|
+
var ownKeys = function(o) {
|
|
19
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
20
|
+
var ar = [];
|
|
21
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
22
|
+
return ar;
|
|
23
|
+
};
|
|
24
|
+
return ownKeys(o);
|
|
25
|
+
};
|
|
26
|
+
return function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
})();
|
|
12
34
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
13
35
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
36
|
};
|
|
@@ -18,19 +40,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
40
|
if (v !== undefined) module.exports = v;
|
|
19
41
|
}
|
|
20
42
|
else if (typeof define === "function" && define.amd) {
|
|
21
|
-
define(["require", "exports", "./
|
|
43
|
+
define(["require", "exports", "./Options/Classes/Push.js"], factory);
|
|
22
44
|
}
|
|
23
45
|
})(function (require, exports) {
|
|
24
46
|
"use strict";
|
|
47
|
+
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
25
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
49
|
exports.loadExternalPushInteraction = loadExternalPushInteraction;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
engine.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
50
|
+
function loadExternalPushInteraction(engine) {
|
|
51
|
+
engine.checkVersion("4.0.0-alpha.0");
|
|
52
|
+
engine.register(e => {
|
|
53
|
+
e.addInteractor("externalPush", async (container) => {
|
|
54
|
+
const { Pusher } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./Pusher.js"))) : new Promise((resolve_1, reject_1) => { require(["./Pusher.js"], resolve_1, reject_1); }).then(__importStar));
|
|
55
|
+
return new Pusher(container);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
33
58
|
}
|
|
34
59
|
__exportStar(require("./Options/Classes/Push.js"), exports);
|
|
35
|
-
__exportStar(require("./Options/Interfaces/IPush.js"), exports);
|
|
36
60
|
});
|