@tsparticles/plugin-export-json 4.0.0-alpha.5 → 4.0.0-beta.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/396.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_plugin_export_json=this.webpackChunk_tsparticles_plugin_export_json||[]).push([[396],{396(t,n,e){e.d(n,{ExportJSONPlugin:()=>s});class s{id="export-json";async getPlugin(t){let{ExportJSONPluginInstance:n}=await e.e(947).then(e.bind(e,947));return new n(t)}loadOptions(){}needsPlugin(){return!0}}}}]);
package/947.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_plugin_export_json=this.webpackChunk_tsparticles_plugin_export_json||[]).push([[947],{947(t,s,n){n.d(s,{ExportJSONPluginInstance:()=>e});class e{_container;constructor(t){this._container=t}async export(t){let s={supported:!1};return"json"===t&&(s.supported=!0,s.blob=await this._exportJSON()),s}_exportJSON=async()=>Promise.resolve(new Blob([JSON.stringify(this._container.actualOptions,(t,s)=>{if(!t.startsWith("_"))return s},2)],{type:"application/json"}))}}}]);
@@ -1,7 +1,5 @@
1
1
  export class ExportJSONPlugin {
2
- constructor() {
3
- this.id = "export-json";
4
- }
2
+ id = "export-json";
5
3
  async getPlugin(container) {
6
4
  const { ExportJSONPluginInstance } = await import("./ExportJSONPluginInstance.js");
7
5
  return new ExportJSONPluginInstance(container);
@@ -1,15 +1,7 @@
1
1
  const indent = 2;
2
2
  export class ExportJSONPluginInstance {
3
+ _container;
3
4
  constructor(container) {
4
- this._exportJSON = async () => {
5
- const json = JSON.stringify(this._container.actualOptions, (key, value) => {
6
- if (key.startsWith("_")) {
7
- return;
8
- }
9
- return value;
10
- }, indent);
11
- return Promise.resolve(new Blob([json], { type: "application/json" }));
12
- };
13
5
  this._container = container;
14
6
  }
15
7
  async export(type) {
@@ -24,4 +16,13 @@ export class ExportJSONPluginInstance {
24
16
  }
25
17
  return res;
26
18
  }
19
+ _exportJSON = async () => {
20
+ const json = JSON.stringify(this._container.actualOptions, (key, value) => {
21
+ if (key.startsWith("_")) {
22
+ return;
23
+ }
24
+ return value;
25
+ }, indent);
26
+ return Promise.resolve(new Blob([json], { type: "application/json" }));
27
+ };
27
28
  }
package/browser/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadExportJSONPlugin(engine) {
2
- engine.checkVersion("4.0.0-alpha.5");
2
+ engine.checkVersion("4.0.0-beta.0");
3
3
  await engine.register(async (e) => {
4
4
  const { ExportJSONPlugin } = await import("./ExportJSONPlugin.js");
5
5
  e.addPlugin(new ExportJSONPlugin());
@@ -1,7 +1,5 @@
1
1
  export class ExportJSONPlugin {
2
- constructor() {
3
- this.id = "export-json";
4
- }
2
+ id = "export-json";
5
3
  async getPlugin(container) {
6
4
  const { ExportJSONPluginInstance } = await import("./ExportJSONPluginInstance.js");
7
5
  return new ExportJSONPluginInstance(container);
@@ -1,15 +1,7 @@
1
1
  const indent = 2;
2
2
  export class ExportJSONPluginInstance {
3
+ _container;
3
4
  constructor(container) {
4
- this._exportJSON = async () => {
5
- const json = JSON.stringify(this._container.actualOptions, (key, value) => {
6
- if (key.startsWith("_")) {
7
- return;
8
- }
9
- return value;
10
- }, indent);
11
- return Promise.resolve(new Blob([json], { type: "application/json" }));
12
- };
13
5
  this._container = container;
14
6
  }
15
7
  async export(type) {
@@ -24,4 +16,13 @@ export class ExportJSONPluginInstance {
24
16
  }
25
17
  return res;
26
18
  }
19
+ _exportJSON = async () => {
20
+ const json = JSON.stringify(this._container.actualOptions, (key, value) => {
21
+ if (key.startsWith("_")) {
22
+ return;
23
+ }
24
+ return value;
25
+ }, indent);
26
+ return Promise.resolve(new Blob([json], { type: "application/json" }));
27
+ };
27
28
  }
package/cjs/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadExportJSONPlugin(engine) {
2
- engine.checkVersion("4.0.0-alpha.5");
2
+ engine.checkVersion("4.0.0-beta.0");
3
3
  await engine.register(async (e) => {
4
4
  const { ExportJSONPlugin } = await import("./ExportJSONPlugin.js");
5
5
  e.addPlugin(new ExportJSONPlugin());
@@ -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.5
7
+ * v4.0.0-beta.0
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -23,7 +23,7 @@
23
23
  \**************************************************/
24
24
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
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}");
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 _container;\n constructor(container){\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 _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([\n json\n ], {\n type: \"application/json\"\n }));\n };\n}\n\n\n//# sourceURL=webpack://@tsparticles/plugin-export-json/./dist/browser/ExportJSONPluginInstance.js?\n}");
27
27
 
28
28
  /***/ }
29
29
 
@@ -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.5
7
+ * v4.0.0-beta.0
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -23,7 +23,7 @@
23
23
  \******************************************/
24
24
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
25
 
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}");
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 id = \"export-json\";\n async getPlugin(container) {\n const { ExportJSONPluginInstance } = 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\n//# sourceURL=webpack://@tsparticles/plugin-export-json/./dist/browser/ExportJSONPlugin.js?\n}");
27
27
 
28
28
  /***/ }
29
29
 
@@ -1,7 +1,5 @@
1
1
  export class ExportJSONPlugin {
2
- constructor() {
3
- this.id = "export-json";
4
- }
2
+ id = "export-json";
5
3
  async getPlugin(container) {
6
4
  const { ExportJSONPluginInstance } = await import("./ExportJSONPluginInstance.js");
7
5
  return new ExportJSONPluginInstance(container);
@@ -1,15 +1,7 @@
1
1
  const indent = 2;
2
2
  export class ExportJSONPluginInstance {
3
+ _container;
3
4
  constructor(container) {
4
- this._exportJSON = async () => {
5
- const json = JSON.stringify(this._container.actualOptions, (key, value) => {
6
- if (key.startsWith("_")) {
7
- return;
8
- }
9
- return value;
10
- }, indent);
11
- return Promise.resolve(new Blob([json], { type: "application/json" }));
12
- };
13
5
  this._container = container;
14
6
  }
15
7
  async export(type) {
@@ -24,4 +16,13 @@ export class ExportJSONPluginInstance {
24
16
  }
25
17
  return res;
26
18
  }
19
+ _exportJSON = async () => {
20
+ const json = JSON.stringify(this._container.actualOptions, (key, value) => {
21
+ if (key.startsWith("_")) {
22
+ return;
23
+ }
24
+ return value;
25
+ }, indent);
26
+ return Promise.resolve(new Blob([json], { type: "application/json" }));
27
+ };
27
28
  }
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadExportJSONPlugin(engine) {
2
- engine.checkVersion("4.0.0-alpha.5");
2
+ engine.checkVersion("4.0.0-beta.0");
3
3
  await 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.5",
3
+ "version": "4.0.0-beta.0",
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.5"
103
+ "@tsparticles/engine": "4.0.0-beta.0"
104
104
  },
105
105
  "publishConfig": {
106
106
  "access": "public"