@tsparticles/plugin-export-json 4.0.0-alpha.2 → 4.0.0-alpha.20
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/127.min.js +1 -0
- package/680.min.js +1 -0
- package/browser/ExportJSONPlugin.js +4 -6
- package/browser/ExportJSONPluginInstance.js +28 -0
- package/browser/index.js +3 -3
- package/cjs/ExportJSONPlugin.js +4 -6
- package/cjs/ExportJSONPluginInstance.js +28 -0
- package/cjs/index.js +3 -3
- package/dist_browser_ExportJSONPluginInstance_js.js +30 -0
- package/dist_browser_ExportJSONPlugin_js.js +2 -12
- package/esm/ExportJSONPlugin.js +4 -6
- package/esm/ExportJSONPluginInstance.js +28 -0
- package/esm/index.js +3 -3
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.plugin.export.json.js +2 -2
- package/tsparticles.plugin.export.json.min.js +2 -2
- package/types/ExportJSONPlugin.d.ts +3 -5
- package/types/{ExportJSONInstance.d.ts → ExportJSONPluginInstance.d.ts} +1 -1
- package/types/index.d.ts +1 -1
- package/umd/ExportJSONPlugin.js +39 -7
- package/umd/{ExportJSONInstance.js → ExportJSONPluginInstance.js} +13 -12
- package/umd/index.js +3 -3
- package/285.min.js +0 -2
- package/285.min.js.LICENSE.txt +0 -1
- package/browser/ExportJSONInstance.js +0 -27
- package/cjs/ExportJSONInstance.js +0 -27
- package/esm/ExportJSONInstance.js +0 -27
- package/tsparticles.plugin.export.json.min.js.LICENSE.txt +0 -1
package/127.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunk_tsparticles_plugin_export_json=this.webpackChunk_tsparticles_plugin_export_json||[]).push([[127],{127(t,n,e){e.d(n,{ExportJSONPlugin:()=>s});class s{id="export-json";async getPlugin(t){let{ExportJSONPluginInstance:n}=await e.e(680).then(e.bind(e,680));return new n(t)}loadOptions(){}needsPlugin(){return!0}}}}]);
|
package/680.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunk_tsparticles_plugin_export_json=this.webpackChunk_tsparticles_plugin_export_json||[]).push([[680],{680(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,10 +1,8 @@
|
|
|
1
|
-
import { ExportJSONInstance } from "./ExportJSONInstance.js";
|
|
2
1
|
export class ExportJSONPlugin {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return Promise.resolve(new ExportJSONInstance(container));
|
|
2
|
+
id = "export-json";
|
|
3
|
+
async getPlugin(container) {
|
|
4
|
+
const { ExportJSONPluginInstance } = await import("./ExportJSONPluginInstance.js");
|
|
5
|
+
return new ExportJSONPluginInstance(container);
|
|
8
6
|
}
|
|
9
7
|
loadOptions() {
|
|
10
8
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const indent = 2;
|
|
2
|
+
export class ExportJSONPluginInstance {
|
|
3
|
+
_container;
|
|
4
|
+
constructor(container) {
|
|
5
|
+
this._container = container;
|
|
6
|
+
}
|
|
7
|
+
async export(type) {
|
|
8
|
+
const res = {
|
|
9
|
+
supported: false,
|
|
10
|
+
};
|
|
11
|
+
switch (type) {
|
|
12
|
+
case "json":
|
|
13
|
+
res.supported = true;
|
|
14
|
+
res.blob = await this._exportJSON();
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
return res;
|
|
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
|
+
};
|
|
28
|
+
}
|
package/browser/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function loadExportJSONPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-alpha.
|
|
3
|
-
engine.register(async (e) => {
|
|
1
|
+
export async function loadExportJSONPlugin(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.20");
|
|
3
|
+
await engine.register(async (e) => {
|
|
4
4
|
const { ExportJSONPlugin } = await import("./ExportJSONPlugin.js");
|
|
5
5
|
e.addPlugin(new ExportJSONPlugin());
|
|
6
6
|
});
|
package/cjs/ExportJSONPlugin.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { ExportJSONInstance } from "./ExportJSONInstance.js";
|
|
2
1
|
export class ExportJSONPlugin {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return Promise.resolve(new ExportJSONInstance(container));
|
|
2
|
+
id = "export-json";
|
|
3
|
+
async getPlugin(container) {
|
|
4
|
+
const { ExportJSONPluginInstance } = await import("./ExportJSONPluginInstance.js");
|
|
5
|
+
return new ExportJSONPluginInstance(container);
|
|
8
6
|
}
|
|
9
7
|
loadOptions() {
|
|
10
8
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const indent = 2;
|
|
2
|
+
export class ExportJSONPluginInstance {
|
|
3
|
+
_container;
|
|
4
|
+
constructor(container) {
|
|
5
|
+
this._container = container;
|
|
6
|
+
}
|
|
7
|
+
async export(type) {
|
|
8
|
+
const res = {
|
|
9
|
+
supported: false,
|
|
10
|
+
};
|
|
11
|
+
switch (type) {
|
|
12
|
+
case "json":
|
|
13
|
+
res.supported = true;
|
|
14
|
+
res.blob = await this._exportJSON();
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
return res;
|
|
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
|
+
};
|
|
28
|
+
}
|
package/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function loadExportJSONPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-alpha.
|
|
3
|
-
engine.register(async (e) => {
|
|
1
|
+
export async function loadExportJSONPlugin(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.20");
|
|
3
|
+
await engine.register(async (e) => {
|
|
4
4
|
const { ExportJSONPlugin } = await import("./ExportJSONPlugin.js");
|
|
5
5
|
e.addPlugin(new ExportJSONPlugin());
|
|
6
6
|
});
|
|
@@ -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.20
|
|
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 _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
|
+
|
|
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.
|
|
7
|
+
* v4.0.0-alpha.20
|
|
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
|
|
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}");
|
|
37
27
|
|
|
38
28
|
/***/ }
|
|
39
29
|
|
package/esm/ExportJSONPlugin.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { ExportJSONInstance } from "./ExportJSONInstance.js";
|
|
2
1
|
export class ExportJSONPlugin {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return Promise.resolve(new ExportJSONInstance(container));
|
|
2
|
+
id = "export-json";
|
|
3
|
+
async getPlugin(container) {
|
|
4
|
+
const { ExportJSONPluginInstance } = await import("./ExportJSONPluginInstance.js");
|
|
5
|
+
return new ExportJSONPluginInstance(container);
|
|
8
6
|
}
|
|
9
7
|
loadOptions() {
|
|
10
8
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const indent = 2;
|
|
2
|
+
export class ExportJSONPluginInstance {
|
|
3
|
+
_container;
|
|
4
|
+
constructor(container) {
|
|
5
|
+
this._container = container;
|
|
6
|
+
}
|
|
7
|
+
async export(type) {
|
|
8
|
+
const res = {
|
|
9
|
+
supported: false,
|
|
10
|
+
};
|
|
11
|
+
switch (type) {
|
|
12
|
+
case "json":
|
|
13
|
+
res.supported = true;
|
|
14
|
+
res.blob = await this._exportJSON();
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
return res;
|
|
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
|
+
};
|
|
28
|
+
}
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function loadExportJSONPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-alpha.
|
|
3
|
-
engine.register(async (e) => {
|
|
1
|
+
export async function loadExportJSONPlugin(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.20");
|
|
3
|
+
await engine.register(async (e) => {
|
|
4
4
|
const { ExportJSONPlugin } = await import("./ExportJSONPlugin.js");
|
|
5
5
|
e.addPlugin(new ExportJSONPlugin());
|
|
6
6
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-export-json",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.20",
|
|
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.
|
|
103
|
+
"@tsparticles/engine": "4.0.0-alpha.20"
|
|
104
104
|
},
|
|
105
105
|
"publishConfig": {
|
|
106
106
|
"access": "public"
|