@tsparticles/vue2 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.
package/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import tsparticlesvue2 from './src/Particles/index'
3
+ export default tsparticlesvue2
4
+ export {}
package/package.json CHANGED
@@ -1,31 +1,12 @@
1
1
  {
2
2
  "name": "@tsparticles/vue2",
3
- "version": "4.0.4",
4
- "main": "dist/vue2-particles.umd.js",
5
- "module": "dist/vue2-particles.es.js",
6
- "types": "dist/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/vue2-particles.es.js",
11
- "require": "./dist/vue2-particles.umd.js",
12
- "default": "./dist/vue2-particles.umd.js"
13
- }
14
- },
3
+ "version": "4.1.0",
15
4
  "description": "Official tsParticles Vue.js 2.x 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 3.x, Angular, Svelte, jQuery, Preact, Riot.js, Solid.js, Inferno.",
16
- "scripts": {
17
- "clean": "rm -rf dist/*",
18
- "dev": "vite",
19
- "build": "pnpm run clean && pnpm run prettify:src && pnpm run prettify:readme && vite build",
20
- "build:ci": "pnpm run clean && pnpm run prettify:ci:src && pnpm run prettify:ci:readme && vite build",
21
- "preview": "vite preview --port 5050",
22
- "typecheck": "vue-tsc --noEmit",
23
- "lint": "eslint . --fix",
24
- "prettify:ci:src": "prettier --check ./src/*",
25
- "prettify:ci:readme": "prettier --check ./README.md",
26
- "prettify:src": "prettier --write ./src/*",
27
- "prettify:readme": "prettier --write ./README.md",
28
- "prepack": "pnpm run build"
5
+ "homepage": "https://particles.js.org",
6
+ "repository": {
7
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
8
+ "type": "git",
9
+ "directory": "wrappers/vue2"
29
10
  },
30
11
  "keywords": [
31
12
  "front-end",
@@ -80,23 +61,11 @@
80
61
  "fireworksjs",
81
62
  "canvas-confetti"
82
63
  ],
83
- "unpkg": "dist/vue2-particles.umd.js",
84
- "jsdelivr": "dist/vue2-particles.umd.js",
85
- "repository": {
86
- "url": "git+https://github.com/tsparticles/tsparticles.git",
87
- "type": "git",
88
- "directory": "wrappers/vue2"
89
- },
90
64
  "author": "Matteo Bruni <matteo.bruni@me.com>",
91
65
  "license": "MIT",
92
- "files": [
93
- "dist",
94
- "README.md"
95
- ],
96
66
  "bugs": {
97
67
  "url": "https://github.com/tsparticles/vue2/issues"
98
68
  },
99
- "homepage": "https://particles.js.org",
100
69
  "funding": [
101
70
  {
102
71
  "type": "github",
@@ -112,34 +81,22 @@
112
81
  }
113
82
  ],
114
83
  "prettier": "@tsparticles/prettier-config",
84
+ "types": "index.d.ts",
85
+ "module": "vue2-particles.es.js",
86
+ "main": "vue2-particles.umd.js",
87
+ "exports": {
88
+ ".": {
89
+ "types": "./index.d.ts",
90
+ "import": "./vue2-particles.es.js",
91
+ "require": "./vue2-particles.umd.js",
92
+ "default": "./vue2-particles.umd.js"
93
+ }
94
+ },
115
95
  "peerDependencies": {
116
- "vue": "^2.7.0"
96
+ "vue": "^2.7.0",
97
+ "@tsparticles/engine": "4.1.0"
117
98
  },
118
99
  "publishConfig": {
119
100
  "access": "public"
120
- },
121
- "dependencies": {
122
- "@tsparticles/engine": "^4.0.4"
123
- },
124
- "devDependencies": {
125
- "@eslint/js": "^10.0.1",
126
- "@tsparticles/prettier-config": "^4.0.4",
127
- "@types/node": "^25.6.0",
128
- "@typescript-eslint/parser": "^8.58.1",
129
- "@vitejs/plugin-vue2": "^2.3.4",
130
- "eslint": "^10.2.0",
131
- "eslint-plugin-vue": "^10.8.0",
132
- "globals": "^17.5.0",
133
- "prettier": "^3.8.2",
134
- "typescript": "^6.0.2",
135
- "vite": "^6.4.1",
136
- "vite-plugin-dts": "^4.5.4",
137
- "vue": "^2.7.16",
138
- "vue-class-component": "^7.2.6",
139
- "vue-eslint-parser": "^10.4.0",
140
- "vue-property-decorator": "^9.1.2",
141
- "vue-template-compiler": "^2.7.16",
142
- "vue-tsc": "^3.2.6"
143
- },
144
- "gitHead": "ccaa764e22df90102d33c977aa91e3f552ce12dd"
101
+ }
145
102
  }
@@ -9,11 +9,8 @@ export default class Particles extends Vue {
9
9
  container?: Container;
10
10
  mounted(): void;
11
11
  beforeDestroy(): void;
12
- __VLS_template: () => {
13
- attrs: Partial<{}>;
14
- slots: {};
15
- refs: {};
16
- rootEl: HTMLDivElement;
17
- };
18
12
  }
13
+ declare const __VLS_export: import('vue').DefineComponent<{}, unknown, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{}>>, {}>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
19
16
  //# sourceMappingURL=vue-particles.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vue-particles.vue.d.ts","sourceRoot":"","sources":["../../../src/Particles/vue-particles.vue"],"names":[],"mappings":"AAGA;AAiEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAe,MAAM,qBAAqB,CAAC;AACvF,OAAO,GAAG,MAAM,KAAK,CAAC;AAGtB,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC;AAiC7C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,GAAG;IACd,QAAQ,CAAC,EAAE,EAAG,MAAM,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IAElE,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,OAAO,IAAI,IAAI;IAMf,aAAa,IAAI,IAAI;IAGvB,cAAc;eAoBA,OAAO,IAA6B;;;;MAMhD;CACD"}
1
+ {"version":3,"file":"vue-particles.vue.d.ts","sourceRoot":"","sources":["../../../src/Particles/vue-particles.vue"],"names":[],"mappings":"AAGA;AAmEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAe,MAAM,qBAAqB,CAAC;AACvF,OAAO,GAAG,MAAM,KAAK,CAAC;AAGtB,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC;AAiC7C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,GAAG;IACd,QAAQ,CAAC,EAAE,EAAG,MAAM,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IAElE,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,OAAO,IAAI,IAAI;IAMf,aAAa,IAAI,IAAI;CAGtB;AACD,QAAA,MAAM,YAAY,gMAA4C,CAAC;wBAe1C,OAAO,YAAY;AAAxC,wBAAyC"}
package/LICENSE DELETED
@@ -1,21 +0,0 @@
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 DELETED
@@ -1,145 +0,0 @@
1
- [![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)
2
-
3
- # @tsparticles/vue2
4
-
5
- [![npm](https://img.shields.io/npm/v/@tsparticles/vue2)](https://www.npmjs.com/package/@tsparticles/vue2) [![npm](https://img.shields.io/npm/dm/vue2-particles)](https://www.npmjs.com/package/vue2-particles) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
6
-
7
- Official [tsParticles](https://github.com/matteobruni/tsparticles) VueJS component
8
-
9
- [![Slack](https://particles.js.org/images/slack.png)](https://join.slack.com/t/tsparticles/shared_invite/enQtOTcxNTQxNjQ4NzkxLWE2MTZhZWExMWRmOWI5MTMxNjczOGE1Yjk0MjViYjdkYTUzODM3OTc5MGQ5MjFlODc4MzE0N2Q1OWQxZDc1YzI) [![Discord](https://particles.js.org/images/discord.png)](https://discord.gg/hACwv45Hme) [![Telegram](https://particles.js.org/images/telegram.png)](https://t.me/tsparticles)
10
-
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
-
13
- ## Installation
14
-
15
- ```shell script
16
- yarn add @tsparticles/vue2
17
- ```
18
-
19
- ## Usage
20
-
21
- ```javascript
22
- import Particles from "@tsparticles/vue2";
23
- //import { loadFull } from "tsparticles"; // if you are going to use `loadFull`, install the "tsparticles" package too.
24
- import { loadSlim } from "@tsparticles/slim"; // if you are going to use `loadSlim`, install the "@tsparticles/slim" package too.
25
-
26
- Vue.use(Particles, {
27
- init: async engine => {
28
- // await loadFull(engine);
29
- await loadSlim(engine);
30
- },
31
- });
32
- ```
33
-
34
- ### Demo config
35
-
36
- ```html
37
- <template>
38
- <div id="app">
39
- <vue-particles id="tsparticles" :particlesLoaded="particlesLoaded" url="http://foo.bar/particles.json" />
40
-
41
- <!-- or -->
42
-
43
- <vue-particles
44
- id="tsparticles"
45
- :particlesLoaded="particlesLoaded"
46
- :options="{
47
- background: {
48
- color: {
49
- value: '#0d47a1'
50
- }
51
- },
52
- fpsLimit: 120,
53
- interactivity: {
54
- events: {
55
- onClick: {
56
- enable: true,
57
- mode: 'push'
58
- },
59
- onHover: {
60
- enable: true,
61
- mode: 'repulse'
62
- },
63
- },
64
- modes: {
65
- bubble: {
66
- distance: 400,
67
- duration: 2,
68
- opacity: 0.8,
69
- size: 40
70
- },
71
- push: {
72
- quantity: 4
73
- },
74
- repulse: {
75
- distance: 200,
76
- duration: 0.4
77
- }
78
- }
79
- },
80
- particles: {
81
- color: {
82
- value: '#ffffff'
83
- },
84
- links: {
85
- color: '#ffffff',
86
- distance: 150,
87
- enable: true,
88
- opacity: 0.5,
89
- width: 1
90
- },
91
- move: {
92
- direction: 'none',
93
- enable: true,
94
- outModes: 'bounce',
95
- random: false,
96
- speed: 6,
97
- straight: false
98
- },
99
- number: {
100
- density: {
101
- enable: true,
102
- },
103
- value: 80
104
- },
105
- opacity: {
106
- value: 0.5
107
- },
108
- shape: {
109
- type: 'circle'
110
- },
111
- size: {
112
- value: { min: 1, max: 5 },
113
- }
114
- },
115
- detectRetina: true
116
- }"
117
- />
118
- </div>
119
- </template>
120
- ```
121
-
122
- ```javascript
123
- const particlesLoaded = async container => {
124
- console.log("Particles container loaded", container);
125
- };
126
- ```
127
-
128
- ### TypeScript errors
129
-
130
- If TypeScript returns error while importing/using Particles plugin try adding the following import before the previous
131
- code:
132
-
133
- ```typescript
134
- declare module "@tsparticles/vue2";
135
- ```
136
-
137
- ## Demos
138
-
139
- The demo website is [here](https://particles.js.org)
140
-
141
- <https://particles.js.org>
142
-
143
- There's also a CodePen collection actively maintained and updated [here](https://codepen.io/collection/DPOage)
144
-
145
- <https://codepen.io/collection/DPOage>
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export {}
File without changes
File without changes
File without changes
File without changes