commit af6b029e95e9c98e6fb9c642915d461b8d7f448e Author: Matthew Phillips Date: Mon Mar 15 13:22:05 2021 -0400 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..88edb6288 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +lib/ diff --git a/magicthing.mjs b/magicthing.mjs new file mode 100644 index 000000000..caaa50972 --- /dev/null +++ b/magicthing.mjs @@ -0,0 +1,30 @@ +#!/usr/bin/env node +import { join as pathJoin, resolve as pathResolve } from 'path'; + +import generate from './lib/generate.js'; +import devServer from './lib/dev.js'; + +const root = pathResolve(process.argv[2]); + +if(!root) { + console.error('Must provide a project root'); + process.exit(1); +} + +const fileProtocolRoot = `file://${root}/`; + +async function run() { + const magicConfig = (await import(pathJoin(root, 'magicthing.config.mjs'))).default; + magicConfig.projectRoot = new URL(magicConfig.projectRoot + '/', fileProtocolRoot); + magicConfig.hmxRoot = new URL(magicConfig.hmxRoot + '/', fileProtocolRoot); + + + // Should use an args parser eventually + if(process.argv.includes('--generate')) { + return generate(magicConfig); + } else { + return devServer(magicConfig); + } +} + +run().catch(err => setTimeout(() => {throw err})); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..67e68cfd5 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2684 @@ +{ + "name": "hmx-v2", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@types/node": "^14.14.31", + "@vue/server-renderer": "^3.0.7", + "acorn": "^7.4.0", + "astring": "^1.7.0", + "cheerio": "^0.22.0", + "css-tree": "^1.1.2", + "domhandler": "^4.0.0", + "es-module-lexer": "^0.4.1", + "gray-matter": "^4.0.2", + "htmlparser2": "^6.0.0", + "magic-string": "^0.25.3", + "micromark": "^2.11.4", + "micromark-extension-gfm": "^0.3.3", + "react": "^17.0.1", + "react-dom": "^17.0.1", + "snowpack": "^3.1.0-pre.12", + "svelte": "^3.35.0", + "vue": "^3.0.7" + }, + "devDependencies": { + "copyfiles": "^2.4.1", + "estree-walker": "^3.0.0", + "preact": "^10.5.12", + "preact-render-to-string": "^5.1.14", + "typescript": "^4.2.3" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + }, + "node_modules/@babel/parser": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", + "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", + "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@types/node": { + "version": "14.14.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.34.tgz", + "integrity": "sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA==" + }, + "node_modules/@vue/compiler-core": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.7.tgz", + "integrity": "sha512-JFohgBXoyUc3mdeI2WxlhjQZ5fakfemJkZHX8Gu/nFbEg3+lKVUZmNKWmmnp9aOzJQZKoj77LjmFxiP+P+7lMQ==", + "dependencies": { + "@babel/parser": "^7.12.0", + "@babel/types": "^7.12.0", + "@vue/shared": "3.0.7", + "estree-walker": "^2.0.1", + "source-map": "^0.6.1" + } + }, + "node_modules/@vue/compiler-core/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@vue/compiler-dom": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.7.tgz", + "integrity": "sha512-VnIH9EbWQm/Tkcp+8dCaNVsVvhm/vxCrIKWRkXY9215hTqOqQOvejT8IMjd2kc++nIsYMsdQk6H9qqBvoLe/Cw==", + "dependencies": { + "@vue/compiler-core": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.7.tgz", + "integrity": "sha512-nHRbHeSpfXwjypettjrA16TjgfDcPEwq3m/zHnGyLC1QqdLtklXmpSM43/CPwwTCRa/qdt0pldJf22MiCEuTSQ==", + "dependencies": { + "@vue/compiler-dom": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.7.tgz", + "integrity": "sha512-FotWcNNaKhqpFZrdgsUOZ1enlJ5lhTt01CNTtLSyK7jYFgZBTuw8vKsEutZKDYZ1XKotOfoeO8N3pZQqmM6Etw==", + "dependencies": { + "@vue/shared": "3.0.7" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.7.tgz", + "integrity": "sha512-DBAZAwVvdmMXuyd6/9qqj/kYr/GaLTmn1L2/QLxLwP+UfhIboiTSBc/tUUb8MRk7Bb98GzNeAWkkT6AfooS3dQ==", + "dependencies": { + "@vue/reactivity": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.7.tgz", + "integrity": "sha512-Oij4ruOtnpQpCj+/Q3JPzgpTJ1Q7+N67pA53A8KVITEtxfvKL46NN6dhAZ5NGqwX6RWZpYqWQNewITeF0pHr8g==", + "dependencies": { + "@vue/runtime-core": "3.0.7", + "@vue/shared": "3.0.7", + "csstype": "^2.6.8" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.0.7.tgz", + "integrity": "sha512-3idEbDTQ0GSPgGTiM9Ml4IwPOityotTRUyrDttAyFoSz6DI1RvE1QR0nSQR7TMgMDXwbO22gf+nMYVkj7c9VRg==", + "dependencies": { + "@vue/compiler-ssr": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "node_modules/@vue/shared": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.7.tgz", + "integrity": "sha512-dn5FyfSc4ky424jH4FntiHno7Ss5yLkqKNmM/NXwANRnlkmqu74pnGetexDFVG5phMk9/FhwovUZCWGxsotVKg==" + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/astring": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/astring/-/astring-1.7.0.tgz", + "integrity": "sha512-43bervUZNvahG1v74a+POdGlAWcOUGSvP9fJVj6sywzM/SquwDkA+CdP938e8tWHUV77fStCiqzaQHAt0u6MVA==", + "bin": { + "astring": "bin/astring" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/big-integer": { + "version": "1.6.48", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "node_modules/bplist-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", + "dependencies": { + "big-integer": "^1.6.7" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==" + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==" + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==" + }, + "node_modules/cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "dependencies": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cheerio/node_modules/domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/cheerio/node_modules/htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dependencies": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "node_modules/cheerio/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/cheerio/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/cli-spinners": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", + "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, + "dependencies": { + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" + }, + "bin": { + "copyfiles": "copyfiles", + "copyup": "copyfiles" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dependencies": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "node_modules/css-tree": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", + "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "engines": { + "node": "*" + } + }, + "node_modules/csstype": { + "version": "2.6.16", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.16.tgz", + "integrity": "sha512-61FBWoDHp/gRtsoDkq/B1nWrCUG/ok1E3tUrcNbZjsE9Cxd9yzUirjS3+nAATB8U4cTtaQmAHbNndoFz5L6C9Q==" + }, + "node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/default-browser-id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-2.0.0.tgz", + "integrity": "sha1-AezONxpx6F8VoXF354YwR+c9vn0=", + "dependencies": { + "bplist-parser": "^0.1.0", + "pify": "^2.3.0", + "untildify": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/default-browser-id/node_modules/untildify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-2.1.0.tgz", + "integrity": "sha1-F+soB5h/dpUunASF/DEdBqgmouA=", + "dependencies": { + "os-homedir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "dependencies": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + }, + "node_modules/domhandler": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", + "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", + "dependencies": { + "domelementtype": "^2.1.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/domhandler/node_modules/domelementtype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==" + }, + "node_modules/domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + }, + "node_modules/es-module-lexer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.4.1.tgz", + "integrity": "sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA==" + }, + "node_modules/esbuild": { + "version": "0.8.57", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.57.tgz", + "integrity": "sha512-j02SFrUwFTRUqiY0Kjplwjm1psuzO1d6AjaXKuOR9hrY0HuPsT6sV42B6myW34h1q4CRy+Y3g4RU/cGJeI/nNA==", + "bin": { + "esbuild": "bin/esbuild" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estree-walker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.0.tgz", + "integrity": "sha512-s6ceX0NFiU/vKPiKvFdR83U1Zffu7upwZsGwpoqfg5rbbq1l50WQ5hCeIvM6E6oD4shUHCYMsiFPns4Jk0YfMQ==", + "dev": true + }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/gray-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.2.tgz", + "integrity": "sha512-7hB/+LxrOjq/dd8APlK0r24uL/67w7SkYnfwhNFwg/VDIGWGmduTDYf3WNstLW2fbbmRwrDGCVSJ2isuf2+4Hw==", + "dependencies": { + "js-yaml": "^3.11.0", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/htmlparser2": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.0.1.tgz", + "integrity": "sha512-GDKPd+vk4jvSuvCbyuzx/unmXkk090Azec7LovXP8as1Hn8q9p3hbjmDGbUqqhknw0ajwit6LiiWqfiTUPMK7w==", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.4.4", + "entities": "^2.0.0" + } + }, + "node_modules/htmlparser2/node_modules/dom-serializer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz", + "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "entities": "^2.0.0" + } + }, + "node_modules/htmlparser2/node_modules/domelementtype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==" + }, + "node_modules/htmlparser2/node_modules/domutils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.5.0.tgz", + "integrity": "sha512-Ho16rzNMOFk2fPwChGh3D2D9OEHAfG19HgmRR2l+WLSsIstNsAYBzePH412bL0y5T44ejABIVfTHQ8nqi/tBCg==", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==" + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, + "node_modules/is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==" + }, + "node_modules/is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "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", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==" + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" + }, + "node_modules/lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "node_modules/lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "node_modules/lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "node_modules/lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "node_modules/lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" + }, + "node_modules/lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" + }, + "node_modules/lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" + }, + "node_modules/lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dependencies": { + "sourcemap-codec": "^1.4.4" + } + }, + "node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" + }, + "node_modules/micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dependencies": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "node_modules/micromark-extension-gfm": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.3.tgz", + "integrity": "sha512-oVN4zv5/tAIA+l3GbMi7lWeYpJ14oQyJ3uEim20ktYFAcfX1x3LNlFGGlmrZHt7u9YlKExmyJdDGaTt6cMSR/A==", + "dependencies": { + "micromark": "~2.11.0", + "micromark-extension-gfm-autolink-literal": "~0.5.0", + "micromark-extension-gfm-strikethrough": "~0.6.5", + "micromark-extension-gfm-table": "~0.4.0", + "micromark-extension-gfm-tagfilter": "~0.3.0", + "micromark-extension-gfm-task-list-item": "~0.3.0" + } + }, + "node_modules/micromark-extension-gfm-autolink-literal": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.6.tgz", + "integrity": "sha512-nHbR1NUOVhmlZNsnhE5B7WJzL7Xd8lc888z4AF27IpHMtO3NstclZmbrMI+AcdTPpO1wuGVwlK1Cnq+n8Sxlrw==", + "dependencies": { + "micromark": "~2.11.3" + } + }, + "node_modules/micromark-extension-gfm-strikethrough": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.5.tgz", + "integrity": "sha512-PpOKlgokpQRwUesRwWEp+fHjGGkZEejj83k9gU5iXCbDG+XBA92BqnRKYJdfqfkrRcZRgGuPuXb7DaK/DmxOhw==", + "dependencies": { + "micromark": "~2.11.0" + } + }, + "node_modules/micromark-extension-gfm-table": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.3.tgz", + "integrity": "sha512-hVGvESPq0fk6ALWtomcwmgLvH8ZSVpcPjzi0AjPclB9FsVRgMtGZkUcpE0zgjOCFAznKepF4z3hX8z6e3HODdA==", + "dependencies": { + "micromark": "~2.11.0" + } + }, + "node_modules/micromark-extension-gfm-tagfilter": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-0.3.0.tgz", + "integrity": "sha512-9GU0xBatryXifL//FJH+tAZ6i240xQuFrSL7mYi8f4oZSbc+NvXjkrHemeYP0+L4ZUT+Ptz3b95zhUZnMtoi/Q==" + }, + "node_modules/micromark-extension-gfm-task-list-item": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.3.tgz", + "integrity": "sha512-0zvM5iSLKrc/NQl84pZSjGo66aTGd57C1idmlWmE87lkMcXrTxg1uXa/nXomxJytoje9trP0NDLvw4bZ/Z/XCQ==", + "dependencies": { + "micromark": "~2.11.0" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" + } + }, + "node_modules/nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dependencies": { + "boolbase": "~1.0.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dependencies": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/preact": { + "version": "10.5.12", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.5.12.tgz", + "integrity": "sha512-r6siDkuD36oszwlCkcqDJCAKBQxGoeEGytw2DGMD5A/GGdu5Tymw+N2OBXwvOLxg6d1FeY8MgMV3cc5aVQo4Cg==", + "dev": true + }, + "node_modules/preact-render-to-string": { + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.1.16.tgz", + "integrity": "sha512-HvO3W29Sziz9r5FZGwl2e34XJKzyRLvjhouv3cpkCGszNPdnvkO8p4B6CBpe0MT/tzR+QVbmsAKLrMK222UXew==", + "dev": true, + "dependencies": { + "pretty-format": "^3.8.0" + } + }, + "node_modules/pretty-format": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", + "integrity": "sha1-v77VbV6ad2ZF9LH/eqGjrE+jw4U=", + "dev": true + }, + "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==", + "dev": true + }, + "node_modules/react": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz", + "integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz", + "integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.1" + } + }, + "node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "node_modules/rollup": { + "version": "2.41.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.41.2.tgz", + "integrity": "sha512-6u8fJJXJx6fmvKrAC9DHYZgONvSkz8S9b/VFBjoQ6dkKdHyPpPbpqiNl2Bao9XBzDHpq672X6sGZ9G1ZBqAHMg==", + "dependencies": { + "fsevents": "~2.3.1" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "node_modules/scheduler": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.1.tgz", + "integrity": "sha512-LKTe+2xNJBNxu/QhHvDR14wUXHRQbVY5ZOYpOGWRzhydZUqrLb2JBvLPY7cAqFmqrWuDED0Mjk7013SZiOz6Bw==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "dependencies": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/snowpack": { + "version": "3.1.0-pre.12", + "resolved": "https://registry.npmjs.org/snowpack/-/snowpack-3.1.0-pre.12.tgz", + "integrity": "sha512-XSvvNNzxmCM8sfYaFcDWG3HaBFJAfAGkQkokZJBmGJDCV1x1RpAiIE+MV8gDKC8BvIELW0GuLN+fRdn0aHcrPQ==", + "dependencies": { + "cli-spinners": "^2.5.0", + "default-browser-id": "^2.0.0", + "esbuild": "^0.8.7", + "fsevents": "^2.2.0", + "open": "^7.0.4", + "resolve": "^1.20.0", + "rollup": "^2.34.0" + }, + "bin": { + "snowpack": "index.bin.js", + "sp": "index.bin.js" + }, + "engines": { + "node": ">=10.19.0" + }, + "optionalDependencies": { + "fsevents": "^2.2.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/svelte": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.35.0.tgz", + "integrity": "sha512-gknlZkR2sXheu/X+B7dDImwANVvK1R0QGQLd8CNIfxxGPeXBmePnxfzb6fWwTQRsYQG7lYkZXvpXJvxvpsoB7g==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "engines": { + "node": ">=4" + } + }, + "node_modules/typescript": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", + "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/vue": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.7.tgz", + "integrity": "sha512-8h4TikD+JabbMK9aRlBO4laG0AtNHRPHynxYgWZ9sq1YUPfzynd9Jeeb27XNyZytC7aCQRX9xe1+TQJuc181Tw==", + "dependencies": { + "@vue/compiler-dom": "3.0.7", + "@vue/runtime-dom": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "dev": true, + "engines": { + "node": ">=10" + } + } + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + }, + "@babel/parser": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.10.tgz", + "integrity": "sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==" + }, + "@babel/types": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz", + "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==", + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "@types/node": { + "version": "14.14.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.34.tgz", + "integrity": "sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA==" + }, + "@vue/compiler-core": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.0.7.tgz", + "integrity": "sha512-JFohgBXoyUc3mdeI2WxlhjQZ5fakfemJkZHX8Gu/nFbEg3+lKVUZmNKWmmnp9aOzJQZKoj77LjmFxiP+P+7lMQ==", + "requires": { + "@babel/parser": "^7.12.0", + "@babel/types": "^7.12.0", + "@vue/shared": "3.0.7", + "estree-walker": "^2.0.1", + "source-map": "^0.6.1" + }, + "dependencies": { + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + } + } + }, + "@vue/compiler-dom": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.0.7.tgz", + "integrity": "sha512-VnIH9EbWQm/Tkcp+8dCaNVsVvhm/vxCrIKWRkXY9215hTqOqQOvejT8IMjd2kc++nIsYMsdQk6H9qqBvoLe/Cw==", + "requires": { + "@vue/compiler-core": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "@vue/compiler-ssr": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.0.7.tgz", + "integrity": "sha512-nHRbHeSpfXwjypettjrA16TjgfDcPEwq3m/zHnGyLC1QqdLtklXmpSM43/CPwwTCRa/qdt0pldJf22MiCEuTSQ==", + "requires": { + "@vue/compiler-dom": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "@vue/reactivity": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.0.7.tgz", + "integrity": "sha512-FotWcNNaKhqpFZrdgsUOZ1enlJ5lhTt01CNTtLSyK7jYFgZBTuw8vKsEutZKDYZ1XKotOfoeO8N3pZQqmM6Etw==", + "requires": { + "@vue/shared": "3.0.7" + } + }, + "@vue/runtime-core": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.0.7.tgz", + "integrity": "sha512-DBAZAwVvdmMXuyd6/9qqj/kYr/GaLTmn1L2/QLxLwP+UfhIboiTSBc/tUUb8MRk7Bb98GzNeAWkkT6AfooS3dQ==", + "requires": { + "@vue/reactivity": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "@vue/runtime-dom": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.0.7.tgz", + "integrity": "sha512-Oij4ruOtnpQpCj+/Q3JPzgpTJ1Q7+N67pA53A8KVITEtxfvKL46NN6dhAZ5NGqwX6RWZpYqWQNewITeF0pHr8g==", + "requires": { + "@vue/runtime-core": "3.0.7", + "@vue/shared": "3.0.7", + "csstype": "^2.6.8" + } + }, + "@vue/server-renderer": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.0.7.tgz", + "integrity": "sha512-3idEbDTQ0GSPgGTiM9Ml4IwPOityotTRUyrDttAyFoSz6DI1RvE1QR0nSQR7TMgMDXwbO22gf+nMYVkj7c9VRg==", + "requires": { + "@vue/compiler-ssr": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "@vue/shared": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.0.7.tgz", + "integrity": "sha512-dn5FyfSc4ky424jH4FntiHno7Ss5yLkqKNmM/NXwANRnlkmqu74pnGetexDFVG5phMk9/FhwovUZCWGxsotVKg==" + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "astring": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/astring/-/astring-1.7.0.tgz", + "integrity": "sha512-43bervUZNvahG1v74a+POdGlAWcOUGSvP9fJVj6sywzM/SquwDkA+CdP938e8tWHUV77fStCiqzaQHAt0u6MVA==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "big-integer": { + "version": "1.6.48", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "bplist-parser": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", + "requires": { + "big-integer": "^1.6.7" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==" + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==" + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==" + }, + "cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "requires": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + }, + "dependencies": { + "domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "requires": { + "domelementtype": "1" + } + }, + "htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "requires": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + } + } + }, + "cli-spinners": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz", + "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==" + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, + "requires": { + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "css-tree": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", + "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" + }, + "csstype": { + "version": "2.6.16", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.16.tgz", + "integrity": "sha512-61FBWoDHp/gRtsoDkq/B1nWrCUG/ok1E3tUrcNbZjsE9Cxd9yzUirjS3+nAATB8U4cTtaQmAHbNndoFz5L6C9Q==" + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "default-browser-id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-2.0.0.tgz", + "integrity": "sha1-AezONxpx6F8VoXF354YwR+c9vn0=", + "requires": { + "bplist-parser": "^0.1.0", + "pify": "^2.3.0", + "untildify": "^2.0.0" + }, + "dependencies": { + "untildify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-2.1.0.tgz", + "integrity": "sha1-F+soB5h/dpUunASF/DEdBqgmouA=", + "requires": { + "os-homedir": "^1.0.0" + } + } + } + }, + "dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "requires": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + }, + "domhandler": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", + "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", + "requires": { + "domelementtype": "^2.1.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==" + } + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + }, + "es-module-lexer": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.4.1.tgz", + "integrity": "sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA==" + }, + "esbuild": { + "version": "0.8.57", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.8.57.tgz", + "integrity": "sha512-j02SFrUwFTRUqiY0Kjplwjm1psuzO1d6AjaXKuOR9hrY0HuPsT6sV42B6myW34h1q4CRy+Y3g4RU/cGJeI/nNA==" + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "estree-walker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.0.tgz", + "integrity": "sha512-s6ceX0NFiU/vKPiKvFdR83U1Zffu7upwZsGwpoqfg5rbbq1l50WQ5hCeIvM6E6oD4shUHCYMsiFPns4Jk0YfMQ==", + "dev": true + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "gray-matter": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.2.tgz", + "integrity": "sha512-7hB/+LxrOjq/dd8APlK0r24uL/67w7SkYnfwhNFwg/VDIGWGmduTDYf3WNstLW2fbbmRwrDGCVSJ2isuf2+4Hw==", + "requires": { + "js-yaml": "^3.11.0", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "htmlparser2": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.0.1.tgz", + "integrity": "sha512-GDKPd+vk4jvSuvCbyuzx/unmXkk090Azec7LovXP8as1Hn8q9p3hbjmDGbUqqhknw0ajwit6LiiWqfiTUPMK7w==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.4.4", + "entities": "^2.0.0" + }, + "dependencies": { + "dom-serializer": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz", + "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==" + }, + "domutils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.5.0.tgz", + "integrity": "sha512-Ho16rzNMOFk2fPwChGh3D2D9OEHAfG19HgmRR2l+WLSsIstNsAYBzePH412bL0y5T44ejABIVfTHQ8nqi/tBCg==", + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0" + } + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" + } + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==" + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "requires": { + "has": "^1.0.3" + } + }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==" + }, + "is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==" + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "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", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==" + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "requires": { + "is-docker": "^2.0.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" + }, + "lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" + }, + "lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" + }, + "lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" + }, + "lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" + }, + "micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "requires": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "micromark-extension-gfm": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm/-/micromark-extension-gfm-0.3.3.tgz", + "integrity": "sha512-oVN4zv5/tAIA+l3GbMi7lWeYpJ14oQyJ3uEim20ktYFAcfX1x3LNlFGGlmrZHt7u9YlKExmyJdDGaTt6cMSR/A==", + "requires": { + "micromark": "~2.11.0", + "micromark-extension-gfm-autolink-literal": "~0.5.0", + "micromark-extension-gfm-strikethrough": "~0.6.5", + "micromark-extension-gfm-table": "~0.4.0", + "micromark-extension-gfm-tagfilter": "~0.3.0", + "micromark-extension-gfm-task-list-item": "~0.3.0" + } + }, + "micromark-extension-gfm-autolink-literal": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-autolink-literal/-/micromark-extension-gfm-autolink-literal-0.5.6.tgz", + "integrity": "sha512-nHbR1NUOVhmlZNsnhE5B7WJzL7Xd8lc888z4AF27IpHMtO3NstclZmbrMI+AcdTPpO1wuGVwlK1Cnq+n8Sxlrw==", + "requires": { + "micromark": "~2.11.3" + } + }, + "micromark-extension-gfm-strikethrough": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-strikethrough/-/micromark-extension-gfm-strikethrough-0.6.5.tgz", + "integrity": "sha512-PpOKlgokpQRwUesRwWEp+fHjGGkZEejj83k9gU5iXCbDG+XBA92BqnRKYJdfqfkrRcZRgGuPuXb7DaK/DmxOhw==", + "requires": { + "micromark": "~2.11.0" + } + }, + "micromark-extension-gfm-table": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-0.4.3.tgz", + "integrity": "sha512-hVGvESPq0fk6ALWtomcwmgLvH8ZSVpcPjzi0AjPclB9FsVRgMtGZkUcpE0zgjOCFAznKepF4z3hX8z6e3HODdA==", + "requires": { + "micromark": "~2.11.0" + } + }, + "micromark-extension-gfm-tagfilter": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-tagfilter/-/micromark-extension-gfm-tagfilter-0.3.0.tgz", + "integrity": "sha512-9GU0xBatryXifL//FJH+tAZ6i240xQuFrSL7mYi8f4oZSbc+NvXjkrHemeYP0+L4ZUT+Ptz3b95zhUZnMtoi/Q==" + }, + "micromark-extension-gfm-task-list-item": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-task-list-item/-/micromark-extension-gfm-task-list-item-0.3.3.tgz", + "integrity": "sha512-0zvM5iSLKrc/NQl84pZSjGo66aTGd57C1idmlWmE87lkMcXrTxg1uXa/nXomxJytoje9trP0NDLvw4bZ/Z/XCQ==", + "requires": { + "micromark": "~2.11.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" + } + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "requires": { + "boolbase": "~1.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "preact": { + "version": "10.5.12", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.5.12.tgz", + "integrity": "sha512-r6siDkuD36oszwlCkcqDJCAKBQxGoeEGytw2DGMD5A/GGdu5Tymw+N2OBXwvOLxg6d1FeY8MgMV3cc5aVQo4Cg==", + "dev": true + }, + "preact-render-to-string": { + "version": "5.1.16", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.1.16.tgz", + "integrity": "sha512-HvO3W29Sziz9r5FZGwl2e34XJKzyRLvjhouv3cpkCGszNPdnvkO8p4B6CBpe0MT/tzR+QVbmsAKLrMK222UXew==", + "dev": true, + "requires": { + "pretty-format": "^3.8.0" + } + }, + "pretty-format": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", + "integrity": "sha1-v77VbV6ad2ZF9LH/eqGjrE+jw4U=", + "dev": true + }, + "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==", + "dev": true + }, + "react": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.1.tgz", + "integrity": "sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "react-dom": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.1.tgz", + "integrity": "sha512-6eV150oJZ9U2t9svnsspTMrWNyHc6chX0KzDeAOXftRa8bNeOKTTfCJ7KorIwenkHd2xqVTBTCZd79yk/lx/Ug==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.1" + } + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "rollup": { + "version": "2.41.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.41.2.tgz", + "integrity": "sha512-6u8fJJXJx6fmvKrAC9DHYZgONvSkz8S9b/VFBjoQ6dkKdHyPpPbpqiNl2Bao9XBzDHpq672X6sGZ9G1ZBqAHMg==", + "requires": { + "fsevents": "~2.3.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "scheduler": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.1.tgz", + "integrity": "sha512-LKTe+2xNJBNxu/QhHvDR14wUXHRQbVY5ZOYpOGWRzhydZUqrLb2JBvLPY7cAqFmqrWuDED0Mjk7013SZiOz6Bw==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "requires": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + } + }, + "snowpack": { + "version": "3.1.0-pre.12", + "resolved": "https://registry.npmjs.org/snowpack/-/snowpack-3.1.0-pre.12.tgz", + "integrity": "sha512-XSvvNNzxmCM8sfYaFcDWG3HaBFJAfAGkQkokZJBmGJDCV1x1RpAiIE+MV8gDKC8BvIELW0GuLN+fRdn0aHcrPQ==", + "requires": { + "cli-spinners": "^2.5.0", + "default-browser-id": "^2.0.0", + "esbuild": "^0.8.7", + "fsevents": "^2.2.0", + "open": "^7.0.4", + "resolve": "^1.20.0", + "rollup": "^2.34.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=" + }, + "svelte": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.35.0.tgz", + "integrity": "sha512-gknlZkR2sXheu/X+B7dDImwANVvK1R0QGQLd8CNIfxxGPeXBmePnxfzb6fWwTQRsYQG7lYkZXvpXJvxvpsoB7g==" + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, + "typescript": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", + "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", + "dev": true + }, + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "vue": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.0.7.tgz", + "integrity": "sha512-8h4TikD+JabbMK9aRlBO4laG0AtNHRPHynxYgWZ9sq1YUPfzynd9Jeeb27XNyZytC7aCQRX9xe1+TQJuc181Tw==", + "requires": { + "@vue/compiler-dom": "3.0.7", + "@vue/runtime-dom": "3.0.7", + "@vue/shared": "3.0.7" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..6901c37b0 --- /dev/null +++ b/package.json @@ -0,0 +1,45 @@ +{ + "name": "hmx-v2", + "version": "1.0.0", + "main": "index.js", + "author": "Fred K. Schott", + "license": "MIT", + "type": "module", + "exports": { + ".": "./magicthing.mjs", + "./snowpack-plugin": "./snowpack-plugin.cjs", + "./h": "./lib/h.js", + "./render/preact": "./lib/render/preact.js" + }, + "scripts": { + "build": "tsc && npm run copy-js", + "copy-js": "copyfiles -u 1 src/*.js lib/" + }, + "dependencies": { + "@types/node": "^14.14.31", + "@vue/server-renderer": "^3.0.7", + "acorn": "^7.4.0", + "astring": "^1.7.0", + "cheerio": "^0.22.0", + "css-tree": "^1.1.2", + "domhandler": "^4.0.0", + "es-module-lexer": "^0.4.1", + "gray-matter": "^4.0.2", + "htmlparser2": "^6.0.0", + "magic-string": "^0.25.3", + "micromark": "^2.11.4", + "micromark-extension-gfm": "^0.3.3", + "react": "^17.0.1", + "react-dom": "^17.0.1", + "snowpack": "^3.1.0-pre.12", + "svelte": "^3.35.0", + "vue": "^3.0.7" + }, + "devDependencies": { + "copyfiles": "^2.4.1", + "estree-walker": "^3.0.0", + "preact": "^10.5.12", + "preact-render-to-string": "^5.1.14", + "typescript": "^4.2.3" + } +} diff --git a/snowpack-plugin.cjs b/snowpack-plugin.cjs new file mode 100644 index 000000000..e9d311829 --- /dev/null +++ b/snowpack-plugin.cjs @@ -0,0 +1,66 @@ +const { readFile } = require("fs").promises; + +// Snowpack plugins must be CommonJS :( +const transformPromise = import("./lib/transform2.js"); + +module.exports = function (snowpackConfig, { resolve } = {}) { + return { + name: "snowpack-hmx", + knownEntrypoints: ["deepmerge"], + resolve: { + input: [".hmx", ".md"], + output: [".js"], + }, + async load({ filePath }) { + const { compilePage, compileComponent } = await transformPromise; + const contents = await readFile(filePath, "utf-8"); + + if (!filePath.includes("/pages/") && !filePath.includes("/layouts/")) { + const result = await compileComponent(contents, filePath, { resolve }); + return result.contents; + } + + const result = await compilePage(contents, filePath, { resolve }); + + try { + return /* js */ ` + ${result.contents} + + export default async (childDatas, childRenderFns) => { + // Kind of hacky, can clean up if this works + const renderHmx = {setup, head, body}; + const merge = (await import('deepmerge')).default; + const content = childDatas && childDatas[0].content; + const _data = await renderHmx.setup({content}); + if (_data.layout) { + const renderLayout = (await import('/_hmx/layouts/' + _data.layout.replace(/.*layouts\\//, "").replace(/\.hmx$/, '.js'))).default; + return renderLayout( + [...(childDatas || []), _data], + [...(childRenderFns || []), renderHmx] + ); + } + const data = merge.all([_data, ...(childDatas || [])]); + let headResult; + let bodyResult; + for (const renderFn of (childRenderFns || [])) { + let headAndBody = await Promise.all([ + renderFn.head(data, headResult), + renderFn.body(data, bodyResult) + ]); + headResult = headAndBody[0]; + bodyResult = headAndBody[1]; + } + return h(Fragment, null, [ + renderHmx.head(data, headResult, true), + renderHmx.body(data, bodyResult, true), + ]); + }; + `; + } catch (err) { + console.error(err); + } + + return result.contents; + }, + }; +}; diff --git a/src/@types/compiler/Stats.d.ts b/src/@types/compiler/Stats.d.ts new file mode 100644 index 000000000..0e01e61f9 --- /dev/null +++ b/src/@types/compiler/Stats.d.ts @@ -0,0 +1,22 @@ +interface Timing { + label: string; + start: number; + end: number; + children: Timing[]; +} +export default class Stats { + start_time: number; + current_timing: Timing; + current_children: Timing[]; + timings: Timing[]; + stack: Timing[]; + constructor(); + start(label: any): void; + stop(label: any): void; + render(): { + timings: { + total: number; + }; + }; +} +export {}; diff --git a/src/@types/compiler/compile/Component.d.ts b/src/@types/compiler/compile/Component.d.ts new file mode 100644 index 000000000..483c5f83d --- /dev/null +++ b/src/@types/compiler/compile/Component.d.ts @@ -0,0 +1,130 @@ +import Stats from '../Stats'; +import { Scope } from './utils/scope'; +import Stylesheet from './css/Stylesheet'; +import Fragment from './nodes/Fragment'; +import { Ast, CompileOptions, Var, Warning, CssResult } from '../interfaces'; +import TemplateScope from './nodes/shared/TemplateScope'; +import Slot from './nodes/Slot'; +import { Node, ImportDeclaration, Identifier } from 'estree'; +import Element from './nodes/Element'; +interface ComponentOptions { + namespace?: string; + tag?: string; + immutable?: boolean; + accessors?: boolean; + preserveWhitespace?: boolean; +} +export default class Component { + stats: Stats; + warnings: Warning[]; + ignores: Set; + ignore_stack: Array>; + ast: Ast; + original_ast: Ast; + source: string; + name: Identifier; + compile_options: CompileOptions; + fragment: Fragment; + module_scope: Scope; + instance_scope: Scope; + instance_scope_map: WeakMap; + component_options: ComponentOptions; + namespace: string; + tag: string; + accessors: boolean; + vars: Var[]; + var_lookup: Map; + imports: ImportDeclaration[]; + hoistable_nodes: Set; + node_for_declaration: Map; + partly_hoisted: Array<(Node | Node[])>; + fully_hoisted: Array<(Node | Node[])>; + reactive_declarations: Array<{ + assignees: Set; + dependencies: Set; + node: Node; + declaration: Node; + }>; + reactive_declaration_nodes: Set; + has_reactive_assignments: boolean; + injected_reactive_declaration_vars: Set; + helpers: Map; + globals: Map; + indirect_dependencies: Map>; + file: string; + locate: (c: number) => { + line: number; + column: number; + }; + elements: Element[]; + stylesheet: Stylesheet; + aliases: Map; + used_names: Set; + globally_used_names: Set; + slots: Map; + slot_outlets: Set; + constructor(ast: Ast, source: string, name: string, compile_options: CompileOptions, stats: Stats, warnings: Warning[]); + add_var(variable: Var): void; + add_reference(name: string): void; + alias(name: string): Identifier; + apply_stylesheet(element: Element): void; + global(name: string): Identifier; + generate(result?: { + js: Node[]; + css: CssResult; + }): { + js: any; + css: any; + ast: Ast; + warnings: Warning[]; + vars: { + name: string; + export_name: string; + injected: boolean; + module: boolean; + mutated: boolean; + reassigned: boolean; + referenced: boolean; + writable: boolean; + referenced_from_script: boolean; + }[]; + stats: { + timings: { + total: number; + }; + }; + }; + get_unique_name(name: string, scope?: Scope): Identifier; + get_unique_name_maker(): (name: string) => Identifier; + error(pos: { + start: number; + end: number; + }, e: { + code: string; + message: string; + }): void; + warn(pos: { + start: number; + end: number; + }, warning: { + code: string; + message: string; + }): void; + extract_imports(node: any): void; + extract_exports(node: any): any; + extract_javascript(script: any): any; + walk_module_js(): void; + walk_instance_js_pre_template(): void; + walk_instance_js_post_template(): void; + post_template_walk(): void; + track_references_and_mutations(): void; + warn_on_undefined_store_value_references(node: Node, parent: Node, prop: string, scope: Scope): void; + loop_protect(node: any, scope: Scope, timeout: number): Node | null; + rewrite_props(get_insert: (variable: Var) => Node[]): void; + hoist_instance_declarations(): void; + extract_reactive_declarations(): void; + warn_if_undefined(name: string, node: any, template_scope: TemplateScope): void; + push_ignores(ignores: any): void; + pop_ignores(): void; +} +export {}; diff --git a/src/@types/compiler/compile/create_module.d.ts b/src/@types/compiler/compile/create_module.d.ts new file mode 100644 index 000000000..e6a18226c --- /dev/null +++ b/src/@types/compiler/compile/create_module.d.ts @@ -0,0 +1,14 @@ +import { ModuleFormat } from '../interfaces'; +import { Identifier, ImportDeclaration } from 'estree'; +interface Export { + name: string; + as: string; +} +export default function create_module(program: any, format: ModuleFormat, name: Identifier, banner: string, sveltePath: string, helpers: Array<{ + name: string; + alias: Identifier; +}>, globals: Array<{ + name: string; + alias: Identifier; +}>, imports: ImportDeclaration[], module_exports: Export[]): void; +export {}; diff --git a/src/@types/compiler/compile/css/Selector.d.ts b/src/@types/compiler/compile/css/Selector.d.ts new file mode 100644 index 000000000..2ab73c3b6 --- /dev/null +++ b/src/@types/compiler/compile/css/Selector.d.ts @@ -0,0 +1,30 @@ +import MagicString from 'magic-string'; +import Stylesheet from './Stylesheet'; +import { CssNode } from './interfaces'; +import Component from '../Component'; +import Element from '../nodes/Element'; +export default class Selector { + node: CssNode; + stylesheet: Stylesheet; + blocks: Block[]; + local_blocks: Block[]; + used: boolean; + constructor(node: CssNode, stylesheet: Stylesheet); + apply(node: Element): void; + minify(code: MagicString): void; + transform(code: MagicString, attr: string, max_amount_class_specificity_increased: number): void; + validate(component: Component): void; + get_amount_class_specificity_increased(): number; +} +declare class Block { + global: boolean; + host: boolean; + combinator: CssNode; + selectors: CssNode[]; + start: number; + end: number; + should_encapsulate: boolean; + constructor(combinator: CssNode); + add(selector: CssNode): void; +} +export {}; diff --git a/src/@types/compiler/compile/css/Stylesheet.d.ts b/src/@types/compiler/compile/css/Stylesheet.d.ts new file mode 100644 index 000000000..5f80d2a27 --- /dev/null +++ b/src/@types/compiler/compile/css/Stylesheet.d.ts @@ -0,0 +1,67 @@ +import MagicString from 'magic-string'; +import Selector from './Selector'; +import Element from '../nodes/Element'; +import { Ast, CssHashGetter } from '../../interfaces'; +import Component from '../Component'; +import { CssNode } from './interfaces'; +declare class Rule { + selectors: Selector[]; + declarations: Declaration[]; + node: CssNode; + parent: Atrule; + constructor(node: CssNode, stylesheet: any, parent?: Atrule); + apply(node: Element): void; + is_used(dev: boolean): boolean; + minify(code: MagicString, _dev: boolean): void; + transform(code: MagicString, id: string, keyframes: Map, max_amount_class_specificity_increased: number): boolean; + validate(component: Component): void; + warn_on_unused_selector(handler: (selector: Selector) => void): void; + get_max_amount_class_specificity_increased(): number; +} +declare class Declaration { + node: CssNode; + constructor(node: CssNode); + transform(code: MagicString, keyframes: Map): void; + minify(code: MagicString): void; +} +declare class Atrule { + node: CssNode; + children: Array; + declarations: Declaration[]; + constructor(node: CssNode); + apply(node: Element): void; + is_used(_dev: boolean): boolean; + minify(code: MagicString, dev: boolean): void; + transform(code: MagicString, id: string, keyframes: Map, max_amount_class_specificity_increased: number): void; + validate(component: Component): void; + warn_on_unused_selector(handler: (selector: Selector) => void): void; + get_max_amount_class_specificity_increased(): any; +} +export default class Stylesheet { + source: string; + ast: Ast; + filename: string; + dev: boolean; + has_styles: boolean; + id: string; + children: Array; + keyframes: Map; + nodes_with_css_class: Set; + constructor({ source, ast, component_name, filename, dev, get_css_hash }: { + source: string; + ast: Ast; + filename: string | undefined; + component_name: string | undefined; + dev: boolean; + get_css_hash: CssHashGetter; + }); + apply(node: Element): void; + reify(): void; + render(file: string, should_transform_selectors: boolean): { + code: string; + map: import("magic-string").SourceMap; + }; + validate(component: Component): void; + warn_on_unused_selectors(component: Component): void; +} +export {}; diff --git a/src/@types/compiler/compile/css/gather_possible_values.d.ts b/src/@types/compiler/compile/css/gather_possible_values.d.ts new file mode 100644 index 000000000..ca26ba94b --- /dev/null +++ b/src/@types/compiler/compile/css/gather_possible_values.d.ts @@ -0,0 +1,3 @@ +import { Node } from 'estree'; +export declare const UNKNOWN: {}; +export declare function gather_possible_values(node: Node, set: Set): void; diff --git a/src/@types/compiler/compile/css/interfaces.d.ts b/src/@types/compiler/compile/css/interfaces.d.ts new file mode 100644 index 000000000..6bbee6416 --- /dev/null +++ b/src/@types/compiler/compile/css/interfaces.d.ts @@ -0,0 +1,6 @@ +export interface CssNode { + type: string; + start: number; + end: number; + [prop_name: string]: any; +} diff --git a/src/@types/compiler/compile/index.d.ts b/src/@types/compiler/compile/index.d.ts new file mode 100644 index 000000000..8394b3a59 --- /dev/null +++ b/src/@types/compiler/compile/index.d.ts @@ -0,0 +1,23 @@ +import { CompileOptions, Warning } from '../interfaces'; +export default function compile(source: string, options?: CompileOptions): { + js: any; + css: any; + ast: import("../interfaces").Ast; + warnings: Warning[]; + vars: { + name: string; + export_name: string; + injected: boolean; + module: boolean; + mutated: boolean; + reassigned: boolean; + referenced: boolean; + writable: boolean; + referenced_from_script: boolean; + }[]; + stats: { + timings: { + total: number; + }; + }; +}; diff --git a/src/@types/compiler/compile/internal_exports.d.ts b/src/@types/compiler/compile/internal_exports.d.ts new file mode 100644 index 000000000..1829c318f --- /dev/null +++ b/src/@types/compiler/compile/internal_exports.d.ts @@ -0,0 +1,2 @@ +declare const _default: Set; +export default _default; diff --git a/src/@types/compiler/compile/nodes/Action.d.ts b/src/@types/compiler/compile/nodes/Action.d.ts new file mode 100644 index 000000000..cfbf7e774 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Action.d.ts @@ -0,0 +1,13 @@ +import Node from './shared/Node'; +import Expression from './shared/Expression'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { Directive } from '../../interfaces'; +export default class Action extends Node { + type: 'Action'; + name: string; + expression: Expression; + uses_context: boolean; + template_scope: TemplateScope; + constructor(component: Component, parent: Node, scope: TemplateScope, info: Directive); +} diff --git a/src/@types/compiler/compile/nodes/Animation.d.ts b/src/@types/compiler/compile/nodes/Animation.d.ts new file mode 100644 index 000000000..2bc43379c --- /dev/null +++ b/src/@types/compiler/compile/nodes/Animation.d.ts @@ -0,0 +1,12 @@ +import Node from './shared/Node'; +import Expression from './shared/Expression'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +import Element from './Element'; +export default class Animation extends Node { + type: 'Animation'; + name: string; + expression: Expression; + constructor(component: Component, parent: Element, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Attribute.d.ts b/src/@types/compiler/compile/nodes/Attribute.d.ts new file mode 100644 index 000000000..aaa589ad3 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Attribute.d.ts @@ -0,0 +1,30 @@ +import Component from '../Component'; +import Node from './shared/Node'; +import Element from './Element'; +import Text from './Text'; +import Expression from './shared/Expression'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +export default class Attribute extends Node { + type: 'Attribute' | 'Spread'; + start: number; + end: number; + scope: TemplateScope; + component: Component; + parent: Element; + name: string; + is_spread: boolean; + is_true: boolean; + is_static: boolean; + expression?: Expression; + chunks: Array; + dependencies: Set; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); + get_dependencies(): string[]; + get_value(block: any): import("estree").Identifier | import("estree").SimpleLiteral | import("estree").RegExpLiteral | import("estree").Program | import("estree").FunctionDeclaration | import("estree").FunctionExpression | import("estree").ArrowFunctionExpression | import("estree").SwitchCase | import("estree").CatchClause | import("estree").VariableDeclarator | import("estree").ExpressionStatement | import("estree").BlockStatement | import("estree").EmptyStatement | import("estree").DebuggerStatement | import("estree").WithStatement | import("estree").ReturnStatement | import("estree").LabeledStatement | import("estree").BreakStatement | import("estree").ContinueStatement | import("estree").IfStatement | import("estree").SwitchStatement | import("estree").ThrowStatement | import("estree").TryStatement | import("estree").WhileStatement | import("estree").DoWhileStatement | import("estree").ForStatement | import("estree").ForInStatement | import("estree").ForOfStatement | import("estree").VariableDeclaration | import("estree").ClassDeclaration | import("estree").ThisExpression | import("estree").ArrayExpression | import("estree").ObjectExpression | import("estree").YieldExpression | import("estree").UnaryExpression | import("estree").UpdateExpression | import("estree").BinaryExpression | import("estree").AssignmentExpression | import("estree").LogicalExpression | import("estree").MemberExpression | import("estree").ConditionalExpression | import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").SequenceExpression | import("estree").TemplateLiteral | import("estree").TaggedTemplateExpression | import("estree").ClassExpression | import("estree").MetaProperty | import("estree").AwaitExpression | import("estree").ImportExpression | import("estree").ChainExpression | import("estree").Property | import("estree").Super | import("estree").TemplateElement | import("estree").SpreadElement | import("estree").ObjectPattern | import("estree").ArrayPattern | import("estree").RestElement | import("estree").AssignmentPattern | import("estree").ClassBody | import("estree").MethodDefinition | import("estree").ImportDeclaration | import("estree").ExportNamedDeclaration | import("estree").ExportDefaultDeclaration | import("estree").ExportAllDeclaration | import("estree").ImportSpecifier | import("estree").ImportDefaultSpecifier | import("estree").ImportNamespaceSpecifier | import("estree").ExportSpecifier | { + type: string; + value: string; + }; + get_static_value(): string | true; + should_cache(): boolean; +} diff --git a/src/@types/compiler/compile/nodes/AwaitBlock.d.ts b/src/@types/compiler/compile/nodes/AwaitBlock.d.ts new file mode 100644 index 000000000..0a5130787 --- /dev/null +++ b/src/@types/compiler/compile/nodes/AwaitBlock.d.ts @@ -0,0 +1,22 @@ +import Node from './shared/Node'; +import PendingBlock from './PendingBlock'; +import ThenBlock from './ThenBlock'; +import CatchBlock from './CatchBlock'; +import Expression from './shared/Expression'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +import { Context } from './shared/Context'; +import { Node as ESTreeNode } from 'estree'; +export default class AwaitBlock extends Node { + type: 'AwaitBlock'; + expression: Expression; + then_contexts: Context[]; + catch_contexts: Context[]; + then_node: ESTreeNode | null; + catch_node: ESTreeNode | null; + pending: PendingBlock; + then: ThenBlock; + catch: CatchBlock; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Binding.d.ts b/src/@types/compiler/compile/nodes/Binding.d.ts new file mode 100644 index 000000000..43769b2ac --- /dev/null +++ b/src/@types/compiler/compile/nodes/Binding.d.ts @@ -0,0 +1,19 @@ +import Node from './shared/Node'; +import Expression from './shared/Expression'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { Node as ESTreeNode } from 'estree'; +import { TemplateNode } from '../../interfaces'; +import Element from './Element'; +import InlineComponent from './InlineComponent'; +import Window from './Window'; +export default class Binding extends Node { + type: 'Binding'; + name: string; + expression: Expression; + raw_expression: ESTreeNode; + is_contextual: boolean; + is_readonly: boolean; + constructor(component: Component, parent: Element | InlineComponent | Window, scope: TemplateScope, info: TemplateNode); + is_readonly_media_attribute(): boolean; +} diff --git a/src/@types/compiler/compile/nodes/Body.d.ts b/src/@types/compiler/compile/nodes/Body.d.ts new file mode 100644 index 000000000..8c024c13a --- /dev/null +++ b/src/@types/compiler/compile/nodes/Body.d.ts @@ -0,0 +1,10 @@ +import Node from './shared/Node'; +import EventHandler from './EventHandler'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +export default class Body extends Node { + type: 'Body'; + handlers: EventHandler[]; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/CatchBlock.d.ts b/src/@types/compiler/compile/nodes/CatchBlock.d.ts new file mode 100644 index 000000000..ec1e952ad --- /dev/null +++ b/src/@types/compiler/compile/nodes/CatchBlock.d.ts @@ -0,0 +1,10 @@ +import TemplateScope from './shared/TemplateScope'; +import AbstractBlock from './shared/AbstractBlock'; +import AwaitBlock from './AwaitBlock'; +import Component from '../Component'; +import { TemplateNode } from '../../interfaces'; +export default class CatchBlock extends AbstractBlock { + type: 'CatchBlock'; + scope: TemplateScope; + constructor(component: Component, parent: AwaitBlock, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Class.d.ts b/src/@types/compiler/compile/nodes/Class.d.ts new file mode 100644 index 000000000..d3365c738 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Class.d.ts @@ -0,0 +1,11 @@ +import Node from './shared/Node'; +import Expression from './shared/Expression'; +import { TemplateNode } from '../../interfaces'; +import TemplateScope from './shared/TemplateScope'; +import Component from '../Component'; +export default class Class extends Node { + type: 'Class'; + name: string; + expression: Expression; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Comment.d.ts b/src/@types/compiler/compile/nodes/Comment.d.ts new file mode 100644 index 000000000..6fb0cea27 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Comment.d.ts @@ -0,0 +1,10 @@ +import { TemplateNode } from '../../interfaces'; +import Component from '../Component'; +import Node from './shared/Node'; +import TemplateScope from './shared/TemplateScope'; +export default class Comment extends Node { + type: 'Comment'; + data: string; + ignores: string[]; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/DebugTag.d.ts b/src/@types/compiler/compile/nodes/DebugTag.d.ts new file mode 100644 index 000000000..2241e7ace --- /dev/null +++ b/src/@types/compiler/compile/nodes/DebugTag.d.ts @@ -0,0 +1,11 @@ +import Node from './shared/Node'; +import Expression from './shared/Expression'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +import { INode } from './interfaces'; +export default class DebugTag extends Node { + type: 'DebugTag'; + expressions: Expression[]; + constructor(component: Component, parent: INode, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/DefaultSlotTemplate.d.ts b/src/@types/compiler/compile/nodes/DefaultSlotTemplate.d.ts new file mode 100644 index 000000000..77729362b --- /dev/null +++ b/src/@types/compiler/compile/nodes/DefaultSlotTemplate.d.ts @@ -0,0 +1,13 @@ +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import Node from './shared/Node'; +import Let from './Let'; +import { INode } from './interfaces'; +export default class DefaultSlotTemplate extends Node { + type: 'SlotTemplate'; + scope: TemplateScope; + children: INode[]; + lets: Let[]; + slot_template_name: string; + constructor(component: Component, parent: INode, scope: TemplateScope, info: any, lets: Let[], children: INode[]); +} diff --git a/src/@types/compiler/compile/nodes/EachBlock.d.ts b/src/@types/compiler/compile/nodes/EachBlock.d.ts new file mode 100644 index 000000000..81be9c074 --- /dev/null +++ b/src/@types/compiler/compile/nodes/EachBlock.d.ts @@ -0,0 +1,24 @@ +import ElseBlock from './ElseBlock'; +import Expression from './shared/Expression'; +import TemplateScope from './shared/TemplateScope'; +import AbstractBlock from './shared/AbstractBlock'; +import { Context } from './shared/Context'; +import { Node } from 'estree'; +import Component from '../Component'; +import { TemplateNode } from '../../interfaces'; +export default class EachBlock extends AbstractBlock { + type: 'EachBlock'; + expression: Expression; + context_node: Node; + iterations: string; + index: string; + context: string; + key: Expression; + scope: TemplateScope; + contexts: Context[]; + has_animation: boolean; + has_binding: boolean; + has_index_binding: boolean; + else?: ElseBlock; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Element.d.ts b/src/@types/compiler/compile/nodes/Element.d.ts new file mode 100644 index 000000000..016ebe2c1 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Element.d.ts @@ -0,0 +1,41 @@ +import Node from './shared/Node'; +import Attribute from './Attribute'; +import Binding from './Binding'; +import EventHandler from './EventHandler'; +import Transition from './Transition'; +import Animation from './Animation'; +import Action from './Action'; +import Class from './Class'; +import Let from './Let'; +import TemplateScope from './shared/TemplateScope'; +import { INode } from './interfaces'; +import Component from '../Component'; +export default class Element extends Node { + type: 'Element'; + name: string; + scope: TemplateScope; + attributes: Attribute[]; + actions: Action[]; + bindings: Binding[]; + classes: Class[]; + handlers: EventHandler[]; + lets: Let[]; + intro?: Transition; + outro?: Transition; + animation?: Animation; + children: INode[]; + namespace: string; + needs_manual_style_scoping: boolean; + constructor(component: Component, parent: Node, scope: TemplateScope, info: any); + validate(): void; + validate_attributes(): void; + validate_attributes_a11y(): void; + validate_special_cases(): void; + validate_bindings_foreign(): void; + validate_bindings(): void; + validate_content(): void; + validate_event_handlers(): void; + is_media_node(): boolean; + add_css_class(): void; + get slot_template_name(): string; +} diff --git a/src/@types/compiler/compile/nodes/ElseBlock.d.ts b/src/@types/compiler/compile/nodes/ElseBlock.d.ts new file mode 100644 index 000000000..bc371e0e9 --- /dev/null +++ b/src/@types/compiler/compile/nodes/ElseBlock.d.ts @@ -0,0 +1,9 @@ +import AbstractBlock from './shared/AbstractBlock'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +import Node from './shared/Node'; +export default class ElseBlock extends AbstractBlock { + type: 'ElseBlock'; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/EventHandler.d.ts b/src/@types/compiler/compile/nodes/EventHandler.d.ts new file mode 100644 index 000000000..d7c58de00 --- /dev/null +++ b/src/@types/compiler/compile/nodes/EventHandler.d.ts @@ -0,0 +1,17 @@ +import Node from './shared/Node'; +import Expression from './shared/Expression'; +import Component from '../Component'; +import { Identifier } from 'estree'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +export default class EventHandler extends Node { + type: 'EventHandler'; + name: string; + modifiers: Set; + expression: Expression; + handler_name: Identifier; + uses_context: boolean; + can_make_passive: boolean; + constructor(component: Component, parent: Node, template_scope: TemplateScope, info: TemplateNode); + get reassigned(): boolean; +} diff --git a/src/@types/compiler/compile/nodes/Fragment.d.ts b/src/@types/compiler/compile/nodes/Fragment.d.ts new file mode 100644 index 000000000..a382218d8 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Fragment.d.ts @@ -0,0 +1,13 @@ +import Node from './shared/Node'; +import Component from '../Component'; +import Block from '../render_dom/Block'; +import TemplateScope from './shared/TemplateScope'; +import { INode } from './interfaces'; +import { TemplateNode } from '../../interfaces'; +export default class Fragment extends Node { + type: 'Fragment'; + block: Block; + children: INode[]; + scope: TemplateScope; + constructor(component: Component, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Head.d.ts b/src/@types/compiler/compile/nodes/Head.d.ts new file mode 100644 index 000000000..736bbc4a9 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Head.d.ts @@ -0,0 +1,10 @@ +import Node from './shared/Node'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +export default class Head extends Node { + type: 'Head'; + children: any[]; + id: string; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/IfBlock.d.ts b/src/@types/compiler/compile/nodes/IfBlock.d.ts new file mode 100644 index 000000000..14418cb07 --- /dev/null +++ b/src/@types/compiler/compile/nodes/IfBlock.d.ts @@ -0,0 +1,13 @@ +import ElseBlock from './ElseBlock'; +import Expression from './shared/Expression'; +import AbstractBlock from './shared/AbstractBlock'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +import Node from './shared/Node'; +export default class IfBlock extends AbstractBlock { + type: 'IfBlock'; + expression: Expression; + else: ElseBlock; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/InlineComponent.d.ts b/src/@types/compiler/compile/nodes/InlineComponent.d.ts new file mode 100644 index 000000000..c555ed124 --- /dev/null +++ b/src/@types/compiler/compile/nodes/InlineComponent.d.ts @@ -0,0 +1,23 @@ +import Node from './shared/Node'; +import Attribute from './Attribute'; +import Binding from './Binding'; +import EventHandler from './EventHandler'; +import Expression from './shared/Expression'; +import Component from '../Component'; +import Let from './Let'; +import TemplateScope from './shared/TemplateScope'; +import { INode } from './interfaces'; +import { TemplateNode } from '../../interfaces'; +export default class InlineComponent extends Node { + type: 'InlineComponent'; + name: string; + expression: Expression; + attributes: Attribute[]; + bindings: Binding[]; + handlers: EventHandler[]; + lets: Let[]; + children: INode[]; + scope: TemplateScope; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); + get slot_template_name(): string; +} diff --git a/src/@types/compiler/compile/nodes/KeyBlock.d.ts b/src/@types/compiler/compile/nodes/KeyBlock.d.ts new file mode 100644 index 000000000..38c62be80 --- /dev/null +++ b/src/@types/compiler/compile/nodes/KeyBlock.d.ts @@ -0,0 +1,11 @@ +import Expression from './shared/Expression'; +import AbstractBlock from './shared/AbstractBlock'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +import Node from './shared/Node'; +export default class KeyBlock extends AbstractBlock { + type: 'KeyBlock'; + expression: Expression; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Let.d.ts b/src/@types/compiler/compile/nodes/Let.d.ts new file mode 100644 index 000000000..6fb24b118 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Let.d.ts @@ -0,0 +1,12 @@ +import Node from './shared/Node'; +import Component from '../Component'; +import { Identifier } from 'estree'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +export default class Let extends Node { + type: 'Let'; + name: Identifier; + value: Identifier; + names: string[]; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/MustacheTag.d.ts b/src/@types/compiler/compile/nodes/MustacheTag.d.ts new file mode 100644 index 000000000..f659e3d44 --- /dev/null +++ b/src/@types/compiler/compile/nodes/MustacheTag.d.ts @@ -0,0 +1,4 @@ +import Tag from './shared/Tag'; +export default class MustacheTag extends Tag { + type: 'MustacheTag'; +} diff --git a/src/@types/compiler/compile/nodes/Options.d.ts b/src/@types/compiler/compile/nodes/Options.d.ts new file mode 100644 index 000000000..d114122fb --- /dev/null +++ b/src/@types/compiler/compile/nodes/Options.d.ts @@ -0,0 +1,4 @@ +import Node from './shared/Node'; +export default class Options extends Node { + type: 'Options'; +} diff --git a/src/@types/compiler/compile/nodes/PendingBlock.d.ts b/src/@types/compiler/compile/nodes/PendingBlock.d.ts new file mode 100644 index 000000000..3b3ffa36d --- /dev/null +++ b/src/@types/compiler/compile/nodes/PendingBlock.d.ts @@ -0,0 +1,9 @@ +import AbstractBlock from './shared/AbstractBlock'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +import Node from './shared/Node'; +export default class PendingBlock extends AbstractBlock { + type: 'PendingBlock'; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/RawMustacheTag.d.ts b/src/@types/compiler/compile/nodes/RawMustacheTag.d.ts new file mode 100644 index 000000000..98b279d86 --- /dev/null +++ b/src/@types/compiler/compile/nodes/RawMustacheTag.d.ts @@ -0,0 +1,4 @@ +import Tag from './shared/Tag'; +export default class RawMustacheTag extends Tag { + type: 'RawMustacheTag'; +} diff --git a/src/@types/compiler/compile/nodes/Slot.d.ts b/src/@types/compiler/compile/nodes/Slot.d.ts new file mode 100644 index 000000000..b27476b3c --- /dev/null +++ b/src/@types/compiler/compile/nodes/Slot.d.ts @@ -0,0 +1,14 @@ +import Element from './Element'; +import Attribute from './Attribute'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { INode } from './interfaces'; +import { TemplateNode } from '../../interfaces'; +export default class Slot extends Element { + type: 'Element'; + name: string; + children: INode[]; + slot_name: string; + values: Map; + constructor(component: Component, parent: INode, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/SlotTemplate.d.ts b/src/@types/compiler/compile/nodes/SlotTemplate.d.ts new file mode 100644 index 000000000..4722632d2 --- /dev/null +++ b/src/@types/compiler/compile/nodes/SlotTemplate.d.ts @@ -0,0 +1,16 @@ +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import Node from './shared/Node'; +import Let from './Let'; +import Attribute from './Attribute'; +import { INode } from './interfaces'; +export default class SlotTemplate extends Node { + type: 'SlotTemplate'; + scope: TemplateScope; + children: INode[]; + lets: Let[]; + slot_attribute: Attribute; + slot_template_name: string; + constructor(component: Component, parent: INode, scope: TemplateScope, info: any); + validate_slot_template_placement(): void; +} diff --git a/src/@types/compiler/compile/nodes/Text.d.ts b/src/@types/compiler/compile/nodes/Text.d.ts new file mode 100644 index 000000000..e0f4570d0 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Text.d.ts @@ -0,0 +1,12 @@ +import Node from './shared/Node'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { INode } from './interfaces'; +import { TemplateNode } from '../../interfaces'; +export default class Text extends Node { + type: 'Text'; + data: string; + synthetic: boolean; + constructor(component: Component, parent: INode, scope: TemplateScope, info: TemplateNode); + should_skip(): any; +} diff --git a/src/@types/compiler/compile/nodes/ThenBlock.d.ts b/src/@types/compiler/compile/nodes/ThenBlock.d.ts new file mode 100644 index 000000000..2a0a4c379 --- /dev/null +++ b/src/@types/compiler/compile/nodes/ThenBlock.d.ts @@ -0,0 +1,10 @@ +import TemplateScope from './shared/TemplateScope'; +import AbstractBlock from './shared/AbstractBlock'; +import AwaitBlock from './AwaitBlock'; +import Component from '../Component'; +import { TemplateNode } from '../../interfaces'; +export default class ThenBlock extends AbstractBlock { + type: 'ThenBlock'; + scope: TemplateScope; + constructor(component: Component, parent: AwaitBlock, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Title.d.ts b/src/@types/compiler/compile/nodes/Title.d.ts new file mode 100644 index 000000000..8288a0583 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Title.d.ts @@ -0,0 +1,11 @@ +import Node from './shared/Node'; +import { Children } from './shared/map_children'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +export default class Title extends Node { + type: 'Title'; + children: Children; + should_cache: boolean; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Transition.d.ts b/src/@types/compiler/compile/nodes/Transition.d.ts new file mode 100644 index 000000000..7ce9dc7b0 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Transition.d.ts @@ -0,0 +1,14 @@ +import Node from './shared/Node'; +import Expression from './shared/Expression'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +import Element from './Element'; +export default class Transition extends Node { + type: 'Transition'; + name: string; + directive: string; + expression: Expression; + is_local: boolean; + constructor(component: Component, parent: Element, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/Window.d.ts b/src/@types/compiler/compile/nodes/Window.d.ts new file mode 100644 index 000000000..183a8cc13 --- /dev/null +++ b/src/@types/compiler/compile/nodes/Window.d.ts @@ -0,0 +1,14 @@ +import Node from './shared/Node'; +import Binding from './Binding'; +import EventHandler from './EventHandler'; +import Action from './Action'; +import Component from '../Component'; +import TemplateScope from './shared/TemplateScope'; +import { TemplateNode } from '../../interfaces'; +export default class Window extends Node { + type: 'Window'; + handlers: EventHandler[]; + bindings: Binding[]; + actions: Action[]; + constructor(component: Component, parent: Node, scope: TemplateScope, info: TemplateNode); +} diff --git a/src/@types/compiler/compile/nodes/interfaces.d.ts b/src/@types/compiler/compile/nodes/interfaces.d.ts new file mode 100644 index 000000000..0995951a3 --- /dev/null +++ b/src/@types/compiler/compile/nodes/interfaces.d.ts @@ -0,0 +1,34 @@ +import Tag from './shared/Tag'; +import Action from './Action'; +import Animation from './Animation'; +import Attribute from './Attribute'; +import AwaitBlock from './AwaitBlock'; +import Binding from './Binding'; +import Body from './Body'; +import CatchBlock from './CatchBlock'; +import Class from './Class'; +import Comment from './Comment'; +import DebugTag from './DebugTag'; +import EachBlock from './EachBlock'; +import Element from './Element'; +import ElseBlock from './ElseBlock'; +import EventHandler from './EventHandler'; +import Fragment from './Fragment'; +import Head from './Head'; +import IfBlock from './IfBlock'; +import InlineComponent from './InlineComponent'; +import KeyBlock from './KeyBlock'; +import Let from './Let'; +import MustacheTag from './MustacheTag'; +import Options from './Options'; +import PendingBlock from './PendingBlock'; +import RawMustacheTag from './RawMustacheTag'; +import Slot from './Slot'; +import SlotTemplate from './SlotTemplate'; +import DefaultSlotTemplate from './DefaultSlotTemplate'; +import Text from './Text'; +import ThenBlock from './ThenBlock'; +import Title from './Title'; +import Transition from './Transition'; +import Window from './Window'; +export declare type INode = Action | Animation | Attribute | AwaitBlock | Binding | Body | CatchBlock | Class | Comment | DebugTag | EachBlock | Element | ElseBlock | EventHandler | Fragment | Head | IfBlock | InlineComponent | KeyBlock | Let | MustacheTag | Options | PendingBlock | RawMustacheTag | Slot | SlotTemplate | DefaultSlotTemplate | Tag | Text | ThenBlock | Title | Transition | Window; diff --git a/src/@types/compiler/compile/nodes/shared/AbstractBlock.d.ts b/src/@types/compiler/compile/nodes/shared/AbstractBlock.d.ts new file mode 100644 index 000000000..9dea594b8 --- /dev/null +++ b/src/@types/compiler/compile/nodes/shared/AbstractBlock.d.ts @@ -0,0 +1,10 @@ +import Block from '../../render_dom/Block'; +import Component from '../../Component'; +import Node from './Node'; +import { INode } from '../interfaces'; +export default class AbstractBlock extends Node { + block: Block; + children: INode[]; + constructor(component: Component, parent: any, scope: any, info: any); + warn_if_empty_block(): void; +} diff --git a/src/@types/compiler/compile/nodes/shared/Context.d.ts b/src/@types/compiler/compile/nodes/shared/Context.d.ts new file mode 100644 index 000000000..5c401a7f4 --- /dev/null +++ b/src/@types/compiler/compile/nodes/shared/Context.d.ts @@ -0,0 +1,8 @@ +import { Node, Identifier } from 'estree'; +export interface Context { + key: Identifier; + name?: string; + modifier: (node: Node) => Node; + default_modifier: (node: Node, to_ctx: (name: string) => Node) => Node; +} +export declare function unpack_destructuring(contexts: Context[], node: Node, modifier?: Context['modifier'], default_modifier?: Context['default_modifier']): void; diff --git a/src/@types/compiler/compile/nodes/shared/Expression.d.ts b/src/@types/compiler/compile/nodes/shared/Expression.d.ts new file mode 100644 index 000000000..6764bfc2c --- /dev/null +++ b/src/@types/compiler/compile/nodes/shared/Expression.d.ts @@ -0,0 +1,26 @@ +import Component from '../../Component'; +import { Scope } from '../../utils/scope'; +import TemplateScope from './TemplateScope'; +import Block from '../../render_dom/Block'; +import { Node } from 'estree'; +import { INode } from '../interfaces'; +declare type Owner = INode; +export default class Expression { + type: 'Expression'; + component: Component; + owner: Owner; + node: Node; + references: Set; + dependencies: Set; + contextual_dependencies: Set; + template_scope: TemplateScope; + scope: Scope; + scope_map: WeakMap; + declarations: Array<(Node | Node[])>; + uses_context: boolean; + manipulated: Node; + constructor(component: Component, owner: Owner, template_scope: TemplateScope, info: Node, lazy?: boolean); + dynamic_dependencies(): string[]; + manipulate(block?: Block): Node; +} +export {}; diff --git a/src/@types/compiler/compile/nodes/shared/Node.d.ts b/src/@types/compiler/compile/nodes/shared/Node.d.ts new file mode 100644 index 000000000..783009441 --- /dev/null +++ b/src/@types/compiler/compile/nodes/shared/Node.d.ts @@ -0,0 +1,21 @@ +import Attribute from '../Attribute'; +import Component from '../../Component'; +import { INode } from '../interfaces'; +import { TemplateNode } from '../../../interfaces'; +export default class Node { + readonly start: number; + readonly end: number; + readonly component: Component; + readonly parent: INode; + readonly type: string; + prev?: INode; + next?: INode; + can_use_innerhtml: boolean; + var: string; + attributes: Attribute[]; + constructor(component: Component, parent: Node, _scope: any, info: TemplateNode); + cannot_use_innerhtml(): void; + find_nearest(selector: RegExp): any; + get_static_attribute_value(name: string): string | true; + has_ancestor(type: string): any; +} diff --git a/src/@types/compiler/compile/nodes/shared/Tag.d.ts b/src/@types/compiler/compile/nodes/shared/Tag.d.ts new file mode 100644 index 000000000..8c5db1895 --- /dev/null +++ b/src/@types/compiler/compile/nodes/shared/Tag.d.ts @@ -0,0 +1,8 @@ +import Node from './Node'; +import Expression from './Expression'; +export default class Tag extends Node { + type: 'MustacheTag' | 'RawMustacheTag'; + expression: Expression; + should_cache: boolean; + constructor(component: any, parent: any, scope: any, info: any); +} diff --git a/src/@types/compiler/compile/nodes/shared/TemplateScope.d.ts b/src/@types/compiler/compile/nodes/shared/TemplateScope.d.ts new file mode 100644 index 000000000..3cfd39821 --- /dev/null +++ b/src/@types/compiler/compile/nodes/shared/TemplateScope.d.ts @@ -0,0 +1,21 @@ +import EachBlock from '../EachBlock'; +import ThenBlock from '../ThenBlock'; +import CatchBlock from '../CatchBlock'; +import InlineComponent from '../InlineComponent'; +import Element from '../Element'; +import SlotTemplate from '../SlotTemplate'; +declare type NodeWithScope = EachBlock | ThenBlock | CatchBlock | InlineComponent | Element | SlotTemplate; +export default class TemplateScope { + names: Set; + dependencies_for_name: Map>; + owners: Map; + parent?: TemplateScope; + constructor(parent?: TemplateScope); + add(name: any, dependencies: Set, owner: any): this; + child(): TemplateScope; + is_top_level(name: string): any; + get_owner(name: string): NodeWithScope; + is_let(name: string): boolean; + is_await(name: string): boolean; +} +export {}; diff --git a/src/@types/compiler/compile/nodes/shared/is_contextual.d.ts b/src/@types/compiler/compile/nodes/shared/is_contextual.d.ts new file mode 100644 index 000000000..fde7b2ddc --- /dev/null +++ b/src/@types/compiler/compile/nodes/shared/is_contextual.d.ts @@ -0,0 +1,3 @@ +import Component from '../../Component'; +import TemplateScope from './TemplateScope'; +export default function is_contextual(component: Component, scope: TemplateScope, name: string): boolean; diff --git a/src/@types/compiler/compile/nodes/shared/map_children.d.ts b/src/@types/compiler/compile/nodes/shared/map_children.d.ts new file mode 100644 index 000000000..8c4dfb949 --- /dev/null +++ b/src/@types/compiler/compile/nodes/shared/map_children.d.ts @@ -0,0 +1,20 @@ +import AwaitBlock from '../AwaitBlock'; +import Body from '../Body'; +import Comment from '../Comment'; +import EachBlock from '../EachBlock'; +import Element from '../Element'; +import Head from '../Head'; +import IfBlock from '../IfBlock'; +import InlineComponent from '../InlineComponent'; +import KeyBlock from '../KeyBlock'; +import MustacheTag from '../MustacheTag'; +import Options from '../Options'; +import RawMustacheTag from '../RawMustacheTag'; +import DebugTag from '../DebugTag'; +import SlotTemplate from '../SlotTemplate'; +import Text from '../Text'; +import Title from '../Title'; +import Window from '../Window'; +import { TemplateNode } from '../../../interfaces'; +export declare type Children = ReturnType; +export default function map_children(component: any, parent: any, scope: any, children: TemplateNode[]): (AwaitBlock | Body | Comment | DebugTag | EachBlock | Element | Head | IfBlock | InlineComponent | KeyBlock | MustacheTag | Options | RawMustacheTag | SlotTemplate | Text | Title | Window)[]; diff --git a/src/@types/compiler/compile/render_dom/Block.d.ts b/src/@types/compiler/compile/render_dom/Block.d.ts new file mode 100644 index 000000000..9a272f90c --- /dev/null +++ b/src/@types/compiler/compile/render_dom/Block.d.ts @@ -0,0 +1,78 @@ +import Renderer from './Renderer'; +import Wrapper from './wrappers/shared/Wrapper'; +import { Node, Identifier } from 'estree'; +export interface Bindings { + object: Identifier; + property: Identifier; + snippet: Node; + store: string; + modifier: (node: Node) => Node; +} +export interface BlockOptions { + parent?: Block; + name: Identifier; + type: string; + renderer?: Renderer; + comment?: string; + key?: Identifier; + bindings?: Map; + dependencies?: Set; +} +export default class Block { + parent?: Block; + renderer: Renderer; + name: Identifier; + type: string; + comment?: string; + wrappers: Wrapper[]; + key: Identifier; + first: Identifier; + dependencies: Set; + bindings: Map; + binding_group_initialised: Set; + chunks: { + declarations: Array; + init: Array; + create: Array; + claim: Array; + hydrate: Array; + mount: Array; + measure: Array; + fix: Array; + animate: Array; + intro: Array; + update: Array; + outro: Array; + destroy: Array; + }; + event_listeners: Node[]; + maintain_context: boolean; + has_animation: boolean; + has_intros: boolean; + has_outros: boolean; + has_intro_method: boolean; + has_outro_method: boolean; + outros: number; + aliases: Map; + variables: Map; + get_unique_name: (name: string) => Identifier; + has_update_method: boolean; + autofocus: string; + constructor(options: BlockOptions); + assign_variable_names(): void; + add_dependencies(dependencies: Set): void; + add_element(id: Identifier, render_statement: Node, claim_statement: Node, parent_node: Node, no_detach?: boolean): void; + add_intro(local?: boolean): void; + add_outro(local?: boolean): void; + add_animation(): void; + add_variable(id: Identifier, init?: Node): void; + alias(name: string): Identifier; + child(options: BlockOptions): Block; + get_contents(key?: any): Node[]; + has_content(): boolean; + render(): Node[]; + render_listeners(chunk?: string): void; +} diff --git a/src/@types/compiler/compile/render_dom/Renderer.d.ts b/src/@types/compiler/compile/render_dom/Renderer.d.ts new file mode 100644 index 000000000..ece1e715f --- /dev/null +++ b/src/@types/compiler/compile/render_dom/Renderer.d.ts @@ -0,0 +1,45 @@ +import Block from './Block'; +import { CompileOptions, Var } from '../../interfaces'; +import Component from '../Component'; +import FragmentWrapper from './wrappers/Fragment'; +import { Node, Identifier, MemberExpression, Literal, Expression } from 'estree'; +interface ContextMember { + name: string; + index: Literal; + is_contextual: boolean; + is_non_contextual: boolean; + variable: Var; + priority: number; +} +export default class Renderer { + component: Component; + options: CompileOptions; + context: ContextMember[]; + initial_context: ContextMember[]; + context_lookup: Map; + context_overflow: boolean; + blocks: Array; + readonly: Set; + meta_bindings: Array; + binding_groups: Map Node; + is_context: boolean; + contexts: string[]; + index: number; + keypath: string; + }>; + block: Block; + fragment: FragmentWrapper; + file_var: Identifier; + locate: (c: number) => { + line: number; + column: number; + }; + constructor(component: Component, options: CompileOptions); + add_to_context(name: string, contextual?: boolean): ContextMember; + invalidate(name: string, value?: any, main_execution_context?: boolean): any; + dirty(names: string[], is_reactive_declaration?: boolean): Expression; + reference(node: string | Identifier | MemberExpression): any; + remove_block(block: Block | Node | Node[]): void; +} +export {}; diff --git a/src/@types/compiler/compile/render_dom/index.d.ts b/src/@types/compiler/compile/render_dom/index.d.ts new file mode 100644 index 000000000..406561f4b --- /dev/null +++ b/src/@types/compiler/compile/render_dom/index.d.ts @@ -0,0 +1,7 @@ +import Component from '../Component'; +import { CompileOptions, CssResult } from '../../interfaces'; +import { Node } from 'estree'; +export default function dom(component: Component, options: CompileOptions): { + js: Node[]; + css: CssResult; +}; diff --git a/src/@types/compiler/compile/render_dom/invalidate.d.ts b/src/@types/compiler/compile/render_dom/invalidate.d.ts new file mode 100644 index 000000000..7c44fa06f --- /dev/null +++ b/src/@types/compiler/compile/render_dom/invalidate.d.ts @@ -0,0 +1,5 @@ +import { Scope } from '../utils/scope'; +import { Node } from 'estree'; +import Renderer from './Renderer'; +export declare function invalidate(renderer: Renderer, scope: Scope, node: Node, names: Set, main_execution_context?: boolean): any; +export declare function renderer_invalidate(renderer: Renderer, name: string, value?: any, main_execution_context?: boolean): any; diff --git a/src/@types/compiler/compile/render_dom/wrappers/AwaitBlock.d.ts b/src/@types/compiler/compile/render_dom/wrappers/AwaitBlock.d.ts new file mode 100644 index 000000000..28ffd28d0 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/AwaitBlock.d.ts @@ -0,0 +1,38 @@ +import Wrapper from './shared/Wrapper'; +import Renderer from '../Renderer'; +import Block from '../Block'; +import AwaitBlock from '../../nodes/AwaitBlock'; +import FragmentWrapper from './Fragment'; +import PendingBlock from '../../nodes/PendingBlock'; +import ThenBlock from '../../nodes/ThenBlock'; +import CatchBlock from '../../nodes/CatchBlock'; +import { Context } from '../../nodes/shared/Context'; +import { Identifier, Literal, Node } from 'estree'; +declare type Status = 'pending' | 'then' | 'catch'; +declare class AwaitBlockBranch extends Wrapper { + parent: AwaitBlockWrapper; + node: PendingBlock | ThenBlock | CatchBlock; + block: Block; + fragment: FragmentWrapper; + is_dynamic: boolean; + var: any; + status: Status; + value: string; + value_index: Literal; + value_contexts: Context[]; + is_destructured: boolean; + constructor(status: Status, renderer: Renderer, block: Block, parent: AwaitBlockWrapper, node: PendingBlock | ThenBlock | CatchBlock, strip_whitespace: boolean, next_sibling: Wrapper); + add_context(node: Node | null, contexts: Context[]): void; + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; + render_destructure(): void; +} +export default class AwaitBlockWrapper extends Wrapper { + node: AwaitBlock; + pending: AwaitBlockBranch; + then: AwaitBlockBranch; + catch: AwaitBlockBranch; + var: Identifier; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: AwaitBlock, strip_whitespace: boolean, next_sibling: Wrapper); + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; +} +export {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Body.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Body.d.ts new file mode 100644 index 000000000..e00cfdf07 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Body.d.ts @@ -0,0 +1,13 @@ +import Block from '../Block'; +import Wrapper from './shared/Wrapper'; +import Body from '../../nodes/Body'; +import { Identifier } from 'estree'; +import EventHandler from './Element/EventHandler'; +import { TemplateNode } from '../../../interfaces'; +import Renderer from '../Renderer'; +export default class BodyWrapper extends Wrapper { + node: Body; + handlers: EventHandler[]; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: TemplateNode); + render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/DebugTag.d.ts b/src/@types/compiler/compile/render_dom/wrappers/DebugTag.d.ts new file mode 100644 index 000000000..bf68ea962 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/DebugTag.d.ts @@ -0,0 +1,10 @@ +import Renderer from '../Renderer'; +import Wrapper from './shared/Wrapper'; +import Block from '../Block'; +import DebugTag from '../../nodes/DebugTag'; +import { Identifier } from 'estree'; +export default class DebugTagWrapper extends Wrapper { + node: DebugTag; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: DebugTag, _strip_whitespace: boolean, _next_sibling: Wrapper); + render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/EachBlock.d.ts b/src/@types/compiler/compile/render_dom/wrappers/EachBlock.d.ts new file mode 100644 index 000000000..573b7c1a5 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/EachBlock.d.ts @@ -0,0 +1,56 @@ +import Renderer from '../Renderer'; +import Block from '../Block'; +import Wrapper from './shared/Wrapper'; +import EachBlock from '../../nodes/EachBlock'; +import FragmentWrapper from './Fragment'; +import ElseBlock from '../../nodes/ElseBlock'; +import { Identifier, Node } from 'estree'; +export declare class ElseBlockWrapper extends Wrapper { + node: ElseBlock; + block: Block; + fragment: FragmentWrapper; + is_dynamic: boolean; + var: any; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: ElseBlock, strip_whitespace: boolean, next_sibling: Wrapper); +} +export default class EachBlockWrapper extends Wrapper { + block: Block; + node: EachBlock; + fragment: FragmentWrapper; + else?: ElseBlockWrapper; + vars: { + create_each_block: Identifier; + each_block_value: Identifier; + get_each_context: Identifier; + iterations: Identifier; + fixed_length: number; + data_length: Node | number; + view_length: Node | number; + }; + context_props: Array; + index_name: Identifier; + updates: Array; + dependencies: Set; + var: Identifier; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: EachBlock, strip_whitespace: boolean, next_sibling: Wrapper); + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; + render_keyed({ block, parent_node, parent_nodes, snippet, initial_anchor_node, initial_mount_node, update_anchor_node, update_mount_node }: { + block: Block; + parent_node: Identifier; + parent_nodes: Identifier; + snippet: Node; + initial_anchor_node: Identifier; + initial_mount_node: Identifier; + update_anchor_node: Identifier; + update_mount_node: Identifier; + }): void; + render_unkeyed({ block, parent_nodes, snippet, initial_anchor_node, initial_mount_node, update_anchor_node, update_mount_node }: { + block: Block; + parent_nodes: Identifier; + snippet: Node; + initial_anchor_node: Identifier; + initial_mount_node: Identifier; + update_anchor_node: Identifier; + update_mount_node: Identifier; + }): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/Attribute.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/Attribute.d.ts new file mode 100644 index 000000000..6edb5630e --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Element/Attribute.d.ts @@ -0,0 +1,42 @@ +import Attribute from '../../../nodes/Attribute'; +import Block from '../../Block'; +import ElementWrapper from './index'; +import { Identifier, Node } from 'estree'; +export declare class BaseAttributeWrapper { + node: Attribute; + parent: ElementWrapper; + constructor(parent: ElementWrapper, block: Block, node: Attribute); + render(_block: Block): void; +} +export default class AttributeWrapper extends BaseAttributeWrapper { + node: Attribute; + parent: ElementWrapper; + metadata: any; + name: string; + property_name: string; + is_indirectly_bound_value: boolean; + is_src: boolean; + is_select_value_attribute: boolean; + is_input_value: boolean; + should_cache: boolean; + last: Identifier; + constructor(parent: ElementWrapper, block: Block, node: Attribute); + render(block: Block): void; + get_init(block: Block, value: any): any; + get_dom_update_conditions(block: Block, dependency_condition: Node): Node; + get_dependencies(): string[]; + get_metadata(): any; + get_value(block: any): Identifier | import("estree").SimpleLiteral | import("estree").RegExpLiteral | import("estree").Program | import("estree").FunctionDeclaration | import("estree").FunctionExpression | import("estree").ArrowFunctionExpression | import("estree").SwitchCase | import("estree").CatchClause | import("estree").VariableDeclarator | import("estree").ExpressionStatement | import("estree").BlockStatement | import("estree").EmptyStatement | import("estree").DebuggerStatement | import("estree").WithStatement | import("estree").ReturnStatement | import("estree").LabeledStatement | import("estree").BreakStatement | import("estree").ContinueStatement | import("estree").IfStatement | import("estree").SwitchStatement | import("estree").ThrowStatement | import("estree").TryStatement | import("estree").WhileStatement | import("estree").DoWhileStatement | import("estree").ForStatement | import("estree").ForInStatement | import("estree").ForOfStatement | import("estree").VariableDeclaration | import("estree").ClassDeclaration | import("estree").ThisExpression | import("estree").ArrayExpression | import("estree").ObjectExpression | import("estree").YieldExpression | import("estree").UnaryExpression | import("estree").UpdateExpression | import("estree").BinaryExpression | import("estree").AssignmentExpression | import("estree").LogicalExpression | import("estree").MemberExpression | import("estree").ConditionalExpression | import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").SequenceExpression | import("estree").TemplateLiteral | import("estree").TaggedTemplateExpression | import("estree").ClassExpression | import("estree").MetaProperty | import("estree").AwaitExpression | import("estree").ImportExpression | import("estree").ChainExpression | import("estree").Property | import("estree").Super | import("estree").TemplateElement | import("estree").SpreadElement | import("estree").ObjectPattern | import("estree").ArrayPattern | import("estree").RestElement | import("estree").AssignmentPattern | import("estree").ClassBody | import("estree").MethodDefinition | import("estree").ImportDeclaration | import("estree").ExportNamedDeclaration | import("estree").ExportDefaultDeclaration | import("estree").ExportAllDeclaration | import("estree").ImportSpecifier | import("estree").ImportDefaultSpecifier | import("estree").ImportNamespaceSpecifier | import("estree").ExportSpecifier | { + type: string; + value: string; + }; + get_class_name_text(block: any): Identifier | import("estree").SimpleLiteral | import("estree").RegExpLiteral | import("estree").Program | import("estree").FunctionDeclaration | import("estree").FunctionExpression | import("estree").ArrowFunctionExpression | import("estree").SwitchCase | import("estree").CatchClause | import("estree").VariableDeclarator | import("estree").ExpressionStatement | import("estree").BlockStatement | import("estree").EmptyStatement | import("estree").DebuggerStatement | import("estree").WithStatement | import("estree").ReturnStatement | import("estree").LabeledStatement | import("estree").BreakStatement | import("estree").ContinueStatement | import("estree").IfStatement | import("estree").SwitchStatement | import("estree").ThrowStatement | import("estree").TryStatement | import("estree").WhileStatement | import("estree").DoWhileStatement | import("estree").ForStatement | import("estree").ForInStatement | import("estree").ForOfStatement | import("estree").VariableDeclaration | import("estree").ClassDeclaration | import("estree").ThisExpression | import("estree").ArrayExpression | import("estree").ObjectExpression | import("estree").YieldExpression | import("estree").UnaryExpression | import("estree").UpdateExpression | import("estree").BinaryExpression | import("estree").AssignmentExpression | import("estree").LogicalExpression | import("estree").MemberExpression | import("estree").ConditionalExpression | import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").SequenceExpression | import("estree").TemplateLiteral | import("estree").TaggedTemplateExpression | import("estree").ClassExpression | import("estree").MetaProperty | import("estree").AwaitExpression | import("estree").ImportExpression | import("estree").ChainExpression | import("estree").Property | import("estree").Super | import("estree").TemplateElement | import("estree").SpreadElement | import("estree").ObjectPattern | import("estree").ArrayPattern | import("estree").RestElement | import("estree").AssignmentPattern | import("estree").ClassBody | import("estree").MethodDefinition | import("estree").ImportDeclaration | import("estree").ExportNamedDeclaration | import("estree").ExportDefaultDeclaration | import("estree").ExportAllDeclaration | import("estree").ImportSpecifier | import("estree").ImportDefaultSpecifier | import("estree").ImportNamespaceSpecifier | import("estree").ExportSpecifier | { + type: string; + value: string; + }; + render_chunks(block: Block): (Identifier | import("estree").SimpleLiteral | import("estree").RegExpLiteral | import("estree").Program | import("estree").FunctionDeclaration | import("estree").FunctionExpression | import("estree").ArrowFunctionExpression | import("estree").SwitchCase | import("estree").CatchClause | import("estree").VariableDeclarator | import("estree").ExpressionStatement | import("estree").BlockStatement | import("estree").EmptyStatement | import("estree").DebuggerStatement | import("estree").WithStatement | import("estree").ReturnStatement | import("estree").LabeledStatement | import("estree").BreakStatement | import("estree").ContinueStatement | import("estree").IfStatement | import("estree").SwitchStatement | import("estree").ThrowStatement | import("estree").TryStatement | import("estree").WhileStatement | import("estree").DoWhileStatement | import("estree").ForStatement | import("estree").ForInStatement | import("estree").ForOfStatement | import("estree").VariableDeclaration | import("estree").ClassDeclaration | import("estree").ThisExpression | import("estree").ArrayExpression | import("estree").ObjectExpression | import("estree").YieldExpression | import("estree").UnaryExpression | import("estree").UpdateExpression | import("estree").BinaryExpression | import("estree").AssignmentExpression | import("estree").LogicalExpression | import("estree").MemberExpression | import("estree").ConditionalExpression | import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").SequenceExpression | import("estree").TemplateLiteral | import("estree").TaggedTemplateExpression | import("estree").ClassExpression | import("estree").MetaProperty | import("estree").AwaitExpression | import("estree").ImportExpression | import("estree").ChainExpression | import("estree").Property | import("estree").Super | import("estree").TemplateElement | import("estree").SpreadElement | import("estree").ObjectPattern | import("estree").ArrayPattern | import("estree").RestElement | import("estree").AssignmentPattern | import("estree").ClassBody | import("estree").MethodDefinition | import("estree").ImportDeclaration | import("estree").ExportNamedDeclaration | import("estree").ExportDefaultDeclaration | import("estree").ExportAllDeclaration | import("estree").ImportSpecifier | import("estree").ImportDefaultSpecifier | import("estree").ImportNamespaceSpecifier | import("estree").ExportSpecifier | { + type: string; + value: string; + })[]; + stringify(): string; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/Binding.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/Binding.d.ts new file mode 100644 index 000000000..78286feff --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Element/Binding.d.ts @@ -0,0 +1,23 @@ +import Binding from '../../../nodes/Binding'; +import ElementWrapper from '../Element'; +import InlineComponentWrapper from '../InlineComponent'; +import Block from '../../Block'; +import { Node, Identifier } from 'estree'; +export default class BindingWrapper { + node: Binding; + parent: ElementWrapper | InlineComponentWrapper; + object: string; + handler: { + uses_context: boolean; + mutation: (Node | Node[]); + contextual_dependencies: Set; + lhs?: Node; + }; + snippet: Node; + is_readonly: boolean; + needs_lock: boolean; + constructor(block: Block, node: Binding, parent: ElementWrapper | InlineComponentWrapper); + get_dependencies(): Set; + is_readonly_media_attribute(): boolean; + render(block: Block, lock: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/EventHandler.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/EventHandler.d.ts new file mode 100644 index 000000000..2ee41296e --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Element/EventHandler.d.ts @@ -0,0 +1,11 @@ +import EventHandler from '../../../nodes/EventHandler'; +import Wrapper from '../shared/Wrapper'; +import Block from '../../Block'; +import { Expression } from 'estree'; +export default class EventHandlerWrapper { + node: EventHandler; + parent: Wrapper; + constructor(node: EventHandler, parent: Wrapper); + get_snippet(block: any): any; + render(block: Block, target: string | Expression): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/SpreadAttribute.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/SpreadAttribute.d.ts new file mode 100644 index 000000000..be5f05691 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Element/SpreadAttribute.d.ts @@ -0,0 +1,3 @@ +import { BaseAttributeWrapper } from './Attribute'; +export default class SpreadAttributeWrapper extends BaseAttributeWrapper { +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/StyleAttribute.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/StyleAttribute.d.ts new file mode 100644 index 000000000..8d87aa16f --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Element/StyleAttribute.d.ts @@ -0,0 +1,16 @@ +import Attribute from '../../../nodes/Attribute'; +import Block from '../../Block'; +import AttributeWrapper from './Attribute'; +import ElementWrapper from '../Element'; +import Expression from '../../../nodes/shared/Expression'; +import Text from '../../../nodes/Text'; +export interface StyleProp { + key: string; + value: Array; + important: boolean; +} +export default class StyleAttributeWrapper extends AttributeWrapper { + node: Attribute; + parent: ElementWrapper; + render(block: Block): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/fix_attribute_casing.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/fix_attribute_casing.d.ts new file mode 100644 index 000000000..fb7c2f6fc --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Element/fix_attribute_casing.d.ts @@ -0,0 +1 @@ +export default function fix_attribute_casing(name: any): any; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/handle_select_value_binding.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/handle_select_value_binding.d.ts new file mode 100644 index 000000000..baf19adf1 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Element/handle_select_value_binding.d.ts @@ -0,0 +1,3 @@ +import AttributeWrapper from './Attribute'; +import BindingWrapper from './Binding'; +export default function handle_select_value_binding(attr: AttributeWrapper | BindingWrapper, dependencies: Set): void; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Element/index.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Element/index.d.ts new file mode 100644 index 000000000..543d462c5 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Element/index.d.ts @@ -0,0 +1,41 @@ +import Renderer from '../../Renderer'; +import Element from '../../../nodes/Element'; +import Wrapper from '../shared/Wrapper'; +import Block from '../../Block'; +import FragmentWrapper from '../Fragment'; +import AttributeWrapper from './Attribute'; +import StyleAttributeWrapper from './StyleAttribute'; +import SpreadAttributeWrapper from './SpreadAttribute'; +import Binding from './Binding'; +import { Identifier } from 'estree'; +import EventHandler from './EventHandler'; +interface BindingGroup { + events: string[]; + bindings: Binding[]; +} +export default class ElementWrapper extends Wrapper { + node: Element; + fragment: FragmentWrapper; + attributes: Array; + bindings: Binding[]; + event_handlers: EventHandler[]; + class_dependencies: string[]; + select_binding_dependencies?: Set; + var: any; + void: boolean; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Element, strip_whitespace: boolean, next_sibling: Wrapper); + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; + can_use_textcontent(): boolean; + get_render_statement(block: Block): import("estree").Expression; + get_claim_statement(nodes: Identifier): import("estree").Expression; + add_directives_in_order(block: Block): void; + add_bindings(block: Block, binding_group: BindingGroup): void; + add_this_binding(block: Block, this_binding: Binding): void; + add_attributes(block: Block): void; + add_spread_attributes(block: Block): void; + add_transitions(block: Block): void; + add_animation(block: Block): void; + add_classes(block: Block): void; + add_manual_style_scoping(block: any): void; +} +export {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Fragment.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Fragment.d.ts new file mode 100644 index 000000000..d320e7c7a --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Fragment.d.ts @@ -0,0 +1,10 @@ +import Wrapper from './shared/Wrapper'; +import { INode } from '../../nodes/interfaces'; +import Renderer from '../Renderer'; +import Block from '../Block'; +import { Identifier } from 'estree'; +export default class FragmentWrapper { + nodes: Wrapper[]; + constructor(renderer: Renderer, block: Block, nodes: INode[], parent: Wrapper, strip_whitespace: boolean, next_sibling: Wrapper); + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Head.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Head.d.ts new file mode 100644 index 000000000..e21de0349 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Head.d.ts @@ -0,0 +1,12 @@ +import Wrapper from './shared/Wrapper'; +import Renderer from '../Renderer'; +import Block from '../Block'; +import Head from '../../nodes/Head'; +import FragmentWrapper from './Fragment'; +import { Identifier } from 'estree'; +export default class HeadWrapper extends Wrapper { + fragment: FragmentWrapper; + node: Head; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Head, strip_whitespace: boolean, next_sibling: Wrapper); + render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/IfBlock.d.ts b/src/@types/compiler/compile/render_dom/wrappers/IfBlock.d.ts new file mode 100644 index 000000000..2bbaf3250 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/IfBlock.d.ts @@ -0,0 +1,54 @@ +import Wrapper from './shared/Wrapper'; +import Renderer from '../Renderer'; +import Block from '../Block'; +import EachBlock from '../../nodes/EachBlock'; +import IfBlock from '../../nodes/IfBlock'; +import ElseBlock from '../../nodes/ElseBlock'; +import FragmentWrapper from './Fragment'; +import { Identifier, Node, UnaryExpression } from 'estree'; +declare class IfBlockBranch extends Wrapper { + block: Block; + fragment: FragmentWrapper; + dependencies?: string[]; + condition?: any; + snippet?: Node; + is_dynamic: boolean; + var: any; + constructor(renderer: Renderer, block: Block, parent: IfBlockWrapper, node: IfBlock | ElseBlock, strip_whitespace: boolean, next_sibling: Wrapper); +} +export default class IfBlockWrapper extends Wrapper { + node: IfBlock; + branches: IfBlockBranch[]; + needs_update: boolean; + var: Identifier; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: EachBlock, strip_whitespace: boolean, next_sibling: Wrapper); + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; + render_compound(block: Block, parent_node: Identifier, _parent_nodes: Identifier, dynamic: any, { name, anchor, has_else, if_exists_condition, has_transitions }: { + name: any; + anchor: any; + has_else: any; + if_exists_condition: any; + has_transitions: any; + }, detaching: any): void; + render_compound_with_outros(block: Block, parent_node: Identifier, _parent_nodes: Identifier, dynamic: any, { name, anchor, has_else, has_transitions, if_exists_condition }: { + name: any; + anchor: any; + has_else: any; + has_transitions: any; + if_exists_condition: any; + }, detaching: any): void; + render_simple(block: Block, parent_node: Identifier, _parent_nodes: Identifier, dynamic: any, { name, anchor, if_exists_condition, has_transitions }: { + name: any; + anchor: any; + if_exists_condition: any; + has_transitions: any; + }, detaching: any): void; + get_initial_dirty_bit(): { + readonly type: "ArrayExpression" | "UnaryExpression"; + elements: UnaryExpression[]; + operator: import("estree").UnaryOperator; + prefix: true; + argument: import("estree").Expression; + }; +} +export {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/InlineComponent/index.d.ts b/src/@types/compiler/compile/render_dom/wrappers/InlineComponent/index.d.ts new file mode 100644 index 000000000..6d7993bb3 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/InlineComponent/index.d.ts @@ -0,0 +1,25 @@ +import Wrapper from '../shared/Wrapper'; +import Renderer from '../../Renderer'; +import Block from '../../Block'; +import InlineComponent from '../../../nodes/InlineComponent'; +import FragmentWrapper from '../Fragment'; +import TemplateScope from '../../../nodes/shared/TemplateScope'; +import { Node, Identifier } from 'estree'; +declare type SlotDefinition = { + block: Block; + scope: TemplateScope; + get_context?: Node; + get_changes?: Node; +}; +export default class InlineComponentWrapper extends Wrapper { + var: Identifier; + slots: Map; + node: InlineComponent; + fragment: FragmentWrapper; + children: Array; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: InlineComponent, strip_whitespace: boolean, next_sibling: Wrapper); + set_slot(name: string, slot_definition: SlotDefinition): void; + warn_if_reactive(): void; + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; +} +export {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/KeyBlock.d.ts b/src/@types/compiler/compile/render_dom/wrappers/KeyBlock.d.ts new file mode 100644 index 000000000..0dda974e0 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/KeyBlock.d.ts @@ -0,0 +1,18 @@ +import Wrapper from './shared/Wrapper'; +import Renderer from '../Renderer'; +import Block from '../Block'; +import EachBlock from '../../nodes/EachBlock'; +import KeyBlock from '../../nodes/KeyBlock'; +import FragmentWrapper from './Fragment'; +import { Identifier } from 'estree'; +export default class KeyBlockWrapper extends Wrapper { + node: KeyBlock; + fragment: FragmentWrapper; + block: Block; + dependencies: string[]; + var: Identifier; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: EachBlock, strip_whitespace: boolean, next_sibling: Wrapper); + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; + render_static_key(_block: Block, parent_node: Identifier, parent_nodes: Identifier): void; + render_dynamic_key(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/MustacheTag.d.ts b/src/@types/compiler/compile/render_dom/wrappers/MustacheTag.d.ts new file mode 100644 index 000000000..32decd6ee --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/MustacheTag.d.ts @@ -0,0 +1,12 @@ +import Renderer from '../Renderer'; +import Block from '../Block'; +import Tag from './shared/Tag'; +import Wrapper from './shared/Wrapper'; +import MustacheTag from '../../nodes/MustacheTag'; +import RawMustacheTag from '../../nodes/RawMustacheTag'; +import { Identifier } from 'estree'; +export default class MustacheTagWrapper extends Tag { + var: Identifier; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: MustacheTag | RawMustacheTag); + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/RawMustacheTag.d.ts b/src/@types/compiler/compile/render_dom/wrappers/RawMustacheTag.d.ts new file mode 100644 index 000000000..e1b0842ea --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/RawMustacheTag.d.ts @@ -0,0 +1,12 @@ +import Renderer from '../Renderer'; +import Block from '../Block'; +import Tag from './shared/Tag'; +import Wrapper from './shared/Wrapper'; +import MustacheTag from '../../nodes/MustacheTag'; +import RawMustacheTag from '../../nodes/RawMustacheTag'; +import { Identifier } from 'estree'; +export default class RawMustacheTagWrapper extends Tag { + var: Identifier; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: MustacheTag | RawMustacheTag); + render(block: Block, parent_node: Identifier, _parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Slot.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Slot.d.ts new file mode 100644 index 000000000..dbfb324da --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Slot.d.ts @@ -0,0 +1,17 @@ +import Wrapper from './shared/Wrapper'; +import Renderer from '../Renderer'; +import Block from '../Block'; +import Slot from '../../nodes/Slot'; +import FragmentWrapper from './Fragment'; +import { Identifier } from 'estree'; +export default class SlotWrapper extends Wrapper { + node: Slot; + fragment: FragmentWrapper; + fallback: Block | null; + slot_block: Block; + var: Identifier; + dependencies: Set; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Slot, strip_whitespace: boolean, next_sibling: Wrapper); + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; + is_dependency_dynamic(name: string): boolean; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/SlotTemplate.d.ts b/src/@types/compiler/compile/render_dom/wrappers/SlotTemplate.d.ts new file mode 100644 index 000000000..ee35c2de3 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/SlotTemplate.d.ts @@ -0,0 +1,22 @@ +import Wrapper from './shared/Wrapper'; +import Renderer from '../Renderer'; +import Block from '../Block'; +import FragmentWrapper from './Fragment'; +import InlineComponentWrapper from './InlineComponent'; +import { INode } from '../../nodes/interfaces'; +import Let from '../../nodes/Let'; +import TemplateScope from '../../nodes/shared/TemplateScope'; +declare type NodeWithLets = INode & { + scope: TemplateScope; + lets: Let[]; + slot_template_name: string; +}; +export default class SlotTemplateWrapper extends Wrapper { + node: NodeWithLets; + fragment: FragmentWrapper; + block: Block; + parent: InlineComponentWrapper; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: NodeWithLets, strip_whitespace: boolean, next_sibling: Wrapper); + render(): void; +} +export {}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/Text.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Text.d.ts new file mode 100644 index 000000000..be0981fff --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Text.d.ts @@ -0,0 +1,14 @@ +import Renderer from '../Renderer'; +import Block from '../Block'; +import Text from '../../nodes/Text'; +import Wrapper from './shared/Wrapper'; +import { Identifier } from 'estree'; +export default class TextWrapper extends Wrapper { + node: Text; + data: string; + skip: boolean; + var: Identifier; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Text, data: string); + use_space(): boolean; + render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Title.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Title.d.ts new file mode 100644 index 000000000..f4a6880b0 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Title.d.ts @@ -0,0 +1,10 @@ +import Wrapper from './shared/Wrapper'; +import Renderer from '../Renderer'; +import Block from '../Block'; +import Title from '../../nodes/Title'; +import { Identifier } from 'estree'; +export default class TitleWrapper extends Wrapper { + node: Title; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: Title, _strip_whitespace: boolean, _next_sibling: Wrapper); + render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/Window.d.ts b/src/@types/compiler/compile/render_dom/wrappers/Window.d.ts new file mode 100644 index 000000000..14cc85988 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/Window.d.ts @@ -0,0 +1,13 @@ +import Renderer from '../Renderer'; +import Block from '../Block'; +import Wrapper from './shared/Wrapper'; +import Window from '../../nodes/Window'; +import { Identifier } from 'estree'; +import { TemplateNode } from '../../../interfaces'; +import EventHandler from './Element/EventHandler'; +export default class WindowWrapper extends Wrapper { + node: Window; + handlers: EventHandler[]; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: TemplateNode); + render(block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/Tag.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/Tag.d.ts new file mode 100644 index 000000000..3c510f1be --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/Tag.d.ts @@ -0,0 +1,14 @@ +import Wrapper from './Wrapper'; +import Renderer from '../../Renderer'; +import Block from '../../Block'; +import MustacheTag from '../../../nodes/MustacheTag'; +import RawMustacheTag from '../../../nodes/RawMustacheTag'; +import { Node } from 'estree'; +export default class Tag extends Wrapper { + node: MustacheTag | RawMustacheTag; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: MustacheTag | RawMustacheTag); + is_dependencies_static(): boolean; + rename_this_method(block: Block, update: ((value: Node) => (Node | Node[]))): { + init: import("estree").Identifier | import("estree").SimpleLiteral | import("estree").RegExpLiteral | import("estree").Program | import("estree").FunctionDeclaration | import("estree").FunctionExpression | import("estree").ArrowFunctionExpression | import("estree").SwitchCase | import("estree").CatchClause | import("estree").VariableDeclarator | import("estree").ExpressionStatement | import("estree").BlockStatement | import("estree").EmptyStatement | import("estree").DebuggerStatement | import("estree").WithStatement | import("estree").ReturnStatement | import("estree").LabeledStatement | import("estree").BreakStatement | import("estree").ContinueStatement | import("estree").IfStatement | import("estree").SwitchStatement | import("estree").ThrowStatement | import("estree").TryStatement | import("estree").WhileStatement | import("estree").DoWhileStatement | import("estree").ForStatement | import("estree").ForInStatement | import("estree").ForOfStatement | import("estree").VariableDeclaration | import("estree").ClassDeclaration | import("estree").ThisExpression | import("estree").ArrayExpression | import("estree").ObjectExpression | import("estree").YieldExpression | import("estree").UnaryExpression | import("estree").UpdateExpression | import("estree").BinaryExpression | import("estree").AssignmentExpression | import("estree").LogicalExpression | import("estree").MemberExpression | import("estree").ConditionalExpression | import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").SequenceExpression | import("estree").TemplateLiteral | import("estree").TaggedTemplateExpression | import("estree").ClassExpression | import("estree").MetaProperty | import("estree").AwaitExpression | import("estree").ImportExpression | import("estree").ChainExpression | import("estree").Property | import("estree").Super | import("estree").TemplateElement | import("estree").SpreadElement | import("estree").ObjectPattern | import("estree").ArrayPattern | import("estree").RestElement | import("estree").AssignmentPattern | import("estree").ClassBody | import("estree").MethodDefinition | import("estree").ImportDeclaration | import("estree").ExportNamedDeclaration | import("estree").ExportDefaultDeclaration | import("estree").ExportAllDeclaration | import("estree").ImportSpecifier | import("estree").ImportDefaultSpecifier | import("estree").ImportNamespaceSpecifier | import("estree").ExportSpecifier; + }; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/Wrapper.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/Wrapper.d.ts new file mode 100644 index 000000000..411bf0f60 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/Wrapper.d.ts @@ -0,0 +1,21 @@ +import Renderer from '../../Renderer'; +import Block from '../../Block'; +import { TemplateNode } from '../../../../interfaces'; +import { Identifier } from 'estree'; +export default class Wrapper { + renderer: Renderer; + parent: Wrapper; + node: TemplateNode; + prev: Wrapper | null; + next: Wrapper | null; + var: Identifier; + can_use_innerhtml: boolean; + is_static_content: boolean; + constructor(renderer: Renderer, block: Block, parent: Wrapper, node: TemplateNode); + cannot_use_innerhtml(): void; + not_static_content(): void; + get_or_create_anchor(block: Block, parent_node: Identifier, parent_nodes: Identifier): Identifier; + get_update_mount_node(anchor: Identifier): Identifier; + is_dom_node(): boolean; + render(_block: Block, _parent_node: Identifier, _parent_nodes: Identifier): void; +} diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/add_actions.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/add_actions.d.ts new file mode 100644 index 000000000..fe4a4e407 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/add_actions.d.ts @@ -0,0 +1,4 @@ +import Block from '../../Block'; +import Action from '../../../nodes/Action'; +export default function add_actions(block: Block, target: string, actions: Action[]): void; +export declare function add_action(block: Block, target: string, action: Action): void; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/add_event_handlers.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/add_event_handlers.d.ts new file mode 100644 index 000000000..2f48107f0 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/add_event_handlers.d.ts @@ -0,0 +1,5 @@ +import Block from '../../Block'; +import EventHandler from '../Element/EventHandler'; +import { Expression } from 'estree'; +export default function add_event_handlers(block: Block, target: string | Expression, handlers: EventHandler[]): void; +export declare function add_event_handler(block: Block, target: string | Expression, handler: EventHandler): void; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/bind_this.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/bind_this.d.ts new file mode 100644 index 000000000..ebe317859 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/bind_this.d.ts @@ -0,0 +1,5 @@ +import Component from '../../../Component'; +import Block from '../../Block'; +import BindingWrapper from '../Element/Binding'; +import { Identifier } from 'estree'; +export default function bind_this(component: Component, block: Block, binding: BindingWrapper, variable: Identifier): import("estree").Node[]; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/create_debugging_comment.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/create_debugging_comment.d.ts new file mode 100644 index 000000000..a8155e071 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/create_debugging_comment.d.ts @@ -0,0 +1,3 @@ +import Component from '../../../Component'; +import { INode } from '../../../nodes/interfaces'; +export default function create_debugging_comment(node: INode, component: Component): string; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/get_slot_definition.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/get_slot_definition.d.ts new file mode 100644 index 000000000..5a96c33bf --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/get_slot_definition.d.ts @@ -0,0 +1,14 @@ +import Let from '../../../nodes/Let'; +import Block from '../../Block'; +import TemplateScope from '../../../nodes/shared/TemplateScope'; +export declare function get_slot_definition(block: Block, scope: TemplateScope, lets: Let[]): { + block: Block; + scope: TemplateScope; + get_context?: undefined; + get_changes?: undefined; +} | { + block: Block; + scope: TemplateScope; + get_context: import("estree").Expression; + get_changes: import("estree").Expression; +}; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/is_dynamic.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/is_dynamic.d.ts new file mode 100644 index 000000000..ccc3a7115 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/is_dynamic.d.ts @@ -0,0 +1,2 @@ +import { Var } from '../../../../interfaces'; +export default function is_dynamic(variable: Var): boolean; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/is_head.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/is_head.d.ts new file mode 100644 index 000000000..2808651ce --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/is_head.d.ts @@ -0,0 +1 @@ +export declare function is_head(node: any): boolean; diff --git a/src/@types/compiler/compile/render_dom/wrappers/shared/mark_each_block_bindings.d.ts b/src/@types/compiler/compile/render_dom/wrappers/shared/mark_each_block_bindings.d.ts new file mode 100644 index 000000000..e2aa83097 --- /dev/null +++ b/src/@types/compiler/compile/render_dom/wrappers/shared/mark_each_block_bindings.d.ts @@ -0,0 +1,4 @@ +import InlineComponentWrapper from '../InlineComponent'; +import ElementWrapper from '../Element'; +import Binding from '../../../nodes/Binding'; +export default function mark_each_block_bindings(parent: ElementWrapper | InlineComponentWrapper, binding: Binding): void; diff --git a/src/@types/compiler/compile/render_ssr/Renderer.d.ts b/src/@types/compiler/compile/render_ssr/Renderer.d.ts new file mode 100644 index 000000000..2a7f29551 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/Renderer.d.ts @@ -0,0 +1,33 @@ +import { AppendTarget, CompileOptions } from '../../interfaces'; +import { INode } from '../nodes/interfaces'; +import { Expression, TemplateLiteral, Identifier } from 'estree'; +export interface RenderOptions extends CompileOptions { + locate: (c: number) => { + line: number; + column: number; + }; + head_id?: string; +} +export default class Renderer { + has_bindings: boolean; + name: Identifier; + stack: Array<{ + current: { + value: string; + }; + literal: TemplateLiteral; + }>; + current: { + value: string; + }; + literal: TemplateLiteral; + targets: AppendTarget[]; + constructor({ name }: { + name: any; + }); + add_string(str: string): void; + add_expression(node: Expression): void; + push(): void; + pop(): TemplateLiteral; + render(nodes: INode[], options: RenderOptions): void; +} diff --git a/src/@types/compiler/compile/render_ssr/handlers/AwaitBlock.d.ts b/src/@types/compiler/compile/render_ssr/handlers/AwaitBlock.d.ts new file mode 100644 index 000000000..9ac74d663 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/AwaitBlock.d.ts @@ -0,0 +1,3 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import AwaitBlock from '../../nodes/AwaitBlock'; +export default function (node: AwaitBlock, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Comment.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Comment.d.ts new file mode 100644 index 000000000..6dc1572a9 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/Comment.d.ts @@ -0,0 +1,3 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import Comment from '../../nodes/Comment'; +export default function (_node: Comment, _renderer: Renderer, _options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/DebugTag.d.ts b/src/@types/compiler/compile/render_ssr/handlers/DebugTag.d.ts new file mode 100644 index 000000000..737c104d0 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/DebugTag.d.ts @@ -0,0 +1,3 @@ +import DebugTag from '../../nodes/DebugTag'; +import Renderer, { RenderOptions } from '../Renderer'; +export default function (node: DebugTag, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/EachBlock.d.ts b/src/@types/compiler/compile/render_ssr/handlers/EachBlock.d.ts new file mode 100644 index 000000000..5ecd8599a --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/EachBlock.d.ts @@ -0,0 +1,3 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import EachBlock from '../../nodes/EachBlock'; +export default function (node: EachBlock, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Element.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Element.d.ts new file mode 100644 index 000000000..c426b71b6 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/Element.d.ts @@ -0,0 +1,3 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import Element from '../../nodes/Element'; +export default function (node: Element, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Head.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Head.d.ts new file mode 100644 index 000000000..add6c178e --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/Head.d.ts @@ -0,0 +1,3 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import Head from '../../nodes/Head'; +export default function (node: Head, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/HtmlTag.d.ts b/src/@types/compiler/compile/render_ssr/handlers/HtmlTag.d.ts new file mode 100644 index 000000000..19f8f6342 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/HtmlTag.d.ts @@ -0,0 +1,3 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import RawMustacheTag from '../../nodes/RawMustacheTag'; +export default function (node: RawMustacheTag, renderer: Renderer, _options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/IfBlock.d.ts b/src/@types/compiler/compile/render_ssr/handlers/IfBlock.d.ts new file mode 100644 index 000000000..c5be3d092 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/IfBlock.d.ts @@ -0,0 +1,3 @@ +import IfBlock from '../../nodes/IfBlock'; +import Renderer, { RenderOptions } from '../Renderer'; +export default function (node: IfBlock, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/InlineComponent.d.ts b/src/@types/compiler/compile/render_ssr/handlers/InlineComponent.d.ts new file mode 100644 index 000000000..fd52d3a18 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/InlineComponent.d.ts @@ -0,0 +1,3 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import InlineComponent from '../../nodes/InlineComponent'; +export default function (node: InlineComponent, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/KeyBlock.d.ts b/src/@types/compiler/compile/render_ssr/handlers/KeyBlock.d.ts new file mode 100644 index 000000000..ab71c23b1 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/KeyBlock.d.ts @@ -0,0 +1,3 @@ +import KeyBlock from '../../nodes/KeyBlock'; +import Renderer, { RenderOptions } from '../Renderer'; +export default function (node: KeyBlock, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Slot.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Slot.d.ts new file mode 100644 index 000000000..b07dd1374 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/Slot.d.ts @@ -0,0 +1,5 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import Slot from '../../nodes/Slot'; +export default function (node: Slot, renderer: Renderer, options: RenderOptions & { + slot_scopes: Map; +}): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/SlotTemplate.d.ts b/src/@types/compiler/compile/render_ssr/handlers/SlotTemplate.d.ts new file mode 100644 index 000000000..defd084a7 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/SlotTemplate.d.ts @@ -0,0 +1,7 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import SlotTemplate from '../../nodes/SlotTemplate'; +import InlineComponent from '../../nodes/InlineComponent'; +import Element from '../../nodes/Element'; +export default function (node: SlotTemplate | Element | InlineComponent, renderer: Renderer, options: RenderOptions & { + slot_scopes: Map; +}): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Tag.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Tag.d.ts new file mode 100644 index 000000000..a37afab5e --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/Tag.d.ts @@ -0,0 +1,2 @@ +import Renderer, { RenderOptions } from '../Renderer'; +export default function (node: any, renderer: Renderer, _options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Text.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Text.d.ts new file mode 100644 index 000000000..8b6a668f4 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/Text.d.ts @@ -0,0 +1,3 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import Text from '../../nodes/Text'; +export default function (node: Text, renderer: Renderer, _options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/Title.d.ts b/src/@types/compiler/compile/render_ssr/handlers/Title.d.ts new file mode 100644 index 000000000..14d4b2d4d --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/Title.d.ts @@ -0,0 +1,3 @@ +import Renderer, { RenderOptions } from '../Renderer'; +import Title from '../../nodes/Title'; +export default function (node: Title, renderer: Renderer, options: RenderOptions): void; diff --git a/src/@types/compiler/compile/render_ssr/handlers/shared/boolean_attributes.d.ts b/src/@types/compiler/compile/render_ssr/handlers/shared/boolean_attributes.d.ts new file mode 100644 index 000000000..5ae12c9c9 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/shared/boolean_attributes.d.ts @@ -0,0 +1 @@ +export declare const boolean_attributes: Set; diff --git a/src/@types/compiler/compile/render_ssr/handlers/shared/get_attribute_value.d.ts b/src/@types/compiler/compile/render_ssr/handlers/shared/get_attribute_value.d.ts new file mode 100644 index 000000000..7a68b541e --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/shared/get_attribute_value.d.ts @@ -0,0 +1,4 @@ +import Attribute from '../../../nodes/Attribute'; +import { Expression as ESTreeExpression } from 'estree'; +export declare function get_class_attribute_value(attribute: Attribute): ESTreeExpression; +export declare function get_attribute_value(attribute: Attribute): ESTreeExpression; diff --git a/src/@types/compiler/compile/render_ssr/handlers/shared/get_slot_scope.d.ts b/src/@types/compiler/compile/render_ssr/handlers/shared/get_slot_scope.d.ts new file mode 100644 index 000000000..7e092af60 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/shared/get_slot_scope.d.ts @@ -0,0 +1,3 @@ +import Let from '../../../nodes/Let'; +import { ObjectPattern } from 'estree'; +export declare function get_slot_scope(lets: Let[]): ObjectPattern; diff --git a/src/@types/compiler/compile/render_ssr/handlers/utils/remove_whitespace_children.d.ts b/src/@types/compiler/compile/render_ssr/handlers/utils/remove_whitespace_children.d.ts new file mode 100644 index 000000000..9776333b5 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/handlers/utils/remove_whitespace_children.d.ts @@ -0,0 +1,2 @@ +import { INode } from '../../../nodes/interfaces'; +export default function remove_whitespace_children(children: INode[], next?: INode): INode[]; diff --git a/src/@types/compiler/compile/render_ssr/index.d.ts b/src/@types/compiler/compile/render_ssr/index.d.ts new file mode 100644 index 000000000..011307736 --- /dev/null +++ b/src/@types/compiler/compile/render_ssr/index.d.ts @@ -0,0 +1,7 @@ +import Component from '../Component'; +import { CompileOptions, CssResult } from '../../interfaces'; +import { Node } from 'estree'; +export default function ssr(component: Component, options: CompileOptions): { + js: Node[]; + css: CssResult; +}; diff --git a/src/@types/compiler/compile/utils/__test__.d.ts b/src/@types/compiler/compile/utils/__test__.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/src/@types/compiler/compile/utils/__test__.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/src/@types/compiler/compile/utils/add_to_set.d.ts b/src/@types/compiler/compile/utils/add_to_set.d.ts new file mode 100644 index 000000000..b620fbcc2 --- /dev/null +++ b/src/@types/compiler/compile/utils/add_to_set.d.ts @@ -0,0 +1 @@ +export default function add_to_set(a: Set, b: Set | T[]): void; diff --git a/src/@types/compiler/compile/utils/check_graph_for_cycles.d.ts b/src/@types/compiler/compile/utils/check_graph_for_cycles.d.ts new file mode 100644 index 000000000..6660f10cf --- /dev/null +++ b/src/@types/compiler/compile/utils/check_graph_for_cycles.d.ts @@ -0,0 +1 @@ +export default function check_graph_for_cycles(edges: Array<[any, any]>): any[]; diff --git a/src/@types/compiler/compile/utils/compare_node.d.ts b/src/@types/compiler/compile/utils/compare_node.d.ts new file mode 100644 index 000000000..789f82608 --- /dev/null +++ b/src/@types/compiler/compile/utils/compare_node.d.ts @@ -0,0 +1,2 @@ +import { Node } from 'estree'; +export declare function compare_node(a: Node | void, b: Node | void): any; diff --git a/src/@types/compiler/compile/utils/flatten_reference.d.ts b/src/@types/compiler/compile/utils/flatten_reference.d.ts new file mode 100644 index 000000000..e07492982 --- /dev/null +++ b/src/@types/compiler/compile/utils/flatten_reference.d.ts @@ -0,0 +1,6 @@ +import { Node } from 'estree'; +export default function flatten_reference(node: Node): { + name: string; + nodes: any[]; + parts: any[]; +}; diff --git a/src/@types/compiler/compile/utils/get_name_from_filename.d.ts b/src/@types/compiler/compile/utils/get_name_from_filename.d.ts new file mode 100644 index 000000000..25751c0f6 --- /dev/null +++ b/src/@types/compiler/compile/utils/get_name_from_filename.d.ts @@ -0,0 +1 @@ +export default function get_name_from_filename(filename: string): string; diff --git a/src/@types/compiler/compile/utils/get_object.d.ts b/src/@types/compiler/compile/utils/get_object.d.ts new file mode 100644 index 000000000..dea68fb42 --- /dev/null +++ b/src/@types/compiler/compile/utils/get_object.d.ts @@ -0,0 +1,2 @@ +import { Node, Identifier } from 'estree'; +export default function get_object(node: Node): Identifier; diff --git a/src/@types/compiler/compile/utils/get_slot_data.d.ts b/src/@types/compiler/compile/utils/get_slot_data.d.ts new file mode 100644 index 000000000..45796e4d4 --- /dev/null +++ b/src/@types/compiler/compile/utils/get_slot_data.d.ts @@ -0,0 +1,9 @@ +import Attribute from '../nodes/Attribute'; +import Block from '../render_dom/Block'; +export default function get_slot_data(values: Map, block?: Block): { + type: string; + properties: (import("estree").Property | import("estree").SpreadElement | { + type: string; + argument: import("estree").Identifier | import("estree").SimpleLiteral | import("estree").RegExpLiteral | import("estree").Program | import("estree").FunctionDeclaration | import("estree").FunctionExpression | import("estree").ArrowFunctionExpression | import("estree").SwitchCase | import("estree").CatchClause | import("estree").VariableDeclarator | import("estree").ExpressionStatement | import("estree").BlockStatement | import("estree").EmptyStatement | import("estree").DebuggerStatement | import("estree").WithStatement | import("estree").ReturnStatement | import("estree").LabeledStatement | import("estree").BreakStatement | import("estree").ContinueStatement | import("estree").IfStatement | import("estree").SwitchStatement | import("estree").ThrowStatement | import("estree").TryStatement | import("estree").WhileStatement | import("estree").DoWhileStatement | import("estree").ForStatement | import("estree").ForInStatement | import("estree").ForOfStatement | import("estree").VariableDeclaration | import("estree").ClassDeclaration | import("estree").ThisExpression | import("estree").ArrayExpression | import("estree").ObjectExpression | import("estree").YieldExpression | import("estree").UnaryExpression | import("estree").UpdateExpression | import("estree").BinaryExpression | import("estree").AssignmentExpression | import("estree").LogicalExpression | import("estree").MemberExpression | import("estree").ConditionalExpression | import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").SequenceExpression | import("estree").TemplateLiteral | import("estree").TaggedTemplateExpression | import("estree").ClassExpression | import("estree").MetaProperty | import("estree").AwaitExpression | import("estree").ImportExpression | import("estree").ChainExpression | import("estree").Property | import("estree").Super | import("estree").TemplateElement | import("estree").SpreadElement | import("estree").ObjectPattern | import("estree").ArrayPattern | import("estree").RestElement | import("estree").AssignmentPattern | import("estree").ClassBody | import("estree").MethodDefinition | import("estree").ImportDeclaration | import("estree").ExportNamedDeclaration | import("estree").ExportDefaultDeclaration | import("estree").ExportAllDeclaration | import("estree").ImportSpecifier | import("estree").ImportDefaultSpecifier | import("estree").ImportNamespaceSpecifier | import("estree").ExportSpecifier; + })[]; +}; diff --git a/src/@types/compiler/compile/utils/hash.d.ts b/src/@types/compiler/compile/utils/hash.d.ts new file mode 100644 index 000000000..b1bb8bf71 --- /dev/null +++ b/src/@types/compiler/compile/utils/hash.d.ts @@ -0,0 +1 @@ +export default function hash(str: string): string; diff --git a/src/@types/compiler/compile/utils/is_used_as_reference.d.ts b/src/@types/compiler/compile/utils/is_used_as_reference.d.ts new file mode 100644 index 000000000..ea52dbbae --- /dev/null +++ b/src/@types/compiler/compile/utils/is_used_as_reference.d.ts @@ -0,0 +1,2 @@ +import { Node } from 'estree'; +export default function is_used_as_reference(node: Node, parent: Node): boolean; diff --git a/src/@types/compiler/compile/utils/replace_object.d.ts b/src/@types/compiler/compile/utils/replace_object.d.ts new file mode 100644 index 000000000..bd4ded862 --- /dev/null +++ b/src/@types/compiler/compile/utils/replace_object.d.ts @@ -0,0 +1,2 @@ +import { Node } from 'estree'; +export default function replace_object(node: Node, replacement: Node): import("estree").Identifier | import("estree").SimpleLiteral | import("estree").RegExpLiteral | import("estree").Program | import("estree").FunctionDeclaration | import("estree").FunctionExpression | import("estree").ArrowFunctionExpression | import("estree").SwitchCase | import("estree").CatchClause | import("estree").VariableDeclarator | import("estree").ExpressionStatement | import("estree").BlockStatement | import("estree").EmptyStatement | import("estree").DebuggerStatement | import("estree").WithStatement | import("estree").ReturnStatement | import("estree").LabeledStatement | import("estree").BreakStatement | import("estree").ContinueStatement | import("estree").IfStatement | import("estree").SwitchStatement | import("estree").ThrowStatement | import("estree").TryStatement | import("estree").WhileStatement | import("estree").DoWhileStatement | import("estree").ForStatement | import("estree").ForInStatement | import("estree").ForOfStatement | import("estree").VariableDeclaration | import("estree").ClassDeclaration | import("estree").ThisExpression | import("estree").ArrayExpression | import("estree").ObjectExpression | import("estree").YieldExpression | import("estree").UnaryExpression | import("estree").UpdateExpression | import("estree").BinaryExpression | import("estree").AssignmentExpression | import("estree").LogicalExpression | import("estree").MemberExpression | import("estree").ConditionalExpression | import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").SequenceExpression | import("estree").TemplateLiteral | import("estree").TaggedTemplateExpression | import("estree").ClassExpression | import("estree").MetaProperty | import("estree").AwaitExpression | import("estree").ImportExpression | import("estree").ChainExpression | import("estree").Property | import("estree").Super | import("estree").TemplateElement | import("estree").SpreadElement | import("estree").ObjectPattern | import("estree").ArrayPattern | import("estree").RestElement | import("estree").AssignmentPattern | import("estree").ClassBody | import("estree").MethodDefinition | import("estree").ImportDeclaration | import("estree").ExportNamedDeclaration | import("estree").ExportDefaultDeclaration | import("estree").ExportAllDeclaration | import("estree").ImportSpecifier | import("estree").ImportDefaultSpecifier | import("estree").ImportNamespaceSpecifier | import("estree").ExportSpecifier; diff --git a/src/@types/compiler/compile/utils/reserved_keywords.d.ts b/src/@types/compiler/compile/utils/reserved_keywords.d.ts new file mode 100644 index 000000000..77d723625 --- /dev/null +++ b/src/@types/compiler/compile/utils/reserved_keywords.d.ts @@ -0,0 +1,2 @@ +export declare const reserved_keywords: Set; +export declare function is_reserved_keyword(name: any): boolean; diff --git a/src/@types/compiler/compile/utils/scope.d.ts b/src/@types/compiler/compile/utils/scope.d.ts new file mode 100644 index 000000000..e5b08f9d5 --- /dev/null +++ b/src/@types/compiler/compile/utils/scope.d.ts @@ -0,0 +1,8 @@ +import { Node } from 'estree'; +import { Scope, extract_names, extract_identifiers } from 'periscopic'; +export declare function create_scopes(expression: Node): { + map: WeakMap; + scope: Scope; + globals: Map; +}; +export { Scope, extract_names, extract_identifiers }; diff --git a/src/@types/compiler/compile/utils/string_to_member_expression.d.ts b/src/@types/compiler/compile/utils/string_to_member_expression.d.ts new file mode 100644 index 000000000..76b07beec --- /dev/null +++ b/src/@types/compiler/compile/utils/string_to_member_expression.d.ts @@ -0,0 +1,2 @@ +import { MemberExpression, Identifier } from 'estree'; +export declare function string_to_member_expression(name: string): Identifier | MemberExpression; diff --git a/src/@types/compiler/compile/utils/stringify.d.ts b/src/@types/compiler/compile/utils/stringify.d.ts new file mode 100644 index 000000000..471194a1b --- /dev/null +++ b/src/@types/compiler/compile/utils/stringify.d.ts @@ -0,0 +1,9 @@ +export declare function string_literal(data: string): { + type: string; + value: string; +}; +export declare function escape(data: string, { only_escape_at_symbol }?: { + only_escape_at_symbol?: boolean; +}): string; +export declare function escape_html(html: any): string; +export declare function escape_template(str: any): any; diff --git a/src/@types/compiler/config.d.ts b/src/@types/compiler/config.d.ts new file mode 100644 index 000000000..66cb4d4e8 --- /dev/null +++ b/src/@types/compiler/config.d.ts @@ -0,0 +1 @@ +export declare const test: string; diff --git a/src/@types/compiler/index.d.ts b/src/@types/compiler/index.d.ts new file mode 100644 index 000000000..99fe8e027 --- /dev/null +++ b/src/@types/compiler/index.d.ts @@ -0,0 +1,5 @@ +export { default as compile } from './compile/index'; +export { default as parse } from './parse/index'; +export { default as preprocess } from './preprocess/index'; +export { walk } from 'estree-walker'; +export declare const VERSION = "__VERSION__"; diff --git a/src/@types/compiler/interfaces.d.ts b/src/@types/compiler/interfaces.d.ts new file mode 100644 index 000000000..2fc2db544 --- /dev/null +++ b/src/@types/compiler/interfaces.d.ts @@ -0,0 +1,148 @@ +import { Node, Program } from 'estree'; +import { SourceMap } from 'magic-string'; +interface BaseNode { + start: number; + end: number; + type: string; + children?: TemplateNode[]; + [prop_name: string]: any; +} +export interface Fragment extends BaseNode { + type: 'Fragment'; + children: TemplateNode[]; +} +export interface Text extends BaseNode { + type: 'Text'; + data: string; +} +export interface MustacheTag extends BaseNode { + type: 'MustacheTag'; + expression: string; +} +export declare type DirectiveType = 'Action' | 'Animation' | 'Binding' | 'Class' | 'EventHandler' | 'Let' | 'Ref' | 'Transition'; +interface BaseDirective extends BaseNode { + type: DirectiveType; + expression: null | Node; + name: string; + modifiers: string[]; +} +export interface Transition extends BaseDirective { + type: 'Transition'; + intro: boolean; + outro: boolean; +} +export declare type Directive = BaseDirective | Transition; +export declare type TemplateNode = Text | MustacheTag | BaseNode | Directive | Transition; +export interface Parser { + readonly template: string; + readonly filename?: string; + index: number; + stack: Node[]; + html: Node; + css: Node; + js: Node; + meta_tags: {}; +} +export interface Script extends BaseNode { + type: 'Script'; + context: string; + content: Program; +} +export interface Style extends BaseNode { + type: 'Style'; + attributes: any[]; + children: any[]; + content: { + start: number; + end: number; + styles: string; + }; +} +export interface Ast { + html: TemplateNode; + css: Style; + instance: Script; + module: Script; +} +export interface Warning { + start?: { + line: number; + column: number; + pos?: number; + }; + end?: { + line: number; + column: number; + }; + pos?: number; + code: string; + message: string; + filename?: string; + frame?: string; + toString: () => string; +} +export declare type ModuleFormat = 'esm' | 'cjs'; +export declare type CssHashGetter = (args: { + name: string; + filename: string | undefined; + css: string; + hash: (input: string) => string; +}) => string; +export interface CompileOptions { + format?: ModuleFormat; + name?: string; + filename?: string; + generate?: 'dom' | 'ssr' | false; + sourcemap?: object | string; + outputFilename?: string; + cssOutputFilename?: string; + sveltePath?: string; + dev?: boolean; + accessors?: boolean; + immutable?: boolean; + hydratable?: boolean; + legacy?: boolean; + customElement?: boolean; + tag?: string; + css?: boolean; + loopGuardTimeout?: number; + namespace?: string; + cssHash?: CssHashGetter; + preserveComments?: boolean; + preserveWhitespace?: boolean; +} +export interface ParserOptions { + filename?: string; + customElement?: boolean; +} +export interface Visitor { + enter: (node: Node) => void; + leave?: (node: Node) => void; +} +export interface AppendTarget { + slots: Record; + slot_stack: string[]; +} +export interface Var { + name: string; + export_name?: string; + injected?: boolean; + module?: boolean; + mutated?: boolean; + reassigned?: boolean; + referenced?: boolean; + referenced_from_script?: boolean; + writable?: boolean; + global?: boolean; + internal?: boolean; + initialised?: boolean; + hoistable?: boolean; + subscribable?: boolean; + is_reactive_dependency?: boolean; + imported?: boolean; +} +export interface CssResult { + code: string; + map: SourceMap; +} +export {}; diff --git a/src/@types/compiler/parse/acorn.d.ts b/src/@types/compiler/parse/acorn.d.ts new file mode 100644 index 000000000..aadad5669 --- /dev/null +++ b/src/@types/compiler/parse/acorn.d.ts @@ -0,0 +1,3 @@ +import { Node } from 'acorn'; +export declare const parse: (source: string) => Node; +export declare const parse_expression_at: (source: string, index: number) => Node; diff --git a/src/@types/compiler/parse/index.d.ts b/src/@types/compiler/parse/index.d.ts new file mode 100644 index 000000000..1d2f6ec00 --- /dev/null +++ b/src/@types/compiler/parse/index.d.ts @@ -0,0 +1,35 @@ +import { TemplateNode, Ast, ParserOptions, Fragment, Style, Script } from '../interfaces'; +interface LastAutoClosedTag { + tag: string; + reason: string; + depth: number; +} +export declare class Parser { + readonly template: string; + readonly filename?: string; + readonly customElement: boolean; + index: number; + stack: TemplateNode[]; + html: Fragment; + css: Style[]; + js: Script[]; + meta_tags: {}; + last_auto_closed_tag?: LastAutoClosedTag; + constructor(template: string, options: ParserOptions); + current(): TemplateNode; + acorn_error(err: any): void; + error({ code, message }: { + code: string; + message: string; + }, index?: number): void; + eat(str: string, required?: boolean, message?: string): boolean; + match(str: string): boolean; + match_regex(pattern: RegExp): string; + allow_whitespace(): void; + read(pattern: RegExp): string; + read_identifier(allow_reserved?: boolean): string; + read_until(pattern: RegExp): string; + require_whitespace(): void; +} +export default function parse(template: string, options?: ParserOptions): Ast; +export {}; diff --git a/src/@types/compiler/parse/read/context.d.ts b/src/@types/compiler/parse/read/context.d.ts new file mode 100644 index 000000000..e6d53f41d --- /dev/null +++ b/src/@types/compiler/parse/read/context.d.ts @@ -0,0 +1,6 @@ +import { Parser } from '../index'; +import { Pattern } from 'estree'; +export default function read_context(parser: Parser): Pattern & { + start: number; + end: number; +}; diff --git a/src/@types/compiler/parse/read/expression.d.ts b/src/@types/compiler/parse/read/expression.d.ts new file mode 100644 index 000000000..4f14791fa --- /dev/null +++ b/src/@types/compiler/parse/read/expression.d.ts @@ -0,0 +1,2 @@ +import { Parser } from '../index'; +export default function read_expression(parser: Parser): string; diff --git a/src/@types/compiler/parse/read/script.d.ts b/src/@types/compiler/parse/read/script.d.ts new file mode 100644 index 000000000..aa99c5b8f --- /dev/null +++ b/src/@types/compiler/parse/read/script.d.ts @@ -0,0 +1,4 @@ +import { Parser } from '../index'; +import { Script } from '../../interfaces'; +import { Node } from 'estree'; +export default function read_script(parser: Parser, start: number, attributes: Node[]): Script; diff --git a/src/@types/compiler/parse/read/style.d.ts b/src/@types/compiler/parse/read/style.d.ts new file mode 100644 index 000000000..870d711ce --- /dev/null +++ b/src/@types/compiler/parse/read/style.d.ts @@ -0,0 +1,4 @@ +import { Parser } from '../index'; +import { Node } from 'estree'; +import { Style } from '../../interfaces'; +export default function read_style(parser: Parser, start: number, attributes: Node[]): Style; diff --git a/src/@types/compiler/parse/state/fragment.d.ts b/src/@types/compiler/parse/state/fragment.d.ts new file mode 100644 index 000000000..ec6073ba7 --- /dev/null +++ b/src/@types/compiler/parse/state/fragment.d.ts @@ -0,0 +1,3 @@ +import tag from './tag'; +import { Parser } from '../index'; +export default function fragment(parser: Parser): typeof tag; diff --git a/src/@types/compiler/parse/state/mustache.d.ts b/src/@types/compiler/parse/state/mustache.d.ts new file mode 100644 index 000000000..8a4b8b539 --- /dev/null +++ b/src/@types/compiler/parse/state/mustache.d.ts @@ -0,0 +1,2 @@ +import { Parser } from '../index'; +export default function mustache(parser: Parser): void; diff --git a/src/@types/compiler/parse/state/tag.d.ts b/src/@types/compiler/parse/state/tag.d.ts new file mode 100644 index 000000000..1e0a29c57 --- /dev/null +++ b/src/@types/compiler/parse/state/tag.d.ts @@ -0,0 +1,2 @@ +import { Parser } from '../index'; +export default function tag(parser: Parser): void; diff --git a/src/@types/compiler/parse/state/text.d.ts b/src/@types/compiler/parse/state/text.d.ts new file mode 100644 index 000000000..88f2671f5 --- /dev/null +++ b/src/@types/compiler/parse/state/text.d.ts @@ -0,0 +1,2 @@ +import { Parser } from '../index'; +export default function text(parser: Parser): void; diff --git a/src/@types/compiler/parse/utils/bracket.d.ts b/src/@types/compiler/parse/utils/bracket.d.ts new file mode 100644 index 000000000..e18f35279 --- /dev/null +++ b/src/@types/compiler/parse/utils/bracket.d.ts @@ -0,0 +1,4 @@ +export declare function is_bracket_open(code: any): boolean; +export declare function is_bracket_close(code: any): boolean; +export declare function is_bracket_pair(open: any, close: any): boolean; +export declare function get_bracket_close(open: any): number; diff --git a/src/@types/compiler/parse/utils/entities.d.ts b/src/@types/compiler/parse/utils/entities.d.ts new file mode 100644 index 000000000..41902a659 --- /dev/null +++ b/src/@types/compiler/parse/utils/entities.d.ts @@ -0,0 +1,2034 @@ +declare const _default: { + CounterClockwiseContourIntegral: number; + ClockwiseContourIntegral: number; + DoubleLongLeftRightArrow: number; + DiacriticalDoubleAcute: number; + NotSquareSupersetEqual: number; + CloseCurlyDoubleQuote: number; + DoubleContourIntegral: number; + FilledVerySmallSquare: number; + NegativeVeryThinSpace: number; + NotPrecedesSlantEqual: number; + NotRightTriangleEqual: number; + NotSucceedsSlantEqual: number; + CapitalDifferentialD: number; + DoubleLeftRightArrow: number; + DoubleLongRightArrow: number; + EmptyVerySmallSquare: number; + NestedGreaterGreater: number; + NotDoubleVerticalBar: number; + NotLeftTriangleEqual: number; + NotSquareSubsetEqual: number; + OpenCurlyDoubleQuote: number; + ReverseUpEquilibrium: number; + DoubleLongLeftArrow: number; + DownLeftRightVector: number; + LeftArrowRightArrow: number; + NegativeMediumSpace: number; + RightArrowLeftArrow: number; + SquareSupersetEqual: number; + leftrightsquigarrow: number; + DownRightTeeVector: number; + DownRightVectorBar: number; + LongLeftRightArrow: number; + Longleftrightarrow: number; + NegativeThickSpace: number; + PrecedesSlantEqual: number; + ReverseEquilibrium: number; + RightDoubleBracket: number; + RightDownTeeVector: number; + RightDownVectorBar: number; + RightTriangleEqual: number; + SquareIntersection: number; + SucceedsSlantEqual: number; + blacktriangleright: number; + longleftrightarrow: number; + DoubleUpDownArrow: number; + DoubleVerticalBar: number; + DownLeftTeeVector: number; + DownLeftVectorBar: number; + FilledSmallSquare: number; + GreaterSlantEqual: number; + LeftDoubleBracket: number; + LeftDownTeeVector: number; + LeftDownVectorBar: number; + LeftTriangleEqual: number; + NegativeThinSpace: number; + NotReverseElement: number; + NotTildeFullEqual: number; + RightAngleBracket: number; + RightUpDownVector: number; + SquareSubsetEqual: number; + VerticalSeparator: number; + blacktriangledown: number; + blacktriangleleft: number; + leftrightharpoons: number; + rightleftharpoons: number; + twoheadrightarrow: number; + DiacriticalAcute: number; + DiacriticalGrave: number; + DiacriticalTilde: number; + DoubleRightArrow: number; + DownArrowUpArrow: number; + EmptySmallSquare: number; + GreaterEqualLess: number; + GreaterFullEqual: number; + LeftAngleBracket: number; + LeftUpDownVector: number; + LessEqualGreater: number; + NonBreakingSpace: number; + NotRightTriangle: number; + NotSupersetEqual: number; + RightTriangleBar: number; + RightUpTeeVector: number; + RightUpVectorBar: number; + UnderParenthesis: number; + UpArrowDownArrow: number; + circlearrowright: number; + downharpoonright: number; + ntrianglerighteq: number; + rightharpoondown: number; + rightrightarrows: number; + twoheadleftarrow: number; + vartriangleright: number; + CloseCurlyQuote: number; + ContourIntegral: number; + DoubleDownArrow: number; + DoubleLeftArrow: number; + DownRightVector: number; + LeftRightVector: number; + LeftTriangleBar: number; + LeftUpTeeVector: number; + LeftUpVectorBar: number; + LowerRightArrow: number; + NotGreaterEqual: number; + NotGreaterTilde: number; + NotLeftTriangle: number; + OverParenthesis: number; + RightDownVector: number; + ShortRightArrow: number; + UpperRightArrow: number; + bigtriangledown: number; + circlearrowleft: number; + curvearrowright: number; + downharpoonleft: number; + leftharpoondown: number; + leftrightarrows: number; + nLeftrightarrow: number; + nleftrightarrow: number; + ntrianglelefteq: number; + rightleftarrows: number; + rightsquigarrow: number; + rightthreetimes: number; + straightepsilon: number; + trianglerighteq: number; + vartriangleleft: number; + DiacriticalDot: number; + DoubleRightTee: number; + DownLeftVector: number; + GreaterGreater: number; + HorizontalLine: number; + InvisibleComma: number; + InvisibleTimes: number; + LeftDownVector: number; + LeftRightArrow: number; + Leftrightarrow: number; + LessSlantEqual: number; + LongRightArrow: number; + Longrightarrow: number; + LowerLeftArrow: number; + NestedLessLess: number; + NotGreaterLess: number; + NotLessGreater: number; + NotSubsetEqual: number; + NotVerticalBar: number; + OpenCurlyQuote: number; + ReverseElement: number; + RightTeeVector: number; + RightVectorBar: number; + ShortDownArrow: number; + ShortLeftArrow: number; + SquareSuperset: number; + TildeFullEqual: number; + UpperLeftArrow: number; + ZeroWidthSpace: number; + curvearrowleft: number; + doublebarwedge: number; + downdownarrows: number; + hookrightarrow: number; + leftleftarrows: number; + leftrightarrow: number; + leftthreetimes: number; + longrightarrow: number; + looparrowright: number; + nshortparallel: number; + ntriangleright: number; + rightarrowtail: number; + rightharpoonup: number; + trianglelefteq: number; + upharpoonright: number; + ApplyFunction: number; + DifferentialD: number; + DoubleLeftTee: number; + DoubleUpArrow: number; + LeftTeeVector: number; + LeftVectorBar: number; + LessFullEqual: number; + LongLeftArrow: number; + Longleftarrow: number; + NotTildeEqual: number; + NotTildeTilde: number; + Poincareplane: number; + PrecedesEqual: number; + PrecedesTilde: number; + RightArrowBar: number; + RightTeeArrow: number; + RightTriangle: number; + RightUpVector: number; + SucceedsEqual: number; + SucceedsTilde: number; + SupersetEqual: number; + UpEquilibrium: number; + VerticalTilde: number; + VeryThinSpace: number; + bigtriangleup: number; + blacktriangle: number; + divideontimes: number; + fallingdotseq: number; + hookleftarrow: number; + leftarrowtail: number; + leftharpoonup: number; + longleftarrow: number; + looparrowleft: number; + measuredangle: number; + ntriangleleft: number; + shortparallel: number; + smallsetminus: number; + triangleright: number; + upharpoonleft: number; + DownArrowBar: number; + DownTeeArrow: number; + ExponentialE: number; + GreaterEqual: number; + GreaterTilde: number; + HilbertSpace: number; + HumpDownHump: number; + Intersection: number; + LeftArrowBar: number; + LeftTeeArrow: number; + LeftTriangle: number; + LeftUpVector: number; + NotCongruent: number; + NotLessEqual: number; + NotLessTilde: number; + Proportional: number; + RightCeiling: number; + RoundImplies: number; + ShortUpArrow: number; + SquareSubset: number; + UnderBracket: number; + VerticalLine: number; + blacklozenge: number; + exponentiale: number; + risingdotseq: number; + triangledown: number; + triangleleft: number; + CircleMinus: number; + CircleTimes: number; + Equilibrium: number; + GreaterLess: number; + LeftCeiling: number; + LessGreater: number; + MediumSpace: number; + NotPrecedes: number; + NotSucceeds: number; + OverBracket: number; + RightVector: number; + Rrightarrow: number; + RuleDelayed: number; + SmallCircle: number; + SquareUnion: number; + SubsetEqual: number; + UpDownArrow: number; + Updownarrow: number; + VerticalBar: number; + backepsilon: number; + blacksquare: number; + circledcirc: number; + circleddash: number; + curlyeqprec: number; + curlyeqsucc: number; + diamondsuit: number; + eqslantless: number; + expectation: number; + nRightarrow: number; + nrightarrow: number; + preccurlyeq: number; + precnapprox: number; + quaternions: number; + straightphi: number; + succcurlyeq: number; + succnapprox: number; + thickapprox: number; + updownarrow: number; + Bernoullis: number; + CirclePlus: number; + EqualTilde: number; + Fouriertrf: number; + ImaginaryI: number; + Laplacetrf: number; + LeftVector: number; + Lleftarrow: number; + NotElement: number; + NotGreater: number; + Proportion: number; + RightArrow: number; + RightFloor: number; + Rightarrow: number; + TildeEqual: number; + TildeTilde: number; + UnderBrace: number; + UpArrowBar: number; + UpTeeArrow: number; + circledast: number; + complement: number; + curlywedge: number; + eqslantgtr: number; + gtreqqless: number; + lessapprox: number; + lesseqqgtr: number; + lmoustache: number; + longmapsto: number; + mapstodown: number; + mapstoleft: number; + nLeftarrow: number; + nleftarrow: number; + precapprox: number; + rightarrow: number; + rmoustache: number; + sqsubseteq: number; + sqsupseteq: number; + subsetneqq: number; + succapprox: number; + supsetneqq: number; + upuparrows: number; + varepsilon: number; + varnothing: number; + Backslash: number; + CenterDot: number; + CircleDot: number; + Congruent: number; + Coproduct: number; + DoubleDot: number; + DownArrow: number; + DownBreve: number; + Downarrow: number; + HumpEqual: number; + LeftArrow: number; + LeftFloor: number; + Leftarrow: number; + LessTilde: number; + Mellintrf: number; + MinusPlus: number; + NotCupCap: number; + NotExists: number; + OverBrace: number; + PlusMinus: number; + Therefore: number; + ThinSpace: number; + TripleDot: number; + UnionPlus: number; + backprime: number; + backsimeq: number; + bigotimes: number; + centerdot: number; + checkmark: number; + complexes: number; + dotsquare: number; + downarrow: number; + gtrapprox: number; + gtreqless: number; + heartsuit: number; + leftarrow: number; + lesseqgtr: number; + nparallel: number; + nshortmid: number; + nsubseteq: number; + nsupseteq: number; + pitchfork: number; + rationals: number; + spadesuit: number; + subseteqq: number; + subsetneq: number; + supseteqq: number; + supsetneq: number; + therefore: number; + triangleq: number; + varpropto: number; + DDotrahd: number; + DotEqual: number; + Integral: number; + LessLess: number; + NotEqual: number; + NotTilde: number; + PartialD: number; + Precedes: number; + RightTee: number; + Succeeds: number; + SuchThat: number; + Superset: number; + Uarrocir: number; + UnderBar: number; + andslope: number; + angmsdaa: number; + angmsdab: number; + angmsdac: number; + angmsdad: number; + angmsdae: number; + angmsdaf: number; + angmsdag: number; + angmsdah: number; + angrtvbd: number; + approxeq: number; + awconint: number; + backcong: number; + barwedge: number; + bbrktbrk: number; + bigoplus: number; + bigsqcup: number; + biguplus: number; + bigwedge: number; + boxminus: number; + boxtimes: number; + capbrcup: number; + circledR: number; + circledS: number; + cirfnint: number; + clubsuit: number; + cupbrcap: number; + curlyvee: number; + cwconint: number; + doteqdot: number; + dotminus: number; + drbkarow: number; + dzigrarr: number; + elinters: number; + emptyset: number; + eqvparsl: number; + fpartint: number; + geqslant: number; + gesdotol: number; + gnapprox: number; + hksearow: number; + hkswarow: number; + imagline: number; + imagpart: number; + infintie: number; + integers: number; + intercal: number; + intlarhk: number; + laemptyv: number; + ldrushar: number; + leqslant: number; + lesdotor: number; + llcorner: number; + lnapprox: number; + lrcorner: number; + lurdshar: number; + mapstoup: number; + multimap: number; + naturals: number; + otimesas: number; + parallel: number; + plusacir: number; + pointint: number; + precneqq: number; + precnsim: number; + profalar: number; + profline: number; + profsurf: number; + raemptyv: number; + realpart: number; + rppolint: number; + rtriltri: number; + scpolint: number; + setminus: number; + shortmid: number; + smeparsl: number; + sqsubset: number; + sqsupset: number; + subseteq: number; + succneqq: number; + succnsim: number; + supseteq: number; + thetasym: number; + thicksim: number; + timesbar: number; + triangle: number; + triminus: number; + trpezium: number; + ulcorner: number; + urcorner: number; + varkappa: number; + varsigma: number; + vartheta: number; + Because: number; + Cayleys: number; + Cconint: number; + Cedilla: number; + Diamond: number; + DownTee: number; + Element: number; + Epsilon: number; + Implies: number; + LeftTee: number; + NewLine: number; + NoBreak: number; + NotLess: number; + Omicron: number; + OverBar: number; + Product: number; + UpArrow: number; + Uparrow: number; + Upsilon: number; + alefsym: number; + angrtvb: number; + angzarr: number; + asympeq: number; + backsim: number; + because: number; + bemptyv: number; + between: number; + bigcirc: number; + bigodot: number; + bigstar: number; + boxplus: number; + ccupssm: number; + cemptyv: number; + cirscir: number; + coloneq: number; + congdot: number; + cudarrl: number; + cudarrr: number; + cularrp: number; + curarrm: number; + dbkarow: number; + ddagger: number; + ddotseq: number; + demptyv: number; + diamond: number; + digamma: number; + dotplus: number; + dwangle: number; + epsilon: number; + eqcolon: number; + equivDD: number; + gesdoto: number; + gtquest: number; + gtrless: number; + harrcir: number; + intprod: number; + isindot: number; + larrbfs: number; + larrsim: number; + lbrksld: number; + lbrkslu: number; + ldrdhar: number; + lesdoto: number; + lessdot: number; + lessgtr: number; + lesssim: number; + lotimes: number; + lozenge: number; + ltquest: number; + luruhar: number; + maltese: number; + minusdu: number; + napprox: number; + natural: number; + nearrow: number; + nexists: number; + notinva: number; + notinvb: number; + notinvc: number; + notniva: number; + notnivb: number; + notnivc: number; + npolint: number; + nsqsube: number; + nsqsupe: number; + nvinfin: number; + nwarrow: number; + olcross: number; + omicron: number; + orderof: number; + orslope: number; + pertenk: number; + planckh: number; + pluscir: number; + plussim: number; + plustwo: number; + precsim: number; + quatint: number; + questeq: number; + rarrbfs: number; + rarrsim: number; + rbrksld: number; + rbrkslu: number; + rdldhar: number; + realine: number; + rotimes: number; + ruluhar: number; + searrow: number; + simplus: number; + simrarr: number; + subedot: number; + submult: number; + subplus: number; + subrarr: number; + succsim: number; + supdsub: number; + supedot: number; + suphsub: number; + suplarr: number; + supmult: number; + supplus: number; + swarrow: number; + topfork: number; + triplus: number; + tritime: number; + uparrow: number; + upsilon: number; + uwangle: number; + vzigzag: number; + zigrarr: number; + Aacute: number; + Abreve: number; + Agrave: number; + Assign: number; + Atilde: number; + Barwed: number; + Bumpeq: number; + Cacute: number; + Ccaron: number; + Ccedil: number; + Colone: number; + Conint: number; + CupCap: number; + Dagger: number; + Dcaron: number; + DotDot: number; + Dstrok: number; + Eacute: number; + Ecaron: number; + Egrave: number; + Exists: number; + ForAll: number; + Gammad: number; + Gbreve: number; + Gcedil: number; + HARDcy: number; + Hstrok: number; + Iacute: number; + Igrave: number; + Itilde: number; + Jsercy: number; + Kcedil: number; + Lacute: number; + Lambda: number; + Lcaron: number; + Lcedil: number; + Lmidot: number; + Lstrok: number; + Nacute: number; + Ncaron: number; + Ncedil: number; + Ntilde: number; + Oacute: number; + Odblac: number; + Ograve: number; + Oslash: number; + Otilde: number; + Otimes: number; + Racute: number; + Rarrtl: number; + Rcaron: number; + Rcedil: number; + SHCHcy: number; + SOFTcy: number; + Sacute: number; + Scaron: number; + Scedil: number; + Square: number; + Subset: number; + Supset: number; + Tcaron: number; + Tcedil: number; + Tstrok: number; + Uacute: number; + Ubreve: number; + Udblac: number; + Ugrave: number; + Utilde: number; + Vdashl: number; + Verbar: number; + Vvdash: number; + Yacute: number; + Zacute: number; + Zcaron: number; + aacute: number; + abreve: number; + agrave: number; + andand: number; + angmsd: number; + angsph: number; + apacir: number; + approx: number; + atilde: number; + barvee: number; + barwed: number; + becaus: number; + bernou: number; + bigcap: number; + bigcup: number; + bigvee: number; + bkarow: number; + bottom: number; + bowtie: number; + boxbox: number; + bprime: number; + brvbar: number; + bullet: number; + bumpeq: number; + cacute: number; + capand: number; + capcap: number; + capcup: number; + capdot: number; + ccaron: number; + ccedil: number; + circeq: number; + cirmid: number; + colone: number; + commat: number; + compfn: number; + conint: number; + coprod: number; + copysr: number; + cularr: number; + cupcap: number; + cupcup: number; + cupdot: number; + curarr: number; + curren: number; + cylcty: number; + dagger: number; + daleth: number; + dcaron: number; + dfisht: number; + divide: number; + divonx: number; + dlcorn: number; + dlcrop: number; + dollar: number; + drcorn: number; + drcrop: number; + dstrok: number; + eacute: number; + easter: number; + ecaron: number; + ecolon: number; + egrave: number; + egsdot: number; + elsdot: number; + emptyv: number; + emsp13: number; + emsp14: number; + eparsl: number; + eqcirc: number; + equals: number; + equest: number; + female: number; + ffilig: number; + ffllig: number; + forall: number; + frac12: number; + frac13: number; + frac14: number; + frac15: number; + frac16: number; + frac18: number; + frac23: number; + frac25: number; + frac34: number; + frac35: number; + frac38: number; + frac45: number; + frac56: number; + frac58: number; + frac78: number; + gacute: number; + gammad: number; + gbreve: number; + gesdot: number; + gesles: number; + gtlPar: number; + gtrarr: number; + gtrdot: number; + gtrsim: number; + hairsp: number; + hamilt: number; + hardcy: number; + hearts: number; + hellip: number; + hercon: number; + homtht: number; + horbar: number; + hslash: number; + hstrok: number; + hybull: number; + hyphen: number; + iacute: number; + igrave: number; + iiiint: number; + iinfin: number; + incare: number; + inodot: number; + intcal: number; + iquest: number; + isinsv: number; + itilde: number; + jsercy: number; + kappav: number; + kcedil: number; + kgreen: number; + lAtail: number; + lacute: number; + lagran: number; + lambda: number; + langle: number; + larrfs: number; + larrhk: number; + larrlp: number; + larrpl: number; + larrtl: number; + latail: number; + lbrace: number; + lbrack: number; + lcaron: number; + lcedil: number; + ldquor: number; + lesdot: number; + lesges: number; + lfisht: number; + lfloor: number; + lharul: number; + llhard: number; + lmidot: number; + lmoust: number; + loplus: number; + lowast: number; + lowbar: number; + lparlt: number; + lrhard: number; + lsaquo: number; + lsquor: number; + lstrok: number; + lthree: number; + ltimes: number; + ltlarr: number; + ltrPar: number; + mapsto: number; + marker: number; + mcomma: number; + midast: number; + midcir: number; + middot: number; + minusb: number; + minusd: number; + mnplus: number; + models: number; + mstpos: number; + nVDash: number; + nVdash: number; + nacute: number; + ncaron: number; + ncedil: number; + nearhk: number; + nequiv: number; + nesear: number; + nexist: number; + nltrie: number; + nprcue: number; + nrtrie: number; + nsccue: number; + nsimeq: number; + ntilde: number; + numero: number; + nvDash: number; + nvHarr: number; + nvdash: number; + nvlArr: number; + nvrArr: number; + nwarhk: number; + nwnear: number; + oacute: number; + odblac: number; + odsold: number; + ograve: number; + ominus: number; + origof: number; + oslash: number; + otilde: number; + otimes: number; + parsim: number; + percnt: number; + period: number; + permil: number; + phmmat: number; + planck: number; + plankv: number; + plusdo: number; + plusdu: number; + plusmn: number; + preceq: number; + primes: number; + prnsim: number; + propto: number; + prurel: number; + puncsp: number; + qprime: number; + rAtail: number; + racute: number; + rangle: number; + rarrap: number; + rarrfs: number; + rarrhk: number; + rarrlp: number; + rarrpl: number; + rarrtl: number; + ratail: number; + rbrace: number; + rbrack: number; + rcaron: number; + rcedil: number; + rdquor: number; + rfisht: number; + rfloor: number; + rharul: number; + rmoust: number; + roplus: number; + rpargt: number; + rsaquo: number; + rsquor: number; + rthree: number; + rtimes: number; + sacute: number; + scaron: number; + scedil: number; + scnsim: number; + searhk: number; + seswar: number; + sfrown: number; + shchcy: number; + sigmaf: number; + sigmav: number; + simdot: number; + smashp: number; + softcy: number; + solbar: number; + spades: number; + sqsube: number; + sqsupe: number; + square: number; + squarf: number; + ssetmn: number; + ssmile: number; + sstarf: number; + subdot: number; + subset: number; + subsim: number; + subsub: number; + subsup: number; + succeq: number; + supdot: number; + supset: number; + supsim: number; + supsub: number; + supsup: number; + swarhk: number; + swnwar: number; + target: number; + tcaron: number; + tcedil: number; + telrec: number; + there4: number; + thetav: number; + thinsp: number; + thksim: number; + timesb: number; + timesd: number; + topbot: number; + topcir: number; + tprime: number; + tridot: number; + tstrok: number; + uacute: number; + ubreve: number; + udblac: number; + ufisht: number; + ugrave: number; + ulcorn: number; + ulcrop: number; + urcorn: number; + urcrop: number; + utilde: number; + vangrt: number; + varphi: number; + varrho: number; + veebar: number; + vellip: number; + verbar: number; + wedbar: number; + wedgeq: number; + weierp: number; + wreath: number; + xoplus: number; + xotime: number; + xsqcup: number; + xuplus: number; + xwedge: number; + yacute: number; + zacute: number; + zcaron: number; + zeetrf: number; + AElig: number; + Acirc: number; + Alpha: number; + Amacr: number; + Aogon: number; + Aring: number; + Breve: number; + Ccirc: number; + Colon: number; + Cross: number; + Dashv: number; + Delta: number; + Ecirc: number; + Emacr: number; + Eogon: number; + Equal: number; + Gamma: number; + Gcirc: number; + Hacek: number; + Hcirc: number; + IJlig: number; + Icirc: number; + Imacr: number; + Iogon: number; + Iukcy: number; + Jcirc: number; + Jukcy: number; + Kappa: number; + OElig: number; + Ocirc: number; + Omacr: number; + Omega: number; + Prime: number; + RBarr: number; + Scirc: number; + Sigma: number; + THORN: number; + TRADE: number; + TSHcy: number; + Theta: number; + Tilde: number; + Ubrcy: number; + Ucirc: number; + Umacr: number; + Union: number; + Uogon: number; + UpTee: number; + Uring: number; + VDash: number; + Vdash: number; + Wcirc: number; + Wedge: number; + Ycirc: number; + acirc: number; + acute: number; + aelig: number; + aleph: number; + alpha: number; + amacr: number; + amalg: number; + angle: number; + angrt: number; + angst: number; + aogon: number; + aring: number; + asymp: number; + awint: number; + bcong: number; + bdquo: number; + bepsi: number; + blank: number; + blk12: number; + blk14: number; + blk34: number; + block: number; + boxDL: number; + boxDR: number; + boxDl: number; + boxDr: number; + boxHD: number; + boxHU: number; + boxHd: number; + boxHu: number; + boxUL: number; + boxUR: number; + boxUl: number; + boxUr: number; + boxVH: number; + boxVL: number; + boxVR: number; + boxVh: number; + boxVl: number; + boxVr: number; + boxdL: number; + boxdR: number; + boxdl: number; + boxdr: number; + boxhD: number; + boxhU: number; + boxhd: number; + boxhu: number; + boxuL: number; + boxuR: number; + boxul: number; + boxur: number; + boxvH: number; + boxvL: number; + boxvR: number; + boxvh: number; + boxvl: number; + boxvr: number; + breve: number; + bsemi: number; + bsime: number; + bsolb: number; + bumpE: number; + bumpe: number; + caret: number; + caron: number; + ccaps: number; + ccirc: number; + ccups: number; + cedil: number; + check: number; + clubs: number; + colon: number; + comma: number; + crarr: number; + cross: number; + csube: number; + csupe: number; + ctdot: number; + cuepr: number; + cuesc: number; + cupor: number; + cuvee: number; + cuwed: number; + cwint: number; + dashv: number; + dblac: number; + ddarr: number; + delta: number; + dharl: number; + dharr: number; + diams: number; + disin: number; + doteq: number; + dtdot: number; + dtrif: number; + duarr: number; + duhar: number; + eDDot: number; + ecirc: number; + efDot: number; + emacr: number; + empty: number; + eogon: number; + eplus: number; + epsiv: number; + eqsim: number; + equiv: number; + erDot: number; + erarr: number; + esdot: number; + exist: number; + fflig: number; + filig: number; + fllig: number; + fltns: number; + forkv: number; + frasl: number; + frown: number; + gamma: number; + gcirc: number; + gescc: number; + gimel: number; + gneqq: number; + gnsim: number; + grave: number; + gsime: number; + gsiml: number; + gtcir: number; + gtdot: number; + harrw: number; + hcirc: number; + hoarr: number; + icirc: number; + iexcl: number; + iiint: number; + iiota: number; + ijlig: number; + imacr: number; + image: number; + imath: number; + imped: number; + infin: number; + iogon: number; + iprod: number; + isinE: number; + isins: number; + isinv: number; + iukcy: number; + jcirc: number; + jmath: number; + jukcy: number; + kappa: number; + lAarr: number; + lBarr: number; + langd: number; + laquo: number; + larrb: number; + lbarr: number; + lbbrk: number; + lbrke: number; + lceil: number; + ldquo: number; + lescc: number; + lhard: number; + lharu: number; + lhblk: number; + llarr: number; + lltri: number; + lneqq: number; + lnsim: number; + loang: number; + loarr: number; + lobrk: number; + lopar: number; + lrarr: number; + lrhar: number; + lrtri: number; + lsime: number; + lsimg: number; + lsquo: number; + ltcir: number; + ltdot: number; + ltrie: number; + ltrif: number; + mDDot: number; + mdash: number; + micro: number; + minus: number; + mumap: number; + nabla: number; + napos: number; + natur: number; + ncong: number; + ndash: number; + neArr: number; + nearr: number; + ngsim: number; + nhArr: number; + nharr: number; + nhpar: number; + nlArr: number; + nlarr: number; + nless: number; + nlsim: number; + nltri: number; + notin: number; + notni: number; + nprec: number; + nrArr: number; + nrarr: number; + nrtri: number; + nsime: number; + nsmid: number; + nspar: number; + nsube: number; + nsucc: number; + nsupe: number; + numsp: number; + nwArr: number; + nwarr: number; + ocirc: number; + odash: number; + oelig: number; + ofcir: number; + ohbar: number; + olarr: number; + olcir: number; + oline: number; + omacr: number; + omega: number; + operp: number; + oplus: number; + orarr: number; + order: number; + ovbar: number; + parsl: number; + phone: number; + plusb: number; + pluse: number; + pound: number; + prcue: number; + prime: number; + prnap: number; + prsim: number; + quest: number; + rAarr: number; + rBarr: number; + radic: number; + rangd: number; + range: number; + raquo: number; + rarrb: number; + rarrc: number; + rarrw: number; + ratio: number; + rbarr: number; + rbbrk: number; + rbrke: number; + rceil: number; + rdquo: number; + reals: number; + rhard: number; + rharu: number; + rlarr: number; + rlhar: number; + rnmid: number; + roang: number; + roarr: number; + robrk: number; + ropar: number; + rrarr: number; + rsquo: number; + rtrie: number; + rtrif: number; + sbquo: number; + sccue: number; + scirc: number; + scnap: number; + scsim: number; + sdotb: number; + sdote: number; + seArr: number; + searr: number; + setmn: number; + sharp: number; + sigma: number; + simeq: number; + simgE: number; + simlE: number; + simne: number; + slarr: number; + smile: number; + sqcap: number; + sqcup: number; + sqsub: number; + sqsup: number; + srarr: number; + starf: number; + strns: number; + subnE: number; + subne: number; + supnE: number; + supne: number; + swArr: number; + swarr: number; + szlig: number; + theta: number; + thkap: number; + thorn: number; + tilde: number; + times: number; + trade: number; + trisb: number; + tshcy: number; + twixt: number; + ubrcy: number; + ucirc: number; + udarr: number; + udhar: number; + uharl: number; + uharr: number; + uhblk: number; + ultri: number; + umacr: number; + uogon: number; + uplus: number; + upsih: number; + uring: number; + urtri: number; + utdot: number; + utrif: number; + uuarr: number; + vBarv: number; + vDash: number; + varpi: number; + vdash: number; + veeeq: number; + vltri: number; + vprop: number; + vrtri: number; + wcirc: number; + wedge: number; + xcirc: number; + xdtri: number; + xhArr: number; + xharr: number; + xlArr: number; + xlarr: number; + xodot: number; + xrArr: number; + xrarr: number; + xutri: number; + ycirc: number; + Aopf: number; + Ascr: number; + Auml: number; + Barv: number; + Beta: number; + Bopf: number; + Bscr: number; + CHcy: number; + COPY: number; + Cdot: number; + Copf: number; + Cscr: number; + DJcy: number; + DScy: number; + DZcy: number; + Darr: number; + Dopf: number; + Dscr: number; + Edot: number; + Eopf: number; + Escr: number; + Esim: number; + Euml: number; + Fopf: number; + Fscr: number; + GJcy: number; + Gdot: number; + Gopf: number; + Gscr: number; + Hopf: number; + Hscr: number; + IEcy: number; + IOcy: number; + Idot: number; + Iopf: number; + Iota: number; + Iscr: number; + Iuml: number; + Jopf: number; + Jscr: number; + KHcy: number; + KJcy: number; + Kopf: number; + Kscr: number; + LJcy: number; + Lang: number; + Larr: number; + Lopf: number; + Lscr: number; + Mopf: number; + Mscr: number; + NJcy: number; + Nopf: number; + Nscr: number; + Oopf: number; + Oscr: number; + Ouml: number; + Popf: number; + Pscr: number; + QUOT: number; + Qopf: number; + Qscr: number; + Rang: number; + Rarr: number; + Ropf: number; + Rscr: number; + SHcy: number; + Sopf: number; + Sqrt: number; + Sscr: number; + Star: number; + TScy: number; + Topf: number; + Tscr: number; + Uarr: number; + Uopf: number; + Upsi: number; + Uscr: number; + Uuml: number; + Vbar: number; + Vert: number; + Vopf: number; + Vscr: number; + Wopf: number; + Wscr: number; + Xopf: number; + Xscr: number; + YAcy: number; + YIcy: number; + YUcy: number; + Yopf: number; + Yscr: number; + Yuml: number; + ZHcy: number; + Zdot: number; + Zeta: number; + Zopf: number; + Zscr: number; + andd: number; + andv: number; + ange: number; + aopf: number; + apid: number; + apos: number; + ascr: number; + auml: number; + bNot: number; + bbrk: number; + beta: number; + beth: number; + bnot: number; + bopf: number; + boxH: number; + boxV: number; + boxh: number; + boxv: number; + bscr: number; + bsim: number; + bsol: number; + bull: number; + bump: number; + cdot: number; + cent: number; + chcy: number; + cirE: number; + circ: number; + cire: number; + comp: number; + cong: number; + copf: number; + copy: number; + cscr: number; + csub: number; + csup: number; + dArr: number; + dHar: number; + darr: number; + dash: number; + diam: number; + djcy: number; + dopf: number; + dscr: number; + dscy: number; + dsol: number; + dtri: number; + dzcy: number; + eDot: number; + ecir: number; + edot: number; + emsp: number; + ensp: number; + eopf: number; + epar: number; + epsi: number; + escr: number; + esim: number; + euml: number; + euro: number; + excl: number; + flat: number; + fnof: number; + fopf: number; + fork: number; + fscr: number; + gdot: number; + geqq: number; + gjcy: number; + gnap: number; + gneq: number; + gopf: number; + gscr: number; + gsim: number; + gtcc: number; + hArr: number; + half: number; + harr: number; + hbar: number; + hopf: number; + hscr: number; + iecy: number; + imof: number; + iocy: number; + iopf: number; + iota: number; + iscr: number; + isin: number; + iuml: number; + jopf: number; + jscr: number; + khcy: number; + kjcy: number; + kopf: number; + kscr: number; + lArr: number; + lHar: number; + lang: number; + larr: number; + late: number; + lcub: number; + ldca: number; + ldsh: number; + leqq: number; + ljcy: number; + lnap: number; + lneq: number; + lopf: number; + lozf: number; + lpar: number; + lscr: number; + lsim: number; + lsqb: number; + ltcc: number; + ltri: number; + macr: number; + male: number; + malt: number; + mlcp: number; + mldr: number; + mopf: number; + mscr: number; + nbsp: number; + ncap: number; + ncup: number; + ngeq: number; + ngtr: number; + nisd: number; + njcy: number; + nldr: number; + nleq: number; + nmid: number; + nopf: number; + npar: number; + nscr: number; + nsim: number; + nsub: number; + nsup: number; + ntgl: number; + ntlg: number; + oast: number; + ocir: number; + odiv: number; + odot: number; + ogon: number; + oint: number; + omid: number; + oopf: number; + opar: number; + ordf: number; + ordm: number; + oror: number; + oscr: number; + osol: number; + ouml: number; + para: number; + part: number; + perp: number; + phiv: number; + plus: number; + popf: number; + prap: number; + prec: number; + prnE: number; + prod: number; + prop: number; + pscr: number; + qint: number; + qopf: number; + qscr: number; + quot: number; + rArr: number; + rHar: number; + race: number; + rang: number; + rarr: number; + rcub: number; + rdca: number; + rdsh: number; + real: number; + rect: number; + rhov: number; + ring: number; + ropf: number; + rpar: number; + rscr: number; + rsqb: number; + rtri: number; + scap: number; + scnE: number; + sdot: number; + sect: number; + semi: number; + sext: number; + shcy: number; + sime: number; + simg: number; + siml: number; + smid: number; + smte: number; + solb: number; + sopf: number; + spar: number; + squf: number; + sscr: number; + star: number; + subE: number; + sube: number; + succ: number; + sung: number; + sup1: number; + sup2: number; + sup3: number; + supE: number; + supe: number; + tbrk: number; + tdot: number; + tint: number; + toea: number; + topf: number; + tosa: number; + trie: number; + tscr: number; + tscy: number; + uArr: number; + uHar: number; + uarr: number; + uopf: number; + upsi: number; + uscr: number; + utri: number; + uuml: number; + vArr: number; + vBar: number; + varr: number; + vert: number; + vopf: number; + vscr: number; + wopf: number; + wscr: number; + xcap: number; + xcup: number; + xmap: number; + xnis: number; + xopf: number; + xscr: number; + xvee: number; + yacy: number; + yicy: number; + yopf: number; + yscr: number; + yucy: number; + yuml: number; + zdot: number; + zeta: number; + zhcy: number; + zopf: number; + zscr: number; + zwnj: number; + AMP: number; + Acy: number; + Afr: number; + And: number; + Bcy: number; + Bfr: number; + Cap: number; + Cfr: number; + Chi: number; + Cup: number; + Dcy: number; + Del: number; + Dfr: number; + Dot: number; + ENG: number; + ETH: number; + Ecy: number; + Efr: number; + Eta: number; + Fcy: number; + Ffr: number; + Gcy: number; + Gfr: number; + Hat: number; + Hfr: number; + Icy: number; + Ifr: number; + Int: number; + Jcy: number; + Jfr: number; + Kcy: number; + Kfr: number; + Lcy: number; + Lfr: number; + Lsh: number; + Map: number; + Mcy: number; + Mfr: number; + Ncy: number; + Nfr: number; + Not: number; + Ocy: number; + Ofr: number; + Pcy: number; + Pfr: number; + Phi: number; + Psi: number; + Qfr: number; + REG: number; + Rcy: number; + Rfr: number; + Rho: number; + Rsh: number; + Scy: number; + Sfr: number; + Sub: number; + Sum: number; + Sup: number; + Tab: number; + Tau: number; + Tcy: number; + Tfr: number; + Ucy: number; + Ufr: number; + Vcy: number; + Vee: number; + Vfr: number; + Wfr: number; + Xfr: number; + Ycy: number; + Yfr: number; + Zcy: number; + Zfr: number; + acd: number; + acy: number; + afr: number; + amp: number; + and: number; + ang: number; + apE: number; + ape: number; + ast: number; + bcy: number; + bfr: number; + bot: number; + cap: number; + cfr: number; + chi: number; + cir: number; + cup: number; + dcy: number; + deg: number; + dfr: number; + die: number; + div: number; + dot: number; + ecy: number; + efr: number; + egs: number; + ell: number; + els: number; + eng: number; + eta: number; + eth: number; + fcy: number; + ffr: number; + gEl: number; + gap: number; + gcy: number; + gel: number; + geq: number; + ges: number; + gfr: number; + ggg: number; + glE: number; + gla: number; + glj: number; + gnE: number; + gne: number; + hfr: number; + icy: number; + iff: number; + ifr: number; + int: number; + jcy: number; + jfr: number; + kcy: number; + kfr: number; + lEg: number; + lap: number; + lat: number; + lcy: number; + leg: number; + leq: number; + les: number; + lfr: number; + lgE: number; + lnE: number; + lne: number; + loz: number; + lrm: number; + lsh: number; + map: number; + mcy: number; + mfr: number; + mho: number; + mid: number; + nap: number; + ncy: number; + nfr: number; + nge: number; + ngt: number; + nis: number; + niv: number; + nle: number; + nlt: number; + not: number; + npr: number; + nsc: number; + num: number; + ocy: number; + ofr: number; + ogt: number; + ohm: number; + olt: number; + ord: number; + orv: number; + par: number; + pcy: number; + pfr: number; + phi: number; + piv: number; + prE: number; + pre: number; + psi: number; + qfr: number; + rcy: number; + reg: number; + rfr: number; + rho: number; + rlm: number; + rsh: number; + scE: number; + sce: number; + scy: number; + sfr: number; + shy: number; + sim: number; + smt: number; + sol: number; + squ: number; + sub: number; + sum: number; + sup: number; + tau: number; + tcy: number; + tfr: number; + top: number; + ucy: number; + ufr: number; + uml: number; + vcy: number; + vee: number; + vfr: number; + wfr: number; + xfr: number; + ycy: number; + yen: number; + yfr: number; + zcy: number; + zfr: number; + zwj: number; + DD: number; + GT: number; + Gg: number; + Gt: number; + Im: number; + LT: number; + Ll: number; + Lt: number; + Mu: number; + Nu: number; + Or: number; + Pi: number; + Pr: number; + Re: number; + Sc: number; + Xi: number; + ac: number; + af: number; + ap: number; + dd: number; + ee: number; + eg: number; + el: number; + gE: number; + ge: number; + gg: number; + gl: number; + gt: number; + ic: number; + ii: number; + in: number; + it: number; + lE: number; + le: number; + lg: number; + ll: number; + lt: number; + mp: number; + mu: number; + ne: number; + ni: number; + nu: number; + oS: number; + or: number; + pi: number; + pm: number; + pr: number; + rx: number; + sc: number; + wp: number; + wr: number; + xi: number; +}; +export default _default; diff --git a/src/@types/compiler/parse/utils/html.d.ts b/src/@types/compiler/parse/utils/html.d.ts new file mode 100644 index 000000000..b0296c0d8 --- /dev/null +++ b/src/@types/compiler/parse/utils/html.d.ts @@ -0,0 +1,2 @@ +export declare function decode_character_references(html: string): string; +export declare function closing_tag_omitted(current: string, next?: string): boolean; diff --git a/src/@types/compiler/parse/utils/node.d.ts b/src/@types/compiler/parse/utils/node.d.ts new file mode 100644 index 000000000..9194910ae --- /dev/null +++ b/src/@types/compiler/parse/utils/node.d.ts @@ -0,0 +1,2 @@ +import { TemplateNode } from '../../interfaces'; +export declare function to_string(node: TemplateNode): string; diff --git a/src/@types/compiler/preprocess/decode_sourcemap.d.ts b/src/@types/compiler/preprocess/decode_sourcemap.d.ts new file mode 100644 index 000000000..ad121759b --- /dev/null +++ b/src/@types/compiler/preprocess/decode_sourcemap.d.ts @@ -0,0 +1,2 @@ +import { Processed } from './types'; +export declare function decode_map(processed: Processed): any; diff --git a/src/@types/compiler/preprocess/index.d.ts b/src/@types/compiler/preprocess/index.d.ts new file mode 100644 index 000000000..f56362a7f --- /dev/null +++ b/src/@types/compiler/preprocess/index.d.ts @@ -0,0 +1,4 @@ +import { PreprocessorGroup, Processed } from './types'; +export default function preprocess(source: string, preprocessor: PreprocessorGroup | PreprocessorGroup[], options?: { + filename?: string; +}): Promise; diff --git a/src/@types/compiler/preprocess/replace_in_code.d.ts b/src/@types/compiler/preprocess/replace_in_code.d.ts new file mode 100644 index 000000000..43f72c3b4 --- /dev/null +++ b/src/@types/compiler/preprocess/replace_in_code.d.ts @@ -0,0 +1,4 @@ +import { MappedCode } from '../utils/mapped_code'; +import { Source } from './types'; +export declare function slice_source(code_slice: string, offset: number, { file_basename, filename, get_location }: Source): Source; +export declare function replace_in_code(regex: RegExp, get_replacement: (...match: any[]) => Promise, location: Source): Promise; diff --git a/src/@types/compiler/preprocess/types.d.ts b/src/@types/compiler/preprocess/types.d.ts new file mode 100644 index 000000000..c4a043c41 --- /dev/null +++ b/src/@types/compiler/preprocess/types.d.ts @@ -0,0 +1,27 @@ +import { Location } from 'locate-character'; +export interface Source { + source: string; + get_location: (search: number) => Location; + file_basename: string; + filename: string; +} +export interface Processed { + code: string; + map?: string | object; + dependencies?: string[]; + toString?: () => string; +} +export declare type MarkupPreprocessor = (options: { + content: string; + filename: string; +}) => Processed | Promise; +export declare type Preprocessor = (options: { + content: string; + attributes: Record; + filename?: string; +}) => Processed | Promise; +export interface PreprocessorGroup { + markup?: MarkupPreprocessor; + style?: Preprocessor; + script?: Preprocessor; +} diff --git a/src/@types/compiler/utils/error.d.ts b/src/@types/compiler/utils/error.d.ts new file mode 100644 index 000000000..babd2bbdb --- /dev/null +++ b/src/@types/compiler/utils/error.d.ts @@ -0,0 +1,8 @@ +export default function error(message: string, props: { + name: string; + code: string; + source: string; + filename: string; + start: number; + end?: number; +}): never; diff --git a/src/@types/compiler/utils/full_char_code_at.d.ts b/src/@types/compiler/utils/full_char_code_at.d.ts new file mode 100644 index 000000000..f0d676397 --- /dev/null +++ b/src/@types/compiler/utils/full_char_code_at.d.ts @@ -0,0 +1 @@ +export default function full_char_code_at(str: string, i: number): number; diff --git a/src/@types/compiler/utils/fuzzymatch.d.ts b/src/@types/compiler/utils/fuzzymatch.d.ts new file mode 100644 index 000000000..6aa4e011d --- /dev/null +++ b/src/@types/compiler/utils/fuzzymatch.d.ts @@ -0,0 +1 @@ +export default function fuzzymatch(name: string, names: string[]): any; diff --git a/src/@types/compiler/utils/get_code_frame.d.ts b/src/@types/compiler/utils/get_code_frame.d.ts new file mode 100644 index 000000000..50943dc99 --- /dev/null +++ b/src/@types/compiler/utils/get_code_frame.d.ts @@ -0,0 +1 @@ +export default function get_code_frame(source: string, line: number, column: number): string; diff --git a/src/@types/compiler/utils/link.d.ts b/src/@types/compiler/utils/link.d.ts new file mode 100644 index 000000000..e73ccbce1 --- /dev/null +++ b/src/@types/compiler/utils/link.d.ts @@ -0,0 +1,4 @@ +export declare function link(next: T, prev: T): void; diff --git a/src/@types/compiler/utils/list.d.ts b/src/@types/compiler/utils/list.d.ts new file mode 100644 index 000000000..b61de6978 --- /dev/null +++ b/src/@types/compiler/utils/list.d.ts @@ -0,0 +1 @@ +export default function list(items: string[], conjunction?: string): string; diff --git a/src/@types/compiler/utils/mapped_code.d.ts b/src/@types/compiler/utils/mapped_code.d.ts new file mode 100644 index 000000000..b6aa28971 --- /dev/null +++ b/src/@types/compiler/utils/mapped_code.d.ts @@ -0,0 +1,23 @@ +import { DecodedSourceMap, RawSourceMap } from '@ampproject/remapping/dist/types/types'; +import { SourceMap } from 'magic-string'; +import { Source, Processed } from '../preprocess/types'; +export declare type SourceLocation = { + line: number; + column: number; +}; +export declare function sourcemap_add_offset(map: DecodedSourceMap, offset: SourceLocation, source_index: number): void; +export declare class MappedCode { + string: string; + map: DecodedSourceMap; + constructor(string?: string, map?: DecodedSourceMap); + /** + * concat in-place (mutable), return this (chainable) + * will also mutate the `other` object + */ + concat(other: MappedCode): MappedCode; + static from_processed(string: string, map?: DecodedSourceMap): MappedCode; + static from_source({ source, file_basename, get_location }: Source): MappedCode; +} +export declare function combine_sourcemaps(filename: string, sourcemap_list: Array): RawSourceMap; +export declare function apply_preprocessor_sourcemap(filename: string, svelte_map: SourceMap, preprocessor_map_input: string | DecodedSourceMap | RawSourceMap): SourceMap; +export declare function parse_attached_sourcemap(processed: Processed, tag_name: 'script' | 'style'): void; diff --git a/src/@types/compiler/utils/names.d.ts b/src/@types/compiler/utils/names.d.ts new file mode 100644 index 000000000..8f23a9b51 --- /dev/null +++ b/src/@types/compiler/utils/names.d.ts @@ -0,0 +1,5 @@ +export declare const globals: Set; +export declare const reserved: Set; +export declare function is_void(name: string): boolean; +export declare function is_valid(str: string): boolean; +export declare function sanitize(name: string): string; diff --git a/src/@types/compiler/utils/namespaces.d.ts b/src/@types/compiler/utils/namespaces.d.ts new file mode 100644 index 000000000..373776ef3 --- /dev/null +++ b/src/@types/compiler/utils/namespaces.d.ts @@ -0,0 +1,9 @@ +export declare const foreign = "https://svelte.dev/docs#svelte_options"; +export declare const html = "http://www.w3.org/1999/xhtml"; +export declare const mathml = "http://www.w3.org/1998/Math/MathML"; +export declare const svg = "http://www.w3.org/2000/svg"; +export declare const xlink = "http://www.w3.org/1999/xlink"; +export declare const xml = "http://www.w3.org/XML/1998/namespace"; +export declare const xmlns = "http://www.w3.org/2000/xmlns"; +export declare const valid_namespaces: string[]; +export declare const namespaces: Record; diff --git a/src/@types/compiler/utils/nodes_match.d.ts b/src/@types/compiler/utils/nodes_match.d.ts new file mode 100644 index 000000000..065e81bcc --- /dev/null +++ b/src/@types/compiler/utils/nodes_match.d.ts @@ -0,0 +1 @@ +export declare function nodes_match(a: any, b: any): any; diff --git a/src/@types/compiler/utils/patterns.d.ts b/src/@types/compiler/utils/patterns.d.ts new file mode 100644 index 000000000..be6dcdec8 --- /dev/null +++ b/src/@types/compiler/utils/patterns.d.ts @@ -0,0 +1,2 @@ +export declare const whitespace: RegExp; +export declare const dimensions: RegExp; diff --git a/src/@types/compiler/utils/trim.d.ts b/src/@types/compiler/utils/trim.d.ts new file mode 100644 index 000000000..7f8e2824a --- /dev/null +++ b/src/@types/compiler/utils/trim.d.ts @@ -0,0 +1,2 @@ +export declare function trim_start(str: string): string; +export declare function trim_end(str: string): string; diff --git a/src/@types/magicthing.ts b/src/@types/magicthing.ts new file mode 100644 index 000000000..00644a3c6 --- /dev/null +++ b/src/@types/magicthing.ts @@ -0,0 +1,12 @@ + +export interface MagicConfigRaw { + dist: string; + projectRoot: string; + hmxRoot: string; +} + +export interface MagicConfig { + dist: string; + projectRoot: URL; + hmxRoot: URL; +} \ No newline at end of file diff --git a/src/compiler.d.ts b/src/compiler.d.ts new file mode 100644 index 000000000..0b37f1f8c --- /dev/null +++ b/src/compiler.d.ts @@ -0,0 +1 @@ +export { compile, parse, preprocess, walk, VERSION } from './@types/compiler/index'; \ No newline at end of file diff --git a/src/compiler.js b/src/compiler.js new file mode 100644 index 000000000..4f9567b9f --- /dev/null +++ b/src/compiler.js @@ -0,0 +1,22520 @@ + +import acorn, { isIdentifierStart, isIdentifierChar, parse as parse$3, parseExpressionAt } from 'acorn'; +import parse$2 from 'css-tree/lib/parser/index.js'; +import MagicString from 'magic-string'; + +const now = (typeof process !== 'undefined' && process.hrtime) + ? () => { + const t = process.hrtime(); + return t[0] * 1e3 + t[1] / 1e6; + } + : () => self.performance.now(); + + + + + + + + +function collapse_timings(timings) { + const result = {}; + timings.forEach(timing => { + result[timing.label] = Object.assign({ + total: timing.end - timing.start + }, timing.children && collapse_timings(timing.children)); + }); + return result; +} + +class Stats { + + + + + + + constructor() { + this.start_time = now(); + this.stack = []; + this.current_children = this.timings = []; + } + + start(label) { + const timing = { + label, + start: now(), + end: null, + children: [] + }; + + this.current_children.push(timing); + this.stack.push(timing); + + this.current_timing = timing; + this.current_children = timing.children; + } + + stop(label) { + if (label !== this.current_timing.label) { + throw new Error(`Mismatched timing labels (expected ${this.current_timing.label}, got ${label})`); + } + + this.current_timing.end = now(); + this.stack.pop(); + this.current_timing = this.stack[this.stack.length - 1]; + this.current_children = this.current_timing ? this.current_timing.children : this.timings; + } + + render() { + const timings = Object.assign({ + total: now() - this.start_time + }, collapse_timings(this.timings)); + + return { + timings + }; + } +} + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var xhtml = { + quot: '\u0022', + amp: '&', + apos: '\u0027', + lt: '<', + gt: '>', + nbsp: '\u00A0', + iexcl: '\u00A1', + cent: '\u00A2', + pound: '\u00A3', + curren: '\u00A4', + yen: '\u00A5', + brvbar: '\u00A6', + sect: '\u00A7', + uml: '\u00A8', + copy: '\u00A9', + ordf: '\u00AA', + laquo: '\u00AB', + not: '\u00AC', + shy: '\u00AD', + reg: '\u00AE', + macr: '\u00AF', + deg: '\u00B0', + plusmn: '\u00B1', + sup2: '\u00B2', + sup3: '\u00B3', + acute: '\u00B4', + micro: '\u00B5', + para: '\u00B6', + middot: '\u00B7', + cedil: '\u00B8', + sup1: '\u00B9', + ordm: '\u00BA', + raquo: '\u00BB', + frac14: '\u00BC', + frac12: '\u00BD', + frac34: '\u00BE', + iquest: '\u00BF', + Agrave: '\u00C0', + Aacute: '\u00C1', + Acirc: '\u00C2', + Atilde: '\u00C3', + Auml: '\u00C4', + Aring: '\u00C5', + AElig: '\u00C6', + Ccedil: '\u00C7', + Egrave: '\u00C8', + Eacute: '\u00C9', + Ecirc: '\u00CA', + Euml: '\u00CB', + Igrave: '\u00CC', + Iacute: '\u00CD', + Icirc: '\u00CE', + Iuml: '\u00CF', + ETH: '\u00D0', + Ntilde: '\u00D1', + Ograve: '\u00D2', + Oacute: '\u00D3', + Ocirc: '\u00D4', + Otilde: '\u00D5', + Ouml: '\u00D6', + times: '\u00D7', + Oslash: '\u00D8', + Ugrave: '\u00D9', + Uacute: '\u00DA', + Ucirc: '\u00DB', + Uuml: '\u00DC', + Yacute: '\u00DD', + THORN: '\u00DE', + szlig: '\u00DF', + agrave: '\u00E0', + aacute: '\u00E1', + acirc: '\u00E2', + atilde: '\u00E3', + auml: '\u00E4', + aring: '\u00E5', + aelig: '\u00E6', + ccedil: '\u00E7', + egrave: '\u00E8', + eacute: '\u00E9', + ecirc: '\u00EA', + euml: '\u00EB', + igrave: '\u00EC', + iacute: '\u00ED', + icirc: '\u00EE', + iuml: '\u00EF', + eth: '\u00F0', + ntilde: '\u00F1', + ograve: '\u00F2', + oacute: '\u00F3', + ocirc: '\u00F4', + otilde: '\u00F5', + ouml: '\u00F6', + divide: '\u00F7', + oslash: '\u00F8', + ugrave: '\u00F9', + uacute: '\u00FA', + ucirc: '\u00FB', + uuml: '\u00FC', + yacute: '\u00FD', + thorn: '\u00FE', + yuml: '\u00FF', + OElig: '\u0152', + oelig: '\u0153', + Scaron: '\u0160', + scaron: '\u0161', + Yuml: '\u0178', + fnof: '\u0192', + circ: '\u02C6', + tilde: '\u02DC', + Alpha: '\u0391', + Beta: '\u0392', + Gamma: '\u0393', + Delta: '\u0394', + Epsilon: '\u0395', + Zeta: '\u0396', + Eta: '\u0397', + Theta: '\u0398', + Iota: '\u0399', + Kappa: '\u039A', + Lambda: '\u039B', + Mu: '\u039C', + Nu: '\u039D', + Xi: '\u039E', + Omicron: '\u039F', + Pi: '\u03A0', + Rho: '\u03A1', + Sigma: '\u03A3', + Tau: '\u03A4', + Upsilon: '\u03A5', + Phi: '\u03A6', + Chi: '\u03A7', + Psi: '\u03A8', + Omega: '\u03A9', + alpha: '\u03B1', + beta: '\u03B2', + gamma: '\u03B3', + delta: '\u03B4', + epsilon: '\u03B5', + zeta: '\u03B6', + eta: '\u03B7', + theta: '\u03B8', + iota: '\u03B9', + kappa: '\u03BA', + lambda: '\u03BB', + mu: '\u03BC', + nu: '\u03BD', + xi: '\u03BE', + omicron: '\u03BF', + pi: '\u03C0', + rho: '\u03C1', + sigmaf: '\u03C2', + sigma: '\u03C3', + tau: '\u03C4', + upsilon: '\u03C5', + phi: '\u03C6', + chi: '\u03C7', + psi: '\u03C8', + omega: '\u03C9', + thetasym: '\u03D1', + upsih: '\u03D2', + piv: '\u03D6', + ensp: '\u2002', + emsp: '\u2003', + thinsp: '\u2009', + zwnj: '\u200C', + zwj: '\u200D', + lrm: '\u200E', + rlm: '\u200F', + ndash: '\u2013', + mdash: '\u2014', + lsquo: '\u2018', + rsquo: '\u2019', + sbquo: '\u201A', + ldquo: '\u201C', + rdquo: '\u201D', + bdquo: '\u201E', + dagger: '\u2020', + Dagger: '\u2021', + bull: '\u2022', + hellip: '\u2026', + permil: '\u2030', + prime: '\u2032', + Prime: '\u2033', + lsaquo: '\u2039', + rsaquo: '\u203A', + oline: '\u203E', + frasl: '\u2044', + euro: '\u20AC', + image: '\u2111', + weierp: '\u2118', + real: '\u211C', + trade: '\u2122', + alefsym: '\u2135', + larr: '\u2190', + uarr: '\u2191', + rarr: '\u2192', + darr: '\u2193', + harr: '\u2194', + crarr: '\u21B5', + lArr: '\u21D0', + uArr: '\u21D1', + rArr: '\u21D2', + dArr: '\u21D3', + hArr: '\u21D4', + forall: '\u2200', + part: '\u2202', + exist: '\u2203', + empty: '\u2205', + nabla: '\u2207', + isin: '\u2208', + notin: '\u2209', + ni: '\u220B', + prod: '\u220F', + sum: '\u2211', + minus: '\u2212', + lowast: '\u2217', + radic: '\u221A', + prop: '\u221D', + infin: '\u221E', + ang: '\u2220', + and: '\u2227', + or: '\u2228', + cap: '\u2229', + cup: '\u222A', + 'int': '\u222B', + there4: '\u2234', + sim: '\u223C', + cong: '\u2245', + asymp: '\u2248', + ne: '\u2260', + equiv: '\u2261', + le: '\u2264', + ge: '\u2265', + sub: '\u2282', + sup: '\u2283', + nsub: '\u2284', + sube: '\u2286', + supe: '\u2287', + oplus: '\u2295', + otimes: '\u2297', + perp: '\u22A5', + sdot: '\u22C5', + lceil: '\u2308', + rceil: '\u2309', + lfloor: '\u230A', + rfloor: '\u230B', + lang: '\u2329', + rang: '\u232A', + loz: '\u25CA', + spades: '\u2660', + clubs: '\u2663', + hearts: '\u2665', + diams: '\u2666' +}; + +var acornJsx = createCommonjsModule(function (module) { + + + +const hexNumber = /^[\da-fA-F]+$/; +const decimalNumber = /^\d+$/; + +// The map to `acorn-jsx` tokens from `acorn` namespace objects. +const acornJsxMap = new WeakMap(); + +// Get the original tokens for the given `acorn` namespace object. +function getJsxTokens(acorn) { + acorn = acorn.Parser.acorn || acorn; + let acornJsx = acornJsxMap.get(acorn); + if (!acornJsx) { + const tt = acorn.tokTypes; + const TokContext = acorn.TokContext; + const TokenType = acorn.TokenType; + const tc_oTag = new TokContext('...', true, true); + const tokContexts = { + tc_oTag: tc_oTag, + tc_cTag: tc_cTag, + tc_expr: tc_expr + }; + const tokTypes = { + jsxName: new TokenType('jsxName'), + jsxText: new TokenType('jsxText', {beforeExpr: true}), + jsxTagStart: new TokenType('jsxTagStart', {startsExpr: true}), + jsxTagEnd: new TokenType('jsxTagEnd') + }; + + tokTypes.jsxTagStart.updateContext = function() { + this.context.push(tc_expr); // treat as beginning of JSX expression + this.context.push(tc_oTag); // start opening tag context + this.exprAllowed = false; + }; + tokTypes.jsxTagEnd.updateContext = function(prevType) { + let out = this.context.pop(); + if (out === tc_oTag && prevType === tt.slash || out === tc_cTag) { + this.context.pop(); + this.exprAllowed = this.curContext() === tc_expr; + } else { + this.exprAllowed = true; + } + }; + + acornJsx = { tokContexts: tokContexts, tokTypes: tokTypes }; + acornJsxMap.set(acorn, acornJsx); + } + + return acornJsx; +} + +// Transforms JSX element name to string. + +function getQualifiedJSXName(object) { + if (!object) + return object; + + if (object.type === 'JSXIdentifier') + return object.name; + + if (object.type === 'JSXNamespacedName') + return object.namespace.name + ':' + object.name.name; + + if (object.type === 'JSXMemberExpression') + return getQualifiedJSXName(object.object) + '.' + + getQualifiedJSXName(object.property); +} + +module.exports = function(options) { + options = options || {}; + return function(Parser) { + return plugin({ + allowNamespaces: options.allowNamespaces !== false, + allowNamespacedObjects: !!options.allowNamespacedObjects + }, Parser); + }; +}; + +// This is `tokTypes` of the peer dep. +// This can be different instances from the actual `tokTypes` this plugin uses. +Object.defineProperty(module.exports, "tokTypes", { + get: function get_tokTypes() { + return getJsxTokens(acorn).tokTypes; + }, + configurable: true, + enumerable: true +}); + +function plugin(options, Parser) { + const acorn$1 = Parser.acorn || acorn; + const acornJsx = getJsxTokens(acorn$1); + const tt = acorn$1.tokTypes; + const tok = acornJsx.tokTypes; + const tokContexts = acorn$1.tokContexts; + const tc_oTag = acornJsx.tokContexts.tc_oTag; + const tc_cTag = acornJsx.tokContexts.tc_cTag; + const tc_expr = acornJsx.tokContexts.tc_expr; + const isNewLine = acorn$1.isNewLine; + const isIdentifierStart = acorn$1.isIdentifierStart; + const isIdentifierChar = acorn$1.isIdentifierChar; + + return class extends Parser { + // Expose actual `tokTypes` and `tokContexts` to other plugins. + static get acornJsx() { + return acornJsx; + } + + // Reads inline JSX contents token. + jsx_readToken() { + let out = '', chunkStart = this.pos; + for (;;) { + if (this.pos >= this.input.length) + this.raise(this.start, 'Unterminated JSX contents'); + let ch = this.input.charCodeAt(this.pos); + + switch (ch) { + case 60: // '<' + case 123: // '{' + if (this.pos === this.start) { + if (ch === 60 && this.exprAllowed) { + ++this.pos; + return this.finishToken(tok.jsxTagStart); + } + return this.getTokenFromCode(ch); + } + out += this.input.slice(chunkStart, this.pos); + return this.finishToken(tok.jsxText, out); + + case 38: // '&' + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readEntity(); + chunkStart = this.pos; + break; + + case 62: // '>' + case 125: // '}' + this.raise( + this.pos, + "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + + (ch === 62 ? ">" : "}") + "` or " + "`{\"" + this.input[this.pos] + "\"}" + "`?" + ); + + default: + if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readNewLine(true); + chunkStart = this.pos; + } else { + ++this.pos; + } + } + } + } + + jsx_readNewLine(normalizeCRLF) { + let ch = this.input.charCodeAt(this.pos); + let out; + ++this.pos; + if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { + ++this.pos; + out = normalizeCRLF ? '\n' : '\r\n'; + } else { + out = String.fromCharCode(ch); + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + + return out; + } + + jsx_readString(quote) { + let out = '', chunkStart = ++this.pos; + for (;;) { + if (this.pos >= this.input.length) + this.raise(this.start, 'Unterminated string constant'); + let ch = this.input.charCodeAt(this.pos); + if (ch === quote) break; + if (ch === 38) { // '&' + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readEntity(); + chunkStart = this.pos; + } else if (isNewLine(ch)) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readNewLine(false); + chunkStart = this.pos; + } else { + ++this.pos; + } + } + out += this.input.slice(chunkStart, this.pos++); + return this.finishToken(tt.string, out); + } + + jsx_readEntity() { + let str = '', count = 0, entity; + let ch = this.input[this.pos]; + if (ch !== '&') + this.raise(this.pos, 'Entity must start with an ampersand'); + let startPos = ++this.pos; + while (this.pos < this.input.length && count++ < 10) { + ch = this.input[this.pos++]; + if (ch === ';') { + if (str[0] === '#') { + if (str[1] === 'x') { + str = str.substr(2); + if (hexNumber.test(str)) + entity = String.fromCharCode(parseInt(str, 16)); + } else { + str = str.substr(1); + if (decimalNumber.test(str)) + entity = String.fromCharCode(parseInt(str, 10)); + } + } else { + entity = xhtml[str]; + } + break; + } + str += ch; + } + if (!entity) { + this.pos = startPos; + return '&'; + } + return entity; + } + + // Read a JSX identifier (valid tag or attribute name). + // + // Optimized version since JSX identifiers can't contain + // escape characters and so can be read as single slice. + // Also assumes that first character was already checked + // by isIdentifierStart in readToken. + + jsx_readWord() { + let ch, start = this.pos; + do { + ch = this.input.charCodeAt(++this.pos); + } while (isIdentifierChar(ch) || ch === 45); // '-' + return this.finishToken(tok.jsxName, this.input.slice(start, this.pos)); + } + + // Parse next token as JSX identifier + + jsx_parseIdentifier() { + let node = this.startNode(); + if (this.type === tok.jsxName) + node.name = this.value; + else if (this.type.keyword) + node.name = this.type.keyword; + else + this.unexpected(); + this.next(); + return this.finishNode(node, 'JSXIdentifier'); + } + + // Parse namespaced identifier. + + jsx_parseNamespacedName() { + let startPos = this.start, startLoc = this.startLoc; + let name = this.jsx_parseIdentifier(); + if (!options.allowNamespaces || !this.eat(tt.colon)) return name; + var node = this.startNodeAt(startPos, startLoc); + node.namespace = name; + node.name = this.jsx_parseIdentifier(); + return this.finishNode(node, 'JSXNamespacedName'); + } + + // Parses element name in any form - namespaced, member + // or single identifier. + + jsx_parseElementName() { + if (this.type === tok.jsxTagEnd) return ''; + let startPos = this.start, startLoc = this.startLoc; + let node = this.jsx_parseNamespacedName(); + if (this.type === tt.dot && node.type === 'JSXNamespacedName' && !options.allowNamespacedObjects) { + this.unexpected(); + } + while (this.eat(tt.dot)) { + let newNode = this.startNodeAt(startPos, startLoc); + newNode.object = node; + newNode.property = this.jsx_parseIdentifier(); + node = this.finishNode(newNode, 'JSXMemberExpression'); + } + return node; + } + + // Parses any type of JSX attribute value. + + jsx_parseAttributeValue() { + switch (this.type) { + case tt.braceL: + let node = this.jsx_parseExpressionContainer(); + if (node.expression.type === 'JSXEmptyExpression') + this.raise(node.start, 'JSX attributes must only be assigned a non-empty expression'); + return node; + + case tok.jsxTagStart: + case tt.string: + return this.parseExprAtom(); + + default: + this.raise(this.start, 'JSX value should be either an expression or a quoted JSX text'); + } + } + + // JSXEmptyExpression is unique type since it doesn't actually parse anything, + // and so it should start at the end of last read token (left brace) and finish + // at the beginning of the next one (right brace). + + jsx_parseEmptyExpression() { + let node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc); + return this.finishNodeAt(node, 'JSXEmptyExpression', this.start, this.startLoc); + } + + // Parses JSX expression enclosed into curly brackets. + + jsx_parseExpressionContainer() { + let node = this.startNode(); + this.next(); + node.expression = this.type === tt.braceR + ? this.jsx_parseEmptyExpression() + : this.parseExpression(); + this.expect(tt.braceR); + return this.finishNode(node, 'JSXExpressionContainer'); + } + + // Parses following JSX attribute name-value pair. + + jsx_parseAttribute() { + let node = this.startNode(); + if (this.eat(tt.braceL)) { + this.expect(tt.ellipsis); + node.argument = this.parseMaybeAssign(); + this.expect(tt.braceR); + return this.finishNode(node, 'JSXSpreadAttribute'); + } + node.name = this.jsx_parseNamespacedName(); + node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null; + return this.finishNode(node, 'JSXAttribute'); + } + + // Parses JSX opening tag starting after '<'. + + jsx_parseOpeningElementAt(startPos, startLoc) { + let node = this.startNodeAt(startPos, startLoc); + node.attributes = []; + let nodeName = this.jsx_parseElementName(); + if (nodeName) node.name = nodeName; + while (this.type !== tt.slash && this.type !== tok.jsxTagEnd) + node.attributes.push(this.jsx_parseAttribute()); + node.selfClosing = this.eat(tt.slash); + this.expect(tok.jsxTagEnd); + return this.finishNode(node, nodeName ? 'JSXOpeningElement' : 'JSXOpeningFragment'); + } + + // Parses JSX closing tag starting after ''); + } + } + let fragmentOrElement = openingElement.name ? 'Element' : 'Fragment'; + + node['opening' + fragmentOrElement] = openingElement; + node['closing' + fragmentOrElement] = closingElement; + node.children = children; + if (this.type === tt.relational && this.value === "<") { + this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"); + } + return this.finishNode(node, 'JSX' + fragmentOrElement); + } + + // Parse JSX text + + jsx_parseText() { + let node = this.parseLiteral(this.value); + node.type = "JSXText"; + return node; + } + + // Parses entire JSX element from current position. + + jsx_parseElement() { + let startPos = this.start, startLoc = this.startLoc; + this.next(); + return this.jsx_parseElementAt(startPos, startLoc); + } + + parseExprAtom(refShortHandDefaultPos) { + if (this.type === tok.jsxText) + return this.jsx_parseText(); + else if (this.type === tok.jsxTagStart) + return this.jsx_parseElement(); + else + return super.parseExprAtom(refShortHandDefaultPos); + } + + readToken(code) { + let context = this.curContext(); + + if (context === tc_expr) return this.jsx_readToken(); + + if (context === tc_oTag || context === tc_cTag) { + if (isIdentifierStart(code)) return this.jsx_readWord(); + + if (code == 62) { + ++this.pos; + return this.finishToken(tok.jsxTagEnd); + } + + if ((code === 34 || code === 39) && context == tc_oTag) + return this.jsx_readString(code); + } + + if (code === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) { + ++this.pos; + return this.finishToken(tok.jsxTagStart); + } + return super.readToken(code); + } + + updateContext(prevType) { + if (this.type == tt.braceL) { + var curContext = this.curContext(); + if (curContext == tc_oTag) this.context.push(tokContexts.b_expr); + else if (curContext == tc_expr) this.context.push(tokContexts.b_tmpl); + else super.updateContext(prevType); + this.exprAllowed = true; + } else if (this.type === tt.slash && prevType === tok.jsxTagStart) { + this.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore + this.context.push(tc_cTag); // reconsider as closing tag context + this.exprAllowed = false; + } else { + return super.updateContext(prevType); + } + } + }; +} +}); + +const acornJsx$1 = acorn.Parser.extend(acornJsx()); + +const parse = (source) => acorn.parse(source, { + sourceType: 'module', + ecmaVersion: 2020, + locations: true +}); + +const parse_expression_at = (source, index) => acornJsx$1.parseExpressionAt(source, index, { + sourceType: 'module', + ecmaVersion: 2020, + locations: true +}); + +const whitespace = /[ \t\r\n]/; + +const dimensions = /^(?:offset|client)(?:Width|Height)$/; + +// import { Node } from 'estree'; + +function read_expression(parser) { + try { + const node = parse_expression_at(parser.template, parser.index); + + let num_parens = 0; + + for (let i = parser.index; i < node.start; i += 1) { + if (parser.template[i] === '(') num_parens += 1; + } + + let index = node.end; + while (num_parens > 0) { + const char = parser.template[index]; + + if (char === ')') { + num_parens -= 1; + } else if (!whitespace.test(char)) { + parser.error({ + code: 'unexpected-token', + message: 'Expected )' + }, index); + } + + index += 1; + } + + parser.index = index; + + return parser.template.substring(node.start, node.end); + // return node as Node; + } catch (err) { + parser.acorn_error(err); + } +} + +const script_closing_tag = ''; + +function get_context(parser, attributes, start) { + const context = attributes.find(attribute => attribute.name === 'context'); + if (!context) return 'default'; + + if (context.value.length !== 1 || context.value[0].type !== 'Text') { + parser.error({ + code: 'invalid-script', + message: 'context attribute must be static' + }, start); + } + + const value = context.value[0].data; + + if (value !== 'module') { + parser.error({ + code: 'invalid-script', + message: 'If the context attribute is supplied, its value must be "module"' + }, context.start); + } + + return value; +} + +function read_script(parser, start, attributes) { + const script_start = parser.index; + const script_end = parser.template.indexOf(script_closing_tag, script_start); + + if (script_end === -1) { + parser.error({ + code: 'unclosed-script', + message: '`; + }; +} diff --git a/src/frontend/render/svelte.ts b/src/frontend/render/svelte.ts new file mode 100644 index 000000000..ffdf70254 --- /dev/null +++ b/src/frontend/render/svelte.ts @@ -0,0 +1,24 @@ +import { SvelteComponent as Component } from 'svelte'; + +export function __svelte_static(SvelteComponent: Component) { + return (attrs: Record, ...children: any): string => { + // TODO include head and css stuff too... + const { html } = SvelteComponent.render(attrs); + + return html; + }; +} + +export function __svelte_dynamic(SvelteComponent: Component, importUrl: string) { + const placeholderId = `placeholder_${String(Math.random())}`; + return (attrs: Record, ...children: any) => { + return `
`; + }; +} diff --git a/src/frontend/render/vue.ts b/src/frontend/render/vue.ts new file mode 100644 index 000000000..f83c1665a --- /dev/null +++ b/src/frontend/render/vue.ts @@ -0,0 +1,39 @@ +import type { Component } from 'vue'; + +import { renderToString } from '@vue/server-renderer'; +import { createSSRApp, h as createElement } from 'vue'; + +export function __vue_static(VueComponent: Component) { + return async (attrs: Record, ...children: any): Promise => { + const app = createSSRApp({ + components: { + VueComponent + }, + render() { + return createElement(VueComponent as any, attrs); + } + }); + + const html = await renderToString(app); + + return html; + }; +} + +export function __vue_dynamic(VueComponent: Component, importUrl: string, vueUrl: string) { + const placeholderId = `placeholder_${String(Math.random())}`; + return (attrs: Record, ...children: any) => { + return `
`; + }; +} \ No newline at end of file diff --git a/src/generate.ts b/src/generate.ts new file mode 100644 index 000000000..de7f76b25 --- /dev/null +++ b/src/generate.ts @@ -0,0 +1,59 @@ +import type { MagicConfig } from './@types/magicthing'; +import { loadConfiguration, startServer as startSnowpackServer } from 'snowpack'; +import { promises as fsPromises } from 'fs'; +import { relative as pathRelative } from 'path'; + +const { mkdir, readdir, stat, writeFile } = fsPromises; + +async function* allPages(root: URL): AsyncGenerator { + for(const filename of await readdir(root)) { + const fullpath = new URL(filename, root); + const info = await stat(fullpath); + + if(info.isDirectory()) { + yield * allPages(new URL(fullpath + '/')); + } else { + yield fullpath; + } + } +} + +export default async function(magicConfig: MagicConfig) { + const { projectRoot, hmxRoot } = magicConfig; + const pageRoot = new URL('./pages/', hmxRoot); + const dist = new URL(magicConfig.dist + '/', projectRoot); + + const configPath = new URL('./snowpack.config.js', projectRoot).pathname; + const config = await loadConfiguration({ + root: projectRoot.pathname, + devOptions: + {open: 'none', output: 'stream' + } + }, configPath); + const snowpack = await startSnowpackServer({ + config, + lockfile: null // TODO should this be required? + }); + + const runtime = snowpack.getServerRuntime(); + + for await(const filepath of allPages(pageRoot)) { + const rel = pathRelative(hmxRoot.pathname, filepath.pathname); // pages/index.hmx + const pagePath = `/_hmx/${rel.replace(/\.(hmx|md)/, '.js')}`; + + try { + const outPath = new URL('./' + rel.replace(/\.(hmx|md)/, '.html'), dist); + const outFolder = new URL('./', outPath); + const mod = await runtime.importModule(pagePath); + const html = await mod.exports.default({}); + + await mkdir(outFolder, { recursive: true }); + await writeFile(outPath, html, 'utf-8'); + } catch(err) { + console.error('Unable to generate page', rel); + } + } + + await snowpack.shutdown(); + process.exit(0); +} \ No newline at end of file diff --git a/src/markdown-encode.ts b/src/markdown-encode.ts new file mode 100644 index 000000000..0719aaa32 --- /dev/null +++ b/src/markdown-encode.ts @@ -0,0 +1,34 @@ +import type { HtmlExtension, Token } from 'micromark/dist/shared-types'; + +const characterReferences = { + '"': 'quot', + '&': 'amp', + '<': 'lt', + '>': 'gt', + '{': 'lbrace', + '}': 'rbrace' +}; + +type EncodedChars = '"' | '&' | '<' | '>' | '{' | '}'; + +function encode(value: string): string { + return value.replace(/["&<>{}]/g, (raw: string) => { + return '&' + characterReferences[raw as EncodedChars] + ';' + }); +} + +const plugin: HtmlExtension = { + exit: { + codeFlowValue() { + const token: Token = arguments[0]; + const serialize = this.sliceSerialize as unknown as (t: Token) => string; + const raw = this.raw as unknown as (s: string) => void; + const value = serialize(token); + raw(encode(value)); + } + } +}; + +export { + plugin as default +}; \ No newline at end of file diff --git a/src/transform2.ts b/src/transform2.ts new file mode 100644 index 000000000..51399a48a --- /dev/null +++ b/src/transform2.ts @@ -0,0 +1,444 @@ +import type { TemplateNode } from "./@types/compiler/interfaces"; + +import path from "path"; +import astring from "astring"; +import esbuild from "esbuild"; +import eslexer from "es-module-lexer"; +import micromark from "micromark"; +import gfmSyntax from "micromark-extension-gfm"; +import matter from "gray-matter"; +// @ts-ignore +import gfmHtml from "micromark-extension-gfm/html.js"; +import { walk, parse } from "./compiler.js"; +import markdownEncode from './markdown-encode.js'; + +const { transformSync } = esbuild; + +interface Attribute { + start: 574; + end: 595; + type: "Attribute"; + name: "class"; + value: any; +} + +interface CompileOptions { + resolve: (p: string) => string +} + +const defaultCompileOptions: CompileOptions = { + resolve(p: string) { return p; } +} + +function internalImport(internalPath: string) { + return `/__hmx_internal__/${internalPath}`; +} + +function getAttributes(attrs: Attribute[]): Record { + let result: Record = {}; + for (const attr of attrs) { + if (attr.value === true) { + result[attr.name] = JSON.stringify(attr.value); + continue; + } + if (attr.value === false) { + continue; + } + if (attr.value.length > 1) { + result[attr.name] = + "(" + + attr.value + .map((v: TemplateNode) => { + if (v.expression) { + return v.expression; + } else { + return JSON.stringify(getTextFromAttribute(v)); + } + }) + .join("+") + + ")"; + continue; + } + const val: TemplateNode = attr.value[0]; + switch (val.type) { + case "MustacheTag": + result[attr.name] = "(" + val.expression + ")"; + continue; + case "Text": + result[attr.name] = JSON.stringify(getTextFromAttribute(val)); + continue; + default: + console.log(val); + throw new Error("UNKNOWN V"); + } + } + return result; +} + +function getTextFromAttribute(attr: any): string { + if (attr.raw !== undefined) { + return attr.raw; + } + if (attr.data !== undefined) { + return attr.data; + } + console.log(attr); + throw new Error("UNKNOWN attr"); +} + +function generateAttributes(attrs: Record): string { + let result: string = "{"; + for (const [key, val] of Object.entries(attrs)) { + result += JSON.stringify(key) + ":" + val + ","; + } + return result + "}"; +} + +function getComponentWrapper( + _name: string, + { type, url }: { type: string; url: string }, + { resolve }: CompileOptions +) { + const [name, kind] = _name.split(":"); + switch(type) { + case '.hmx': { + if (kind) { + throw new Error(`HMX does not support :${kind}`); + } + return { + wrapper: name, + wrapperImport: ``, + }; + } + case '.jsx': { + if (kind === "dynamic") { + return { + wrapper: `__preact_dynamic(${name}, new URL(${JSON.stringify( + url.replace(/\.[^.]+$/, ".js") + )}, \`http://TEST\${import.meta.url}\`).pathname, '${resolve('preact')}')`, + wrapperImport: `import {__preact_dynamic} from '${internalImport('render/preact.js')}';`, + }; + } else { + return { + wrapper: `__preact_static(${name})`, + wrapperImport: `import {__preact_static} from '${internalImport('render/preact.js')}';`, + }; + } + } + case '.svelte': { + if(kind === "dynamic") { + return { + wrapper: `__svelte_dynamic(${name}, new URL(${JSON.stringify( + url.replace(/\.[^.]+$/, ".svelte.js") + )}, \`http://TEST\${import.meta.url}\`).pathname)`, + wrapperImport: `import {__svelte_dynamic} from '${internalImport('render/svelte.js')}';`, + }; + } else { + return { + wrapper: `__svelte_static(${name})`, + wrapperImport: `import {__svelte_static} from '${internalImport('render/svelte.js')}';` + }; + } + } + case '.vue': { + if(kind === "dynamic") { + return { + wrapper: `__vue_dynamic(${name}, new URL(${JSON.stringify( + url.replace(/\.[^.]+$/, ".vue.js") + )}, \`http://TEST\${import.meta.url}\`).pathname, '${resolve('vue')}')`, + wrapperImport: `import {__vue_dynamic} from '${internalImport('render/vue.js')}';`, + }; + } else { + return { + wrapper: `__vue_static(${name})`, + wrapperImport: ` + import {__vue_static} from '${internalImport('render/vue.js')}'; + ` + }; + } + } + } + throw new Error("Unknown Component Type: " + name); +} + +async function convertHmxToJsx(template: string, compileOptions: CompileOptions) { + await eslexer.init; + const ast = parse(template, {}); + // Todo: Validate that `h` and `Fragment` aren't defined in the script + const script = ast.instance ? astring.generate(ast.instance.content) : ""; + const [scriptImports] = eslexer.parse(script, "optional-sourcename"); + const components = Object.fromEntries( + scriptImports.map((imp) => { + const componentType = path.posix.extname(imp.n!); + const componentName = path.posix.basename(imp.n!, componentType); + return [componentName, { type: componentType, url: imp.n! }]; + }) + ); + + const additionalImports = new Set(); + let items: { name: string; jsx: string }[] = []; + let mode: "JSX" | "SCRIPT" | "SLOT" = "JSX"; + let collectionItem: { name: string; jsx: string } | undefined; + let currentItemName: string | undefined; + let currentDepth = 0; + + walk(ast.html as any, { + // @ts-ignore + enter(node: TemplateNode, parent, prop, index) { + // console.log("enter", node.type); + switch (node.type) { + case "MustacheTag": + let { code } = transformSync(node.expression, { + loader: "jsx", + jsxFactory: "h", + jsxFragment: "Fragment", + charset: "utf8", + }); + + let matches: RegExpExecArray[] = []; + let match: RegExpExecArray | null | undefined; + const H_COMPONENT_SCANNER = /h\(['"]?([A-Z].*?)['"]?,/gs; + const regex = new RegExp(H_COMPONENT_SCANNER); + while ((match = regex.exec(code))) { + matches.push(match); + } + for (const match of matches.reverse()) { + const name = match[1]; + const [componentName, componentKind] = name.split(":"); + if (!components[componentName]) { + throw new Error(`Unknown Component: ${componentName}`); + } + const { wrapper, wrapperImport } = getComponentWrapper( + name, + components[componentName], + compileOptions + ); + if (wrapperImport) { + additionalImports.add(wrapperImport); + } + if (wrapper !== name) { + code = + code.slice(0, match.index + 2) + + wrapper + + code.slice(match.index + match[0].length - 1); + } + } + collectionItem!.jsx += `,(${code.trim().replace(/\;$/, "")})`; + return; + case "Slot": + mode = "SLOT"; + collectionItem!.jsx += `,child`; + return; + case "Comment": + return; + case "Fragment": + // Ignore if its the top level fragment + // This should be cleaned up, but right now this is how the old thing worked + if (!collectionItem) { + return; + } + case "InlineComponent": + case "Element": + const name: string = node.name; + if (!name) { + console.log(node); + throw new Error("AHHHH"); + } + const attributes = getAttributes(node.attributes); + currentDepth++; + currentItemName = name; + if (!collectionItem) { + collectionItem = { name, jsx: "" }; + items.push(collectionItem); + } + collectionItem.jsx += collectionItem.jsx === "" ? "" : ","; + const COMPONENT_NAME_SCANNER = /^[A-Z]/; + if (!COMPONENT_NAME_SCANNER.test(name)) { + collectionItem.jsx += `h("${name}", ${ + attributes ? generateAttributes(attributes) : "null" + }`; + return; + } + if (name === 'Component') { + collectionItem.jsx += `h(Fragment, null`; + return; + } + const [componentName, componentKind] = name.split(":"); + const componentImportData = components[componentName]; + if (!componentImportData) { + throw new Error(`Unknown Component: ${componentName}`); + } + const { wrapper, wrapperImport } = getComponentWrapper( + name, + components[componentName], + compileOptions + ); + if (wrapperImport) { + additionalImports.add(wrapperImport); + } + collectionItem.jsx += `h(${wrapper}, ${ + attributes ? generateAttributes(attributes) : "null" + }`; + return; + case "Attribute": { + this.skip(); + return; + } + case "Text": { + const text = getTextFromAttribute(node); + if (mode === "SLOT") { + return; + } + if (!text.trim()) { + return; + } + if (!collectionItem) { + throw new Error("Not possible! TEXT:" + text); + } + if (currentItemName === "script" || currentItemName === "code") { + collectionItem.jsx += "," + JSON.stringify(text); + return; + } + collectionItem.jsx += "," + JSON.stringify(text); + return; + } + default: + console.log(node); + throw new Error("Unexpected node type: " + node.type); + } + }, + // @ts-ignore + leave(node: TemplateNode, parent, prop, index) { + // console.log("leave", node.type); + switch (node.type) { + case "Text": + case "MustacheTag": + case "Attribute": + case "Comment": + return; + case "Slot": { + const name = node.name; + if (name === "slot") { + mode = "JSX"; + } + return; + } + case "Fragment": + if (!collectionItem) { + return; + } + case "Element": + case "InlineComponent": + if (!collectionItem) { + throw new Error("Not possible! CLOSE " + node.name); + } + collectionItem.jsx += ")"; + currentDepth--; + if (currentDepth === 0) { + collectionItem = undefined; + } + return; + default: + throw new Error("Unexpected node type: " + node.type); + } + }, + }); + + /* + console.log({ + additionalImports, + script, + items, + }); + */ + + return { + script: script + "\n" + Array.from(additionalImports).join("\n"), + items, + }; +} + +async function convertMdToJsx(contents: string, compileOptions: CompileOptions) { + // This doesn't work. + const { data: _frontmatterData, content } = matter(contents); + const mdHtml = micromark(content, { + extensions: [gfmSyntax()], + htmlExtensions: [gfmHtml, markdownEncode], + }); + + const setupData = { + title: _frontmatterData.title, + description: _frontmatterData.description, + layout: _frontmatterData.layout, + content: { + frontmatter: _frontmatterData, + + // This is an awful hack due to Svelte parser disliking script tags badly. + source: content.replace(/<\/?script/g, 'export function setup() { + return ${JSON.stringify(setupData)}; + }${mdHtml}`, compileOptions); +} + +async function transformFromSource( + contents: string, + filename: string, + compileOptions: CompileOptions +): Promise> { + switch (path.extname(filename)) { + case ".hmx": + return convertHmxToJsx(contents, compileOptions); + case ".md": + return convertMdToJsx(contents, compileOptions); + default: + throw new Error("Not Supported!"); + } +} + +export async function compilePage(source: string, filename: string, opts: CompileOptions = defaultCompileOptions) { + const sourceJsx = await transformFromSource(source, filename, opts); + const headItem = sourceJsx.items.find((item) => item.name === "head"); + const bodyItem = sourceJsx.items.find((item) => item.name === "body"); + const headItemJsx = !headItem + ? "null" + : headItem.jsx.replace('"head"', 'isRoot ? "head" : Fragment'); + const bodyItemJsx = !bodyItem + ? "null" + : bodyItem.jsx.replace('"head"', 'isRoot ? "body" : Fragment'); + + const modJsx = ` +${sourceJsx.script} + +import { h, Fragment } from '${internalImport('h.js')}'; +export function head({title, description, props}, child, isRoot) { return (${headItemJsx}); } +export function body({title, description, props}, child, isRoot) { return (${bodyItemJsx}); } +`.trim(); + + return { + contents: modJsx, + }; +} + +export async function compileComponent(source: string, filename: string, opts: CompileOptions = defaultCompileOptions) { + const sourceJsx = await transformFromSource(source, filename, opts); + const componentJsx = sourceJsx.items.find( + (item) => item.name === "Component" + ); + if (!componentJsx) { + throw new Error(`${filename} expected!`); + } + const modJsx = ` + import { h, Fragment } from '${internalImport('h.js')}'; + export default function(props) { return h(Fragment, null, ${componentJsx.jsx}); } + `.trim(); + return { + contents: modJsx, + }; +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..1e417f9e6 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,72 @@ +{ + "include": ["src"], + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "module": "ES2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + "outDir": "./lib", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ + // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ + + /* Module Resolution Options */ + "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + + /* Advanced Options */ + "skipLibCheck": true, /* Skip type checking of declaration files. */ + "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ + } +}