@tsparticles/plugin-export-json 4.0.0-alpha.3 → 4.0.0-alpha.4

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/160.min.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 160.min.js.LICENSE.txt */
2
+ (this.webpackChunk_tsparticles_plugin_export_json=this.webpackChunk_tsparticles_plugin_export_json||[]).push([[160],{160(n,t,s){s.d(t,{ExportJSONPlugin:()=>e});class e{constructor(){this.id="export-json"}async getPlugin(n){const{ExportJSONPluginInstance:t}=await s.e(823).then(s.bind(s,823));return new t(n)}loadOptions(){}needsPlugin(){return!0}}}}]);
@@ -0,0 +1 @@
1
+ /*! tsParticles Export JSON Plugin v4.0.0-alpha.4 by Matteo Bruni */
package/823.min.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 823.min.js.LICENSE.txt */
2
+ (this.webpackChunk_tsparticles_plugin_export_json=this.webpackChunk_tsparticles_plugin_export_json||[]).push([[823],{823(t,s,n){n.d(s,{ExportJSONPluginInstance:()=>o});class o{constructor(t){this._exportJSON=async()=>{const t=JSON.stringify(this._container.actualOptions,((t,s)=>{if(!t.startsWith("_"))return s}),2);return Promise.resolve(new Blob([t],{type:"application/json"}))},this._container=t}async export(t){const s={supported:!1};if("json"===t)s.supported=!0,s.blob=await this._exportJSON();return s}}}}]);
@@ -0,0 +1 @@
1
+ /*! tsParticles Export JSON Plugin v4.0.0-alpha.4 by Matteo Bruni */
@@ -1,10 +1,10 @@
1
- import { ExportJSONInstance } from "./ExportJSONInstance.js";
2
1
  export class ExportJSONPlugin {
3
2
  constructor() {
4
3
  this.id = "export-json";
5
4
  }
6
- getPlugin(container) {
7
- return Promise.resolve(new ExportJSONInstance(container));
5
+ async getPlugin(container) {
6
+ const { ExportJSONPluginInstance } = await import("./ExportJSONPluginInstance.js");
7
+ return new ExportJSONPluginInstance(container);
8
8
  }
9
9
  loadOptions() {
10
10
  }
@@ -1,5 +1,5 @@
1
1
  const indent = 2;
2
- export class ExportJSONInstance {
2
+ export class ExportJSONPluginInstance {
3
3
  constructor(container) {
4
4
  this._exportJSON = async () => {
5
5
  const json = JSON.stringify(this._container.actualOptions, (key, value) => {
package/browser/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export function loadExportJSONPlugin(engine) {
2
- engine.checkVersion("4.0.0-alpha.3");
2
+ engine.checkVersion("4.0.0-alpha.4");
3
3
  engine.register(async (e) => {
4
4
  const { ExportJSONPlugin } = await import("./ExportJSONPlugin.js");
5
5
  e.addPlugin(new ExportJSONPlugin());
@@ -1,10 +1,10 @@
1
- import { ExportJSONInstance } from "./ExportJSONInstance.js";
2
1
  export class ExportJSONPlugin {
3
2
  constructor() {
4
3
  this.id = "export-json";
5
4
  }
6
- getPlugin(container) {
7
- return Promise.resolve(new ExportJSONInstance(container));
5
+ async getPlugin(container) {
6
+ const { ExportJSONPluginInstance } = await import("./ExportJSONPluginInstance.js");
7
+ return new ExportJSONPluginInstance(container);
8
8
  }
9
9
  loadOptions() {
10
10
  }
@@ -1,5 +1,5 @@
1
1
  const indent = 2;
2
- export class ExportJSONInstance {
2
+ export class ExportJSONPluginInstance {
3
3
  constructor(container) {
4
4
  this._exportJSON = async () => {
5
5
  const json = JSON.stringify(this._container.actualOptions, (key, value) => {
package/cjs/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export function loadExportJSONPlugin(engine) {
2
- engine.checkVersion("4.0.0-alpha.3");
2
+ engine.checkVersion("4.0.0-alpha.4");
3
3
  engine.register(async (e) => {
4
4
  const { ExportJSONPlugin } = await import("./ExportJSONPlugin.js");
5
5
  e.addPlugin(new ExportJSONPlugin());
@@ -0,0 +1,30 @@
1
+ /*!
2
+ * Author : Matteo Bruni
3
+ * MIT license: https://opensource.org/licenses/MIT
4
+ * Demo / Generator : https://particles.js.org/
5
+ * GitHub : https://www.github.com/matteobruni/tsparticles
6
+ * How to use? : Check the GitHub README
7
+ * v4.0.0-alpha.4
8
+ */
9
+ "use strict";
10
+ /*
11
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
12
+ * This devtool is neither made for production nor for readable output files.
13
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
14
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
15
+ * or disable the default devtool with "devtool: false".
16
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
17
+ */
18
+ (this["webpackChunk_tsparticles_plugin_export_json"] = this["webpackChunk_tsparticles_plugin_export_json"] || []).push([["dist_browser_ExportJSONPluginInstance_js"],{
19
+
20
+ /***/ "./dist/browser/ExportJSONPluginInstance.js"
21
+ /*!**************************************************!*\
22
+ !*** ./dist/browser/ExportJSONPluginInstance.js ***!
23
+ \**************************************************/
24
+ (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
+
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ExportJSONPluginInstance: () => (/* binding */ ExportJSONPluginInstance)\n/* harmony export */ });\nconst indent = 2;\nclass ExportJSONPluginInstance {\n constructor(container) {\n this._exportJSON = async () => {\n const json = JSON.stringify(this._container.actualOptions, (key, value) => {\n if (key.startsWith(\"_\")) {\n return;\n }\n return value;\n }, indent);\n return Promise.resolve(new Blob([json], {\n type: \"application/json\"\n }));\n };\n this._container = container;\n }\n async export(type) {\n const res = {\n supported: false\n };\n switch (type) {\n case \"json\":\n res.supported = true;\n res.blob = await this._exportJSON();\n break;\n }\n return res;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-json/./dist/browser/ExportJSONPluginInstance.js?\n}");
27
+
28
+ /***/ }
29
+
30
+ }]);
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v4.0.0-alpha.3
7
+ * v4.0.0-alpha.4
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -17,23 +17,13 @@
17
17
  */
18
18
  (this["webpackChunk_tsparticles_plugin_export_json"] = this["webpackChunk_tsparticles_plugin_export_json"] || []).push([["dist_browser_ExportJSONPlugin_js"],{
19
19
 
20
- /***/ "./dist/browser/ExportJSONInstance.js"
21
- /*!********************************************!*\
22
- !*** ./dist/browser/ExportJSONInstance.js ***!
23
- \********************************************/
24
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
-
26
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ExportJSONInstance: () => (/* binding */ ExportJSONInstance)\n/* harmony export */ });\nconst indent = 2;\nclass ExportJSONInstance {\n constructor(container) {\n this._exportJSON = async () => {\n const json = JSON.stringify(this._container.actualOptions, (key, value) => {\n if (key.startsWith(\"_\")) {\n return;\n }\n return value;\n }, indent);\n return Promise.resolve(new Blob([json], {\n type: \"application/json\"\n }));\n };\n this._container = container;\n }\n async export(type) {\n const res = {\n supported: false\n };\n switch (type) {\n case \"json\":\n res.supported = true;\n res.blob = await this._exportJSON();\n break;\n }\n return res;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-json/./dist/browser/ExportJSONInstance.js?\n}");
27
-
28
- /***/ },
29
-
30
20
  /***/ "./dist/browser/ExportJSONPlugin.js"
31
21
  /*!******************************************!*\
32
22
  !*** ./dist/browser/ExportJSONPlugin.js ***!
33
23
  \******************************************/
34
24
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
35
25
 
36
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ExportJSONPlugin: () => (/* binding */ ExportJSONPlugin)\n/* harmony export */ });\n/* harmony import */ var _ExportJSONInstance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExportJSONInstance.js */ \"./dist/browser/ExportJSONInstance.js\");\n\nclass ExportJSONPlugin {\n constructor() {\n this.id = \"export-json\";\n }\n getPlugin(container) {\n return Promise.resolve(new _ExportJSONInstance_js__WEBPACK_IMPORTED_MODULE_0__.ExportJSONInstance(container));\n }\n loadOptions() {}\n needsPlugin() {\n return true;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-json/./dist/browser/ExportJSONPlugin.js?\n}");
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ExportJSONPlugin: () => (/* binding */ ExportJSONPlugin)\n/* harmony export */ });\nclass ExportJSONPlugin {\n constructor() {\n this.id = \"export-json\";\n }\n async getPlugin(container) {\n const {\n ExportJSONPluginInstance\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_ExportJSONPluginInstance_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ExportJSONPluginInstance.js */ \"./dist/browser/ExportJSONPluginInstance.js\"));\n return new ExportJSONPluginInstance(container);\n }\n loadOptions() {}\n needsPlugin() {\n return true;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-json/./dist/browser/ExportJSONPlugin.js?\n}");
37
27
 
38
28
  /***/ }
39
29
 
@@ -1,10 +1,10 @@
1
- import { ExportJSONInstance } from "./ExportJSONInstance.js";
2
1
  export class ExportJSONPlugin {
3
2
  constructor() {
4
3
  this.id = "export-json";
5
4
  }
6
- getPlugin(container) {
7
- return Promise.resolve(new ExportJSONInstance(container));
5
+ async getPlugin(container) {
6
+ const { ExportJSONPluginInstance } = await import("./ExportJSONPluginInstance.js");
7
+ return new ExportJSONPluginInstance(container);
8
8
  }
9
9
  loadOptions() {
10
10
  }
@@ -1,5 +1,5 @@
1
1
  const indent = 2;
2
- export class ExportJSONInstance {
2
+ export class ExportJSONPluginInstance {
3
3
  constructor(container) {
4
4
  this._exportJSON = async () => {
5
5
  const json = JSON.stringify(this._container.actualOptions, (key, value) => {
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export function loadExportJSONPlugin(engine) {
2
- engine.checkVersion("4.0.0-alpha.3");
2
+ engine.checkVersion("4.0.0-alpha.4");
3
3
  engine.register(async (e) => {
4
4
  const { ExportJSONPlugin } = await import("./ExportJSONPlugin.js");
5
5
  e.addPlugin(new ExportJSONPlugin());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-export-json",
3
- "version": "4.0.0-alpha.3",
3
+ "version": "4.0.0-alpha.4",
4
4
  "description": "tsParticles export json plugin",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -100,7 +100,7 @@
100
100
  "./package.json": "./package.json"
101
101
  },
102
102
  "dependencies": {
103
- "@tsparticles/engine": "4.0.0-alpha.3"
103
+ "@tsparticles/engine": "4.0.0-alpha.4"
104
104
  },
105
105
  "publishConfig": {
106
106
  "access": "public"
package/report.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8"/>
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
- <title>@tsparticles/plugin-export-json [10 Jan 2026 at 19:20]</title>
6
+ <title>@tsparticles/plugin-export-json [21 Jan 2026 at 14:33]</title>
7
7
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
8
8
 
9
9
  <script>
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v4.0.0-alpha.3
7
+ * v4.0.0-alpha.4
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -34,7 +34,7 @@ return /******/ (() => { // webpackBootstrap
34
34
  \*******************************/
35
35
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
36
36
 
37
- eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadExportJSONPlugin: () => (/* binding */ loadExportJSONPlugin)\n/* harmony export */ });\nfunction loadExportJSONPlugin(engine) {\n engine.checkVersion(\"4.0.0-alpha.3\");\n engine.register(async e => {\n const {\n ExportJSONPlugin\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_ExportJSONPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ExportJSONPlugin.js */ \"./dist/browser/ExportJSONPlugin.js\"));\n e.addPlugin(new ExportJSONPlugin());\n });\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-json/./dist/browser/index.js?\n}");
37
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadExportJSONPlugin: () => (/* binding */ loadExportJSONPlugin)\n/* harmony export */ });\nfunction loadExportJSONPlugin(engine) {\n engine.checkVersion(\"4.0.0-alpha.4\");\n engine.register(async e => {\n const {\n ExportJSONPlugin\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_ExportJSONPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ExportJSONPlugin.js */ \"./dist/browser/ExportJSONPlugin.js\"));\n e.addPlugin(new ExportJSONPlugin());\n });\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-json/./dist/browser/index.js?\n}");
38
38
 
39
39
  /***/ }
40
40
 
@@ -108,18 +108,6 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
108
108
  /******/ };
109
109
  /******/ })();
110
110
  /******/
111
- /******/ /* webpack/runtime/global */
112
- /******/ (() => {
113
- /******/ __webpack_require__.g = (function() {
114
- /******/ if (typeof globalThis === 'object') return globalThis;
115
- /******/ try {
116
- /******/ return this || new Function('return this')();
117
- /******/ } catch (e) {
118
- /******/ if (typeof window === 'object') return window;
119
- /******/ }
120
- /******/ })();
121
- /******/ })();
122
- /******/
123
111
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
124
112
  /******/ (() => {
125
113
  /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
@@ -184,8 +172,8 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
184
172
  /******/ /* webpack/runtime/publicPath */
185
173
  /******/ (() => {
186
174
  /******/ var scriptUrl;
187
- /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
188
- /******/ var document = __webpack_require__.g.document;
175
+ /******/ if (globalThis.importScripts) scriptUrl = globalThis.location + "";
176
+ /******/ var document = globalThis.document;
189
177
  /******/ if (!scriptUrl && document) {
190
178
  /******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
191
179
  /******/ scriptUrl = document.currentScript.src;
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.plugin.export.json.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(()=>(()=>{var e,t,r={},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,n),i.exports}n.m=r,n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>e+".min.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@tsparticles/plugin-export-json:",n.l=(r,o,i,a)=>{if(e[r])e[r].push(o);else{var s,l;if(void 0!==i)for(var p=document.getElementsByTagName("script"),c=0;c<p.length;c++){var u=p[c];if(u.getAttribute("src")==r||u.getAttribute("data-webpack")==t+i){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[o];var d=(t,o)=>{s.onerror=s.onload=null,clearTimeout(f);var n=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach((e=>e(o))),t)return t(o)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={682:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=i);var a=n.p+n.u(t),s=new Error;n.l(a,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,i,[a,s,l]=r,p=0;if(a.some((t=>0!==e[t]))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(l)l(n)}for(t&&t(r);p<a.length;p++)i=a[p],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=this.webpackChunk_tsparticles_plugin_export_json=this.webpackChunk_tsparticles_plugin_export_json||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i={};function a(e){e.checkVersion("4.0.0-alpha.3"),e.register((async e=>{const{ExportJSONPlugin:t}=await n.e(285).then(n.bind(n,285));e.addPlugin(new t)}))}return n.r(i),n.d(i,{loadExportJSONPlugin:()=>a}),i})()));
2
+ !function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var t=r();for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(this,(()=>(()=>{var e,r,t={},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.m=t,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((r,t)=>(n.f[t](e,r),r)),[])),n.u=e=>e+".min.js",n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@tsparticles/plugin-export-json:",n.l=(t,o,i,a)=>{if(e[t])e[t].push(o);else{var l,s;if(void 0!==i)for(var p=document.getElementsByTagName("script"),c=0;c<p.length;c++){var u=p[c];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==r+i){l=u;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",n.nc&&l.setAttribute("nonce",n.nc),l.setAttribute("data-webpack",r+i),l.src=t),e[t]=[o];var d=(r,o)=>{l.onerror=l.onload=null,clearTimeout(f);var n=e[t];if(delete e[t],l.parentNode&&l.parentNode.removeChild(l),n&&n.forEach((e=>e(o))),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),s&&document.head.appendChild(l)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var r=globalThis.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={682:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var i=new Promise(((t,n)=>o=e[r]=[t,n]));t.push(o[2]=i);var a=n.p+n.u(r),l=new Error;n.l(a,(t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var i=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+i+": "+a+")",l.name="ChunkLoadError",l.type=i,l.request=a,o[1](l)}}),"chunk-"+r,r)}};var r=(r,t)=>{var o,i,[a,l,s]=t,p=0;if(a.some((r=>0!==e[r]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(s)s(n)}for(r&&r(t);p<a.length;p++)i=a[p],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},t=this.webpackChunk_tsparticles_plugin_export_json=this.webpackChunk_tsparticles_plugin_export_json||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var i={};function a(e){e.checkVersion("4.0.0-alpha.4"),e.register((async e=>{const{ExportJSONPlugin:r}=await n.e(160).then(n.bind(n,160));e.addPlugin(new r)}))}return n.r(i),n.d(i,{loadExportJSONPlugin:()=>a}),i})()));
@@ -1 +1 @@
1
- /*! tsParticles Export JSON Plugin v4.0.0-alpha.3 by Matteo Bruni */
1
+ /*! tsParticles Export JSON Plugin v4.0.0-alpha.4 by Matteo Bruni */
@@ -1,9 +1,8 @@
1
- import type { Container, IPlugin } from "@tsparticles/engine";
2
- import { ExportJSONInstance } from "./ExportJSONInstance.js";
1
+ import type { Container, IContainerPlugin, IPlugin } from "@tsparticles/engine";
3
2
  export declare class ExportJSONPlugin implements IPlugin {
4
3
  readonly id: string;
5
4
  constructor();
6
- getPlugin(container: Container): Promise<ExportJSONInstance>;
5
+ getPlugin(container: Container): Promise<IContainerPlugin>;
7
6
  loadOptions(): void;
8
7
  needsPlugin(): boolean;
9
8
  }
@@ -1,5 +1,5 @@
1
1
  import type { Container, ExportResult, IContainerPlugin } from "@tsparticles/engine";
2
- export declare class ExportJSONInstance implements IContainerPlugin {
2
+ export declare class ExportJSONPluginInstance implements IContainerPlugin {
3
3
  private readonly _container;
4
4
  constructor(container: Container);
5
5
  export(type: string): Promise<ExportResult>;
@@ -1,22 +1,56 @@
1
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2
+ if (k2 === undefined) k2 = k;
3
+ var desc = Object.getOwnPropertyDescriptor(m, k);
4
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5
+ desc = { enumerable: true, get: function() { return m[k]; } };
6
+ }
7
+ Object.defineProperty(o, k2, desc);
8
+ }) : (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ o[k2] = m[k];
11
+ }));
12
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
13
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
14
+ }) : function(o, v) {
15
+ o["default"] = v;
16
+ });
17
+ var __importStar = (this && this.__importStar) || (function () {
18
+ var ownKeys = function(o) {
19
+ ownKeys = Object.getOwnPropertyNames || function (o) {
20
+ var ar = [];
21
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
22
+ return ar;
23
+ };
24
+ return ownKeys(o);
25
+ };
26
+ return function (mod) {
27
+ if (mod && mod.__esModule) return mod;
28
+ var result = {};
29
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
30
+ __setModuleDefault(result, mod);
31
+ return result;
32
+ };
33
+ })();
1
34
  (function (factory) {
2
35
  if (typeof module === "object" && typeof module.exports === "object") {
3
36
  var v = factory(require, exports);
4
37
  if (v !== undefined) module.exports = v;
5
38
  }
6
39
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./ExportJSONInstance.js"], factory);
40
+ define(["require", "exports"], factory);
8
41
  }
9
42
  })(function (require, exports) {
10
43
  "use strict";
44
+ var __syncRequire = typeof module === "object" && typeof module.exports === "object";
11
45
  Object.defineProperty(exports, "__esModule", { value: true });
12
46
  exports.ExportJSONPlugin = void 0;
13
- const ExportJSONInstance_js_1 = require("./ExportJSONInstance.js");
14
47
  class ExportJSONPlugin {
15
48
  constructor() {
16
49
  this.id = "export-json";
17
50
  }
18
- getPlugin(container) {
19
- return Promise.resolve(new ExportJSONInstance_js_1.ExportJSONInstance(container));
51
+ async getPlugin(container) {
52
+ const { ExportJSONPluginInstance } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./ExportJSONPluginInstance.js"))) : new Promise((resolve_1, reject_1) => { require(["./ExportJSONPluginInstance.js"], resolve_1, reject_1); }).then(__importStar));
53
+ return new ExportJSONPluginInstance(container);
20
54
  }
21
55
  loadOptions() {
22
56
  }
@@ -9,9 +9,9 @@
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ExportJSONInstance = void 0;
12
+ exports.ExportJSONPluginInstance = void 0;
13
13
  const indent = 2;
14
- class ExportJSONInstance {
14
+ class ExportJSONPluginInstance {
15
15
  constructor(container) {
16
16
  this._exportJSON = async () => {
17
17
  const json = JSON.stringify(this._container.actualOptions, (key, value) => {
@@ -37,5 +37,5 @@
37
37
  return res;
38
38
  }
39
39
  }
40
- exports.ExportJSONInstance = ExportJSONInstance;
40
+ exports.ExportJSONPluginInstance = ExportJSONPluginInstance;
41
41
  });
package/umd/index.js CHANGED
@@ -45,7 +45,7 @@ var __importStar = (this && this.__importStar) || (function () {
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
46
  exports.loadExportJSONPlugin = loadExportJSONPlugin;
47
47
  function loadExportJSONPlugin(engine) {
48
- engine.checkVersion("4.0.0-alpha.3");
48
+ engine.checkVersion("4.0.0-alpha.4");
49
49
  engine.register(async (e) => {
50
50
  const { ExportJSONPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./ExportJSONPlugin.js"))) : new Promise((resolve_1, reject_1) => { require(["./ExportJSONPlugin.js"], resolve_1, reject_1); }).then(__importStar));
51
51
  e.addPlugin(new ExportJSONPlugin());
package/285.min.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 285.min.js.LICENSE.txt */
2
- (this.webpackChunk_tsparticles_plugin_export_json=this.webpackChunk_tsparticles_plugin_export_json||[]).push([[285],{285(t,s,n){n.d(s,{ExportJSONPlugin:()=>o});class r{constructor(t){this._exportJSON=async()=>{const t=JSON.stringify(this._container.actualOptions,((t,s)=>{if(!t.startsWith("_"))return s}),2);return Promise.resolve(new Blob([t],{type:"application/json"}))},this._container=t}async export(t){const s={supported:!1};if("json"===t)s.supported=!0,s.blob=await this._exportJSON();return s}}class o{constructor(){this.id="export-json"}getPlugin(t){return Promise.resolve(new r(t))}loadOptions(){}needsPlugin(){return!0}}}}]);
@@ -1 +0,0 @@
1
- /*! tsParticles Export JSON Plugin v4.0.0-alpha.3 by Matteo Bruni */