@tsparticles/angular 4.0.5 → 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.
@@ -43,10 +43,10 @@ class NgParticlesService {
43
43
  async waitForInitialization() {
44
44
  await (initPromise ?? Promise.resolve());
45
45
  }
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" });
46
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgParticlesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
47
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgParticlesService, providedIn: "root" });
48
48
  }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgParticlesService, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgParticlesService, decorators: [{
50
50
  type: Injectable,
51
51
  args: [{
52
52
  providedIn: "root",
@@ -55,39 +55,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
55
55
 
56
56
  class NgxParticlesComponent {
57
57
  platformId;
58
- particlesService;
59
58
  options;
60
59
  url;
61
60
  id = "tsparticles";
62
61
  particlesLoaded = new EventEmitter();
63
- container;
64
- loadingPromise;
62
+ #container;
63
+ #loadingPromise;
64
+ #particlesService;
65
65
  constructor(platformId, particlesService) {
66
66
  this.platformId = platformId;
67
- this.particlesService = particlesService;
67
+ this.#particlesService = particlesService;
68
68
  }
69
69
  ngAfterViewInit() {
70
70
  if (isPlatformServer(this.platformId)) {
71
71
  return;
72
72
  }
73
- this.loadingPromise = this.loadParticles();
73
+ this.#loadingPromise = this.#loadParticles();
74
74
  }
75
75
  ngOnDestroy() {
76
- this.container?.destroy();
77
- this.loadingPromise = undefined;
76
+ this.#container?.destroy();
77
+ this.#loadingPromise = undefined;
78
78
  }
79
- async loadParticles() {
80
- await this.particlesService.waitForInitialization();
81
- this.particlesService.assertInitialized();
82
- this.container?.destroy();
79
+ async #loadParticles() {
80
+ await this.#particlesService.waitForInitialization();
81
+ this.#particlesService.assertInitialized();
82
+ this.#container?.destroy();
83
83
  const container = await tsParticles.load({ id: this.id, options: this.options, url: this.url });
84
- this.container = container;
84
+ this.#container = container;
85
85
  this.particlesLoaded.emit(container);
86
86
  }
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 });
87
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", 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.14", 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 });
89
89
  }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxParticlesComponent, decorators: [{
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxParticlesComponent, decorators: [{
91
91
  type: Component,
92
92
  args: [{
93
93
  selector: "ngx-particles",
@@ -108,11 +108,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
108
108
  }] } });
109
109
 
110
110
  class NgxParticlesModule {
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] });
111
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxParticlesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
112
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: NgxParticlesModule, declarations: [NgxParticlesComponent], exports: [NgxParticlesComponent] });
113
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxParticlesModule, providers: [NgParticlesService] });
114
114
  }
115
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NgxParticlesModule, decorators: [{
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgxParticlesModule, decorators: [{
116
116
  type: NgModule,
117
117
  args: [{
118
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 { 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;QAC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,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,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;;;;"}
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 { 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 #container?: Container;\n #loadingPromise?: Promise<void>;\n readonly #particlesService: NgParticlesService;\n\n constructor(\n @Inject(PLATFORM_ID) protected platformId: string,\n particlesService: NgParticlesService,\n ) {\n this.#particlesService = particlesService;\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 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,IAAI,YAAY,KAAK,aAAa,EAAE;AAClC,gBAAA,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC;YAC9F;AAEA,YAAA,MAAM,WAAW;YAEjB;QACF;QAEA,YAAY,GAAG,aAAa;AAC5B,QAAA,WAAW,GAAG,CAAC,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Q,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,KAAK;AACjB,oBAAA,QAAQ,EAAE,uBAAuB;AAClC,iBAAA;;0BAYI,MAAM;2BAAC,WAAW;;sBAVpB;;sBACA;;sBACA;;sBACA;;;MCNU,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAlB,kBAAkB,EAAA,YAAA,EAAA,CAJd,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAC1B,qBAAqB,CAAA,EAAA,CAAA;yGAGpB,kBAAkB,EAAA,SAAA,EAFlB,CAAC,kBAAkB,CAAC,EAAA,CAAA;;4FAEpB,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,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/angular",
3
- "version": "4.0.5",
3
+ "version": "4.1.0",
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": {
@@ -88,7 +88,7 @@
88
88
  "@angular/common": ">=2.0.0",
89
89
  "@angular/core": ">=2.0.0",
90
90
  "rxjs": ">=7.0.0",
91
- "@tsparticles/engine": "^4.0.5"
91
+ "@tsparticles/engine": "^4.1.0"
92
92
  },
93
93
  "dependencies": {
94
94
  "tslib": "^2.8.1"
@@ -20,18 +20,15 @@ declare class NgxParticlesModule {
20
20
  type IParticlesProps = ISourceOptions;
21
21
 
22
22
  declare class NgxParticlesComponent implements AfterViewInit, OnDestroy {
23
+ #private;
23
24
  protected platformId: string;
24
- private readonly particlesService;
25
25
  options?: IParticlesProps;
26
26
  url?: string;
27
27
  id: string;
28
28
  particlesLoaded: EventEmitter<Container>;
29
- private container?;
30
- private loadingPromise?;
31
29
  constructor(platformId: string, particlesService: NgParticlesService);
32
30
  ngAfterViewInit(): void;
33
31
  ngOnDestroy(): void;
34
- private loadParticles;
35
32
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxParticlesComponent, never>;
36
33
  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
34
  }