@tsparticles/updater-twinkle 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/updater-twinkle.svg)](https://www.npmjs.com/package/@tsparticles/updater-twinkle)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/updater-twinkle)](https://www.npmjs.com/package/@tsparticles/updater-twinkle) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
8
8
 
9
- [tsParticles](https://github.com/matteobruni/tsparticles) updater plugin for twinkle animations.
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) updater plugin for twinkle animations.
10
10
 
11
11
  ## How to use it
12
12
 
@@ -1,4 +1,4 @@
1
- import { TwinkleValues } from "./TwinkleValues";
1
+ import { TwinkleValues } from "./TwinkleValues.js";
2
2
  export class Twinkle {
3
3
  constructor() {
4
4
  this.lines = new TwinkleValues();
@@ -1,5 +1,5 @@
1
1
  import { getRandom, getRangeValue, getStyleFromHsl, rangeColorToHsl, } from "@tsparticles/engine";
2
- import { Twinkle } from "./Options/Classes/Twinkle";
2
+ import { Twinkle } from "./Options/Classes/Twinkle.js";
3
3
  export class TwinkleUpdater {
4
4
  getColorStyles(particle, context, radius, opacity) {
5
5
  const pOptions = particle.options, twinkleOptions = pOptions.twinkle;
package/browser/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { TwinkleUpdater } from "./TwinkleUpdater";
1
+ import { TwinkleUpdater } from "./TwinkleUpdater.js";
2
2
  export async function loadTwinkleUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("twinkle", () => new TwinkleUpdater(), refresh);
4
4
  }
@@ -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.Twinkle = void 0;
4
- const TwinkleValues_1 = require("./TwinkleValues");
4
+ const TwinkleValues_js_1 = require("./TwinkleValues.js");
5
5
  class Twinkle {
6
6
  constructor() {
7
- this.lines = new TwinkleValues_1.TwinkleValues();
8
- this.particles = new TwinkleValues_1.TwinkleValues();
7
+ this.lines = new TwinkleValues_js_1.TwinkleValues();
8
+ this.particles = new TwinkleValues_js_1.TwinkleValues();
9
9
  }
10
10
  load(data) {
11
11
  if (!data) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TwinkleUpdater = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const Twinkle_1 = require("./Options/Classes/Twinkle");
5
+ const Twinkle_js_1 = require("./Options/Classes/Twinkle.js");
6
6
  class TwinkleUpdater {
7
7
  getColorStyles(particle, context, radius, opacity) {
8
8
  const pOptions = particle.options, twinkleOptions = pOptions.twinkle;
@@ -25,7 +25,7 @@ class TwinkleUpdater {
25
25
  }
26
26
  loadOptions(options, ...sources) {
27
27
  if (!options.twinkle) {
28
- options.twinkle = new Twinkle_1.Twinkle();
28
+ options.twinkle = new Twinkle_js_1.Twinkle();
29
29
  }
30
30
  for (const source of sources) {
31
31
  options.twinkle.load(source?.twinkle);
package/cjs/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadTwinkleUpdater = void 0;
4
- const TwinkleUpdater_1 = require("./TwinkleUpdater");
4
+ const TwinkleUpdater_js_1 = require("./TwinkleUpdater.js");
5
5
  async function loadTwinkleUpdater(engine, refresh = true) {
6
- await engine.addParticleUpdater("twinkle", () => new TwinkleUpdater_1.TwinkleUpdater(), refresh);
6
+ await engine.addParticleUpdater("twinkle", () => new TwinkleUpdater_js_1.TwinkleUpdater(), refresh);
7
7
  }
8
8
  exports.loadTwinkleUpdater = loadTwinkleUpdater;
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,4 +1,4 @@
1
- import { TwinkleValues } from "./TwinkleValues";
1
+ import { TwinkleValues } from "./TwinkleValues.js";
2
2
  export class Twinkle {
3
3
  constructor() {
4
4
  this.lines = new TwinkleValues();
@@ -1,5 +1,5 @@
1
1
  import { getRandom, getRangeValue, getStyleFromHsl, rangeColorToHsl, } from "@tsparticles/engine";
2
- import { Twinkle } from "./Options/Classes/Twinkle";
2
+ import { Twinkle } from "./Options/Classes/Twinkle.js";
3
3
  export class TwinkleUpdater {
4
4
  getColorStyles(particle, context, radius, opacity) {
5
5
  const pOptions = particle.options, twinkleOptions = pOptions.twinkle;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { TwinkleUpdater } from "./TwinkleUpdater";
1
+ import { TwinkleUpdater } from "./TwinkleUpdater.js";
2
2
  export async function loadTwinkleUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("twinkle", () => new TwinkleUpdater(), refresh);
4
4
  }
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/updater-twinkle",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles particles twinkle updater",
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": "updaters/twinkle"
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.updater.twinkle.min.js",
73
73
  "unpkg": "tsparticles.updater.twinkle.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"