@tsparticles/interaction-external-repulse 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-repulse.svg)](https://www.npmjs.com/package/@tsparticles/interaction-external-repulse)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/interaction-external-repulse)](https://www.npmjs.com/package/@tsparticles/interaction-external-repulse) [![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 repulse effect around mouse or HTML
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) interaction plugin for repulse effect around mouse or HTML
10
10
  elements.
11
11
 
12
12
  ## How to use it
@@ -1,6 +1,6 @@
1
1
  import { executeOnSingleOrMultiple, } from "@tsparticles/engine";
2
- import { RepulseBase } from "./RepulseBase";
3
- import { RepulseDiv } from "./RepulseDiv";
2
+ import { RepulseBase } from "./RepulseBase.js";
3
+ import { RepulseDiv } from "./RepulseDiv.js";
4
4
  export class Repulse extends RepulseBase {
5
5
  load(data) {
6
6
  super.load(data);
@@ -1,4 +1,4 @@
1
- import { RepulseBase } from "./RepulseBase";
1
+ import { RepulseBase } from "./RepulseBase.js";
2
2
  export class RepulseDiv extends RepulseBase {
3
3
  constructor() {
4
4
  super();
@@ -1,5 +1,5 @@
1
1
  import { Circle, ExternalInteractorBase, Rectangle, Vector, clamp, divMode, divModeExecute, getDistances, getEasing, isDivModeEnabled, isInArray, mouseMoveEvent, } from "@tsparticles/engine";
2
- import { Repulse } from "./Options/Classes/Repulse";
2
+ import { Repulse } from "./Options/Classes/Repulse.js";
3
3
  export class Repulser extends ExternalInteractorBase {
4
4
  constructor(engine, container) {
5
5
  super(container);
package/browser/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { Repulser } from "./Repulser";
1
+ import { Repulser } from "./Repulser.js";
2
2
  export async function loadExternalRepulseInteraction(engine, refresh = true) {
3
3
  await engine.addInteractor("externalRepulse", (container) => new Repulser(engine, container), refresh);
4
4
  }
5
- export * from "./Options/Classes/RepulseBase";
6
- export * from "./Options/Classes/RepulseDiv";
7
- export * from "./Options/Classes/Repulse";
8
- export * from "./Options/Interfaces/IRepulseBase";
9
- export * from "./Options/Interfaces/IRepulseDiv";
10
- export * from "./Options/Interfaces/IRepulse";
5
+ export * from "./Options/Classes/RepulseBase.js";
6
+ export * from "./Options/Classes/RepulseDiv.js";
7
+ export * from "./Options/Classes/Repulse.js";
8
+ export * from "./Options/Interfaces/IRepulseBase.js";
9
+ export * from "./Options/Interfaces/IRepulseDiv.js";
10
+ export * from "./Options/Interfaces/IRepulse.js";
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Repulse = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const RepulseBase_1 = require("./RepulseBase");
6
- const RepulseDiv_1 = require("./RepulseDiv");
7
- class Repulse extends RepulseBase_1.RepulseBase {
5
+ const RepulseBase_js_1 = require("./RepulseBase.js");
6
+ const RepulseDiv_js_1 = require("./RepulseDiv.js");
7
+ class Repulse extends RepulseBase_js_1.RepulseBase {
8
8
  load(data) {
9
9
  super.load(data);
10
10
  if (!data) {
11
11
  return;
12
12
  }
13
13
  this.divs = (0, engine_1.executeOnSingleOrMultiple)(data.divs, (div) => {
14
- const tmp = new RepulseDiv_1.RepulseDiv();
14
+ const tmp = new RepulseDiv_js_1.RepulseDiv();
15
15
  tmp.load(div);
16
16
  return tmp;
17
17
  });
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RepulseDiv = void 0;
4
- const RepulseBase_1 = require("./RepulseBase");
5
- class RepulseDiv extends RepulseBase_1.RepulseBase {
4
+ const RepulseBase_js_1 = require("./RepulseBase.js");
5
+ class RepulseDiv extends RepulseBase_js_1.RepulseBase {
6
6
  constructor() {
7
7
  super();
8
8
  this.selectors = [];
package/cjs/Repulser.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Repulser = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const Repulse_1 = require("./Options/Classes/Repulse");
5
+ const Repulse_js_1 = require("./Options/Classes/Repulse.js");
6
6
  class Repulser extends engine_1.ExternalInteractorBase {
7
7
  constructor(engine, container) {
8
8
  super(container);
@@ -146,7 +146,7 @@ class Repulser extends engine_1.ExternalInteractorBase {
146
146
  }
147
147
  loadModeOptions(options, ...sources) {
148
148
  if (!options.repulse) {
149
- options.repulse = new Repulse_1.Repulse();
149
+ options.repulse = new Repulse_js_1.Repulse();
150
150
  }
151
151
  for (const source of sources) {
152
152
  options.repulse.load(source?.repulse);
package/cjs/index.js CHANGED
@@ -15,14 +15,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.loadExternalRepulseInteraction = void 0;
18
- const Repulser_1 = require("./Repulser");
18
+ const Repulser_js_1 = require("./Repulser.js");
19
19
  async function loadExternalRepulseInteraction(engine, refresh = true) {
20
- await engine.addInteractor("externalRepulse", (container) => new Repulser_1.Repulser(engine, container), refresh);
20
+ await engine.addInteractor("externalRepulse", (container) => new Repulser_js_1.Repulser(engine, container), refresh);
21
21
  }
22
22
  exports.loadExternalRepulseInteraction = loadExternalRepulseInteraction;
23
- __exportStar(require("./Options/Classes/RepulseBase"), exports);
24
- __exportStar(require("./Options/Classes/RepulseDiv"), exports);
25
- __exportStar(require("./Options/Classes/Repulse"), exports);
26
- __exportStar(require("./Options/Interfaces/IRepulseBase"), exports);
27
- __exportStar(require("./Options/Interfaces/IRepulseDiv"), exports);
28
- __exportStar(require("./Options/Interfaces/IRepulse"), exports);
23
+ __exportStar(require("./Options/Classes/RepulseBase.js"), exports);
24
+ __exportStar(require("./Options/Classes/RepulseDiv.js"), exports);
25
+ __exportStar(require("./Options/Classes/Repulse.js"), exports);
26
+ __exportStar(require("./Options/Interfaces/IRepulseBase.js"), exports);
27
+ __exportStar(require("./Options/Interfaces/IRepulseDiv.js"), exports);
28
+ __exportStar(require("./Options/Interfaces/IRepulse.js"), exports);
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,6 +1,6 @@
1
1
  import { executeOnSingleOrMultiple, } from "@tsparticles/engine";
2
- import { RepulseBase } from "./RepulseBase";
3
- import { RepulseDiv } from "./RepulseDiv";
2
+ import { RepulseBase } from "./RepulseBase.js";
3
+ import { RepulseDiv } from "./RepulseDiv.js";
4
4
  export class Repulse extends RepulseBase {
5
5
  load(data) {
6
6
  super.load(data);
@@ -1,4 +1,4 @@
1
- import { RepulseBase } from "./RepulseBase";
1
+ import { RepulseBase } from "./RepulseBase.js";
2
2
  export class RepulseDiv extends RepulseBase {
3
3
  constructor() {
4
4
  super();
package/esm/Repulser.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Circle, ExternalInteractorBase, Rectangle, Vector, clamp, divMode, divModeExecute, getDistances, getEasing, isDivModeEnabled, isInArray, mouseMoveEvent, } from "@tsparticles/engine";
2
- import { Repulse } from "./Options/Classes/Repulse";
2
+ import { Repulse } from "./Options/Classes/Repulse.js";
3
3
  export class Repulser extends ExternalInteractorBase {
4
4
  constructor(engine, container) {
5
5
  super(container);
package/esm/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { Repulser } from "./Repulser";
1
+ import { Repulser } from "./Repulser.js";
2
2
  export async function loadExternalRepulseInteraction(engine, refresh = true) {
3
3
  await engine.addInteractor("externalRepulse", (container) => new Repulser(engine, container), refresh);
4
4
  }
5
- export * from "./Options/Classes/RepulseBase";
6
- export * from "./Options/Classes/RepulseDiv";
7
- export * from "./Options/Classes/Repulse";
8
- export * from "./Options/Interfaces/IRepulseBase";
9
- export * from "./Options/Interfaces/IRepulseDiv";
10
- export * from "./Options/Interfaces/IRepulse";
5
+ export * from "./Options/Classes/RepulseBase.js";
6
+ export * from "./Options/Classes/RepulseDiv.js";
7
+ export * from "./Options/Classes/Repulse.js";
8
+ export * from "./Options/Interfaces/IRepulseBase.js";
9
+ export * from "./Options/Interfaces/IRepulseDiv.js";
10
+ export * from "./Options/Interfaces/IRepulse.js";
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/interaction-external-repulse",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles repulse 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/repulse"
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.repulse.min.js",
73
73
  "unpkg": "tsparticles.interaction.external.repulse.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"