angular-fireworks 4.0.0-beta.12

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/.npmignore ADDED
@@ -0,0 +1,2 @@
1
+ # Nested package.json's are only needed for development.
2
+ **/package.json
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Matteo Bruni
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ [![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)
2
+
3
+ # angular-fireworks
4
+
5
+ [![npm](https://img.shields.io/npm/v/angular-fireworks)](https://www.npmjs.com/package/angular-fireworks) [![npm](https://img.shields.io/npm/dm/angular-fireworks)](https://www.npmjs.com/package/angular-fireworks) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
6
+
7
+ Official Angular wrapper for [@tsparticles/fireworks](https://www.npmjs.com/package/@tsparticles/fireworks).
8
+
9
+ ## Installation
10
+
11
+ ```shell
12
+ npm install angular-fireworks @tsparticles/fireworks
13
+ ```
14
+
15
+ or
16
+
17
+ ```shell
18
+ yarn add angular-fireworks @tsparticles/fireworks
19
+ ```
20
+
21
+ ## How to use
22
+
23
+ ### Module setup
24
+
25
+ ```ts
26
+ import { NgModule } from "@angular/core";
27
+ import { NgxFireworksModule } from "angular-fireworks";
28
+
29
+ @NgModule({
30
+ imports: [NgxFireworksModule],
31
+ })
32
+ export class AppModule {}
33
+ ```
34
+
35
+ ### Template usage
36
+
37
+ ```html
38
+ <ngx-fireworks [id]="id" [options]="fireworksOptions"></ngx-fireworks>
39
+ ```
40
+
41
+ ### Component usage
42
+
43
+ ```ts
44
+ import { Component } from "@angular/core";
45
+ import type { FireworkOptions } from "@tsparticles/fireworks";
46
+
47
+ @Component({
48
+ selector: "app-root",
49
+ templateUrl: "./app.component.html",
50
+ })
51
+ export class AppComponent {
52
+ public id = "tsparticles";
53
+
54
+ public fireworksOptions: FireworkOptions = {
55
+ background: {
56
+ color: {
57
+ value: "#000000",
58
+ },
59
+ },
60
+ sounds: {
61
+ enable: false,
62
+ },
63
+ };
64
+ }
65
+ ```
@@ -0,0 +1,61 @@
1
+ import { isPlatformServer } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { PLATFORM_ID, Input, Inject, Component, NgModule } from '@angular/core';
4
+ import { fireworks } from '@tsparticles/fireworks';
5
+
6
+ class NgxFireworksComponent {
7
+ constructor(platformId) {
8
+ this.platformId = platformId;
9
+ this.id = "tsparticles";
10
+ }
11
+ ngAfterViewInit() {
12
+ if (isPlatformServer(this.platformId)) {
13
+ return;
14
+ }
15
+ void fireworks(this.id, this.options).then(firework => {
16
+ this.fireworksInstance = firework;
17
+ });
18
+ }
19
+ ngOnDestroy() {
20
+ this.fireworksInstance?.stop();
21
+ this.fireworksInstance = undefined;
22
+ }
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", 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.8", type: NgxFireworksComponent, isStandalone: false, selector: "ngx-fireworks", inputs: { options: "options", id: "id" }, ngImport: i0, template: ` <div [id]="id"></div>`, isInline: true }); }
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NgxFireworksComponent, decorators: [{
27
+ type: Component,
28
+ args: [{ selector: "ngx-fireworks", standalone: false, template: ` <div [id]="id"></div>` }]
29
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
30
+ type: Inject,
31
+ args: [PLATFORM_ID]
32
+ }] }], propDecorators: { options: [{
33
+ type: Input
34
+ }], id: [{
35
+ type: Input
36
+ }] } });
37
+
38
+ class NgxFireworksModule {
39
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NgxFireworksModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
40
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: NgxFireworksModule, declarations: [NgxFireworksComponent], exports: [NgxFireworksComponent] }); }
41
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NgxFireworksModule }); }
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NgxFireworksModule, decorators: [{
44
+ type: NgModule,
45
+ args: [{
46
+ declarations: [NgxFireworksComponent],
47
+ imports: [],
48
+ exports: [NgxFireworksComponent],
49
+ }]
50
+ }] });
51
+
52
+ /*
53
+ * Public API Surface of ng-fireworks
54
+ */
55
+
56
+ /**
57
+ * Generated bundle index. Do not edit.
58
+ */
59
+
60
+ export { NgxFireworksComponent, NgxFireworksModule };
61
+ //# sourceMappingURL=angular-fireworks.mjs.map
@@ -0,0 +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,G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A;+GAAlB,kBAAkB,EAAA,YAAA,EAAA,CAJd,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;;;;"}
package/package.json ADDED
@@ -0,0 +1,106 @@
1
+ {
2
+ "name": "angular-fireworks",
3
+ "version": "4.0.0-beta.12",
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
+ "homepage": "https://confetti.js.org",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
9
+ "directory": "components/confetti"
10
+ },
11
+ "keywords": [
12
+ "front-end",
13
+ "frontend",
14
+ "tsparticles",
15
+ "particles.js",
16
+ "particlesjs",
17
+ "particles",
18
+ "particle",
19
+ "canvas",
20
+ "jsparticles",
21
+ "xparticles",
22
+ "particles-js",
23
+ "particles-bg",
24
+ "particles-bg-vue",
25
+ "particles-ts",
26
+ "particles.ts",
27
+ "react-particles-js",
28
+ "react-particles.js",
29
+ "react-particles",
30
+ "react",
31
+ "reactjs",
32
+ "vue-particles",
33
+ "ngx-particles",
34
+ "angular-particles",
35
+ "particleground",
36
+ "vue",
37
+ "vuejs",
38
+ "preact",
39
+ "preactjs",
40
+ "jquery",
41
+ "angularjs",
42
+ "angular",
43
+ "typescript",
44
+ "javascript",
45
+ "animation",
46
+ "web",
47
+ "html5",
48
+ "web-design",
49
+ "webdesign",
50
+ "css",
51
+ "html",
52
+ "css3",
53
+ "animated",
54
+ "background",
55
+ "confetti",
56
+ "canvas",
57
+ "fireworks",
58
+ "fireworks-js",
59
+ "confetti-js",
60
+ "confettijs",
61
+ "fireworksjs",
62
+ "canvas-confetti"
63
+ ],
64
+ "author": "Matteo Bruni <matteo.bruni@me.com>",
65
+ "license": "MIT",
66
+ "files": [
67
+ "**/*"
68
+ ],
69
+ "types": "ng-fireworks.d.ts",
70
+ "funding": [
71
+ {
72
+ "type": "github",
73
+ "url": "https://github.com/sponsors/matteobruni"
74
+ },
75
+ {
76
+ "type": "github",
77
+ "url": "https://github.com/sponsors/tsparticles"
78
+ },
79
+ {
80
+ "type": "buymeacoffee",
81
+ "url": "https://www.buymeacoffee.com/matteobruni"
82
+ }
83
+ ],
84
+ "peerDependencies": {
85
+ "@angular/common": ">=2.0.0",
86
+ "@angular/core": ">=2.0.0",
87
+ "rxjs": ">=7.0.0",
88
+ "@tsparticles/fireworks": "^"
89
+ },
90
+ "dependencies": {
91
+ "tslib": "^2.6.2"
92
+ },
93
+ "module": "fesm2022/angular-fireworks.mjs",
94
+ "typings": "types/angular-fireworks.d.ts",
95
+ "exports": {
96
+ "./package.json": {
97
+ "default": "./package.json"
98
+ },
99
+ ".": {
100
+ "types": "./types/angular-fireworks.d.ts",
101
+ "default": "./fesm2022/angular-fireworks.mjs"
102
+ }
103
+ },
104
+ "sideEffects": false,
105
+ "type": "module"
106
+ }
@@ -0,0 +1,23 @@
1
+ import * as i0 from '@angular/core';
2
+ import { AfterViewInit, OnDestroy } from '@angular/core';
3
+ import { FireworkOptions } from '@tsparticles/fireworks';
4
+
5
+ declare class NgxFireworksComponent implements AfterViewInit, OnDestroy {
6
+ protected platformId: string;
7
+ options?: FireworkOptions;
8
+ id: string;
9
+ private fireworksInstance?;
10
+ constructor(platformId: string);
11
+ ngAfterViewInit(): void;
12
+ ngOnDestroy(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxFireworksComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxFireworksComponent, "ngx-fireworks", never, { "options": { "alias": "options"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, {}, never, never, false, never>;
15
+ }
16
+
17
+ declare class NgxFireworksModule {
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxFireworksModule, never>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxFireworksModule, [typeof NgxFireworksComponent], never, [typeof NgxFireworksComponent]>;
20
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxFireworksModule>;
21
+ }
22
+
23
+ export { NgxFireworksComponent, NgxFireworksModule };