angular-fireworks 4.0.4 → 4.1.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.
@@ -4,6 +4,7 @@ import { PLATFORM_ID, Input, Inject, Component, NgModule } from '@angular/core';
4
4
  import { fireworks } from '@tsparticles/fireworks';
5
5
 
6
6
  class NgxFireworksComponent {
7
+ #fireworksInstance;
7
8
  constructor(platformId) {
8
9
  this.platformId = platformId;
9
10
  this.id = "tsparticles";
@@ -13,17 +14,17 @@ class NgxFireworksComponent {
13
14
  return;
14
15
  }
15
16
  void fireworks(this.id, this.options).then(firework => {
16
- this.fireworksInstance = firework;
17
+ this.#fireworksInstance = firework;
17
18
  });
18
19
  }
19
20
  ngOnDestroy() {
20
- this.fireworksInstance?.stop();
21
- this.fireworksInstance = undefined;
21
+ this.#fireworksInstance?.stop();
22
+ this.#fireworksInstance = undefined;
22
23
  }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxFireworksComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
24
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: NgxFireworksComponent, isStandalone: false, selector: "ngx-fireworks", inputs: { options: "options", id: "id" }, ngImport: i0, template: ` <div [id]="id"></div>`, isInline: true }); }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxFireworksComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
25
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", type: NgxFireworksComponent, isStandalone: false, selector: "ngx-fireworks", inputs: { options: "options", id: "id" }, ngImport: i0, template: ` <div [id]="id"></div>`, isInline: true }); }
25
26
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxFireworksComponent, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxFireworksComponent, decorators: [{
27
28
  type: Component,
28
29
  args: [{ selector: "ngx-fireworks", standalone: false, template: ` <div [id]="id"></div>` }]
29
30
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -36,11 +37,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
36
37
  }] } });
37
38
 
38
39
  class NgxFireworksModule {
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxFireworksModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
40
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: NgxFireworksModule, declarations: [NgxFireworksComponent], exports: [NgxFireworksComponent] }); }
41
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxFireworksModule }); }
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxFireworksModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
41
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: NgxFireworksModule, declarations: [NgxFireworksComponent], exports: [NgxFireworksComponent] }); }
42
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxFireworksModule }); }
42
43
  }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxFireworksModule, decorators: [{
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxFireworksModule, decorators: [{
44
45
  type: NgModule,
45
46
  args: [{
46
47
  declarations: [NgxFireworksComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"angular-fireworks.mjs","sources":["../../../projects/ng-fireworks/src/lib/ng-fireworks.component.ts","../../../projects/ng-fireworks/src/lib/ng-fireworks.module.ts","../../../projects/ng-fireworks/src/public-api.ts","../../../projects/ng-fireworks/src/angular-fireworks.ts"],"sourcesContent":["import { isPlatformServer } from \"@angular/common\";\nimport { AfterViewInit, Component, Inject, Input, OnDestroy, PLATFORM_ID } from \"@angular/core\";\nimport { FireworkOptions, fireworks } from \"@tsparticles/fireworks\";\n\n@Component({\n selector: \"ngx-fireworks\",\n standalone: false,\n template: ` <div [id]=\"id\"></div>`,\n styles: [],\n})\nexport class NgxFireworksComponent implements AfterViewInit, OnDestroy {\n @Input() options?: FireworkOptions;\n @Input() id = \"tsparticles\";\n\n private fireworksInstance?: Awaited<ReturnType<typeof fireworks>>;\n\n constructor(@Inject(PLATFORM_ID) protected platformId: string) {}\n\n public ngAfterViewInit(): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n void fireworks(this.id, this.options).then(firework => {\n this.fireworksInstance = firework;\n });\n }\n\n public ngOnDestroy(): void {\n this.fireworksInstance?.stop();\n this.fireworksInstance = undefined;\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { NgxFireworksComponent } from \"./ng-fireworks.component\";\n\n@NgModule({\n declarations: [NgxFireworksComponent],\n imports: [],\n exports: [NgxFireworksComponent],\n})\nexport class NgxFireworksModule {}\n","/*\n * Public API Surface of ng-fireworks\n */\n\nexport * from \"./lib/ng-fireworks.component\";\nexport * from \"./lib/ng-fireworks.module\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,qBAAqB,CAAA;AAMhC,IAAA,WAAA,CAA2C,UAAkB,EAAA;QAAlB,IAAA,CAAA,UAAU,GAAV,UAAU;QAJ5C,IAAA,CAAA,EAAE,GAAG,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qBAAqB,CAAA,EAAA,OAAA,EAAA,CAE1B,qBAAqB,CAAA,EAAA,CAAA,CAAA;+GAEpB,kBAAkB,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACjC,iBAAA;;;ACPD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"angular-fireworks.mjs","sources":["../../../projects/ng-fireworks/src/lib/ng-fireworks.component.ts","../../../projects/ng-fireworks/src/lib/ng-fireworks.module.ts","../../../projects/ng-fireworks/src/public-api.ts","../../../projects/ng-fireworks/src/angular-fireworks.ts"],"sourcesContent":["import { isPlatformServer } from \"@angular/common\";\nimport { AfterViewInit, Component, Inject, Input, OnDestroy, PLATFORM_ID } from \"@angular/core\";\nimport { FireworkOptions, fireworks } from \"@tsparticles/fireworks\";\n\n@Component({\n selector: \"ngx-fireworks\",\n standalone: false,\n template: ` <div [id]=\"id\"></div>`,\n styles: [],\n})\nexport class NgxFireworksComponent implements AfterViewInit, OnDestroy {\n @Input() options?: FireworkOptions;\n @Input() id = \"tsparticles\";\n\n #fireworksInstance?: Awaited<ReturnType<typeof fireworks>>;\n\n constructor(@Inject(PLATFORM_ID) protected platformId: string) {}\n\n public ngAfterViewInit(): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n void fireworks(this.id, this.options).then(firework => {\n this.#fireworksInstance = firework;\n });\n }\n\n public ngOnDestroy(): void {\n this.#fireworksInstance?.stop();\n this.#fireworksInstance = undefined;\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { NgxFireworksComponent } from \"./ng-fireworks.component\";\n\n@NgModule({\n declarations: [NgxFireworksComponent],\n imports: [],\n exports: [NgxFireworksComponent],\n})\nexport class NgxFireworksModule {}\n","/*\n * Public API Surface of ng-fireworks\n */\n\nexport * from \"./lib/ng-fireworks.component\";\nexport * from \"./lib/ng-fireworks.module\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAUa,qBAAqB,CAAA;AAIhC,IAAA,kBAAkB;AAElB,IAAA,WAAA,CAA2C,UAAkB,EAAA;QAAlB,IAAA,CAAA,UAAU,GAAV,UAAU;QAJ5C,IAAA,CAAA,EAAE,GAAG,aAAa;IAIqC;IAEzD,eAAe,GAAA;AACpB,QAAA,IAAI,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACrC;QACF;AAEA,QAAA,KAAK,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAG;AACpD,YAAA,IAAI,CAAC,kBAAkB,GAAG,QAAQ;AACpC,QAAA,CAAC,CAAC;IACJ;IAEO,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,kBAAkB,EAAE,IAAI,EAAE;AAC/B,QAAA,IAAI,CAAC,kBAAkB,GAAG,SAAS;IACrC;AArBW,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,kBAMZ,WAAW,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AANpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,oHAHtB,CAAA,sBAAA,CAAwB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;;4FAGvB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;+BACE,eAAe,EAAA,UAAA,EACb,KAAK,EAAA,QAAA,EACP,CAAA,sBAAA,CAAwB,EAAA;;0BASrB,MAAM;2BAAC,WAAW;;sBAL9B;;sBACA;;;MCJU,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAJd,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAE1B,qBAAqB,CAAA,EAAA,CAAA,CAAA;gHAEpB,kBAAkB,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACjC,iBAAA;;;ACPD;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-fireworks",
3
- "version": "4.0.4",
3
+ "version": "4.1.0",
4
4
  "description": "Official tsParticles Angular Confetti 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://confetti.js.org",
6
6
  "repository": {
@@ -85,7 +85,8 @@
85
85
  "@angular/common": ">=2.0.0",
86
86
  "@angular/core": ">=2.0.0",
87
87
  "rxjs": ">=7.0.0",
88
- "@tsparticles/fireworks": "^4.0.4"
88
+ "@tsparticles/fireworks": "^4.1.0",
89
+ "@tsparticles/engine": "workspace:*"
89
90
  },
90
91
  "dependencies": {
91
92
  "tslib": "^2.8.1"
@@ -3,10 +3,10 @@ import { AfterViewInit, OnDestroy } from '@angular/core';
3
3
  import { FireworkOptions } from '@tsparticles/fireworks';
4
4
 
5
5
  declare class NgxFireworksComponent implements AfterViewInit, OnDestroy {
6
+ #private;
6
7
  protected platformId: string;
7
8
  options?: FireworkOptions;
8
9
  id: string;
9
- private fireworksInstance?;
10
10
  constructor(platformId: string);
11
11
  ngAfterViewInit(): void;
12
12
  ngOnDestroy(): void;