Socket
Socket
Sign inDemoInstall

vue3-particles

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-particles - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

41

CHANGELOG.md

@@ -6,4 +6,45 @@ # Change Log

## [2.0.4](https://github.com/matteobruni/tsparticles/compare/vue3-particles@1.43.1...vue3-particles@2.0.4) (2022-04-06)
**Note:** Version bump only for package vue3-particles
## 2.0.3 (2022-03-11)
## [1.43.1](https://github.com/matteobruni/tsparticles/compare/vue3-particles@1.43.0...vue3-particles@1.43.1) (2022-04-06)
**Note:** Version bump only for package vue3-particles
# [1.43.0](https://github.com/matteobruni/tsparticles/compare/vue3-particles@1.42.4...vue3-particles@1.43.0) (2022-04-04)
**Note:** Version bump only for package vue3-particles
## [1.42.4](https://github.com/matteobruni/tsparticles/compare/vue3-particles@1.42.3...vue3-particles@1.42.4) (2022-03-20)
**Note:** Version bump only for package vue3-particles
## [1.42.3](https://github.com/matteobruni/tsparticles/compare/vue3-particles@1.42.2...vue3-particles@1.42.3) (2022-03-18)
**Note:** Version bump only for package vue3-particles
## 1.42.2 (2022-03-14)
**Note:** Version bump only for package vue3-particles

30

dist/vue3-particles.js
import { nextTick, openBlock, createElementBlock } from 'vue';
import { Options, Vue } from 'vue-class-component';
import { tsParticles } from 'tsparticles';
import { tsParticles } from 'tsparticles-engine';

@@ -27,5 +27,15 @@ /*! *****************************************************************************

function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
let Particles = class Particles extends Vue {
mounted() {
nextTick(() => {
nextTick(() => __awaiter(this, void 0, void 0, function* () {
var _a;

@@ -37,3 +47,3 @@ if (!this.id) {

if (this.particlesInit) {
this.particlesInit(tsParticles);
yield this.particlesInit(tsParticles);
}

@@ -46,13 +56,5 @@ const cb = (container) => {

};
if (this.url) {
tsParticles
.loadJSON(this.id, this.url)
.then(cb);
}
else {
tsParticles
.load(this.id, (_a = this.options) !== null && _a !== void 0 ? _a : {})
.then(cb);
}
});
const container = yield (this.url ? tsParticles.loadJSON(this.id, this.url) : tsParticles.load(this.id, (_a = this.options) !== null && _a !== void 0 ? _a : {}));
cb(container);
}));
}

@@ -59,0 +61,0 @@ beforeDestroy() {

@@ -1,2 +0,2 @@

import{nextTick as t,openBlock as e,createElementBlock as i}from"vue";import{Options as r,Vue as o}from"vue-class-component";import{tsParticles as n}from"tsparticles";
import{nextTick as t,openBlock as e,createElementBlock as i}from"vue";import{Options as n,Vue as r}from"vue-class-component";import{tsParticles as o}from"tsparticles-engine";
/*! *****************************************************************************

@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */let s=class extends o{mounted(){t((()=>{var t;if(!this.id)throw new Error("Prop 'id' is required!");n.init(),this.particlesInit&&this.particlesInit(n);const e=t=>{this.container=t,this.particlesLoaded&&t&&this.particlesLoaded(t)};this.url?n.loadJSON(this.id,this.url).then(e):n.load(this.id,null!==(t=this.options)&&void 0!==t?t:{}).then(e)}))}beforeDestroy(){this.container&&this.container.destroy()}};s=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s}([r({props:{id:{type:String,required:!0},options:{type:Object},url:{type:String},particlesLoaded:{type:Function},particlesInit:{type:Function}}})],s);var c=s;const l=["id"];c.render=function(t,r,o,n,s,c){return e(),i("div",{id:t.id},null,8,l)},c.__file="src/Particles/Particles.vue";const a=(t,e)=>{t.component("Particles",c)};export{c as ParticlesComponent,a as default};
***************************************************************************** */function c(t,e,i,n){return new(i||(i=Promise))((function(r,o){function c(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(c,s)}l((n=n.apply(t,e||[])).next())}))}let s=class extends r{mounted(){t((()=>c(this,void 0,void 0,(function*(){var t;if(!this.id)throw new Error("Prop 'id' is required!");o.init(),this.particlesInit&&(yield this.particlesInit(o));(t=>{this.container=t,this.particlesLoaded&&t&&this.particlesLoaded(t)})(yield this.url?o.loadJSON(this.id,this.url):o.load(this.id,null!==(t=this.options)&&void 0!==t?t:{}))}))))}beforeDestroy(){this.container&&this.container.destroy()}};s=function(t,e,i,n){var r,o=arguments.length,c=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(c=(o<3?r(c):o>3?r(e,i,c):r(e,i))||c);return o>3&&c&&Object.defineProperty(e,i,c),c}([n({props:{id:{type:String,required:!0},options:{type:Object},url:{type:String},particlesLoaded:{type:Function},particlesInit:{type:Function}}})],s);var l=s;const a=["id"];l.render=function(t,n,r,o,c,s){return e(),i("div",{id:t.id},null,8,a)},l.__file="src/Particles/Particles.vue";const d=(t,e)=>{t.component("Particles",l)};export{l as ParticlesComponent,d as default};
{
"name": "vue3-particles",
"version": "2.0.3",
"version": "2.0.4",
"description": "Official tsParticles Vue.js 3.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 2.x, Angular, Svelte, jQuery, Preact, Riot.js, Solid.js, Inferno.",

@@ -94,3 +94,3 @@ "scripts": {

"core-js": "^3.20.1",
"tsparticles": "^1.42.1",
"tsparticles-engine": "^2.0.4",
"vue-class-component": "^8.0.0-rc.1"

@@ -123,8 +123,8 @@ },

"rollup-plugin-vue": "^6.0.0",
"ssri": "^8.0.1",
"typescript": "~4.5.0",
"ssri": "^9.0.0",
"typescript": "~4.6.3",
"vue": "^2.6.14",
"vue-template-compiler": "^2.6.14"
},
"gitHead": "cbc682a6b5da7709522417ee1f05e4e99717c98a"
"gitHead": "7fab5cc75156e53d04692f72d8936009fb8a203f"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc