Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tsparticles/confetti

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsparticles/confetti - npm Package Compare versions

Comparing version 3.0.0-beta.0 to 3.0.0-beta.1

browser/package.json

2

browser/confetti.js
import { isSsr, isString, tsParticles, } from "@tsparticles/engine";
import { ConfettiOptions } from "./ConfettiOptions";
import { ConfettiOptions } from "./ConfettiOptions.js";
import { loadBasic } from "@tsparticles/basic";

@@ -4,0 +4,0 @@ import { loadCardsShape } from "@tsparticles/shape-cards";

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

export * from "./confetti";
export * from "./confetti.js";

@@ -5,3 +5,3 @@ "use strict";

const engine_1 = require("@tsparticles/engine");
const ConfettiOptions_1 = require("./ConfettiOptions");
const ConfettiOptions_js_1 = require("./ConfettiOptions.js");
const basic_1 = require("@tsparticles/basic");

@@ -60,3 +60,3 @@ const shape_cards_1 = require("@tsparticles/shape-cards");

async function setConfetti(params) {
const actualOptions = new ConfettiOptions_1.ConfettiOptions();
const actualOptions = new ConfettiOptions_js_1.ConfettiOptions();
actualOptions.load(params.options);

@@ -63,0 +63,0 @@ let container;

@@ -17,2 +17,2 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./confetti"), exports);
__exportStar(require("./confetti.js"), exports);
import { isSsr, isString, tsParticles, } from "@tsparticles/engine";
import { ConfettiOptions } from "./ConfettiOptions";
import { ConfettiOptions } from "./ConfettiOptions.js";
import { loadBasic } from "@tsparticles/basic";

@@ -4,0 +4,0 @@ import { loadCardsShape } from "@tsparticles/shape-cards";

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

export * from "./confetti";
export * from "./confetti.js";
{
"name": "@tsparticles/confetti",
"version": "3.0.0-beta.0",
"version": "3.0.0-beta.1",
"description": "Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",

@@ -83,25 +83,37 @@ "homepage": "https://particles.js.org",

],
"sideEffects": false,
"jsdelivr": "tsparticles.confetti.bundle.min.js",
"unpkg": "tsparticles.confetti.bundle.min.js",
"browser": "browser/index.js",
"main": "cjs/index.js",
"module": "esm/index.js",
"jsdelivr": "tsparticles.confetti.bundle.min.js",
"unpkg": "tsparticles.confetti.bundle.min.js",
"sideEffects": false,
"types": "types/index.d.ts",
"exports": {
".": {
"types": "./types/index.d.ts",
"browser": "./browser/index.js",
"import": "./esm/index.js",
"require": "./cjs/index.js",
"umd": "./umd/index.js",
"default": "./cjs/index.js"
},
"./package.json": "./package.json"
},
"dependencies": {
"@tsparticles/basic": "^3.0.0-beta.0",
"@tsparticles/engine": "^3.0.0-beta.0",
"@tsparticles/plugin-emitters": "^3.0.0-beta.0",
"@tsparticles/plugin-motion": "^3.0.0-beta.0",
"@tsparticles/shape-cards": "^3.0.0-beta.0",
"@tsparticles/shape-heart": "^3.0.0-beta.0",
"@tsparticles/shape-image": "^3.0.0-beta.0",
"@tsparticles/shape-polygon": "^3.0.0-beta.0",
"@tsparticles/shape-square": "^3.0.0-beta.0",
"@tsparticles/shape-star": "^3.0.0-beta.0",
"@tsparticles/shape-text": "^3.0.0-beta.0",
"@tsparticles/updater-life": "^3.0.0-beta.0",
"@tsparticles/updater-roll": "^3.0.0-beta.0",
"@tsparticles/updater-rotate": "^3.0.0-beta.0",
"@tsparticles/updater-tilt": "^3.0.0-beta.0",
"@tsparticles/updater-wobble": "^3.0.0-beta.0"
"@tsparticles/basic": "^3.0.0-beta.1",
"@tsparticles/engine": "^3.0.0-beta.1",
"@tsparticles/plugin-emitters": "^3.0.0-beta.1",
"@tsparticles/plugin-motion": "^3.0.0-beta.1",
"@tsparticles/shape-cards": "^3.0.0-beta.1",
"@tsparticles/shape-heart": "^3.0.0-beta.1",
"@tsparticles/shape-image": "^3.0.0-beta.1",
"@tsparticles/shape-polygon": "^3.0.0-beta.1",
"@tsparticles/shape-square": "^3.0.0-beta.1",
"@tsparticles/shape-star": "^3.0.0-beta.1",
"@tsparticles/shape-text": "^3.0.0-beta.1",
"@tsparticles/updater-life": "^3.0.0-beta.1",
"@tsparticles/updater-roll": "^3.0.0-beta.1",
"@tsparticles/updater-rotate": "^3.0.0-beta.1",
"@tsparticles/updater-tilt": "^3.0.0-beta.1",
"@tsparticles/updater-wobble": "^3.0.0-beta.1"
},

@@ -108,0 +120,0 @@ "publishConfig": {

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

/*! tsParticles Confetti v3.0.0-beta.0 by Matteo Bruni */
/*! tsParticles Confetti v3.0.0-beta.1 by Matteo Bruni */

@@ -7,14 +7,14 @@ /*!

* How to use? : Check the GitHub README
* v3.0.0-beta.0
* v3.0.0-beta.1
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/shape-cards"), require("@tsparticles/plugin-emitters"), require("@tsparticles/shape-heart"), require("@tsparticles/shape-image"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-polygon"), require("@tsparticles/updater-roll"), require("@tsparticles/shape-square"), require("@tsparticles/shape-star"), require("@tsparticles/shape-text"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble"), require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"));
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"), require("@tsparticles/shape-cards"), require("@tsparticles/plugin-emitters"), require("@tsparticles/shape-heart"), require("@tsparticles/shape-image"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-polygon"), require("@tsparticles/updater-roll"), require("@tsparticles/shape-square"), require("@tsparticles/shape-star"), require("@tsparticles/shape-text"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble"));
else if(typeof define === 'function' && define.amd)
define(["@tsparticles/engine", "@tsparticles/shape-cards", "@tsparticles/plugin-emitters", "@tsparticles/shape-heart", "@tsparticles/shape-image", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/shape-polygon", "@tsparticles/updater-roll", "@tsparticles/shape-square", "@tsparticles/shape-star", "@tsparticles/shape-text", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble", "@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/updater-size"], factory);
define(["@tsparticles/engine", "@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/updater-size", "@tsparticles/shape-cards", "@tsparticles/plugin-emitters", "@tsparticles/shape-heart", "@tsparticles/shape-image", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/shape-polygon", "@tsparticles/updater-roll", "@tsparticles/shape-square", "@tsparticles/shape-star", "@tsparticles/shape-text", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble"], factory);
else {
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/shape-cards"), require("@tsparticles/plugin-emitters"), require("@tsparticles/shape-heart"), require("@tsparticles/shape-image"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-polygon"), require("@tsparticles/updater-roll"), require("@tsparticles/shape-square"), require("@tsparticles/shape-star"), require("@tsparticles/shape-text"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble"), require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"), require("@tsparticles/shape-cards"), require("@tsparticles/plugin-emitters"), require("@tsparticles/shape-heart"), require("@tsparticles/shape-image"), require("@tsparticles/updater-life"), require("@tsparticles/plugin-motion"), require("@tsparticles/shape-polygon"), require("@tsparticles/updater-roll"), require("@tsparticles/shape-square"), require("@tsparticles/shape-star"), require("@tsparticles/shape-text"), require("@tsparticles/updater-tilt"), require("@tsparticles/updater-wobble")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__885__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__82__, __WEBPACK_EXTERNAL_MODULE__907__, __WEBPACK_EXTERNAL_MODULE__734__, __WEBPACK_EXTERNAL_MODULE__55__, __WEBPACK_EXTERNAL_MODULE__960__, __WEBPACK_EXTERNAL_MODULE__727__, __WEBPACK_EXTERNAL_MODULE__448__, __WEBPACK_EXTERNAL_MODULE__83__, __WEBPACK_EXTERNAL_MODULE__619__, __WEBPACK_EXTERNAL_MODULE__163__, __WEBPACK_EXTERNAL_MODULE__501__, __WEBPACK_EXTERNAL_MODULE__446__, __WEBPACK_EXTERNAL_MODULE__290__, __WEBPACK_EXTERNAL_MODULE__2__) => {
})(this, (__WEBPACK_EXTERNAL_MODULE__533__, __WEBPACK_EXTERNAL_MODULE__619__, __WEBPACK_EXTERNAL_MODULE__163__, __WEBPACK_EXTERNAL_MODULE__501__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__290__, __WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__345__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__885__, __WEBPACK_EXTERNAL_MODULE__84__, __WEBPACK_EXTERNAL_MODULE__82__, __WEBPACK_EXTERNAL_MODULE__907__, __WEBPACK_EXTERNAL_MODULE__734__, __WEBPACK_EXTERNAL_MODULE__652__, __WEBPACK_EXTERNAL_MODULE__960__, __WEBPACK_EXTERNAL_MODULE__727__, __WEBPACK_EXTERNAL_MODULE__448__, __WEBPACK_EXTERNAL_MODULE__83__) => {
return /******/ (() => { // webpackBootstrap

@@ -52,6 +52,6 @@ /******/ "use strict";

/***/ 686:
/***/ 345:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
module.exports = __WEBPACK_EXTERNAL_MODULE__345__;

@@ -88,6 +88,6 @@ /***/ }),

/***/ 55:
/***/ 652:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__55__;
module.exports = __WEBPACK_EXTERNAL_MODULE__652__;

@@ -124,6 +124,6 @@ /***/ }),

/***/ 446:
/***/ 686:
/***/ ((module) => {
module.exports = __WEBPACK_EXTERNAL_MODULE__446__;
module.exports = __WEBPACK_EXTERNAL_MODULE__686__;

@@ -361,3 +361,3 @@ /***/ }),

// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
var updater_opacity_root_window_ = __webpack_require__(446);
var updater_opacity_root_window_ = __webpack_require__(686);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}

@@ -367,3 +367,3 @@ var updater_out_modes_root_window_ = __webpack_require__(290);

var updater_size_root_window_ = __webpack_require__(2);
;// CONCATENATED MODULE: ../basic/dist/esm/index.js
;// CONCATENATED MODULE: ../basic/dist/browser/index.js

@@ -385,3 +385,3 @@

// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-cards","commonjs2":"@tsparticles/shape-cards","amd":"@tsparticles/shape-cards","root":"window"}
var shape_cards_root_window_ = __webpack_require__(686);
var shape_cards_root_window_ = __webpack_require__(345);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}

@@ -401,3 +401,3 @@ var plugin_emitters_root_window_ = __webpack_require__(68);

var updater_roll_root_window_ = __webpack_require__(734);
;// CONCATENATED MODULE: ../../updaters/rotate/dist/esm/Options/Classes/RotateAnimation.js
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/Options/Classes/RotateAnimation.js

@@ -429,3 +429,3 @@ class RotateAnimation {

}
;// CONCATENATED MODULE: ../../updaters/rotate/dist/esm/Options/Classes/Rotate.js
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/Options/Classes/Rotate.js

@@ -455,3 +455,3 @@

}
;// CONCATENATED MODULE: ../../updaters/rotate/dist/esm/RotateUpdater.js
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/RotateUpdater.js

@@ -552,3 +552,3 @@

}
;// CONCATENATED MODULE: ../../updaters/rotate/dist/esm/index.js
;// CONCATENATED MODULE: ../../updaters/rotate/dist/browser/index.js

@@ -559,3 +559,3 @@ async function loadRotateUpdater(engine, refresh = true) {

// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-square","commonjs2":"@tsparticles/shape-square","amd":"@tsparticles/shape-square","root":"window"}
var shape_square_root_window_ = __webpack_require__(55);
var shape_square_root_window_ = __webpack_require__(652);
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-star","commonjs2":"@tsparticles/shape-star","amd":"@tsparticles/shape-star","root":"window"}

@@ -562,0 +562,0 @@ var shape_star_root_window_ = __webpack_require__(960);

/*! For license information please see tsparticles.confetti.min.js.LICENSE.txt */
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/shape-cards"),require("@tsparticles/plugin-emitters"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/shape-text"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"),require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/shape-cards","@tsparticles/plugin-emitters","@tsparticles/shape-heart","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/shape-polygon","@tsparticles/updater-roll","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/shape-text","@tsparticles/updater-tilt","@tsparticles/updater-wobble","@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/updater-size"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/shape-cards"),require("@tsparticles/plugin-emitters"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/shape-text"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"),require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,((e,t,i,a,s,r,o,n,l,c,p,d,u,h,y,v,f,w,m,g)=>(()=>{"use strict";var x={533:t=>{t.exports=e},619:e=>{e.exports=y},68:e=>{e.exports=i},82:e=>{e.exports=o},686:e=>{e.exports=t},163:e=>{e.exports=v},12:e=>{e.exports=a},885:e=>{e.exports=s},907:e=>{e.exports=n},55:e=>{e.exports=c},960:e=>{e.exports=p},727:e=>{e.exports=d},501:e=>{e.exports=f},84:e=>{e.exports=r},446:e=>{e.exports=w},290:e=>{e.exports=m},734:e=>{e.exports=l},2:e=>{e.exports=g},448:e=>{e.exports=u},83:e=>{e.exports=h}},b={};function q(e){var t=b[e];if(void 0!==t)return t.exports;var i=b[e]={exports:{}};return x[e](i,i.exports,q),i.exports}q.d=(e,t)=>{for(var i in t)q.o(t,i)&&!q.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},q.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),q.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var S={};return(()=>{q.r(S),q.d(S,{confetti:()=>I});var e=q(533);class t{constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.shapeOptions={}}get origin(){return{x:this.position.x/100,y:this.position.y/100}}set origin(e){this.position.x=100*e.x,this.position.y=100*e.y}get particleCount(){return this.count}set particleCount(e){this.count=e}load(t){if(!t)return;void 0!==t.angle&&(this.angle=t.angle);const i=t.count??t.particleCount;void 0!==i&&(this.count=i),void 0!==t.spread&&(this.spread=t.spread),void 0!==t.startVelocity&&(this.startVelocity=t.startVelocity),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.gravity&&(this.gravity=t.gravity),void 0!==t.drift&&(this.drift=t.drift),void 0!==t.ticks&&(this.ticks=t.ticks);const a=t.origin;a&&!t.position&&(t.position={x:void 0!==a.x?100*a.x:void 0,y:void 0!==a.y?100*a.y:void 0});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const r=t.shapeOptions;if(void 0!==r)for(const t in r){const i=r[t];i&&(this.shapeOptions[t]=(0,e.deepExtend)(this.shapeOptions[t]??{},i))}void 0!==t.shapes&&((0,e.isArray)(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),void 0!==t.scalar&&(this.scalar=t.scalar),void 0!==t.zIndex&&(this.zIndex=t.zIndex),void 0!==t.disableForReducedMotion&&(this.disableForReducedMotion=t.disableForReducedMotion)}}var i=q(619),a=q(163),s=q(501),r=q(446),o=q(290),n=q(2);var l=q(686),c=q(68),p=q(12),d=q(885),u=q(84),h=q(82),y=q(907),v=q(734);class f{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.decay&&(this.decay=(0,e.setRangeValue)(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class w extends e.ValueWithRandom{constructor(){super(),this.animation=new f,this.direction="clockwise",this.path=!1,this.value=0}load(e){e&&(super.load(e),void 0!==e.direction&&(this.direction=e.direction),this.animation.load(e.animation),void 0!==e.path&&(this.path=e.path))}}class m{constructor(e){this.container=e}init(t){const i=t.options.rotate;if(!i)return;t.rotate={enable:i.animation.enable,value:(0,e.getRangeValue)(i.value)*Math.PI/180},t.pathRotation=i.path;let a=i.direction;if("random"===a){a=Math.floor(2*(0,e.getRandom)())>0?"counter-clockwise":"clockwise"}switch(a){case"counter-clockwise":case"counterClockwise":t.rotate.status="decreasing";break;case"clockwise":t.rotate.status="increasing"}const s=i.animation;s.enable&&(t.rotate.decay=1-(0,e.getRangeValue)(s.decay),t.rotate.velocity=(0,e.getRangeValue)(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=(0,e.getRandom)())),t.rotation=t.rotate.value}isEnabled(e){const t=e.options.rotate;return!!t&&(!e.destroyed&&!e.spawning&&t.animation.enable&&!t.path)}loadOptions(e,...t){e.rotate||(e.rotate=new w);for(const i of t)e.rotate.load(i?.rotate)}update(e,t){this.isEnabled(e)&&(!function(e,t){const i=e.rotate,a=e.options.rotate;if(!i||!a)return;const s=a.animation,r=(i.velocity??0)*t.factor,o=2*Math.PI,n=i.decay??1;s.enable&&("increasing"===i.status?(i.value+=r,i.value>o&&(i.value-=o)):(i.value-=r,i.value<0&&(i.value+=o)),i.velocity&&1!==n&&(i.velocity*=n))}(e,t),e.rotation=e.rotate?.value??0)}}var g=q(55),x=q(960),b=q(727),R=q(448),M=q(83);let P=!1,k=!1;const z=new Map;async function O(e){if(!P){if(k)return new Promise((e=>{const t=setInterval((()=>{P&&(clearInterval(t),e())}),100)}));k=!0,await(0,c.loadEmittersPlugin)(e,!1),await(0,h.loadMotionPlugin)(e,!1),await(0,l.loadCardsShape)(e,!1),await(0,p.loadHeartShape)(e,!1),await(0,d.loadImageShape)(e,!1),await(0,y.loadPolygonShape)(e,!1),await(0,g.loadSquareShape)(e,!1),await(0,x.loadStarShape)(e,!1),await(0,b.loadTextShape)(e,!1),await async function(e,t=!0){await e.addParticleUpdater("rotate",(e=>new m(e)),t)}(e,!1),await(0,u.loadLifeUpdater)(e,!1),await(0,v.loadRollUpdater)(e,!1),await(0,R.loadTiltUpdater)(e,!1),await(0,M.loadWobbleUpdater)(e,!1),await async function(e,t=!0){await(0,i.loadBaseMover)(e,!1),await(0,a.loadCircleShape)(e,!1),await(0,s.loadColorUpdater)(e,!1),await(0,r.loadOpacityUpdater)(e,!1),await(0,o.loadOutModesUpdater)(e,!1),await(0,n.loadSizeUpdater)(e,!1),await e.refresh(t)}(e),k=!1,P=!0}}async function V(i){const a=new t;let s;a.load(i.options);const r=1e3*a.ticks/432e3;if(z.has(i.id)&&(s=z.get(i.id),s&&!s.destroyed)){const e=s;if(e.addEmitter)return void e.addEmitter({startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:5*a.scalar},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},gravity:{acceleration:9.81*a.gravity},speed:3*a.startVelocity,decay:1-a.decay,direction:-a.angle}}})}const o={fullScreen:{enable:!i.canvas,zIndex:a.zIndex},fpsLimit:120,particles:{number:{value:0},color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:5*a.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*a.gravity},speed:3*a.startVelocity,decay:1-a.decay,direction:-a.angle,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:{min:0,max:360},direction:"random",animation:{enable:!0,speed:60}},tilt:{direction:"random",enable:!0,value:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!0,speed:{min:15,max:25}},wobble:{distance:30,enable:!0,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:a.disableForReducedMotion},emitters:{name:"confetti",startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};return s=await e.tsParticles.load({id:i.id,element:i.canvas,options:o}),z.set(i.id,s),s}async function I(t,i){let a,s;return await O(e.tsParticles),(0,e.isString)(t)?(s=t,a=i??{}):(s="confetti",a=t),V({id:s,options:a})}I.create=async(t,i)=>{if(!t)return I;await O(e.tsParticles);const a=t.getAttribute("id")||"confetti";return t.setAttribute("id",a),async(s,r)=>{let o,n;return(0,e.isString)(s)?(n=s,o=r??i):(n=a,o=s),V({id:n,canvas:t,options:o})}},I.version=e.tsParticles.version,(0,e.isSsr)()||(window.confetti=I)})(),S})()));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size"),require("@tsparticles/shape-cards"),require("@tsparticles/plugin-emitters"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/shape-text"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/updater-size","@tsparticles/shape-cards","@tsparticles/plugin-emitters","@tsparticles/shape-heart","@tsparticles/shape-image","@tsparticles/updater-life","@tsparticles/plugin-motion","@tsparticles/shape-polygon","@tsparticles/updater-roll","@tsparticles/shape-square","@tsparticles/shape-star","@tsparticles/shape-text","@tsparticles/updater-tilt","@tsparticles/updater-wobble"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size"),require("@tsparticles/shape-cards"),require("@tsparticles/plugin-emitters"),require("@tsparticles/shape-heart"),require("@tsparticles/shape-image"),require("@tsparticles/updater-life"),require("@tsparticles/plugin-motion"),require("@tsparticles/shape-polygon"),require("@tsparticles/updater-roll"),require("@tsparticles/shape-square"),require("@tsparticles/shape-star"),require("@tsparticles/shape-text"),require("@tsparticles/updater-tilt"),require("@tsparticles/updater-wobble")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in i)("object"==typeof exports?exports:e)[a]=i[a]}}(this,((e,t,i,a,s,r,o,n,l,c,p,d,u,h,y,v,f,w,m,g)=>(()=>{"use strict";var x={533:t=>{t.exports=e},619:e=>{e.exports=t},68:e=>{e.exports=l},82:e=>{e.exports=u},345:e=>{e.exports=n},163:e=>{e.exports=i},12:e=>{e.exports=c},885:e=>{e.exports=p},907:e=>{e.exports=h},652:e=>{e.exports=v},960:e=>{e.exports=f},727:e=>{e.exports=w},501:e=>{e.exports=a},84:e=>{e.exports=d},686:e=>{e.exports=s},290:e=>{e.exports=r},734:e=>{e.exports=y},2:e=>{e.exports=o},448:e=>{e.exports=m},83:e=>{e.exports=g}},b={};function q(e){var t=b[e];if(void 0!==t)return t.exports;var i=b[e]={exports:{}};return x[e](i,i.exports,q),i.exports}q.d=(e,t)=>{for(var i in t)q.o(t,i)&&!q.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},q.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),q.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var S={};return(()=>{q.r(S),q.d(S,{confetti:()=>I});var e=q(533);class t{constructor(){this.angle=90,this.count=50,this.spread=45,this.startVelocity=45,this.decay=.9,this.gravity=1,this.drift=0,this.ticks=200,this.position={x:50,y:50},this.colors=["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],this.shapes=["square","circle"],this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0,this.shapeOptions={}}get origin(){return{x:this.position.x/100,y:this.position.y/100}}set origin(e){this.position.x=100*e.x,this.position.y=100*e.y}get particleCount(){return this.count}set particleCount(e){this.count=e}load(t){if(!t)return;void 0!==t.angle&&(this.angle=t.angle);const i=t.count??t.particleCount;void 0!==i&&(this.count=i),void 0!==t.spread&&(this.spread=t.spread),void 0!==t.startVelocity&&(this.startVelocity=t.startVelocity),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.gravity&&(this.gravity=t.gravity),void 0!==t.drift&&(this.drift=t.drift),void 0!==t.ticks&&(this.ticks=t.ticks);const a=t.origin;a&&!t.position&&(t.position={x:void 0!==a.x?100*a.x:void 0,y:void 0!==a.y?100*a.y:void 0});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors);const r=t.shapeOptions;if(void 0!==r)for(const t in r){const i=r[t];i&&(this.shapeOptions[t]=(0,e.deepExtend)(this.shapeOptions[t]??{},i))}void 0!==t.shapes&&((0,e.isArray)(t.shapes)?this.shapes=[...t.shapes]:this.shapes=t.shapes),void 0!==t.scalar&&(this.scalar=t.scalar),void 0!==t.zIndex&&(this.zIndex=t.zIndex),void 0!==t.disableForReducedMotion&&(this.disableForReducedMotion=t.disableForReducedMotion)}}var i=q(619),a=q(163),s=q(501),r=q(686),o=q(290),n=q(2);var l=q(345),c=q(68),p=q(12),d=q(885),u=q(84),h=q(82),y=q(907),v=q(734);class f{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.decay&&(this.decay=(0,e.setRangeValue)(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class w extends e.ValueWithRandom{constructor(){super(),this.animation=new f,this.direction="clockwise",this.path=!1,this.value=0}load(e){e&&(super.load(e),void 0!==e.direction&&(this.direction=e.direction),this.animation.load(e.animation),void 0!==e.path&&(this.path=e.path))}}class m{constructor(e){this.container=e}init(t){const i=t.options.rotate;if(!i)return;t.rotate={enable:i.animation.enable,value:(0,e.getRangeValue)(i.value)*Math.PI/180},t.pathRotation=i.path;let a=i.direction;if("random"===a){a=Math.floor(2*(0,e.getRandom)())>0?"counter-clockwise":"clockwise"}switch(a){case"counter-clockwise":case"counterClockwise":t.rotate.status="decreasing";break;case"clockwise":t.rotate.status="increasing"}const s=i.animation;s.enable&&(t.rotate.decay=1-(0,e.getRangeValue)(s.decay),t.rotate.velocity=(0,e.getRangeValue)(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=(0,e.getRandom)())),t.rotation=t.rotate.value}isEnabled(e){const t=e.options.rotate;return!!t&&(!e.destroyed&&!e.spawning&&t.animation.enable&&!t.path)}loadOptions(e,...t){e.rotate||(e.rotate=new w);for(const i of t)e.rotate.load(i?.rotate)}update(e,t){this.isEnabled(e)&&(!function(e,t){const i=e.rotate,a=e.options.rotate;if(!i||!a)return;const s=a.animation,r=(i.velocity??0)*t.factor,o=2*Math.PI,n=i.decay??1;s.enable&&("increasing"===i.status?(i.value+=r,i.value>o&&(i.value-=o)):(i.value-=r,i.value<0&&(i.value+=o)),i.velocity&&1!==n&&(i.velocity*=n))}(e,t),e.rotation=e.rotate?.value??0)}}var g=q(652),x=q(960),b=q(727),R=q(448),M=q(83);let P=!1,k=!1;const z=new Map;async function O(e){if(!P){if(k)return new Promise((e=>{const t=setInterval((()=>{P&&(clearInterval(t),e())}),100)}));k=!0,await(0,c.loadEmittersPlugin)(e,!1),await(0,h.loadMotionPlugin)(e,!1),await(0,l.loadCardsShape)(e,!1),await(0,p.loadHeartShape)(e,!1),await(0,d.loadImageShape)(e,!1),await(0,y.loadPolygonShape)(e,!1),await(0,g.loadSquareShape)(e,!1),await(0,x.loadStarShape)(e,!1),await(0,b.loadTextShape)(e,!1),await async function(e,t=!0){await e.addParticleUpdater("rotate",(e=>new m(e)),t)}(e,!1),await(0,u.loadLifeUpdater)(e,!1),await(0,v.loadRollUpdater)(e,!1),await(0,R.loadTiltUpdater)(e,!1),await(0,M.loadWobbleUpdater)(e,!1),await async function(e,t=!0){await(0,i.loadBaseMover)(e,!1),await(0,a.loadCircleShape)(e,!1),await(0,s.loadColorUpdater)(e,!1),await(0,r.loadOpacityUpdater)(e,!1),await(0,o.loadOutModesUpdater)(e,!1),await(0,n.loadSizeUpdater)(e,!1),await e.refresh(t)}(e),k=!1,P=!0}}async function V(i){const a=new t;let s;a.load(i.options);const r=1e3*a.ticks/432e3;if(z.has(i.id)&&(s=z.get(i.id),s&&!s.destroyed)){const e=s;if(e.addEmitter)return void e.addEmitter({startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},life:{count:1},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:5*a.scalar},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},gravity:{acceleration:9.81*a.gravity},speed:3*a.startVelocity,decay:1-a.decay,direction:-a.angle}}})}const o={fullScreen:{enable:!i.canvas,zIndex:a.zIndex},fpsLimit:120,particles:{number:{value:0},color:{value:a.colors},shape:{type:a.shapes,options:a.shapeOptions},opacity:{value:{min:0,max:1},animation:{enable:!0,sync:!0,speed:r,startValue:"max",destroy:"min"}},size:{value:5*a.scalar},links:{enable:!1},life:{count:1},move:{angle:{value:a.spread,offset:0},drift:{min:-a.drift,max:a.drift},enable:!0,gravity:{enable:!0,acceleration:9.81*a.gravity},speed:3*a.startVelocity,decay:1-a.decay,direction:-a.angle,random:!0,straight:!1,outModes:{default:"none",bottom:"destroy"}},rotate:{value:{min:0,max:360},direction:"random",animation:{enable:!0,speed:60}},tilt:{direction:"random",enable:!0,value:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:25},enable:!0,speed:{min:15,max:25}},wobble:{distance:30,enable:!0,speed:{min:-15,max:15}}},detectRetina:!0,motion:{disable:a.disableForReducedMotion},emitters:{name:"confetti",startCount:a.count,position:a.position,size:{width:0,height:0},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}};return s=await e.tsParticles.load({id:i.id,element:i.canvas,options:o}),z.set(i.id,s),s}async function I(t,i){let a,s;return await O(e.tsParticles),(0,e.isString)(t)?(s=t,a=i??{}):(s="confetti",a=t),V({id:s,options:a})}I.create=async(t,i)=>{if(!t)return I;await O(e.tsParticles);const a=t.getAttribute("id")||"confetti";return t.setAttribute("id",a),async(s,r)=>{let o,n;return(0,e.isString)(s)?(n=s,o=r??i):(n=a,o=s),V({id:n,canvas:t,options:o})}},I.version=e.tsParticles.version,(0,e.isSsr)()||(window.confetti=I)})(),S})()));

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

/*! tsParticles Confetti v3.0.0-beta.0 by Matteo Bruni */
/*! tsParticles Confetti v3.0.0-beta.1 by Matteo Bruni */
import { type Container, type RecursivePartial } from "@tsparticles/engine";
import type { IConfettiOptions } from "./IConfettiOptions";
import type { IConfettiOptions } from "./IConfettiOptions.js";
export type ConfettiFirstParam = string | RecursivePartial<IConfettiOptions>;

@@ -4,0 +4,0 @@ declare global {

import { type ICoordinates, type IOptionLoader, type RecursivePartial, type ShapeData, type SingleOrMultiple } from "@tsparticles/engine";
import type { IConfettiOptions } from "./IConfettiOptions";
import type { IConfettiOptions } from "./IConfettiOptions.js";
export declare class ConfettiOptions implements IConfettiOptions, IOptionLoader<IConfettiOptions> {

@@ -4,0 +4,0 @@ angle: number;

@@ -1,4 +0,4 @@

import type { IConfettiOptions } from "./IConfettiOptions";
import type { IConfettiOptions } from "./IConfettiOptions.js";
import type { RecursivePartial } from "@tsparticles/engine";
export type ConfettiOptions = RecursivePartial<IConfettiOptions>;
export * from "./confetti";
export * from "./confetti.js";

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@tsparticles/engine", "./ConfettiOptions", "@tsparticles/basic", "@tsparticles/shape-cards", "@tsparticles/plugin-emitters", "@tsparticles/shape-heart", "@tsparticles/shape-image", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/shape-polygon", "@tsparticles/updater-roll", "@tsparticles/updater-rotate", "@tsparticles/shape-square", "@tsparticles/shape-star", "@tsparticles/shape-text", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble"], factory);
define(["require", "exports", "@tsparticles/engine", "./ConfettiOptions.js", "@tsparticles/basic", "@tsparticles/shape-cards", "@tsparticles/plugin-emitters", "@tsparticles/shape-heart", "@tsparticles/shape-image", "@tsparticles/updater-life", "@tsparticles/plugin-motion", "@tsparticles/shape-polygon", "@tsparticles/updater-roll", "@tsparticles/updater-rotate", "@tsparticles/shape-square", "@tsparticles/shape-star", "@tsparticles/shape-text", "@tsparticles/updater-tilt", "@tsparticles/updater-wobble"], factory);
}

@@ -15,3 +15,3 @@ })(function (require, exports) {

const engine_1 = require("@tsparticles/engine");
const ConfettiOptions_1 = require("./ConfettiOptions");
const ConfettiOptions_js_1 = require("./ConfettiOptions.js");
const basic_1 = require("@tsparticles/basic");

@@ -70,3 +70,3 @@ const shape_cards_1 = require("@tsparticles/shape-cards");

async function setConfetti(params) {
const actualOptions = new ConfettiOptions_1.ConfettiOptions();
const actualOptions = new ConfettiOptions_js_1.ConfettiOptions();
actualOptions.load(params.options);

@@ -73,0 +73,0 @@ let container;

@@ -21,3 +21,3 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./confetti"], factory);
define(["require", "exports", "./confetti.js"], factory);
}

@@ -27,3 +27,3 @@ })(function (require, exports) {

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./confetti"), exports);
__exportStar(require("./confetti.js"), exports);
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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