angular-confetti 4.1.3 → 4.2.1

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.
@@ -42,10 +42,10 @@ class NgxConfettiComponent {
42
42
  this.#container?.destroy();
43
43
  this.#container = container;
44
44
  }
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxConfettiComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
46
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", type: NgxConfettiComponent, isStandalone: false, selector: "ngx-confetti", inputs: { options: "options", id: "id", fire: "fire" }, usesOnChanges: true, ngImport: i0, template: '<div [id]="id"></div>', isInline: true }); }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgxConfettiComponent, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component }); }
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.1", type: NgxConfettiComponent, isStandalone: false, selector: "ngx-confetti", inputs: { options: "options", id: "id", fire: "fire" }, usesOnChanges: true, ngImport: i0, template: '<div [id]="id"></div>', isInline: true }); }
47
47
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxConfettiComponent, decorators: [{
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgxConfettiComponent, decorators: [{
49
49
  type: Component,
50
50
  args: [{
51
51
  selector: "ngx-confetti",
@@ -64,18 +64,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
64
64
  }] } });
65
65
 
66
66
  class NgxConfettiModule {
67
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxConfettiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
68
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: NgxConfettiModule, declarations: [NgxConfettiComponent], exports: [NgxConfettiComponent] }); }
69
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxConfettiModule }); }
67
+ constructor() {
68
+ void confetti.init();
69
+ }
70
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgxConfettiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
71
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.1", ngImport: i0, type: NgxConfettiModule, declarations: [NgxConfettiComponent], exports: [NgxConfettiComponent] }); }
72
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgxConfettiModule }); }
70
73
  }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxConfettiModule, decorators: [{
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgxConfettiModule, decorators: [{
72
75
  type: NgModule,
73
76
  args: [{
74
77
  declarations: [NgxConfettiComponent],
75
78
  imports: [],
76
79
  exports: [NgxConfettiComponent],
77
80
  }]
78
- }] });
81
+ }], ctorParameters: () => [] });
79
82
 
80
83
  /*
81
84
  * Public API Surface of ng-confetti
@@ -1 +1 @@
1
- {"version":3,"file":"angular-confetti.mjs","sources":["../../../projects/ng-confetti/src/lib/ng-confetti.component.ts","../../../projects/ng-confetti/src/lib/ng-confetti.module.ts","../../../projects/ng-confetti/src/public-api.ts","../../../projects/ng-confetti/src/angular-confetti.ts"],"sourcesContent":["import { isPlatformServer } from \"@angular/common\";\nimport {\n AfterViewInit,\n Component,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n PLATFORM_ID,\n SimpleChanges,\n} from \"@angular/core\";\nimport { confetti, ConfettiOptions } from \"@tsparticles/confetti\";\nimport type { Container } from \"@tsparticles/engine\";\n\n@Component({\n selector: \"ngx-confetti\",\n standalone: false,\n template: '<div [id]=\"id\"></div>',\n})\nexport class NgxConfettiComponent implements AfterViewInit, OnChanges, OnDestroy {\n @Input() options?: ConfettiOptions;\n @Input() id = \"tsparticles\";\n @Input() fire: boolean | number = true;\n\n #container?: Container;\n #renderId = 0;\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 this.#tryFire();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n const fireChanges = changes[\"fire\"];\n\n if (this.fire && fireChanges && fireChanges.previousValue !== fireChanges.currentValue) {\n void this.#tryFire();\n }\n }\n\n public ngOnDestroy(): void {\n this.#renderId++;\n this.#container?.destroy();\n\n this.#container = undefined;\n }\n\n async #tryFire(): Promise<void> {\n const currentRenderId = ++this.#renderId;\n const container = await confetti(this.id, this.options);\n\n if (currentRenderId !== this.#renderId) {\n container?.destroy();\n\n return;\n }\n\n this.#container?.destroy();\n this.#container = container;\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { NgxConfettiComponent } from \"./ng-confetti.component\";\n\n@NgModule({\n declarations: [NgxConfettiComponent],\n imports: [],\n exports: [NgxConfettiComponent],\n})\nexport class NgxConfettiModule {}\n","/*\n * Public API Surface of ng-confetti\n */\n\nexport * from \"./lib/ng-confetti.component\";\nexport * from \"./lib/ng-confetti.module\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAmBa,oBAAoB,CAAA;AAK/B,IAAA,UAAU;AACV,IAAA,SAAS;AAET,I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/ng-confetti.component.ts","../../../projects/ng-confetti/src/lib/ng-confetti.module.ts","../../../projects/ng-confetti/src/public-api.ts","../../../projects/ng-confetti/src/angular-confetti.ts"],"sourcesContent":["import { isPlatformServer } from \"@angular/common\";\nimport {\n AfterViewInit,\n Component,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n PLATFORM_ID,\n SimpleChanges,\n} from \"@angular/core\";\nimport { confetti, ConfettiOptions } from \"@tsparticles/confetti\";\nimport type { Container } from \"@tsparticles/engine\";\n\n@Component({\n selector: \"ngx-confetti\",\n standalone: false,\n template: '<div [id]=\"id\"></div>',\n})\nexport class NgxConfettiComponent implements AfterViewInit, OnChanges, OnDestroy {\n @Input() options?: ConfettiOptions;\n @Input() id = \"tsparticles\";\n @Input() fire: boolean | number = true;\n\n #container?: Container;\n #renderId = 0;\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 this.#tryFire();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n const fireChanges = changes[\"fire\"];\n\n if (this.fire && fireChanges && fireChanges.previousValue !== fireChanges.currentValue) {\n void this.#tryFire();\n }\n }\n\n public ngOnDestroy(): void {\n this.#renderId++;\n this.#container?.destroy();\n\n this.#container = undefined;\n }\n\n async #tryFire(): Promise<void> {\n const currentRenderId = ++this.#renderId;\n const container = await confetti(this.id, this.options);\n\n if (currentRenderId !== this.#renderId) {\n container?.destroy();\n\n return;\n }\n\n this.#container?.destroy();\n this.#container = container;\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { confetti } from \"@tsparticles/confetti\";\nimport { NgxConfettiComponent } from \"./ng-confetti.component\";\n\n@NgModule({\n declarations: [NgxConfettiComponent],\n imports: [],\n exports: [NgxConfettiComponent],\n})\nexport class NgxConfettiModule {\n constructor() {\n void confetti.init();\n }\n}\n","/*\n * Public API Surface of ng-confetti\n */\n\nexport * from \"./lib/ng-confetti.component\";\nexport * from \"./lib/ng-confetti.module\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAmBa,oBAAoB,CAAA;AAK/B,IAAA,UAAU;AACV,IAAA,SAAS;AAET,IAAA,WAAA,CAA2C,UAAkB,EAAA;QAAlB,IAAA,CAAA,UAAU,GAAV,UAAU;QAN5C,IAAA,CAAA,EAAE,GAAG,aAAa;QAClB,IAAA,CAAA,IAAI,GAAqB,IAAI;QAGtC,IAAA,CAAA,SAAS,GAAG,CAAC;IAEmD;IAEzD,eAAe,GAAA;AACpB,QAAA,IAAI,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACrC;QACF;AAEA,QAAA,KAAK,IAAI,CAAC,QAAQ,EAAE;IACtB;AAEO,IAAA,WAAW,CAAC,OAAsB,EAAA;AACvC,QAAA,IAAI,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACrC;QACF;AAEA,QAAA,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;AAEnC,QAAA,IAAI,IAAI,CAAC,IAAI,IAAI,WAAW,IAAI,WAAW,CAAC,aAAa,KAAK,WAAW,CAAC,YAAY,EAAE;AACtF,YAAA,KAAK,IAAI,CAAC,QAAQ,EAAE;QACtB;IACF;IAEO,WAAW,GAAA;QAChB,IAAI,CAAC,SAAS,EAAE;AAChB,QAAA,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE;AAE1B,QAAA,IAAI,CAAC,UAAU,GAAG,SAAS;IAC7B;AAEA,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,MAAM,eAAe,GAAG,EAAE,IAAI,CAAC,SAAS;AACxC,QAAA,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;AAEvD,QAAA,IAAI,eAAe,KAAK,IAAI,CAAC,SAAS,EAAE;YACtC,SAAS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L7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA;;;ACRD;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-confetti",
3
- "version": "4.1.3",
3
+ "version": "4.2.1",
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": {
@@ -82,11 +82,11 @@
82
82
  }
83
83
  ],
84
84
  "peerDependencies": {
85
- "@angular/common": ">=2.0.0",
86
- "@angular/core": ">=2.0.0",
85
+ "@angular/common": ">=12.0.0",
86
+ "@angular/core": ">=12.0.0",
87
87
  "rxjs": ">=7.0.0",
88
- "@tsparticles/confetti": "^4.1.3",
89
- "@tsparticles/engine": "^4.1.3"
88
+ "@tsparticles/confetti": "^4.2.1",
89
+ "@tsparticles/engine": "^4.2.1"
90
90
  },
91
91
  "dependencies": {
92
92
  "tslib": "^2.8.1"
@@ -17,6 +17,7 @@ declare class NgxConfettiComponent implements AfterViewInit, OnChanges, OnDestro
17
17
  }
18
18
 
19
19
  declare class NgxConfettiModule {
20
+ constructor();
20
21
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxConfettiModule, never>;
21
22
  static ɵmod: i0.ɵɵNgModuleDeclaration<NgxConfettiModule, [typeof NgxConfettiComponent], never, [typeof NgxConfettiComponent]>;
22
23
  static ɵinj: i0.ɵɵInjectorDeclaration<NgxConfettiModule>;