more stuff yay
This commit is contained in:
parent
4abadd5358
commit
c62939ea51
8 changed files with 553 additions and 35 deletions
263
package-lock.json
generated
263
package-lock.json
generated
|
|
@ -11,7 +11,9 @@
|
|||
"@blockly/continuous-toolbox": "^5.0.2",
|
||||
"@sveltejs/adapter-vercel": "^3.0.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"js-beautify": "^1.14.9",
|
||||
"jszip": "^3.10.1",
|
||||
"prismjs": "^1.29.0",
|
||||
"svelte-blockly": "^0.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
@ -441,6 +443,11 @@
|
|||
"node-pre-gyp": "bin/node-pre-gyp"
|
||||
}
|
||||
},
|
||||
"node_modules/@one-ini/wasm": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz",
|
||||
"integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw=="
|
||||
},
|
||||
"node_modules/@polka/url": {
|
||||
"version": "1.0.0-next.21",
|
||||
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
|
||||
|
|
@ -793,11 +800,28 @@
|
|||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/commander": {
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
|
||||
"integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
||||
},
|
||||
"node_modules/config-chain": {
|
||||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
|
||||
"integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
|
||||
"dependencies": {
|
||||
"ini": "^1.3.4",
|
||||
"proto-list": "~1.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
|
|
@ -931,6 +955,45 @@
|
|||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/editorconfig": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz",
|
||||
"integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==",
|
||||
"dependencies": {
|
||||
"@one-ini/wasm": "0.1.1",
|
||||
"commander": "^10.0.0",
|
||||
"minimatch": "9.0.1",
|
||||
"semver": "^7.5.3"
|
||||
},
|
||||
"bin": {
|
||||
"editorconfig": "bin/editorconfig"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/editorconfig/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/editorconfig/node_modules/minimatch": {
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
|
||||
"integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16 || 14 >=14.17"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
|
|
@ -1199,6 +1262,11 @@
|
|||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/ini": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
||||
},
|
||||
"node_modules/is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
|
|
@ -1234,6 +1302,76 @@
|
|||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
|
||||
},
|
||||
"node_modules/js-beautify": {
|
||||
"version": "1.14.9",
|
||||
"resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.9.tgz",
|
||||
"integrity": "sha512-coM7xq1syLcMyuVGyToxcj2AlzhkDjmfklL8r0JgJ7A76wyGMpJ1oA35mr4APdYNO/o/4YY8H54NQIJzhMbhBg==",
|
||||
"dependencies": {
|
||||
"config-chain": "^1.1.13",
|
||||
"editorconfig": "^1.0.3",
|
||||
"glob": "^8.1.0",
|
||||
"nopt": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"css-beautify": "js/bin/css-beautify.js",
|
||||
"html-beautify": "js/bin/html-beautify.js",
|
||||
"js-beautify": "js/bin/js-beautify.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/js-beautify/node_modules/brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/js-beautify/node_modules/glob": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
|
||||
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^5.0.1",
|
||||
"once": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/js-beautify/node_modules/minimatch": {
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
|
||||
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/js-beautify/node_modules/nopt": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz",
|
||||
"integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==",
|
||||
"dependencies": {
|
||||
"abbrev": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"nopt": "bin/nopt.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/jsdom": {
|
||||
"version": "22.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz",
|
||||
|
|
@ -1665,11 +1803,24 @@
|
|||
"node": "^10 || ^12 || >=14"
|
||||
}
|
||||
},
|
||||
"node_modules/prismjs": {
|
||||
"version": "1.29.0",
|
||||
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz",
|
||||
"integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/process-nextick-args": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||
},
|
||||
"node_modules/proto-list": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
|
||||
"integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA=="
|
||||
},
|
||||
"node_modules/psl": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
|
||||
|
|
@ -2410,6 +2561,11 @@
|
|||
"tar": "^6.1.11"
|
||||
}
|
||||
},
|
||||
"@one-ini/wasm": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz",
|
||||
"integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw=="
|
||||
},
|
||||
"@polka/url": {
|
||||
"version": "1.0.0-next.21",
|
||||
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
|
||||
|
|
@ -2691,11 +2847,25 @@
|
|||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
|
||||
"integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug=="
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
|
||||
},
|
||||
"config-chain": {
|
||||
"version": "1.1.13",
|
||||
"resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
|
||||
"integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
|
||||
"requires": {
|
||||
"ini": "^1.3.4",
|
||||
"proto-list": "~1.2.1"
|
||||
}
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
|
|
@ -2794,6 +2964,35 @@
|
|||
"webidl-conversions": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"editorconfig": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz",
|
||||
"integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==",
|
||||
"requires": {
|
||||
"@one-ini/wasm": "0.1.1",
|
||||
"commander": "^10.0.0",
|
||||
"minimatch": "9.0.1",
|
||||
"semver": "^7.5.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
|
||||
"integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==",
|
||||
"requires": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
|
|
@ -3007,6 +3206,11 @@
|
|||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
|
|
@ -3036,6 +3240,55 @@
|
|||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
|
||||
},
|
||||
"js-beautify": {
|
||||
"version": "1.14.9",
|
||||
"resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.9.tgz",
|
||||
"integrity": "sha512-coM7xq1syLcMyuVGyToxcj2AlzhkDjmfklL8r0JgJ7A76wyGMpJ1oA35mr4APdYNO/o/4YY8H54NQIJzhMbhBg==",
|
||||
"requires": {
|
||||
"config-chain": "^1.1.13",
|
||||
"editorconfig": "^1.0.3",
|
||||
"glob": "^8.1.0",
|
||||
"nopt": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"brace-expansion": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
||||
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
|
||||
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^5.0.1",
|
||||
"once": "^1.3.0"
|
||||
}
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
|
||||
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
|
||||
"requires": {
|
||||
"brace-expansion": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"nopt": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz",
|
||||
"integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==",
|
||||
"requires": {
|
||||
"abbrev": "^1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"jsdom": {
|
||||
"version": "22.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz",
|
||||
|
|
@ -3339,11 +3592,21 @@
|
|||
"source-map-js": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"prismjs": {
|
||||
"version": "1.29.0",
|
||||
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz",
|
||||
"integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q=="
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||
},
|
||||
"proto-list": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
|
||||
"integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA=="
|
||||
},
|
||||
"psl": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@
|
|||
"@blockly/continuous-toolbox": "^5.0.2",
|
||||
"@sveltejs/adapter-vercel": "^3.0.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"js-beautify": "^1.14.9",
|
||||
"jszip": "^3.10.1",
|
||||
"prismjs": "^1.29.0",
|
||||
"svelte-blockly": "^0.1.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@
|
|||
<meta name="theme-color" content="#ff4b4b" />
|
||||
<meta name="og:image" content="icon.png" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.22.0/themes/prism.min.css" rel="stylesheet" />
|
||||
<style>
|
||||
*:not(code) {
|
||||
*:not(code, .token) {
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
|
|
|
|||
40
src/lib/NavigationBar/Button.svelte
Normal file
40
src/lib/NavigationBar/Button.svelte
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from "svelte";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
function event() {
|
||||
dispatch("click");
|
||||
}
|
||||
</script>
|
||||
|
||||
<button on:click={event}>
|
||||
<b>
|
||||
<slot />
|
||||
</b>
|
||||
</button>
|
||||
|
||||
<style>
|
||||
button {
|
||||
position: relative;
|
||||
|
||||
height: 100%;
|
||||
padding: 0 0.75rem;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
font-weight: bold;
|
||||
font-size: 0.75rem;
|
||||
color: white;
|
||||
background: #ff4b4b;
|
||||
cursor: pointer;
|
||||
border: 0;
|
||||
}
|
||||
button:focus,
|
||||
button:hover,
|
||||
button:active {
|
||||
background: rgb(211, 62, 62);
|
||||
}
|
||||
</style>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<div class="nav">
|
||||
<img
|
||||
src="/images/icon.png"
|
||||
src="/favicon.png"
|
||||
alt="Logo"
|
||||
class="logo-margin"
|
||||
style="height: 100%;"
|
||||
|
|
|
|||
31
src/lib/StyledComponents/ToolboxButton.svelte
Normal file
31
src/lib/StyledComponents/ToolboxButton.svelte
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from "svelte";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
function event() {
|
||||
dispatch("click");
|
||||
}
|
||||
</script>
|
||||
|
||||
<button on:click={event}>
|
||||
<slot />
|
||||
</button>
|
||||
|
||||
<style>
|
||||
button {
|
||||
padding: 0.5rem 1.65rem;
|
||||
|
||||
font-size: 0.75rem;
|
||||
color: black;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 4px;
|
||||
}
|
||||
button:focus,
|
||||
button:hover,
|
||||
button:active {
|
||||
background: white;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -6,11 +6,12 @@ import javascriptGenerator from '../javascriptGenerator';
|
|||
|
||||
class Compiler {
|
||||
/**
|
||||
* Generates JavaScript code from the provided workspace.
|
||||
* Generates JavaScript code from the provided workspace & image info.
|
||||
* @param {Blockly.Workspace} workspace
|
||||
* @param {object} imageStates
|
||||
* @returns {string} Generated code.
|
||||
*/
|
||||
compile(workspace) {
|
||||
compile(workspace, imageStates) {
|
||||
const code = javascriptGenerator.workspaceToCode(workspace);
|
||||
|
||||
const headerCode = [
|
||||
|
|
@ -19,16 +20,30 @@ class Compiler {
|
|||
` https://turbobuilder.vercel.app/`,
|
||||
`*/`,
|
||||
`(function (Scratch) {`,
|
||||
`const variables = {};`,
|
||||
raw_compileVarSection,
|
||||
raw_randomNumberGen
|
||||
`const variables = {};`
|
||||
];
|
||||
const classRegistry = {
|
||||
top: [
|
||||
`class Extension {`
|
||||
],
|
||||
bottom: [
|
||||
`}`
|
||||
]
|
||||
}
|
||||
const footerCode = [
|
||||
`Scratch.extensions.register(new Extension());`,
|
||||
`})(Scratch);`
|
||||
];
|
||||
|
||||
return [].concat(headerCode, code, footerCode).join('\n');
|
||||
if (imageStates) {
|
||||
if (imageStates.icon.image) {
|
||||
// add icon uri
|
||||
const url = imageStates.icon.image;
|
||||
headerCode.push(`const categoryIconURI = ${JSON.stringify(url)};`);
|
||||
}
|
||||
}
|
||||
|
||||
return [].concat(headerCode, classRegistry.top, classRegistry.bottom, code, footerCode).join('\n');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,16 @@
|
|||
|
||||
// Components
|
||||
import NavigationBar from "$lib/NavigationBar/NavigationBar.svelte";
|
||||
import NavigationDivider from "$lib/NavigationBar/Divider.svelte";
|
||||
import NavigationButton from "$lib/NavigationBar/Button.svelte";
|
||||
import StyledButton from "$lib/StyledComponents/ToolboxButton.svelte";
|
||||
|
||||
// Toolbox
|
||||
import Toolbox from "$lib/Toolbox/Toolbox.xml?raw";
|
||||
|
||||
import JSZip from "jszip";
|
||||
import beautify from "js-beautify";
|
||||
import Prism from "prismjs";
|
||||
import * as FileSaver from "file-saver";
|
||||
import fileDialog from "../resources/fileDialog";
|
||||
|
||||
|
|
@ -74,16 +79,26 @@
|
|||
let compiler;
|
||||
let lastGeneratedCode = "";
|
||||
|
||||
const extensionImageStates = {
|
||||
icon: {
|
||||
failed: false,
|
||||
square: false,
|
||||
loading: false,
|
||||
image: "",
|
||||
},
|
||||
};
|
||||
|
||||
function updateGeneratedCode() {
|
||||
const code = compiler.compile(workspace, extensionImageStates);
|
||||
lastGeneratedCode = code;
|
||||
}
|
||||
onMount(() => {
|
||||
console.log("ignore the warnings above we dont care about those");
|
||||
|
||||
window.onbeforeunload = () => "";
|
||||
compiler = new Compiler(workspace);
|
||||
// workspace was changed
|
||||
workspace.addChangeListener(() => {
|
||||
const code = compiler.compile(workspace);
|
||||
lastGeneratedCode = code;
|
||||
});
|
||||
workspace.addChangeListener(updateGeneratedCode);
|
||||
});
|
||||
|
||||
let fileMenu;
|
||||
|
|
@ -174,9 +189,71 @@
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
// code display & handling
|
||||
function beautifyGeneratedCode(code) {
|
||||
const beautified = beautify.js(code, {
|
||||
indent_size: 4,
|
||||
space_in_empty_paren: true,
|
||||
});
|
||||
return beautified;
|
||||
}
|
||||
function displayGeneratedCode(code) {
|
||||
const beautified = beautifyGeneratedCode(code);
|
||||
const highlighted = Prism.highlight(
|
||||
beautified,
|
||||
Prism.languages.javascript
|
||||
);
|
||||
return highlighted;
|
||||
}
|
||||
|
||||
// image importing
|
||||
function extensionIconAdded(event) {
|
||||
console.log(event);
|
||||
const filePicker = event.target;
|
||||
// check if we have a file
|
||||
if (!filePicker.files || !filePicker.files[0]) {
|
||||
// remove the image
|
||||
extensionImageStates.icon.failed = false;
|
||||
extensionImageStates.icon.square = false;
|
||||
extensionImageStates.icon.loading = false;
|
||||
extensionImageStates.icon.image = "";
|
||||
updateGeneratedCode();
|
||||
return;
|
||||
}
|
||||
const file = filePicker.files[0];
|
||||
|
||||
extensionImageStates.icon.loading = true;
|
||||
const fileReader = new FileReader();
|
||||
fileReader.onload = () => {
|
||||
// file finished loading
|
||||
const url = fileReader.result;
|
||||
extensionImageStates.icon.image = url;
|
||||
updateGeneratedCode();
|
||||
// start checking the other stuff
|
||||
const image = new Image();
|
||||
image.onload = () => {
|
||||
extensionImageStates.icon.failed = false;
|
||||
extensionImageStates.icon.square = image.width === image.height;
|
||||
// mark as loading finished
|
||||
extensionImageStates.icon.loading = false;
|
||||
};
|
||||
image.onerror = () => {
|
||||
extensionImageStates.icon.failed = true;
|
||||
extensionImageStates.icon.square = false;
|
||||
// mark as loading finished
|
||||
extensionImageStates.icon.loading = false;
|
||||
};
|
||||
image.src = url;
|
||||
};
|
||||
fileReader.readAsDataURL(file);
|
||||
}
|
||||
</script>
|
||||
|
||||
<NavigationBar>
|
||||
<NavigationButton>File</NavigationButton>
|
||||
<NavigationButton>Edit</NavigationButton>
|
||||
<NavigationDivider />
|
||||
<input
|
||||
class="project-name"
|
||||
type="text"
|
||||
|
|
@ -187,40 +264,72 @@
|
|||
</NavigationBar>
|
||||
<div class="main">
|
||||
<div class="row-menus">
|
||||
<div class="blocklyWrapper">
|
||||
<BlocklyComponent {config} locale={en} bind:workspace />
|
||||
<div class="row-first-submenus">
|
||||
<div class="blockMenuButtons">
|
||||
<StyledButton>Create an Extension Block</StyledButton>
|
||||
</div>
|
||||
<div class="blocklyWrapper">
|
||||
<BlocklyComponent {config} locale={en} bind:workspace />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-submenus">
|
||||
<div class="assetsWrapper">
|
||||
<h1>Assets</h1>
|
||||
{#if projectName}
|
||||
<p>{projectName} extension</p>
|
||||
{:else}
|
||||
<p>Extension</p>
|
||||
{/if}
|
||||
<p>
|
||||
These things are not required, you can leave them empty if
|
||||
you want!
|
||||
Extra things that will appear under
|
||||
{#if projectName}
|
||||
"{projectName}"
|
||||
{:else}
|
||||
"Extension"
|
||||
{/if}
|
||||
in the block list.
|
||||
<br />
|
||||
These things are not required, so you can leave them empty if
|
||||
you do not need them.
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
Documentation URL:
|
||||
<input type="text" placeholder="https://..." />
|
||||
</p>
|
||||
<p>
|
||||
Extension Icon:
|
||||
<input type="file" />
|
||||
<input type="file" on:change={extensionIconAdded} />
|
||||
</p>
|
||||
<!-- <p class="warning">
|
||||
Warning! This is not an image! The icon may appear broken!
|
||||
</p> -->
|
||||
{#if !extensionImageStates.icon.loading && !extensionImageStates.icon.failed && extensionImageStates.icon.image}
|
||||
<img
|
||||
alt="Extension Icon"
|
||||
title="Extension Icon"
|
||||
class="extensionIcon"
|
||||
src={extensionImageStates.icon.image}
|
||||
/>
|
||||
{/if}
|
||||
{#if extensionImageStates.icon.image}
|
||||
{#if extensionImageStates.icon.failed}
|
||||
<p class="warning">
|
||||
The extension icon is not an image, this may appear
|
||||
broken in the category list.
|
||||
</p>
|
||||
{/if}
|
||||
{#if !extensionImageStates.icon.square}
|
||||
<p class="warning">
|
||||
The image is not square, this may appear broken in
|
||||
the category list.
|
||||
</p>
|
||||
{/if}
|
||||
{/if}
|
||||
<h3>Extra Icons</h3>
|
||||
<p>
|
||||
Blocks can use their own icons instead of the Extension
|
||||
icon.
|
||||
<br />
|
||||
Add more images here to use them.
|
||||
</p>
|
||||
<StyledButton>Add Image</StyledButton>
|
||||
</div>
|
||||
<div class="codeWrapper">
|
||||
<textarea
|
||||
value={lastGeneratedCode}
|
||||
disabled="true"
|
||||
style="width:100%;height:100%;border:0;padding:0;color:white;background:black;font-family:monospace"
|
||||
/>
|
||||
<div class="codeDisplay">
|
||||
{@html displayGeneratedCode(lastGeneratedCode)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -230,6 +339,21 @@
|
|||
:root {
|
||||
--nav-height: 3rem;
|
||||
}
|
||||
input[type="file"]::file-selector-button {
|
||||
padding: 0.35rem 1.65rem;
|
||||
|
||||
font-size: 0.75rem;
|
||||
color: black;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-radius: 4px;
|
||||
}
|
||||
input[type="file"]::file-selector-button:focus,
|
||||
input[type="file"]::file-selector-button:hover,
|
||||
input[type="file"]::file-selector-button:active {
|
||||
background: white;
|
||||
}
|
||||
|
||||
.main {
|
||||
position: absolute;
|
||||
|
|
@ -237,6 +361,8 @@
|
|||
top: var(--nav-height);
|
||||
width: 100%;
|
||||
height: calc(100% - var(--nav-height));
|
||||
|
||||
min-width: 870px;
|
||||
}
|
||||
|
||||
.project-name {
|
||||
|
|
@ -275,6 +401,12 @@
|
|||
transition: 0.25s;
|
||||
}
|
||||
|
||||
.extensionIcon {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.row-menus {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
|
@ -288,16 +420,37 @@
|
|||
width: 35%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.blocklyWrapper {
|
||||
position: relative;
|
||||
.row-first-submenus {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 65%;
|
||||
height: 100%;
|
||||
}
|
||||
.assetsWrapper {
|
||||
|
||||
.blockMenuButtons {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
height: 48px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.blocklyWrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 95%;
|
||||
}
|
||||
.assetsWrapper {
|
||||
position: relative;
|
||||
width: calc(100% - 16px);
|
||||
height: calc(50% - 16px);
|
||||
padding: 8px;
|
||||
overflow: auto;
|
||||
}
|
||||
.codeWrapper {
|
||||
position: relative;
|
||||
|
|
@ -305,6 +458,19 @@
|
|||
height: 50%;
|
||||
}
|
||||
|
||||
.codeDisplay {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
border: 0;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
|
||||
background: #f9f9f9;
|
||||
white-space: pre-wrap;
|
||||
font-family: monospace !important;
|
||||
}
|
||||
|
||||
.warning {
|
||||
background-color: yellow;
|
||||
color: black;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue