@tsparticles/plugin-motion 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/plugin-motion.svg)](https://www.npmjs.com/package/@tsparticles/plugin-motion)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/plugin-motion)](https://www.npmjs.com/package/@tsparticles/plugin-motion) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
8
8
 
9
- [tsParticles](https://github.com/matteobruni/tsparticles) plugin for handling motion sickness CSS value.
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) plugin for handling motion sickness CSS value.
10
10
 
11
11
  ## How to use it
12
12
 
@@ -1,4 +1,4 @@
1
- import { MotionReduce } from "./MotionReduce";
1
+ import { MotionReduce } from "./MotionReduce.js";
2
2
  export class Motion {
3
3
  constructor() {
4
4
  this.disable = false;
package/browser/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Motion } from "./Options/Classes/Motion";
2
- import { MotionInstance } from "./MotionInstance";
1
+ import { Motion } from "./Options/Classes/Motion.js";
2
+ import { MotionInstance } from "./MotionInstance.js";
3
3
  class MotionPlugin {
4
4
  constructor(engine) {
5
5
  this.id = "motion";
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Motion = void 0;
4
- const MotionReduce_1 = require("./MotionReduce");
4
+ const MotionReduce_js_1 = require("./MotionReduce.js");
5
5
  class Motion {
6
6
  constructor() {
7
7
  this.disable = false;
8
- this.reduce = new MotionReduce_1.MotionReduce();
8
+ this.reduce = new MotionReduce_js_1.MotionReduce();
9
9
  }
10
10
  load(data) {
11
11
  if (!data) {
package/cjs/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadMotionPlugin = void 0;
4
- const Motion_1 = require("./Options/Classes/Motion");
5
- const MotionInstance_1 = require("./MotionInstance");
4
+ const Motion_js_1 = require("./Options/Classes/Motion.js");
5
+ const MotionInstance_js_1 = require("./MotionInstance.js");
6
6
  class MotionPlugin {
7
7
  constructor(engine) {
8
8
  this.id = "motion";
9
9
  this._engine = engine;
10
10
  }
11
11
  getPlugin(container) {
12
- return new MotionInstance_1.MotionInstance(container, this._engine);
12
+ return new MotionInstance_js_1.MotionInstance(container, this._engine);
13
13
  }
14
14
  loadOptions(options, source) {
15
15
  if (!this.needsPlugin()) {
@@ -17,7 +17,7 @@ class MotionPlugin {
17
17
  }
18
18
  let motionOptions = options.motion;
19
19
  if (!motionOptions?.load) {
20
- options.motion = motionOptions = new Motion_1.Motion();
20
+ options.motion = motionOptions = new Motion_js_1.Motion();
21
21
  }
22
22
  motionOptions.load(source?.motion);
23
23
  }
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,4 +1,4 @@
1
- import { MotionReduce } from "./MotionReduce";
1
+ import { MotionReduce } from "./MotionReduce.js";
2
2
  export class Motion {
3
3
  constructor() {
4
4
  this.disable = false;
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Motion } from "./Options/Classes/Motion";
2
- import { MotionInstance } from "./MotionInstance";
1
+ import { Motion } from "./Options/Classes/Motion.js";
2
+ import { MotionInstance } from "./MotionInstance.js";
3
3
  class MotionPlugin {
4
4
  constructor(engine) {
5
5
  this.id = "motion";
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-motion",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles motion sickness plugin",
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": "plugins/motion"
10
10
  },
11
11
  "keywords": [
@@ -65,16 +65,28 @@
65
65
  "author": "Matteo Bruni <matteo.bruni@me.com>",
66
66
  "license": "MIT",
67
67
  "bugs": {
68
- "url": "https://github.com/matteobruni/tsparticles/issues"
68
+ "url": "https://github.com/tsparticles/tsparticles/issues"
69
69
  },
70
- "main": "cjs/index.js",
70
+ "sideEffects": false,
71
71
  "jsdelivr": "tsparticles.plugin.motion.min.js",
72
72
  "unpkg": "tsparticles.plugin.motion.min.js",
73
+ "browser": "browser/index.js",
74
+ "main": "cjs/index.js",
73
75
  "module": "esm/index.js",
74
76
  "types": "types/index.d.ts",
75
- "sideEffects": false,
77
+ "exports": {
78
+ ".": {
79
+ "types": "./types/index.d.ts",
80
+ "browser": "./browser/index.js",
81
+ "import": "./esm/index.js",
82
+ "require": "./cjs/index.js",
83
+ "umd": "./umd/index.js",
84
+ "default": "./cjs/index.js"
85
+ },
86
+ "./package.json": "./package.json"
87
+ },
76
88
  "dependencies": {
77
- "@tsparticles/engine": "^3.0.0-beta.0"
89
+ "@tsparticles/engine": "^3.0.0-beta.2"
78
90
  },
79
91
  "publishConfig": {
80
92
  "access": "public"