@tsparticles/interaction-external-grab 3.0.0-beta.0 → 3.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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![npmjs](https://badge.fury.io/js/@tsparticles/interaction-external-grab.svg)](https://www.npmjs.com/package/@tsparticles/interaction-external-grab)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/interaction-external-grab)](https://www.npmjs.com/package/@tsparticles/interaction-external-grab) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
8
8
 
9
- [tsParticles](https://github.com/matteobruni/tsparticles) interaction plugin for grab effect around mouse or HTML
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) interaction plugin for grab effect around mouse or HTML
10
10
  elements.
11
11
 
12
12
  ## How to use it
@@ -1,6 +1,6 @@
1
1
  import { ExternalInteractorBase, getDistance, getLinkColor, getLinkRandomColor, isInArray, mouseMoveEvent, } from "@tsparticles/engine";
2
- import { Grab } from "./Options/Classes/Grab";
3
- import { drawGrab } from "./Utils";
2
+ import { Grab } from "./Options/Classes/Grab.js";
3
+ import { drawGrab } from "./Utils.js";
4
4
  export class Grabber extends ExternalInteractorBase {
5
5
  constructor(container) {
6
6
  super(container);
@@ -1,4 +1,4 @@
1
- import { GrabLinks } from "./GrabLinks";
1
+ import { GrabLinks } from "./GrabLinks.js";
2
2
  export class Grab {
3
3
  constructor() {
4
4
  this.distance = 100;
package/browser/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { Grabber } from "./Grabber";
1
+ import { Grabber } from "./Grabber.js";
2
2
  export async function loadExternalGrabInteraction(engine, refresh = true) {
3
3
  await engine.addInteractor("externalGrab", (container) => new Grabber(container), refresh);
4
4
  }
5
- export * from "./Options/Classes/Grab";
6
- export * from "./Options/Classes/GrabLinks";
7
- export * from "./Options/Interfaces/IGrab";
8
- export * from "./Options/Interfaces/IGrabLinks";
5
+ export * from "./Options/Classes/Grab.js";
6
+ export * from "./Options/Classes/GrabLinks.js";
7
+ export * from "./Options/Interfaces/IGrab.js";
8
+ export * from "./Options/Interfaces/IGrabLinks.js";
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/cjs/Grabber.js CHANGED
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Grabber = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const Grab_1 = require("./Options/Classes/Grab");
6
- const Utils_1 = require("./Utils");
5
+ const Grab_js_1 = require("./Options/Classes/Grab.js");
6
+ const Utils_js_1 = require("./Utils.js");
7
7
  class Grabber extends engine_1.ExternalInteractorBase {
8
8
  constructor(container) {
9
9
  super(container);
@@ -51,7 +51,7 @@ class Grabber extends engine_1.ExternalInteractorBase {
51
51
  if (!colorLine) {
52
52
  continue;
53
53
  }
54
- (0, Utils_1.drawGrab)(container, particle, colorLine, opacityLine, mousePos);
54
+ (0, Utils_js_1.drawGrab)(container, particle, colorLine, opacityLine, mousePos);
55
55
  }
56
56
  }
57
57
  isEnabled(particle) {
@@ -60,7 +60,7 @@ class Grabber extends engine_1.ExternalInteractorBase {
60
60
  }
61
61
  loadModeOptions(options, ...sources) {
62
62
  if (!options.grab) {
63
- options.grab = new Grab_1.Grab();
63
+ options.grab = new Grab_js_1.Grab();
64
64
  }
65
65
  for (const source of sources) {
66
66
  options.grab.load(source?.grab);
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Grab = void 0;
4
- const GrabLinks_1 = require("./GrabLinks");
4
+ const GrabLinks_js_1 = require("./GrabLinks.js");
5
5
  class Grab {
6
6
  constructor() {
7
7
  this.distance = 100;
8
- this.links = new GrabLinks_1.GrabLinks();
8
+ this.links = new GrabLinks_js_1.GrabLinks();
9
9
  }
10
10
  get lineLinked() {
11
11
  return this.links;
package/cjs/index.js CHANGED
@@ -15,12 +15,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.loadExternalGrabInteraction = void 0;
18
- const Grabber_1 = require("./Grabber");
18
+ const Grabber_js_1 = require("./Grabber.js");
19
19
  async function loadExternalGrabInteraction(engine, refresh = true) {
20
- await engine.addInteractor("externalGrab", (container) => new Grabber_1.Grabber(container), refresh);
20
+ await engine.addInteractor("externalGrab", (container) => new Grabber_js_1.Grabber(container), refresh);
21
21
  }
22
22
  exports.loadExternalGrabInteraction = loadExternalGrabInteraction;
23
- __exportStar(require("./Options/Classes/Grab"), exports);
24
- __exportStar(require("./Options/Classes/GrabLinks"), exports);
25
- __exportStar(require("./Options/Interfaces/IGrab"), exports);
26
- __exportStar(require("./Options/Interfaces/IGrabLinks"), exports);
23
+ __exportStar(require("./Options/Classes/Grab.js"), exports);
24
+ __exportStar(require("./Options/Classes/GrabLinks.js"), exports);
25
+ __exportStar(require("./Options/Interfaces/IGrab.js"), exports);
26
+ __exportStar(require("./Options/Interfaces/IGrabLinks.js"), exports);
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
package/esm/Grabber.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ExternalInteractorBase, getDistance, getLinkColor, getLinkRandomColor, isInArray, mouseMoveEvent, } from "@tsparticles/engine";
2
- import { Grab } from "./Options/Classes/Grab";
3
- import { drawGrab } from "./Utils";
2
+ import { Grab } from "./Options/Classes/Grab.js";
3
+ import { drawGrab } from "./Utils.js";
4
4
  export class Grabber extends ExternalInteractorBase {
5
5
  constructor(container) {
6
6
  super(container);
@@ -1,4 +1,4 @@
1
- import { GrabLinks } from "./GrabLinks";
1
+ import { GrabLinks } from "./GrabLinks.js";
2
2
  export class Grab {
3
3
  constructor() {
4
4
  this.distance = 100;
package/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { Grabber } from "./Grabber";
1
+ import { Grabber } from "./Grabber.js";
2
2
  export async function loadExternalGrabInteraction(engine, refresh = true) {
3
3
  await engine.addInteractor("externalGrab", (container) => new Grabber(container), refresh);
4
4
  }
5
- export * from "./Options/Classes/Grab";
6
- export * from "./Options/Classes/GrabLinks";
7
- export * from "./Options/Interfaces/IGrab";
8
- export * from "./Options/Interfaces/IGrabLinks";
5
+ export * from "./Options/Classes/Grab.js";
6
+ export * from "./Options/Classes/GrabLinks.js";
7
+ export * from "./Options/Interfaces/IGrab.js";
8
+ export * from "./Options/Interfaces/IGrabLinks.js";
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/interaction-external-grab",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles grab external interaction",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/matteobruni/tsparticles.git",
8
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
9
9
  "directory": "interactions/external/grab"
10
10
  },
11
11
  "keywords": [
@@ -66,16 +66,28 @@
66
66
  "author": "Matteo Bruni <matteo.bruni@me.com>",
67
67
  "license": "MIT",
68
68
  "bugs": {
69
- "url": "https://github.com/matteobruni/tsparticles/issues"
69
+ "url": "https://github.com/tsparticles/tsparticles/issues"
70
70
  },
71
- "main": "cjs/index.js",
71
+ "sideEffects": false,
72
72
  "jsdelivr": "tsparticles.interaction.external.grab.min.js",
73
73
  "unpkg": "tsparticles.interaction.external.grab.min.js",
74
+ "browser": "browser/index.js",
75
+ "main": "cjs/index.js",
74
76
  "module": "esm/index.js",
75
77
  "types": "types/index.d.ts",
76
- "sideEffects": false,
78
+ "exports": {
79
+ ".": {
80
+ "types": "./types/index.d.ts",
81
+ "browser": "./browser/index.js",
82
+ "import": "./esm/index.js",
83
+ "require": "./cjs/index.js",
84
+ "umd": "./umd/index.js",
85
+ "default": "./cjs/index.js"
86
+ },
87
+ "./package.json": "./package.json"
88
+ },
77
89
  "dependencies": {
78
- "@tsparticles/engine": "^3.0.0-beta.0"
90
+ "@tsparticles/engine": "^3.0.0-beta.2"
79
91
  },
80
92
  "publishConfig": {
81
93
  "access": "public"