@tsparticles/interaction-external-push 4.0.0-beta.0 → 4.0.0-beta.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/{836.min.js → 360.min.js} +1 -1
- package/browser/index.js +4 -3
- package/cjs/index.js +4 -3
- package/dist_browser_Pusher_js.js +1 -1
- package/esm/index.js +4 -3
- package/package.json +10 -7
- package/report.html +84 -29
- package/tsparticles.interaction.external.push.js +2 -2
- package/tsparticles.interaction.external.push.min.js +2 -2
- package/umd/Options/Classes/Push.js +0 -47
- package/umd/Options/Interfaces/IPush.js +0 -12
- package/umd/Pusher.js +0 -58
- package/umd/Types.js +0 -12
- package/umd/index.js +0 -62
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(this.webpackChunk_tsparticles_interaction_external_push=this.webpackChunk_tsparticles_interaction_external_push||[]).push([[
|
|
1
|
+
"use strict";(this.webpackChunk_tsparticles_interaction_external_push=this.webpackChunk_tsparticles_interaction_external_push||[]).push([[360],{360(t,e,i){i.d(e,{Pusher:()=>o});var s=i(702),n=i(303),r=i(781);let a="push";class o extends s.ExternalInteractorBase{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==a)return;let i=this.container,s=i.actualOptions,r=s.interactivity?.modes.push;if(!r)return;let o=(0,n.getRangeValue)(r.quantity);if(o<=0)return;let l=(0,n.itemFromArray)([void 0,...r.groups]),c=void 0!==l?i.actualOptions.particles.groups[l]:void 0,u=(0,n.itemFromSingleOrMultiple)(r.particles),p=(0,n.deepExtend)(c,u);i.particles.push(o,e.mouse.position,p,l)}}clear(){}init(){}interact(){}isEnabled(t,e){let i=this.container.actualOptions,s=t.mouse,r=(e?.interactivity??i.interactivity)?.events;return!!r&&s.clicking&&s.inside&&!!s.position&&(0,n.isInArray)(a,r.onClick.mode)}loadModeOptions(t,...e){for(let i of(t.push??=new r.$,e))t.push.load(i?.push)}reset(){}}}}]);
|
package/browser/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadExternalPushInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
-
await engine.register(async (e) => {
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
4
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
5
6
|
ensureInteractivityPluginLoaded(e);
|
|
6
|
-
e.addInteractor?.("externalPush", async (container) => {
|
|
7
|
+
e.pluginManager.addInteractor?.("externalPush", async (container) => {
|
|
7
8
|
const { Pusher } = await import("./Pusher.js");
|
|
8
9
|
return new Pusher(container);
|
|
9
10
|
});
|
package/cjs/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadExternalPushInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
-
await engine.register(async (e) => {
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
4
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
5
6
|
ensureInteractivityPluginLoaded(e);
|
|
6
|
-
e.addInteractor?.("externalPush", async (container) => {
|
|
7
|
+
e.pluginManager.addInteractor?.("externalPush", async (container) => {
|
|
7
8
|
const { Pusher } = await import("./Pusher.js");
|
|
8
9
|
return new Pusher(container);
|
|
9
10
|
});
|
package/esm/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import {} from "@tsparticles/engine";
|
|
1
2
|
export async function loadExternalPushInteraction(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-beta.
|
|
3
|
-
await engine.register(async (e) => {
|
|
3
|
+
engine.checkVersion("4.0.0-beta.2");
|
|
4
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
5
|
const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity");
|
|
5
6
|
ensureInteractivityPluginLoaded(e);
|
|
6
|
-
e.addInteractor?.("externalPush", async (container) => {
|
|
7
|
+
e.pluginManager.addInteractor?.("externalPush", async (container) => {
|
|
7
8
|
const { Pusher } = await import("./Pusher.js");
|
|
8
9
|
return new Pusher(container);
|
|
9
10
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/interaction-external-push",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles push external interaction",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -81,17 +81,20 @@
|
|
|
81
81
|
"browser": "./browser/index.js",
|
|
82
82
|
"import": "./esm/index.js",
|
|
83
83
|
"require": "./cjs/index.js",
|
|
84
|
-
"
|
|
85
|
-
"default": "./cjs/index.js"
|
|
84
|
+
"default": "./esm/index.js"
|
|
86
85
|
},
|
|
87
86
|
"./package.json": "./package.json"
|
|
88
87
|
},
|
|
89
|
-
"
|
|
90
|
-
"@tsparticles/engine": "4.0.0-beta.
|
|
91
|
-
"@tsparticles/plugin-interactivity": "4.0.0-beta.
|
|
88
|
+
"peerDepdendencies": {
|
|
89
|
+
"@tsparticles/engine": "4.0.0-beta.1",
|
|
90
|
+
"@tsparticles/plugin-interactivity": "4.0.0-beta.1"
|
|
92
91
|
},
|
|
93
92
|
"publishConfig": {
|
|
94
93
|
"access": "public"
|
|
95
94
|
},
|
|
96
|
-
"type": "module"
|
|
95
|
+
"type": "module",
|
|
96
|
+
"peerDependencies": {
|
|
97
|
+
"@tsparticles/engine": "4.0.0-beta.1",
|
|
98
|
+
"@tsparticles/plugin-interactivity": "4.0.0-beta.1"
|
|
99
|
+
}
|
|
97
100
|
}
|