@tsparticles/vue2 4.1.3 → 4.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/vue2",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
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.
|
|
97
|
+
"@tsparticles/engine": "4.2.0"
|
|
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,
|
|
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?:
|
|
5
|
+
readonly options?: ISourceOptions;
|
|
7
6
|
readonly url?: string;
|
|
8
|
-
readonly
|
|
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;
|
|
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"}
|
package/vue2-particles.es.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { tsParticles as
|
|
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
|
|
9
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
8
|
+
function p(e) {
|
|
9
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? p = function(t) {
|
|
10
10
|
return typeof t;
|
|
11
|
-
} :
|
|
11
|
+
} : p = function(t) {
|
|
12
12
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
13
|
-
},
|
|
13
|
+
}, p(e);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
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
|
|
24
|
-
return
|
|
23
|
+
function E(e) {
|
|
24
|
+
return I(e) || x(e) || N();
|
|
25
25
|
}
|
|
26
|
-
function
|
|
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
|
|
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
|
|
35
|
+
function N() {
|
|
36
36
|
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function T() {
|
|
39
39
|
return typeof Reflect < "u" && Reflect.defineMetadata && Reflect.getOwnMetadataKeys;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
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
|
|
52
|
-
r ? Reflect.defineMetadata(o,
|
|
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
|
|
55
|
+
var z = {
|
|
56
56
|
__proto__: []
|
|
57
|
-
},
|
|
58
|
-
function
|
|
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(
|
|
62
|
-
return e(
|
|
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
|
|
67
|
-
var t =
|
|
66
|
+
function H(e) {
|
|
67
|
+
var t = p(e);
|
|
68
68
|
return e == null || t !== "object" && t !== "function";
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function A(e) {
|
|
71
71
|
typeof console < "u" && console.warn("[vue-class-component] " + e);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function $(e, t) {
|
|
74
74
|
var r = t.prototype._init;
|
|
75
75
|
t.prototype._init = function() {
|
|
76
|
-
var
|
|
76
|
+
var i = this, c = Object.getOwnPropertyNames(e);
|
|
77
77
|
if (e.$options.props)
|
|
78
|
-
for (var
|
|
79
|
-
e.hasOwnProperty(
|
|
80
|
-
|
|
81
|
-
Object.defineProperty(
|
|
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[
|
|
83
|
+
return e[a];
|
|
84
84
|
},
|
|
85
|
-
set: function(
|
|
86
|
-
e[
|
|
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(
|
|
96
|
-
n[
|
|
97
|
-
}), process.env.NODE_ENV !== "production" && !(t.prototype instanceof
|
|
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
|
|
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
|
|
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(
|
|
121
|
-
if (
|
|
122
|
-
if (
|
|
123
|
-
t[
|
|
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
|
|
127
|
-
|
|
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
|
|
129
|
+
return D({}, f, a.value);
|
|
130
130
|
}
|
|
131
|
-
}) : (
|
|
132
|
-
get:
|
|
133
|
-
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
|
|
138
|
+
return $(this, e);
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
141
|
var n = e.__decorators__;
|
|
142
|
-
n && (n.forEach(function(
|
|
143
|
-
return
|
|
142
|
+
n && (n.forEach(function(f) {
|
|
143
|
+
return f(t);
|
|
144
144
|
}), delete e.__decorators__);
|
|
145
|
-
var o = Object.getPrototypeOf(e.prototype),
|
|
146
|
-
return
|
|
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
|
|
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
|
|
168
|
+
function q(e, t, r) {
|
|
169
169
|
Object.getOwnPropertyNames(t).forEach(function(n) {
|
|
170
|
-
if (
|
|
170
|
+
if (!L[n]) {
|
|
171
171
|
var o = Object.getOwnPropertyDescriptor(e, n);
|
|
172
172
|
if (!(o && !o.configurable)) {
|
|
173
|
-
var
|
|
174
|
-
if (!
|
|
173
|
+
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
174
|
+
if (!F) {
|
|
175
175
|
if (n === "cid")
|
|
176
176
|
return;
|
|
177
|
-
var
|
|
178
|
-
if (!
|
|
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" &&
|
|
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
|
|
187
|
-
return typeof e == "function" ?
|
|
188
|
-
return
|
|
186
|
+
function R(e) {
|
|
187
|
+
return typeof e == "function" ? P(e) : function(t) {
|
|
188
|
+
return P(t, e);
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
R.registerHooks = function(t) {
|
|
192
|
+
g.push.apply(g, E(t));
|
|
193
193
|
};
|
|
194
|
-
var
|
|
194
|
+
var W = typeof Reflect < "u" && typeof Reflect.getMetadata < "u";
|
|
195
195
|
function U(e, t, r) {
|
|
196
|
-
if (
|
|
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
|
|
201
|
+
function l(e) {
|
|
202
202
|
return e === void 0 && (e = {}), function(t, r) {
|
|
203
|
-
U(e, t, r),
|
|
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
|
-
|
|
209
|
-
|
|
210
|
-
|
|
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 (
|
|
221
|
+
if (d && m !== e)
|
|
213
222
|
throw new Error("@tsparticles/vue2 init callback must be stable across the app lifecycle.");
|
|
214
|
-
return
|
|
215
|
-
|
|
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
|
|
218
|
-
}),
|
|
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
|
|
230
|
+
return d ?? Promise.resolve();
|
|
225
231
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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
|
|
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
|
|
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 = (
|
|
239
|
-
e.container =
|
|
240
|
-
}, r = await
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
259
|
-
|
|
260
|
-
],
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
],
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
],
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
],
|
|
270
|
-
u
|
|
271
|
-
|
|
272
|
-
],
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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:
|
|
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
|
-
},
|
|
284
|
-
|
|
311
|
+
}, K = [], k = /* @__PURE__ */ Y(
|
|
312
|
+
s,
|
|
285
313
|
Z,
|
|
286
|
-
|
|
314
|
+
K
|
|
287
315
|
);
|
|
288
|
-
const
|
|
316
|
+
const j = k.exports, re = {
|
|
289
317
|
install: (e, t) => {
|
|
290
|
-
e.component("VueParticles",
|
|
318
|
+
e.component("VueParticles", j), e.component("VueParticles", j), B(t == null ? void 0 : t.init);
|
|
291
319
|
}
|
|
292
320
|
};
|
|
293
321
|
export {
|
|
294
|
-
|
|
322
|
+
re as default
|
|
295
323
|
};
|
package/vue2-particles.umd.js
CHANGED
|
@@ -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
|
|
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