@tsparticles/vue2 4.1.3 → 4.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/vue2",
3
- "version": "4.1.3",
3
+ "version": "4.2.1",
4
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.",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -94,7 +94,7 @@
94
94
  },
95
95
  "peerDependencies": {
96
96
  "vue": "^2.7.0",
97
- "@tsparticles/engine": "4.1.3"
97
+ "@tsparticles/engine": "4.2.1"
98
98
  },
99
99
  "publishConfig": {
100
100
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../../../src/Particles/event-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE,OAAO,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAM5F,wBAAgB,6BAA6B,CAAC,IAAI,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B5F;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAAC,IAAI,CAAC,CAE9D;AAED,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}
1
+ {"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../../../src/Particles/event-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,MAAM,MAAM,wBAAwB,GAAG,CAAC,MAAM,EAAE,OAAO,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAM5F,wBAAgB,6BAA6B,CAAC,IAAI,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8B5F;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAAC,IAAI,CAAC,CAE9D;AAED,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}
@@ -1,12 +1,14 @@
1
1
  import { Container, ISourceOptions } from '@tsparticles/engine';
2
2
  import { default as Vue } from 'vue';
3
- export type IParticlesProps = ISourceOptions;
4
3
  export default class Particles extends Vue {
5
4
  readonly id: string;
6
- readonly options?: IParticlesProps;
5
+ readonly options?: ISourceOptions;
7
6
  readonly url?: string;
8
- readonly particlesLoaded?: (container: Container) => void;
7
+ readonly theme?: string;
8
+ readonly particlesLoaded?: (container?: Container) => void;
9
9
  container?: Container;
10
+ onPropChange(): void;
11
+ onThemeChange(newTheme?: string): void;
10
12
  mounted(): void;
11
13
  beforeDestroy(): void;
12
14
  }
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"vue-particles.vue.d.ts","sourceRoot":"","sources":["../../../src/Particles/vue-particles.vue"],"names":[],"mappings":"AAGA;AAqFA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAe,MAAM,qBAAqB,CAAC;AACvF,OAAO,GAAG,MAAM,KAAK,CAAC;AAsCtB,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,GAAG;IACd,QAAQ,CAAC,EAAE,EAAG,MAAM,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IAEnE,SAAS,CAAC,EAAE,SAAS,CAAC;IAKtB,YAAY,IAAI,IAAI;IAOpB,aAAa,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI;IAKtC,OAAO,IAAI,IAAI;IAMf,aAAa,IAAI,IAAI;CAGtB;AACD,QAAA,MAAM,YAAY,gMAA4C,CAAC;wBAe1C,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1,18 +1,18 @@
1
- import v from "vue";
2
- import { tsParticles as P } from "@tsparticles/engine";
1
+ import h from "vue";
2
+ import { tsParticles as b } from "@tsparticles/engine";
3
3
  /**
4
4
  * vue-class-component v7.2.6
5
5
  * (c) 2015-present Evan You
6
6
  * @license MIT
7
7
  */
8
- function l(e) {
9
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? l = function(t) {
8
+ function p(e) {
9
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? p = function(t) {
10
10
  return typeof t;
11
- } : l = function(t) {
11
+ } : p = function(t) {
12
12
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
13
- }, l(e);
13
+ }, p(e);
14
14
  }
15
- function R(e, t, r) {
15
+ function D(e, t, r) {
16
16
  return t in e ? Object.defineProperty(e, t, {
17
17
  value: r,
18
18
  enumerable: !0,
@@ -20,25 +20,25 @@ function R(e, t, r) {
20
20
  writable: !0
21
21
  }) : e[t] = r, e;
22
22
  }
23
- function S(e) {
24
- return A(e) || D(e) || E();
23
+ function E(e) {
24
+ return I(e) || x(e) || N();
25
25
  }
26
- function A(e) {
26
+ function I(e) {
27
27
  if (Array.isArray(e)) {
28
28
  for (var t = 0, r = new Array(e.length); t < e.length; t++) r[t] = e[t];
29
29
  return r;
30
30
  }
31
31
  }
32
- function D(e) {
32
+ function x(e) {
33
33
  if (Symbol.iterator in Object(e) || Object.prototype.toString.call(e) === "[object Arguments]") return Array.from(e);
34
34
  }
35
- function E() {
35
+ function N() {
36
36
  throw new TypeError("Invalid attempt to spread non-iterable instance");
37
37
  }
38
- function I() {
38
+ function T() {
39
39
  return typeof Reflect < "u" && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;
40
40
  }
41
- function x(e, t) {
41
+ function V(e, t) {
42
42
  _(e, t), Object.getOwnPropertyNames(t.prototype).forEach(function(r) {
43
43
  _(e.prototype, t.prototype, r);
44
44
  }), Object.getOwnPropertyNames(t).forEach(function(r) {
@@ -48,42 +48,42 @@ function x(e, t) {
48
48
  function _(e, t, r) {
49
49
  var n = r ? Reflect.getOwnMetadataKeys(t, r) : Reflect.getOwnMetadataKeys(t);
50
50
  n.forEach(function(o) {
51
- var a = r ? Reflect.getOwnMetadata(o, t, r) : Reflect.getOwnMetadata(o, t);
52
- r ? Reflect.defineMetadata(o, a, e, r) : Reflect.defineMetadata(o, a, e);
51
+ var i = r ? Reflect.getOwnMetadata(o, t, r) : Reflect.getOwnMetadata(o, t);
52
+ r ? Reflect.defineMetadata(o, i, e, r) : Reflect.defineMetadata(o, i, e);
53
53
  });
54
54
  }
55
- var N = {
55
+ var z = {
56
56
  __proto__: []
57
- }, V = N instanceof Array;
58
- function z(e) {
57
+ }, F = z instanceof Array;
58
+ function M(e) {
59
59
  return function(t, r, n) {
60
60
  var o = typeof t == "function" ? t : t.constructor;
61
- o.__decorators__ || (o.__decorators__ = []), typeof n != "number" && (n = void 0), o.__decorators__.push(function(a) {
62
- return e(a, r, n);
61
+ o.__decorators__ || (o.__decorators__ = []), typeof n != "number" && (n = void 0), o.__decorators__.push(function(i) {
62
+ return e(i, r, n);
63
63
  });
64
64
  };
65
65
  }
66
- function F(e) {
67
- var t = l(e);
66
+ function H(e) {
67
+ var t = p(e);
68
68
  return e == null || t !== "object" && t !== "function";
69
69
  }
70
- function w(e) {
70
+ function A(e) {
71
71
  typeof console < "u" && console.warn("[vue-class-component] " + e);
72
72
  }
73
- function T(e, t) {
73
+ function $(e, t) {
74
74
  var r = t.prototype._init;
75
75
  t.prototype._init = function() {
76
- var a = this, s = Object.getOwnPropertyNames(e);
76
+ var i = this, c = Object.getOwnPropertyNames(e);
77
77
  if (e.$options.props)
78
- for (var c in e.$options.props)
79
- e.hasOwnProperty(c) || s.push(c);
80
- s.forEach(function(i) {
81
- Object.defineProperty(a, i, {
78
+ for (var f in e.$options.props)
79
+ e.hasOwnProperty(f) || c.push(f);
80
+ c.forEach(function(a) {
81
+ Object.defineProperty(i, a, {
82
82
  get: function() {
83
- return e[i];
83
+ return e[a];
84
84
  },
85
- set: function(j) {
86
- e[i] = j;
85
+ set: function(S) {
86
+ e[a] = S;
87
87
  },
88
88
  configurable: !0
89
89
  });
@@ -92,11 +92,11 @@ function T(e, t) {
92
92
  var n = new t();
93
93
  t.prototype._init = r;
94
94
  var o = {};
95
- return Object.keys(n).forEach(function(a) {
96
- n[a] !== void 0 && (o[a] = n[a]);
97
- }), process.env.NODE_ENV !== "production" && !(t.prototype instanceof v) && Object.keys(o).length > 0 && w("Component class must inherit Vue or its descendant class when class property is used."), o;
95
+ return Object.keys(n).forEach(function(i) {
96
+ n[i] !== void 0 && (o[i] = n[i]);
97
+ }), process.env.NODE_ENV !== "production" && !(t.prototype instanceof h) && Object.keys(o).length > 0 && A("Component class must inherit Vue or its descendant class when class property is used."), o;
98
98
  }
99
- var b = [
99
+ var g = [
100
100
  "data",
101
101
  "beforeCreate",
102
102
  "created",
@@ -113,39 +113,39 @@ var b = [
113
113
  "serverPrefetch"
114
114
  // 2.6
115
115
  ];
116
- function m(e) {
116
+ function P(e) {
117
117
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
118
118
  t.name = t.name || e._componentTag || e.name;
119
119
  var r = e.prototype;
120
- Object.getOwnPropertyNames(r).forEach(function(c) {
121
- if (c !== "constructor") {
122
- if (b.indexOf(c) > -1) {
123
- t[c] = r[c];
120
+ Object.getOwnPropertyNames(r).forEach(function(f) {
121
+ if (f !== "constructor") {
122
+ if (g.indexOf(f) > -1) {
123
+ t[f] = r[f];
124
124
  return;
125
125
  }
126
- var i = Object.getOwnPropertyDescriptor(r, c);
127
- i.value !== void 0 ? typeof i.value == "function" ? (t.methods || (t.methods = {}))[c] = i.value : (t.mixins || (t.mixins = [])).push({
126
+ var a = Object.getOwnPropertyDescriptor(r, f);
127
+ a.value !== void 0 ? typeof a.value == "function" ? (t.methods || (t.methods = {}))[f] = a.value : (t.mixins || (t.mixins = [])).push({
128
128
  data: function() {
129
- return R({}, c, i.value);
129
+ return D({}, f, a.value);
130
130
  }
131
- }) : (i.get || i.set) && ((t.computed || (t.computed = {}))[c] = {
132
- get: i.get,
133
- set: i.set
131
+ }) : (a.get || a.set) && ((t.computed || (t.computed = {}))[f] = {
132
+ get: a.get,
133
+ set: a.set
134
134
  });
135
135
  }
136
136
  }), (t.mixins || (t.mixins = [])).push({
137
137
  data: function() {
138
- return T(this, e);
138
+ return $(this, e);
139
139
  }
140
140
  });
141
141
  var n = e.__decorators__;
142
- n && (n.forEach(function(c) {
143
- return c(t);
142
+ n && (n.forEach(function(f) {
143
+ return f(t);
144
144
  }), delete e.__decorators__);
145
- var o = Object.getPrototypeOf(e.prototype), a = o instanceof v ? o.constructor : v, s = a.extend(t);
146
- return L(s, e, a), I() && x(s, e), s;
145
+ var o = Object.getPrototypeOf(e.prototype), i = o instanceof h ? o.constructor : h, c = i.extend(t);
146
+ return q(c, e, i), T() && V(c, e), c;
147
147
  }
148
- var H = [
148
+ var C = [
149
149
  // Unique id
150
150
  "cid",
151
151
  // Super Vue constructor
@@ -159,95 +159,112 @@ var H = [
159
159
  "component",
160
160
  "directive",
161
161
  "filter"
162
- ], $ = {
162
+ ], L = {
163
163
  prototype: !0,
164
164
  arguments: !0,
165
165
  callee: !0,
166
166
  caller: !0
167
167
  };
168
- function L(e, t, r) {
168
+ function q(e, t, r) {
169
169
  Object.getOwnPropertyNames(t).forEach(function(n) {
170
- if (!$[n]) {
170
+ if (!L[n]) {
171
171
  var o = Object.getOwnPropertyDescriptor(e, n);
172
172
  if (!(o && !o.configurable)) {
173
- var a = Object.getOwnPropertyDescriptor(t, n);
174
- if (!V) {
173
+ var i = Object.getOwnPropertyDescriptor(t, n);
174
+ if (!F) {
175
175
  if (n === "cid")
176
176
  return;
177
- var s = Object.getOwnPropertyDescriptor(r, n);
178
- if (!F(a.value) && s && s.value === a.value)
177
+ var c = Object.getOwnPropertyDescriptor(r, n);
178
+ if (!H(i.value) && c && c.value === i.value)
179
179
  return;
180
180
  }
181
- process.env.NODE_ENV !== "production" && H.indexOf(n) >= 0 && w("Static property name '".concat(n, "' declared on class '").concat(t.name, "' ") + "conflicts with reserved property name of Vue internal. It may cause unexpected behavior of the component. Consider renaming the property."), Object.defineProperty(e, n, a);
181
+ process.env.NODE_ENV !== "production" && C.indexOf(n) >= 0 && A("Static property name '".concat(n, "' declared on class '").concat(t.name, "' ") + "conflicts with reserved property name of Vue internal. It may cause unexpected behavior of the component. Consider renaming the property."), Object.defineProperty(e, n, i);
182
182
  }
183
183
  }
184
184
  });
185
185
  }
186
- function M(e) {
187
- return typeof e == "function" ? m(e) : function(t) {
188
- return m(t, e);
186
+ function R(e) {
187
+ return typeof e == "function" ? P(e) : function(t) {
188
+ return P(t, e);
189
189
  };
190
190
  }
191
- M.registerHooks = function(t) {
192
- b.push.apply(b, S(t));
191
+ R.registerHooks = function(t) {
192
+ g.push.apply(g, E(t));
193
193
  };
194
- var q = typeof Reflect < "u" && typeof Reflect.getMetadata < "u";
194
+ var W = typeof Reflect < "u" && typeof Reflect.getMetadata < "u";
195
195
  function U(e, t, r) {
196
- if (q && !Array.isArray(e) && typeof e != "function" && !e.hasOwnProperty("type") && typeof e.type > "u") {
196
+ if (W && !Array.isArray(e) && typeof e != "function" && !e.hasOwnProperty("type") && typeof e.type > "u") {
197
197
  var n = Reflect.getMetadata("design:type", t, r);
198
198
  n !== Object && (e.type = n);
199
199
  }
200
200
  }
201
- function y(e) {
201
+ function l(e) {
202
202
  return e === void 0 && (e = {}), function(t, r) {
203
- U(e, t, r), z(function(n, o) {
203
+ U(e, t, r), M(function(n, o) {
204
204
  (n.props || (n.props = {}))[o] = e;
205
205
  })(t, r);
206
206
  };
207
207
  }
208
- let p = !1, f, h;
209
- function W(e) {
210
- if (p)
208
+ function v(e, t) {
209
+ t === void 0 && (t = {});
210
+ var r = t.deep, n = r === void 0 ? !1 : r, o = t.immediate, i = o === void 0 ? !1 : o;
211
+ return M(function(c, f) {
212
+ typeof c.watch != "object" && (c.watch = /* @__PURE__ */ Object.create(null));
213
+ var a = c.watch;
214
+ typeof a[e] == "object" && !Array.isArray(a[e]) ? a[e] = [a[e]] : typeof a[e] > "u" && (a[e] = []), a[e].push({ handler: f, deep: n, immediate: i });
215
+ });
216
+ }
217
+ let y = !1, d, m;
218
+ function B(e) {
219
+ if (y)
211
220
  return Promise.resolve();
212
- if (f && h !== e)
221
+ if (d && m !== e)
213
222
  throw new Error("@tsparticles/vue2 init callback must be stable across the app lifecycle.");
214
- return f || (h = e, f = Promise.resolve(e == null ? void 0 : e(P)).then(() => {
215
- p = !0;
223
+ return d || (m = e, d = Promise.resolve(e == null ? void 0 : e(b)).then(() => b.init()).then(() => {
224
+ y = !0;
216
225
  }).catch((t) => {
217
- throw f = void 0, h = void 0, p = !1, t;
218
- }), f);
219
- }
220
- function B() {
221
- return f ?? Promise.resolve();
226
+ throw d = void 0, m = void 0, y = !1, t;
227
+ }), d);
222
228
  }
223
229
  function G() {
224
- return p;
230
+ return d ?? Promise.resolve();
225
231
  }
226
- var J = Object.defineProperty, Q = Object.getOwnPropertyDescriptor, d = (e, t, r, n) => {
227
- for (var o = n > 1 ? void 0 : n ? Q(t, r) : t, a = e.length - 1, s; a >= 0; a--)
228
- (s = e[a]) && (o = (n ? s(t, r, o) : s(o)) || o);
229
- return n && o && J(t, r, o), o;
232
+ function J() {
233
+ return y;
234
+ }
235
+ var Q = Object.defineProperty, X = Object.getOwnPropertyDescriptor, u = (e, t, r, n) => {
236
+ for (var o = n > 1 ? void 0 : n ? X(t, r) : t, i = e.length - 1, c; i >= 0; i--)
237
+ (c = e[i]) && (o = (n ? c(t, r, o) : c(o)) || o);
238
+ return n && o && Q(t, r, o), o;
230
239
  };
231
- async function X(e) {
240
+ async function O(e) {
241
+ var n;
232
242
  if (!e.id)
233
243
  throw new Error("Prop 'id' is required!");
234
- if (await B(), !G())
244
+ if (await G(), !J())
235
245
  throw new Error(
236
246
  "@tsparticles/vue2 plugin initialization must be completed before rendering <VueParticles /> components."
237
247
  );
238
- const t = (n) => {
239
- e.container = n, e.container && e.particlesLoaded && e.particlesLoaded(e.container);
240
- }, r = await P.load({
248
+ const t = (o) => {
249
+ e.container = o, o && e.particlesLoaded && e.particlesLoaded(o);
250
+ }, r = await b.load({
241
251
  id: e.id,
242
252
  options: e.options ?? {},
243
253
  url: e.url
244
254
  });
245
- t(r);
255
+ r && e.theme && ((n = r.loadTheme) == null || n.call(r, e.theme)), t(r);
246
256
  }
247
- let u = class extends v {
257
+ let s = class extends h {
258
+ onPropChange() {
259
+ this.container && O(this);
260
+ }
261
+ onThemeChange(e) {
262
+ var t, r;
263
+ this.container && ((r = (t = this.container).loadTheme) == null || r.call(t, e));
264
+ }
248
265
  mounted() {
249
266
  this.$nextTick(() => {
250
- X(this);
267
+ O(this);
251
268
  });
252
269
  }
253
270
  beforeDestroy() {
@@ -255,41 +272,52 @@ let u = class extends v {
255
272
  (e = this.container) == null || e.destroy();
256
273
  }
257
274
  };
258
- d([
259
- y({ required: !0 })
260
- ], u.prototype, "id", 2);
261
- d([
262
- y()
263
- ], u.prototype, "options", 2);
264
- d([
265
- y()
266
- ], u.prototype, "url", 2);
267
- d([
268
- y()
269
- ], u.prototype, "particlesLoaded", 2);
270
- u = d([
271
- M
272
- ], u);
273
- function Y(e, t, r, n, o, a, s, c) {
274
- var i = typeof e == "function" ? e.options : e;
275
- return t && (i.render = t, i.staticRenderFns = r, i._compiled = !0), {
275
+ u([
276
+ l({ required: !0 })
277
+ ], s.prototype, "id", 2);
278
+ u([
279
+ l()
280
+ ], s.prototype, "options", 2);
281
+ u([
282
+ l()
283
+ ], s.prototype, "url", 2);
284
+ u([
285
+ l()
286
+ ], s.prototype, "theme", 2);
287
+ u([
288
+ l()
289
+ ], s.prototype, "particlesLoaded", 2);
290
+ u([
291
+ v("options"),
292
+ v("url"),
293
+ v("id")
294
+ ], s.prototype, "onPropChange", 1);
295
+ u([
296
+ v("theme")
297
+ ], s.prototype, "onThemeChange", 1);
298
+ s = u([
299
+ R
300
+ ], s);
301
+ function Y(e, t, r, n, o, i, c, f) {
302
+ var a = typeof e == "function" ? e.options : e;
303
+ return t && (a.render = t, a.staticRenderFns = r, a._compiled = !0), {
276
304
  exports: e,
277
- options: i
305
+ options: a
278
306
  };
279
307
  }
280
308
  var Z = function() {
281
309
  var t = this, r = t._self._c;
282
310
  return t._self._setupProxy, r("div", { attrs: { id: t.id } });
283
- }, C = [], K = /* @__PURE__ */ Y(
284
- u,
311
+ }, K = [], k = /* @__PURE__ */ Y(
312
+ s,
285
313
  Z,
286
- C
314
+ K
287
315
  );
288
- const O = K.exports, te = {
316
+ const j = k.exports, re = {
289
317
  install: (e, t) => {
290
- e.component("VueParticles", O), e.component("VueParticles", O), W(t == null ? void 0 : t.init);
318
+ e.component("VueParticles", j), e.component("VueParticles", j), B(t == null ? void 0 : t.init);
291
319
  }
292
320
  };
293
321
  export {
294
- te as default
322
+ re as default
295
323
  };
@@ -2,4 +2,4 @@
2
2
  * vue-class-component v7.2.6
3
3
  * (c) 2015-present Evan You
4
4
  * @license MIT
5
- */function v(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?v=function(t){return typeof t}:v=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(e)}function j(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e){return S(e)||A(e)||D()}function S(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function A(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function D(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function E(){return typeof Reflect<"u"&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function I(e,t){h(e,t),Object.getOwnPropertyNames(t.prototype).forEach(function(r){h(e.prototype,t.prototype,r)}),Object.getOwnPropertyNames(t).forEach(function(r){h(e,t,r)})}function h(e,t,r){var n=r?Reflect.getOwnMetadataKeys(t,r):Reflect.getOwnMetadataKeys(t);n.forEach(function(o){var i=r?Reflect.getOwnMetadata(o,t,r):Reflect.getOwnMetadata(o,t);r?Reflect.defineMetadata(o,i,e,r):Reflect.defineMetadata(o,i,e)})}var x={__proto__:[]},N=x instanceof Array;function T(e){return function(t,r,n){var o=typeof t=="function"?t:t.constructor;o.__decorators__||(o.__decorators__=[]),typeof n!="number"&&(n=void 0),o.__decorators__.push(function(i){return e(i,r,n)})}}function V(e){var t=v(e);return e==null||t!=="object"&&t!=="function"}function P(e){typeof console<"u"&&console.warn("[vue-class-component] "+e)}function z(e,t){var r=t.prototype._init;t.prototype._init=function(){var i=this,a=Object.getOwnPropertyNames(e);if(e.$options.props)for(var c in e.$options.props)e.hasOwnProperty(c)||a.push(c);a.forEach(function(s){Object.defineProperty(i,s,{get:function(){return e[s]},set:function(K){e[s]=K},configurable:!0})})};var n=new t;t.prototype._init=r;var o={};return Object.keys(n).forEach(function(i){n[i]!==void 0&&(o[i]=n[i])}),process.env.NODE_ENV!=="production"&&!(t.prototype instanceof f)&&Object.keys(o).length>0&&P("Component class must inherit Vue or its descendant class when class property is used."),o}var b=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function O(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var r=e.prototype;Object.getOwnPropertyNames(r).forEach(function(c){if(c!=="constructor"){if(b.indexOf(c)>-1){t[c]=r[c];return}var s=Object.getOwnPropertyDescriptor(r,c);s.value!==void 0?typeof s.value=="function"?(t.methods||(t.methods={}))[c]=s.value:(t.mixins||(t.mixins=[])).push({data:function(){return j({},c,s.value)}}):(s.get||s.set)&&((t.computed||(t.computed={}))[c]={get:s.get,set:s.set})}}),(t.mixins||(t.mixins=[])).push({data:function(){return z(this,e)}});var n=e.__decorators__;n&&(n.forEach(function(c){return c(t)}),delete e.__decorators__);var o=Object.getPrototypeOf(e.prototype),i=o instanceof f?o.constructor:f,a=i.extend(t);return H(a,e,i),E()&&I(a,e),a}var F=["cid","super","options","superOptions","extendOptions","sealedOptions","component","directive","filter"],q={prototype:!0,arguments:!0,callee:!0,caller:!0};function H(e,t,r){Object.getOwnPropertyNames(t).forEach(function(n){if(!q[n]){var o=Object.getOwnPropertyDescriptor(e,n);if(!(o&&!o.configurable)){var i=Object.getOwnPropertyDescriptor(t,n);if(!N){if(n==="cid")return;var a=Object.getOwnPropertyDescriptor(r,n);if(!V(i.value)&&a&&a.value===i.value)return}process.env.NODE_ENV!=="production"&&F.indexOf(n)>=0&&P("Static property name '".concat(n,"' declared on class '").concat(t.name,"' ")+"conflicts with reserved property name of Vue internal. It may cause unexpected behavior of the component. Consider renaming the property."),Object.defineProperty(e,n,i)}}})}function m(e){return typeof e=="function"?O(e):function(t){return O(t,e)}}m.registerHooks=function(t){b.push.apply(b,R(t))};var $=typeof Reflect<"u"&&typeof Reflect.getMetadata<"u";function L(e,t,r){if($&&!Array.isArray(e)&&typeof e!="function"&&!e.hasOwnProperty("type")&&typeof e.type>"u"){var n=Reflect.getMetadata("design:type",t,r);n!==Object&&(e.type=n)}}function y(e){return e===void 0&&(e={}),function(t,r){L(e,t,r),T(function(n,o){(n.props||(n.props={}))[o]=e})(t,r)}}let _=!1,u,g;function U(e){if(_)return Promise.resolve();if(u&&g!==e)throw new Error("@tsparticles/vue2 init callback must be stable across the app lifecycle.");return u||(g=e,u=Promise.resolve(e==null?void 0:e(l.tsParticles)).then(()=>{_=!0}).catch(t=>{throw u=void 0,g=void 0,_=!1,t}),u)}function W(){return u??Promise.resolve()}function B(){return _}var G=Object.defineProperty,J=Object.getOwnPropertyDescriptor,p=(e,t,r,n)=>{for(var o=n>1?void 0:n?J(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&G(t,r,o),o};async function Q(e){if(!e.id)throw new Error("Prop 'id' is required!");if(await W(),!B())throw new Error("@tsparticles/vue2 plugin initialization must be completed before rendering <VueParticles /> components.");const t=n=>{e.container=n,e.container&&e.particlesLoaded&&e.particlesLoaded(e.container)},r=await l.tsParticles.load({id:e.id,options:e.options??{},url:e.url});t(r)}let d=class extends f{mounted(){this.$nextTick(()=>{Q(this)})}beforeDestroy(){var e;(e=this.container)==null||e.destroy()}};p([y({required:!0})],d.prototype,"id",2),p([y()],d.prototype,"options",2),p([y()],d.prototype,"url",2),p([y()],d.prototype,"particlesLoaded",2),d=p([m],d);function X(e,t,r,n,o,i,a,c){var s=typeof e=="function"?e.options:e;return t&&(s.render=t,s.staticRenderFns=r,s._compiled=!0),{exports:e,options:s}}var Y=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("div",{attrs:{id:t.id}})},Z=[],C=X(d,Y,Z);const w=C.exports;return{install:(e,t)=>{e.component("VueParticles",w),e.component("VueParticles",w),U(t==null?void 0:t.init)}}}));
5
+ */function y(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(t){return typeof t}:y=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(e)}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D(e){return E(e)||I(e)||x()}function E(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function I(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function x(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function T(){return typeof Reflect<"u"&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function N(e,t){m(e,t),Object.getOwnPropertyNames(t.prototype).forEach(function(r){m(e.prototype,t.prototype,r)}),Object.getOwnPropertyNames(t).forEach(function(r){m(e,t,r)})}function m(e,t,r){var n=r?Reflect.getOwnMetadataKeys(t,r):Reflect.getOwnMetadataKeys(t);n.forEach(function(i){var o=r?Reflect.getOwnMetadata(i,t,r):Reflect.getOwnMetadata(i,t);r?Reflect.defineMetadata(i,o,e,r):Reflect.defineMetadata(i,o,e)})}var V={__proto__:[]},z=V instanceof Array;function P(e){return function(t,r,n){var i=typeof t=="function"?t:t.constructor;i.__decorators__||(i.__decorators__=[]),typeof n!="number"&&(n=void 0),i.__decorators__.push(function(o){return e(o,r,n)})}}function F(e){var t=y(e);return e==null||t!=="object"&&t!=="function"}function w(e){typeof console<"u"&&console.warn("[vue-class-component] "+e)}function q(e,t){var r=t.prototype._init;t.prototype._init=function(){var o=this,c=Object.getOwnPropertyNames(e);if(e.$options.props)for(var s in e.$options.props)e.hasOwnProperty(s)||c.push(s);c.forEach(function(a){Object.defineProperty(o,a,{get:function(){return e[a]},set:function(k){e[a]=k},configurable:!0})})};var n=new t;t.prototype._init=r;var i={};return Object.keys(n).forEach(function(o){n[o]!==void 0&&(i[o]=n[o])}),process.env.NODE_ENV!=="production"&&!(t.prototype instanceof f)&&Object.keys(i).length>0&&w("Component class must inherit Vue or its descendant class when class property is used."),i}var b=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function O(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var r=e.prototype;Object.getOwnPropertyNames(r).forEach(function(s){if(s!=="constructor"){if(b.indexOf(s)>-1){t[s]=r[s];return}var a=Object.getOwnPropertyDescriptor(r,s);a.value!==void 0?typeof a.value=="function"?(t.methods||(t.methods={}))[s]=a.value:(t.mixins||(t.mixins=[])).push({data:function(){return S({},s,a.value)}}):(a.get||a.set)&&((t.computed||(t.computed={}))[s]={get:a.get,set:a.set})}}),(t.mixins||(t.mixins=[])).push({data:function(){return q(this,e)}});var n=e.__decorators__;n&&(n.forEach(function(s){return s(t)}),delete e.__decorators__);var i=Object.getPrototypeOf(e.prototype),o=i instanceof f?i.constructor:f,c=o.extend(t);return C(c,e,o),T()&&N(c,e),c}var H=["cid","super","options","superOptions","extendOptions","sealedOptions","component","directive","filter"],$={prototype:!0,arguments:!0,callee:!0,caller:!0};function C(e,t,r){Object.getOwnPropertyNames(t).forEach(function(n){if(!$[n]){var i=Object.getOwnPropertyDescriptor(e,n);if(!(i&&!i.configurable)){var o=Object.getOwnPropertyDescriptor(t,n);if(!z){if(n==="cid")return;var c=Object.getOwnPropertyDescriptor(r,n);if(!F(o.value)&&c&&c.value===o.value)return}process.env.NODE_ENV!=="production"&&H.indexOf(n)>=0&&w("Static property name '".concat(n,"' declared on class '").concat(t.name,"' ")+"conflicts with reserved property name of Vue internal. It may cause unexpected behavior of the component. Consider renaming the property."),Object.defineProperty(e,n,o)}}})}function j(e){return typeof e=="function"?O(e):function(t){return O(t,e)}}j.registerHooks=function(t){b.push.apply(b,D(t))};var L=typeof Reflect<"u"&&typeof Reflect.getMetadata<"u";function W(e,t,r){if(L&&!Array.isArray(e)&&typeof e!="function"&&!e.hasOwnProperty("type")&&typeof e.type>"u"){var n=Reflect.getMetadata("design:type",t,r);n!==Object&&(e.type=n)}}function v(e){return e===void 0&&(e={}),function(t,r){W(e,t,r),P(function(n,i){(n.props||(n.props={}))[i]=e})(t,r)}}function h(e,t){t===void 0&&(t={});var r=t.deep,n=r===void 0?!1:r,i=t.immediate,o=i===void 0?!1:i;return P(function(c,s){typeof c.watch!="object"&&(c.watch=Object.create(null));var a=c.watch;typeof a[e]=="object"&&!Array.isArray(a[e])?a[e]=[a[e]]:typeof a[e]>"u"&&(a[e]=[]),a[e].push({handler:s,deep:n,immediate:o})})}let _=!1,p,g;function U(e){if(_)return Promise.resolve();if(p&&g!==e)throw new Error("@tsparticles/vue2 init callback must be stable across the app lifecycle.");return p||(g=e,p=Promise.resolve(e==null?void 0:e(l.tsParticles)).then(()=>l.tsParticles.init()).then(()=>{_=!0}).catch(t=>{throw p=void 0,g=void 0,_=!1,t}),p)}function B(){return p??Promise.resolve()}function G(){return _}var J=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,d=(e,t,r,n)=>{for(var i=n>1?void 0:n?Q(t,r):t,o=e.length-1,c;o>=0;o--)(c=e[o])&&(i=(n?c(t,r,i):c(i))||i);return n&&i&&J(t,r,i),i};async function M(e){var n;if(!e.id)throw new Error("Prop 'id' is required!");if(await B(),!G())throw new Error("@tsparticles/vue2 plugin initialization must be completed before rendering <VueParticles /> components.");const t=i=>{e.container=i,i&&e.particlesLoaded&&e.particlesLoaded(i)},r=await l.tsParticles.load({id:e.id,options:e.options??{},url:e.url});r&&e.theme&&((n=r.loadTheme)==null||n.call(r,e.theme)),t(r)}let u=class extends f{onPropChange(){this.container&&M(this)}onThemeChange(e){var t,r;this.container&&((r=(t=this.container).loadTheme)==null||r.call(t,e))}mounted(){this.$nextTick(()=>{M(this)})}beforeDestroy(){var e;(e=this.container)==null||e.destroy()}};d([v({required:!0})],u.prototype,"id",2),d([v()],u.prototype,"options",2),d([v()],u.prototype,"url",2),d([v()],u.prototype,"theme",2),d([v()],u.prototype,"particlesLoaded",2),d([h("options"),h("url"),h("id")],u.prototype,"onPropChange",1),d([h("theme")],u.prototype,"onThemeChange",1),u=d([j],u);function X(e,t,r,n,i,o,c,s){var a=typeof e=="function"?e.options:e;return t&&(a.render=t,a.staticRenderFns=r,a._compiled=!0),{exports:e,options:a}}var Y=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("div",{attrs:{id:t.id}})},Z=[],K=X(u,Y,Z);const A=K.exports;return{install:(e,t)=>{e.component("VueParticles",A),e.component("VueParticles",A),U(t==null?void 0:t.init)}}}));
package/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export {}
2
- import tsparticlesvue2 from './src/Particles/index'
3
- export default tsparticlesvue2
4
- export {}