@tsparticles/template-landing 4.4.0 → 4.5.0

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/package.json +5 -5
  3. package/scripts/prebuild.js +1 -1
  4. package/template/angular/package.json +14 -14
  5. package/template/angular/src/app/app.component.ts +1 -0
  6. package/template/angular-confetti/package.json +16 -16
  7. package/template/angular-confetti/src/app/app.component.html +1 -1
  8. package/template/angular-confetti/src/app/app.component.ts +13 -2
  9. package/template/angular-fireworks/package.json +16 -16
  10. package/template/angular-fireworks/src/app/app.component.html +1 -1
  11. package/template/angular-fireworks/src/app/app.component.ts +13 -2
  12. package/template/astro/package.json +6 -6
  13. package/template/astro/src/pages/index.astro +4 -2
  14. package/template/ember/package.json +28 -8
  15. package/template/inferno/package.json +7 -7
  16. package/template/inferno/src/App.tsx +7 -6
  17. package/template/jquery/package.json +5 -5
  18. package/template/jquery/src/main.ts +1 -4
  19. package/template/lit/package.json +5 -5
  20. package/template/nextjs/package.json +10 -4
  21. package/template/nextjs/src/app/page.tsx +1 -1
  22. package/template/nextjs/src/app/providers.tsx +10 -10
  23. package/template/nuxt2/package.json +14 -5
  24. package/template/nuxt3/package.json +4 -4
  25. package/template/nuxt4/package.json +4 -4
  26. package/template/preact/package.json +5 -5
  27. package/template/preact/src/App.tsx +5 -10
  28. package/template/qwik/package.json +5 -5
  29. package/template/react/package.json +4 -2
  30. package/template/riot/package.json +7 -6
  31. package/template/solid/package.json +2 -2
  32. package/template/stencil/package.json +4 -4
  33. package/template/svelte/package.json +1 -1
  34. package/template/vue2/package.json +6 -6
  35. package/template/vue3/package.json +1 -1
  36. package/template/webcomponents/package.json +5 -5
  37. package/template/webcomponents/src/main.ts +48 -42
  38. package/template.json +5 -5
package/CHANGELOG.md CHANGED
@@ -3,11 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.5.0](https://github.com/tsparticles/tsparticles/compare/v4.4.0...v4.5.0) (2026-10-25)
7
+
8
+ **Note:** Version bump only for package @tsparticles/template-landing
9
+
6
10
  # [4.4.0](https://github.com/tsparticles/tsparticles/compare/v4.3.3...v4.4.0) (2026-08-30)
7
11
 
8
12
  ### Bug Fixes
9
13
 
10
- * various fixes for 4.4.0 ([475d06d](https://github.com/tsparticles/tsparticles/commit/475d06da27e1497bb097c0822fcfcb72d7142456))
14
+ - various fixes for 4.4.0 ([475d06d](https://github.com/tsparticles/tsparticles/commit/475d06da27e1497bb097c0822fcfcb72d7142456))
11
15
 
12
16
  ## [4.3.3](https://github.com/tsparticles/tsparticles/compare/v4.3.2...v4.3.3) (2026-07-23)
13
17
 
@@ -25,7 +29,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
25
29
 
26
30
  ### Bug Fixes
27
31
 
28
- * fixed angular confetti ([6f25a4a](https://github.com/tsparticles/tsparticles/commit/6f25a4a1eaa69c47f2668316e7b396fe55195f84))
32
+ - fixed angular confetti ([6f25a4a](https://github.com/tsparticles/tsparticles/commit/6f25a4a1eaa69c47f2668316e7b396fe55195f84))
29
33
 
30
34
  ## [4.2.1](https://github.com/tsparticles/tsparticles/compare/v4.2.0...v4.2.1) (2026-06-18)
31
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/template-landing",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -18,12 +18,12 @@
18
18
  "prepack": "pnpm run build"
19
19
  },
20
20
  "dependencies": {
21
- "@tsparticles/configs": "4.4.0",
22
- "@tsparticles/engine": "4.4.0",
23
- "@tsparticles/slim": "4.4.0"
21
+ "@tsparticles/configs": "4.5.0",
22
+ "@tsparticles/engine": "4.5.0",
23
+ "@tsparticles/slim": "4.5.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "fs-extra": "^11.3.4"
27
27
  },
28
- "gitHead": "b7e605098d6ea937d5068c06542671d4891070e4"
28
+ "gitHead": "a637373a03c008ab38edaaecf6524ec4b8e332c0"
29
29
  }
@@ -52,7 +52,7 @@ fs.readFile(libPackage, function (error, data) {
52
52
  }
53
53
  }
54
54
 
55
- fs.writeFile(libPackage, JSON.stringify(libObj, undefined, 2), "utf-8", function () {
55
+ fs.writeFile(libPackage, `${JSON.stringify(libObj, undefined, 2)}\n`, "utf-8", function () {
56
56
  console.log("template.json dependencies updated successfully");
57
57
  });
58
58
  });
@@ -11,24 +11,24 @@
11
11
  "watch": "ng build --watch --configuration development"
12
12
  },
13
13
  "dependencies": {
14
- "@angular/animations": "~22.0.0",
15
- "@angular/common": "~22.0.0",
16
- "@angular/compiler": "~22.0.0",
17
- "@angular/core": "~22.0.0",
18
- "@angular/forms": "~22.0.0",
19
- "@angular/platform-browser": "~22.0.0",
20
- "@angular/platform-browser-dynamic": "~22.0.0",
21
- "@angular/router": "~22.0.0",
22
- "@tsparticles/angular": "^4.1.3",
23
- "@tsparticles/slim": "^4.0.0",
14
+ "@angular/animations": "~22.2.2",
15
+ "@angular/common": "~22.2.2",
16
+ "@angular/compiler": "~22.2.2",
17
+ "@angular/core": "~22.2.2",
18
+ "@angular/forms": "~22.2.2",
19
+ "@angular/platform-browser": "~22.2.2",
20
+ "@angular/platform-browser-dynamic": "~22.2.2",
21
+ "@angular/router": "~22.2.2",
22
+ "@tsparticles/angular": "^4.4.0",
23
+ "@tsparticles/slim": "^4.4.0",
24
24
  "rxjs": "~7.8.2",
25
25
  "tslib": "^2.8.1",
26
- "zone.js": "~0.16.2"
26
+ "zone.js": "~0.16.3"
27
27
  },
28
28
  "devDependencies": {
29
- "@angular-devkit/build-angular": "~22.0.0",
30
- "@angular/cli": "~22.0.0",
31
- "@angular/compiler-cli": "~22.0.0",
29
+ "@angular-devkit/build-angular": "~22.2.2",
30
+ "@angular/cli": "~22.2.2",
31
+ "@angular/compiler-cli": "~22.2.2",
32
32
  "typescript": "~6.0.3"
33
33
  }
34
34
  }
@@ -4,6 +4,7 @@ import { loadSlim } from "@tsparticles/slim";
4
4
  import type { ISourceOptions } from "@tsparticles/engine";
5
5
 
6
6
  @Component({
7
+ standalone: false,
7
8
  selector: "app-root",
8
9
  templateUrl: "./app.component.html",
9
10
  styleUrls: ["./app.component.css"],
@@ -11,26 +11,26 @@
11
11
  "watch": "ng build --watch --configuration development"
12
12
  },
13
13
  "dependencies": {
14
- "@angular/animations": "~22.0.1",
15
- "@angular/common": "~22.0.1",
16
- "@angular/compiler": "~22.0.1",
17
- "@angular/core": "~22.0.0",
18
- "@angular/forms": "~22.0.0",
19
- "@angular/platform-browser": "~22.0.0",
20
- "@angular/platform-browser-dynamic": "~22.0.0",
21
- "@angular/router": "~22.0.0",
22
- "@tsparticles/configs": "^4.1.3",
23
- "@tsparticles/engine": "^4.1.3",
24
- "@tsparticles/slim": "^4.1.3",
25
- "angular-confetti": "^4.1.3",
14
+ "@angular/animations": "~22.2.2",
15
+ "@angular/common": "~22.2.2",
16
+ "@angular/compiler": "~22.2.2",
17
+ "@angular/core": "~22.2.2",
18
+ "@angular/forms": "~22.2.2",
19
+ "@angular/platform-browser": "~22.2.2",
20
+ "@angular/platform-browser-dynamic": "~22.2.2",
21
+ "@angular/router": "~22.2.2",
22
+ "@tsparticles/angular": "^4.4.0",
23
+ "@tsparticles/configs": "^4.4.0",
24
+ "@tsparticles/engine": "^4.4.0",
25
+ "@tsparticles/slim": "^4.4.0",
26
26
  "rxjs": "~7.8.2",
27
27
  "tslib": "^2.8.1",
28
- "zone.js": "~0.16.2"
28
+ "zone.js": "~0.16.3"
29
29
  },
30
30
  "devDependencies": {
31
- "@angular-devkit/build-angular": "~22.0.0",
32
- "@angular/cli": "~22.0.0",
33
- "@angular/compiler-cli": "~22.0.0",
31
+ "@angular-devkit/build-angular": "~22.2.2",
32
+ "@angular/cli": "~22.2.2",
33
+ "@angular/compiler-cli": "~22.2.2",
34
34
  "typescript": "~6.0.3"
35
35
  }
36
36
  }
@@ -1,4 +1,4 @@
1
- <ngx-confetti id="tsparticles" [options]="options"></ngx-confetti>
1
+ <ngx-particles id="tsparticles" [options]="options" />
2
2
  <section id="hero" class="section">
3
3
  <div class="hero-content">
4
4
  <h1>Build Faster.<br /><span class="gradient-text">Go Further.</span></h1>
@@ -1,12 +1,17 @@
1
- import { Component } from "@angular/core";
1
+ import { Component, OnInit } from "@angular/core";
2
+ import { NgParticlesService } from "@tsparticles/angular";
3
+ import { loadSlim } from "@tsparticles/slim";
2
4
  import type { ISourceOptions } from "@tsparticles/engine";
3
5
 
4
6
  @Component({
7
+ standalone: false,
5
8
  selector: "app-root",
6
9
  templateUrl: "./app.component.html",
7
10
  styleUrls: ["./app.component.css"],
8
11
  })
9
- export class AppComponent {
12
+ export class AppComponent implements OnInit {
13
+ constructor(private readonly ngParticlesService: NgParticlesService) {}
14
+
10
15
  title = "{{projectName}}";
11
16
 
12
17
  options: ISourceOptions = {
@@ -46,4 +51,10 @@ export class AppComponent {
46
51
  { text: "This platform transformed how our team ships features. Absolutely love it.", author: "Sarah K., CTO" },
47
52
  { text: "The best investment we made this year. The performance gains are incredible.", author: "Michael R., Developer" },
48
53
  ];
54
+
55
+ ngOnInit(): void {
56
+ void this.ngParticlesService.init(async (engine) => {
57
+ await loadSlim(engine);
58
+ });
59
+ }
49
60
  }
@@ -11,26 +11,26 @@
11
11
  "watch": "ng build --watch --configuration development"
12
12
  },
13
13
  "dependencies": {
14
- "@angular/animations": "~22.0.1",
15
- "@angular/common": "~22.0.1",
16
- "@angular/compiler": "~22.0.1",
17
- "@angular/core": "~22.0.0",
18
- "@angular/forms": "~22.0.0",
19
- "@angular/platform-browser": "~22.0.0",
20
- "@angular/platform-browser-dynamic": "~22.0.0",
21
- "@angular/router": "~22.0.0",
22
- "@tsparticles/engine": "^4.1.3",
23
- "@tsparticles/slim": "^4.1.3",
24
- "@tsparticles/configs": "^4.1.3",
25
- "angular-fireworks": "^4.1.3",
14
+ "@angular/animations": "~22.2.2",
15
+ "@angular/common": "~22.2.2",
16
+ "@angular/compiler": "~22.2.2",
17
+ "@angular/core": "~22.2.2",
18
+ "@angular/forms": "~22.2.2",
19
+ "@angular/platform-browser": "~22.2.2",
20
+ "@angular/platform-browser-dynamic": "~22.2.2",
21
+ "@angular/router": "~22.2.2",
22
+ "@tsparticles/angular": "^4.4.0",
23
+ "@tsparticles/configs": "^4.4.0",
24
+ "@tsparticles/engine": "^4.4.0",
25
+ "@tsparticles/slim": "^4.4.0",
26
26
  "rxjs": "~7.8.2",
27
27
  "tslib": "^2.8.1",
28
- "zone.js": "~0.16.2"
28
+ "zone.js": "~0.16.3"
29
29
  },
30
30
  "devDependencies": {
31
- "@angular-devkit/build-angular": "~22.0.0",
32
- "@angular/cli": "~22.0.0",
33
- "@angular/compiler-cli": "~22.0.0",
31
+ "@angular-devkit/build-angular": "~22.2.2",
32
+ "@angular/cli": "~22.2.2",
33
+ "@angular/compiler-cli": "~22.2.2",
34
34
  "typescript": "~6.0.3"
35
35
  }
36
36
  }
@@ -1,4 +1,4 @@
1
- <ngx-fireworks id="tsparticles" [options]="options"></ngx-fireworks>
1
+ <ngx-particles id="tsparticles" [options]="options" />
2
2
  <section id="hero" class="section">
3
3
  <div class="hero-content">
4
4
  <h1>Build Faster.<br /><span class="gradient-text">Go Further.</span></h1>
@@ -1,12 +1,17 @@
1
- import { Component } from "@angular/core";
1
+ import { Component, OnInit } from "@angular/core";
2
+ import { NgParticlesService } from "@tsparticles/angular";
3
+ import { loadSlim } from "@tsparticles/slim";
2
4
  import type { ISourceOptions } from "@tsparticles/engine";
3
5
 
4
6
  @Component({
7
+ standalone: false,
5
8
  selector: "app-root",
6
9
  templateUrl: "./app.component.html",
7
10
  styleUrls: ["./app.component.css"],
8
11
  })
9
- export class AppComponent {
12
+ export class AppComponent implements OnInit {
13
+ constructor(private readonly ngParticlesService: NgParticlesService) {}
14
+
10
15
  title = "{{projectName}}";
11
16
 
12
17
  options: ISourceOptions = {
@@ -46,4 +51,10 @@ export class AppComponent {
46
51
  { text: "This platform transformed how our team ships features. Absolutely love it.", author: "Sarah K., CTO" },
47
52
  { text: "The best investment we made this year. The performance gains are incredible.", author: "Michael R., Developer" },
48
53
  ];
54
+
55
+ ngOnInit(): void {
56
+ void this.ngParticlesService.init(async (engine) => {
57
+ await loadSlim(engine);
58
+ });
59
+ }
49
60
  }
@@ -9,13 +9,13 @@
9
9
  "preview": "astro preview"
10
10
  },
11
11
  "dependencies": {
12
- "astro": "^5.0.0",
13
- "@tsparticles/engine": "^4.1.3",
14
- "@tsparticles/slim": "^4.1.3",
15
- "@tsparticles/configs": "^4.1.3",
16
- "@tsparticles/astro": "^4.1.3"
12
+ "astro": "^7.3.2",
13
+ "@tsparticles/engine": "^4.4.0",
14
+ "@tsparticles/slim": "^4.4.0",
15
+ "@tsparticles/configs": "^4.4.0",
16
+ "@tsparticles/astro": "^4.4.0"
17
17
  },
18
18
  "devDependencies": {
19
- "@astrojs/check": "^0.9.0"
19
+ "@astrojs/check": "^0.9.10"
20
20
  }
21
21
  }
@@ -134,10 +134,12 @@ const options: ISourceOptions = {
134
134
  </div>
135
135
  </footer>
136
136
  <script>
137
+ import { initParticlesEngine } from "@tsparticles/astro";
137
138
  import { loadSlim } from "@tsparticles/slim";
138
- import { tsParticles } from "@tsparticles/engine";
139
139
 
140
- await loadSlim(tsParticles);
140
+ await initParticlesEngine(async (engine) => {
141
+ await loadSlim(engine);
142
+ });
141
143
  </script>
142
144
  </body>
143
145
  </html>
@@ -3,17 +3,37 @@
3
3
  "private": true,
4
4
  "version": "1.0.0",
5
5
  "scripts": {
6
+ "dev": "ember serve",
6
7
  "build": "ember build",
7
- "serve": "ember serve"
8
+ "preview": "ember serve"
9
+ },
10
+ "devDependencies": {
11
+ "@ember/optional-features": "^3.0.0",
12
+ "@glimmer/component": "^2.1.1",
13
+ "@glimmer/tracking": "^1.1.2",
14
+ "broccoli-asset-rev": "^3.0.0",
15
+ "ember-auto-import": "^2.13.1",
16
+ "ember-cli": "~6.12.0",
17
+ "ember-cli-babel": "^8.3.1",
18
+ "ember-cli-htmlbars": "^7.0.1",
19
+ "ember-cli-inject-live-reload": "^2.1.0",
20
+ "ember-cli-sri": "^2.1.1",
21
+ "ember-cli-terser": "^4.0.2",
22
+ "ember-load-initializers": "^3.0.1",
23
+ "ember-modifier": "^4.3.0",
24
+ "ember-resolver": "^13.2.0",
25
+ "ember-source": "~6.12.0",
26
+ "loader.js": "^4.7.0",
27
+ "typescript": "^6.0.3",
28
+ "webpack": "^5.106.1"
8
29
  },
9
30
  "dependencies": {
10
- "ember-source": "^5.12.0",
11
- "@tsparticles/engine": "^4.1.3",
12
- "@tsparticles/slim": "^4.1.3",
13
- "@tsparticles/configs": "^4.1.3",
14
- "@tsparticles/ember": "^4.1.3"
31
+ "@tsparticles/configs": "^4.4.0",
32
+ "@tsparticles/ember": "^4.4.0",
33
+ "@tsparticles/engine": "^4.4.0",
34
+ "@tsparticles/slim": "^4.4.0"
15
35
  },
16
- "devDependencies": {
17
- "ember-cli": "^6.0.0"
36
+ "ember": {
37
+ "edition": "octane"
18
38
  }
19
39
  }
@@ -9,15 +9,15 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "inferno": "^8.2.5",
13
- "@tsparticles/engine": "^4.1.3",
14
- "@tsparticles/slim": "^4.1.3",
15
- "@tsparticles/configs": "^4.1.3",
16
- "@tsparticles/inferno": "^4.1.3"
12
+ "inferno": "^9.1.0",
13
+ "inferno-create-element": "^9.1.0",
14
+ "@tsparticles/engine": "^4.4.0",
15
+ "@tsparticles/slim": "^4.4.0",
16
+ "@tsparticles/configs": "^4.4.0",
17
+ "@tsparticles/inferno": "^4.4.0"
17
18
  },
18
19
  "devDependencies": {
19
20
  "typescript": "^5.7.0",
20
- "vite": "^6.0.0",
21
- "vite-plugin-inferno": "^0.8.4"
21
+ "vite": "^8.3.1"
22
22
  }
23
23
  }
@@ -1,14 +1,15 @@
1
- import Particles, { initParticlesEngine } from "@tsparticles/inferno";
1
+ import { Particles, initParticlesEngine } from "@tsparticles/inferno";
2
2
  import { loadSlim } from "@tsparticles/slim";
3
3
  import type { ISourceOptions } from "@tsparticles/engine";
4
4
  import { Component } from "inferno";
5
5
  import "./App.css";
6
6
 
7
- export default class App extends Component {
8
- constructor(props) {
9
- super(props);
10
- this.state = { init: false };
11
- }
7
+ interface AppState {
8
+ init: boolean;
9
+ }
10
+
11
+ export default class App extends Component<{}, AppState> {
12
+ state = { init: false };
12
13
 
13
14
  componentDidMount() {
14
15
  initParticlesEngine(async (engine) => {
@@ -10,14 +10,14 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "jquery": "^3.7.1",
13
- "@tsparticles/engine": "^4.1.3",
14
- "@tsparticles/slim": "^4.1.3",
15
- "@tsparticles/configs": "^4.1.3",
16
- "@tsparticles/jquery": "^4.1.3"
13
+ "@tsparticles/engine": "^4.4.0",
14
+ "@tsparticles/slim": "^4.4.0",
15
+ "@tsparticles/configs": "^4.4.0",
16
+ "@tsparticles/jquery": "^4.4.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/jquery": "^3.5.32",
20
20
  "typescript": "^5.7.0",
21
- "vite": "^6.0.0"
21
+ "vite": "^8.3.1"
22
22
  }
23
23
  }
@@ -8,9 +8,7 @@ $(() => {
8
8
  await loadSlim(engine);
9
9
  });
10
10
 
11
- $.particles().load({
12
- id: "tsparticles",
13
- options: {
11
+ $("#tsparticles").particles().load({
14
12
  fullScreen: { enable: true, zIndex: -1 },
15
13
  background: { color: { value: "#080818" } },
16
14
  fpsLimit: 60,
@@ -45,7 +43,6 @@ $(() => {
45
43
  },
46
44
  },
47
45
  detectRetina: true,
48
- },
49
46
  });
50
47
  });
51
48
 
@@ -10,13 +10,13 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "lit": "^3.2.0",
13
- "@tsparticles/engine": "^4.1.3",
14
- "@tsparticles/slim": "^4.1.3",
15
- "@tsparticles/configs": "^4.1.3",
16
- "@tsparticles/lit": "^4.1.3"
13
+ "@tsparticles/engine": "^4.4.0",
14
+ "@tsparticles/slim": "^4.4.0",
15
+ "@tsparticles/configs": "^4.4.0",
16
+ "@tsparticles/lit": "^4.4.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "typescript": "^5.7.0",
20
- "vite": "^6.0.0"
20
+ "vite": "^8.3.1"
21
21
  }
22
22
  }
@@ -11,9 +11,15 @@
11
11
  "next": "^15.0.0",
12
12
  "react": "^19.2.5",
13
13
  "react-dom": "^19.2.5",
14
- "@tsparticles/engine": "^4.1.3",
15
- "@tsparticles/slim": "^4.1.3",
16
- "@tsparticles/configs": "^4.1.3",
17
- "@tsparticles/nextjs": "^4.1.3"
14
+ "@tsparticles/engine": "^4.4.0",
15
+ "@tsparticles/slim": "^4.4.0",
16
+ "@tsparticles/configs": "^4.4.0",
17
+ "@tsparticles/nextjs": "^4.4.0"
18
+ },
19
+ "devDependencies": {
20
+ "@types/node": "^24.10.1",
21
+ "@types/react": "^19.2.14",
22
+ "@types/react-dom": "^19.2.3",
23
+ "typescript": "^6.0.3"
18
24
  }
19
25
  }
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import NextParticles from "@tsparticles/nextjs";
3
+ import { NextParticles } from "@tsparticles/nextjs";
4
4
  import type { ISourceOptions } from "@tsparticles/engine";
5
5
  import { ParticlesProvider } from "./providers";
6
6
 
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
 
3
- import { initParticlesEngine } from "@tsparticles/nextjs";
3
+ import { NextParticlesProvider } from "@tsparticles/nextjs";
4
4
  import { loadSlim } from "@tsparticles/slim";
5
- import { useEffect, type ReactNode } from "react";
5
+ import type { Engine } from "@tsparticles/engine";
6
6
 
7
- export function ParticlesProvider({ children }: { children: ReactNode }) {
8
- useEffect(() => {
9
- initParticlesEngine(async (engine) => {
10
- await loadSlim(engine);
11
- });
12
- }, []);
13
-
14
- return <>{children}</>;
7
+ export function ParticlesProvider({ children }: { children: React.ReactNode }) {
8
+ return (
9
+ <NextParticlesProvider init={async (engine: Engine): Promise<void> => { await loadSlim(engine); }}>
10
+ {children}
11
+ </NextParticlesProvider>
12
+ );
15
13
  }
14
+
15
+ export default ParticlesProvider;
@@ -8,10 +8,19 @@
8
8
  "generate": "nuxt generate"
9
9
  },
10
10
  "dependencies": {
11
- "nuxt": "^2.19.0",
12
- "@tsparticles/engine": "^4.1.3",
13
- "@tsparticles/slim": "^4.1.3",
14
- "@tsparticles/configs": "^4.1.3",
15
- "@tsparticles/nuxt2": "^4.1.3"
11
+ "nuxt": "^2.18.1",
12
+ "@tsparticles/engine": "^4.4.0",
13
+ "@tsparticles/slim": "^4.4.0",
14
+ "@tsparticles/configs": "^4.4.0",
15
+ "@tsparticles/nuxt2": "^4.4.0"
16
+ },
17
+ "browserslist": [
18
+ "chrome 58",
19
+ "edge 16",
20
+ "firefox 57",
21
+ "safari 11"
22
+ ],
23
+ "devDependencies": {
24
+ "@babel/preset-env": "^7.29.0"
16
25
  }
17
26
  }
@@ -10,9 +10,9 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "nuxt": "^3.16.0",
13
- "@tsparticles/engine": "^4.1.3",
14
- "@tsparticles/slim": "^4.1.3",
15
- "@tsparticles/configs": "^4.1.3",
16
- "@tsparticles/nuxt3": "^4.1.3"
13
+ "@tsparticles/engine": "^4.4.0",
14
+ "@tsparticles/slim": "^4.4.0",
15
+ "@tsparticles/configs": "^4.4.0",
16
+ "@tsparticles/nuxt3": "^4.4.0"
17
17
  }
18
18
  }
@@ -10,9 +10,9 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "nuxt": "^4.0.0",
13
- "@tsparticles/engine": "^4.1.3",
14
- "@tsparticles/slim": "^4.1.3",
15
- "@tsparticles/configs": "^4.1.3",
16
- "@tsparticles/nuxt4": "^4.1.3"
13
+ "@tsparticles/engine": "^4.4.0",
14
+ "@tsparticles/slim": "^4.4.0",
15
+ "@tsparticles/configs": "^4.4.0",
16
+ "@tsparticles/nuxt4": "^4.4.0"
17
17
  }
18
18
  }
@@ -10,14 +10,14 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "preact": "^10.26.0",
13
- "@tsparticles/engine": "^4.1.3",
14
- "@tsparticles/slim": "^4.1.3",
15
- "@tsparticles/configs": "^4.1.3",
16
- "@tsparticles/preact": "^4.1.3"
13
+ "@tsparticles/engine": "^4.4.0",
14
+ "@tsparticles/slim": "^4.4.0",
15
+ "@tsparticles/configs": "^4.4.0",
16
+ "@tsparticles/preact": "^4.4.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@preact/preset-vite": "^2.10.0",
20
20
  "typescript": "^5.7.0",
21
- "vite": "^6.0.0"
21
+ "vite": "^8.3.1"
22
22
  }
23
23
  }
@@ -1,19 +1,14 @@
1
- import Particles from "@tsparticles/preact";
1
+ import Particles, { initParticlesEngine } from "@tsparticles/preact";
2
2
  import { loadSlim } from "@tsparticles/slim";
3
- import type { Engine, ISourceOptions } from "@tsparticles/engine";
4
- import { useEffect, useState } from "preact/hooks";
3
+ import type { ISourceOptions } from "@tsparticles/engine";
4
+ import { useEffect } from "preact/hooks";
5
5
  import "./App.css";
6
6
 
7
7
  export default function App() {
8
- const [init, setInit] = useState(false);
9
-
10
8
  useEffect(() => {
11
- async function initEngine() {
12
- const engine = {} as Engine;
9
+ void initParticlesEngine(async (engine) => {
13
10
  await loadSlim(engine);
14
- setInit(true);
15
- }
16
- initEngine();
11
+ });
17
12
  }, []);
18
13
 
19
14
  const options: ISourceOptions = {
@@ -10,13 +10,13 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@builder.io/qwik": "^1.12.0",
13
- "@tsparticles/engine": "^4.1.3",
14
- "@tsparticles/slim": "^4.1.3",
15
- "@tsparticles/configs": "^4.1.3",
16
- "@tsparticles/qwik": "^4.1.3"
13
+ "@tsparticles/engine": "^4.4.0",
14
+ "@tsparticles/slim": "^4.4.0",
15
+ "@tsparticles/configs": "^4.4.0",
16
+ "@tsparticles/qwik": "^4.4.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "typescript": "^5.7.0",
20
- "vite": "^6.0.0"
20
+ "vite": "^7.3.6"
21
21
  }
22
22
  }
@@ -11,9 +11,11 @@
11
11
  "dependencies": {
12
12
  "react": "^19.2.5",
13
13
  "react-dom": "^19.2.5",
14
- "@tsparticles/react": "^4.1.3"
14
+ "@tsparticles/react": "^4.4.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@vitejs/plugin-react": "^6.0.1"
17
+ "@vitejs/plugin-react": "^6.0.1",
18
+ "@types/react": "^19.2.14",
19
+ "@types/react-dom": "^19.2.3"
18
20
  }
19
21
  }
@@ -9,14 +9,15 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "riot": "^9.7.0",
13
- "@tsparticles/engine": "^4.1.3",
14
- "@tsparticles/slim": "^4.1.3",
15
- "@tsparticles/configs": "^4.1.3",
16
- "@tsparticles/riot": "^4.1.3"
12
+ "riot": "^10.1.6",
13
+ "@tsparticles/engine": "^4.4.0",
14
+ "@tsparticles/slim": "^4.4.0",
15
+ "@tsparticles/configs": "^4.4.0",
16
+ "@tsparticles/riot": "^4.4.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "rollup-plugin-riot": "^9.0.0",
20
- "vite": "^6.0.0"
20
+ "vite": "^8.3.1",
21
+ "@riotjs/compiler": "^10.0.4"
21
22
  }
22
23
  }
@@ -10,9 +10,9 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "solid-js": "^1.8.11",
13
- "@tsparticles/solid": "^4.1.3"
13
+ "@tsparticles/solid": "^4.4.0"
14
14
  },
15
15
  "devDependencies": {
16
- "vite-plugin-solid": "^2.8.2"
16
+ "vite-plugin-solid": "^2.11.14"
17
17
  }
18
18
  }
@@ -8,9 +8,9 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@stencil/core": "^4.25.0",
11
- "@tsparticles/engine": "^4.1.3",
12
- "@tsparticles/slim": "^4.1.3",
13
- "@tsparticles/configs": "^4.1.3",
14
- "@tsparticles/stencil": "^4.1.3"
11
+ "@tsparticles/engine": "^4.4.0",
12
+ "@tsparticles/slim": "^4.4.0",
13
+ "@tsparticles/configs": "^4.4.0",
14
+ "@tsparticles/stencil": "^4.4.0"
15
15
  }
16
16
  }
@@ -9,7 +9,7 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@tsparticles/svelte": "^4.1.3"
12
+ "@tsparticles/svelte": "^4.4.0"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
@@ -9,13 +9,13 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "vue": "^2.7.16",
12
- "@tsparticles/engine": "^4.1.3",
13
- "@tsparticles/slim": "^4.1.3",
14
- "@tsparticles/configs": "^4.1.3",
15
- "@tsparticles/vue2": "^4.1.3"
12
+ "@tsparticles/engine": "^4.4.0",
13
+ "@tsparticles/slim": "^4.4.0",
14
+ "@tsparticles/configs": "^4.4.0",
15
+ "@tsparticles/vue2": "^4.4.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@vitejs/plugin-vue2": "^2.3.3",
19
- "vite": "^6.0.0"
18
+ "@vitejs/plugin-vue2": "^2.3.4",
19
+ "vite": "^7.3.6"
20
20
  }
21
21
  }
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "vue": "^3.5.32",
13
- "@tsparticles/vue3": "^4.1.3"
13
+ "@tsparticles/vue3": "^4.4.0"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@vitejs/plugin-vue": "^6.0.5",
@@ -9,13 +9,13 @@
9
9
  "preview": "vite preview"
10
10
  },
11
11
  "dependencies": {
12
- "@tsparticles/engine": "^4.1.3",
13
- "@tsparticles/slim": "^4.1.3",
14
- "@tsparticles/configs": "^4.1.3",
15
- "@tsparticles/webcomponents": "^4.1.3"
12
+ "@tsparticles/engine": "^4.4.0",
13
+ "@tsparticles/slim": "^4.4.0",
14
+ "@tsparticles/configs": "^4.4.0",
15
+ "@tsparticles/webcomponents": "^4.4.0"
16
16
  },
17
17
  "devDependencies": {
18
18
  "typescript": "^5.7.0",
19
- "vite": "^6.0.0"
19
+ "vite": "^8.3.1"
20
20
  }
21
21
  }
@@ -1,51 +1,53 @@
1
1
  import "./style.css";
2
2
  import { tsParticles } from "@tsparticles/engine";
3
3
  import { loadSlim } from "@tsparticles/slim";
4
- import "@tsparticles/webcomponents";
4
+ import { defineParticlesElement, initParticlesEngine } from "@tsparticles/webcomponents";
5
+ import type { ISourceOptions } from "@tsparticles/engine";
5
6
 
6
- (async () => {
7
- await loadSlim(tsParticles);
7
+ globalThis.tsParticles = tsParticles;
8
8
 
9
- await tsParticles.load({
10
- id: "tsparticles",
11
- options: {
12
- fullScreen: { enable: true, zIndex: -1 },
13
- background: { color: { value: "#080818" } },
14
- fpsLimit: 60,
15
- particles: {
16
- number: { value: 100, density: { enable: true } },
17
- color: { value: ["#6c5ce7", "#00cec9", "#fd79a8", "#ffeaa7"] },
18
- shape: { type: "circle" },
19
- opacity: { value: 0.4, random: true },
20
- size: { value: { min: 1, max: 4 }, random: true },
21
- links: {
22
- enable: true,
23
- distance: 150,
24
- color: "#6c5ce7",
25
- opacity: 0.15,
26
- width: 1,
27
- },
28
- move: {
29
- enable: true,
30
- speed: 1.5,
31
- direction: "none",
32
- random: true,
33
- straight: false,
34
- outModes: { default: "out" },
35
- },
36
- },
37
- interactivity: {
38
- events: {
39
- onHover: { enable: true, mode: "grab" },
40
- },
41
- modes: {
42
- grab: { distance: 200, links: { opacity: 0.5 } },
43
- },
44
- },
45
- detectRetina: true,
9
+ void initParticlesEngine(async (engine) => {
10
+ await loadSlim(engine);
11
+ });
12
+
13
+ defineParticlesElement();
14
+
15
+ const options: ISourceOptions = {
16
+ fullScreen: { enable: true, zIndex: -1 },
17
+ background: { color: { value: "#080818" } },
18
+ fpsLimit: 60,
19
+ particles: {
20
+ number: { value: 100, density: { enable: true } },
21
+ color: { value: ["#6c5ce7", "#00cec9", "#fd79a8", "#ffeaa7"] },
22
+ shape: { type: "circle" },
23
+ opacity: { value: 0.4, random: true },
24
+ size: { value: { min: 1, max: 4 }, random: true },
25
+ links: {
26
+ enable: true,
27
+ distance: 150,
28
+ color: "#6c5ce7",
29
+ opacity: 0.15,
30
+ width: 1,
31
+ },
32
+ move: {
33
+ enable: true,
34
+ speed: 1.5,
35
+ direction: "none",
36
+ random: true,
37
+ straight: false,
38
+ outModes: { default: "out" },
39
+ },
40
+ },
41
+ interactivity: {
42
+ events: {
43
+ onHover: { enable: true, mode: "grab" },
46
44
  },
47
- });
48
- })();
45
+ modes: {
46
+ grab: { distance: 200, links: { opacity: 0.5 } },
47
+ },
48
+ },
49
+ detectRetina: true,
50
+ };
49
51
 
50
52
  document.body.innerHTML = `
51
53
  <web-particles id="tsparticles"></web-particles>
@@ -158,3 +160,7 @@ document.body.innerHTML = `
158
160
  </div>
159
161
  </footer>
160
162
  `;
163
+
164
+ const particlesEl = document.getElementById("tsparticles");
165
+
166
+ (particlesEl as unknown as { options: ISourceOptions }).options = options;
package/template.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "package": {
3
3
  "dependencies": {
4
- "@tsparticles/engine": "^4.4.0",
5
- "@tsparticles/slim": "^4.4.0",
6
- "@tsparticles/configs": "^4.4.0"
4
+ "@tsparticles/engine": "^4.5.0",
5
+ "@tsparticles/slim": "^4.5.0",
6
+ "@tsparticles/configs": "^4.5.0"
7
7
  },
8
8
  "devDependencies": {
9
9
  "typescript": "^6.0.3",
10
- "vite": "^8.1.0"
10
+ "vite": "^8.3.1"
11
11
  }
12
12
  }
13
- }
13
+ }