@tsparticles/angular 3.0.0 → 4.0.0-beta.15

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
@@ -10,152 +10,117 @@ Official [tsParticles](https://github.com/matteobruni/tsparticles) Angular compo
10
10
 
11
11
  [![tsParticles Product Hunt](https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=186113&theme=light)](https://www.producthunt.com/posts/tsparticles?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-tsparticles") <a href="https://www.buymeacoffee.com/matteobruni"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a beer&emoji=🍺&slug=matteobruni&button_colour=5F7FFF&font_colour=ffffff&font_family=Arial&outline_colour=000000&coffee_colour=FFDD00"></a>
12
12
 
13
- ## How to use it
14
-
15
- ### Install
13
+ ## Installation
16
14
 
17
15
  ```shell
18
- $ npm install @tsparticles/angular @tsparticles/engine
16
+ npm install @tsparticles/angular @tsparticles/engine
19
17
  ```
20
18
 
21
19
  or
22
20
 
23
21
  ```shell
24
- $ yarn add @tsparticles/angular @tsparticles/engine
22
+ yarn add @tsparticles/angular @tsparticles/engine
25
23
  ```
26
24
 
27
- ### Usage
25
+ ## How to use
28
26
 
29
- _template.html_
27
+ ### Initialize once
30
28
 
31
- ```html
32
- <ngx-particles [id]="id" [options]="particlesOptions" (particlesLoaded)="particlesLoaded($event)"></ngx-particles>
29
+ Call `NgParticlesService.init(...)` once in your app lifecycle before rendering `<ngx-particles />`.
33
30
 
34
- <!-- or -->
35
-
36
- <ngx-particles [id]="id" [url]="particlesUrl" (particlesLoaded)="particlesLoaded($event)"></ngx-particles>
37
- ```
38
-
39
- _app.ts_
40
-
41
- ```typescript
42
- import { MoveDirection, ClickMode, HoverMode, OutMode } from "@tsparticles/engine";
43
- //import { loadFull } from "tsparticles"; // if you are going to use `loadFull`, install the "tsparticles" package too.
44
- import { loadSlim } from "@tsparticles/slim"; // if you are going to use `loadSlim`, install the "@tsparticles/slim" package too.
31
+ ```ts
32
+ import { Component, OnInit } from "@angular/core";
33
+ import type { Container, ISourceOptions } from "@tsparticles/engine";
34
+ import { ClickMode, HoverMode } from "@tsparticles/engine";
45
35
  import { NgParticlesService } from "@tsparticles/angular";
36
+ import { loadSlim } from "@tsparticles/slim";
46
37
 
47
- export class AppComponent {
48
- id = "tsparticles";
49
-
50
- /* Starting from 1.19.0 you can use a remote url (AJAX request) to a JSON with the configuration */
51
- particlesUrl = "http://foo.bar/particles.json";
52
-
53
- /* or the classic JavaScript object */
54
- particlesOptions = {
55
- background: {
56
- color: {
57
- value: "#0d47a1",
58
- },
38
+ @Component({
39
+ selector: "app-root",
40
+ templateUrl: "./app.component.html",
41
+ })
42
+ export class AppComponent implements OnInit {
43
+ id = "tsparticles";
44
+
45
+ particlesOptions: ISourceOptions = {
46
+ background: {
47
+ color: {
48
+ value: "#0d47a1",
49
+ },
50
+ },
51
+ fpsLimit: 120,
52
+ interactivity: {
53
+ events: {
54
+ onClick: {
55
+ enable: true,
56
+ mode: ClickMode.push,
57
+ },
58
+ onHover: {
59
+ enable: true,
60
+ mode: HoverMode.repulse,
59
61
  },
60
- fpsLimit: 120,
61
- interactivity: {
62
- events: {
63
- onClick: {
64
- enable: true,
65
- mode: ClickMode.push,
66
- },
67
- onHover: {
68
- enable: true,
69
- mode: HoverMode.repulse,
70
- },
71
- resize: true,
72
- },
73
- modes: {
74
- push: {
75
- quantity: 4,
76
- },
77
- repulse: {
78
- distance: 200,
79
- duration: 0.4,
80
- },
81
- },
62
+ },
63
+ modes: {
64
+ push: {
65
+ quantity: 4,
82
66
  },
83
- particles: {
84
- color: {
85
- value: "#ffffff",
86
- },
87
- links: {
88
- color: "#ffffff",
89
- distance: 150,
90
- enable: true,
91
- opacity: 0.5,
92
- width: 1,
93
- },
94
- move: {
95
- direction: MoveDirection.none,
96
- enable: true,
97
- outModes: {
98
- default: OutMode.bounce,
99
- },
100
- random: false,
101
- speed: 6,
102
- straight: false,
103
- },
104
- number: {
105
- density: {
106
- enable: true,
107
- area: 800,
108
- },
109
- value: 80,
110
- },
111
- opacity: {
112
- value: 0.5,
113
- },
114
- shape: {
115
- type: "circle",
116
- },
117
- size: {
118
- value: { min: 1, max: 5 },
119
- },
67
+ repulse: {
68
+ distance: 200,
69
+ duration: 0.4,
120
70
  },
121
- detectRetina: true,
122
- };
123
-
124
- constructor(private readonly ngParticlesService: NgParticlesService) {}
125
-
126
- ngOnInit(): void {
127
- this.ngParticlesService.init(async () => {
128
- console.log(engine);
129
-
130
- // Starting from 1.19.0 you can add custom presets or shape here, using the current tsParticles instance (main)
131
- // this loads the tsparticles package bundle, it's the easiest method for getting everything ready
132
- // starting from v2 you can add only the features you need reducing the bundle size
133
- //await loadFull(engine);
134
- await loadSlim(engine);
135
- });
136
- }
137
-
138
- particlesLoaded(container: Container): void {
139
- console.log(container);
140
- }
71
+ },
72
+ },
73
+ particles: {
74
+ links: {
75
+ enable: true,
76
+ },
77
+ move: {
78
+ direction: "none",
79
+ enable: true,
80
+ outModes: {
81
+ default: "out",
82
+ },
83
+ },
84
+ number: {
85
+ value: 80,
86
+ },
87
+ },
88
+ };
89
+
90
+ particlesUrl = "https://foo.bar/particles.json";
91
+
92
+ constructor(private readonly ngParticlesService: NgParticlesService) {}
93
+
94
+ public ngOnInit(): void {
95
+ void this.ngParticlesService.init(async engine => {
96
+ await loadSlim(engine);
97
+ });
98
+ }
99
+
100
+ public particlesLoaded(container: Container): void {
101
+ console.log(container);
102
+ }
141
103
  }
142
104
  ```
143
105
 
144
- _app.module.ts_
106
+ ### Template usage
145
107
 
146
- ```typescript
147
- import { NgxParticlesModule } from "@tsparticles/angular";
108
+ ```html
109
+ <ngx-particles [id]="id" [options]="particlesOptions" (particlesLoaded)="particlesLoaded($event)"></ngx-particles>
110
+
111
+ <!-- or -->
112
+
113
+ <ngx-particles [id]="id" [url]="particlesUrl" (particlesLoaded)="particlesLoaded($event)"></ngx-particles>
114
+ ```
115
+
116
+ ### Module setup
117
+
118
+ ```ts
148
119
  import { NgModule } from "@angular/core";
120
+ import { NgxParticlesModule } from "@tsparticles/angular";
149
121
 
150
122
  @NgModule({
151
- declarations: [
152
- /* AppComponent */
153
- ],
154
- imports: [/* other imports */ NgxParticlesModule /* NgxParticlesModule is required*/],
155
- providers: [],
156
- bootstrap: [
157
- /* AppComponent */
158
- ],
123
+ imports: [NgxParticlesModule],
159
124
  })
160
125
  export class AppModule {}
161
126
  ```
@@ -1,25 +1,55 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, PLATFORM_ID, Component, Inject, Input, Output, NgModule } from '@angular/core';
2
+ import { Injectable, EventEmitter, PLATFORM_ID, Output, Input, Inject, Component, NgModule } from '@angular/core';
3
3
  import { isPlatformServer } from '@angular/common';
4
- import { BehaviorSubject, Subject, mergeMap, takeUntil, from } from 'rxjs';
5
4
  import { tsParticles } from '@tsparticles/engine';
6
5
 
6
+ let initialized = false;
7
+ let initPromise;
8
+ let initCallback;
7
9
  class NgParticlesService {
8
- initialized = new BehaviorSubject(false);
9
- getInstallationStatus() {
10
- return this.initialized.asObservable();
10
+ get loaded() {
11
+ return initialized;
12
+ }
13
+ assertInitialized() {
14
+ if (!initialized) {
15
+ throw new Error("NgParticlesService.init(...) must be called once before rendering ngx-particles components.");
16
+ }
11
17
  }
12
18
  async init(particlesInit) {
13
- await particlesInit(tsParticles);
14
- this.initialized.next(true);
19
+ if (initialized) {
20
+ return;
21
+ }
22
+ if (initPromise) {
23
+ if (initCallback !== particlesInit) {
24
+ throw new Error("NgParticlesService init callback must be stable across the app lifecycle.");
25
+ }
26
+ await initPromise;
27
+ return;
28
+ }
29
+ initCallback = particlesInit;
30
+ initPromise = (async () => {
31
+ if (particlesInit) {
32
+ await particlesInit(tsParticles);
33
+ }
34
+ initialized = true;
35
+ })().catch((error) => {
36
+ initPromise = undefined;
37
+ initCallback = undefined;
38
+ initialized = false;
39
+ throw error;
40
+ });
41
+ await initPromise;
42
+ }
43
+ async waitForInitialization() {
44
+ await (initPromise ?? Promise.resolve());
15
45
  }
16
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgParticlesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
17
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgParticlesService, providedIn: 'root' });
46
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgParticlesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
47
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgParticlesService, providedIn: "root" });
18
48
  }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgParticlesService, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgParticlesService, decorators: [{
20
50
  type: Injectable,
21
51
  args: [{
22
- providedIn: 'root',
52
+ providedIn: "root",
23
53
  }]
24
54
  }] });
25
55
 
@@ -28,52 +58,40 @@ class NgxParticlesComponent {
28
58
  particlesService;
29
59
  options;
30
60
  url;
31
- id;
32
- particlesInit;
61
+ id = "tsparticles";
33
62
  particlesLoaded = new EventEmitter();
34
- subscription;
35
- destroy$ = new Subject();
36
63
  container;
64
+ loadingPromise;
37
65
  constructor(platformId, particlesService) {
38
66
  this.platformId = platformId;
39
67
  this.particlesService = particlesService;
40
- this.id = 'tsparticles';
41
- }
42
- ngOnInit() {
43
- this.subscription = this.particlesService.getInstallationStatus().subscribe(() => {
44
- this.container?.destroy();
45
- this.loadParticles();
46
- });
47
68
  }
48
69
  ngAfterViewInit() {
49
70
  if (isPlatformServer(this.platformId)) {
50
71
  return;
51
72
  }
52
- this.loadParticles();
73
+ this.loadingPromise = this.loadParticles();
53
74
  }
54
75
  ngOnDestroy() {
55
76
  this.container?.destroy();
56
- this.subscription?.unsubscribe();
57
- this.destroy$.next();
77
+ this.loadingPromise = undefined;
58
78
  }
59
- loadParticles() {
60
- const cb = (container) => {
61
- this.container = container;
62
- this.particlesLoaded.emit(container);
63
- };
64
- from(this.particlesInit ? this.particlesInit(tsParticles) : Promise.resolve())
65
- .pipe(mergeMap(() => {
66
- return tsParticles.load({ id: this.id, url: this.url, options: this.options });
67
- }), takeUntil(this.destroy$))
68
- .subscribe(cb);
79
+ async loadParticles() {
80
+ await this.particlesService.waitForInitialization();
81
+ this.particlesService.assertInitialized();
82
+ this.container?.destroy();
83
+ const container = await tsParticles.load({ id: this.id, options: this.options, url: this.url });
84
+ this.container = container;
85
+ this.particlesLoaded.emit(container);
69
86
  }
70
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesComponent, deps: [{ token: PLATFORM_ID }, { token: NgParticlesService }], target: i0.ɵɵFactoryTarget.Component });
71
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: NgxParticlesComponent, selector: "ngx-particles", inputs: { options: "options", url: "url", id: "id", particlesInit: "particlesInit" }, outputs: { particlesLoaded: "particlesLoaded" }, ngImport: i0, template: '<div [id]="id"></div>', isInline: true });
87
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxParticlesComponent, deps: [{ token: PLATFORM_ID }, { token: NgParticlesService }], target: i0.ɵɵFactoryTarget.Component });
88
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NgxParticlesComponent, isStandalone: false, selector: "ngx-particles", inputs: { options: "options", url: "url", id: "id" }, outputs: { particlesLoaded: "particlesLoaded" }, ngImport: i0, template: '<div [id]="id"></div>', isInline: true });
72
89
  }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesComponent, decorators: [{
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxParticlesComponent, decorators: [{
74
91
  type: Component,
75
92
  args: [{
76
- selector: 'ngx-particles',
93
+ selector: "ngx-particles",
94
+ standalone: false,
77
95
  template: '<div [id]="id"></div>',
78
96
  }]
79
97
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -85,18 +103,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImpor
85
103
  type: Input
86
104
  }], id: [{
87
105
  type: Input
88
- }], particlesInit: [{
89
- type: Input
90
106
  }], particlesLoaded: [{
91
107
  type: Output
92
108
  }] } });
93
109
 
94
110
  class NgxParticlesModule {
95
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
96
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesModule, declarations: [NgxParticlesComponent], exports: [NgxParticlesComponent] });
97
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesModule, providers: [NgParticlesService] });
111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxParticlesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
112
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: NgxParticlesModule, declarations: [NgxParticlesComponent], exports: [NgxParticlesComponent] });
113
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxParticlesModule, providers: [NgParticlesService] });
98
114
  }
99
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesModule, decorators: [{
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxParticlesModule, decorators: [{
100
116
  type: NgModule,
101
117
  args: [{
102
118
  declarations: [NgxParticlesComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"tsparticles-angular.mjs","sources":["../../../projects/ng-particles/src/lib/ng-particles.service.ts","../../../projects/ng-particles/src/lib/ng-particles.component.ts","../../../projects/ng-particles/src/lib/ng-particles.module.ts","../../../projects/ng-particles/src/public-api.ts","../../../projects/ng-particles/src/tsparticles-angular.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { Engine, tsParticles } from '@tsparticles/engine';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgParticlesService {\n private initialized = new BehaviorSubject<boolean>(false);\n\n getInstallationStatus() {\n return this.initialized.asObservable();\n }\n\n async init(particlesInit: (engine: Engine) => Promise<void>) {\n await particlesInit(tsParticles);\n\n this.initialized.next(true);\n }\n}\n","import {\n AfterViewInit,\n Component,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { from, mergeMap, Subject, Subscription, takeUntil } from 'rxjs';\nimport { tsParticles } from '@tsparticles/engine';\nimport type { Container, Engine } from '@tsparticles/engine';\nimport { IParticlesProps } from './ng-particles.module';\nimport { NgParticlesService } from './ng-particles.service';\n\n@Component({\n selector: 'ngx-particles',\n template: '<div [id]=\"id\"></div>',\n})\nexport class NgxParticlesComponent implements OnInit, AfterViewInit, OnDestroy {\n @Input() options?: IParticlesProps;\n @Input() url?: string;\n @Input() id: string;\n @Input() particlesInit?: (engine: Engine) => Promise<void>;\n @Output() particlesLoaded: EventEmitter<Container> = new EventEmitter<Container>();\n\n private subscription?: Subscription;\n private destroy$ = new Subject<void>();\n private container?: Container;\n\n constructor(\n @Inject(PLATFORM_ID) protected platformId: string,\n private readonly particlesService: NgParticlesService,\n ) {\n this.id = 'tsparticles';\n }\n\n public ngOnInit() {\n this.subscription = this.particlesService.getInstallationStatus().subscribe(() => {\n this.container?.destroy();\n this.loadParticles();\n });\n }\n\n public ngAfterViewInit(): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n this.loadParticles();\n }\n\n public ngOnDestroy(): void {\n this.container?.destroy();\n this.subscription?.unsubscribe();\n this.destroy$.next();\n }\n\n private loadParticles(): void {\n const cb = (container?: Container) => {\n this.container = container;\n this.particlesLoaded.emit(container);\n };\n\n from(this.particlesInit ? this.particlesInit(tsParticles) : Promise.resolve())\n .pipe(\n mergeMap(() => {\n return tsParticles.load({ id: this.id, url: this.url, options: this.options });\n }),\n takeUntil(this.destroy$),\n )\n .subscribe(cb);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { NgxParticlesComponent } from './ng-particles.component';\nimport type { ISourceOptions } from '@tsparticles/engine';\nimport { NgParticlesService } from './ng-particles.service';\n\n@NgModule({\n declarations: [NgxParticlesComponent],\n exports: [NgxParticlesComponent],\n providers: [NgParticlesService],\n})\nexport class NgxParticlesModule {}\n\nexport type IParticlesProps = ISourceOptions;\nexport { NgParticlesService };\n","/*\n * Public API Surface of ng-particles\n */\n\nexport * from './lib/ng-particles.component';\nexport * from './lib/ng-particles.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NgParticlesService"],"mappings":";;;;;;MAOa,kBAAkB,CAAA;AACnB,IAAA,WAAW,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;IAE1D,qBAAqB,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;KAC1C;IAED,MAAM,IAAI,CAAC,aAAgD,EAAA;AACvD,QAAA,MAAM,aAAa,CAAC,WAAW,CAAC,CAAC;AAEjC,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,I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particles/src/lib/ng-particles.component.ts","../../../projects/ng-particles/src/lib/ng-particles.module.ts","../../../projects/ng-particles/src/public-api.ts","../../../projects/ng-particles/src/tsparticles-angular.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\nimport { Engine, tsParticles } from \"@tsparticles/engine\";\n\nexport type ParticlesPluginRegistrar = (engine: Engine) => Promise<void> | void;\n\nlet initialized = false;\nlet initPromise: Promise<void> | undefined;\nlet initCallback: ParticlesPluginRegistrar | undefined;\n\n@Injectable({\n providedIn: \"root\",\n})\nexport class NgParticlesService {\n public get loaded(): boolean {\n return initialized;\n }\n\n public assertInitialized(): void {\n if (!initialized) {\n throw new Error(\"NgParticlesService.init(...) must be called once before rendering ngx-particles components.\");\n }\n }\n\n public async init(particlesInit?: ParticlesPluginRegistrar): Promise<void> {\n if (initialized) {\n return;\n }\n\n if (initPromise) {\n if (initCallback !== particlesInit) {\n throw new Error(\"NgParticlesService init callback must be stable across the app lifecycle.\");\n }\n\n await initPromise;\n\n return;\n }\n\n initCallback = particlesInit;\n initPromise = (async () => {\n if (particlesInit) {\n await particlesInit(tsParticles);\n }\n\n initialized = true;\n })().catch((error: unknown) => {\n initPromise = undefined;\n initCallback = undefined;\n initialized = false;\n\n throw error;\n });\n\n await initPromise;\n }\n\n public async waitForInitialization(): Promise<void> {\n await (initPromise ?? Promise.resolve());\n }\n}\n","import { AfterViewInit, Component, EventEmitter, Inject, Input, OnDestroy, Output, PLATFORM_ID } from \"@angular/core\";\nimport { isPlatformServer } from \"@angular/common\";\nimport { tsParticles } from \"@tsparticles/engine\";\nimport type { Container } from \"@tsparticles/engine\";\nimport { IParticlesProps } from \"./ng-particles.module\";\nimport { NgParticlesService } from \"./ng-particles.service\";\n\n@Component({\n selector: \"ngx-particles\",\n standalone: false,\n template: '<div [id]=\"id\"></div>',\n})\nexport class NgxParticlesComponent implements AfterViewInit, OnDestroy {\n @Input() options?: IParticlesProps;\n @Input() url?: string;\n @Input() id = \"tsparticles\";\n @Output() particlesLoaded: EventEmitter<Container> = new EventEmitter<Container>();\n\n private container?: Container;\n private loadingPromise?: Promise<void>;\n\n constructor(\n @Inject(PLATFORM_ID) protected platformId: string,\n private readonly particlesService: NgParticlesService,\n ) {}\n\n public ngAfterViewInit(): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n this.loadingPromise = this.loadParticles();\n }\n\n public ngOnDestroy(): void {\n this.container?.destroy();\n\n this.loadingPromise = undefined;\n }\n\n private async loadParticles(): Promise<void> {\n await this.particlesService.waitForInitialization();\n this.particlesService.assertInitialized();\n\n this.container?.destroy();\n\n const container = await tsParticles.load({ id: this.id, options: this.options, url: this.url });\n\n this.container = container;\n this.particlesLoaded.emit(container);\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { NgxParticlesComponent } from \"./ng-particles.component\";\nimport type { ISourceOptions } from \"@tsparticles/engine\";\nimport { NgParticlesService } from \"./ng-particles.service\";\n\n@NgModule({\n declarations: [NgxParticlesComponent],\n exports: [NgxParticlesComponent],\n providers: [NgParticlesService],\n})\nexport class NgxParticlesModule {}\n\nexport type IParticlesProps = ISourceOptions;\nexport { NgParticlesService };\n","/*\n * Public API Surface of ng-particles\n */\n\nexport * from \"./lib/ng-particles.component\";\nexport * from \"./lib/ng-particles.module\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NgParticlesService"],"mappings":";;;;;AAKA,IAAI,WAAW,GAAG,KAAK;AACvB,IAAI,WAAsC;AAC1C,IAAI,YAAkD;MAKzC,kBAAkB,CAAA;AAC7B,IAAA,IAAW,MAAM,GAAA;AACf,QAAA,OAAO,WAAW;IACpB;IAEO,iBAAiB,GAAA;QACtB,IAAI,CAAC,WAAW,EAAE;AAChB,YAAA,MAAM,IAAI,KAAK,CAAC,6FAA6F,CAAC;QAChH;IACF;IAEO,MAAM,IAAI,CAAC,aAAwC,EAAA;QACxD,IAAI,WAAW,EAAE;YACf;QACF;QAEA,IAAI,WAAW,EAAE;AACf,YAAA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,IAAA,EAAA,qBAAqB,iLAFtB,uBAAuB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEtB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,KAAK;AACjB,oBAAA,QAAQ,EAAE,uBAAuB;AAClC,iBAAA;;0BAWI,MAAM;2BAAC,WAAW;;sBATpB;;sBACA;;sBACA;;sBACA;;;MCNU,kBAAkB,CAAA;uGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAlB,kBAAkB,EAAA,YAAA,EAAA,CAJd,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAC1B,qBAAqB,CAAA,EAAA,CAAA;wGAGpB,kBAAkB,EAAA,SAAA,EAFlB,CAAC,kBAAkB,CAAC,EAAA,CAAA;;2FAEpB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;oBAChC,SAAS,EAAE,CAAC,kBAAkB,CAAC;AAChC,iBAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/angular",
3
- "version": "3.0.0",
3
+ "version": "4.0.0-beta.15",
4
4
  "description": "Official tsParticles Angular Component - Easily create highly customizable particle, confetti and fireworks animations and use them as animated backgrounds for your website. Ready to use components available also for Web Components, React, Vue.js (2.x and 3.x), Svelte, jQuery, Preact, Riot.js, Solid.js, Inferno.",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/tsparticles/angular.git",
8
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
9
9
  "directory": "components/particles"
10
10
  },
11
11
  "keywords": [
@@ -88,23 +88,22 @@
88
88
  "@angular/common": ">=2.0.0",
89
89
  "@angular/core": ">=2.0.0",
90
90
  "rxjs": ">=7.0.0",
91
- "@tsparticles/engine": "^3.0.2"
91
+ "@tsparticles/engine": "^4.0.0-beta.15"
92
92
  },
93
93
  "dependencies": {
94
- "tslib": "^2.6.2"
94
+ "tslib": "^2.8.1"
95
95
  },
96
96
  "module": "fesm2022/tsparticles-angular.mjs",
97
- "typings": "index.d.ts",
97
+ "typings": "types/tsparticles-angular.d.ts",
98
98
  "exports": {
99
99
  "./package.json": {
100
100
  "default": "./package.json"
101
101
  },
102
102
  ".": {
103
- "types": "./index.d.ts",
104
- "esm2022": "./esm2022/tsparticles-angular.mjs",
105
- "esm": "./esm2022/tsparticles-angular.mjs",
103
+ "types": "./types/tsparticles-angular.d.ts",
106
104
  "default": "./fesm2022/tsparticles-angular.mjs"
107
105
  }
108
106
  },
109
- "sideEffects": false
107
+ "sideEffects": false,
108
+ "type": "module"
110
109
  }
@@ -0,0 +1,40 @@
1
+ import * as i0 from '@angular/core';
2
+ import { AfterViewInit, OnDestroy, EventEmitter } from '@angular/core';
3
+ import { Engine, ISourceOptions, Container } from '@tsparticles/engine';
4
+
5
+ type ParticlesPluginRegistrar = (engine: Engine) => Promise<void> | void;
6
+ declare class NgParticlesService {
7
+ get loaded(): boolean;
8
+ assertInitialized(): void;
9
+ init(particlesInit?: ParticlesPluginRegistrar): Promise<void>;
10
+ waitForInitialization(): Promise<void>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgParticlesService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgParticlesService>;
13
+ }
14
+
15
+ declare class NgxParticlesModule {
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxParticlesModule, never>;
17
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxParticlesModule, [typeof NgxParticlesComponent], never, [typeof NgxParticlesComponent]>;
18
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxParticlesModule>;
19
+ }
20
+ type IParticlesProps = ISourceOptions;
21
+
22
+ declare class NgxParticlesComponent implements AfterViewInit, OnDestroy {
23
+ protected platformId: string;
24
+ private readonly particlesService;
25
+ options?: IParticlesProps;
26
+ url?: string;
27
+ id: string;
28
+ particlesLoaded: EventEmitter<Container>;
29
+ private container?;
30
+ private loadingPromise?;
31
+ constructor(platformId: string, particlesService: NgParticlesService);
32
+ ngAfterViewInit(): void;
33
+ ngOnDestroy(): void;
34
+ private loadParticles;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxParticlesComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxParticlesComponent, "ngx-particles", never, { "options": { "alias": "options"; "required": false; }; "url": { "alias": "url"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "particlesLoaded": "particlesLoaded"; }, never, never, false, never>;
37
+ }
38
+
39
+ export { NgParticlesService, NgxParticlesComponent, NgxParticlesModule };
40
+ export type { IParticlesProps };
@@ -1,74 +0,0 @@
1
- import { Component, EventEmitter, Inject, Input, Output, PLATFORM_ID, } from '@angular/core';
2
- import { isPlatformServer } from '@angular/common';
3
- import { from, mergeMap, Subject, takeUntil } from 'rxjs';
4
- import { tsParticles } from '@tsparticles/engine';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "./ng-particles.service";
7
- export class NgxParticlesComponent {
8
- platformId;
9
- particlesService;
10
- options;
11
- url;
12
- id;
13
- particlesInit;
14
- particlesLoaded = new EventEmitter();
15
- subscription;
16
- destroy$ = new Subject();
17
- container;
18
- constructor(platformId, particlesService) {
19
- this.platformId = platformId;
20
- this.particlesService = particlesService;
21
- this.id = 'tsparticles';
22
- }
23
- ngOnInit() {
24
- this.subscription = this.particlesService.getInstallationStatus().subscribe(() => {
25
- this.container?.destroy();
26
- this.loadParticles();
27
- });
28
- }
29
- ngAfterViewInit() {
30
- if (isPlatformServer(this.platformId)) {
31
- return;
32
- }
33
- this.loadParticles();
34
- }
35
- ngOnDestroy() {
36
- this.container?.destroy();
37
- this.subscription?.unsubscribe();
38
- this.destroy$.next();
39
- }
40
- loadParticles() {
41
- const cb = (container) => {
42
- this.container = container;
43
- this.particlesLoaded.emit(container);
44
- };
45
- from(this.particlesInit ? this.particlesInit(tsParticles) : Promise.resolve())
46
- .pipe(mergeMap(() => {
47
- return tsParticles.load({ id: this.id, url: this.url, options: this.options });
48
- }), takeUntil(this.destroy$))
49
- .subscribe(cb);
50
- }
51
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesComponent, deps: [{ token: PLATFORM_ID }, { token: i1.NgParticlesService }], target: i0.ɵɵFactoryTarget.Component });
52
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.8", type: NgxParticlesComponent, selector: "ngx-particles", inputs: { options: "options", url: "url", id: "id", particlesInit: "particlesInit" }, outputs: { particlesLoaded: "particlesLoaded" }, ngImport: i0, template: '<div [id]="id"></div>', isInline: true });
53
- }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesComponent, decorators: [{
55
- type: Component,
56
- args: [{
57
- selector: 'ngx-particles',
58
- template: '<div [id]="id"></div>',
59
- }]
60
- }], ctorParameters: () => [{ type: undefined, decorators: [{
61
- type: Inject,
62
- args: [PLATFORM_ID]
63
- }] }, { type: i1.NgParticlesService }], propDecorators: { options: [{
64
- type: Input
65
- }], url: [{
66
- type: Input
67
- }], id: [{
68
- type: Input
69
- }], particlesInit: [{
70
- type: Input
71
- }], particlesLoaded: [{
72
- type: Output
73
- }] } });
74
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctcGFydGljbGVzLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL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0luaXQodHNQYXJ0aWNsZXMpIDogUHJvbWlzZS5yZXNvbHZlKCkpXG4gICAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgICAgICBtZXJnZU1hcCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0c1BhcnRpY2xlcy5sb2FkKHsgaWQ6IHRoaXMuaWQsIHVybDogdGhpcy51cmwsIG9wdGlvbnM6IHRoaXMub3B0aW9ucyB9KTtcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICB0YWtlVW50aWwodGhpcy5kZXN0cm95JCksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAuc3Vic2NyaWJlKGNiKTtcbiAgICB9XG59XG4iXX0=
@@ -1,19 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { NgxParticlesComponent } from './ng-particles.component';
3
- import { NgParticlesService } from './ng-particles.service';
4
- import * as i0 from "@angular/core";
5
- export class NgxParticlesModule {
6
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesModule, declarations: [NgxParticlesComponent], exports: [NgxParticlesComponent] });
8
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesModule, providers: [NgParticlesService] });
9
- }
10
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgxParticlesModule, decorators: [{
11
- type: NgModule,
12
- args: [{
13
- declarations: [NgxParticlesComponent],
14
- exports: [NgxParticlesComponent],
15
- providers: [NgParticlesService],
16
- }]
17
- }] });
18
- export { NgParticlesService };
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctcGFydGljbGVzLm1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O1xuXG5ATmdNb2R1bGUoe1xuICAgIGRlY2xhcmF0aW9uczogW05neFBhcnRpY2xlc0NvbXBvbmVudF0sXG4gICAgZXhwb3J0czogW05neFBhcnRpY2xlc0NvbXBvbmVudF0sXG4gICAgcHJvdmlkZXJzOiBbTmdQYXJ0aWNsZXNTZXJ2aWNlXSxcbn0pXG5leHBvcnQgY2xhc3MgTmd4UGFydGljbGVzTW9kdWxlIHt9XG5cbmV4cG9ydCB0eXBlIElQYXJ0aWNsZXNQcm9wcyA9IElTb3VyY2VPcHRpb25zO1xuZXhwb3J0IHsgTmdQYXJ0aWNsZXNTZXJ2aWNlIH07XG4iXX0=
@@ -1,23 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { BehaviorSubject } from 'rxjs';
3
- import { tsParticles } from '@tsparticles/engine';
4
- import * as i0 from "@angular/core";
5
- export class NgParticlesService {
6
- initialized = new BehaviorSubject(false);
7
- getInstallationStatus() {
8
- return this.initialized.asObservable();
9
- }
10
- async init(particlesInit) {
11
- await particlesInit(tsParticles);
12
- this.initialized.next(true);
13
- }
14
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgParticlesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
15
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgParticlesService, providedIn: 'root' });
16
- }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.8", ngImport: i0, type: NgParticlesService, decorators: [{
18
- type: Injectable,
19
- args: [{
20
- providedIn: 'root',
21
- }]
22
- }] });
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmctcGFydGljbGVzLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy1wYXJ0aWNsZXMvc3JjL2xpYi9uZ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dmF0ZSBpbml0aWFsaXplZCA9IG5ldyBCZWhhdmlvclN1YmplY3Q8Ym9vbGVhbj4oZmFsc2UpO1xuXG4gICAgZ2V0SW5zdGFsbGF0aW9uU3RhdHVzKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5pbml0aWFsaXplZC5hc09ic2VydmFibGUoKTtcbiAgICB9XG5cbiAgICBhc3luYyBpbml0KHBhcnRpY2xlc0luaXQ6IChlbmdpbmU6IEVuZ2luZSkgPT4gUHJvbWlzZTx2b2lkPikge1xuICAgICAgICBhd2FpdCBwYXJ0aWNsZXNJbml0KHRzUGFydGljbGVzKTtcblxuICAgICAgICB0aGlzLmluaXRpYWxpemVkLm5leHQodHJ1ZSk7XG4gICAgfVxufVxuIl19
@@ -1,6 +0,0 @@
1
- /*
2
- * Public API Surface of ng-particles
3
- */
4
- export * from './lib/ng-particles.component';
5
- export * from './lib/ng-particles.module';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25nLXBhcnRpY2xlcy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYywyQkFBMkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgbmctcGFydGljbGVzXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvbmctcGFydGljbGVzLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9uZy1wYXJ0aWNsZXMubW9kdWxlJztcbiJdfQ==
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHNwYXJ0aWNsZXMtYW5ndWxhci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25nLXBhcnRpY2xlcy9zcmMvdHNwYXJ0aWNsZXMtYW5ndWxhci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
package/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@tsparticles/angular" />
5
- export * from './public-api';
@@ -1,24 +0,0 @@
1
- import { AfterViewInit, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
- import type { Container, Engine } from '@tsparticles/engine';
3
- import { IParticlesProps } from './ng-particles.module';
4
- import { NgParticlesService } from './ng-particles.service';
5
- import * as i0 from "@angular/core";
6
- export declare class NgxParticlesComponent implements OnInit, AfterViewInit, OnDestroy {
7
- protected platformId: string;
8
- private readonly particlesService;
9
- options?: IParticlesProps;
10
- url?: string;
11
- id: string;
12
- particlesInit?: (engine: Engine) => Promise<void>;
13
- particlesLoaded: EventEmitter<Container>;
14
- private subscription?;
15
- private destroy$;
16
- private container?;
17
- constructor(platformId: string, particlesService: NgParticlesService);
18
- ngOnInit(): void;
19
- ngAfterViewInit(): void;
20
- ngOnDestroy(): void;
21
- private loadParticles;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxParticlesComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxParticlesComponent, "ngx-particles", never, { "options": { "alias": "options"; "required": false; }; "url": { "alias": "url"; "required": false; }; "id": { "alias": "id"; "required": false; }; "particlesInit": { "alias": "particlesInit"; "required": false; }; }, { "particlesLoaded": "particlesLoaded"; }, never, never, false, never>;
24
- }
@@ -1,11 +0,0 @@
1
- import type { ISourceOptions } from '@tsparticles/engine';
2
- import { NgParticlesService } from './ng-particles.service';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "./ng-particles.component";
5
- export declare class NgxParticlesModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxParticlesModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxParticlesModule, [typeof i1.NgxParticlesComponent], never, [typeof i1.NgxParticlesComponent]>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxParticlesModule>;
9
- }
10
- export type IParticlesProps = ISourceOptions;
11
- export { NgParticlesService };
@@ -1,9 +0,0 @@
1
- import { Engine } from '@tsparticles/engine';
2
- import * as i0 from "@angular/core";
3
- export declare class NgParticlesService {
4
- private initialized;
5
- getInstallationStatus(): import("rxjs").Observable<boolean>;
6
- init(particlesInit: (engine: Engine) => Promise<void>): Promise<void>;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<NgParticlesService, never>;
8
- static ɵprov: i0.ɵɵInjectableDeclaration<NgParticlesService>;
9
- }
package/public-api.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './lib/ng-particles.component';
2
- export * from './lib/ng-particles.module';